sneakoscope 2.0.14 → 2.0.16
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 +2 -1
- package/dist/commands/mad-db.js +5 -0
- package/dist/commands/zellij-slot-pane.js +3 -1
- package/dist/core/agents/agent-orchestrator.js +66 -3
- package/dist/core/agents/agent-plan.js +3 -2
- package/dist/core/agents/agent-scheduler.js +204 -86
- package/dist/core/agents/agent-schema.js +1 -1
- package/dist/core/agents/native-cli-session-swarm.js +199 -15
- package/dist/core/agents/native-cli-worker.js +85 -0
- package/dist/core/agents/parallel-runtime-proof.js +217 -0
- package/dist/core/codex-control/codex-task-runner.js +32 -4
- package/dist/core/codex-control/model-call-concurrency.js +106 -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 +128 -5
- package/dist/core/commands/research-command.js +13 -1
- package/dist/core/commands/team-command.js +23 -175
- package/dist/core/db-safety.js +55 -1
- package/dist/core/fsx.js +1 -1
- package/dist/core/git/git-worktree-capability.js +18 -0
- package/dist/core/git/git-worktree-manager.js +80 -0
- package/dist/core/git/git-worktree-pool.js +4 -0
- package/dist/core/mad-db/mad-db-capability.js +116 -0
- package/dist/core/mad-db/mad-db-ledger.js +31 -0
- package/dist/core/mad-db/mad-db-policy-resolver.js +48 -0
- package/dist/core/naruto/naruto-concurrency-governor.js +14 -1
- 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 +237 -0
- package/dist/scripts/release-gate-dag-runner.js +5 -0
- package/dist/scripts/release-speed-summary.js +27 -0
- package/package.json +76 -5
- package/schemas/agents/parallel-runtime-proof.schema.json +48 -0
- 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,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';
|
|
@@ -165,10 +165,12 @@ async function narutoRun(parsed) {
|
|
|
165
165
|
requestedClones: roster.agent_count,
|
|
166
166
|
totalWorkItems: workGraph.total_work_items,
|
|
167
167
|
pendingWorkQueueSize: workGraph.total_work_items,
|
|
168
|
-
backend: schedulerBackend
|
|
168
|
+
backend: schedulerBackend,
|
|
169
|
+
parallelismMode: parsed.parallelism
|
|
169
170
|
});
|
|
170
171
|
const backendMinimum = schedulerBackend === 'fake' ? roster.agent_count : Math.min(roster.agent_count, 2);
|
|
171
|
-
const
|
|
172
|
+
const activeCap = parsed.parallelism === 'safe' ? safe.cap : MAX_NARUTO_AGENT_COUNT;
|
|
173
|
+
const activeSlots = Math.max(1, Math.min(roster.agent_count, parsed.concurrency || Math.max(governor.safe_active_workers, backendMinimum), activeCap));
|
|
172
174
|
const zellijVisiblePanes = Math.max(1, Math.min(activeSlots, governor.safe_zellij_visible_panes));
|
|
173
175
|
const activePool = await runNarutoActivePool({ graph: workGraph, governor: { ...governor, safe_active_workers: activeSlots } });
|
|
174
176
|
const runPreRunSmoke = parsed.smoke === true || process.env.SKS_NARUTO_PRE_RUN_SMOKE === '1';
|
|
@@ -235,7 +237,66 @@ async function narutoRun(parsed) {
|
|
|
235
237
|
placeholderGuard,
|
|
236
238
|
gitWorktreeCapability
|
|
237
239
|
});
|
|
240
|
+
await writeJsonAtomic(path.join(mission.dir, 'naruto-gate.json'), {
|
|
241
|
+
schema: 'sks.naruto-gate.v1',
|
|
242
|
+
passed: false,
|
|
243
|
+
mission_id: mission.id,
|
|
244
|
+
clone_roster_built: true,
|
|
245
|
+
clone_count: roster.agent_count,
|
|
246
|
+
work_graph_ready: workGraph.ok === true,
|
|
247
|
+
role_distribution_ready: roleDistribution.ok === true,
|
|
248
|
+
allocation_ready: allocationPolicy.ok === true,
|
|
249
|
+
rebalance_ready: rebalancePolicy.ok === true,
|
|
250
|
+
concurrency_governor_ready: true,
|
|
251
|
+
active_pool_simulated: activePool.ok === true,
|
|
252
|
+
verification_dag_ready: true,
|
|
253
|
+
gpt_final_pack_ready: true,
|
|
254
|
+
zellij_dashboard_ready: zellijDashboard.ok === true,
|
|
255
|
+
native_agent_proof: false,
|
|
256
|
+
final_arbiter_accepted: false,
|
|
257
|
+
session_cleanup: false,
|
|
258
|
+
blockers: [],
|
|
259
|
+
updated_at: nowIso()
|
|
260
|
+
});
|
|
261
|
+
await setCurrent(root, {
|
|
262
|
+
mission_id: mission.id,
|
|
263
|
+
route: 'Naruto',
|
|
264
|
+
route_command: '$Naruto',
|
|
265
|
+
mode: 'NARUTO',
|
|
266
|
+
phase: 'NARUTO_NATIVE_AGENT_INTAKE',
|
|
267
|
+
questions_allowed: false,
|
|
268
|
+
implementation_allowed: true,
|
|
269
|
+
context7_required: false,
|
|
270
|
+
context7_verified: parsed.mock,
|
|
271
|
+
subagents_required: true,
|
|
272
|
+
subagents_verified: false,
|
|
273
|
+
native_sessions_required: true,
|
|
274
|
+
native_sessions_verified: false,
|
|
275
|
+
reflection_required: true,
|
|
276
|
+
visible_progress_required: true,
|
|
277
|
+
required_skills: ['naruto', 'pipeline-runner', 'prompt-pipeline', 'honest-mode'],
|
|
278
|
+
stop_gate: 'naruto-gate.json',
|
|
279
|
+
clone_count: roster.agent_count,
|
|
280
|
+
target_active_slots: activeSlots,
|
|
281
|
+
work_graph_ready: workGraph.ok === true,
|
|
282
|
+
naruto_gate_file: 'naruto-gate.json',
|
|
283
|
+
prompt: parsed.prompt
|
|
284
|
+
});
|
|
238
285
|
let liveZellij = null;
|
|
286
|
+
if (!parsed.json) {
|
|
287
|
+
console.log('$Naruto starting:');
|
|
288
|
+
console.log(' clones requested: ' + roster.agent_count);
|
|
289
|
+
console.log(' work items: ' + workGraph.total_work_items);
|
|
290
|
+
console.log(' target active workers: ' + activeSlots);
|
|
291
|
+
console.log(' visible panes: ' + zellijVisiblePanes);
|
|
292
|
+
console.log(' headless workers: ' + Math.max(0, activeSlots - zellijVisiblePanes));
|
|
293
|
+
console.log(' backend: ' + schedulerBackend);
|
|
294
|
+
console.log(' parallelism mode: ' + parsed.parallelism);
|
|
295
|
+
if (activeSlots < roster.agent_count)
|
|
296
|
+
console.log(' cap reasons: ' + (governor.reasons.join(', ') || 'host safety cap'));
|
|
297
|
+
if (parsed.parallelism !== 'safe' && activeSlots < 10)
|
|
298
|
+
console.log(' warning: active workers below 10 in non-safe mode');
|
|
299
|
+
}
|
|
239
300
|
if (!parsed.json && !parsed.mock && !parsed.noOpenZellij) {
|
|
240
301
|
liveZellij = await launchZellijLayout({
|
|
241
302
|
root,
|
|
@@ -311,6 +372,45 @@ async function narutoRun(parsed) {
|
|
|
311
372
|
narutoRebalancePolicy: rebalancePolicy,
|
|
312
373
|
json: parsed.json
|
|
313
374
|
});
|
|
375
|
+
const parallelRuntime = result.parallel_runtime_proof || null;
|
|
376
|
+
const nativeProofOk = result.proof?.ok === true || result.proof?.status === 'passed';
|
|
377
|
+
const finalAccepted = result.proof?.status === 'passed' || result.proof?.gpt_final_status === 'approved';
|
|
378
|
+
const parallelRuntimeOk = !parsed.mock || roster.agent_count < 16 || (parallelRuntime?.passed === true
|
|
379
|
+
&& Number(parallelRuntime.max_observed_active_workers || 0) >= Math.min(16, activeSlots));
|
|
380
|
+
await writeJsonAtomic(path.join(mission.dir, 'naruto-gate.json'), {
|
|
381
|
+
schema: 'sks.naruto-gate.v1',
|
|
382
|
+
passed: result.ok === true && nativeProofOk && finalAccepted,
|
|
383
|
+
mission_id: mission.id,
|
|
384
|
+
clone_roster_built: true,
|
|
385
|
+
clone_count: roster.agent_count,
|
|
386
|
+
work_graph_ready: workGraph.ok === true,
|
|
387
|
+
role_distribution_ready: roleDistribution.ok === true,
|
|
388
|
+
allocation_ready: allocationPolicy.ok === true,
|
|
389
|
+
rebalance_ready: rebalancePolicy.ok === true,
|
|
390
|
+
concurrency_governor_ready: true,
|
|
391
|
+
active_pool_simulated: activePool.ok === true,
|
|
392
|
+
verification_dag_ready: true,
|
|
393
|
+
gpt_final_pack_ready: true,
|
|
394
|
+
zellij_dashboard_ready: zellijDashboard.ok === true,
|
|
395
|
+
native_agent_proof: nativeProofOk,
|
|
396
|
+
parallel_runtime_proof: parallelRuntimeOk,
|
|
397
|
+
final_arbiter_accepted: finalAccepted,
|
|
398
|
+
session_cleanup: result.proof?.all_sessions_closed === true || nativeProofOk,
|
|
399
|
+
blockers: [...(result.proof?.blockers || []), ...(parallelRuntimeOk ? [] : ['naruto_parallel_runtime_proof_below_gate'])],
|
|
400
|
+
updated_at: nowIso()
|
|
401
|
+
});
|
|
402
|
+
await setCurrent(root, {
|
|
403
|
+
mission_id: mission.id,
|
|
404
|
+
route: 'Naruto',
|
|
405
|
+
route_command: '$Naruto',
|
|
406
|
+
mode: 'NARUTO',
|
|
407
|
+
phase: result.ok === true ? 'NARUTO_COMPLETE_OR_REVIEW' : 'NARUTO_BLOCKED',
|
|
408
|
+
native_sessions_verified: nativeProofOk,
|
|
409
|
+
subagents_verified: nativeProofOk,
|
|
410
|
+
naruto_gate_file: 'naruto-gate.json',
|
|
411
|
+
stop_gate: 'naruto-gate.json',
|
|
412
|
+
prompt: parsed.prompt
|
|
413
|
+
});
|
|
314
414
|
const clones = result.roster?.agent_count ?? roster.agent_count;
|
|
315
415
|
const localWorkerSummary = summarizeNarutoLocalWorkerResult(localWorker, result);
|
|
316
416
|
const summary = {
|
|
@@ -362,6 +462,15 @@ async function narutoRun(parsed) {
|
|
|
362
462
|
worker_lifecycle_sample: realActivePoolSmoke.worker_lifecycle.slice(0, 5)
|
|
363
463
|
}
|
|
364
464
|
},
|
|
465
|
+
parallel_runtime: parallelRuntime ? {
|
|
466
|
+
proof_path: path.join(result.ledger_root || '', 'parallel-runtime-proof.json'),
|
|
467
|
+
max_observed_active_workers: parallelRuntime.max_observed_active_workers,
|
|
468
|
+
unique_worker_pids: parallelRuntime.unique_worker_pids,
|
|
469
|
+
speedup_ratio: parallelRuntime.speedup_ratio,
|
|
470
|
+
visible_panes: parallelRuntime.visible_panes,
|
|
471
|
+
headless_workers: parallelRuntime.headless_workers,
|
|
472
|
+
passed: parallelRuntime.passed
|
|
473
|
+
} : null,
|
|
365
474
|
local_worker: localWorkerSummary,
|
|
366
475
|
proof: result.proof?.status || 'missing',
|
|
367
476
|
run: compactNarutoRunResult(result),
|
|
@@ -375,6 +484,13 @@ async function narutoRun(parsed) {
|
|
|
375
484
|
console.log('Backend: ' + result.backend);
|
|
376
485
|
console.log('Roles: ' + roleDistribution.entries.map((entry) => `${entry.role}:${entry.count}`).join(', '));
|
|
377
486
|
console.log('Proof: ' + summary.proof);
|
|
487
|
+
if (summary.parallel_runtime) {
|
|
488
|
+
console.log('$Naruto parallel proof:');
|
|
489
|
+
console.log(' max active workers: ' + summary.parallel_runtime.max_observed_active_workers);
|
|
490
|
+
console.log(' unique PIDs: ' + summary.parallel_runtime.unique_worker_pids);
|
|
491
|
+
console.log(' speedup: ' + summary.parallel_runtime.speedup_ratio + 'x');
|
|
492
|
+
console.log(' result: ' + (summary.parallel_runtime.passed ? 'passed' : 'blocked'));
|
|
493
|
+
}
|
|
378
494
|
if (summary.zellij?.ok && summary.zellij.capability?.status === 'ok')
|
|
379
495
|
console.log('Zellij: prepared ' + zellijVisiblePanes + ' visible active clone lane(s) in ' + summary.zellij.session_name + '; dashboard tracks ' + Math.max(0, activeSlots - zellijVisiblePanes) + ' headless active worker(s)');
|
|
380
496
|
else if (summary.zellij?.ok)
|
|
@@ -636,9 +752,16 @@ function parseNarutoArgs(args = []) {
|
|
|
636
752
|
const noOpenZellij = hasFlag(args, '--no-open-zellij') || hasFlag(args, '--no-zellij');
|
|
637
753
|
const attach = hasFlag(args, '--attach');
|
|
638
754
|
const smoke = hasFlag(args, '--smoke');
|
|
639
|
-
const
|
|
755
|
+
const parallelism = normalizeParallelism(readOption(args, '--parallelism', 'extreme'));
|
|
756
|
+
const valueFlags = new Set(['--clones', '--agents', '--work-items', '--concurrency', '--target-active-slots', '--backend', '--write-mode', '--mission', '--mission-id', '--ollama-model', '--local-model-model', '--ollama-base-url', '--local-model-base-url', '--parallelism']);
|
|
640
757
|
const prompt = positionalArgs(rest, valueFlags).join(' ').trim() || 'Naruto shadow clone swarm run';
|
|
641
|
-
return { action, prompt, clones, workItems, concurrency, backend, backendExplicit, mock, real, readonly, ollamaEnabled: useOllama && !noOllama, noOllama, ollamaModel, ollamaBaseUrl, writeMode, json, missionId, noOpenZellij, attach, smoke };
|
|
758
|
+
return { action, prompt, clones, workItems, concurrency, backend, backendExplicit, mock, real, readonly, ollamaEnabled: useOllama && !noOllama, noOllama, ollamaModel, ollamaBaseUrl, writeMode, json, missionId, noOpenZellij, attach, smoke, parallelism };
|
|
759
|
+
}
|
|
760
|
+
function normalizeParallelism(value) {
|
|
761
|
+
const text = String(value || 'extreme').toLowerCase();
|
|
762
|
+
if (text === 'safe' || text === 'balanced' || text === 'extreme')
|
|
763
|
+
return text;
|
|
764
|
+
return 'extreme';
|
|
642
765
|
}
|
|
643
766
|
async function writeNarutoArtifacts(ledgerRoot, artifacts) {
|
|
644
767
|
await writeJsonAtomic(path.join(ledgerRoot, 'naruto-work-graph.json'), artifacts.workGraph);
|
|
@@ -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,187 +18,35 @@ 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));
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const useOllama = flag(args, '--ollama') || flag(args, '--local-model');
|
|
30
|
-
const noOllama = flag(args, '--no-ollama') || flag(args, '--no-local-model');
|
|
31
|
-
const ollamaModel = readFlagValue(args, '--ollama-model', readFlagValue(args, '--local-model-model', '')) || null;
|
|
32
|
-
const ollamaBaseUrl = readFlagValue(args, '--ollama-base-url', readFlagValue(args, '--local-model-base-url', '')) || null;
|
|
33
|
-
const cleanCreateArgs = stripTeamCreateControlArgs(args);
|
|
34
|
-
const opts = parseTeamCreateArgs(cleanCreateArgs);
|
|
35
|
-
const { prompt, agentSessions, roleCounts, roster } = opts;
|
|
36
|
-
const targetActiveSlots = readBoundedIntegerFlag(args, '--target-active-slots', roster.bundle_size, 1, 20);
|
|
37
|
-
const visualLaneCount = roster.bundle_size;
|
|
38
|
-
const desiredWorkItemCount = readBoundedIntegerFlag(args, '--work-items', targetActiveSlots, 1, 200);
|
|
39
|
-
const minimumWorkItems = readBoundedIntegerFlag(args, '--minimum-work-items', targetActiveSlots, 1, 200);
|
|
40
|
-
const maxQueueExpansion = readBoundedIntegerFlag(args, '--max-queue-expansion', 10, 0, 200);
|
|
41
|
-
const profile = readFlagValue(args, '--profile', '') || null;
|
|
42
|
-
const writeMode = readFlagValue(args, '--write-mode', flag(args, '--parallel-write') ? 'parallel' : 'off');
|
|
43
|
-
const applyPatches = flag(args, '--apply-patches');
|
|
44
|
-
const dryRunPatches = flag(args, '--dry-run-patches') || flag(args, '--dryrun-patches');
|
|
45
|
-
const maxWriteAgents = readBoundedIntegerFlag(args, '--max-write-agents', Math.min(roster.bundle_size, 5), 1, 20);
|
|
46
|
-
if (!prompt) {
|
|
47
|
-
console.error('Usage: sks team "task" [20:agents] [executor:5 reviewer:6 user:1] [--agents N] [--work-items N] [--target-active-slots N] [--profile NAME] [--write-mode off|proof-safe|parallel|serial] [--apply-patches] [--ollama|--no-ollama] [--no-open-zellij] [--json] [--mock]');
|
|
48
|
-
process.exitCode = 1;
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
27
|
+
return redirectTeamCreateToNaruto(args);
|
|
28
|
+
}
|
|
29
|
+
async function redirectTeamCreateToNaruto(args = []) {
|
|
51
30
|
const root = await sksRoot();
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
await
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
task_id: 'TEAM-INTAKE',
|
|
70
|
-
route: fromChatImgRequired ? 'from-chat-img' : 'team',
|
|
71
|
-
prompt,
|
|
72
|
-
tool_use: promptEffort === 'medium',
|
|
73
|
-
multi_step_decision: promptEffort !== 'low',
|
|
74
|
-
spans_many_files: promptEffort === 'high' || promptEffort === 'xhigh',
|
|
75
|
-
is_deterministic: promptEffort === 'low',
|
|
76
|
-
has_verified_skill: true,
|
|
77
|
-
high_risk: promptEffort === 'high' || promptEffort === 'xhigh',
|
|
78
|
-
risk_scores: {
|
|
79
|
-
security: /security|auth|permission|database|supabase|sql|보안|권한|데이터베이스/i.test(prompt) ? 0.8 : 0.1,
|
|
80
|
-
destructive_action: /delete|drop|reset|remove|삭제|초기화/i.test(prompt) ? 0.8 : 0.1,
|
|
81
|
-
user_impact: /release|publish|deploy|commit|push|production|배포|커밋|푸쉬|운영/i.test(prompt) ? 0.8 : 0.3
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
const workOrder = createWorkOrderLedger({ missionId: id, route: fromChatImgRequired ? 'from-chat-img' : 'team', sourcesComplete: !fromChatImgRequired, requests: [{ verbatim: prompt, normalized_requirement: prompt, implementation_tasks: ['TASK-001'], status: 'pending' }] });
|
|
85
|
-
await writeWorkOrderLedger(dir, workOrder);
|
|
86
|
-
if (fromChatImgRequired)
|
|
87
|
-
await writeFromChatImgArtifacts(dir, { missionId: id, requests: [{ verbatim: prompt }], ambiguities: ['image source inventory must be completed before implementation'] });
|
|
88
|
-
let liveZellij = null;
|
|
89
|
-
if (!mock && openZellij) {
|
|
90
|
-
liveZellij = await launchTeamZellijView({ root, missionId: id, ledgerRoot: path.join(dir, 'agents'), slotCount: visualLaneCount, dryRun: false, attach: false });
|
|
91
|
-
if (liveZellij?.ok && liveZellij.capability?.status === 'ok')
|
|
92
|
-
console.log(`Zellij: prepared ${visualLaneCount} native agent lane(s) in ${liveZellij.session_name}. Attach with: ${liveZellij.attach_command_with_env || liveZellij.attach_command}`);
|
|
93
|
-
else if (liveZellij?.ok)
|
|
94
|
-
console.log(`Zellij: optional live panes unavailable (${(liveZellij.warnings || []).join('; ') || liveZellij.capability?.status || 'unknown'}).`);
|
|
95
|
-
else
|
|
96
|
-
console.log(`Zellij: blocked (${Array.from(new Set(liveZellij?.blockers || [])).join('; ')})`);
|
|
97
|
-
}
|
|
98
|
-
const nativeAgentRun = await runNativeAgentOrchestrator({
|
|
99
|
-
root,
|
|
100
|
-
missionId: id,
|
|
101
|
-
route: '$Team',
|
|
102
|
-
prompt,
|
|
103
|
-
backend: mock ? 'fake' : 'codex-sdk',
|
|
104
|
-
mock,
|
|
105
|
-
agents: roster.bundle_size,
|
|
106
|
-
targetActiveSlots,
|
|
107
|
-
visualLaneCount,
|
|
108
|
-
desiredWorkItemCount,
|
|
109
|
-
minimumWorkItems,
|
|
110
|
-
maxQueueExpansion,
|
|
111
|
-
concurrency: Math.min(agentSessions, roster.bundle_size),
|
|
112
|
-
readonly: !applyPatches && writeMode === 'off',
|
|
113
|
-
profile,
|
|
114
|
-
writeMode: writeMode,
|
|
115
|
-
applyPatches,
|
|
116
|
-
dryRunPatches,
|
|
117
|
-
maxWriteAgents,
|
|
118
|
-
ollamaEnabled: useOllama && !noOllama,
|
|
119
|
-
noOllama,
|
|
120
|
-
ollamaModel,
|
|
121
|
-
ollamaBaseUrl,
|
|
122
|
-
routeCommand: 'sks team',
|
|
123
|
-
routeBlackboxKind: 'actual_team_command'
|
|
124
|
-
});
|
|
125
|
-
await appendTeamEvent(dir, {
|
|
126
|
-
agent: 'native_agent_orchestrator',
|
|
127
|
-
phase: 'native_agent_intake',
|
|
128
|
-
type: nativeAgentRun.ok ? 'complete' : 'blocked',
|
|
129
|
-
artifact: 'agents/agent-proof-evidence.json',
|
|
130
|
-
message: 'Native agent orchestrator completed with ' + nativeAgentRun.backend + ' backend; proof ' + (nativeAgentRun.proof?.status || 'unknown') + '.'
|
|
131
|
-
});
|
|
132
|
-
let dashboardState = await writeTeamDashboardState(dir, { missionId: id, mission: { id, mode: 'team' }, effort: effortDecision.selected_effort, phase: 'intake', next_action: fromChatImgRequired ? 'complete visual source inventory and work-order mapping' : 'run Team native agent intake agents' });
|
|
133
|
-
await writeJsonAtomic(path.join(dir, 'team-gate.json'), { passed: false, team_roster_confirmed: true, native_agent_proof: nativeAgentRun.proof?.ok === true, agent_central_ledger: true, analysis_artifact: false, triwiki_refreshed: false, triwiki_validated: false, ssot_guard: false, consensus_artifact: false, ...runtime.gate_fields, implementation_team_fresh: false, review_artifact: false, integration_evidence: false, session_cleanup: false, context7_evidence: false, ...(fromChatImgRequired ? { from_chat_img_required: true, from_chat_img_request_coverage: false } : {}) });
|
|
134
|
-
dashboardState = await writeTeamDashboardState(dir, { missionId: id, mission: { id, mode: 'team' }, effort: effortDecision.selected_effort, phase: 'intake', next_action: fromChatImgRequired ? 'complete visual source inventory and work-order mapping' : 'run Team native agent intake agents' });
|
|
135
|
-
const route = routePrompt(`$Team ${prompt}`) || ROUTES.find((candidate) => candidate.id === 'Team');
|
|
136
|
-
const routeReason = routeReasoning(route, prompt);
|
|
137
|
-
const pipelinePlan = await writePipelinePlan(dir, { missionId: id, route, task: prompt, required: false, ambiguity: { required: false, status: 'team_cli_direct' } });
|
|
138
|
-
await setCurrent(root, { mission_id: id, route: 'Team', route_command: '$Team', mode: 'TEAM', phase: mock ? 'TEAM_FIXTURE_DONE' : 'TEAM_NATIVE_AGENT_INTAKE', questions_allowed: false, implementation_allowed: true, context7_required: false, context7_verified: mock, subagents_required: false, subagents_verified: true, native_sessions_required: true, native_sessions_verified: nativeAgentRun.proof?.ok === true, reflection_required: true, visible_progress_required: true, context_tracking: 'triwiki', required_skills: route?.requiredSkills || ['team'], stop_gate: 'team-gate.json', reasoning_effort: routeReason.effort, reasoning_profile: routeReason.profile, reasoning_temporary: true, team_agent_reasoning_policy: teamReasoning, goal_continuation: pipelinePlan.goal_continuation, agent_sessions: agentSessions, target_active_slots: targetActiveSlots, role_counts: roleCounts, team_roster_confirmed: true, team_graph_ready: runtime.ok, team_live_ready: true, from_chat_img_required: fromChatImgRequired, pipeline_plan_ready: validatePipelinePlan(pipelinePlan).ok, pipeline_plan_path: PIPELINE_PLAN_ARTIFACT, native_agent_backend: nativeAgentRun.backend, native_agent_proof: 'agents/agent-proof-evidence.json', prompt });
|
|
139
|
-
const result = {
|
|
140
|
-
mission_id: id,
|
|
141
|
-
mission_dir: dir,
|
|
142
|
-
plan: path.join(dir, 'team-plan.json'),
|
|
143
|
-
workflow: path.join(dir, 'team-workflow.md'),
|
|
144
|
-
team_graph: path.join(dir, TEAM_GRAPH_ARTIFACT),
|
|
145
|
-
runtime_tasks: path.join(dir, TEAM_RUNTIME_TASKS_ARTIFACT),
|
|
146
|
-
decomposition_report: path.join(dir, TEAM_DECOMPOSITION_ARTIFACT),
|
|
147
|
-
worker_inbox_dir: path.join(dir, TEAM_INBOX_DIR),
|
|
148
|
-
live: liveFiles.live,
|
|
149
|
-
transcript: liveFiles.transcript,
|
|
150
|
-
dashboard: liveFiles.dashboard,
|
|
151
|
-
dashboard_state: path.join(dir, ARTIFACT_FILES.team_dashboard_state),
|
|
152
|
-
effort_decision: path.join(dir, ARTIFACT_FILES.effort_decision),
|
|
153
|
-
work_order_ledger: path.join(dir, ARTIFACT_FILES.work_order_ledger),
|
|
154
|
-
pipeline_plan: path.join(dir, PIPELINE_PLAN_ARTIFACT),
|
|
155
|
-
dashboard_state_valid: dashboardState.ok,
|
|
156
|
-
context_pack: path.join(root, '.sneakoscope', 'wiki', 'context-pack.json'),
|
|
157
|
-
agent_sessions: agentSessions,
|
|
158
|
-
bundle_size: roster.bundle_size,
|
|
159
|
-
target_active_slots: targetActiveSlots,
|
|
160
|
-
visual_lane_count: visualLaneCount,
|
|
161
|
-
desired_work_items: desiredWorkItemCount,
|
|
162
|
-
minimum_work_items: minimumWorkItems,
|
|
163
|
-
max_queue_expansion: maxQueueExpansion,
|
|
164
|
-
role_counts: roleCounts,
|
|
165
|
-
questions: path.join(dir, 'questions.md'),
|
|
166
|
-
native_agent_run: nativeAgentRun,
|
|
167
|
-
codex_agents: ['native_agent_orchestrator', 'agent_central_ledger', 'agent_proof_evidence', 'agent_review_lane', 'agent_integration_lane']
|
|
168
|
-
};
|
|
169
|
-
if (mock) {
|
|
170
|
-
await writeTextAtomic(path.join(dir, 'team-analysis.md'), `# Team Native Agent Analysis\n\nMock Team fixture completed native agent intake for ${id}.\n`);
|
|
171
|
-
await writeTextAtomic(path.join(dir, 'team-consensus.md'), `# Team Consensus\n\nMock Team fixture consensus reached for ${id}.\n`);
|
|
172
|
-
await writeTextAtomic(path.join(dir, 'team-review.md'), `# Team Review\n\nMock Team fixture review completed with ${MIN_TEAM_REVIEWER_LANES} validation lanes for ${id}.\n`);
|
|
173
|
-
await writeTextAtomic(path.join(dir, 'context7-evidence.jsonl'), `${JSON.stringify({ schema: 'sks.context7-evidence.v1', mission_id: id, route: '$Team', status: 'mock_not_required', generated_at: nowIso() })}\n`);
|
|
174
|
-
const cleanup = { schema_version: 1, mission_id: id, status: 'clean', passed: true, all_sessions_closed: true, outstanding_sessions: 0, live_transcript_finalized: true, mock: true, generated_at: nowIso() };
|
|
175
|
-
await writeJsonAtomic(path.join(dir, TEAM_SESSION_CLEANUP_ARTIFACT), cleanup);
|
|
176
|
-
const gate = { passed: true, team_roster_confirmed: true, native_agent_proof: nativeAgentRun.proof?.ok === true, agent_central_ledger: true, analysis_artifact: true, triwiki_refreshed: true, triwiki_validated: true, ssot_guard: true, consensus_artifact: true, ...runtime.gate_fields, implementation_team_fresh: true, review_artifact: true, review_lanes: MIN_TEAM_REVIEWER_LANES, integration_evidence: true, session_cleanup: true, context7_evidence: true, mock: true };
|
|
177
|
-
await writeJsonAtomic(path.join(dir, 'team-gate.json'), gate);
|
|
178
|
-
const proof = await maybeFinalizeRoute(root, { missionId: id, route: '$Team', gateFile: 'team-gate.json', gate, mock: true, statusHint: 'verified_partial', artifacts: ['agents/agent-proof-evidence.json', SSOT_GUARD_ARTIFACT, 'team-gate.json', TEAM_SESSION_CLEANUP_ARTIFACT, 'team-plan.json', 'team-runtime-tasks.json', 'completion-proof.json'], claims: [{ id: 'team-fixture-complete', status: 'verified_partial' }], command: { cmd: `sks team "${prompt}" --mock`, status: 0 } });
|
|
179
|
-
result.mock = true;
|
|
180
|
-
result.proof = proof.validation;
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
result.zellij = liveZellij || await launchTeamZellijView({ root, missionId: id, ledgerRoot: path.join(dir, 'agents'), slotCount: visualLaneCount, dryRun: jsonOutput || !openZellij, attach: false });
|
|
184
|
-
if (openZellij && result.zellij?.ok && result.zellij.capability?.status === 'ok' && shouldAutoAttachTeamZellij(args)) {
|
|
185
|
-
attachZellijSessionInteractive(result.zellij.session_name, { cwd: root, configPath: result.zellij.clipboard_config_path });
|
|
186
|
-
}
|
|
31
|
+
const list = (args || []).map((arg) => String(arg));
|
|
32
|
+
const narutoArgs = list[0] === 'run' ? list : ['run', ...list];
|
|
33
|
+
console.warn('SKS Team is deprecated for new execution missions; redirecting to $Naruto.');
|
|
34
|
+
const result = await narutoCommand(narutoArgs);
|
|
35
|
+
const missionId = result?.mission_id || await findLatestMission(root);
|
|
36
|
+
if (missionId) {
|
|
37
|
+
await writeJsonAtomic(path.join(root, '.sneakoscope', 'missions', missionId, 'team-alias-to-naruto.json'), {
|
|
38
|
+
schema: 'sks.team-alias-to-naruto.v1',
|
|
39
|
+
ok: true,
|
|
40
|
+
mission_id: missionId,
|
|
41
|
+
source_command: 'sks team',
|
|
42
|
+
redirected_to: 'sks naruto run',
|
|
43
|
+
route_command: '$Naruto',
|
|
44
|
+
deprecated_route: '$Team',
|
|
45
|
+
created_at: nowIso(),
|
|
46
|
+
args: list
|
|
47
|
+
});
|
|
187
48
|
}
|
|
188
|
-
|
|
189
|
-
return console.log(JSON.stringify(result, null, 2));
|
|
190
|
-
console.log(`Team mission created: ${id}`);
|
|
191
|
-
console.log(`Agent sessions: ${agentSessions}`);
|
|
192
|
-
console.log(`Role counts: ${formatRoleCounts(roleCounts)}`);
|
|
193
|
-
console.log(`Review policy: minimum ${MIN_TEAM_REVIEWER_LANES} reviewer/QA validation lanes`);
|
|
194
|
-
if (result.zellij?.ok && result.zellij.capability?.status === 'ok')
|
|
195
|
-
console.log(`Zellij: prepared ${visualLaneCount} native agent lane(s) in ${result.zellij.session_name}`);
|
|
196
|
-
else if (result.zellij?.ok)
|
|
197
|
-
console.log(`Zellij: optional live panes unavailable (${(result.zellij.warnings || []).join('; ') || result.zellij.capability?.status || 'unknown'})`);
|
|
198
|
-
else if (!mock)
|
|
199
|
-
console.log(`Zellij: blocked (${Array.from(new Set(result.zellij?.blockers || [])).join('; ')})`);
|
|
200
|
-
console.log(`Watch: sks team watch ${id}`);
|
|
201
|
-
console.log(`Artifacts: .sneakoscope/missions/${id}`);
|
|
49
|
+
return result;
|
|
202
50
|
}
|
|
203
51
|
export function parseTeamCreateArgs(args) {
|
|
204
52
|
const spec = parseTeamSpecArgs(args);
|
package/dist/core/db-safety.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import { exists, readJson, writeJsonAtomic, readText, nowIso, appendJsonlBounded } from './fsx.js';
|
|
2
|
+
import { exists, readJson, writeJsonAtomic, readText, nowIso, appendJsonlBounded, sha256 } 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 { recordMadDbOperation } from './mad-db/mad-db-capability.js';
|
|
7
|
+
import { appendMadDbLedgerEvent, appendMadDbOperationLifecycle } 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,57 @@ 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 operationId = `mad-db-op-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
514
|
+
const sqlHash = classification.sql?.statements?.length ? sha256(String(classification.sql.statements.join('\n'))) : null;
|
|
515
|
+
await appendMadDbOperationLifecycle(root, state.mission_id, {
|
|
516
|
+
type: 'db_operation.started',
|
|
517
|
+
operationId,
|
|
518
|
+
cycleId: madDbDecision.cycle_id,
|
|
519
|
+
toolName: classification.toolName || null,
|
|
520
|
+
sqlHash,
|
|
521
|
+
destructive: classification.level === 'destructive'
|
|
522
|
+
});
|
|
523
|
+
const decision = {
|
|
524
|
+
allowed: true,
|
|
525
|
+
action: 'allow',
|
|
526
|
+
reasons: madDb.reasons,
|
|
527
|
+
classification,
|
|
528
|
+
effective: { mode: 'mad-db-break-glass', env: 'operator_authorized_one_cycle', destructive: true, migrationApply: 'yes' },
|
|
529
|
+
mad_db: {
|
|
530
|
+
active: true,
|
|
531
|
+
priority: 'highest',
|
|
532
|
+
one_cycle_only: true,
|
|
533
|
+
cycle_id: madDbDecision.cycle_id,
|
|
534
|
+
capability_file: 'mad-db-capability.json',
|
|
535
|
+
consumed: false,
|
|
536
|
+
operation_id: operationId,
|
|
537
|
+
operation_count: Number(madDbDecision.operation_count || 0) + 1,
|
|
538
|
+
max_operations: madDbDecision.max_operations || 20
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
await appendMadDbLedgerEvent(root, state.mission_id, { type: 'db_mutation.allowed', cycle_id: madDbDecision.cycle_id, mode: madDbDecision.mode, classification, operation_id: operationId });
|
|
542
|
+
await appendMadDbOperationLifecycle(root, state.mission_id, {
|
|
543
|
+
type: 'db_operation.allowed',
|
|
544
|
+
operationId,
|
|
545
|
+
cycleId: madDbDecision.cycle_id,
|
|
546
|
+
toolName: classification.toolName || null,
|
|
547
|
+
sqlHash,
|
|
548
|
+
destructive: classification.level === 'destructive',
|
|
549
|
+
resultStatus: 'unknown_pending_tool_result'
|
|
550
|
+
});
|
|
551
|
+
const updatedCapability = await recordMadDbOperation(root, state.mission_id, {
|
|
552
|
+
operationId,
|
|
553
|
+
...(classification.toolName ? { toolName: classification.toolName } : {}),
|
|
554
|
+
...(sqlHash ? { sqlHash } : {})
|
|
555
|
+
});
|
|
556
|
+
decision.mad_db.consumed = updatedCapability?.consumed === true;
|
|
557
|
+
decision.mad_db.operation_count = updatedCapability?.operation_count ?? decision.mad_db.operation_count;
|
|
558
|
+
await appendJsonlBounded(path.join(missionDir(root, state.mission_id), 'db-safety.jsonl'), { ts: nowIso(), decision });
|
|
559
|
+
return decision;
|
|
560
|
+
}
|
|
507
561
|
const madSks = await madSksOverrideState(root, state);
|
|
508
562
|
const decision = evaluateDbSafety({ classification, policy, contract, duringNoQuestion, madSks });
|
|
509
563
|
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.16';
|
|
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() {
|
|
@@ -4,6 +4,7 @@ import { gitBlocker, runGitCommand } from './git-worktree-runner.js';
|
|
|
4
4
|
import { resolveGitWorktreeRoot } from './git-worktree-root.js';
|
|
5
5
|
export async function evaluateGitWorktreeCapability(input = {}) {
|
|
6
6
|
const requireGitWorktree = input.requireGitWorktree === true || process.env.SKS_REQUIRE_GIT_WORKTREE === '1';
|
|
7
|
+
const disabledByEnv = process.env.SKS_DISABLE_GIT_WORKTREE === '1';
|
|
7
8
|
const detection = await detectGitRepo(input.root || process.cwd());
|
|
8
9
|
const blockers = [...detection.blockers];
|
|
9
10
|
const gitAvailable = Boolean(detection.git_binary);
|
|
@@ -24,6 +25,23 @@ export async function evaluateGitWorktreeCapability(input = {}) {
|
|
|
24
25
|
blockers
|
|
25
26
|
};
|
|
26
27
|
}
|
|
28
|
+
if (disabledByEnv) {
|
|
29
|
+
if (requireGitWorktree)
|
|
30
|
+
blockers.push('git_worktree_disabled_by_env');
|
|
31
|
+
return {
|
|
32
|
+
schema: 'sks.git-worktree-capability.v1',
|
|
33
|
+
ok: blockers.length === 0,
|
|
34
|
+
mode: 'patch-envelope-only',
|
|
35
|
+
require_git_worktree: requireGitWorktree,
|
|
36
|
+
git_available: gitAvailable,
|
|
37
|
+
is_git_repo: true,
|
|
38
|
+
worktree_supported: false,
|
|
39
|
+
worktree_probe_attempted: false,
|
|
40
|
+
detection,
|
|
41
|
+
root_resolution: null,
|
|
42
|
+
blockers: [...new Set(blockers)]
|
|
43
|
+
};
|
|
44
|
+
}
|
|
27
45
|
const rootResolution = resolveGitWorktreeRoot({
|
|
28
46
|
repoRoot: detection.root,
|
|
29
47
|
missionId: input.missionId || 'capability'
|