sneakoscope 1.17.0 → 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.
- package/README.md +14 -3
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/crates/sks-core/src/main.rs +1 -1
- package/dist/.sks-build-stamp.json +4 -4
- package/dist/bin/sks.js +1 -1
- package/dist/build-manifest.json +31 -9
- package/dist/cli/install-helpers.d.ts +9 -0
- package/dist/cli/install-helpers.js +43 -29
- package/dist/commands/image-ux-review.d.ts +10 -1
- package/dist/commands/ppt.d.ts +10 -1
- package/dist/core/agents/agent-codex-cockpit.d.ts +6 -0
- package/dist/core/agents/agent-codex-cockpit.js +22 -0
- package/dist/core/agents/agent-orchestrator.d.ts +10 -1
- package/dist/core/agents/agent-orchestrator.js +22 -1
- package/dist/core/agents/agent-output-validator.d.ts +28 -0
- package/dist/core/agents/agent-output-validator.js +14 -1
- package/dist/core/agents/agent-proof-evidence.d.ts +5 -0
- package/dist/core/agents/agent-proof-evidence.js +12 -0
- package/dist/core/agents/agent-terminal-session.d.ts +52 -0
- package/dist/core/agents/agent-terminal-session.js +107 -0
- package/dist/core/agents/agent-trust-report.d.ts +4 -0
- package/dist/core/agents/agent-trust-report.js +6 -0
- package/dist/core/agents/agent-wrongness.d.ts +1 -1
- package/dist/core/agents/agent-wrongness.js +5 -0
- package/dist/core/agents/route-collaboration-ledger.d.ts +10 -1
- package/dist/core/agents/scout-policy.d.ts +30 -0
- package/dist/core/agents/scout-policy.js +68 -0
- package/dist/core/agents/tmux-right-lane-cockpit.d.ts +94 -0
- package/dist/core/agents/tmux-right-lane-cockpit.js +57 -0
- package/dist/core/codex/codex-web-search-adapter.d.ts +41 -0
- package/dist/core/codex/codex-web-search-adapter.js +105 -0
- package/dist/core/codex/official-goal-mode.d.ts +24 -0
- package/dist/core/codex/official-goal-mode.js +41 -0
- package/dist/core/codex-lb/codex-lb-setup.js +1 -1
- package/dist/core/commands/image-ux-review-command.d.ts +10 -1
- package/dist/core/commands/ppt-command.d.ts +10 -1
- package/dist/core/feature-fixtures.js +3 -2
- package/dist/core/feature-registry.js +1 -1
- package/dist/core/fsx.d.ts +1 -1
- package/dist/core/fsx.js +1 -1
- package/dist/core/goal-workflow.d.ts +9 -0
- package/dist/core/goal-workflow.js +16 -3
- package/dist/core/image-ux-review/imagegen-adapter.js +56 -13
- package/dist/core/imagegen/imagegen-capability.d.ts +21 -0
- package/dist/core/imagegen/imagegen-capability.js +111 -11
- package/dist/core/init.js +1 -1
- package/dist/core/mcp/xai-mcp-detector.d.ts +44 -0
- package/dist/core/mcp/xai-mcp-detector.js +157 -0
- package/dist/core/mcp/xai-search-adapter.d.ts +44 -0
- package/dist/core/mcp/xai-search-adapter.js +100 -0
- package/dist/core/proof/proof-reader.d.ts +2 -0
- package/dist/core/proof/proof-schema.d.ts +4 -0
- package/dist/core/proof/proof-schema.js +3 -1
- package/dist/core/proof/route-adapter.d.ts +42 -0
- package/dist/core/proof/route-finalizer.d.ts +42 -0
- package/dist/core/proof/selftest-proof-fixtures.d.ts +42 -0
- package/dist/core/release-parallel-full-coverage.d.ts +26 -0
- package/dist/core/release-parallel-full-coverage.js +149 -0
- package/dist/core/source-intelligence/source-intelligence-policy.d.ts +41 -0
- package/dist/core/source-intelligence/source-intelligence-policy.js +75 -0
- package/dist/core/source-intelligence/source-intelligence-proof.d.ts +27 -0
- package/dist/core/source-intelligence/source-intelligence-proof.js +37 -0
- package/dist/core/source-intelligence/source-intelligence-runner.d.ts +54 -0
- package/dist/core/source-intelligence/source-intelligence-runner.js +113 -0
- package/dist/core/trust-kernel/trust-report.d.ts +84 -0
- package/dist/core/trust-kernel/trust-report.js +33 -2
- package/dist/core/version.d.ts +1 -1
- package/dist/core/version.js +1 -1
- package/package.json +15 -3
- 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.
|
|
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
|
|
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
|
|
|
@@ -601,7 +612,7 @@ npm run release:check
|
|
|
601
612
|
npm run publish:dry
|
|
602
613
|
```
|
|
603
614
|
|
|
604
|
-
`release:check` runs the 1.
|
|
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
|
|
|
@@ -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.
|
|
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.
|
|
5
|
-
"source_digest": "
|
|
6
|
-
"source_file_count":
|
|
7
|
-
"built_at_source_time":
|
|
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
package/dist/build-manifest.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": "sks.dist-build.v2",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"package_version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
|
+
"package_version": "1.18.0",
|
|
5
5
|
"typescript": true,
|
|
6
6
|
"mjs_runtime_files": 0,
|
|
7
|
-
"compiled_file_count":
|
|
8
|
-
"compiled_js_count":
|
|
9
|
-
"compiled_dts_count":
|
|
10
|
-
"source_digest": "
|
|
11
|
-
"source_file_count":
|
|
12
|
-
"source_files_hash": "
|
|
13
|
-
"source_list_hash": "
|
|
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
14
|
"src_mjs_runtime_files": 0,
|
|
15
15
|
"dist_stamp_schema": "sks.dist-build-stamp.v1",
|
|
16
16
|
"files": [
|
|
@@ -240,6 +240,8 @@
|
|
|
240
240
|
"core/agents/agent-session-rows.js",
|
|
241
241
|
"core/agents/agent-task-slicer.d.ts",
|
|
242
242
|
"core/agents/agent-task-slicer.js",
|
|
243
|
+
"core/agents/agent-terminal-session.d.ts",
|
|
244
|
+
"core/agents/agent-terminal-session.js",
|
|
243
245
|
"core/agents/agent-trust-report.d.ts",
|
|
244
246
|
"core/agents/agent-trust-report.js",
|
|
245
247
|
"core/agents/agent-work-partition.d.ts",
|
|
@@ -250,6 +252,10 @@
|
|
|
250
252
|
"core/agents/agent-wrongness.js",
|
|
251
253
|
"core/agents/route-collaboration-ledger.d.ts",
|
|
252
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",
|
|
253
259
|
"core/agents/work-partition/conflict-detector.d.ts",
|
|
254
260
|
"core/agents/work-partition/conflict-detector.js",
|
|
255
261
|
"core/agents/work-partition/dependency-graph.d.ts",
|
|
@@ -332,6 +338,10 @@
|
|
|
332
338
|
"core/codex-lb/codex-lb-setup.js",
|
|
333
339
|
"core/codex-model-guard.d.ts",
|
|
334
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",
|
|
335
345
|
"core/commands/agent-command.d.ts",
|
|
336
346
|
"core/commands/agent-command.js",
|
|
337
347
|
"core/commands/autoresearch-command.d.ts",
|
|
@@ -582,6 +592,10 @@
|
|
|
582
592
|
"core/mad-sks/write-guard.js",
|
|
583
593
|
"core/managed-paths.d.ts",
|
|
584
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",
|
|
585
599
|
"core/memory-governor.d.ts",
|
|
586
600
|
"core/memory-governor.js",
|
|
587
601
|
"core/memory-summary.d.ts",
|
|
@@ -717,6 +731,8 @@
|
|
|
717
731
|
"core/questions.js",
|
|
718
732
|
"core/recallpulse.d.ts",
|
|
719
733
|
"core/recallpulse.js",
|
|
734
|
+
"core/release-parallel-full-coverage.d.ts",
|
|
735
|
+
"core/release-parallel-full-coverage.js",
|
|
720
736
|
"core/research.d.ts",
|
|
721
737
|
"core/research.js",
|
|
722
738
|
"core/retention.d.ts",
|
|
@@ -731,6 +747,12 @@
|
|
|
731
747
|
"core/session/project-namespace.js",
|
|
732
748
|
"core/skill-forge.d.ts",
|
|
733
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",
|
|
734
756
|
"core/structured-output-adapter.d.ts",
|
|
735
757
|
"core/structured-output-adapter.js",
|
|
736
758
|
"core/team-dag.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
|
|
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) &&
|
|
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
|
|
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.
|
|
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.
|
|
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
|
-
//
|
|
939
|
-
//
|
|
940
|
-
//
|
|
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: '
|
|
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.
|
|
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 =
|
|
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 =
|
|
2252
|
-
throw new Error('selftest: codex-lb setup did not
|
|
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 =
|
|
2266
|
-
throw new Error('selftest: init codex-lb did not preserve
|
|
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 =
|
|
2285
|
-
throw new Error('selftest: project codex-lb did not copy
|
|
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 =
|
|
2360
|
-
throw new Error('selftest: postinstall drift config did not restore
|
|
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 =
|
|
2381
|
-
throw new Error('selftest: doctor codex-lb did not restore
|
|
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 =
|
|
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 =
|
|
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 =
|
|
2723
|
-
throw new Error('selftest: bare sks launch did not restore
|
|
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;
|
package/dist/commands/ppt.d.ts
CHANGED
|
@@ -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;
|
|
@@ -29,6 +29,12 @@ export interface AgentCodexCockpitState {
|
|
|
29
29
|
all_sessions_closed: boolean | null;
|
|
30
30
|
janitor_ok: boolean | null;
|
|
31
31
|
proof_status: string | null;
|
|
32
|
+
source_intelligence_status: string | null;
|
|
33
|
+
xai_status: string | null;
|
|
34
|
+
codex_web_search_status: string | null;
|
|
35
|
+
goal_mode_status: string | null;
|
|
36
|
+
terminal_session_status: string | null;
|
|
37
|
+
tmux_attach_command: string | null;
|
|
32
38
|
blockers: string[];
|
|
33
39
|
agents: Array<Record<string, unknown>>;
|
|
34
40
|
recent_events: string[];
|
|
@@ -34,6 +34,10 @@ export async function buildAgentCodexCockpitState(missionDir, opts = {}) {
|
|
|
34
34
|
const cleanup = await readJson(path.join(root, 'agent-cleanup.json'), null);
|
|
35
35
|
const janitor = await readJson(path.join(root, 'agent-janitor-report.json'), null);
|
|
36
36
|
const namespace = await readJson(path.join(missionDir, 'project-session-namespace.json'), null);
|
|
37
|
+
const sourceIntelligence = await readJson(path.join(missionDir, 'source-intelligence-evidence.json'), null);
|
|
38
|
+
const goalMode = await readJson(path.join(missionDir, 'goal-mode-applied.json'), null);
|
|
39
|
+
const tmuxLayout = await readJson(path.join(root, 'agent-tmux-layout.json'), null);
|
|
40
|
+
const terminalClosed = proof?.terminal_sessions_closed === true;
|
|
37
41
|
const eventsTail = await readTailLines(path.join(root, 'agent-events.jsonl'), 8);
|
|
38
42
|
const cockpitEventsTail = await readTailLines(path.join(root, AGENT_CODEX_COCKPIT_EVENTS), 8);
|
|
39
43
|
const teamTail = await readTailLines(path.join(missionDir, 'team-transcript.jsonl'), 8);
|
|
@@ -58,6 +62,12 @@ export async function buildAgentCodexCockpitState(missionDir, opts = {}) {
|
|
|
58
62
|
all_sessions_closed: proof?.all_sessions_closed ?? cleanup?.all_sessions_closed ?? null,
|
|
59
63
|
janitor_ok: janitor?.ok ?? null,
|
|
60
64
|
proof_status: proof?.status || (proof?.ok ? 'passed' : proof ? 'blocked' : null),
|
|
65
|
+
source_intelligence_status: sourceIntelligence?.ok === true ? sourceIntelligence.mode || 'ok' : sourceIntelligence ? 'blocked' : null,
|
|
66
|
+
xai_status: sourceIntelligence?.xai_search?.status || sourceIntelligence?.policy?.xai_mcp?.status || null,
|
|
67
|
+
codex_web_search_status: sourceIntelligence?.codex_web_search?.status || sourceIntelligence?.policy?.codex_web_search?.status || null,
|
|
68
|
+
goal_mode_status: goalMode?.mode || null,
|
|
69
|
+
terminal_session_status: terminalClosed ? 'closed' : proof ? 'blocked_or_unverified' : null,
|
|
70
|
+
tmux_attach_command: tmuxLayout?.attach_command || null,
|
|
61
71
|
blockers,
|
|
62
72
|
agents,
|
|
63
73
|
recent_events: [...eventsTail, ...cockpitEventsTail, ...teamTail].slice(-12),
|
|
@@ -81,6 +91,12 @@ export function renderAgentCodexDashboard(state) {
|
|
|
81
91
|
`- Agents: ${state.agent_count}`,
|
|
82
92
|
`- Concurrency: ${state.concurrency ?? 'unknown'}`,
|
|
83
93
|
`- Proof: ${state.proof_status || 'unknown'}`,
|
|
94
|
+
`- Source intelligence: ${state.source_intelligence_status || 'unknown'}`,
|
|
95
|
+
`- X AI: ${state.xai_status || 'unknown'}`,
|
|
96
|
+
`- Codex Web Search: ${state.codex_web_search_status || 'unknown'}`,
|
|
97
|
+
`- Goal mode: ${state.goal_mode_status || 'unknown'}`,
|
|
98
|
+
`- Terminal sessions: ${state.terminal_session_status || 'unknown'}`,
|
|
99
|
+
`- tmux attach: ${state.tmux_attach_command || 'unknown'}`,
|
|
84
100
|
`- All sessions closed: ${state.all_sessions_closed ?? 'unknown'}`,
|
|
85
101
|
'',
|
|
86
102
|
'| Agent | Persona | Task | State | Heartbeat age | Lease | Blockers | Artifact |',
|
|
@@ -125,6 +141,12 @@ function summarizeLiveState(state) {
|
|
|
125
141
|
concurrency: state.concurrency,
|
|
126
142
|
active_agents: state.agents.filter((agent) => !['closed', 'done', 'completed'].includes(String(agent.status || ''))).length,
|
|
127
143
|
proof_status: state.proof_status,
|
|
144
|
+
source_intelligence_status: state.source_intelligence_status,
|
|
145
|
+
xai_status: state.xai_status,
|
|
146
|
+
codex_web_search_status: state.codex_web_search_status,
|
|
147
|
+
goal_mode_status: state.goal_mode_status,
|
|
148
|
+
terminal_session_status: state.terminal_session_status,
|
|
149
|
+
tmux_attach_command: state.tmux_attach_command,
|
|
128
150
|
blockers: state.blockers,
|
|
129
151
|
};
|
|
130
152
|
}
|
|
@@ -143,6 +143,10 @@ export declare function runNativeAgentOrchestrator(opts?: AgentRunOptions): Prom
|
|
|
143
143
|
no_overlap_ok: boolean;
|
|
144
144
|
ledger_hash_chain_ok: boolean;
|
|
145
145
|
all_sessions_closed: boolean;
|
|
146
|
+
terminal_sessions_closed: any;
|
|
147
|
+
terminal_close_report: string;
|
|
148
|
+
tmux_attach_command: string | null;
|
|
149
|
+
tmux_lane_manifest: string;
|
|
146
150
|
output_schema_ok: boolean;
|
|
147
151
|
output_tail_report: string;
|
|
148
152
|
output_tail_records: number;
|
|
@@ -157,7 +161,7 @@ export declare function runNativeAgentOrchestrator(opts?: AgentRunOptions): Prom
|
|
|
157
161
|
generated_at: string;
|
|
158
162
|
records: {
|
|
159
163
|
schema: string;
|
|
160
|
-
kind: "recursion_attempt" | "lease_conflict" | "session_not_closed" | "schema_invalid_output" | "stale_heartbeat" | "legacy_multiagent_runtime_usage_attempt";
|
|
164
|
+
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";
|
|
161
165
|
blocker: string;
|
|
162
166
|
created_at: string;
|
|
163
167
|
status: string;
|
|
@@ -177,6 +181,11 @@ export declare function runNativeAgentOrchestrator(opts?: AgentRunOptions): Prom
|
|
|
177
181
|
all_sessions_closed: boolean;
|
|
178
182
|
launched_count: number;
|
|
179
183
|
closed_session_count: number;
|
|
184
|
+
terminal_sessions_closed: boolean;
|
|
185
|
+
terminal_session_count: number;
|
|
186
|
+
terminal_close_report: string;
|
|
187
|
+
tmux_lane_manifest: string;
|
|
188
|
+
tmux_lane_manifest_ok: boolean;
|
|
180
189
|
ledger_hash_chain_ok: boolean;
|
|
181
190
|
no_overlap_ok: boolean;
|
|
182
191
|
consensus_ok: boolean;
|