fix: match the real Codex 0.165.0 initialize and config/read shapes
8 files changed,
+1,033
−29
docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md+308 −0internal/directlive/driver_test.go+6 −0internal/directlive/testdata/fake-cli.py+24 −3internal/runner/provider/codex/events.go+6 −1internal/runner/provider/codex/launcher.go+32 −17internal/runner/provider/codex/launcher_test.go+8 −8internal/runner/provider/codex/readback_test.go+146 −0internal/runner/provider/codex/testdata/unauthenticated-0.165.0.json+503 −0
Intent
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md| index e571656f..2d3118f4 100644 |
| --- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md |
| +++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-2b.md |
| @@ -24702,3 +24702,311 @@ The shell cleanup trap was rejected before execution for containing recursive fo |
| Concerns: on-disk full tests reported forge-package timing overruns (18.143s, 10.613s and 12.189s against 10s). Those are warnings locally but enforced in CI. The `/tmp` run reported none. No timing budget was changed. Existing live-certification gaps remain outside this offline run. No app strings or copy.go entries changed; new diagnostics are test-only and listed in the full report. |
| Full report, captured outputs and interpretations: `.superpowers/sdd/2026-11-03-equipo-plan-2b-direct/gate-report.md`. All fixes are separate commits; no push or live provider operation occurred. |
| + |
| +## B2-C1 |
| + |
| +Removed the frozen question deadline from both native permission and ask_person relays. The supervisor attempt context and current authority checks control the wait; delivery rechecks the renewed bound. Answers retry transient errors and poll once per second. Tests deliver Claude, Codex and ask_person answers after their original lease bound, check retry and cadence. No UI strings. |
| + |
| +Interpretations: The first transient-error fixture used an untyped error, which correctly is not retryable. Corrected it to ErrTransient; the retry mutation independently proves failure. Red command used the same two test names as green. |
| + |
| +### B2-C1-red |
| + |
| +```text |
| +--- FAIL: TestDirectQuestionRenewedLease (0.82s) |
| + --- FAIL: TestDirectQuestionRenewedLease/claude (0.41s) |
| + direct_wait_test.go:32: context deadline exceeded |
| + --- FAIL: TestDirectQuestionRenewedLease/codex (0.21s) |
| + direct_wait_test.go:32: context deadline exceeded |
| + --- FAIL: TestDirectQuestionRenewedLease/ask_person (0.21s) |
| + direct_wait_test.go:28: context deadline exceeded |
| +--- FAIL: TestDirectAskRetriesAndCadence (0.33s) |
| + direct_wait_test.go:48: temporary connection failure |
| +FAIL |
| +rastrillo-budget/v1 ran 1.156s |
| +FAIL amadan.net/oficina/equipo/internal/runner 1.159s |
| +FAIL |
| +``` |
| + |
| +### B2-C1-green |
| + |
| +`CGO_ENABLED=0 go test ./internal/runner -run '^TestDirect(QuestionRenewedLease|AskRetriesAndCadence)$' -count=1` |
| + |
| +Exit 0: |
| + |
| +```text |
| +ok amadan.net/oficina/equipo/internal/runner 1.828s |
| +``` |
| + |
| +### B2-C1-mut-permission |
| + |
| +`CGO_ENABLED=0 go test ./internal/runner -run '^TestDirect(QuestionRenewedLease|AskRetriesAndCadence)$' -count=1` |
| + |
| +Exit 1: |
| + |
| +```text |
| +--- FAIL: TestDirectQuestionRenewedLease (0.48s) |
| + --- FAIL: TestDirectQuestionRenewedLease/claude (0.22s) |
| + direct_wait_test.go:50: context deadline exceeded |
| + --- FAIL: TestDirectQuestionRenewedLease/codex (0.11s) |
| + direct_wait_test.go:50: context deadline exceeded |
| +FAIL |
| +rastrillo-budget/v1 ran 1.621s |
| +FAIL amadan.net/oficina/equipo/internal/runner 1.625s |
| +FAIL |
| +``` |
| + |
| +### B2-C1-mut-ask |
| + |
| +`CGO_ENABLED=0 go test ./internal/runner -run '^TestDirect(QuestionRenewedLease|AskRetriesAndCadence)$' -count=1` |
| + |
| +Exit 1: |
| + |
| +```text |
| +--- FAIL: TestDirectQuestionRenewedLease (0.57s) |
| + --- FAIL: TestDirectQuestionRenewedLease/ask_person (0.11s) |
| + direct_wait_test.go:42: context deadline exceeded |
| +FAIL |
| +rastrillo-budget/v1 ran 1.7s |
| +FAIL amadan.net/oficina/equipo/internal/runner 1.707s |
| +FAIL |
| +``` |
| + |
| +### B2-C1-mut-retry |
| + |
| +`CGO_ENABLED=0 go test ./internal/runner -run '^TestDirect(QuestionRenewedLease|AskRetriesAndCadence)$' -count=1` |
| + |
| +Exit 1: |
| + |
| +```text |
| +--- FAIL: TestDirectAskRetriesAndCadence (0.21s) |
| + direct_wait_test.go:85: runner_transient |
| +FAIL |
| +rastrillo-budget/v1 ran 783ms |
| +FAIL amadan.net/oficina/equipo/internal/runner 0.787s |
| +FAIL |
| +``` |
| + |
| +### B2-C1-mut-cadence |
| + |
| +`CGO_ENABLED=0 go test ./internal/runner -run '^TestDirect(QuestionRenewedLease|AskRetriesAndCadence)$' -count=1` |
| + |
| +Exit 1: |
| + |
| +```text |
| +--- FAIL: TestDirectAskRetriesAndCadence (0.51s) |
| + direct_wait_test.go:87: answer polling faster than one second |
| +FAIL |
| +rastrillo-budget/v1 ran 1.394s |
| +FAIL amadan.net/oficina/equipo/internal/runner 1.398s |
| +FAIL |
| +``` |
| + |
| +### B2-C1-green-final |
| + |
| +`CGO_ENABLED=0 go test ./internal/runner -run '^Test(DirectQuestionRenewedLease|DirectAskRetriesAndCadence|DirectStaleAnswer|CodexApprovalResponseRouting|DirectToolScopedAskAnswer)$' -count=1` |
| + |
| +Exit 0: |
| + |
| +```text |
| +ok amadan.net/oficina/equipo/internal/runner 3.565s |
| +``` |
| + |
| + |
| +## CI-1 |
| + |
| +The scanner enumerates cached git ls-files entries only. A regression test ignores both untracked and ignored dead references, then tracks the same file and requires rejection. Existing tracked-reference and exact-allowance tests pass. No UI strings. |
| + |
| +Interpretations: Red command: CGO_ENABLED=0 go test ./internal/equipotest -run ^TestDirectDeadReferencesTrackedOnly$ -count=1. The inventory is refreshed only for exact changed lines from this fix wave, with retained reasoned classifications. |
| + |
| +### CI-1-red |
| + |
| +```text |
| +--- FAIL: TestDirectDeadReferencesTrackedOnly (0.08s) |
| + direct_cutover_test.go:391: untracked content scanned: exit status 1 untracked.txt:1:10: unclassified paseo |
| + reference scan: 2 text files, 1 matches, 1 failures |
| +FAIL |
| +rastrillo-budget/v1 ran 77ms |
| +FAIL amadan.net/oficina/equipo/internal/equipotest 0.221s |
| +FAIL |
| +``` |
| + |
| +### CI-1-green |
| + |
| +`CGO_ENABLED=0 go test ./internal/equipotest -run '^TestDirectDeadReferences(TrackedOnly|ExactAllowances)?$' -count=1` |
| + |
| +Exit 0: |
| + |
| +```text |
| +ok amadan.net/oficina/equipo/internal/equipotest 1.116s |
| +``` |
| + |
| +### CI-1-mut |
| + |
| +`CGO_ENABLED=0 go test ./internal/equipotest -run '^TestDirectDeadReferences(TrackedOnly|ExactAllowances)?$' -count=1` |
| + |
| +Exit 1: |
| + |
| +```text |
| +--- FAIL: TestDirectDeadReferencesTrackedOnly (0.03s) |
| + direct_cutover_test.go:391: untracked content scanned: exit status 1 untracked.txt:1:10: unclassified paseo |
| + reference scan: 2 text files, 1 matches, 1 failures |
| +FAIL |
| +rastrillo-budget/v1 ran 503ms |
| +FAIL amadan.net/oficina/equipo/internal/equipotest 0.551s |
| +FAIL |
| +``` |
| + |
| + |
| +## B1-C1 |
| + |
| +Recorded the pinned real binary once with a new empty scratch CODEX_HOME and generated session flags. Only initialize, initialized and config/read(includeLayers:true) were sent; exit 0, three frames. No credentials, account RPC, thread or turn. Sanitized home, host, installation ID and timestamp. Both fakes now derive defaults, layer names and notifications from the committed fixture. Require the equipo user agent, ignore only the disabled remote-control notification, compare the exact sessionFlags layer, require empty recognized user/system layers and sessionFlags origins under configured keys. Effective configured leaves must still match; binary defaults may expand. No UI strings. |
| + |
| +Interpretations: The generated config.toml is empty; Equipo configuration is supplied through the same -c flags as production so the user layer remains empty. The real run script used subprocess with a 15-second reply deadline and cleanup in finally. Red command: CGO_ENABLED=0 go test ./internal/runner/provider/codex -run ^TestCodexRecorded -count=1. Initial green command: CGO_ENABLED=0 go test ./internal/runner/provider/codex -run ^TestCodex -count=1. |
| + |
| +### B1-C1-red |
| + |
| +```text |
| +--- FAIL: TestCodexRecordedReadback (0.18s) |
| + readback_test.go:35: codex_protocol_rejected |
| +FAIL |
| +rastrillo-budget/v1 ran 182ms |
| +FAIL amadan.net/oficina/equipo/internal/runner/provider/codex 0.184s |
| +FAIL |
| +``` |
| + |
| +### B1-C1-green |
| + |
| +```text |
| +ok amadan.net/oficina/equipo/internal/runner/provider/codex 9.831s |
| +``` |
| + |
| +### B1-C1-mut-agent |
| + |
| +`CGO_ENABLED=0 go test ./internal/runner/provider/codex -run ^TestCodexRecorded -count=1` |
| + |
| +Exit 1: |
| + |
| +```text |
| +--- FAIL: TestCodexRecordedReadback (0.19s) |
| + readback_test.go:96: provider_version_unsupported |
| +FAIL |
| +rastrillo-budget/v1 ran 193ms |
| +FAIL amadan.net/oficina/equipo/internal/runner/provider/codex 0.194s |
| +FAIL |
| +``` |
| + |
| +### B1-C1-mut-notification |
| + |
| +`CGO_ENABLED=0 go test ./internal/runner/provider/codex -run ^TestCodexRecorded -count=1` |
| + |
| +Exit 1: |
| + |
| +```text |
| +--- FAIL: TestCodexRecordedReadback (0.19s) |
| + readback_test.go:96: codex_protocol_rejected |
| +FAIL |
| +rastrillo-budget/v1 ran 200ms |
| +FAIL amadan.net/oficina/equipo/internal/runner/provider/codex 0.202s |
| +FAIL |
| +``` |
| + |
| +### B1-C1-mut-flags |
| + |
| +`CGO_ENABLED=0 go test ./internal/runner/provider/codex -run ^TestCodexRecorded -count=1` |
| + |
| +Exit 1: |
| + |
| +```text |
| +--- FAIL: TestCodexRecordedConfigLayers (0.01s) |
| + --- FAIL: TestCodexRecordedConfigLayers/flags-changed (0.00s) |
| + readback_test.go:130: unsafe readback accepted flags-changed |
| +FAIL |
| +rastrillo-budget/v1 ran 167ms |
| +FAIL amadan.net/oficina/equipo/internal/runner/provider/codex 0.169s |
| +FAIL |
| +``` |
| + |
| +### B1-C1-mut-empty-layer |
| + |
| +`CGO_ENABLED=0 go test ./internal/runner/provider/codex -run ^TestCodexRecorded -count=1` |
| + |
| +Exit 1: |
| + |
| +```text |
| +--- FAIL: TestCodexRecordedConfigLayers (0.01s) |
| + --- FAIL: TestCodexRecordedConfigLayers/user-config (0.00s) |
| + readback_test.go:130: unsafe readback accepted user-config |
| + --- FAIL: TestCodexRecordedConfigLayers/system-config (0.00s) |
| + readback_test.go:130: unsafe readback accepted system-config |
| +FAIL |
| +rastrillo-budget/v1 ran 227ms |
| +FAIL amadan.net/oficina/equipo/internal/runner/provider/codex 0.229s |
| +FAIL |
| +``` |
| + |
| +### B1-C1-mut-origin |
| + |
| +`CGO_ENABLED=0 go test ./internal/runner/provider/codex -run ^TestCodexRecorded -count=1` |
| + |
| +Exit 1: |
| + |
| +```text |
| +--- FAIL: TestCodexRecordedConfigLayers (0.01s) |
| + --- FAIL: TestCodexRecordedConfigLayers/origin-unknown (0.00s) |
| + readback_test.go:130: unsafe readback accepted origin-unknown |
| + --- FAIL: TestCodexRecordedConfigLayers/origin-prefix (0.00s) |
| + readback_test.go:130: unsafe readback accepted origin-prefix |
| + --- FAIL: TestCodexRecordedConfigLayers/origin-version (0.00s) |
| + readback_test.go:130: unsafe readback accepted origin-version |
| +FAIL |
| +rastrillo-budget/v1 ran 201ms |
| +FAIL amadan.net/oficina/equipo/internal/runner/provider/codex 0.203s |
| +FAIL |
| +``` |
| + |
| +### B1-C1-mut-effective |
| + |
| +`CGO_ENABLED=0 go test ./internal/runner/provider/codex -run ^TestCodexRecorded -count=1` |
| + |
| +Exit 1: |
| + |
| +```text |
| +--- FAIL: TestCodexRecordedConfigLayers (0.00s) |
| + --- FAIL: TestCodexRecordedConfigLayers/effective-changed (0.00s) |
| + readback_test.go:130: unsafe readback accepted effective-changed |
| +FAIL |
| +rastrillo-budget/v1 ran 224ms |
| +FAIL amadan.net/oficina/equipo/internal/runner/provider/codex 0.226s |
| +FAIL |
| +``` |
| + |
| +### B1-C1-green-final |
| + |
| +`CGO_ENABLED=0 go test ./internal/runner/provider/codex -run ^TestCodex -count=1` |
| + |
| +Exit 0: |
| + |
| +```text |
| +ok amadan.net/oficina/equipo/internal/runner/provider/codex 10.042s |
| +``` |
| + |
| +### B1-C1-fake-driver |
| + |
| +`CGO_ENABLED=0 go test ./internal/directlive -run ^TestDirectDriverFakeCLI$ -count=1` |
| + |
| +Exit 0: |
| + |
| +```text |
| +ok amadan.net/oficina/equipo/internal/directlive 92.875s |
| +``` |
| + |
| +### B1-C1-fake-driver |
| + |
| +`CGO_ENABLED=0 go test ./internal/directlive -run ^TestDirectDriverFakeCLI$ -count=1` |
| + |
| +Exit 0: |
| + |
| +```text |
| +ok amadan.net/oficina/equipo/internal/directlive 92.875s |
| +``` |
| + |
diff --git a/internal/directlive/driver_test.go b/internal/directlive/driver_test.go| index e585d7c6..85bf06f5 100644 |
| --- a/internal/directlive/driver_test.go |
| +++ b/internal/directlive/driver_test.go |
| @@ -25,6 +25,12 @@ func TestDirectDriverFakeCLI(t *testing.T) { |
| if err != nil { |
| t.Fatal(err) |
| } |
| + fixture, err := os.ReadFile("../runner/provider/codex/testdata/unauthenticated-0.165.0.json") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + literal, _ := json.Marshal(string(fixture)) |
| + script = []byte(strings.ReplaceAll(string(script), "RECORDED_FIXTURE", string(literal))) |
| pins := map[string]string{} |
| for _, name := range []string{"claude", "codex", "codex-code-mode-host"} { |
| raw := script |
diff --git a/internal/directlive/testdata/fake-cli.py b/internal/directlive/testdata/fake-cli.py| index 435e15e3..844eddb2 100644 |
| --- a/internal/directlive/testdata/fake-cli.py |
| +++ b/internal/directlive/testdata/fake-cli.py |
| @@ -1,6 +1,26 @@ |
| #!/usr/bin/python3 |
| import sys,json,os,re,subprocess,time |
| family=os.path.basename(sys.argv[0]) |
| +recorded=json.loads(RECORDED_FIXTURE) if family=='codex' else None |
| +def recorded_config(config): |
| + r=next(f['result'] for f in recorded['frames'] if f.get('id')==2) |
| + def remove(dst,src): |
| + for k,v in src.items(): |
| + if isinstance(v,dict):remove(dst[k],v) |
| + else:dst.pop(k,None) |
| + def merge(dst,src): |
| + for k,v in src.items(): |
| + if isinstance(v,dict):merge(dst.setdefault(k,{}),v) |
| + else:dst[k]=v |
| + remove(r['config'],recorded['settings']);merge(r['config'],config) |
| + r['layers'][0]['config']=config |
| + def leaves(prefix,v): |
| + if isinstance(v,dict): |
| + for k,w in v.items():yield from leaves(prefix+'.'+k if prefix else k,w) |
| + else:yield prefix |
| + r['origins']={k:{'name':{'type':'sessionFlags'},'version':'fixture'} for k in leaves('',config)} |
| + return r |
| + |
| def emit(v): |
| print(json.dumps(v),flush=True) |
| if family=='claude' and 'auth' in sys.argv: |
| @@ -23,11 +43,12 @@ for line in sys.stdin: |
| method=req.get('method') |
| if method=='initialized':continue |
| if not method:continue |
| - if method=='initialize':result={'userAgent':'codex_cli_rs/0.165.0 (Linux)','codexHome':'/home/runner'} |
| + if method=='initialize': |
| + result=next(f['result'] for f in recorded['frames'] if f.get('id')==1) |
| + emit(next(f for f in recorded['frames'] if f.get('method')=='remoteControl/status/changed')) |
| elif method=='account/read':result={'account':{'type':'chatgpt','email':'fixture@example.invalid','planType':'pro'},'requiresOpenaiAuth':True} |
| elif method=='config/read': |
| - source={'type':'sessionFlags'} |
| - result={'config':config,'layers':[{'name':source,'version':'fixture','config':config}],'origins':{k:{'name':source,'version':'fixture'} for k in config}} |
| + result=recorded_config(config) |
| elif method in ['thread/start','thread/resume']: |
| result={'thread':{'id':'thread-fixture'},'model':'fixture-model','modelProvider':'openai','cwd':'/workspace','approvalPolicy':'on-request','approvalsReviewer':'user','activePermissionProfile':{'id':'equipo','extends':None},'runtimeWorkspaceRoots':['/workspace']} |
| elif method=='turn/start': |
diff --git a/internal/runner/provider/codex/events.go b/internal/runner/provider/codex/events.go| index 5e3cfb7d..4ee74062 100644 |
| --- a/internal/runner/provider/codex/events.go |
| +++ b/internal/runner/provider/codex/events.go |
| @@ -50,7 +50,7 @@ func Decode(raw []byte) ([]provider.Event, error) { |
| if e != nil { |
| return nil, e |
| } |
| - if v.Method == "" { |
| + if v.Method == "" || disabledRemoteControl(v) { |
| return nil, nil |
| } |
| var p struct { |
| @@ -181,3 +181,8 @@ func uniqueJSON(raw []byte) bool { |
| _, e := d.Token() |
| return e == io.EOF |
| } |
| + |
| +func disabledRemoteControl(v envelope) bool { |
| + var p struct{ Status string } |
| + return v.Method == "remoteControl/status/changed" && len(v.ID) == 0 && json.Unmarshal(v.Params, &p) == nil && p.Status == "disabled" |
| +} |
diff --git a/internal/runner/provider/codex/launcher.go b/internal/runner/provider/codex/launcher.go| index 84681216..f82d06b8 100644 |
| --- a/internal/runner/provider/codex/launcher.go |
| +++ b/internal/runner/provider/codex/launcher.go |
| @@ -284,7 +284,7 @@ func initialize(ctx context.Context, r *RPC) error { |
| return e |
| } |
| var v struct{ UserAgent, CodexHome string } |
| - if json.Unmarshal(raw, &v) != nil || !strings.HasPrefix(v.UserAgent, "codex_cli_rs/"+Version+" ") || v.CodexHome != "/home/runner" { |
| + if json.Unmarshal(raw, &v) != nil || !strings.HasPrefix(v.UserAgent, "equipo/"+Version+" ") || v.CodexHome != "/home/runner" { |
| return provider.ErrVersion |
| } |
| return r.initialized(ctx) |
| @@ -306,6 +306,9 @@ func readConfig(ctx context.Context, r *RPC, p provider.Policy) error { |
| if e != nil { |
| return e |
| } |
| + return validateConfig(raw, p) |
| +} |
| +func validateConfig(raw []byte, p provider.Policy) error { |
| type origin struct { |
| Name json.RawMessage |
| Version string |
| @@ -325,20 +328,9 @@ func readConfig(ctx context.Context, r *RPC, p provider.Policy) error { |
| } |
| var want map[string]json.RawMessage |
| json.Unmarshal(p.Settings, &want) |
| - // Compare full profile objects, including every deny path, not legacy sandbox. |
| - for k, w := range want { |
| - if !sameJSON(v.Config[k], w) { |
| - return provider.ErrPolicy |
| - } |
| - o, ok := v.Origins[k] |
| - if !ok || o.Version == "" || !sameJSON(o.Name, []byte(`{"type":"sessionFlags"}`)) { |
| - return provider.ErrPolicy |
| - } |
| - } |
| - for k, value := range v.Config { |
| - if _, ok := want[k]; !ok && !bytes.Equal(value, []byte("null")) { |
| - return provider.ErrPolicy |
| - } |
| + // The pinned binary expands defaults; configured values must still match. |
| + if !configSubset(p.Settings, marshal(v.Config)) { |
| + return provider.ErrPolicy |
| } |
| seenFlags := false |
| for _, layer := range v.Layers { |
| @@ -351,7 +343,7 @@ func readConfig(ctx context.Context, r *RPC, p provider.Policy) error { |
| return provider.ErrPolicy |
| } |
| seenFlags = true |
| - case sameJSON(layer.Name, []byte(`{"type":"user","file":"/home/runner/config.toml"}`)), sameJSON(layer.Name, []byte(`{"type":"system","file":"/etc/codex/config.toml"}`)): |
| + case emptyConfigLayer(layer.Name): |
| if !sameJSON(layer.Config, []byte(`{}`)) { |
| return provider.ErrPolicy |
| } |
| @@ -360,7 +352,7 @@ func readConfig(ctx context.Context, r *RPC, p provider.Policy) error { |
| } |
| } |
| for k, o := range v.Origins { |
| - if _, ok := want[k]; !ok || o.Version == "" || !sameJSON(o.Name, []byte(`{"type":"sessionFlags"}`)) { |
| + if _, ok := want[strings.SplitN(k, ".", 2)[0]]; !ok || o.Version == "" || !sameJSON(o.Name, []byte(`{"type":"sessionFlags"}`)) { |
| return provider.ErrPolicy |
| } |
| } |
| @@ -393,6 +385,9 @@ func (l *Launcher) preflight(ctx context.Context, b provider.Binding, lease *pro |
| proc, _, r, e := l.start(ctx, launch, func(frame provider.Frame) error { |
| raw := frame.Bytes |
| v, _ := parse(raw) |
| + if disabledRemoteControl(v) { |
| + return nil |
| + } |
| if v.Method == "account/updated" { |
| return provider.ErrIdentity |
| } |
| @@ -893,3 +888,23 @@ func (s *sessionState) beginTurn(ctx context.Context, t provider.Turn) error { |
| s.used[t.AdmissionID] = true |
| return nil |
| } |
| + |
| +func emptyConfigLayer(raw []byte) bool { |
| + var n struct{ Type, File string } |
| + if json.Unmarshal(raw, &n) != nil { |
| + return false |
| + } |
| + return n.Type == "user" && n.File == "/home/runner/config.toml" || n.Type == "system" && n.File == "/etc/codex/config.toml" |
| +} |
| +func configSubset(want, got []byte) bool { |
| + var w, g map[string]json.RawMessage |
| + if json.Unmarshal(want, &w) != nil || json.Unmarshal(got, &g) != nil || w == nil || g == nil { |
| + return sameJSON(want, got) |
| + } |
| + for k, v := range w { |
| + if !configSubset(v, g[k]) { |
| + return false |
| + } |
| + } |
| + return true |
| +} |
diff --git a/internal/runner/provider/codex/launcher_test.go b/internal/runner/provider/codex/launcher_test.go| index 4ea5d00e..34c5f311 100644 |
| --- a/internal/runner/provider/codex/launcher_test.go |
| +++ b/internal/runner/provider/codex/launcher_test.go |
| @@ -108,7 +108,11 @@ func (h *fakeHost) Start(ctx context.Context, l provider.Launch, args []string) |
| if mode == "version" { |
| version = "0.164.0" |
| } |
| - result = map[string]any{"userAgent": "codex_cli_rs/" + version + " (Linux)", "codexHome": "/home/runner"} |
| + result = recordedReply(tFixturePath, 1) |
| + if mode == "version" { |
| + result.(map[string]any)["userAgent"] = "equipo/" + version + " (Linux)" |
| + } |
| + send(recordedNotification()) |
| case "account/read": |
| email := "account@example.invalid" |
| if mode == "identity" { |
| @@ -136,15 +140,11 @@ func (h *fakeHost) Start(ctx context.Context, l provider.Launch, args []string) |
| if mode == "network" { |
| config["permissions"].(map[string]any)["equipo"].(map[string]any)["network"].(map[string]any)["enabled"] = true |
| } |
| - source := map[string]any{"type": "sessionFlags"} |
| + result = recordedConfig(config) |
| if mode == "origin" { |
| - source = map[string]any{"type": "enterpriseManaged", "id": "unknown", "name": "unknown"} |
| + result.(map[string]any)["origins"].(map[string]any)["model"] = map[string]any{"name": map[string]any{"type": "enterpriseManaged"}, "version": "fake"} |
| } |
| - origins := map[string]any{} |
| - for k := range config { |
| - origins[k] = map[string]any{"name": source, "version": "fake"} |
| - } |
| - result = map[string]any{"config": config, "layers": []any{map[string]any{"name": source, "version": "fake", "config": config}}, "origins": origins} |
| + |
| case "thread/start", "thread/resume": |
| if mode == "turn-race" { |
| os.WriteFile(filepath.Join(l.Binding.CredentialHome, "auth.json"), []byte(`{"fake":"changed"}`), 0600) |
diff --git a/internal/runner/provider/codex/readback_test.go b/internal/runner/provider/codex/readback_test.go| new file mode 100644 |
| index 00000000..bb974a92 |
| --- /dev/null |
| +++ b/internal/runner/provider/codex/readback_test.go |
| @@ -0,0 +1,146 @@ |
| +package codex |
| + |
| +import ( |
| + "amadan.net/oficina/equipo/internal/runner/provider" |
| + "encoding/json" |
| + "os" |
| + "testing" |
| +) |
| + |
| +const tFixturePath = "testdata/unauthenticated-0.165.0.json" |
| + |
| +func recordedFrames() []map[string]any { |
| + raw, e := os.ReadFile(tFixturePath) |
| + if e != nil { |
| + panic(e) |
| + } |
| + var v struct{ Frames []map[string]any } |
| + if e = json.Unmarshal(raw, &v); e != nil { |
| + panic(e) |
| + } |
| + return v.Frames |
| +} |
| +func recordedReply(_ string, id float64) any { |
| + for _, f := range recordedFrames() { |
| + if f["id"] == id { |
| + return f["result"] |
| + } |
| + } |
| + panic("missing reply") |
| +} |
| +func recordedNotification() any { |
| + for _, f := range recordedFrames() { |
| + if f["method"] != nil { |
| + return f |
| + } |
| + } |
| + panic("missing notification") |
| +} |
| +func recordedConfig(settings map[string]any) any { |
| + r := recordedReply(tFixturePath, 2).(map[string]any) |
| + var old map[string]any |
| + raw, _ := os.ReadFile(tFixturePath) |
| + var fixture struct{ Settings map[string]any } |
| + json.Unmarshal(raw, &fixture) |
| + old = fixture.Settings |
| + // Remove only recorded settings, keeping the binary's expanded defaults. |
| + var remove func(map[string]any, map[string]any) |
| + remove = func(dst, src map[string]any) { |
| + for k, v := range src { |
| + if m, ok := v.(map[string]any); ok { |
| + remove(dst[k].(map[string]any), m) |
| + } else { |
| + delete(dst, k) |
| + } |
| + } |
| + } |
| + remove(r["config"].(map[string]any), old) |
| + var merge func(map[string]any, map[string]any) |
| + merge = func(dst, src map[string]any) { |
| + for k, v := range src { |
| + if m, ok := v.(map[string]any); ok { |
| + d, ok := dst[k].(map[string]any) |
| + if !ok { |
| + d = map[string]any{} |
| + dst[k] = d |
| + } |
| + merge(d, m) |
| + } else { |
| + dst[k] = v |
| + } |
| + } |
| + } |
| + merge(r["config"].(map[string]any), settings) |
| + r["layers"].([]any)[0].(map[string]any)["config"] = settings |
| + origins := map[string]any{} |
| + var walk func(string, any) |
| + walk = func(key string, v any) { |
| + if m, ok := v.(map[string]any); ok { |
| + for k, w := range m { |
| + prefix := k |
| + if key != "" { |
| + prefix = key + "." + k |
| + } |
| + walk(prefix, w) |
| + } |
| + } else { |
| + origins[key] = map[string]any{"name": map[string]any{"type": "sessionFlags"}, "version": "fixture"} |
| + } |
| + } |
| + walk("", settings) |
| + r["origins"] = origins |
| + return r |
| +} |
| +func TestCodexRecordedReadback(t *testing.T) { |
| + f := fixtureFor(t) |
| + s, _ := openFixture(t, f) |
| + if s.ID == "" { |
| + t.Fatal("missing session") |
| + } |
| +} |
| +func TestCodexRecordedConfigLayers(t *testing.T) { |
| + for _, kind := range []string{"user-config", "system-config", "unknown-layer", "flags-missing", "flags-changed", "origin-unknown", "origin-prefix", "origin-version", "effective-changed"} { |
| + t.Run(kind, func(t *testing.T) { |
| + raw, _ := os.ReadFile(tFixturePath) |
| + var fixture struct{ Settings json.RawMessage } |
| + json.Unmarshal(raw, &fixture) |
| + v := recordedReply(tFixturePath, 2).(map[string]any) |
| + layers := v["layers"].([]any) |
| + switch kind { |
| + case "user-config": |
| + layers[1].(map[string]any)["config"] = map[string]any{"hooks": true} |
| + case "system-config": |
| + layers[2].(map[string]any)["config"] = map[string]any{"hooks": true} |
| + case "unknown-layer": |
| + layers[1].(map[string]any)["name"] = map[string]any{"type": "project"} |
| + case "flags-missing": |
| + v["layers"] = layers[1:] |
| + case "flags-changed": |
| + layers[0].(map[string]any)["config"].(map[string]any)["model"] = "other" |
| + case "origin-unknown": |
| + v["origins"].(map[string]any)["hooks.enabled"] = map[string]any{"name": map[string]any{"type": "sessionFlags"}, "version": "x"} |
| + case "origin-prefix": |
| + v["origins"].(map[string]any)["model_extra"] = map[string]any{"name": map[string]any{"type": "sessionFlags"}, "version": "x"} |
| + case "origin-version": |
| + v["origins"].(map[string]any)["model"].(map[string]any)["version"] = "" |
| + case "effective-changed": |
| + v["config"].(map[string]any)["model"] = "other" |
| + } |
| + if validateConfig(marshal(v), provider.Policy{Settings: fixture.Settings}) == nil { |
| + t.Fatal("unsafe readback accepted", kind) |
| + } |
| + }) |
| + } |
| +} |
| + |
| +func TestCodexPreflightNotification(t *testing.T) { |
| + for _, raw := range []string{`{"method":"remoteControl/status/changed","params":{"status":"enabled"}}`, `{"method":"account/updated","params":{"status":"disabled"}}`, `{"method":"config/updated","params":{"status":"disabled"}}`, `{"id":1,"method":"remoteControl/status/changed","params":{"status":"disabled"}}`} { |
| + v, e := parse([]byte(raw)) |
| + if e != nil { |
| + t.Fatal(e) |
| + } |
| + if disabledRemoteControl(v) { |
| + t.Fatal("unsafe notification ignored", raw) |
| + } |
| + } |
| +} |
diff --git a/internal/runner/provider/codex/testdata/unauthenticated-0.165.0.json b/internal/runner/provider/codex/testdata/unauthenticated-0.165.0.json| new file mode 100644 |
| index 00000000..6867a8be |
| --- /dev/null |
| +++ b/internal/runner/provider/codex/testdata/unauthenticated-0.165.0.json |
| @@ -0,0 +1,503 @@ |
| +{ |
| + "binary_sha256": "c06a67fd8ac76508dc78bd99ce20c9f317b8d568beda59485f3f4134df9962d5", |
| + "settings": { |
| + "model": "gpt-6-luna", |
| + "model_provider": "openai", |
| + "approval_policy": "on-request", |
| + "approvals_reviewer": "user", |
| + "default_permissions": "equipo", |
| + "permissions": { |
| + "equipo": { |
| + "filesystem": { |
| + ":root": "read", |
| + "/workspace": "write", |
| + "/tmp": "write", |
| + "/credential-source": "deny", |
| + "/runtime-home": "deny", |
| + "/home/runner": "deny", |
| + "/egress": "deny", |
| + "/tool": "deny", |
| + "/tool/equipo.sock": "deny", |
| + "/config": "deny", |
| + "/proc": "deny", |
| + "/dev/fd": "deny" |
| + }, |
| + "network": { |
| + "enabled": false |
| + } |
| + } |
| + }, |
| + "features": { |
| + "apps": false, |
| + "multi_agent": false, |
| + "remote_control": false, |
| + "tool_call_mcp_elicitation": true |
| + }, |
| + "mcp_servers": { |
| + "equipo": { |
| + "command": "/opt/equipo-tool-proxy", |
| + "args": [ |
| + "--socket", |
| + "/tool/equipo.sock" |
| + ] |
| + } |
| + } |
| + }, |
| + "requests": [ |
| + { |
| + "id": 1, |
| + "method": "initialize", |
| + "params": { |
| + "clientInfo": { |
| + "name": "equipo", |
| + "version": "2" |
| + }, |
| + "capabilities": { |
| + "experimentalApi": true |
| + } |
| + } |
| + }, |
| + { |
| + "method": "initialized" |
| + }, |
| + { |
| + "id": 2, |
| + "method": "config/read", |
| + "params": { |
| + "cwd": "/home/runner", |
| + "includeLayers": true |
| + } |
| + } |
| + ], |
| + "frames": [ |
| + { |
| + "id": 1, |
| + "result": { |
| + "userAgent": "equipo/0.165.0 (Debian 13.0.0; x86_64) unknown (equipo; 2)", |
| + "codexHome": "/home/runner", |
| + "platformFamily": "unix", |
| + "platformOs": "linux" |
| + } |
| + }, |
| + { |
| + "method": "remoteControl/status/changed", |
| + "params": { |
| + "status": "disabled", |
| + "serverName": "fixture-host", |
| + "installationId": "00000000-0000-4000-8000-000000000000", |
| + "environmentId": null |
| + }, |
| + "emittedAtMs": 0 |
| + }, |
| + { |
| + "id": 2, |
| + "result": { |
| + "config": { |
| + "model": "gpt-6-luna", |
| + "review_model": null, |
| + "model_context_window": null, |
| + "model_auto_compact_token_limit": null, |
| + "model_auto_compact_token_limit_scope": null, |
| + "model_provider": "openai", |
| + "approval_policy": "on-request", |
| + "approvals_reviewer": "user", |
| + "sandbox_mode": null, |
| + "sandbox_workspace_write": null, |
| + "forced_chatgpt_workspace_id": null, |
| + "forced_login_method": null, |
| + "web_search": null, |
| + "tools": null, |
| + "instructions": null, |
| + "developer_instructions": null, |
| + "compact_prompt": null, |
| + "model_reasoning_effort": null, |
| + "model_reasoning_summary": null, |
| + "model_verbosity": null, |
| + "service_tier": null, |
| + "analytics": null, |
| + "apps": null, |
| + "browser_use": null, |
| + "computer_use": null, |
| + "desktop": null, |
| + "experimental_compact_prompt_file": null, |
| + "include_apps_instructions": true, |
| + "permissions": { |
| + "equipo": { |
| + "description": null, |
| + "extends": null, |
| + "workspace_roots": null, |
| + "filesystem": { |
| + "glob_scan_max_depth": null, |
| + "/config": "deny", |
| + "/credential-source": "deny", |
| + "/dev/fd": "deny", |
| + "/egress": "deny", |
| + "/home/runner": "deny", |
| + "/proc": "deny", |
| + "/runtime-home": "deny", |
| + "/tmp": "write", |
| + "/tool": "deny", |
| + "/tool/equipo.sock": "deny", |
| + "/workspace": "write", |
| + ":root": "read" |
| + }, |
| + "network": { |
| + "enabled": false, |
| + "proxy_url": null, |
| + "enable_socks5": null, |
| + "socks_url": null, |
| + "enable_socks5_udp": null, |
| + "allow_upstream_proxy": null, |
| + "dangerously_allow_non_loopback_proxy": null, |
| + "dangerously_allow_all_unix_sockets": null, |
| + "mode": null, |
| + "domains": null, |
| + "unix_sockets": null, |
| + "allow_local_binding": null, |
| + "mitm": null |
| + } |
| + } |
| + }, |
| + "hide_agent_reasoning": false, |
| + "thread_unload_delay_secs": null, |
| + "include_permissions_instructions": true, |
| + "include_collaboration_mode_instructions": true, |
| + "auto_review": null, |
| + "apps_mcp_product_sku": null, |
| + "allow_login_shell": true, |
| + "sqlite_home": null, |
| + "hooks": null, |
| + "skills": null, |
| + "openai_base_url": null, |
| + "allow_symlinked_codex_home": null, |
| + "otel": null, |
| + "show_raw_agent_reasoning": null, |
| + "history": { |
| + "persistence": "save-all", |
| + "max_bytes": null |
| + }, |
| + "experimental_thread_store_endpoint": null, |
| + "experimental_thread_store": null, |
| + "cloud": null, |
| + "memories": null, |
| + "mcp_servers": { |
| + "equipo": { |
| + "command": "/opt/equipo-tool-proxy", |
| + "args": [ |
| + "--socket", |
| + "/tool/equipo.sock" |
| + ], |
| + "environment_id": "local", |
| + "enabled": true, |
| + "tool_timeout_sec": null |
| + } |
| + }, |
| + "tool_suggest": null, |
| + "js_repl_node_path": null, |
| + "notice": null, |
| + "include_environment_context": true, |
| + "experimental_realtime_ws_startup_context": null, |
| + "tui": null, |
| + "shell_environment_policy": { |
| + "inherit": null, |
| + "ignore_default_excludes": null, |
| + "exclude": null, |
| + "set": null, |
| + "include_only": null, |
| + "filters": null, |
| + "experimental_use_profile": null |
| + }, |
| + "orchestrator": null, |
| + "mcp_oauth_credentials_store": "auto", |
| + "default_permissions": "equipo", |
| + "responses_api_metadata": null, |
| + "ghost_snapshot": null, |
| + "check_for_update_on_startup": null, |
| + "disable_paste_burst": null, |
| + "profile": null, |
| + "plugins": {}, |
| + "model_post_turn_compact_threshold_percent": null, |
| + "goals": null, |
| + "plan_mode_reasoning_effort": null, |
| + "model_instructions_file": null, |
| + "experimental_realtime_start_instructions": null, |
| + "features": { |
| + "network_proxy": null, |
| + "apps": false, |
| + "multi_agent": false, |
| + "remote_control": false, |
| + "tool_call_mcp_elicitation": true, |
| + "api_key_cyber_access_programs": true, |
| + "api_key_model_discovery": true, |
| + "auth_elicitation": true, |
| + "background_paginated_rollout_migration": false, |
| + "codex_apps_mcp_2026_07_28": false, |
| + "mcp_2026_07_28": false, |
| + "memories": false, |
| + "mentions_v2": true, |
| + "remote_plugin": true, |
| + "tool_suggest": true, |
| + "windows_sandbox_service": false |
| + }, |
| + "notify": null, |
| + "agents": null, |
| + "project_doc_max_bytes": 32768, |
| + "realtime": null, |
| + "experimental_realtime_ws_backend_prompt": null, |
| + "mcp_oauth_callback_port": null, |
| + "js_repl_node_module_dirs": null, |
| + "experimental_realtime_ws_model": null, |
| + "cli_auth_credentials_store": "file", |
| + "tool_output_token_limit": null, |
| + "mcp_oauth_callback_url": null, |
| + "marketplaces": {}, |
| + "file_opener": "vscode", |
| + "experimental_use_unified_exec_tool": null, |
| + "background_terminal_max_timeout": 300000, |
| + "oss_provider": null, |
| + "log_dir": null, |
| + "mcp_enterprise_managed_auth": null, |
| + "project_doc_fallback_filenames": [], |
| + "suppress_unstable_features_warning": null, |
| + "model_providers": {}, |
| + "feedback": null, |
| + "profiles": {}, |
| + "projects": null, |
| + "windows": null, |
| + "personality": null, |
| + "audio": null, |
| + "model_catalog_json": null, |
| + "daybreak": null, |
| + "experimental_realtime_webrtc_call_base_url": null, |
| + "experimental_realtime_ws_base_url": null, |
| + "include_environment_context_time": true, |
| + "mcp_optional_startup_grace_ms": null, |
| + "chatgpt_base_url": "https://chatgpt.com/backend-api/", |
| + "project_root_markers": [ |
| + ".git" |
| + ] |
| + }, |
| + "origins": { |
| + "permissions.equipo.filesystem./credential-source": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "approvals_reviewer": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "features.remote_control": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "permissions.equipo.filesystem./config": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "permissions.equipo.filesystem./tool/equipo.sock": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "default_permissions": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "permissions.equipo.network.enabled": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "mcp_servers.equipo.args.1": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "mcp_servers.equipo.args.0": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "model_provider": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "approval_policy": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "permissions.equipo.filesystem./proc": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "permissions.equipo.filesystem./workspace": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "permissions.equipo.filesystem./tool": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "permissions.equipo.filesystem./runtime-home": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "features.tool_call_mcp_elicitation": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "model": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "features.apps": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "permissions.equipo.filesystem.:root": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "permissions.equipo.filesystem./tmp": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "mcp_servers.equipo.command": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "permissions.equipo.filesystem./home/runner": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "permissions.equipo.filesystem./dev/fd": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "permissions.equipo.filesystem./egress": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + }, |
| + "features.multi_agent": { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925" |
| + } |
| + }, |
| + "layers": [ |
| + { |
| + "name": { |
| + "type": "sessionFlags" |
| + }, |
| + "version": "sha256:1a1c8678c194ec21837135e4c9016e99300bcfdfbf3657f0bc670089060f1925", |
| + "config": { |
| + "approval_policy": "on-request", |
| + "approvals_reviewer": "user", |
| + "default_permissions": "equipo", |
| + "features": { |
| + "apps": false, |
| + "multi_agent": false, |
| + "remote_control": false, |
| + "tool_call_mcp_elicitation": true |
| + }, |
| + "mcp_servers": { |
| + "equipo": { |
| + "args": [ |
| + "--socket", |
| + "/tool/equipo.sock" |
| + ], |
| + "command": "/opt/equipo-tool-proxy" |
| + } |
| + }, |
| + "model": "gpt-6-luna", |
| + "model_provider": "openai", |
| + "permissions": { |
| + "equipo": { |
| + "filesystem": { |
| + "/config": "deny", |
| + "/credential-source": "deny", |
| + "/dev/fd": "deny", |
| + "/egress": "deny", |
| + "/home/runner": "deny", |
| + "/proc": "deny", |
| + "/runtime-home": "deny", |
| + "/tmp": "write", |
| + "/tool": "deny", |
| + "/tool/equipo.sock": "deny", |
| + "/workspace": "write", |
| + ":root": "read" |
| + }, |
| + "network": { |
| + "enabled": false |
| + } |
| + } |
| + } |
| + } |
| + }, |
| + { |
| + "name": { |
| + "type": "user", |
| + "file": "/home/runner/config.toml", |
| + "profile": null |
| + }, |
| + "version": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a", |
| + "config": {} |
| + }, |
| + { |
| + "name": { |
| + "type": "system", |
| + "file": "/etc/codex/config.toml" |
| + }, |
| + "version": "sha256:44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a", |
| + "config": {} |
| + } |
| + ] |
| + } |
| + } |
| + ] |
| +} |