Refactor Decopilot worker contract#4165
Open
tlgimenes wants to merge 23 commits into
Open
Conversation
2add606 to
618a2fd
Compare
26a2763 to
b74a0fd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
harness.sessionId, repo/no-repo cwd semantics, and protocol-version rejection with upgrade guidance.Test Plan
bun test packages/sandbox/daemon/routes/dispatch.test.ts packages/sandbox/dispatch/schemas.test.ts packages/sandbox/daemon/rebase-workspace-cwd.test.ts packages/harness/src/workspace-cwd.test.tsbun run checkNotes
127.0.0.1:4222/::1:4222./login.Summary by cubic
Moves Decopilot and CLI harnesses to link protocol v3: one
userMessage, resume viaharness.sessionId, andrunIdmoved to the dispatch envelope. Removes the desktop Decopilot runtime, tightensworkspace.cwdtonullor/repo, and enables vision on CLI models for image inputs.Migration
bunx decocms@latest link(v3 required; stale links show an upgrade message).userMessage(nomessagesarray); resume viaharness.sessionId(notresumeSessionRef).workspace.cwdto onlynullor/repo; the daemon rebases/repoand passes throughnull.runIdin the dispatch envelope (outsideharnessInput); the daemon returns400 missing_run_idwhen absent.@decocms/harness./decopilotexport is gone.capabilities: { vision: true, text: true }on CLI models to accept image file parts.Refactors
setDecopilotRunContext/requireDecopilotRunContextto carry Decopilot-only context (MCP, model sources, object storage, branch, user, prior messages) off the wire and load history in-cluster.@decocms/harnessroot (stream-error,current-context-prompt,thread-title,title-generator) and updated imports.claude-codeandcodexto v3: accept oneuserMessage, forwardharness.sessionId, support image file parts, and stay decoupled from the Decopilot namespace.missing_run_idfor bad envelopes.Written for commit b74a0fd. Summary will update on new commits.