sneakoscope 2.0.14 → 2.0.15
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 +6 -3
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/crates/sks-core/src/main.rs +1 -1
- package/dist/.sks-build-stamp.json +4 -4
- package/dist/bin/sks.js +1 -1
- package/dist/cli/command-registry.js +1 -0
- package/dist/commands/mad-db.js +5 -0
- package/dist/commands/zellij-slot-pane.js +3 -1
- package/dist/core/agents/agent-plan.js +3 -2
- package/dist/core/agents/native-cli-session-swarm.js +118 -0
- package/dist/core/agents/native-cli-worker.js +85 -0
- package/dist/core/commands/basic-cli.js +1 -1
- package/dist/core/commands/command-suggestions.js +1 -1
- package/dist/core/commands/mad-db-command.js +106 -0
- package/dist/core/commands/mad-sks-command.js +50 -13
- package/dist/core/commands/naruto-command.js +81 -1
- package/dist/core/commands/research-command.js +13 -1
- package/dist/core/commands/team-command.js +25 -1
- package/dist/core/db-safety.js +26 -0
- package/dist/core/fsx.js +1 -1
- package/dist/core/mad-db/mad-db-capability.js +84 -0
- package/dist/core/mad-db/mad-db-ledger.js +17 -0
- package/dist/core/mad-db/mad-db-policy-resolver.js +46 -0
- package/dist/core/pipeline-internals/runtime-core.js +74 -8
- package/dist/core/pipeline-internals/runtime-gates.js +44 -0
- package/dist/core/proof/route-proof-gate.js +5 -3
- package/dist/core/proof/route-proof-policy.js +9 -1
- package/dist/core/release/release-gate-affected-selector.js +113 -0
- package/dist/core/release/release-gate-batch-runner.js +67 -0
- package/dist/core/release/release-gate-dag.js +22 -3
- package/dist/core/release/release-gate-resource-governor.js +23 -11
- package/dist/core/research/implementation-blueprint-densifier.js +1 -1
- package/dist/core/research/implementation-blueprint-markdown.js +1 -1
- package/dist/core/research/implementation-blueprint.js +68 -7
- package/dist/core/research/research-final-reviewer.js +27 -1
- package/dist/core/research/research-handoff.js +69 -5
- package/dist/core/research/research-realistic-report.js +162 -0
- package/dist/core/research/research-repetition-detector.js +75 -0
- package/dist/core/research/research-report-quality.js +27 -5
- package/dist/core/research/research-stage-runner.js +40 -13
- package/dist/core/research/research-synthesis-prompt.js +52 -0
- package/dist/core/research/research-synthesis-writer.js +208 -0
- package/dist/core/research.js +60 -48
- package/dist/core/routes.js +23 -19
- package/dist/core/update/update-notice.js +120 -0
- package/dist/core/version.js +1 -1
- package/dist/core/zellij/zellij-dashboard-renderer.js +2 -0
- package/dist/core/zellij/zellij-slot-column-anchor.js +35 -1
- package/dist/core/zellij/zellij-slot-pane-renderer.js +57 -0
- package/dist/core/zellij/zellij-slot-telemetry.js +182 -0
- package/dist/scripts/release-gate-dag-runner.js +5 -0
- package/dist/scripts/release-speed-summary.js +25 -0
- package/package.json +52 -5
- package/schemas/mad-db/mad-db-capability.schema.json +31 -0
- package/schemas/mad-db/mad-db-ledger.schema.json +14 -0
- package/schemas/research/implementation-blueprint.schema.json +6 -1
- package/schemas/research/research-final-review.schema.json +10 -0
- package/schemas/research/research-synthesis-output.schema.json +62 -0
- package/schemas/update/update-notice.schema.json +19 -0
- package/schemas/zellij/zellij-slot-telemetry.schema.json +89 -0
- package/dist/scripts/agent-ast-aware-work-graph-check.js +0 -25
- package/dist/scripts/agent-backfill-replenishment-check.js +0 -13
- package/dist/scripts/agent-backfill-route-blackbox.js +0 -5
- package/dist/scripts/agent-background-terminals-check.js +0 -16
- package/dist/scripts/agent-cleanup-command-ux-check.js +0 -12
- package/dist/scripts/agent-cleanup-executor-check.js +0 -53
- package/dist/scripts/agent-cleanup-executor-v2-check.js +0 -39
- package/dist/scripts/agent-cli-options-to-task-graph-check.js +0 -5
- package/dist/scripts/agent-codex-app-cockpit-check.js +0 -91
- package/dist/scripts/agent-codex-child-overlap-check.js +0 -21
- package/dist/scripts/agent-dynamic-cockpit-check.js +0 -10
- package/dist/scripts/agent-dynamic-pool-check.js +0 -13
- package/dist/scripts/agent-dynamic-pool-route-blackbox.js +0 -5
- package/dist/scripts/agent-fast-mode-default-check.js +0 -62
- package/dist/scripts/agent-fast-mode-worker-propagation-check.js +0 -7
- package/dist/scripts/agent-follow-up-work-schema-check.js +0 -80
- package/dist/scripts/agent-goal-mode-propagation-check.js +0 -9
- package/dist/scripts/agent-intelligent-work-graph-check.js +0 -25
- package/dist/scripts/agent-janitor-check.js +0 -76
- package/dist/scripts/agent-main-no-scout-check.js +0 -11
- package/dist/scripts/agent-model-authored-patch-envelope-check.js +0 -15
- package/dist/scripts/agent-multi-project-isolation-check.js +0 -86
- package/dist/scripts/agent-native-cli-session-proof-check.js +0 -7
- package/dist/scripts/agent-native-cli-session-swarm-10-check.js +0 -7
- package/dist/scripts/agent-native-cli-session-swarm-20-check.js +0 -7
- package/dist/scripts/agent-native-cli-session-swarm-check.js +0 -7
- package/dist/scripts/agent-no-subagent-scaling-check.js +0 -7
- package/dist/scripts/agent-parallel-write-blackbox.js +0 -56
- package/dist/scripts/agent-parallel-write-kernel-check.js +0 -103
- package/dist/scripts/agent-patch-conflict-rebase-check.js +0 -198
- package/dist/scripts/agent-patch-envelope-extraction-check.js +0 -17
- package/dist/scripts/agent-patch-proof-check.js +0 -41
- package/dist/scripts/agent-patch-proof-runtime-check.js +0 -63
- package/dist/scripts/agent-patch-queue-runtime-check.js +0 -36
- package/dist/scripts/agent-patch-rollback-check.js +0 -38
- package/dist/scripts/agent-patch-rollback-dag-check.js +0 -14
- package/dist/scripts/agent-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/agent-patch-swarm-runtime-check.js +0 -10
- package/dist/scripts/agent-patch-swarm-runtime-truth-check.js +0 -76
- package/dist/scripts/agent-patch-transaction-journal-check.js +0 -57
- package/dist/scripts/agent-patch-verification-dag-check.js +0 -14
- package/dist/scripts/agent-proof-contract-reconciled-check.js +0 -5
- package/dist/scripts/agent-real-codex-dynamic-smoke-check.js +0 -166
- package/dist/scripts/agent-real-codex-dynamic-smoke-v2-check.js +0 -14
- package/dist/scripts/agent-real-codex-in-zellij-worker-pane-check.js +0 -229
- package/dist/scripts/agent-real-codex-parallel-workers-10-check.js +0 -5
- package/dist/scripts/agent-real-codex-parallel-workers-20-check.js +0 -5
- package/dist/scripts/agent-real-codex-parallel-workers-5-check.js +0 -5
- package/dist/scripts/agent-real-codex-parallel-workers-check.js +0 -5
- package/dist/scripts/agent-role-config-repair-check.js +0 -33
- package/dist/scripts/agent-rollback-command-check.js +0 -86
- package/dist/scripts/agent-route-truth-backfill-check.js +0 -5
- package/dist/scripts/agent-scheduler-proof-check.js +0 -13
- package/dist/scripts/agent-scheduler-proof-hardening-check.js +0 -22
- package/dist/scripts/agent-session-generation-check.js +0 -21
- package/dist/scripts/agent-slot-pane-binding-proof-check.js +0 -64
- package/dist/scripts/agent-source-intelligence-propagation-check.js +0 -9
- package/dist/scripts/agent-strategy-to-lease-wiring-check.js +0 -32
- package/dist/scripts/agent-strategy-to-patch-strict-check.js +0 -54
- package/dist/scripts/agent-task-graph-expansion-check.js +0 -14
- package/dist/scripts/agent-terminal-generations-check.js +0 -23
- package/dist/scripts/agent-visual-consistency-check.js +0 -9
- package/dist/scripts/agent-wiki-context-proof-check.js +0 -62
- package/dist/scripts/agent-worker-backend-router-check.js +0 -63
- package/dist/scripts/agent-worker-scout-limited-check.js +0 -17
- package/dist/scripts/agent-zellij-dynamic-backfill-panes-check.js +0 -34
- package/dist/scripts/agent-zellij-runtime-check.js +0 -84
- package/dist/scripts/all-feature-deep-completion-check.js +0 -31
- package/dist/scripts/appshots-capability-check.js +0 -18
- package/dist/scripts/appshots-evidence-check.js +0 -48
- package/dist/scripts/appshots-operator-policy-check.js +0 -25
- package/dist/scripts/appshots-privacy-safety-check.js +0 -48
- package/dist/scripts/appshots-source-intelligence-check.js +0 -53
- package/dist/scripts/appshots-thread-attachment-discovery-check.js +0 -87
- package/dist/scripts/appshots-triwiki-voxel-check.js +0 -46
- package/dist/scripts/architecture-guard-check.js +0 -55
- package/dist/scripts/changelog-check.js +0 -47
- package/dist/scripts/codex-0-133-official-compat-report.js +0 -53
- package/dist/scripts/codex-0-134-official-compat-report.js +0 -110
- package/dist/scripts/codex-0-134-runner-truth-check.js +0 -66
- package/dist/scripts/codex-0-135-compat-check.js +0 -57
- package/dist/scripts/codex-0-136-compat-check.js +0 -30
- package/dist/scripts/codex-0-137-compat-check.js +0 -27
- package/dist/scripts/codex-app-fast-ui-preservation-check.js +0 -32
- package/dist/scripts/codex-app-provider-badge-check.js +0 -37
- package/dist/scripts/codex-app-ui-clobber-guard-check.js +0 -22
- package/dist/scripts/codex-app-ui-preservation-check.js +0 -96
- package/dist/scripts/codex-control-all-pipelines-check.js +0 -36
- package/dist/scripts/codex-control-capability-check.js +0 -10
- package/dist/scripts/codex-control-empty-result-retry-check.js +0 -43
- package/dist/scripts/codex-control-event-stream-ledger-check.js +0 -10
- package/dist/scripts/codex-control-keepalive-no-cot-leak-check.js +0 -14
- package/dist/scripts/codex-control-no-legacy-fallback-check.js +0 -31
- package/dist/scripts/codex-control-side-effect-scope-check.js +0 -26
- package/dist/scripts/codex-control-stream-idle-watchdog-check.js +0 -18
- package/dist/scripts/codex-control-structured-output-check.js +0 -11
- package/dist/scripts/codex-control-thread-registry-check.js +0 -11
- package/dist/scripts/codex-control-tool-call-sequence-repair-check.js +0 -14
- package/dist/scripts/codex-environment-scoped-approvals-check.js +0 -10
- package/dist/scripts/codex-exec-output-schema-actual-syntax-check.js +0 -33
- package/dist/scripts/codex-fast-mode-profile-propagation-check.js +0 -12
- package/dist/scripts/codex-history-search-check.js +0 -19
- package/dist/scripts/codex-hook-semantic-check.js +0 -15
- package/dist/scripts/codex-hook-strict-subset-check.js +0 -61
- package/dist/scripts/codex-lb-config-toml-safety-check.js +0 -85
- package/dist/scripts/codex-lb-persistence-truth-check.js +0 -96
- package/dist/scripts/codex-lb-setup-fixture-check.js +0 -91
- package/dist/scripts/codex-lb-setup-truthfulness-check.js +0 -84
- package/dist/scripts/codex-legacy-profile-consumers-removed-check.js +0 -24
- package/dist/scripts/codex-managed-proxy-env-check.js +0 -17
- package/dist/scripts/codex-output-schema-fixture-check.js +0 -25
- package/dist/scripts/codex-permission-profiles-check.js +0 -36
- package/dist/scripts/codex-plugin-list-json-check.js +0 -8
- package/dist/scripts/codex-profile-primary-check.js +0 -13
- package/dist/scripts/codex-project-config-policy-splitter-check.js +0 -51
- package/dist/scripts/codex-resume-cwd-truth-check.js +0 -17
- package/dist/scripts/codex-sdk-all-pipelines-check.js +0 -32
- package/dist/scripts/codex-sdk-backend-router-check.js +0 -65
- package/dist/scripts/codex-sdk-capability-check.js +0 -11
- package/dist/scripts/codex-sdk-core-skill-pipeline-check.js +0 -9
- package/dist/scripts/codex-sdk-dfix-pipeline-check.js +0 -9
- package/dist/scripts/codex-sdk-event-stream-ledger-check.js +0 -9
- package/dist/scripts/codex-sdk-no-legacy-fallback-check.js +0 -33
- package/dist/scripts/codex-sdk-qa-pipeline-check.js +0 -8
- package/dist/scripts/codex-sdk-real-smoke-check.js +0 -39
- package/dist/scripts/codex-sdk-release-review-pipeline-check.js +0 -13
- package/dist/scripts/codex-sdk-research-pipeline-check.js +0 -47
- package/dist/scripts/codex-sdk-sandbox-policy-check.js +0 -21
- package/dist/scripts/codex-sdk-structured-output-check.js +0 -10
- package/dist/scripts/codex-sdk-team-naruto-agent-pipeline-check.js +0 -12
- package/dist/scripts/codex-sdk-thread-registry-check.js +0 -11
- package/dist/scripts/codex-sdk-ux-ppt-review-pipeline-check.js +0 -9
- package/dist/scripts/codex-sdk-zellij-pane-binding-check.js +0 -13
- package/dist/scripts/codex-thread-runtime-choice-check.js +0 -10
- package/dist/scripts/codex-web-adapter-check.js +0 -12
- package/dist/scripts/computer-use-live-evidence-check.js +0 -55
- package/dist/scripts/computer-use-live-optional-check.js +0 -32
- package/dist/scripts/computer-use-policy-check.js +0 -69
- package/dist/scripts/computer-use-visual-route-fixture-check.js +0 -37
- package/dist/scripts/core-skill-card-schema-check.js +0 -61
- package/dist/scripts/core-skill-deployment-snapshot-check.js +0 -54
- package/dist/scripts/core-skill-heldout-validation-check.js +0 -49
- package/dist/scripts/core-skill-no-inference-optimizer-check.js +0 -75
- package/dist/scripts/core-skill-patch-check.js +0 -79
- package/dist/scripts/core-skill-promotion-side-effect-ledger-check.js +0 -64
- package/dist/scripts/core-skill-rollout-scoring-check.js +0 -72
- package/dist/scripts/core-skill-route-runtime-integration-check.js +0 -49
- package/dist/scripts/dfix-fast-blackbox-check.js +0 -37
- package/dist/scripts/dfix-fast-kernel-check.js +0 -26
- package/dist/scripts/dfix-fixture-check.js +0 -6
- package/dist/scripts/dfix-parallel-write-blackbox.js +0 -48
- package/dist/scripts/dfix-patch-handoff-check.js +0 -13
- package/dist/scripts/dfix-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/dfix-performance-check.js +0 -15
- package/dist/scripts/dfix-verification-check.js +0 -9
- package/dist/scripts/dfix-verification-recommendation-check.js +0 -15
- package/dist/scripts/docs-truthfulness-check.js +0 -61
- package/dist/scripts/doctor-codex-doctor-parity-check.js +0 -17
- package/dist/scripts/doctor-fix-proves-codex-read-check.js +0 -64
- package/dist/scripts/doctor-fix-recovers-corrupted-config-check.js +0 -122
- package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +0 -39
- package/dist/scripts/evidence-fixture-check.js +0 -26
- package/dist/scripts/evidence-flagship-coverage-check.js +0 -55
- package/dist/scripts/fake-real-proof-policy-v2-check.js +0 -27
- package/dist/scripts/fake-vs-real-proof-policy-check.js +0 -14
- package/dist/scripts/fast-codex-service-tier-proof-check.js +0 -42
- package/dist/scripts/flagship-proof-graph-v2-check.js +0 -48
- package/dist/scripts/flagship-proof-graph-v3-check.js +0 -67
- package/dist/scripts/flagship-proof-graph-v4-check.js +0 -61
- package/dist/scripts/git-precommit-fixture-check.js +0 -41
- package/dist/scripts/git-worktree-cache-performance-check.js +0 -25
- package/dist/scripts/git-worktree-capability-check.js +0 -27
- package/dist/scripts/git-worktree-checkpoint-check.js +0 -20
- package/dist/scripts/git-worktree-cleanup-check.js +0 -27
- package/dist/scripts/git-worktree-cross-rebase-check.js +0 -39
- package/dist/scripts/git-worktree-diff-envelope-check.js +0 -17
- package/dist/scripts/git-worktree-diff-export-check.js +0 -43
- package/dist/scripts/git-worktree-dirty-lock-check.js +0 -17
- package/dist/scripts/git-worktree-dirty-main-detection-check.js +0 -14
- package/dist/scripts/git-worktree-integration-primary-check.js +0 -24
- package/dist/scripts/git-worktree-integration-primary-runtime-check.js +0 -20
- package/dist/scripts/git-worktree-manager-check.js +0 -37
- package/dist/scripts/git-worktree-manifest-append-check.js +0 -18
- package/dist/scripts/git-worktree-merge-queue-check.js +0 -31
- package/dist/scripts/git-worktree-pool-performance-check.js +0 -20
- package/dist/scripts/git-worktree-untracked-diff-check.js +0 -18
- package/dist/scripts/goal-mode-official-default-check.js +0 -12
- package/dist/scripts/gpt-final-arbiter-check.js +0 -63
- package/dist/scripts/gpt-final-arbiter-performance-check.js +0 -36
- package/dist/scripts/gpt-image-2-request-validator-check.js +0 -35
- package/dist/scripts/hooks-0.134-context-parity-check.js +0 -20
- package/dist/scripts/hooks-actual-parity-check.js +0 -17
- package/dist/scripts/hooks-actual-parity-v2-check.js +0 -21
- package/dist/scripts/hooks-latest-schema-check.js +0 -20
- package/dist/scripts/hooks-managed-install-fixture-check.js +0 -21
- package/dist/scripts/hooks-official-hash-oracle-check.js +0 -35
- package/dist/scripts/hooks-official-hash-parity-check.js +0 -17
- package/dist/scripts/hooks-subagent-events-check.js +0 -17
- package/dist/scripts/hooks-trust-state-check.js +0 -14
- package/dist/scripts/image-fidelity-fixture-check.js +0 -24
- package/dist/scripts/imagegen-capability-check.js +0 -30
- package/dist/scripts/imagegen-real-smoke-check.js +0 -155
- package/dist/scripts/install-update-preserves-config-check.js +0 -87
- package/dist/scripts/json-schema-recursive-check.js +0 -78
- package/dist/scripts/legacy-multiagent-removal-check.js +0 -85
- package/dist/scripts/legacy-upgrade-matrix-check.js +0 -300
- package/dist/scripts/local-collab-all-pipelines-final-gpt-check.js +0 -21
- package/dist/scripts/local-collab-gpt-final-availability-check.js +0 -58
- package/dist/scripts/local-collab-no-local-only-final-check.js +0 -27
- package/dist/scripts/local-collab-policy-check.js +0 -17
- package/dist/scripts/local-collab-worktree-gpt-final-apply-policy-check.js +0 -63
- package/dist/scripts/local-llm-all-pipelines-check.js +0 -11
- package/dist/scripts/local-llm-cache-performance-check.js +0 -10
- package/dist/scripts/local-llm-capability-check.js +0 -14
- package/dist/scripts/local-llm-smoke-check.js +0 -23
- package/dist/scripts/local-llm-structured-output-check.js +0 -11
- package/dist/scripts/local-llm-throughput-check.js +0 -10
- package/dist/scripts/local-llm-tool-call-repair-check.js +0 -10
- package/dist/scripts/local-llm-warmup-check.js +0 -11
- package/dist/scripts/loop-blocker-check.js +0 -15
- package/dist/scripts/mad-preflight-blocks-unreadable-config-check.js +0 -35
- package/dist/scripts/mad-sks-actual-executor-blackbox.js +0 -5
- package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +0 -92
- package/dist/scripts/mad-sks-audit-proof-check.js +0 -34
- package/dist/scripts/mad-sks-db-executor-check.js +0 -5
- package/dist/scripts/mad-sks-executor-proof-graph-check.js +0 -5
- package/dist/scripts/mad-sks-fast-mode-propagation-check.js +0 -24
- package/dist/scripts/mad-sks-file-write-executor-check.js +0 -5
- package/dist/scripts/mad-sks-immutable-harness-check.js +0 -36
- package/dist/scripts/mad-sks-no-harness-modification-check.js +0 -25
- package/dist/scripts/mad-sks-package-executor-check.js +0 -5
- package/dist/scripts/mad-sks-permission-model-check.js +0 -22
- package/dist/scripts/mad-sks-rollback-apply-check.js +0 -5
- package/dist/scripts/mad-sks-service-executor-check.js +0 -5
- package/dist/scripts/mad-sks-shell-executor-check.js +0 -5
- package/dist/scripts/mad-sks-write-guard-check.js +0 -28
- package/dist/scripts/mad-sks-zellij-default-pane-worker-check.js +0 -37
- package/dist/scripts/mad-sks-zellij-launch-check.js +0 -102
- package/dist/scripts/mcp-0-134-modernization-check.js +0 -55
- package/dist/scripts/mcp-readonly-concurrency-check.js +0 -17
- package/dist/scripts/mcp-readonly-runtime-scheduler-check.js +0 -20
- package/dist/scripts/mcp-tool-naming-parity-check.js +0 -16
- package/dist/scripts/memory-summary-rebuild-check.js +0 -22
- package/dist/scripts/mutation-callsite-coverage-check.js +0 -180
- package/dist/scripts/naruto-active-pool-check.js +0 -39
- package/dist/scripts/naruto-actual-worker-control-plane-check.js +0 -56
- package/dist/scripts/naruto-allocation-policy-check.js +0 -33
- package/dist/scripts/naruto-allocation-runtime-wiring-check.js +0 -92
- package/dist/scripts/naruto-concurrency-governor-check.js +0 -53
- package/dist/scripts/naruto-extreme-parallelism-check.js +0 -22
- package/dist/scripts/naruto-extreme-parallelism-real-check.js +0 -43
- package/dist/scripts/naruto-gpt-final-pack-check.js +0 -34
- package/dist/scripts/naruto-orchestrator-runtime-source-check.js +0 -70
- package/dist/scripts/naruto-parallel-patch-apply-check.js +0 -41
- package/dist/scripts/naruto-readonly-routing-check.js +0 -116
- package/dist/scripts/naruto-real-active-pool-check.js +0 -39
- package/dist/scripts/naruto-real-active-pool-runtime-check.js +0 -55
- package/dist/scripts/naruto-rebalance-policy-check.js +0 -41
- package/dist/scripts/naruto-role-distribution-check.js +0 -23
- package/dist/scripts/naruto-shadow-clone-swarm-check.js +0 -153
- package/dist/scripts/naruto-verification-pool-check.js +0 -36
- package/dist/scripts/naruto-work-graph-check.js +0 -24
- package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -29
- package/dist/scripts/naruto-worktree-coding-check.js +0 -44
- package/dist/scripts/naruto-worktree-gpt-final-check.js +0 -45
- package/dist/scripts/naruto-worktree-zellij-ui-check.js +0 -28
- package/dist/scripts/naruto-zellij-dynamic-right-column-check.js +0 -48
- package/dist/scripts/naruto-zellij-massive-ui-check.js +0 -23
- package/dist/scripts/non-recursive-pipeline-check.js +0 -68
- package/dist/scripts/npm-publish-performance-check.js +0 -65
- package/dist/scripts/official-docs-compat-report.js +0 -304
- package/dist/scripts/packlist-performance-check.js +0 -83
- package/dist/scripts/parallel-verification-engine-check.js +0 -85
- package/dist/scripts/postinstall-safe-side-effects-check.js +0 -65
- package/dist/scripts/ppt-full-e2e-artifact-graph-check.js +0 -40
- package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -109
- package/dist/scripts/ppt-image-voxel-relations-check.js +0 -9
- package/dist/scripts/ppt-imagegen-blackbox-check.js +0 -46
- package/dist/scripts/ppt-imagegen-review-fixture-check.js +0 -6
- package/dist/scripts/ppt-issue-extraction-fixture-check.js +0 -7
- package/dist/scripts/ppt-no-mock-as-real-check.js +0 -8
- package/dist/scripts/ppt-no-text-fallback-check.js +0 -7
- package/dist/scripts/ppt-proof-trust-fixture-check.js +0 -10
- package/dist/scripts/ppt-real-export-adapter-check.js +0 -13
- package/dist/scripts/ppt-real-imagegen-smoke-check.js +0 -42
- package/dist/scripts/ppt-real-imagegen-wiring-check.js +0 -16
- package/dist/scripts/ppt-reexport-rereview-check.js +0 -19
- package/dist/scripts/ppt-slide-export-fixture-check.js +0 -7
- package/dist/scripts/prepublish-fast-check.js +0 -128
- package/dist/scripts/priority-full-closure-check.js +0 -12
- package/dist/scripts/product-design-auto-install-check.js +0 -119
- package/dist/scripts/product-design-plugin-routing-check.js +0 -101
- package/dist/scripts/prompt-placeholder-guard-check.js +0 -33
- package/dist/scripts/provider-badge-context-check.js +0 -26
- package/dist/scripts/provider-context-config-toml-check.js +0 -63
- package/dist/scripts/python-codex-sdk-all-pipelines-check.js +0 -47
- package/dist/scripts/python-codex-sdk-capability-check.js +0 -75
- package/dist/scripts/python-codex-sdk-sandbox-policy-check.js +0 -10
- package/dist/scripts/python-codex-sdk-stream-bridge-check.js +0 -12
- package/dist/scripts/python-tools-smoke-check.js +0 -71
- package/dist/scripts/qa-actual-route-backfill-check.js +0 -5
- package/dist/scripts/qa-backfill-route-blackbox.js +0 -5
- package/dist/scripts/qa-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/readme-architecture-imagegen-official-check.js +0 -448
- package/dist/scripts/release-cache-glob-hashing-check.js +0 -42
- package/dist/scripts/release-dag-full-coverage-check.js +0 -66
- package/dist/scripts/release-dist-freshness-check.js +0 -8
- package/dist/scripts/release-dynamic-performance-check.js +0 -103
- package/dist/scripts/release-gate-budget-check.js +0 -36
- package/dist/scripts/release-gate-dag-runner-check.js +0 -17
- package/dist/scripts/release-metadata-1-11-check.js +0 -37
- package/dist/scripts/release-metadata-1-12-check.js +0 -48
- package/dist/scripts/release-metadata-1-13-check.js +0 -53
- package/dist/scripts/release-metadata-1-14-check.js +0 -63
- package/dist/scripts/release-metadata-1-16-check.js +0 -81
- package/dist/scripts/release-metadata-1-17-check.js +0 -51
- package/dist/scripts/release-metadata-1-19-check.js +0 -371
- package/dist/scripts/release-metadata-check.js +0 -7
- package/dist/scripts/release-native-agent-fixture-check.js +0 -41
- package/dist/scripts/release-parallel-check.js +0 -374
- package/dist/scripts/release-parallel-full-coverage-check.js +0 -13
- package/dist/scripts/release-parallel-speed-budget-check.js +0 -84
- package/dist/scripts/release-provenance-check.js +0 -150
- package/dist/scripts/release-real-check.js +0 -330
- package/dist/scripts/release-registry-check.js +0 -344
- package/dist/scripts/release-runtime-truth-matrix-check.js +0 -47
- package/dist/scripts/release-stability-report-check.js +0 -99
- package/dist/scripts/release-version-truth-check.js +0 -134
- package/dist/scripts/research-actual-route-backfill-check.js +0 -5
- package/dist/scripts/research-backfill-route-blackbox.js +0 -5
- package/dist/scripts/research-blueprint-densifier-check.js +0 -21
- package/dist/scripts/research-claim-builder-check.js +0 -19
- package/dist/scripts/research-complete-package-fixture-check.js +0 -23
- package/dist/scripts/research-final-reviewer-blackbox.js +0 -22
- package/dist/scripts/research-parallel-source-shards-check.js +0 -22
- package/dist/scripts/research-quality-gate-check.js +0 -111
- package/dist/scripts/research-real-cycle-no-legacy-final-md-check.js +0 -14
- package/dist/scripts/research-short-report-rejection-check.js +0 -46
- package/dist/scripts/research-source-ledger-merge-check.js +0 -26
- package/dist/scripts/research-stage-cycle-runtime-blackbox.js +0 -24
- package/dist/scripts/responses-retry-policy-centralized-check.js +0 -19
- package/dist/scripts/retention-cleanup-safety-check.js +0 -155
- package/dist/scripts/route-blackbox-realism-check.js +0 -21
- package/dist/scripts/route-proof-artifact-structure-check.js +0 -145
- package/dist/scripts/runtime-dist-parity-check.js +0 -78
- package/dist/scripts/runtime-no-mjs-scripts-check.js +0 -45
- package/dist/scripts/runtime-no-src-mjs-check.js +0 -32
- package/dist/scripts/runtime-no-tmux-check.js +0 -113
- package/dist/scripts/runtime-ts-python-boundary-check.js +0 -59
- package/dist/scripts/runtime-ts-rust-boundary-check.js +0 -74
- package/dist/scripts/runtime-ts-source-of-truth-check.js +0 -55
- package/dist/scripts/safety-check.js +0 -23
- package/dist/scripts/shared-memory-fixture-check.js +0 -27
- package/dist/scripts/side-effect-runtime-report-check.js +0 -19
- package/dist/scripts/side-effect-zero-gate-check.js +0 -226
- package/dist/scripts/sks-1-11-fixture-check.js +0 -130
- package/dist/scripts/source-intelligence-all-modes-check.js +0 -32
- package/dist/scripts/source-intelligence-policy-check.js +0 -13
- package/dist/scripts/strategy-adhd-orchestrating-gate-check.js +0 -22
- package/dist/scripts/strategy-file-ownership-plan-check.js +0 -18
- package/dist/scripts/strategy-parallel-modification-plan-check.js +0 -19
- package/dist/scripts/strategy-verification-rollback-dag-check.js +0 -19
- package/dist/scripts/team-actual-route-backfill-check.js +0 -5
- package/dist/scripts/team-backfill-route-blackbox.js +0 -5
- package/dist/scripts/team-parallel-write-blackbox.js +0 -55
- package/dist/scripts/team-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/terminal-keyboard-enhancement-safety-check.js +0 -12
- package/dist/scripts/terminal-tui-output-stability-check.js +0 -35
- package/dist/scripts/test-no-orphan-dist-imports-check.js +0 -73
- package/dist/scripts/trust-fixture-check.js +0 -33
- package/dist/scripts/typescript-migration-report.js +0 -78
- package/dist/scripts/ultra-router-auto-router-check.js +0 -33
- package/dist/scripts/ultra-router-classification-check.js +0 -28
- package/dist/scripts/ux-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/ux-ppt-structured-extraction-check.js +0 -21
- package/dist/scripts/ux-review-extract-real-callouts-fixture-check.js +0 -8
- package/dist/scripts/ux-review-extract-wires-real-extractor-check.js +0 -15
- package/dist/scripts/ux-review-generate-callouts-fixture-check.js +0 -9
- package/dist/scripts/ux-review-image-voxel-relations-check.js +0 -31
- package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -67
- package/dist/scripts/ux-review-no-fake-callouts-check.js +0 -8
- package/dist/scripts/ux-review-no-text-fallback-check.js +0 -25
- package/dist/scripts/ux-review-patch-diff-recheck-check.js +0 -20
- package/dist/scripts/ux-review-patch-handoff-fixture-check.js +0 -8
- package/dist/scripts/ux-review-real-imagegen-smoke-check.js +0 -31
- package/dist/scripts/ux-review-real-loop-fixture-check.js +0 -24
- package/dist/scripts/ux-review-recapture-recheck-fixture-check.js +0 -8
- package/dist/scripts/ux-review-run-wires-imagegen-check.js +0 -11
- package/dist/scripts/worker-pane-communication-contract-check.js +0 -54
- package/dist/scripts/wrongness-fixture-check.js +0 -65
- package/dist/scripts/xai-mcp-capability-check.js +0 -14
- package/dist/scripts/zellij-capability-check.js +0 -15
- package/dist/scripts/zellij-dashboard-pane-check.js +0 -70
- package/dist/scripts/zellij-developer-controls-check.js +0 -20
- package/dist/scripts/zellij-doctor-readiness-check.js +0 -63
- package/dist/scripts/zellij-dynamic-pane-lifecycle-check.js +0 -21
- package/dist/scripts/zellij-first-slot-down-stack-check.js +0 -20
- package/dist/scripts/zellij-first-slot-down-stack-real-check.js +0 -356
- package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -28
- package/dist/scripts/zellij-lane-renderer-check.js +0 -65
- package/dist/scripts/zellij-launch-command-truth-check.js +0 -75
- package/dist/scripts/zellij-layout-valid-check.js +0 -90
- package/dist/scripts/zellij-pane-proof-check.js +0 -59
- package/dist/scripts/zellij-real-session-cleanup-check.js +0 -21
- package/dist/scripts/zellij-real-session-heartbeat-check.js +0 -49
- package/dist/scripts/zellij-real-session-launch-check.js +0 -57
- package/dist/scripts/zellij-right-column-headless-overflow-check.js +0 -22
- package/dist/scripts/zellij-right-column-manager-check.js +0 -27
- package/dist/scripts/zellij-screen-proof-check.js +0 -45
- package/dist/scripts/zellij-slot-column-anchor-check.js +0 -66
- package/dist/scripts/zellij-slot-only-ui-check.js +0 -26
- package/dist/scripts/zellij-slot-pane-renderer-check.js +0 -106
- package/dist/scripts/zellij-slot-renderer-proof-semantics-check.js +0 -59
- package/dist/scripts/zellij-spawn-on-demand-layout-check.js +0 -40
- package/dist/scripts/zellij-ui-design-check.js +0 -105
- package/dist/scripts/zellij-worker-pane-manager-check.js +0 -109
- package/dist/scripts/zellij-worker-pane-manager-single-owner-check.js +0 -47
- package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -202
- package/dist/scripts/zellij-worker-pane-spawn-order-check.js +0 -35
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import { spawn } from 'node:child_process';
|
|
4
|
-
import { appendJsonlBounded, exists, nowIso, packageRoot, readJson, sksRoot, writeJsonAtomic } from '../fsx.js';
|
|
4
|
+
import { PACKAGE_VERSION, appendJsonlBounded, exists, nowIso, packageRoot, readJson, sksRoot, writeJsonAtomic } from '../fsx.js';
|
|
5
5
|
import { initProject } from '../init.js';
|
|
6
6
|
import { createMission, setCurrent } from '../mission.js';
|
|
7
7
|
import { buildMadHighLaunchProfileNoWrite, madHighProfileName } from '../auto-review.js';
|
|
@@ -18,6 +18,8 @@ import { applyMadSksRollbackPlan } from '../mad-sks/rollback-apply.js';
|
|
|
18
18
|
import { repairCodexConfigEperm } from '../codex/codex-config-eperm-repair.js';
|
|
19
19
|
import { runCodexLaunchPreflight } from '../preflight/parallel-preflight-engine.js';
|
|
20
20
|
import { diffCodexAppUiSnapshots, writeCodexAppUiSnapshot } from '../codex-app/codex-app-ui-state-snapshot.js';
|
|
21
|
+
import { checkSksUpdateNotice } from '../update/update-notice.js';
|
|
22
|
+
import { createMadDbCapability, MAD_DB_ACK } from '../mad-db/mad-db-capability.js';
|
|
21
23
|
export async function madHighCommand(args = [], deps = {}) {
|
|
22
24
|
const subcommand = firstSubcommand(args);
|
|
23
25
|
if (subcommand)
|
|
@@ -27,16 +29,7 @@ export async function madHighCommand(args = [], deps = {}) {
|
|
|
27
29
|
const profile = buildMadHighLaunchProfileNoWrite();
|
|
28
30
|
return console.log(JSON.stringify(profile, null, 2));
|
|
29
31
|
}
|
|
30
|
-
const update =
|
|
31
|
-
if (update.status === 'updated') {
|
|
32
|
-
console.log(`SKS updated from ${deps.packageVersion} to ${update.latest}. Rerun: sks --mad`);
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
if (update.status === 'failed') {
|
|
36
|
-
console.error(`SKS update failed: ${update.error}`);
|
|
37
|
-
process.exitCode = 1;
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
32
|
+
const update = { status: 'notice_only', non_blocking: true };
|
|
40
33
|
const codexUpdate = deps.maybePromptCodexUpdateForLaunch ? await deps.maybePromptCodexUpdateForLaunch(args, { label: 'MAD launch' }) : { status: 'skipped' };
|
|
41
34
|
if (codexUpdate.status === 'failed' || codexUpdate.status === 'updated_not_reflected') {
|
|
42
35
|
console.error(`Codex CLI update failed: ${codexUpdate.error || 'updated version was not visible on PATH'}`);
|
|
@@ -68,6 +61,13 @@ export async function madHighCommand(args = [], deps = {}) {
|
|
|
68
61
|
// readability + repair checks still run. SKS_LAUNCH_FULL_CODEX_PROBE=1 restores the
|
|
69
62
|
// old behavior.
|
|
70
63
|
const rawArgs = (args || []).map((arg) => String(arg));
|
|
64
|
+
const madDbRequested = rawArgs.includes('--mad-db');
|
|
65
|
+
const madDbAck = readOption(rawArgs, '--ack', '');
|
|
66
|
+
if (madDbRequested && madDbAck !== MAD_DB_ACK) {
|
|
67
|
+
console.error(`SKS MAD-DB launch blocked. Required --ack ${JSON.stringify(MAD_DB_ACK)}`);
|
|
68
|
+
process.exitCode = 2;
|
|
69
|
+
return { ok: false, status: 'blocked', reason: 'mad_db_ack_phrase_required', required_ack: MAD_DB_ACK };
|
|
70
|
+
}
|
|
71
71
|
const allowMadRepair = rawArgs.includes('--repair-config') || rawArgs.includes('--fix') || rawArgs.includes('--yes-repair');
|
|
72
72
|
const launchPreflight = await runCodexLaunchPreflight(launchRoot, { fix: allowMadRepair, launchFast: process.env.SKS_LAUNCH_FULL_CODEX_PROBE !== '1', profile: profile.profile_name, sandbox: 'danger-full-access', serviceTier: 'fast' });
|
|
73
73
|
const afterPreflightUi = beforeUi ? await writeCodexAppUiSnapshot(launchRoot, `mad-after-preflight-${uiSnapshotId}`).catch(() => null) : null;
|
|
@@ -88,7 +88,41 @@ export async function madHighCommand(args = [], deps = {}) {
|
|
|
88
88
|
return launchPreflight;
|
|
89
89
|
}
|
|
90
90
|
const madLaunch = await activateMadZellijPermissionState(process.cwd(), args);
|
|
91
|
+
const madDbCapability = madDbRequested
|
|
92
|
+
? await createMadDbCapability(madLaunch.root, { missionId: madLaunch.mission_id, ack: madDbAck, cwd: process.cwd() })
|
|
93
|
+
: null;
|
|
94
|
+
if (madDbCapability) {
|
|
95
|
+
await setCurrent(madLaunch.root, {
|
|
96
|
+
mission_id: madLaunch.mission_id,
|
|
97
|
+
mad_db_active: true,
|
|
98
|
+
mad_db_cycle_id: madDbCapability.cycle_id,
|
|
99
|
+
mad_db_capability_file: 'mad-db-capability.json',
|
|
100
|
+
mad_db_break_glass: true
|
|
101
|
+
});
|
|
102
|
+
await appendJsonlBounded(path.join(madLaunch.dir, 'events.jsonl'), { ts: nowIso(), type: 'mad_db.capability_created', cycle_id: madDbCapability.cycle_id, expires_at: madDbCapability.expires_at });
|
|
103
|
+
}
|
|
104
|
+
const updateNotice = await checkSksUpdateNotice({
|
|
105
|
+
packageName: deps.packageName || 'sneakoscope',
|
|
106
|
+
currentVersion: deps.packageVersion || PACKAGE_VERSION,
|
|
107
|
+
missionDir: madLaunch.dir
|
|
108
|
+
}).catch((err) => ({
|
|
109
|
+
schema: 'sks.update-notice.v1',
|
|
110
|
+
checked_at: nowIso(),
|
|
111
|
+
package_name: deps.packageName || 'sneakoscope',
|
|
112
|
+
current_version: deps.packageVersion || PACKAGE_VERSION,
|
|
113
|
+
latest_version: null,
|
|
114
|
+
update_available: false,
|
|
115
|
+
source: 'error',
|
|
116
|
+
cache_ttl_ms: 0,
|
|
117
|
+
message: 'SKS update notice check failed; MAD launch continues.',
|
|
118
|
+
error: err?.message || String(err)
|
|
119
|
+
}));
|
|
120
|
+
await appendJsonlBounded(path.join(madLaunch.dir, 'events.jsonl'), { ts: nowIso(), type: 'mad_sks.update_notice_checked', non_blocking: true, update_available: updateNotice.update_available === true, source: updateNotice.source });
|
|
91
121
|
console.log(`SKS MAD ready: ${madHighProfileName()} | gate ${madLaunch.mission_id}`);
|
|
122
|
+
if (madDbCapability)
|
|
123
|
+
console.log(`MAD-DB one-cycle capability active; expires ${madDbCapability.expires_at}.`);
|
|
124
|
+
if (updateNotice.update_available === true)
|
|
125
|
+
console.log(`SKS update notice: ${updateNotice.latest_version} available (non-blocking).`);
|
|
92
126
|
console.log('Scoped high-power maintenance authority active; add explicit --allow-* flags for packages, services, network, browser/Computer Use, generated assets, file permissions, DB writes, or system/admin scopes. Catastrophic guards remain.');
|
|
93
127
|
const launchLb = lb.status === 'present' ? { ...lb, status: 'configured' } : lb;
|
|
94
128
|
const madSksEnv = {
|
|
@@ -445,6 +479,7 @@ function madLaunchOnlyFlags() {
|
|
|
445
479
|
'--allow-file-permissions',
|
|
446
480
|
'--allow-chmod',
|
|
447
481
|
'--allow-delete',
|
|
482
|
+
'--mad-db',
|
|
448
483
|
'--confirm-delete',
|
|
449
484
|
'--confirm-destructive-delete',
|
|
450
485
|
'--no-swarm',
|
|
@@ -460,7 +495,8 @@ function madLaunchOnlyFlags() {
|
|
|
460
495
|
'--yes',
|
|
461
496
|
'-y',
|
|
462
497
|
'--dry-run',
|
|
463
|
-
'--plan-only'
|
|
498
|
+
'--plan-only',
|
|
499
|
+
'--ack'
|
|
464
500
|
]);
|
|
465
501
|
}
|
|
466
502
|
function madLaunchValueFlags() {
|
|
@@ -469,7 +505,8 @@ function madLaunchValueFlags() {
|
|
|
469
505
|
'--mad-swarm-agents',
|
|
470
506
|
'--mad-swarm-work-items',
|
|
471
507
|
'--mad-swarm-backend',
|
|
472
|
-
'--mad-swarm-prompt'
|
|
508
|
+
'--mad-swarm-prompt',
|
|
509
|
+
'--ack'
|
|
473
510
|
]);
|
|
474
511
|
}
|
|
475
512
|
export function defaultMadSwarmBackend(args = [], opts = {}) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import { createMission, findLatestMission, loadMission } from '../mission.js';
|
|
2
|
+
import { createMission, findLatestMission, loadMission, setCurrent } from '../mission.js';
|
|
3
3
|
import { nowIso, readJson, sksRoot, writeJsonAtomic } from '../fsx.js';
|
|
4
4
|
import { runNativeAgentOrchestrator } from '../agents/agent-orchestrator.js';
|
|
5
5
|
import { classifyOllamaWorkerSlice } from '../agents/agent-runner-ollama.js';
|
|
@@ -235,6 +235,51 @@ async function narutoRun(parsed) {
|
|
|
235
235
|
placeholderGuard,
|
|
236
236
|
gitWorktreeCapability
|
|
237
237
|
});
|
|
238
|
+
await writeJsonAtomic(path.join(mission.dir, 'naruto-gate.json'), {
|
|
239
|
+
schema: 'sks.naruto-gate.v1',
|
|
240
|
+
passed: false,
|
|
241
|
+
mission_id: mission.id,
|
|
242
|
+
clone_roster_built: true,
|
|
243
|
+
clone_count: roster.agent_count,
|
|
244
|
+
work_graph_ready: workGraph.ok === true,
|
|
245
|
+
role_distribution_ready: roleDistribution.ok === true,
|
|
246
|
+
allocation_ready: allocationPolicy.ok === true,
|
|
247
|
+
rebalance_ready: rebalancePolicy.ok === true,
|
|
248
|
+
concurrency_governor_ready: true,
|
|
249
|
+
active_pool_simulated: activePool.ok === true,
|
|
250
|
+
verification_dag_ready: true,
|
|
251
|
+
gpt_final_pack_ready: true,
|
|
252
|
+
zellij_dashboard_ready: zellijDashboard.ok === true,
|
|
253
|
+
native_agent_proof: false,
|
|
254
|
+
final_arbiter_accepted: false,
|
|
255
|
+
session_cleanup: false,
|
|
256
|
+
blockers: [],
|
|
257
|
+
updated_at: nowIso()
|
|
258
|
+
});
|
|
259
|
+
await setCurrent(root, {
|
|
260
|
+
mission_id: mission.id,
|
|
261
|
+
route: 'Naruto',
|
|
262
|
+
route_command: '$Naruto',
|
|
263
|
+
mode: 'NARUTO',
|
|
264
|
+
phase: 'NARUTO_NATIVE_AGENT_INTAKE',
|
|
265
|
+
questions_allowed: false,
|
|
266
|
+
implementation_allowed: true,
|
|
267
|
+
context7_required: false,
|
|
268
|
+
context7_verified: parsed.mock,
|
|
269
|
+
subagents_required: true,
|
|
270
|
+
subagents_verified: false,
|
|
271
|
+
native_sessions_required: true,
|
|
272
|
+
native_sessions_verified: false,
|
|
273
|
+
reflection_required: true,
|
|
274
|
+
visible_progress_required: true,
|
|
275
|
+
required_skills: ['naruto', 'pipeline-runner', 'prompt-pipeline', 'honest-mode'],
|
|
276
|
+
stop_gate: 'naruto-gate.json',
|
|
277
|
+
clone_count: roster.agent_count,
|
|
278
|
+
target_active_slots: activeSlots,
|
|
279
|
+
work_graph_ready: workGraph.ok === true,
|
|
280
|
+
naruto_gate_file: 'naruto-gate.json',
|
|
281
|
+
prompt: parsed.prompt
|
|
282
|
+
});
|
|
238
283
|
let liveZellij = null;
|
|
239
284
|
if (!parsed.json && !parsed.mock && !parsed.noOpenZellij) {
|
|
240
285
|
liveZellij = await launchZellijLayout({
|
|
@@ -311,6 +356,41 @@ async function narutoRun(parsed) {
|
|
|
311
356
|
narutoRebalancePolicy: rebalancePolicy,
|
|
312
357
|
json: parsed.json
|
|
313
358
|
});
|
|
359
|
+
const nativeProofOk = result.proof?.ok === true || result.proof?.status === 'passed';
|
|
360
|
+
const finalAccepted = result.proof?.status === 'passed' || result.proof?.gpt_final_status === 'approved';
|
|
361
|
+
await writeJsonAtomic(path.join(mission.dir, 'naruto-gate.json'), {
|
|
362
|
+
schema: 'sks.naruto-gate.v1',
|
|
363
|
+
passed: result.ok === true && nativeProofOk && finalAccepted,
|
|
364
|
+
mission_id: mission.id,
|
|
365
|
+
clone_roster_built: true,
|
|
366
|
+
clone_count: roster.agent_count,
|
|
367
|
+
work_graph_ready: workGraph.ok === true,
|
|
368
|
+
role_distribution_ready: roleDistribution.ok === true,
|
|
369
|
+
allocation_ready: allocationPolicy.ok === true,
|
|
370
|
+
rebalance_ready: rebalancePolicy.ok === true,
|
|
371
|
+
concurrency_governor_ready: true,
|
|
372
|
+
active_pool_simulated: activePool.ok === true,
|
|
373
|
+
verification_dag_ready: true,
|
|
374
|
+
gpt_final_pack_ready: true,
|
|
375
|
+
zellij_dashboard_ready: zellijDashboard.ok === true,
|
|
376
|
+
native_agent_proof: nativeProofOk,
|
|
377
|
+
final_arbiter_accepted: finalAccepted,
|
|
378
|
+
session_cleanup: result.proof?.all_sessions_closed === true || nativeProofOk,
|
|
379
|
+
blockers: result.proof?.blockers || [],
|
|
380
|
+
updated_at: nowIso()
|
|
381
|
+
});
|
|
382
|
+
await setCurrent(root, {
|
|
383
|
+
mission_id: mission.id,
|
|
384
|
+
route: 'Naruto',
|
|
385
|
+
route_command: '$Naruto',
|
|
386
|
+
mode: 'NARUTO',
|
|
387
|
+
phase: result.ok === true ? 'NARUTO_COMPLETE_OR_REVIEW' : 'NARUTO_BLOCKED',
|
|
388
|
+
native_sessions_verified: nativeProofOk,
|
|
389
|
+
subagents_verified: nativeProofOk,
|
|
390
|
+
naruto_gate_file: 'naruto-gate.json',
|
|
391
|
+
stop_gate: 'naruto-gate.json',
|
|
392
|
+
prompt: parsed.prompt
|
|
393
|
+
});
|
|
314
394
|
const clones = result.roster?.agent_count ?? roster.agent_count;
|
|
315
395
|
const localWorkerSummary = summarizeNarutoLocalWorkerResult(localWorker, result);
|
|
316
396
|
const summary = {
|
|
@@ -277,8 +277,10 @@ async function researchRun(args) {
|
|
|
277
277
|
}
|
|
278
278
|
function printResearchCompletion(id, root, dir, plan, gate) {
|
|
279
279
|
const metrics = gate?.metrics || {};
|
|
280
|
+
const synthesis = metrics.synthesis || {};
|
|
280
281
|
const rel = (artifact) => path.relative(root, path.join(dir, artifact));
|
|
281
282
|
console.log(`Research done: ${id}`);
|
|
283
|
+
console.log(`Synthesis: ${synthesis.writer || 'missing'}`);
|
|
282
284
|
console.log(`Report: ${rel('research-report.md')}`);
|
|
283
285
|
console.log(`Paper: ${rel(researchPaperArtifactForPlan(plan))}`);
|
|
284
286
|
console.log(`Implementation blueprint: ${rel('implementation-blueprint.json')}`);
|
|
@@ -286,7 +288,8 @@ function printResearchCompletion(id, root, dir, plan, gate) {
|
|
|
286
288
|
console.log(`Experiment plan: ${rel('experiment-plan.json')}`);
|
|
287
289
|
console.log(`Replication pack: ${rel('replication-pack.json')}`);
|
|
288
290
|
console.log(`Gate: ${gate?.passed ? 'passed' : 'blocked'}`);
|
|
289
|
-
console.log(`Quality: ${metrics.
|
|
291
|
+
console.log(`Quality: ${metrics.report_word_count ?? 0} words / ${metrics.source_entries_total_with_counterevidence ?? metrics.source_entries ?? 0} sources / ${metrics.key_claims ?? 0} key claims / repetition ${synthesis.repetition_ratio ?? metrics.report_repetition?.repeated_paragraph_ratio ?? 'n/a'}`);
|
|
292
|
+
console.log(`Final review: static ${metrics.final_review_blockers?.length ? 'block' : 'pass'} / codex ${synthesis.codex_final_review_verdict || 'missing'}`);
|
|
290
293
|
console.log(`Handoff: ${rel('team-handoff-goal.md')}`);
|
|
291
294
|
}
|
|
292
295
|
async function researchStatus(args) {
|
|
@@ -320,6 +323,7 @@ async function researchStatus(args) {
|
|
|
320
323
|
const experimentPlan = await readExperimentPlan(dir);
|
|
321
324
|
const replicationPack = await readReplicationPack(dir);
|
|
322
325
|
const finalReview = await readResearchFinalReview(dir);
|
|
326
|
+
const synthesisOutput = await readJson(path.join(dir, 'research-synthesis-output.json'), null);
|
|
323
327
|
const blueprintValidation = validateImplementationBlueprint(implementationBlueprint, qualityContract);
|
|
324
328
|
const experimentValidation = validateExperimentPlan(experimentPlan, qualityContract);
|
|
325
329
|
const replicationValidation = validateReplicationPack(replicationPack);
|
|
@@ -356,6 +360,14 @@ async function researchStatus(args) {
|
|
|
356
360
|
research_quality: {
|
|
357
361
|
contract: qualityContract,
|
|
358
362
|
report_word_count: gate?.metrics?.report_word_count ?? null,
|
|
363
|
+
synthesis: {
|
|
364
|
+
writer: gate?.metrics?.synthesis?.writer ?? (synthesisOutput ? 'evidence-bound writer artifact present' : null),
|
|
365
|
+
repetition_ratio: gate?.metrics?.synthesis?.repetition_ratio ?? gate?.metrics?.report_repetition?.repeated_paragraph_ratio ?? null,
|
|
366
|
+
source_density_per_1000_words: gate?.metrics?.synthesis?.source_density_per_1000_words ?? gate?.metrics?.source_density_per_1000_words ?? null,
|
|
367
|
+
claim_density_per_1000_words: gate?.metrics?.synthesis?.claim_density_per_1000_words ?? gate?.metrics?.claim_density_per_1000_words ?? null,
|
|
368
|
+
template_phrase_hits: gate?.metrics?.synthesis?.template_phrase_hits ?? gate?.metrics?.template_phrase_hits ?? [],
|
|
369
|
+
codex_final_review_verdict: finalReview?.codex_review?.verdict || null
|
|
370
|
+
},
|
|
359
371
|
claim_evidence_matrix_present: claimMatrix.present,
|
|
360
372
|
key_claims: claimMatrix.key_claim_ids.length,
|
|
361
373
|
triangulated_claims: claimMatrix.triangulated_claim_count,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { appendJsonlBounded, exists, nowIso, readJson, sksRoot, writeJsonAtomic, writeTextAtomic } from '../fsx.js';
|
|
3
3
|
import { initProject } from '../init.js';
|
|
4
|
-
import { createMission, loadMission, setCurrent } from '../mission.js';
|
|
4
|
+
import { createMission, findLatestMission, loadMission, setCurrent } from '../mission.js';
|
|
5
5
|
import { buildQuestionSchema, writeQuestions } from '../questions.js';
|
|
6
6
|
import { CODEX_COMPUTER_USE_ONLY_POLICY, CODEX_WEB_VERIFICATION_POLICY, FROM_CHAT_IMG_CHECKLIST_ARTIFACT, FROM_CHAT_IMG_COVERAGE_ARTIFACT, FROM_CHAT_IMG_QA_LOOP_ARTIFACT, FROM_CHAT_IMG_SOURCE_INVENTORY_ARTIFACT, FROM_CHAT_IMG_TEMP_TRIWIKI_ARTIFACT, FROM_CHAT_IMG_VISUAL_MAP_ARTIFACT, FROM_CHAT_IMG_WORK_ORDER_ARTIFACT, ROUTES, hasFromChatImgSignal, routePrompt, routeReasoning, triwikiContextTracking } from '../routes.js';
|
|
7
7
|
import { TEAM_DECOMPOSITION_ARTIFACT, TEAM_GRAPH_ARTIFACT, TEAM_INBOX_DIR, TEAM_RUNTIME_TASKS_ARTIFACT, teamRuntimePlanMetadata, teamRuntimeRequiredArtifacts, writeTeamRuntimeArtifacts } from '../team-dag.js';
|
|
@@ -18,11 +18,13 @@ import { attachZellijSessionInteractive, launchTeamZellijView } from '../zellij/
|
|
|
18
18
|
import { maybeFinalizeRoute } from '../proof/auto-finalize.js';
|
|
19
19
|
import { runNativeAgentOrchestrator } from '../agents/agent-orchestrator.js';
|
|
20
20
|
import { ambientGoalContinuation, flag, readBoundedIntegerFlag, readFlagValue } from './command-utils.js';
|
|
21
|
+
import { narutoCommand } from './naruto-command.js';
|
|
21
22
|
const TEAM_SESSION_CLEANUP_ARTIFACT = 'team-session-cleanup.json';
|
|
22
23
|
export async function team(args = []) {
|
|
23
24
|
const teamSubcommands = new Set(['log', 'tail', 'watch', 'lane', 'status', 'dashboard', 'event', 'message', 'open-zellij', 'attach-zellij', 'cleanup-zellij', 'open-tmux', 'attach-tmux', 'cleanup-tmux']);
|
|
24
25
|
if (teamSubcommands.has(args[0]))
|
|
25
26
|
return teamCommand(args[0], args.slice(1));
|
|
27
|
+
return redirectTeamCreateToNaruto(args);
|
|
26
28
|
const jsonOutput = flag(args, '--json');
|
|
27
29
|
const mock = flag(args, '--mock');
|
|
28
30
|
const openZellij = !mock && !jsonOutput && !flag(args, '--no-open-zellij') && !flag(args, '--no-zellij');
|
|
@@ -200,6 +202,28 @@ export async function team(args = []) {
|
|
|
200
202
|
console.log(`Watch: sks team watch ${id}`);
|
|
201
203
|
console.log(`Artifacts: .sneakoscope/missions/${id}`);
|
|
202
204
|
}
|
|
205
|
+
async function redirectTeamCreateToNaruto(args = []) {
|
|
206
|
+
const root = await sksRoot();
|
|
207
|
+
const list = (args || []).map((arg) => String(arg));
|
|
208
|
+
const narutoArgs = list[0] === 'run' ? list : ['run', ...list];
|
|
209
|
+
console.warn('SKS Team is deprecated for new execution missions; redirecting to $Naruto.');
|
|
210
|
+
const result = await narutoCommand(narutoArgs);
|
|
211
|
+
const missionId = result?.mission_id || await findLatestMission(root);
|
|
212
|
+
if (missionId) {
|
|
213
|
+
await writeJsonAtomic(path.join(root, '.sneakoscope', 'missions', missionId, 'team-alias-to-naruto.json'), {
|
|
214
|
+
schema: 'sks.team-alias-to-naruto.v1',
|
|
215
|
+
ok: true,
|
|
216
|
+
mission_id: missionId,
|
|
217
|
+
source_command: 'sks team',
|
|
218
|
+
redirected_to: 'sks naruto run',
|
|
219
|
+
route_command: '$Naruto',
|
|
220
|
+
deprecated_route: '$Team',
|
|
221
|
+
created_at: nowIso(),
|
|
222
|
+
args: list
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
return result;
|
|
226
|
+
}
|
|
203
227
|
export function parseTeamCreateArgs(args) {
|
|
204
228
|
const spec = parseTeamSpecArgs(args);
|
|
205
229
|
const prompt = spec.cleanArgs.join(' ').trim();
|
package/dist/core/db-safety.js
CHANGED
|
@@ -2,6 +2,9 @@ import path from 'node:path';
|
|
|
2
2
|
import { exists, readJson, writeJsonAtomic, readText, nowIso, appendJsonlBounded } from './fsx.js';
|
|
3
3
|
import { missionDir, setCurrent } from './mission.js';
|
|
4
4
|
import { evaluateMadSksPermissionGate, isMadSksRouteState } from './permission-gates.js';
|
|
5
|
+
import { resolveMadDbMutationPolicy } from './mad-db/mad-db-policy-resolver.js';
|
|
6
|
+
import { consumeMadDbCapability } from './mad-db/mad-db-capability.js';
|
|
7
|
+
import { appendMadDbLedgerEvent } from './mad-db/mad-db-ledger.js';
|
|
5
8
|
export const DEFAULT_DB_SAFETY_POLICY = Object.freeze({
|
|
6
9
|
schema_version: 1,
|
|
7
10
|
mode: 'read_only_default',
|
|
@@ -504,6 +507,29 @@ export async function checkDbOperation(root, state, payload, { duringNoQuestion
|
|
|
504
507
|
const policy = await loadDbSafetyPolicy(root);
|
|
505
508
|
const contract = await loadMissionContract(root, state);
|
|
506
509
|
const classification = classifyToolPayload(payload);
|
|
510
|
+
const madDb = await resolveMadDbMutationPolicy(root, state, classification);
|
|
511
|
+
if (madDb.allowed === true && state?.mission_id) {
|
|
512
|
+
const madDbDecision = madDb;
|
|
513
|
+
const decision = {
|
|
514
|
+
allowed: true,
|
|
515
|
+
action: 'allow',
|
|
516
|
+
reasons: madDb.reasons,
|
|
517
|
+
classification,
|
|
518
|
+
effective: { mode: 'mad-db-break-glass', env: 'operator_authorized_one_cycle', destructive: true, migrationApply: 'yes' },
|
|
519
|
+
mad_db: {
|
|
520
|
+
active: true,
|
|
521
|
+
priority: 'highest',
|
|
522
|
+
one_cycle_only: true,
|
|
523
|
+
cycle_id: madDbDecision.cycle_id,
|
|
524
|
+
capability_file: 'mad-db-capability.json',
|
|
525
|
+
consumed: true
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
await appendMadDbLedgerEvent(root, state.mission_id, { type: 'db_mutation.allowed', cycle_id: madDbDecision.cycle_id, mode: madDbDecision.mode, classification });
|
|
529
|
+
await consumeMadDbCapability(root, state.mission_id, { consumedBy: 'db-safety-checkDbOperation', reason: 'db_mutation_allowed' });
|
|
530
|
+
await appendJsonlBounded(path.join(missionDir(root, state.mission_id), 'db-safety.jsonl'), { ts: nowIso(), decision });
|
|
531
|
+
return decision;
|
|
532
|
+
}
|
|
507
533
|
const madSks = await madSksOverrideState(root, state);
|
|
508
534
|
const decision = evaluateDbSafety({ classification, policy, contract, duringNoQuestion, madSks });
|
|
509
535
|
if (decision.action === 'confirm')
|
package/dist/core/fsx.js
CHANGED
|
@@ -5,7 +5,7 @@ import os from 'node:os';
|
|
|
5
5
|
import crypto from 'node:crypto';
|
|
6
6
|
import { spawn } from 'node:child_process';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
|
-
export const PACKAGE_VERSION = '2.0.
|
|
8
|
+
export const PACKAGE_VERSION = '2.0.15';
|
|
9
9
|
export const DEFAULT_PROCESS_TAIL_BYTES = 256 * 1024;
|
|
10
10
|
export const DEFAULT_PROCESS_TIMEOUT_MS = 30 * 60 * 1000;
|
|
11
11
|
export function nowIso() {
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { appendJsonlBounded, nowIso, readJson, writeJsonAtomic } from '../fsx.js';
|
|
3
|
+
import { findLatestMission, missionDir } from '../mission.js';
|
|
4
|
+
export const MAD_DB_CAPABILITY_SCHEMA = 'sks.mad-db-capability.v1';
|
|
5
|
+
export const MAD_DB_CAPABILITY_FILE = 'mad-db-capability.json';
|
|
6
|
+
export const MAD_DB_ACK = 'I AUTHORIZE ONE-CYCLE DB BREAK-GLASS';
|
|
7
|
+
export const MAD_DB_MAX_TTL_MS = 2 * 60 * 60 * 1000;
|
|
8
|
+
export async function createMadDbCapability(root, input) {
|
|
9
|
+
if (input.ack !== MAD_DB_ACK)
|
|
10
|
+
throw new Error('mad_db_ack_phrase_mismatch');
|
|
11
|
+
const createdAt = nowIso();
|
|
12
|
+
const ttlMs = Math.min(MAD_DB_MAX_TTL_MS, Math.max(1, Math.floor(Number(input.ttlMs || MAD_DB_MAX_TTL_MS))));
|
|
13
|
+
const capability = {
|
|
14
|
+
schema: MAD_DB_CAPABILITY_SCHEMA,
|
|
15
|
+
mission_id: input.missionId,
|
|
16
|
+
cycle_id: input.cycleId || `mad-db-${Date.now().toString(36)}`,
|
|
17
|
+
enabled: true,
|
|
18
|
+
created_at: createdAt,
|
|
19
|
+
expires_at: new Date(Date.now() + ttlMs).toISOString(),
|
|
20
|
+
one_cycle_only: true,
|
|
21
|
+
priority: 'highest',
|
|
22
|
+
scope: 'all_database_mutations',
|
|
23
|
+
operator_ack: {
|
|
24
|
+
phrase: MAD_DB_ACK,
|
|
25
|
+
accepted_at: createdAt,
|
|
26
|
+
cwd: path.resolve(input.cwd || process.cwd())
|
|
27
|
+
},
|
|
28
|
+
consumed: false,
|
|
29
|
+
consumed_at: null,
|
|
30
|
+
consumed_by: null
|
|
31
|
+
};
|
|
32
|
+
const dir = missionDir(root, input.missionId);
|
|
33
|
+
await writeJsonAtomic(path.join(dir, MAD_DB_CAPABILITY_FILE), capability);
|
|
34
|
+
await appendJsonlBounded(path.join(dir, 'mad-db-ledger.jsonl'), { ts: nowIso(), type: 'capability.created', mission_id: capability.mission_id, cycle_id: capability.cycle_id, expires_at: capability.expires_at });
|
|
35
|
+
return capability;
|
|
36
|
+
}
|
|
37
|
+
export async function readMadDbCapability(root, missionId) {
|
|
38
|
+
const capability = await readJson(path.join(missionDir(root, missionId), MAD_DB_CAPABILITY_FILE), null);
|
|
39
|
+
return capability?.schema === MAD_DB_CAPABILITY_SCHEMA ? capability : null;
|
|
40
|
+
}
|
|
41
|
+
export async function resolveMadDbMissionId(root, state = {}, explicitMissionId = null) {
|
|
42
|
+
if (explicitMissionId && explicitMissionId !== 'latest')
|
|
43
|
+
return explicitMissionId;
|
|
44
|
+
if (state?.mission_id)
|
|
45
|
+
return String(state.mission_id);
|
|
46
|
+
return findLatestMission(root);
|
|
47
|
+
}
|
|
48
|
+
export function isMadDbCapabilityActive(capability, nowMs = Date.now()) {
|
|
49
|
+
if (!capability)
|
|
50
|
+
return false;
|
|
51
|
+
const expires = Date.parse(capability.expires_at || '');
|
|
52
|
+
return capability.enabled === true
|
|
53
|
+
&& capability.consumed !== true
|
|
54
|
+
&& capability.one_cycle_only === true
|
|
55
|
+
&& Number.isFinite(expires)
|
|
56
|
+
&& expires > nowMs;
|
|
57
|
+
}
|
|
58
|
+
export async function consumeMadDbCapability(root, missionId, input = {}) {
|
|
59
|
+
const capability = await readMadDbCapability(root, missionId);
|
|
60
|
+
if (!isMadDbCapabilityActive(capability))
|
|
61
|
+
return capability;
|
|
62
|
+
const consumed = {
|
|
63
|
+
...capability,
|
|
64
|
+
consumed: true,
|
|
65
|
+
consumed_at: nowIso(),
|
|
66
|
+
consumed_by: input.consumedBy || input.reason || 'db-safety-policy-resolver'
|
|
67
|
+
};
|
|
68
|
+
const dir = missionDir(root, missionId);
|
|
69
|
+
await writeJsonAtomic(path.join(dir, MAD_DB_CAPABILITY_FILE), consumed);
|
|
70
|
+
await writeJsonAtomic(path.join(dir, 'mad-db-capability.consumed.json'), consumed);
|
|
71
|
+
await appendJsonlBounded(path.join(dir, 'mad-db-ledger.jsonl'), { ts: nowIso(), type: 'capability.consumed', mission_id: missionId, cycle_id: consumed.cycle_id, consumed_by: consumed.consumed_by });
|
|
72
|
+
return consumed;
|
|
73
|
+
}
|
|
74
|
+
export async function revokeMadDbCapability(root, missionId, reason = 'operator_revoked') {
|
|
75
|
+
const capability = await readMadDbCapability(root, missionId);
|
|
76
|
+
if (!capability)
|
|
77
|
+
return null;
|
|
78
|
+
const revoked = { ...capability, enabled: false, revoked_at: nowIso(), revoke_reason: reason };
|
|
79
|
+
const dir = missionDir(root, missionId);
|
|
80
|
+
await writeJsonAtomic(path.join(dir, MAD_DB_CAPABILITY_FILE), revoked);
|
|
81
|
+
await appendJsonlBounded(path.join(dir, 'mad-db-ledger.jsonl'), { ts: nowIso(), type: 'capability.revoked', mission_id: missionId, cycle_id: capability.cycle_id, reason });
|
|
82
|
+
return revoked;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=mad-db-capability.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { appendJsonlBounded, nowIso, writeJsonAtomic } from '../fsx.js';
|
|
3
|
+
import { missionDir } from '../mission.js';
|
|
4
|
+
export const MAD_DB_LEDGER_EVENT_SCHEMA = 'sks.mad-db-ledger-event.v1';
|
|
5
|
+
export async function appendMadDbLedgerEvent(root, missionId, event) {
|
|
6
|
+
const row = {
|
|
7
|
+
schema: MAD_DB_LEDGER_EVENT_SCHEMA,
|
|
8
|
+
ts: nowIso(),
|
|
9
|
+
mission_id: missionId,
|
|
10
|
+
...event
|
|
11
|
+
};
|
|
12
|
+
const dir = missionDir(root, missionId);
|
|
13
|
+
await appendJsonlBounded(path.join(dir, 'mad-db-ledger.jsonl'), row);
|
|
14
|
+
await writeJsonAtomic(path.join(dir, 'mad-db-ledger.latest.json'), row).catch(() => undefined);
|
|
15
|
+
return row;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=mad-db-ledger.js.map
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { readMadDbCapability, isMadDbCapabilityActive } from './mad-db-capability.js';
|
|
2
|
+
export const MAD_DB_POLICY_DECISION_SCHEMA = 'sks.mad-db-policy-decision.v1';
|
|
3
|
+
export async function resolveMadDbMutationPolicy(root, state = {}, classification = {}) {
|
|
4
|
+
const missionId = state?.mission_id ? String(state.mission_id) : null;
|
|
5
|
+
if (!missionId)
|
|
6
|
+
return inactive('mission_id_missing');
|
|
7
|
+
const capability = await readMadDbCapability(root, missionId);
|
|
8
|
+
if (!isMadDbCapabilityActive(capability))
|
|
9
|
+
return inactive(capability?.consumed ? 'mad_db_capability_consumed' : 'mad_db_capability_inactive');
|
|
10
|
+
if (!isDbMutationOrDbTool(classification))
|
|
11
|
+
return inactive('not_a_database_mutation');
|
|
12
|
+
return {
|
|
13
|
+
schema: MAD_DB_POLICY_DECISION_SCHEMA,
|
|
14
|
+
allowed: true,
|
|
15
|
+
action: 'allow',
|
|
16
|
+
mode: 'mad-db-break-glass',
|
|
17
|
+
priority: 0,
|
|
18
|
+
priority_order: ['mad-db', 'mad-sks', 'sealed-contract', 'default-db-safety'],
|
|
19
|
+
reasons: ['mad_db_one_cycle_break_glass_capability_active'],
|
|
20
|
+
audit_required: true,
|
|
21
|
+
mission_id: missionId,
|
|
22
|
+
cycle_id: capability.cycle_id,
|
|
23
|
+
capability
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function inactive(reason) {
|
|
27
|
+
return {
|
|
28
|
+
schema: MAD_DB_POLICY_DECISION_SCHEMA,
|
|
29
|
+
allowed: false,
|
|
30
|
+
action: 'defer',
|
|
31
|
+
mode: 'default-db-safety',
|
|
32
|
+
priority: 99,
|
|
33
|
+
reasons: [reason],
|
|
34
|
+
audit_required: false
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function isDbMutationOrDbTool(classification = {}) {
|
|
38
|
+
if (classification.level === 'write' || classification.level === 'destructive')
|
|
39
|
+
return true;
|
|
40
|
+
if (classification.toolReasons?.includes?.('database_tool'))
|
|
41
|
+
return true;
|
|
42
|
+
if (classification.toolReasons?.includes?.('migration_apply_tool'))
|
|
43
|
+
return true;
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=mad-db-policy-resolver.js.map
|