You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MOCA SBX] Run body-reading plugins (IBAC, SPARC, tool-prune) under a streaming contract #1487
Priority: P3 · Part of the Cortex × MOCA SBX epic · Not in #905's breakdown · This is the reason MOCA would move from moca-egress to Cortex
Problem
MOCA's contract streams bodies and never buffers them, to keep less decrypted data on the host and less code on the critical path. The Cortex plugins MOCA wants most, ibac, sparc, tool-prune and context-guru, read bodies.
Two further constraints:
Plugins see only intercepted traffic. MOCA intercepts only hosts with a credential, plus an opt-in inspect list, so every plugin's hosts must be on that list.
IBAC needs the user's intent. That is the last thing the user asked for, and today it is extracted from inbound A2A messages and read from pctx.Session.LastIntent() (ibac/plugin.go:464). In SBX the intent lives on the harness side and would have to arrive over the control channel (issue 2).
Design questions
Per-host opt-in buffering, with a size cap and a named refusal when it is exceeded?
The intent channel: a control message alongside Rebind, or a separate feed?
Latency budget per tool call. SBX's warm Exec is about 53 ms, so a judge call adds a measurable fraction.
Done when
ibac runs on an intercepted, inspect-listed host in the MOCA profile with an intent delivered over the control channel. Streaming hosts are unaffected.
Grounding review on 2026-11-23 (moca maine464dd6, Cortex main7f3eec7):
moca has no inspect list. MOCA_EGRESS_INSPECT is in MI1 §15 but not in the code. moca intercepts a connection only when a credential applies (remote-worker/internal/egress/handler.go:239-260). So a body plugin on this role sees only intercepted hosts, unless a new, general setting selects more hosts.
The IBAC line that this issue cites moved to :451.
Activity
huang195 commentedon Nov 23, 2026
Grounding review on 2026-11-23 (moca
maine464dd6, Cortexmain7f3eec7):MOCA_EGRESS_INSPECTis in MI1 §15 but not in the code. moca intercepts a connection only when a credential applies (remote-worker/internal/egress/handler.go:239-260). So a body plugin on this role sees only intercepted hosts, unless a new, general setting selects more hosts.:451.Assisted-By: Claude (Anthropic AI) [email protected]