sneakoscope 6.0.3 → 6.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 +29 -12
- package/config/codex-releases/{rust-v0.142.0.json → rust-v0.144.1.json} +6 -6
- package/crates/sks-core/Cargo.lock +1 -1
- package/crates/sks-core/Cargo.toml +1 -1
- package/dist/bin/fast-inline.js +18 -14
- package/dist/bin/sks-dispatch.js +2 -4
- package/dist/cli/args.js +2 -0
- package/dist/cli/command-manifest-lite.js +2 -3
- package/dist/cli/command-registry.js +3 -4
- package/dist/cli/help-fast.js +1 -1
- package/dist/cli/install-helpers.js +348 -763
- package/dist/cli/install-tool-helpers.js +287 -0
- package/dist/cli/router.js +91 -6
- package/dist/commands/codex-lb.js +188 -53
- package/dist/commands/codex.js +44 -5
- package/dist/commands/doctor.js +302 -46
- package/dist/commands/tmux.js +5 -1
- package/dist/commands/versioning.js +7 -0
- package/dist/commands/zellij-monitor-pane.js +2 -0
- package/dist/commands/zellij-viewport-pane.js +3 -1
- package/dist/commands/zellij.js +1 -1
- package/dist/config/skills-manifest.json +59 -59
- package/dist/core/agent-bridge/agent-manifest.js +48 -0
- package/dist/core/agents/agent-central-ledger.js +9 -0
- package/dist/core/agents/agent-cleanup-executor.js +334 -41
- package/dist/core/agents/agent-cleanup.js +20 -1
- package/dist/core/agents/agent-command-surface.js +3 -1
- package/dist/core/agents/agent-effort-policy.js +30 -38
- package/dist/core/agents/agent-janitor.js +9 -10
- package/dist/core/agents/agent-namespace-safety.js +56 -0
- package/dist/core/agents/agent-orchestrator.js +25 -3
- package/dist/core/agents/agent-output-validator.js +1 -1
- package/dist/core/agents/agent-plan.js +100 -21
- package/dist/core/agents/agent-role-config.js +43 -49
- package/dist/core/agents/agent-runner-codex-exec.js +18 -3
- package/dist/core/agents/agent-runner-process.js +1 -0
- package/dist/core/agents/agent-schema.js +3 -2
- package/dist/core/agents/fast-mode-policy.js +3 -5
- package/dist/core/agents/native-cli-session-swarm.js +1 -1
- package/dist/core/agents/native-worker-backend-router.js +2 -1
- package/dist/core/agents/work-partition/repo-inventory.js +68 -7
- package/dist/core/agents/zellij-right-lane-cockpit.js +2 -2
- package/dist/core/code-structure.js +5 -4
- package/dist/core/codex/agent-config-file-repair.js +94 -193
- package/dist/core/codex/codex-cli-update.js +723 -0
- package/dist/core/codex/codex-config-guard.js +38 -11
- package/dist/core/codex/codex-project-config-policy.js +3 -6
- package/dist/core/codex/codex-startup-config-postcheck.js +52 -42
- package/dist/core/codex-adapter.js +35 -22
- package/dist/core/codex-app/codex-agent-role-sync.js +13 -54
- package/dist/core/codex-app/codex-app-fast-ui-repair.js +51 -20
- package/dist/core/codex-app/codex-app-launcher.js +48 -17
- package/dist/core/codex-app/codex-app-restart.js +23 -2
- package/dist/core/codex-app/codex-app-ui-state-snapshot.js +11 -3
- package/dist/core/codex-app/sks-menubar.js +136 -5
- package/dist/core/codex-app.js +35 -14
- package/dist/core/codex-compat/codex-hook-warning-detector.js +10 -1
- package/dist/core/codex-compat/codex-release-manifest.js +6 -6
- package/dist/core/codex-control/codex-0139-doctor-real-probe.js +7 -1
- package/dist/core/codex-control/codex-0139-image-path-real-probe.js +29 -12
- package/dist/core/codex-control/codex-0139-probe-runner.js +103 -28
- package/dist/core/codex-control/codex-0139-real-probe-summary.js +7 -3
- package/dist/core/codex-control/codex-0139-real-probes.js +21 -6
- package/dist/core/codex-control/codex-0139-sandbox-real-probe.js +39 -13
- package/dist/core/codex-control/codex-0139-web-search-probe.js +28 -14
- package/dist/core/codex-control/{codex-0142-capability.js → codex-0144-capability.js} +22 -22
- package/dist/core/codex-control/codex-0144-collab-agent-real-probe.js +63 -0
- package/dist/core/codex-control/codex-lb-launch-recovery.js +278 -0
- package/dist/core/codex-control/codex-multi-agent-event-normalizer.js +5 -1
- package/dist/core/codex-control/codex-reliability-shield.js +93 -30
- package/dist/core/codex-control/codex-sdk-adapter.js +96 -13
- package/dist/core/codex-control/codex-sdk-config-policy.js +2 -1
- package/dist/core/codex-control/codex-sdk-sandbox-policy.js +6 -3
- package/dist/core/codex-control/codex-task-runner.js +62 -9
- package/dist/core/codex-control/python-codex-sdk-adapter.js +30 -3
- package/dist/core/codex-exec-output-schema.js +35 -6
- package/dist/core/codex-lb/codex-lb-env.js +30 -1
- package/dist/core/codex-lb/codex-lb-tool-catalog.js +478 -0
- package/dist/core/codex-lb/codex-lb-tool-output-recovery.js +291 -0
- package/dist/core/codex-native/codex-native-feature-broker.js +31 -38
- package/dist/core/codex-native/codex-native-feature-matrix.js +2 -2
- package/dist/core/codex-native/codex-native-repair-transaction.js +1 -1
- package/dist/core/codex-native/core-skill-manifest.js +8 -4
- package/dist/core/codex-native/native-capability-postcheck.js +16 -8
- package/dist/core/codex-native/native-capability-repair-matrix.js +76 -27
- package/dist/core/codex-plugins/codex-plugin-json.js +67 -21
- package/dist/core/codex-plugins/codex-plugin-repair.js +118 -0
- package/dist/core/codex-runtime/codex-desktop-config-policy.js +305 -0
- package/dist/core/commands/agent-bridge-command.js +23 -2
- package/dist/core/commands/agent-command.js +38 -5
- package/dist/core/commands/basic-cli.js +77 -30
- package/dist/core/commands/command-utils.js +1 -1
- package/dist/core/commands/gc-command.js +27 -4
- package/dist/core/commands/image-ux-review-command.js +55 -24
- package/dist/core/commands/mad-sks-command.js +182 -137
- package/dist/core/commands/naruto-command.js +643 -1153
- package/dist/core/commands/pipeline-command.js +1 -0
- package/dist/core/commands/research-command.js +293 -231
- package/dist/core/commands/run-command.js +100 -23
- package/dist/core/commands/team-command.js +2 -3
- package/dist/core/commands/team-legacy-observe-command.js +94 -359
- package/dist/core/commands/wiki-command.js +179 -83
- package/dist/core/computer-use-live-evidence.js +166 -3
- package/dist/core/computer-use-status.js +5 -2
- package/dist/core/daemon/sksd-hook-daemon-entrypoint.js +2 -2
- package/dist/core/daemon/sksd-hook-daemon.js +171 -28
- package/dist/core/daemon/sksd-hook-dispatch.js +2 -2
- package/dist/core/db-safety.js +2 -2
- package/dist/core/decision-lattice.js +6 -6
- package/dist/core/dfix/verification-selector.js +6 -4
- package/dist/core/doctor/browser-use-repair.js +54 -13
- package/dist/core/doctor/codex-0139-doctor.js +3 -2
- package/dist/core/doctor/codex-startup-config-repair.js +8 -3
- package/dist/core/doctor/computer-use-repair.js +28 -39
- package/dist/core/doctor/doctor-codex-startup-repair.js +24 -149
- package/dist/core/doctor/doctor-context7-repair.js +1 -1
- package/dist/core/doctor/doctor-dirty-planner.js +1 -1
- package/dist/core/doctor/doctor-native-capability-repair.js +74 -3
- package/dist/core/doctor/imagegen-repair.js +47 -12
- package/dist/core/doctor/legacy-global-hook-cleanup.js +179 -0
- package/dist/core/feature-fixture-executor.js +71 -7
- package/dist/core/feature-fixture-runner.js +53 -12
- package/dist/core/feature-fixtures.js +47 -14
- package/dist/core/feature-registry.js +53 -58
- package/dist/core/fsx.js +54 -6
- package/dist/core/harness-conflicts.js +19 -10
- package/dist/core/hooks-runtime/code-pack-freshness-preflight.js +5 -4
- package/dist/core/hooks-runtime/hook-invocation-dedupe.js +147 -0
- package/dist/core/hooks-runtime/hook-io.js +14 -4
- package/dist/core/hooks-runtime/light-turn.js +70 -0
- package/dist/core/hooks-runtime/payload-signals.js +270 -0
- package/dist/core/hooks-runtime/team-digest.js +0 -1
- package/dist/core/hooks-runtime/tool-output-quarantine.js +93 -0
- package/dist/core/hooks-runtime.js +418 -250
- package/dist/core/image/image-artifact-path-contract.js +8 -6
- package/dist/core/image/image-artifact-registry.js +5 -1
- package/dist/core/image-ux-review/imagegen-adapter.js +5 -2
- package/dist/core/imagegen/imagegen-capability.js +10 -13
- package/dist/core/imagegen/require-imagegen.js +37 -11
- package/dist/core/init/skills.js +16 -30
- package/dist/core/init.js +144 -36
- package/dist/core/managed-assets/managed-assets-manifest.js +417 -14
- package/dist/core/mission.js +24 -1
- package/dist/core/naruto/naruto-work-graph.js +70 -4
- package/dist/core/ops/reporting.js +3 -0
- package/dist/core/pipeline-internals/runtime-core.js +578 -180
- package/dist/core/pipeline-internals/runtime-gates.js +191 -49
- package/dist/core/ppt/style-tokens.js +1 -1
- package/dist/core/ppt-review/index.js +1 -1
- package/dist/core/ppt-review/slide-exporter.js +23 -17
- package/dist/core/ppt-review/slide-imagegen-review.js +1 -1
- package/dist/core/ppt-review/slide-issue-extraction.js +4 -2
- package/dist/core/preflight/parallel-preflight-engine.js +50 -1
- package/dist/core/product-design-plugin.js +2 -2
- package/dist/core/proof/route-finalizer.js +1 -1
- package/dist/core/proof/route-proof-gate.js +7 -2
- package/dist/core/proof-field.js +3 -3
- package/dist/core/provider/model-router.js +38 -32
- package/dist/core/recallpulse/policy.js +12 -28
- package/dist/core/recallpulse.js +11 -6
- package/dist/core/release/gate-manifest.js +18 -12
- package/dist/core/release/gate-pack-manifest.js +1 -1
- package/dist/core/release/npm-pack-proof.js +247 -0
- package/dist/core/release/package-dist-snapshot.js +151 -0
- package/dist/core/release/package-size-budget.js +5 -0
- package/dist/core/release/release-authorization-snapshot.js +115 -0
- package/dist/core/release/release-gate-affected-selector.js +15 -3
- package/dist/core/release/release-gate-cache-v2.js +30 -0
- package/dist/core/release/release-gate-contract.js +161 -0
- package/dist/core/release/release-gate-dag.js +44 -3
- package/dist/core/release/release-gate-hermetic-env.js +28 -17
- package/dist/core/release/release-real-contract.js +496 -0
- package/dist/core/release-parallel-full-coverage.js +31 -143
- package/dist/core/research/claim-evidence-matrix.js +41 -6
- package/dist/core/research/experiment-plan.js +14 -10
- package/dist/core/research/falsification.js +9 -2
- package/dist/core/research/implementation-blueprint-densifier.js +82 -60
- package/dist/core/research/implementation-blueprint.js +32 -26
- package/dist/core/research/mock-result.js +122 -11
- package/dist/core/research/replication-pack.js +15 -8
- package/dist/core/research/research-adversarial-review.js +1068 -0
- package/dist/core/research/research-claim-builder.js +69 -17
- package/dist/core/research/research-claim-synthesizer.js +343 -0
- package/dist/core/research/research-cycle-runner.js +53 -3
- package/dist/core/research/research-falsification-runner.js +176 -0
- package/dist/core/research/research-final-reviewer.js +44 -125
- package/dist/core/research/research-realistic-report.js +14 -6
- package/dist/core/research/research-review-artifact-digest.js +66 -0
- package/dist/core/research/research-source-evidence.js +144 -0
- package/dist/core/research/research-source-layer-catalog.js +68 -0
- package/dist/core/research/research-source-ledger-merge.js +250 -12
- package/dist/core/research/research-source-shards.js +26 -70
- package/dist/core/research/research-stage-runner.js +237 -247
- package/dist/core/research/research-super-search.js +184 -0
- package/dist/core/research/research-synthesis-prompt.js +20 -1
- package/dist/core/research/research-synthesis-writer.js +86 -5
- package/dist/core/research/research-work-graph.js +25 -18
- package/dist/core/research/source-quality-report.js +21 -0
- package/dist/core/research.js +429 -280
- package/dist/core/retention/retention-budget.js +25 -6
- package/dist/core/retention.js +980 -101
- package/dist/core/routes/constants.js +1 -1
- package/dist/core/routes/dollar-manifest-lite.js +11 -11
- package/dist/core/routes/evidence.js +4 -4
- package/dist/core/routes/ppt-policy.js +1 -1
- package/dist/core/routes.js +92 -64
- package/dist/core/runtime/task-profile.js +66 -0
- package/dist/core/runtime/verification-budget.js +12 -0
- package/dist/core/secret-redaction.js +4 -0
- package/dist/core/security/high-risk-contracts.js +6 -6
- package/dist/core/stop-gate/stop-gate-check.js +49 -12
- package/dist/core/subagents/agent-catalog.js +215 -0
- package/dist/core/subagents/model-policy.js +118 -0
- package/dist/core/subagents/naruto-help-contract.js +40 -0
- package/dist/core/subagents/official-subagent-config.js +488 -0
- package/dist/core/subagents/official-subagent-preparation.js +251 -0
- package/dist/core/subagents/official-subagent-prompt.js +137 -0
- package/dist/core/subagents/official-subagent-runner.js +129 -0
- package/dist/core/subagents/subagent-evidence.js +663 -0
- package/dist/core/subagents/terminology.js +16 -0
- package/dist/core/subagents/thread-budget.js +21 -0
- package/dist/core/subagents/triwiki-attention.js +65 -0
- package/dist/core/super-search/runtime-helpers.js +173 -19
- package/dist/core/super-search/runtime.js +140 -15
- package/dist/core/super-search/source-records.js +49 -8
- package/dist/core/team-review-policy.js +15 -0
- package/dist/core/triwiki/code-pack.js +8 -2
- package/dist/core/triwiki/triwiki-cache-key.js +108 -29
- package/dist/core/triwiki/triwiki-module-card.js +1 -1
- package/dist/core/triwiki-attention.js +13 -6
- package/dist/core/triwiki-provenance.js +274 -0
- package/dist/core/triwiki-runtime.js +21 -7
- package/dist/core/triwiki-wrongness/wrongness-ledger.js +187 -61
- package/dist/core/triwiki-wrongness/wrongness-retrieval.js +11 -2
- package/dist/core/triwiki-wrongness/wrongness-trust-policy.js +2 -0
- package/dist/core/update-check.js +23 -15
- package/dist/core/version-manager.js +51 -1
- package/dist/core/version.js +1 -1
- package/dist/core/wiki-coordinate.js +128 -12
- package/dist/core/work-order-ledger.js +208 -10
- package/dist/core/zellij/zellij-command.js +12 -1
- package/dist/core/zellij/zellij-dashboard-pane.js +3 -3
- package/dist/core/zellij/zellij-fake-adapter.js +3 -1
- package/dist/core/zellij/zellij-launcher.js +51 -21
- package/dist/core/zellij/zellij-layout-builder.js +14 -5
- package/dist/core/zellij/zellij-official-subagent-activity.js +477 -0
- package/dist/core/zellij/zellij-official-subagent-telemetry.js +264 -0
- package/dist/core/zellij/zellij-pane-proof.js +32 -6
- package/dist/core/zellij/zellij-slot-pane-renderer.js +17 -5
- package/dist/core/zellij/zellij-slot-telemetry.js +15 -3
- package/dist/core/zellij/zellij-ui-mode.js +1 -1
- package/dist/core/zellij/zellij-viewport-binder.js +3 -0
- package/dist/core/zellij/zellij-worker-pane-manager.js +5 -3
- package/dist/scripts/agent-fast-mode-default-check.js +48 -29
- package/dist/scripts/agent-role-config-repair-check.js +34 -15
- package/dist/scripts/agent-wiki-context-proof-check.js +16 -2
- package/dist/scripts/all-feature-deep-completion-check.js +14 -4
- package/dist/scripts/architecture-guard-check.js +8 -1
- package/dist/scripts/build-dist.js +17 -5
- package/dist/scripts/canonical-test-runner.js +188 -0
- package/dist/scripts/check-command-module-budget.js +38 -16
- package/dist/scripts/check-legacy-free.js +1 -1
- package/dist/scripts/check-route-modularity.js +0 -1
- package/dist/scripts/check-ts-contracts.js +1 -1
- package/dist/scripts/codex-0139-interrupt-agent-check.js +5 -1
- package/dist/scripts/{codex-0142-app-server-v2-check.js → codex-0144-app-server-v2-check.js} +11 -10
- package/dist/scripts/{codex-0142-binary-identity-check.js → codex-0144-binary-identity-check.js} +4 -4
- package/dist/scripts/codex-0144-capability-check.js +21 -0
- package/dist/scripts/{codex-0139-real-probes-check.js → codex-0144-core-real-probes-check.js} +19 -5
- package/dist/scripts/{codex-0142-doctor-wiring-check.js → codex-0144-doctor-wiring-check.js} +6 -6
- package/dist/scripts/{codex-0142-manifest-check.js → codex-0144-manifest-check.js} +11 -3
- package/dist/scripts/{codex-0142-policy-check.js → codex-0144-policy-check.js} +2 -2
- package/dist/scripts/{codex-0142-thread-store-check.js → codex-0144-thread-store-check.js} +3 -3
- package/dist/scripts/codex-app-provider-model-ui-check.js +53 -19
- package/dist/scripts/codex-app-ui-preservation-check.js +35 -4
- package/dist/scripts/codex-control-all-pipelines-check.js +7 -3
- package/dist/scripts/codex-control-side-effect-scope-check.js +2 -2
- package/dist/scripts/codex-control-tool-output-continuity-audit-check.js +27 -0
- package/dist/scripts/codex-effort-auto-discovery-check.js +1 -1
- package/dist/scripts/codex-lb-fast-mode-truth-check.js +1 -0
- package/dist/scripts/{codex-lb-gpt55-fast-profile-check.js → codex-lb-gpt56-fast-profile-check.js} +56 -5
- package/dist/scripts/codex-model-metadata-check.js +1 -1
- package/dist/scripts/codex-native-agent-role-content-check.js +15 -7
- package/dist/scripts/codex-native-repair-transaction-check.js +3 -1
- package/dist/scripts/codex-sdk-all-pipelines-check.js +7 -4
- package/dist/scripts/codex-sdk-research-pipeline-check.js +30 -8
- package/dist/scripts/codex-sdk-sandbox-policy-check.js +5 -1
- package/dist/scripts/codex-sdk-version-compat-check.js +2 -1
- package/dist/scripts/db-route-materialization-check.js +33 -0
- package/dist/scripts/dfix-fixture-check.js +1 -1
- package/dist/scripts/docs-truthfulness-check.js +4 -2
- package/dist/scripts/doctor-codex-startup-repair-check.js +47 -25
- package/dist/scripts/doctor-context7-repair-check.js +2 -1
- package/dist/scripts/doctor-fix-production-blackbox.js +12 -2
- package/dist/scripts/doctor-fixes-codex-app-fast-ui-check.js +34 -7
- package/dist/scripts/doctor-imagegen-repair-check.js +14 -4
- package/dist/scripts/doctor-startup-config-repair-blackbox.js +9 -3
- package/dist/scripts/doctor-startup-config-repair-check.js +13 -3
- package/dist/scripts/install-update-preserves-config-check.js +7 -2
- package/dist/scripts/legacy-gate-inventory-check.js +7 -5
- package/dist/scripts/legacy-strong-inventory-check.js +7 -5
- package/dist/scripts/legacy-upgrade-matrix-check.js +4 -4
- package/dist/scripts/lib/native-cli-session-swarm-check-lib.js +173 -13
- package/dist/scripts/mad-sks-app-ui-no-mutation-check.js +165 -6
- package/dist/scripts/managed-role-manifest-parity-check.js +5 -4
- package/dist/scripts/mutation-callsite-coverage-check.js +0 -11
- package/dist/scripts/naruto-codex-e2e-check.js +14 -7
- package/dist/scripts/naruto-shadow-clone-swarm-check.js +4 -201
- package/dist/scripts/npm-publish-performance-check.js +20 -12
- package/dist/scripts/official-subagent-workflow-check.js +145 -0
- package/dist/scripts/package-published-contract-check.js +6 -20
- package/dist/scripts/packlist-performance-check.js +17 -3
- package/dist/scripts/parallel-verification-engine-check.js +2 -2
- package/dist/scripts/postinstall-safe-side-effects-check.js +8 -3
- package/dist/scripts/ppt-no-mock-as-real-check.js +3 -1
- package/dist/scripts/prepublish-release-check-or-fast.js +23 -86
- package/dist/scripts/product-design-plugin-routing-check.js +1 -1
- package/dist/scripts/release-affected-selector-check.js +74 -1
- package/dist/scripts/release-check-stamp.js +324 -239
- package/dist/scripts/release-dag-full-coverage-check.js +7 -15
- package/dist/scripts/release-dynamic-presets-check.js +10 -1
- package/dist/scripts/release-gate-dag-runner-check.js +3 -3
- package/dist/scripts/release-gate-dag-runner.js +35 -11
- package/dist/scripts/release-gate-existence-audit.js +1 -2
- package/dist/scripts/release-gate-script-parity-check.js +1 -1
- package/dist/scripts/release-parallel-full-coverage-check.js +12 -6
- package/dist/scripts/release-parallel-speed-budget-check.js +18 -2
- package/dist/scripts/release-real-check.js +390 -157
- package/dist/scripts/release-registry-check.js +61 -16
- package/dist/scripts/release-runtime-truth-matrix-check.js +22 -0
- package/dist/scripts/research-blueprint-densifier-check.js +2 -2
- package/dist/scripts/research-real-cycle-no-legacy-final-md-check.js +11 -7
- package/dist/scripts/route-proof-artifact-structure-check.js +1 -0
- package/dist/scripts/search-visibility-gate-lib.js +1 -1
- package/dist/scripts/seo-geo-route-identity-check.js +30 -4
- package/dist/scripts/sizecheck.js +4 -4
- package/dist/scripts/sks-1-11-gate-lib.js +53 -6
- package/dist/scripts/sks-3-1-4-directive-check-lib.js +8 -2
- package/dist/scripts/sks-3-1-5-directive-check-lib.js +3 -2
- package/dist/scripts/sks-3-1-6-directive-check-lib.js +5 -3
- package/dist/scripts/sks-menubar-install-check.js +8 -0
- package/dist/scripts/sks-uninstall-regression-check.js +1 -1
- package/dist/scripts/sksd-daemon-check.js +16 -6
- package/dist/scripts/trust-fixture-check.js +32 -10
- package/dist/scripts/write-build-manifest.js +2 -1
- package/dist/scripts/wrongness-fixture-check.js +1 -1
- package/dist/scripts/zellij-layout-valid-check.js +36 -11
- package/dist/scripts/zellij-pane-proof-check.js +33 -2
- package/dist/scripts/zellij-real-session-cleanup-check.js +122 -2
- package/dist/scripts/zellij-real-session-launch-check.js +76 -5
- package/dist/scripts/zellij-slot-pane-renderer-check.js +4 -4
- package/dist/scripts/zellij-spawn-on-demand-layout-check.js +3 -3
- package/docs/demo.tape +1 -1
- package/infra-harness-gates.json +1486 -0
- package/package.json +32 -19
- package/release-gates.v2.json +4060 -0
- package/runtime-required-scripts.json +9 -0
- package/schemas/codex/{app-server-0.142 → app-server-0.144}/codex_app_server_protocol.v2.schemas.json +1146 -781
- package/schemas/codex/codex-0139-real-probe-result.schema.json +39 -5
- package/schemas/codex/ppt-slide-issue-ledger.schema.json +2 -1
- package/dist/commands/db.js +0 -6
- package/dist/core/codex-control/codex-0139-multi-agent-real-probe.js +0 -107
- package/dist/core/commands/db-command.js +0 -146
- package/dist/core/research/prompt.js +0 -15
- package/dist/scripts/agent-native-release-gate.js +0 -274
- package/dist/scripts/codex-0142-capability-check.js +0 -21
- package/dist/scripts/codex-control-tool-call-sequence-repair-check.js +0 -14
- package/dist/scripts/command-performance-scorecard-check.js +0 -204
- package/dist/scripts/config-managed-merge-callsite-coverage-check.js +0 -212
- package/dist/scripts/dollar-performance-scorecard-check.js +0 -257
- package/dist/scripts/gate-timing-check.js +0 -16
- package/dist/scripts/ops-maturity-scorecard-check.js +0 -12
- package/dist/scripts/performance-baseline-check.js +0 -12
- package/dist/scripts/performance-improvement-report-check.js +0 -58
- package/dist/scripts/release-parallel-check.js +0 -389
- package/dist/scripts/release-runner-efficiency-check.js +0 -15
- package/dist/scripts/retention-long-run-smoke-check.js +0 -299
- package/docs/assets/sneakoscope-architecture-pipeline.jpg +0 -0
|
@@ -1,30 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://sneakoscope.local/schemas/codex/codex-0139-real-probe-result.schema.json",
|
|
4
|
-
"title": "SKS Codex 0.
|
|
4
|
+
"title": "SKS Codex 0.144.1 core real probe result (0.139 contract lineage)",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"required": [
|
|
7
7
|
"schema",
|
|
8
|
+
"target_version",
|
|
9
|
+
"compatibility_origin",
|
|
10
|
+
"compatibility_authority",
|
|
8
11
|
"generated_at",
|
|
9
12
|
"codex_bin",
|
|
10
13
|
"version_text",
|
|
11
14
|
"parsed_version",
|
|
12
15
|
"require_real",
|
|
16
|
+
"release_authorizing",
|
|
13
17
|
"overall_ok",
|
|
14
18
|
"probe_timeout_ms",
|
|
19
|
+
"requested_probes",
|
|
15
20
|
"probes",
|
|
16
21
|
"skipped",
|
|
22
|
+
"warnings",
|
|
23
|
+
"external_integration_status",
|
|
24
|
+
"temp_cleanup",
|
|
17
25
|
"blockers"
|
|
18
26
|
],
|
|
19
27
|
"properties": {
|
|
20
28
|
"schema": { "const": "sks.codex-0139-real-probe-result.v1" },
|
|
29
|
+
"target_version": { "const": "0.144.1" },
|
|
30
|
+
"compatibility_origin": { "const": "codex-0139-real-probe-result-v1" },
|
|
31
|
+
"compatibility_authority": { "const": "deprecated_non_authoritative_lineage_only" },
|
|
21
32
|
"generated_at": { "type": "string" },
|
|
22
33
|
"codex_bin": { "type": ["string", "null"] },
|
|
23
34
|
"version_text": { "type": ["string", "null"] },
|
|
24
35
|
"parsed_version": { "type": ["string", "null"] },
|
|
25
36
|
"require_real": { "type": "boolean" },
|
|
37
|
+
"release_authorizing": { "type": "boolean" },
|
|
26
38
|
"overall_ok": { "type": "boolean" },
|
|
27
39
|
"probe_timeout_ms": { "type": "integer", "minimum": 1 },
|
|
40
|
+
"requested_probes": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
|
|
28
41
|
"probes": {
|
|
29
42
|
"type": "object",
|
|
30
43
|
"additionalProperties": false,
|
|
@@ -35,9 +48,9 @@
|
|
|
35
48
|
"marketplace_source_json",
|
|
36
49
|
"plugin_catalog_cache",
|
|
37
50
|
"sandbox_profile_alias",
|
|
38
|
-
"
|
|
51
|
+
"collab_agent_tool_schema",
|
|
39
52
|
"image_referenced_path",
|
|
40
|
-
"
|
|
53
|
+
"sandbox_proxy_environment"
|
|
41
54
|
],
|
|
42
55
|
"properties": {
|
|
43
56
|
"code_mode_web_search": { "$ref": "#/$defs/singleProbe" },
|
|
@@ -46,12 +59,32 @@
|
|
|
46
59
|
"marketplace_source_json": { "$ref": "#/$defs/singleProbe" },
|
|
47
60
|
"plugin_catalog_cache": { "$ref": "#/$defs/singleProbe" },
|
|
48
61
|
"sandbox_profile_alias": { "$ref": "#/$defs/singleProbe" },
|
|
49
|
-
"
|
|
62
|
+
"collab_agent_tool_schema": { "$ref": "#/$defs/singleProbe" },
|
|
50
63
|
"image_referenced_path": { "$ref": "#/$defs/singleProbe" },
|
|
51
|
-
"
|
|
64
|
+
"sandbox_proxy_environment": { "$ref": "#/$defs/singleProbe" }
|
|
52
65
|
}
|
|
53
66
|
},
|
|
54
67
|
"skipped": { "type": "array", "items": { "type": "string" } },
|
|
68
|
+
"warnings": { "type": "array", "items": { "type": "string" } },
|
|
69
|
+
"external_integration_status": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"required": ["mcp_auth", "release_authorization_scope"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"mcp_auth": { "enum": ["authentication_required", "not_observed"] },
|
|
74
|
+
"release_authorization_scope": { "const": "codex_core_compatibility_only" }
|
|
75
|
+
},
|
|
76
|
+
"additionalProperties": false
|
|
77
|
+
},
|
|
78
|
+
"temp_cleanup": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"required": ["root", "ok", "remaining_entries"],
|
|
81
|
+
"properties": {
|
|
82
|
+
"root": { "type": "string" },
|
|
83
|
+
"ok": { "type": "boolean" },
|
|
84
|
+
"remaining_entries": { "type": "array", "items": { "type": "string" } }
|
|
85
|
+
},
|
|
86
|
+
"additionalProperties": false
|
|
87
|
+
},
|
|
55
88
|
"blockers": { "type": "array", "items": { "type": "string" } }
|
|
56
89
|
},
|
|
57
90
|
"$defs": {
|
|
@@ -76,6 +109,7 @@
|
|
|
76
109
|
"stderr_tail": { "type": "string" },
|
|
77
110
|
"artifact_paths": { "type": "array", "items": { "type": "string" } },
|
|
78
111
|
"evidence": { "type": "object" },
|
|
112
|
+
"warnings": { "type": "array", "items": { "type": "string" } },
|
|
79
113
|
"blockers": { "type": "array", "items": { "type": "string" } }
|
|
80
114
|
},
|
|
81
115
|
"additionalProperties": false
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
"$id": "https://sneakoscope.local/schemas/ppt-slide-issue-ledger.schema.json",
|
|
4
4
|
"title": "SKS PPT Slide Issue Ledger",
|
|
5
5
|
"type": "object",
|
|
6
|
-
"required": ["schema", "schema_version", "created_at", "issues", "issue_count", "blockers", "validation", "passed"],
|
|
6
|
+
"required": ["schema", "schema_version", "created_at", "issues", "issue_count", "blocking_issue_count", "blockers", "validation", "passed"],
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"properties": {
|
|
9
9
|
"schema": { "const": "sks.ppt-slide-issue-ledger.v1" },
|
|
10
10
|
"schema_version": { "const": 1 },
|
|
11
11
|
"created_at": { "type": "string" },
|
|
12
12
|
"issue_count": { "type": "integer", "minimum": 0 },
|
|
13
|
+
"blocking_issue_count": { "type": "integer", "minimum": 0 },
|
|
13
14
|
"blockers": { "type": "array", "items": { "type": "string" } },
|
|
14
15
|
"passed": { "type": "boolean" },
|
|
15
16
|
"extraction_source": { "type": "string" },
|
package/dist/commands/db.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { findCodexBinary } from '../codex-adapter.js';
|
|
3
|
-
import { ensureDir, runProcess, writeJsonAtomic } from '../fsx.js';
|
|
4
|
-
import { codex0139ProbeTail, skippedCodex0139Probe } from './codex-0139-real-probes.js';
|
|
5
|
-
export function normalizeCodex0139InterruptAgentEvent(event) {
|
|
6
|
-
const name = String(event?.tool || event?.item?.tool || event?.type || event?.event || event?.name || '');
|
|
7
|
-
return name === 'interrupt_agent' || name === 'close_agent' ? { ...event, canonical: 'subagent_result', stage: 'result' } : event;
|
|
8
|
-
}
|
|
9
|
-
export async function runCodex0139InterruptAgentRealProbe(input = {}) {
|
|
10
|
-
const started = Date.now();
|
|
11
|
-
if (process.env.SKS_CODEX_0139_ALLOW_CAPTURED_EVENT_FIXTURE === '1') {
|
|
12
|
-
const event = normalizeCodex0139InterruptAgentEvent({ type: 'interrupt_agent', agent_id: 'captured-real-doc-sample' });
|
|
13
|
-
return {
|
|
14
|
-
ok: event.stage === 'result',
|
|
15
|
-
mode: 'captured-real-fixture',
|
|
16
|
-
duration_ms: Date.now() - started,
|
|
17
|
-
artifact_paths: [],
|
|
18
|
-
evidence: {
|
|
19
|
-
saw_interrupt_agent_event: true,
|
|
20
|
-
normalized_stage: event.stage,
|
|
21
|
-
fixture_allowed_by_env: true
|
|
22
|
-
},
|
|
23
|
-
blockers: event.stage === 'result' ? [] : ['codex_interrupt_agent_normalization_failed']
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
const codexBin = input.codexBin || await findCodexBinary();
|
|
27
|
-
if (!codexBin)
|
|
28
|
-
return skippedCodex0139Probe('codex_cli_missing');
|
|
29
|
-
const root = input.root || process.cwd();
|
|
30
|
-
const tempDir = path.join(root, '.sneakoscope', 'tmp', 'codex-0139-real-probes', `interrupt-agent-${Date.now()}`);
|
|
31
|
-
await ensureDir(tempDir);
|
|
32
|
-
const prompt = 'No file edits. Spawn one tiny subagent named interrupt_probe that only says ready. Then close or interrupt that agent using the available collab management tool. Final answer exactly: interrupt probe done.';
|
|
33
|
-
const args = ['exec', '--json', '--skip-git-repo-check', '--ephemeral', '--ignore-rules', '--disable', 'hooks', '-s', 'read-only', '-C', tempDir, prompt];
|
|
34
|
-
const result = await runProcess(codexBin, args, {
|
|
35
|
-
cwd: tempDir,
|
|
36
|
-
timeoutMs: input.timeoutMs || 120000,
|
|
37
|
-
maxOutputBytes: 1024 * 1024
|
|
38
|
-
}).catch((err) => ({ code: 1, stdout: '', stderr: err?.message || String(err) }));
|
|
39
|
-
const events = parseJsonlEvents(`${result.stdout || ''}\n${result.stderr || ''}`);
|
|
40
|
-
const tools = events
|
|
41
|
-
.map((event) => String(event?.item?.tool || event?.tool || ''))
|
|
42
|
-
.filter(Boolean);
|
|
43
|
-
const sawSpawn = tools.includes('spawn_agent');
|
|
44
|
-
const sawInterrupt = tools.includes('interrupt_agent');
|
|
45
|
-
const sawClose = tools.includes('close_agent');
|
|
46
|
-
const closeOrInterruptEvent = events.find((event) => ['interrupt_agent', 'close_agent'].includes(String(event?.item?.tool || event?.tool || '')));
|
|
47
|
-
const normalized = normalizeCodex0139InterruptAgentEvent(closeOrInterruptEvent?.item || closeOrInterruptEvent || {});
|
|
48
|
-
const finalText = events.map((event) => String(event?.item?.text || '')).find((text) => /interrupt probe done/i.test(text)) || '';
|
|
49
|
-
const ok = result.code === 0 && sawSpawn && (sawInterrupt || sawClose) && normalized.stage === 'result';
|
|
50
|
-
const artifact = path.join(root, '.sneakoscope', 'codex-0139-interrupt-agent-real.json');
|
|
51
|
-
await writeJsonAtomic(artifact, {
|
|
52
|
-
schema: 'sks.codex-0139-interrupt-agent-real.v1',
|
|
53
|
-
ok,
|
|
54
|
-
generated_at: new Date().toISOString(),
|
|
55
|
-
command_line: [codexBin, ...args],
|
|
56
|
-
event_count: events.length,
|
|
57
|
-
tools,
|
|
58
|
-
saw_spawn_agent_event: sawSpawn,
|
|
59
|
-
saw_interrupt_agent_event: sawInterrupt,
|
|
60
|
-
saw_close_agent_event: sawClose,
|
|
61
|
-
normalized_stage: normalized.stage || null,
|
|
62
|
-
final_text_seen: Boolean(finalText),
|
|
63
|
-
stdout_tail: codex0139ProbeTail(result.stdout),
|
|
64
|
-
stderr_tail: codex0139ProbeTail(result.stderr)
|
|
65
|
-
});
|
|
66
|
-
return {
|
|
67
|
-
ok,
|
|
68
|
-
mode: 'actual-cli',
|
|
69
|
-
command_line: [codexBin, ...args],
|
|
70
|
-
duration_ms: Date.now() - started,
|
|
71
|
-
stdout_tail: codex0139ProbeTail(result.stdout),
|
|
72
|
-
stderr_tail: codex0139ProbeTail(result.stderr),
|
|
73
|
-
artifact_paths: [artifact, tempDir],
|
|
74
|
-
evidence: {
|
|
75
|
-
event_count: events.length,
|
|
76
|
-
collab_tools_seen: [...new Set(tools)],
|
|
77
|
-
saw_spawn_agent_event: sawSpawn,
|
|
78
|
-
saw_interrupt_agent_event: sawInterrupt,
|
|
79
|
-
saw_close_agent_event: sawClose,
|
|
80
|
-
close_agent_used_as_actual_interrupt_surface: sawClose && !sawInterrupt,
|
|
81
|
-
normalized_stage: normalized.stage || null,
|
|
82
|
-
final_text_seen: Boolean(finalText)
|
|
83
|
-
},
|
|
84
|
-
blockers: ok ? [] : [
|
|
85
|
-
...(result.code === 0 ? [] : ['codex_interrupt_agent_exec_failed']),
|
|
86
|
-
...(sawSpawn ? [] : ['codex_interrupt_agent_spawn_event_missing']),
|
|
87
|
-
...(sawInterrupt || sawClose ? [] : ['codex_interrupt_agent_or_close_event_missing']),
|
|
88
|
-
...(normalized.stage === 'result' ? [] : ['codex_interrupt_agent_normalization_failed'])
|
|
89
|
-
]
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
function parseJsonlEvents(text) {
|
|
93
|
-
return String(text || '')
|
|
94
|
-
.split(/\r?\n/)
|
|
95
|
-
.map((line) => line.trim())
|
|
96
|
-
.filter((line) => line.startsWith('{') && line.endsWith('}'))
|
|
97
|
-
.map((line) => {
|
|
98
|
-
try {
|
|
99
|
-
return JSON.parse(line);
|
|
100
|
-
}
|
|
101
|
-
catch {
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
})
|
|
105
|
-
.filter(Boolean);
|
|
106
|
-
}
|
|
107
|
-
//# sourceMappingURL=codex-0139-multi-agent-real-probe.js.map
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { readStdin, sksRoot, writeJsonAtomic } from '../fsx.js';
|
|
3
|
-
import { createMission } from '../mission.js';
|
|
4
|
-
import { checkDbOperation, checkSqlFile, classifyCommand, classifySql, loadDbSafetyPolicy, safeSupabaseMcpConfig, scanDbSafety } from '../db-safety.js';
|
|
5
|
-
import { maybeFinalizeRoute } from '../proof/auto-finalize.js';
|
|
6
|
-
import { recordDbSafetyMismatchWrongness } from '../triwiki-wrongness/wrongness-ledger.js';
|
|
7
|
-
import { flag, readOption } from './command-utils.js';
|
|
8
|
-
import { writeRouteCollaborationArtifacts } from '../agents/route-collaboration-ledger.js';
|
|
9
|
-
import { context7EvidenceStatus } from './route-success-helpers.js';
|
|
10
|
-
export async function dbCommand(sub, args = []) {
|
|
11
|
-
const root = await sksRoot();
|
|
12
|
-
if (sub === 'policy') {
|
|
13
|
-
console.log(JSON.stringify(await loadDbSafetyPolicy(root), null, 2));
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
if (sub === 'scan') {
|
|
17
|
-
const report = await scanDbSafety(root, { includeMigrations: flag(args, '--migrations') });
|
|
18
|
-
await finalizeDbCheck(root, { action: 'scan', args, result: report, exitCode: report.ok ? 0 : 2 });
|
|
19
|
-
console.log(JSON.stringify(report, null, 2));
|
|
20
|
-
process.exitCode = report.ok ? 0 : 2;
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (sub === 'mcp-config') {
|
|
24
|
-
const projectIdx = args.indexOf('--project-ref');
|
|
25
|
-
const featuresIdx = args.indexOf('--features');
|
|
26
|
-
const projectRef = projectIdx >= 0 ? args[projectIdx + 1] : '<project_ref>';
|
|
27
|
-
const features = featuresIdx >= 0 ? args[featuresIdx + 1] : 'database,docs';
|
|
28
|
-
console.log(JSON.stringify(safeSupabaseMcpConfig({ projectRef, readOnly: true, features }), null, 2));
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
if (sub === 'classify' || sub === 'check') {
|
|
32
|
-
const sqlIdx = args.indexOf('--sql');
|
|
33
|
-
const commandIdx = args.indexOf('--command');
|
|
34
|
-
const fileIdx = args.indexOf('--file');
|
|
35
|
-
let result;
|
|
36
|
-
if (fileIdx >= 0 && args[fileIdx + 1])
|
|
37
|
-
result = await checkSqlFile(path.resolve(args[fileIdx + 1]));
|
|
38
|
-
else if (commandIdx >= 0 && args[commandIdx + 1])
|
|
39
|
-
result = classifyCommand(args[commandIdx + 1]);
|
|
40
|
-
else if (sqlIdx >= 0 && args[sqlIdx + 1])
|
|
41
|
-
result = classifySql(args[sqlIdx + 1]);
|
|
42
|
-
else if (sub === 'check' && args[0])
|
|
43
|
-
result = await checkSqlFile(path.resolve(args[0]));
|
|
44
|
-
else
|
|
45
|
-
result = classifySql(args.join(' ').trim());
|
|
46
|
-
const blocked = ['destructive', 'write', 'possible_db'].includes(result.level);
|
|
47
|
-
const proof = await finalizeDbCheck(root, { action: sub, args, result, exitCode: blocked ? 2 : 0 });
|
|
48
|
-
const expected = readOption(args, '--expected', readOption(args, '--expect', null));
|
|
49
|
-
const wrongness = await recordDbExpectation(root, {
|
|
50
|
-
expected,
|
|
51
|
-
actual: blocked ? 'blocked' : 'safe',
|
|
52
|
-
command: `sks db ${sub} ${args.join(' ')}`.trim(),
|
|
53
|
-
sql: sqlIdx >= 0 ? args[sqlIdx + 1] : null,
|
|
54
|
-
mission_id: proof.proof?.mission_id,
|
|
55
|
-
artifact: proof.proof?.mission_id ? `.sneakoscope/missions/${proof.proof.mission_id}/db-operation-report.json` : null
|
|
56
|
-
});
|
|
57
|
-
const output = flag(args, '--json') ? { ...result, wrongness, completion_proof: { ok: proof.ok, validation: proof.validation, mission_id: proof.proof?.mission_id } } : result;
|
|
58
|
-
console.log(JSON.stringify(output, null, 2));
|
|
59
|
-
process.exitCode = blocked ? 2 : 0;
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (sub === 'scan-payload') {
|
|
63
|
-
const raw = await readStdin();
|
|
64
|
-
const payload = raw.trim() ? JSON.parse(raw) : {};
|
|
65
|
-
const decision = await checkDbOperation(root, {}, payload, { duringNoQuestion: false });
|
|
66
|
-
await finalizeDbCheck(root, { action: 'scan-payload', args, result: decision, exitCode: decision.action === 'block' ? 2 : 0 });
|
|
67
|
-
console.log(JSON.stringify(decision, null, 2));
|
|
68
|
-
process.exitCode = decision.action === 'block' ? 2 : 0;
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
console.error('Usage: sks db policy | db scan [--migrations] | db mcp-config --project-ref <id> | db check --sql "..." | db check --command "..." | db check --file file.sql');
|
|
72
|
-
process.exitCode = 1;
|
|
73
|
-
}
|
|
74
|
-
async function recordDbExpectation(root, input = {}) {
|
|
75
|
-
if (!input.expected)
|
|
76
|
-
return null;
|
|
77
|
-
const normalizedExpected = /block|deny|unsafe|destructive/i.test(String(input.expected)) ? 'blocked' : 'safe';
|
|
78
|
-
return recordDbSafetyMismatchWrongness(root, { ...input, expected: normalizedExpected });
|
|
79
|
-
}
|
|
80
|
-
async function finalizeDbCheck(root, { action, args, result, exitCode }) {
|
|
81
|
-
const prompt = `sks db ${action} ${args.join(' ')}`.trim();
|
|
82
|
-
const { id, dir } = await createMission(root, { mode: 'db', prompt });
|
|
83
|
-
const context7 = await context7EvidenceStatus(root, id);
|
|
84
|
-
const destructiveOperationZero = result.level !== 'destructive';
|
|
85
|
-
const blocked = exitCode !== 0 || result.action === 'block' || result.level === 'destructive' || !context7.ok;
|
|
86
|
-
const report = {
|
|
87
|
-
schema: 'sks.db-operation-report.v1',
|
|
88
|
-
mission_id: id,
|
|
89
|
-
action,
|
|
90
|
-
command: prompt,
|
|
91
|
-
result,
|
|
92
|
-
status: blocked ? 'blocked' : 'verified_partial',
|
|
93
|
-
db_safety: {
|
|
94
|
-
ok: !blocked,
|
|
95
|
-
level: result.level || result.risk || result.status || null,
|
|
96
|
-
action: result.action || action,
|
|
97
|
-
destructive_operation_zero: destructiveOperationZero,
|
|
98
|
-
destructive_blocked: !destructiveOperationZero || (blocked && /drop|delete|truncate|reset|destructive/i.test(JSON.stringify(result))),
|
|
99
|
-
context7_policy: context7.policy,
|
|
100
|
-
context7_evidence: context7.evidence
|
|
101
|
-
},
|
|
102
|
-
blockers: [
|
|
103
|
-
...(!destructiveOperationZero ? ['destructive_operation_found'] : []),
|
|
104
|
-
...(context7.ok ? [] : [context7.blocker])
|
|
105
|
-
]
|
|
106
|
-
};
|
|
107
|
-
await writeJsonAtomic(path.join(dir, 'db-operation-report.json'), report);
|
|
108
|
-
const gateBlockers = [
|
|
109
|
-
...(blocked && destructiveOperationZero ? ['db_operation_blocked'] : []),
|
|
110
|
-
...(!destructiveOperationZero ? ['destructive_operation_found'] : []),
|
|
111
|
-
...(context7.ok ? [] : [context7.blocker])
|
|
112
|
-
];
|
|
113
|
-
const gate = {
|
|
114
|
-
schema: 'sks.db-gate.v1',
|
|
115
|
-
schema_version: 1,
|
|
116
|
-
passed: !blocked,
|
|
117
|
-
ok: !blocked,
|
|
118
|
-
status: blocked ? 'blocked' : 'pass',
|
|
119
|
-
db_operation_report: 'db-operation-report.json',
|
|
120
|
-
destructive_operation_zero: destructiveOperationZero,
|
|
121
|
-
context7_policy: context7.policy,
|
|
122
|
-
context7_evidence: context7.evidence,
|
|
123
|
-
blockers: [...new Set(gateBlockers)]
|
|
124
|
-
};
|
|
125
|
-
await writeJsonAtomic(path.join(dir, 'db-gate.json'), gate);
|
|
126
|
-
const native = await writeRouteCollaborationArtifacts(root, {
|
|
127
|
-
missionId: id,
|
|
128
|
-
route: '$DB',
|
|
129
|
-
routeKey: 'DB-Review',
|
|
130
|
-
prompt: 'DB review native agent plan for read-only safety, schema scope, and proof closure.',
|
|
131
|
-
mode: 'DB'
|
|
132
|
-
});
|
|
133
|
-
const completion = await maybeFinalizeRoute(root, {
|
|
134
|
-
missionId: id,
|
|
135
|
-
route: '$DB',
|
|
136
|
-
gateFile: 'db-gate.json',
|
|
137
|
-
gate,
|
|
138
|
-
artifacts: ['db-operation-report.json', 'completion-proof.json', ...Object.values(native.artifacts || {})],
|
|
139
|
-
dbEvidence: report.db_safety,
|
|
140
|
-
statusHint: blocked ? 'blocked' : 'verified_partial',
|
|
141
|
-
blockers: gate.blockers,
|
|
142
|
-
command: { cmd: prompt, status: exitCode }
|
|
143
|
-
});
|
|
144
|
-
return { ...completion, native_agent_collaboration: native };
|
|
145
|
-
}
|
|
146
|
-
//# sourceMappingURL=db-command.js.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CLAIM_EVIDENCE_MATRIX_ARTIFACT } from './claim-evidence-matrix.js';
|
|
2
|
-
import { DEFAULT_RESEARCH_QUALITY_CONTRACT } from './research-quality-contract.js';
|
|
3
|
-
import { SOURCE_QUALITY_REPORT_ARTIFACT } from './source-quality-report.js';
|
|
4
|
-
import { researchPromptContractText, validateResearchPromptContract } from './research-prompt-contract.js';
|
|
5
|
-
import { RESEARCH_AGENT_COUNCIL, researchAgentAgentName, researchPaperArtifactForPlan, RESEARCH_SOURCE_SKILL_ARTIFACT } from '../research.js';
|
|
6
|
-
export function buildResearchPrompt({ id, mission, plan, cycle, previous }) {
|
|
7
|
-
const paperArtifact = researchPaperArtifactForPlan(plan);
|
|
8
|
-
const agentAgentNames = (plan?.research_council?.agents || RESEARCH_AGENT_COUNCIL).map((agent) => researchAgentAgentName(agent)).join(', ');
|
|
9
|
-
const promptText = `You are running SKS Research Mode.\nMISSION: ${id}\nTOPIC: ${mission.prompt}\nCYCLE: ${cycle}\nMODE: Genius Agent Council + frontier discovery loop. Use maximum reasoning depth available under the current Codex profile.\nLONG-RUN REAL-RESEARCH POLICY: Normal Research is allowed to take one or two hours when the question requires it. Do real source gathering and evidence comparison; do not shortcut into mock, fixture, or summary-only output. If live source access is unavailable, write the blocker and keep the gate unpassed.\nNO-CODE-MUTATION POLICY: Do not edit repository source, package metadata, docs, config, generated skills, or harness files. Write only route-local artifacts under .sneakoscope/missions/${id}/. If a needed implementation change is discovered, record it as a recommendation or blocker for a later execution route.\nNO-QUESTION LOCK: Do not ask the user. Resolve scope from research-plan.json and current project evidence.\nSAFETY: Destructive database operations and unsafe external actions are forbidden. Prefer read-only inspection, local files, and cited public sources.\nPERSONA POLICY: Use Einstein/Feynman/Turing/von Neumann-inspired agent lenses only as cognitive roles. Do not impersonate, roleplay private identity, or speak as the historical people.\nAGENT PERSONA POLICY: Every Research agent row must include agent_name, display_name, persona, persona_boundary, reasoning_effort: "xhigh", service_tier when available, falsifiers, cheap_probes, and challenge_or_response. Use these agent_name values exactly: ${agentAgentNames}. Persona names are cognitive lenses, not impersonations.\nAGENT EFFORT POLICY: Every Research agent agent must use reasoning_effort=xhigh. Record effort: "xhigh" for every agent in agent-ledger.json. Any lower-effort agent output must keep research-gate.json unpassed.\nEUREKA POLICY: Every agent must literally write "Eureka!" and one non-obvious, source-linked idea before debate.\nCONSENSUS LOOP POLICY: This is not a fixed three-cycle run. Repeat source-gathering, agent Eureka ideas, debate, falsification, and synthesis pressure until every agent records final agreement with the surviving mechanism. If unanimous agreement is not reached, keep research-gate.json unpassed and continue until the explicit max-cycle safety cap pauses the run.\nDEBATE POLICY: The agents must debate vigorously but stay evidence-bound. Every agent must challenge or respond at least once, and debate-ledger.json must record exchanges, consensus_iterations, unanimous_consensus, and per-agent agreements before synthesis.\nPAPER POLICY: After the report and ledgers, write ${paperArtifact} as a concise manuscript with Abstract, Introduction, Methodology, Findings/Results, Discussion, Limitations/Falsification, Conclusion/Next Experiment, and References.\nSOURCE SKILL POLICY: Create or update ${RESEARCH_SOURCE_SKILL_ARTIFACT} as a route-local source collection skill before synthesis. It must name the selected source layers, query routes, quality fields, blockers, and cross-layer triangulation checks. Do not edit generated .agents/skills during the research run.\nWEB/SOURCE POLICY: Run layered source retrieval across every safely available layer before synthesis: latest public papers, official government or leading-institution data, standards or primary docs, current news including BBC/CNN/GDELT-style sources when relevant, public discourse including X/Twitter and Reddit when available, developer/practitioner sources such as Stack Overflow/Stack Exchange/GitHub, and counterevidence or fact-checking sources. Treat public discourse as signal, not truth. If a layer cannot be searched, record the blocker in source-ledger.json and do not pass the gate.\nQUALITY CONTRACT:\n${researchPromptContractText()}\nRESEARCH PLAN:\n${JSON.stringify(plan, null, 2)}\n\nOBJECTIVE: Produce genuinely useful candidate discoveries: non-obvious hypotheses, mechanisms, predictions, or experiments. Do not merely summarize. Mark uncertainty clearly.\n\nREQUIRED PROCESS:\n1. Source skill first: create ${RESEARCH_SOURCE_SKILL_ARTIFACT} with source layers, query templates, quality fields, blockers, and triangulation rules.\n2. Layered source search: create source-ledger.json with source_layers, queries, source ids, source quality notes, counterevidence sources, source claim_ids, triangulation.cross_layer_checks, citation coverage, and blockers.\n3. Claim matrix: create claim-evidence-matrix.json with at least ${DEFAULT_RESEARCH_QUALITY_CONTRACT.min_key_claims} key claims and ${DEFAULT_RESEARCH_QUALITY_CONTRACT.min_trianguled_claims} triangulated claims.\n4. Independent xhigh agents: create agent-ledger.json with agent_name/display_name/persona/persona_boundary, effort=xhigh, reasoning_effort=xhigh, a literal Eureka! idea, findings, source_ids, falsifiers, cheap_probes, and challenge_or_response for every agent lens.\n5. Debate to agreement: create debate-ledger.json with evidence-bound challenge/response exchanges involving every agent, consensus_iterations >= 1, unanimous_consensus=true only when all agents agree, and agent_agreements for every agent.\n6. Falsification: create falsification-ledger.json with at least ${DEFAULT_RESEARCH_QUALITY_CONTRACT.min_falsification_cases} attacks, missing evidence, source conflicts, and decisive next tests.\n7. Synthesis: write research-report.md with at least ${DEFAULT_RESEARCH_QUALITY_CONTRACT.min_report_words} words and novelty-ledger.json only after cited agent findings, Eureka ideas, unanimous debate agreement, cross-layer triangulation, and falsification are recorded.\n8. Handoff: write implementation-blueprint.json/.md, experiment-plan.json/.md, replication-pack.json, and research-final-review.json.\n9. Paper: write ${paperArtifact} as a paper-style manuscript with source-ledger references and limitations.\n\nREQUIRED OUTPUT FILES in .sneakoscope/missions/${id}/:\n- research-report.md: concise report with Question, Methodology, Source Map, Key Claims, Evidence Matrix Summary, Counterevidence, Falsification, Implementation Blueprint, Experiment / Validation Plan, Limitations, and References. Cite source-ledger ids for factual claims.\n- ${paperArtifact}: paper manuscript with Abstract, Introduction, Methodology, Findings/Results, Discussion, Limitations/Falsification, Conclusion/Next Experiment, and References using source-ledger ids.\n- ${RESEARCH_SOURCE_SKILL_ARTIFACT}: route-local source collection skill; it is evidence for the Skill Creator step and must not mutate generated .agents/skills.\n- source-ledger.json: layered web/source queries, source ids, source priority, source quality notes, claim_ids, counterevidence sources, citation coverage, triangulation checks, and blockers.\n- ${CLAIM_EVIDENCE_MATRIX_ARTIFACT}: key claims, source ids, counterevidence ids, triangulation, unsupported claims, and test probes.\n- ${SOURCE_QUALITY_REPORT_ARTIFACT}: source metadata and citation coverage audit.\n- agent-ledger.json: one entry per agent lens with agent_name, display_name, persona, persona_boundary, effort, reasoning_effort, service_tier, eureka, query_set, findings, source_ids, falsifiers, cheap_probes, and challenge_or_response.\n- debate-ledger.json: evidence-bound challenge/response exchanges, participants, changed minds, unresolved conflicts, consensus_iterations, unanimous_consensus, and agent_agreements for every agent.\n- novelty-ledger.json: entries with claim, novelty, confidence, falsifiability, evidence source ids, falsifiers, next_experiment.\n- falsification-ledger.json: attacks/counterexamples/source conflicts, result, and next_decisive_tests.\n- implementation-blueprint.json and implementation-blueprint.md: at least eight handoff sections.\n- experiment-plan.json and experiment-plan.md: at least five validation steps.\n- replication-pack.json: commands, inputs, expected artifacts, and reproduction notes.\n- research-final-review.json: approved=true only after all contract checks pass.\n- research-gate.json: set passed only when every required artifact and quality threshold passes.\n\nPrevious cycle tail:\n${String(previous || '').slice(-2500)}\n`;
|
|
10
|
-
const promptValidation = validateResearchPromptContract(promptText);
|
|
11
|
-
if (!promptValidation.ok)
|
|
12
|
-
return `${promptText}\n\nPROMPT CONTRACT BLOCKERS:\n${promptValidation.blockers.join('\n')}\n`;
|
|
13
|
-
return promptText;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=prompt.js.map
|