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
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { exists, readJson } from '../fsx.js';
|
|
3
|
+
import { imageDimensions, sha256File } from '../wiki-image/image-hash.js';
|
|
4
|
+
export async function evaluateGate(root, missionId, gateFile) {
|
|
5
|
+
const gatePath = path.isAbsolute(gateFile)
|
|
6
|
+
? gateFile
|
|
7
|
+
: path.join(root, '.sneakoscope', 'missions', missionId, gateFile);
|
|
8
|
+
if (!(await exists(gatePath))) {
|
|
9
|
+
return { pass: false, verdict: 'missing', reasons: ['gate_file_missing'], gate_path: gatePath, gate: null };
|
|
10
|
+
}
|
|
11
|
+
const gate = await readJson(gatePath, null);
|
|
12
|
+
if (!gate || typeof gate !== 'object' || Array.isArray(gate)) {
|
|
13
|
+
return { pass: false, verdict: 'invalid', reasons: ['gate_json_invalid'], gate_path: gatePath, gate: null };
|
|
14
|
+
}
|
|
15
|
+
const blockers = Array.isArray(gate.blockers) ? gate.blockers : null;
|
|
16
|
+
const reasons = [];
|
|
17
|
+
if (gate.execution_class === 'mock_fixture') {
|
|
18
|
+
if (gate.passed !== true)
|
|
19
|
+
reasons.push('gate_not_passed');
|
|
20
|
+
if (gate.ok === false)
|
|
21
|
+
reasons.push('gate_ok_false');
|
|
22
|
+
if (!blockers)
|
|
23
|
+
reasons.push('gate_blockers_not_array');
|
|
24
|
+
else if (blockers.length > 0)
|
|
25
|
+
reasons.push('gate_blockers_present');
|
|
26
|
+
return { pass: false, verdict: 'mock_only', reasons: reasons.length ? reasons : ['gate_execution_class_mock_fixture'], gate_path: gatePath, gate };
|
|
27
|
+
}
|
|
28
|
+
if (gate.passed !== true)
|
|
29
|
+
reasons.push('gate_not_passed');
|
|
30
|
+
if (gate.ok === false)
|
|
31
|
+
reasons.push('gate_ok_false');
|
|
32
|
+
if (!blockers)
|
|
33
|
+
reasons.push('gate_blockers_not_array');
|
|
34
|
+
else if (blockers.length > 0)
|
|
35
|
+
reasons.push('gate_blockers_present');
|
|
36
|
+
if (gateFile === 'mad-sks-gate.json' || /mad-sks-gate\.json$/.test(gatePath)) {
|
|
37
|
+
const sqlPlane = gate.sql_plane;
|
|
38
|
+
if (sqlPlane?.requested === true) {
|
|
39
|
+
if (sqlPlane.read_back_passed !== true)
|
|
40
|
+
reasons.push('mad_sks_sql_plane_read_back_not_passed');
|
|
41
|
+
if (sqlPlane.profile_closed !== true)
|
|
42
|
+
reasons.push('mad_sks_sql_plane_profile_not_closed');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (gateFile === 'image-ux-review-gate.json' || /image-ux-review-gate\.json$/.test(gatePath)) {
|
|
46
|
+
const needsFullImagegenEvidence = gate.full_review_passed === true
|
|
47
|
+
|| gate.gpt_image_2_callout_generated === true
|
|
48
|
+
|| (gate.passed === true && gate.reference_only !== true);
|
|
49
|
+
if (needsFullImagegenEvidence) {
|
|
50
|
+
reasons.push(...await imagegenResponseGateReasons(root, path.dirname(gatePath)));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (gateFile === 'ppt-gate.json' || /ppt-gate\.json$/.test(gatePath)) {
|
|
54
|
+
const imagegenEvidence = gate.imagegen_evidence;
|
|
55
|
+
if (imagegenEvidence?.required === true && imagegenEvidence.passed !== true) {
|
|
56
|
+
reasons.push('ppt_imagegen_evidence_not_passed');
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (reasons.length > 0) {
|
|
60
|
+
return { pass: false, verdict: 'fail', reasons, gate_path: gatePath, gate };
|
|
61
|
+
}
|
|
62
|
+
return { pass: true, verdict: 'pass', reasons: [], gate_path: gatePath, gate };
|
|
63
|
+
}
|
|
64
|
+
async function imagegenResponseGateReasons(root, missionDir) {
|
|
65
|
+
const reasons = [];
|
|
66
|
+
const response = await readJson(path.join(missionDir, 'image-ux-gpt-image-2-response.json'), null);
|
|
67
|
+
if (!response || typeof response !== 'object')
|
|
68
|
+
return ['imagegen_response_artifact_missing'];
|
|
69
|
+
if (response.schema !== 'sks.image-ux-gpt-image-2-response.v1')
|
|
70
|
+
reasons.push('imagegen_response_schema_invalid');
|
|
71
|
+
if (response.ok !== true || response.status !== 'generated')
|
|
72
|
+
reasons.push(response.blocker || 'imagegen_response_not_generated');
|
|
73
|
+
const evidenceClass = String(response.evidence_class || '');
|
|
74
|
+
if (evidenceClass !== 'codex_app_imagegen')
|
|
75
|
+
reasons.push(evidenceClass ? `imagegen_response_evidence_class_not_codex_app:${evidenceClass}` : 'imagegen_response_evidence_class_missing');
|
|
76
|
+
const outputSource = String(response.output_source || '');
|
|
77
|
+
if (!['manual_attach', 'auto_discovered_generated_images'].includes(outputSource))
|
|
78
|
+
reasons.push('imagegen_response_output_source_invalid');
|
|
79
|
+
const outputPath = String(response.output_image_path || '');
|
|
80
|
+
const expectedSha = String(response.output_sha256 || response.output_image_sha256 || '');
|
|
81
|
+
if (!outputPath)
|
|
82
|
+
reasons.push('imagegen_response_output_path_missing');
|
|
83
|
+
if (!expectedSha)
|
|
84
|
+
reasons.push('imagegen_response_output_sha256_missing');
|
|
85
|
+
if (outputPath) {
|
|
86
|
+
const absolute = path.isAbsolute(outputPath) ? outputPath : path.resolve(root, outputPath);
|
|
87
|
+
try {
|
|
88
|
+
const actualSha = await sha256File(absolute);
|
|
89
|
+
if (expectedSha && actualSha !== expectedSha)
|
|
90
|
+
reasons.push('imagegen_response_output_sha256_mismatch');
|
|
91
|
+
const dims = await imageDimensions(absolute);
|
|
92
|
+
if (!Number.isFinite(Number(dims.width)) || !Number.isFinite(Number(dims.height)) || Number(dims.width) <= 0 || Number(dims.height) <= 0) {
|
|
93
|
+
reasons.push('imagegen_response_output_dimensions_invalid');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
catch {
|
|
97
|
+
reasons.push('imagegen_response_output_file_unreadable');
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
return [...new Set(reasons)];
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=gate-evaluator.js.map
|
|
@@ -49,10 +49,13 @@ async function checkHardBlocker(root, missionId) {
|
|
|
49
49
|
const blocker = await readJson(file, null);
|
|
50
50
|
if (!blocker)
|
|
51
51
|
return { hardBlocked: false, file, reason: null, evidence: [] };
|
|
52
|
+
const evidence = blocker.evidence || [];
|
|
52
53
|
const hardBlocked = String(blocker.status || '') === 'hard_blocked'
|
|
53
54
|
&& blocker.passed !== true
|
|
54
|
-
&& String(blocker.reason || '').trim().length > 0
|
|
55
|
-
|
|
55
|
+
&& String(blocker.reason || '').trim().length > 0
|
|
56
|
+
&& Array.isArray(evidence)
|
|
57
|
+
&& evidence.length > 0;
|
|
58
|
+
return { hardBlocked, file, reason: String(blocker.reason || ''), evidence };
|
|
56
59
|
}
|
|
57
60
|
export async function checkStopGate(input) {
|
|
58
61
|
const root = path.resolve(input.root);
|
|
@@ -61,6 +64,7 @@ export async function checkStopGate(input) {
|
|
|
61
64
|
...(input.route ? { route: input.route } : {}),
|
|
62
65
|
...(input.missionId ? { missionId: input.missionId } : {}),
|
|
63
66
|
...(input.explicitGatePath ? { explicitGatePath: input.explicitGatePath } : {}),
|
|
67
|
+
...(input.allowLatestFallback === false ? { allowLatestFallback: false } : {}),
|
|
64
68
|
});
|
|
65
69
|
const route = normalizeRoute(resolution.route) ?? normalizeRoute(input.route ?? null) ?? 'Naruto';
|
|
66
70
|
const missionId = resolution.mission_id;
|
|
@@ -128,15 +132,24 @@ export async function checkStopGate(input) {
|
|
|
128
132
|
};
|
|
129
133
|
}
|
|
130
134
|
const missingFields = [];
|
|
135
|
+
if (normalizedGate.status !== 'passed')
|
|
136
|
+
missingFields.push('status');
|
|
131
137
|
if (normalizedGate.passed !== true)
|
|
132
138
|
missingFields.push('passed');
|
|
133
139
|
if (normalizedGate.blockers.length > 0)
|
|
134
140
|
missingFields.push('blockers');
|
|
135
141
|
if (normalizedGate.missing_fields.length > 0)
|
|
136
142
|
missingFields.push(...normalizedGate.missing_fields.map((field) => `missing_fields:${field}`));
|
|
137
|
-
|
|
143
|
+
const bugfixMission = await missionHasBugfixWork(root, missionId, normalizedGate);
|
|
144
|
+
if (bugfixMission && normalizedGate.evidence.regression_test_added !== true)
|
|
145
|
+
missingFields.push('regression_test_added');
|
|
146
|
+
if (bugfixMission && normalizedGate.evidence.regression_test_failed_before_fix !== true)
|
|
147
|
+
missingFields.push('regression_test_failed_before_fix');
|
|
148
|
+
if (normalizedGate.status === 'passed'
|
|
149
|
+
&& normalizedGate.passed === true
|
|
138
150
|
&& normalizedGate.blockers.length === 0
|
|
139
|
-
&& normalizedGate.missing_fields.length === 0
|
|
151
|
+
&& normalizedGate.missing_fields.length === 0
|
|
152
|
+
&& missingFields.length === 0) {
|
|
140
153
|
const action = 'allow_stop';
|
|
141
154
|
const diagnostics = {
|
|
142
155
|
schema: 'sks.stop-gate-diagnostics.v1',
|
|
@@ -198,6 +211,15 @@ export async function checkStopGate(input) {
|
|
|
198
211
|
feedback: `Stop blocked: gate not passed. Selected: ${resolution.gate_path}. Missing fields: ${missingFields.join(', ') || 'none'}. Checked: ${resolution.checked_paths.join(', ')}`,
|
|
199
212
|
};
|
|
200
213
|
}
|
|
214
|
+
async function missionHasBugfixWork(root, missionId, gate) {
|
|
215
|
+
const evidence = gate.evidence;
|
|
216
|
+
if (evidence.regression_test_added !== undefined || evidence.regression_test_failed_before_fix !== undefined)
|
|
217
|
+
return true;
|
|
218
|
+
if (!missionId)
|
|
219
|
+
return false;
|
|
220
|
+
const graph = await readJson(path.join(missionDir(root, missionId), 'agents', 'naruto-work-graph.json'), null);
|
|
221
|
+
return Array.isArray(graph?.work_items) && graph.work_items.some((item) => String(item?.kind || '') === 'bugfix');
|
|
222
|
+
}
|
|
201
223
|
async function writeDiagnostics(root, missionId, diagnostics) {
|
|
202
224
|
// Global report
|
|
203
225
|
const reportsDir = path.join(root, '.sneakoscope', 'reports');
|
|
@@ -68,8 +68,9 @@ export async function resolveStopGate(input) {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
// 4. latest mission fallback
|
|
72
|
-
|
|
71
|
+
// 4. latest mission fallback. Interactive hooks disable this path so a stale
|
|
72
|
+
// mission cannot satisfy the current session's stop gate by accident.
|
|
73
|
+
const latest = input.allowLatestFallback === false ? null : await findLatestMission(root);
|
|
73
74
|
if (latest) {
|
|
74
75
|
const dir = missionDir(root, latest);
|
|
75
76
|
for (const file of GATE_FILE_CANDIDATES) {
|
|
@@ -77,12 +78,27 @@ export async function resolveStopGate(input) {
|
|
|
77
78
|
checkedPaths.push(p);
|
|
78
79
|
if (await exists(p)) {
|
|
79
80
|
const raw = await readJson(p, null);
|
|
80
|
-
|
|
81
|
+
if (!gateMatchesRoute(raw, route))
|
|
82
|
+
continue;
|
|
83
|
+
if (stateMissionId && stateMissionId !== latest) {
|
|
84
|
+
console.error(`SKS stop-gate warning: latest mission fallback selected ${latest}, current state mission is ${stateMissionId}. Pass --mission or --gate to avoid fallback.`);
|
|
85
|
+
}
|
|
86
|
+
return makeResolution(root, route, latest, p, raw, checkedPaths, statePath, stateMissionId, 'latest_mission_fallback_warn');
|
|
81
87
|
}
|
|
82
88
|
}
|
|
83
89
|
}
|
|
84
90
|
return makeResolution(root, route, missionId, null, null, checkedPaths, statePath, stateMissionId, 'no_gate_found');
|
|
85
91
|
}
|
|
92
|
+
function gateMatchesRoute(raw, route) {
|
|
93
|
+
if (!route || !raw)
|
|
94
|
+
return true;
|
|
95
|
+
const expected = normalizeRoute(route);
|
|
96
|
+
const actual = normalizeRoute(String(raw.route || raw.route_command || ''));
|
|
97
|
+
return !actual || actual === expected;
|
|
98
|
+
}
|
|
99
|
+
function normalizeRoute(value) {
|
|
100
|
+
return String(value || '').replace(/^\$/, '').replace(/_/g, '-').toLowerCase();
|
|
101
|
+
}
|
|
86
102
|
function makeResolution(root, route, missionId, gatePath, gateRaw, checkedPaths, statePath, stateMissionId, reason) {
|
|
87
103
|
let gateSchema = null;
|
|
88
104
|
if (gateRaw) {
|
|
@@ -3,6 +3,9 @@ import { ensureDir, nowIso, readJson, writeJsonAtomic, exists } from '../fsx.js'
|
|
|
3
3
|
import { missionDir } from '../mission.js';
|
|
4
4
|
import { setCurrent } from '../mission.js';
|
|
5
5
|
export async function writeFinalStopGate(input) {
|
|
6
|
+
return writeGateOwned(input);
|
|
7
|
+
}
|
|
8
|
+
export async function writeGateOwned(input) {
|
|
6
9
|
const dir = missionDir(input.root, input.missionId);
|
|
7
10
|
await ensureDir(dir);
|
|
8
11
|
const evidenceBlockers = input.status === 'passed' ? evidenceMissingBlockers(input.evidence) : [];
|
|
@@ -15,6 +18,13 @@ export async function writeFinalStopGate(input) {
|
|
|
15
18
|
const canonicalGatePath = path.join(dir, 'stop-gate.json');
|
|
16
19
|
const latestGatePath = path.join(dir, 'stop-gate.latest.json');
|
|
17
20
|
const verifyPath = path.join(dir, 'stop-gate-write-verify.json');
|
|
21
|
+
const gateOwner = {
|
|
22
|
+
mission_id: input.missionId,
|
|
23
|
+
route: input.route,
|
|
24
|
+
route_command: input.routeCommand,
|
|
25
|
+
writer_pid: process.pid,
|
|
26
|
+
written_at: nowIso()
|
|
27
|
+
};
|
|
18
28
|
const gate = {
|
|
19
29
|
schema: 'sks.stop-gate.v1',
|
|
20
30
|
route: input.route,
|
|
@@ -29,6 +39,7 @@ export async function writeFinalStopGate(input) {
|
|
|
29
39
|
evidence: input.evidence,
|
|
30
40
|
blockers,
|
|
31
41
|
missing_fields: missingFields,
|
|
42
|
+
gate_owner: gateOwner,
|
|
32
43
|
created_at: nowIso(),
|
|
33
44
|
};
|
|
34
45
|
// 1. Write route-native gate file (backwards compat), preserving detailed native fields by default.
|
|
@@ -51,6 +62,7 @@ export async function writeFinalStopGate(input) {
|
|
|
51
62
|
},
|
|
52
63
|
blockers,
|
|
53
64
|
missing_fields: missingFields,
|
|
65
|
+
gate_owner: gateOwner,
|
|
54
66
|
updated_at: nowIso()
|
|
55
67
|
});
|
|
56
68
|
}
|
|
@@ -67,6 +79,7 @@ export async function writeFinalStopGate(input) {
|
|
|
67
79
|
evidence: input.evidence,
|
|
68
80
|
blockers,
|
|
69
81
|
missing_fields: missingFields,
|
|
82
|
+
gate_owner: gateOwner,
|
|
70
83
|
updated_at: nowIso(),
|
|
71
84
|
...(input.nativeGatePatch ?? {})
|
|
72
85
|
});
|
|
@@ -85,10 +98,12 @@ export async function writeFinalStopGate(input) {
|
|
|
85
98
|
stop_gate_abs_path: canonicalGatePath,
|
|
86
99
|
stop_gate_status: status,
|
|
87
100
|
stop_gate_passed: passed,
|
|
101
|
+
gate_owner_mission_id: input.missionId,
|
|
102
|
+
gate_owner_route: input.route,
|
|
88
103
|
route_evidence_passed: input.evidence.route_evidence_passed ?? passed,
|
|
89
104
|
terminal: gate.terminal,
|
|
90
105
|
terminal_state: gate.terminal_state,
|
|
91
|
-
});
|
|
106
|
+
}, { sessionKey: input.sessionKey || undefined });
|
|
92
107
|
// 5. Re-read and verify
|
|
93
108
|
const verifyResult = {
|
|
94
109
|
schema: 'sks.stop-gate-write-verify.v1',
|
|
@@ -121,6 +136,10 @@ function evidenceMissingBlockers(evidence) {
|
|
|
121
136
|
blockers.push('proof_not_passed');
|
|
122
137
|
if (evidence.reflection_required === true && evidence.reflection_passed !== true && evidence.reflection_passed !== 'not_required')
|
|
123
138
|
blockers.push('reflection_not_passed');
|
|
139
|
+
if (evidence.regression_test_added === false)
|
|
140
|
+
blockers.push('regression_test_not_added');
|
|
141
|
+
if (evidence.regression_test_failed_before_fix === false)
|
|
142
|
+
blockers.push('regression_test_failed_before_fix_missing');
|
|
124
143
|
return blockers;
|
|
125
144
|
}
|
|
126
145
|
//# sourceMappingURL=stop-gate-writer.js.map
|