Skip to content

(harnesses): CLI harness port and Claude adapter, no behaviour change (#820) - #865

Merged
devsuitup merged 5 commits into
mainfrom
wt/820
Nov 7, 2026
Merged

devsuitup merged 5 commits into
mainfrom
wt/820

Conversation

@devsuitup

@devsuitup devsuitup commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Closes #820. First step of the Codex CLI support port. No visible change.

Adapted from upstream work by Ali Basiri (ac72985f, f5e38a75). The fork had diverged too far to cherry-pick, so this wraps the fork's own modules instead of moving them.

  • harnesses/{index,contract,claude}.js: upstream's registry names, plus a contract (TranscriptStore, TranscriptParser, Launcher, ActivityClassifier, optional UsageProvider, capability flags such as subagents, continuations, liveElsewhere, bgJobs, ideBridge, sandbox, schedule, remote) and assertHarness(). test/harness-contract.test.js runs against every registered adapter. Adapters are pure: no Electron, no DB.
  • The Claude adapter delegates to the existing transcript parser and enumerator, project-path helpers, continuations, live-elsewhere reader, background-job cache, binary resolver and title classifier. Nothing is moved or rewritten; routing session-cache and friends through getHarness() is a later step.
  • open-terminal builds its argv through a pure buildLaunchArgs(). Nine scenarios (new, resume, missing transcript, fork, fork with worktree, non-git worktree, named worktree, all options, permission mode) were characterised before the extraction and give the same argv after it. Worktree, sandbox, pre-launch and MCP wrapping stay in main.
  • runtime TEXT DEFAULT 'claude' and sessionFile TEXT are added through the writer's column reconcile (ADR 0004); an old schema gains both with no row loss.
  • harnesses/** is in build.files, and the module-layout guard now scans harnesses/.

Schema note: session-index-store.js adds two nullable-default columns to the sessions table on a writable open (runtime TEXT DEFAULT 'claude', sessionFile). Nothing reads them yet and older builds ignore extra columns; this is the only persistent change in an otherwise behaviour-neutral port.

Updated 2026-11-03: merged main (abd011b, v0.0.103) into the branch: README conflict resolved, harnesses/ requires repointed to src/main/bg-agents/bg-agents and src/main/remote/remote-hosts after the ADR 0005 moves. The diff against main is otherwise identical to the approved 1ac93ca.

@devsuitup devsuitup added the no-changelog The PR changes nothing a user sees; the CHANGELOG.md check is waived label Oct 29, 2026
harnesses/{index,contract,claude}.js define the per-CLI contract and wrap
the fork's Claude modules without moving them. open-terminal builds its argv
through a pure buildLaunchArgs with today's output. The index gains runtime
and sessionFile columns through the writer's column reconcile.
…x port

listTranscripts takes a transcript directory like upstream, folderForProject
may return null, and groupsByProject, sessionIdFromPath and an id-detection
capability join the contract. The changelog check counts harnesses/ as app
code.
@devsuitup

Copy link
Copy Markdown
Owner Author

Decided by Jean-Baptiste in person, 2026-11-03: rebase onto main (fix the moved bg-agents/remote requires and the README conflict), rerun CI, then JB tests a fresh packaged installer as ADR 0005 requires.

# Conflicts:
#	.ai/contexts/README.md
@devsuitup devsuitup closed this Nov 7, 2026
@devsuitup devsuitup reopened this Nov 7, 2026
@devsuitup devsuitup closed this Nov 7, 2026
@devsuitup devsuitup reopened this Nov 7, 2026
@devsuitup
devsuitup merged commit 9fd7c60 into main Nov 7, 2026
11 checks passed
@devsuitup
devsuitup deleted the wt/820 branch November 7, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog The PR changes nothing a user sees; the CHANGELOG.md check is waived

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(harnesses): CLI harness port and Claude adapter, no behaviour change

1 participant