sneakoscope 2.0.13 → 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-orchestrator.js +11 -4
- package/dist/core/agents/agent-output-validator.js +1 -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/codex-control/codex-fake-sdk-adapter.js +3 -3
- package/dist/core/codex-control/gpt-final-review-schema.js +61 -14
- 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 +82 -1
- package/dist/core/commands/research-command.js +83 -17
- 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/naruto/naruto-real-worker-child.js +11 -3
- package/dist/core/naruto/naruto-real-worker-runtime.js +4 -0
- package/dist/core/pipeline/final-gpt-patch-stage.js +20 -3
- 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 +124 -0
- package/dist/core/research/implementation-blueprint-markdown.js +1 -1
- package/dist/core/research/implementation-blueprint.js +68 -7
- package/dist/core/research/research-claim-builder.js +114 -0
- package/dist/core/research/research-cycle-runner.js +115 -11
- package/dist/core/research/research-final-reviewer.js +181 -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-source-ledger-merge.js +186 -0
- package/dist/core/research/research-source-shards.js +176 -0
- package/dist/core/research/research-stage-runner.js +537 -11
- package/dist/core/research/research-synthesis-prompt.js +52 -0
- package/dist/core/research/research-synthesis-writer.js +208 -0
- package/dist/core/research/research-work-graph.js +114 -23
- package/dist/core/research.js +72 -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 +67 -5
- package/schemas/codex/agent-result.schema.json +1 -1
- 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-source-shard.schema.json +46 -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/build-manifest.json +0 -1184
- 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 -15
- 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 -53
- 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 -79
- package/dist/scripts/release-provenance-check.js +0 -150
- package/dist/scripts/release-readiness-report.js +0 -1146
- 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-quality-gate-check.js +0 -86
- 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
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/permission-request.command.input.schema.json +0 -61
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/permission-request.command.output.schema.json +0 -103
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-compact.command.input.schema.json +0 -52
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-compact.command.output.schema.json +0 -24
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-tool-use.command.input.schema.json +0 -67
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/post-tool-use.command.output.schema.json +0 -84
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-compact.command.input.schema.json +0 -52
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-compact.command.output.schema.json +0 -24
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-tool-use.command.input.schema.json +0 -65
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/pre-tool-use.command.output.schema.json +0 -105
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/session-start.command.input.schema.json +0 -59
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/session-start.command.output.schema.json +0 -63
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/snapshot-metadata.json +0 -31
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/stop.command.input.schema.json +0 -63
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/stop.command.output.schema.json +0 -45
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/user-prompt-submit.command.input.schema.json +0 -59
- package/dist/vendor/openai-codex/rust-v0.131.0/hooks/user-prompt-submit.command.output.schema.json +0 -81
package/dist/core/routes.js
CHANGED
|
@@ -355,11 +355,15 @@ export const ROUTES = [
|
|
|
355
355
|
id: 'Team',
|
|
356
356
|
command: '$Team',
|
|
357
357
|
mode: 'TEAM',
|
|
358
|
-
route: '
|
|
359
|
-
description: '
|
|
358
|
+
route: 'deprecated alias to Naruto',
|
|
359
|
+
description: 'Deprecated compatibility alias. New substantial work is routed to $Naruto, the native shadow-clone swarm SSOT.',
|
|
360
360
|
requiredSkills: ['team', 'pipeline-runner', 'context7-docs', 'prompt-pipeline', REFLECTION_SKILL_NAME, 'honest-mode'],
|
|
361
361
|
dollarAliases: ['$From-Chat-IMG'],
|
|
362
362
|
appSkillAliases: ['from-chat-img'],
|
|
363
|
+
deprecated: true,
|
|
364
|
+
hidden: true,
|
|
365
|
+
aliasTo: '$Naruto',
|
|
366
|
+
deprecationMessage: '$Team is deprecated and redirects new execution missions to $Naruto. Existing Team observation commands remain available for old missions.',
|
|
363
367
|
lifecycle: ['native_agent_intake', 'triwiki_refresh', 'planning_debate', 'live_transcript', 'consensus_artifact', 'fresh_implementation_team', 'review_artifact', 'integration_evidence', 'session_cleanup', 'post_route_reflection', 'honest_mode'],
|
|
364
368
|
context7Policy: 'optional',
|
|
365
369
|
reasoningPolicy: 'high',
|
|
@@ -373,13 +377,13 @@ export const ROUTES = [
|
|
|
373
377
|
mode: 'NARUTO',
|
|
374
378
|
route: 'hardware-safe massive parallel work swarm',
|
|
375
379
|
description: '$Naruto mode launches a hardware-safe massive parallel work swarm. Clones may implement, modify, verify, test, research, document, and resolve conflicts according to role and lease policy; write-capable output is accepted only through patch envelopes, verification DAG, mutation guard, and GPT final arbiter.',
|
|
376
|
-
requiredSkills: ['
|
|
380
|
+
requiredSkills: ['naruto', 'pipeline-runner', 'prompt-pipeline', 'honest-mode'],
|
|
377
381
|
dollarAliases: ['$ShadowClone', '$Kagebunshin'],
|
|
378
382
|
appSkillAliases: ['shadow-clone', 'kage-bunshin'],
|
|
379
383
|
lifecycle: ['clone_roster_build', 'massive_work_graph', 'hardware_safe_governor', 'dynamic_active_pool', 'lease_based_write_swarm', 'parallel_verification_dag', 'gpt_final_arbiter_pack', 'per_clone_proof', 'session_cleanup', 'honest_mode'],
|
|
380
384
|
context7Policy: 'optional',
|
|
381
385
|
reasoningPolicy: 'high',
|
|
382
|
-
stopGate: '
|
|
386
|
+
stopGate: 'naruto-gate.json',
|
|
383
387
|
cliEntrypoint: 'sks naruto run "task" [--clones N] [--backend codex-sdk|fake|ollama] [--parallel-write] | sks naruto status',
|
|
384
388
|
examples: ['$Naruto run sweep the codebase for TODO comments with 50 clones', '$ShadowClone --clones 100 fan out and draft tests for every module']
|
|
385
389
|
},
|
|
@@ -598,7 +602,7 @@ export const ROUTES = [
|
|
|
598
602
|
examples: ['$Help show available SKS commands']
|
|
599
603
|
}
|
|
600
604
|
];
|
|
601
|
-
export const DOLLAR_COMMANDS = ROUTES.flatMap(({ command, route, description, dollarAliases = [] }) => [
|
|
605
|
+
export const DOLLAR_COMMANDS = ROUTES.filter((route) => route.hidden !== true).flatMap(({ command, route, description, dollarAliases = [] }) => [
|
|
602
606
|
{ command, route, description },
|
|
603
607
|
...dollarAliases.map((alias) => ({ command: alias, route, description }))
|
|
604
608
|
]);
|
|
@@ -632,11 +636,11 @@ export const COMMAND_CATALOG = [
|
|
|
632
636
|
{ name: 'auth', usage: 'sks auth status|health|repair|setup --host <domain> --api-key <key>', description: 'Shortcut for codex-lb provider auth status, health, repair, and setup commands.' },
|
|
633
637
|
{ name: 'openclaw', usage: 'sks openclaw install|path|print [--dir path] [--force] [--json]', description: 'Generate an OpenClaw skill package so OpenClaw agents can discover and use local SKS workflows.' },
|
|
634
638
|
{ name: 'hermes', usage: 'sks hermes install|status|path|print [--dir path] [--force] [--json]', description: 'Generate a Hermes Agent skill package so Hermes agents can discover and use local SKS workflows.' },
|
|
635
|
-
{ name: 'zellij', usage: 'sks zellij status|repair [--json] | sks
|
|
639
|
+
{ name: 'zellij', usage: 'sks zellij status|repair [--json] | sks naruto dashboard latest | sks --mad', description: 'Inspect Zellij runtime status, explain repair (no auto-install), and open the SKS Zellij runtime used by MAD and Naruto lane UI.' },
|
|
636
640
|
{ name: 'tmux', usage: 'sks tmux [--json]', description: 'Show the removed-runtime migration notice and point operators to Zellij.' },
|
|
637
641
|
{ name: 'mad', usage: 'sks --mad [--high]', description: 'Open a one-shot Zellij Codex CLI workspace with the SKS MAD full-access auto-review profile.' },
|
|
638
642
|
{ name: 'auto-review', usage: 'sks auto-review status|enable|start [--high] | sks --Auto-review --high', description: 'Enable Codex automatic approval review and launch SKS Zellij with the auto-review profile.' },
|
|
639
|
-
{ name: 'dollar-commands', usage: 'sks dollar-commands [--json]', description: 'List Codex App $ commands such as $DFix and $
|
|
643
|
+
{ name: 'dollar-commands', usage: 'sks dollar-commands [--json]', description: 'List Codex App $ commands such as $DFix and $Naruto.' },
|
|
640
644
|
{ name: 'fast-mode', usage: 'sks fast-mode on|off|status|clear [--json]', description: 'Toggle the project-local Fast mode default used by $Fast-On, $Fast-Off, and native-agent routes.' },
|
|
641
645
|
{ name: 'with-local-llm', usage: 'sks with-local-llm on|off|status|set-model [--json]', description: 'Toggle the optional local Ollama worker backend used by $with-local-llm-on/$with-local-llm-off and eligible simple worker slices.' },
|
|
642
646
|
{ name: 'commit', usage: 'sks commit [--message "msg"] [--json]', description: 'Stage current changes, summarize them, and create a simple git commit without the full SKS pipeline.' },
|
|
@@ -681,7 +685,7 @@ export const COMMAND_CATALOG = [
|
|
|
681
685
|
{ name: 'wiki', usage: 'sks wiki coords|pack|refresh|publish|rebuild-index|validate|validate-shared|wrongness ...', description: 'Build, refresh, publish shared shards, rebuild ignored indexes, validate, and attach wrongness-memory context to RGBA/trig LLM Wiki packs with attention.use_first and attention.hydrate_first for compact recall plus source hydration.' },
|
|
682
686
|
{ name: 'hproof', usage: 'sks hproof check [mission-id|latest]', description: 'Evaluate the H-Proof done gate for a mission.' },
|
|
683
687
|
{ name: 'agent', usage: 'sks agent run|status|close|cleanup <mission-id|latest> [--agents N] [--work-items N] [--target-active-slots N] [--mock] [--apply|--dry-run] [--drain] [--stale-ms N] [--json] | sks agent rollback-patches [mission-id|latest] [--patch-entry-id id] [--dry-run|--apply] [--json]', description: 'Run, inspect, close, clean, or rollback native multi-session agent missions with agents as target active slots, work items as the route queue size, cleanup executor proof for stale runtime resources, and patch rollback proof for applied patch entries.' },
|
|
684
|
-
{ name: 'team', usage: 'sks team "task"
|
|
688
|
+
{ name: 'team', usage: 'sks team \"task\" | sks team log|tail|watch|lane|status|dashboard|event|message|open-zellij|attach-zellij|cleanup-zellij ...', description: 'Deprecated compatibility command: new tasks redirect to Naruto; observation subcommands remain for old Team missions.' },
|
|
685
689
|
{ name: 'reasoning', usage: 'sks reasoning ["prompt"] [--json]', description: 'Show SKS temporary reasoning-effort routing: medium for simple tasks, high for logic, xhigh for research.' },
|
|
686
690
|
{ name: 'gx', usage: 'sks gx init|render|validate|drift|snapshot [name]', description: 'Create and verify deterministic SVG/HTML visual context cartridges.' },
|
|
687
691
|
{ name: 'profile', usage: 'sks profile show|set <model>', description: 'Inspect or set the current SKS model profile metadata.' },
|
|
@@ -819,14 +823,14 @@ export function routePrompt(prompt) {
|
|
|
819
823
|
if (looksLikeAnswerOnlyRequest(afterModifier))
|
|
820
824
|
return routeById('Answer');
|
|
821
825
|
if (looksLikeCodeChangingWork(afterModifier) || looksLikeDirectWorkRequest(afterModifier))
|
|
822
|
-
return routeById('
|
|
826
|
+
return routeById('Naruto');
|
|
823
827
|
return routeById('MadSKS');
|
|
824
828
|
}
|
|
825
829
|
const route = routeByDollarCommand(command) || routeById('SKS');
|
|
826
830
|
if (route?.id === 'SKS' && looksLikeTeamDefaultWork(stripDollarCommand(text)))
|
|
827
|
-
return routeById('
|
|
828
|
-
if (route?.id === 'Team')
|
|
829
|
-
return
|
|
831
|
+
return routeById('Naruto');
|
|
832
|
+
if (route?.id === 'Team' && command === 'TEAM')
|
|
833
|
+
return routeById('Naruto');
|
|
830
834
|
return route;
|
|
831
835
|
}
|
|
832
836
|
if (hasFromChatImgSignal(text))
|
|
@@ -843,13 +847,13 @@ export function routePrompt(prompt) {
|
|
|
843
847
|
if (looksLikeTinyDirectFix(text))
|
|
844
848
|
return routeById('DFix');
|
|
845
849
|
if (looksLikeQuestionShapedDirective(text))
|
|
846
|
-
return routeById('
|
|
850
|
+
return routeById('Naruto');
|
|
847
851
|
if (looksLikeAnswerOnlyRequest(text))
|
|
848
852
|
return routeById('Answer');
|
|
849
853
|
if (/\b(SQL|Supabase|Postgres|migration|RLS|Prisma|Drizzle|Knex|database|DB|execute_sql)\b/i.test(text))
|
|
850
854
|
return routeById('DB');
|
|
851
855
|
if (/\b(team|multi-agent|subagent|parallel agents|agent team)\b|병렬|팀/i.test(text))
|
|
852
|
-
return routeById('
|
|
856
|
+
return routeById('Naruto');
|
|
853
857
|
if (looksLikeChatCaptureRequest(text) && !looksLikeAnswerOnlyRequest(text))
|
|
854
858
|
return routeById('Team');
|
|
855
859
|
if (/\b(qa[-\s]?loop|qaloop|e2e\s+qa|qa\s+e2e)\b/i.test(text))
|
|
@@ -863,7 +867,7 @@ export function routePrompt(prompt) {
|
|
|
863
867
|
if (/\b(GX|vgraph|visual context|render cartridge|wiki coordinate|rgba|trig|llm wiki)\b/i.test(text))
|
|
864
868
|
return routeById('GX');
|
|
865
869
|
if (looksLikeTeamDefaultWork(text))
|
|
866
|
-
return routeById('
|
|
870
|
+
return routeById('Naruto');
|
|
867
871
|
return routeById('SKS');
|
|
868
872
|
}
|
|
869
873
|
export function looksLikeComputerUseFastLane(prompt = '') {
|
|
@@ -941,7 +945,7 @@ export function routeNeedsContext7(route, prompt = '') {
|
|
|
941
945
|
export function routeRequiresSubagents(route, prompt = '') {
|
|
942
946
|
if (!route)
|
|
943
947
|
return false;
|
|
944
|
-
if (route.id === 'Team')
|
|
948
|
+
if (route.id === 'Team' || route.id === 'Naruto')
|
|
945
949
|
return true;
|
|
946
950
|
if (route.id === 'SKS')
|
|
947
951
|
return looksLikeTeamDefaultWork(prompt);
|
|
@@ -983,7 +987,7 @@ export function simpleGitOnlyRouteId(prompt = '') {
|
|
|
983
987
|
}
|
|
984
988
|
export function reflectionRequiredForRoute(route) {
|
|
985
989
|
const id = String(route?.id || route?.mode || route?.route || route || '').replace(/^\$/, '');
|
|
986
|
-
return /^(team|qaloop|qa-loop|ppt|imageuxreview|image-ux-review|research|autoresearch|db|database|madsks|mad-sks|gx)$/i.test(id);
|
|
990
|
+
return /^(team|naruto|shadowclone|shadow-clone|kagebunshin|kage-bunshin|qaloop|qa-loop|ppt|imageuxreview|image-ux-review|research|autoresearch|db|database|madsks|mad-sks|gx)$/i.test(id);
|
|
987
991
|
}
|
|
988
992
|
export function looksLikeCodeChangingWork(prompt = '') {
|
|
989
993
|
const text = String(prompt || '');
|
|
@@ -1012,7 +1016,7 @@ export function subagentExecutionPolicyText(route, prompt = '') {
|
|
|
1012
1016
|
}
|
|
1013
1017
|
return [
|
|
1014
1018
|
'Native multi-session policy: REQUIRED for code-changing or execution work in this route.',
|
|
1015
|
-
'The selected SKS route itself authorizes route-owned worker/reviewer native sessions; the user does not need to separately ask for helper sessions when the default
|
|
1019
|
+
'The selected SKS route itself authorizes route-owned worker/reviewer native sessions; the user does not need to separately ask for helper sessions when the default Naruto pipeline is active.',
|
|
1016
1020
|
'Before editing, the parent orchestrator must visibly state the SKS route, split independent write scopes, and run worker/reviewer native sessions whenever the route can be split safely.',
|
|
1017
1021
|
'Run workers in parallel only with disjoint ownership. The parent owns integration, verification, and final evidence.',
|
|
1018
1022
|
'If native sessions are unavailable or the work cannot be safely split, record explicit unavailable/unsplittable native-session evidence before editing.',
|
|
@@ -1027,7 +1031,7 @@ export function routeReasoning(route, prompt = '') {
|
|
|
1027
1031
|
return reasoning('xhigh', 'from_chat_img_image_work_order_analysis');
|
|
1028
1032
|
if (/(?:^|\s)sks\s+--mad\b|(?:^|\s)--mad\b|\$MAD-SKS\b|\bmad-sks\b|\bmadsks\b/i.test(text))
|
|
1029
1033
|
return reasoning('xhigh', 'mad_sks_or_mad_launch_default');
|
|
1030
|
-
if (route?.id === 'Team')
|
|
1034
|
+
if (route?.id === 'Team' || route?.id === 'Naruto')
|
|
1031
1035
|
return teamRouteReasoning(text);
|
|
1032
1036
|
if (route?.id === 'Research' || route?.id === 'AutoResearch')
|
|
1033
1037
|
return reasoning('xhigh', 'research_or_experiment_route');
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import https from 'node:https';
|
|
2
|
+
import os from 'node:os';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { ensureDir, nowIso, readJson, writeJsonAtomic } from '../fsx.js';
|
|
5
|
+
export const SKS_UPDATE_NOTICE_SCHEMA = 'sks.update-notice.v1';
|
|
6
|
+
export async function checkSksUpdateNotice(input = {}) {
|
|
7
|
+
const env = input.env || process.env;
|
|
8
|
+
const packageName = input.packageName || env.SKS_UPDATE_NOTICE_PACKAGE || 'sneakoscope';
|
|
9
|
+
const currentVersion = input.currentVersion || env.SKS_PACKAGE_VERSION || '0.0.0';
|
|
10
|
+
const ttlMs = normalizePositiveInt(env.SKS_UPDATE_NOTICE_TTL_MS, 6 * 60 * 60 * 1000);
|
|
11
|
+
const cachePath = path.join(os.homedir(), '.sneakoscope', 'cache', 'update-notice.json');
|
|
12
|
+
if (env.SKS_DISABLE_UPDATE_NOTICE === '1' || env.SKS_UPDATE_NOTICE_DISABLE === '1' || env.SKS_UPDATE_NOTICE === '0') {
|
|
13
|
+
return persistNotice(input.missionDir, {
|
|
14
|
+
schema: SKS_UPDATE_NOTICE_SCHEMA,
|
|
15
|
+
checked_at: nowIso(),
|
|
16
|
+
package_name: packageName,
|
|
17
|
+
current_version: currentVersion,
|
|
18
|
+
latest_version: null,
|
|
19
|
+
update_available: false,
|
|
20
|
+
source: 'disabled',
|
|
21
|
+
cache_ttl_ms: ttlMs,
|
|
22
|
+
message: 'SKS update notice disabled by environment.'
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
const cached = await readJson(cachePath, null);
|
|
26
|
+
if (cached?.schema === SKS_UPDATE_NOTICE_SCHEMA && Date.now() - Date.parse(cached.checked_at || '') < ttlMs) {
|
|
27
|
+
return persistNotice(input.missionDir, { ...cached, source: 'cache', cache_ttl_ms: ttlMs });
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
const latest = await npmLatest(packageName, input.timeoutMs || normalizePositiveInt(env.SKS_UPDATE_NOTICE_TIMEOUT_MS, 1500));
|
|
31
|
+
const updateAvailable = compareVersions(latest, currentVersion) > 0;
|
|
32
|
+
const notice = {
|
|
33
|
+
schema: SKS_UPDATE_NOTICE_SCHEMA,
|
|
34
|
+
checked_at: nowIso(),
|
|
35
|
+
package_name: packageName,
|
|
36
|
+
current_version: currentVersion,
|
|
37
|
+
latest_version: latest,
|
|
38
|
+
update_available: updateAvailable,
|
|
39
|
+
source: 'npm-registry',
|
|
40
|
+
cache_ttl_ms: ttlMs,
|
|
41
|
+
message: updateAvailable
|
|
42
|
+
? `SKS ${latest} is available; current ${currentVersion}. This notice is informational and does not block launch or release gates.`
|
|
43
|
+
: `SKS ${currentVersion} is current enough; update notice is informational.`
|
|
44
|
+
};
|
|
45
|
+
await ensureDir(path.dirname(cachePath));
|
|
46
|
+
await writeJsonAtomic(cachePath, notice).catch(() => undefined);
|
|
47
|
+
return persistNotice(input.missionDir, notice);
|
|
48
|
+
}
|
|
49
|
+
catch (err) {
|
|
50
|
+
const notice = {
|
|
51
|
+
schema: SKS_UPDATE_NOTICE_SCHEMA,
|
|
52
|
+
checked_at: nowIso(),
|
|
53
|
+
package_name: packageName,
|
|
54
|
+
current_version: currentVersion,
|
|
55
|
+
latest_version: cached?.latest_version || null,
|
|
56
|
+
update_available: false,
|
|
57
|
+
source: 'error',
|
|
58
|
+
cache_ttl_ms: ttlMs,
|
|
59
|
+
message: 'SKS update notice could not reach npm; launch continues without blocking.',
|
|
60
|
+
error: err?.message || String(err)
|
|
61
|
+
};
|
|
62
|
+
return persistNotice(input.missionDir, notice);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
async function persistNotice(missionDir, notice) {
|
|
66
|
+
if (missionDir)
|
|
67
|
+
await writeJsonAtomic(path.join(missionDir, 'update-notice.json'), notice).catch(() => undefined);
|
|
68
|
+
return notice;
|
|
69
|
+
}
|
|
70
|
+
function npmLatest(packageName, timeoutMs) {
|
|
71
|
+
return new Promise((resolve, reject) => {
|
|
72
|
+
const req = https.request({
|
|
73
|
+
hostname: 'registry.npmjs.org',
|
|
74
|
+
path: `/${encodeURIComponent(packageName).replace(/^%40/, '@')}/latest`,
|
|
75
|
+
method: 'GET',
|
|
76
|
+
timeout: timeoutMs,
|
|
77
|
+
headers: { Accept: 'application/json' }
|
|
78
|
+
}, (res) => {
|
|
79
|
+
let body = '';
|
|
80
|
+
res.setEncoding('utf8');
|
|
81
|
+
res.on('data', (chunk) => { body += chunk; });
|
|
82
|
+
res.on('end', () => {
|
|
83
|
+
try {
|
|
84
|
+
if ((res.statusCode || 0) < 200 || (res.statusCode || 0) >= 300)
|
|
85
|
+
throw new Error(`npm_status_${res.statusCode}`);
|
|
86
|
+
const parsed = JSON.parse(body);
|
|
87
|
+
if (!parsed?.version)
|
|
88
|
+
throw new Error('npm_latest_version_missing');
|
|
89
|
+
resolve(String(parsed.version));
|
|
90
|
+
}
|
|
91
|
+
catch (err) {
|
|
92
|
+
reject(err);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
req.on('timeout', () => {
|
|
97
|
+
req.destroy(new Error('update_notice_timeout'));
|
|
98
|
+
});
|
|
99
|
+
req.on('error', reject);
|
|
100
|
+
req.end();
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
function compareVersions(left, right) {
|
|
104
|
+
const a = parseVersion(left);
|
|
105
|
+
const b = parseVersion(right);
|
|
106
|
+
for (let i = 0; i < Math.max(a.length, b.length); i += 1) {
|
|
107
|
+
const delta = (a[i] || 0) - (b[i] || 0);
|
|
108
|
+
if (delta !== 0)
|
|
109
|
+
return delta;
|
|
110
|
+
}
|
|
111
|
+
return 0;
|
|
112
|
+
}
|
|
113
|
+
function parseVersion(value) {
|
|
114
|
+
return String(value || '').split(/[.-]/).map((part) => Number(part)).map((part) => Number.isFinite(part) ? part : 0);
|
|
115
|
+
}
|
|
116
|
+
function normalizePositiveInt(value, fallback) {
|
|
117
|
+
const parsed = Number(value);
|
|
118
|
+
return Number.isFinite(parsed) && parsed > 0 ? Math.floor(parsed) : fallback;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=update-notice.js.map
|
package/dist/core/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const PACKAGE_VERSION = '2.0.
|
|
1
|
+
export const PACKAGE_VERSION = '2.0.15';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -20,6 +20,7 @@ export function buildZellijDashboardSnapshot(input) {
|
|
|
20
20
|
local_llm: input.local_llm || { tps: 0, queue: 0 },
|
|
21
21
|
gpt_final_status: input.gpt_final_status || 'not_started',
|
|
22
22
|
gate_progress: input.gate_progress || 'not_release',
|
|
23
|
+
update_notice: input.update_notice || null,
|
|
23
24
|
patch_verify: input.patch_verify || {
|
|
24
25
|
patches: 0,
|
|
25
26
|
gpt_approved: 0,
|
|
@@ -48,6 +49,7 @@ export function renderZellijDashboardText(snapshot) {
|
|
|
48
49
|
`Local LLM TPS / queue: ${snapshot.local_llm.tps}/${snapshot.local_llm.queue}`,
|
|
49
50
|
`GPT final status: ${snapshot.gpt_final_status}`,
|
|
50
51
|
`Gate progress: ${snapshot.gate_progress}`,
|
|
52
|
+
`Update notice: ${snapshot.update_notice?.update_available ? `${snapshot.update_notice.latest_version || 'available'} available` : (snapshot.update_notice ? `none (${snapshot.update_notice.source})` : 'not checked')}`,
|
|
51
53
|
`Patch / verify: patches ${snapshot.patch_verify.patches} · approved ${snapshot.patch_verify.gpt_approved} · conflicts ${snapshot.patch_verify.conflicts} · verify ${snapshot.patch_verify.verification_running}/${snapshot.patch_verify.verification_passed}/${snapshot.patch_verify.verification_failed}`,
|
|
52
54
|
'Workers:',
|
|
53
55
|
...(snapshot.workers.length ? snapshot.workers.slice(0, 12).map((worker) => `${worker.slot_id} gen-${worker.generation_index} ${worker.role} ${worker.backend}/${worker.provider}/${worker.service_tier} WT:${worker.worktree_id || '-'} ${worker.status} ${worker.current_file || ''} ${worker.latest_heartbeat || ''}`) : ['none']),
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
+
import { readZellijSlotTelemetrySnapshot } from './zellij-slot-telemetry.js';
|
|
3
4
|
export function renderZellijSlotColumnAnchor(input = {}) {
|
|
4
5
|
const active = nonNegativeInt(input.activeWorkers, 0);
|
|
5
6
|
const visible = Math.max(1, nonNegativeInt(input.visiblePaneCap, active || 1));
|
|
6
7
|
const headless = nonNegativeInt(input.headlessWorkers, 0);
|
|
7
8
|
const queue = nonNegativeInt(input.queueDepth, 0);
|
|
8
|
-
const
|
|
9
|
+
const done = nonNegativeInt(input.completedWorkers, 0);
|
|
10
|
+
const fail = nonNegativeInt(input.failedWorkers, 0);
|
|
11
|
+
const update = input.updateAvailableVersion ? ` · update ${trimInline(input.updateAvailableVersion, 18)} available` : '';
|
|
12
|
+
const madDb = input.madDbActive ? ' · MAD-DB ACTIVE' : '';
|
|
13
|
+
const header = done || fail
|
|
14
|
+
? `SLOTS active ${active} · headless ${headless} · done ${done} · fail ${fail} · q ${queue}${update}${madDb}`
|
|
15
|
+
: `SLOTS active ${active}/${visible} · headless ${headless} · q ${queue}${update}${madDb}`;
|
|
9
16
|
const workers = Array.isArray(input.workerRows) ? input.workerRows : [];
|
|
10
17
|
if (!workers.length)
|
|
11
18
|
return `${header}\nvisible slot panes stack below this anchor`;
|
|
@@ -23,6 +30,12 @@ export function renderZellijSlotColumnAnchor(input = {}) {
|
|
|
23
30
|
export async function renderZellijSlotColumnAnchorFromArtifacts(input) {
|
|
24
31
|
const root = path.resolve(input.artifactRoot);
|
|
25
32
|
const missionDir = inferMissionDir(root, input.missionId);
|
|
33
|
+
const telemetry = await readZellijSlotTelemetrySnapshot(root, input.missionId).catch(() => null);
|
|
34
|
+
const updateNotice = await readJson(path.join(missionDir, 'update-notice.json'));
|
|
35
|
+
const madDb = await readJson(path.join(missionDir, 'mad-db-capability.json'));
|
|
36
|
+
if (telemetry && Object.keys(telemetry.slots || {}).length) {
|
|
37
|
+
return renderTelemetryAnchor(telemetry, updateNotice, madDb);
|
|
38
|
+
}
|
|
26
39
|
const snapshot = await readJson(path.join(missionDir, 'zellij-dashboard-snapshot.json'));
|
|
27
40
|
const rightColumn = await readJson(path.join(missionDir, 'zellij-right-column-state.json'));
|
|
28
41
|
const swarm = await readJson(path.join(root, 'agent-native-cli-session-swarm.json'))
|
|
@@ -33,10 +46,31 @@ export async function renderZellijSlotColumnAnchorFromArtifacts(input) {
|
|
|
33
46
|
const headlessWorkers = Number(snapshot?.headless_workers ?? workerRows.filter((row) => row.placement === 'headless' && (!row.status || row.status === 'running')).length ?? 0);
|
|
34
47
|
const queueDepth = Number(snapshot?.queue_depth ?? 0);
|
|
35
48
|
const anchorInput = { activeWorkers, visiblePaneCap, headlessWorkers, queueDepth, workerRows };
|
|
49
|
+
if (updateNotice?.update_available && updateNotice.latest_version)
|
|
50
|
+
anchorInput.updateAvailableVersion = String(updateNotice.latest_version);
|
|
51
|
+
if (isMadDbActive(madDb))
|
|
52
|
+
anchorInput.madDbActive = true;
|
|
36
53
|
if (input.mode !== undefined)
|
|
37
54
|
anchorInput.mode = input.mode;
|
|
38
55
|
return renderZellijSlotColumnAnchor(anchorInput);
|
|
39
56
|
}
|
|
57
|
+
function renderTelemetryAnchor(snapshot, updateNotice = null, madDbCapability = null) {
|
|
58
|
+
const updatedAt = Date.parse(snapshot.updated_at || '');
|
|
59
|
+
const staleSeconds = Number.isFinite(updatedAt) ? Math.max(0, Math.round((Date.now() - updatedAt) / 1000)) : null;
|
|
60
|
+
const counts = snapshot.counts || {};
|
|
61
|
+
const active = Number(counts.running || 0) + Number(counts.verifying || 0);
|
|
62
|
+
const update = updateNotice?.update_available && updateNotice?.latest_version ? ` · update ${trimInline(String(updateNotice.latest_version), 18)} available` : '';
|
|
63
|
+
const madDb = isMadDbActive(madDbCapability) ? ' · MAD-DB ACTIVE' : '';
|
|
64
|
+
if (staleSeconds != null && staleSeconds > 10)
|
|
65
|
+
return `SLOTS telemetry stale ${staleSeconds}s · active ?${update}${madDb}`;
|
|
66
|
+
return `SLOTS active ${active} · headless ${Number(counts.headless || 0)} · done ${Number(counts.completed || 0)} · fail ${Number(counts.failed || 0)} · q ${Number(counts.queued || 0)}${update}${madDb}`;
|
|
67
|
+
}
|
|
68
|
+
function isMadDbActive(capability) {
|
|
69
|
+
if (!capability || capability.enabled !== true || capability.consumed === true)
|
|
70
|
+
return false;
|
|
71
|
+
const expires = Date.parse(capability.expires_at || '');
|
|
72
|
+
return Number.isFinite(expires) && expires > Date.now();
|
|
73
|
+
}
|
|
40
74
|
export function buildZellijSlotColumnAnchorCommand(input) {
|
|
41
75
|
const args = [
|
|
42
76
|
input.cliPath,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
+
import { readZellijSlotTelemetrySnapshot } from './zellij-slot-telemetry.js';
|
|
3
4
|
export function renderZellijSlotPane(input) {
|
|
4
5
|
const mode = input.mode || 'compact-slots';
|
|
5
6
|
const maxLines = mode === 'compact-slots' ? 17 : mode === 'dashboard-plus-slots' ? 20 : 32;
|
|
@@ -30,6 +31,21 @@ export function renderZellijSlotPane(input) {
|
|
|
30
31
|
return frameSlotPane(`LIVE SLOT ${input.slotId}`, rows.slice(0, Math.max(1, maxLines - 2)));
|
|
31
32
|
}
|
|
32
33
|
export async function renderZellijSlotPaneFromArtifacts(input) {
|
|
34
|
+
if (input.missionId && input.missionId !== 'latest') {
|
|
35
|
+
const telemetry = await tryRenderTelemetrySlotPane({
|
|
36
|
+
artifactRoot: input.artifactRoot || input.artifactDir,
|
|
37
|
+
missionId: input.missionId,
|
|
38
|
+
slotId: input.slotId,
|
|
39
|
+
generationIndex: input.generationIndex
|
|
40
|
+
});
|
|
41
|
+
if (telemetry)
|
|
42
|
+
return telemetry;
|
|
43
|
+
return [
|
|
44
|
+
`${input.slotId} gen-${Math.max(1, Math.floor(Number(input.generationIndex) || 1))}`,
|
|
45
|
+
'waiting for telemetry...',
|
|
46
|
+
`mission ${input.missionId}`
|
|
47
|
+
].join('\n');
|
|
48
|
+
}
|
|
33
49
|
const artifactDir = path.resolve(input.artifactDir);
|
|
34
50
|
const result = await readJson(path.join(artifactDir, 'worker-result.json'));
|
|
35
51
|
const intake = await readJson(path.join(artifactDir, 'worker-intake.json'));
|
|
@@ -128,6 +144,7 @@ export function buildZellijSlotPaneCommand(input) {
|
|
|
128
144
|
'--slot', input.slotId,
|
|
129
145
|
'--generation', String(Math.max(1, Math.floor(Number(input.generationIndex) || 1))),
|
|
130
146
|
'--artifact-dir', input.artifactDir,
|
|
147
|
+
'--artifact-root', input.artifactRoot || input.artifactDir,
|
|
131
148
|
'--mode', input.mode || 'compact-slots',
|
|
132
149
|
...(input.backend ? ['--backend', input.backend] : []),
|
|
133
150
|
...(input.role ? ['--role', input.role] : []),
|
|
@@ -135,6 +152,46 @@ export function buildZellijSlotPaneCommand(input) {
|
|
|
135
152
|
];
|
|
136
153
|
return [input.nodePath || process.execPath, ...args].map(shellQuote).join(' ');
|
|
137
154
|
}
|
|
155
|
+
async function tryRenderTelemetrySlotPane(input) {
|
|
156
|
+
const snapshot = await readZellijSlotTelemetrySnapshot(path.resolve(input.artifactRoot), input.missionId).catch(() => null);
|
|
157
|
+
if (!snapshot || !Object.keys(snapshot.slots || {}).length)
|
|
158
|
+
return null;
|
|
159
|
+
const slot = findTelemetrySlot(snapshot, input.slotId, input.generationIndex);
|
|
160
|
+
if (!slot)
|
|
161
|
+
return null;
|
|
162
|
+
if (slot.status === 'failed') {
|
|
163
|
+
return [
|
|
164
|
+
`${slot.slot_id} gen-${slot.generation_index} · FAILED`,
|
|
165
|
+
`blocker: ${trimInline(slot.blockers[0] || 'worker_failed', 78)}`,
|
|
166
|
+
`artifact: ${trimInline(slot.artifact_paths[slot.artifact_paths.length - 1] || '-', 78)}`
|
|
167
|
+
].join('\n');
|
|
168
|
+
}
|
|
169
|
+
if (slot.status === 'completed' || slot.status === 'drained') {
|
|
170
|
+
return [
|
|
171
|
+
`${slot.slot_id} gen-${slot.generation_index} · done`,
|
|
172
|
+
`artifacts ${slot.artifact_paths.length} · ${slot.latest_event_type === 'verification_passed' ? 'verify passed' : 'verify queued'}`,
|
|
173
|
+
'closing in 3s'
|
|
174
|
+
].join('\n');
|
|
175
|
+
}
|
|
176
|
+
const backend = [slot.backend, slot.service_tier, slot.worktree_id].filter((value) => value && value !== 'unknown').join(' · ') || 'worker';
|
|
177
|
+
const heartbeat = slot.latest_ts ? `${Math.max(0, Math.round((Date.now() - Date.parse(slot.latest_ts)) / 1000))}s` : '?';
|
|
178
|
+
return [
|
|
179
|
+
`${slot.slot_id} gen-${slot.generation_index} · ${trimInline(slot.role || 'worker', 28)}`,
|
|
180
|
+
trimInline(backend, 78),
|
|
181
|
+
`${slot.status}: ${trimInline(slot.task_title || 'worker task', 68)}`,
|
|
182
|
+
`${formatTelemetryProgress(slot.progress)} · latest ${slot.latest_event_type} ${heartbeat}`,
|
|
183
|
+
`${slot.latest_event_type === 'patch_candidate' ? 'patch candidate' : 'patch'}: ${slot.latest_event_type === 'patch_candidate' ? 'queued' : trimInline(slot.current_file || '-', 42)}`
|
|
184
|
+
].join('\n');
|
|
185
|
+
}
|
|
186
|
+
function findTelemetrySlot(snapshot, slotId, generationIndex) {
|
|
187
|
+
const generation = Math.max(1, Math.floor(Number(generationIndex) || 1));
|
|
188
|
+
return Object.values(snapshot.slots || {}).find((row) => row.slot_id === slotId && Number(row.generation_index) === generation) || null;
|
|
189
|
+
}
|
|
190
|
+
function formatTelemetryProgress(progress) {
|
|
191
|
+
if (!progress)
|
|
192
|
+
return 'progress ?';
|
|
193
|
+
return `progress ${progress.done}/${progress.total}${progress.label ? ` ${trimInline(progress.label, 24)}` : ''}`;
|
|
194
|
+
}
|
|
138
195
|
async function readJson(file) {
|
|
139
196
|
try {
|
|
140
197
|
return JSON.parse(await fs.promises.readFile(file, 'utf8'));
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { appendJsonlBounded, ensureDir, nowIso, readJson, readText, writeJsonAtomic } from '../fsx.js';
|
|
3
|
+
export const ZELLIJ_SLOT_TELEMETRY_EVENT_SCHEMA = 'sks.zellij-slot-telemetry-event.v1';
|
|
4
|
+
export const ZELLIJ_SLOT_TELEMETRY_SNAPSHOT_SCHEMA = 'sks.zellij-slot-telemetry-snapshot.v1';
|
|
5
|
+
export function slotTelemetryEventPath(root, missionId) {
|
|
6
|
+
return path.join(inferMissionDir(root, missionId), 'zellij', 'slot-telemetry.events.jsonl');
|
|
7
|
+
}
|
|
8
|
+
export function slotTelemetrySnapshotPath(root, missionId) {
|
|
9
|
+
return path.join(inferMissionDir(root, missionId), 'zellij', 'slot-telemetry.snapshot.json');
|
|
10
|
+
}
|
|
11
|
+
export async function appendZellijSlotTelemetry(root, event) {
|
|
12
|
+
const missionId = String(event?.mission_id || '').trim();
|
|
13
|
+
if (!missionId)
|
|
14
|
+
throw new Error('mission_id required for Zellij slot telemetry');
|
|
15
|
+
const normalized = normalizeTelemetryEvent(event);
|
|
16
|
+
const file = slotTelemetryEventPath(root, missionId);
|
|
17
|
+
await ensureDir(path.dirname(file));
|
|
18
|
+
await appendJsonlBounded(file, normalized);
|
|
19
|
+
await rebuildZellijSlotTelemetrySnapshot(root, missionId);
|
|
20
|
+
}
|
|
21
|
+
export async function readZellijSlotTelemetrySnapshot(root, missionId) {
|
|
22
|
+
const existing = await readJson(slotTelemetrySnapshotPath(root, missionId), null);
|
|
23
|
+
if (existing?.schema === ZELLIJ_SLOT_TELEMETRY_SNAPSHOT_SCHEMA)
|
|
24
|
+
return existing;
|
|
25
|
+
return rebuildZellijSlotTelemetrySnapshot(root, missionId);
|
|
26
|
+
}
|
|
27
|
+
export async function rebuildZellijSlotTelemetrySnapshot(root, missionId) {
|
|
28
|
+
const eventsPath = slotTelemetryEventPath(root, missionId);
|
|
29
|
+
const rows = await readTelemetryEvents(eventsPath);
|
|
30
|
+
const slots = {};
|
|
31
|
+
for (const row of rows) {
|
|
32
|
+
if (row.mission_id !== missionId)
|
|
33
|
+
continue;
|
|
34
|
+
const key = slotTelemetryKey(row.slot_id || row.worker_id, row.generation_index);
|
|
35
|
+
const previous = slots[key];
|
|
36
|
+
slots[key] = mergeSlotTelemetry(previous, row);
|
|
37
|
+
}
|
|
38
|
+
const snapshot = {
|
|
39
|
+
schema: ZELLIJ_SLOT_TELEMETRY_SNAPSHOT_SCHEMA,
|
|
40
|
+
mission_id: missionId,
|
|
41
|
+
updated_at: nowIso(),
|
|
42
|
+
slots,
|
|
43
|
+
counts: countSlotTelemetry(slots)
|
|
44
|
+
};
|
|
45
|
+
await writeJsonAtomic(slotTelemetrySnapshotPath(root, missionId), snapshot);
|
|
46
|
+
return snapshot;
|
|
47
|
+
}
|
|
48
|
+
async function readTelemetryEvents(file) {
|
|
49
|
+
const text = await readText(file, '');
|
|
50
|
+
return String(text)
|
|
51
|
+
.split(/\r?\n/)
|
|
52
|
+
.map((line) => line.trim())
|
|
53
|
+
.filter(Boolean)
|
|
54
|
+
.map((line) => {
|
|
55
|
+
try {
|
|
56
|
+
return normalizeTelemetryEvent(JSON.parse(line));
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
})
|
|
62
|
+
.filter((row) => Boolean(row));
|
|
63
|
+
}
|
|
64
|
+
function normalizeTelemetryEvent(event) {
|
|
65
|
+
const status = normalizeStatus(event.status);
|
|
66
|
+
return {
|
|
67
|
+
schema: ZELLIJ_SLOT_TELEMETRY_EVENT_SCHEMA,
|
|
68
|
+
ts: event.ts || nowIso(),
|
|
69
|
+
mission_id: String(event.mission_id || ''),
|
|
70
|
+
slot_id: String(event.slot_id || event.worker_id || 'slot-001'),
|
|
71
|
+
generation_index: Math.max(1, Math.floor(Number(event.generation_index) || 1)),
|
|
72
|
+
worker_id: String(event.worker_id || event.slot_id || 'worker'),
|
|
73
|
+
event_type: normalizeEventType(event.event_type),
|
|
74
|
+
status,
|
|
75
|
+
...(event.role ? { role: String(event.role) } : {}),
|
|
76
|
+
...(event.backend ? { backend: String(event.backend) } : {}),
|
|
77
|
+
...(event.provider ? { provider: String(event.provider) } : {}),
|
|
78
|
+
...(event.service_tier ? { service_tier: String(event.service_tier) } : {}),
|
|
79
|
+
worktree_id: event.worktree_id == null ? null : String(event.worktree_id),
|
|
80
|
+
worktree_path: event.worktree_path == null ? null : String(event.worktree_path),
|
|
81
|
+
...(event.task_title ? { task_title: String(event.task_title) } : {}),
|
|
82
|
+
current_file: event.current_file == null ? null : String(event.current_file),
|
|
83
|
+
...(event.progress ? { progress: normalizeProgress(event.progress) } : {}),
|
|
84
|
+
...(Array.isArray(event.artifact_paths) ? { artifact_paths: event.artifact_paths.map(String).filter(Boolean) } : {}),
|
|
85
|
+
...(event.log_tail ? { log_tail: tail(event.log_tail, 1200) } : {}),
|
|
86
|
+
...(Array.isArray(event.blockers) ? { blockers: event.blockers.map(String).filter(Boolean) } : {})
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function mergeSlotTelemetry(previous, event) {
|
|
90
|
+
return {
|
|
91
|
+
slot_id: event.slot_id,
|
|
92
|
+
generation_index: event.generation_index,
|
|
93
|
+
worker_id: event.worker_id,
|
|
94
|
+
status: event.status,
|
|
95
|
+
role: event.role || previous?.role || 'worker',
|
|
96
|
+
backend: event.backend || previous?.backend || 'unknown',
|
|
97
|
+
provider: event.provider || previous?.provider || 'unknown',
|
|
98
|
+
service_tier: event.service_tier || previous?.service_tier || 'unknown',
|
|
99
|
+
worktree_id: event.worktree_id ?? previous?.worktree_id ?? null,
|
|
100
|
+
worktree_path: event.worktree_path ?? previous?.worktree_path ?? null,
|
|
101
|
+
task_title: event.task_title || previous?.task_title || 'waiting for task',
|
|
102
|
+
current_file: event.current_file ?? previous?.current_file ?? null,
|
|
103
|
+
latest_event_type: event.event_type,
|
|
104
|
+
latest_ts: event.ts,
|
|
105
|
+
progress: event.progress || previous?.progress || null,
|
|
106
|
+
artifact_paths: unique([...(previous?.artifact_paths || []), ...(event.artifact_paths || [])]),
|
|
107
|
+
blockers: unique([...(previous?.blockers || []), ...(event.blockers || [])]),
|
|
108
|
+
log_tail: event.log_tail || previous?.log_tail || ''
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function countSlotTelemetry(slots) {
|
|
112
|
+
const counts = { queued: 0, running: 0, verifying: 0, completed: 0, failed: 0, headless: 0 };
|
|
113
|
+
for (const row of Object.values(slots)) {
|
|
114
|
+
const status = normalizeStatus(row.status);
|
|
115
|
+
if (status === 'queued' || status === 'launching')
|
|
116
|
+
counts.queued += 1;
|
|
117
|
+
else if (status === 'running')
|
|
118
|
+
counts.running += 1;
|
|
119
|
+
else if (status === 'verifying')
|
|
120
|
+
counts.verifying += 1;
|
|
121
|
+
else if (status === 'completed' || status === 'drained')
|
|
122
|
+
counts.completed += 1;
|
|
123
|
+
else if (status === 'failed')
|
|
124
|
+
counts.failed += 1;
|
|
125
|
+
else if (status === 'headless')
|
|
126
|
+
counts.headless += 1;
|
|
127
|
+
}
|
|
128
|
+
return counts;
|
|
129
|
+
}
|
|
130
|
+
function normalizeStatus(value) {
|
|
131
|
+
const text = String(value || '').toLowerCase();
|
|
132
|
+
if (text === 'closed' || text === 'done' || text === 'passed')
|
|
133
|
+
return 'completed';
|
|
134
|
+
if (text === 'blocked' || text === 'error')
|
|
135
|
+
return 'failed';
|
|
136
|
+
if (text === 'coding')
|
|
137
|
+
return 'running';
|
|
138
|
+
if (['queued', 'launching', 'running', 'verifying', 'completed', 'failed', 'headless', 'drained'].includes(text))
|
|
139
|
+
return text;
|
|
140
|
+
return 'running';
|
|
141
|
+
}
|
|
142
|
+
function normalizeEventType(value) {
|
|
143
|
+
const text = String(value || '');
|
|
144
|
+
const allowed = new Set([
|
|
145
|
+
'slot_reserved', 'worker_spawned', 'heartbeat', 'task_started', 'task_progress',
|
|
146
|
+
'artifact_written', 'patch_candidate', 'verification_started', 'verification_passed',
|
|
147
|
+
'verification_failed', 'worker_completed', 'worker_failed', 'headless_overflow'
|
|
148
|
+
]);
|
|
149
|
+
return allowed.has(text) ? text : 'heartbeat';
|
|
150
|
+
}
|
|
151
|
+
function normalizeProgress(value) {
|
|
152
|
+
return {
|
|
153
|
+
done: Math.max(0, Math.floor(Number(value?.done) || 0)),
|
|
154
|
+
total: Math.max(0, Math.floor(Number(value?.total) || 0)),
|
|
155
|
+
label: String(value?.label || 'progress')
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
function unique(values) {
|
|
159
|
+
return [...new Set(values.map((value) => String(value || '').trim()).filter(Boolean))];
|
|
160
|
+
}
|
|
161
|
+
function slotTelemetryKey(slotId, generationIndex) {
|
|
162
|
+
const slot = String(slotId || 'slot-001').trim() || 'slot-001';
|
|
163
|
+
const generation = Math.max(1, Math.floor(Number(generationIndex) || 1));
|
|
164
|
+
return `${slot}:g${generation}`;
|
|
165
|
+
}
|
|
166
|
+
function tail(value, max) {
|
|
167
|
+
const text = String(value || '').replace(/\s+$/g, '');
|
|
168
|
+
return text.length > max ? text.slice(-max) : text;
|
|
169
|
+
}
|
|
170
|
+
function inferMissionDir(root, missionId) {
|
|
171
|
+
const resolved = path.resolve(root);
|
|
172
|
+
if (path.basename(resolved) === 'agents' && path.basename(path.dirname(resolved)) === missionId)
|
|
173
|
+
return path.dirname(resolved);
|
|
174
|
+
if (path.basename(resolved) === missionId && path.basename(path.dirname(resolved)) === 'missions')
|
|
175
|
+
return resolved;
|
|
176
|
+
const marker = `${path.sep}.sneakoscope${path.sep}missions${path.sep}${missionId}${path.sep}`;
|
|
177
|
+
const index = resolved.indexOf(marker);
|
|
178
|
+
if (index >= 0)
|
|
179
|
+
return resolved.slice(0, index + marker.length - 1);
|
|
180
|
+
return path.join(resolved, '.sneakoscope', 'missions', missionId);
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=zellij-slot-telemetry.js.map
|
|
@@ -6,15 +6,20 @@ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '.
|
|
|
6
6
|
const args = process.argv.slice(2);
|
|
7
7
|
const presetIndex = args.indexOf('--preset');
|
|
8
8
|
const preset = presetIndex >= 0 ? args[presetIndex + 1] : 'release';
|
|
9
|
+
const changedSinceIndex = args.indexOf('--changed-since');
|
|
10
|
+
const changedSince = changedSinceIndex >= 0 ? (args[changedSinceIndex + 1] || null) : null;
|
|
9
11
|
const result = await runReleaseGateDag({
|
|
10
12
|
root,
|
|
11
13
|
...(preset === undefined ? {} : { preset }),
|
|
14
|
+
changedSince,
|
|
15
|
+
full: args.includes('--full'),
|
|
12
16
|
explain: args.includes('--explain'),
|
|
13
17
|
noCache: args.includes('--no-cache'),
|
|
14
18
|
failFast: args.includes('--fail-fast')
|
|
15
19
|
});
|
|
16
20
|
console.log(`SKS Release DAG
|
|
17
21
|
gates: ${result.total_gates} total, ${result.selected_gates} selected, ${result.cached} cached
|
|
22
|
+
affected: ${result.affected_selection?.mode || 'full'} selected=${result.selected_gate_ids.length} skipped=${result.skipped_by_affected.length}
|
|
18
23
|
concurrency: ${result.budget_summary}
|
|
19
24
|
peak_running: ${result.peak_running}
|
|
20
25
|
completed: ${result.completed} pass, ${result.failed} fail
|