sneakoscope 7.0.2 → 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 +46 -12
- 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 +0 -2
- 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 +580 -12
- 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 +343 -37
- 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/ProvidersViewController.swift +213 -27
- 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
|
@@ -11,6 +11,7 @@ import { codexAppSessionKey, detectCodexAppSession, runOfficialSubagentWorkflow
|
|
|
11
11
|
import { NARUTO_GATE_FILENAME, NARUTO_RESULT_SCHEMA, NARUTO_SUMMARY_FILENAME, SUBAGENT_PLAN_FILENAME, buildNarutoGateResult, buildNarutoSummary, officialSubagentPreparationInProgress, prepareOfficialSubagentMission, withOfficialSubagentLifecycleLock, withNarutoMissionRunAdmission, writeNarutoGate } from '../subagents/official-subagent-preparation.js';
|
|
12
12
|
import { recordOfficialSubagentParentOutcomesTelemetry } from '../zellij/zellij-official-subagent-telemetry.js';
|
|
13
13
|
import { effectiveSubagentTarget, refreshSubagentWaveLifecycle } from '../subagents/wave-lifecycle.js';
|
|
14
|
+
import { HOST_CAPABILITY_HOOK_RUNTIME_FILENAME, bindParentSummaryToHostCapabilityEvidence, createHostCapabilityHookRuntimeBinding, resolveHostCapabilityHookRuntimeBinding } from '../agent-bridge/host-capability-runtime.js';
|
|
14
15
|
export { buildNarutoGateResult } from '../subagents/official-subagent-preparation.js';
|
|
15
16
|
let nextNarutoPreparationFailureInjectionForTest = null;
|
|
16
17
|
export function injectNextNarutoPreparationFailureForTest(value) {
|
|
@@ -138,11 +139,14 @@ async function narutoRunTransaction(parsed, root, appSession, sessionKey, resolv
|
|
|
138
139
|
const { plan, evidence: preparationEvidence, budget, verification, delegationPrompt, workflowRunId, configBlockers } = preparation;
|
|
139
140
|
const run = await runOfficialSubagentWorkflow({
|
|
140
141
|
root,
|
|
142
|
+
goal: parsed.prompt,
|
|
141
143
|
prompt: delegationPrompt,
|
|
142
144
|
requestedSubagents: budget.requestedSubagents,
|
|
143
145
|
maxThreads: budget.maxThreads,
|
|
144
146
|
appSession,
|
|
147
|
+
projectTrusted: parsed.trustedProject,
|
|
145
148
|
missionId: id,
|
|
149
|
+
workflowRunId,
|
|
146
150
|
sessionKey,
|
|
147
151
|
...(missionLease ? { onChildSpawn: missionLease.protectChildPid } : {})
|
|
148
152
|
});
|
|
@@ -160,7 +164,21 @@ async function narutoRunTransaction(parsed, root, appSession, sessionKey, resolv
|
|
|
160
164
|
waveCount: Number(completedPlan?.wave_count ?? budget.waveCount),
|
|
161
165
|
capacity: completedPlan?.capacity_controller || budget.capacity
|
|
162
166
|
};
|
|
163
|
-
const
|
|
167
|
+
const hostCapabilityHookBinding = appSession && sessionKey && run.host_capability_runtime
|
|
168
|
+
? createHostCapabilityHookRuntimeBinding({
|
|
169
|
+
missionId: id,
|
|
170
|
+
workflowRunId,
|
|
171
|
+
sessionScope: sessionKey,
|
|
172
|
+
runtime: run.host_capability_runtime
|
|
173
|
+
})
|
|
174
|
+
: null;
|
|
175
|
+
if (hostCapabilityHookBinding) {
|
|
176
|
+
await writeJsonAtomic(path.join(dir, HOST_CAPABILITY_HOOK_RUNTIME_FILENAME), hostCapabilityHookBinding);
|
|
177
|
+
}
|
|
178
|
+
const hostCapabilityBinding = run.host_capability_evidence
|
|
179
|
+
? bindParentSummaryToHostCapabilityEvidence(run.parent_summary, run.host_capability_evidence)
|
|
180
|
+
: { value: run.parent_summary, blockers: [] };
|
|
181
|
+
const runBoundParentSummary = bindTrustworthySubagentParentSummaryToRun(hostCapabilityBinding.value, workflowRunId);
|
|
164
182
|
const effectiveParentSummary = await persistOrReuseTrustworthySubagentParentSummary(dir, runBoundParentSummary, {
|
|
165
183
|
workflowStatus: run.status,
|
|
166
184
|
runId: workflowRunId
|
|
@@ -177,7 +195,8 @@ async function narutoRunTransaction(parsed, root, appSession, sessionKey, resolv
|
|
|
177
195
|
workflowStatus: run.status,
|
|
178
196
|
preparationOnly: appSession,
|
|
179
197
|
runId: workflowRunId,
|
|
180
|
-
additionalBlockers: configBlockers
|
|
198
|
+
additionalBlockers: [...configBlockers, ...hostCapabilityBinding.blockers],
|
|
199
|
+
...(run.host_capability_evidence ? { hostCapabilityEvidence: run.host_capability_evidence } : {})
|
|
181
200
|
});
|
|
182
201
|
if (!appSession) {
|
|
183
202
|
const parentTelemetry = await recordOfficialSubagentParentOutcomesTelemetry({
|
|
@@ -207,8 +226,11 @@ async function narutoRunTransaction(parsed, root, appSession, sessionKey, resolv
|
|
|
207
226
|
const blockers = uniqueStrings([
|
|
208
227
|
...(Array.isArray(evidence.blockers) ? evidence.blockers : []),
|
|
209
228
|
...configBlockers,
|
|
229
|
+
...hostCapabilityBinding.blockers,
|
|
210
230
|
...(Array.isArray(run.blockers) ? run.blockers : []),
|
|
211
|
-
...(appSession
|
|
231
|
+
...(appSession && run.status === 'delegation_context_ready'
|
|
232
|
+
? ['official_subagent_execution_pending_in_current_parent']
|
|
233
|
+
: [])
|
|
212
234
|
]);
|
|
213
235
|
const gate = await writeNarutoGate(dir, {
|
|
214
236
|
missionId: id,
|
|
@@ -220,7 +242,7 @@ async function narutoRunTransaction(parsed, root, appSession, sessionKey, resolv
|
|
|
220
242
|
const passed = gate.passed === true;
|
|
221
243
|
const status = passed
|
|
222
244
|
? 'completed'
|
|
223
|
-
: appSession
|
|
245
|
+
: appSession && run.status === 'delegation_context_ready'
|
|
224
246
|
? 'delegation_context_ready'
|
|
225
247
|
: run.ok === true
|
|
226
248
|
? 'incomplete'
|
|
@@ -245,7 +267,11 @@ async function narutoRunTransaction(parsed, root, appSession, sessionKey, resolv
|
|
|
245
267
|
mission_id: id,
|
|
246
268
|
official_subagent_run_id: workflowRunId,
|
|
247
269
|
session_scope: sessionKey,
|
|
248
|
-
phase: passed
|
|
270
|
+
phase: passed
|
|
271
|
+
? 'NARUTO_COMPLETE'
|
|
272
|
+
: appSession && run.status === 'delegation_context_ready'
|
|
273
|
+
? 'NARUTO_DELEGATION_CONTEXT_READY'
|
|
274
|
+
: 'NARUTO_BLOCKED',
|
|
249
275
|
subagents_verified: evidence.ok === true,
|
|
250
276
|
requested_subagents: finalBudget.requestedSubagents,
|
|
251
277
|
target_subagents: evidence.target_subagents,
|
|
@@ -262,7 +288,7 @@ async function narutoRunTransaction(parsed, root, appSession, sessionKey, resolv
|
|
|
262
288
|
...summary,
|
|
263
289
|
mission_id: id,
|
|
264
290
|
attached_to_pending_run: false,
|
|
265
|
-
additionalContext: appSession ? run.additionalContext : undefined,
|
|
291
|
+
additionalContext: appSession && run.status === 'delegation_context_ready' ? run.additionalContext : undefined,
|
|
266
292
|
artifacts: narutoArtifactLinks(evidence)
|
|
267
293
|
};
|
|
268
294
|
});
|
|
@@ -286,15 +312,21 @@ async function narutoRunTransaction(parsed, root, appSession, sessionKey, resolv
|
|
|
286
312
|
async function readPendingAppNarutoRun(root, mission, sessionKey, prompt) {
|
|
287
313
|
if (await officialSubagentPreparationInProgress(mission.dir))
|
|
288
314
|
return null;
|
|
289
|
-
const [plan, evidence, summary, gate, state] = await Promise.all([
|
|
315
|
+
const [plan, evidence, summary, gate, state, rawHostCapabilityBinding] = await Promise.all([
|
|
290
316
|
readJson(path.join(mission.dir, SUBAGENT_PLAN_FILENAME), null),
|
|
291
317
|
readJson(path.join(mission.dir, 'subagent-evidence.json'), null),
|
|
292
318
|
readJson(path.join(mission.dir, NARUTO_SUMMARY_FILENAME), null),
|
|
293
319
|
readJson(path.join(mission.dir, NARUTO_GATE_FILENAME), null),
|
|
294
|
-
loadStateForSession(root, sessionKey).catch(() => null)
|
|
320
|
+
loadStateForSession(root, sessionKey).catch(() => null),
|
|
321
|
+
readJson(path.join(mission.dir, HOST_CAPABILITY_HOOK_RUNTIME_FILENAME), null).catch(() => null)
|
|
295
322
|
]);
|
|
296
323
|
const workflowRunId = String(plan?.workflow_run_id || '').trim();
|
|
297
324
|
const sessionMatches = state?._session_key === sessionStateKey(sessionKey);
|
|
325
|
+
const hostCapabilityScopeMatches = Boolean(resolveHostCapabilityHookRuntimeBinding(rawHostCapabilityBinding, {
|
|
326
|
+
missionId: mission.id,
|
|
327
|
+
workflowRunId,
|
|
328
|
+
sessionScope: sessionKey
|
|
329
|
+
}).binding);
|
|
298
330
|
const pending = Boolean(workflowRunId
|
|
299
331
|
&& plan?.schema === 'sks.subagent-plan.v1'
|
|
300
332
|
&& plan?.workflow === 'official_codex_subagent'
|
|
@@ -319,7 +351,8 @@ async function readPendingAppNarutoRun(root, mission, sessionKey, prompt) {
|
|
|
319
351
|
&& state?.official_subagent_run_id === workflowRunId
|
|
320
352
|
&& state?.session_scope === sessionKey
|
|
321
353
|
&& state?.route_closed !== true
|
|
322
|
-
&& state?.phase === 'NARUTO_DELEGATION_CONTEXT_READY'
|
|
354
|
+
&& state?.phase === 'NARUTO_DELEGATION_CONTEXT_READY'
|
|
355
|
+
&& hostCapabilityScopeMatches);
|
|
323
356
|
if (!pending)
|
|
324
357
|
return null;
|
|
325
358
|
return {
|
|
@@ -567,6 +600,7 @@ export function parseNarutoArgs(args) {
|
|
|
567
600
|
missionId: String(missionFlag || positionalMission || 'latest'),
|
|
568
601
|
json: normalized.includes('--json'),
|
|
569
602
|
readOnly: normalized.includes('--readonly') || normalized.includes('--read-only'),
|
|
603
|
+
trustedProject: optionArgs.includes('--trusted-project'),
|
|
570
604
|
argumentErrors: uniqueStrings(argumentErrors)
|
|
571
605
|
};
|
|
572
606
|
}
|
|
@@ -575,7 +609,7 @@ function positionalValues(args) {
|
|
|
575
609
|
'--agents', '--max-threads', '--mission', '--mission-id'
|
|
576
610
|
]);
|
|
577
611
|
const booleanFlags = new Set([
|
|
578
|
-
'--json', '--readonly', '--read-only'
|
|
612
|
+
'--json', '--readonly', '--read-only', '--trusted-project'
|
|
579
613
|
]);
|
|
580
614
|
const result = [];
|
|
581
615
|
for (let index = 0; index < args.length; index += 1) {
|
|
@@ -638,7 +672,7 @@ function optionErrors(name, option, numeric) {
|
|
|
638
672
|
function unknownOptionErrors(args) {
|
|
639
673
|
const canonical = new Set([
|
|
640
674
|
'--agents', '--max-threads', '--mission', '--mission-id',
|
|
641
|
-
'--json', '--readonly', '--read-only', '--help', '-h', '--'
|
|
675
|
+
'--json', '--readonly', '--read-only', '--trusted-project', '--help', '-h', '--'
|
|
642
676
|
]);
|
|
643
677
|
const errors = [];
|
|
644
678
|
const optionArgs = args.includes('--') ? args.slice(0, args.indexOf('--')) : args;
|
|
@@ -652,7 +686,7 @@ function unknownOptionErrors(args) {
|
|
|
652
686
|
return errors;
|
|
653
687
|
}
|
|
654
688
|
function booleanOptionErrors(args) {
|
|
655
|
-
const booleanNames = new Set(['--json', '--readonly', '--read-only', '--help', '-h']);
|
|
689
|
+
const booleanNames = new Set(['--json', '--readonly', '--read-only', '--trusted-project', '--help', '-h']);
|
|
656
690
|
const optionArgs = args.includes('--') ? args.slice(0, args.indexOf('--')) : args;
|
|
657
691
|
const errors = [];
|
|
658
692
|
for (const arg of optionArgs) {
|
|
@@ -20,9 +20,6 @@ export async function pptCommand(command, args = []) {
|
|
|
20
20
|
if (action === 'explain')
|
|
21
21
|
return pptExplain(root, args.slice(1));
|
|
22
22
|
const missionArg = args[1] && !String(args[1]).startsWith('--') ? args[1] : 'latest';
|
|
23
|
-
// build/status act on ppt-gate.json (written by build, not the imagegen-review gate),
|
|
24
|
-
// so scope by mode only here - requiring the imagegen-review gate would wrongly exclude
|
|
25
|
-
// a fresh ppt mission that hasn't gone through review yet.
|
|
26
23
|
const missionId = missionArg === 'latest' ? await findLatestMission(root, { mode: 'ppt' }) : missionArg;
|
|
27
24
|
if (!missionId)
|
|
28
25
|
return missingMission(args);
|
|
@@ -340,12 +337,6 @@ function mockPptFixtureGate(gate = {}) {
|
|
|
340
337
|
blockers: ['ppt_fixture_mode_cannot_claim_real']
|
|
341
338
|
};
|
|
342
339
|
}
|
|
343
|
-
// The image-asset-ledger's `assets` array (see buildPptImageAssetLedger in ../ppt.ts) is the
|
|
344
|
-
// authoritative list of raster/bitmap image assets planned or generated for the deck; every
|
|
345
|
-
// entry in it is a raster PNG produced (or pending) via Codex App $imagegen/gpt-image-2. When the
|
|
346
|
-
// ledger omits `imagegen_evidence` outright, we must NOT assume the imagegen-required policy was
|
|
347
|
-
// satisfied. Instead derive a safe default from that asset list: any raster asset present forces
|
|
348
|
-
// the derived evidence to fail-closed (required + not passed) rather than silently pass.
|
|
349
340
|
function deriveImagegenEvidenceDefault(imageAssetLedger) {
|
|
350
341
|
if (imageAssetLedger?.imagegen_evidence)
|
|
351
342
|
return imageAssetLedger.imagegen_evidence;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
2
3
|
import { exists, projectRoot, runProcess, writeJsonAtomic } from '../fsx.js';
|
|
3
4
|
import { createMission, missionDir, setCurrent } from '../mission.js';
|
|
4
5
|
import { createAndWriteWorkOrderLedgerForPrompt, closeWorkOrderLedgerForRouteResult } from '../work-order-ledger.js';
|
|
@@ -392,8 +393,7 @@ async function executePreparedRoute(root, route, prompt, { prepare, run, trustSt
|
|
|
392
393
|
});
|
|
393
394
|
}
|
|
394
395
|
async function runSks(root, commandArgs, { parentMissionId = null } = {}) {
|
|
395
|
-
const packedBin =
|
|
396
|
-
const sourceBin = new URL('../../../bin/sks.js', import.meta.url).pathname;
|
|
396
|
+
const { packedBin, sourceBin } = runSksEntrypointCandidates();
|
|
397
397
|
const entrypoint = (await exists(packedBin)) ? packedBin : sourceBin;
|
|
398
398
|
return runProcess(process.execPath, [entrypoint, ...commandArgs], {
|
|
399
399
|
cwd: root,
|
|
@@ -407,6 +407,12 @@ async function runSks(root, commandArgs, { parentMissionId = null } = {}) {
|
|
|
407
407
|
},
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
|
+
export function runSksEntrypointCandidates(moduleUrl = import.meta.url) {
|
|
411
|
+
return {
|
|
412
|
+
packedBin: fileURLToPath(new URL('../../bin/sks.js', moduleUrl)),
|
|
413
|
+
sourceBin: fileURLToPath(new URL('../../../bin/sks.js', moduleUrl)),
|
|
414
|
+
};
|
|
415
|
+
}
|
|
410
416
|
function routeExecutionResult(route, command, result, options = {}) {
|
|
411
417
|
const nestedMissionId = parseMissionId(result.stdout);
|
|
412
418
|
const ok = result.code === 0;
|
|
@@ -23,8 +23,6 @@ export async function runSearchVisibilityCommand(mode, args = [], displayCommand
|
|
|
23
23
|
if (!mission)
|
|
24
24
|
blockers.push('mission_required_for_apply');
|
|
25
25
|
else {
|
|
26
|
-
// explicit_apply_only precondition: a mutation plan must already exist on disk,
|
|
27
|
-
// proving a prior `plan` step was run and reviewed before this apply can mutate anything.
|
|
28
26
|
const planGate = await evaluateLocalGate({ root: mission.root, dir: mission.dir, gateFile: mode === 'seo' ? 'seo-gate.json' : 'geo-gate.json', requiredArtifacts: ['search-visibility/mutation-plan.json'] });
|
|
29
27
|
if (planGate.blockers.includes('missing_artifact:search-visibility/mutation-plan.json'))
|
|
30
28
|
blockers.push('seo_apply_missing_mutation_plan');
|
|
@@ -103,15 +101,11 @@ async function applySearchVisibilityGateResult(mode, action, result, options) {
|
|
|
103
101
|
});
|
|
104
102
|
const blockers = [...new Set([...(result.blockers || []), ...evaluated.blockers])];
|
|
105
103
|
if (action === 'apply') {
|
|
106
|
-
// explicit_apply_only postcondition: apply must not report success unless both the mutation
|
|
107
|
-
// plan and the rollback manifest it produces are actually present on disk after execution.
|
|
108
104
|
if (blockers.includes('missing_artifact:search-visibility/mutation-plan.json') && !blockers.includes('seo_apply_missing_mutation_plan'))
|
|
109
105
|
blockers.push('seo_apply_missing_mutation_plan');
|
|
110
106
|
if (blockers.includes('missing_artifact:search-visibility/rollback-manifest.json') && !blockers.includes('seo_apply_missing_rollback_manifest'))
|
|
111
107
|
blockers.push('seo_apply_missing_rollback_manifest');
|
|
112
108
|
}
|
|
113
|
-
// Re-evaluate against the authoritative on-disk gate (catches mock/fixture-only gates,
|
|
114
|
-
// not just the presence checks `evaluateLocalGate` performs) before reporting final success.
|
|
115
109
|
const authoritative = await evaluateGate(mission.root, mission.id, gateFile);
|
|
116
110
|
if (!authoritative.pass) {
|
|
117
111
|
for (const reason of authoritative.reasons) {
|
|
@@ -240,9 +240,6 @@ async function wikiRefreshCode(args = []) {
|
|
|
240
240
|
written: written ? written.path : null
|
|
241
241
|
};
|
|
242
242
|
process.exitCode = validation.ok ? 0 : 2;
|
|
243
|
-
// Always note the counts/issues on stderr (even in --json mode, where stdout must
|
|
244
|
-
// stay pure JSON) so a blocked run is diagnosable from stderr_tail alone without
|
|
245
|
-
// needing to reproduce it separately in an isolated environment.
|
|
246
243
|
process.stderr.write(`wiki-refresh-code: root=${root} modules=${index.modules.length} entries=${pack.entries.length} token_cost=${pack.total_token_cost}/${pack.token_budget} issues=${JSON.stringify(validation.issues)}\n`);
|
|
247
244
|
if (flag(args, '--json'))
|
|
248
245
|
return console.log(JSON.stringify(result, null, 2));
|
|
@@ -251,13 +248,6 @@ async function wikiRefreshCode(args = []) {
|
|
|
251
248
|
for (const issue of validation.issues)
|
|
252
249
|
console.log(`- ${issue}`);
|
|
253
250
|
}
|
|
254
|
-
/** Cheap freshness check: compares the code pack's recorded git HEAD sha (at
|
|
255
|
-
* generation time) against the current HEAD. A commit containing only the two
|
|
256
|
-
* tracked code-pack metadata files is equivalent to the generating HEAD, which
|
|
257
|
-
* avoids an impossible self-referential commit hash. Any other uncertainty
|
|
258
|
-
* resolves to 'stale' rather than 'fresh', never overclaiming. */
|
|
259
|
-
/** Active-wrongness counts per TriWiki module id (from wrongness records' module_ids),
|
|
260
|
-
* so attention can hydrate frequently-wrong modules' code entries first. */
|
|
261
251
|
async function buildWrongnessByModule(root) {
|
|
262
252
|
const records = await readCombinedWrongnessRecords(root, null).catch(() => []);
|
|
263
253
|
const counts = {};
|
|
@@ -425,10 +415,6 @@ export async function writeWikiContextPack(root, args = [], opts = {}) {
|
|
|
425
415
|
wrongnessByModule
|
|
426
416
|
});
|
|
427
417
|
const wrongnessContext = await wrongnessContextForRoute(root, { route: '$Wiki', limit: 12 });
|
|
428
|
-
// buildTriWikiAttention's use_first/hydrate_first can reference code: ids that were
|
|
429
|
-
// never routed through selectClaims (no fabricated RGBA coordinate for them — see
|
|
430
|
-
// codePackAttentionRows), so append their real summary text here or a recallpulse
|
|
431
|
-
// consumer resolving pack.claims by id would only see the bare id string.
|
|
432
418
|
const attentionCodeIds = new Set([
|
|
433
419
|
...(pack.attention?.use_first || []),
|
|
434
420
|
...(pack.attention?.hydrate_first || [])
|
|
@@ -5,11 +5,6 @@ import { ensureDir, exists, nowIso, packageRoot, readJson, rel, sha256, writeJso
|
|
|
5
5
|
import { addVisualAnchor, ingestImage, missionImageLedgerPath } from './wiki-image/image-voxel-ledger.js';
|
|
6
6
|
const officialScreenshotAdapters = new WeakSet();
|
|
7
7
|
const officialCaptureAttestations = new WeakMap();
|
|
8
|
-
/**
|
|
9
|
-
* Production trust boundary for a Codex App Computer Use host bridge.
|
|
10
|
-
* Object-literal adapters and fixture callbacks cannot mint the in-process
|
|
11
|
-
* attestation required for live_capture_success.
|
|
12
|
-
*/
|
|
13
8
|
export function createOfficialCodexComputerUseScreenshotAdapter(captureScreenshot) {
|
|
14
9
|
if (typeof captureScreenshot !== 'function')
|
|
15
10
|
throw new TypeError('official_computer_use_capture_function_required');
|
|
@@ -118,15 +118,6 @@ export function changedOrMissingProtectedSecrets(before, after) {
|
|
|
118
118
|
})
|
|
119
119
|
.filter((item) => Boolean(item));
|
|
120
120
|
}
|
|
121
|
-
// A repair that intentionally deactivates a config block (e.g. commenting out
|
|
122
|
-
// a colliding stdio MCP server) makes the secret disappear from the *live*
|
|
123
|
-
// scan even though its value is still sitting right there in a comment, fully
|
|
124
|
-
// recoverable. Without this check the guard treats that as an accidental loss,
|
|
125
|
-
// rolls the whole file back (undoing the repair), and still throws — so the
|
|
126
|
-
// repair can never stick. Only 'missing' entries are reconsidered here: a
|
|
127
|
-
// 'changed' entry means a live value actually differs and must still trip the
|
|
128
|
-
// guard. Never reads the pre-image value itself — only re-hashes whatever text
|
|
129
|
-
// is currently on disk, so raw_values_recorded stays false throughout.
|
|
130
121
|
async function withoutSecretsPreservedInComments(entries) {
|
|
131
122
|
const textBySource = new Map();
|
|
132
123
|
const kept = [];
|
|
@@ -146,8 +137,6 @@ async function withoutSecretsPreservedInComments(entries) {
|
|
|
146
137
|
}
|
|
147
138
|
return kept;
|
|
148
139
|
}
|
|
149
|
-
/** Like readAssignment, but also matches the same key commented out (`# KEY = ...`)
|
|
150
|
-
* and returns every candidate value found, not just the first. */
|
|
151
140
|
function readAllAssignmentValues(text, key) {
|
|
152
141
|
const escaped = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&').replace(/\\\./g, '\\s*\\.\\s*');
|
|
153
142
|
const re = new RegExp(`^\\s*#?\\s*(?:export\\s+)?${escaped}\\s*=\\s*(.+?)\\s*$`, 'gm');
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Entrypoint for the detached sksd hook daemon process (spawned by
|
|
3
|
-
// spawnSksdHookDaemonDetached). Not invoked directly by users.
|
|
4
2
|
import { startSksdHookDaemon } from './sksd-hook-daemon.js';
|
|
5
3
|
import { evaluateHookPayloadOnce } from '../hooks-runtime.js';
|
|
6
4
|
const root = process.argv[2];
|
|
@@ -6,24 +6,9 @@ import path from 'node:path';
|
|
|
6
6
|
import { spawn } from 'node:child_process';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
8
|
import { sha256 } from '../fsx.js';
|
|
9
|
-
// 20차 P2-1: hook round-trip daemon. `.codex/hooks.json` fires PreToolUse/
|
|
10
|
-
// PostToolUse for every tool call, each spawning a fresh `sks hook <event>`
|
|
11
|
-
// process that cold-imports the CLI and re-does all hook setup work — the
|
|
12
|
-
// audited raw cost was ~171ms/call. This daemon keeps that work warm in a
|
|
13
|
-
// long-lived process reachable over a Unix domain socket, so a hook call
|
|
14
|
-
// only pays for a short-lived client process's own boot plus a small
|
|
15
|
-
// socket round-trip.
|
|
16
|
-
//
|
|
17
|
-
// Opt-in only for now via SKS_HOOK_DAEMON=1 (see sks-dispatch.ts) — the
|
|
18
|
-
// default `sks hook <event>` path is unchanged until this has been proven
|
|
19
|
-
// safe and .codex/hooks.json is deliberately updated to depend on it.
|
|
20
9
|
const IDLE_SHUTDOWN_MS = 30 * 60 * 1000;
|
|
21
10
|
const CONNECT_TIMEOUT_MS = 150;
|
|
22
11
|
const REQUEST_TIMEOUT_MS = 5_000;
|
|
23
|
-
// Unix domain socket paths have a ~100 byte limit on macOS/Linux. TMPDIR can
|
|
24
|
-
// itself be a deeply nested hermetic test root, so sockets use a short,
|
|
25
|
-
// per-user SKS-owned runtime directory under the platform's real /tmp. The
|
|
26
|
-
// project hash keeps independent repositories collision-free.
|
|
27
12
|
export function sksdSocketPath(root) {
|
|
28
13
|
return path.join(sksdRuntimeDir(), `sksd-${projectKey(root)}.sock`);
|
|
29
14
|
}
|
|
@@ -138,20 +123,15 @@ async function removeStaleSocketPath(socketPath) {
|
|
|
138
123
|
return;
|
|
139
124
|
if (stat.isDirectory() && !stat.isSymbolicLink())
|
|
140
125
|
throw new Error('unsafe_sksd_socket_path_directory');
|
|
141
|
-
// rm() unlinks a symlink itself; it never follows it to the target.
|
|
142
126
|
await fsp.rm(socketPath, { force: true });
|
|
143
127
|
}
|
|
144
|
-
// Called by the daemon entrypoint (registers real process signal handlers
|
|
145
|
-
// and exits the process on shutdown) and directly by tests (which own the
|
|
146
|
-
// returned handle's close() instead and must not have this call
|
|
147
|
-
// process.exit — that would kill the test runner).
|
|
148
128
|
export async function startSksdHookDaemon(root, handleHook) {
|
|
149
129
|
const socketPath = sksdSocketPath(root);
|
|
150
130
|
const pidFilePath = sksdPidFilePath(root);
|
|
151
131
|
const runtimeDir = path.dirname(socketPath);
|
|
152
132
|
await ensureSafeRuntimeDir(runtimeDir);
|
|
153
133
|
if (!(await claimPidFile(pidFilePath, root))) {
|
|
154
|
-
return null;
|
|
134
|
+
return null;
|
|
155
135
|
}
|
|
156
136
|
try {
|
|
157
137
|
await removeStaleSocketPath(socketPath);
|
|
@@ -258,11 +238,6 @@ export async function startSksdHookDaemon(root, handleHook) {
|
|
|
258
238
|
resetIdleTimer();
|
|
259
239
|
return { close };
|
|
260
240
|
}
|
|
261
|
-
// Spawns the daemon as a detached background process running this same
|
|
262
|
-
// module's entrypoint, then returns immediately — the caller (a hook
|
|
263
|
-
// client that couldn't connect) does not wait for it to finish warming up;
|
|
264
|
-
// it falls back to handling the current call itself and lets the daemon
|
|
265
|
-
// serve the *next* call.
|
|
266
241
|
export function spawnSksdHookDaemonDetached(root) {
|
|
267
242
|
const entrypoint = fileURLToPath(new URL('./sksd-hook-daemon-entrypoint.js', import.meta.url));
|
|
268
243
|
const child = spawn(process.execPath, [entrypoint, root], {
|
|
@@ -271,9 +246,6 @@ export function spawnSksdHookDaemonDetached(root) {
|
|
|
271
246
|
});
|
|
272
247
|
child.unref();
|
|
273
248
|
}
|
|
274
|
-
// Thin client used by `sks hook <event>`: attempt a fast socket round-trip;
|
|
275
|
-
// return null (never throws) if the daemon isn't reachable so the caller
|
|
276
|
-
// can fail open to the direct in-process path.
|
|
277
249
|
export async function callSksdHookDaemon(root, name, payload) {
|
|
278
250
|
const socketPath = sksdSocketPath(root);
|
|
279
251
|
if (!safeRuntimeDirPresent(path.dirname(socketPath)))
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
// Opt-in fast path for `sks hook <event>` (SKS_HOOK_DAEMON=1 only — see
|
|
2
|
-
// sks-dispatch.ts). Tries the sksd hook daemon first; on any failure to
|
|
3
|
-
// reach it, spawns the daemon in the background for next time and falls
|
|
4
|
-
// back to running the exact same evaluateHookPayload()/normalizeHookResult()
|
|
5
|
-
// logic the default path uses, so behavior is identical either way — only
|
|
6
|
-
// the latency differs (20차 P2-1).
|
|
7
|
-
//
|
|
8
|
-
// Lives under core/daemon rather than bin/ deliberately: dist/bin/ is
|
|
9
|
-
// force-loaded as CommonJS by build-dist.ts's writeCommonJsBinScope() via a
|
|
10
|
-
// hand-maintained per-file rewrite list, which this file isn't on — as a
|
|
11
|
-
// plain ESM module under core/, sks-dispatch.ts's dynamic import() of it
|
|
12
|
-
// works regardless of dist/bin/'s module-type override.
|
|
13
1
|
import { callSksdHookDaemon, spawnSksdHookDaemonDetached } from './sksd-hook-daemon.js';
|
|
14
|
-
// loadHookPayload/normalizeHookResult come from the lightweight hook-io
|
|
15
|
-
// module, not hooks-runtime.js directly — hooks-runtime.js pulls in ~20
|
|
16
|
-
// domain modules (pipeline, mission, db-safety, harness-guard, ...) that a
|
|
17
|
-
// daemon-hit call has no reason to load. evaluateHookPayload (the heavy
|
|
18
|
-
// one) is dynamically imported below, only on the fallback path.
|
|
19
2
|
import { loadHookPayload, normalizeHookResult } from '../hooks-runtime/hook-io.js';
|
|
20
3
|
import { projectRoot } from '../fsx.js';
|
|
21
4
|
export async function hookDaemonInline(name) {
|
package/dist/core/db-safety.js
CHANGED
|
@@ -646,13 +646,6 @@ async function scanSupabaseMcpConfigs(root) {
|
|
|
646
646
|
}
|
|
647
647
|
function extractSupabaseMcpUrls(text) {
|
|
648
648
|
const out = new Set();
|
|
649
|
-
// Config files (TOML/JSON) always quote URL values, so a closing quote or
|
|
650
|
-
// whitespace is the only reliable terminator. A comma is a legitimate query-string
|
|
651
|
-
// character (e.g. "...&features=database,docs") - excluding it here silently
|
|
652
|
-
// truncated multi-value features lists, which happened to be benign only because
|
|
653
|
-
// the truncated remainder still contained an allowed feature. Stopping at ')'/'>' is
|
|
654
|
-
// unnecessary for structured config scanning and risks the same truncation for any
|
|
655
|
-
// URL whose query string legitimately contains those characters (URL-encoded or not).
|
|
656
649
|
const re = /https:\/\/mcp\.supabase\.com\/mcp[^"'\s]*/gi;
|
|
657
650
|
let m;
|
|
658
651
|
while ((m = re.exec(text)))
|
|
@@ -124,8 +124,6 @@ export async function repairBrowserUse(input) {
|
|
|
124
124
|
const optionalFeatureEnablementBlockers = optionalFeatureSteps
|
|
125
125
|
.filter((step) => step.attempted && !step.ok)
|
|
126
126
|
.map((step) => `${step.id}:codex_feature_enable_unsupported_or_failed`);
|
|
127
|
-
// This repair can establish configuration/plugin capability only. A live Browser or
|
|
128
|
-
// Chrome action in a fresh Codex task is required before any route may claim use proof.
|
|
129
127
|
const realBrowserInteractionVerified = false;
|
|
130
128
|
const refreshActions = pluginRepair?.changed ? pluginRepair.next_actions || [] : [];
|
|
131
129
|
const nextActions = recovered ? refreshActions : [
|
|
@@ -7,9 +7,6 @@ export const DOCTOR_CODEX_STARTUP_REPAIR_SCHEMA = 'sks.doctor-codex-startup-repa
|
|
|
7
7
|
export async function runDoctorCodexStartupRepair(input) {
|
|
8
8
|
const root = path.resolve(input.root || process.cwd());
|
|
9
9
|
const codexHome = input.codexHome || process.env.CODEX_HOME || path.join(process.env.HOME || os.homedir(), '.codex');
|
|
10
|
-
// Project-scoped official custom-agent installation is owned by repairAgentRoleConfigs.
|
|
11
|
-
// This startup repair remains structural/MCP-only and never touches legacy
|
|
12
|
-
// or user agent TOMLs in project or global directories.
|
|
13
10
|
const roleFiles = { sanitized: [], created: [], blockers: [] };
|
|
14
11
|
const configs = [];
|
|
15
12
|
for (const candidate of [
|
|
@@ -97,6 +97,17 @@ export function buildDoctorReadinessMatrix(input = {}) {
|
|
|
97
97
|
blockers.add('agent_role_config_repair_failed');
|
|
98
98
|
if (Array.isArray(agentRoleConfig.missing) && agentRoleConfig.missing.length && agentRoleConfig.apply !== true)
|
|
99
99
|
warnings.add('agent_role_config_missing_repair_available');
|
|
100
|
+
const skills = input.skills || null;
|
|
101
|
+
for (const scope of ['global', 'project']) {
|
|
102
|
+
const report = skills?.[scope];
|
|
103
|
+
if (!report || report.skipped === true)
|
|
104
|
+
continue;
|
|
105
|
+
if (report.ok === false || report.core_skill_integrity?.ok === false) {
|
|
106
|
+
blockers.add(`${scope}_skills_reconcile_failed`);
|
|
107
|
+
for (const warning of normalizeList(report.warnings))
|
|
108
|
+
warnings.add(`${scope}_skills:${warning}`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
100
111
|
const repairReadiness = buildRepairReadiness(input);
|
|
101
112
|
for (const blocker of repairReadiness.blockers)
|
|
102
113
|
blockers.add(blocker);
|
|
@@ -188,6 +199,7 @@ export function buildDoctorReadinessMatrix(input = {}) {
|
|
|
188
199
|
blockers: normalizeList(localModel.blockers)
|
|
189
200
|
},
|
|
190
201
|
agent_role_config: agentRoleConfig,
|
|
202
|
+
skills,
|
|
191
203
|
ready: coreReady,
|
|
192
204
|
primary_blocker: [...blockers][0] || null,
|
|
193
205
|
blockers: [...blockers],
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import os from 'node:os';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { sameFilesystemPath } from '../fsx.js';
|
|
4
|
+
export async function reconcileDoctorSkills(root, doctorFix) {
|
|
5
|
+
if (!doctorFix)
|
|
6
|
+
return { skipped: true, reason: 'doctor_without_fix' };
|
|
7
|
+
const { reconcileSkills } = await import('../init/skills.js');
|
|
8
|
+
const home = path.resolve(process.env.HOME || os.homedir());
|
|
9
|
+
const globalTarget = path.resolve(home, '.agents', 'skills');
|
|
10
|
+
const projectTarget = path.resolve(root, '.agents', 'skills');
|
|
11
|
+
const global = await reconcileSkills({
|
|
12
|
+
targetDir: globalTarget,
|
|
13
|
+
scope: 'global',
|
|
14
|
+
fix: true
|
|
15
|
+
}).catch((err) => ({ ok: false, error: err?.message || String(err) }));
|
|
16
|
+
const project = await sameFilesystemPath(projectTarget, globalTarget)
|
|
17
|
+
? {
|
|
18
|
+
schema: 'sks.skill-reconcile.v1',
|
|
19
|
+
ok: true,
|
|
20
|
+
scope: 'project',
|
|
21
|
+
target_dir: projectTarget,
|
|
22
|
+
fix: true,
|
|
23
|
+
skipped: true,
|
|
24
|
+
reason: 'same_as_authoritative_global_skill_root'
|
|
25
|
+
}
|
|
26
|
+
: await reconcileSkills({
|
|
27
|
+
targetDir: projectTarget,
|
|
28
|
+
scope: 'project',
|
|
29
|
+
fix: true
|
|
30
|
+
}).catch((err) => ({ ok: false, error: err?.message || String(err) }));
|
|
31
|
+
return { global, project };
|
|
32
|
+
}
|
|
@@ -118,8 +118,6 @@ export async function repairCodexImagegen(input) {
|
|
|
118
118
|
const realGenerationVerified = capabilityReady
|
|
119
119
|
&& after?.real_generation_available === true
|
|
120
120
|
&& after?.real_output_verified_by_capability_check === true;
|
|
121
|
-
// No real generation round-trip primitive exists in imagegen-capability.ts today.
|
|
122
|
-
// Keep configuration detection separate from route/output proof.
|
|
123
121
|
const communicationTest = {
|
|
124
122
|
level: realGenerationVerified ? 'real_output' : 'flag_level',
|
|
125
123
|
ok: realGenerationVerified,
|
|
@@ -98,7 +98,6 @@ export async function detectAndRepairMcpTransportCollisions(input) {
|
|
|
98
98
|
}
|
|
99
99
|
return report;
|
|
100
100
|
}
|
|
101
|
-
/** Scans only the top-level project config text for `[mcp_servers.<name>]` headers (not nested child tables like `.env`). */
|
|
102
101
|
function listMcpServerNames(text) {
|
|
103
102
|
const source = String(text || '');
|
|
104
103
|
const pattern = /^\s*\[mcp_servers\.([^.\]]+)\]\s*(?:#.*)?$/gm;
|
|
@@ -126,8 +125,6 @@ async function readGlobalCodexConfigText() {
|
|
|
126
125
|
const text = await fs.readFile(file, 'utf8').catch(() => '');
|
|
127
126
|
return { path: file, text };
|
|
128
127
|
}
|
|
129
|
-
/** Comments every line of the colliding project MCP block (header + child tables like .env) so Codex stops merging
|
|
130
|
-
* two transports for the same server name, while keeping the original text — including secrets — recoverable in place. */
|
|
131
128
|
function commentOutMcpServerBlock(block, server, projectTransport, globalTransport) {
|
|
132
129
|
const note = `# [sks doctor] MCP server "${server}" project block disabled: project transport (${projectTransport}) collided with the global config's transport (${globalTransport}) for the same server name (Codex refuses the merged config, e.g. "url is not supported for stdio"). Re-add a block with a matching transport if this project needs its own "${server}" MCP server.\n`;
|
|
133
130
|
const commented = String(block || '')
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { inspectConfinedPath, moveConfinedPath, removeEmptyTreeVerified, uniqueConfinedPath, walkConfinedEntries } from '../managed-path-safety.js';
|
|
3
|
-
/** Cleanup-only inventory. These names are never registered, listed, or redirected. */
|
|
4
3
|
export const REMOVED_PUBLIC_COMMANDS = ['team', 'mad-db', 'tmux', 'xai', 'swarm', 'agent', 'ralph', 'ui'];
|
|
5
4
|
const RETIRED_COMMAND_TOMBSTONES = new Set(REMOVED_PUBLIC_COMMANDS);
|
|
6
5
|
const RETIRED_MISSION_MODES = new Set([
|
|
@@ -46,12 +46,6 @@ export async function repairSupabaseMcp(input) {
|
|
|
46
46
|
}
|
|
47
47
|
const readOnlyBefore = /read[_-]?only\s*=\s*true|access_mode\s*=\s*"read-only"|--read-only/.test(block);
|
|
48
48
|
const unsafeWriteAccessBefore = configured && !disabled && !readOnlyBefore && /write|service_role|SUPABASE_ACCESS_TOKEN/.test(block);
|
|
49
|
-
// Codex merges the global (~/.codex) and project (.codex) config per key. When
|
|
50
|
-
// the project defines a stdio supabase server (command=...) while the global
|
|
51
|
-
// one uses a streamable-http url, the merged table has both `command` and
|
|
52
|
-
// `url`, and Codex refuses to load with "url is not supported for stdio",
|
|
53
|
-
// blocking every chat/task in that project. Detect and disable the project's
|
|
54
|
-
// stdio block so it inherits the safe global read-only url form.
|
|
55
49
|
const globalConfig = await readGlobalCodexConfigText();
|
|
56
50
|
const distinctConfigs = path.resolve(globalConfig.path) !== path.resolve(config.path);
|
|
57
51
|
const projectTransport = blockTransport(block);
|
|
@@ -88,8 +82,6 @@ export async function repairSupabaseMcp(input) {
|
|
|
88
82
|
mutate: () => afterText
|
|
89
83
|
});
|
|
90
84
|
}
|
|
91
|
-
// A resolved collision comments the whole stdio block out, so the project no
|
|
92
|
-
// longer contributes an active supabase server at all.
|
|
93
85
|
const effectivelyConfigured = configured && !transportCollisionResolved;
|
|
94
86
|
const afterBlock = transportCollisionResolved ? '' : readOnlyMigrated ? mcpServerBlock(afterText, 'supabase') || '' : block;
|
|
95
87
|
const readOnlyAfter = /read[_-]?only\s*=\s*true|access_mode\s*=\s*"read-only"|--read-only/.test(afterBlock);
|
|
@@ -171,9 +163,6 @@ function blockTransport(block) {
|
|
|
171
163
|
return 'url';
|
|
172
164
|
return null;
|
|
173
165
|
}
|
|
174
|
-
/** Comment every line of a supabase MCP block (header + child .env table) so
|
|
175
|
-
* Codex stops loading it as a stdio server, while keeping the original text —
|
|
176
|
-
* including the access token — recoverable in place. */
|
|
177
166
|
function commentOutStdioSupabaseBlock(block) {
|
|
178
167
|
const note = '# [sks doctor] Supabase MCP stdio block disabled: it collided with the global read-only URL Supabase entry (Codex: "url is not supported for stdio"). Re-add a read-only URL form (url = "https://mcp.supabase.com/mcp?project_ref=<ref>&read_only=true&features=database,docs") if this project needs its own Supabase MCP.\n';
|
|
179
168
|
const commented = String(block || '')
|