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
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import os from 'node:os';
|
|
3
|
+
import fsp from 'node:fs/promises';
|
|
4
|
+
import { sha256 } from '../fsx.js';
|
|
5
|
+
import { sksPrefixedSkillName } from '../routes/dollar-prefix.js';
|
|
6
|
+
import { inspectConfinedPath, ManagedPathSafetyError } from '../managed-path-safety.js';
|
|
7
|
+
import { buildSksCoreSkillManifest } from './core-skill-manifest.js';
|
|
8
|
+
export const AUTHORITATIVE_SKS_SKILL_ROOT_REFERENCE = '~/.agents/skills';
|
|
9
|
+
const CURRENT_SKS_SKILL_NAME_RE = /^sks(?:-[a-z0-9]+(?:-[a-z0-9]+)*)?$/;
|
|
10
|
+
const SHA256_RE = /^[a-f0-9]{64}$/;
|
|
11
|
+
let packagedSkillDigestsPromise = null;
|
|
12
|
+
export function currentSksSkillName(value) {
|
|
13
|
+
const name = sksPrefixedSkillName(value);
|
|
14
|
+
return CURRENT_SKS_SKILL_NAME_RE.test(name) ? name : '';
|
|
15
|
+
}
|
|
16
|
+
export async function inspectCurrentSksManagedSkillContent(text, canonicalName) {
|
|
17
|
+
const contentSha256 = sha256(text);
|
|
18
|
+
if (!/BEGIN SKS (?:IMMUTABLE CORE|MANAGED) SKILL/.test(text)) {
|
|
19
|
+
return { status: 'not_sks_managed', content_sha256: contentSha256 };
|
|
20
|
+
}
|
|
21
|
+
const declaredName = String(text.match(/^name:\s*([^\n\r]+)/m)?.[1] || '').trim().replace(/^["']|["']$/g, '');
|
|
22
|
+
if (currentSksSkillName(declaredName) !== canonicalName) {
|
|
23
|
+
return { status: 'canonical_name_mismatch', content_sha256: contentSha256 };
|
|
24
|
+
}
|
|
25
|
+
const expected = (await currentPackagedSksSkillDigests()).get(canonicalName);
|
|
26
|
+
if (!expected?.size)
|
|
27
|
+
return { status: 'authoritative_digest_missing', content_sha256: contentSha256 };
|
|
28
|
+
return {
|
|
29
|
+
status: expected.has(contentSha256) ? 'current' : 'content_digest_mismatch',
|
|
30
|
+
content_sha256: contentSha256
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function currentCodexSkillRoots(input) {
|
|
34
|
+
const projectRoot = path.resolve(input.root);
|
|
35
|
+
const home = path.resolve(input.home || process.env.HOME || os.homedir());
|
|
36
|
+
const codexHome = path.resolve(input.codexHome || process.env.CODEX_HOME || path.join(home, '.codex'));
|
|
37
|
+
return uniqueSkillRoots([
|
|
38
|
+
{ scope: 'global', root: path.join(home, '.agents', 'skills') },
|
|
39
|
+
{ scope: 'project', root: path.join(projectRoot, '.agents', 'skills') },
|
|
40
|
+
{ scope: 'codex-home', root: path.join(codexHome, 'skills') }
|
|
41
|
+
]);
|
|
42
|
+
}
|
|
43
|
+
export async function resolveAuthoritativeSksSkillSources(input) {
|
|
44
|
+
const home = path.resolve(input.home || process.env.HOME || os.homedir());
|
|
45
|
+
const requested = Array.from(new Set(input.skillNames
|
|
46
|
+
.map((name) => String(name || '').trim())
|
|
47
|
+
.filter(Boolean)));
|
|
48
|
+
const roots = currentCodexSkillRoots({ ...input, home }).filter((entry) => entry.scope === 'global');
|
|
49
|
+
const sources = [];
|
|
50
|
+
const unresolved = [];
|
|
51
|
+
const blockers = [];
|
|
52
|
+
for (const requestedName of requested) {
|
|
53
|
+
const canonicalName = currentSksSkillName(requestedName);
|
|
54
|
+
if (!canonicalName) {
|
|
55
|
+
blockers.push('invalid_managed_skill_name');
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
let source = null;
|
|
59
|
+
let unsafe = false;
|
|
60
|
+
for (const root of roots) {
|
|
61
|
+
const candidate = confinedManagedSkillFile(root.root, canonicalName);
|
|
62
|
+
if (!candidate) {
|
|
63
|
+
blockers.push(`managed_skill_path_outside_root:${canonicalName}:${root.scope}`);
|
|
64
|
+
unsafe = true;
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
const inspection = await inspectManagedSkillFile(home, candidate, canonicalName);
|
|
68
|
+
if (inspection.status === 'missing')
|
|
69
|
+
continue;
|
|
70
|
+
if (inspection.status !== 'current') {
|
|
71
|
+
blockers.push(`${inspection.status}:${canonicalName}:${root.scope}`);
|
|
72
|
+
unsafe = true;
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
source = {
|
|
76
|
+
requested_name: requestedName,
|
|
77
|
+
canonical_name: canonicalName,
|
|
78
|
+
scope: root.scope,
|
|
79
|
+
root: root.root,
|
|
80
|
+
path: candidate
|
|
81
|
+
};
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
if (source)
|
|
85
|
+
sources.push(source);
|
|
86
|
+
else {
|
|
87
|
+
unresolved.push(canonicalName);
|
|
88
|
+
if (unsafe)
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
schema: 'sks.authoritative-skill-sources.v1',
|
|
94
|
+
sources,
|
|
95
|
+
unresolved: Array.from(new Set(unresolved)).sort(),
|
|
96
|
+
blockers: Array.from(new Set(blockers)).sort()
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export async function authoritativeSksSkillContext(input) {
|
|
100
|
+
const resolution = await resolveAuthoritativeSksSkillSources(input);
|
|
101
|
+
return renderAuthoritativeSksSkillContext(resolution);
|
|
102
|
+
}
|
|
103
|
+
export function renderAuthoritativeSksSkillContext(resolution) {
|
|
104
|
+
if (!resolution.sources.length && !resolution.unresolved.length && !resolution.blockers.length)
|
|
105
|
+
return '';
|
|
106
|
+
const lines = [
|
|
107
|
+
'Authoritative SKS skill sources for this turn:',
|
|
108
|
+
...resolution.sources.map((source) => `- ${source.canonical_name}: ${JSON.stringify(source.path)}`)
|
|
109
|
+
];
|
|
110
|
+
if (resolution.unresolved.length) {
|
|
111
|
+
lines.push(`- unresolved current managed skills: ${resolution.unresolved.join(', ')}`);
|
|
112
|
+
}
|
|
113
|
+
if (resolution.blockers.length) {
|
|
114
|
+
lines.push(`- unsafe managed-skill candidates rejected: ${resolution.blockers.join(', ')}`);
|
|
115
|
+
}
|
|
116
|
+
lines.push('These existing current files override stale project-local, .codex/skills, plugin-cache, picker, pre-compaction, and prior-message paths for the listed managed SKS skills.', 'Read the resolved file directly. After a successful remap, continue silently and do not report a skill-path mismatch to the user. Never guess a path for an unresolved or rejected skill.', 'For an unresolved skill, do not mention an old or stale path mismatch; report only that the current managed SKS skill is unavailable if it actually blocks the task.');
|
|
117
|
+
return lines.join('\n');
|
|
118
|
+
}
|
|
119
|
+
function confinedManagedSkillFile(skillsRoot, canonicalName) {
|
|
120
|
+
const root = path.resolve(skillsRoot);
|
|
121
|
+
const candidate = path.resolve(root, canonicalName, 'SKILL.md');
|
|
122
|
+
const relative = path.relative(root, candidate);
|
|
123
|
+
if (!relative || relative.startsWith(`..${path.sep}`) || relative === '..' || path.isAbsolute(relative))
|
|
124
|
+
return null;
|
|
125
|
+
return candidate;
|
|
126
|
+
}
|
|
127
|
+
async function inspectManagedSkillFile(homeBoundary, file, canonicalName) {
|
|
128
|
+
let inspected;
|
|
129
|
+
try {
|
|
130
|
+
inspected = await inspectConfinedPath(homeBoundary, file);
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
if (error instanceof ManagedPathSafetyError) {
|
|
134
|
+
if (error.code === 'managed_path_boundary_missing')
|
|
135
|
+
return { status: 'missing' };
|
|
136
|
+
if (error.code.includes('symlink'))
|
|
137
|
+
return { status: 'unsafe_symlink' };
|
|
138
|
+
return { status: 'not_regular_file' };
|
|
139
|
+
}
|
|
140
|
+
throw error;
|
|
141
|
+
}
|
|
142
|
+
if (!inspected.exists)
|
|
143
|
+
return { status: 'missing' };
|
|
144
|
+
if (inspected.leafSymlink)
|
|
145
|
+
return { status: 'unsafe_symlink' };
|
|
146
|
+
if (!inspected.stat?.isFile())
|
|
147
|
+
return { status: 'not_regular_file' };
|
|
148
|
+
const text = await fsp.readFile(file, 'utf8').catch(() => '');
|
|
149
|
+
return inspectCurrentSksManagedSkillContent(text, canonicalName);
|
|
150
|
+
}
|
|
151
|
+
async function currentPackagedSksSkillDigests() {
|
|
152
|
+
if (!packagedSkillDigestsPromise)
|
|
153
|
+
packagedSkillDigestsPromise = loadCurrentPackagedSksSkillDigests();
|
|
154
|
+
return packagedSkillDigestsPromise;
|
|
155
|
+
}
|
|
156
|
+
async function loadCurrentPackagedSksSkillDigests() {
|
|
157
|
+
const digests = new Map();
|
|
158
|
+
const add = (nameValue, digestValue) => {
|
|
159
|
+
const name = currentSksSkillName(nameValue);
|
|
160
|
+
const digest = String(digestValue || '').trim().toLowerCase();
|
|
161
|
+
if (!name || !SHA256_RE.test(digest))
|
|
162
|
+
return;
|
|
163
|
+
const current = digests.get(name) || new Set();
|
|
164
|
+
current.add(digest);
|
|
165
|
+
digests.set(name, current);
|
|
166
|
+
};
|
|
167
|
+
for (const skill of buildSksCoreSkillManifest('1970-01-01T00:00:00.000Z').skills) {
|
|
168
|
+
add(skill.canonical_name, skill.content_sha256);
|
|
169
|
+
}
|
|
170
|
+
const manifest = await import('../init/skills.js')
|
|
171
|
+
.then(({ loadSkillsManifest }) => loadSkillsManifest())
|
|
172
|
+
.catch(() => null);
|
|
173
|
+
for (const skill of manifest?.skills || [])
|
|
174
|
+
add(skill?.canonical_name, skill?.content_sha256);
|
|
175
|
+
return digests;
|
|
176
|
+
}
|
|
177
|
+
function uniqueSkillRoots(roots) {
|
|
178
|
+
const unique = new Map();
|
|
179
|
+
for (const entry of roots) {
|
|
180
|
+
const resolved = path.resolve(entry.root);
|
|
181
|
+
if (!unique.has(resolved))
|
|
182
|
+
unique.set(resolved, { ...entry, root: resolved });
|
|
183
|
+
}
|
|
184
|
+
return [...unique.values()];
|
|
185
|
+
}
|
|
@@ -84,8 +84,6 @@ function normalizeCodexFastModeUiConfigOnce(text = '', opts = {}) {
|
|
|
84
84
|
]) {
|
|
85
85
|
next = upsertTomlTableKeyIfAbsent(next, 'features', featureLine);
|
|
86
86
|
}
|
|
87
|
-
// Global postinstall must not impose a project concurrency policy. Existing
|
|
88
|
-
// user [agents] values are preserved verbatim; project setup owns defaults.
|
|
89
87
|
next = removeTomlTable(next, 'features.multi_agent_v2');
|
|
90
88
|
if (process.env.SKS_MANAGE_CODEX_APP_PLUGINS === '1') {
|
|
91
89
|
for (const [name, marketplace] of DEFAULT_CODEX_APP_PLUGINS) {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { fileURLToPath } from 'node:url';
|
|
3
3
|
import { ensureDir, exists, nowIso, projectRoot, runProcess, writeJsonAtomic } from '../fsx.js';
|
|
4
|
-
import { buildAgentManifest, validateAgentManifest } from '../agent-bridge/agent-manifest.js';
|
|
4
|
+
import { agentManifestDigest, buildAgentManifest, validateAgentManifest } from '../agent-bridge/agent-manifest.js';
|
|
5
|
+
import { inspectHostCapabilityRuntime } from '../agent-bridge/host-capability-runtime.js';
|
|
5
6
|
import { flag } from './command-utils.js';
|
|
6
7
|
async function resolveSksEntrypoint() {
|
|
7
|
-
// Mirrors src/core/agent-bridge/mcp-server.ts's own bin resolution: prefer the
|
|
8
|
-
// packaged dist entrypoint, fall back to the source-tree relative path in dev.
|
|
9
8
|
const packedBin = fileURLToPath(new URL('../../bin/sks.js', import.meta.url));
|
|
10
9
|
const sourceBin = fileURLToPath(new URL('../../../bin/sks.js', import.meta.url));
|
|
11
10
|
return (await exists(packedBin)) ? packedBin : sourceBin;
|
|
@@ -14,9 +13,6 @@ async function runJsonSmoke(entrypoint, args, validate, run) {
|
|
|
14
13
|
const result = await run(process.execPath, [entrypoint, ...args], {
|
|
15
14
|
env: { SKS_AGENT_MODE: '1' },
|
|
16
15
|
timeoutMs: 15_000,
|
|
17
|
-
// Status is intentionally bounded but can exceed 32 KiB when several
|
|
18
|
-
// session summaries are present. Truncating otherwise-valid JSON makes the
|
|
19
|
-
// bridge report a false non-interactive failure.
|
|
20
16
|
maxOutputBytes: 512 * 1024
|
|
21
17
|
}).catch((err) => ({ code: 1, stdout: '', stderr: err instanceof Error ? err.message : String(err) }));
|
|
22
18
|
let parsed = null;
|
|
@@ -74,6 +70,22 @@ function registrationSnippets() {
|
|
|
74
70
|
}
|
|
75
71
|
};
|
|
76
72
|
}
|
|
73
|
+
export function buildAgentBridgeSetupMetadata(manifest) {
|
|
74
|
+
return {
|
|
75
|
+
compatibility: manifest.compatibility,
|
|
76
|
+
host_capabilities: manifest.host_capabilities,
|
|
77
|
+
manifest_digest: agentManifestDigest(manifest),
|
|
78
|
+
capability_digest: manifest.host_capabilities.capability_digest
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export async function inspectAgentBridgeHostCapabilities(root, dependencies, projectTrusted = false) {
|
|
82
|
+
return inspectHostCapabilityRuntime({
|
|
83
|
+
root,
|
|
84
|
+
request: { capability_ids: [], workflows: [] },
|
|
85
|
+
projectTrusted,
|
|
86
|
+
...(dependencies ? { dependencies } : {})
|
|
87
|
+
});
|
|
88
|
+
}
|
|
77
89
|
export async function agentBridgeCommand(subcommand, args = []) {
|
|
78
90
|
const sub = subcommand || 'setup';
|
|
79
91
|
if (sub !== 'setup') {
|
|
@@ -87,6 +99,7 @@ export async function agentBridgeCommand(subcommand, args = []) {
|
|
|
87
99
|
const root = await projectRoot();
|
|
88
100
|
const manifest = buildAgentManifest();
|
|
89
101
|
const manifestValidation = validateAgentManifest(manifest);
|
|
102
|
+
const setupMetadata = buildAgentBridgeSetupMetadata(manifest);
|
|
90
103
|
const manifestPath = path.join(root, '.sneakoscope', 'agent-bridge', 'manifest.json');
|
|
91
104
|
if (!manifestValidation.ok) {
|
|
92
105
|
const result = {
|
|
@@ -95,6 +108,7 @@ export async function agentBridgeCommand(subcommand, args = []) {
|
|
|
95
108
|
ok: false,
|
|
96
109
|
status: 'manifest_validation_failed',
|
|
97
110
|
manifest_path: manifestPath,
|
|
111
|
+
...setupMetadata,
|
|
98
112
|
manifest_validation: manifestValidation
|
|
99
113
|
};
|
|
100
114
|
process.exitCode = 1;
|
|
@@ -107,17 +121,22 @@ export async function agentBridgeCommand(subcommand, args = []) {
|
|
|
107
121
|
await ensureDir(path.dirname(manifestPath));
|
|
108
122
|
await writeJsonAtomic(manifestPath, manifest);
|
|
109
123
|
const entrypoint = await resolveSksEntrypoint();
|
|
110
|
-
const smokes = await
|
|
124
|
+
const [smokes, hostCapabilityInventory] = await Promise.all([
|
|
125
|
+
runAgentBridgeContractSmokes(entrypoint, manifest),
|
|
126
|
+
inspectAgentBridgeHostCapabilities(root, undefined, flag(args, '--trusted-project'))
|
|
127
|
+
]);
|
|
111
128
|
const result = {
|
|
112
129
|
schema: 'sks.agent-bridge-setup.v1',
|
|
113
130
|
generated_at: nowIso(),
|
|
114
131
|
ok: smokes.status.ok && smokes.naruto_help.ok,
|
|
115
132
|
manifest_path: manifestPath,
|
|
116
133
|
tool_count: manifest.tools.length,
|
|
134
|
+
...setupMetadata,
|
|
117
135
|
manifest_validation: manifestValidation,
|
|
118
136
|
registration_snippets: registrationSnippets(),
|
|
119
137
|
non_interactive_smoke: smokes.status,
|
|
120
|
-
naruto_help_smoke: smokes.naruto_help
|
|
138
|
+
naruto_help_smoke: smokes.naruto_help,
|
|
139
|
+
host_capability_inventory: hostCapabilityInventory
|
|
121
140
|
};
|
|
122
141
|
if (!result.ok)
|
|
123
142
|
process.exitCode = 1;
|
|
@@ -132,6 +151,7 @@ export async function agentBridgeCommand(subcommand, args = []) {
|
|
|
132
151
|
console.log(` ${registrationSnippets().codex_cli}`);
|
|
133
152
|
console.log(`Non-interactive status smoke: ${smokes.status.ok ? 'ok' : 'FAILED'} (${smokes.status.note})`);
|
|
134
153
|
console.log(`Naruto help contract smoke: ${smokes.naruto_help.ok ? 'ok' : 'FAILED'} (${smokes.naruto_help.note})`);
|
|
154
|
+
console.log(`Host capability inventory: ${hostCapabilityInventory.health_status} (${hostCapabilityInventory.capabilities.filter((entry) => entry.state === 'available').length}/${hostCapabilityInventory.capabilities.length} available)`);
|
|
135
155
|
}
|
|
136
156
|
return result;
|
|
137
157
|
}
|
|
@@ -314,23 +314,20 @@ export async function setupCommand(args = []) {
|
|
|
314
314
|
const { ensureRelatedCliTools } = await import('../../cli/install-helpers.js');
|
|
315
315
|
cliTools = await ensureRelatedCliTools(args);
|
|
316
316
|
});
|
|
317
|
-
const
|
|
318
|
-
...(res.codex_config_install?.manual_blockers || []),
|
|
319
|
-
...(res.agent_install?.manual_blockers || [])
|
|
320
|
-
];
|
|
321
|
-
const warnings = res.codex_config_install?.warnings || [];
|
|
317
|
+
const readiness = initProjectInstallReadiness(res);
|
|
322
318
|
const result = {
|
|
323
319
|
schema: 'sks.setup.v1',
|
|
324
|
-
ok:
|
|
325
|
-
status:
|
|
320
|
+
ok: readiness.ok,
|
|
321
|
+
status: readiness.status,
|
|
326
322
|
root,
|
|
327
323
|
install_scope: installScope,
|
|
328
324
|
command_prefix: sksCommandPrefix(installScope, { globalCommand: 'sks' }),
|
|
329
325
|
created: res.created || [],
|
|
330
326
|
local_only: flag(args, '--local-only'),
|
|
331
327
|
cli_tools: cliTools,
|
|
332
|
-
|
|
333
|
-
|
|
328
|
+
skill_install: res.skill_install,
|
|
329
|
+
blockers: readiness.blockers,
|
|
330
|
+
warnings: readiness.warnings
|
|
334
331
|
};
|
|
335
332
|
if (!result.ok)
|
|
336
333
|
process.exitCode = 1;
|
|
@@ -344,9 +341,9 @@ export async function setupCommand(args = []) {
|
|
|
344
341
|
console.log(`Zellij: ${cliTools.zellij.ok ? 'ok' : cliTools.zellij.repair.status}${cliTools.zellij.version ? ` ${cliTools.zellij.version}` : ''}`);
|
|
345
342
|
for (const file of result.created)
|
|
346
343
|
console.log(`- ${file}`);
|
|
347
|
-
for (const warning of warnings)
|
|
344
|
+
for (const warning of readiness.warnings)
|
|
348
345
|
console.log(`Warning: ${warning}`);
|
|
349
|
-
for (const blocker of blockers)
|
|
346
|
+
for (const blocker of readiness.blockers)
|
|
350
347
|
console.error(`Blocker: ${blocker}`);
|
|
351
348
|
return result;
|
|
352
349
|
}
|
|
@@ -363,20 +360,73 @@ export async function initCommand(args = []) {
|
|
|
363
360
|
export async function fixPathCommand(args = []) {
|
|
364
361
|
const root = await projectRoot();
|
|
365
362
|
const installScope = installScopeFromArgs(args);
|
|
363
|
+
let res = null;
|
|
366
364
|
await withSecretPreservationGuard(root, 'fix-path-command', async () => {
|
|
367
|
-
await initProject(root, { installScope, localOnly: flag(args, '--local-only'), globalCommand: 'sks', force: true });
|
|
365
|
+
res = await initProject(root, { installScope, localOnly: flag(args, '--local-only'), globalCommand: 'sks', force: true });
|
|
368
366
|
});
|
|
367
|
+
const readiness = initProjectInstallReadiness(res);
|
|
369
368
|
const result = {
|
|
370
369
|
schema: 'sks.fix-path.v1',
|
|
371
|
-
ok:
|
|
370
|
+
ok: readiness.ok,
|
|
371
|
+
status: readiness.status,
|
|
372
372
|
root,
|
|
373
373
|
install_scope: installScope,
|
|
374
374
|
hook_command_prefix: sksCommandPrefix(installScope, { globalCommand: 'sks' }),
|
|
375
|
-
hooks: path.join(root, '.codex', 'hooks.json')
|
|
375
|
+
hooks: path.join(root, '.codex', 'hooks.json'),
|
|
376
|
+
skill_install: res?.skill_install,
|
|
377
|
+
blockers: readiness.blockers,
|
|
378
|
+
warnings: readiness.warnings
|
|
376
379
|
};
|
|
377
|
-
if (
|
|
378
|
-
|
|
379
|
-
|
|
380
|
+
if (!result.ok)
|
|
381
|
+
process.exitCode = 1;
|
|
382
|
+
if (flag(args, '--json')) {
|
|
383
|
+
printJson(result);
|
|
384
|
+
return result;
|
|
385
|
+
}
|
|
386
|
+
console.log(`${result.ok ? 'SKS hook path refreshed' : 'SKS hook path refresh blocked'}: ${path.relative(root, result.hooks)}`);
|
|
387
|
+
for (const warning of readiness.warnings)
|
|
388
|
+
console.log(`Warning: ${warning}`);
|
|
389
|
+
for (const blocker of readiness.blockers)
|
|
390
|
+
console.error(`Blocker: ${blocker}`);
|
|
391
|
+
return result;
|
|
392
|
+
}
|
|
393
|
+
function initProjectInstallReadiness(res) {
|
|
394
|
+
const manualBlockers = [
|
|
395
|
+
...(res?.codex_config_install?.manual_blockers || []),
|
|
396
|
+
...(res?.agent_install?.manual_blockers || [])
|
|
397
|
+
].map(String);
|
|
398
|
+
const skillWarnings = Array.isArray(res?.skill_install?.warnings)
|
|
399
|
+
? res.skill_install.warnings.map(String)
|
|
400
|
+
: [];
|
|
401
|
+
const skillBlockers = res?.skill_install?.ok === false
|
|
402
|
+
? ['authoritative_sks_skill_install_failed', ...skillWarnings.map((warning) => `skill_install:${warning}`)]
|
|
403
|
+
: [];
|
|
404
|
+
const installBlockers = [
|
|
405
|
+
...(res?.codex_config_install?.ok === false && !res?.codex_config_install?.manual_blockers?.length
|
|
406
|
+
? ['codex_config_install_failed']
|
|
407
|
+
: []),
|
|
408
|
+
...(res?.agent_install?.ok === false && !res?.agent_install?.manual_blockers?.length
|
|
409
|
+
? ['official_subagent_agent_install_failed']
|
|
410
|
+
: [])
|
|
411
|
+
];
|
|
412
|
+
const blockers = [...new Set([...manualBlockers, ...skillBlockers, ...installBlockers])];
|
|
413
|
+
const warnings = [...new Set([
|
|
414
|
+
...(res?.codex_config_install?.warnings || []).map(String),
|
|
415
|
+
...(res?.agent_install?.warnings || []).map(String),
|
|
416
|
+
...skillWarnings
|
|
417
|
+
])];
|
|
418
|
+
const ok = blockers.length === 0
|
|
419
|
+
&& res?.skill_install?.ok !== false
|
|
420
|
+
&& res?.codex_config_install?.ok !== false
|
|
421
|
+
&& res?.agent_install?.ok !== false;
|
|
422
|
+
const status = manualBlockers.length
|
|
423
|
+
? 'manual_blocked'
|
|
424
|
+
: skillBlockers.length
|
|
425
|
+
? 'skill_blocked'
|
|
426
|
+
: installBlockers.length
|
|
427
|
+
? 'install_blocked'
|
|
428
|
+
: 'completed';
|
|
429
|
+
return { ok, status, blockers, warnings };
|
|
380
430
|
}
|
|
381
431
|
export async function depsCommand(sub = 'check', args = []) {
|
|
382
432
|
const action = sub || 'check';
|
|
@@ -460,15 +510,6 @@ export async function selftestCommand(args = []) {
|
|
|
460
510
|
await rmrf(tmp);
|
|
461
511
|
}
|
|
462
512
|
}
|
|
463
|
-
/**
|
|
464
|
-
* `sks selftest --real`: actually spawns every feature fixture whose kind is
|
|
465
|
-
* 'execute' or 'execute_and_validate_artifacts', derives real pass/fail status
|
|
466
|
-
* from the process exit code (and, for execute_and_validate_artifacts, from
|
|
467
|
-
* whether the declared expected_artifacts actually exist and match their
|
|
468
|
-
* declared schema), and writes a JSON report that explicitly lists fixtures
|
|
469
|
-
* skipped because they are mock/wiring_only kind rather than silently omitting
|
|
470
|
-
* them. This is additive: plain `sks selftest --mock` behavior is unchanged.
|
|
471
|
-
*/
|
|
472
513
|
export async function selftestRealCommand(args = []) {
|
|
473
514
|
process.env.CI = 'true';
|
|
474
515
|
const root = await projectRoot();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
1
2
|
import { TRUST_VALIDATE_BENCH_COMMAND, benchRoot, runCoreBench, runLeanPolicyBench } from '../bench.js';
|
|
2
3
|
import { runProcess } from '../fsx.js';
|
|
3
4
|
import { flag, readFlagValue } from './command-utils.js';
|
|
@@ -47,7 +48,7 @@ async function commandBench(schema, commandArgs, args = []) {
|
|
|
47
48
|
}
|
|
48
49
|
const root = await benchRoot();
|
|
49
50
|
const start = Date.now();
|
|
50
|
-
const result = await runProcess(process.execPath, [
|
|
51
|
+
const result = await runProcess(process.execPath, [benchCliEntrypoint(), ...commandArgs], {
|
|
51
52
|
cwd: root,
|
|
52
53
|
timeoutMs: 120_000,
|
|
53
54
|
maxOutputBytes: 512 * 1024,
|
|
@@ -61,3 +62,6 @@ async function commandBench(schema, commandArgs, args = []) {
|
|
|
61
62
|
process.exitCode = 1;
|
|
62
63
|
return report;
|
|
63
64
|
}
|
|
65
|
+
export function benchCliEntrypoint(moduleUrl = import.meta.url) {
|
|
66
|
+
return fileURLToPath(new URL('../../bin/sks.js', moduleUrl));
|
|
67
|
+
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { findLatestMission, listSessionStates } from '../mission.js';
|
|
2
2
|
import { DOLLAR_SKILL_NAMES, RECOMMENDED_SKILLS } from '../routes.js';
|
|
3
3
|
export const flag = (args = [], name) => args.includes(name);
|
|
4
|
-
// Blindly dropping every "--"-prefixed argv token (the previous behavior of
|
|
5
|
-
// promptOf/positionalArgs) silently deletes any part of an unquoted work-order
|
|
6
|
-
// prompt that happens to contain a flag-lookalike phrase (e.g. "--files 로
|
|
7
|
-
// 확인해라"). Only strip tokens that are actually recognized boolean/global
|
|
8
|
-
// flags; anything else stays in the reconstructed prompt.
|
|
9
4
|
const KNOWN_BOOLEAN_FLAGS = new Set([
|
|
10
5
|
'--json', '--mock', '--execute', '--auto', '--visual', '--research', '--db',
|
|
11
6
|
'--legacy-goal-runtime', '--help', '-h'
|
|
@@ -136,10 +136,6 @@ async function runImageUxReview(root, command, args = []) {
|
|
|
136
136
|
await attachGeneratedReviewImage(root, dir, contract, generatedImage, { realGenerated: !flag(args, '--mock'), mock: flag(args, '--mock') });
|
|
137
137
|
if (!generatedImage && shouldGenerateCallouts) {
|
|
138
138
|
const outputDir = path.join(dir, 'generated-callouts');
|
|
139
|
-
// Auto-discover the Codex App GUI $imagegen output from ~/.codex/generated_images.
|
|
140
|
-
// --strict-generated-since limits discovery to images created at/after this run
|
|
141
|
-
// started (use when an old GUI image could be mistaken for this run's output);
|
|
142
|
-
// otherwise a max-age window guards against stale reuse.
|
|
143
139
|
const missionStartMs = Date.parse(mission.created_at || '') || undefined;
|
|
144
140
|
const maxAgeOverride = readOption(args, '--generated-image-max-age-min', null);
|
|
145
141
|
const result = await generateGptImage2CalloutReview({
|
|
@@ -200,11 +196,6 @@ async function runImageUxReview(root, command, args = []) {
|
|
|
200
196
|
console.log(`Image UX review: ${result.ok ? 'ok' : 'blocked'} ${id}`);
|
|
201
197
|
return result;
|
|
202
198
|
}
|
|
203
|
-
/**
|
|
204
|
-
* Read-only source validation shared with the active-route dispatcher. A
|
|
205
|
-
* blocked result is terminal and guarantees that the run cannot create a
|
|
206
|
-
* mission or write route evidence.
|
|
207
|
-
*/
|
|
208
199
|
export async function imageUxReviewSourcePreflight(args = []) {
|
|
209
200
|
const fromChromeExtension = flag(args, '--from-chrome-extension') || Boolean(readOption(args, '--from-chrome-extension', null));
|
|
210
201
|
const fromComputerUse = flag(args, '--from-computer-use') || Boolean(readOption(args, '--from-computer-use', null));
|
|
@@ -45,10 +45,6 @@ const UNSUPPORTED_MAD_ARGUMENT_NAMES = new Set([
|
|
|
45
45
|
]);
|
|
46
46
|
export async function madHighCommand(args = [], deps = {}) {
|
|
47
47
|
const rawArgsForHelp = (args || []).map((arg) => String(arg));
|
|
48
|
-
// 20차 P2-2: --help previously fell through to the full MAD launch flow
|
|
49
|
-
// below (dependency checks, update prompts) with the flag simply ignored
|
|
50
|
-
// — `sks mad-sks --help` took ~22s instead of printing usage. Must exit
|
|
51
|
-
// before any of that work starts.
|
|
52
48
|
if (rawArgsForHelp.includes('--help') || rawArgsForHelp.includes('-h')) {
|
|
53
49
|
const usage = [
|
|
54
50
|
'Usage: sks mad-sks [subcommand] [flags]',
|
|
@@ -217,11 +213,6 @@ export async function madHighCommand(args = [], deps = {}) {
|
|
|
217
213
|
const uiSnapshotId = Date.now().toString(36);
|
|
218
214
|
const strictUiSnapshot = process.env.SKS_MAD_STRICT_UI_SNAPSHOT === '1';
|
|
219
215
|
const beforeUi = strictUiSnapshot ? await writeCodexAppUiSnapshot(launchRoot, `mad-before-${uiSnapshotId}`).catch(() => null) : null;
|
|
220
|
-
// launchFast skips the redundant live-`codex exec` config probe (up to ~20s, run
|
|
221
|
-
// up to 3x via repair re-inspections): the real codex profile is exercised moments
|
|
222
|
-
// later when the Zellij session opens. All filesystem/permission/EPERM/symlink/ACL
|
|
223
|
-
// readability + repair checks still run. SKS_LAUNCH_FULL_CODEX_PROBE=1 restores the
|
|
224
|
-
// old behavior.
|
|
225
216
|
const allowMadRepair = rawArgs.includes('--repair-config') || rawArgs.includes('--fix') || rawArgs.includes('--yes-repair');
|
|
226
217
|
const allowUnverifiedToolOutputRecovery = codexLbToolOutputRecoveryOverrideAcknowledged({ args: rawArgs });
|
|
227
218
|
const launchPreflightOpts = {
|
|
@@ -237,12 +228,6 @@ export async function madHighCommand(args = [], deps = {}) {
|
|
|
237
228
|
: {})
|
|
238
229
|
};
|
|
239
230
|
let launchPreflight = await runCodexLaunchPreflight(launchRoot, launchPreflightOpts);
|
|
240
|
-
// Fresh-project bootstrap: when the ONLY blocker is that the managed Codex config does
|
|
241
|
-
// not exist yet (`.codex/config.toml` absent), regenerate it — exactly what the blocker
|
|
242
|
-
// action tells the user to run via `sks doctor --fix` — and re-run the preflight once,
|
|
243
|
-
// instead of blocking the launch on a trivially-fixable missing config. An EXISTING but
|
|
244
|
-
// unreadable/broken config is NOT auto-fixed here: it still blocks and routes the user
|
|
245
|
-
// to `sks doctor --fix`, so genuine permission/EPERM/parse problems are never masked.
|
|
246
231
|
if (!launchPreflight.ok && !fs.existsSync(path.join(launchRoot, '.codex', 'config.toml'))) {
|
|
247
232
|
try {
|
|
248
233
|
await initProject(launchRoot, { installScope: rawArgs.includes('--local-only') ? 'project' : 'global', localOnly: rawArgs.includes('--local-only'), globalCommand: 'sks' });
|
|
@@ -334,9 +319,6 @@ export async function madHighCommand(args = [], deps = {}) {
|
|
|
334
319
|
explicitWorkspace
|
|
335
320
|
})
|
|
336
321
|
: codexLbImmediateLaunchOpts(cleanArgs, launchLb, { codexArgs: launchProfile.launch_args, conciseBlockers: true, madSksEnv, launchEnv: madSksEnv, recoveryAllowUnverified: allowUnverifiedToolOutputRecovery });
|
|
337
|
-
// Only the auto-derived stable `sks-mad-<cwd>` name accumulates panes across
|
|
338
|
-
// runs; when the user names a session explicitly (or codex-lb already minted a
|
|
339
|
-
// fresh unique session) respect it and skip the reset.
|
|
340
322
|
const autoDerivedMadSession = !explicitWorkspace && !launchOpts.session;
|
|
341
323
|
const workspace = explicitWorkspace || launchOpts.session || `sks-mad-${sanitizeZellijSessionName(process.cwd())}`;
|
|
342
324
|
const launch = headlessZellij
|
|
@@ -399,9 +381,6 @@ export async function madHighCommand(args = [], deps = {}) {
|
|
|
399
381
|
}));
|
|
400
382
|
launchLifecycleTasks.push(zellijUpdateNoticePromise);
|
|
401
383
|
}
|
|
402
|
-
// The launcher only creates a detached background session. In an interactive
|
|
403
|
-
// terminal, immediately attach so the session actually opens for the user
|
|
404
|
-
// instead of leaving them to copy/paste the attach command by hand.
|
|
405
384
|
if (!headlessZellij && shouldAutoAttachZellij(args)) {
|
|
406
385
|
console.log(`Opening Zellij session: ${launch.session_name} (detach with Ctrl+q, re-attach later with: ${launch.attach_command_with_env})`);
|
|
407
386
|
const attached = attachZellijSessionInteractive(launch.session_name, { cwd: process.cwd(), configPath: launch.clipboard_config_path });
|
|
@@ -528,12 +507,6 @@ function buildGlmMadLaunchOpts(cleanArgs = [], opts = {}) {
|
|
|
528
507
|
function missionDirLike(root, missionId) {
|
|
529
508
|
return path.join(root, '.sneakoscope', 'missions', missionId);
|
|
530
509
|
}
|
|
531
|
-
// Decide whether to take over the current terminal with a foreground Zellij
|
|
532
|
-
// attach. We only do this for genuinely interactive launches; piped, JSON,
|
|
533
|
-
// non-TTY, or already-inside-Zellij invocations keep the previous behaviour of
|
|
534
|
-
// printing a manual "Attach with:" hint. Use --no-attach (or
|
|
535
|
-
// SKS_NO_ZELLIJ_ATTACH=1) to force the background-only behaviour, and --attach
|
|
536
|
-
// to force attaching even without a detected TTY.
|
|
537
510
|
function shouldAutoAttachZellij(args) {
|
|
538
511
|
const list = (args || []).map((arg) => String(arg));
|
|
539
512
|
if (list.includes('--no-attach'))
|
|
@@ -542,7 +515,6 @@ function shouldAutoAttachZellij(args) {
|
|
|
542
515
|
return false;
|
|
543
516
|
if (process.env.SKS_NO_ZELLIJ_ATTACH === '1')
|
|
544
517
|
return false;
|
|
545
|
-
// Nested attach is rejected by Zellij when already inside a session.
|
|
546
518
|
if (process.env.ZELLIJ)
|
|
547
519
|
return false;
|
|
548
520
|
if (list.includes('--attach'))
|
|
@@ -599,11 +571,6 @@ async function activateMadZellijPermissionState(cwd = process.cwd(), args = [])
|
|
|
599
571
|
const dbWriteAllowed = has('db_write');
|
|
600
572
|
const { id, dir } = await createMission(root, { mode: 'mad-sks', prompt: `${activatedBy} Zellij scoped high-power maintenance session` });
|
|
601
573
|
const protectedCore = resolveProtectedCore({ packageRoot: packageRoot(), targetRoot: cwd });
|
|
602
|
-
// The interactive launch 'before' snapshot is only persisted (env + policy json)
|
|
603
|
-
// and is never compared against an 'after' snapshot during the session, so the
|
|
604
|
-
// strong full-content hash is wasted here. Use the cheap metadata digest (no file
|
|
605
|
-
// reads) on the launch hot path. run/apply and the release gates still take their
|
|
606
|
-
// own strong content snapshots where the digest is actually compared.
|
|
607
574
|
const protectedCoreBefore = await snapshotProtectedCore(packageRoot(), 'mad-live-before', { mode: 'metadata' });
|
|
608
575
|
const protectedCorePolicyPath = path.join(dir, 'mad-sks-protected-core-policy.json');
|
|
609
576
|
const protectedCoreBeforePath = path.join(dir, 'mad-sks-live-protected-core-before.json');
|
|
@@ -878,11 +845,6 @@ async function madSksSubcommand(subcommand, args = []) {
|
|
|
878
845
|
const targetRoot = path.resolve(readOption(args, '--target-root', process.cwd()));
|
|
879
846
|
const userIntent = readOption(args, '--intent', 'MAD-SKS user-authorized maintenance');
|
|
880
847
|
const sqlPlaneSubcommand = subcommand === 'sql' || subcommand === 'apply-migration';
|
|
881
|
-
// --allow-db-write scope is implied by choosing the sql/apply-migration
|
|
882
|
-
// subcommand itself, but --yes (explicit destructive-action confirmation)
|
|
883
|
-
// must come from the caller's actual args — auto-injecting it here used to
|
|
884
|
-
// silently satisfy guard-middleware's high_risk_confirmation_required check
|
|
885
|
-
// for every sql/apply-migration call regardless of user intent (20차 P0-10).
|
|
886
848
|
const flags = parseMadSksFlags([
|
|
887
849
|
'--mad-sks',
|
|
888
850
|
subcommand === 'plan' ? '--plan-only' : '',
|