Skip to content

feat(sleep): add OpenCode transcript source - #223

Merged
Yifan Yang (Yif-Yang) merged 2 commits into
microsoft:mainfrom
YingqiDuan:feat/opencode-transcript-source
Aug 13, 2026
Merged

feat(sleep): add OpenCode transcript source#223
Yifan Yang (Yif-Yang) merged 2 commits into
microsoft:mainfrom
YingqiDuan:feat/opencode-transcript-source

Conversation

@YingqiDuan

Copy link
Copy Markdown
Contributor

Part of #56

Summary

  • Added OpenCode transcript harvesting through --source opencode.
  • Added database selection through --opencode-db, the opencode_db config key, OPENCODE_DB, and OpenCode's normal XDG data location.
  • Reads OpenCode's local SQLite history directly without launching the OpenCode CLI or requiring login or provider access.
  • Added read-only schema checks, live-WAL support, secret redaction, and filtering for nested and SkillOpt-created sessions.
  • Added focused tests, an opt-in real-database smoke test, documentation, and a changelog entry.

Data boundary

The source keeps visible user and assistant text, short tool names, the recorded project directory, Git branch, and session timestamps.

It excludes reasoning, tool arguments and results, file contents, patches, and provider/model/account metadata. Only root sessions are harvested, and sessions created by SkillOpt's OpenCode backend are excluded.

Validation

  • Focused suite: 88 passed, 3 skipped, including all 27 offline OpenCode transcript-source tests. The skipped tests are two opt-in backend live tests and one opt-in transcript-source live test.
  • Windows: the transcript-source live test passed against a real OpenCode 1.18.15 database.
  • Linux: the same live test passed under Ubuntu WSL2 against a temporary database created by the native OpenCode 1.18.15 CLI. The test itself only reads SQLite and does not launch the CLI or call a model.
  • Ruff, formatting checks, py_compile, and git diff --check: passed.
  • python -m mkdocs build --strict: passed.

@YingqiDuan
YingqiDuan marked this pull request as ready for review August 13, 2026 06:53
@Yif-Yang
Yifan Yang (Yif-Yang) merged commit 03b2f42 into microsoft:main Aug 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants