sneakoscope 8.0.3 → 8.0.4
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 +125 -36
- package/config/skills-hash-ledger.v1.json +1 -1
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/bin/fast-inline.js +0 -14
- package/dist/bin/install.js +6 -32
- package/dist/cli/args.js +0 -2
- package/dist/cli/cli-theme.js +18 -9
- package/dist/cli/command-manifest-lite.js +2 -6
- package/dist/cli/command-registry.js +2 -6
- package/dist/cli/feature-commands.js +9 -7
- package/dist/cli/install-helpers-codex-lb-chain.js +12 -8
- package/dist/cli/install-helpers-codex-lb-config.js +5 -3
- package/dist/cli/install-helpers-install-support.js +9 -6
- package/dist/cli/install-helpers.js +12 -5
- package/dist/cli/install-tool-helpers.js +2 -82
- package/dist/cli/output.js +6 -1
- package/dist/cli/router.js +101 -2
- package/dist/commands/codex-lb.js +5 -3
- package/dist/commands/doctor-profile.js +1 -1
- package/dist/commands/doctor.js +32 -109
- package/dist/commands/mad-sks.js +1 -5
- package/dist/config/skills-manifest.json +3 -2
- package/dist/core/agents/agent-codex-cockpit.js +0 -3
- package/dist/core/agents/agent-effort-policy.js +5 -5
- package/dist/core/agents/agent-janitor.js +0 -20
- package/dist/core/agents/agent-orchestrator.js +9 -56
- package/dist/core/agents/agent-output-validator.js +2 -3
- package/dist/core/agents/agent-patch-schema.js +2 -2
- package/dist/core/agents/agent-proof-evidence.js +0 -65
- package/dist/core/agents/agent-recursion-guard.js +1 -1
- package/dist/core/agents/agent-scheduler.js +327 -85
- package/dist/core/agents/agent-schema.js +1 -1
- package/dist/core/agents/agent-trust-report.js +0 -36
- package/dist/core/agents/agent-worker-pipeline.js +0 -1
- package/dist/core/agents/fast-mode-policy.js +1 -3
- package/dist/core/agents/native-cli-worker-runtime-proof.js +1 -1
- package/dist/core/agents/native-cli-worker-runtime.js +69 -647
- package/dist/core/agents/native-cli-worker.js +6 -7
- package/dist/core/agents/native-worker-backend-router.js +2 -32
- package/dist/core/agents/no-subagent-scaling-policy.js +1 -1
- package/dist/core/agents/parallel-runtime-proof.js +1 -6
- package/dist/core/agents/runtime-proof-summary.js +1 -35
- package/dist/core/architecture-hardening/contracts/contracts.js +193 -0
- package/dist/core/architecture-hardening/migration/migration.js +111 -0
- package/dist/core/architecture-hardening/state/state-service.js +155 -0
- package/dist/core/artifact-schemas.js +0 -3
- package/dist/core/codex-app/auxiliary-oauth-policy.js +36 -0
- package/dist/core/codex-app/catalog-compat/catalog-service.js +104 -0
- package/dist/core/codex-app/child-policy/child-policy.js +35 -0
- package/dist/core/codex-app/codex-app-handoff.js +0 -1
- package/dist/core/codex-app/codex-hook-lifecycle.js +1 -1
- package/dist/core/codex-app/codex-init-deep.js +1 -1
- package/dist/core/codex-app/menubar/app-bundle.js +2 -0
- package/dist/core/codex-app/menubar/constants.js +4 -0
- package/dist/core/codex-app/provider-child-policy.js +64 -0
- package/dist/core/codex-app/provider-mode.js +91 -0
- package/dist/core/codex-app/provider-operation-stages.js +20 -0
- package/dist/core/codex-app/provider-session-policy.js +85 -0
- package/dist/core/codex-app/session-policy/session-pinning.js +68 -0
- package/dist/core/codex-app.js +3 -2
- package/dist/core/codex-control/codex-control-proof.js +0 -1
- package/dist/core/codex-control/codex-task-runner.js +1 -4
- package/dist/core/codex-lb/desktop-bridge/header-policy.js +6 -0
- package/dist/core/codex-lb/desktop-bridge/http-forward.js +48 -6
- package/dist/core/codex-lb/desktop-bridge/security.js +134 -0
- package/dist/core/codex-lb/desktop-bridge/server.js +9 -3
- package/dist/core/codex-lb/desktop-bridge/state.js +26 -6
- package/dist/core/codex-lb/desktop-bridge/types.js +1 -0
- package/dist/core/codex-lb/desktop-controller.js +26 -34
- package/dist/core/codex-lb/desktop-service.js +179 -40
- package/dist/core/codex-lb/legacy-migration.js +1 -3
- package/dist/core/codex-lb/native-openai-transport/transport.js +68 -0
- package/dist/core/codex-lb/probes/cli-image-tool-probe.js +1 -1
- package/dist/core/codex-lb/provider-routing/provider-router.js +58 -0
- package/dist/core/codex-lb/routing-truth.js +4 -4
- package/dist/core/codex-native/codex-native-feature-broker.js +4 -0
- package/dist/core/codex-native/codex-native-pattern-analysis.js +1 -2
- package/dist/core/codex-native/core-skill-manifest.js +1 -1
- package/dist/core/codex-plugins/codex-plugin-json.js +26 -6
- package/dist/core/codex-plugins/codex-plugin-repair.js +32 -6
- package/dist/core/commands/basic-cli.js +2 -6
- package/dist/core/commands/computer-use-command.js +1 -1
- package/dist/core/commands/image-ux-review-command.js +16 -9
- package/dist/core/commands/install-package-command.js +105 -0
- package/dist/core/commands/intent-normalization/normalizer.js +96 -0
- package/dist/core/commands/mad-sks-command.js +23 -274
- package/dist/core/commands/mad-sks-headless.js +11 -30
- package/dist/core/commands/naruto-command.js +0 -25
- package/dist/core/commands/qa-loop-command.js +102 -22
- package/dist/core/commands/remote-command.js +2 -2
- package/dist/core/commands/research-command.js +10 -5
- package/dist/core/commands/telegram-command.js +176 -10
- package/dist/core/doctor/current-project-guidance.js +4 -3
- package/dist/core/doctor/doctor-dirty-planner.js +1 -4
- package/dist/core/doctor/doctor-readiness-matrix.js +1 -18
- package/dist/core/doctor/retired-managed-residue-private.js +3 -2
- package/dist/core/doctor/retired-managed-residue-runtime.js +2 -2
- package/dist/core/doctor/skill-legacy-surface.js +11 -10
- package/dist/core/evaluation.js +0 -19
- package/dist/core/evidence/v2/evidence-key.js +105 -0
- package/dist/core/feature-fixtures.js +4 -7
- package/dist/core/feature-registry.js +52 -21
- package/dist/core/hooks-runtime/official-subagent-lifecycle.js +0 -51
- package/dist/core/hooks-runtime/stop-finalization.js +226 -0
- package/dist/core/hooks-runtime/stop-repeat-guard.js +21 -2
- package/dist/core/hooks-runtime.js +31 -208
- package/dist/core/image/reference-evidence/reference-registry.js +145 -0
- package/dist/core/image-ux-review/imagegen-adapter.js +21 -9
- package/dist/core/image-ux-review/reference-policy/reference-policy.js +9 -0
- package/dist/core/imagegen/codex-lb-imagegen-target.js +8 -0
- package/dist/core/imagegen/imagegen-capability.js +15 -4
- package/dist/core/init.js +3 -3
- package/dist/core/install/installed-package-smoke.js +15 -3
- package/dist/core/json/canonical.js +9 -0
- package/dist/core/locks/file-lock.js +0 -1
- package/dist/core/loops/loop-continuation-enforcer.js +65 -7
- package/dist/core/loops/loop-decomposer.js +0 -1
- package/dist/core/loops/loop-gate-runner.js +65 -4
- package/dist/core/loops/loop-gate-selector.js +0 -2
- package/dist/core/loops/loop-proof-validation.js +38 -0
- package/dist/core/loops/loop-risk-classifier.js +1 -1
- package/dist/core/loops/loop-runtime.js +14 -2
- package/dist/core/loops/loop-scheduler.js +7 -2
- package/dist/core/loops/loop-worker-runtime.js +0 -15
- package/dist/core/loops/loop-worktree-runtime.js +52 -4
- package/dist/core/managed-assets/managed-assets-manifest.js +14 -14
- package/dist/core/naruto/hardware-capacity-probe.js +0 -3
- package/dist/core/naruto/naruto-active-pool.js +2 -14
- package/dist/core/naruto/naruto-concurrency-governor.js +4 -8
- package/dist/core/naruto/naruto-loop-worker-router.js +0 -2
- package/dist/core/naruto/naruto-verification-dag.js +0 -1
- package/dist/core/naruto/naruto-write-e2e.js +1 -2
- package/dist/core/naruto/resource-pressure-monitor.js +0 -4
- package/dist/core/observability/architecture-hardening/safe-projection.js +65 -0
- package/dist/core/perf/release-latency-slo.js +3 -2
- package/dist/core/preflight/parallel-preflight-engine.js +2 -15
- package/dist/core/proof/fake-real-proof-policy.js +2 -17
- package/dist/core/proof/route-proof-gate.js +2 -10
- package/dist/core/proof/route-proof-policy.js +1 -1
- package/dist/core/proof/runtime-evidence-policy.js +185 -0
- package/dist/core/proof/runtime-truth-matrix.js +64 -39
- package/dist/core/proof/validation.js +27 -11
- package/dist/core/provider/provider-context.js +18 -2
- package/dist/core/providers/openrouter/openrouter-account.js +3 -2
- package/dist/core/python-tools/python-tool-runner.js +1 -1
- package/dist/core/qa-loop/qa-execution-control.js +57 -0
- package/dist/core/questions.js +1 -1
- package/dist/core/release/extreme-parallel-scheduler.js +0 -3
- package/dist/core/release/gate-manifest.js +3 -7
- package/dist/core/release/gate-pack-manifest.js +3 -7
- package/dist/core/release/package-size-budget.js +2 -2
- package/dist/core/release/physical-release-gates.js +189 -0
- package/dist/core/release/publish-preflight.js +113 -0
- package/dist/core/release/release-gate-affected-selector.js +0 -2
- package/dist/core/release/release-gate-batch-runner.js +1 -1
- package/dist/core/release/release-gate-node.js +0 -1
- package/dist/core/release/release-gate-resource-governor.js +0 -1
- package/dist/core/release/release-pack-receipt.js +4 -6
- package/dist/core/release/release-real-contract.js +0 -6
- package/dist/core/release/resource-class-budget.js +0 -1
- package/dist/core/release/stage-publish.js +178 -36
- package/dist/core/research/research-adversarial-review.js +103 -9
- package/dist/core/research.js +1 -1
- package/dist/core/retention.js +0 -1
- package/dist/core/routes/constants.js +1 -1
- package/dist/core/routes/diagnostic-allowlist.js +0 -1
- package/dist/core/routes/dollar-manifest-lite.js +1 -1
- package/dist/core/routes.js +45 -14
- package/dist/core/runtime/execution-control.js +226 -0
- package/dist/core/runtime/progress-recovery/progress-recovery.js +89 -0
- package/dist/core/runtime/task-profile.js +10 -4
- package/dist/core/runtime/verification-budget.js +10 -1
- package/dist/core/safety/intent-contract/intent-contract.js +94 -0
- package/dist/core/safety/mutation-guard.js +0 -2
- package/dist/core/safety/mutation-ledger.js +0 -2
- package/dist/core/safety/requested-scope-contract.js +0 -0
- package/dist/core/search-visibility/discovery.js +1 -1
- package/dist/core/search-visibility/index.js +12 -0
- package/dist/core/search-visibility/verifier.js +112 -3
- package/dist/core/session/project-namespace.js +0 -5
- package/dist/core/skills/skill-agent-metadata.js +1 -3
- package/dist/core/strategy/adhd-orchestrating-gate.js +0 -1
- package/dist/core/subagents/agent-catalog.js +2 -2
- package/dist/core/subagents/model-policy.js +65 -24
- package/dist/core/subagents/naruto-help-contract.js +3 -3
- package/dist/core/subagents/naruto-host-credentials.js +13 -0
- package/dist/core/subagents/official-subagent-preparation.js +1 -1
- package/dist/core/subagents/official-subagent-prompt.js +3 -3
- package/dist/core/subagents/role-model-preferences.js +1 -1
- package/dist/core/telegram/access.js +5 -1
- package/dist/core/telegram/client.js +13 -0
- package/dist/core/telegram/doctor.js +3 -0
- package/dist/core/telegram/keychain.js +100 -48
- package/dist/core/telegram/liveness.js +9 -0
- package/dist/core/telegram/state-lock.js +416 -0
- package/dist/core/text/strings.js +3 -0
- package/dist/core/triwiki/context-graph/store/evidence-write-lock.js +29 -0
- package/dist/core/triwiki/context-graph/store/fragment-cache.js +24 -0
- package/dist/core/triwiki/context-graph/store/snapshot-store.js +69 -21
- package/dist/core/triwiki/triwiki-gate-impact-map.js +2 -2
- package/dist/core/triwiki/triwiki-module-card.js +1 -2
- package/dist/core/update/installed-cli-resolution.js +170 -0
- package/dist/core/update/update-migration-state.js +25 -11
- package/dist/core/update-check.js +140 -68
- package/dist/core/version.js +1 -1
- package/dist/native/sks-menubar/Sources/AppDelegate.swift +8 -3
- package/dist/native/sks-menubar/Sources/ControlCenterWindowController.swift +6 -2
- package/dist/native/sks-menubar/Sources/OperationCoordinator.swift +156 -90
- package/dist/native/sks-menubar/Sources/OperationModels.swift +389 -0
- package/dist/native/sks-menubar/Sources/OverviewViewController.swift +57 -0
- package/dist/native/sks-menubar/Sources/ProcessClient.swift +3 -1
- package/dist/native/sks-menubar/Sources/ProvidersMultiProvider.swift +3 -0
- package/dist/native/sks-menubar/Sources/ProvidersOpenRouter.swift +58 -17
- package/dist/native/sks-menubar/Sources/ProvidersReliability.swift +302 -0
- package/dist/native/sks-menubar/Sources/ProvidersRoleModels.swift +5 -0
- package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +65 -74
- package/dist/native/sks-menubar/Sources/RemoteCodingViewController.swift +462 -26
- package/dist/native/sks-menubar/Sources/SKSKeychainStore.swift +344 -0
- package/dist/native/sks-menubar/Sources/SecureProcessEnvelope.swift +27 -0
- package/dist/native/sks-menubar/Sources/StatusItemController.swift +10 -2
- package/dist/native/sks-menubar/Sources/TelegramPrivateFileStore.swift +192 -14
- package/dist/native/sks-menubar/Sources/TelegramPrivateFileSupport.swift +3 -70
- package/dist/native/sks-menubar/Sources/TelegramProcessGateway.swift +241 -25
- package/dist/native/sks-menubar/Sources/TelegramStateLock.swift +448 -0
- package/dist/native/sks-menubar/Sources/TelegramSupport.swift +131 -0
- package/dist/native/sks-menubar/Sources/TelegramTransport.swift +131 -106
- package/dist/scripts/all-feature-deep-completion-check.js +5 -1
- package/dist/scripts/check-publish-tag.js +56 -0
- package/dist/scripts/codex-lb-fast-mode-truth-check.js +9 -2
- package/dist/scripts/codex-lb-fast-ui-preservation-check.js +11 -2
- package/dist/scripts/codex-lb-gpt56-fast-profile-check.js +4 -2
- package/dist/scripts/codex-native-agent-role-content-check.js +3 -3
- package/dist/scripts/codex-native-gate-lib.js +14 -7
- package/dist/scripts/current-command-surface-check.js +5 -3
- package/dist/scripts/current-surface-update-e2e-check.js +4 -3
- package/dist/scripts/current-upgrade-matrix-check.js +5 -24
- package/dist/scripts/docs-truthfulness-check.js +17 -13
- package/dist/scripts/gate-lib.js +0 -2
- package/dist/scripts/gate-policy-audit-check.js +3 -2
- package/dist/scripts/harness-benchmark-check.js +1 -1
- package/dist/scripts/init-deep-backup-retention-check.js +1 -1
- package/dist/scripts/lib/codex-sdk-gate-lib.js +1 -2
- package/dist/scripts/loop-directive-check-lib.js +28 -38
- package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +14 -180
- package/dist/scripts/mad-sks-launch-sql-plane-boundary-check.js +2 -11
- package/dist/scripts/prepublish-release-check-or-fast.js +32 -0
- package/dist/scripts/publish-preflight.js +12 -0
- package/dist/scripts/release-affected-selector-check.js +2 -2
- package/dist/scripts/release-gate-batch-runner-check.js +2 -2
- package/dist/scripts/release-metadata-check.js +8 -12
- package/dist/scripts/release-real-check.js +2 -54
- package/dist/scripts/runtime-domain-gate-lib.js +2 -96
- package/dist/scripts/runtime-proof-summary-check.js +2 -6
- package/dist/scripts/search-visibility-gate-lib.js +0 -1
- package/dist/scripts/sks-cli-gate-lib.js +1 -1
- package/dist/scripts/typed-routing-gate-lib.js +7 -59
- package/docs/demo.tape +1 -1
- package/infra-harness-gates.json +1 -1456
- package/package.json +10 -7
- package/release-gates.v2.json +0 -1
- package/schemas/agents/parallel-runtime-proof.schema.json +0 -2
- package/schemas/codex/agent-result.schema.json +0 -6
- package/schemas/naruto/naruto-concurrency-governor.schema.json +1 -3
- package/schemas/release/release-gate-node.schema.json +1 -1
- package/dist/commands/zellij-lane.js +0 -22
- package/dist/commands/zellij-monitor-pane.js +0 -26
- package/dist/commands/zellij-slot-column-anchor.js +0 -22
- package/dist/commands/zellij-slot-pane.js +0 -80
- package/dist/commands/zellij-viewport-pane.js +0 -57
- package/dist/commands/zellij.js +0 -422
- package/dist/core/agents/agent-runner-zellij.js +0 -164
- package/dist/core/agents/agent-slot-pane-binding-proof.js +0 -96
- package/dist/core/agents/parallel-write-fixture.js +0 -305
- package/dist/core/agents/worker-pane-communication-contract.js +0 -100
- package/dist/core/agents/zellij-lane-supervisor.js +0 -428
- package/dist/core/agents/zellij-right-lane-cockpit.js +0 -66
- package/dist/core/doctor/doctor-zellij-repair.js +0 -40
- package/dist/core/ops/upgrade-migration-fixtures.js +0 -119
- package/dist/core/proof/route-finalizer-fixtures.js +0 -21
- package/dist/core/zellij/homebrew-policy.js +0 -43
- package/dist/core/zellij/zellij-capability.js +0 -126
- package/dist/core/zellij/zellij-clipboard-config.js +0 -52
- package/dist/core/zellij/zellij-command.js +0 -149
- package/dist/core/zellij/zellij-fake-adapter.js +0 -186
- package/dist/core/zellij/zellij-lane-renderer.js +0 -706
- package/dist/core/zellij/zellij-lane-runtime.js +0 -189
- package/dist/core/zellij/zellij-launcher.js +0 -287
- package/dist/core/zellij/zellij-layout-builder.js +0 -191
- package/dist/core/zellij/zellij-monitor-renderer.js +0 -52
- package/dist/core/zellij/zellij-official-subagent-activity.js +0 -526
- package/dist/core/zellij/zellij-official-subagent-telemetry.js +0 -258
- package/dist/core/zellij/zellij-pane-proof.js +0 -226
- package/dist/core/zellij/zellij-right-column-manager.js +0 -308
- package/dist/core/zellij/zellij-screen-proof.js +0 -120
- package/dist/core/zellij/zellij-self-heal-types.js +0 -44
- package/dist/core/zellij/zellij-self-heal.js +0 -408
- package/dist/core/zellij/zellij-slot-column-anchor.js +0 -304
- package/dist/core/zellij/zellij-slot-pane-renderer.js +0 -521
- package/dist/core/zellij/zellij-slot-telemetry.js +0 -384
- package/dist/core/zellij/zellij-theme.js +0 -66
- package/dist/core/zellij/zellij-ui-mode.js +0 -34
- package/dist/core/zellij/zellij-update.js +0 -348
- package/dist/core/zellij/zellij-viewport-binder.js +0 -61
- package/dist/core/zellij/zellij-worker-pane-manager.js +0 -881
- package/dist/core/zellij/zellij-worker-pane-summary.js +0 -64
- package/dist/native/sks-menubar/Tests/AppRuntimeTestSupport.swift +0 -26
- package/dist/native/sks-menubar/Tests/OperationCoordinatorTests.swift +0 -175
- package/dist/native/sks-menubar/Tests/ProcessClientTests.swift +0 -20
- package/dist/native/sks-menubar/Tests/ProvidersViewControllerTests.swift +0 -271
- package/dist/native/sks-menubar/Tests/SingletonInstanceGuardTests.swift +0 -183
- package/dist/native/sks-menubar/Tests/TelegramRuntimeSmokeTests.swift +0 -267
- package/dist/native/sks-menubar/Tests/TelegramRuntimeTests.swift +0 -222
- package/dist/scripts/zellij-pane-proof-check.js +0 -88
- package/dist/scripts/zellij-real-session-cleanup-check.js +0 -139
- package/dist/scripts/zellij-real-session-launch-check.js +0 -126
- package/dist/scripts/zellij-screen-proof-check.js +0 -43
- package/schemas/zellij/zellij-right-column-state.schema.json +0 -40
- package/schemas/zellij/zellij-slot-telemetry.schema.json +0 -89
- package/schemas/zellij/zellij-worker-pane.schema.json +0 -53
- package/scripts/build-clean-atomic.mjs +0 -323
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ Proof-first orchestration for Codex CLI, ChatGPT Desktop, AI coding agents, mult
|
|
|
22
22
|
Sneakoscope Codex (`sks`) is an open-source trust layer for Codex CLI and ChatGPT Desktop. It coordinates bounded AI coding agents, records machine-verifiable evidence, preserves project memory, and blocks release claims that are not supported by current tests or artifacts. Search visibility outcomes are measured separately; SKS does not promise rankings or traffic.
|
|
23
23
|
<!-- END SKS SEARCH VISIBILITY MARKETING -->
|
|
24
24
|
|
|
25
|
-
This README documents package **SKS 8.0.
|
|
25
|
+
This README documents package **SKS 8.0.4** — its own identity, read from `package.json` and subject to release-gate verification, not advice about what to install.
|
|
26
26
|
|
|
27
27
|
Use the official latest stable SKS and Codex CLI releases. SKS stays version-agnostic: older hosts keep working where capabilities allow, while Menu Bar / Center induce updates to the latest stable build. Run `sks update-check` for what is installed and read the capability report for what is actually supported — feature availability is decided by capability probes, not by a version number printed in a document. It resolves managed SKS skills from the authoritative global install, preserves a runnable Naruto child slot when `max_threads=2`, and keeps Menu Bar repair transactional so stamped generations remain verifiable. Naruto uses stable opt-in multi-agent V2 when the host exposes it. Local code search is mode-separated (`sks search files|text|structure|symbol|context`); `context` is answered by the compiled TriWiki Context Graph with evidence paths rather than lexical guessing — see [docs/architecture/context-graph.md](docs/architecture/context-graph.md) and [docs/architecture/search-engine-target.md](docs/architecture/search-engine-target.md). See [CHANGELOG.md](CHANGELOG.md).
|
|
28
28
|
|
|
@@ -32,7 +32,7 @@ Use the official latest stable SKS and Codex CLI releases. SKS stays version-agn
|
|
|
32
32
|
| --- | --- |
|
|
33
33
|
| Overview mixed Menu Bar, installed SKS, and cached registry versions | Each value is labeled by authority, stale or unavailable probes remain explicit, and Refresh forces a bounded update-status refresh. |
|
|
34
34
|
| Naruto stopped creating children after its first wave | The root parent records settled waves, recovers open-thread capacity, rescans the ready DAG, and can launch later direct-child waves under the same workflow run. |
|
|
35
|
-
| Most delegated work drifted to Sol Max | Read-heavy discovery uses Terra
|
|
35
|
+
| Most delegated work drifted to Sol Max | Read-heavy discovery uses Terra Max, ordinary implementation uses Sol High, and Sol Max is reserved for focused high-risk or final judgment slices. |
|
|
36
36
|
| Goal creation started a second SKS-owned mission and loop | Codex native Goal is the only persisted owner; create/edit objectives are detailed and bounded, while SKS writes no Goal state or fallback loop. |
|
|
37
37
|
| Global instructions accumulated duplicated route rules and forced synthetic tests | One Core Engineering Directive anchors all work, route-specific details stay with their route, and verification targets normal behavior, meaningful boundaries, and plausible failures. |
|
|
38
38
|
| GUI-launched status commands could hang or contaminate real update state during tests | Menu Bar commands use a safe HOME cwd, closed stdin, and timeouts; update fixtures use isolated HOME and cache paths. |
|
|
@@ -40,10 +40,10 @@ Use the official latest stable SKS and Codex CLI releases. SKS stays version-agn
|
|
|
40
40
|
## Install In One Command
|
|
41
41
|
|
|
42
42
|
```sh
|
|
43
|
-
|
|
43
|
+
npm exec --yes --package=sneakoscope@latest -- sneakoscope install --yes
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
The explicit `@latest` tag prevents a local package or stale npx cache from silently choosing an older installer. The installer verifies the registry tag, installs the exact version carried by that package, runs the exact installed entrypoint's `doctor --fix`, and succeeds only when the first `sks` on `PATH` targets that entrypoint and reports the same version. An older or same-version shadow prefix that still wins is reported as a blocker with a recoverable prior-version command. The plugin marketplace path is also prepared through `plugins/sks/.codex-plugin/plugin.json`.
|
|
47
47
|
|
|
48
48
|
For package-managed installs:
|
|
49
49
|
|
|
@@ -54,34 +54,124 @@ commands. To intentionally run the legacy bootstrap during installation, set
|
|
|
54
54
|
stronger safety override.
|
|
55
55
|
|
|
56
56
|
```sh
|
|
57
|
-
npm
|
|
58
|
-
sks bootstrap --yes
|
|
59
|
-
sks doctor --fix
|
|
57
|
+
npm install --global sneakoscope@latest
|
|
58
|
+
node "$(npm root --global)/sneakoscope/dist/bin/sks.js" bootstrap --yes
|
|
59
|
+
node "$(npm root --global)/sneakoscope/dist/bin/sks.js" doctor --fix
|
|
60
|
+
sks --version
|
|
60
61
|
```
|
|
61
62
|
|
|
63
|
+
The two setup calls intentionally use the entrypoint under the npm global root.
|
|
64
|
+
The final `sks --version` must report that same package version; if it does not,
|
|
65
|
+
an older prefix still precedes the new npm bin directory on `PATH`.
|
|
66
|
+
|
|
62
67
|
The SKS menu bar shows the installed Codex CLI version and latest known version. An `⬆` marker appears when an update is available; **Update Codex CLI Now** uses native `codex update` when the selected CLI advertises it, otherwise it verifies the installation provenance and invokes the matching official standalone-installer, npm-global, or Homebrew-cask update method. If the method cannot be verified, it fails closed instead of guessing. Control Center updates keep the active UI alive until the operation receipt is durable, then relaunch the companion out of process. This is an explicit global tool mutation. **Run sks doctor --fix** performs the global-only menu repair flow without treating the user's home directory as a project.
|
|
63
68
|
|
|
64
69
|
**Manage MCP Servers…** opens a native macOS manager for the global `~/.codex/config.toml`. It can add remote URL or local stdio servers, enable/disable existing entries, remove entries after confirmation, and refresh the current state. Mutations are lock-protected, backed up, TOML-validated, and written with mode `0600`; configured environment values and command arguments are never rendered in the list. Changes apply to new Codex sessions. The same plumbing is available through the canonical `sks mcp config list|get|add|edit|duplicate|enable|disable|remove|test|login|logout|backups|restore` surface for diagnostics and automation.
|
|
65
70
|
|
|
66
|
-
### Remote
|
|
67
|
-
|
|
68
|
-
SKS 8.0.
|
|
69
|
-
typed remote-control contract.
|
|
70
|
-
the
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
71
|
+
### Remote control: Telegram BotFather integration
|
|
72
|
+
|
|
73
|
+
SKS 8.0.4 provides a first-party Telegram Bot API transport for the existing
|
|
74
|
+
typed remote-control contract. A bounded outbound `getUpdates` loop runs only
|
|
75
|
+
inside the resident Menu Bar process: it opens no inbound port, tunnel, daemon,
|
|
76
|
+
or public webhook.
|
|
77
|
+
|
|
78
|
+
#### BotFather setup
|
|
79
|
+
|
|
80
|
+
1. In Telegram, open **@BotFather**, send `/newbot`, and complete its name and
|
|
81
|
+
username prompts. BotFather returns the bot token. The token authorizes the
|
|
82
|
+
bot against the Bot API; treat it like a password. Do not place it in a
|
|
83
|
+
shell command, config file, commit, issue, or screenshot.
|
|
84
|
+
2. On the Mac that runs SKS, open **SKS Center → Remote Coding**, choose
|
|
85
|
+
**Enter Bot Token…**, and paste the token into the native secure-input
|
|
86
|
+
sheet. SKS verifies `getMe` and the bot's webhook state before it stores
|
|
87
|
+
anything. If a webhook is active, the token is not retained and Center asks
|
|
88
|
+
for explicit consent before removing that webhook without dropping pending
|
|
89
|
+
updates.
|
|
90
|
+
|
|
91
|
+
For a terminal-only setup, use a no-echo `zsh` prompt and pipe the token on
|
|
92
|
+
standard input; direct interactive TTY input is intentionally rejected:
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
IFS= read -r -s "sks_telegram_token?BotFather token: "
|
|
96
|
+
printf '\n'
|
|
97
|
+
printf '%s\n' "$sks_telegram_token" | sks telegram setup --token-stdin
|
|
98
|
+
unset sks_telegram_token
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
If that command reports an existing webhook, review the delivery change and
|
|
102
|
+
repeat the same no-echo flow with `--remove-webhook`. This is explicit
|
|
103
|
+
consent to stop the old webhook endpoint; SKS always requests
|
|
104
|
+
`drop_pending_updates=false`. The token travels only on standard input, is
|
|
105
|
+
verified with Telegram before storage, is never printed, and is stored in
|
|
106
|
+
the owner-only user secret file. A token supplied by `TELEGRAM_BOT_TOKEN` or
|
|
107
|
+
`SKS_TELEGRAM_BOT_TOKEN` is also supported for an operator-managed runtime,
|
|
108
|
+
but environment values can be exposed to other local processes and are not
|
|
109
|
+
the recommended setup path. SKS Center restarts its resident poller after a
|
|
110
|
+
successful save; if that restart reports a blocker, resolve it before
|
|
111
|
+
generating or sending a pairing code.
|
|
112
|
+
3. For terminal-only setup, restart the resident Menu Bar process immediately
|
|
113
|
+
after setup (and after any webhook removal or token rotation). The poller
|
|
114
|
+
must be running before it can consume and confirm `/start`:
|
|
115
|
+
|
|
116
|
+
```sh
|
|
117
|
+
sks menubar restart
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
There is deliberately no `sks telegram start` or `sks telegram stop`:
|
|
121
|
+
Telegram is not a separate daemon. SKS Center exposes **Start**, **Stop**,
|
|
122
|
+
and **Restart** for the poller owned by the current resident Menu Bar
|
|
123
|
+
process. **Stop** preserves the token and pairings and lasts only until that
|
|
124
|
+
companion is relaunched. To keep Telegram stopped across relaunches, stop or
|
|
125
|
+
uninstall the entire Menu Bar companion; that also disables its other
|
|
126
|
+
resident features.
|
|
127
|
+
4. Issue a short-lived pairing code with `sks telegram pair`:
|
|
128
|
+
|
|
129
|
+
```sh
|
|
130
|
+
sks telegram pair --json
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
From the one intended **private** chat, send the returned
|
|
134
|
+
`/start <pairing-code>` message to the bot before it expires. Only that
|
|
135
|
+
private chat/user pair is enrolled. Unpaired chats receive no reply.
|
|
136
|
+
5. After the bot confirms pairing, send a typed command such as:
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
/sks status {}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
The command grammar is `/sks <command> <JSON object>`; the JSON object may
|
|
143
|
+
be omitted when the command needs no options. The allowlist is `gates`,
|
|
144
|
+
`paths`, `pipeline`, `proof`, `search`, `stats`, `status`, `stop-gate`,
|
|
145
|
+
`trust`, `update-check`, and `validate-artifacts`. If SKS replies with a
|
|
146
|
+
short-lived confirmation nonce, send the exact `/confirm <nonce>` message
|
|
147
|
+
once before it expires. Arbitrary prose and free-form shell commands are not
|
|
148
|
+
executed.
|
|
149
|
+
6. Confirm runtime evidence:
|
|
150
|
+
|
|
151
|
+
```sh
|
|
152
|
+
sks telegram status --json
|
|
153
|
+
sks telegram doctor --json
|
|
154
|
+
sks doctor
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
`status` reads the secret-free liveness receipt. `telegram doctor` evaluates
|
|
158
|
+
token presence, the bot identity, pairing, audit health, poller state, and
|
|
159
|
+
liveness. A ready result requires a real `getMe` check, a paired private
|
|
160
|
+
chat, and a running poller; a configured token alone is not readiness.
|
|
161
|
+
|
|
162
|
+
The transport accepts only allowlisted typed commands. It never accepts
|
|
163
|
+
free-form shell input; higher-risk commands require actor-bound two-step
|
|
164
|
+
confirmation and an audit receipt. Telegram long polling and a webhook cannot
|
|
165
|
+
be active together. If Doctor reports a webhook/409 conflict, enter the token
|
|
166
|
+
again in SKS Center and approve webhook removal, or repeat the no-echo CLI
|
|
167
|
+
setup with `--remove-webhook`, then restart the poller. SKS never drops pending
|
|
168
|
+
updates during that transition.
|
|
169
|
+
|
|
170
|
+
If a token may have leaked, revoke/regenerate it in BotFather, enter the
|
|
171
|
+
replacement through SKS Center (or the no-echo CLI flow), and restart the
|
|
172
|
+
poller. Token rotation and BotFather credential changes are external actions;
|
|
173
|
+
SKS does not publish packages, revoke tokens, or make any other irreversible
|
|
174
|
+
remote change on the operator's behalf.
|
|
85
175
|
|
|
86
176
|
## The Front Door
|
|
87
177
|
|
|
@@ -93,11 +183,11 @@ or Tailscale path. See [the Orca remote-coding guide](docs/orca-remote-coding.md
|
|
|
93
183
|
| `$sks-mad-sks` / `sks mad-sks` | Single high-risk MAD route for scoped permission widening plus SQL-plane execution, including read-back proof and profile closure. |
|
|
94
184
|
| `$sks-review` / `sks review --staged` | Reviews diffs with `evidence: machine` findings sorted above `evidence: llm`. |
|
|
95
185
|
|
|
96
|
-
`sks --mad` now prioritizes the interactive ready path: independent macOS config probes run concurrently, failed read-only preflight does not repeat mutation-capable repair inspection, verified
|
|
186
|
+
`sks --mad` now prioritizes the interactive ready path: independent macOS config probes run concurrently, failed read-only preflight does not repeat mutation-capable repair inspection, and verified Codex evidence is reused. Existing unreadable or malformed config still blocks safely; pass an explicit repair flag such as `--repair-config` when repair is intended.
|
|
97
187
|
|
|
98
188
|
## Naruto Workflow
|
|
99
189
|
|
|
100
|
-
`$sks-naruto` and `sks naruto run "task" --agents 8 --max-threads 12` use Codex official subagents. Standalone and Codex App tasks that request project-host database, spreadsheet, or render tools require the non-persistent `--trusted-project` flag after the operator reviews the checkout; an App session ID scopes evidence but does not grant trust. The parent is GPT-5.6 Sol Max. Tiny mechanical `worker` slices use Luna Max; ordinary UI, logic, backend, and native coding uses Sol High; review, testing, debugging, architecture, integration, security, database, research, release, and other judgment-sensitive work uses Sol Max; long-context scans and direct Computer Use, Browser/Chrome, or image-generation execution
|
|
190
|
+
`$sks-naruto` and `sks naruto run "task" --agents 8 --max-threads 12` use Codex official subagents. Standalone and Codex App tasks that request project-host database, spreadsheet, or render tools require the non-persistent `--trusted-project` flag after the operator reviews the checkout; an App session ID scopes evidence but does not grant trust. The parent is GPT-5.6 Sol Max. Tiny mechanical `worker` slices—including clear simple code, configuration, and setup changes—use Luna Max; ordinary UI, logic, backend, and native coding uses Sol High; review, testing, debugging, architecture, integration, security, database, research, release, and other judgment-sensitive work uses Sol Max; long-context scans, long-term memory, large-scale first-draft code processing, and direct Computer Use, Browser/Chrome, or image-generation execution use Terra Max. Mixed execution/judgment work is split when possible, and unsplittable judgment defaults to Sol Max.
|
|
101
191
|
|
|
102
192
|
Fresh SKS-owned project config enables Codex 0.145+ multi-agent V2 with `agents.max_concurrent_threads_per_session = 256`, `features.multi_agent_v2.max_concurrent_threads_per_session = 257`, `max_depth = 1`, and `interrupt_message = true`. Nested delegation remains forbidden. Explicit user-owned limits are preserved, while legacy SKS-owned 12/13 defaults migrate to 256/257.
|
|
103
193
|
|
|
@@ -123,7 +213,7 @@ Gates are task-profile aware: greetings and answer-only turns create no mission
|
|
|
123
213
|
|
|
124
214
|
Every installed Codex hook runs one common Naruto decision gate. The gate records `none`, `generic_naruto`, or `route_owned`: Answer, DFix, Wiki, Computer Use, Goal, and simple Git/control turns stay lightweight; ordinary non-trivial work defaults to two independent official subagents; critical work spanning at least three risk domains may use three. Research, AutoResearch, and QA-Loop retain their own exact orchestration contracts instead of receiving a second generic fan-out. Explicit `--agents N` remains authoritative.
|
|
125
215
|
|
|
126
|
-
SKS installs twenty-five narrow project custom agents, including native AppKit, toolchain, protocol, runtime-reliability, TriWiki-evidence, long-context, Computer Use, Browser/Chrome, and image-generation specialists. Delegation prompts inject at most the three roles recommended for the current goal rather than serializing the full catalog, so expanding role coverage does not serialize the full inventory into every prompt. TriWiki context is also bounded and query-aware: ordinary work receives up to four trust/hydration anchors and complex, parallel, or high-risk work receives up to six, with source hydration required before relying on lower-trust hints.
|
|
216
|
+
SKS installs twenty-five narrow project custom agents, including native AppKit, toolchain, protocol, runtime-reliability, TriWiki-evidence, long-context, Computer Use, Browser/Chrome, and image-generation specialists. Delegation prompts inject at most the three roles recommended for the current goal rather than serializing the full catalog, so expanding role coverage does not serialize the full inventory into every prompt. TriWiki context is also bounded and query-aware: ordinary work receives up to four trust/hydration anchors and complex, parallel, or high-risk work receives up to six, with source hydration required before relying on lower-trust hints. Official event evidence and the parent verdict—not display state—determine completion.
|
|
127
217
|
|
|
128
218
|
Official subagent requests use `--agents`; removed scheduler, pool, backend, and model flags fail closed.
|
|
129
219
|
|
|
@@ -146,13 +236,13 @@ sks naruto run "task" \
|
|
|
146
236
|
| Which provider block | `--model-provider=<name>` | `SKS_NARUTO_MODEL_PROVIDER` | Names a `[model_providers.<name>]` block. Host mode only |
|
|
147
237
|
| Which credential variable | `--provider-env-key=<NAME>` | `SKS_NARUTO_PROVIDER_ENV_KEY` | Forwards exactly that variable to the child so the block's `env_key` resolves. Host mode only |
|
|
148
238
|
| Release the login only | `--no-forced-login-method` | `SKS_NARUTO_FORCED_LOGIN_METHOD=none` | Keeps the SKS provider, drops the forced ChatGPT login |
|
|
149
|
-
| Parent model / effort | `--parent-model`, `--parent-effort` | `SKS_NARUTO_PARENT_MODEL`, `SKS_NARUTO_PARENT_EFFORT` | Overrides the built-in parent policy |
|
|
150
|
-
| Subagent model / effort | `--subagent-model`, `--subagent-effort` | `SKS_NARUTO_SUBAGENT_MODEL`, `SKS_NARUTO_SUBAGENT_EFFORT` | Overrides the default subagent policy |
|
|
239
|
+
| Parent model / effort | `--parent-model`, `--parent-effort` | `SKS_NARUTO_PARENT_MODEL`, `SKS_NARUTO_PARENT_EFFORT` | Overrides the built-in parent policy; GPT-5.6 parents remain Sol/Terra/Luna Max-only as applicable |
|
|
240
|
+
| Subagent model / effort | `--subagent-model`, `--subagent-effort` | `SKS_NARUTO_SUBAGENT_MODEL`, `SKS_NARUTO_SUBAGENT_EFFORT` | Overrides the default subagent policy; GPT-5.6 Luna/Terra require Max and Sol requires High or Max |
|
|
151
241
|
|
|
152
242
|
Guarantees this contract makes:
|
|
153
243
|
|
|
154
244
|
- **SKS never reads, stores, forwards to a third party, or logs your credential.** It forwards one named environment variable to the Codex child and records only that variable's *name* in receipts. Values of secret-shaped variables are redacted from captured output.
|
|
155
|
-
- **A malformed value blocks the run.** An unknown auth mode, a provider name with a space, an effort tier that is not `minimal|low|medium|high|max`, or a `--provider-env-key` that is absent from the environment all fail before mission state is written. SKS never quietly falls back to its own credential — that surprise is the failure mode this contract exists to prevent.
|
|
245
|
+
- **A malformed or policy-invalid value blocks the run.** An unknown auth mode, a provider name with a space, an effort tier that is not `minimal|low|medium|high|max`, a GPT-5.6 Luna/Terra effort other than Max, or a `--provider-env-key` that is absent from the environment all fail before mission state is written. SKS never quietly falls back to its own credential — that surprise is the failure mode this contract exists to prevent.
|
|
156
246
|
- **Mixed configurations are refused.** Naming a provider while SKS still forces a ChatGPT login would authenticate one way and bill another, so it is a blocker rather than a silent precedence rule.
|
|
157
247
|
- **The default is unchanged.** Managed mode still pins the ChatGPT login, and the real-credential smoke gate still proves it.
|
|
158
248
|
|
|
@@ -237,7 +327,7 @@ Adapter rules that keep updates safe:
|
|
|
237
327
|
| Did tests/typecheck fail? | Another model may say so. | Machine check output is tagged `evidence: machine`. |
|
|
238
328
|
| Are findings ranked? | Usually one blended opinion. | Machine evidence sorts before LLM findings. |
|
|
239
329
|
| Can work stop? | The model decides. | Stop gates, Completion Proof, and Honest Mode decide. |
|
|
240
|
-
| Can I inspect agent-thread progress? | Usually no runtime UI. | Use the official Codex subagent/thread surfaces and
|
|
330
|
+
| Can I inspect agent-thread progress? | Usually no runtime UI. | Use the official Codex subagent/thread surfaces and their proof artifacts. |
|
|
241
331
|
|
|
242
332
|
## Demo
|
|
243
333
|
|
|
@@ -259,8 +349,8 @@ It shows the current quickstart flow: one-line install, `$sks-plan`, `sks review
|
|
|
259
349
|
- Native capability repair: `sks doctor --fix` (imagegen/Computer Use/Browser Use), `.sneakoscope/reports/native-capability-readiness.json`
|
|
260
350
|
- codex-lb continuity: `sks codex-lb status --json` verifies the selected proxy's unauthenticated `/health` `X-App-Version`. Tool-heavy continuation requires a codex-lb deployment that reports the capability; use the official latest stable release. Older or unverified deployments block setup, doctor, and launch instead of silently falling back. A selected route is green only after one measured request records the destination host, gateway-key authentication class, measurement time, and latency; config presence alone is not routing proof.
|
|
261
351
|
- Agent bridge for any agent system: `sks mcp-server`, `sks agent-bridge setup`, `SKS_AGENT_MODE=1` — see [docs/AGENT-BRIDGE.md](docs/AGENT-BRIDGE.md)
|
|
262
|
-
- Release gates: `npm run release:check:affected` for ordinary change-aware verification and `npm run release:check:confidence` for the final local confidence pass. Evidence for the 8.0.
|
|
263
|
-
- Release preparation: typecheck, one clean build, focused tests, affected/confidence gates, then `npm publish --dry-run --json --registry https://registry.npmjs.org/ --tag latest --access public`. The dry-run does not publish;
|
|
352
|
+
- Release gates: `npm run release:check:affected` for ordinary change-aware verification and `npm run release:check:confidence` for the final local confidence pass. Evidence for the 8.0.4 physical checklist includes a successful old-install-to-8.0.4 resolved-CLI upgrade, a 5,001-directory update scan, exactly one running Menu Bar process at the current package version, one measured real codex-lb request to the selected remote host, and one Telegram command/reply E2E over cellular.
|
|
353
|
+
- Release preparation: typecheck, one clean build, focused tests, affected/confidence gates, all four source-bound physical receipts, then `npm publish --dry-run --json --registry https://registry.npmjs.org/ --tag latest --access public`. The dry-run does not publish or require release tags; real staging/publication remains a separate authenticated maintainer workflow.
|
|
264
354
|
- Release readiness notes: [docs/release-readiness.md](docs/release-readiness.md) and [CHANGELOG.md](CHANGELOG.md)
|
|
265
355
|
- Image generation review routes require Codex App `$imagegen`/`gpt-image-2` evidence with recorded output hashes; direct API fallback and mock fixtures do not satisfy full route gates.
|
|
266
356
|
|
|
@@ -287,7 +377,6 @@ It shows the current quickstart flow: one-line install, `$sks-plan`, `sks review
|
|
|
287
377
|
- The menu displays the installed Codex CLI version, adds an `⬆` status icon when `sks codex update-status` sees a newer release, runs the official self-updater through `Update Codex CLI Now`, and exposes `Run sks doctor --fix` as a background repair action.
|
|
288
378
|
- **Codex Fast** is labeled as the official 1.5× Codex speed option, with a verified service-tier status row and direct On/Off actions. Center explains that ChatGPT-sign-in GPT-5.6/GPT-5.5 use 2.5× Standard credits and GPT-5.4 uses 2×, while API-key token pricing and API Priority processing are separate. Model selection, Codex-Spark, and reasoning effort remain independent; status failures render as unavailable with neither choice falsely selected.
|
|
289
379
|
- If Codex shows `[No tool output found for custom tool call ...]`, SKS blocks reuse of that structurally ambiguous thread. Upgrade codex-lb or run `sks codex-lb disable`, inspect possible side effects, then continue the persisted mission in a fresh Codex task. SKS never rewrites session JSONL or fabricates a successful tool output.
|
|
290
|
-
- Zellij optional but recommended for terminal worker panes
|
|
291
380
|
|
|
292
381
|
## License
|
|
293
382
|
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
{ "canonical_name": "sks-init-deep", "trusted_sha256": ["a679fa4ba36e070de5753994f58595c4352302cc98d868ba70ff98305d15f451"] },
|
|
39
39
|
{ "canonical_name": "sks-loop", "trusted_sha256": ["e56f9c4d0f7227961779daf6806943f1926bb588ce21a965a813e8ad91cfd5c8"] },
|
|
40
40
|
{ "canonical_name": "sks-mad-sks", "trusted_sha256": ["03fb5063d19c3d48d004cd8e6e39bfe244016d7edacfe99e5dab087cbbfa6db9", "a3d0110ca97576130893311b3267621acb02c16ca9aea4b2da3e5300eea58158"] },
|
|
41
|
-
{ "canonical_name": "sks-naruto", "trusted_sha256": ["34222c72e4e1ead3584907f4d905444b7de820283ee7348018f110d5e6b04461", "f8e808622e222b4ad7dcb2907e5f06a890db83139ae443ec6c8c33781dfa3e37", "49b5e3dcc1b537b49c2cf09e5b875cb16acb05c622b22798e265e64dacd8ac90"] },
|
|
41
|
+
{ "canonical_name": "sks-naruto", "trusted_sha256": ["d0d5968e78ac25e1d3e588735de1ddbcf149cfb3165edebca5dec1ed7c7a5c46", "34222c72e4e1ead3584907f4d905444b7de820283ee7348018f110d5e6b04461", "f8e808622e222b4ad7dcb2907e5f06a890db83139ae443ec6c8c33781dfa3e37", "49b5e3dcc1b537b49c2cf09e5b875cb16acb05c622b22798e265e64dacd8ac90"] },
|
|
42
42
|
{ "canonical_name": "sks-performance-evaluator", "trusted_sha256": ["5b8c6cea19ffda8e434700297ed060fde3cfcfc9c98635402599e84756466db4", "c0bfd5a2e6c74813cb5dac9dadd4c7543ee768a48cf3e36b86b3d9306c2712c6"] },
|
|
43
43
|
{ "canonical_name": "sks-pipeline-runner", "trusted_sha256": ["020ba4da2f96bcda23cee4596b1e790816780178f1917dee748ff4b289cba0e5", "ffcbe0ea4b585e3d2886f1d9fa7a3b88706aaf42182fb177b2371b76beb0ddcd"] },
|
|
44
44
|
{ "canonical_name": "sks-plan", "trusted_sha256": ["7795867b38a5f169924125850f137c31995cf28000f74284839530a68ace156a", "b6f3b09230e9809acf4e13df2de6af3c75a8534e8890d6560664ebfc2e4072f8"] },
|
package/dist/bin/fast-inline.js
CHANGED
|
@@ -34,20 +34,6 @@ async function doctorJsonFastInline(input = {}) {
|
|
|
34
34
|
hook_evidence_policy: 'unknown-do-not-count',
|
|
35
35
|
agent_role_strategy: 'message-role'
|
|
36
36
|
},
|
|
37
|
-
zellij_readiness: {
|
|
38
|
-
schema: 'sks.zellij-readiness.v1',
|
|
39
|
-
binary: 'zellij',
|
|
40
|
-
status: 'skipped',
|
|
41
|
-
min_version: '0.41.0',
|
|
42
|
-
version: null,
|
|
43
|
-
required_for: ['sks --mad', 'interactive lane UI'],
|
|
44
|
-
layout_proof: 'unavailable',
|
|
45
|
-
pane_proof: 'unavailable',
|
|
46
|
-
screen_proof: 'unavailable',
|
|
47
|
-
mad_ready: false,
|
|
48
|
-
cli_ready: false,
|
|
49
|
-
ready_for_interactive_runtime: false
|
|
50
|
-
},
|
|
51
37
|
codex: { bin: null, version: null, available: null, skipped: true, reason: 'fast_readonly_json' },
|
|
52
38
|
repair: {
|
|
53
39
|
setup: null,
|
package/dist/bin/install.js
CHANGED
|
@@ -1,33 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return result.status ?? 1;
|
|
9
|
-
}
|
|
10
|
-
if (!['install', 'setup', 'bootstrap'].includes(command)) {
|
|
11
|
-
console.error('Usage: npx sneakoscope install [--yes|--no-tui]');
|
|
12
|
-
process.exit(2);
|
|
13
|
-
}
|
|
14
|
-
console.log('SKS installer - proof-first Codex harness');
|
|
15
|
-
const already = spawnSync('sks', ['--version'], { encoding: 'utf8' });
|
|
16
|
-
if (already.status !== 0) {
|
|
17
|
-
console.log('> installing global package (npm i -g sneakoscope)...');
|
|
18
|
-
if (run('npm', ['install', '-g', 'sneakoscope']) !== 0) {
|
|
19
|
-
console.error('global install failed - check npm permissions');
|
|
20
|
-
process.exit(1);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
console.log('> repairing/validating environment (sks doctor --fix)...');
|
|
24
|
-
if (run('sks', ['doctor', '--fix', ...(autonomous ? ['--yes'] : [])]) !== 0) {
|
|
25
|
-
console.error('doctor reported blockers - see report above');
|
|
26
|
-
process.exit(1);
|
|
27
|
-
}
|
|
28
|
-
console.log(`
|
|
29
|
-
SKS ready. 다음 3개만 기억하세요 (Codex 입력창에서):
|
|
30
|
-
$sks-plan "무엇을 만들지" - 계획만 세움 (코드 안 건드림)
|
|
31
|
-
$sks-work - 계획을 증거 기반으로 실행
|
|
32
|
-
실행 상태: sks status --json / zellij 세션은 자동
|
|
33
|
-
`);
|
|
2
|
+
import('../core/commands/install-package-command.js')
|
|
3
|
+
.then(({ installPackageCommand }) => installPackageCommand())
|
|
4
|
+
.catch((error) => {
|
|
5
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
6
|
+
process.exitCode = 1;
|
|
7
|
+
});
|
package/dist/cli/args.js
CHANGED
package/dist/cli/cli-theme.js
CHANGED
|
@@ -1,24 +1,33 @@
|
|
|
1
1
|
import { PACKAGE_VERSION } from '../core/version.js';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
const ANSI_CODES = {
|
|
3
|
+
reset: '\x1b[0m',
|
|
4
|
+
dim: '\x1b[2m',
|
|
5
|
+
red: '\x1b[31m',
|
|
6
|
+
green: '\x1b[32m',
|
|
7
|
+
yellow: '\x1b[33m'
|
|
8
|
+
};
|
|
9
|
+
const colorEnabled = process.env.NO_COLOR !== '1' && process.stdout.isTTY !== false;
|
|
10
|
+
function paint(code, text) {
|
|
11
|
+
return colorEnabled && code ? `${code}${text}${ANSI_CODES.reset}` : text;
|
|
12
|
+
}
|
|
4
13
|
export const ui = {
|
|
5
14
|
banner(cmd) {
|
|
6
|
-
console.log(paint(
|
|
15
|
+
console.log(paint(ANSI_CODES.dim, `SKS ${PACKAGE_VERSION} · ${cmd}`));
|
|
7
16
|
},
|
|
8
17
|
ok(msg) {
|
|
9
|
-
console.log(`${paint(
|
|
18
|
+
console.log(`${paint(ANSI_CODES.green, '✔')} ${msg}`);
|
|
10
19
|
},
|
|
11
20
|
warn(msg) {
|
|
12
|
-
console.log(`${paint(
|
|
21
|
+
console.log(`${paint(ANSI_CODES.yellow, '▲')} ${msg}`);
|
|
13
22
|
},
|
|
14
23
|
fail(msg) {
|
|
15
|
-
console.log(`${paint(
|
|
24
|
+
console.log(`${paint(ANSI_CODES.red, '✖')} ${msg}`);
|
|
16
25
|
},
|
|
17
26
|
step(msg) {
|
|
18
|
-
console.log(`${paint(
|
|
27
|
+
console.log(`${paint(ANSI_CODES.dim, '>')} ${msg}`);
|
|
19
28
|
},
|
|
20
29
|
kv(k, v) {
|
|
21
|
-
console.log(` ${paint(
|
|
30
|
+
console.log(` ${paint(ANSI_CODES.dim, k.padEnd(18))} ${v}`);
|
|
22
31
|
},
|
|
23
32
|
table(rows) {
|
|
24
33
|
if (!rows.length)
|
|
@@ -26,7 +35,7 @@ export const ui = {
|
|
|
26
35
|
const widths = rows[0]?.map((_cell, index) => Math.max(...rows.map((row) => String(row[index] || '').length))) || [];
|
|
27
36
|
for (const [rowIndex, row] of rows.entries()) {
|
|
28
37
|
const line = row.map((cell, index) => String(cell || '').padEnd(widths[index] || 0)).join(' ').trimEnd();
|
|
29
|
-
console.log(rowIndex === 0 ? paint(
|
|
38
|
+
console.log(rowIndex === 0 ? paint(ANSI_CODES.dim, line) : line);
|
|
30
39
|
}
|
|
31
40
|
}
|
|
32
41
|
};
|
|
@@ -14,6 +14,7 @@ const COMMAND_MANIFEST_LITE_BASE = [
|
|
|
14
14
|
{ name: 'status', summary: 'Show concise active mission and trust status', maturity: 'stable', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
|
|
15
15
|
{ name: 'review', summary: 'Review a git diff with machine evidence first', maturity: 'stable', allowedDuringActiveRoute: true },
|
|
16
16
|
{ name: 'root', summary: 'Show active SKS root', maturity: 'stable', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
|
|
17
|
+
{ name: 'install', summary: 'Install the exact packaged SKS version globally and verify the resolved CLI', maturity: 'stable', skipMigrationGate: true },
|
|
17
18
|
{ name: 'update', summary: 'Inspect, review, apply, or roll back the global SKS update', maturity: 'stable' },
|
|
18
19
|
{ name: 'uninstall', summary: 'Uninstall SKS global skills, hooks, config, menu bar, and optional project residue', maturity: 'stable', allowedDuringActiveRoute: true },
|
|
19
20
|
{ name: 'update-check', summary: 'Show the shared SKS, Codex CLI, and Menu Bar update status', maturity: 'stable', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
|
|
@@ -40,12 +41,6 @@ const COMMAND_MANIFEST_LITE_BASE = [
|
|
|
40
41
|
{ name: 'remote', summary: 'Inspect official Remote readiness and run the proof-aware SSH stdio worker', maturity: 'beta' },
|
|
41
42
|
{ name: 'telegram', summary: 'Pair and inspect the Telegram remote-control transport', maturity: 'beta', skipMigrationGate: true },
|
|
42
43
|
{ name: 'hooks', summary: 'Explain and inspect Codex hooks', maturity: 'beta', skipMigrationGate: true },
|
|
43
|
-
{ name: 'zellij-lane', summary: 'Render a Zellij lane frame for SKS sessions', maturity: 'beta' },
|
|
44
|
-
{ name: 'zellij-slot-pane', summary: 'Render a compact Zellij worker slot pane', maturity: 'beta' },
|
|
45
|
-
{ name: 'zellij-monitor-pane', summary: 'Render the live Zellij MAD/Naruto monitor pane', maturity: 'beta', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
|
|
46
|
-
{ name: 'zellij-viewport-pane', summary: 'Render a dynamically bound Zellij worker viewport pane', maturity: 'beta', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
|
|
47
|
-
{ name: 'zellij-slot-column-anchor', summary: 'Render the compact SLOTS anchor pane for first-slot-down Zellij stacks', maturity: 'beta' },
|
|
48
|
-
{ name: 'zellij', summary: 'Inspect Zellij runtime status and explain repair (no auto-install)', maturity: 'beta', skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
|
|
49
44
|
{ name: 'mad-sks', summary: 'MAD-SKS scoped permission modifier + SQL-plane execution', maturity: 'beta', mutatesRouteState: true },
|
|
50
45
|
{ name: 'auto-review', summary: 'Manage auto-review profile', maturity: 'beta' },
|
|
51
46
|
{ name: 'dollar-commands', summary: 'List Codex App dollar commands', maturity: 'stable', readonly: true, skipMigrationGate: true, allowedDuringActiveRoute: true, diagnostic: true },
|
|
@@ -127,6 +122,7 @@ const COMMAND_CONTRACT_OVERRIDES_LITE = {
|
|
|
127
122
|
},
|
|
128
123
|
harness: { latency: 'long' },
|
|
129
124
|
'image-ux-review': { latency: 'long' },
|
|
125
|
+
install: { risk: 'R2', latency: 'long' },
|
|
130
126
|
loop: { latency: 'long' },
|
|
131
127
|
'mad-sks': { risk: 'R3', latency: 'long' },
|
|
132
128
|
mcp: { risk: 'R2', latency: 'long', supportsJson: true, inputProfile: 'json-only' },
|
|
@@ -157,6 +157,7 @@ const COMMAND_DEFINITIONS = {
|
|
|
157
157
|
activeRoutePolicy: 'always'
|
|
158
158
|
}),
|
|
159
159
|
root: readOnly(entry('stable', 'Show active SKS root', 'dist/commands/root.js', directCommand(() => import('../commands/root.js'), 'dist/commands/root.js'))),
|
|
160
|
+
install: skipMigrationGate(entry('stable', 'Install the exact packaged SKS version globally and verify the resolved CLI', 'dist/core/commands/install-package-command.js', argsCommand(() => import('../core/commands/install-package-command.js'), 'installPackageCommand', 'dist/core/commands/install-package-command.js'))),
|
|
160
161
|
update: skipMigrationGate(entry('stable', 'Inspect, review, apply, or roll back the global SKS update', 'dist/core/commands/basic-cli.js', subcommand(() => import(basicModule), 'updateCommand', 'dist/core/commands/basic-cli.js', 'now'))),
|
|
161
162
|
uninstall: entry('stable', 'Uninstall SKS global skills, hooks, config, menu bar, and optional project residue', 'dist/core/commands/uninstall-command.js', argsCommand(() => import('../core/commands/uninstall-command.js'), 'uninstallCommand', 'dist/core/commands/uninstall-command.js'), {
|
|
162
163
|
skipMigrationGate: true,
|
|
@@ -188,12 +189,6 @@ const COMMAND_DEFINITIONS = {
|
|
|
188
189
|
remote: entry('beta', 'Inspect official Remote readiness and run the proof-aware SSH stdio worker', 'dist/core/commands/remote-command.js', argsCommand(() => import('../core/commands/remote-command.js'), 'remoteCommand', 'dist/core/commands/remote-command.js')),
|
|
189
190
|
telegram: skipMigrationGate(entry('beta', 'Pair and inspect the Telegram remote-control transport', 'dist/core/commands/telegram-command.js', argsCommand(() => import('../core/commands/telegram-command.js'), 'telegramCommand', 'dist/core/commands/telegram-command.js'))),
|
|
190
191
|
hooks: skipMigrationGate(entry('beta', 'Explain and inspect Codex hooks', 'dist/commands/hooks.js', directCommand(() => import('../commands/hooks.js'), 'dist/commands/hooks.js'))),
|
|
191
|
-
'zellij-lane': entry('beta', 'Render a Zellij lane frame for SKS sessions', 'dist/commands/zellij-lane.js', directCommand(() => import('../commands/zellij-lane.js'), 'dist/commands/zellij-lane.js')),
|
|
192
|
-
'zellij-slot-pane': entry('beta', 'Render a compact Zellij worker slot pane', 'dist/commands/zellij-slot-pane.js', directCommand(() => import('../commands/zellij-slot-pane.js'), 'dist/commands/zellij-slot-pane.js')),
|
|
193
|
-
'zellij-monitor-pane': skipMigrationGate(readOnly(entry('beta', 'Render the live Zellij MAD/Naruto monitor pane', 'dist/commands/zellij-monitor-pane.js', directCommand(() => import('../commands/zellij-monitor-pane.js'), 'dist/commands/zellij-monitor-pane.js')))),
|
|
194
|
-
'zellij-viewport-pane': skipMigrationGate(readOnly(entry('beta', 'Render a dynamically bound Zellij worker viewport pane', 'dist/commands/zellij-viewport-pane.js', directCommand(() => import('../commands/zellij-viewport-pane.js'), 'dist/commands/zellij-viewport-pane.js')))),
|
|
195
|
-
'zellij-slot-column-anchor': entry('beta', 'Render the compact SLOTS anchor pane for first-slot-down Zellij stacks', 'dist/commands/zellij-slot-column-anchor.js', directCommand(() => import('../commands/zellij-slot-column-anchor.js'), 'dist/commands/zellij-slot-column-anchor.js')),
|
|
196
|
-
zellij: activeRouteDiagnostic(entry('beta', 'Inspect Zellij runtime status and explain repair (no auto-install)', 'dist/commands/zellij.js', directCommand(() => import('../commands/zellij.js'), 'dist/commands/zellij.js'))),
|
|
197
192
|
'mad-sks': routeStateMutator(entry('beta', 'MAD-SKS scoped permission modifier + SQL-plane execution', 'dist/commands/mad-sks.js', directCommand(() => import('../commands/mad-sks.js'), 'dist/commands/mad-sks.js')), ['mad-sks-gate.json']),
|
|
198
193
|
'auto-review': entry('beta', 'Manage auto-review profile', 'dist/commands/auto-review.js', directCommand(() => import('../commands/auto-review.js'), 'dist/commands/auto-review.js')),
|
|
199
194
|
'dollar-commands': entry('stable', 'List Codex App dollar commands', 'dist/core/commands/basic-cli.js', basicArgs('dollarCommandsCommand')),
|
|
@@ -270,6 +265,7 @@ const COMMANDS_WITH_LEGACY_CONTRACT_OVERRIDES = applyCommandContractOverrides(CO
|
|
|
270
265
|
},
|
|
271
266
|
harness: { latency: 'long' },
|
|
272
267
|
'image-ux-review': { latency: 'long' },
|
|
268
|
+
install: { risk: 'R2', latency: 'long' },
|
|
273
269
|
loop: { latency: 'long' },
|
|
274
270
|
'mad-sks': { risk: 'R3', latency: 'long' },
|
|
275
271
|
mcp: { risk: 'R2', latency: 'long', supportsJson: true, inputProfile: 'json-only' },
|
|
@@ -55,14 +55,14 @@ export async function featuresCommand(sub = 'list', args = []) {
|
|
|
55
55
|
}
|
|
56
56
|
if (action === 'complete') {
|
|
57
57
|
const report = await writeAllFeatureCompletionReport({ root });
|
|
58
|
+
if (!report.ok)
|
|
59
|
+
process.exitCode = report.status === 'contract_covered_unverified' ? 2 : 1;
|
|
58
60
|
if (flag(args, '--json'))
|
|
59
61
|
console.log(JSON.stringify(report, null, 2));
|
|
60
62
|
else {
|
|
61
63
|
console.log(`All feature completion: ${report.status}`);
|
|
62
64
|
console.log(`Report: ${path.relative(root, report.files.json)}`);
|
|
63
65
|
}
|
|
64
|
-
if (!report.ok)
|
|
65
|
-
process.exitCode = 1;
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
console.error('Usage: sks features list|check|inventory|complete [--json] [--write-docs]');
|
|
@@ -73,12 +73,14 @@ export async function allFeaturesCommand(sub = 'selftest', args = []) {
|
|
|
73
73
|
if (action === 'complete' || action === 'completion') {
|
|
74
74
|
const root = await projectRoot();
|
|
75
75
|
const report = await writeAllFeatureCompletionReport({ root });
|
|
76
|
-
if (flag(args, '--json'))
|
|
77
|
-
return console.log(JSON.stringify(report, null, 2));
|
|
78
|
-
console.log(`All feature completion: ${report.status}`);
|
|
79
|
-
console.log(`Report: ${path.relative(root, report.files.json)}`);
|
|
80
76
|
if (!report.ok)
|
|
81
|
-
process.exitCode = 1;
|
|
77
|
+
process.exitCode = report.status === 'contract_covered_unverified' ? 2 : 1;
|
|
78
|
+
if (flag(args, '--json'))
|
|
79
|
+
console.log(JSON.stringify(report, null, 2));
|
|
80
|
+
else {
|
|
81
|
+
console.log(`All feature completion: ${report.status}`);
|
|
82
|
+
console.log(`Report: ${path.relative(root, report.files.json)}`);
|
|
83
|
+
}
|
|
82
84
|
return;
|
|
83
85
|
}
|
|
84
86
|
if (action !== 'selftest') {
|
|
@@ -172,16 +172,19 @@ function codexLbServiceTierEvidence(...responses) {
|
|
|
172
172
|
fast_actual: actual === CODEX_LB_CANONICAL_FAST_SERVICE_TIER || effective === CODEX_LB_CANONICAL_FAST_SERVICE_TIER
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
|
|
175
|
+
function codexLbGatewayHeaders(apiKey, authTransport = 'x-codex-lb-api-key') {
|
|
176
|
+
const credentialHeader = String(authTransport).startsWith('authorization-bearer')
|
|
177
|
+
? { authorization: `Bearer ${String(apiKey)}` }
|
|
178
|
+
: { 'X-Codex-LB-API-Key': String(apiKey) };
|
|
179
|
+
return { ...credentialHeader, 'content-type': 'application/json' };
|
|
180
|
+
}
|
|
181
|
+
async function fetchCodexLbResponse(fetchImpl, endpoint, apiKey, body, timeoutMs, authTransport = 'x-codex-lb-api-key') {
|
|
176
182
|
const controller = new AbortController();
|
|
177
183
|
const timer = setTimeout(() => controller.abort(), timeoutMs).unref?.();
|
|
178
184
|
try {
|
|
179
185
|
const response = await fetchImpl(endpoint, {
|
|
180
186
|
method: 'POST',
|
|
181
|
-
headers:
|
|
182
|
-
authorization: `Bearer ${apiKey}`,
|
|
183
|
-
'content-type': 'application/json'
|
|
184
|
-
},
|
|
187
|
+
headers: codexLbGatewayHeaders(apiKey, authTransport),
|
|
185
188
|
body: JSON.stringify(body),
|
|
186
189
|
redirect: 'error',
|
|
187
190
|
signal: controller.signal
|
|
@@ -325,7 +328,7 @@ export async function testCodexLbConnection(status = {}, opts = {}) {
|
|
|
325
328
|
};
|
|
326
329
|
const nowMs = typeof opts.nowMs === 'function' ? opts.nowMs : Date.now;
|
|
327
330
|
const startedAt = nowMs();
|
|
328
|
-
const fetched = await fetchCodexLbResponse(fetchImpl, endpoint, apiKey, body, timeoutMs);
|
|
331
|
+
const fetched = await fetchCodexLbResponse(fetchImpl, endpoint, apiKey, body, timeoutMs, opts.gatewayAuthTransport);
|
|
329
332
|
const latencyMs = Math.max(0, Math.round(nowMs() - startedAt));
|
|
330
333
|
if (!fetched.ok) {
|
|
331
334
|
const error = redactSecretText(fetched.error_payload?.error?.message
|
|
@@ -433,6 +436,7 @@ export async function checkCodexLbResponseChain(status = {}, opts = {}) {
|
|
|
433
436
|
if (!model)
|
|
434
437
|
return { ok: true, status: 'skipped', skipped: true, reason: 'model_unselected_use_explicit_model_or_codex_catalog' };
|
|
435
438
|
const timeoutMs = Number(opts.timeoutMs || env.SKS_CODEX_LB_CHAIN_CHECK_TIMEOUT_MS || 8000);
|
|
439
|
+
const gatewayAuthTransport = opts.gatewayAuthTransport || 'x-codex-lb-api-key';
|
|
436
440
|
const serviceTier = opts.fastMode === true || opts.serviceTier === 'fast' || opts.serviceTier === CODEX_LB_CANONICAL_FAST_SERVICE_TIER
|
|
437
441
|
? CODEX_LB_CANONICAL_FAST_SERVICE_TIER
|
|
438
442
|
: null;
|
|
@@ -447,7 +451,7 @@ export async function checkCodexLbResponseChain(status = {}, opts = {}) {
|
|
|
447
451
|
tool_choice: 'auto',
|
|
448
452
|
reasoning: { effort: 'low' }
|
|
449
453
|
};
|
|
450
|
-
const first = await fetchCodexLbResponse(fetchImpl, endpoint, apiKey, baseBody, timeoutMs);
|
|
454
|
+
const first = await fetchCodexLbResponse(fetchImpl, endpoint, apiKey, baseBody, timeoutMs, gatewayAuthTransport);
|
|
451
455
|
if (!first.ok || !first.response_id) {
|
|
452
456
|
return recordCodexLbChainHealth(await writeCodexLbChainCache({
|
|
453
457
|
ok: false,
|
|
@@ -460,7 +464,7 @@ export async function checkCodexLbResponseChain(status = {}, opts = {}) {
|
|
|
460
464
|
error: redactSecretText(first.error_payload?.error?.message || first.error_payload?.response?.error?.message || first.text || 'codex-lb first Responses request failed', [apiKey])
|
|
461
465
|
}, { endpoint, home, opts, env }), opts);
|
|
462
466
|
}
|
|
463
|
-
const second = await fetchCodexLbResponse(fetchImpl, endpoint, apiKey, { ...baseBody, previous_response_id: first.response_id }, timeoutMs);
|
|
467
|
+
const second = await fetchCodexLbResponse(fetchImpl, endpoint, apiKey, { ...baseBody, previous_response_id: first.response_id }, timeoutMs, gatewayAuthTransport);
|
|
464
468
|
if (second.ok)
|
|
465
469
|
return recordCodexLbChainHealth(await writeCodexLbChainCache({ ok: true, status: 'chain_ok', endpoint, response_id: first.response_id, chained_response_id: second.response_id || null, http_status: second.status, requested_service_tier: serviceTier, service_tier_evidence: codexLbServiceTierEvidence(first, second) }, { endpoint, home, opts, env }), opts);
|
|
466
470
|
const previousMissing = isPreviousResponseNotFound(second.error_payload || second.json || second.text);
|
|
@@ -10,6 +10,7 @@ import { reconcileRetiredSksConfigText } from '../core/auto-review.js';
|
|
|
10
10
|
import { ensureTrailingNewline, removeTopLevelTomlKeyIfValue, safeWriteCodexConfigToml, upsertTopLevelTomlString, upsertTomlTable } from '../core/codex-runtime/codex-desktop-config-policy.js';
|
|
11
11
|
import { codexLbConfigPath, normalizeCodexLbBaseUrl } from './install-helpers-codex-lb-shared.js';
|
|
12
12
|
import { escapeRegExp } from '../core/text/regex.js';
|
|
13
|
+
import { upsertExplicitCodexProviderMode } from '../core/codex-app/provider-mode.js';
|
|
13
14
|
export const CODEX_LB_DESKTOP_BRIDGE_MARKER = '# sks-codex-lb-managed-desktop-bridge';
|
|
14
15
|
export const CODEX_LB_DESKTOP_COMPAT_MARKER = '# sks-codex-lb-managed-desktop-compat';
|
|
15
16
|
export const CODEX_LB_MODEL_CATALOG_MARKER = '# sks-codex-lb-managed-model-catalog';
|
|
@@ -63,8 +64,9 @@ export function upsertCodexLbNativeDesktopConfig(text, input) {
|
|
|
63
64
|
next = removeTopLevelLine(next, CODEX_LB_DESKTOP_COMPAT_MARKER);
|
|
64
65
|
next = removeManagedModelCatalogJson(next);
|
|
65
66
|
next = upsertManagedTopLevelTomlString(next, 'openai_base_url', input.bridgeBaseUrl, CODEX_LB_DESKTOP_BRIDGE_MARKER, [LEGACY_CODEX_LB_OPENAI_ROUTING_MARKER]);
|
|
67
|
+
next = upsertTopLevelTomlString(next, 'model_provider', 'openai');
|
|
66
68
|
next = upsertTomlTable(next, 'model_providers.codex-lb', cliProviderBlock(input.remoteBaseUrl));
|
|
67
|
-
return ensureTrailingNewline(next);
|
|
69
|
+
return ensureTrailingNewline(upsertExplicitCodexProviderMode(next, 'codex-lb'));
|
|
68
70
|
}
|
|
69
71
|
export function upsertCodexLbCompatDesktopConfig(text, input) {
|
|
70
72
|
let next = removeManagedDesktopBridgeRouting(String(text || ''));
|
|
@@ -102,7 +104,7 @@ export function upsertCodexLbCliProviderConfig(text, input) {
|
|
|
102
104
|
export function restoreCodexLbOAuthSelectionConfig(text) {
|
|
103
105
|
let next = removeManagedCodexLbSelection(String(text || ''));
|
|
104
106
|
next = upsertManagedTopLevelTomlString(next, 'model_provider', 'openai', CODEX_LB_OAUTH_SELECTION_MARKER);
|
|
105
|
-
return ensureTrailingNewline(next);
|
|
107
|
+
return ensureTrailingNewline(upsertExplicitCodexProviderMode(next, 'chatgpt-oauth'));
|
|
106
108
|
}
|
|
107
109
|
export function removeManagedCodexLbSelection(text) {
|
|
108
110
|
let next = removeTopLevelTomlKeyIfValue(String(text || ''), 'model_provider', 'codex-lb');
|
|
@@ -159,7 +161,7 @@ function cliProviderBlock(remoteBaseUrl) {
|
|
|
159
161
|
'name = "codex-lb"',
|
|
160
162
|
`base_url = ${JSON.stringify(remoteBaseUrl)}`,
|
|
161
163
|
'wire_api = "responses"',
|
|
162
|
-
'
|
|
164
|
+
'env_http_headers = { "X-Codex-LB-API-Key" = "CODEX_LB_API_KEY" }',
|
|
163
165
|
'supports_websockets = true',
|
|
164
166
|
'requires_openai_auth = false'
|
|
165
167
|
].join('\n');
|