sneakoscope 1.16.2 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/README.md +16 -5
  2. package/crates/sks-core/Cargo.lock +1 -1
  3. package/crates/sks-core/Cargo.toml +1 -1
  4. package/crates/sks-core/src/main.rs +1 -1
  5. package/dist/.sks-build-stamp.json +4 -4
  6. package/dist/bin/sks.js +1 -1
  7. package/dist/build-manifest.json +50 -4
  8. package/dist/cli/install-helpers.d.ts +9 -0
  9. package/dist/cli/install-helpers.js +43 -29
  10. package/dist/commands/image-ux-review.d.ts +12 -1
  11. package/dist/commands/ppt.d.ts +12 -1
  12. package/dist/core/agents/agent-codex-cockpit.d.ts +59 -0
  13. package/dist/core/agents/agent-codex-cockpit.js +190 -0
  14. package/dist/core/agents/agent-command-surface.d.ts +1 -0
  15. package/dist/core/agents/agent-command-surface.js +8 -4
  16. package/dist/core/agents/agent-gate.js +15 -1
  17. package/dist/core/agents/agent-janitor.d.ts +23 -0
  18. package/dist/core/agents/agent-janitor.js +147 -0
  19. package/dist/core/agents/agent-ledger-schemas.d.ts +178 -2
  20. package/dist/core/agents/agent-ledger-schemas.js +24 -1
  21. package/dist/core/agents/agent-orchestrator.d.ts +12 -1
  22. package/dist/core/agents/agent-orchestrator.js +66 -3
  23. package/dist/core/agents/agent-output-validator.d.ts +28 -0
  24. package/dist/core/agents/agent-output-validator.js +14 -1
  25. package/dist/core/agents/agent-plan.js +2 -2
  26. package/dist/core/agents/agent-proof-evidence.d.ts +8 -0
  27. package/dist/core/agents/agent-proof-evidence.js +15 -0
  28. package/dist/core/agents/agent-session-rows.d.ts +2 -0
  29. package/dist/core/agents/agent-session-rows.js +14 -0
  30. package/dist/core/agents/agent-terminal-session.d.ts +52 -0
  31. package/dist/core/agents/agent-terminal-session.js +107 -0
  32. package/dist/core/agents/agent-trust-report.d.ts +4 -0
  33. package/dist/core/agents/agent-trust-report.js +6 -0
  34. package/dist/core/agents/agent-worker-pipeline.js +1 -1
  35. package/dist/core/agents/agent-wrongness.d.ts +1 -1
  36. package/dist/core/agents/agent-wrongness.js +5 -0
  37. package/dist/core/agents/route-collaboration-ledger.d.ts +12 -1
  38. package/dist/core/agents/scout-policy.d.ts +30 -0
  39. package/dist/core/agents/scout-policy.js +68 -0
  40. package/dist/core/agents/tmux-right-lane-cockpit.d.ts +94 -0
  41. package/dist/core/agents/tmux-right-lane-cockpit.js +57 -0
  42. package/dist/core/codex/codex-web-search-adapter.d.ts +41 -0
  43. package/dist/core/codex/codex-web-search-adapter.js +105 -0
  44. package/dist/core/codex/official-goal-mode.d.ts +24 -0
  45. package/dist/core/codex/official-goal-mode.js +41 -0
  46. package/dist/core/codex-lb/codex-lb-setup.js +1 -1
  47. package/dist/core/commands/agent-command.js +13 -2
  48. package/dist/core/commands/image-ux-review-command.d.ts +12 -1
  49. package/dist/core/commands/ppt-command.d.ts +12 -1
  50. package/dist/core/feature-fixtures.js +3 -2
  51. package/dist/core/feature-registry.js +1 -1
  52. package/dist/core/fsx.d.ts +1 -1
  53. package/dist/core/fsx.js +1 -1
  54. package/dist/core/goal-workflow.d.ts +9 -0
  55. package/dist/core/goal-workflow.js +16 -3
  56. package/dist/core/image-ux-review/imagegen-adapter.js +56 -13
  57. package/dist/core/imagegen/imagegen-capability.d.ts +21 -0
  58. package/dist/core/imagegen/imagegen-capability.js +111 -11
  59. package/dist/core/init.js +1 -1
  60. package/dist/core/mcp/xai-mcp-detector.d.ts +44 -0
  61. package/dist/core/mcp/xai-mcp-detector.js +157 -0
  62. package/dist/core/mcp/xai-search-adapter.d.ts +44 -0
  63. package/dist/core/mcp/xai-search-adapter.js +100 -0
  64. package/dist/core/proof/auto-finalize.js +4 -0
  65. package/dist/core/proof/proof-reader.d.ts +2 -0
  66. package/dist/core/proof/proof-schema.d.ts +4 -0
  67. package/dist/core/proof/proof-schema.js +3 -1
  68. package/dist/core/proof/route-adapter.d.ts +42 -0
  69. package/dist/core/proof/route-finalizer.d.ts +42 -0
  70. package/dist/core/proof/route-proof-gate.js +17 -4
  71. package/dist/core/proof/route-proof-policy.js +3 -0
  72. package/dist/core/proof/selftest-proof-fixtures.d.ts +42 -0
  73. package/dist/core/release-parallel-full-coverage.d.ts +26 -0
  74. package/dist/core/release-parallel-full-coverage.js +149 -0
  75. package/dist/core/session/project-namespace.d.ts +31 -0
  76. package/dist/core/session/project-namespace.js +52 -0
  77. package/dist/core/source-intelligence/source-intelligence-policy.d.ts +41 -0
  78. package/dist/core/source-intelligence/source-intelligence-policy.js +75 -0
  79. package/dist/core/source-intelligence/source-intelligence-proof.d.ts +27 -0
  80. package/dist/core/source-intelligence/source-intelligence-proof.js +37 -0
  81. package/dist/core/source-intelligence/source-intelligence-runner.d.ts +54 -0
  82. package/dist/core/source-intelligence/source-intelligence-runner.js +113 -0
  83. package/dist/core/tmux-ui.js +3 -1
  84. package/dist/core/trust-kernel/trust-report.d.ts +84 -0
  85. package/dist/core/trust-kernel/trust-report.js +33 -2
  86. package/dist/core/verification/verification-artifact-lock.d.ts +9 -0
  87. package/dist/core/verification/verification-artifact-lock.js +22 -0
  88. package/dist/core/verification/verification-dag.d.ts +10 -0
  89. package/dist/core/verification/verification-dag.js +70 -0
  90. package/dist/core/verification/verification-proof.d.ts +7 -0
  91. package/dist/core/verification/verification-proof.js +27 -0
  92. package/dist/core/verification/verification-result.d.ts +40 -0
  93. package/dist/core/verification/verification-result.js +20 -0
  94. package/dist/core/verification/verification-worker-pool.d.ts +13 -0
  95. package/dist/core/verification/verification-worker-pool.js +186 -0
  96. package/dist/core/version.d.ts +1 -1
  97. package/dist/core/version.js +1 -1
  98. package/package.json +28 -5
  99. package/schemas/codex/agent-result.schema.json +13 -0
package/README.md CHANGED
@@ -10,7 +10,7 @@ SKS does not try to clone every other harness. It focuses on one thing: making C
10
10
 
11
11
  ## Current Release
12
12
 
13
- SKS **1.16.2** carries forward the native multi-session agent kernel and adds Codex App prompt-side Team width control: `$Team 20:agents ...` / `$Team 20:agent ...` can request up to 20 native Team sessions. SKS **1.16.1** closed the kernel itself: `sks agent` and `sks --agent` create bounded agent rosters, non-overlapping leases, append-only ledgers, session lifecycle proof, recursion guards, dynamic per-agent effort routing, and native agent proof evidence. The old multi-agent command surface has been removed; native agents are the only release-supported route collaboration backend.
13
+ SKS **1.18.0** adds Universal Source Intelligence for Context7 + Codex Web Search, optional X AI MCP search when configured, main no-Scout / worker Scout-limited proof policy, per-agent terminal close evidence, tmux right-lane cockpit manifests, Codex official Goal mode detection, and full P0-P4 release readiness tracking.
14
14
 
15
15
  ```bash
16
16
  sks mad-sks plan --target-root <path> --json
@@ -20,6 +20,9 @@ sks mad-sks rollback-apply --rollback-plan <path> --yes --json
20
20
  sks features complete --json
21
21
  sks agent status latest --json
22
22
  sks agent run "release review" --agents 8 --concurrency 4 --mock --json
23
+ npm run source-intelligence:all-modes
24
+ npm run agent:background-terminals
25
+ npm run agent:tmux-right-lanes
23
26
  npm run release:readiness
24
27
  ```
25
28
 
@@ -48,6 +51,14 @@ Detailed release history lives in [CHANGELOG.md](CHANGELOG.md). Current release
48
51
  - Core dominance: [docs/core-dominance.md](docs/core-dominance.md)
49
52
  - Performance budgets: [docs/performance-budgets.md](docs/performance-budgets.md)
50
53
  - Native Agent Kernel: [docs/native-agent-kernel.md](docs/native-agent-kernel.md)
54
+ - Source Intelligence Layer: [docs/source-intelligence-layer.md](docs/source-intelligence-layer.md)
55
+ - X AI / Context7 / Codex Web policy: [docs/xai-context7-codex-web-policy.md](docs/xai-context7-codex-web-policy.md)
56
+ - Main no-Scout / worker Scout policy: [docs/main-no-scout-worker-scout-policy.md](docs/main-no-scout-worker-scout-policy.md)
57
+ - Agent terminal lanes: [docs/agent-terminal-lanes.md](docs/agent-terminal-lanes.md)
58
+ - tmux right-lane cockpit: [docs/tmux-right-lane-cockpit.md](docs/tmux-right-lane-cockpit.md)
59
+ - Codex official Goal mode: [docs/codex-official-goal-mode.md](docs/codex-official-goal-mode.md)
60
+ - Release parallel full coverage: [docs/release-parallel-full-coverage.md](docs/release-parallel-full-coverage.md)
61
+ - Priority closure P0-P4: [docs/priority-closure-p0-p4.md](docs/priority-closure-p0-p4.md)
51
62
  - Image Voxel TriWiki: [docs/image-voxel-ledger.md](docs/image-voxel-ledger.md)
52
63
  - Image Wrongness: [docs/image-wrongness.md](docs/image-wrongness.md)
53
64
  - Route finalization: [docs/route-finalization.md](docs/route-finalization.md)
@@ -250,7 +261,7 @@ sks codex-lb repair
250
261
  sks
251
262
  ```
252
263
 
253
- Bare `sks` can also prompt for codex-lb auth; SKS stores the base URL/key in `~/.codex/sks-codex-lb.env`, writes the upstream codex-lb Codex CLI / IDE Extension provider block into `~/.codex/config.toml` for Codex App routing, loads the provider env key for tmux launches, and syncs the macOS user launch environment so the Codex App can see `CODEX_LB_API_KEY` after restart. If the provider block disappears but the stored env file is still recoverable, bare `sks`, npm postinstall upgrades, `sks doctor --fix`, and `sks codex-lb repair` restore it with `env_key = "CODEX_LB_API_KEY"`, `supports_websockets = true`, and `requires_openai_auth = true` as documented by codex-lb. If an older SKS release left the codex-lb dashboard key only in the shared Codex `auth.json` login cache, SKS migrates that key back into `~/.codex/sks-codex-lb.env` when a codex-lb provider or env base URL is already recoverable. It does not rewrite the shared Codex `auth.json` login cache by default; set `SKS_CODEX_LB_SYNC_CODEX_LOGIN=1` only if you intentionally want the old API-key login-cache behavior. When codex-lb is active, SKS opens a fresh `sks-codex-lb-*` tmux session and sweeps older detached codex-lb sessions for the same repo before launch so stale Responses API chains are not reused. Configured launch paths run a response-chain health check. `previous_response_not_found` is treated as a stateless-LB warning and keeps codex-lb active. Hard failures are surfaced to the user; SKS only bypasses codex-lb when the user chooses OAuth fallback or `SKS_CODEX_LB_AUTOBYPASS=1` is set.
264
+ Bare `sks` can also prompt for codex-lb auth; SKS stores the base URL/key in `~/.codex/sks-codex-lb.env`, writes the codex-lb Codex CLI / IDE Extension provider block into `~/.codex/config.toml` for Codex App routing, loads the provider env key for tmux launches, and syncs the macOS user launch environment so the Codex App can see `CODEX_LB_API_KEY` after restart. If the provider block disappears but the stored env file is still recoverable, bare `sks`, npm postinstall upgrades, `sks doctor --fix`, and `sks codex-lb repair` restore it with `env_key = "CODEX_LB_API_KEY"`, `supports_websockets = true`, and `requires_openai_auth = false`; PPT/imagegen bridge checks treat that env-key provider as configured without requiring OpenAI OAuth. If an older SKS release left the codex-lb dashboard key only in the shared Codex `auth.json` login cache, SKS migrates that key back into `~/.codex/sks-codex-lb.env` when a codex-lb provider or env base URL is already recoverable. It does not rewrite the shared Codex `auth.json` login cache by default; set `SKS_CODEX_LB_SYNC_CODEX_LOGIN=1` only if you intentionally want the old API-key login-cache behavior. When codex-lb is active, SKS opens a fresh `sks-codex-lb-*` tmux session and sweeps older detached codex-lb sessions for the same repo before launch so stale Responses API chains are not reused. Configured launch paths run a response-chain health check. `previous_response_not_found` is treated as a stateless-LB warning and keeps codex-lb active. Hard failures are surfaced to the user; SKS only bypasses codex-lb when the user chooses OAuth fallback or `SKS_CODEX_LB_AUTOBYPASS=1` is set.
254
265
 
255
266
  If codex-lb provider auth drifts after launch/reinstall, run `sks doctor --fix` or `sks codex-lb repair`; to replace it, run `sks codex-lb reconfigure --host <domain> --api-key <key>`.
256
267
 
@@ -352,7 +363,7 @@ sks gx render homepage --format html
352
363
  sks validate-artifacts latest --json
353
364
  sks pipeline plan latest --proof-field --json
354
365
  sks perf run --json
355
- sks perf workflow --json --intent "small CLI change" --changed src/cli/main.mjs,src/core/routes.mjs
366
+ sks perf workflow --json --intent "small CLI change" --changed src/cli/main.ts,src/core/routes.ts
356
367
  sks proof-field scan --json --intent "small CLI change"
357
368
  sks skill-dream status
358
369
  sks skill-dream run --json
@@ -451,7 +462,7 @@ SKS_OPENCLAW=1 sks root
451
462
  SKS_OPENCLAW=1 sks commands
452
463
  SKS_OPENCLAW=1 sks dollar-commands
453
464
  SKS_OPENCLAW=1 sks deps check
454
- SKS_OPENCLAW=1 sks proof-field scan --intent "small CLI change" --changed src/cli/main.mjs
465
+ SKS_OPENCLAW=1 sks proof-field scan --intent "small CLI change" --changed src/cli/main.ts
455
466
  ```
456
467
 
457
468
  If OpenClaw runs in a sandbox, grant shell execution only for trusted workspaces. Database, migration, and destructive work still follows SKS safety routes.
@@ -601,7 +612,7 @@ npm run release:check
601
612
  npm run publish:dry
602
613
  ```
603
614
 
604
- `release:check` runs audit, changelog, syntax, feature-registry coverage, all-features contract selftest, selftest, size, and registry checks, then writes a source digest stamp under `.sneakoscope/reports/`. Generate the human-readable registry with `sks features inventory --write-docs`. `1.0.0` is a stable release, so plain `npm publish` uses the `latest` dist-tag. npm's `prepublishOnly` verifies the fresh release stamp instead of rerunning the full gate, and `prepack` only rebuilds `dist`; publish no longer repeats the expensive release suite during packaging. `npm run publish:dry` remains the explicit dry-run helper.
615
+ `release:check` runs the 1.18.0 parallel P0-P4 closure DAG, writes a source digest stamp under `.sneakoscope/reports/`, then refreshes release readiness so publish commands can verify the same stamp. The DAG preserves the 1.17 baseline gates and adds Source Intelligence, X AI/Codex Web policy, Goal mode, main no-Scout, worker Scout-limited, agent terminal, tmux right-lane, visual consistency, release full-coverage, and priority closure checks. Broader live or historical gates remain explicit scripts such as `release:real-check`. Generate the human-readable registry with `sks features inventory --write-docs`. Plain `npm publish` uses the `latest` dist-tag. npm's `prepublishOnly` verifies the fresh release stamp instead of rerunning the full gate, and `prepack` only rebuilds `dist`; publish no longer repeats the expensive release suite during packaging. `npm run publish:dry` remains the explicit dry-run helper.
605
616
 
606
617
  Version bumps are manual. Run `sks versioning bump` only when preparing release metadata; SKS will not create `.git/hooks/pre-commit` or auto-bump during ordinary commits.
607
618
 
@@ -76,7 +76,7 @@ dependencies = [
76
76
 
77
77
  [[package]]
78
78
  name = "sks-core"
79
- version = "1.16.2"
79
+ version = "1.18.0"
80
80
  dependencies = [
81
81
  "serde_json",
82
82
  ]
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "sks-core"
3
- version = "1.16.2"
3
+ version = "1.18.0"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]
@@ -4,7 +4,7 @@ use std::io::{self, Read, Seek, SeekFrom};
4
4
  fn main() {
5
5
  let mut args = std::env::args().skip(1);
6
6
  match args.next().as_deref() {
7
- Some("--version") => println!("sks-rs 1.16.2"),
7
+ Some("--version") => println!("sks-rs 1.18.0"),
8
8
  Some("compact-info") => {
9
9
  let mut input = String::new();
10
10
  let _ = io::stdin().read_to_string(&mut input);
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schema": "sks.dist-build-stamp.v1",
3
3
  "package_name": "sneakoscope",
4
- "package_version": "1.16.2",
5
- "source_digest": "38a14936b463c4d5f6254412dbaa186a6f351f637dd5e5db82a6eb6b5eff43b9",
6
- "source_file_count": 1475,
7
- "built_at_source_time": 1779679969693
4
+ "package_version": "1.18.0",
5
+ "source_digest": "9593cf876b0f0b49ffb7aaa5e2ca1017bd7fd1508892f92cffbfc7db58fbfef0",
6
+ "source_file_count": 1279,
7
+ "built_at_source_time": 1779716030404
8
8
  }
package/dist/bin/sks.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const FAST_PACKAGE_VERSION = '1.16.2';
2
+ const FAST_PACKAGE_VERSION = '1.18.0';
3
3
  const args = process.argv.slice(2);
4
4
  try {
5
5
  if (args[0] === '--version' || args[0] === '-v' || args[0] === 'version') {
@@ -1,11 +1,17 @@
1
1
  {
2
2
  "schema": "sks.dist-build.v2",
3
- "version": "1.16.2",
4
- "package_version": "1.16.2",
3
+ "version": "1.18.0",
4
+ "package_version": "1.18.0",
5
5
  "typescript": true,
6
6
  "mjs_runtime_files": 0,
7
- "source_digest": "38a14936b463c4d5f6254412dbaa186a6f351f637dd5e5db82a6eb6b5eff43b9",
8
- "source_file_count": 1475,
7
+ "compiled_file_count": 850,
8
+ "compiled_js_count": 425,
9
+ "compiled_dts_count": 425,
10
+ "source_digest": "9593cf876b0f0b49ffb7aaa5e2ca1017bd7fd1508892f92cffbfc7db58fbfef0",
11
+ "source_file_count": 1279,
12
+ "source_files_hash": "29895436992640147aab36792cd376edbed9adc6226480db074ef9e9b5104c13",
13
+ "source_list_hash": "29895436992640147aab36792cd376edbed9adc6226480db074ef9e9b5104c13",
14
+ "src_mjs_runtime_files": 0,
9
15
  "dist_stamp_schema": "sks.dist-build-stamp.v1",
10
16
  "files": [
11
17
  "bin/sks.d.ts",
@@ -182,6 +188,8 @@
182
188
  "core/agents/agent-central-ledger.js",
183
189
  "core/agents/agent-cleanup.d.ts",
184
190
  "core/agents/agent-cleanup.js",
191
+ "core/agents/agent-codex-cockpit.d.ts",
192
+ "core/agents/agent-codex-cockpit.js",
185
193
  "core/agents/agent-command-surface.d.ts",
186
194
  "core/agents/agent-command-surface.js",
187
195
  "core/agents/agent-conflict-graph.d.ts",
@@ -194,6 +202,8 @@
194
202
  "core/agents/agent-gate.js",
195
203
  "core/agents/agent-heartbeat.d.ts",
196
204
  "core/agents/agent-heartbeat.js",
205
+ "core/agents/agent-janitor.d.ts",
206
+ "core/agents/agent-janitor.js",
197
207
  "core/agents/agent-lease.d.ts",
198
208
  "core/agents/agent-lease.js",
199
209
  "core/agents/agent-ledger-schemas.d.ts",
@@ -226,8 +236,12 @@
226
236
  "core/agents/agent-runner-tmux.js",
227
237
  "core/agents/agent-schema.d.ts",
228
238
  "core/agents/agent-schema.js",
239
+ "core/agents/agent-session-rows.d.ts",
240
+ "core/agents/agent-session-rows.js",
229
241
  "core/agents/agent-task-slicer.d.ts",
230
242
  "core/agents/agent-task-slicer.js",
243
+ "core/agents/agent-terminal-session.d.ts",
244
+ "core/agents/agent-terminal-session.js",
231
245
  "core/agents/agent-trust-report.d.ts",
232
246
  "core/agents/agent-trust-report.js",
233
247
  "core/agents/agent-work-partition.d.ts",
@@ -238,6 +252,10 @@
238
252
  "core/agents/agent-wrongness.js",
239
253
  "core/agents/route-collaboration-ledger.d.ts",
240
254
  "core/agents/route-collaboration-ledger.js",
255
+ "core/agents/scout-policy.d.ts",
256
+ "core/agents/scout-policy.js",
257
+ "core/agents/tmux-right-lane-cockpit.d.ts",
258
+ "core/agents/tmux-right-lane-cockpit.js",
241
259
  "core/agents/work-partition/conflict-detector.d.ts",
242
260
  "core/agents/work-partition/conflict-detector.js",
243
261
  "core/agents/work-partition/dependency-graph.d.ts",
@@ -320,6 +338,10 @@
320
338
  "core/codex-lb/codex-lb-setup.js",
321
339
  "core/codex-model-guard.d.ts",
322
340
  "core/codex-model-guard.js",
341
+ "core/codex/codex-web-search-adapter.d.ts",
342
+ "core/codex/codex-web-search-adapter.js",
343
+ "core/codex/official-goal-mode.d.ts",
344
+ "core/codex/official-goal-mode.js",
323
345
  "core/commands/agent-command.d.ts",
324
346
  "core/commands/agent-command.js",
325
347
  "core/commands/autoresearch-command.d.ts",
@@ -570,6 +592,10 @@
570
592
  "core/mad-sks/write-guard.js",
571
593
  "core/managed-paths.d.ts",
572
594
  "core/managed-paths.js",
595
+ "core/mcp/xai-mcp-detector.d.ts",
596
+ "core/mcp/xai-mcp-detector.js",
597
+ "core/mcp/xai-search-adapter.d.ts",
598
+ "core/mcp/xai-search-adapter.js",
573
599
  "core/memory-governor.d.ts",
574
600
  "core/memory-governor.js",
575
601
  "core/memory-summary.d.ts",
@@ -705,6 +731,8 @@
705
731
  "core/questions.js",
706
732
  "core/recallpulse.d.ts",
707
733
  "core/recallpulse.js",
734
+ "core/release-parallel-full-coverage.d.ts",
735
+ "core/release-parallel-full-coverage.js",
708
736
  "core/research.d.ts",
709
737
  "core/research.js",
710
738
  "core/retention.d.ts",
@@ -715,8 +743,16 @@
715
743
  "core/rust-accelerator.js",
716
744
  "core/secret-redaction.d.ts",
717
745
  "core/secret-redaction.js",
746
+ "core/session/project-namespace.d.ts",
747
+ "core/session/project-namespace.js",
718
748
  "core/skill-forge.d.ts",
719
749
  "core/skill-forge.js",
750
+ "core/source-intelligence/source-intelligence-policy.d.ts",
751
+ "core/source-intelligence/source-intelligence-policy.js",
752
+ "core/source-intelligence/source-intelligence-proof.d.ts",
753
+ "core/source-intelligence/source-intelligence-proof.js",
754
+ "core/source-intelligence/source-intelligence-runner.d.ts",
755
+ "core/source-intelligence/source-intelligence-runner.js",
720
756
  "core/structured-output-adapter.d.ts",
721
757
  "core/structured-output-adapter.js",
722
758
  "core/team-dag.d.ts",
@@ -779,6 +815,16 @@
779
815
  "core/validators/trust-report-validator.js",
780
816
  "core/validators/validation-error.d.ts",
781
817
  "core/validators/validation-error.js",
818
+ "core/verification/verification-artifact-lock.d.ts",
819
+ "core/verification/verification-artifact-lock.js",
820
+ "core/verification/verification-dag.d.ts",
821
+ "core/verification/verification-dag.js",
822
+ "core/verification/verification-proof.d.ts",
823
+ "core/verification/verification-proof.js",
824
+ "core/verification/verification-result.d.ts",
825
+ "core/verification/verification-result.js",
826
+ "core/verification/verification-worker-pool.d.ts",
827
+ "core/verification/verification-worker-pool.js",
782
828
  "core/version-manager.d.ts",
783
829
  "core/version-manager.js",
784
830
  "core/version.d.ts",
@@ -101,6 +101,9 @@ export declare function codexLbStatus(opts?: any): Promise<{
101
101
  env_path: any;
102
102
  provider_configured: boolean;
103
103
  provider_requires_openai_auth: boolean;
104
+ provider_openai_auth_disabled: boolean;
105
+ provider_env_key: string | null;
106
+ provider_uses_codex_lb_env_auth: boolean;
104
107
  selected: boolean;
105
108
  env_file: boolean;
106
109
  env_key_configured: boolean;
@@ -207,6 +210,9 @@ export declare function maybePromptCodexLbSetupForLaunch(args?: any, opts?: any)
207
210
  env_path: any;
208
211
  provider_configured: boolean;
209
212
  provider_requires_openai_auth: boolean;
213
+ provider_openai_auth_disabled: boolean;
214
+ provider_env_key: string | null;
215
+ provider_uses_codex_lb_env_auth: boolean;
210
216
  selected: boolean;
211
217
  env_file: boolean;
212
218
  env_key_configured: boolean;
@@ -245,6 +251,9 @@ export declare function maybePromptCodexLbSetupForLaunch(args?: any, opts?: any)
245
251
  env_path: any;
246
252
  provider_configured: boolean;
247
253
  provider_requires_openai_auth: boolean;
254
+ provider_openai_auth_disabled: boolean;
255
+ provider_env_key: string | null;
256
+ provider_uses_codex_lb_env_auth: boolean;
248
257
  selected: boolean;
249
258
  env_file: boolean;
250
259
  env_key_configured: boolean;
@@ -132,7 +132,7 @@ async function reportPostinstallCodexLbAuth() {
132
132
  console.log(`codex-lb auth: repair skipped (${codexLbAuth.status}${codexLbAuth.error ? `: ${codexLbAuth.error}` : ''}).`);
133
133
  const reconcile = codexLbAuth.auth_reconcile;
134
134
  if (reconcile?.status === 'oauth_preserved') {
135
- console.log(`codex-lb auth: ChatGPT OAuth preserved for Codex App; codex-lb key stays in env_key (OAuth backup at ${reconcile.backup_path ?? 'unknown'}).`);
135
+ console.log(`codex-lb auth: ChatGPT OAuth preserved as backup; codex-lb key stays in env_key (OpenAI OAuth not required, backup at ${reconcile.backup_path ?? 'unknown'}).`);
136
136
  }
137
137
  else if (reconcile?.status === 'oauth_restored') {
138
138
  console.log(`codex-lb auth: restored ChatGPT OAuth from ${reconcile.backup_path ?? 'unknown'} while keeping codex-lb selected.`);
@@ -452,12 +452,19 @@ export async function codexLbStatus(opts = {}) {
452
452
  const selected = hasTopLevelCodexLbSelected(config);
453
453
  const baseUrl = codexLbProviderBaseUrl(config) || envLoad.base_url || null;
454
454
  const providerRequiresOpenAiAuth = codexLbProviderRequiresOpenAiAuth(config);
455
+ const providerOpenAiAuthDisabled = codexLbProviderOpenAiAuthDisabled(config);
456
+ const providerEnvKey = codexLbProviderEnvKey(config);
457
+ const providerUsesCodexLbEnvAuth = providerConfigured && providerEnvKey === 'CODEX_LB_API_KEY' && providerOpenAiAuthDisabled;
458
+ const codexAppUsableWithCodexLb = providerUsesCodexLbEnvAuth && envKeyConfigured && Boolean(baseUrl);
455
459
  return {
456
- ok: providerConfigured && envKeyConfigured && Boolean(baseUrl) && providerRequiresOpenAiAuth,
460
+ ok: providerConfigured && envKeyConfigured && Boolean(baseUrl) && providerUsesCodexLbEnvAuth,
457
461
  config_path: configPath,
458
462
  env_path: envPath,
459
463
  provider_configured: providerConfigured,
460
464
  provider_requires_openai_auth: providerRequiresOpenAiAuth,
465
+ provider_openai_auth_disabled: providerOpenAiAuthDisabled,
466
+ provider_env_key: providerEnvKey || null,
467
+ provider_uses_codex_lb_env_auth: providerUsesCodexLbEnvAuth,
461
468
  selected,
462
469
  env_file: envExists,
463
470
  env_key_configured: envKeyConfigured,
@@ -474,8 +481,8 @@ export async function codexLbStatus(opts = {}) {
474
481
  base_url: baseUrl,
475
482
  auth_path: authPath,
476
483
  auth_mode: authMode.mode,
477
- auth_usable_for_codex_app: authMode.codex_app_usable,
478
- auth_summary: authMode.summary
484
+ auth_usable_for_codex_app: authMode.codex_app_usable || codexAppUsableWithCodexLb,
485
+ auth_summary: codexAppUsableWithCodexLb ? 'codex-lb provider uses CODEX_LB_API_KEY env_key; OpenAI OAuth not required' : authMode.summary
479
486
  };
480
487
  }
481
488
  export function formatCodexLbStatusText(status = {}, opts = {}) {
@@ -487,7 +494,7 @@ export function formatCodexLbStatusText(status = {}, opts = {}) {
487
494
  `Configured: ${status.ok ? 'yes' : 'no'}`,
488
495
  `Selected: ${status.selected ? 'yes' : 'no'}`,
489
496
  `Provider: ${status.provider_configured ? 'yes' : 'no'}`,
490
- `Provider requires OpenAI auth: ${status.provider_requires_openai_auth ? 'yes' : 'missing'}`,
497
+ `Provider OpenAI OAuth: ${status.provider_openai_auth_disabled ? 'disabled for codex-lb env_key' : status.provider_requires_openai_auth ? 'required (repair recommended)' : 'missing explicit false'}`,
491
498
  `Codex App auth: ${status.auth_usable_for_codex_app ? 'ok' : 'needs sign-in/repair'} (${status.auth_mode || 'unknown'})`
492
499
  ];
493
500
  if (status.auth_summary)
@@ -521,7 +528,7 @@ export function formatCodexLbRepairResultText(result = {}) {
521
528
  if (result.auth_reconcile?.status === 'oauth_restored')
522
529
  lines.push(`Codex App auth: ChatGPT OAuth restored from ${result.auth_reconcile.backup_path}.`);
523
530
  else if (result.auth_reconcile?.status === 'oauth_preserved')
524
- lines.push('Codex App auth: ChatGPT OAuth preserved; codex-lb will use CODEX_LB_API_KEY from env_key.');
531
+ lines.push('Codex App auth: ChatGPT OAuth preserved as backup; codex-lb will use CODEX_LB_API_KEY from env_key without OpenAI OAuth.');
525
532
  else if (result.auth_reconcile?.status === 'apikey_auth_active')
526
533
  lines.push('Codex App auth: API-key auth.json is still active. Sign in again if the App asks for ChatGPT OAuth.');
527
534
  return `${lines.join('\n')}\n`;
@@ -757,6 +764,14 @@ function codexLbProviderRequiresOpenAiAuth(text = '') {
757
764
  const block = String(text || '').match(/(^|\n)\[model_providers\.codex-lb\]([\s\S]*?)(?=\n\[[^\]]+\]|\s*$)/)?.[2] || '';
758
765
  return /(^|\n)\s*requires_openai_auth\s*=\s*true\s*(?:#.*)?(?=\n|$)/.test(block);
759
766
  }
767
+ function codexLbProviderOpenAiAuthDisabled(text = '') {
768
+ const block = String(text || '').match(/(^|\n)\[model_providers\.codex-lb\]([\s\S]*?)(?=\n\[[^\]]+\]|\s*$)/)?.[2] || '';
769
+ return /(^|\n)\s*requires_openai_auth\s*=\s*false\s*(?:#.*)?(?=\n|$)/.test(block);
770
+ }
771
+ function codexLbProviderEnvKey(text = '') {
772
+ const block = String(text || '').match(/(^|\n)\[model_providers\.codex-lb\]([\s\S]*?)(?=\n\[[^\]]+\]|\s*$)/)?.[2] || '';
773
+ return block.match(/(^|\n)\s*env_key\s*=\s*"([^"]+)"/)?.[2] || '';
774
+ }
760
775
  export async function repairCodexLbAuth(opts = {}) {
761
776
  let status = await codexLbStatus(opts);
762
777
  let configRepaired = false;
@@ -771,7 +786,7 @@ export async function repairCodexLbAuth(opts = {}) {
771
786
  status = await codexLbStatus(opts);
772
787
  }
773
788
  }
774
- if (status.env_key_configured && status.base_url && (!status.ok || !status.selected || !status.provider_requires_openai_auth || legacyAuthMigrated || hasTopLevelCodexModeLock(currentConfig))) {
789
+ if (status.env_key_configured && status.base_url && (!status.ok || !status.selected || !status.provider_uses_codex_lb_env_auth || legacyAuthMigrated || hasTopLevelCodexModeLock(currentConfig))) {
775
790
  await ensureDir(path.dirname(status.config_path));
776
791
  const next = normalizeCodexFastModeUiConfig(upsertCodexLbConfig(currentConfig, status.base_url));
777
792
  await writeTextAtomic(status.config_path, next);
@@ -816,7 +831,7 @@ export async function ensureCodexLbAuthDuringInstall(opts = {}) {
816
831
  if (!status.selected && !status.provider_configured && !status.env_file)
817
832
  return { status: 'not_configured', codex_lb: status };
818
833
  await migrateCodexAuthKeyFormat({ home: opts.home });
819
- if (status.ok && (!status.selected || !status.provider_requires_openai_auth))
834
+ if (status.ok && (!status.selected || !status.provider_uses_codex_lb_env_auth))
820
835
  return repairCodexLbAuth(opts);
821
836
  if (!status.ok) {
822
837
  if (status.base_url && (status.env_key_configured || status.provider_configured || status.selected || status.env_base_url_configured))
@@ -935,10 +950,9 @@ async function migrateCodexAuthKeyFormat(opts = {}) {
935
950
  return { status: 'skipped', reason: 'parse_error' };
936
951
  }
937
952
  }
938
- // Codex App needs a refreshable ChatGPT OAuth blob when a provider declares
939
- // requires_openai_auth=true. For codex-lb, the proxy key belongs in env_key
940
- // (CODEX_LB_API_KEY), so SKS preserves or restores OAuth by default and only
941
- // writes apikey auth.json when explicitly requested for CLI-only legacy use.
953
+ // codex-lb authenticates through env_key (CODEX_LB_API_KEY) and explicitly
954
+ // disables OpenAI OAuth on the provider. SKS still preserves existing OAuth
955
+ // blobs, but OAuth is no longer a readiness requirement for codex-lb.
942
956
  export async function reconcileCodexLbAuthConflict(opts = {}) {
943
957
  const home = opts.home || process.env.HOME || os.homedir();
944
958
  const status = opts.status || await codexLbStatus({ ...opts, home });
@@ -979,7 +993,7 @@ export async function reconcileCodexLbAuthConflict(opts = {}) {
979
993
  if (process.env.SKS_CODEX_LB_FORCE_APIKEY_AUTH !== '1') {
980
994
  return {
981
995
  status: 'oauth_preserved',
982
- reason: 'codex_app_requires_refreshable_oauth',
996
+ reason: 'chatgpt_oauth_preserved_while_codex_lb_uses_env_key',
983
997
  auth_path: authPath,
984
998
  backup_path: backupPath
985
999
  };
@@ -1190,7 +1204,7 @@ export async function maybePromptCodexLbSetupForLaunch(args = [], opts = {}) {
1190
1204
  if (args.includes('--json') || args.includes('--skip-codex-lb') || process.env.SKS_SKIP_CODEX_LB_PROMPT === '1')
1191
1205
  return { status: 'skipped' };
1192
1206
  let status = await codexLbStatus(opts);
1193
- if (status.env_key_configured && status.base_url && (!status.provider_configured || !status.selected || !status.provider_requires_openai_auth)) {
1207
+ if (status.env_key_configured && status.base_url && (!status.provider_configured || !status.selected || !status.provider_uses_codex_lb_env_auth)) {
1194
1208
  let promptedRestore = false;
1195
1209
  if (!status.provider_configured && canAskYesNo()) {
1196
1210
  promptedRestore = true;
@@ -1349,7 +1363,7 @@ function upsertCodexLbConfig(text = '', baseUrl, selectDefault = true) {
1349
1363
  'wire_api = "responses"',
1350
1364
  'env_key = "CODEX_LB_API_KEY"',
1351
1365
  'supports_websockets = true',
1352
- 'requires_openai_auth = true'
1366
+ 'requires_openai_auth = false'
1353
1367
  ].join('\n');
1354
1368
  next = upsertTomlTable(next, 'model_providers.codex-lb', block);
1355
1369
  return `${next.trim()}\n`;
@@ -2248,8 +2262,8 @@ export async function selftestCodexLb(tmp) {
2248
2262
  const codexLbAuth = await safeReadText(path.join(codexLbHome, '.codex', 'auth.json'));
2249
2263
  if (!codexLbSetupJson.ok || codexLbSetupJson.base_url !== 'https://lb.example.test/backend-api/codex' || !hasTopLevelCodexLbSelected(codexLbConfig) || !codexLbConfig.includes('[model_providers.codex-lb]') || !codexLbEnv.includes("CODEX_LB_BASE_URL='https://lb.example.test/backend-api/codex'") || !codexLbEnv.includes("CODEX_LB_API_KEY='sk-test'") || codexLbSetupJson.codex_environment?.ok !== true || codexLbSetupJson.codex_login?.status !== 'skipped' || codexLbAuth.trim())
2250
2264
  throw new Error('selftest: codex-lb setup');
2251
- if (!codexLbConfig.includes('requires_openai_auth = true'))
2252
- throw new Error('selftest: codex-lb setup did not write upstream-required requires_openai_auth');
2265
+ if (!codexLbConfig.includes('requires_openai_auth = false'))
2266
+ throw new Error('selftest: codex-lb setup did not disable OpenAI OAuth for codex-lb env_key auth');
2253
2267
  const codexLbFailLaunchctl = path.join(codexLbFakeBin, 'launchctl-fail');
2254
2268
  await writeTextAtomic(codexLbFailLaunchctl, '#!/bin/sh\necho "launchctl denied" >&2\nexit 7\n');
2255
2269
  await fsp.chmod(codexLbFailLaunchctl, 0o755);
@@ -2262,8 +2276,8 @@ export async function selftestCodexLb(tmp) {
2262
2276
  const codexLbRepairSetupConfig = await safeReadText(path.join(codexLbHome, '.codex', 'config.toml'));
2263
2277
  if (!hasTopLevelCodexLbSelected(codexLbRepairSetupConfig) || !codexLbRepairSetupConfig.includes('[model_providers.codex-lb]') || !codexLbRepairSetupConfig.includes('https://lb.example.test/backend-api/codex') || codexLbRepairSetupConfig.includes('sk-test'))
2264
2278
  throw new Error('selftest: init codex-lb');
2265
- if (!codexLbRepairSetupConfig.includes('requires_openai_auth = true'))
2266
- throw new Error('selftest: init codex-lb did not preserve upstream-required requires_openai_auth');
2279
+ if (!codexLbRepairSetupConfig.includes('requires_openai_auth = false'))
2280
+ throw new Error('selftest: init codex-lb did not preserve OpenAI OAuth disablement');
2267
2281
  if (!hasCodexUnstableFeatureWarningSuppression(codexLbRepairSetupConfig))
2268
2282
  throw new Error('selftest: init codex-lb did not suppress Codex unstable feature warning');
2269
2283
  await writeTextAtomic(path.join(codexLbHome, '.codex', 'config.toml'), `${codexLbConfig}\n[mcp_servers.supabase]\nurl = "https://mcp.supabase.com/mcp?project_ref=ref&read_only=true&features=database,docs"\n`);
@@ -2281,8 +2295,8 @@ export async function selftestCodexLb(tmp) {
2281
2295
  const pcfg = await safeReadText(path.join(ptmp, '.codex', 'config.toml'));
2282
2296
  if (!hasTopLevelCodexLbSelected(pcfg) || !pcfg.includes('[model_providers.codex-lb]') || !pcfg.includes('[mcp_servers.supabase]') || !pcfg.includes('read_only=true'))
2283
2297
  throw new Error('selftest: project codex-lb');
2284
- if (!pcfg.includes('requires_openai_auth = true'))
2285
- throw new Error('selftest: project codex-lb did not copy upstream-required requires_openai_auth');
2298
+ if (!pcfg.includes('requires_openai_auth = false'))
2299
+ throw new Error('selftest: project codex-lb did not copy OpenAI OAuth disablement');
2286
2300
  if (!hasCodexUnstableFeatureWarningSuppression(pcfg))
2287
2301
  throw new Error('selftest: project codex-lb config did not suppress Codex unstable feature warning');
2288
2302
  await writeTextAtomic(path.join(codexLbHome, '.codex', 'auth.json'), '{"auth_mode":"browser"}\n');
@@ -2356,8 +2370,8 @@ export async function selftestCodexLb(tmp) {
2356
2370
  throw new Error('selftest: postinstall drift auth');
2357
2371
  if (!hasTopLevelCodexLbSelected(codexLbPostBootstrapConfig) || !codexLbPostBootstrapConfig.includes('[model_providers.codex-lb]') || !codexLbPostBootstrapConfig.includes('https://lb.example.test/backend-api/codex') || codexLbPostBootstrapConfig.includes('sk-test'))
2358
2372
  throw new Error('selftest: postinstall drift config');
2359
- if (!codexLbPostBootstrapConfig.includes('requires_openai_auth = true'))
2360
- throw new Error('selftest: postinstall drift config did not restore upstream-required requires_openai_auth');
2373
+ if (!codexLbPostBootstrapConfig.includes('requires_openai_auth = false'))
2374
+ throw new Error('selftest: postinstall drift config did not restore OpenAI OAuth disablement');
2361
2375
  const doctorProject = tmpdir();
2362
2376
  await ensureDir(path.join(doctorProject, '.git'));
2363
2377
  await writeTextAtomic(path.join(doctorProject, 'package.json'), '{"name":"codex-lb-doctor-project","version":"0.0.0"}\n');
@@ -2377,8 +2391,8 @@ export async function selftestCodexLb(tmp) {
2377
2391
  const codexLbDoctorConfig = await safeReadText(path.join(codexLbHome, '.codex', 'config.toml'));
2378
2392
  if (!codexLbDoctorJson.repair?.codex_lb?.ok || !codexLbDoctorJson.repair.codex_lb.config_repaired || !codexLbDoctorJson.codex_lb?.ok || !codexLbDoctorAuth.includes('"auth_mode":"browser"') || codexLbDoctorAuth.includes('sk-test') || !hasTopLevelCodexLbSelected(codexLbDoctorConfig) || !codexLbDoctorConfig.includes('https://lb.example.test/backend-api/codex') || !hasCodexUnstableFeatureWarningSuppression(codexLbDoctorConfig))
2379
2393
  throw new Error('selftest: doctor codex-lb');
2380
- if (!codexLbDoctorConfig.includes('requires_openai_auth = true'))
2381
- throw new Error('selftest: doctor codex-lb did not restore upstream-required requires_openai_auth');
2394
+ if (!codexLbDoctorConfig.includes('requires_openai_auth = false'))
2395
+ throw new Error('selftest: doctor codex-lb did not restore OpenAI OAuth disablement');
2382
2396
  // codex-lb auth: ChatGPT OAuth ↔ codex-lb env_key conflict reconciliation.
2383
2397
  const oauthAuthJson = JSON.stringify({
2384
2398
  auth_mode: 'chatgpt',
@@ -2387,7 +2401,7 @@ export async function selftestCodexLb(tmp) {
2387
2401
  });
2388
2402
  await writeTextAtomic(path.join(codexLbHome, '.codex', 'auth.json'), `${oauthAuthJson}\n`);
2389
2403
  await writeTextAtomic(path.join(codexLbHome, '.codex', 'sks-codex-lb.env'), "export CODEX_LB_BASE_URL='https://lb.example.test/backend-api/codex'\nexport CODEX_LB_API_KEY='sk-test'\n");
2390
- await writeTextAtomic(path.join(codexLbHome, '.codex', 'config.toml'), 'model_provider = "codex-lb"\n\n[model_providers.codex-lb]\nname = "OpenAI"\nbase_url = "https://lb.example.test/backend-api/codex"\nwire_api = "responses"\nenv_key = "CODEX_LB_API_KEY"\nsupports_websockets = true\nrequires_openai_auth = true\n');
2404
+ await writeTextAtomic(path.join(codexLbHome, '.codex', 'config.toml'), 'model_provider = "codex-lb"\n\n[model_providers.codex-lb]\nname = "OpenAI"\nbase_url = "https://lb.example.test/backend-api/codex"\nwire_api = "responses"\nenv_key = "CODEX_LB_API_KEY"\nsupports_websockets = true\nrequires_openai_auth = false\n');
2391
2405
  await fsp.rm(path.join(codexLbHome, '.codex', 'auth.chatgpt-backup.json'), { force: true });
2392
2406
  const codexLbReconcileRepair = await runProcess(process.execPath, [packagedSksEntrypoint(), 'auth', 'repair', '--json'], { cwd: tmp, env: codexLbEnvForSelftest, timeoutMs: 15000, maxOutputBytes: 64 * 1024 });
2393
2407
  if (codexLbReconcileRepair.code !== 0)
@@ -2423,7 +2437,7 @@ export async function selftestCodexLb(tmp) {
2423
2437
  // codex-lb auth: release flow — restore ChatGPT OAuth from backup so the user can return to
2424
2438
  // the official ChatGPT account login. Default deselects model_provider; flags control whether
2425
2439
  // the provider stays selected and whether the backup file is removed after restore.
2426
- const codexLbReleaseConfig = 'model_provider = "codex-lb"\n\n[model_providers.codex-lb]\nname = "OpenAI"\nbase_url = "https://lb.example.test/backend-api/codex"\nwire_api = "responses"\nenv_key = "CODEX_LB_API_KEY"\nsupports_websockets = true\nrequires_openai_auth = true\n';
2440
+ const codexLbReleaseConfig = 'model_provider = "codex-lb"\n\n[model_providers.codex-lb]\nname = "OpenAI"\nbase_url = "https://lb.example.test/backend-api/codex"\nwire_api = "responses"\nenv_key = "CODEX_LB_API_KEY"\nsupports_websockets = true\nrequires_openai_auth = false\n';
2427
2441
  const codexLbReleaseEnv = "export CODEX_LB_BASE_URL='https://lb.example.test/backend-api/codex'\nexport CODEX_LB_API_KEY='sk-test'\n";
2428
2442
  const codexLbReleaseApikeyAuth = '{"auth_mode":"apikey","OPENAI_API_KEY":"sk-test"}\n';
2429
2443
  const codexLbReleaseOauthBackup = `${oauthAuthJson}\n`;
@@ -2719,8 +2733,8 @@ export async function selftestCodexLb(tmp) {
2719
2733
  }
2720
2734
  });
2721
2735
  const missingProviderRepairedConfig = await safeReadText(path.join(codexLbHome, '.codex', 'config.toml'));
2722
- if (!missingProviderLaunch.ok || missingProviderLaunch.status !== 'present' || missingProviderLaunch.chain_health?.status !== 'chain_ok' || missingProviderLaunchCalls.length !== 2 || !hasTopLevelCodexLbSelected(missingProviderRepairedConfig) || !missingProviderRepairedConfig.includes('[model_providers.codex-lb]') || !missingProviderRepairedConfig.includes('env_key = "CODEX_LB_API_KEY"') || !missingProviderRepairedConfig.includes('supports_websockets = true') || !missingProviderRepairedConfig.includes('requires_openai_auth = true'))
2723
- throw new Error('selftest: bare sks launch did not restore missing upstream codex-lb provider block from stored env');
2736
+ if (!missingProviderLaunch.ok || missingProviderLaunch.status !== 'present' || missingProviderLaunch.chain_health?.status !== 'chain_ok' || missingProviderLaunchCalls.length !== 2 || !hasTopLevelCodexLbSelected(missingProviderRepairedConfig) || !missingProviderRepairedConfig.includes('[model_providers.codex-lb]') || !missingProviderRepairedConfig.includes('env_key = "CODEX_LB_API_KEY"') || !missingProviderRepairedConfig.includes('supports_websockets = true') || !missingProviderRepairedConfig.includes('requires_openai_auth = false'))
2737
+ throw new Error('selftest: bare sks launch did not restore codex-lb provider block from stored env with OpenAI OAuth disabled');
2724
2738
  const chainCalls = [];
2725
2739
  const okChain = await checkCodexLbResponseChain({ base_url: 'https://lb.example.test/backend-api/codex', env_path: path.join(codexLbHome, '.codex', 'sks-codex-lb.env') }, {
2726
2740
  apiKey: 'sk-test',
@@ -524,6 +524,10 @@ export declare function run(command: any, args?: any): Promise<void | {
524
524
  no_overlap_ok: boolean;
525
525
  ledger_hash_chain_ok: boolean;
526
526
  all_sessions_closed: boolean;
527
+ terminal_sessions_closed: any;
528
+ terminal_close_report: string;
529
+ tmux_attach_command: string | null;
530
+ tmux_lane_manifest: string;
527
531
  output_schema_ok: boolean;
528
532
  output_tail_report: string;
529
533
  output_tail_records: number;
@@ -538,7 +542,7 @@ export declare function run(command: any, args?: any): Promise<void | {
538
542
  generated_at: string;
539
543
  records: {
540
544
  schema: string;
541
- kind: "recursion_attempt" | "lease_conflict" | "session_not_closed" | "schema_invalid_output" | "stale_heartbeat" | "legacy_multiagent_runtime_usage_attempt";
545
+ kind: "xai_available_not_used" | "context7_missing" | "codex_web_search_missing" | "recursion_attempt" | "lease_conflict" | "session_not_closed" | "terminal_missing" | "terminal_not_closed" | "schema_invalid_output" | "stale_heartbeat" | "legacy_multiagent_runtime_usage_attempt";
542
546
  blocker: string;
543
547
  created_at: string;
544
548
  status: string;
@@ -558,6 +562,11 @@ export declare function run(command: any, args?: any): Promise<void | {
558
562
  all_sessions_closed: boolean;
559
563
  launched_count: number;
560
564
  closed_session_count: number;
565
+ terminal_sessions_closed: boolean;
566
+ terminal_session_count: number;
567
+ terminal_close_report: string;
568
+ tmux_lane_manifest: string;
569
+ tmux_lane_manifest_ok: boolean;
561
570
  ledger_hash_chain_ok: boolean;
562
571
  no_overlap_ok: boolean;
563
572
  consensus_ok: boolean;
@@ -566,6 +575,8 @@ export declare function run(command: any, args?: any): Promise<void | {
566
575
  timeout_kill_report: string;
567
576
  timeout_killed_sessions: any;
568
577
  cleanup_report: string;
578
+ janitor_report: string;
579
+ janitor_ok: boolean;
569
580
  trust_report: string;
570
581
  wrongness_records: string;
571
582
  changed_files_lease_checked: boolean;
@@ -376,6 +376,10 @@ export declare function run(command: any, args?: any): Promise<void | {
376
376
  no_overlap_ok: boolean;
377
377
  ledger_hash_chain_ok: boolean;
378
378
  all_sessions_closed: boolean;
379
+ terminal_sessions_closed: any;
380
+ terminal_close_report: string;
381
+ tmux_attach_command: string | null;
382
+ tmux_lane_manifest: string;
379
383
  output_schema_ok: boolean;
380
384
  output_tail_report: string;
381
385
  output_tail_records: number;
@@ -390,7 +394,7 @@ export declare function run(command: any, args?: any): Promise<void | {
390
394
  generated_at: string;
391
395
  records: {
392
396
  schema: string;
393
- kind: "recursion_attempt" | "lease_conflict" | "session_not_closed" | "schema_invalid_output" | "stale_heartbeat" | "legacy_multiagent_runtime_usage_attempt";
397
+ kind: "xai_available_not_used" | "context7_missing" | "codex_web_search_missing" | "recursion_attempt" | "lease_conflict" | "session_not_closed" | "terminal_missing" | "terminal_not_closed" | "schema_invalid_output" | "stale_heartbeat" | "legacy_multiagent_runtime_usage_attempt";
394
398
  blocker: string;
395
399
  created_at: string;
396
400
  status: string;
@@ -410,6 +414,11 @@ export declare function run(command: any, args?: any): Promise<void | {
410
414
  all_sessions_closed: boolean;
411
415
  launched_count: number;
412
416
  closed_session_count: number;
417
+ terminal_sessions_closed: boolean;
418
+ terminal_session_count: number;
419
+ terminal_close_report: string;
420
+ tmux_lane_manifest: string;
421
+ tmux_lane_manifest_ok: boolean;
413
422
  ledger_hash_chain_ok: boolean;
414
423
  no_overlap_ok: boolean;
415
424
  consensus_ok: boolean;
@@ -418,6 +427,8 @@ export declare function run(command: any, args?: any): Promise<void | {
418
427
  timeout_kill_report: string;
419
428
  timeout_killed_sessions: any;
420
429
  cleanup_report: string;
430
+ janitor_report: string;
431
+ janitor_ok: boolean;
421
432
  trust_report: string;
422
433
  wrongness_records: string;
423
434
  changed_files_lease_checked: boolean;