feat(core,cli): M8 — worktree + launchd plist + headless --json-schema/--include-partial-messages#27
Merged
Merged
Conversation
…partial-msgs
· packages/core/src/worktree/index.ts (NEW)
- createWorktree({ source, branch?, parentDir?, config? }) — `git worktree
add -b <branch> <path> <baseRef>`; honors sparsePaths (sparse-checkout)
and symlinkDirectories (e.g. node_modules pointer to source).
- removeWorktree(handle) — idempotent; `git worktree remove --force` +
`git branch -D`.
- 5 tests covering baseRef, symlinkDirectories, non-repo error,
idempotent remove.
· packages/core/src/launchd/index.ts (NEW)
- buildPlist(opts) — pure XML generator (~/Library/LaunchAgents/
dev.deepcode.scheduler.plist).
- installPlist / uninstallPlist — file IO + idempotent.
- Escapes XML special chars in paths.
- 5 tests.
· apps/cli/src/headless.ts + cli.ts
- --include-partial-messages now drops/keeps text_delta + thinking_delta
in stream-json mode.
- --json-schema loads + validates: type:object + required fields. JSON
output reports schemaError + sets exitCode=1 on mismatch. Lightweight
(no draft-2020 full validator dep — opt-in via separate validator).
Tests: core 383 → 393 (+10); cli 47 unchanged. Total 430 → 440.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Worktree create/remove with baseRef + sparse-checkout + symlinkDirectories. launchd LaunchAgent plist generator + installer. Headless --include-partial-messages now drops delta events when off; --json-schema enforces type:object + required[]. 10 new tests. 440 passing.