sneakoscope 7.1.0 → 7.3.0
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 +9 -1
- package/config/architecture-budgets.v1.json +1 -8
- package/crates/sks-core/Cargo.lock +225 -1
- package/crates/sks-core/Cargo.toml +8 -1
- package/crates/sks-core/src/main.rs +7 -1
- package/crates/sks-core/src/search/files.rs +114 -0
- package/crates/sks-core/src/search/mod.rs +274 -0
- package/crates/sks-core/src/search/text.rs +175 -0
- package/dist/bin/sks-dispatch.js +4 -3
- package/dist/cli/command-manifest-lite.js +177 -6
- package/dist/cli/command-registry.js +42 -8
- package/dist/cli/help.js +30 -0
- package/dist/cli/install-helpers-codex-lb-config.js +9 -6
- package/dist/cli/install-helpers-codex-lb-selftest-chain.js +1 -1
- package/dist/cli/install-helpers-install-support.js +1 -1
- package/dist/cli/install-helpers.js +19 -9
- package/dist/cli/router.js +16 -3
- package/dist/commands/codex-app.js +40 -5
- package/dist/commands/doctor-profile.js +78 -0
- package/dist/commands/doctor.js +29 -69
- package/dist/commands/search.js +4 -0
- package/dist/config/skills-manifest.json +53 -60
- package/dist/core/agent-bridge/agent-manifest.js +22 -26
- package/dist/core/agent-bridge/host-capability-policy.js +109 -8
- package/dist/core/agent-bridge/host-capability-runtime.js +178 -50
- package/dist/core/agent-guidance/directive-registry.js +123 -0
- package/dist/core/agents/agent-effort-policy.js +45 -6
- package/dist/core/agents/agent-worker-pipeline.js +1 -3
- package/dist/core/agents/native-worker-backend-router.js +43 -19
- package/dist/core/auto-review.js +1 -3
- package/dist/core/code-structure.js +282 -19
- package/dist/core/codex/codex-config-guard.js +14 -4
- package/dist/core/codex/codex-config-toml.js +1 -3
- package/dist/core/codex-app/codex-agent-role-sync.js +1 -3
- package/dist/core/codex-app/codex-app-fast-ui-repair.js +14 -1
- package/dist/core/codex-app/codex-app-types.js +2 -3
- package/dist/core/codex-app/codex-desktop-routing-ownership.js +91 -0
- package/dist/core/codex-app/codex-hook-approval-probe.js +1 -3
- package/dist/core/codex-app/codex-hook-lifecycle.js +1 -3
- package/dist/core/codex-app/codex-init-deep.js +22 -10
- package/dist/core/codex-app/codex-model-catalog.js +384 -0
- package/dist/core/codex-app/codex-models-cache.js +160 -0
- package/dist/core/codex-app/desktop-routing-snapshot.js +233 -0
- package/dist/core/codex-app/glm-profile-installer.js +1 -3
- package/dist/core/codex-app/mcp-manager.js +1 -3
- package/dist/core/codex-app/menubar/constants.js +3 -0
- package/dist/core/codex-app/menubar/installer.js +11 -1
- package/dist/core/codex-app/multi-provider-router-support.js +202 -0
- package/dist/core/codex-app/multi-provider-router.js +379 -0
- package/dist/core/codex-app/openrouter-activate.js +189 -26
- package/dist/core/codex-app/openrouter-base-instructions.js +1 -0
- package/dist/core/codex-app/openrouter-model-catalog.js +217 -0
- package/dist/core/codex-app/role-model-catalog-priority.js +61 -0
- package/dist/core/codex-app.js +30 -6
- package/dist/core/codex-compat/codex-hook-semantic-validator.js +1 -3
- package/dist/core/codex-control/codex-app-server-v2-client.js +39 -2
- package/dist/core/codex-lb/codex-lb-env.js +1 -3
- package/dist/core/codex-lb/codex-lb-tool-catalog.js +6 -1
- package/dist/core/codex-native/codex-native-feature-broker.js +2 -6
- package/dist/core/codex-native/codex-native-interop-policy.js +1 -3
- package/dist/core/codex-native/codex-native-reference-cache.js +1 -3
- package/dist/core/codex-native/codex-native-reference-source.js +1 -3
- package/dist/core/codex-native/codex-native-repair-transaction.js +1 -3
- package/dist/core/codex-native/core-skill-manifest.js +3 -2
- package/dist/core/codex-native/native-capability-repair-matrix.js +1 -3
- package/dist/core/codex-plugins/codex-plugin-repair.js +1 -3
- package/dist/core/codex-runtime/codex-desktop-config-policy.js +4 -4
- package/dist/core/commands/agent-bridge-command.js +24 -3
- package/dist/core/commands/image-ux-review-command.js +5 -11
- package/dist/core/commands/menubar-command.js +1 -1
- package/dist/core/commands/naruto-command.js +40 -13
- package/dist/core/commands/pipeline-command.js +5 -2
- package/dist/core/commands/release-command.js +63 -1
- package/dist/core/commands/remote-command.js +18 -0
- package/dist/core/commands/search-command.js +151 -0
- package/dist/core/commands/telegram-command.js +251 -108
- package/dist/core/commands/uninstall-command.js +1 -1
- package/dist/core/config/secret-preservation.js +1 -3
- package/dist/core/context7-client.js +2 -1
- package/dist/core/db-review.js +704 -0
- package/dist/core/db-safety.js +17 -23
- package/dist/core/doctor/browser-use-repair.js +1 -3
- package/dist/core/doctor/codex-startup-config-repair.js +1 -3
- package/dist/core/doctor/computer-use-repair.js +1 -3
- package/dist/core/doctor/context7-mcp-repair.js +1 -3
- package/dist/core/doctor/current-project-guidance.js +1 -3
- package/dist/core/doctor/doctor-codex-startup-repair.js +1 -3
- package/dist/core/doctor/doctor-dirty-planner.js +2 -2
- package/dist/core/doctor/doctor-native-capability-repair.js +1 -3
- package/dist/core/doctor/doctor-transaction.js +1 -3
- package/dist/core/doctor/imagegen-repair.js +1 -3
- package/dist/core/doctor/legacy-global-hook-cleanup.js +1 -3
- package/dist/core/doctor/mcp-transport-collision-repair.js +1 -3
- package/dist/core/doctor/retired-managed-residue-private.js +1 -3
- package/dist/core/doctor/supabase-mcp-repair.js +1 -3
- package/dist/core/engineering-sanity-review.js +186 -0
- package/dist/core/errors/message.js +3 -0
- package/dist/core/evidence/evidence-schema.js +1 -3
- package/dist/core/feature-fixtures.js +1 -0
- package/dist/core/feature-registry.js +1 -3
- package/dist/core/fsx.js +13 -0
- package/dist/core/git-hygiene/shared-memory-publish.js +1 -3
- package/dist/core/git-hygiene/validators.js +1 -3
- package/dist/core/harness-guard.js +21 -3
- package/dist/core/hooks-runtime/hook-context.js +2 -2
- package/dist/core/image-ux-review/imagegen-adapter.js +52 -56
- package/dist/core/image-ux-review/real-callout-extractor.js +6 -1
- package/dist/core/image-ux-review.js +3 -5
- package/dist/core/imagegen/codex-lb-imagegen-target.js +70 -0
- package/dist/core/imagegen/imagegen-capability.js +11 -11
- package/dist/core/imagegen/imagegen-evidence.js +32 -0
- package/dist/core/init/skills.js +9 -11
- package/dist/core/init.js +4 -6
- package/dist/core/json/records.js +9 -0
- package/dist/core/json-schema-validator.js +1 -3
- package/dist/core/lean-engineering-policy.js +54 -0
- package/dist/core/loops/loop-continuation-enforcer.js +1 -3
- package/dist/core/mad-sks/sql-plane/mcp-executor.js +2 -1
- package/dist/core/mad-sks/sql-plane/policy.js +2 -1
- package/dist/core/managed-assets/managed-assets-manifest.js +4 -3
- package/dist/core/mcp-config/codex-cli-adapter.js +1 -3
- package/dist/core/mcp-config/config-reader.js +2 -3
- package/dist/core/mcp-config/guarded-patch.js +1 -1
- package/dist/core/mcp-config/health-check.js +2 -1
- package/dist/core/mcp-config/mutation.js +1 -1
- package/dist/core/mcp-config/restore.js +1 -1
- package/dist/core/mcp-config/secret-policy.js +1 -3
- package/dist/core/migration/migration-transaction-journal.js +3 -3
- package/dist/core/naruto/naruto-concurrency-governor.js +2 -2
- package/dist/core/perf/import-graph-budget.js +91 -1
- package/dist/core/pipeline/pipeline-plan-writer.js +1 -1
- package/dist/core/pipeline-internals/runtime-core.js +121 -23
- package/dist/core/pipeline-internals/runtime-gates.js +193 -4
- package/dist/core/pipeline.js +1 -1
- package/dist/core/ppt-review/slide-imagegen-review.js +7 -7
- package/dist/core/ppt.js +3 -3
- package/dist/core/product-design-app-server.js +2 -1
- package/dist/core/proof/fake-real-proof-policy.js +1 -3
- package/dist/core/proof/root-cause-policy.js +1 -3
- package/dist/core/proof/validation.js +1 -3
- package/dist/core/provider/model-router.js +4 -0
- package/dist/core/provider/provider-context.js +1 -3
- package/dist/core/providers/openrouter/openrouter-account.js +1 -3
- package/dist/core/quality/helper-dedup.js +0 -0
- package/dist/core/recallpulse.js +1 -1
- package/dist/core/release/file-ownership.js +26 -17
- package/dist/core/release/macos-menubar-proof.js +59 -1
- package/dist/core/release/main-push-guard.js +288 -24
- package/dist/core/release/main-push-receipt.js +10 -45
- package/dist/core/release/package-size-budget.js +1 -1
- package/dist/core/release/release-gate-contract.js +2 -0
- package/dist/core/release/release-pack-receipt.js +1 -1
- package/dist/core/release/release-proof-io.js +33 -0
- package/dist/core/release/release-upgrade-baseline.js +9 -0
- package/dist/core/release/runtime-script-pack-closure.js +153 -4
- package/dist/core/release/stage-publish.js +194 -0
- package/dist/core/remote/index.js +2 -0
- package/dist/core/remote/local-worker-client.js +35 -0
- package/dist/core/remote/machine-registry.js +18 -13
- package/dist/core/remote/owner-proof.js +1 -3
- package/dist/core/remote/protocol.js +1 -3
- package/dist/core/remote/readiness.js +1 -3
- package/dist/core/remote/session-binding.js +153 -0
- package/dist/core/remote/session-index.js +1 -3
- package/dist/core/remote/types.js +1 -0
- package/dist/core/remote/worker.js +228 -14
- package/dist/core/responses-stream.js +151 -0
- package/dist/core/routes/dollar-manifest-lite.js +1 -1
- package/dist/core/routes.js +8 -8
- package/dist/core/rust-accelerator.js +12 -2
- package/dist/core/safety/ssot-guard.js +1 -3
- package/dist/core/search/benchmark.js +358 -0
- package/dist/core/search/cache.js +65 -0
- package/dist/core/search/context.js +144 -0
- package/dist/core/search/doctor.js +74 -0
- package/dist/core/search/files.js +192 -0
- package/dist/core/search/index.js +5 -0
- package/dist/core/search/ipc.js +64 -0
- package/dist/core/search/provider.js +142 -0
- package/dist/core/search/rust-bridge.js +24 -0
- package/dist/core/search/structure.js +230 -0
- package/dist/core/search/symbol.js +272 -0
- package/dist/core/search/text.js +146 -0
- package/dist/core/search/types.js +22 -0
- package/dist/core/search/typescript-ls.js +215 -0
- package/dist/core/search-visibility/discovery.js +1 -3
- package/dist/core/skill-forge.js +1 -1
- package/dist/core/stop-gate/gate-evaluator.js +3 -3
- package/dist/core/stop-gate/stop-gate-check.js +1 -3
- package/dist/core/structured-output-adapter.js +62 -2
- package/dist/core/subagents/agent-catalog.js +56 -43
- package/dist/core/subagents/model-policy.js +17 -7
- package/dist/core/subagents/naruto-proof-projection.js +2 -6
- package/dist/core/subagents/official-subagent-config.js +1 -3
- package/dist/core/subagents/official-subagent-preparation.js +73 -10
- package/dist/core/subagents/official-subagent-prompt.js +85 -18
- package/dist/core/subagents/official-subagent-runner.js +10 -5
- package/dist/core/subagents/role-model-preferences.js +202 -44
- package/dist/core/subagents/subagent-evidence.js +1 -3
- package/dist/core/subagents/thread-budget.js +1 -1
- package/dist/core/subagents/triwiki-attention.js +1 -5
- package/dist/core/telegram/config.js +29 -12
- package/dist/core/telegram/hub.js +8 -2
- package/dist/core/telegram/index.js +2 -0
- package/dist/core/telegram/messages.js +8 -2
- package/dist/core/telegram/runtime-projection.js +8 -5
- package/dist/core/telegram/runtime.js +19 -9
- package/dist/core/telegram/service.js +181 -0
- package/dist/core/telegram/setup.js +220 -0
- package/dist/core/text/regex.js +3 -0
- package/dist/core/text/strings.js +6 -0
- package/dist/core/triwiki-wrongness/image-wrongness.js +1 -3
- package/dist/core/triwiki-wrongness/wrongness-ledger.js +1 -3
- package/dist/core/triwiki-wrongness/wrongness-proof-linker.js +1 -3
- package/dist/core/triwiki-wrongness/wrongness-retrieval.js +1 -3
- package/dist/core/triwiki-wrongness/wrongness-schema.js +1 -3
- package/dist/core/triwiki-wrongness/wrongness-trust-policy.js +1 -3
- package/dist/core/trust-kernel/completion-contract.js +1 -3
- package/dist/core/trust-kernel/route-contract.js +1 -3
- package/dist/core/update/update-migration-state.js +1 -3
- package/dist/core/update-check.js +20 -6
- package/dist/core/verification/diff-quality.js +3 -4
- package/dist/core/verification/impact-scan.js +36 -89
- package/dist/core/verification/mistake-rule-compiler.js +17 -4
- package/dist/core/version-manager.js +3 -20
- package/dist/core/version.js +1 -1
- package/dist/native/sks-menubar/Sources/ControlCenterWindowController.swift +23 -3
- package/dist/native/sks-menubar/Sources/ControlKit.swift +102 -0
- package/dist/native/sks-menubar/Sources/DiagnosticsViewController.swift +23 -11
- package/dist/native/sks-menubar/Sources/MCPServersViewController.swift +7 -3
- package/dist/native/sks-menubar/Sources/OperationCoordinator.swift +17 -1
- package/dist/native/sks-menubar/Sources/OverviewViewController.swift +22 -15
- package/dist/native/sks-menubar/Sources/ProcessClient.swift +15 -5
- package/dist/native/sks-menubar/Sources/ProvidersMultiProvider.swift +324 -0
- package/dist/native/sks-menubar/Sources/ProvidersOpenRouter.swift +154 -214
- package/dist/native/sks-menubar/Sources/ProvidersRoleModels.swift +252 -0
- package/dist/native/sks-menubar/Sources/ProvidersViewController.swift +77 -71
- package/dist/native/sks-menubar/Sources/RemoteTelegramViewController.swift +167 -51
- package/dist/native/sks-menubar/Sources/SettingsViewController.swift +14 -5
- package/dist/native/sks-menubar/Sources/SidebarItem.swift +15 -1
- package/dist/native/sks-menubar/Sources/StatusItemController.swift +2 -2
- package/dist/native/sks-menubar/Sources/UpdatesViewController.swift +16 -12
- package/dist/scripts/agent-guidance-dedup-check.js +23 -0
- package/dist/scripts/agent-message-bus-reader-check.js +1 -1
- package/dist/scripts/all-feature-deep-completion-check.js +1 -1
- package/dist/scripts/appshots-thread-attachment-discovery-check.js +1 -1
- package/dist/scripts/architecture-guard-check.js +1 -2
- package/dist/scripts/certificate-sla-check.js +1 -1
- package/dist/scripts/cli-output-consistency-check.js +1 -1
- package/dist/scripts/codex-0-134-runner-truth-check.js +1 -1
- package/dist/scripts/codex-0138-capability-artifact-check.js +1 -1
- package/dist/scripts/codex-0138-capability-check.js +1 -1
- package/dist/scripts/codex-0138-doctor-check.js +1 -1
- package/dist/scripts/codex-0138-feature-probes-check.js +1 -1
- package/dist/scripts/codex-0144-app-server-v2-check.js +1 -1
- package/dist/scripts/codex-0144-binary-identity-check.js +1 -1
- package/dist/scripts/codex-0144-capability-check.js +1 -1
- package/dist/scripts/codex-0144-core-real-probes-check.js +1 -1
- package/dist/scripts/codex-0144-manifest-check.js +1 -1
- package/dist/scripts/codex-0144-policy-check.js +1 -1
- package/dist/scripts/codex-0144-thread-store-check.js +1 -1
- package/dist/scripts/codex-agent-role-rich-content-check.js +2 -2
- package/dist/scripts/codex-agent-role-sync-check.js +2 -2
- package/dist/scripts/codex-agent-type-routing-check.js +2 -2
- package/dist/scripts/codex-app-execution-profile-check.js +2 -2
- package/dist/scripts/codex-app-handoff-check.js +1 -1
- package/dist/scripts/codex-app-handoff-launch-check.js +1 -1
- package/dist/scripts/codex-control-tool-output-continuity-audit-check.js +1 -1
- package/dist/scripts/codex-lb-fast-ui-preservation-check.js +1 -3
- package/dist/scripts/codex-native-feature-broker-blackbox.js +2 -2
- package/dist/scripts/codex-native-feature-broker-check.js +2 -2
- package/dist/scripts/{sks-3-1-6-directive-check-lib.js → codex-native-gate-lib.js} +5 -5
- package/dist/scripts/codex-native-harness-compat-check.js +2 -2
- package/dist/scripts/codex-native-hook-lifecycle-proof-check.js +2 -2
- package/dist/scripts/codex-plugin-app-template-policy-check.js +1 -1
- package/dist/scripts/codex-sdk-backend-router-check.js +1 -1
- package/dist/scripts/codex-sdk-capability-check.js +1 -1
- package/dist/scripts/context7-evidence-dedupe-check.js +1 -1
- package/dist/scripts/core-skill-card-schema-check.js +1 -1
- package/dist/scripts/core-skill-deployment-snapshot-check.js +1 -1
- package/dist/scripts/core-skill-heldout-validation-check.js +1 -1
- package/dist/scripts/core-skill-no-inference-optimizer-check.js +1 -1
- package/dist/scripts/core-skill-patch-check.js +1 -1
- package/dist/scripts/core-skill-route-runtime-integration-check.js +1 -1
- package/dist/scripts/current-command-surface-check.js +1 -1
- package/dist/scripts/current-surface-update-e2e-check.js +4 -1
- package/dist/scripts/current-upgrade-matrix-check.js +1 -1
- package/dist/scripts/dfix-fixture-check.js +1 -1
- package/dist/scripts/dfix-patch-handoff-check.js +1 -1
- package/dist/scripts/dfix-verification-check.js +1 -1
- package/dist/scripts/dfix-verification-recommendation-check.js +1 -1
- package/dist/scripts/docs-truthfulness-check.js +16 -3
- package/dist/scripts/doctor-codex-app-harness-check.js +2 -2
- package/dist/scripts/evidence-flagship-coverage-check.js +1 -1
- package/dist/scripts/{sks-1-18-gate-lib.js → gate-lib.js} +1 -1
- package/dist/scripts/gate-policy-audit-check.js +4 -1
- package/dist/scripts/git-worktree-checkpoint-check.js +1 -1
- package/dist/scripts/git-worktree-cross-rebase-check.js +1 -1
- package/dist/scripts/git-worktree-diff-envelope-check.js +1 -1
- package/dist/scripts/git-worktree-dirty-lock-check.js +1 -1
- package/dist/scripts/git-worktree-dirty-main-detection-check.js +1 -1
- package/dist/scripts/git-worktree-integration-primary-check.js +1 -1
- package/dist/scripts/git-worktree-manifest-append-check.js +1 -1
- package/dist/scripts/git-worktree-untracked-diff-check.js +1 -1
- package/dist/scripts/harness-benchmark-check.js +1 -1
- package/dist/scripts/helper-dedup-check.js +62 -0
- package/dist/scripts/hook-latency-budget-check.js +1 -1
- package/dist/scripts/image-artifact-path-contract-check.js +1 -1
- package/dist/scripts/imagegen-real-smoke-check.js +2 -5
- package/dist/scripts/installed-package-smoke-check.js +1 -1
- package/dist/scripts/legacy-gate-inventory-check.js +1 -1
- package/dist/scripts/legacy-gate-purge-check.js +1 -1
- package/dist/scripts/legacy-strong-inventory-check.js +1 -1
- package/dist/scripts/lib/codex-sdk-gate-lib.js +1 -1
- package/dist/scripts/mad-sks-launch-sql-plane-boundary-check.js +1 -1
- package/dist/scripts/mad-sks-sql-plane-capability-check.js +1 -1
- package/dist/scripts/mad-sks-sql-plane-lifecycle-hook-decision-check.js +1 -1
- package/dist/scripts/mad-sks-sql-plane-result-lifecycle-check.js +1 -1
- package/dist/scripts/managed-config-merge-check.js +1 -1
- package/dist/scripts/mcp-plugin-inventory-check.js +1 -1
- package/dist/scripts/model-call-concurrency-check.js +1 -1
- package/dist/scripts/mutation-callsite-coverage-check.js +1 -1
- package/dist/scripts/naruto-ssot-gate-aliases-check.js +1 -1
- package/dist/scripts/naruto-ssot-pipeline-default-check.js +1 -1
- package/dist/scripts/naruto-ssot-route-normalization-check.js +1 -1
- package/dist/scripts/naruto-ssot-routing-check.js +1 -1
- package/dist/scripts/naruto-worktree-coding-blackbox.js +1 -1
- package/dist/scripts/native-capability-repair-matrix-check.js +1 -1
- package/dist/scripts/native-image-generation-repair-check.js +1 -1
- package/dist/scripts/official-subagent-workflow-check.js +3 -3
- package/dist/scripts/package-published-contract-check.js +37 -4
- package/dist/scripts/packlist-performance-check.js +17 -1
- package/dist/scripts/pipeline-codex-native-doctor-mad-routing-real-blackbox.js +1 -3
- package/dist/scripts/ppt-real-export-adapter-check.js +1 -1
- package/dist/scripts/ppt-real-imagegen-wiring-check.js +1 -1
- package/dist/scripts/ppt-reexport-rereview-check.js +1 -1
- package/dist/scripts/prepublish-fast-check.js +1 -1
- package/dist/scripts/probe-memoization-check.js +2 -2
- package/dist/scripts/prompt-placeholder-guard-check.js +1 -1
- package/dist/scripts/qa-loop-app-handoff-capability-check.js +1 -1
- package/dist/scripts/qa-loop-app-handoff-check.js +1 -1
- package/dist/scripts/qa-loop-app-handoff-cli-check.js +1 -1
- package/dist/scripts/qa-loop-app-handoff-confirmation-check.js +1 -1
- package/dist/scripts/qa-loop-app-handoff-gate-lifecycle-check.js +1 -1
- package/dist/scripts/qa-loop-app-handoff-launch-check.js +1 -1
- package/dist/scripts/qa-loop-app-handoff-status-lifecycle-check.js +1 -1
- package/dist/scripts/qa-loop-budget-policy-check.js +1 -1
- package/dist/scripts/qa-loop-effort-escalation-check.js +1 -1
- package/dist/scripts/qa-loop-execution-profile-routing-check.js +2 -2
- package/dist/scripts/qa-loop-image-path-exposure-check.js +1 -1
- package/dist/scripts/qa-loop-image-path-prompt-injection-check.js +1 -1
- package/dist/scripts/{sks-1-12-real-execution-check-lib.js → real-execution-check-lib.js} +1 -1
- package/dist/scripts/release-affected-selector-check.js +1 -1
- package/dist/scripts/release-aggressive-resource-governor-check.js +1 -1
- package/dist/scripts/release-cache-glob-hashing-check.js +1 -1
- package/dist/scripts/release-cache-input-classifier-check.js +1 -1
- package/dist/scripts/release-cache-neutralization-report-check.js +1 -1
- package/dist/scripts/release-cache-version-neutral-fixture-check.js +1 -1
- package/dist/scripts/release-dynamic-presets-check.js +2 -2
- package/dist/scripts/release-full-parallelism-blackbox.js +1 -1
- package/dist/scripts/release-gate-batch-runner-check.js +1 -1
- package/dist/scripts/release-gate-budget-check.js +1 -1
- package/dist/scripts/release-gate-dag-runner-check.js +1 -1
- package/dist/scripts/release-latency-slo-check.js +1 -1
- package/dist/scripts/release-metadata-check.js +256 -2
- package/dist/scripts/release-parallel-speed-budget-check.js +1 -1
- package/dist/scripts/release-proof-truth-check.js +1 -1
- package/dist/scripts/release-provenance-check.js +4 -2
- package/dist/scripts/release-runtime-truth-matrix-check.js +1 -1
- package/dist/scripts/research-blueprint-densifier-check.js +1 -1
- package/dist/scripts/research-claim-builder-check.js +1 -1
- package/dist/scripts/research-complete-package-fixture-check.js +1 -1
- package/dist/scripts/research-execution-profile-routing-check.js +2 -2
- package/dist/scripts/research-final-reviewer-blackbox.js +1 -1
- package/dist/scripts/{sks-3-1-4-directive-check-lib.js → runtime-domain-gate-lib.js} +2 -2
- package/dist/scripts/runtime-proof-summary-check.js +1 -1
- package/dist/scripts/runtime-script-pack-closure-check.js +7 -1
- package/dist/scripts/scheduler-batch-dispatch-check.js +1 -1
- package/dist/scripts/scheduler-parallel-proof-consistency-check.js +1 -1
- package/dist/scripts/scheduler-utilization-integral-check.js +1 -1
- package/dist/scripts/search-visibility-gate-lib.js +1 -1
- package/dist/scripts/secret-preservation-check.js +1 -1
- package/dist/scripts/seo-geo-geo-disambiguation-check.js +1 -1
- package/dist/scripts/seo-geo-skill-rich-content-check.js +1 -1
- package/dist/scripts/side-effect-runtime-report-check.js +1 -1
- package/dist/scripts/{sks-3-1-8-check-lib.js → skill-fixture-check-lib.js} +1 -1
- package/dist/scripts/skill-name-canonicalizer-check.js +1 -1
- package/dist/scripts/skills-manifest-continuity-check.js +1 -1
- package/dist/scripts/sks-uninstall-regression-check.js +1 -1
- package/dist/scripts/sksd-daemon-check.js +1 -1
- package/dist/scripts/super-search-provider-interface-check.js +1 -1
- package/dist/scripts/triwiki-cache-key-check.js +1 -1
- package/dist/scripts/triwiki-proof-bank-blackbox.js +2 -2
- package/dist/scripts/triwiki-proof-bank-check.js +1 -1
- package/dist/scripts/triwiki-proof-card-check.js +1 -1
- package/dist/scripts/type-surface-codex-app-check.js +2 -2
- package/dist/scripts/{sks-3-1-5-directive-check-lib.js → typed-routing-gate-lib.js} +2 -2
- package/dist/scripts/ultra-router-auto-router-check.js +1 -1
- package/dist/scripts/ux-review-extract-wires-real-extractor-check.js +1 -1
- package/dist/scripts/ux-review-patch-diff-recheck-check.js +1 -1
- package/dist/scripts/ux-review-run-wires-imagegen-check.js +9 -2
- package/package.json +5 -7
- package/release-gates.v2.json +66 -11
- package/runtime-required-scripts.json +138 -14
- package/config/bench-baseline.json +0 -7
- package/dist/core/codex-app/sks-menubar.js +0 -1
- package/dist/core/release/release-closure-contract.js +0 -30
- package/dist/core/release/release-closure-helpers.js +0 -293
- package/dist/core/release/release-closure-validation.js +0 -284
- package/dist/core/release/release-closure.js +0 -163
- package/dist/scripts/build-dist.js +0 -124
- package/dist/scripts/build-once-runner-check.js +0 -6
- package/dist/scripts/canonical-test-runner.js +0 -234
- package/dist/scripts/changelog-check.js +0 -45
- package/dist/scripts/check-architecture.js +0 -295
- package/dist/scripts/check-cli-entrypoint.js +0 -41
- package/dist/scripts/check-command-module-budget.js +0 -77
- package/dist/scripts/check-feature-quality.js +0 -51
- package/dist/scripts/check-legacy-free.js +0 -64
- package/dist/scripts/check-pipeline-budget.js +0 -49
- package/dist/scripts/check-pipeline-runtime.js +0 -16
- package/dist/scripts/check-publish-tag.js +0 -56
- package/dist/scripts/check-route-modularity.js +0 -72
- package/dist/scripts/codex-0140-capability-check.js +0 -14
- package/dist/scripts/codex-0140-feature-probes-check.js +0 -23
- package/dist/scripts/codex-permission-profiles-check.js +0 -34
- package/dist/scripts/codex-project-config-policy-splitter-check.js +0 -49
- package/dist/scripts/competitor-scorecard-check.js +0 -24
- package/dist/scripts/core-skill-no-drift-check.js +0 -23
- package/dist/scripts/db-route-materialization-check.js +0 -32
- package/dist/scripts/doctor-context7-mcp-repair-blackbox.js +0 -15
- package/dist/scripts/doctor-fastpath-check.js +0 -25
- package/dist/scripts/doctor-fix-production-blackbox.js +0 -35
- package/dist/scripts/doctor-idempotence-check.js +0 -6
- package/dist/scripts/doctor-ops-semantics-check.js +0 -83
- package/dist/scripts/doctor-startup-config-repair-blackbox.js +0 -18
- package/dist/scripts/doctor-supabase-mcp-repair-blackbox.js +0 -13
- package/dist/scripts/ensure-bin-executable.js +0 -16
- package/dist/scripts/fsx-hotpath-check.js +0 -9
- package/dist/scripts/high-risk-contracts-check.js +0 -183
- package/dist/scripts/hook-latency-quantum-check.js +0 -120
- package/dist/scripts/import-graph-budget-check.js +0 -9
- package/dist/scripts/mcp-tool-naming-parity-check.js +0 -14
- package/dist/scripts/naruto-codex-e2e-check.js +0 -105
- package/dist/scripts/naruto-write-e2e-check.js +0 -31
- package/dist/scripts/native-capability-postcheck-check.js +0 -16
- package/dist/scripts/ops-diagnostics-bundle-check.js +0 -11
- package/dist/scripts/parallel-production-smoke-check.js +0 -20
- package/dist/scripts/perf-budget-check.js +0 -12
- package/dist/scripts/project-skill-dedupe-blackbox.js +0 -62
- package/dist/scripts/release-dag-full-coverage-check.js +0 -98
- package/dist/scripts/release-dist-freshness-check.js +0 -6
- package/dist/scripts/release-file-ownership-check.js +0 -35
- package/dist/scripts/release-gate-script-parity-check.js +0 -148
- package/dist/scripts/release-macos-menubar-proof.js +0 -167
- package/dist/scripts/release-main-push-guard.js +0 -37
- package/dist/scripts/release-main-push-receipt.js +0 -43
- package/dist/scripts/release-metadata-1-19-check.js +0 -257
- package/dist/scripts/release-version-truth-check.js +0 -138
- package/dist/scripts/retention-apply-smoke-check.js +0 -19
- package/dist/scripts/retention-budget-check.js +0 -6
- package/dist/scripts/retention-dry-run-check.js +0 -8
- package/dist/scripts/rollback-recovery-smoke-check.js +0 -70
- package/dist/scripts/route-intent-regression-check.js +0 -42
- package/dist/scripts/runtime-current-terminal-check.js +0 -108
- package/dist/scripts/runtime-dist-parity-check.js +0 -76
- package/dist/scripts/runtime-no-src-mjs-check.js +0 -30
- package/dist/scripts/runtime-ts-rust-boundary-check.js +0 -58
- package/dist/scripts/runtime-ts-source-of-truth-check.js +0 -53
- package/dist/scripts/secret-preservation-guard-check.js +0 -36
- package/dist/scripts/seo-marketing-truthfulness-check.js +0 -98
- package/dist/scripts/seo-metadata-sync-check.js +0 -60
- package/dist/scripts/sizecheck.js +0 -148
- package/dist/scripts/sks-menubar-install-check.js +0 -333
- package/dist/scripts/supabase-secret-preservation-blackbox.js +0 -28
- package/dist/scripts/super-search-live-smoke-check.js +0 -115
- package/dist/scripts/super-search-local-http-smoke-check.js +0 -16
- package/dist/scripts/super-search-offline-contract-check.js +0 -43
- package/dist/scripts/update-fastpath-check.js +0 -28
- package/dist/scripts/update-preserves-supabase-keys-blackbox.js +0 -26
- package/dist/scripts/upgrade-migration-matrix-check.js +0 -351
- package/dist/scripts/write-build-manifest.js +0 -70
- package/dist/scripts/zellij-capability-check.js +0 -13
- package/dist/scripts/zellij-developer-controls-check.js +0 -16
- package/dist/scripts/zellij-doctor-readiness-check.js +0 -49
- package/dist/scripts/zellij-dynamic-pane-lifecycle-check.js +0 -19
- package/dist/scripts/zellij-fake-adapter-check.js +0 -31
- package/dist/scripts/zellij-first-slot-down-stack-check.js +0 -20
- package/dist/scripts/zellij-first-slot-down-stack-real-check.js +0 -348
- package/dist/scripts/zellij-homebrew-policy-check.js +0 -3
- package/dist/scripts/zellij-initial-main-only-blackbox.js +0 -21
- package/dist/scripts/zellij-lane-renderer-check.js +0 -78
- package/dist/scripts/zellij-launch-command-truth-check.js +0 -62
- package/dist/scripts/zellij-layout-valid-check.js +0 -120
- package/dist/scripts/zellij-pane-creation-lock-metrics-check.js +0 -10
- package/dist/scripts/zellij-pane-lock-concurrency-blackbox.js +0 -78
- package/dist/scripts/zellij-pane-lock-does-not-block-worker-check.js +0 -12
- package/dist/scripts/zellij-pane-lock-open-worker-integration-blackbox.js +0 -134
- package/dist/scripts/zellij-qa-app-handoff-status-check.js +0 -7
- package/dist/scripts/zellij-right-column-geometry-proof.js +0 -158
- package/dist/scripts/zellij-right-column-headless-overflow-check.js +0 -20
- package/dist/scripts/zellij-right-column-manager-check.js +0 -24
- package/dist/scripts/zellij-self-heal-check.js +0 -3
- package/dist/scripts/zellij-self-heal-dry-run-check.js +0 -3
- package/dist/scripts/zellij-self-heal-status-contract-check.js +0 -3
- package/dist/scripts/zellij-self-heal-typed-blackbox.js +0 -3
- package/dist/scripts/zellij-slot-column-anchor-check.js +0 -65
- package/dist/scripts/zellij-slot-column-anchor-telemetry-check.js +0 -8
- package/dist/scripts/zellij-slot-only-ui-check.js +0 -29
- package/dist/scripts/zellij-slot-pane-renderer-check.js +0 -149
- package/dist/scripts/zellij-slot-pane-stale-detection-check.js +0 -65
- package/dist/scripts/zellij-slot-pane-telemetry-renderer-check.js +0 -11
- package/dist/scripts/zellij-slot-renderer-proof-semantics-check.js +0 -58
- package/dist/scripts/zellij-slot-telemetry-check.js +0 -38
- package/dist/scripts/zellij-slot-telemetry-incremental-check.js +0 -46
- package/dist/scripts/zellij-slot-telemetry-live-flush-check.js +0 -55
- package/dist/scripts/zellij-slot-telemetry-performance-check.js +0 -32
- package/dist/scripts/zellij-slot-telemetry-real-blackbox.js +0 -19
- package/dist/scripts/zellij-slot-telemetry-renderer-check.js +0 -11
- package/dist/scripts/zellij-slot-telemetry-runtime-check.js +0 -23
- package/dist/scripts/zellij-spawn-on-demand-layout-check.js +0 -45
- package/dist/scripts/zellij-stacked-capability-routing-check.js +0 -9
- package/dist/scripts/zellij-stacked-fallback-integration-blackbox.js +0 -78
- package/dist/scripts/zellij-stacked-version-matrix-check.js +0 -29
- package/dist/scripts/zellij-stacked-version-parser-check.js +0 -19
- package/dist/scripts/zellij-ui-design-check.js +0 -92
- package/dist/scripts/zellij-update-missing-self-heal-check.js +0 -3
- package/dist/scripts/zellij-update-prompt-matrix-check.js +0 -16
- package/dist/scripts/zellij-update-prompt-mode-check.js +0 -18
- package/dist/scripts/zellij-update-prompt-safety-check.js +0 -8
- package/dist/scripts/zellij-worker-pane-manager-check.js +0 -108
- package/dist/scripts/zellij-worker-pane-manager-single-owner-check.js +0 -47
- package/dist/scripts/zellij-worker-pane-real-ui-blackbox.js +0 -199
- /package/dist/scripts/{sks-1-11-gate-lib.js → sks-cli-gate-lib.js} +0 -0
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import ts from 'typescript';
|
|
4
|
+
const TS_EXT = /\.(?:[cm]?[jt]sx?)$/i;
|
|
5
|
+
export function createSearchLanguageService(root, relativeFiles) {
|
|
6
|
+
const absRoot = path.resolve(root);
|
|
7
|
+
const files = relativeFiles
|
|
8
|
+
.filter((rel) => TS_EXT.test(rel))
|
|
9
|
+
.map((rel) => path.resolve(absRoot, rel))
|
|
10
|
+
.filter((abs) => fs.existsSync(abs));
|
|
11
|
+
if (!files.length)
|
|
12
|
+
return null;
|
|
13
|
+
const configPath = ts.findConfigFile(absRoot, ts.sys.fileExists, 'tsconfig.json');
|
|
14
|
+
let options = {
|
|
15
|
+
allowJs: true,
|
|
16
|
+
checkJs: false,
|
|
17
|
+
target: ts.ScriptTarget.ESNext,
|
|
18
|
+
module: ts.ModuleKind.ESNext,
|
|
19
|
+
moduleResolution: ts.ModuleResolutionKind.Bundler,
|
|
20
|
+
jsx: ts.JsxEmit.ReactJSX,
|
|
21
|
+
skipLibCheck: true,
|
|
22
|
+
noEmit: true
|
|
23
|
+
};
|
|
24
|
+
if (configPath) {
|
|
25
|
+
const read = ts.readConfigFile(configPath, ts.sys.readFile);
|
|
26
|
+
if (!read.error) {
|
|
27
|
+
const parsed = ts.parseJsonConfigFileContent(read.config, ts.sys, path.dirname(configPath));
|
|
28
|
+
options = { ...parsed.options, noEmit: true, skipLibCheck: true, allowJs: true };
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
const versions = new Map();
|
|
32
|
+
for (const file of files)
|
|
33
|
+
versions.set(normalizeFs(file), '1');
|
|
34
|
+
const scriptSnapshots = new Map();
|
|
35
|
+
const host = {
|
|
36
|
+
getCompilationSettings: () => options,
|
|
37
|
+
getScriptFileNames: () => files.map(normalizeFs),
|
|
38
|
+
getScriptVersion: (fileName) => versions.get(normalizeFs(fileName)) || '0',
|
|
39
|
+
getScriptSnapshot: (fileName) => {
|
|
40
|
+
const key = normalizeFs(fileName);
|
|
41
|
+
const cached = scriptSnapshots.get(key);
|
|
42
|
+
if (cached)
|
|
43
|
+
return cached;
|
|
44
|
+
if (!fs.existsSync(key))
|
|
45
|
+
return undefined;
|
|
46
|
+
const text = fs.readFileSync(key, 'utf8');
|
|
47
|
+
const snap = ts.ScriptSnapshot.fromString(text);
|
|
48
|
+
scriptSnapshots.set(key, snap);
|
|
49
|
+
return snap;
|
|
50
|
+
},
|
|
51
|
+
getCurrentDirectory: () => absRoot,
|
|
52
|
+
getDefaultLibFileName: (opts) => ts.getDefaultLibFilePath(opts),
|
|
53
|
+
fileExists: ts.sys.fileExists,
|
|
54
|
+
readFile: ts.sys.readFile,
|
|
55
|
+
readDirectory: ts.sys.readDirectory,
|
|
56
|
+
directoryExists: ts.sys.directoryExists,
|
|
57
|
+
getDirectories: ts.sys.getDirectories
|
|
58
|
+
};
|
|
59
|
+
if (typeof ts.sys.realpath === 'function') {
|
|
60
|
+
host.realpath = (p) => ts.sys.realpath(p);
|
|
61
|
+
}
|
|
62
|
+
const service = ts.createLanguageService(host, ts.createDocumentRegistry());
|
|
63
|
+
return {
|
|
64
|
+
service,
|
|
65
|
+
root: absRoot,
|
|
66
|
+
files: files.map(normalizeFs),
|
|
67
|
+
dispose: () => service.dispose()
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
export function findExactDefinitions(session, symbol, limits) {
|
|
71
|
+
const hits = [];
|
|
72
|
+
const seen = new Set();
|
|
73
|
+
for (const file of session.files) {
|
|
74
|
+
if (hits.length >= limits.maxMatches)
|
|
75
|
+
break;
|
|
76
|
+
const snap = session.service.getProgram()?.getSourceFile(file);
|
|
77
|
+
if (!snap)
|
|
78
|
+
continue;
|
|
79
|
+
const text = snap.getFullText();
|
|
80
|
+
let from = 0;
|
|
81
|
+
while (hits.length < limits.maxMatches) {
|
|
82
|
+
const idx = indexOfIdentifier(text, symbol, from);
|
|
83
|
+
if (idx < 0)
|
|
84
|
+
break;
|
|
85
|
+
from = idx + symbol.length;
|
|
86
|
+
const defs = session.service.getDefinitionAtPosition(file, idx) || [];
|
|
87
|
+
for (const def of defs) {
|
|
88
|
+
const defFile = session.service.getProgram()?.getSourceFile(def.fileName);
|
|
89
|
+
const defText = defFile?.getFullText().slice(def.textSpan.start, def.textSpan.start + def.textSpan.length) || '';
|
|
90
|
+
const nameOk = def.name === symbol || defText === symbol || defText.startsWith(symbol);
|
|
91
|
+
if (!nameOk)
|
|
92
|
+
continue;
|
|
93
|
+
const key = `${normalizeRel(session.root, def.fileName)}:${def.textSpan.start}:def`;
|
|
94
|
+
if (seen.has(key))
|
|
95
|
+
continue;
|
|
96
|
+
seen.add(key);
|
|
97
|
+
const span = defText === symbol || defText.length <= symbol.length + 2
|
|
98
|
+
? def.textSpan
|
|
99
|
+
: { start: idx, length: symbol.length };
|
|
100
|
+
const hit = spanToHit(session.root, def.fileName, span, 'definition');
|
|
101
|
+
if (hit)
|
|
102
|
+
hits.push(hit);
|
|
103
|
+
if (hits.length >= limits.maxMatches)
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return hits;
|
|
109
|
+
}
|
|
110
|
+
export function findExactReferences(session, symbol, limits) {
|
|
111
|
+
const hits = [];
|
|
112
|
+
const seen = new Set();
|
|
113
|
+
const seedPositions = [];
|
|
114
|
+
for (const file of session.files) {
|
|
115
|
+
const snap = session.service.getProgram()?.getSourceFile(file);
|
|
116
|
+
if (!snap)
|
|
117
|
+
continue;
|
|
118
|
+
const text = snap.getFullText();
|
|
119
|
+
let from = 0;
|
|
120
|
+
while (seedPositions.length < 8) {
|
|
121
|
+
const idx = indexOfIdentifier(text, symbol, from);
|
|
122
|
+
if (idx < 0)
|
|
123
|
+
break;
|
|
124
|
+
from = idx + symbol.length;
|
|
125
|
+
const defs = session.service.getDefinitionAtPosition(file, idx) || [];
|
|
126
|
+
if (defs.length) {
|
|
127
|
+
seedPositions.push({ file, pos: idx });
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
if (seedPositions.length >= 8)
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
if (!seedPositions.length) {
|
|
135
|
+
for (const file of session.files) {
|
|
136
|
+
const snap = session.service.getProgram()?.getSourceFile(file);
|
|
137
|
+
if (!snap)
|
|
138
|
+
continue;
|
|
139
|
+
const text = snap.getFullText();
|
|
140
|
+
let from = 0;
|
|
141
|
+
while (seedPositions.length < 3) {
|
|
142
|
+
const idx = indexOfIdentifier(text, symbol, from);
|
|
143
|
+
if (idx < 0)
|
|
144
|
+
break;
|
|
145
|
+
from = idx + symbol.length;
|
|
146
|
+
seedPositions.push({ file, pos: idx });
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
for (const seed of seedPositions) {
|
|
151
|
+
if (hits.length >= limits.maxMatches)
|
|
152
|
+
break;
|
|
153
|
+
const groups = session.service.findReferences(seed.file, seed.pos) || [];
|
|
154
|
+
for (const group of groups) {
|
|
155
|
+
for (const ref of group.references) {
|
|
156
|
+
if (hits.length >= limits.maxMatches)
|
|
157
|
+
break;
|
|
158
|
+
const key = `${normalizeRel(session.root, ref.fileName)}:${ref.textSpan.start}:ref`;
|
|
159
|
+
if (seen.has(key))
|
|
160
|
+
continue;
|
|
161
|
+
if (ref.isDefinition)
|
|
162
|
+
continue;
|
|
163
|
+
const defsHere = session.service.getDefinitionAtPosition(ref.fileName, ref.textSpan.start) || [];
|
|
164
|
+
const isDefSite = defsHere.some((d) => normalizeFs(d.fileName) === normalizeFs(ref.fileName) && d.textSpan.start === ref.textSpan.start);
|
|
165
|
+
if (isDefSite)
|
|
166
|
+
continue;
|
|
167
|
+
seen.add(key);
|
|
168
|
+
const hit = spanToHit(session.root, ref.fileName, ref.textSpan, 'reference');
|
|
169
|
+
if (hit) {
|
|
170
|
+
hit.isWriteAccess = ref.isWriteAccess;
|
|
171
|
+
hits.push(hit);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return hits;
|
|
177
|
+
}
|
|
178
|
+
function indexOfIdentifier(text, symbol, from) {
|
|
179
|
+
let idx = text.indexOf(symbol, from);
|
|
180
|
+
while (idx >= 0) {
|
|
181
|
+
const before = idx === 0 ? '' : text[idx - 1] || '';
|
|
182
|
+
const after = text[idx + symbol.length] || '';
|
|
183
|
+
if (!/[A-Za-z0-9_$]/.test(before) && !/[A-Za-z0-9_$]/.test(after))
|
|
184
|
+
return idx;
|
|
185
|
+
idx = text.indexOf(symbol, idx + symbol.length);
|
|
186
|
+
}
|
|
187
|
+
return -1;
|
|
188
|
+
}
|
|
189
|
+
function spanToHit(root, fileName, span, kind) {
|
|
190
|
+
const abs = normalizeFs(fileName);
|
|
191
|
+
if (!fs.existsSync(abs))
|
|
192
|
+
return null;
|
|
193
|
+
const text = fs.readFileSync(abs, 'utf8');
|
|
194
|
+
const sf = ts.createSourceFile(abs, text, ts.ScriptTarget.Latest, true);
|
|
195
|
+
const start = sf.getLineAndCharacterOfPosition(span.start);
|
|
196
|
+
const end = sf.getLineAndCharacterOfPosition(span.start + span.length);
|
|
197
|
+
const lineStart = text.lastIndexOf('\n', span.start - 1) + 1;
|
|
198
|
+
const lineEndIdx = text.indexOf('\n', span.start);
|
|
199
|
+
const lineText = text.slice(lineStart, lineEndIdx < 0 ? text.length : lineEndIdx);
|
|
200
|
+
return {
|
|
201
|
+
path: normalizeRel(root, abs),
|
|
202
|
+
line: start.line + 1,
|
|
203
|
+
column: start.character + 1,
|
|
204
|
+
endLine: end.line + 1,
|
|
205
|
+
endColumn: end.character + 1,
|
|
206
|
+
text: lineText.trim().slice(0, 240),
|
|
207
|
+
kind
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
function normalizeFs(file) {
|
|
211
|
+
return path.resolve(file);
|
|
212
|
+
}
|
|
213
|
+
function normalizeRel(root, file) {
|
|
214
|
+
return path.relative(root, normalizeFs(file)).split(path.sep).join('/');
|
|
215
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { exists, readJson, readText, sha256 } from '../fsx.js';
|
|
4
|
+
import { isRecord } from '../json/records.js';
|
|
4
5
|
const MAX_DISCOVERY_FILES = 2500;
|
|
5
6
|
const DEFAULT_CAPABILITIES = {
|
|
6
7
|
sourceAudit: true,
|
|
@@ -279,9 +280,6 @@ async function firstExisting(root, rels) {
|
|
|
279
280
|
}
|
|
280
281
|
return null;
|
|
281
282
|
}
|
|
282
|
-
function isRecord(value) {
|
|
283
|
-
return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
|
|
284
|
-
}
|
|
285
283
|
function stringifyRecord(value) {
|
|
286
284
|
return Object.fromEntries(Object.entries(value).map(([key, val]) => [key, String(val)]));
|
|
287
285
|
}
|
package/dist/core/skill-forge.js
CHANGED
|
@@ -32,7 +32,7 @@ const PROTECTED_SKILL_NAMES = new Set([
|
|
|
32
32
|
]);
|
|
33
33
|
const MERGE_GROUPS = [
|
|
34
34
|
{ id: 'computer-use-aliases', skills: ['computer-use-fast', 'cu'], action: 'keep_one_canonical_and_alias_the_rest_when_user_approves; reserve computer-use for the first-party Codex plugin' },
|
|
35
|
-
{ id: 'research-loop-family', skills: ['research', '
|
|
35
|
+
{ id: 'research-loop-family', skills: ['research', 'autoresearch', 'autoresearch-loop'], action: 'compress_overlap_without_removing_distinct_route_semantics' }
|
|
36
36
|
];
|
|
37
37
|
export function skillDreamPolicyText() {
|
|
38
38
|
return 'Skill dreaming policy: record only cheap route/skill usage counters in `.sneakoscope/skills/dream-state.json`; do not evaluate every conversation. Run `sks skill-dream run` or the automatic due check only after the configured event count and cooldown, defaulting to one due check every 10 route events subject to cooldown. Reports are recommendation-only: keep/merge/prune/improve candidates may update future generated skill wording, but skill deletion or merge requires explicit user approval.';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { exists, readJson } from '../fsx.js';
|
|
3
3
|
import { imageDimensions, sha256File } from '../wiki-image/image-hash.js';
|
|
4
|
+
import { imagegenEvidenceClassBlockers, isFullImagegenOutputSource } from '../imagegen/imagegen-evidence.js';
|
|
4
5
|
export async function evaluateGate(root, missionId, gateFile) {
|
|
5
6
|
const gatePath = path.isAbsolute(gateFile)
|
|
6
7
|
? gateFile
|
|
@@ -71,10 +72,9 @@ async function imagegenResponseGateReasons(root, missionDir) {
|
|
|
71
72
|
if (response.ok !== true || response.status !== 'generated')
|
|
72
73
|
reasons.push(response.blocker || 'imagegen_response_not_generated');
|
|
73
74
|
const evidenceClass = String(response.evidence_class || '');
|
|
74
|
-
|
|
75
|
-
reasons.push(evidenceClass ? `imagegen_response_evidence_class_not_codex_app:${evidenceClass}` : 'imagegen_response_evidence_class_missing');
|
|
75
|
+
reasons.push(...imagegenEvidenceClassBlockers('imagegen_response', evidenceClass));
|
|
76
76
|
const outputSource = String(response.output_source || '');
|
|
77
|
-
if (!
|
|
77
|
+
if (!isFullImagegenOutputSource(outputSource))
|
|
78
78
|
reasons.push('imagegen_response_output_source_invalid');
|
|
79
79
|
const outputPath = String(response.output_image_path || '');
|
|
80
80
|
const expectedSha = String(response.output_sha256 || response.output_image_sha256 || '');
|
|
@@ -2,6 +2,7 @@ import path from 'node:path';
|
|
|
2
2
|
import { ensureDir, exists, nowIso, readJson, writeJsonAtomic } from '../fsx.js';
|
|
3
3
|
import { missionDir } from '../mission.js';
|
|
4
4
|
import { resolveStopGate, gateStatInfo } from './stop-gate-resolver.js';
|
|
5
|
+
import { isRecord } from '../json/records.js';
|
|
5
6
|
const HARD_BLOCKER_FILE = 'hard-blocker.json';
|
|
6
7
|
function normalizeRoute(route) {
|
|
7
8
|
if (!route)
|
|
@@ -66,9 +67,6 @@ function normalizedStringArray(value, invalidMarker) {
|
|
|
66
67
|
strings.push(invalidMarker);
|
|
67
68
|
return [...new Set(strings)];
|
|
68
69
|
}
|
|
69
|
-
function isRecord(value) {
|
|
70
|
-
return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
|
|
71
|
-
}
|
|
72
70
|
async function checkHardBlocker(root, missionId) {
|
|
73
71
|
if (!missionId)
|
|
74
72
|
return { hardBlocked: false, file: null, reason: null, evidence: [] };
|
|
@@ -2,6 +2,7 @@ import fsp from 'node:fs/promises';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { sha256 } from './fsx.js';
|
|
4
4
|
import { redactCodexOutput, structuredOutputBlocker, validateStructuredOutput } from './codex-exec-output-schema.js';
|
|
5
|
+
import { parseResponsesSsePayload } from './responses-stream.js';
|
|
5
6
|
export function strictJsonSchemaFormat(schemaName, jsonSchema) {
|
|
6
7
|
const normalized = ensureStrictObjectSchema(jsonSchema);
|
|
7
8
|
return {
|
|
@@ -26,6 +27,17 @@ export function ensureStrictObjectSchema(schema) {
|
|
|
26
27
|
]));
|
|
27
28
|
next.required = Object.keys(properties);
|
|
28
29
|
next.additionalProperties = false;
|
|
30
|
+
for (const key of ['$defs', 'definitions']) {
|
|
31
|
+
const defs = next[key];
|
|
32
|
+
if (!defs || typeof defs !== 'object' || Array.isArray(defs))
|
|
33
|
+
continue;
|
|
34
|
+
next[key] = Object.fromEntries(Object.entries(defs).map(([name, value]) => [
|
|
35
|
+
name,
|
|
36
|
+
value && typeof value === 'object' && !Array.isArray(value)
|
|
37
|
+
? ensureNestedStrictSchema(value)
|
|
38
|
+
: value
|
|
39
|
+
]));
|
|
40
|
+
}
|
|
29
41
|
return next;
|
|
30
42
|
}
|
|
31
43
|
export async function runOpenAIStructuredOutput(request) {
|
|
@@ -63,7 +75,7 @@ export async function runOpenAIStructuredOutput(request) {
|
|
|
63
75
|
const controller = new AbortController();
|
|
64
76
|
const timer = setTimeout(() => controller.abort(), request.timeoutMs || 120_000);
|
|
65
77
|
try {
|
|
66
|
-
const response = await fetch(
|
|
78
|
+
const response = await fetch(responsesEndpoint(request.baseUrl), {
|
|
67
79
|
method: 'POST',
|
|
68
80
|
headers: {
|
|
69
81
|
authorization: `Bearer ${apiKey}`,
|
|
@@ -85,7 +97,9 @@ export async function runOpenAIStructuredOutput(request) {
|
|
|
85
97
|
if (!response.ok) {
|
|
86
98
|
return blockedResult(model, 'openai_structured_output_api_error', redactCodexOutput(text), sourceSha);
|
|
87
99
|
}
|
|
88
|
-
const payload =
|
|
100
|
+
const payload = parseStructuredOutputBody(text);
|
|
101
|
+
if (!payload)
|
|
102
|
+
return blockedResult(model, 'json_parse_failed', 'Responses body was neither JSON nor a readable event stream.', sourceSha);
|
|
89
103
|
const parsed = payload.output_parsed || parseResponseOutputText(payload);
|
|
90
104
|
if (!parsed || typeof parsed !== 'object')
|
|
91
105
|
return blockedResult(model, 'json_parse_failed', 'Responses output did not contain parsed JSON.', sourceSha);
|
|
@@ -127,8 +141,54 @@ function ensureNestedStrictSchema(schema) {
|
|
|
127
141
|
if (schema.type === 'array' && schema.items && typeof schema.items === 'object' && !Array.isArray(schema.items)) {
|
|
128
142
|
return { ...schema, items: ensureNestedStrictSchema(schema.items) };
|
|
129
143
|
}
|
|
144
|
+
if (schema.type === 'array' && !schema.items && Array.isArray(schema.prefixItems)) {
|
|
145
|
+
const tuple = schema.prefixItems;
|
|
146
|
+
const types = new Set(tuple.map((entry) => String(entry?.type || '')));
|
|
147
|
+
const { prefixItems, ...rest } = schema;
|
|
148
|
+
if (types.size === 1 && !types.has(''))
|
|
149
|
+
return { ...rest, items: { type: [...types][0] } };
|
|
150
|
+
}
|
|
151
|
+
if (schema.type === undefined) {
|
|
152
|
+
const inferred = inferJsonSchemaType(schema);
|
|
153
|
+
if (inferred)
|
|
154
|
+
return { ...schema, type: inferred };
|
|
155
|
+
}
|
|
130
156
|
return schema;
|
|
131
157
|
}
|
|
158
|
+
function inferJsonSchemaType(schema) {
|
|
159
|
+
const samples = 'const' in schema
|
|
160
|
+
? [schema.const]
|
|
161
|
+
: Array.isArray(schema.enum) ? schema.enum : [];
|
|
162
|
+
const types = new Set(samples.map(jsonTypeOf).filter(Boolean));
|
|
163
|
+
return types.size === 1 ? [...types][0] : null;
|
|
164
|
+
}
|
|
165
|
+
function jsonTypeOf(value) {
|
|
166
|
+
if (value === null)
|
|
167
|
+
return 'null';
|
|
168
|
+
if (Array.isArray(value))
|
|
169
|
+
return 'array';
|
|
170
|
+
if (typeof value === 'string')
|
|
171
|
+
return 'string';
|
|
172
|
+
if (typeof value === 'boolean')
|
|
173
|
+
return 'boolean';
|
|
174
|
+
if (typeof value === 'number')
|
|
175
|
+
return Number.isInteger(value) ? 'integer' : 'number';
|
|
176
|
+
if (typeof value === 'object')
|
|
177
|
+
return 'object';
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
function responsesEndpoint(baseUrl) {
|
|
181
|
+
const base = String(baseUrl || 'https://api.openai.com/v1').trim().replace(/\/+$/, '');
|
|
182
|
+
return /\/responses$/i.test(base) ? base : `${base}/responses`;
|
|
183
|
+
}
|
|
184
|
+
function parseStructuredOutputBody(text) {
|
|
185
|
+
try {
|
|
186
|
+
return JSON.parse(text);
|
|
187
|
+
}
|
|
188
|
+
catch {
|
|
189
|
+
return parseResponsesSsePayload(text);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
132
192
|
function parseResponseOutputText(payload) {
|
|
133
193
|
const chunks = Array.isArray(payload.output) ? payload.output : [];
|
|
134
194
|
for (const item of chunks) {
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { MANAGED_OFFICIAL_SUBAGENT_ROLES, managedOfficialSubagentRoleByName } from '../managed-assets/managed-assets-manifest.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export const
|
|
2
|
+
import { decideNarutoConcurrency } from '../naruto/naruto-concurrency-governor.js';
|
|
3
|
+
import { DEFAULT_NARUTO_MAX_THREADS } from './thread-budget.js';
|
|
4
|
+
import { escapeRegExp } from '../text/regex.js';
|
|
5
|
+
export const DEFAULT_AUTOMATIC_SUBAGENT_COUNT = 4;
|
|
6
|
+
export const PARALLEL_AUTOMATIC_SUBAGENT_COUNT = 6;
|
|
7
|
+
export const LARGE_SCALE_AUTOMATIC_SUBAGENT_COUNT = 8;
|
|
8
|
+
export const MAX_AUTOMATIC_SUBAGENT_COUNT = 12;
|
|
6
9
|
export const MAX_AUTOMATIC_REVIEWER_COUNT = 2;
|
|
7
10
|
export const MAX_CRITICAL_AUTOMATIC_REVIEWER_COUNT = 3;
|
|
8
|
-
export const MAX_ON_DEMAND_SUBAGENT_ROLE_COUNT =
|
|
11
|
+
export const MAX_ON_DEMAND_SUBAGENT_ROLE_COUNT = MAX_AUTOMATIC_SUBAGENT_COUNT;
|
|
9
12
|
export function officialSubagentRoleCatalog() {
|
|
10
13
|
return MANAGED_OFFICIAL_SUBAGENT_ROLES.map(roleSummary);
|
|
11
14
|
}
|
|
@@ -90,7 +93,9 @@ export function officialSubagentFanoutPolicy(input = {}) {
|
|
|
90
93
|
...(input.taskProfile === undefined ? {} : { taskProfile: input.taskProfile }),
|
|
91
94
|
...(input.goal === undefined ? {} : { goal: input.goal }),
|
|
92
95
|
...(input.suggestedRoles === undefined ? {} : { suggestedRoles: input.suggestedRoles }),
|
|
93
|
-
...(input.independentSliceCount === undefined ? {} : { independentSliceCount: input.independentSliceCount })
|
|
96
|
+
...(input.independentSliceCount === undefined ? {} : { independentSliceCount: input.independentSliceCount }),
|
|
97
|
+
...(input.maxThreads === undefined ? {} : { maxThreads: input.maxThreads }),
|
|
98
|
+
...(input.hardware === undefined ? {} : { hardware: input.hardware })
|
|
94
99
|
});
|
|
95
100
|
const requested = explicit ? explicitRequested : automatic.count;
|
|
96
101
|
const automaticReviewerCeiling = automatic.criticalMultiDomain
|
|
@@ -132,6 +137,8 @@ function automaticSubagentFanout(input) {
|
|
|
132
137
|
const criticalMultiDomain = highRisk && critical && riskDomains.length >= 3;
|
|
133
138
|
const reviewerOnly = isReviewerOnlyFanout(input.suggestedRoles || []);
|
|
134
139
|
const decomposedSliceCount = Number(input.independentSliceCount);
|
|
140
|
+
const roleWidth = unique((input.suggestedRoles || []).map((role) => String(role || '').trim()).filter(Boolean)).length;
|
|
141
|
+
const frameBudget = clamp(Number(input.maxThreads) || DEFAULT_NARUTO_MAX_THREADS, 1, MAX_AUTOMATIC_SUBAGENT_COUNT);
|
|
135
142
|
if (Number.isFinite(decomposedSliceCount) && decomposedSliceCount > 0) {
|
|
136
143
|
const reviewerCeiling = criticalMultiDomain
|
|
137
144
|
? MAX_CRITICAL_AUTOMATIC_REVIEWER_COUNT
|
|
@@ -159,50 +166,59 @@ function automaticSubagentFanout(input) {
|
|
|
159
166
|
criticalMultiDomain
|
|
160
167
|
};
|
|
161
168
|
}
|
|
169
|
+
let baseCount = DEFAULT_AUTOMATIC_SUBAGENT_COUNT;
|
|
170
|
+
let reason = 'non_trivial_default_parallel';
|
|
162
171
|
if (largeScale) {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
ceiling: MAX_AUTOMATIC_SUBAGENT_COUNT,
|
|
166
|
-
reason: 'large_scale_dynamic_parallel',
|
|
167
|
-
riskDomains,
|
|
168
|
-
criticalMultiDomain
|
|
169
|
-
};
|
|
172
|
+
baseCount = LARGE_SCALE_AUTOMATIC_SUBAGENT_COUNT;
|
|
173
|
+
reason = 'large_scale_dynamic_parallel';
|
|
170
174
|
}
|
|
171
|
-
if (criticalMultiDomain) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
ceiling: MAX_AUTOMATIC_SUBAGENT_COUNT,
|
|
175
|
-
reason: 'critical_multi_domain_risk',
|
|
176
|
-
riskDomains,
|
|
177
|
-
criticalMultiDomain: true
|
|
178
|
-
};
|
|
175
|
+
else if (criticalMultiDomain) {
|
|
176
|
+
baseCount = Math.min(LARGE_SCALE_AUTOMATIC_SUBAGENT_COUNT, Math.max(PARALLEL_AUTOMATIC_SUBAGENT_COUNT, riskDomains.length + 1));
|
|
177
|
+
reason = 'critical_multi_domain_risk';
|
|
179
178
|
}
|
|
180
|
-
if (parallel) {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
ceiling: MAX_AUTOMATIC_SUBAGENT_COUNT,
|
|
184
|
-
reason: 'explicit_parallel_or_independent_slices',
|
|
185
|
-
riskDomains,
|
|
186
|
-
criticalMultiDomain: false
|
|
187
|
-
};
|
|
179
|
+
else if (parallel) {
|
|
180
|
+
baseCount = PARALLEL_AUTOMATIC_SUBAGENT_COUNT;
|
|
181
|
+
reason = 'explicit_parallel_or_independent_slices';
|
|
188
182
|
}
|
|
189
|
-
if (highRisk && riskDomains.length >= 2) {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
};
|
|
183
|
+
else if (highRisk && riskDomains.length >= 2) {
|
|
184
|
+
baseCount = Math.max(DEFAULT_AUTOMATIC_SUBAGENT_COUNT, riskDomains.length + 1);
|
|
185
|
+
reason = 'independent_multi_domain_risk';
|
|
186
|
+
}
|
|
187
|
+
else if (roleWidth >= 3) {
|
|
188
|
+
baseCount = Math.max(DEFAULT_AUTOMATIC_SUBAGENT_COUNT, Math.min(PARALLEL_AUTOMATIC_SUBAGENT_COUNT, roleWidth + 1));
|
|
189
|
+
reason = 'role_width_parallel';
|
|
197
190
|
}
|
|
191
|
+
const count = hardwareAwareAutomaticCount(baseCount, MAX_AUTOMATIC_SUBAGENT_COUNT, frameBudget, input.hardware);
|
|
198
192
|
return {
|
|
199
|
-
count
|
|
193
|
+
count,
|
|
200
194
|
ceiling: MAX_AUTOMATIC_SUBAGENT_COUNT,
|
|
201
|
-
reason:
|
|
195
|
+
reason: count > baseCount ? `${reason}+hardware_capacity_boost` : reason,
|
|
202
196
|
riskDomains,
|
|
203
|
-
criticalMultiDomain:
|
|
197
|
+
criticalMultiDomain: Boolean(criticalMultiDomain)
|
|
204
198
|
};
|
|
205
199
|
}
|
|
200
|
+
function hardwareAwareAutomaticCount(baseCount, ceiling, frameBudget, hardware) {
|
|
201
|
+
const targetCeiling = clamp(Math.min(ceiling, frameBudget), 1, MAX_AUTOMATIC_SUBAGENT_COUNT);
|
|
202
|
+
const floor = clamp(baseCount, 1, targetCeiling);
|
|
203
|
+
try {
|
|
204
|
+
const probe = decideNarutoConcurrency({
|
|
205
|
+
requestedWorkers: targetCeiling,
|
|
206
|
+
totalWorkItems: targetCeiling,
|
|
207
|
+
parallelismMode: 'extreme',
|
|
208
|
+
maxThreads: frameBudget,
|
|
209
|
+
...(hardware ? { hardware } : {})
|
|
210
|
+
}).hardware;
|
|
211
|
+
const cpuCap = Math.max(1, Math.floor(probe.cpu_core_count * 0.75));
|
|
212
|
+
const freeGb = probe.free_memory_bytes / (1024 * 1024 * 1024);
|
|
213
|
+
const memCap = Math.max(1, Math.floor(Math.max(0.5, freeGb - 2) / 1.5));
|
|
214
|
+
const apiCap = Math.max(1, probe.remote_api_rate_limit_budget);
|
|
215
|
+
const safe = clamp(Math.min(cpuCap, memCap, apiCap, targetCeiling), 1, targetCeiling);
|
|
216
|
+
return Math.max(floor, safe);
|
|
217
|
+
}
|
|
218
|
+
catch {
|
|
219
|
+
return floor;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
206
222
|
function isReviewerOnlyFanout(roles) {
|
|
207
223
|
const normalized = unique(roles.map((role) => String(role || '').trim()).filter(Boolean));
|
|
208
224
|
return normalized.length > 0 && normalized.every((role) => (role === 'expert'
|
|
@@ -274,9 +290,6 @@ function unique(values) {
|
|
|
274
290
|
function clamp(value, minimum, maximum) {
|
|
275
291
|
return Math.max(minimum, Math.min(maximum, Math.floor(Number(value) || minimum)));
|
|
276
292
|
}
|
|
277
|
-
function escapeRegExp(value) {
|
|
278
|
-
return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
279
|
-
}
|
|
280
293
|
const ROLE_LANGUAGE_HINTS = {
|
|
281
294
|
worker: ['기계적', '반복적', '단순 변경', '정확한 변경'],
|
|
282
295
|
implementation_specialist: ['구현', '기능 추가', '핵심 로직', '백엔드', '복잡한 변경'],
|
|
@@ -123,8 +123,8 @@ const CONTEXT_TOOL_TASK_RE = new RegExp([
|
|
|
123
123
|
'gpt[- ]?image',
|
|
124
124
|
'\\bscreenshot(?:ting)?\\b',
|
|
125
125
|
'long[- ]?context',
|
|
126
|
-
'large[- ]?(?:file|document|codebase|repository|context)',
|
|
127
|
-
'(?:repository|repo)[- ]?wide',
|
|
126
|
+
'large[- ]?(?:file|document|codebase|repository|context|search)',
|
|
127
|
+
'(?:repository|repo|codebase)[- ]?wide',
|
|
128
128
|
'read[- ]?heavy',
|
|
129
129
|
'supporting[- ]?documents?',
|
|
130
130
|
'\\bdocs?\\b',
|
|
@@ -138,6 +138,8 @@ const CONTEXT_TOOL_TASK_RE = new RegExp([
|
|
|
138
138
|
'\\bextract(?:ion)?\\b',
|
|
139
139
|
'\\binventory\\b',
|
|
140
140
|
'extensive[- ]?logs?',
|
|
141
|
+
'\\b(?:broad|wide|deep|mass|bulk|repo(?:sitory)?[- ]?wide|codebase)\\b[^\\n]{0,32}\\b(?:search|lookup|find|grep|scan)\\b',
|
|
142
|
+
'\\b(?:search|lookup|find|grep|scan)\\b[^\\n]{0,40}\\b(?:large|long|across|whole|entire|repository|codebase|many files?)\\b',
|
|
141
143
|
'컴퓨터\\s*유즈',
|
|
142
144
|
'브라우저',
|
|
143
145
|
'크롬',
|
|
@@ -154,7 +156,11 @@ const CONTEXT_TOOL_TASK_RE = new RegExp([
|
|
|
154
156
|
'탐색',
|
|
155
157
|
'스캔',
|
|
156
158
|
'추출',
|
|
157
|
-
'인벤토리'
|
|
159
|
+
'인벤토리',
|
|
160
|
+
'대규모\\s*검색',
|
|
161
|
+
'전체\\s*검색',
|
|
162
|
+
'광범위\\s*(?:검색|탐색|스캔)',
|
|
163
|
+
'코드베이스\\s*(?:검색|탐색|스캔)'
|
|
158
164
|
].join('|'), 'i');
|
|
159
165
|
const SIMPLE_MECHANICAL_TASK_RE = new RegExp([
|
|
160
166
|
'\\bone[- ]?line\\b',
|
|
@@ -163,21 +169,25 @@ const SIMPLE_MECHANICAL_TASK_RE = new RegExp([
|
|
|
163
169
|
'\\btrivial\\b',
|
|
164
170
|
'\\bmechanical\\b',
|
|
165
171
|
'\\brepeatable\\b',
|
|
166
|
-
'\\bexact(?:ly)?\\b[^\\n]{0,36}\\b(?:rename|copy|replace|format|fixture|change)\\b',
|
|
167
|
-
'\\b(?:typo|spacing|label|copy|format)[-_ ]?(?:only|fix|change)?\\b',
|
|
172
|
+
'\\bexact(?:ly)?\\b[^\\n]{0,36}\\b(?:rename|copy|replace|format|fixture|change|type|typing|paste)\\b',
|
|
173
|
+
'\\b(?:typo|spacing|label|copy|format|string)[-_ ]?(?:only|fix|change|replace)?\\b',
|
|
168
174
|
'\\brename\\b[^\\n]{0,24}\\b(?:symbol|file|label|key|field)\\b',
|
|
175
|
+
'\\b(?:simple|quick|bounded)\\b[^\\n]{0,24}\\b(?:search|lookup|find|grep|replace|rename|type|typing)\\b',
|
|
176
|
+
'\\b(?:search|lookup|find|grep)\\b[^\\n]{0,32}\\b(?:symbol|string|path|file|key)\\b',
|
|
169
177
|
'한\\s*줄',
|
|
170
178
|
'단일\\s*파일',
|
|
171
179
|
'아주\\s*(?:작은|단순한?)',
|
|
172
180
|
'극단적으로\\s*단순',
|
|
173
181
|
'기계적',
|
|
174
182
|
'반복적',
|
|
175
|
-
'정확한?[^\\n]{0,24}(?:이름\\s
|
|
183
|
+
'정확한?[^\\n]{0,24}(?:이름\\s*변경|복사|치환|포맷|수정|타이핑)',
|
|
176
184
|
'오타',
|
|
177
185
|
'문구',
|
|
178
186
|
'라벨',
|
|
179
187
|
'간격',
|
|
180
|
-
'이름\\s*변경'
|
|
188
|
+
'이름\\s*변경',
|
|
189
|
+
'단순\\s*(?:검색|조회|찾기|타이핑|입력|치환)',
|
|
190
|
+
'짧은\\s*(?:검색|조회|찾기)'
|
|
181
191
|
].join('|'), 'i');
|
|
182
192
|
const IMPLEMENTATION_TASK_RE = new RegExp([
|
|
183
193
|
'\\bimplement(?:ation|er|ing)?\\b',
|
|
@@ -8,6 +8,8 @@ import { NARUTO_GATE_FILENAME, NARUTO_RESULT_SCHEMA, NARUTO_SUMMARY_FILENAME, SU
|
|
|
8
8
|
import { effectiveSubagentTarget, normalizeLegacySubagentCountFields, subagentCountContractBlockers } from './wave-lifecycle.js';
|
|
9
9
|
import { HOST_CAPABILITY_DESCRIPTORS, hostCapabilityDigest } from '../agent-bridge/agent-manifest.js';
|
|
10
10
|
import { HOST_CAPABILITY_EVIDENCE_SCHEMA, HOST_CAPABILITY_RUNTIME_SCHEMA } from '../agent-bridge/host-capability-runtime.js';
|
|
11
|
+
import { isRecord } from '../json/records.js';
|
|
12
|
+
import { uniqueStrings } from '../text/strings.js';
|
|
11
13
|
export const NARUTO_PROOF_ARTIFACT_FILENAMES = Object.freeze([
|
|
12
14
|
SUBAGENT_PLAN_FILENAME,
|
|
13
15
|
SUBAGENT_EVENT_LOG_FILENAME,
|
|
@@ -991,9 +993,6 @@ function projectReceiptRowsAdditiveFields(value, allowedKeys) {
|
|
|
991
993
|
function recordValue(value, key) {
|
|
992
994
|
return isRecord(value) ? value[key] : undefined;
|
|
993
995
|
}
|
|
994
|
-
function isRecord(value) {
|
|
995
|
-
return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
|
|
996
|
-
}
|
|
997
996
|
function arrayValue(value) {
|
|
998
997
|
return Array.isArray(value) ? value : [];
|
|
999
998
|
}
|
|
@@ -1009,9 +1008,6 @@ function positiveInteger(value) {
|
|
|
1009
1008
|
const number = Number(value);
|
|
1010
1009
|
return Number.isInteger(number) && number > 0 ? number : null;
|
|
1011
1010
|
}
|
|
1012
|
-
function uniqueStrings(values) {
|
|
1013
|
-
return [...new Set(values.map((value) => String(value || '').trim()).filter(Boolean))];
|
|
1014
|
-
}
|
|
1015
1011
|
function errorCode(error) {
|
|
1016
1012
|
return error && typeof error === 'object' && 'code' in error ? String(error.code) : '';
|
|
1017
1013
|
}
|
|
@@ -6,6 +6,7 @@ import { ensureDir, exists, PACKAGE_VERSION, readText, sha256, writeTextAtomic }
|
|
|
6
6
|
import { ensureConfinedDirectory, inspectConfinedPath } from '../managed-path-safety.js';
|
|
7
7
|
import { MANAGED_OFFICIAL_SUBAGENT_ROLES, managedOfficialSubagentRoleContent, managedOfficialSubagentRoleOwnsText } from '../managed-assets/managed-assets-manifest.js';
|
|
8
8
|
import { DEFAULT_SUBAGENT_EFFORT, DEFAULT_SUBAGENT_MODEL } from './model-policy.js';
|
|
9
|
+
import { escapeRegExp } from '../text/regex.js';
|
|
9
10
|
export const DEFAULT_OFFICIAL_SUBAGENT_MAX_THREADS = 12;
|
|
10
11
|
export const DEFAULT_OFFICIAL_SUBAGENT_MAX_DEPTH = 1;
|
|
11
12
|
export const DEFAULT_OFFICIAL_SUBAGENT_JOB_MAX_RUNTIME_SECONDS = 1200;
|
|
@@ -709,9 +710,6 @@ function isTomlTableHeader(line, table) {
|
|
|
709
710
|
function uniqueStrings(values) {
|
|
710
711
|
return [...new Set(values)];
|
|
711
712
|
}
|
|
712
|
-
function escapeRegExp(value) {
|
|
713
|
-
return String(value).replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
714
|
-
}
|
|
715
713
|
const LEGACY_SKS_AGENT_TABLE_SPECS = [
|
|
716
714
|
{ name: 'analysis_scout', filename: 'analysis-scout.toml', description: 'SKS scout with bounded write capability.', nicknames: ['Scout', 'Mapper'] },
|
|
717
715
|
{ name: 'native_agent', filename: 'native-agent-intake.toml', description: 'SKS native agent with bounded write capability.', nicknames: ['Analysis', 'Mapper'] },
|