feat: Deterministic Agent Callbacks Model-Initiated Control Umbrella - Unleash the CLI in opencode#20074
Open
micuintus wants to merge 4 commits intoanomalyco:devfrom
Open
feat: Deterministic Agent Callbacks Model-Initiated Control Umbrella - Unleash the CLI in opencode#20074micuintus wants to merge 4 commits intoanomalyco:devfrom
micuintus wants to merge 4 commits intoanomalyco:devfrom
Conversation
Contributor
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
eb3cf77 to
7d30c93
Compare
- Handle sync plugin hooks in Effect.promise - Update turbo to v2.8.21 to resolve socket error - Remove dead scripts from package.json
Implement the DACMICU pattern — deterministic agent callbacks with model-initiated control. The LLM writes bash scripts that call back into the running openCode instance via the oc command. - Add bin/oc shell wrapper and bin/oc.ts TypeScript implementation - Add /session/:id/exec endpoint for AI judgment (child sessions) - Add /session/:id/tool endpoint for direct tool execution (no LLM) - Integrate oc env vars into bash tool (server URL, session, PATH) - Add oc scripting guidance to system prompt - Add TodoReadTool for oc todo list support - Add MessageV2.model() for parent session model inheritance - Add followUp schema for oc check boolean evaluation - Add TUI visibility for oc calls (ToolParts with metadata.oc) - Fix subagent navigation direction and naming conventions - Disable timeout for any script containing oc commands - Skip timer entirely when timeout is 0 (DACMICU mode)
- Add dacmicu.test.ts: CLI unit tests, binary protocol, shell fast-path, oc check sentinel detection, keepalive protocol - Add ralph-loop-timeout.test.ts: AST-based oc command detection, timeout configuration per command type - Add dacmicu-endpoints.test.ts: /tool and /exec endpoint integration tests, ToolPart creation, binary file pass-through, followUp schema - Add oc.test.ts: exec timeout regression tests - Add message-v2.test.ts and bash.test.ts: extended coverage for MessageV2 and bash tool changes - Fix compaction test to match Stream.mapEffect signature change
- Add specs/DACMICU.md: full design document covering the four pillars (Manus CLI, deterministic split, Ralph Loop, Fabric composition), architecture, competitive landscape, and adoption strategy - Add test/eval/dacmicu-adoption.sh: measures LLM adoption rate across 5 prompt patterns with scoring (0/1/2 per prompt) - Add test/eval/dacmicu-fast.sh: lightweight 3-prompt eval for quick iteration testing
7d30c93 to
8e288cf
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.
Issue for this PR
Closes #20018
Type of change
What does this PR do?
Closes #20018 — Enter DACMICU = Deterministic Agent Callbacks — Model-Initiated Control Umbrella
The heart of this PR: It introduces a CLI tool (
oc) that "calls back into opencode"Idea: Unleash the full power of the UNIX CLI in opencode, see #20018
Three Use Cases
1. Ralph Loop — delegate entire task, re-verify until clean
2. Fabric-style pipes — AI judgment in Unix pipelines
3. Deterministic batch with opencode tools
How did you verify your code works?
Screenshots / recordings
Fabric
SR.DACMICU.Fabric_compressed.mov
Sorry for the token waste :D, but the reason I let it run on 243 files was to make the point:
Ralph Loop
Example 1:
Another run (both with Sonnet)
Checklist
If you do not follow this template your PR will be automatically rejected.