Repository navigation
feat: Command Code projectContext, Antigravity in-turn grounding, Cursor native-exec bridge - #17
Merged
Merged
Conversation
|
✅ Deterministic PR hygiene checks passed. |
…erate Adds `projectContext: "on"` on the OAuth `command-code` provider. When on, the adapter fills `/alpha/generate` `memory` (AGENTS.md), `taste` (.commandcode/taste/taste.md), and `skills` (SKILL.md under .commandcode/skills, .agents/skills, .pi/skills) from bounded files under process.cwd(). Absent or "off" keeps the empty envelope; the API-key `commandcode` preset is unaffected and `x-taste-learning` stays "false". Loader is fail-soft with confinement and resource bounds: canonical-path confinement prevents symlink escape, cap+1 bounded reads with handle cleanup on timeout, a 256-entry scan cap on skill directories, per-file byte caps with XML escaping, and a 128-entry TTL cache that does not evict siblings on refresh. OAuth upsert preserves projectContext, and the Lab behavior fingerprint records `wire.commandCodeProjectContext` for command-code only. Co-authored-by: Cursor <cursoragent@cursor.com>
For Antigravity (CCA) Gemini routes, `google_search` and `url_context` built-in tools ride the main routed fetch instead of the web-search sidecar loop when the turn has no conflicting Codex function tools. A per-request FIFO `emitInTurnGroundingSourcesQueue` keeps grounding state isolated across concurrent requests; the flag is enqueued only on a successful buildRequest return and shifted in parseStream, so a buildRequest that throws cannot desynchronize a later turn. The mixed-tool 400 detector requires coexistence language (mix/combine/ coexist/alongside/together/use-with/not-supported-with/mutually-exclusive) near a function/tool term, so schema-only errors naming a builtin fall through to schema repair instead of burning the single replay on a strip. On a genuine mixed-tool 400, builtins are stripped; if stripping is a no-op the request falls through to schema repair. Media/grounding ordering: image/video plans are computed before the grounding gate and count as tool-presence only when the media branch will actually inject this turn, so non-streaming video or web-search-wins turns keep in-turn grounding on Gemini 2.x. CCA grounding sources are routed through the shared safe-source validator (http(s) URLs, control-char strip, count and byte budgets) and the search-suggestion HTML filter is gated on the per-request CCA flag. Co-authored-by: Cursor <cursoragent@cursor.com>
…is off When `nativeLocalExec` is not "on" and the turn advertises a bare Codex `shell_command` or `exec_command` bridge tool, native Shell/Read/Ls/Grep/Fetch exec frames map to that Codex shell tool call instead of executing on the proxy host; write/delete stay refused. `nativeLocalExec: "on"` still runs native exec on the proxy host. The bridge selector honors the catalog order of CODEX_SHELL_BRIDGE_TOOL_NAMES so a client advertising both aliases picks `exec_command`. The live transport hook emits no native exec frames while the bridge is active. Adds the design spec and updates the transports reference and adapter docs across locales. Co-authored-by: Cursor <cursoragent@cursor.com>
…in web-search mock stub The Antigravity in-turn-grounding slice added mediaBridgeWillRun and resolveCcaInTurnGrounding imports to src/server/responses/core.ts from ../../web-search. tests/images/z-handler-activation.test.ts mocks the whole web-search/index module with a stub, so the stub must provide both exports or the test fails to load with "Export named ... not found". mediaBridgeWillRun replicates the real pure function so the runTurn streaming image-bridge activation cases still exercise the documented priority. Co-authored-by: Cursor <cursoragent@cursor.com>
yansigit
force-pushed
the
feat/cc-antigravity-cursor-bridges
branch
from
August 24, 2026 08:59
c4e609e to
9e67838
Compare
cursor Bot
pushed a commit
that referenced
this pull request
Oct 12, 2026
…flag tool errors, system prompt in #2 (carry lidge-jun#6092) (lidge-jun#6178) * fix(devin): system prompt in #2, tool-error flag, Gemini schemas, history overflow - Send the leading system text as GetChatMessage #2 instead of folding it into the first user prompt. Live on swe-1-6 with a ~6.7k-token system prompt the turn-2 cache ratio is unchanged (6688/6715 vs 7072/7097) and the prompt is smaller; swe-1-6, swe-2-medium, gemini and claude all obey #2. - Mark failed tool results with ChatMessagePrompt #9 tool_result_is_error instead of an in-band "ERROR:" prefix. - Rewrite JSON-Schema type arrays to anyOf in tool parameters for Gemini uids, which Cognition refuses with invalid_argument on every turn. - Surface a pre-output invalid_argument on a history near or past the model's input window as context_length_exceeded so Codex compacts; small requests with the same code stay a plain 400. - Correct the #15 (CortexTrajectoryReference), #17 prompt_id and #22 execution_id comments. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit 29688bf) * fix(devin): measured overflow boundary, per-type Gemini branches, tool-error marker - Overflow: binary-searched live on swe-1-6 (200k window) the refusal sits at ~200-203k real tokens for prose and JSON alike, and a 32000 output cap does not move it. Characters per token ran 1.33-5.53 across samples, so the chars/4 estimate is replaced by a word-piece count (1.00-1.54x real) at 95% of the window: every sample at the window is caught, none at 60% is. - Gemini schemas: `{type:[T,"null"], ...}` becomes anyOf branches that carry the type-specific keywords (items, properties, ...); an existing anyOf is folded in rather than nested under allOf. Draft-7 `dependencies` is walked as a schema map with name lists left as data. - Tool errors keep the in-band ERROR: marker beside #9: with a neutral result flagged as an error only gemini reported a failure; swe-1-6, gpt-6-sol-low and gpt-5-6-luna-low read it as success. - A request with only system text keeps it as a user prompt instead of sending no prompts. - Docs: describe the context_length_exceeded reclassification beside the allowDevinInvalidArgument recovery option. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit d84edae) * fix(devin): keep outer constraints when folding a Gemini anyOf Folding each existing anyOf branch into the outer keywords let a branch override a contradicting outer keyword, so `{maxLength: 5, anyOf: [{maxLength: 50}]}` loosened to 50. On any such disagreement, keep both constraints under allOf instead; live, gemini-3-8-flash-medium accepts allOf. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit db28e2d) * docs(devin): match the collapseSystemIntoUser example to the #2 system prompt The example still showed the leading system messages folded into the first user turn, which now travel in request #2. Show a mid-conversation system run instead, with the real blank-line join, and note that a system-only request passes through whole. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit b2d9ded) * docs(devin): show the blank-line join in the collapse example Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit 3232330) * fix(devin): keep both constraints when a Gemini type union and anyOf are disjoint When no existing anyOf branch shared a type with the type array, the fallback kept the anyOf and dropped the type union, so the branches admitted types the node never allowed. Keep both under allOf, the same form the conflict path uses; live, gemini-3-8-flash-medium accepts it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> (cherry picked from commit b87b332) * fix(devin): classify overflow from the selected catalog window Co-authored-by: Sayo <hi@sayo.wtf> * fix(devin): preserve null constraints in Gemini schema rewrite Co-authored-by: Sayo <hi@sayo.wtf> * docs(devin): record malformed-schema overflow ambiguity Co-authored-by: Sayo <hi@sayo.wtf> * fix(devin): preserve outer schema constraints on nullable types Co-authored-by: Sayo <hi@sayo.wtf> * fix(devin): estimate overflow from transmitted tool descriptions Co-authored-by: Sayo <hi@sayo.wtf> * docs(structure): keep the effective Devin family default in the adapter row Co-authored-by: Sayo <hi@sayo.wtf> --------- Co-authored-by: Sayo <hi@sayo.wtf> Co-authored-by: Claude Opus 5.5 (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.
Summary
Three independent feature slices, one commit each:
feat(command-code)— opt-inprojectContextenvelope for/alpha/generate. NewprojectContext: "on"on the OAuthcommand-codeprovider fillsmemory(AGENTS.md),taste(.commandcode/taste/taste.md), andskills(SKILL.md under .commandcode/skills, .agents/skills, .pi/skills) from bounded files underprocess.cwd(). Absent or"off"keeps the empty envelope; the API-keycommandcodepreset is unaffected andx-taste-learningstays"false". The loader is fail-soft with canonical-path confinement (symlink-escape proof), cap+1 bounded reads with handle cleanup on timeout, a 256-entry scan cap on skill directories, per-file byte caps with XML escaping, and a 128-entry TTL cache that does not evict siblings on refresh. OAuth upsert preservesprojectContext, and the Lab behavior fingerprint recordswire.commandCodeProjectContextforcommand-codeonly.feat(antigravity)— in-turn CCA grounding on the main routed fetch. For Antigravity (CCA) Gemini routes,google_searchandurl_contextbuilt-in tools ride the main routed fetch instead of the web-search sidecar loop when the turn has no conflicting Codex function tools. A per-request FIFOemitInTurnGroundingSourcesQueuekeeps grounding state isolated across concurrent requests (enqueued only on a successfulbuildRequestreturn, shifted inparseStream). The mixed-tool 400 detector requires coexistence language near a function/tool term, so schema-only errors naming a builtin fall through to schema repair. Media/grounding ordering counts media as tool-presence only when the media branch will actually inject this turn. CCA grounding sources are routed through the shared safe-source validator and the search-suggestion HTML filter is gated on the per-request CCA flag.feat(cursor)— bridge native exec to Codex shell whennativeLocalExecis off. WhennativeLocalExecis not"on"and the turn advertises a bare Codexshell_commandorexec_commandbridge tool, native Shell/Read/Ls/Grep/Fetch exec frames map to that Codex shell tool call instead of executing on the proxy host; write/delete stay refused. The bridge selector honors the catalog order ofCODEX_SHELL_BRIDGE_TOOL_NAMES. Adds the design spec and updates the transports reference and adapter docs across locales.Verification
bun run typecheck(strict + replit-gateway): passed.core-lab-boundary+web-search-loop: 15/15 pass — no Lab import boundary violation, no loop regression.Checklist
src/have focused regression tests.bun run typecheckpassed.Fork-only PR against
origin/main(yansigit/opencodex). The.superpowers/scratch directory was deliberately not committed.Made with Cursor