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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sneakoscope",
|
|
3
3
|
"displayName": "ㅅㅋㅅ",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "5.1.2",
|
|
5
5
|
"description": "Sneakoscope Codex: fast proof-first Codex trust layer with image-based Voxel TriWiki.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"homepage": "https://github.com/mandarange/Sneakoscope-Codex#readme",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"bin": {
|
|
16
16
|
"sks": "dist/bin/sks.js",
|
|
17
|
-
"sneakoscope": "dist/bin/sks.js"
|
|
17
|
+
"sneakoscope": "dist/bin/sks.js",
|
|
18
|
+
"sneakoscope-install": "dist/bin/install.js"
|
|
18
19
|
},
|
|
19
20
|
"publishConfig": {
|
|
20
21
|
"access": "public",
|
|
@@ -32,8 +33,11 @@
|
|
|
32
33
|
"!dist/**/*.tsbuildinfo",
|
|
33
34
|
"!dist/**/__tests__",
|
|
34
35
|
"!dist/**/*.test.js",
|
|
36
|
+
"!dist/scripts/*blackbox*.js",
|
|
35
37
|
"!dist/vendor/openai-codex/rust-v0.131.0",
|
|
36
38
|
"config/codex-releases/rust-v0.142.0.json",
|
|
39
|
+
"config/bench-baseline.json",
|
|
40
|
+
"bench/tasks",
|
|
37
41
|
"schemas",
|
|
38
42
|
"!schemas/codex/app-server-0.142/**",
|
|
39
43
|
"schemas/codex/app-server-0.142/codex_app_server_protocol.v2.schemas.json",
|
|
@@ -41,6 +45,8 @@
|
|
|
41
45
|
"crates/sks-core/Cargo.lock",
|
|
42
46
|
"crates/sks-core/Cargo.toml",
|
|
43
47
|
"crates/sks-core/src",
|
|
48
|
+
"docs/demo.tape",
|
|
49
|
+
"docs/assets/sneakoscope-architecture-pipeline.jpg",
|
|
44
50
|
"README.md",
|
|
45
51
|
"LICENSE"
|
|
46
52
|
],
|
|
@@ -60,15 +66,31 @@
|
|
|
60
66
|
"runtime:dist-parity": "node ./dist/scripts/runtime-dist-parity-check.js",
|
|
61
67
|
"release:check": "npm run release:check:affected --silent",
|
|
62
68
|
"release:metadata": "node ./dist/scripts/release-metadata-check.js",
|
|
69
|
+
"release:gate-script-parity": "node ./dist/scripts/release-gate-script-parity-check.js",
|
|
63
70
|
"release:check:parallel": "npm run build --silent && node ./dist/scripts/release-parallel-check.js && node ./dist/scripts/release-check-stamp.js write",
|
|
71
|
+
"release:check:legacy": "npm run release:check:parallel --silent",
|
|
72
|
+
"release:dag-full-coverage": "node ./dist/scripts/release-dag-full-coverage-check.js",
|
|
73
|
+
"core-skill:route-runtime-integration": "node ./dist/scripts/core-skill-route-runtime-integration-check.js",
|
|
74
|
+
"core-skill:no-drift": "node ./dist/scripts/core-skill-no-drift-check.js",
|
|
64
75
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
65
76
|
"schema:check": "node ./dist/scripts/check-runtime-schemas.js",
|
|
66
77
|
"repo-audit": "node ./dist/scripts/repo-audit.js",
|
|
78
|
+
"native-capability:postcheck": "node ./dist/scripts/native-capability-postcheck-check.js",
|
|
79
|
+
"secret:preservation-guard": "node ./dist/scripts/secret-preservation-guard-check.js",
|
|
80
|
+
"secret:supabase-preservation-blackbox": "node ./dist/scripts/supabase-secret-preservation-blackbox.js",
|
|
81
|
+
"update:preserves-supabase-keys": "node ./dist/scripts/update-preserves-supabase-keys-blackbox.js",
|
|
82
|
+
"skill:dedupe-blackbox": "node ./dist/scripts/project-skill-dedupe-blackbox.js",
|
|
67
83
|
"postinstall": "node ./dist/bin/sks.js postinstall",
|
|
68
84
|
"selftest": "node ./dist/bin/sks.js selftest --mock",
|
|
69
85
|
"doctor": "node ./dist/bin/sks.js doctor",
|
|
86
|
+
"doctor:fix-production-blackbox": "node ./dist/scripts/doctor-fix-production-blackbox.js",
|
|
87
|
+
"doctor:startup-config-repair-blackbox": "node ./dist/scripts/doctor-startup-config-repair-blackbox.js",
|
|
88
|
+
"doctor:context7-mcp-repair-blackbox": "node ./dist/scripts/doctor-context7-mcp-repair-blackbox.js",
|
|
89
|
+
"doctor:supabase-mcp-repair-blackbox": "node ./dist/scripts/doctor-supabase-mcp-repair-blackbox.js",
|
|
70
90
|
"codex:config-load-probe": "node ./dist/scripts/codex-config-load-probe.js --json",
|
|
71
91
|
"codex:actual-config-load-probe": "node ./dist/scripts/codex-config-load-probe.js --actual-codex --json",
|
|
92
|
+
"codex:0140-capability": "node ./dist/scripts/codex-0140-capability-check.js",
|
|
93
|
+
"codex:0140-feature-probes": "node ./dist/scripts/codex-0140-feature-probes-check.js",
|
|
72
94
|
"runtime:ts-rust-boundary": "node ./dist/scripts/runtime-ts-rust-boundary-check.js",
|
|
73
95
|
"release:check:dynamic": "node ./dist/scripts/release-check-dynamic.js",
|
|
74
96
|
"release:check:dynamic:execute": "node ./dist/scripts/release-check-dynamic-execute.js",
|
|
@@ -94,6 +116,48 @@
|
|
|
94
116
|
"feature:check": "node ./dist/bin/sks.js features check --json",
|
|
95
117
|
"feature-quality:check": "node ./dist/scripts/check-feature-quality.js --release",
|
|
96
118
|
"all-features:selftest": "node ./dist/bin/sks.js all-features selftest --mock --json",
|
|
119
|
+
"doctor:imagegen-repair": "node ./dist/scripts/doctor-imagegen-repair-check.js",
|
|
120
|
+
"image-fidelity:check": "node ./dist/scripts/image-fidelity-fixture-check.js",
|
|
121
|
+
"imagegen:capability": "node ./dist/scripts/imagegen-capability-check.js",
|
|
122
|
+
"imagegen:gpt-image-2-request-validator": "node ./dist/scripts/gpt-image-2-request-validator-check.js",
|
|
123
|
+
"ux-review:run-wires-imagegen": "node ./dist/scripts/ux-review-run-wires-imagegen-check.js",
|
|
124
|
+
"ux-review:extract-wires-real-extractor": "node ./dist/scripts/ux-review-extract-wires-real-extractor-check.js",
|
|
125
|
+
"ux-review:patch-diff-recheck": "node ./dist/scripts/ux-review-patch-diff-recheck-check.js",
|
|
126
|
+
"ux-review:imagegen-blackbox": "node ./dist/scripts/ux-review-imagegen-blackbox-check.js",
|
|
127
|
+
"ux-review:real-loop-fixture": "node ./dist/scripts/ux-review-real-loop-fixture-check.js",
|
|
128
|
+
"ppt:real-export-adapter": "node ./dist/scripts/ppt-real-export-adapter-check.js",
|
|
129
|
+
"ppt:real-imagegen-wiring": "node ./dist/scripts/ppt-real-imagegen-wiring-check.js",
|
|
130
|
+
"ppt:reexport-rereview": "node ./dist/scripts/ppt-reexport-rereview-check.js",
|
|
131
|
+
"ppt:full-e2e-blackbox": "node ./dist/scripts/ppt-full-e2e-blackbox-check.js",
|
|
132
|
+
"ppt:full-e2e-artifact-graph": "node ./dist/scripts/ppt-full-e2e-artifact-graph-check.js",
|
|
133
|
+
"ppt:imagegen-blackbox": "node ./dist/scripts/ppt-imagegen-blackbox-check.js",
|
|
134
|
+
"ux-ppt:structured-extraction": "node ./dist/scripts/ux-ppt-structured-extraction-check.js",
|
|
135
|
+
"dfix:patch-handoff": "node ./dist/scripts/dfix-patch-handoff-check.js",
|
|
136
|
+
"dfix:verification-recommendation": "node ./dist/scripts/dfix-verification-recommendation-check.js",
|
|
137
|
+
"dfix:fast-kernel": "node ./dist/scripts/dfix-fast-kernel-check.js",
|
|
138
|
+
"dfix:blackbox-fast": "node ./dist/scripts/dfix-fast-blackbox-check.js",
|
|
139
|
+
"dfix:performance": "node ./dist/scripts/dfix-performance-check.js",
|
|
140
|
+
"dfix:parallel-write-blackbox": "node ./dist/scripts/dfix-parallel-write-blackbox.js",
|
|
141
|
+
"all-features:deep-completion": "node ./dist/scripts/all-feature-deep-completion-check.js",
|
|
142
|
+
"evidence:flagship-coverage": "node ./dist/scripts/evidence-flagship-coverage-check.js",
|
|
143
|
+
"ux-review:generate-callouts-fixture": "node ./dist/scripts/ux-review-generate-callouts-fixture-check.js",
|
|
144
|
+
"ux-review:extract-real-callouts-fixture": "node ./dist/scripts/ux-review-extract-real-callouts-fixture-check.js",
|
|
145
|
+
"ux-review:patch-handoff-fixture": "node ./dist/scripts/ux-review-patch-handoff-fixture-check.js",
|
|
146
|
+
"ux-review:recapture-recheck-fixture": "node ./dist/scripts/ux-review-recapture-recheck-fixture-check.js",
|
|
147
|
+
"ux-review:no-text-fallback": "node ./dist/scripts/ux-review-no-text-fallback-check.js",
|
|
148
|
+
"ux-review:no-fake-callouts": "node ./dist/scripts/ux-review-no-fake-callouts-check.js",
|
|
149
|
+
"ux-review:image-voxel-relations": "node ./dist/scripts/ux-review-image-voxel-relations-check.js",
|
|
150
|
+
"ppt:imagegen-review-fixture": "node ./dist/scripts/ppt-imagegen-review-fixture-check.js",
|
|
151
|
+
"ppt:slide-export-fixture": "node ./dist/scripts/ppt-slide-export-fixture-check.js",
|
|
152
|
+
"ppt:no-text-fallback": "node ./dist/scripts/ppt-no-text-fallback-check.js",
|
|
153
|
+
"ppt:no-mock-as-real": "node ./dist/scripts/ppt-no-mock-as-real-check.js",
|
|
154
|
+
"ppt:issue-extraction-fixture": "node ./dist/scripts/ppt-issue-extraction-fixture-check.js",
|
|
155
|
+
"ppt:image-voxel-relations": "node ./dist/scripts/ppt-image-voxel-relations-check.js",
|
|
156
|
+
"ppt:proof-trust-fixture": "node ./dist/scripts/ppt-proof-trust-fixture-check.js",
|
|
157
|
+
"dfix:fixture": "node ./dist/scripts/dfix-fixture-check.js",
|
|
158
|
+
"dfix:verification": "node ./dist/scripts/dfix-verification-check.js",
|
|
159
|
+
"all-features:completion": "node ./dist/bin/sks.js all-features complete --json",
|
|
160
|
+
"json-schema:recursive-check": "node ./dist/scripts/json-schema-recursive-check.js",
|
|
97
161
|
"trust:check": "node ./dist/bin/sks.js trust validate latest --json || node ./dist/scripts/trust-fixture-check.js",
|
|
98
162
|
"wrongness:check": "node ./dist/bin/sks.js wrongness validate project --json && node ./dist/scripts/wrongness-fixture-check.js",
|
|
99
163
|
"git-hygiene:check": "node ./dist/bin/sks.js git doctor --json",
|
|
@@ -107,10 +171,12 @@
|
|
|
107
171
|
"qa-loop:effort-escalation": "node ./dist/scripts/qa-loop-effort-escalation-check.js",
|
|
108
172
|
"qa-loop:budget-policy": "node ./dist/scripts/qa-loop-budget-policy-check.js",
|
|
109
173
|
"naruto:real-active-pool-runtime": "node ./dist/scripts/naruto-real-active-pool-runtime-check.js",
|
|
174
|
+
"bench": "node ./dist/scripts/coding-bench-check.js",
|
|
175
|
+
"release:check:bench": "npm run build:incremental --silent && npm run bench --silent",
|
|
110
176
|
"release:check:affected": "npm run build:incremental --silent && node ./dist/scripts/release-gate-dag-runner.js --preset affected --changed-since auto --sla 5m && node ./dist/scripts/release-check-stamp.js write",
|
|
111
177
|
"release:check:fast": "npm run build:incremental --silent && node ./dist/scripts/release-gate-dag-runner.js --preset fast --changed-since auto --sla 5m && node ./dist/scripts/release-check-stamp.js write",
|
|
112
178
|
"release:check:confidence": "npm run build:incremental --silent && node ./dist/scripts/release-gate-dag-runner.js --preset confidence --changed-since auto --sla 5m && node ./dist/scripts/release-check-stamp.js write",
|
|
113
|
-
"release:check:full": "npm run build:clean --silent && node ./dist/scripts/release-gate-dag-runner.js --preset release --full && node ./dist/scripts/release-check-stamp.js write",
|
|
179
|
+
"release:check:full": "npm run build:clean --silent && node ./dist/scripts/release-gate-dag-runner.js --preset release --full && node ./dist/scripts/release-gate-dag-runner.js --preset bench --full && node ./dist/scripts/release-check-stamp.js write",
|
|
114
180
|
"publish:prep-ignore-scripts": "npm run prepublishOnly",
|
|
115
181
|
"publish:ignore-scripts": "npm run publish:prep-ignore-scripts && npm publish --ignore-scripts",
|
|
116
182
|
"naruto:ssot-gate-aliases": "node ./dist/scripts/naruto-ssot-gate-aliases-check.js",
|
|
@@ -179,6 +245,7 @@
|
|
|
179
245
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
180
246
|
"@openai/codex-sdk": "0.142.0",
|
|
181
247
|
"figlet": "^1.11.0",
|
|
248
|
+
"smol-toml": "^1.7.0",
|
|
182
249
|
"typescript": "^5.9.3"
|
|
183
250
|
},
|
|
184
251
|
"devDependencies": {
|
|
@@ -3,12 +3,13 @@
|
|
|
3
3
|
"$id": "https://sneakoscope.local/schemas/codex/completion-proof.schema.json",
|
|
4
4
|
"title": "SKS Completion Proof",
|
|
5
5
|
"type": "object",
|
|
6
|
-
"required": ["schema", "mission_id", "route", "status", "evidence", "claims", "unverified", "blockers"],
|
|
6
|
+
"required": ["schema", "execution_class", "mission_id", "route", "status", "evidence", "claims", "unverified", "blockers"],
|
|
7
7
|
"properties": {
|
|
8
8
|
"schema": { "const": "sks.completion-proof.v1" },
|
|
9
|
+
"execution_class": { "enum": ["real", "mock_fixture"] },
|
|
9
10
|
"mission_id": { "type": ["string", "null"] },
|
|
10
11
|
"route": { "type": ["string", "null"] },
|
|
11
|
-
"status": { "enum": ["verified", "verified_partial", "blocked", "failed", "not_verified"] },
|
|
12
|
+
"status": { "enum": ["verified", "verified_partial", "mock_only", "blocked", "failed", "not_verified"] },
|
|
12
13
|
"evidence": { "type": "object" },
|
|
13
14
|
"claims": { "type": "array" },
|
|
14
15
|
"unverified": { "type": "array" },
|
|
@@ -18,11 +18,12 @@
|
|
|
18
18
|
"type": "array",
|
|
19
19
|
"minItems": 1,
|
|
20
20
|
"items": {
|
|
21
|
-
"enum": ["cpu-light", "cpu-heavy", "io-light", "io-heavy", "git", "git-worktree", "zellij-real", "local-llm-real", "remote-model-real", "python", "network", "global-config", "publish", "fs-read"]
|
|
21
|
+
"enum": ["cpu-light", "cpu-heavy", "io-light", "io-heavy", "git", "git-worktree", "zellij-real", "browser-real", "secret-sensitive", "local-llm-real", "remote-model-real", "python", "network", "global-config", "publish", "fs-read", "fs-write", "timing-sensitive"]
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"side_effect": { "enum": ["hermetic", "real-env"] },
|
|
25
25
|
"timeout_ms": { "type": "integer", "minimum": 1 },
|
|
26
|
+
"output_contract": { "const": "sks.gate-result.v1" },
|
|
26
27
|
"cache": {
|
|
27
28
|
"type": "object",
|
|
28
29
|
"required": ["enabled", "inputs"],
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import os from 'node:os';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { spawnSync } from 'node:child_process';
|
|
7
|
-
import { assertGate, emitGate, importDist, root } from './sks-1-18-gate-lib.js';
|
|
8
|
-
const schemaMod = await importDist('core/agents/agent-patch-schema.js');
|
|
9
|
-
const applyMod = await importDist('core/agents/agent-patch-apply-worker.js');
|
|
10
|
-
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-agent-blackbox-'));
|
|
11
|
-
fs.writeFileSync(path.join(tmp, 'fixture.txt'), 'before\n');
|
|
12
|
-
const envelope = schemaMod.normalizeAgentPatchEnvelope({
|
|
13
|
-
agent_id: 'blackbox-agent',
|
|
14
|
-
session_id: 'blackbox-session',
|
|
15
|
-
slot_id: 'blackbox-slot',
|
|
16
|
-
generation_index: 1,
|
|
17
|
-
lease_id: 'lease:blackbox-agent:fixture.txt',
|
|
18
|
-
operations: [{ op: 'replace', path: 'fixture.txt', search: 'before', replace: 'after' }]
|
|
19
|
-
});
|
|
20
|
-
const dry = await applyMod.applyAgentPatchEnvelope(tmp, envelope, { dryRun: true });
|
|
21
|
-
const applied = await applyMod.applyAgentPatchEnvelope(tmp, envelope);
|
|
22
|
-
const agentRun = spawnSync(process.execPath, [
|
|
23
|
-
'dist/bin/sks.js',
|
|
24
|
-
'agent',
|
|
25
|
-
'run',
|
|
26
|
-
'agent parallel write blackbox route fixture',
|
|
27
|
-
'--mock',
|
|
28
|
-
'--write-mode',
|
|
29
|
-
'parallel',
|
|
30
|
-
'--apply-patches',
|
|
31
|
-
'--dry-run-patches',
|
|
32
|
-
'--max-write-agents',
|
|
33
|
-
'1',
|
|
34
|
-
'--json'
|
|
35
|
-
], { cwd: root, encoding: 'utf8', maxBuffer: 2 * 1024 * 1024 });
|
|
36
|
-
const agentJson = parseJson(agentRun.stdout);
|
|
37
|
-
const routePolicy = agentJson?.parallel_write_policy || null;
|
|
38
|
-
const report = { schema: 'sks.agent-parallel-write-blackbox.v1', ok: dry.ok && applied.ok && agentRun.status === 0 && routePolicy?.route_level_flags_wired === true, dry, applied, route_command: { status: agentRun.status, mission_id: agentJson?.mission_id || null, route_policy: routePolicy, stderr_tail: agentRun.stderr.slice(-2000) } };
|
|
39
|
-
const out = path.join(root, '.sneakoscope', 'reports', 'agent-parallel-write-blackbox.json');
|
|
40
|
-
fs.mkdirSync(path.dirname(out), { recursive: true });
|
|
41
|
-
fs.writeFileSync(out, `${JSON.stringify(report, null, 2)}\n`);
|
|
42
|
-
assertGate(dry.status === 'dry_run', 'agent parallel write blackbox dry-run status mismatch', report);
|
|
43
|
-
assertGate(applied.ok === true, 'agent parallel write blackbox apply failed', report);
|
|
44
|
-
assertGate(fs.readFileSync(path.join(tmp, 'fixture.txt'), 'utf8') === 'after\n', 'agent parallel write blackbox content mismatch', report);
|
|
45
|
-
assertGate(routePolicy?.write_mode === 'parallel', 'Agent route must carry --write-mode parallel into native agent policy', report);
|
|
46
|
-
assertGate(routePolicy?.apply_patches === true, 'Agent route must carry --apply-patches into native agent policy', report);
|
|
47
|
-
emitGate('agent:parallel-write-blackbox', { changed_files: applied.changed_files.length });
|
|
48
|
-
function parseJson(text) {
|
|
49
|
-
try {
|
|
50
|
-
return JSON.parse(text);
|
|
51
|
-
}
|
|
52
|
-
catch {
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=agent-parallel-write-blackbox.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import { runPatchSwarmRouteBlackbox } from './agent-patch-swarm-gate-lib.js';
|
|
4
|
-
await runPatchSwarmRouteBlackbox({
|
|
5
|
-
gate: 'agent:patch-swarm-route-blackbox',
|
|
6
|
-
route: '$Agent',
|
|
7
|
-
routeCommand: 'sks agent run',
|
|
8
|
-
reportName: 'agent-patch-swarm-route-blackbox'
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=agent-patch-swarm-route-blackbox.js.map
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import fs from 'node:fs';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { spawnSync } from 'node:child_process';
|
|
5
|
-
import { assertGate, emitGate, root } from './sks-1-18-gate-lib.js';
|
|
6
|
-
const PROMPT = 'route truth dynamic scheduler fixture';
|
|
7
|
-
const ROUTE_ARGS = ['--agents', '5', '--work-items', '8', '--target-active-slots', '5', '--minimum-work-items', '5', '--max-queue-expansion', '10', '--mock', '--json'];
|
|
8
|
-
export function runRouteBackfillBlackbox(route, gate) {
|
|
9
|
-
if (String(route).toLowerCase().includes('team'))
|
|
10
|
-
return runActualTeamBackfillBlackbox(gate);
|
|
11
|
-
if (String(route).toLowerCase().includes('research'))
|
|
12
|
-
return runActualResearchBackfillBlackbox(gate);
|
|
13
|
-
if (String(route).toLowerCase().includes('qa'))
|
|
14
|
-
return runActualQaBackfillBlackbox(gate);
|
|
15
|
-
return runActualAgentBackfillBlackbox(gate);
|
|
16
|
-
}
|
|
17
|
-
export function runActualAgentBackfillBlackbox(gate = 'agent:backfill-route-blackbox') {
|
|
18
|
-
const json = runSks(['agent', 'run', PROMPT, '--route', '$Agent', ...ROUTE_ARGS], gate);
|
|
19
|
-
validateNativeRun(json, gate, { route: '$Agent', command: 'sks agent run', kind: 'actual_agent_command' });
|
|
20
|
-
return json;
|
|
21
|
-
}
|
|
22
|
-
export function runActualTeamBackfillBlackbox(gate = 'team:backfill-route-blackbox') {
|
|
23
|
-
const json = runSks(['team', PROMPT, ...ROUTE_ARGS, '--no-open-zellij'], gate);
|
|
24
|
-
validateNativeRun(json.native_agent_run, gate, { route: '$Team', command: 'sks team', kind: 'actual_team_command' });
|
|
25
|
-
return json;
|
|
26
|
-
}
|
|
27
|
-
export function runActualResearchBackfillBlackbox(gate = 'research:backfill-route-blackbox') {
|
|
28
|
-
const prepared = runSks(['research', 'prepare', PROMPT, '--json'], `${gate}:prepare`);
|
|
29
|
-
const missionId = prepared.mission_id;
|
|
30
|
-
assertGate(Boolean(missionId), `${gate} research prepare must return mission_id`, prepared);
|
|
31
|
-
const json = runSks(['research', 'run', missionId, ...ROUTE_ARGS], gate);
|
|
32
|
-
const native = json.native_agent_run || readMissionJson(missionId, 'research-native-agent-run.json');
|
|
33
|
-
validateNativeRun(native, gate, { route: '$Research', command: 'sks research run', kind: 'actual_research_command' });
|
|
34
|
-
return json;
|
|
35
|
-
}
|
|
36
|
-
export function runActualQaBackfillBlackbox(gate = 'qa:backfill-route-blackbox') {
|
|
37
|
-
const prepared = runSks(['qa-loop', 'prepare', PROMPT, '--json'], `${gate}:prepare`);
|
|
38
|
-
const missionId = prepared.mission_id;
|
|
39
|
-
assertGate(Boolean(missionId), `${gate} qa prepare must return mission_id`, prepared);
|
|
40
|
-
const json = runSks(['qa-loop', 'run', missionId, ...ROUTE_ARGS], gate);
|
|
41
|
-
const native = json.native_agent_run || readMissionJson(missionId, 'qa-native-agent-run.json');
|
|
42
|
-
validateNativeRun(native, gate, { route: '$QA-LOOP', command: 'sks qa-loop run', kind: 'actual_qa_command' });
|
|
43
|
-
return json;
|
|
44
|
-
}
|
|
45
|
-
export function validateNativeRun(json, gate, expected = {}) {
|
|
46
|
-
assertGate(Boolean(json), `${gate} native agent run JSON missing`, {});
|
|
47
|
-
const state = json.scheduler?.state || {};
|
|
48
|
-
const proof = json.proof || {};
|
|
49
|
-
const ledgerRoot = path.join(root, json.ledger_root || '');
|
|
50
|
-
assertGate(fs.existsSync(ledgerRoot), `${gate} ledger root missing`, { ledger_root: json.ledger_root });
|
|
51
|
-
const events = readJsonl(path.join(ledgerRoot, 'agent-scheduler-events.jsonl'));
|
|
52
|
-
const backfills = events.filter((event) => event.event_type === 'backfill_event');
|
|
53
|
-
const graph = readJson(path.join(ledgerRoot, 'agent-task-graph.json'));
|
|
54
|
-
const queue = readJson(path.join(ledgerRoot, 'agent-work-queue.json'));
|
|
55
|
-
const supervisor = readJson(path.join(ledgerRoot, 'agent-zellij-lane-supervisor.json'));
|
|
56
|
-
assertGate(json.ok === true, `${gate} proof must pass`, proof);
|
|
57
|
-
assertGate(graph.schema === 'sks.agent-task-graph.v1', `${gate} task graph schema missing`, graph);
|
|
58
|
-
assertGate(graph.target_active_slots === 5 && graph.total_work_items === 8, `${gate} task graph must split active slots and work items`, graph.route_work_count_summary);
|
|
59
|
-
assertGate(queue.total_work_items === graph.total_work_items, `${gate} work queue must match task graph`, { queue: queue.total_work_items, graph: graph.total_work_items });
|
|
60
|
-
assertGate(state.target_active_slots === 5, `${gate} target active slots must be 5`, state);
|
|
61
|
-
assertGate(state.total_work_items === queue.total_work_items, `${gate} scheduler must match work queue`, { scheduler: state.total_work_items, queue: queue.total_work_items });
|
|
62
|
-
assertGate(state.max_observed_active_slots === 5, `${gate} must observe 5 active slots`, state);
|
|
63
|
-
assertGate(state.expected_backfill_count >= 2, `${gate} expected backfill count must be at least 2`, state);
|
|
64
|
-
assertGate(state.backfill_count >= state.expected_backfill_count, `${gate} backfills must satisfy expectation`, state);
|
|
65
|
-
assertGate(backfills.length >= 2, `${gate} must emit at least two backfill events`, { backfills });
|
|
66
|
-
assertGate(events.some((event) => event.event_type === 'scheduler_draining'), `${gate} must emit scheduler_draining`, {});
|
|
67
|
-
assertGate(state.pending_queue_drained === true, `${gate} queue must drain`, state);
|
|
68
|
-
assertGate(state.all_generations_closed === true, `${gate} generations must close`, state);
|
|
69
|
-
assertGate(proof.requested_work_items === 8, `${gate} proof must record requested work items`, proof);
|
|
70
|
-
assertGate(proof.actual_total_work_items === 8, `${gate} proof must record actual total work items`, proof);
|
|
71
|
-
assertGate(proof.task_graph_total_work_items === 8, `${gate} proof task graph total must be 8`, proof);
|
|
72
|
-
assertGate(proof.work_queue_total_work_items === 8, `${gate} proof work queue total must be 8`, proof);
|
|
73
|
-
assertGate(proof.scheduler_total_work_items === 8, `${gate} proof scheduler total must be 8`, proof);
|
|
74
|
-
assertGate(proof.task_graph_matches_cli_options === true, `${gate} proof must bind task graph to CLI options`, proof);
|
|
75
|
-
assertGate(proof.work_queue_matches_task_graph === true, `${gate} proof must bind work queue to task graph`, proof);
|
|
76
|
-
assertGate(proof.scheduler_matches_work_queue === true, `${gate} proof must bind scheduler to work queue`, proof);
|
|
77
|
-
assertGate(proof.generation_count >= state.total_work_items, `${gate} proof generation count must cover work items`, proof);
|
|
78
|
-
assertGate(proof.terminal_close_report_count >= proof.generation_count, `${gate} close reports must cover generations`, proof);
|
|
79
|
-
assertGate(proof.terminal_reports_match_generations === true, `${gate} proof must bind terminal reports to generations`, proof);
|
|
80
|
-
assertGate(proof.source_intelligence_generation_refs_ok === true && proof.task_graph_source_refs_ok === true && proof.work_queue_source_refs_ok === true, `${gate} source refs must propagate`, proof);
|
|
81
|
-
assertGate(proof.goal_mode_generation_refs_ok === true && proof.task_graph_goal_refs_ok === true && proof.work_queue_goal_refs_ok === true, `${gate} goal refs must propagate`, proof);
|
|
82
|
-
assertGate(proof.lane_supervisor_integrated === true && supervisor.schema === 'sks.zellij-lane-supervisor.v1', `${gate} Zellij supervisor must be integrated`, { proof, supervisor });
|
|
83
|
-
assertGate(proof.zellij_lane_no_flicker_verified === true, `${gate} Zellij no-flicker proof must pass`, proof);
|
|
84
|
-
assertGate(proof.real_route_command_used === true, `${gate} must use real route command`, proof);
|
|
85
|
-
assertGate(String(proof.route_command || '').includes(expected.command), `${gate} proof route command mismatch`, proof);
|
|
86
|
-
assertGate(proof.route_blackbox_kind === expected.kind, `${gate} proof route blackbox kind mismatch`, proof);
|
|
87
|
-
if (expected.route !== '$Agent') {
|
|
88
|
-
assertGate(!/\bagent\s+run\b/i.test(String(proof.route_command || '')), `${gate} must not use agent run stand-in`, proof);
|
|
89
|
-
}
|
|
90
|
-
emitGate(gate, {
|
|
91
|
-
route: expected.route,
|
|
92
|
-
command: proof.route_command,
|
|
93
|
-
mission_id: json.mission_id,
|
|
94
|
-
target_active_slots: state.target_active_slots,
|
|
95
|
-
total_work_items: state.total_work_items,
|
|
96
|
-
expected_backfill_count: state.expected_backfill_count,
|
|
97
|
-
backfill_count: state.backfill_count,
|
|
98
|
-
generation_count: proof.generation_count
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
function runSks(args, gate) {
|
|
102
|
-
const result = spawnSync(process.execPath, ['dist/bin/sks.js', ...args], {
|
|
103
|
-
cwd: root,
|
|
104
|
-
encoding: 'utf8',
|
|
105
|
-
env: { ...process.env, SKS_AGENT_DYNAMIC_BACKFILL_FIXTURE: '1' },
|
|
106
|
-
maxBuffer: 1024 * 1024 * 16
|
|
107
|
-
});
|
|
108
|
-
assertGate(result.status === 0, `${gate} route command failed`, { args, stdout: result.stdout.slice(-4000), stderr: result.stderr.slice(-4000) });
|
|
109
|
-
return parseJson(result.stdout, gate);
|
|
110
|
-
}
|
|
111
|
-
function parseJson(stdout, gate) {
|
|
112
|
-
try {
|
|
113
|
-
return JSON.parse(stdout);
|
|
114
|
-
}
|
|
115
|
-
catch (err) {
|
|
116
|
-
const start = stdout.indexOf('{');
|
|
117
|
-
const end = stdout.lastIndexOf('}');
|
|
118
|
-
if (start >= 0 && end > start)
|
|
119
|
-
return JSON.parse(stdout.slice(start, end + 1));
|
|
120
|
-
assertGate(false, `${gate} did not emit JSON`, { stdout: stdout.slice(-4000), error: String(err) });
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
function readMissionJson(missionId, rel) {
|
|
124
|
-
return readJson(path.join(root, '.sneakoscope', 'missions', missionId, rel));
|
|
125
|
-
}
|
|
126
|
-
function readJson(file) {
|
|
127
|
-
return JSON.parse(fs.readFileSync(file, 'utf8'));
|
|
128
|
-
}
|
|
129
|
-
function readJsonl(file) {
|
|
130
|
-
return fs.readFileSync(file, 'utf8').trim().split(/\n+/).filter(Boolean).map((line) => JSON.parse(line));
|
|
131
|
-
}
|
|
132
|
-
//# sourceMappingURL=agent-route-blackbox-lib.js.map
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import os from 'node:os';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { spawnSync } from 'node:child_process';
|
|
7
|
-
import { pathToFileURL } from 'node:url';
|
|
8
|
-
import { currentDistFreshness } from './lib/ensure-dist-fresh.js';
|
|
9
|
-
const root = process.cwd();
|
|
10
|
-
const npmBin = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
11
|
-
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-command-import-smoke-'));
|
|
12
|
-
const cache = path.join(tmp, 'npm-cache');
|
|
13
|
-
const consumer = path.join(tmp, 'consumer');
|
|
14
|
-
const pkg = JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8'));
|
|
15
|
-
const failures = [];
|
|
16
|
-
const rows = [];
|
|
17
|
-
fs.mkdirSync(consumer, { recursive: true });
|
|
18
|
-
fs.writeFileSync(path.join(consumer, 'package.json'), `${JSON.stringify({ name: 'sks-command-smoke-consumer', private: true }, null, 2)}\n`);
|
|
19
|
-
try {
|
|
20
|
-
if (process.env.SKS_ENSURE_DIST_NO_REBUILD === '1' || process.env.SKS_RELEASE_DIST_FRESHNESS_NO_REBUILD === '1') {
|
|
21
|
-
const freshness = currentDistFreshness();
|
|
22
|
-
rows.push({ label: 'dist_freshness', ok: freshness.ok, status: freshness.ok ? 0 : 1, issues: freshness.issues });
|
|
23
|
-
if (!freshness.ok)
|
|
24
|
-
failures.push(`dist_not_fresh:${freshness.issues.join(',')}`);
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
run('build', npmBin, ['run', 'build'], { cwd: root });
|
|
28
|
-
}
|
|
29
|
-
const pack = run('npm_pack', npmBin, ['pack', '--json', '--ignore-scripts', '--pack-destination', tmp, '--registry', 'https://registry.npmjs.org/'], { cwd: root });
|
|
30
|
-
const info = pack.ok ? JSON.parse(pack.stdout || '[]')[0] : null;
|
|
31
|
-
const tarball = info ? path.join(tmp, info.filename) : null;
|
|
32
|
-
if (tarball)
|
|
33
|
-
extractPackedTarball(tarball);
|
|
34
|
-
const pkgRoot = path.join(consumer, 'node_modules', 'sneakoscope');
|
|
35
|
-
if (!fs.existsSync(pkgRoot))
|
|
36
|
-
failures.push('installed_package_missing');
|
|
37
|
-
else
|
|
38
|
-
await smokeCommands(pkgRoot);
|
|
39
|
-
}
|
|
40
|
-
finally {
|
|
41
|
-
if (failures.length && process.argv.includes('--keep')) {
|
|
42
|
-
// Keep temp root for debugging only when explicitly requested.
|
|
43
|
-
}
|
|
44
|
-
else if (!process.argv.includes('--keep')) {
|
|
45
|
-
fs.rmSync(tmp, { recursive: true, force: true });
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
const result = {
|
|
49
|
-
schema: 'sks.blackbox-command-import-smoke.v1',
|
|
50
|
-
ok: failures.length === 0,
|
|
51
|
-
temp_root: failures.length && process.argv.includes('--keep') ? tmp : null,
|
|
52
|
-
rows,
|
|
53
|
-
failures
|
|
54
|
-
};
|
|
55
|
-
console.log(JSON.stringify(result, null, 2));
|
|
56
|
-
if (!result.ok)
|
|
57
|
-
process.exitCode = 1;
|
|
58
|
-
function run(label, cmd, args, options = {}) {
|
|
59
|
-
const result = spawnSync(cmd, args, {
|
|
60
|
-
cwd: options.cwd || root,
|
|
61
|
-
encoding: 'utf8',
|
|
62
|
-
timeout: options.timeout || 120_000,
|
|
63
|
-
env: childNpmEnv(options.env)
|
|
64
|
-
});
|
|
65
|
-
const row = {
|
|
66
|
-
label,
|
|
67
|
-
command: [cmd, ...args].join(' '),
|
|
68
|
-
status: result.status,
|
|
69
|
-
ok: result.status === 0,
|
|
70
|
-
stdout: result.stdout || '',
|
|
71
|
-
stderr_tail: String(result.stderr || '').slice(-800)
|
|
72
|
-
};
|
|
73
|
-
rows.push({ ...row, stdout: undefined });
|
|
74
|
-
if (!row.ok)
|
|
75
|
-
failures.push(`${label}:${row.stderr_tail || result.stdout}`);
|
|
76
|
-
return row;
|
|
77
|
-
}
|
|
78
|
-
function childNpmEnv(extra = {}) {
|
|
79
|
-
const env = { ...process.env, npm_config_cache: cache, SKS_SKIP_NPM_FRESHNESS_CHECK: '1', CI: 'true', ...extra };
|
|
80
|
-
delete env.npm_config_dry_run;
|
|
81
|
-
delete env.NPM_CONFIG_DRY_RUN;
|
|
82
|
-
return env;
|
|
83
|
-
}
|
|
84
|
-
function extractPackedTarball(tarball) {
|
|
85
|
-
const pkgRoot = path.join(consumer, 'node_modules', 'sneakoscope');
|
|
86
|
-
fs.mkdirSync(pkgRoot, { recursive: true });
|
|
87
|
-
const stripFlag = process.platform === 'win32' ? '--strip-components=1' : '--strip-components';
|
|
88
|
-
const args = process.platform === 'win32'
|
|
89
|
-
? ['-xzf', tarball, '-C', pkgRoot, stripFlag]
|
|
90
|
-
: ['-xzf', tarball, '-C', pkgRoot, stripFlag, '1'];
|
|
91
|
-
const extracted = run('extract_pack_tarball', 'tar', args, { cwd: consumer });
|
|
92
|
-
if (!extracted.ok)
|
|
93
|
-
return;
|
|
94
|
-
linkRuntimeDependencies(pkgRoot);
|
|
95
|
-
}
|
|
96
|
-
function linkRuntimeDependencies(pkgRoot) {
|
|
97
|
-
const deps = Object.keys(pkg.dependencies || {});
|
|
98
|
-
if (!deps.length)
|
|
99
|
-
return;
|
|
100
|
-
const nodeModules = path.join(pkgRoot, 'node_modules');
|
|
101
|
-
fs.mkdirSync(nodeModules, { recursive: true });
|
|
102
|
-
for (const dep of deps) {
|
|
103
|
-
const source = path.join(root, 'node_modules', dep);
|
|
104
|
-
const target = path.join(nodeModules, dep);
|
|
105
|
-
if (!fs.existsSync(source)) {
|
|
106
|
-
failures.push(`dependency_missing:${dep}`);
|
|
107
|
-
continue;
|
|
108
|
-
}
|
|
109
|
-
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
110
|
-
try {
|
|
111
|
-
fs.symlinkSync(source, target, process.platform === 'win32' ? 'junction' : 'dir');
|
|
112
|
-
rows.push({ label: `link_dependency:${dep}`, ok: true, status: 0 });
|
|
113
|
-
}
|
|
114
|
-
catch (err) {
|
|
115
|
-
failures.push(`dependency_link_failed:${dep}:${err.message}`);
|
|
116
|
-
rows.push({ label: `link_dependency:${dep}`, ok: false, status: 1, stderr_tail: String(err.message).slice(-800) });
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
async function smokeCommands(pkgRoot) {
|
|
121
|
-
const registryPath = path.join(pkgRoot, 'dist', 'cli', 'command-registry.js');
|
|
122
|
-
if (!fs.existsSync(registryPath)) {
|
|
123
|
-
failures.push('dist_cli_command_registry_missing');
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
const registry = await import(pathToFileURL(registryPath));
|
|
127
|
-
const names = registry.commandNames();
|
|
128
|
-
for (const name of names) {
|
|
129
|
-
const entry = registry.COMMANDS[name];
|
|
130
|
-
try {
|
|
131
|
-
const mod = await entry.lazy();
|
|
132
|
-
const runner = mod.run || mod.main || mod.default;
|
|
133
|
-
if (typeof runner !== 'function')
|
|
134
|
-
failures.push(`${name}:runner_missing`);
|
|
135
|
-
rows.push({ label: `lazy_import:${name}`, ok: typeof runner === 'function', status: typeof runner === 'function' ? 0 : 1 });
|
|
136
|
-
}
|
|
137
|
-
catch (err) {
|
|
138
|
-
failures.push(`${name}:${err.stack || err.message}`);
|
|
139
|
-
rows.push({ label: `lazy_import:${name}`, ok: false, status: 1, stderr_tail: String(err.stack || err.message).slice(-800) });
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
//# sourceMappingURL=blackbox-command-import-smoke.js.map
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
import fs from 'node:fs';
|
|
4
|
-
import os from 'node:os';
|
|
5
|
-
import path from 'node:path';
|
|
6
|
-
import { spawnSync } from 'node:child_process';
|
|
7
|
-
import { fileURLToPath } from 'node:url';
|
|
8
|
-
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', '..');
|
|
9
|
-
const json = process.argv.includes('--json');
|
|
10
|
-
const dryRun = process.argv.includes('--dry-run');
|
|
11
|
-
const keep = process.argv.includes('--keep');
|
|
12
|
-
const npmBin = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
|
13
|
-
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'sks-blackbox-global-'));
|
|
14
|
-
const prefix = path.join(tmp, 'prefix');
|
|
15
|
-
const cache = path.join(tmp, 'npm-cache');
|
|
16
|
-
const binDir = process.platform === 'win32' ? prefix : path.join(prefix, 'bin');
|
|
17
|
-
const shim = path.join(binDir, process.platform === 'win32' ? 'sks.cmd' : 'sks');
|
|
18
|
-
const sneakoscopeShim = path.join(binDir, process.platform === 'win32' ? 'sneakoscope.cmd' : 'sneakoscope');
|
|
19
|
-
const steps = [];
|
|
20
|
-
function run(label, cmd, args, options = {}) {
|
|
21
|
-
const result = dryRun
|
|
22
|
-
? { status: 0, signal: null, stdout: '', stderr: '' }
|
|
23
|
-
: spawnSync(cmd, args, {
|
|
24
|
-
cwd: options.cwd || root,
|
|
25
|
-
encoding: 'utf8',
|
|
26
|
-
timeout: options.timeout || 120_000,
|
|
27
|
-
env: childNpmEnv(options.env)
|
|
28
|
-
});
|
|
29
|
-
const row = {
|
|
30
|
-
label,
|
|
31
|
-
command: [cmd, ...args].join(' '),
|
|
32
|
-
cwd: options.cwd || root,
|
|
33
|
-
status: result.status,
|
|
34
|
-
ok: result.status === 0,
|
|
35
|
-
stdout_bytes: Buffer.byteLength(result.stdout || ''),
|
|
36
|
-
stderr_bytes: Buffer.byteLength(result.stderr || ''),
|
|
37
|
-
stderr_tail: String(result.stderr || '').slice(-800)
|
|
38
|
-
};
|
|
39
|
-
steps.push(row);
|
|
40
|
-
return { ...row, stdout: result.stdout || '', stderr: result.stderr || '' };
|
|
41
|
-
}
|
|
42
|
-
function childNpmEnv(extra = {}) {
|
|
43
|
-
const env = { ...process.env, npm_config_cache: cache, npm_config_prefix: prefix, SKS_SKIP_NPM_FRESHNESS_CHECK: '1', CI: 'true', ...extra };
|
|
44
|
-
delete env.npm_config_dry_run;
|
|
45
|
-
delete env.NPM_CONFIG_DRY_RUN;
|
|
46
|
-
return env;
|
|
47
|
-
}
|
|
48
|
-
let tarball = dryRun ? path.join(tmp, 'sneakoscope-0.0.0.tgz') : null;
|
|
49
|
-
const pack = run('npm_pack', npmBin, ['pack', '--json', '--ignore-scripts', '--pack-destination', tmp, '--registry', 'https://registry.npmjs.org/']);
|
|
50
|
-
if (pack.ok && !dryRun) {
|
|
51
|
-
const info = JSON.parse(pack.stdout)[0];
|
|
52
|
-
tarball = path.join(tmp, info.filename);
|
|
53
|
-
}
|
|
54
|
-
if (pack.ok)
|
|
55
|
-
run('npm_install_global_prefix', npmBin, ['install', '--global', '--prefix', prefix, '--no-audit', '--no-fund', tarball]);
|
|
56
|
-
if (steps.at(-1)?.ok)
|
|
57
|
-
run('global_shim_version', shim, ['--version'], { cwd: tmp, env: pathEnv() });
|
|
58
|
-
if (steps.at(-1)?.ok)
|
|
59
|
-
run('global_sneakoscope_version', sneakoscopeShim, ['--version'], { cwd: tmp, env: pathEnv() });
|
|
60
|
-
if (steps.at(-1)?.ok)
|
|
61
|
-
run('global_sks_root_json', shim, ['root', '--json'], { cwd: tmp, env: pathEnv() });
|
|
62
|
-
if (!keep)
|
|
63
|
-
fs.rmSync(tmp, { recursive: true, force: true });
|
|
64
|
-
const result = { schema: 'sks.blackbox-global-shim.v1', ok: steps.every((step) => step.ok), dry_run: dryRun, temp_root: keep ? tmp : null, steps };
|
|
65
|
-
if (json)
|
|
66
|
-
console.log(JSON.stringify(result, null, 2));
|
|
67
|
-
else {
|
|
68
|
-
console.log(`Blackbox global shim: ${result.ok ? 'ok' : 'blocked'}${dryRun ? ' (dry-run)' : ''}`);
|
|
69
|
-
for (const step of steps)
|
|
70
|
-
console.log(`- ${step.ok ? 'ok' : 'blocked'} ${step.label}`);
|
|
71
|
-
}
|
|
72
|
-
if (!result.ok)
|
|
73
|
-
process.exitCode = 1;
|
|
74
|
-
function pathEnv() {
|
|
75
|
-
return { PATH: `${binDir}${path.delimiter}${process.env.PATH || ''}` };
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=blackbox-global-shim.js.map
|