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
|
@@ -5,7 +5,7 @@ export const HIGH_RISK_CONTRACT_TARGETS = [
|
|
|
5
5
|
'rollback apply',
|
|
6
6
|
'doctor --fix',
|
|
7
7
|
'update now --dry-run',
|
|
8
|
-
'
|
|
8
|
+
'$DB',
|
|
9
9
|
'mad-sks'
|
|
10
10
|
];
|
|
11
11
|
export const HIGH_RISK_CONTRACT_REPORT_SCHEMA = 'sks.high-risk-contracts.v2';
|
|
@@ -48,7 +48,7 @@ export function highRiskNegativeFixtures() {
|
|
|
48
48
|
blocker: 'dry_run_attempted_real_install'
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
target: '
|
|
51
|
+
target: '$DB',
|
|
52
52
|
fixture: 'destructive_sql_without_mad_sks',
|
|
53
53
|
input: { sql: 'DROP TABLE users;', madSksSqlPlane: false },
|
|
54
54
|
blocker: 'destructive_sql_requires_mad_sks'
|
|
@@ -111,8 +111,8 @@ export function highRiskCliNegativeSmokeSpecs() {
|
|
|
111
111
|
expected_blockers: ['dry_run_no_install_executed']
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
|
-
target: '
|
|
115
|
-
argv: ['sks', '
|
|
114
|
+
target: '$DB',
|
|
115
|
+
argv: ['sks', 'run', 'DROP TABLE users;', '--db', '--execute', '--json'],
|
|
116
116
|
expected_blockers: ['destructive_sql_requires_mad_sks']
|
|
117
117
|
},
|
|
118
118
|
{
|
|
@@ -198,7 +198,7 @@ function blockersFromCliText(target, text, parsed, run) {
|
|
|
198
198
|
blockers.push('doctor_touched_user_owned_file_without_sks_marker');
|
|
199
199
|
else if (target === 'doctor --fix' && /(?:^|\s)user_owned_file_without_sks_marker(?:\s|$)/i.test(text))
|
|
200
200
|
blockers.push('user_owned_file_without_sks_marker');
|
|
201
|
-
if (target === '
|
|
201
|
+
if (target === '$DB' && /drop_table|drop_statement|destructive/i.test(text))
|
|
202
202
|
blockers.push('destructive_sql_requires_mad_sks');
|
|
203
203
|
if (target === 'mad-sks' && /mad-sks-proof\.json|status.*missing|proof.*missing/i.test(text))
|
|
204
204
|
blockers.push('mad_sks_read_back_proof_missing');
|
|
@@ -231,7 +231,7 @@ export function highRiskBlockers(target, input = {}) {
|
|
|
231
231
|
return doctorFixBlockers(input);
|
|
232
232
|
case 'update now --dry-run':
|
|
233
233
|
return updateNowDryRunBlockers(input);
|
|
234
|
-
case '
|
|
234
|
+
case '$DB':
|
|
235
235
|
return dbBlockers(input);
|
|
236
236
|
case 'mad-sks':
|
|
237
237
|
return madSksBlockers(input);
|
|
@@ -14,15 +14,34 @@ function normalizeRoute(route) {
|
|
|
14
14
|
function rawGateToV1(raw, gatePath, route) {
|
|
15
15
|
if (!raw)
|
|
16
16
|
return null;
|
|
17
|
-
//
|
|
17
|
+
// Canonical input still needs runtime normalization. Older or hand-written
|
|
18
|
+
// gate files can omit optional arrays; malformed types must fail closed
|
|
19
|
+
// rather than throwing or being treated as empty.
|
|
18
20
|
if (raw.schema === 'sks.stop-gate.v1') {
|
|
19
|
-
return
|
|
21
|
+
return {
|
|
22
|
+
...raw,
|
|
23
|
+
schema: 'sks.stop-gate.v1',
|
|
24
|
+
route: String(raw.route || route || 'Naruto'),
|
|
25
|
+
route_command: String(raw.route_command || '$Naruto'),
|
|
26
|
+
mission_id: String(raw.mission_id || ''),
|
|
27
|
+
gate_file: String(raw.gate_file || path.basename(gatePath)),
|
|
28
|
+
gate_abs_path: String(raw.gate_abs_path || gatePath),
|
|
29
|
+
status: String(raw.status || 'blocked'),
|
|
30
|
+
passed: raw.passed === true,
|
|
31
|
+
reason: typeof raw.reason === 'string' ? raw.reason : null,
|
|
32
|
+
terminal: raw.terminal === true,
|
|
33
|
+
terminal_state: String(raw.terminal_state || 'blocked'),
|
|
34
|
+
evidence: isRecord(raw.evidence) ? raw.evidence : {},
|
|
35
|
+
blockers: normalizedStringArray(raw.blockers, 'blockers_invalid'),
|
|
36
|
+
missing_fields: normalizedStringArray(raw.missing_fields, 'missing_fields_invalid'),
|
|
37
|
+
created_at: String(raw.created_at || raw.updated_at || nowIso()),
|
|
38
|
+
};
|
|
20
39
|
}
|
|
21
40
|
// Normalize from legacy naruto-gate.json / glm-naruto termination
|
|
22
41
|
const passed = raw.passed === true;
|
|
23
42
|
const status = passed ? 'passed' : (raw.status || 'blocked');
|
|
24
43
|
const terminalState = raw.terminal_state || (passed ? 'completed' : 'blocked');
|
|
25
|
-
const evidence = raw.evidence
|
|
44
|
+
const evidence = isRecord(raw.evidence) ? raw.evidence : {};
|
|
26
45
|
return {
|
|
27
46
|
schema: 'sks.stop-gate.v1',
|
|
28
47
|
route: route || String(raw.route || 'Naruto'),
|
|
@@ -32,14 +51,28 @@ function rawGateToV1(raw, gatePath, route) {
|
|
|
32
51
|
gate_abs_path: gatePath,
|
|
33
52
|
status: status,
|
|
34
53
|
passed,
|
|
54
|
+
reason: typeof raw.reason === 'string' ? raw.reason : null,
|
|
35
55
|
terminal: raw.terminal === true || passed,
|
|
36
56
|
terminal_state: terminalState,
|
|
37
57
|
evidence: evidence,
|
|
38
|
-
blockers:
|
|
39
|
-
missing_fields:
|
|
58
|
+
blockers: normalizedStringArray(raw.blockers, 'blockers_invalid'),
|
|
59
|
+
missing_fields: normalizedStringArray(raw.missing_fields, 'missing_fields_invalid'),
|
|
40
60
|
created_at: String(raw.created_at || raw.updated_at || nowIso()),
|
|
41
61
|
};
|
|
42
62
|
}
|
|
63
|
+
function normalizedStringArray(value, invalidMarker) {
|
|
64
|
+
if (value === undefined || value === null)
|
|
65
|
+
return [];
|
|
66
|
+
if (!Array.isArray(value))
|
|
67
|
+
return [invalidMarker];
|
|
68
|
+
const strings = value.filter((entry) => typeof entry === 'string').map((entry) => entry.trim()).filter(Boolean);
|
|
69
|
+
if (strings.length !== value.length)
|
|
70
|
+
strings.push(invalidMarker);
|
|
71
|
+
return [...new Set(strings)];
|
|
72
|
+
}
|
|
73
|
+
function isRecord(value) {
|
|
74
|
+
return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
|
|
75
|
+
}
|
|
43
76
|
async function checkHardBlocker(root, missionId) {
|
|
44
77
|
if (!missionId)
|
|
45
78
|
return { hardBlocked: false, file: null, reason: null, evidence: [] };
|
|
@@ -131,16 +164,19 @@ export async function checkStopGate(input) {
|
|
|
131
164
|
feedback: `Stop blocked: no gate file found. Checked paths: ${resolution.checked_paths.join(', ')}`,
|
|
132
165
|
};
|
|
133
166
|
}
|
|
167
|
+
const notApplicable = normalizedGate.status === 'not_applicable';
|
|
134
168
|
const missingFields = [];
|
|
135
|
-
if (normalizedGate.status !== 'passed')
|
|
169
|
+
if (!notApplicable && normalizedGate.status !== 'passed')
|
|
136
170
|
missingFields.push('status');
|
|
137
|
-
if (normalizedGate.passed !== true)
|
|
171
|
+
if (!notApplicable && normalizedGate.passed !== true)
|
|
138
172
|
missingFields.push('passed');
|
|
173
|
+
if (notApplicable && !String(normalizedGate.reason || '').trim())
|
|
174
|
+
missingFields.push('not_applicable_reason');
|
|
139
175
|
if (normalizedGate.blockers.length > 0)
|
|
140
176
|
missingFields.push('blockers');
|
|
141
177
|
if (normalizedGate.missing_fields.length > 0)
|
|
142
178
|
missingFields.push(...normalizedGate.missing_fields.map((field) => `missing_fields:${field}`));
|
|
143
|
-
const bugfixMission = await missionHasBugfixWork(root, missionId, normalizedGate);
|
|
179
|
+
const bugfixMission = !notApplicable && await missionHasBugfixWork(root, missionId, normalizedGate);
|
|
144
180
|
if (bugfixMission && normalizedGate.evidence.regression_test_added !== true)
|
|
145
181
|
missingFields.push('regression_test_added');
|
|
146
182
|
if (bugfixMission && normalizedGate.evidence.regression_test_failed_before_fix !== true)
|
|
@@ -149,8 +185,7 @@ export async function checkStopGate(input) {
|
|
|
149
185
|
missingFields.push('coverage_required_but_not_passed');
|
|
150
186
|
if ((normalizedGate.evidence.uncovered_required_count ?? 0) > 0)
|
|
151
187
|
missingFields.push(`work_order_uncovered_count:${normalizedGate.evidence.uncovered_required_count}`);
|
|
152
|
-
if (normalizedGate.status === 'passed'
|
|
153
|
-
&& normalizedGate.passed === true
|
|
188
|
+
if ((normalizedGate.status === 'passed' && normalizedGate.passed === true || notApplicable)
|
|
154
189
|
&& normalizedGate.blockers.length === 0
|
|
155
190
|
&& normalizedGate.missing_fields.length === 0
|
|
156
191
|
&& missingFields.length === 0) {
|
|
@@ -167,7 +202,7 @@ export async function checkStopGate(input) {
|
|
|
167
202
|
selected_gate_mtime: statInfo.mtime,
|
|
168
203
|
current_state_path: resolution.current_state_path,
|
|
169
204
|
current_state_mission_id: resolution.current_state_mission_id,
|
|
170
|
-
reason: 'gate_passed',
|
|
205
|
+
reason: notApplicable ? 'gate_not_applicable' : 'gate_passed',
|
|
171
206
|
missing_fields: [],
|
|
172
207
|
blockers: [],
|
|
173
208
|
};
|
|
@@ -181,7 +216,9 @@ export async function checkStopGate(input) {
|
|
|
181
216
|
gate_path: resolution.gate_path,
|
|
182
217
|
normalized_gate: normalizedGate,
|
|
183
218
|
diagnostics,
|
|
184
|
-
feedback:
|
|
219
|
+
feedback: notApplicable
|
|
220
|
+
? `Stop allowed: active gate is not applicable at ${resolution.gate_path}`
|
|
221
|
+
: `Stop allowed: gate passed at ${resolution.gate_path}`,
|
|
185
222
|
};
|
|
186
223
|
}
|
|
187
224
|
// Gate not passed
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import { MANAGED_OFFICIAL_SUBAGENT_ROLES } from '../managed-assets/managed-assets-manifest.js';
|
|
2
|
+
export const DEFAULT_AUTOMATIC_SUBAGENT_COUNT = 1;
|
|
3
|
+
export const MAX_AUTOMATIC_SUBAGENT_COUNT = 3;
|
|
4
|
+
export const MAX_AUTOMATIC_REVIEWER_COUNT = 2;
|
|
5
|
+
export function officialSubagentRoleCatalog() {
|
|
6
|
+
return MANAGED_OFFICIAL_SUBAGENT_ROLES.map((role) => ({
|
|
7
|
+
name: role.codex_name,
|
|
8
|
+
description: role.description,
|
|
9
|
+
model: role.model,
|
|
10
|
+
model_reasoning_effort: role.model_reasoning_effort,
|
|
11
|
+
sandbox_mode: role.sandbox || 'inherit'
|
|
12
|
+
}));
|
|
13
|
+
}
|
|
14
|
+
export function officialSubagentRolePlan() {
|
|
15
|
+
return Object.fromEntries(officialSubagentRoleCatalog().map(({ name, ...config }) => [name, config]));
|
|
16
|
+
}
|
|
17
|
+
export function recommendOfficialSubagentRoles(input = {}) {
|
|
18
|
+
const text = normalizeText([
|
|
19
|
+
input.title,
|
|
20
|
+
input.description,
|
|
21
|
+
input.role,
|
|
22
|
+
input.expectedOutput,
|
|
23
|
+
...(input.paths || [])
|
|
24
|
+
]);
|
|
25
|
+
const limit = clamp(input.limit ?? MAX_AUTOMATIC_SUBAGENT_COUNT, 1, MAX_AUTOMATIC_SUBAGENT_COUNT);
|
|
26
|
+
const scored = MANAGED_OFFICIAL_SUBAGENT_ROLES
|
|
27
|
+
.map((role, index) => ({ role, index, score: roleScore(role, text, input) }))
|
|
28
|
+
.filter((row) => input.readOnly !== true || row.role.sandbox === 'read-only');
|
|
29
|
+
const solSpecialistMatched = scored.some((row) => row.score > 0
|
|
30
|
+
&& row.role.model === 'gpt-5.6-sol'
|
|
31
|
+
&& !['worker', 'expert'].includes(row.role.codex_name));
|
|
32
|
+
const ranked = scored
|
|
33
|
+
.filter((row) => !(solSpecialistMatched && row.role.codex_name === 'worker'))
|
|
34
|
+
.filter((row) => row.score > 0)
|
|
35
|
+
.sort((left, right) => right.score - left.score || left.index - right.index)
|
|
36
|
+
.map((row) => row.role.codex_name);
|
|
37
|
+
if (ranked.length)
|
|
38
|
+
return unique(ranked).slice(0, limit);
|
|
39
|
+
if (input.readOnly === true)
|
|
40
|
+
return ['expert'];
|
|
41
|
+
if (looksClearBounded(text))
|
|
42
|
+
return ['worker'];
|
|
43
|
+
return [input.requiresWrite === true ? 'implementation_specialist' : 'expert'];
|
|
44
|
+
}
|
|
45
|
+
export function selectOfficialSubagentRole(input = {}) {
|
|
46
|
+
return recommendOfficialSubagentRoles({ ...input, limit: 1 })[0] || 'expert';
|
|
47
|
+
}
|
|
48
|
+
export function officialSubagentFanoutPolicy(input = {}) {
|
|
49
|
+
const explicit = input.requestedExplicit === true;
|
|
50
|
+
const explicitRequested = Number.isFinite(Number(input.requestedSubagents))
|
|
51
|
+
? Math.max(1, Math.floor(Number(input.requestedSubagents)))
|
|
52
|
+
: DEFAULT_AUTOMATIC_SUBAGENT_COUNT;
|
|
53
|
+
const automatic = automaticSubagentFanout({
|
|
54
|
+
...(input.taskProfile === undefined ? {} : { taskProfile: input.taskProfile }),
|
|
55
|
+
...(input.goal === undefined ? {} : { goal: input.goal }),
|
|
56
|
+
...(input.suggestedRoles === undefined ? {} : { suggestedRoles: input.suggestedRoles })
|
|
57
|
+
});
|
|
58
|
+
const requested = explicit ? explicitRequested : automatic.count;
|
|
59
|
+
const automaticReviewerCeiling = automatic.criticalMultiDomain
|
|
60
|
+
? MAX_AUTOMATIC_SUBAGENT_COUNT
|
|
61
|
+
: MAX_AUTOMATIC_REVIEWER_COUNT;
|
|
62
|
+
return {
|
|
63
|
+
mode: explicit ? 'explicit_operator_count' : 'parent_owned_risk_based',
|
|
64
|
+
requested_subagents: requested,
|
|
65
|
+
default_subagents: DEFAULT_AUTOMATIC_SUBAGENT_COUNT,
|
|
66
|
+
automatic_selected: explicit ? null : automatic.count,
|
|
67
|
+
automatic_ceiling: automatic.ceiling,
|
|
68
|
+
automatic_reviewer_ceiling: automaticReviewerCeiling,
|
|
69
|
+
selection_reason: explicit ? 'explicit_operator_count_preserved' : automatic.reason,
|
|
70
|
+
risk_domains: automatic.riskDomains,
|
|
71
|
+
critical_multi_domain: automatic.criticalMultiDomain,
|
|
72
|
+
requires_independent_non_overlapping_slices: true,
|
|
73
|
+
suggested_agents: unique((input.suggestedRoles || []).map(String)).slice(0, MAX_AUTOMATIC_SUBAGENT_COUNT)
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
function automaticSubagentFanout(input) {
|
|
77
|
+
const text = normalizeText([input.goal]);
|
|
78
|
+
const riskDomains = unique([
|
|
79
|
+
...riskDomainsFromText(text),
|
|
80
|
+
...riskDomainsFromRoles(input.suggestedRoles || [])
|
|
81
|
+
]);
|
|
82
|
+
const parallel = input.taskProfile === 'parallel-read' || input.taskProfile === 'parallel-write';
|
|
83
|
+
const highRisk = input.taskProfile === 'high-risk';
|
|
84
|
+
const critical = CRITICAL_RISK_RE.test(text);
|
|
85
|
+
const criticalMultiDomain = highRisk && critical && riskDomains.length >= 3;
|
|
86
|
+
if (criticalMultiDomain) {
|
|
87
|
+
return {
|
|
88
|
+
count: MAX_AUTOMATIC_SUBAGENT_COUNT,
|
|
89
|
+
ceiling: MAX_AUTOMATIC_SUBAGENT_COUNT,
|
|
90
|
+
reason: 'critical_multi_domain_risk',
|
|
91
|
+
riskDomains,
|
|
92
|
+
criticalMultiDomain: true
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
if (parallel) {
|
|
96
|
+
return {
|
|
97
|
+
count: 2,
|
|
98
|
+
ceiling: 2,
|
|
99
|
+
reason: 'explicit_parallel_or_independent_slices',
|
|
100
|
+
riskDomains,
|
|
101
|
+
criticalMultiDomain: false
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
if (highRisk && riskDomains.length >= 2) {
|
|
105
|
+
return {
|
|
106
|
+
count: 2,
|
|
107
|
+
ceiling: 2,
|
|
108
|
+
reason: 'independent_multi_domain_risk',
|
|
109
|
+
riskDomains,
|
|
110
|
+
criticalMultiDomain: false
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
count: DEFAULT_AUTOMATIC_SUBAGENT_COUNT,
|
|
115
|
+
ceiling: DEFAULT_AUTOMATIC_SUBAGENT_COUNT,
|
|
116
|
+
reason: 'single_bounded_or_single_domain_task',
|
|
117
|
+
riskDomains,
|
|
118
|
+
criticalMultiDomain: false
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function riskDomainsFromText(text) {
|
|
122
|
+
const domains = [];
|
|
123
|
+
for (const [domain, pattern] of RISK_DOMAIN_PATTERNS) {
|
|
124
|
+
if (pattern.test(text))
|
|
125
|
+
domains.push(domain);
|
|
126
|
+
}
|
|
127
|
+
return domains;
|
|
128
|
+
}
|
|
129
|
+
function riskDomainsFromRoles(roles) {
|
|
130
|
+
return roles
|
|
131
|
+
.map((role) => ROLE_RISK_DOMAINS[String(role || '').trim()] || null)
|
|
132
|
+
.filter((domain) => Boolean(domain));
|
|
133
|
+
}
|
|
134
|
+
function roleScore(role, text, input) {
|
|
135
|
+
const semanticScore = [...role.selection_keywords, ...(ROLE_LANGUAGE_HINTS[role.codex_name] || [])]
|
|
136
|
+
.reduce((total, keyword) => total + keywordScore(text, keyword), 0);
|
|
137
|
+
if (semanticScore <= 0)
|
|
138
|
+
return 0;
|
|
139
|
+
let score = semanticScore;
|
|
140
|
+
if (input.readOnly === true)
|
|
141
|
+
score += role.sandbox === 'read-only' ? 2 : role.sandbox ? -3 : 0;
|
|
142
|
+
if (input.requiresWrite === true)
|
|
143
|
+
score += role.sandbox === 'read-only' ? -3 : role.sandbox === 'workspace-write' ? 2 : 1;
|
|
144
|
+
if (role.codex_name === 'worker' && !looksClearBounded(text))
|
|
145
|
+
score -= 4;
|
|
146
|
+
if (role.codex_name === 'expert')
|
|
147
|
+
score -= 1;
|
|
148
|
+
return score;
|
|
149
|
+
}
|
|
150
|
+
function keywordScore(text, keyword) {
|
|
151
|
+
const normalized = normalizeText([keyword]);
|
|
152
|
+
if (!normalized)
|
|
153
|
+
return 0;
|
|
154
|
+
const matched = /^[a-z0-9]+$/i.test(normalized)
|
|
155
|
+
? new RegExp(`(?:^|\\b)${escapeRegExp(normalized)}(?:\\b|$)`, 'i').test(text)
|
|
156
|
+
: text.includes(normalized);
|
|
157
|
+
if (!matched)
|
|
158
|
+
return 0;
|
|
159
|
+
return normalized.includes(' ') ? 4 : 3;
|
|
160
|
+
}
|
|
161
|
+
function looksClearBounded(text) {
|
|
162
|
+
return /\b(bounded|mechanical|repeatable|exact|single[- ](?:file|step|change)|rename|format|copy|fixture)\b|정해진|명확한|기계적|반복적|단일\s*파일/i.test(text);
|
|
163
|
+
}
|
|
164
|
+
function normalizeText(values) {
|
|
165
|
+
return values
|
|
166
|
+
.map((value) => String(value || '').normalize('NFKC').toLowerCase())
|
|
167
|
+
.join(' ')
|
|
168
|
+
.replace(/[_/\\.-]+/g, ' ')
|
|
169
|
+
.replace(/\s+/g, ' ')
|
|
170
|
+
.trim();
|
|
171
|
+
}
|
|
172
|
+
function unique(values) {
|
|
173
|
+
return [...new Set(values.map((value) => String(value || '').trim()).filter(Boolean))];
|
|
174
|
+
}
|
|
175
|
+
function clamp(value, minimum, maximum) {
|
|
176
|
+
return Math.max(minimum, Math.min(maximum, Math.floor(Number(value) || minimum)));
|
|
177
|
+
}
|
|
178
|
+
function escapeRegExp(value) {
|
|
179
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
180
|
+
}
|
|
181
|
+
const ROLE_LANGUAGE_HINTS = {
|
|
182
|
+
worker: ['기계적', '반복적', '단순 변경', '정확한 변경'],
|
|
183
|
+
implementation_specialist: ['구현', '기능 추가', '핵심 로직', '백엔드', '복잡한 변경'],
|
|
184
|
+
expert: ['모호', '전략', '판단', '트레이드오프'],
|
|
185
|
+
explorer: ['탐색', '찾아', '추적', '인벤토리', '구조 파악'],
|
|
186
|
+
debugger: ['디버깅', '원인', '실패', '재현', '회귀'],
|
|
187
|
+
test_engineer: ['테스트', '회귀 테스트', '검증', '픽스처', '커버리지'],
|
|
188
|
+
ui_implementer: ['화면', '터미널', '젤리', '패널', '팬', '레이아웃', '사용성'],
|
|
189
|
+
architecture_reviewer: ['아키텍처', '설계', '수명주기', '결합도', '리팩터'],
|
|
190
|
+
security_reviewer: ['보안', '권한', '인증', '비밀', '신뢰 경계'],
|
|
191
|
+
database_reviewer: ['데이터베이스', '디비', '마이그레이션', '롤백', '스키마'],
|
|
192
|
+
research_synthesizer: ['연구', '논문', '가설', '종합', '새로움'],
|
|
193
|
+
research_reviewer: ['논문 검토', '적대적 평가', '방법론', '재현성', '반증'],
|
|
194
|
+
release_reviewer: ['배포', '릴리스', '출시', '퍼블리시', '버전'],
|
|
195
|
+
docs_maintainer: ['문서', '리드미', '변경로그', '마이그레이션 가이드'],
|
|
196
|
+
integration_reviewer: ['통합', '병합', '리베이스', '호환성', '엔드투엔드'],
|
|
197
|
+
performance_analyst: ['성능', '지연', '벤치마크', '동시성', '토큰', '메모리']
|
|
198
|
+
};
|
|
199
|
+
const CRITICAL_RISK_RE = /\b(?:critical|catastrophic|production|data loss|security incident|breaking release)\b|치명|중대|운영|데이터\s*손실|보안\s*사고/i;
|
|
200
|
+
const RISK_DOMAIN_PATTERNS = [
|
|
201
|
+
['database', /\b(?:database|db|sql|postgres|supabase|migration|rls)\b|데이터베이스|디비|마이그레이션/i],
|
|
202
|
+
['security', /\b(?:security|permission|auth|authentication|secret|trust boundary)\b|보안|권한|인증|비밀|신뢰\s*경계/i],
|
|
203
|
+
['release', /\b(?:release|publish|deploy|distribution|package registry|production rollout)\b|릴리스|배포|출시|퍼블리시/i],
|
|
204
|
+
['payment', /\b(?:payment|billing|checkout|transaction)\b|결제|청구|트랜잭션/i],
|
|
205
|
+
['performance', /\b(?:performance|latency|throughput|concurrency|resource usage)\b|성능|지연|처리량|동시성/i],
|
|
206
|
+
['integration', /\b(?:integration|compatibility|cross-module|end-to-end)\b|통합|호환성|엔드투엔드/i]
|
|
207
|
+
];
|
|
208
|
+
const ROLE_RISK_DOMAINS = {
|
|
209
|
+
security_reviewer: 'security',
|
|
210
|
+
database_reviewer: 'database',
|
|
211
|
+
release_reviewer: 'release',
|
|
212
|
+
performance_analyst: 'performance',
|
|
213
|
+
integration_reviewer: 'integration'
|
|
214
|
+
};
|
|
215
|
+
//# sourceMappingURL=agent-catalog.js.map
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
export const NARUTO_PARENT_MODEL = 'gpt-5.6-sol';
|
|
2
|
+
export const NARUTO_PARENT_EFFORT = 'max';
|
|
3
|
+
export const DEFAULT_SUBAGENT_MODEL = 'gpt-5.6-luna';
|
|
4
|
+
export const THINKING_SUBAGENT_MODEL = 'gpt-5.6-sol';
|
|
5
|
+
export const SUBAGENT_EFFORT = 'max';
|
|
6
|
+
const SOL_TASK_RE = new RegExp([
|
|
7
|
+
'\\bui\\b',
|
|
8
|
+
'\\bux\\b',
|
|
9
|
+
'\\bgui\\b',
|
|
10
|
+
'frontend',
|
|
11
|
+
'visual',
|
|
12
|
+
'review',
|
|
13
|
+
'audit',
|
|
14
|
+
'debug',
|
|
15
|
+
'diagnos',
|
|
16
|
+
'investigat',
|
|
17
|
+
'\\bwhy\\b',
|
|
18
|
+
'\\bfail(?:ed|ure|ing)?\\b',
|
|
19
|
+
'root[- ]?cause',
|
|
20
|
+
'strategy',
|
|
21
|
+
'\\bplan\\b',
|
|
22
|
+
'planning',
|
|
23
|
+
'product',
|
|
24
|
+
'architecture',
|
|
25
|
+
'architect',
|
|
26
|
+
'design',
|
|
27
|
+
'refactor',
|
|
28
|
+
'integrat',
|
|
29
|
+
'conflict',
|
|
30
|
+
'security',
|
|
31
|
+
'\\bauth(?:entication|orization)?\\b',
|
|
32
|
+
'\\bsafety\\b',
|
|
33
|
+
'database',
|
|
34
|
+
'\\bdb\\b',
|
|
35
|
+
'migration',
|
|
36
|
+
'release',
|
|
37
|
+
'publish',
|
|
38
|
+
'deploy',
|
|
39
|
+
'tests?[-_ ]?(?:fail|failure|debug|diagnos|root[- ]?cause)',
|
|
40
|
+
'failing tests?',
|
|
41
|
+
'flaky',
|
|
42
|
+
'ambiguous',
|
|
43
|
+
'ambiguity',
|
|
44
|
+
'trade[- ]?off',
|
|
45
|
+
'quality',
|
|
46
|
+
'judg',
|
|
47
|
+
'assessment',
|
|
48
|
+
'\\bexpert\\b',
|
|
49
|
+
'\\brisk\\b',
|
|
50
|
+
'사용성',
|
|
51
|
+
'화면',
|
|
52
|
+
'유아이',
|
|
53
|
+
'유엑스',
|
|
54
|
+
'프론트엔드',
|
|
55
|
+
'리뷰',
|
|
56
|
+
'검토',
|
|
57
|
+
'디버깅',
|
|
58
|
+
'진단',
|
|
59
|
+
'원인',
|
|
60
|
+
'전략',
|
|
61
|
+
'기획',
|
|
62
|
+
'계획',
|
|
63
|
+
'설계',
|
|
64
|
+
'아키텍처',
|
|
65
|
+
'리팩터',
|
|
66
|
+
'통합',
|
|
67
|
+
'충돌',
|
|
68
|
+
'보안',
|
|
69
|
+
'안전',
|
|
70
|
+
'데이터베이스',
|
|
71
|
+
'마이그레이션',
|
|
72
|
+
'배포',
|
|
73
|
+
'릴리즈',
|
|
74
|
+
'출시',
|
|
75
|
+
'모호',
|
|
76
|
+
'트레이드오프',
|
|
77
|
+
'품질',
|
|
78
|
+
'판정',
|
|
79
|
+
'위험'
|
|
80
|
+
].join('|'), 'i');
|
|
81
|
+
const CLEAR_BOUNDED_TASK_RE = new RegExp([
|
|
82
|
+
'\\b(?:clear|bounded|exact|specified)\\b[^\n]{0,48}\\b(?:task|change|step|scope|fixture|file|implementation|rename|copy|format|inventory|extract|list|check)\\b',
|
|
83
|
+
'\\b(?:mechanical|repeatable)\\b',
|
|
84
|
+
'\\bstructured[- ]?(?:extract|extraction|output|inventory|list)\\b',
|
|
85
|
+
'code_modification',
|
|
86
|
+
'test_execution',
|
|
87
|
+
'single[- ]?(?:file|step|check|change)',
|
|
88
|
+
'(?:정해진|명확한?|단순한?|반복적?|기계적)[^\n]{0,32}(?:작업|변경|단계|파일|목록|추출|이름\\s*변경)'
|
|
89
|
+
].join('|'), 'i');
|
|
90
|
+
export function decideSubagentModel(input = {}) {
|
|
91
|
+
const text = [
|
|
92
|
+
input.title,
|
|
93
|
+
input.description,
|
|
94
|
+
input.role,
|
|
95
|
+
input.expectedOutput
|
|
96
|
+
].filter(Boolean).join(' ');
|
|
97
|
+
const useSol = input.requiresJudgment === true
|
|
98
|
+
|| SOL_TASK_RE.test(text)
|
|
99
|
+
|| !CLEAR_BOUNDED_TASK_RE.test(text);
|
|
100
|
+
if (useSol) {
|
|
101
|
+
return {
|
|
102
|
+
kind: 'expert',
|
|
103
|
+
model: THINKING_SUBAGENT_MODEL,
|
|
104
|
+
modelReasoningEffort: SUBAGENT_EFFORT,
|
|
105
|
+
reason: 'reasoning_sensitive_task'
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
kind: 'worker',
|
|
110
|
+
model: DEFAULT_SUBAGENT_MODEL,
|
|
111
|
+
modelReasoningEffort: SUBAGENT_EFFORT,
|
|
112
|
+
reason: 'clear_bounded_repeatable_task'
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
export function isReasoningSensitiveSubagentTask(input = {}) {
|
|
116
|
+
return decideSubagentModel(input).kind === 'expert';
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=model-policy.js.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { NARUTO_PARENT_EFFORT, NARUTO_PARENT_MODEL } from './model-policy.js';
|
|
2
|
+
import { DEFAULT_NARUTO_REQUESTED_SUBAGENTS } from './thread-budget.js';
|
|
3
|
+
import { MAX_AUTOMATIC_REVIEWER_COUNT, MAX_AUTOMATIC_SUBAGENT_COUNT, officialSubagentRolePlan } from './agent-catalog.js';
|
|
4
|
+
export const NARUTO_HELP_SCHEMA = 'sks.naruto-subagent-workflow.v1';
|
|
5
|
+
export function buildNarutoHelpResult() {
|
|
6
|
+
return {
|
|
7
|
+
schema: NARUTO_HELP_SCHEMA,
|
|
8
|
+
ok: true,
|
|
9
|
+
action: 'help',
|
|
10
|
+
workflow: 'official_codex_subagent',
|
|
11
|
+
description: '$Naruto is the SKS alias for the Codex official subagent workflow.',
|
|
12
|
+
usage: [
|
|
13
|
+
'sks naruto run "<task>" [--agents N] [--max-threads N] [--json]',
|
|
14
|
+
'sks naruto status [latest|M-...] [--json]',
|
|
15
|
+
'sks naruto subagents [latest|M-...] [--json]',
|
|
16
|
+
'sks naruto proof [latest|M-...] [--json]'
|
|
17
|
+
],
|
|
18
|
+
commands: ['help', 'status', 'subagents', 'proof', 'run'],
|
|
19
|
+
default_requested_subagents: DEFAULT_NARUTO_REQUESTED_SUBAGENTS,
|
|
20
|
+
scaling_policy: 'one_safe_direct_child_by_default_parent_owned_risk_based_expansion',
|
|
21
|
+
automatic_subagent_ceiling: MAX_AUTOMATIC_SUBAGENT_COUNT,
|
|
22
|
+
automatic_reviewer_ceiling: MAX_AUTOMATIC_REVIEWER_COUNT,
|
|
23
|
+
critical_multi_domain_reviewer_ceiling: MAX_AUTOMATIC_SUBAGENT_COUNT,
|
|
24
|
+
max_depth: 1,
|
|
25
|
+
triwiki_context: 'bounded_attention_use_first_with_on_demand_hydration',
|
|
26
|
+
completion_evidence: {
|
|
27
|
+
lifecycle_events: ['SubagentStart', 'SubagentStop'],
|
|
28
|
+
stop_is_success_evidence: false,
|
|
29
|
+
structured_parent_summary: 'subagent-parent-summary.json'
|
|
30
|
+
},
|
|
31
|
+
deprecated_aliases: {
|
|
32
|
+
'--clones N': '--agents N',
|
|
33
|
+
workers: 'subagents'
|
|
34
|
+
},
|
|
35
|
+
legacy_process_runtime_available: false,
|
|
36
|
+
parent: { model: NARUTO_PARENT_MODEL, model_reasoning_effort: NARUTO_PARENT_EFFORT },
|
|
37
|
+
agents: officialSubagentRolePlan()
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=naruto-help-contract.js.map
|