sneakoscope 7.0.0 → 7.0.3
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 +7 -5
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/bin/sks-dispatch.js +0 -3
- package/dist/cli/command-registry.js +0 -2
- package/dist/cli/install-helpers-codex-lb-chain.js +24 -2
- package/dist/cli/install-helpers-codex-lb-config.js +0 -7
- package/dist/cli/install-helpers-codex-lb-selftest-chain.js +0 -3
- package/dist/cli/install-helpers-codex-lb-selftest.js +0 -17
- package/dist/cli/install-helpers.js +81 -96
- package/dist/cli/router.js +0 -22
- package/dist/commands/codex-lb.js +176 -22
- package/dist/commands/codex.js +3 -8
- package/dist/commands/doctor.js +4 -14
- package/dist/commands/perf.js +5 -1
- package/dist/commands/zellij-slot-column-anchor.js +0 -2
- package/dist/commands/zellij-slot-pane.js +0 -7
- package/dist/commands/zellij.js +0 -2
- package/dist/config/skills-manifest.json +52 -52
- package/dist/core/agent-bridge/agent-manifest.js +192 -1
- package/dist/core/agent-bridge/agent-mode.js +0 -5
- package/dist/core/agent-bridge/host-capability-policy.js +189 -0
- package/dist/core/agent-bridge/host-capability-runtime.js +1395 -0
- package/dist/core/agent-bridge/mcp-server.js +1 -11
- package/dist/core/agents/agent-effort-policy.js +0 -3
- package/dist/core/agents/agent-orchestrator.js +0 -4
- package/dist/core/agents/agent-proof-evidence.js +0 -2
- package/dist/core/agents/agent-runner-ollama.js +0 -3
- package/dist/core/agents/agent-scheduler.js +0 -5
- package/dist/core/agents/native-cli-worker-runtime.js +5 -17
- package/dist/core/agents/work-partition/repo-inventory.js +0 -2
- package/dist/core/auto-review.js +0 -13
- package/dist/core/bench.js +0 -14
- package/dist/core/code-structure.js +0 -3
- package/dist/core/codex/agent-config-file-repair.js +0 -8
- package/dist/core/codex/codex-cli-update.js +122 -20
- package/dist/core/codex/codex-config-eperm-repair.js +0 -4
- package/dist/core/codex/codex-config-guard.js +0 -3
- package/dist/core/codex/codex-config-readability.js +0 -13
- package/dist/core/codex/codex-project-config-policy.js +0 -33
- package/dist/core/codex/official-goal-mode.js +0 -2
- package/dist/core/codex-app/codex-app-fast-ui-repair.js +5 -7
- package/dist/core/codex-app/codex-app-ui-state-snapshot.js +44 -7
- package/dist/core/codex-app/sks-menubar.js +0 -1
- package/dist/core/codex-app.js +0 -9
- package/dist/core/codex-compat/codex-hook-output-builders.js +9 -1
- package/dist/core/codex-compat/codex-hook-output-normalizer.js +1 -1
- package/dist/core/codex-compat/codex-hook-semantic-validator.js +3 -2
- package/dist/core/codex-compat/codex-hook-warning-detector.js +10 -2
- package/dist/core/codex-control/codex-lb-launch-recovery.js +0 -3
- package/dist/core/codex-control/codex-reliability-shield.js +0 -8
- package/dist/core/codex-control/codex-sdk-adapter.js +0 -3
- package/dist/core/codex-control/codex-sdk-config-policy.js +0 -2
- package/dist/core/codex-control/codex-sdk-env-policy.js +61 -16
- package/dist/core/codex-control/codex-task-runner.js +0 -7
- package/dist/core/codex-control/codex-thread-registry.js +0 -4
- package/dist/core/codex-lb/codex-lb-env.js +118 -20
- package/dist/core/codex-lb/codex-lb-tool-catalog.js +0 -4
- package/dist/core/codex-lb/codex-lb-tool-output-recovery.js +1 -1
- package/dist/core/codex-model-guard.js +0 -14
- package/dist/core/codex-native/codex-native-feature-broker.js +67 -22
- package/dist/core/codex-native/codex-native-interop-policy.js +81 -9
- package/dist/core/codex-native/confined-report-writer.js +21 -0
- package/dist/core/codex-native/core-skill-integrity.js +169 -20
- package/dist/core/codex-native/project-skill-dedupe.js +55 -13
- package/dist/core/codex-native/skill-registry-ledger.js +137 -16
- package/dist/core/codex-native/sks-skill-paths.js +185 -0
- package/dist/core/codex-runtime/codex-desktop-config-policy.js +0 -2
- package/dist/core/commands/agent-bridge-command.js +28 -8
- package/dist/core/commands/basic-cli.js +67 -26
- package/dist/core/commands/bench-command.js +5 -1
- package/dist/core/commands/command-utils.js +0 -5
- package/dist/core/commands/image-ux-review-command.js +0 -9
- package/dist/core/commands/mad-sks-command.js +0 -38
- package/dist/core/commands/naruto-command.js +69 -17
- package/dist/core/commands/ppt-command.js +0 -9
- package/dist/core/commands/run-command.js +8 -2
- package/dist/core/commands/seo-command.js +0 -6
- package/dist/core/commands/wiki-command.js +0 -14
- package/dist/core/computer-use-live-evidence.js +0 -5
- package/dist/core/config/secret-preservation.js +0 -11
- package/dist/core/daemon/sksd-hook-daemon-entrypoint.js +0 -2
- package/dist/core/daemon/sksd-hook-daemon.js +1 -29
- package/dist/core/daemon/sksd-hook-dispatch.js +0 -17
- package/dist/core/db-safety.js +0 -7
- package/dist/core/doctor/browser-use-repair.js +0 -2
- package/dist/core/doctor/doctor-codex-startup-repair.js +0 -3
- package/dist/core/doctor/doctor-readiness-matrix.js +12 -0
- package/dist/core/doctor/doctor-skill-reconcile.js +32 -0
- package/dist/core/doctor/imagegen-repair.js +0 -2
- package/dist/core/doctor/mcp-transport-collision-repair.js +0 -3
- package/dist/core/doctor/retired-managed-residue-private.js +0 -1
- package/dist/core/doctor/supabase-mcp-repair.js +0 -11
- package/dist/core/feature-fixture-executor.js +0 -48
- package/dist/core/feature-fixtures.js +0 -5
- package/dist/core/fsx.js +11 -12
- package/dist/core/hooks-runtime/code-pack-freshness-preflight.js +0 -5
- package/dist/core/hooks-runtime/hook-context.js +202 -0
- package/dist/core/hooks-runtime/hook-io.js +1 -12
- package/dist/core/hooks-runtime/light-turn.js +0 -2
- package/dist/core/hooks-runtime/naruto-decision-gate.js +4 -1
- package/dist/core/hooks-runtime/naruto-terminal-finalization.js +91 -0
- package/dist/core/hooks-runtime/official-subagent-lifecycle.js +370 -0
- package/dist/core/hooks-runtime/standalone-parent-host-capability.js +98 -0
- package/dist/core/hooks-runtime/subagent-context.js +59 -0
- package/dist/core/hooks-runtime/subagent-skill-availability-contract.js +29 -0
- package/dist/core/hooks-runtime/subagent-skill-availability-evidence.js +195 -0
- package/dist/core/hooks-runtime/subagent-skill-availability-guards.js +316 -0
- package/dist/core/hooks-runtime/subagent-skill-availability.js +217 -0
- package/dist/core/hooks-runtime.js +259 -535
- package/dist/core/image-ux-review/codex-app-generated-image-discovery.js +0 -17
- package/dist/core/image-ux-review/imagegen-adapter.js +0 -14
- package/dist/core/imagegen/imagegen-auth-readiness.js +0 -9
- package/dist/core/imagegen/imagegen-capability.js +0 -3
- package/dist/core/init/managed-skill-install.js +42 -0
- package/dist/core/init/skills.js +247 -74
- package/dist/core/init.js +15 -40
- package/dist/core/lean-engineering-policy.js +0 -2
- package/dist/core/locks/file-lock.js +0 -21
- package/dist/core/loops/loop-planner.js +0 -6
- package/dist/core/loops/loop-runtime.js +0 -1
- package/dist/core/loops/loop-worker-runtime.js +0 -19
- package/dist/core/mad-sks/executors/db-write-executor.js +0 -4
- package/dist/core/mad-sks/executors/executor-base.js +0 -10
- package/dist/core/mad-sks/immutable-harness-guard.js +0 -5
- package/dist/core/mad-sks/sql-plane/coordinator.js +0 -5
- package/dist/core/mad-sks/sql-plane/ledger.js +0 -4
- package/dist/core/mad-sks/sql-plane/lock.js +0 -4
- package/dist/core/mad-sks/sql-plane/mcp-executor.js +0 -9
- package/dist/core/mad-sks/sql-plane/policy-resolver.js +0 -2
- package/dist/core/mad-sks/sql-plane/postconditions.js +0 -4
- package/dist/core/mad-sks/sql-plane/recovery.js +0 -2
- package/dist/core/mad-sks/sql-plane/runtime-profile.js +0 -8
- package/dist/core/managed-assets/managed-assets-manifest.js +1 -7
- package/dist/core/mcp-config/health-check.js +10 -3
- package/dist/core/migration/migration-transaction-journal.js +0 -8
- package/dist/core/mission.js +74 -6
- package/dist/core/naruto/naruto-active-pool.js +0 -2
- package/dist/core/naruto/naruto-concurrency-governor.js +0 -1
- package/dist/core/naruto/naruto-real-write-proof.js +0 -4
- package/dist/core/naruto/naruto-write-e2e.js +0 -1
- package/dist/core/perf/perf-budget.js +0 -5
- package/dist/core/permission-gates.js +0 -2
- package/dist/core/pipeline-internals/runtime-core.js +15 -5
- package/dist/core/pipeline-internals/runtime-gates.js +0 -12
- package/dist/core/preflight/parallel-preflight-engine.js +0 -11
- package/dist/core/proof/evidence-collector.js +0 -2
- package/dist/core/proof/route-finalizer.js +0 -1
- package/dist/core/proof/selftest-proof-fixtures.js +0 -5
- package/dist/core/providers/glm/bench/glm-benchmark-runner.js +0 -2
- package/dist/core/providers/glm/glm-request-cache.js +0 -3
- package/dist/core/providers/glm/naruto/glm-naruto-command.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-decomposer.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-orchestrator.js +0 -6
- package/dist/core/providers/glm/naruto/glm-naruto-trace.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-worker-pool.js +0 -1
- package/dist/core/providers/glm/naruto/glm-naruto-worktree.js +0 -1
- package/dist/core/providers/openrouter/openrouter-secret-store.js +0 -1
- package/dist/core/providers/openrouter/openrouter-stream.js +0 -2
- package/dist/core/questions.js +3 -3
- package/dist/core/release/gate-manifest.js +0 -5
- package/dist/core/release/package-size-budget.js +1 -1
- package/dist/core/release/release-gate-batch-runner.js +11 -2
- package/dist/core/release/release-gate-cache-v2.js +0 -4
- package/dist/core/release/release-gate-hermetic-env.js +0 -5
- package/dist/core/release-parallel-full-coverage.js +0 -2
- package/dist/core/remote/ssh-worker-client.js +0 -3
- package/dist/core/research/research-adversarial-review.js +6 -2
- package/dist/core/responses-retry-policy.js +0 -10
- package/dist/core/retention.js +0 -7
- package/dist/core/routes/constants.js +0 -3
- package/dist/core/routes.js +89 -15
- package/dist/core/safety/command-contract/contracts.js +2 -0
- package/dist/core/safety/mutation-guard.js +0 -25
- package/dist/core/safety/mutation-ledger.js +0 -9
- package/dist/core/safety/requested-scope-contract.js +0 -0
- package/dist/core/security/high-risk-contracts.js +0 -1
- package/dist/core/skills/core-skill-card.js +0 -0
- package/dist/core/skills/core-skill-deployment.js +0 -13
- package/dist/core/skills/core-skill-epoch.js +0 -11
- package/dist/core/skills/core-skill-meta-update.js +0 -6
- package/dist/core/skills/core-skill-patch-apply.js +0 -7
- package/dist/core/skills/core-skill-patch.js +0 -8
- package/dist/core/skills/core-skill-reflection.js +0 -16
- package/dist/core/skills/core-skill-runtime.js +0 -6
- package/dist/core/skills/core-skill-scorer.js +0 -7
- package/dist/core/skills/core-skill-trainer.js +0 -11
- package/dist/core/skills/core-skill-types.js +0 -9
- package/dist/core/skills/core-skill-validation.js +0 -5
- package/dist/core/skills/rejected-skill-patch-buffer.js +0 -2
- package/dist/core/stop-gate/stop-gate-check.js +0 -8
- package/dist/core/stop-gate/stop-gate-resolver.js +0 -7
- package/dist/core/stop-gate/stop-gate-writer.js +0 -5
- package/dist/core/subagents/model-policy.js +0 -7
- package/dist/core/subagents/naruto-help-contract.js +1 -1
- package/dist/core/subagents/naruto-proof-projection.js +582 -14
- package/dist/core/subagents/official-subagent-config.js +0 -8
- package/dist/core/subagents/official-subagent-preparation.js +6 -5
- package/dist/core/subagents/official-subagent-prompt.js +29 -0
- package/dist/core/subagents/official-subagent-runner.js +351 -38
- package/dist/core/subagents/subagent-evidence.js +378 -9
- package/dist/core/subagents/thread-budget.js +5 -2
- package/dist/core/subagents/triwiki-attention.js +0 -4
- package/dist/core/subagents/wave-parent-guidance.js +54 -9
- package/dist/core/telegram/runtime.js +0 -1
- package/dist/core/triwiki/code-index-scanner.js +0 -3
- package/dist/core/triwiki/code-pack-head-freshness.js +0 -10
- package/dist/core/triwiki/code-pack.js +0 -2
- package/dist/core/triwiki/triwiki-cache-key.js +0 -1
- package/dist/core/triwiki/triwiki-proof-bank.js +0 -1
- package/dist/core/triwiki-attention.js +0 -10
- package/dist/core/triwiki-provenance.js +0 -5
- package/dist/core/triwiki-runtime.js +0 -12
- package/dist/core/triwiki-wrongness/wrongness-ledger.js +0 -7
- package/dist/core/triwiki-wrongness/wrongness-schema.js +0 -3
- package/dist/core/trust-kernel/trust-report.js +0 -7
- package/dist/core/update/update-migration-state.js +21 -39
- package/dist/core/update-check.js +2 -14
- package/dist/core/version-manager.js +2 -0
- package/dist/core/version.js +1 -1
- package/dist/core/work-order-ledger.js +0 -17
- package/dist/core/zellij/zellij-clipboard-config.js +0 -18
- package/dist/core/zellij/zellij-lane-renderer.js +5 -46
- package/dist/core/zellij/zellij-lane-runtime.js +0 -1
- package/dist/core/zellij/zellij-launcher.js +0 -26
- package/dist/core/zellij/zellij-official-subagent-activity.js +0 -5
- package/dist/core/zellij/zellij-official-subagent-telemetry.js +0 -5
- package/dist/core/zellij/zellij-screen-proof.js +0 -7
- package/dist/core/zellij/zellij-slot-column-anchor.js +0 -1
- package/dist/core/zellij/zellij-slot-pane-renderer.js +0 -9
- package/dist/core/zellij/zellij-slot-telemetry.js +0 -12
- package/dist/core/zellij/zellij-ui-mode.js +0 -7
- package/dist/core/zellij/zellij-update.js +0 -29
- package/dist/core/zellij/zellij-worker-pane-manager.js +0 -39
- package/dist/native/sks-menubar/Sources/AlertFactory.swift +21 -2
- package/dist/native/sks-menubar/Sources/AppDelegate.swift +3 -0
- package/dist/native/sks-menubar/Sources/AppIdentity.swift +25 -0
- package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +254 -21
- package/dist/native/sks-menubar/Sources/UpdatesViewController.swift +95 -12
- package/dist/scripts/agent-message-bus-reader-check.js +0 -1
- package/dist/scripts/all-feature-deep-completion-check.js +0 -1
- package/dist/scripts/appshots-thread-attachment-discovery-check.js +0 -1
- package/dist/scripts/architecture-guard-check.js +0 -1
- package/dist/scripts/build-dist.js +0 -1
- package/dist/scripts/build-once-runner-check.js +0 -1
- package/dist/scripts/canonical-test-runner.js +0 -2
- package/dist/scripts/certificate-sla-check.js +0 -1
- package/dist/scripts/changelog-check.js +0 -1
- package/dist/scripts/check-cli-entrypoint.js +0 -1
- package/dist/scripts/check-command-module-budget.js +0 -7
- package/dist/scripts/check-feature-quality.js +0 -1
- package/dist/scripts/check-legacy-free.js +0 -1
- package/dist/scripts/check-pipeline-runtime.js +0 -1
- package/dist/scripts/check-runtime-schemas.js +0 -1
- package/dist/scripts/codex-0-134-runner-truth-check.js +0 -1
- package/dist/scripts/codex-0-137-compat-check.js +0 -1
- package/dist/scripts/codex-0138-capability-artifact-check.js +0 -1
- package/dist/scripts/codex-0138-capability-check.js +0 -1
- package/dist/scripts/codex-0138-doctor-check.js +0 -1
- package/dist/scripts/codex-0138-feature-probes-check.js +0 -1
- package/dist/scripts/codex-0144-core-real-probes-check.js +0 -1
- package/dist/scripts/codex-app-handoff-check.js +0 -1
- package/dist/scripts/codex-app-handoff-launch-check.js +0 -1
- package/dist/scripts/codex-config-load-probe.js +0 -5
- package/dist/scripts/codex-control-all-pipelines-check.js +0 -1
- package/dist/scripts/codex-control-event-stream-ledger-check.js +0 -1
- package/dist/scripts/codex-control-tool-output-continuity-audit-check.js +0 -1
- package/dist/scripts/codex-permission-profiles-check.js +0 -1
- package/dist/scripts/codex-plugin-app-template-policy-check.js +0 -1
- package/dist/scripts/codex-project-config-policy-splitter-check.js +0 -1
- package/dist/scripts/codex-sdk-all-pipelines-check.js +0 -1
- package/dist/scripts/codex-sdk-backend-router-check.js +0 -1
- package/dist/scripts/codex-sdk-capability-check.js +0 -1
- package/dist/scripts/codex-sdk-event-stream-ledger-check.js +0 -1
- package/dist/scripts/codex-sdk-real-smoke-check.js +0 -1
- package/dist/scripts/concurrent-session-collision-check.js +9 -0
- package/dist/scripts/context7-evidence-dedupe-check.js +0 -1
- package/dist/scripts/core-skill-card-schema-check.js +0 -11
- package/dist/scripts/core-skill-deployment-snapshot-check.js +0 -10
- package/dist/scripts/core-skill-heldout-validation-check.js +0 -11
- package/dist/scripts/core-skill-no-inference-optimizer-check.js +0 -11
- package/dist/scripts/core-skill-patch-check.js +0 -11
- package/dist/scripts/core-skill-route-runtime-integration-check.js +0 -11
- package/dist/scripts/current-surface-update-e2e-check.js +0 -4
- package/dist/scripts/current-upgrade-matrix-check.js +0 -1
- package/dist/scripts/dfix-fixture-check.js +0 -1
- package/dist/scripts/dfix-patch-handoff-check.js +0 -1
- package/dist/scripts/dfix-verification-check.js +0 -1
- package/dist/scripts/dfix-verification-recommendation-check.js +0 -1
- package/dist/scripts/docs-truthfulness-check.js +3 -3
- package/dist/scripts/doctor-fastpath-check.js +0 -1
- package/dist/scripts/doctor-fix-proves-codex-read-check.js +0 -11
- package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +0 -4
- package/dist/scripts/doctor-idempotence-check.js +0 -1
- package/dist/scripts/doctor-ops-semantics-check.js +0 -1
- package/dist/scripts/ensure-bin-executable.js +0 -1
- package/dist/scripts/evidence-flagship-coverage-check.js +0 -1
- package/dist/scripts/fast-codex-service-tier-proof-check.js +0 -1
- package/dist/scripts/fixtures/fake-codex-config-loader.js +0 -5
- package/dist/scripts/fsx-hotpath-check.js +0 -1
- package/dist/scripts/gate-policy-audit-check.js +1 -1
- package/dist/scripts/geo-claim-evidence-check.js +0 -1
- package/dist/scripts/geo-cli-blackbox-check.js +0 -1
- package/dist/scripts/geo-crawler-policy-check.js +0 -1
- package/dist/scripts/git-worktree-diff-envelope-check.js +0 -1
- package/dist/scripts/git-worktree-dirty-lock-check.js +0 -1
- package/dist/scripts/git-worktree-dirty-main-detection-check.js +0 -1
- package/dist/scripts/git-worktree-integration-primary-check.js +0 -1
- package/dist/scripts/git-worktree-manifest-append-check.js +0 -1
- package/dist/scripts/git-worktree-untracked-diff-check.js +0 -1
- package/dist/scripts/high-risk-contracts-check.js +0 -1
- package/dist/scripts/hook-latency-budget-check.js +0 -1
- package/dist/scripts/hook-latency-quantum-check.js +0 -1
- package/dist/scripts/image-artifact-path-contract-check.js +0 -1
- package/dist/scripts/imagegen-real-smoke-check.js +0 -1
- package/dist/scripts/import-graph-budget-check.js +0 -1
- package/dist/scripts/installed-package-smoke-check.js +0 -1
- package/dist/scripts/legacy-gate-purge-check.js +0 -1
- package/dist/scripts/lib/codex-sdk-gate-lib.js +0 -3
- package/dist/scripts/lib/ensure-dist-fresh.js +0 -1
- package/dist/scripts/lib/valid-png-fixture.js +0 -1
- package/dist/scripts/local-collab-all-pipelines-final-gpt-check.js +0 -1
- package/dist/scripts/loop-directive-check-lib.js +0 -1
- package/dist/scripts/loop-worker-fixture-child.js +0 -1
- package/dist/scripts/mad-preflight-blocks-unreadable-config-check.js +0 -10
- package/dist/scripts/mad-sks-sql-plane-lifecycle-hook-decision-check.js +0 -1
- package/dist/scripts/mad-sks-sql-plane-result-lifecycle-check.js +0 -1
- package/dist/scripts/mcp-plugin-inventory-check.js +0 -1
- package/dist/scripts/mcp-tool-naming-parity-check.js +0 -1
- package/dist/scripts/model-call-concurrency-check.js +0 -1
- package/dist/scripts/mutation-callsite-coverage-check.js +0 -5
- package/dist/scripts/naruto-codex-e2e-check.js +0 -1
- package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -1
- package/dist/scripts/official-subagent-workflow-check.js +3 -1
- package/dist/scripts/ops-diagnostics-bundle-check.js +0 -1
- package/dist/scripts/packlist-performance-check.js +1 -3
- package/dist/scripts/perf-budget-check.js +0 -1
- package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -1
- package/dist/scripts/ppt-real-export-adapter-check.js +0 -1
- package/dist/scripts/ppt-real-imagegen-smoke-check.js +0 -1
- package/dist/scripts/ppt-real-imagegen-wiring-check.js +0 -1
- package/dist/scripts/ppt-reexport-rereview-check.js +0 -1
- package/dist/scripts/prepublish-fast-check.js +0 -23
- package/dist/scripts/prepublish-release-check-or-fast.js +0 -7
- package/dist/scripts/probe-memoization-check.js +0 -1
- package/dist/scripts/product-design-plugin-routing-check.js +0 -1
- package/dist/scripts/project-skill-dedupe-blackbox.js +36 -9
- package/dist/scripts/prompt-placeholder-guard-check.js +0 -1
- package/dist/scripts/python-codex-sdk-all-pipelines-check.js +0 -3
- package/dist/scripts/qa-loop-app-handoff-capability-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-cli-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-confirmation-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-gate-lifecycle-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-launch-check.js +0 -1
- package/dist/scripts/qa-loop-app-handoff-status-lifecycle-check.js +0 -1
- package/dist/scripts/qa-loop-budget-policy-check.js +0 -1
- package/dist/scripts/qa-loop-effort-escalation-check.js +0 -1
- package/dist/scripts/qa-loop-image-path-exposure-check.js +0 -1
- package/dist/scripts/qa-loop-image-path-prompt-injection-check.js +0 -1
- package/dist/scripts/release-cache-glob-hashing-check.js +0 -1
- package/dist/scripts/release-cache-input-classifier-check.js +0 -1
- package/dist/scripts/release-cache-neutralization-report-check.js +0 -1
- package/dist/scripts/release-cache-version-neutral-fixture-check.js +0 -1
- package/dist/scripts/release-check-stamp.js +0 -4
- package/dist/scripts/release-dist-freshness-check.js +0 -1
- package/dist/scripts/release-full-parallelism-blackbox.js +3 -3
- package/dist/scripts/release-gate-batch-runner-check.js +22 -0
- package/dist/scripts/release-gate-budget-check.js +0 -6
- package/dist/scripts/release-gate-dag-runner-check.js +0 -1
- package/dist/scripts/release-latency-slo-check.js +0 -1
- package/dist/scripts/release-metadata-1-19-check.js +0 -1
- package/dist/scripts/release-metadata-check.js +0 -3
- package/dist/scripts/release-parallel-speed-budget-check.js +0 -5
- package/dist/scripts/release-proof-truth-check.js +0 -1
- package/dist/scripts/release-provenance-check.js +0 -1
- package/dist/scripts/release-real-check.js +0 -1
- package/dist/scripts/release-runtime-truth-matrix-check.js +0 -1
- package/dist/scripts/release-version-truth-check.js +0 -1
- package/dist/scripts/research-blueprint-densifier-check.js +0 -1
- package/dist/scripts/research-claim-builder-check.js +0 -1
- package/dist/scripts/research-complete-package-fixture-check.js +0 -1
- package/dist/scripts/research-final-reviewer-blackbox.js +0 -1
- package/dist/scripts/responses-retry-policy-centralized-check.js +0 -1
- package/dist/scripts/retention-apply-smoke-check.js +0 -1
- package/dist/scripts/retention-budget-check.js +0 -1
- package/dist/scripts/retention-dry-run-check.js +0 -1
- package/dist/scripts/rollback-recovery-smoke-check.js +0 -1
- package/dist/scripts/route-intent-regression-check.js +0 -1
- package/dist/scripts/runtime-current-terminal-check.js +0 -1
- package/dist/scripts/runtime-dist-parity-check.js +0 -1
- package/dist/scripts/runtime-no-src-mjs-check.js +0 -1
- package/dist/scripts/runtime-proof-summary-check.js +0 -1
- package/dist/scripts/runtime-ts-rust-boundary-check.js +0 -15
- package/dist/scripts/runtime-ts-source-of-truth-check.js +0 -1
- package/dist/scripts/scheduler-batch-dispatch-check.js +0 -1
- package/dist/scripts/scheduler-parallel-proof-consistency-check.js +0 -1
- package/dist/scripts/scheduler-utilization-integral-check.js +0 -1
- package/dist/scripts/search-visibility-gate-lib.js +0 -1
- package/dist/scripts/seo-audit-fixture-check.js +0 -1
- package/dist/scripts/seo-cli-blackbox-check.js +0 -1
- package/dist/scripts/seo-geo-geo-disambiguation-check.js +0 -1
- package/dist/scripts/seo-geo-route-identity-check.js +0 -1
- package/dist/scripts/seo-geo-skill-rich-content-check.js +0 -1
- package/dist/scripts/seo-marketing-truthfulness-check.js +0 -1
- package/dist/scripts/seo-metadata-sync-check.js +0 -1
- package/dist/scripts/seo-no-mutation-by-default-check.js +0 -1
- package/dist/scripts/shared-memory-fixture-check.js +0 -1
- package/dist/scripts/side-effect-runtime-report-check.js +0 -1
- package/dist/scripts/sizecheck.js +0 -1
- package/dist/scripts/sks-1-11-gate-lib.js +0 -1
- package/dist/scripts/sks-1-12-real-execution-check-lib.js +0 -1
- package/dist/scripts/sks-1-18-gate-lib.js +0 -1
- package/dist/scripts/sks-menubar-install-check.js +0 -3
- package/dist/scripts/sksd-daemon-check.js +0 -1
- package/dist/scripts/super-search-live-smoke-check.js +0 -1
- package/dist/scripts/super-search-local-http-smoke-check.js +0 -1
- package/dist/scripts/super-search-offline-contract-check.js +0 -1
- package/dist/scripts/super-search-provider-interface-check.js +0 -1
- package/dist/scripts/triwiki-cache-key-check.js +0 -1
- package/dist/scripts/triwiki-proof-bank-blackbox.js +0 -1
- package/dist/scripts/triwiki-proof-bank-check.js +0 -1
- package/dist/scripts/triwiki-proof-card-check.js +0 -1
- package/dist/scripts/trust-fixture-check.js +0 -1
- package/dist/scripts/ultra-router-auto-router-check.js +0 -1
- package/dist/scripts/update-fastpath-check.js +0 -1
- package/dist/scripts/upgrade-migration-matrix-check.js +0 -1
- package/dist/scripts/ux-review-extract-wires-real-extractor-check.js +0 -1
- package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -1
- package/dist/scripts/ux-review-patch-diff-recheck-check.js +0 -1
- package/dist/scripts/ux-review-real-imagegen-smoke-check.js +0 -1
- package/dist/scripts/ux-review-run-wires-imagegen-check.js +0 -1
- package/dist/scripts/write-build-manifest.js +0 -1
- package/dist/scripts/wrongness-fixture-check.js +0 -1
- package/dist/scripts/zellij-capability-check.js +0 -1
- package/dist/scripts/zellij-developer-controls-check.js +0 -1
- package/dist/scripts/zellij-doctor-readiness-check.js +0 -13
- package/dist/scripts/zellij-dynamic-pane-lifecycle-check.js +0 -1
- package/dist/scripts/zellij-fake-adapter-check.js +0 -1
- package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -1
- package/dist/scripts/zellij-lane-renderer-check.js +0 -1
- package/dist/scripts/zellij-launch-command-truth-check.js +0 -12
- package/dist/scripts/zellij-layout-valid-check.js +0 -1
- package/dist/scripts/zellij-pane-creation-lock-metrics-check.js +0 -1
- package/dist/scripts/zellij-pane-lock-concurrency-blackbox.js +0 -1
- package/dist/scripts/zellij-pane-lock-does-not-block-worker-check.js +0 -1
- package/dist/scripts/zellij-pane-lock-open-worker-integration-blackbox.js +0 -1
- package/dist/scripts/zellij-pane-proof-check.js +0 -1
- package/dist/scripts/zellij-qa-app-handoff-status-check.js +0 -1
- package/dist/scripts/zellij-real-session-cleanup-check.js +0 -1
- package/dist/scripts/zellij-real-session-launch-check.js +0 -1
- package/dist/scripts/zellij-right-column-geometry-proof.js +0 -1
- package/dist/scripts/zellij-right-column-headless-overflow-check.js +0 -1
- package/dist/scripts/zellij-right-column-manager-check.js +0 -1
- package/dist/scripts/zellij-screen-proof-check.js +0 -1
- package/dist/scripts/zellij-slot-only-ui-check.js +0 -1
- package/dist/scripts/zellij-slot-pane-renderer-check.js +0 -1
- package/dist/scripts/zellij-slot-pane-stale-detection-check.js +0 -7
- package/dist/scripts/zellij-slot-telemetry-incremental-check.js +0 -1
- package/dist/scripts/zellij-slot-telemetry-live-flush-check.js +0 -1
- package/dist/scripts/zellij-slot-telemetry-performance-check.js +0 -1
- package/dist/scripts/zellij-stacked-capability-routing-check.js +0 -1
- package/dist/scripts/zellij-stacked-fallback-integration-blackbox.js +0 -1
- package/dist/scripts/zellij-stacked-version-matrix-check.js +0 -1
- package/dist/scripts/zellij-stacked-version-parser-check.js +0 -1
- package/dist/scripts/zellij-ui-design-check.js +0 -12
- package/dist/scripts/zellij-update-prompt-matrix-check.js +0 -1
- package/dist/scripts/zellij-update-prompt-mode-check.js +0 -1
- package/dist/scripts/zellij-update-prompt-safety-check.js +0 -1
- package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -2
- package/package.json +1 -1
|
@@ -6,9 +6,6 @@ import { assertCodexAppUiMutationAllowed } from './codex-app-ui-clobber-guard.js
|
|
|
6
6
|
import { codexProviderModelUiStatus } from '../codex-app.js';
|
|
7
7
|
import { cleanupCodexConfigBackups } from '../codex/codex-config-toml.js';
|
|
8
8
|
export const CODEX_APP_FAST_UI_REPAIR_SCHEMA = 'sks.codex-app-fast-ui-repair.v1';
|
|
9
|
-
// `service_tier = "fast"` and `[features].fast_mode = true` are capability
|
|
10
|
-
// signals. Removing either would turn Fast off rather than restore native UI.
|
|
11
|
-
// Only provenance-backed SKS global provider/model/reasoning locks are removed.
|
|
12
9
|
const FAST_UI_TOP_LEVEL_RE = /^\s*(?:model_provider|model|model_reasoning_effort)\s*=/;
|
|
13
10
|
const FAST_UI_LEGACY_TABLES = new Set(['user.fast_mode', 'profiles.sks-fast-high']);
|
|
14
11
|
export async function repairCodexAppFastUi(root = process.cwd(), input = {}) {
|
|
@@ -81,6 +78,7 @@ export async function repairCodexAppFastUi(root = process.cwd(), input = {}) {
|
|
|
81
78
|
const applied = actions.some((action) => action.status === 'repaired');
|
|
82
79
|
const pending = actions.some((action) => action.changed && action.status !== 'repaired');
|
|
83
80
|
const requiresConfirmation = unsafeReasons.length > 0 && input.force !== true;
|
|
81
|
+
const chatgptOauthInactive = after.indicators.chat_surface === 'chatgpt_oauth_inactive';
|
|
84
82
|
const selectedProviderBlockers = Array.isArray(providerModelUi.selected_provider_blockers)
|
|
85
83
|
? providerModelUi.selected_provider_blockers
|
|
86
84
|
: [];
|
|
@@ -114,7 +112,10 @@ export async function repairCodexAppFastUi(root = process.cwd(), input = {}) {
|
|
|
114
112
|
actions,
|
|
115
113
|
before_fast_selector: before.indicators.fast_selector,
|
|
116
114
|
after_fast_selector: after.indicators.fast_selector,
|
|
117
|
-
|
|
115
|
+
auth_mode: after.indicators.auth_mode,
|
|
116
|
+
chat_surface: after.indicators.chat_surface,
|
|
117
|
+
chatgpt_oauth_backup_available: after.indicators.chatgpt_oauth_backup_available,
|
|
118
|
+
next_action: requiresConfirmation ? 'Run `sks doctor --fix --repair-codex-app-ui` after reviewing the repair plan.' : manual && safeAutoApply ? 'Run `sks doctor --fix` to apply the safe Codex App UI repair.' : manual ? 'Run `sks doctor --fix --repair-codex-app-ui` after reviewing the repair plan.' : chatgptOauthInactive ? 'Run `sks codex-lb use-oauth --restart-app` to restore the Codex App Chat/Pro surface. This explicit switch leaves saved codex-lb credentials available for later reuse.' : changed ? 'Restart Codex App if the selector was already hidden.' : 'No Codex App UI repair needed.',
|
|
118
119
|
blockers
|
|
119
120
|
};
|
|
120
121
|
if (input.reportPath)
|
|
@@ -165,9 +166,6 @@ function stripProjectLocalForbiddenKeys(text) {
|
|
|
165
166
|
}
|
|
166
167
|
function stripSksCausedHostOwnedLines(text) {
|
|
167
168
|
const sourceLines = String(text || '').split(/\r?\n/);
|
|
168
|
-
// An active, contract-shaped codex-lb selection is a runtime provider choice,
|
|
169
|
-
// not a Fast UI lock. Preserve it so Desktop keeps GPT-5.6/tool exposure after
|
|
170
|
-
// project→global config migration markers are present.
|
|
171
169
|
const preserveCodexLbSelection = hasActiveCodexLbProviderSelection(text);
|
|
172
170
|
const stripped = stripMatchingLines(text, (line, table, _previous, _next, index) => {
|
|
173
171
|
const isLegacyFastTable = table ? FAST_UI_LEGACY_TABLES.has(table) : false;
|
|
@@ -26,6 +26,7 @@ export async function snapshotCodexAppUiState(root = process.cwd(), input = {})
|
|
|
26
26
|
const home = codexHome(input);
|
|
27
27
|
const files = await snapshotConfigFiles(resolvedRoot, home);
|
|
28
28
|
const authMetadata = await readAuthMetadata(path.join(home, 'auth.json'));
|
|
29
|
+
const authBackupMetadata = await readAuthMetadata(path.join(home, 'auth.chatgpt-backup.json'));
|
|
29
30
|
const appPreferenceFiles = await discoverAppPreferenceFiles(home);
|
|
30
31
|
const sksManagedBlocks = files.flatMap((file) => findSksManagedBlocks(file));
|
|
31
32
|
const projectLocalForbiddenKeys = files.flatMap((file) => file.forbidden_project_local_keys || []);
|
|
@@ -45,13 +46,19 @@ export async function snapshotCodexAppUiState(root = process.cwd(), input = {})
|
|
|
45
46
|
return true;
|
|
46
47
|
if (signal.key_path.startsWith('user.fast_mode') && /hidden|fixed|disabled|false/i.test(signal.value_preview))
|
|
47
48
|
return true;
|
|
48
|
-
// Active contract-valid codex-lb selection is a provider choice, not a Fast UI lock.
|
|
49
49
|
if (signal.key_path === 'model_provider' && activeCodexLbSelection)
|
|
50
50
|
return false;
|
|
51
51
|
if (SKS_GLOBAL_UI_LOCK_KEYS.has(signal.key_path) && signal.sks_related)
|
|
52
52
|
return true;
|
|
53
53
|
return false;
|
|
54
54
|
});
|
|
55
|
+
const authMode = authMetadataMode(authMetadata);
|
|
56
|
+
const chatgptOauthBackupAvailable = authMetadataMode(authBackupMetadata) === 'chatgpt_oauth';
|
|
57
|
+
const chatSurface = authMode === 'chatgpt_oauth' || authMode === 'browser_marker'
|
|
58
|
+
? 'available'
|
|
59
|
+
: authMode === 'apikey' && chatgptOauthBackupAvailable
|
|
60
|
+
? 'chatgpt_oauth_inactive'
|
|
61
|
+
: 'unknown';
|
|
55
62
|
return {
|
|
56
63
|
schema: CODEX_APP_UI_STATE_SNAPSHOT_SCHEMA,
|
|
57
64
|
generated_at: nowIso(),
|
|
@@ -59,6 +66,7 @@ export async function snapshotCodexAppUiState(root = process.cwd(), input = {})
|
|
|
59
66
|
codex_home: redactHome(home),
|
|
60
67
|
files,
|
|
61
68
|
auth_metadata: authMetadata,
|
|
69
|
+
auth_backup_metadata: authBackupMetadata,
|
|
62
70
|
app_preference_files: appPreferenceFiles,
|
|
63
71
|
sks_managed_blocks: sksManagedBlocks,
|
|
64
72
|
indicators: {
|
|
@@ -67,7 +75,10 @@ export async function snapshotCodexAppUiState(root = process.cwd(), input = {})
|
|
|
67
75
|
provider_signals: providerSignals,
|
|
68
76
|
host_owned_signal_count: hostOwnedSignals.length,
|
|
69
77
|
project_local_forbidden_keys: [...new Set(projectLocalForbiddenKeys)],
|
|
70
|
-
secret_leak_suspected: JSON.stringify({ files, authMetadata }).match(/sk-[A-Za-z0-9_-]{16,}|CODEX_LB_API_KEY\s*=\s*["'][^"']+/) != null
|
|
78
|
+
secret_leak_suspected: JSON.stringify({ files, authMetadata, authBackupMetadata }).match(/sk-[A-Za-z0-9_-]{16,}|CODEX_LB_API_KEY\s*=\s*["'][^"']+/) != null,
|
|
79
|
+
auth_mode: authMode,
|
|
80
|
+
chatgpt_oauth_backup_available: chatgptOauthBackupAvailable,
|
|
81
|
+
chat_surface: chatSurface
|
|
71
82
|
}
|
|
72
83
|
};
|
|
73
84
|
}
|
|
@@ -149,8 +160,11 @@ export function isSksOwnedGlobalUiLock(lines, index) {
|
|
|
149
160
|
const candidate = String(lines[cursor] || '').trim();
|
|
150
161
|
if (!candidate)
|
|
151
162
|
continue;
|
|
152
|
-
if (candidate.startsWith('#'))
|
|
153
|
-
|
|
163
|
+
if (candidate.startsWith('#')) {
|
|
164
|
+
if (isSksGlobalUiLockMarker(candidate))
|
|
165
|
+
return true;
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
154
168
|
if (/^\s*\[/.test(candidate))
|
|
155
169
|
return false;
|
|
156
170
|
const previousKey = candidate.match(/^([A-Za-z0-9_-]+)\s*=/)?.[1] || '';
|
|
@@ -232,13 +246,37 @@ function sanitizeAuthMetadata(value) {
|
|
|
232
246
|
return { type: typeof value };
|
|
233
247
|
const record = value;
|
|
234
248
|
const keys = Object.keys(record).sort();
|
|
249
|
+
const authMode = normalizeAuthMode(record);
|
|
235
250
|
return {
|
|
236
251
|
keys,
|
|
237
|
-
|
|
238
|
-
|
|
252
|
+
auth_mode: authMode,
|
|
253
|
+
has_chatgpt_auth: authMode === 'chatgpt_oauth' || authMode === 'browser_marker',
|
|
254
|
+
has_api_key_material: authMode === 'apikey',
|
|
239
255
|
redacted: Object.fromEntries(keys.map((key) => [key, SECRET_KEY_RE.test(key) ? '<redacted>' : summarizeMetadataValue(record[key])]))
|
|
240
256
|
};
|
|
241
257
|
}
|
|
258
|
+
function authMetadataMode(value) {
|
|
259
|
+
if (value == null)
|
|
260
|
+
return 'missing';
|
|
261
|
+
const mode = String(value.auth_mode || '');
|
|
262
|
+
return ['chatgpt_oauth', 'apikey', 'browser_marker'].includes(mode)
|
|
263
|
+
? mode
|
|
264
|
+
: 'unknown';
|
|
265
|
+
}
|
|
266
|
+
function normalizeAuthMode(record) {
|
|
267
|
+
const rawMode = String(record.auth_mode || record.authMode || record.mode || '').trim().toLowerCase();
|
|
268
|
+
const tokens = record.tokens && typeof record.tokens === 'object' ? record.tokens : null;
|
|
269
|
+
const hasOauthTokens = Boolean(tokens && Object.keys(tokens).some((key) => /access|refresh|id[_-]?token/i.test(key)))
|
|
270
|
+
|| Object.keys(record).some((key) => /^(?:access|refresh|id)[_-]?token$/i.test(key));
|
|
271
|
+
const hasApiKey = Object.keys(record).some((key) => /^(?:openai_)?api[_-]?key$|^key$/i.test(key));
|
|
272
|
+
if (/chatgpt|oauth/.test(rawMode) || hasOauthTokens)
|
|
273
|
+
return 'chatgpt_oauth';
|
|
274
|
+
if (rawMode === 'browser')
|
|
275
|
+
return 'browser_marker';
|
|
276
|
+
if (/api[-_]?key|apikey/.test(rawMode) || hasApiKey)
|
|
277
|
+
return 'apikey';
|
|
278
|
+
return 'unknown';
|
|
279
|
+
}
|
|
242
280
|
function summarizeMetadataValue(value) {
|
|
243
281
|
if (value == null)
|
|
244
282
|
return null;
|
|
@@ -289,7 +327,6 @@ function hasActiveCodexLbProviderSelectionSignals(signals) {
|
|
|
289
327
|
return false;
|
|
290
328
|
const has = (key, value) => signals.some((signal) => signal.key_path === key && signal.value_preview === value);
|
|
291
329
|
const present = (key) => signals.some((signal) => signal.key_path === key);
|
|
292
|
-
// env_key / requires_openai_auth previews are redacted by SECRET_KEY_RE ("key"/"auth").
|
|
293
330
|
return has('model_providers.codex-lb.name', 'openai')
|
|
294
331
|
&& has('model_providers.codex-lb.wire_api', 'responses')
|
|
295
332
|
&& present('model_providers.codex-lb.env_key')
|
package/dist/core/codex-app.js
CHANGED
|
@@ -874,7 +874,6 @@ async function codexFastModeConfigStatus(opts = {}) {
|
|
|
874
874
|
const line = lines[index] || '';
|
|
875
875
|
if (!/^\s*model_reasoning_effort\s*=/.test(line))
|
|
876
876
|
continue;
|
|
877
|
-
// Preserve unmarked user reasoning choices. Only SKS-provenanced locks hide Fast UI.
|
|
878
877
|
if (config.scope === 'global' ? isSksOwnedGlobalUiLock(lines, index) : true) {
|
|
879
878
|
blockers.push(`${config.scope}:top_level_model_reasoning_effort`);
|
|
880
879
|
}
|
|
@@ -882,9 +881,6 @@ async function codexFastModeConfigStatus(opts = {}) {
|
|
|
882
881
|
if (/(^|\n)\s*fast_default_opt_out\s*=\s*true\s*(?:#.*)?(?=\n|$)/.test(tomlTable(config.text, 'notice')))
|
|
883
882
|
blockers.push(`${config.scope}:fast_default_opt_out`);
|
|
884
883
|
}
|
|
885
|
-
// 2026-07 renewal: [user.fast_mode] left the config schema. Its PRESENCE is now
|
|
886
|
-
// the defect (a stale legacy stamp), not its absence — the old visible/enabled
|
|
887
|
-
// "missing" blockers inverted into a single legacy-residue blocker.
|
|
888
884
|
const merged = configs.map((config) => config.text).join('\n');
|
|
889
885
|
if (tomlTable(merged, 'user.fast_mode').trim())
|
|
890
886
|
blockers.push('user.fast_mode.legacy_table_present');
|
|
@@ -970,8 +966,6 @@ export async function codexProviderModelUiStatus(opts = {}) {
|
|
|
970
966
|
const loadedEnv = await loadCodexLbEnv({ home, envPath: codexLbEnvFilePath }).catch(() => null);
|
|
971
967
|
liveCatalog = loadedEnv ? await readCodexLbModelCatalog({ loadedEnv }).catch(() => null) : null;
|
|
972
968
|
}
|
|
973
|
-
// Prefer the persisted Codex-owned catalog that Desktop actually loads. Live
|
|
974
|
-
// /models remains freshness telemetry and a fallback when no managed file exists.
|
|
975
969
|
const codexLbModelCatalog = opts.codexLbModelCatalog || (persistedCatalog?.ok
|
|
976
970
|
? {
|
|
977
971
|
ok: true,
|
|
@@ -1020,9 +1014,6 @@ export async function codexProviderModelUiStatus(opts = {}) {
|
|
|
1020
1014
|
const setKeyCommand = 'sks codex-lb set-key --api-key-stdin';
|
|
1021
1015
|
return {
|
|
1022
1016
|
schema: 'sks.codex-app-provider-model-ui.v1',
|
|
1023
|
-
// The top-level readiness contract is intentionally scoped to the active
|
|
1024
|
-
// provider. Optional GLM/OpenRouter and codex-lb setup diagnostics remain
|
|
1025
|
-
// visible below without making an unrelated provider selection fail.
|
|
1026
1017
|
ok: selectedProviderBlockers.length === 0,
|
|
1027
1018
|
selected_provider_ok: selectedProviderBlockers.length === 0,
|
|
1028
1019
|
selected_provider: codexLbSelectedDefault ? 'codex-lb' : 'oauth',
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import {} from './codex-schema-snapshot.js';
|
|
2
2
|
export function buildPreToolUseContinue(options = {}) {
|
|
3
|
-
|
|
3
|
+
const output = { continue: true };
|
|
4
|
+
const additionalContext = optionalText(options.additionalContext);
|
|
5
|
+
if (additionalContext) {
|
|
6
|
+
output.hookSpecificOutput = {
|
|
7
|
+
hookEventName: 'PreToolUse',
|
|
8
|
+
additionalContext
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
return withOptionalSystemMessage(output, options.systemMessage);
|
|
4
12
|
}
|
|
5
13
|
export function buildPreToolUseDeny(reason, options = {}) {
|
|
6
14
|
const trimmed = requiredReason(reason, 'PreToolUse deny requires a non-empty reason');
|
|
@@ -25,7 +25,7 @@ export function normalizeCodexHookOutput(name, result = {}) {
|
|
|
25
25
|
}
|
|
26
26
|
if (decision === 'allow' && out.updatedInput !== undefined)
|
|
27
27
|
return buildPreToolUseAllowRewrite(out.updatedInput, { systemMessage });
|
|
28
|
-
return buildPreToolUseContinue({ systemMessage });
|
|
28
|
+
return buildPreToolUseContinue({ additionalContext: out.additionalContext, systemMessage });
|
|
29
29
|
}
|
|
30
30
|
if (eventName === 'PermissionRequest') {
|
|
31
31
|
if (out.decision === 'deny' || out.permissionDecision === 'deny') {
|
|
@@ -98,8 +98,9 @@ function validatePreToolUse(output, issues) {
|
|
|
98
98
|
const specific = asRecord(output.hookSpecificOutput);
|
|
99
99
|
if (!specific)
|
|
100
100
|
return;
|
|
101
|
-
if (specific.additionalContext !== undefined)
|
|
102
|
-
|
|
101
|
+
if (specific.additionalContext !== undefined && typeof specific.additionalContext !== 'string') {
|
|
102
|
+
pushIssue(issues, 'schema_violation', 'pretooluse_additional_context_type', 'PreToolUse additionalContext must be a string.', '$.hookSpecificOutput.additionalContext', { upstream_supported: false });
|
|
103
|
+
}
|
|
103
104
|
const decision = specific.permissionDecision;
|
|
104
105
|
const hasUpdatedInput = Object.prototype.hasOwnProperty.call(specific, 'updatedInput');
|
|
105
106
|
const hasReason = Object.prototype.hasOwnProperty.call(specific, 'permissionDecisionReason');
|
|
@@ -56,10 +56,18 @@ export async function detectCodexHookOutputWarnings(eventLike, output) {
|
|
|
56
56
|
function unknownTopLevelKeyIssues(output) {
|
|
57
57
|
if (!output || typeof output !== 'object' || Array.isArray(output))
|
|
58
58
|
return [];
|
|
59
|
-
const allowed = new Set([
|
|
59
|
+
const allowed = new Set([
|
|
60
|
+
'continue',
|
|
61
|
+
'decision',
|
|
62
|
+
'reason',
|
|
63
|
+
'hookSpecificOutput',
|
|
64
|
+
'stopReason',
|
|
65
|
+
'suppressOutput',
|
|
66
|
+
'systemMessage'
|
|
67
|
+
]);
|
|
60
68
|
return Object.keys(output)
|
|
61
69
|
.filter((key) => !allowed.has(key))
|
|
62
|
-
.map((key) => makeCodexHookIssue('
|
|
70
|
+
.map((key) => makeCodexHookIssue('schema_violation', 'unknown_field', `Unknown top-level hook field is not accepted by the Codex hook output schema: ${key}.`, { path: `$.${key}`, upstream_supported: false, sks_disallowed: true }));
|
|
63
71
|
}
|
|
64
72
|
export async function codexHookWarningCheck(root, opts = {}) {
|
|
65
73
|
root ||= await projectRoot();
|
|
@@ -46,7 +46,6 @@ export async function inspectCodexLbCliLaunchRecovery(input) {
|
|
|
46
46
|
: configLayer(await readText(projectConfigPath, '').catch(() => ''), 'project');
|
|
47
47
|
const overrides = cliConfigOverrides(args);
|
|
48
48
|
const environmentSelectsCodexLb = env.SKS_PROVIDER === 'codex-lb' || env.SKS_USE_CODEX_LB === '1';
|
|
49
|
-
// Local-provider CLI options are the final operator intent.
|
|
50
49
|
if (cliSelectsLocalProvider(args)) {
|
|
51
50
|
return codexLbToolOutputRecoveryNotSelected();
|
|
52
51
|
}
|
|
@@ -59,8 +58,6 @@ export async function inspectCodexLbCliLaunchRecovery(input) {
|
|
|
59
58
|
if (projectConfig.hasMachineLocalProviderConfig) {
|
|
60
59
|
return projectProviderConfigBlocked();
|
|
61
60
|
}
|
|
62
|
-
// Explicit model-provider overrides still win over user/profile defaults,
|
|
63
|
-
// but only after repository-local provider redirects have been rejected.
|
|
64
61
|
if (overrides.modelProvider && overrides.modelProvider !== 'codex-lb') {
|
|
65
62
|
return codexLbToolOutputRecoveryNotSelected();
|
|
66
63
|
}
|
|
@@ -160,17 +160,9 @@ export function auditToolOutputContinuity(events) {
|
|
|
160
160
|
missingToolCallIds: [...openToolCalls]
|
|
161
161
|
};
|
|
162
162
|
}
|
|
163
|
-
/**
|
|
164
|
-
* @deprecated Use auditToolOutputContinuity. Retained for one-release source
|
|
165
|
-
* compatibility; this helper only audits and never repairs protocol state.
|
|
166
|
-
*/
|
|
167
163
|
export function auditToolCallSequence(events) {
|
|
168
164
|
return auditToolOutputContinuity(events);
|
|
169
165
|
}
|
|
170
|
-
/**
|
|
171
|
-
* @deprecated This post-run helper cannot repair the Responses protocol. It now
|
|
172
|
-
* preserves the event stream and reports missing outputs for fail-closed callers.
|
|
173
|
-
*/
|
|
174
166
|
export function repairToolCallSequence(events) {
|
|
175
167
|
const audit = auditToolOutputContinuity(events);
|
|
176
168
|
return {
|
|
@@ -179,9 +179,6 @@ async function prepareCodexLbToolCatalog(input, policy) {
|
|
|
179
179
|
if (!isolatedCodexHome) {
|
|
180
180
|
return { schema: 'sks.codex-lb-tool-catalog.v1', ok: false, required: true, status: 'blocked', path: null, blockers: ['codex_sdk_isolated_codex_home_missing'] };
|
|
181
181
|
}
|
|
182
|
-
// Model catalogs contain no bearer secret and are identity-bound, owner-only
|
|
183
|
-
// files. Keep one validated global cache so isolated worker CODEX_HOME roots do
|
|
184
|
-
// not each spend a model-call slot fetching the same catalog.
|
|
185
182
|
const sharedCodexHome = String(process.env.CODEX_HOME || path.join(os.homedir(), '.codex'));
|
|
186
183
|
return ensureCodexLbToolCatalog({
|
|
187
184
|
codexHome: isolatedCodexHome,
|
|
@@ -3,8 +3,6 @@ export function buildCodexSdkConfig(input) {
|
|
|
3
3
|
const model = String(input.model || process.env.SKS_CODEX_MODEL || process.env.CODEX_MODEL || '').trim();
|
|
4
4
|
const serviceTier = String(input.serviceTier || process.env.SKS_SERVICE_TIER || 'fast');
|
|
5
5
|
const config = {
|
|
6
|
-
// Internal control-plane work is always native Codex. Ambient proxy
|
|
7
|
-
// credentials are not provider-selection consent.
|
|
8
6
|
model_provider: 'openai',
|
|
9
7
|
forced_login_method: 'chatgpt',
|
|
10
8
|
service_tier: serviceTier === 'standard' ? 'standard' : 'fast',
|
|
@@ -91,7 +91,12 @@ export async function prepareNativeCodexAuthBridge(env, opts = {}) {
|
|
|
91
91
|
}
|
|
92
92
|
const nativeHome = String(process.env.HOME || os.homedir());
|
|
93
93
|
const sourceHome = path.resolve(String(process.env.CODEX_HOME || path.join(nativeHome, '.codex')));
|
|
94
|
-
const
|
|
94
|
+
const primaryAuthCandidate = path.join(sourceHome, 'auth.json');
|
|
95
|
+
const backupAuthCandidate = path.join(sourceHome, 'auth.chatgpt-backup.json');
|
|
96
|
+
let sourceAuthCandidate = primaryAuthCandidate;
|
|
97
|
+
let sourceAuthProof = 'host_codex_home/auth.json';
|
|
98
|
+
let oauthBackupUsed = false;
|
|
99
|
+
let primaryAuthStatus = 'chatgpt_oauth';
|
|
95
100
|
const originalHome = String(env.HOME || '');
|
|
96
101
|
const originalCodexHome = String(env.CODEX_HOME || '');
|
|
97
102
|
let tempRoot = null;
|
|
@@ -176,24 +181,35 @@ export async function prepareNativeCodexAuthBridge(env, opts = {}) {
|
|
|
176
181
|
}
|
|
177
182
|
};
|
|
178
183
|
try {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
+
let source;
|
|
185
|
+
try {
|
|
186
|
+
source = await readNativeCodexOAuthSource(primaryAuthCandidate, 'native_codex_auth_source');
|
|
187
|
+
}
|
|
188
|
+
catch (error) {
|
|
189
|
+
const reason = String(error?.message || error);
|
|
190
|
+
if (reason === 'native_codex_auth_api_key_forbidden')
|
|
191
|
+
primaryAuthStatus = 'api_key';
|
|
192
|
+
else if (reason === 'native_codex_auth_source_missing')
|
|
193
|
+
primaryAuthStatus = 'missing';
|
|
194
|
+
else
|
|
195
|
+
throw error;
|
|
196
|
+
try {
|
|
197
|
+
source = await readNativeCodexOAuthSource(backupAuthCandidate, 'native_codex_auth_backup');
|
|
198
|
+
sourceAuthCandidate = backupAuthCandidate;
|
|
199
|
+
sourceAuthProof = 'host_codex_home/auth.chatgpt-backup.json';
|
|
200
|
+
oauthBackupUsed = true;
|
|
201
|
+
}
|
|
202
|
+
catch {
|
|
203
|
+
throw error;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
const { pathStat: sourcePathStat, text: sourceText, auth: sourceAuth } = source;
|
|
184
207
|
const noFollow = process.platform === 'win32' ? 0 : fsConstants.O_NOFOLLOW;
|
|
185
|
-
let sanitizedAuthText = '';
|
|
186
|
-
const sourceText = await readValidatedAuthFile(sourceAuthCandidate, {
|
|
187
|
-
expectedIdentity: { dev: sourcePathStat.dev, ino: sourcePathStat.ino },
|
|
188
|
-
requirePrivateMode: true,
|
|
189
|
-
errorPrefix: 'native_codex_auth_source'
|
|
190
|
-
});
|
|
191
|
-
const sourceAuth = parseStrictChatGptAuth(sourceText);
|
|
192
208
|
sourceAuthIdentity = { dev: sourcePathStat.dev, ino: sourcePathStat.ino };
|
|
193
209
|
sourceAuthFingerprint = fingerprintText(sourceText);
|
|
194
210
|
originalTokenFingerprint = fingerprintJson(sourceAuth.tokens);
|
|
195
211
|
originalApiKeyFields = Object.fromEntries(Object.entries(sourceAuth).filter(([key]) => isTopLevelApiKeyField(key)));
|
|
196
|
-
sanitizedAuthText = `${JSON.stringify(removeTopLevelApiKeyFields(sourceAuth), null, 2)}\n`;
|
|
212
|
+
const sanitizedAuthText = `${JSON.stringify(removeTopLevelApiKeyFields(sourceAuth), null, 2)}\n`;
|
|
197
213
|
const tempBase = await fsp.realpath(os.tmpdir());
|
|
198
214
|
tempRoot = await fsp.mkdtemp(path.join(tempBase, 'sks-native-codex-'));
|
|
199
215
|
const rootStat = await fsp.lstat(tempRoot);
|
|
@@ -246,7 +262,10 @@ export async function prepareNativeCodexAuthBridge(env, opts = {}) {
|
|
|
246
262
|
status: 'ready',
|
|
247
263
|
method: 'exclusive_copy',
|
|
248
264
|
auth_mode: 'chatgpt_oauth',
|
|
249
|
-
source:
|
|
265
|
+
source: sourceAuthProof,
|
|
266
|
+
oauth_backup_used: oauthBackupUsed,
|
|
267
|
+
primary_auth_status: primaryAuthStatus,
|
|
268
|
+
active_api_key_auth_preserved: oauthBackupUsed && primaryAuthStatus === 'api_key',
|
|
250
269
|
destination: 'private_temp_codex_home/auth.json',
|
|
251
270
|
temp_root_location: 'os_tmpdir',
|
|
252
271
|
temp_root_mode: '0700',
|
|
@@ -286,7 +305,7 @@ export async function prepareNativeCodexAuthBridge(env, opts = {}) {
|
|
|
286
305
|
ok: false,
|
|
287
306
|
status: 'blocked',
|
|
288
307
|
method: null,
|
|
289
|
-
source:
|
|
308
|
+
source: sourceAuthProof,
|
|
290
309
|
destination: 'private_temp_codex_home/auth.json',
|
|
291
310
|
cleanup_required: Boolean(tempRoot && !cleanupComplete),
|
|
292
311
|
blockers: [blocker]
|
|
@@ -304,6 +323,32 @@ export async function prepareNativeCodexAuthBridge(env, opts = {}) {
|
|
|
304
323
|
};
|
|
305
324
|
}
|
|
306
325
|
}
|
|
326
|
+
async function readNativeCodexOAuthSource(filePath, errorPrefix) {
|
|
327
|
+
let pathStat;
|
|
328
|
+
try {
|
|
329
|
+
pathStat = await fsp.lstat(filePath);
|
|
330
|
+
}
|
|
331
|
+
catch (error) {
|
|
332
|
+
if (error?.code === 'ENOENT')
|
|
333
|
+
throw new Error(`${errorPrefix}_missing`);
|
|
334
|
+
throw new Error(`${errorPrefix}_unreadable`);
|
|
335
|
+
}
|
|
336
|
+
if (pathStat.isSymbolicLink())
|
|
337
|
+
throw new Error(`${errorPrefix}_symlink_forbidden`);
|
|
338
|
+
if (!pathStat.isFile())
|
|
339
|
+
throw new Error(`${errorPrefix}_not_file`);
|
|
340
|
+
const text = await readValidatedAuthFile(filePath, {
|
|
341
|
+
expectedIdentity: { dev: pathStat.dev, ino: pathStat.ino },
|
|
342
|
+
requirePrivateMode: true,
|
|
343
|
+
requireSingleLink: true,
|
|
344
|
+
errorPrefix
|
|
345
|
+
});
|
|
346
|
+
return {
|
|
347
|
+
pathStat,
|
|
348
|
+
text,
|
|
349
|
+
auth: parseStrictChatGptAuth(text)
|
|
350
|
+
};
|
|
351
|
+
}
|
|
307
352
|
function parseStrictChatGptAuth(sourceText, opts = {}) {
|
|
308
353
|
let parsed;
|
|
309
354
|
try {
|
|
@@ -139,10 +139,6 @@ export async function runCodexTask(input) {
|
|
|
139
139
|
}
|
|
140
140
|
const result = {
|
|
141
141
|
ok: finalBlockers.length === 0,
|
|
142
|
-
// Must match backend_family below: a fake-adapter run self-reporting
|
|
143
|
-
// 'codex-sdk' here defeated every downstream `backend === 'fake'` check
|
|
144
|
-
// (fake-real-proof-policy, agent-proof-evidence, naruto-real-write-proof,
|
|
145
|
-
// etc.) that already exists specifically to disclaim fixture-only runs.
|
|
146
142
|
backend: fakeAllowed ? 'fake' : 'codex-sdk',
|
|
147
143
|
backend_family: fakeAllowed ? 'fake' : 'remote-gpt',
|
|
148
144
|
sdkThreadId: String(adapterResult?.sdkThreadId || ''),
|
|
@@ -406,9 +402,6 @@ async function runLocalControlTask(root, task, schema, routerDecision) {
|
|
|
406
402
|
...(runFailed || validation.ok ? [] : ['local_llm_structured_output_invalid', ...validation.issues.map((issue) => `schema:${issue}`)])
|
|
407
403
|
];
|
|
408
404
|
const workerResult = normalizeWorkerResult(structuredOutput, task, finalBlockers, validation.ok, 'local-llm');
|
|
409
|
-
// Stamp the local-llm request id as backend proof on model-authored patch
|
|
410
|
-
// envelopes; without it agent-patch-schema rejects every local-llm patch
|
|
411
|
-
// with model_authored_backend_proof_missing (the model cannot know the id).
|
|
412
405
|
if (Array.isArray(workerResult.patch_envelopes)) {
|
|
413
406
|
workerResult.patch_envelopes = workerResult.patch_envelopes.map((envelope) => ({
|
|
414
407
|
...envelope,
|
|
@@ -81,10 +81,6 @@ async function readRegistryForUpdate(registryPath) {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
// Previously a bespoke mkdir-lock with no stale recovery at all — a crash
|
|
85
|
-
// mid-update left every future recordCodexThread() call permanently timing
|
|
86
|
-
// out after 30s (20차 P1-2). Reuses the owner-token + heartbeat +
|
|
87
|
-
// quarantine-reclaim lock from core/locks/file-lock.ts instead.
|
|
88
84
|
function withRegistryLock(root, fn) {
|
|
89
85
|
const lockPath = path.join(root, 'codex-thread-registry.lock');
|
|
90
86
|
return withFileLock({ lockPath, timeoutMs: 30_000, staleMs: 60_000 }, fn);
|