sneakoscope 6.0.3 → 6.1.2
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 +29 -12
- package/config/codex-releases/{rust-v0.142.0.json → rust-v0.144.1.json} +6 -6
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/bin/fast-inline.js +18 -14
- package/dist/bin/sks-dispatch.js +2 -4
- package/dist/cli/args.js +2 -0
- package/dist/cli/command-manifest-lite.js +2 -3
- package/dist/cli/command-registry.js +3 -4
- package/dist/cli/help-fast.js +1 -1
- package/dist/cli/install-helpers.js +348 -763
- package/dist/cli/install-tool-helpers.js +287 -0
- package/dist/cli/router.js +91 -6
- package/dist/commands/codex-lb.js +188 -53
- package/dist/commands/codex.js +44 -5
- package/dist/commands/doctor.js +302 -46
- package/dist/commands/tmux.js +5 -1
- package/dist/commands/versioning.js +7 -0
- package/dist/commands/zellij-monitor-pane.js +2 -0
- package/dist/commands/zellij-viewport-pane.js +3 -1
- package/dist/commands/zellij.js +1 -1
- package/dist/config/skills-manifest.json +59 -59
- package/dist/core/agent-bridge/agent-manifest.js +48 -0
- package/dist/core/agents/agent-central-ledger.js +9 -0
- package/dist/core/agents/agent-cleanup-executor.js +334 -41
- package/dist/core/agents/agent-cleanup.js +20 -1
- package/dist/core/agents/agent-command-surface.js +3 -1
- package/dist/core/agents/agent-effort-policy.js +30 -38
- package/dist/core/agents/agent-janitor.js +9 -10
- package/dist/core/agents/agent-namespace-safety.js +56 -0
- package/dist/core/agents/agent-orchestrator.js +25 -3
- package/dist/core/agents/agent-output-validator.js +1 -1
- package/dist/core/agents/agent-plan.js +100 -21
- package/dist/core/agents/agent-role-config.js +43 -49
- package/dist/core/agents/agent-runner-codex-exec.js +18 -3
- package/dist/core/agents/agent-runner-process.js +1 -0
- package/dist/core/agents/agent-schema.js +3 -2
- package/dist/core/agents/fast-mode-policy.js +3 -5
- package/dist/core/agents/native-cli-session-swarm.js +1 -1
- package/dist/core/agents/native-worker-backend-router.js +2 -1
- package/dist/core/agents/work-partition/repo-inventory.js +68 -7
- package/dist/core/agents/zellij-right-lane-cockpit.js +2 -2
- package/dist/core/code-structure.js +5 -4
- package/dist/core/codex/agent-config-file-repair.js +94 -193
- package/dist/core/codex/codex-cli-update.js +723 -0
- package/dist/core/codex/codex-config-guard.js +38 -11
- package/dist/core/codex/codex-project-config-policy.js +3 -6
- package/dist/core/codex/codex-startup-config-postcheck.js +52 -42
- package/dist/core/codex-adapter.js +35 -22
- package/dist/core/codex-app/codex-agent-role-sync.js +13 -54
- package/dist/core/codex-app/codex-app-fast-ui-repair.js +51 -20
- package/dist/core/codex-app/codex-app-launcher.js +48 -17
- package/dist/core/codex-app/codex-app-restart.js +23 -2
- package/dist/core/codex-app/codex-app-ui-state-snapshot.js +11 -3
- package/dist/core/codex-app/sks-menubar.js +136 -5
- package/dist/core/codex-app.js +35 -14
- package/dist/core/codex-compat/codex-hook-warning-detector.js +10 -1
- package/dist/core/codex-compat/codex-release-manifest.js +6 -6
- package/dist/core/codex-control/codex-0139-doctor-real-probe.js +7 -1
- package/dist/core/codex-control/codex-0139-image-path-real-probe.js +29 -12
- package/dist/core/codex-control/codex-0139-probe-runner.js +103 -28
- package/dist/core/codex-control/codex-0139-real-probe-summary.js +7 -3
- package/dist/core/codex-control/codex-0139-real-probes.js +21 -6
- package/dist/core/codex-control/codex-0139-sandbox-real-probe.js +39 -13
- package/dist/core/codex-control/codex-0139-web-search-probe.js +28 -14
- package/dist/core/codex-control/{codex-0142-capability.js → codex-0144-capability.js} +22 -22
- package/dist/core/codex-control/codex-0144-collab-agent-real-probe.js +63 -0
- package/dist/core/codex-control/codex-lb-launch-recovery.js +278 -0
- package/dist/core/codex-control/codex-multi-agent-event-normalizer.js +5 -1
- package/dist/core/codex-control/codex-reliability-shield.js +93 -30
- package/dist/core/codex-control/codex-sdk-adapter.js +96 -13
- package/dist/core/codex-control/codex-sdk-config-policy.js +2 -1
- package/dist/core/codex-control/codex-sdk-sandbox-policy.js +6 -3
- package/dist/core/codex-control/codex-task-runner.js +62 -9
- package/dist/core/codex-control/python-codex-sdk-adapter.js +30 -3
- package/dist/core/codex-exec-output-schema.js +35 -6
- package/dist/core/codex-lb/codex-lb-env.js +30 -1
- package/dist/core/codex-lb/codex-lb-tool-catalog.js +478 -0
- package/dist/core/codex-lb/codex-lb-tool-output-recovery.js +291 -0
- package/dist/core/codex-native/codex-native-feature-broker.js +31 -38
- package/dist/core/codex-native/codex-native-feature-matrix.js +2 -2
- package/dist/core/codex-native/codex-native-repair-transaction.js +1 -1
- package/dist/core/codex-native/core-skill-manifest.js +8 -4
- package/dist/core/codex-native/native-capability-postcheck.js +16 -8
- package/dist/core/codex-native/native-capability-repair-matrix.js +76 -27
- package/dist/core/codex-plugins/codex-plugin-json.js +67 -21
- package/dist/core/codex-plugins/codex-plugin-repair.js +118 -0
- package/dist/core/codex-runtime/codex-desktop-config-policy.js +305 -0
- package/dist/core/commands/agent-bridge-command.js +23 -2
- package/dist/core/commands/agent-command.js +38 -5
- package/dist/core/commands/basic-cli.js +77 -30
- package/dist/core/commands/command-utils.js +1 -1
- package/dist/core/commands/gc-command.js +27 -4
- package/dist/core/commands/image-ux-review-command.js +55 -24
- package/dist/core/commands/mad-sks-command.js +182 -137
- package/dist/core/commands/naruto-command.js +643 -1153
- package/dist/core/commands/pipeline-command.js +1 -0
- package/dist/core/commands/research-command.js +293 -231
- package/dist/core/commands/run-command.js +100 -23
- package/dist/core/commands/team-command.js +2 -3
- package/dist/core/commands/team-legacy-observe-command.js +94 -359
- package/dist/core/commands/wiki-command.js +179 -83
- package/dist/core/computer-use-live-evidence.js +166 -3
- package/dist/core/computer-use-status.js +5 -2
- package/dist/core/daemon/sksd-hook-daemon-entrypoint.js +2 -2
- package/dist/core/daemon/sksd-hook-daemon.js +171 -28
- package/dist/core/daemon/sksd-hook-dispatch.js +2 -2
- package/dist/core/db-safety.js +2 -2
- package/dist/core/decision-lattice.js +6 -6
- package/dist/core/dfix/verification-selector.js +6 -4
- package/dist/core/doctor/browser-use-repair.js +54 -13
- package/dist/core/doctor/codex-0139-doctor.js +3 -2
- package/dist/core/doctor/codex-startup-config-repair.js +8 -3
- package/dist/core/doctor/computer-use-repair.js +28 -39
- package/dist/core/doctor/doctor-codex-startup-repair.js +24 -149
- package/dist/core/doctor/doctor-context7-repair.js +1 -1
- package/dist/core/doctor/doctor-dirty-planner.js +1 -1
- package/dist/core/doctor/doctor-native-capability-repair.js +74 -3
- package/dist/core/doctor/imagegen-repair.js +47 -12
- package/dist/core/doctor/legacy-global-hook-cleanup.js +179 -0
- package/dist/core/feature-fixture-executor.js +71 -7
- package/dist/core/feature-fixture-runner.js +53 -12
- package/dist/core/feature-fixtures.js +47 -14
- package/dist/core/feature-registry.js +53 -58
- package/dist/core/fsx.js +54 -6
- package/dist/core/harness-conflicts.js +19 -10
- package/dist/core/hooks-runtime/code-pack-freshness-preflight.js +5 -4
- package/dist/core/hooks-runtime/hook-invocation-dedupe.js +147 -0
- package/dist/core/hooks-runtime/hook-io.js +14 -4
- package/dist/core/hooks-runtime/light-turn.js +70 -0
- package/dist/core/hooks-runtime/payload-signals.js +270 -0
- package/dist/core/hooks-runtime/team-digest.js +0 -1
- package/dist/core/hooks-runtime/tool-output-quarantine.js +93 -0
- package/dist/core/hooks-runtime.js +418 -250
- package/dist/core/image/image-artifact-path-contract.js +8 -6
- package/dist/core/image/image-artifact-registry.js +5 -1
- package/dist/core/image-ux-review/imagegen-adapter.js +5 -2
- package/dist/core/imagegen/imagegen-capability.js +10 -13
- package/dist/core/imagegen/require-imagegen.js +37 -11
- package/dist/core/init/skills.js +16 -30
- package/dist/core/init.js +144 -36
- package/dist/core/managed-assets/managed-assets-manifest.js +417 -14
- package/dist/core/mission.js +24 -1
- package/dist/core/naruto/naruto-work-graph.js +70 -4
- package/dist/core/ops/reporting.js +3 -0
- package/dist/core/pipeline-internals/runtime-core.js +578 -180
- package/dist/core/pipeline-internals/runtime-gates.js +191 -49
- package/dist/core/ppt/style-tokens.js +1 -1
- package/dist/core/ppt-review/index.js +1 -1
- package/dist/core/ppt-review/slide-exporter.js +23 -17
- package/dist/core/ppt-review/slide-imagegen-review.js +1 -1
- package/dist/core/ppt-review/slide-issue-extraction.js +4 -2
- package/dist/core/preflight/parallel-preflight-engine.js +50 -1
- package/dist/core/product-design-plugin.js +2 -2
- package/dist/core/proof/route-finalizer.js +1 -1
- package/dist/core/proof/route-proof-gate.js +7 -2
- package/dist/core/proof-field.js +3 -3
- package/dist/core/provider/model-router.js +38 -32
- package/dist/core/recallpulse/policy.js +12 -28
- package/dist/core/recallpulse.js +11 -6
- package/dist/core/release/gate-manifest.js +18 -12
- package/dist/core/release/gate-pack-manifest.js +1 -1
- package/dist/core/release/npm-pack-proof.js +247 -0
- package/dist/core/release/package-dist-snapshot.js +151 -0
- package/dist/core/release/package-size-budget.js +5 -0
- package/dist/core/release/release-authorization-snapshot.js +115 -0
- package/dist/core/release/release-gate-affected-selector.js +15 -3
- package/dist/core/release/release-gate-cache-v2.js +30 -0
- package/dist/core/release/release-gate-contract.js +161 -0
- package/dist/core/release/release-gate-dag.js +44 -3
- package/dist/core/release/release-gate-hermetic-env.js +28 -17
- package/dist/core/release/release-real-contract.js +496 -0
- package/dist/core/release-parallel-full-coverage.js +31 -143
- package/dist/core/research/claim-evidence-matrix.js +41 -6
- package/dist/core/research/experiment-plan.js +14 -10
- package/dist/core/research/falsification.js +9 -2
- package/dist/core/research/implementation-blueprint-densifier.js +82 -60
- package/dist/core/research/implementation-blueprint.js +32 -26
- package/dist/core/research/mock-result.js +122 -11
- package/dist/core/research/replication-pack.js +15 -8
- package/dist/core/research/research-adversarial-review.js +1068 -0
- package/dist/core/research/research-claim-builder.js +69 -17
- package/dist/core/research/research-claim-synthesizer.js +343 -0
- package/dist/core/research/research-cycle-runner.js +53 -3
- package/dist/core/research/research-falsification-runner.js +176 -0
- package/dist/core/research/research-final-reviewer.js +44 -125
- package/dist/core/research/research-realistic-report.js +14 -6
- package/dist/core/research/research-review-artifact-digest.js +66 -0
- package/dist/core/research/research-source-evidence.js +144 -0
- package/dist/core/research/research-source-layer-catalog.js +68 -0
- package/dist/core/research/research-source-ledger-merge.js +250 -12
- package/dist/core/research/research-source-shards.js +26 -70
- package/dist/core/research/research-stage-runner.js +237 -247
- package/dist/core/research/research-super-search.js +184 -0
- package/dist/core/research/research-synthesis-prompt.js +20 -1
- package/dist/core/research/research-synthesis-writer.js +86 -5
- package/dist/core/research/research-work-graph.js +25 -18
- package/dist/core/research/source-quality-report.js +21 -0
- package/dist/core/research.js +429 -280
- package/dist/core/retention/retention-budget.js +25 -6
- package/dist/core/retention.js +980 -101
- package/dist/core/routes/constants.js +1 -1
- package/dist/core/routes/dollar-manifest-lite.js +11 -11
- package/dist/core/routes/evidence.js +4 -4
- package/dist/core/routes/ppt-policy.js +1 -1
- package/dist/core/routes.js +92 -64
- package/dist/core/runtime/task-profile.js +66 -0
- package/dist/core/runtime/verification-budget.js +12 -0
- package/dist/core/secret-redaction.js +4 -0
- package/dist/core/security/high-risk-contracts.js +6 -6
- package/dist/core/stop-gate/stop-gate-check.js +49 -12
- package/dist/core/subagents/agent-catalog.js +215 -0
- package/dist/core/subagents/model-policy.js +118 -0
- package/dist/core/subagents/naruto-help-contract.js +40 -0
- package/dist/core/subagents/official-subagent-config.js +488 -0
- package/dist/core/subagents/official-subagent-preparation.js +251 -0
- package/dist/core/subagents/official-subagent-prompt.js +137 -0
- package/dist/core/subagents/official-subagent-runner.js +129 -0
- package/dist/core/subagents/subagent-evidence.js +663 -0
- package/dist/core/subagents/terminology.js +16 -0
- package/dist/core/subagents/thread-budget.js +21 -0
- package/dist/core/subagents/triwiki-attention.js +65 -0
- package/dist/core/super-search/runtime-helpers.js +173 -19
- package/dist/core/super-search/runtime.js +140 -15
- package/dist/core/super-search/source-records.js +49 -8
- package/dist/core/team-review-policy.js +15 -0
- package/dist/core/triwiki/code-pack.js +8 -2
- package/dist/core/triwiki/triwiki-cache-key.js +108 -29
- package/dist/core/triwiki/triwiki-module-card.js +1 -1
- package/dist/core/triwiki-attention.js +13 -6
- package/dist/core/triwiki-provenance.js +274 -0
- package/dist/core/triwiki-runtime.js +21 -7
- package/dist/core/triwiki-wrongness/wrongness-ledger.js +187 -61
- package/dist/core/triwiki-wrongness/wrongness-retrieval.js +11 -2
- package/dist/core/triwiki-wrongness/wrongness-trust-policy.js +2 -0
- package/dist/core/update-check.js +23 -15
- package/dist/core/version-manager.js +51 -1
- package/dist/core/version.js +1 -1
- package/dist/core/wiki-coordinate.js +128 -12
- package/dist/core/work-order-ledger.js +208 -10
- package/dist/core/zellij/zellij-command.js +12 -1
- package/dist/core/zellij/zellij-dashboard-pane.js +3 -3
- package/dist/core/zellij/zellij-fake-adapter.js +3 -1
- package/dist/core/zellij/zellij-launcher.js +51 -21
- package/dist/core/zellij/zellij-layout-builder.js +14 -5
- package/dist/core/zellij/zellij-official-subagent-activity.js +477 -0
- package/dist/core/zellij/zellij-official-subagent-telemetry.js +264 -0
- package/dist/core/zellij/zellij-pane-proof.js +32 -6
- package/dist/core/zellij/zellij-slot-pane-renderer.js +17 -5
- package/dist/core/zellij/zellij-slot-telemetry.js +15 -3
- package/dist/core/zellij/zellij-ui-mode.js +1 -1
- package/dist/core/zellij/zellij-viewport-binder.js +3 -0
- package/dist/core/zellij/zellij-worker-pane-manager.js +5 -3
- package/dist/scripts/agent-fast-mode-default-check.js +48 -29
- package/dist/scripts/agent-role-config-repair-check.js +34 -15
- package/dist/scripts/agent-wiki-context-proof-check.js +16 -2
- package/dist/scripts/all-feature-deep-completion-check.js +14 -4
- package/dist/scripts/architecture-guard-check.js +8 -1
- package/dist/scripts/build-dist.js +17 -5
- package/dist/scripts/canonical-test-runner.js +188 -0
- package/dist/scripts/check-command-module-budget.js +38 -16
- package/dist/scripts/check-legacy-free.js +1 -1
- package/dist/scripts/check-route-modularity.js +0 -1
- package/dist/scripts/check-ts-contracts.js +1 -1
- package/dist/scripts/codex-0139-interrupt-agent-check.js +5 -1
- package/dist/scripts/{codex-0142-app-server-v2-check.js → codex-0144-app-server-v2-check.js} +11 -10
- package/dist/scripts/{codex-0142-binary-identity-check.js → codex-0144-binary-identity-check.js} +4 -4
- package/dist/scripts/codex-0144-capability-check.js +21 -0
- package/dist/scripts/{codex-0139-real-probes-check.js → codex-0144-core-real-probes-check.js} +19 -5
- package/dist/scripts/{codex-0142-doctor-wiring-check.js → codex-0144-doctor-wiring-check.js} +6 -6
- package/dist/scripts/{codex-0142-manifest-check.js → codex-0144-manifest-check.js} +11 -3
- package/dist/scripts/{codex-0142-policy-check.js → codex-0144-policy-check.js} +2 -2
- package/dist/scripts/{codex-0142-thread-store-check.js → codex-0144-thread-store-check.js} +3 -3
- package/dist/scripts/codex-app-provider-model-ui-check.js +53 -19
- package/dist/scripts/codex-app-ui-preservation-check.js +35 -4
- package/dist/scripts/codex-control-all-pipelines-check.js +7 -3
- package/dist/scripts/codex-control-side-effect-scope-check.js +2 -2
- package/dist/scripts/codex-control-tool-output-continuity-audit-check.js +27 -0
- package/dist/scripts/codex-effort-auto-discovery-check.js +1 -1
- package/dist/scripts/codex-lb-fast-mode-truth-check.js +1 -0
- package/dist/scripts/{codex-lb-gpt55-fast-profile-check.js → codex-lb-gpt56-fast-profile-check.js} +56 -5
- package/dist/scripts/codex-model-metadata-check.js +1 -1
- package/dist/scripts/codex-native-agent-role-content-check.js +15 -7
- package/dist/scripts/codex-native-repair-transaction-check.js +3 -1
- package/dist/scripts/codex-sdk-all-pipelines-check.js +7 -4
- package/dist/scripts/codex-sdk-research-pipeline-check.js +30 -8
- package/dist/scripts/codex-sdk-sandbox-policy-check.js +5 -1
- package/dist/scripts/codex-sdk-version-compat-check.js +2 -1
- package/dist/scripts/db-route-materialization-check.js +33 -0
- package/dist/scripts/dfix-fixture-check.js +1 -1
- package/dist/scripts/docs-truthfulness-check.js +4 -2
- package/dist/scripts/doctor-codex-startup-repair-check.js +47 -25
- package/dist/scripts/doctor-context7-repair-check.js +2 -1
- package/dist/scripts/doctor-fix-production-blackbox.js +12 -2
- package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +34 -7
- package/dist/scripts/doctor-imagegen-repair-check.js +14 -4
- package/dist/scripts/doctor-startup-config-repair-blackbox.js +9 -3
- package/dist/scripts/doctor-startup-config-repair-check.js +13 -3
- package/dist/scripts/install-update-preserves-config-check.js +7 -2
- package/dist/scripts/legacy-gate-inventory-check.js +7 -5
- package/dist/scripts/legacy-strong-inventory-check.js +7 -5
- package/dist/scripts/legacy-upgrade-matrix-check.js +4 -4
- package/dist/scripts/lib/native-cli-session-swarm-check-lib.js +173 -13
- package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +165 -6
- package/dist/scripts/managed-role-manifest-parity-check.js +5 -4
- package/dist/scripts/mutation-callsite-coverage-check.js +0 -11
- package/dist/scripts/naruto-codex-e2e-check.js +14 -7
- package/dist/scripts/naruto-shadow-clone-swarm-check.js +4 -201
- package/dist/scripts/npm-publish-performance-check.js +20 -12
- package/dist/scripts/official-subagent-workflow-check.js +145 -0
- package/dist/scripts/package-published-contract-check.js +6 -20
- package/dist/scripts/packlist-performance-check.js +17 -3
- package/dist/scripts/parallel-verification-engine-check.js +2 -2
- package/dist/scripts/postinstall-safe-side-effects-check.js +8 -3
- package/dist/scripts/ppt-no-mock-as-real-check.js +3 -1
- package/dist/scripts/prepublish-release-check-or-fast.js +23 -86
- package/dist/scripts/product-design-plugin-routing-check.js +1 -1
- package/dist/scripts/release-affected-selector-check.js +74 -1
- package/dist/scripts/release-check-stamp.js +324 -239
- package/dist/scripts/release-dag-full-coverage-check.js +7 -15
- package/dist/scripts/release-dynamic-presets-check.js +10 -1
- package/dist/scripts/release-gate-dag-runner-check.js +3 -3
- package/dist/scripts/release-gate-dag-runner.js +35 -11
- package/dist/scripts/release-gate-existence-audit.js +1 -2
- package/dist/scripts/release-gate-script-parity-check.js +1 -1
- package/dist/scripts/release-parallel-full-coverage-check.js +12 -6
- package/dist/scripts/release-parallel-speed-budget-check.js +18 -2
- package/dist/scripts/release-real-check.js +390 -157
- package/dist/scripts/release-registry-check.js +61 -16
- package/dist/scripts/release-runtime-truth-matrix-check.js +22 -0
- package/dist/scripts/research-blueprint-densifier-check.js +2 -2
- package/dist/scripts/research-real-cycle-no-legacy-final-md-check.js +11 -7
- package/dist/scripts/route-proof-artifact-structure-check.js +1 -0
- package/dist/scripts/search-visibility-gate-lib.js +1 -1
- package/dist/scripts/seo-geo-route-identity-check.js +30 -4
- package/dist/scripts/sizecheck.js +4 -4
- package/dist/scripts/sks-1-11-gate-lib.js +53 -6
- package/dist/scripts/sks-3-1-4-directive-check-lib.js +8 -2
- package/dist/scripts/sks-3-1-5-directive-check-lib.js +3 -2
- package/dist/scripts/sks-3-1-6-directive-check-lib.js +5 -3
- package/dist/scripts/sks-menubar-install-check.js +8 -0
- package/dist/scripts/sks-uninstall-regression-check.js +1 -1
- package/dist/scripts/sksd-daemon-check.js +16 -6
- package/dist/scripts/trust-fixture-check.js +32 -10
- package/dist/scripts/write-build-manifest.js +2 -1
- package/dist/scripts/wrongness-fixture-check.js +1 -1
- package/dist/scripts/zellij-layout-valid-check.js +36 -11
- package/dist/scripts/zellij-pane-proof-check.js +33 -2
- package/dist/scripts/zellij-real-session-cleanup-check.js +122 -2
- package/dist/scripts/zellij-real-session-launch-check.js +76 -5
- package/dist/scripts/zellij-slot-pane-renderer-check.js +4 -4
- package/dist/scripts/zellij-spawn-on-demand-layout-check.js +3 -3
- package/docs/demo.tape +1 -1
- package/infra-harness-gates.json +1486 -0
- package/package.json +32 -19
- package/release-gates.v2.json +4060 -0
- package/runtime-required-scripts.json +9 -0
- package/schemas/codex/{app-server-0.142 → app-server-0.144}/codex_app_server_protocol.v2.schemas.json +1146 -781
- package/schemas/codex/codex-0139-real-probe-result.schema.json +39 -5
- package/schemas/codex/ppt-slide-issue-ledger.schema.json +2 -1
- package/dist/commands/db.js +0 -6
- package/dist/core/codex-control/codex-0139-multi-agent-real-probe.js +0 -107
- package/dist/core/commands/db-command.js +0 -146
- package/dist/core/research/prompt.js +0 -15
- package/dist/scripts/agent-native-release-gate.js +0 -274
- package/dist/scripts/codex-0142-capability-check.js +0 -21
- package/dist/scripts/codex-control-tool-call-sequence-repair-check.js +0 -14
- package/dist/scripts/command-performance-scorecard-check.js +0 -204
- package/dist/scripts/config-managed-merge-callsite-coverage-check.js +0 -212
- package/dist/scripts/dollar-performance-scorecard-check.js +0 -257
- package/dist/scripts/gate-timing-check.js +0 -16
- package/dist/scripts/ops-maturity-scorecard-check.js +0 -12
- package/dist/scripts/performance-baseline-check.js +0 -12
- package/dist/scripts/performance-improvement-report-check.js +0 -58
- package/dist/scripts/release-parallel-check.js +0 -389
- package/dist/scripts/release-runner-efficiency-check.js +0 -15
- package/dist/scripts/retention-long-run-smoke-check.js +0 -299
- package/docs/assets/sneakoscope-architecture-pipeline.jpg +0 -0
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { findCodexBinary } from '../codex-adapter.js';
|
|
2
2
|
import { runProcess } from '../fsx.js';
|
|
3
|
+
import { inspectCodexLbCliLaunchRecovery } from '../codex-control/codex-lb-launch-recovery.js';
|
|
3
4
|
export async function attemptCodexAppLaunch(input) {
|
|
4
|
-
const platform = process.platform;
|
|
5
|
+
const platform = input.platform || process.platform;
|
|
5
6
|
const timeoutMs = Math.max(1, Math.min(Number(input.timeoutMs || 3000), 3000));
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
let codexBin = input.codexBin || null;
|
|
8
|
+
let commandLine = [codexBin || 'codex', '/app'];
|
|
8
9
|
if (input.mode === 'artifact-only') {
|
|
9
10
|
return launchAttempt({
|
|
10
11
|
attempted: false,
|
|
@@ -30,18 +31,6 @@ export async function attemptCodexAppLaunch(input) {
|
|
|
30
31
|
blockers: ['codex_app_handoff_platform_unsupported']
|
|
31
32
|
});
|
|
32
33
|
}
|
|
33
|
-
if (!codexBin) {
|
|
34
|
-
return launchAttempt({
|
|
35
|
-
attempted: false,
|
|
36
|
-
launched: false,
|
|
37
|
-
platform,
|
|
38
|
-
mode: input.mode,
|
|
39
|
-
command_line: commandLine,
|
|
40
|
-
exit_code: null,
|
|
41
|
-
fallback_reason: 'codex_cli_missing_artifact_only_fallback',
|
|
42
|
-
blockers: ['codex_cli_missing']
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
34
|
if (process.env.SKS_CODEX_APP_LAUNCH_FAKE === '1') {
|
|
46
35
|
const launched = process.env.SKS_CODEX_APP_LAUNCH_FAKE_LAUNCHED !== '0';
|
|
47
36
|
return launchAttempt({
|
|
@@ -57,8 +46,46 @@ export async function attemptCodexAppLaunch(input) {
|
|
|
57
46
|
blockers: launched ? [] : ['codex_app_launch_failed']
|
|
58
47
|
});
|
|
59
48
|
}
|
|
60
|
-
const
|
|
49
|
+
const env = input.env || process.env;
|
|
50
|
+
const execute = input.runProcessImpl || runProcess;
|
|
51
|
+
const toolOutputRecovery = await inspectCodexLbCliLaunchRecovery({
|
|
52
|
+
root: input.cwd,
|
|
53
|
+
env,
|
|
54
|
+
cliArgs: ['/app'],
|
|
55
|
+
...(input.recoveryFetch ? { fetchImpl: input.recoveryFetch } : {}),
|
|
56
|
+
...(input.recoveryTimeoutMs === undefined ? {} : { timeoutMs: input.recoveryTimeoutMs })
|
|
57
|
+
});
|
|
58
|
+
if (!toolOutputRecovery.ok) {
|
|
59
|
+
return launchAttempt({
|
|
60
|
+
attempted: false,
|
|
61
|
+
launched: false,
|
|
62
|
+
platform,
|
|
63
|
+
mode: input.mode,
|
|
64
|
+
command_line: commandLine,
|
|
65
|
+
exit_code: null,
|
|
66
|
+
fallback_reason: 'codex_lb_tool_output_recovery_blocked',
|
|
67
|
+
blockers: toolOutputRecovery.blockers,
|
|
68
|
+
tool_output_recovery: toolOutputRecovery
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
codexBin ||= await (input.findCodexBinaryImpl || findCodexBinary)();
|
|
72
|
+
commandLine = [codexBin || 'codex', '/app'];
|
|
73
|
+
if (!codexBin) {
|
|
74
|
+
return launchAttempt({
|
|
75
|
+
attempted: false,
|
|
76
|
+
launched: false,
|
|
77
|
+
platform,
|
|
78
|
+
mode: input.mode,
|
|
79
|
+
command_line: commandLine,
|
|
80
|
+
exit_code: null,
|
|
81
|
+
fallback_reason: 'codex_cli_missing_artifact_only_fallback',
|
|
82
|
+
blockers: ['codex_cli_missing'],
|
|
83
|
+
tool_output_recovery: toolOutputRecovery
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
const result = await execute(codexBin, ['/app'], {
|
|
61
87
|
cwd: input.cwd,
|
|
88
|
+
env,
|
|
62
89
|
timeoutMs,
|
|
63
90
|
maxOutputBytes: 32 * 1024,
|
|
64
91
|
input: `Continue the SKS mission using this prompt artifact:\n${input.promptArtifactPath}\n`
|
|
@@ -66,6 +93,9 @@ export async function attemptCodexAppLaunch(input) {
|
|
|
66
93
|
code: -1,
|
|
67
94
|
stdout: '',
|
|
68
95
|
stderr: err instanceof Error ? err.message : String(err),
|
|
96
|
+
stdoutBytes: 0,
|
|
97
|
+
stderrBytes: 0,
|
|
98
|
+
truncated: false,
|
|
69
99
|
timedOut: false
|
|
70
100
|
}));
|
|
71
101
|
const code = typeof result.code === 'number' ? result.code : null;
|
|
@@ -89,7 +119,8 @@ export async function attemptCodexAppLaunch(input) {
|
|
|
89
119
|
stdout_tail: stdout.slice(-4000),
|
|
90
120
|
stderr_tail: stderr.slice(-4000),
|
|
91
121
|
fallback_reason: fallbackReason,
|
|
92
|
-
blockers: launched ? [] : [timedOut ? 'codex_app_launch_interactive_or_timeout' : 'codex_app_launch_failed']
|
|
122
|
+
blockers: launched ? [] : [timedOut ? 'codex_app_launch_interactive_or_timeout' : 'codex_app_launch_failed'],
|
|
123
|
+
tool_output_recovery: toolOutputRecovery
|
|
93
124
|
});
|
|
94
125
|
}
|
|
95
126
|
function launchAttempt(input) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { exists, runProcess, which } from '../fsx.js';
|
|
2
|
+
import { inspectCodexLbCliLaunchRecovery } from '../codex-control/codex-lb-launch-recovery.js';
|
|
2
3
|
export async function restartCodexApp(opts = {}) {
|
|
3
4
|
const env = opts.env || process.env;
|
|
4
5
|
const appName = String(opts.appName || env.SKS_CODEX_APP_NAME || 'ChatGPT');
|
|
@@ -23,6 +24,24 @@ export async function restartCodexApp(opts = {}) {
|
|
|
23
24
|
]
|
|
24
25
|
};
|
|
25
26
|
}
|
|
27
|
+
const toolOutputRecovery = await inspectCodexLbCliLaunchRecovery({
|
|
28
|
+
root: opts.root || process.cwd(),
|
|
29
|
+
env,
|
|
30
|
+
cliArgs: ['/app'],
|
|
31
|
+
...(opts.recoveryFetch ? { fetchImpl: opts.recoveryFetch } : {}),
|
|
32
|
+
...(opts.recoveryTimeoutMs === undefined ? {} : { timeoutMs: opts.recoveryTimeoutMs })
|
|
33
|
+
});
|
|
34
|
+
if (!toolOutputRecovery.ok) {
|
|
35
|
+
return {
|
|
36
|
+
schema: 'sks.codex-app-restart.v1',
|
|
37
|
+
ok: false,
|
|
38
|
+
status: 'tool_output_recovery_blocked',
|
|
39
|
+
app_name: appName,
|
|
40
|
+
bundle_id: bundleId,
|
|
41
|
+
blockers: toolOutputRecovery.blockers,
|
|
42
|
+
tool_output_recovery: toolOutputRecovery
|
|
43
|
+
};
|
|
44
|
+
}
|
|
26
45
|
const appTarget = bundleId ? `application id ${JSON.stringify(bundleId)}` : `application ${JSON.stringify(appName)}`;
|
|
27
46
|
const quit = await run(osascript, ['-e', `tell ${appTarget} to quit`], { timeoutMs: 5000, maxOutputBytes: 8192 }).catch((err) => ({
|
|
28
47
|
code: 1,
|
|
@@ -53,7 +72,8 @@ export async function restartCodexApp(opts = {}) {
|
|
|
53
72
|
bundle_id: bundleId,
|
|
54
73
|
quit: { ok: true, code: quit.code, error: null },
|
|
55
74
|
exit_wait: { ok: false, attempts, error: 'codex_app_exit_timeout' },
|
|
56
|
-
blockers: ['codex_app_exit_timeout']
|
|
75
|
+
blockers: ['codex_app_exit_timeout'],
|
|
76
|
+
tool_output_recovery: toolOutputRecovery
|
|
57
77
|
};
|
|
58
78
|
}
|
|
59
79
|
await sleep(Number(opts.delayMs ?? env.SKS_CODEX_APP_RESTART_DELAY_MS ?? 150));
|
|
@@ -75,7 +95,8 @@ export async function restartCodexApp(opts = {}) {
|
|
|
75
95
|
blockers: [
|
|
76
96
|
...(quitOk ? [] : ['codex_app_quit_failed']),
|
|
77
97
|
...(openOk ? [] : ['codex_app_open_failed'])
|
|
78
|
-
]
|
|
98
|
+
],
|
|
99
|
+
tool_output_recovery: toolOutputRecovery
|
|
79
100
|
};
|
|
80
101
|
}
|
|
81
102
|
function skipped(appName, reason) {
|
|
@@ -12,7 +12,7 @@ export const PROJECT_LOCAL_FORBIDDEN_CODEX_KEYS = [
|
|
|
12
12
|
'otel'
|
|
13
13
|
];
|
|
14
14
|
const HOST_OWNED_KEY_RE = /^(?:model|model_reasoning_effort|openai_base_url|chatgpt_base_url|apps_mcp_product_sku|model_provider|model_providers(?:\.|$)|notify|profile|profiles(?:\.|$)|experimental_realtime_ws_base_url|otel(?:\.|$)|features\.fast_mode|service_tier|user\.fast_mode(?:\.|$))/;
|
|
15
|
-
const SECRET_KEY_RE = /(?:key|token|secret|password|credential|cookie|authorization|bearer|refresh|access)/i;
|
|
15
|
+
const SECRET_KEY_RE = /(?:key|token|secret|password|credential|cookie|authorization|auth|bearer|refresh|access|headers?|env)/i;
|
|
16
16
|
export function codexHome(input) {
|
|
17
17
|
return path.resolve(String(input?.codexHome || process.env.CODEX_HOME || path.join(os.homedir(), '.codex')));
|
|
18
18
|
}
|
|
@@ -41,8 +41,6 @@ export async function snapshotCodexAppUiState(root = process.cwd(), input = {})
|
|
|
41
41
|
return true;
|
|
42
42
|
if ((signal.key_path === 'model' || signal.key_path === 'model_reasoning_effort') && signal.sks_related)
|
|
43
43
|
return true;
|
|
44
|
-
if (signal.key_path === 'service_tier' && signal.sks_related)
|
|
45
|
-
return true;
|
|
46
44
|
return false;
|
|
47
45
|
});
|
|
48
46
|
return {
|
|
@@ -98,6 +96,9 @@ export function scanTomlSignals(text) {
|
|
|
98
96
|
const tables = [];
|
|
99
97
|
let table = null;
|
|
100
98
|
const lines = text.split(/\r?\n/);
|
|
99
|
+
const firstTableIndex = lines.findIndex((line) => /^\s*\[/.test(line));
|
|
100
|
+
const topLevelLines = firstTableIndex === -1 ? lines : lines.slice(0, firstTableIndex);
|
|
101
|
+
const sksManagedTopLevel = topLevelLines.some((line) => /(?:SKS|Sneakoscope|codex-lb|sks fast)/i.test(line));
|
|
101
102
|
lines.forEach((lineText, index) => {
|
|
102
103
|
const tableMatch = lineText.match(/^\s*\[([^\]]+)\]\s*(?:#.*)?$/);
|
|
103
104
|
if (tableMatch?.[1]) {
|
|
@@ -124,6 +125,7 @@ export function scanTomlSignals(text) {
|
|
|
124
125
|
fast_ui_related: /(?:fast_mode|service_tier|model_reasoning_effort|^model$)/i.test(keyPath) || /(?:fast|priority|default)/i.test(value),
|
|
125
126
|
provider_related: /(?:provider|base_url|auth|profile|openai|chatgpt|codex-lb)/i.test(lowerPath),
|
|
126
127
|
sks_related: /(?:sks|sneakoscope|codex-lb)/i.test(lineText)
|
|
128
|
+
|| (table == null && sksManagedTopLevel && (key === 'model' || key === 'model_reasoning_effort'))
|
|
127
129
|
});
|
|
128
130
|
});
|
|
129
131
|
return { signals, tables: [...new Set(tables)] };
|
|
@@ -252,7 +254,13 @@ function hostOwnedFingerprint(snapshot) {
|
|
|
252
254
|
function redactValuePreview(keyPath, value) {
|
|
253
255
|
if (SECRET_KEY_RE.test(keyPath))
|
|
254
256
|
return '<redacted>';
|
|
257
|
+
if (/^\s*\{/.test(value))
|
|
258
|
+
return '<redacted-object>';
|
|
259
|
+
if (/^\s*\[/.test(value))
|
|
260
|
+
return '<redacted-array>';
|
|
255
261
|
const normalized = value.replace(/^['"]|['"]$/g, '');
|
|
262
|
+
if (/^[a-z][a-z0-9+.-]*:\/\/[^/@\s]+@/i.test(normalized))
|
|
263
|
+
return '<redacted-url-credentials>';
|
|
256
264
|
if (SECRET_KEY_RE.test(normalized))
|
|
257
265
|
return '<redacted>';
|
|
258
266
|
return normalized.length > 80 ? `${normalized.slice(0, 77)}...` : normalized;
|
|
@@ -20,6 +20,9 @@ const MENU_ITEMS = [
|
|
|
20
20
|
'Fast Check',
|
|
21
21
|
'SKS Version Check',
|
|
22
22
|
'Update SKS Now',
|
|
23
|
+
'Codex CLI Version',
|
|
24
|
+
'Update Codex CLI Now',
|
|
25
|
+
'Run sks doctor --fix',
|
|
23
26
|
'Open Dashboard',
|
|
24
27
|
'Open Codex Settings',
|
|
25
28
|
'Restart Codex',
|
|
@@ -754,13 +757,22 @@ resolve_node_bin() {
|
|
|
754
757
|
printf '%s\\n' "$NODE_BIN"
|
|
755
758
|
return 0
|
|
756
759
|
fi
|
|
760
|
+
# launchd does not initialize NVM, and a login shell can resolve a different
|
|
761
|
+
# global Node before the menu owner's current NVM install. Prefer the
|
|
762
|
+
# HOME-scoped runtime; run_node_entry prepends its bin directory to PATH.
|
|
763
|
+
for cand in "$HOME"/.nvm/versions/node/*/bin/node(Nn[-1]); do
|
|
764
|
+
if [ -x "$cand" ]; then
|
|
765
|
+
printf '%s\\n' "$cand"
|
|
766
|
+
return 0
|
|
767
|
+
fi
|
|
768
|
+
done
|
|
757
769
|
local login_node
|
|
758
770
|
login_node="$(/bin/zsh -lc 'command -v node' 2>/dev/null | /usr/bin/head -n 1 || true)"
|
|
759
771
|
if [ -n "$login_node" ] && [ -x "$login_node" ]; then
|
|
760
772
|
printf '%s\\n' "$login_node"
|
|
761
773
|
return 0
|
|
762
774
|
fi
|
|
763
|
-
for cand in
|
|
775
|
+
for cand in /opt/homebrew/bin/node /usr/local/bin/node /usr/bin/node; do
|
|
764
776
|
if [ -x "$cand" ]; then
|
|
765
777
|
printf '%s\\n' "$cand"
|
|
766
778
|
return 0
|
|
@@ -780,6 +792,11 @@ run_node_entry() {
|
|
|
780
792
|
if [ -z "$node_bin" ]; then
|
|
781
793
|
return 1
|
|
782
794
|
fi
|
|
795
|
+
local node_bin_dir
|
|
796
|
+
node_bin_dir="$(/usr/bin/dirname "$node_bin")"
|
|
797
|
+
if [ -d "$node_bin_dir" ]; then
|
|
798
|
+
export PATH="$node_bin_dir:$PATH"
|
|
799
|
+
fi
|
|
783
800
|
exec "$node_bin" "$entry" "$@"
|
|
784
801
|
}
|
|
785
802
|
|
|
@@ -1093,10 +1110,18 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate {
|
|
|
1093
1110
|
var oauthItem: NSMenuItem!
|
|
1094
1111
|
var fastModeOnItem: NSMenuItem!
|
|
1095
1112
|
var fastModeOffItem: NSMenuItem!
|
|
1113
|
+
var codexCliVersionItem: NSMenuItem!
|
|
1114
|
+
var codexCliUpdateItem: NSMenuItem!
|
|
1096
1115
|
var timer: Timer?
|
|
1097
1116
|
var busy = false
|
|
1098
1117
|
var lastFailure = false
|
|
1099
1118
|
var quitWithCodex = false
|
|
1119
|
+
var codexCliCurrentVersion: String?
|
|
1120
|
+
var codexCliLatestVersion: String?
|
|
1121
|
+
var codexCliUpdateAvailable = false
|
|
1122
|
+
var codexCliMissing = false
|
|
1123
|
+
var codexCliStatusUnavailable = false
|
|
1124
|
+
var codexCliStatusRequestGeneration = 0
|
|
1100
1125
|
|
|
1101
1126
|
func applicationDidFinishLaunching(_ notification: Notification) {
|
|
1102
1127
|
NSApp.setActivationPolicy(.accessory)
|
|
@@ -1124,6 +1149,12 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate {
|
|
|
1124
1149
|
add(menu, "SKS Version Check", #selector(sksVersionCheck))
|
|
1125
1150
|
add(menu, "Update SKS Now", #selector(updateSksNow))
|
|
1126
1151
|
menu.addItem(NSMenuItem.separator())
|
|
1152
|
+
codexCliVersionItem = NSMenuItem(title: "Codex CLI: checking…", action: nil, keyEquivalent: "")
|
|
1153
|
+
codexCliVersionItem.isEnabled = false
|
|
1154
|
+
menu.addItem(codexCliVersionItem)
|
|
1155
|
+
codexCliUpdateItem = add(menu, "Update Codex CLI Now", #selector(updateCodexCliNow))
|
|
1156
|
+
add(menu, "Run sks doctor --fix", #selector(runDoctorFix))
|
|
1157
|
+
menu.addItem(NSMenuItem.separator())
|
|
1127
1158
|
add(menu, "Open Dashboard", #selector(openDashboard))
|
|
1128
1159
|
add(menu, "Open Codex Settings", #selector(openCodexSettings))
|
|
1129
1160
|
add(menu, "Restart Codex", #selector(restartCodex))
|
|
@@ -1133,6 +1164,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate {
|
|
|
1133
1164
|
statusItem.menu = menu
|
|
1134
1165
|
configureCodexLifecycleSync()
|
|
1135
1166
|
updateState()
|
|
1167
|
+
updateCodexCliStatus()
|
|
1136
1168
|
timer = Timer.scheduledTimer(withTimeInterval: 30.0, repeats: true) { [weak self] _ in self?.updateState() }
|
|
1137
1169
|
}
|
|
1138
1170
|
|
|
@@ -1140,6 +1172,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, NSMenuDelegate {
|
|
|
1140
1172
|
updateState()
|
|
1141
1173
|
updateAuthModeChecks()
|
|
1142
1174
|
updateFastModeChecks()
|
|
1175
|
+
updateCodexCliStatus()
|
|
1143
1176
|
}
|
|
1144
1177
|
|
|
1145
1178
|
func configureStatusButton(_ button: NSStatusBarButton, title: String) {
|
|
@@ -1195,10 +1228,23 @@ ${codexLifecycleSource}
|
|
|
1195
1228
|
if lastFailure {
|
|
1196
1229
|
return MenuState(title: "SKS ⚠", line: "SKS v\\(packageVersion) - last action failed")
|
|
1197
1230
|
}
|
|
1231
|
+
if codexCliMissing {
|
|
1232
|
+
return MenuState(title: "SKS ⚠", line: "SKS v\\(packageVersion) · Codex CLI not installed")
|
|
1233
|
+
}
|
|
1234
|
+
if codexCliStatusUnavailable {
|
|
1235
|
+
let current = codexCliCurrentVersion.map { " " + $0 } ?? ""
|
|
1236
|
+
return MenuState(title: "SKS ⚠", line: "SKS v\\(packageVersion) · Codex CLI\\(current) status unavailable")
|
|
1237
|
+
}
|
|
1238
|
+
if codexCliUpdateAvailable {
|
|
1239
|
+
let current = codexCliCurrentVersion ?? "unknown"
|
|
1240
|
+
let latest = codexCliLatestVersion ?? "latest"
|
|
1241
|
+
return MenuState(title: "SKS ⬆", line: "SKS v\\(packageVersion) · Codex CLI \\(current) → \\(latest) update available")
|
|
1242
|
+
}
|
|
1198
1243
|
if updateAvailable() {
|
|
1199
1244
|
return MenuState(title: "SKS ↑", line: "SKS v\\(packageVersion) - update available")
|
|
1200
1245
|
}
|
|
1201
|
-
|
|
1246
|
+
let codexVersion = codexCliCurrentVersion.map { " · Codex CLI " + $0 } ?? ""
|
|
1247
|
+
return MenuState(title: "SKS", line: "SKS v\\(packageVersion)\\(codexVersion) · OK")
|
|
1202
1248
|
}
|
|
1203
1249
|
|
|
1204
1250
|
func actionScriptUsable() -> Bool {
|
|
@@ -1296,14 +1342,83 @@ ${codexLifecycleSource}
|
|
|
1296
1342
|
self.fastModeOffItem.state = .off
|
|
1297
1343
|
return
|
|
1298
1344
|
}
|
|
1345
|
+
guard let global = json["global"] as? [String: Any], let desktopFast = global["on"] as? Bool else {
|
|
1346
|
+
self.fastModeOnItem.state = .off
|
|
1347
|
+
self.fastModeOffItem.state = .off
|
|
1348
|
+
return
|
|
1349
|
+
}
|
|
1299
1350
|
let fastMode = json["fast_mode"] as? Bool == true
|
|
1300
1351
|
let serviceTier = (json["service_tier"] as? String)?.lowercased()
|
|
1301
|
-
let
|
|
1302
|
-
self.fastModeOnItem.state =
|
|
1303
|
-
self.fastModeOffItem.state =
|
|
1352
|
+
let projectFast = fastMode || serviceTier == "fast" || serviceTier == "priority"
|
|
1353
|
+
self.fastModeOnItem.state = projectFast && desktopFast ? .on : .off
|
|
1354
|
+
self.fastModeOffItem.state = !projectFast && !desktopFast ? .on : .off
|
|
1304
1355
|
}
|
|
1305
1356
|
}
|
|
1306
1357
|
|
|
1358
|
+
func updateCodexCliStatus(refresh: Bool = false) {
|
|
1359
|
+
codexCliStatusRequestGeneration += 1
|
|
1360
|
+
let requestGeneration = codexCliStatusRequestGeneration
|
|
1361
|
+
var args = ["codex", "update-status", "--json"]
|
|
1362
|
+
if refresh { args.append("--refresh") }
|
|
1363
|
+
runSksSilent(args) { [weak self] code, output in
|
|
1364
|
+
guard let self = self else { return }
|
|
1365
|
+
guard self.codexCliStatusRequestGeneration == requestGeneration else { return }
|
|
1366
|
+
guard let json = parseJsonObject(output),
|
|
1367
|
+
json["schema"] as? String == "sks.codex-cli-update-status.v1",
|
|
1368
|
+
let ok = json["ok"] as? Bool,
|
|
1369
|
+
let installed = json["installed"] as? Bool,
|
|
1370
|
+
let status = json["status"] as? String,
|
|
1371
|
+
["current", "update_available", "missing", "update_check_unavailable"].contains(status),
|
|
1372
|
+
code == 0 || (!ok && !installed && status == "missing") else {
|
|
1373
|
+
self.markCodexCliStatusUnavailable()
|
|
1374
|
+
return
|
|
1375
|
+
}
|
|
1376
|
+
let current = json["current_version"] as? String
|
|
1377
|
+
let latest = json["latest_version"] as? String
|
|
1378
|
+
let reportedUpdateAvailable = json["update_available"] as? Bool
|
|
1379
|
+
let trusted = status == "missing"
|
|
1380
|
+
? !ok && !installed && current == nil
|
|
1381
|
+
: ok && installed && current != nil
|
|
1382
|
+
&& (status == "update_check_unavailable"
|
|
1383
|
+
|| (status == "update_available" && reportedUpdateAvailable == true)
|
|
1384
|
+
|| (status == "current" && reportedUpdateAvailable == false))
|
|
1385
|
+
guard trusted else {
|
|
1386
|
+
self.markCodexCliStatusUnavailable()
|
|
1387
|
+
return
|
|
1388
|
+
}
|
|
1389
|
+
let updateAvailable = reportedUpdateAvailable == true
|
|
1390
|
+
self.codexCliCurrentVersion = current
|
|
1391
|
+
self.codexCliLatestVersion = latest
|
|
1392
|
+
self.codexCliUpdateAvailable = updateAvailable
|
|
1393
|
+
self.codexCliMissing = !installed
|
|
1394
|
+
self.codexCliStatusUnavailable = status == "update_check_unavailable"
|
|
1395
|
+
if !installed {
|
|
1396
|
+
self.codexCliVersionItem.title = "Codex CLI: not installed"
|
|
1397
|
+
} else if status == "update_check_unavailable" {
|
|
1398
|
+
self.codexCliVersionItem.title = "Codex CLI: \\(current ?? "unknown") (update check unavailable)"
|
|
1399
|
+
} else if updateAvailable {
|
|
1400
|
+
self.codexCliVersionItem.title = "Codex CLI: \\(current ?? "unknown") → \\(latest ?? "latest") ⬆"
|
|
1401
|
+
} else if let current = current, let latest = latest {
|
|
1402
|
+
self.codexCliVersionItem.title = current == latest ? "Codex CLI: \\(current) (current)" : "Codex CLI: \\(current) · latest \\(latest)"
|
|
1403
|
+
} else {
|
|
1404
|
+
self.codexCliVersionItem.title = "Codex CLI: \\(current ?? "unknown") (latest check unavailable)"
|
|
1405
|
+
}
|
|
1406
|
+
self.codexCliUpdateItem.title = updateAvailable ? "Update Codex CLI Now ⬆" : "Update Codex CLI Now"
|
|
1407
|
+
self.updateState()
|
|
1408
|
+
}
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
func markCodexCliStatusUnavailable() {
|
|
1412
|
+
codexCliVersionItem.title = "Codex CLI: status unavailable"
|
|
1413
|
+
codexCliUpdateItem.title = "Update Codex CLI Now"
|
|
1414
|
+
codexCliCurrentVersion = nil
|
|
1415
|
+
codexCliLatestVersion = nil
|
|
1416
|
+
codexCliUpdateAvailable = false
|
|
1417
|
+
codexCliMissing = false
|
|
1418
|
+
codexCliStatusUnavailable = true
|
|
1419
|
+
updateState()
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1307
1422
|
@objc func useCodexLb() {
|
|
1308
1423
|
runSksBackground(["codex-lb", "use-codex-lb", "--restart-app", "--json"], title: "Use codex-lb") { [weak self] code, _ in
|
|
1309
1424
|
if code == 0 { self?.updateAuthModeChecks() }
|
|
@@ -1353,6 +1468,22 @@ ${codexLifecycleSource}
|
|
|
1353
1468
|
runSksBackground(["update"], title: "Update SKS Now")
|
|
1354
1469
|
}
|
|
1355
1470
|
|
|
1471
|
+
@objc func updateCodexCliNow() {
|
|
1472
|
+
runSksBackground(["codex", "update", "--json"], title: "Update Codex CLI Now") { [weak self] _, _ in
|
|
1473
|
+
self?.updateCodexCliStatus(refresh: true)
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
@objc func runDoctorFix() {
|
|
1478
|
+
runSksBackground(["doctor", "--fix", "--global-only", "--json"], title: "Run sks doctor --fix") { [weak self] code, _ in
|
|
1479
|
+
if code == 0 {
|
|
1480
|
+
self?.updateAuthModeChecks()
|
|
1481
|
+
self?.updateFastModeChecks()
|
|
1482
|
+
self?.updateCodexCliStatus(refresh: true)
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1356
1487
|
@objc func openDashboard() {
|
|
1357
1488
|
let urlString = "http://127.0.0.1:4477"
|
|
1358
1489
|
runProcess("/usr/bin/curl", ["-fsS", "--max-time", "1", urlString]) { [weak self] code, _ in
|
package/dist/core/codex-app.js
CHANGED
|
@@ -10,6 +10,7 @@ import { GLM_CODEX_CONFIG_PROVIDER_ID, GLM_CODEX_CONFIG_REASONING_PROFILES } fro
|
|
|
10
10
|
import { GLM_52_OPENROUTER_MODEL } from './providers/glm/glm-52-settings.js';
|
|
11
11
|
import { resolveOpenRouterApiKey } from './providers/openrouter/openrouter-secret-store.js';
|
|
12
12
|
import { codexLbEnvPath, loadCodexLbEnv, parseShellEnvValue, readCodexLbModelCatalog } from './codex-lb/codex-lb-env.js';
|
|
13
|
+
import { redactString } from './secret-redaction.js';
|
|
13
14
|
export const CODEX_APP_DOCS_URL = 'https://developers.openai.com/codex/app/features';
|
|
14
15
|
export const CODEX_CHANGELOG_URL = 'https://developers.openai.com/codex/changelog';
|
|
15
16
|
export const CODEX_ACCESS_TOKENS_DOCS_URL = 'https://developers.openai.com/codex/enterprise/access-tokens';
|
|
@@ -98,30 +99,32 @@ export async function codexMcpList(opts = {}) {
|
|
|
98
99
|
const codex = opts.codex || await getCodexInfo().catch(() => EMPTY_CODEX_INFO);
|
|
99
100
|
if (!codex.bin)
|
|
100
101
|
return { ok: false, checked: false, stdout: '', stderr: 'Codex CLI missing.' };
|
|
101
|
-
const
|
|
102
|
+
const execute = opts.runProcess || runProcess;
|
|
103
|
+
const out = await execute(codex.bin, ['mcp', 'list'], {
|
|
102
104
|
timeoutMs: opts.timeoutMs || 10000,
|
|
103
105
|
maxOutputBytes: 64 * 1024
|
|
104
106
|
}).catch((err) => ({ code: 1, stdout: '', stderr: err.message }));
|
|
105
107
|
return {
|
|
106
108
|
ok: out.code === 0,
|
|
107
109
|
checked: true,
|
|
108
|
-
stdout: out.stdout || '',
|
|
109
|
-
stderr: out.stderr || ''
|
|
110
|
+
stdout: redactString(out.stdout || ''),
|
|
111
|
+
stderr: redactString(out.stderr || '')
|
|
110
112
|
};
|
|
111
113
|
}
|
|
112
114
|
export async function codexFeatureList(opts = {}) {
|
|
113
115
|
const codex = opts.codex || await getCodexInfo().catch(() => EMPTY_CODEX_INFO);
|
|
114
116
|
if (!codex.bin)
|
|
115
117
|
return { ok: false, checked: false, stdout: '', stderr: 'Codex CLI missing.' };
|
|
116
|
-
const
|
|
118
|
+
const execute = opts.runProcess || runProcess;
|
|
119
|
+
const out = await execute(codex.bin, ['features', 'list'], {
|
|
117
120
|
timeoutMs: opts.timeoutMs || 10000,
|
|
118
121
|
maxOutputBytes: 64 * 1024
|
|
119
122
|
}).catch((err) => ({ code: 1, stdout: '', stderr: err.message }));
|
|
120
123
|
return {
|
|
121
124
|
ok: out.code === 0,
|
|
122
125
|
checked: true,
|
|
123
|
-
stdout: out.stdout || '',
|
|
124
|
-
stderr: out.stderr || ''
|
|
126
|
+
stdout: redactString(out.stdout || ''),
|
|
127
|
+
stderr: redactString(out.stderr || '')
|
|
125
128
|
};
|
|
126
129
|
}
|
|
127
130
|
export async function codexAppIntegrationStatus(opts = {}) {
|
|
@@ -163,7 +166,8 @@ export async function codexAppIntegrationStatus(opts = {}) {
|
|
|
163
166
|
});
|
|
164
167
|
const pluginPickerReady = requiredFeatureFlags.tool_suggest && requiredFeatureFlags.plugins && requiredFeatureFlags.apps && defaultPlugins.ok && pluginSkillShadows.ok && fastModeConfig.ok;
|
|
165
168
|
const gitActions = codexGitActionReadiness({ requiredFeatureFlags, remoteControl });
|
|
166
|
-
const
|
|
169
|
+
const selectedProviderReady = providerModelUi.selected_provider_ok !== false;
|
|
170
|
+
const ready = appInstalled && Boolean(codex.bin) && mcpList.ok && featureList.ok && requiredFeatureFlagsOk && pluginPickerReady && fastModeConfig.ok && selectedProviderReady && imageGenerationReady && gitActions.ok && computerUseReady && browserToolReady && chromeExtension.ok;
|
|
167
171
|
return {
|
|
168
172
|
ok: ready,
|
|
169
173
|
app: {
|
|
@@ -196,6 +200,7 @@ export async function codexAppIntegrationStatus(opts = {}) {
|
|
|
196
200
|
required_flags_ok: requiredFeatureFlagsOk,
|
|
197
201
|
fast_mode_config: fastModeConfig,
|
|
198
202
|
provider_model_ui: providerModelUi,
|
|
203
|
+
selected_provider_ready: selectedProviderReady,
|
|
199
204
|
git_actions: gitActions,
|
|
200
205
|
image_generation: imageGenerationReady,
|
|
201
206
|
image_generation_source: imageGenerationReady ? 'codex_features_list' : 'missing',
|
|
@@ -963,18 +968,29 @@ export async function codexProviderModelUiStatus(opts = {}) {
|
|
|
963
968
|
? ['codex_lb_gpt_5_6_catalog_unverified']
|
|
964
969
|
: [])
|
|
965
970
|
];
|
|
966
|
-
const
|
|
971
|
+
const selectedProviderBlockers = codexLbSelectedDefault ? codexLbBlockers : [];
|
|
972
|
+
const optionalProviderBlockers = codexLbSelectedDefault
|
|
973
|
+
? glmBlockers
|
|
974
|
+
: [...glmBlockers, ...codexLbBlockers];
|
|
967
975
|
const keyCommand = 'sks codex-app set-openrouter-key --api-key-stdin';
|
|
968
976
|
const installCommand = 'sks codex-app glm-profile install';
|
|
969
977
|
const setupCommand = 'sks codex-lb setup --host <domain> --api-key-stdin --yes';
|
|
970
978
|
const setKeyCommand = 'sks codex-lb set-key --api-key-stdin';
|
|
971
979
|
return {
|
|
972
980
|
schema: 'sks.codex-app-provider-model-ui.v1',
|
|
973
|
-
|
|
981
|
+
// The top-level readiness contract is intentionally scoped to the active
|
|
982
|
+
// provider. Optional GLM/OpenRouter and codex-lb setup diagnostics remain
|
|
983
|
+
// visible below without making an unrelated provider selection fail.
|
|
984
|
+
ok: selectedProviderBlockers.length === 0,
|
|
985
|
+
selected_provider_ok: selectedProviderBlockers.length === 0,
|
|
986
|
+
selected_provider: codexLbSelectedDefault ? 'codex-lb' : 'oauth',
|
|
987
|
+
selected_provider_blockers: selectedProviderBlockers,
|
|
988
|
+
optional_provider_blockers: optionalProviderBlockers,
|
|
974
989
|
checked: true,
|
|
975
990
|
verification_scope: 'config_and_provider_catalog',
|
|
976
991
|
desktop_picker_verified: false,
|
|
977
|
-
status:
|
|
992
|
+
status: selectedProviderBlockers.length === 0 ? 'ready' : 'setup_required',
|
|
993
|
+
optional_provider_status: optionalProviderBlockers.length === 0 ? 'ready' : 'setup_available',
|
|
978
994
|
config_paths: {
|
|
979
995
|
codex_config: globalConfigPath,
|
|
980
996
|
project_config: projectConfig ? projectConfigPath : null,
|
|
@@ -1022,7 +1038,7 @@ export async function codexProviderModelUiStatus(opts = {}) {
|
|
|
1022
1038
|
setKeyCommand,
|
|
1023
1039
|
'sks codex-app status'
|
|
1024
1040
|
],
|
|
1025
|
-
blockers
|
|
1041
|
+
blockers: selectedProviderBlockers
|
|
1026
1042
|
};
|
|
1027
1043
|
}
|
|
1028
1044
|
async function readTextIfExists(file) {
|
|
@@ -1087,9 +1103,14 @@ function productDesignStatusSummary(status = {}) {
|
|
|
1087
1103
|
function providerModelUiSummary(status = {}) {
|
|
1088
1104
|
if (!status?.checked)
|
|
1089
1105
|
return ' not checked';
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1106
|
+
const selected = status.selected_provider || 'oauth';
|
|
1107
|
+
if (status.ok) {
|
|
1108
|
+
const optionalSetup = (status.optional_provider_blockers || []).length > 0
|
|
1109
|
+
? ', optional providers can be configured'
|
|
1110
|
+
: '';
|
|
1111
|
+
return ` ${selected} ready${optionalSetup} (live picker reload required)`;
|
|
1112
|
+
}
|
|
1113
|
+
return ` ${selected} setup ${(status.selected_provider_blockers || status.blockers || []).join(', ') || 'required'}`;
|
|
1093
1114
|
}
|
|
1094
1115
|
function sksNativeMenuSummary(status = {}) {
|
|
1095
1116
|
if (!status)
|
|
@@ -15,7 +15,8 @@ export async function detectCodexHookOutputWarnings(eventLike, output) {
|
|
|
15
15
|
const issues = [
|
|
16
16
|
...validation.structured_issues,
|
|
17
17
|
...semantic.issues,
|
|
18
|
-
...snakeCaseKeyIssues(output)
|
|
18
|
+
...snakeCaseKeyIssues(output),
|
|
19
|
+
...unknownTopLevelKeyIssues(output)
|
|
19
20
|
];
|
|
20
21
|
for (const key of LEGACY_TOP_LEVEL_KEYS) {
|
|
21
22
|
if (output && typeof output === 'object' && Object.prototype.hasOwnProperty.call(output, key)) {
|
|
@@ -52,6 +53,14 @@ export async function detectCodexHookOutputWarnings(eventLike, output) {
|
|
|
52
53
|
warnings: [...new Set(warnings)]
|
|
53
54
|
};
|
|
54
55
|
}
|
|
56
|
+
function unknownTopLevelKeyIssues(output) {
|
|
57
|
+
if (!output || typeof output !== 'object' || Array.isArray(output))
|
|
58
|
+
return [];
|
|
59
|
+
const allowed = new Set(['continue', 'decision', 'reason', 'hookSpecificOutput']);
|
|
60
|
+
return Object.keys(output)
|
|
61
|
+
.filter((key) => !allowed.has(key))
|
|
62
|
+
.map((key) => makeCodexHookIssue('policy_disallowed', `unknown_field_${key}`, `Unknown top-level hook field is not accepted by the SKS zero-warning contract: ${key}.`, { path: `$.${key}`, upstream_supported: false, sks_disallowed: true }));
|
|
63
|
+
}
|
|
55
64
|
export async function codexHookWarningCheck(root, opts = {}) {
|
|
56
65
|
root ||= await projectRoot();
|
|
57
66
|
const fixtureValidation = await validateCodexFixtureOutputs(root);
|
|
@@ -3,13 +3,13 @@ import { packageRoot, readJson, readText, sha256 } from '../fsx.js';
|
|
|
3
3
|
export const CODEX_RELEASE_MANIFEST_SCHEMA = 'sks.codex-release-manifest.v1';
|
|
4
4
|
export const CURRENT_CODEX_RELEASE_MANIFEST = {
|
|
5
5
|
schema: CODEX_RELEASE_MANIFEST_SCHEMA,
|
|
6
|
-
targetTag: 'rust-v0.
|
|
7
|
-
requiredCliVersion: '0.
|
|
8
|
-
sdkVersion: '0.
|
|
9
|
-
minimumSupportedVersion: '0.
|
|
6
|
+
targetTag: 'rust-v0.144.1',
|
|
7
|
+
requiredCliVersion: '0.144.1',
|
|
8
|
+
sdkVersion: '0.144.1',
|
|
9
|
+
minimumSupportedVersion: '0.144.1',
|
|
10
10
|
protocolMode: 'app-server-v2',
|
|
11
|
-
generatedSchemaSha256: '
|
|
12
|
-
upstreamCommit: 'rust-v0.
|
|
11
|
+
generatedSchemaSha256: '2b3f14fa2e728f77a16385ff39f3a1d85ab255c1020498a85c1c0fb24f3d2f3c',
|
|
12
|
+
upstreamCommit: 'rust-v0.144.1',
|
|
13
13
|
featurePolicies: {
|
|
14
14
|
multiAgentMode: 'probe',
|
|
15
15
|
indexedWebSearch: 'probe',
|
|
@@ -10,8 +10,13 @@ export async function runCodex0139DoctorEnvRealProbe(input) {
|
|
|
10
10
|
return skippedCodex0139Probe('codex_cli_missing');
|
|
11
11
|
const tempDir = path.join(input.root, '.sneakoscope', 'tmp', 'codex-0139-real-probes', `doctor-${Date.now()}`);
|
|
12
12
|
await ensureDir(tempDir);
|
|
13
|
+
const isolatedHome = path.join(tempDir, 'home');
|
|
14
|
+
const isolatedCodexHome = path.join(isolatedHome, '.codex');
|
|
15
|
+
await ensureDir(isolatedCodexHome);
|
|
13
16
|
const env = {
|
|
14
17
|
...process.env,
|
|
18
|
+
HOME: isolatedHome,
|
|
19
|
+
CODEX_HOME: isolatedCodexHome,
|
|
15
20
|
EDITOR: 'vim',
|
|
16
21
|
PAGER: 'less',
|
|
17
22
|
TERM: 'xterm-256color',
|
|
@@ -48,7 +53,8 @@ export async function runCodex0139DoctorEnvRealProbe(input) {
|
|
|
48
53
|
redacted_marker_or_omitted: redactedMarkerOrOmitted,
|
|
49
54
|
redacted_sample_contains_secret: redactedText.includes('sk-test-secret-value') || redactedText.includes('test-secret-token'),
|
|
50
55
|
process_exited_successfully: processExitedSuccessfully,
|
|
51
|
-
process_warning: processExitedSuccessfully ? null : 'codex doctor returned nonzero after emitting the
|
|
56
|
+
process_warning: processExitedSuccessfully ? null : 'codex doctor returned nonzero after emitting the scoped env/redaction evidence.',
|
|
57
|
+
isolated_codex_home: true
|
|
52
58
|
},
|
|
53
59
|
blockers: ok ? [] : ['codex_doctor_env_redaction_real_probe_failed']
|
|
54
60
|
};
|