sneakoscope 4.8.6 → 5.1.2
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 +51 -726
- package/bench/tasks/t01-off-by-one/repo/package.json +9 -0
- package/bench/tasks/t01-off-by-one/repo/src/pagination.js +5 -0
- package/bench/tasks/t01-off-by-one/repo/test.js +5 -0
- package/bench/tasks/t01-off-by-one/task.json +13 -0
- package/bench/tasks/t02-signature-cochange/repo/package.json +9 -0
- package/bench/tasks/t02-signature-cochange/repo/src/admin.js +5 -0
- package/bench/tasks/t02-signature-cochange/repo/src/audit.js +5 -0
- package/bench/tasks/t02-signature-cochange/repo/src/labels.js +3 -0
- package/bench/tasks/t02-signature-cochange/repo/src/profile.js +5 -0
- package/bench/tasks/t02-signature-cochange/repo/test.js +9 -0
- package/bench/tasks/t02-signature-cochange/task.json +12 -0
- package/bench/tasks/t03-type-puzzle/repo/package.json +9 -0
- package/bench/tasks/t03-type-puzzle/repo/src/config.js +4 -0
- package/bench/tasks/t03-type-puzzle/repo/test.js +6 -0
- package/bench/tasks/t03-type-puzzle/task.json +13 -0
- package/bench/tasks/t04-refactor-preserve/repo/package.json +9 -0
- package/bench/tasks/t04-refactor-preserve/repo/src/cart.js +8 -0
- package/bench/tasks/t04-refactor-preserve/repo/test.js +4 -0
- package/bench/tasks/t04-refactor-preserve/task.json +12 -0
- package/bench/tasks/t05-performance/repo/package.json +9 -0
- package/bench/tasks/t05-performance/repo/src/pairs.js +9 -0
- package/bench/tasks/t05-performance/repo/test.js +11 -0
- package/bench/tasks/t05-performance/task.json +12 -0
- package/bench/tasks/t06-mistake-rule/repo/package.json +9 -0
- package/bench/tasks/t06-mistake-rule/repo/src/loader.js +6 -0
- package/bench/tasks/t06-mistake-rule/repo/test.js +7 -0
- package/bench/tasks/t06-mistake-rule/task.json +12 -0
- package/config/bench-baseline.json +7 -0
- 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/bin/install.js +35 -0
- package/dist/bin/sks.js +1 -1
- package/dist/cli/cli-theme.js +51 -0
- package/dist/cli/command-registry.js +75 -42
- package/dist/cli/help-fast.js +18 -8
- package/dist/cli/insane-search-command.js +36 -8
- package/dist/cli/install-helpers.js +147 -47
- package/dist/cli/router.js +58 -2
- package/dist/commands/codex-lb.js +6 -4
- package/dist/commands/doctor.js +146 -8
- package/dist/commands/proof.js +6 -3
- package/dist/commands/zellij-monitor-pane.js +25 -0
- package/dist/commands/zellij-slot-pane.js +39 -2
- package/dist/commands/zellij-viewport-pane.js +56 -0
- package/dist/commands/zellij.js +55 -2
- package/dist/config/skills-manifest.json +493 -0
- package/dist/core/agents/agent-conflict-graph.js +5 -0
- package/dist/core/agents/agent-lease.js +5 -0
- package/dist/core/agents/agent-ledger-schemas.js +1 -0
- package/dist/core/agents/agent-lifecycle.js +86 -35
- package/dist/core/agents/agent-orchestrator.js +287 -72
- package/dist/core/agents/agent-output-validator.js +14 -3
- package/dist/core/agents/agent-patch-queue-store.js +108 -4
- package/dist/core/agents/agent-patch-queue.js +10 -3
- package/dist/core/agents/agent-patch-schema.js +13 -0
- package/dist/core/agents/agent-proof-evidence.js +6 -1
- package/dist/core/agents/agent-runner-fake.js +40 -0
- package/dist/core/agents/agent-scheduler.js +2 -3
- package/dist/core/agents/agent-worker-pipeline.js +36 -2
- package/dist/core/agents/codex-exec-worker-adapter.js +2 -0
- package/dist/core/agents/native-cli-session-swarm.js +30 -13
- package/dist/core/agents/native-cli-worker.js +2 -1
- package/dist/core/agents/native-worker-backend-router.js +58 -1
- package/dist/core/auto-review.js +25 -4
- package/dist/core/codex/agent-config-file-repair.js +15 -2
- package/dist/core/codex/codex-config-eperm-repair.js +8 -2
- package/dist/core/codex/codex-config-guard.js +289 -0
- package/dist/core/codex/codex-config-toml.js +122 -0
- package/dist/core/codex/codex-project-config-policy.js +59 -7
- package/dist/core/codex-app/sks-menubar.js +780 -122
- package/dist/core/codex-app.js +1 -0
- package/dist/core/codex-control/codex-fake-sdk-adapter.js +6 -4
- package/dist/core/codex-control/codex-sdk-config-policy.js +2 -1
- package/dist/core/codex-control/codex-sdk-env-policy.js +1 -1
- package/dist/core/codex-control/codex-task-runner.js +32 -14
- package/dist/core/codex-control/python-codex-sdk-adapter.js +4 -1
- package/dist/core/codex-control/schemas/agent-worker-result.schema.js +12 -3
- package/dist/core/codex-hooks/codex-hook-managed-install.js +5 -0
- package/dist/core/codex-hooks/codex-hook-state-writer.js +70 -11
- package/dist/core/codex-hooks/codex-hook-trust-doctor.js +2 -2
- package/dist/core/codex-lb/codex-lb-env.js +20 -1
- package/dist/core/codex-lb/codex-lb-setup.js +2 -5
- package/dist/core/codex-native/skill-registry-ledger.js +24 -5
- package/dist/core/commands/basic-cli.js +21 -2
- package/dist/core/commands/check-command.js +37 -5
- package/dist/core/commands/command-utils.js +22 -2
- package/dist/core/commands/computer-use-command.js +62 -7
- package/dist/core/commands/db-command.js +31 -5
- package/dist/core/commands/fast-mode-command.js +39 -11
- package/dist/core/commands/gate-result-contract.js +43 -0
- package/dist/core/commands/gates-command.js +6 -1
- package/dist/core/commands/gc-command.js +29 -2
- package/dist/core/commands/goal-command.js +9 -2
- package/dist/core/commands/gx-command.js +79 -7
- package/dist/core/commands/image-ux-review-command.js +188 -13
- package/dist/core/commands/mad-db-command.js +85 -176
- package/dist/core/commands/mad-sks-command.js +248 -34
- package/dist/core/commands/menubar-command.js +146 -0
- package/dist/core/commands/naruto-command.js +64 -10
- package/dist/core/commands/pipeline-command.js +21 -2
- package/dist/core/commands/plan-command.js +76 -0
- package/dist/core/commands/ppt-command.js +159 -24
- package/dist/core/commands/qa-loop-command.js +6 -2
- package/dist/core/commands/release-command.js +55 -2
- package/dist/core/commands/research-command.js +1 -1
- package/dist/core/commands/review-command.js +217 -0
- package/dist/core/commands/route-command.js +62 -0
- package/dist/core/commands/route-success-helpers.js +59 -0
- package/dist/core/commands/run-command.js +19 -7
- package/dist/core/commands/seo-command.js +49 -1
- package/dist/core/commands/status-command.js +21 -1
- package/dist/core/commands/team-legacy-observe-command.js +221 -3
- package/dist/core/commands/ui-command.js +161 -0
- package/dist/core/commands/uninstall-command.js +312 -0
- package/dist/core/db-safety.js +7 -3
- package/dist/core/doctor/codex-startup-config-repair.js +14 -3
- package/dist/core/doctor/confirm-repair.js +27 -0
- package/dist/core/doctor/context7-mcp-repair.js +35 -7
- package/dist/core/doctor/doctor-codex-startup-repair.js +10 -3
- package/dist/core/doctor/doctor-context7-repair.js +17 -4
- package/dist/core/doctor/doctor-dirty-planner.js +27 -9
- package/dist/core/doctor/doctor-native-capability-repair.js +12 -2
- package/dist/core/doctor/doctor-readiness-matrix.js +27 -2
- package/dist/core/doctor/doctor-repair-postcheck.js +4 -0
- package/dist/core/doctor/doctor-transaction.js +21 -5
- package/dist/core/doctor/doctor-zellij-repair.js +1 -0
- package/dist/core/doctor/imagegen-repair.js +161 -0
- package/dist/core/doctor/supabase-mcp-repair.js +23 -5
- package/dist/core/feature-fixture-runner.js +2 -2
- package/dist/core/feature-fixtures.js +65 -37
- package/dist/core/feature-registry.js +106 -3
- package/dist/core/fsx.js +91 -2
- package/dist/core/hooks-runtime/skill-reconcile-preflight.js +43 -0
- package/dist/core/hooks-runtime.js +86 -46
- package/dist/core/image-ux-review/imagegen-adapter.js +48 -11
- package/dist/core/image-ux-review.js +16 -0
- package/dist/core/imagegen/imagegen-capability.js +11 -5
- package/dist/core/imagegen/require-imagegen.js +57 -0
- package/dist/core/init/skills.js +271 -14
- package/dist/core/init.js +13 -10
- package/dist/core/mad-db/mad-db-coordinator.js +96 -20
- package/dist/core/mad-db/mad-db-policy.js +12 -10
- package/dist/core/mad-sks/executors/executor-base.js +8 -2
- package/dist/core/mad-sks/executors/index.js +4 -0
- package/dist/core/mad-sks/executors/sql-plane-executor.js +194 -0
- package/dist/core/mission.js +138 -5
- package/dist/core/naruto/naruto-active-pool.js +84 -30
- package/dist/core/naruto/naruto-backpressure.js +5 -1
- package/dist/core/naruto/naruto-real-worker-child.js +10 -0
- package/dist/core/naruto/naruto-real-worker-runtime.js +9 -7
- package/dist/core/naruto/naruto-role-policy.js +3 -0
- package/dist/core/naruto/naruto-task-hints.js +10 -0
- package/dist/core/naruto/naruto-work-graph.js +8 -2
- package/dist/core/naruto/naruto-work-item.js +6 -0
- package/dist/core/naruto/resource-pressure-monitor.js +33 -15
- package/dist/core/naruto/solution-tournament.js +101 -0
- package/dist/core/permission-gates.js +30 -0
- package/dist/core/pipeline-internals/runtime-core.js +72 -222
- package/dist/core/pipeline-internals/runtime-gates.js +140 -24
- package/dist/core/ppt-review/index.js +6 -1
- package/dist/core/ppt-review/slide-imagegen-review.js +75 -10
- package/dist/core/ppt.js +70 -2
- package/dist/core/proof/auto-finalize.js +70 -11
- package/dist/core/proof/proof-schema.js +2 -0
- package/dist/core/proof/route-adapter.js +5 -1
- package/dist/core/proof/route-finalizer.js +8 -5
- package/dist/core/proof/selftest-proof-fixtures.js +18 -5
- package/dist/core/proof/validation.js +2 -0
- package/dist/core/provider/model-router.js +53 -0
- package/dist/core/questions.js +1 -1
- package/dist/core/recallpulse.js +1 -1
- package/dist/core/release/gate-manifest.js +2 -2
- package/dist/core/release/release-gate-affected-selector.js +3 -10
- package/dist/core/release/release-gate-batch-runner.js +4 -2
- package/dist/core/release/release-gate-cache-v2.js +27 -14
- package/dist/core/release/release-gate-dag.js +6 -1
- package/dist/core/release/release-gate-hermetic-env.js +10 -0
- package/dist/core/release/release-gate-node.js +3 -0
- package/dist/core/release/release-gate-resource-governor.js +1 -0
- package/dist/core/retention.js +89 -4
- package/dist/core/routes/constants.js +1 -1
- package/dist/core/routes/diagnostic-allowlist.js +55 -0
- package/dist/core/routes.js +83 -33
- package/dist/core/safety/mutation-guard.js +5 -1
- package/dist/core/skill-forge.js +9 -4
- package/dist/core/stop-gate/gate-evaluator.js +102 -0
- package/dist/core/stop-gate/stop-gate-check.js +26 -4
- package/dist/core/stop-gate/stop-gate-resolver.js +19 -3
- package/dist/core/stop-gate/stop-gate-writer.js +20 -1
- package/dist/core/team-dag.js +12 -465
- package/dist/core/team-dashboard-renderer.js +13 -94
- package/dist/core/team-live.js +68 -804
- package/dist/core/triwiki/agents-md-projector.js +184 -0
- package/dist/core/triwiki-wrongness/wrongness-schema.js +3 -1
- package/dist/core/trust-kernel/trust-kernel-schema.js +1 -0
- package/dist/core/trust-kernel/trust-report.js +1 -1
- package/dist/core/trust-kernel/trust-status.js +2 -0
- package/dist/core/ui/dashboard-html.js +111 -0
- package/dist/core/update/update-migration-state.js +383 -42
- package/dist/core/update-check.js +201 -78
- package/dist/core/verification/diff-quality.js +100 -0
- package/dist/core/verification/impact-scan.js +164 -0
- package/dist/core/verification/machine-feedback.js +146 -0
- package/dist/core/verification/mistake-rule-compiler.js +195 -0
- package/dist/core/version.js +1 -1
- package/dist/core/zellij/zellij-layout-builder.js +44 -16
- package/dist/core/zellij/zellij-monitor-renderer.js +53 -0
- package/dist/core/zellij/zellij-self-heal.js +27 -32
- package/dist/core/zellij/zellij-slot-pane-renderer.js +162 -153
- package/dist/core/zellij/zellij-slot-telemetry.js +2 -0
- package/dist/core/zellij/zellij-theme.js +67 -0
- package/dist/core/zellij/zellij-ui-mode.js +16 -0
- package/dist/core/zellij/zellij-viewport-binder.js +59 -0
- package/dist/core/zellij/zellij-worker-pane-manager.js +53 -5
- package/dist/scripts/agent-patch-swarm-gate-lib.js +2 -2
- package/dist/scripts/build-dist.js +8 -0
- package/dist/scripts/check-feature-quality.js +2 -2
- package/dist/scripts/cli-output-consistency-check.js +57 -0
- package/dist/scripts/codex-lb-fast-ui-preservation-check.js +106 -0
- package/dist/scripts/codex-lb-gpt55-fast-profile-check.js +105 -0
- package/dist/scripts/codex-lb-missing-env-regression.js +2 -3
- package/dist/scripts/codex-project-config-policy-merge-regression.js +3 -3
- package/dist/scripts/coding-bench-check.js +136 -0
- package/dist/scripts/concurrent-session-collision-check.js +67 -0
- package/dist/scripts/docs-truthfulness-check.js +1 -1
- package/dist/scripts/doctor-imagegen-repair-check.js +62 -0
- package/dist/scripts/ensure-bin-executable.js +11 -3
- package/dist/scripts/gate-policy-audit-check.js +130 -0
- package/dist/scripts/harness-benchmark-check.js +104 -0
- package/dist/scripts/hook-latency-budget-check.js +45 -0
- package/dist/scripts/legacy-update-e2e-check.js +228 -0
- package/dist/scripts/lib/codex-sdk-gate-lib.js +2 -2
- package/dist/scripts/lib/real-codex-parallel-gate.js +2 -2
- package/dist/scripts/loop-directive-check-lib.js +1 -1
- package/dist/scripts/mad-db-command-check.js +11 -8
- package/dist/scripts/mad-db-real-supabase-e2e.js +2 -2
- package/dist/scripts/mad-db-route-identity-check.js +8 -6
- package/dist/scripts/mad-db-safety-conflict-matrix-check.js +31 -8
- package/dist/scripts/mad-db-skill-policy-snapshot-check.js +4 -5
- package/dist/scripts/mad-sks-zellij-default-pane-worker-check.js +3 -2
- package/dist/scripts/mad-sks-zellij-launch-check.js +1 -1
- package/dist/scripts/naruto-zellij-dynamic-right-column-check.js +7 -7
- package/dist/scripts/parallel-claim-enforcement-check.js +14 -5
- package/dist/scripts/ppt-real-imagegen-wiring-check.js +5 -1
- package/dist/scripts/project-skill-dedupe-check.js +23 -5
- package/dist/scripts/proof-root-cause-policy-check.js +2 -0
- package/dist/scripts/release-affected-selector-check.js +2 -2
- package/dist/scripts/release-cache-glob-hashing-check.js +1 -0
- package/dist/scripts/release-dag-full-coverage-check.js +13 -4
- package/dist/scripts/release-gate-dag-runner-check.js +10 -2
- package/dist/scripts/release-gate-dag-runner.js +22 -0
- package/dist/scripts/release-gate-existence-audit.js +2 -1
- package/dist/scripts/release-gate-planner.js +2 -1
- package/dist/scripts/release-gate-script-parity-check.js +1 -1
- package/dist/scripts/release-metadata-1-19-check.js +2 -1
- package/dist/scripts/release-readiness-report.js +38 -7
- package/dist/scripts/release-stability-report-check.js +12 -8
- package/dist/scripts/search-visibility-gate-lib.js +2 -2
- package/dist/scripts/seo-geo-feature-fixture-quality-check.js +1 -1
- package/dist/scripts/skills-manifest-continuity-check.js +46 -0
- package/dist/scripts/sks-1-11-gate-lib.js +8 -6
- package/dist/scripts/sks-menubar-install-check.js +87 -21
- package/dist/scripts/sks-uninstall-regression-check.js +54 -0
- package/dist/scripts/uninstall-inventory-check.js +3 -0
- package/dist/scripts/ux-review-real-loop-fixture-check.js +9 -4
- package/dist/scripts/ux-review-run-wires-imagegen-check.js +4 -0
- package/dist/scripts/zellij-layout-valid-check.js +18 -11
- package/dist/scripts/zellij-right-column-geometry-proof.js +2 -4
- package/dist/scripts/zellij-slot-pane-renderer-check.js +9 -9
- package/dist/scripts/zellij-slot-pane-stale-detection-check.js +3 -4
- package/dist/scripts/zellij-slot-pane-telemetry-renderer-check.js +3 -2
- package/dist/scripts/zellij-slot-telemetry-renderer-check.js +4 -2
- package/dist/scripts/zellij-spawn-on-demand-layout-check.js +8 -2
- package/dist/scripts/zellij-viewport-binder-check.js +9 -0
- package/docs/assets/sneakoscope-architecture-pipeline.jpg +0 -0
- package/docs/demo.tape +28 -0
- package/package.json +70 -3
- package/schemas/codex/completion-proof.schema.json +3 -2
- package/schemas/release/release-gate-node.schema.json +2 -1
- package/dist/scripts/agent-backfill-route-blackbox.js +0 -5
- package/dist/scripts/agent-dynamic-pool-route-blackbox.js +0 -5
- package/dist/scripts/agent-parallel-write-blackbox.js +0 -56
- package/dist/scripts/agent-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/agent-route-blackbox-lib.js +0 -132
- package/dist/scripts/blackbox-command-import-smoke.js +0 -143
- package/dist/scripts/blackbox-global-shim.js +0 -77
- package/dist/scripts/blackbox-matrix.js +0 -70
- package/dist/scripts/blackbox-npx-one-shot.js +0 -69
- package/dist/scripts/blackbox-pack-install.js +0 -174
- package/dist/scripts/brand-neutrality-zero-leakage-blackbox.js +0 -4
- package/dist/scripts/build-once-runner-blackbox.js +0 -34
- package/dist/scripts/codex-0140-integration-blackbox.js +0 -13
- package/dist/scripts/codex-agent-type-blackbox.js +0 -4
- package/dist/scripts/codex-app-harness-blackbox.js +0 -4
- package/dist/scripts/codex-app-skill-agent-blackbox.js +0 -4
- package/dist/scripts/codex-hook-approval-blackbox.js +0 -4
- package/dist/scripts/codex-init-deep-directory-local-blackbox.js +0 -4
- package/dist/scripts/codex-native-feature-broker-blackbox.js +0 -4
- package/dist/scripts/codex-native-pattern-analysis-blackbox.js +0 -4
- package/dist/scripts/codex-native-read-repair-split-blackbox.js +0 -55
- package/dist/scripts/codex-native-reference-cache-blackbox.js +0 -41
- package/dist/scripts/core-skill-integrity-blackbox.js +0 -33
- package/dist/scripts/dfix-fast-blackbox-check.js +0 -37
- package/dist/scripts/dfix-parallel-write-blackbox.js +0 -48
- package/dist/scripts/dfix-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/doctor-context7-mcp-repair-blackbox.js +0 -16
- package/dist/scripts/doctor-dirty-repair-blackbox.js +0 -22
- package/dist/scripts/doctor-dirty-semantic-blackbox.js +0 -8
- package/dist/scripts/doctor-fix-production-blackbox.js +0 -26
- package/dist/scripts/doctor-native-capability-repair-blackbox.js +0 -39
- package/dist/scripts/doctor-startup-config-repair-blackbox.js +0 -13
- package/dist/scripts/doctor-supabase-mcp-repair-blackbox.js +0 -14
- package/dist/scripts/doctor-transaction-engine-blackbox.js +0 -28
- package/dist/scripts/doctor-zellij-fix-blackbox.js +0 -4
- package/dist/scripts/doctor-zellij-no-homebrew-blackbox.js +0 -4
- package/dist/scripts/doctor-zellij-upgrade-blackbox.js +0 -4
- package/dist/scripts/gate-pack-runner-blackbox.js +0 -27
- package/dist/scripts/gate-pack-v2-blackbox.js +0 -18
- package/dist/scripts/geo-cli-blackbox-check.js +0 -18
- package/dist/scripts/loop-collision-blackbox.js +0 -3
- package/dist/scripts/loop-concurrency-oversubscription-blackbox.js +0 -3
- package/dist/scripts/loop-fixture-production-misuse-blackbox.js +0 -3
- package/dist/scripts/loop-kill-interrupt-real-blackbox.js +0 -3
- package/dist/scripts/loop-merge-strategy-blackbox.js +0 -3
- package/dist/scripts/loop-mesh-production-e2e-blackbox.js +0 -3
- package/dist/scripts/loop-side-effect-blackbox.js +0 -3
- package/dist/scripts/mad-db-operation-lifecycle-blackbox.js +0 -29
- package/dist/scripts/mad-sks-actual-executor-blackbox.js +0 -5
- package/dist/scripts/mad-zellij-headless-fallback-blackbox.js +0 -4
- package/dist/scripts/mad-zellij-self-heal-blackbox.js +0 -4
- package/dist/scripts/naruto-loop-mesh-blackbox.js +0 -3
- package/dist/scripts/naruto-real-parallelism-blackbox.js +0 -307
- package/dist/scripts/naruto-worktree-coding-blackbox.js +0 -29
- package/dist/scripts/parallel-runtime-real-blackbox.js +0 -44
- package/dist/scripts/pipeline-codex-native-doctor-mad-routing-real-blackbox.js +0 -77
- package/dist/scripts/pipeline-codex-native-e2e-blackbox.js +0 -13
- package/dist/scripts/pipeline-codex-native-image-routing-real-blackbox.js +0 -50
- package/dist/scripts/pipeline-codex-native-loop-routing-real-blackbox.js +0 -74
- package/dist/scripts/pipeline-codex-native-qa-routing-real-blackbox.js +0 -51
- package/dist/scripts/pipeline-codex-native-research-routing-real-blackbox.js +0 -45
- package/dist/scripts/pipeline-execution-profile-routing-blackbox.js +0 -4
- package/dist/scripts/postinstall-global-doctor-blackbox.js +0 -12
- package/dist/scripts/ppt-full-e2e-blackbox-check.js +0 -109
- package/dist/scripts/ppt-imagegen-blackbox-check.js +0 -46
- package/dist/scripts/project-skill-dedupe-blackbox.js +0 -36
- package/dist/scripts/qa-backfill-route-blackbox.js +0 -5
- package/dist/scripts/qa-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/release-full-parallelism-blackbox.js +0 -41
- package/dist/scripts/release-triwiki-first-runner-blackbox.js +0 -48
- package/dist/scripts/release-wiring-3110-blackbox.js +0 -27
- package/dist/scripts/release-wiring-3112-blackbox.js +0 -17
- package/dist/scripts/release-wiring-3113-blackbox.js +0 -17
- package/dist/scripts/research-backfill-route-blackbox.js +0 -5
- package/dist/scripts/research-final-reviewer-blackbox.js +0 -70
- package/dist/scripts/research-stage-cycle-runtime-blackbox.js +0 -40
- package/dist/scripts/research-synthesis-writer-blackbox.js +0 -24
- package/dist/scripts/route-blackbox-realism-check.js +0 -21
- package/dist/scripts/scheduler-resource-claim-blackbox.js +0 -24
- package/dist/scripts/seo-cli-blackbox-check.js +0 -18
- package/dist/scripts/sks-3110-all-feature-regression-blackbox.js +0 -116
- package/dist/scripts/sks-3112-all-feature-regression-blackbox.js +0 -29
- package/dist/scripts/sks-3113-all-feature-regression-blackbox.js +0 -17
- package/dist/scripts/sks-400-all-feature-regression-blackbox.js +0 -21
- package/dist/scripts/sks-400-extreme-parallel-blackbox.js +0 -8
- package/dist/scripts/sks-400-five-minute-blackbox.js +0 -9
- package/dist/scripts/sks-400-legacy-purge-blackbox.js +0 -8
- package/dist/scripts/sks-401-all-feature-regression-blackbox.js +0 -46
- package/dist/scripts/sks-401-five-minute-actual-blackbox.js +0 -23
- package/dist/scripts/sks-402-all-feature-regression-blackbox.js +0 -9
- package/dist/scripts/sks-402-five-minute-real-blackbox.js +0 -22
- package/dist/scripts/sksd-warm-cache-blackbox.js +0 -12
- package/dist/scripts/supabase-secret-preservation-blackbox.js +0 -29
- 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/triwiki-affected-graph-blackbox.js +0 -28
- package/dist/scripts/triwiki-proof-bank-blackbox.js +0 -30
- package/dist/scripts/triwiki-proof-bank-lock-blackbox.js +0 -7
- package/dist/scripts/update-preserves-supabase-keys-blackbox.js +0 -27
- package/dist/scripts/ux-patch-swarm-route-blackbox.js +0 -10
- package/dist/scripts/ux-review-imagegen-blackbox-check.js +0 -67
- package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -28
- package/dist/scripts/zellij-pane-lock-concurrency-blackbox.js +0 -80
- package/dist/scripts/zellij-pane-lock-open-worker-integration-blackbox.js +0 -137
- package/dist/scripts/zellij-self-heal-typed-blackbox.js +0 -4
- package/dist/scripts/zellij-slot-telemetry-real-blackbox.js +0 -20
- package/dist/scripts/zellij-stacked-fallback-integration-blackbox.js +0 -81
- package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -202
package/dist/commands/doctor.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import os from 'node:os';
|
|
2
|
+
import path from 'node:path';
|
|
1
3
|
import { projectRoot, exists, formatBytes } from '../core/fsx.js';
|
|
2
4
|
import { flag } from '../cli/args.js';
|
|
3
5
|
import { printJson } from '../cli/output.js';
|
|
6
|
+
import { ui as cliUi } from '../cli/cli-theme.js';
|
|
4
7
|
import { getCodexInfo } from '../core/codex-adapter.js';
|
|
5
8
|
import { rustInfo } from '../core/rust-accelerator.js';
|
|
6
9
|
import { codexAppIntegrationStatus } from '../core/codex-app.js';
|
|
@@ -40,18 +43,33 @@ import { doctorRepairPostcheck } from '../core/doctor/doctor-repair-postcheck.js
|
|
|
40
43
|
import { withSecretPreservationGuard } from '../core/config/config-migration-journal.js';
|
|
41
44
|
import { writeProjectUpdateMigrationReceipt } from '../core/update/update-migration-state.js';
|
|
42
45
|
import { installSksMenuBar } from '../core/codex-app/sks-menubar.js';
|
|
46
|
+
import { sweepSksTempDirs } from '../core/retention.js';
|
|
47
|
+
import { reconcileSkills } from '../core/init/skills.js';
|
|
48
|
+
import { codexHookTrustDoctor } from '../core/codex-hooks/codex-hook-trust-doctor.js';
|
|
49
|
+
import { detectImagegenCapability } from '../core/imagegen/imagegen-capability.js';
|
|
50
|
+
import { repairCodexImagegen } from '../core/doctor/imagegen-repair.js';
|
|
43
51
|
export async function run(_command, args = []) {
|
|
44
52
|
const root = await projectRoot();
|
|
45
53
|
const doctorFix = flag(args, '--fix');
|
|
54
|
+
if (!flag(args, '--json')) {
|
|
55
|
+
cliUi.banner('doctor');
|
|
56
|
+
cliUi.step(doctorFix ? 'repairing and validating' : 'validating');
|
|
57
|
+
}
|
|
46
58
|
if (doctorFix)
|
|
47
59
|
return withSecretPreservationGuard(root, 'doctor-fix', () => runDoctor(args, root, doctorFix));
|
|
48
60
|
return runDoctor(args, root, doctorFix);
|
|
49
61
|
}
|
|
50
62
|
async function runDoctor(args = [], root, doctorFix) {
|
|
51
63
|
const startedAtMs = Date.now();
|
|
64
|
+
const sksTempSweep = doctorFix ? await sweepSksTempDirs(root, { maxAgeHours: 24 }).catch((err) => ({
|
|
65
|
+
ok: false,
|
|
66
|
+
error: err?.message || String(err),
|
|
67
|
+
actions: []
|
|
68
|
+
})) : { ok: true, skipped: true, reason: 'doctor_without_fix', actions: [] };
|
|
52
69
|
const doctorProfile = doctorProfileFromArgs(args, doctorFix);
|
|
53
70
|
const machineOnly = flag(args, '--machine-only');
|
|
54
71
|
const reportFile = readOption(args, '--report-file', null);
|
|
72
|
+
const argWarnings = doctorArgWarnings(args);
|
|
55
73
|
const deepDiagnostics = doctorProfile === 'full' || doctorProfile === 'capabilities';
|
|
56
74
|
const codexBin = readOption(args, '--codex-bin', process.env.SKS_DOCTOR_CODEX_BIN || '');
|
|
57
75
|
const actualCodexProbeRequested = flag(args, '--actual-codex') || flag(args, '--require-actual-codex') || Boolean(codexBin);
|
|
@@ -99,6 +117,20 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
99
117
|
: deepDiagnostics ? await ensureGlobalCodexFastModeDuringInstall().catch((err) => ({ status: 'failed', error: err?.message || String(err) })) : { status: 'skipped', reason: 'default_doctor_no_global_fast_mode_regeneration' }
|
|
100
118
|
};
|
|
101
119
|
}
|
|
120
|
+
const skillsReconcile = doctorFix
|
|
121
|
+
? {
|
|
122
|
+
global: await reconcileSkills({
|
|
123
|
+
targetDir: path.join(os.homedir(), '.agents', 'skills'),
|
|
124
|
+
scope: 'global',
|
|
125
|
+
fix: true
|
|
126
|
+
}).catch((err) => ({ ok: false, error: err?.message || String(err) })),
|
|
127
|
+
project: await reconcileSkills({
|
|
128
|
+
targetDir: path.join(root, '.agents', 'skills'),
|
|
129
|
+
scope: 'project',
|
|
130
|
+
fix: true
|
|
131
|
+
}).catch((err) => ({ ok: false, error: err?.message || String(err) }))
|
|
132
|
+
}
|
|
133
|
+
: { skipped: true, reason: 'doctor_without_fix' };
|
|
102
134
|
const commandAliasCleanup = await runDoctorCommandAliasCleanup({
|
|
103
135
|
root,
|
|
104
136
|
fix: doctorFix
|
|
@@ -278,7 +310,8 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
278
310
|
const sksMenuBar = await installSksMenuBar({
|
|
279
311
|
root,
|
|
280
312
|
apply: doctorFix,
|
|
281
|
-
launch: doctorFix
|
|
313
|
+
launch: doctorFix,
|
|
314
|
+
quiet: machineOnly || flag(args, '--json')
|
|
282
315
|
}).catch((err) => ({
|
|
283
316
|
schema: 'sks.codex-app-sks-menubar.v1',
|
|
284
317
|
ok: false,
|
|
@@ -289,10 +322,18 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
289
322
|
executable_path: null,
|
|
290
323
|
launch_agent_path: null,
|
|
291
324
|
action_script_path: null,
|
|
325
|
+
build_stamp_path: null,
|
|
292
326
|
report_path: `${root}/.sneakoscope/reports/sks-menubar.json`,
|
|
293
327
|
menu_items: [],
|
|
294
328
|
actions: [],
|
|
295
329
|
launch: { requested: doctorFix, method: 'none', ok: false, error: err?.message || String(err) },
|
|
330
|
+
tcc_automation_status: 'unknown',
|
|
331
|
+
next_actions: [
|
|
332
|
+
'Run: sks menubar status',
|
|
333
|
+
'Run: sks menubar install',
|
|
334
|
+
'Run: sks menubar restart',
|
|
335
|
+
'Rotate CODEX_LB_API_KEY and OPENROUTER_API_KEY if they were previously exposed in launchd.'
|
|
336
|
+
],
|
|
296
337
|
blockers: [err?.message || String(err)],
|
|
297
338
|
warnings: []
|
|
298
339
|
}));
|
|
@@ -383,10 +424,22 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
383
424
|
raw_secret_values_recorded: false
|
|
384
425
|
}))
|
|
385
426
|
: null;
|
|
427
|
+
const hookTrustRepair = doctorFix && doctorPhaseIds.includes('hook_trust_repair')
|
|
428
|
+
? await codexHookTrustDoctor(root, { fix: true, managed: true, actual: true }).catch((err) => ({
|
|
429
|
+
schema: 'sks.codex-hook-trust-doctor.v2',
|
|
430
|
+
ok: false,
|
|
431
|
+
actual: true,
|
|
432
|
+
blockers: [`hook_trust_repair_failed:${err?.message || String(err)}`],
|
|
433
|
+
warnings: [],
|
|
434
|
+
repair_actions: ['sks codex trust-doctor --fix --managed --actual']
|
|
435
|
+
}))
|
|
436
|
+
: null;
|
|
386
437
|
const doctorFixTransaction = doctorFix
|
|
387
438
|
? await runDoctorFixTransaction({
|
|
388
439
|
root,
|
|
389
440
|
dirtyPlan: doctorDirtyPlan,
|
|
441
|
+
json: flag(args, '--json'),
|
|
442
|
+
machineOnly,
|
|
390
443
|
phases: [
|
|
391
444
|
{
|
|
392
445
|
id: 'setup',
|
|
@@ -456,6 +509,17 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
456
509
|
rollback_evidence: 'optional_supabase_no_ready_mutation_required'
|
|
457
510
|
})
|
|
458
511
|
},
|
|
512
|
+
{
|
|
513
|
+
id: 'hook_trust_repair',
|
|
514
|
+
run: async () => ({
|
|
515
|
+
id: 'hook_trust_repair',
|
|
516
|
+
ok: hookTrustRepair?.ok !== false,
|
|
517
|
+
repaired: doctorFix,
|
|
518
|
+
blockers: hookTrustRepair?.blockers || [],
|
|
519
|
+
warnings: hookTrustRepair?.warnings || [],
|
|
520
|
+
rollback_evidence: hookTrustRepair?.fixed?.managed_hook_file || 'codex_hook_trust_repair_idempotent'
|
|
521
|
+
})
|
|
522
|
+
},
|
|
459
523
|
{
|
|
460
524
|
id: 'sks_menubar',
|
|
461
525
|
required_for_ready: false,
|
|
@@ -540,10 +604,29 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
540
604
|
const globalSksInstallCleanup = flag(args, '--fix') && !flag(args, '--local-only')
|
|
541
605
|
? await cleanDuplicateGlobalSksInstalls({ root, fix: true }).catch((err) => ({ schema: 'sks.global-sks-install-cleanup.v1', ok: false, fix: true, error: err?.message || String(err), blockers: ['global_sks_install_cleanup_exception'] }))
|
|
542
606
|
: null;
|
|
543
|
-
const
|
|
544
|
-
const
|
|
545
|
-
?
|
|
546
|
-
|
|
607
|
+
const imagegen = await detectImagegenCapability({ codexBin: codexBin || undefined }).catch((err) => ({ ok: false, error: err.message, auth_readiness: null, core_ready: false, blockers: ['imagegen_detection_exception'] }));
|
|
608
|
+
const imagegenRepair = imagegen.core_ready === true
|
|
609
|
+
? {
|
|
610
|
+
schema: 'sks.doctor-imagegen-repair.v1',
|
|
611
|
+
ok: true,
|
|
612
|
+
attempted: false,
|
|
613
|
+
apply: doctorFix,
|
|
614
|
+
recovered: true,
|
|
615
|
+
before: imagegen,
|
|
616
|
+
after: imagegen,
|
|
617
|
+
steps: [],
|
|
618
|
+
blockers: [],
|
|
619
|
+
manual_actions: []
|
|
620
|
+
}
|
|
621
|
+
: await repairCodexImagegen({ root, apply: doctorFix, codexBin: codexBin || null }).catch((err) => ({
|
|
622
|
+
schema: 'sks.doctor-imagegen-repair.v1',
|
|
623
|
+
ok: false,
|
|
624
|
+
attempted: true,
|
|
625
|
+
apply: doctorFix,
|
|
626
|
+
recovered: false,
|
|
627
|
+
blockers: [err?.message || String(err)],
|
|
628
|
+
manual_actions: ['Run `sks doctor --fix --json` after enabling Codex App image_generation.']
|
|
629
|
+
}));
|
|
547
630
|
const codex0138Capability = deepDiagnostics
|
|
548
631
|
? await writeCodex0138CapabilityArtifacts(root, { codexBin: codexBin || null }).catch((err) => ({ error: err?.message || String(err), report: null }))
|
|
549
632
|
: { skipped: true, report: null };
|
|
@@ -687,8 +770,9 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
687
770
|
const result = {
|
|
688
771
|
schema: 'sks.doctor-status.v2',
|
|
689
772
|
elapsed_ms: Date.now() - startedAtMs,
|
|
690
|
-
ok: ready.ready && (!sksUpdate || sksUpdate.ok !== false) && commandAliasCleanup.ok !== false && codexStartupRepair.ok !== false
|
|
773
|
+
ok: ready.ready && (!sksUpdate || sksUpdate.ok !== false) && commandAliasCleanup.ok !== false && codexStartupRepair.ok !== false,
|
|
691
774
|
root,
|
|
775
|
+
arg_warnings: argWarnings,
|
|
692
776
|
node: { ok: Number(process.versions.node.split('.')[0]) >= 20, version: process.version },
|
|
693
777
|
codex,
|
|
694
778
|
codex_config: codexConfig,
|
|
@@ -712,16 +796,30 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
712
796
|
supabase_mcp_repair: supabaseMcpRepair,
|
|
713
797
|
doctor_fix_transaction: doctorFixTransaction,
|
|
714
798
|
doctor_fix_postcheck: doctorFixPostcheck,
|
|
799
|
+
postcheck: doctorFixPostcheck ? {
|
|
800
|
+
ok: doctorFixPostcheck.ok === true,
|
|
801
|
+
pending_manual: doctorFixPostcheck.pending_manual || [],
|
|
802
|
+
required_blockers: doctorFixPostcheck.required_blockers || [],
|
|
803
|
+
optional_warnings: doctorFixPostcheck.optional_warnings || []
|
|
804
|
+
} : null,
|
|
715
805
|
local_model: localModel,
|
|
716
806
|
agent_role_config: agentRoleConfigRepair,
|
|
717
807
|
zellij_readiness: zellijReadiness,
|
|
718
808
|
codex_permission_profiles: permissionProfiles,
|
|
719
809
|
command_aliases: commandAliasCleanup,
|
|
810
|
+
sks_temp_sweep: {
|
|
811
|
+
ok: sksTempSweep.ok !== false,
|
|
812
|
+
skipped: sksTempSweep.skipped === true,
|
|
813
|
+
action_count: Array.isArray(sksTempSweep.actions) ? sksTempSweep.actions.length : 0,
|
|
814
|
+
reason: sksTempSweep.reason || null,
|
|
815
|
+
error: sksTempSweep.error || null
|
|
816
|
+
},
|
|
720
817
|
imagegen: {
|
|
721
818
|
ok: imagegen.auth_readiness?.available_paths?.length > 0,
|
|
722
819
|
auth_readiness: imagegen.auth_readiness || null,
|
|
723
820
|
codex_app_builtin_available: imagegen.codex_app?.available === true
|
|
724
821
|
},
|
|
822
|
+
imagegen_repair: imagegenRepair,
|
|
725
823
|
codex_0138: {
|
|
726
824
|
capability: codex0138Capability.report || null,
|
|
727
825
|
doctor: codex0138Doctor,
|
|
@@ -735,7 +833,8 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
735
833
|
ready,
|
|
736
834
|
sneakoscope: { ok: await exists(`${root}/.sneakoscope`) },
|
|
737
835
|
package: { bytes: pkgBytes, human: formatBytes(pkgBytes) },
|
|
738
|
-
|
|
836
|
+
skills: skillsReconcile,
|
|
837
|
+
repair: { sks_update: sksUpdate, setup: setupRepair, codex_config: configRepair, migration_journal: migrationJournal, global_sks_installs: globalSksInstallCleanup, agent_role_config: agentRoleConfigRepair, zellij: zellijRepair, context7: context7Repair, codex_startup: codexStartupRepair, startup_config: startupConfigRepair, context7_mcp: context7McpRepair, supabase_mcp: supabaseMcpRepair, imagegen: imagegenRepair, hook_trust: hookTrustRepair, sks_menubar: sksMenuBar, doctor_transaction: doctorFixTransaction, doctor_dirty_plan: doctorDirtyPlan, doctor_postcheck: doctorFixPostcheck, codex_native: codexNativeRepair, doctor_native_capability: doctorNativeCapabilityRepair, command_aliases: commandAliasCleanup, skills: skillsReconcile, sks_temp_sweep: sksTempSweep }
|
|
739
838
|
};
|
|
740
839
|
if (reportFile)
|
|
741
840
|
await writeJsonReportFile(reportFile, result);
|
|
@@ -751,6 +850,8 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
751
850
|
return;
|
|
752
851
|
}
|
|
753
852
|
console.log('SKS Doctor');
|
|
853
|
+
for (const warning of argWarnings)
|
|
854
|
+
console.log(`Argument warning: ${warning}`);
|
|
754
855
|
console.log(`Root: ${root}`);
|
|
755
856
|
console.log(`Node: ${result.node.ok ? 'ok' : 'fail'} ${result.node.version}`);
|
|
756
857
|
console.log(`Codex: ${codex.bin ? 'ok' : 'missing'} ${codex.version || ''}`);
|
|
@@ -879,6 +980,9 @@ async function runDoctor(args = [], root, doctorFix) {
|
|
|
879
980
|
console.log(` - ${action}`);
|
|
880
981
|
}
|
|
881
982
|
}
|
|
983
|
+
console.log(`Image Gen repair: ${imagegenRepair.recovered ? 'ok' : imagegenRepair.attempted ? 'blocked' : 'not-needed'}`);
|
|
984
|
+
for (const action of imagegenRepair.manual_actions || [])
|
|
985
|
+
console.log(` - ${action}`);
|
|
882
986
|
const codex0138 = codex0138Capability.report || {};
|
|
883
987
|
console.log('Codex current compatibility:');
|
|
884
988
|
console.log(` target: rust-v0.142.0`);
|
|
@@ -1017,7 +1121,7 @@ function fallbackCodexNativeFeatureMatrix(codex, blockers = [], warnings = []) {
|
|
|
1017
1121
|
warnings
|
|
1018
1122
|
};
|
|
1019
1123
|
}
|
|
1020
|
-
function doctorProfileFromArgs(args = [], doctorFix = false) {
|
|
1124
|
+
export function doctorProfileFromArgs(args = [], doctorFix = false) {
|
|
1021
1125
|
const explicit = readOption(args, '--profile', null);
|
|
1022
1126
|
if (explicit === 'migration' || explicit === 'full' || explicit === 'capabilities' || explicit === 'fast' || explicit === 'fix')
|
|
1023
1127
|
return explicit;
|
|
@@ -1027,12 +1131,46 @@ function doctorProfileFromArgs(args = [], doctorFix = false) {
|
|
|
1027
1131
|
return 'capabilities';
|
|
1028
1132
|
return doctorFix ? 'fix' : 'fast';
|
|
1029
1133
|
}
|
|
1134
|
+
export function doctorArgWarnings(args = []) {
|
|
1135
|
+
const warnings = [];
|
|
1136
|
+
const explicit = readOption(args, '--profile', null);
|
|
1137
|
+
if (explicit && !['migration', 'full', 'capabilities', 'fast', 'fix'].includes(String(explicit))) {
|
|
1138
|
+
warnings.push(`unknown_profile:${explicit}; supported profiles: migration, full, capabilities, fast, fix`);
|
|
1139
|
+
}
|
|
1140
|
+
for (const flag of unknownDoctorFlags(args))
|
|
1141
|
+
warnings.push(`unknown_flag:${flag}`);
|
|
1142
|
+
return warnings;
|
|
1143
|
+
}
|
|
1144
|
+
function unknownDoctorFlags(args = []) {
|
|
1145
|
+
const knownBoolean = new Set([
|
|
1146
|
+
'--fix', '--yes', '-y', '--machine-only', '--actual-codex', '--require-actual-codex',
|
|
1147
|
+
'--full', '--capabilities', '--repair-codex-app-ui', '--repair-zellij', '--install-homebrew',
|
|
1148
|
+
'--repair-native-capabilities', '--repair-codex-native', '--local-only', '--project', '--global',
|
|
1149
|
+
'--dry-run', '--json'
|
|
1150
|
+
]);
|
|
1151
|
+
const knownValue = new Set(['--profile', '--report-file', '--codex-bin', '--install-scope']);
|
|
1152
|
+
const unknown = [];
|
|
1153
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
1154
|
+
const arg = String(args[index] || '');
|
|
1155
|
+
if (!arg.startsWith('-'))
|
|
1156
|
+
continue;
|
|
1157
|
+
if (knownValue.has(arg)) {
|
|
1158
|
+
index += 1;
|
|
1159
|
+
continue;
|
|
1160
|
+
}
|
|
1161
|
+
if (knownBoolean.has(arg))
|
|
1162
|
+
continue;
|
|
1163
|
+
unknown.push(arg);
|
|
1164
|
+
}
|
|
1165
|
+
return unknown;
|
|
1166
|
+
}
|
|
1030
1167
|
function doctorPhaseIdsForProfile(profile) {
|
|
1031
1168
|
const required = [
|
|
1032
1169
|
'codex_startup_repair',
|
|
1033
1170
|
'startup_config_repair',
|
|
1034
1171
|
'context7_repair',
|
|
1035
1172
|
'context7_mcp_repair',
|
|
1173
|
+
'hook_trust_repair',
|
|
1036
1174
|
'command_alias_cleanup'
|
|
1037
1175
|
];
|
|
1038
1176
|
if (profile === 'migration')
|
package/dist/commands/proof.js
CHANGED
|
@@ -99,6 +99,7 @@ export async function run(_command, args = []) {
|
|
|
99
99
|
const result = await writeRouteCompletionProof(root, {
|
|
100
100
|
missionId,
|
|
101
101
|
route: '$SKS',
|
|
102
|
+
executionClass: 'real',
|
|
102
103
|
status: 'verified_partial',
|
|
103
104
|
evidence,
|
|
104
105
|
summary: {
|
|
@@ -119,8 +120,9 @@ export async function run(_command, args = []) {
|
|
|
119
120
|
if (action === 'smoke') {
|
|
120
121
|
const evidence = await collectProofEvidence(root);
|
|
121
122
|
const result = await writeCompletionProof(root, {
|
|
123
|
+
execution_class: 'mock_fixture',
|
|
122
124
|
route: '$SKS',
|
|
123
|
-
status: '
|
|
125
|
+
status: 'mock_only',
|
|
124
126
|
summary: {
|
|
125
127
|
files_changed: evidence.files?.length || 0,
|
|
126
128
|
commands_run: 1,
|
|
@@ -130,8 +132,9 @@ export async function run(_command, args = []) {
|
|
|
130
132
|
},
|
|
131
133
|
evidence,
|
|
132
134
|
claims: [{ id: 'proof-smoke', status: 'supported', evidence: '.sneakoscope/proof/latest.json' }],
|
|
133
|
-
unverified: ['Smoke proof is fixture evidence, not a real route completion.']
|
|
134
|
-
|
|
135
|
+
unverified: ['Smoke proof is fixture evidence, not a real route completion.'],
|
|
136
|
+
blockers: ['proof_smoke_fixture_cannot_claim_real_completion']
|
|
137
|
+
}, { command: { cmd: 'sks proof smoke', status: 'mock_only' } });
|
|
135
138
|
if (flag(args, '--json'))
|
|
136
139
|
return printJson(result);
|
|
137
140
|
console.log(`Completion proof written: ${result.files.latest_json}`);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { readZellijSlotTelemetrySnapshot } from '../core/zellij/zellij-slot-telemetry.js';
|
|
2
|
+
import { renderZellijMonitor } from '../core/zellij/zellij-monitor-renderer.js';
|
|
3
|
+
import { projectRoot } from '../core/fsx.js';
|
|
4
|
+
export async function run(_cmd = 'zellij-monitor-pane', args = []) {
|
|
5
|
+
const mission = readOption(args, '--mission', 'latest') || 'latest';
|
|
6
|
+
const root = await projectRoot();
|
|
7
|
+
const intervalMs = Math.max(500, Number(readOption(args, '--interval-ms', String(process.env.SKS_ZELLIJ_REFRESH_MS || '1000')) || 1000));
|
|
8
|
+
const once = !flag(args, '--watch');
|
|
9
|
+
for (;;) {
|
|
10
|
+
const snapshot = await readZellijSlotTelemetrySnapshot(root, mission).catch(() => null);
|
|
11
|
+
const text = renderZellijMonitor({ snapshot, missionId: mission, root });
|
|
12
|
+
process.stdout.write(`\x1b[H${text}\n\x1b[0J`);
|
|
13
|
+
if (once)
|
|
14
|
+
return;
|
|
15
|
+
await new Promise((resolve) => setTimeout(resolve, intervalMs));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
function readOption(args, name, fallback) {
|
|
19
|
+
const index = args.indexOf(name);
|
|
20
|
+
return index >= 0 && args[index + 1] ? String(args[index + 1]) : fallback;
|
|
21
|
+
}
|
|
22
|
+
function flag(args, name) {
|
|
23
|
+
return args.includes(name);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=zellij-monitor-pane.js.map
|
|
@@ -7,6 +7,14 @@ export async function run(_command = 'zellij-slot-pane', args = []) {
|
|
|
7
7
|
const generationIndex = Number(readOption(args, '--generation', '1') || 1);
|
|
8
8
|
const backend = readOption(args, '--backend', null);
|
|
9
9
|
const role = readOption(args, '--role', null);
|
|
10
|
+
const envDefaults = {
|
|
11
|
+
provider: process.env.SKS_SLOT_PROVIDER || null,
|
|
12
|
+
model: process.env.SKS_SLOT_MODEL || null,
|
|
13
|
+
serviceTier: process.env.SKS_SLOT_TIER || null,
|
|
14
|
+
reasoningEffort: process.env.SKS_SLOT_REASONING || null,
|
|
15
|
+
currentTask: process.env.SKS_SLOT_TASK || null,
|
|
16
|
+
role: process.env.SKS_SLOT_ROLE || role
|
|
17
|
+
};
|
|
10
18
|
const mode = readOption(args, '--mode', 'compact-slots');
|
|
11
19
|
const watch = hasFlag(args, '--watch');
|
|
12
20
|
const json = hasFlag(args, '--json');
|
|
@@ -16,8 +24,32 @@ export async function run(_command = 'zellij-slot-pane', args = []) {
|
|
|
16
24
|
console.log(JSON.stringify(status, null, 2));
|
|
17
25
|
return;
|
|
18
26
|
}
|
|
27
|
+
let staleTicks = 0;
|
|
19
28
|
for (;;) {
|
|
20
|
-
|
|
29
|
+
let text = '';
|
|
30
|
+
let heartbeatAgeMs = null;
|
|
31
|
+
try {
|
|
32
|
+
text = await renderZellijSlotPaneFromArtifacts({
|
|
33
|
+
artifactDir,
|
|
34
|
+
artifactRoot,
|
|
35
|
+
missionId,
|
|
36
|
+
slotId,
|
|
37
|
+
generationIndex,
|
|
38
|
+
backend,
|
|
39
|
+
role: envDefaults.role,
|
|
40
|
+
provider: envDefaults.provider,
|
|
41
|
+
model: envDefaults.model,
|
|
42
|
+
serviceTier: envDefaults.serviceTier,
|
|
43
|
+
reasoningEffort: envDefaults.reasoningEffort,
|
|
44
|
+
currentTask: envDefaults.currentTask,
|
|
45
|
+
mode
|
|
46
|
+
});
|
|
47
|
+
const status = await renderZellijSlotPaneStatusFromArtifacts({ artifactDir, artifactRoot, missionId, slotId, generationIndex }).catch(() => null);
|
|
48
|
+
heartbeatAgeMs = Number.isFinite(Number(status?.telemetry_age_ms)) ? Number(status?.telemetry_age_ms) : null;
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
text = `render error: ${err?.message || String(err)}`;
|
|
52
|
+
}
|
|
21
53
|
process.stdout.write(redrawFrame(text));
|
|
22
54
|
if (!watch)
|
|
23
55
|
break;
|
|
@@ -27,10 +59,15 @@ export async function run(_command = 'zellij-slot-pane', args = []) {
|
|
|
27
59
|
const shouldExit = await resolveZellijSlotPaneExit({ artifactDir, artifactRoot, missionId, slotId, generationIndex }).catch(() => false);
|
|
28
60
|
if (shouldExit) {
|
|
29
61
|
await new Promise((resolve) => setTimeout(resolve, 5000));
|
|
30
|
-
const finalText = await renderZellijSlotPaneFromArtifacts({ artifactDir, artifactRoot, missionId, slotId, generationIndex, backend, role, mode });
|
|
62
|
+
const finalText = await renderZellijSlotPaneFromArtifacts({ artifactDir, artifactRoot, missionId, slotId, generationIndex, backend, role: envDefaults.role, provider: envDefaults.provider, model: envDefaults.model, serviceTier: envDefaults.serviceTier, reasoningEffort: envDefaults.reasoningEffort, currentTask: envDefaults.currentTask, mode });
|
|
31
63
|
process.stdout.write(redrawFrame(finalText));
|
|
32
64
|
return;
|
|
33
65
|
}
|
|
66
|
+
staleTicks = heartbeatAgeMs != null && heartbeatAgeMs > 5 * 60 * 1000 ? staleTicks + 1 : 0;
|
|
67
|
+
if (staleTicks >= 5) {
|
|
68
|
+
process.stdout.write(redrawFrame(`${text}\n⏱ worker heartbeat lost >5m - pane closing (sks pipeline status 로 확인)`));
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
34
71
|
await new Promise((resolve) => setTimeout(resolve, intervalMs));
|
|
35
72
|
}
|
|
36
73
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { flag, readOption } from '../cli/args.js';
|
|
3
|
+
import { projectRoot, readJson } from '../core/fsx.js';
|
|
4
|
+
import { readZellijSlotTelemetrySnapshot } from '../core/zellij/zellij-slot-telemetry.js';
|
|
5
|
+
import { bindViewports } from '../core/zellij/zellij-viewport-binder.js';
|
|
6
|
+
import { renderZellijSlotPaneFromArtifacts } from '../core/zellij/zellij-slot-pane-renderer.js';
|
|
7
|
+
import { ANSI_CODES, paint, resolveZellijTheme } from '../core/zellij/zellij-theme.js';
|
|
8
|
+
let previousBindings = [];
|
|
9
|
+
export async function run(_cmd = 'zellij-viewport-pane', args = []) {
|
|
10
|
+
const mission = String(readOption(args, '--mission', 'latest') || 'latest');
|
|
11
|
+
const index = Math.max(1, Number(readOption(args, '--index', '1')) || 1);
|
|
12
|
+
const of = Math.max(index, Number(readOption(args, '--of', '4')) || 4);
|
|
13
|
+
const intervalMs = Math.max(500, Number(process.env.SKS_ZELLIJ_REFRESH_MS || 1000));
|
|
14
|
+
const root = await projectRoot();
|
|
15
|
+
previousBindings = Array.from({ length: of }, () => null);
|
|
16
|
+
const once = !flag(args, '--watch');
|
|
17
|
+
for (;;) {
|
|
18
|
+
const frame = await renderViewportFrame(root, mission, index, of).catch((err) => `viewport render error: ${err?.message || String(err)}`);
|
|
19
|
+
process.stdout.write(`\x1b[H${frame}\n\x1b[0J`);
|
|
20
|
+
if (once)
|
|
21
|
+
return;
|
|
22
|
+
await new Promise((resolve) => setTimeout(resolve, intervalMs));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async function renderViewportFrame(root, mission, index, of) {
|
|
26
|
+
const theme = resolveZellijTheme();
|
|
27
|
+
const snapshot = await readZellijSlotTelemetrySnapshot(root, mission).catch(() => null);
|
|
28
|
+
const missionId = snapshot?.mission_id || mission;
|
|
29
|
+
const pins = await readJson(pinsPath(root, missionId), { pins: [] });
|
|
30
|
+
const bindings = bindViewports({
|
|
31
|
+
snapshot,
|
|
32
|
+
pins: pins.pins || [],
|
|
33
|
+
previous: previousBindings,
|
|
34
|
+
viewportCount: of
|
|
35
|
+
});
|
|
36
|
+
previousBindings = bindings.map((binding) => binding.slotKey);
|
|
37
|
+
const mine = bindings[index - 1] || { slotKey: null, reason: 'idle' };
|
|
38
|
+
const badge = mine.reason === 'pinned' ? 'pinned' : mine.reason === 'kept' ? 'auto' : mine.reason;
|
|
39
|
+
const header = paint(theme, ANSI_CODES.dim, `viewport ${index}/${of} | ${mine.slotKey ?? '-'} (${badge})`);
|
|
40
|
+
if (!mine.slotKey)
|
|
41
|
+
return `${header}\n${paint(theme, ANSI_CODES.dim, `idle - no active worker. Pin: sks zellij pin <slot> --viewport ${index}`)}`;
|
|
42
|
+
const [slotId, rawGen] = mine.slotKey.split(':g');
|
|
43
|
+
const generationIndex = Math.max(1, Number(rawGen || 1) || 1);
|
|
44
|
+
const detail = await renderZellijSlotPaneFromArtifacts({
|
|
45
|
+
artifactRoot: root,
|
|
46
|
+
missionId,
|
|
47
|
+
artifactDir: path.join(root, '.sneakoscope', 'missions', missionId, 'agents', 'sessions', slotId || mine.slotKey, `gen-${generationIndex}`, 'worker'),
|
|
48
|
+
slotId: slotId || mine.slotKey,
|
|
49
|
+
generationIndex
|
|
50
|
+
});
|
|
51
|
+
return `${header}\n${detail}`;
|
|
52
|
+
}
|
|
53
|
+
function pinsPath(root, missionId) {
|
|
54
|
+
return path.join(root, '.sneakoscope', 'missions', missionId, 'zellij', 'viewport-pins.json');
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=zellij-viewport-pane.js.map
|
package/dist/commands/zellij.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
|
-
import { projectRoot, readJson } from '../core/fsx.js';
|
|
3
|
+
import { nowIso, projectRoot, readJson, writeJsonAtomic } from '../core/fsx.js';
|
|
4
4
|
import { flag } from '../cli/args.js';
|
|
5
5
|
import { printJson } from '../cli/output.js';
|
|
6
6
|
import { checkZellijCapability } from '../core/zellij/zellij-capability.js';
|
|
@@ -8,6 +8,7 @@ import { checkZellijUpdateNotice, upgradeZellijToLatest } from '../core/zellij/z
|
|
|
8
8
|
import { runZellij } from '../core/zellij/zellij-command.js';
|
|
9
9
|
import { appendZellijLaneCommand, normalizeZellijSlot } from '../core/zellij/zellij-lane-runtime.js';
|
|
10
10
|
import { buildZellijDashboardSnapshot, renderZellijDashboardText } from '../core/zellij/zellij-dashboard-renderer.js';
|
|
11
|
+
import { readZellijSlotTelemetrySnapshot } from '../core/zellij/zellij-slot-telemetry.js';
|
|
11
12
|
export const ZELLIJ_COMMAND_SCHEMA = 'sks.zellij-command.v1';
|
|
12
13
|
export const ZELLIJ_REPAIR_SCHEMA = 'sks.zellij-repair.v1';
|
|
13
14
|
function installHint() {
|
|
@@ -37,6 +38,8 @@ export async function run(_command = 'zellij', args = []) {
|
|
|
37
38
|
return zellijDashboard(root, args, json);
|
|
38
39
|
if (sub === 'close-drained')
|
|
39
40
|
return zellijCloseDrained(root, args, json);
|
|
41
|
+
if (sub === 'pin' || sub === 'unpin')
|
|
42
|
+
return zellijViewportPin(root, sub, args, json);
|
|
40
43
|
return zellijStatus(root, args, json);
|
|
41
44
|
}
|
|
42
45
|
async function zellijStatus(root, args, json) {
|
|
@@ -230,6 +233,41 @@ async function zellijCloseDrained(root, args, json) {
|
|
|
230
233
|
if (!out.ok)
|
|
231
234
|
process.exitCode = 1;
|
|
232
235
|
}
|
|
236
|
+
async function zellijViewportPin(root, action, args, json) {
|
|
237
|
+
const missionId = resolveMissionId(root, readOption(args, '--mission', readOption(args, '--mission-id', 'latest') || 'latest') || 'latest');
|
|
238
|
+
const slotArg = positionalAfter(args, action) || readOption(args, '--slot', '');
|
|
239
|
+
const viewport = Math.max(1, Number(readOption(args, '--viewport', '1')) || 1);
|
|
240
|
+
const file = path.join(root, '.sneakoscope', 'missions', missionId, 'zellij', 'viewport-pins.json');
|
|
241
|
+
const cur = await readJson(file, { pins: [] });
|
|
242
|
+
const slotKey = slotArg ? await resolveLatestGenKey(root, missionId, slotArg) : '';
|
|
243
|
+
const pins = (cur.pins || []).filter((pin) => pin.viewport !== viewport && (!slotKey || pin.slot_key !== slotKey));
|
|
244
|
+
const blockers = slotArg ? [] : ['slot_required'];
|
|
245
|
+
if (action === 'pin' && slotKey && blockers.length === 0)
|
|
246
|
+
pins.push({ viewport, slot_key: slotKey });
|
|
247
|
+
await writeJsonAtomic(file, {
|
|
248
|
+
schema: 'sks.zellij-viewport-pins.v1',
|
|
249
|
+
updated_at: nowIso(),
|
|
250
|
+
pins
|
|
251
|
+
});
|
|
252
|
+
const out = {
|
|
253
|
+
schema: 'sks.zellij-viewport-pin-command.v1',
|
|
254
|
+
ok: blockers.length === 0,
|
|
255
|
+
action,
|
|
256
|
+
mission_id: missionId,
|
|
257
|
+
viewport,
|
|
258
|
+
slot_key: slotKey || null,
|
|
259
|
+
pins,
|
|
260
|
+
blockers
|
|
261
|
+
};
|
|
262
|
+
if (json)
|
|
263
|
+
printJson(out);
|
|
264
|
+
else if (out.ok)
|
|
265
|
+
console.log(action === 'pin' ? `pinned ${slotKey} -> viewport ${viewport}` : `unpinned ${slotKey}`);
|
|
266
|
+
else
|
|
267
|
+
console.log('Usage: sks zellij pin <slot> [--viewport N] [--mission M]');
|
|
268
|
+
if (!out.ok)
|
|
269
|
+
process.exitCode = 1;
|
|
270
|
+
}
|
|
233
271
|
async function zellijDispatch(root, args, json) {
|
|
234
272
|
const missionId = readOption(args, '--mission', readOption(args, '--mission-id', 'latest') || 'latest') || 'latest';
|
|
235
273
|
const slotId = normalizeZellijSlot(readOption(args, '--slot', 'slot-001'));
|
|
@@ -320,7 +358,7 @@ function printHelp(json) {
|
|
|
320
358
|
schema: ZELLIJ_COMMAND_SCHEMA,
|
|
321
359
|
subcommand: 'help',
|
|
322
360
|
ok: true,
|
|
323
|
-
usage: 'sks zellij status|update|repair|dispatch|send|focus-worker|worker-logs|dashboard|close-drained [--json]',
|
|
361
|
+
usage: 'sks zellij status|update|repair|dispatch|send|focus-worker|worker-logs|dashboard|pin|unpin|close-drained [--json]',
|
|
324
362
|
subcommands: {
|
|
325
363
|
status: 'Report Zellij runtime capability and interactive-route readiness.',
|
|
326
364
|
update: 'Check the latest stable Zellij release; apply the upgrade with --yes (Homebrew).',
|
|
@@ -330,6 +368,8 @@ function printHelp(json) {
|
|
|
330
368
|
'focus-worker': 'Focus a visible right-column worker pane by slot.',
|
|
331
369
|
'worker-logs': 'Print stdout/stderr log paths for worker slots.',
|
|
332
370
|
dashboard: 'Render the latest dashboard snapshot; --watch prints watch metadata.',
|
|
371
|
+
pin: 'Pin a dynamic worker slot to a viewport.',
|
|
372
|
+
unpin: 'Remove a worker slot pin from a viewport.',
|
|
333
373
|
'close-drained': 'Close drained right-column panes.',
|
|
334
374
|
capability: 'Alias for status.'
|
|
335
375
|
}
|
|
@@ -345,6 +385,8 @@ function printHelp(json) {
|
|
|
345
385
|
console.log(' sks zellij focus-worker slot-001 [--mission M] [--json]');
|
|
346
386
|
console.log(' sks zellij worker-logs [slot-001] [--mission M] [--json]');
|
|
347
387
|
console.log(' sks zellij dashboard [--mission M] [--watch] [--json]');
|
|
388
|
+
console.log(' sks zellij pin slot-001 [--viewport 2] [--mission M] [--json]');
|
|
389
|
+
console.log(' sks zellij unpin slot-001 [--viewport 2] [--mission M] [--json]');
|
|
348
390
|
console.log(' sks zellij close-drained [--mission M] [--json]');
|
|
349
391
|
}
|
|
350
392
|
}
|
|
@@ -380,4 +422,15 @@ function resolveMissionId(root, requested) {
|
|
|
380
422
|
return 'latest';
|
|
381
423
|
}
|
|
382
424
|
}
|
|
425
|
+
async function resolveLatestGenKey(root, missionId, rawSlot) {
|
|
426
|
+
const raw = String(rawSlot || '').trim();
|
|
427
|
+
if (raw.includes(':g'))
|
|
428
|
+
return raw;
|
|
429
|
+
const slotId = normalizeZellijSlot(raw);
|
|
430
|
+
const snapshot = await readZellijSlotTelemetrySnapshot(root, missionId).catch(() => null);
|
|
431
|
+
const candidates = Object.entries(snapshot?.slots || {})
|
|
432
|
+
.filter(([, row]) => normalizeZellijSlot(row.slot_id) === slotId)
|
|
433
|
+
.sort(([, a], [, b]) => Number(b.generation_index || 1) - Number(a.generation_index || 1));
|
|
434
|
+
return candidates[0]?.[0] || `${slotId}:g1`;
|
|
435
|
+
}
|
|
383
436
|
//# sourceMappingURL=zellij.js.map
|