@wrongstack/core 0.297.0 → 0.298.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/dist/chronicle/index.js +126 -22
- package/dist/chronicle/project-server-client.d.ts +12 -0
- package/dist/chronicle/project-server-protocol.d.ts +22 -0
- package/dist/chronicle/project-server.js +238 -157
- package/dist/coordination/agents/index.js +136 -1
- package/dist/coordination/agents/role-skills.d.ts +3 -2
- package/dist/coordination/brain-trace.d.ts +2 -1
- package/dist/coordination/director/director-task-registry.d.ts +12 -0
- package/dist/coordination/fleet-supervisor.d.ts +21 -0
- package/dist/coordination/index.d.ts +23 -21
- package/dist/coordination/index.js +16493 -16068
- package/dist/coordination/mail-tools.d.ts +3 -3
- package/dist/coordination/mailbox-credential-store.d.ts +22 -2
- package/dist/coordination/mailbox-credential-throttle.d.ts +63 -0
- package/dist/coordination/mailbox-project-server-client.d.ts +16 -0
- package/dist/coordination/mailbox-project-server-protocol.d.ts +43 -5
- package/dist/coordination/mailbox-project-server.js +508 -253
- package/dist/coordination/provider-status-tracker.d.ts +2 -0
- package/dist/coordination/remote-mailbox-credential-store.d.ts +5 -5
- package/dist/coordination/remote-mailbox.d.ts +8 -4
- package/dist/coordination/sqlite-mailbox-credentials.d.ts +11 -0
- package/dist/core/fallback-profile-manager.d.ts +14 -0
- package/dist/core/index.js +451 -137
- package/dist/core/instruction-bundle.d.ts +12 -0
- package/dist/core/system-prompt-builder.d.ts +14 -0
- package/dist/core/system-prompt-skill-bodies.d.ts +1 -1
- package/dist/core/system-prompt-skill-text.d.ts +1 -2
- package/dist/defaults/index.js +2081 -1102
- package/dist/design/index.js +47 -8
- package/dist/execution/design-materialize.d.ts +22 -0
- package/dist/execution/index.js +495 -248
- package/dist/execution/skill-loader.d.ts +10 -1
- package/dist/execution/tool-error-taxonomy.d.ts +31 -0
- package/dist/execution/tool-executor.d.ts +1 -0
- package/dist/goal/index.js +3 -1
- package/dist/hooks/index.js +5 -0
- package/dist/hq/auth-audit.d.ts +6 -0
- package/dist/hq/auth-store.d.ts +59 -3
- package/dist/hq/index.js +401 -101
- package/dist/hq/kanban-store.d.ts +3 -0
- package/dist/hq/protocol/core.d.ts +3 -15
- package/dist/hq/protocol/envelope.d.ts +29 -0
- package/dist/hq/protocol/governance.d.ts +34 -0
- package/dist/hq/protocol/project.d.ts +3 -0
- package/dist/hq/protocol/resume.d.ts +1 -1
- package/dist/hq/protocol.d.ts +9 -8
- package/dist/hq/protocol.js +675 -0
- package/dist/index.js +8518 -6416
- package/dist/infrastructure/index.js +198 -101
- package/dist/kernel/events/session-events.d.ts +3 -0
- package/dist/kernel/events/tool-events.d.ts +3 -1
- package/dist/models/index.js +1 -1
- package/dist/observability/index.js +27 -0
- package/dist/observability/prometheus.d.ts +11 -0
- package/dist/plugin/index.d.ts +5 -1
- package/dist/plugin/index.js +950 -509
- package/dist/plugins/review-store-maintenance.d.ts +26 -0
- package/dist/plugins/review-types.d.ts +6 -0
- package/dist/security/capabilities.d.ts +45 -1
- package/dist/security/error-sanitize.d.ts +49 -0
- package/dist/security/file-permissions.d.ts +41 -0
- package/dist/security/index.d.ts +9 -6
- package/dist/security/index.js +3007 -2032
- package/dist/security/permission-policy.d.ts +55 -3
- package/dist/security/secret-vault.d.ts +17 -0
- package/dist/security/totp.d.ts +86 -0
- package/dist/skills/frontmatter.d.ts +12 -1
- package/dist/skills/github-fetcher.d.ts +48 -0
- package/dist/skills/index.js +137 -26
- package/dist/skills/limits.d.ts +19 -0
- package/dist/skills/skill-installer.d.ts +13 -0
- package/dist/storage/index.js +928 -732
- package/dist/storage/provider-config-watcher.d.ts +1 -0
- package/dist/storage/session-helpers.d.ts +1 -0
- package/dist/storage/session-store.d.ts +9 -2
- package/dist/storage/session-workspace-checkpoints.d.ts +5 -0
- package/dist/tools/fallback-manage-tools.d.ts +6 -0
- package/dist/tools/index.js +287 -131
- package/dist/tools/mcp-use.d.ts +1 -1
- package/dist/types/blocks.d.ts +7 -0
- package/dist/types/config/autonomy.d.ts +12 -3
- package/dist/types/config/mcp-features.d.ts +9 -1
- package/dist/types/config/root.d.ts +10 -4
- package/dist/types/context-window.d.ts +15 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/secret-vault.d.ts +8 -0
- package/dist/types/session.d.ts +2 -0
- package/dist/types/skill.d.ts +56 -0
- package/dist/types/tool-executor.d.ts +2 -0
- package/dist/utils/env-typed.d.ts +64 -0
- package/dist/utils/glob-match.d.ts +21 -1
- package/dist/utils/heap-watchdog.js +1 -1
- package/dist/utils/incoming-images.d.ts +19 -0
- package/dist/utils/index.d.ts +15 -12
- package/dist/utils/index.js +3083 -2801
- package/dist/utils/path-segment.d.ts +29 -0
- package/dist/utils/win32-cmd.d.ts +25 -0
- package/dist/worktree/index.js +5 -0
- package/package.json +8 -3
- package/skills/chimera/SKILL.md +16 -4
- package/skills/data-governance/SKILL.md +92 -0
- package/skills/wrongstack-kanban/SKILL.md +125 -64
- package/dist/agent-status-helpers.d.ts.map +0 -1
- package/dist/agent-status-tracker.d.ts.map +0 -1
- package/dist/boot.d.ts.map +0 -1
- package/dist/chronicle/context.d.ts.map +0 -1
- package/dist/chronicle/decision-adapter.d.ts.map +0 -1
- package/dist/chronicle/domain-adapter.d.ts.map +0 -1
- package/dist/chronicle/event-hash.d.ts.map +0 -1
- package/dist/chronicle/file-observer.d.ts.map +0 -1
- package/dist/chronicle/health-monitor.d.ts.map +0 -1
- package/dist/chronicle/identity.d.ts.map +0 -1
- package/dist/chronicle/index.d.ts.map +0 -1
- package/dist/chronicle/index.js.map +0 -7
- package/dist/chronicle/journal.d.ts.map +0 -1
- package/dist/chronicle/legacy-journal-import.d.ts.map +0 -1
- package/dist/chronicle/metrics-store.d.ts.map +0 -1
- package/dist/chronicle/partition-filename.d.ts.map +0 -1
- package/dist/chronicle/partition-range-cache.d.ts.map +0 -1
- package/dist/chronicle/process-adapter.d.ts.map +0 -1
- package/dist/chronicle/project-access.d.ts.map +0 -1
- package/dist/chronicle/project-server-client.d.ts.map +0 -1
- package/dist/chronicle/project-server-endpoint.d.ts.map +0 -1
- package/dist/chronicle/project-server-protocol.d.ts.map +0 -1
- package/dist/chronicle/project-server.d.ts.map +0 -1
- package/dist/chronicle/project-server.js.map +0 -7
- package/dist/chronicle/prompt-manifest.d.ts.map +0 -1
- package/dist/chronicle/provider-adapter.d.ts.map +0 -1
- package/dist/chronicle/query.d.ts.map +0 -1
- package/dist/chronicle/review-adapter.d.ts.map +0 -1
- package/dist/chronicle/rollup-adapter.d.ts.map +0 -1
- package/dist/chronicle/sink.d.ts.map +0 -1
- package/dist/chronicle/sqlite-journal.d.ts.map +0 -1
- package/dist/chronicle/sqlite-query.d.ts.map +0 -1
- package/dist/chronicle/stream-adapter.d.ts.map +0 -1
- package/dist/chronicle/tool-adapter.d.ts.map +0 -1
- package/dist/chronicle/types.d.ts.map +0 -1
- package/dist/coordination/adaptive-concurrency.d.ts.map +0 -1
- package/dist/coordination/agent-bridge.d.ts.map +0 -1
- package/dist/coordination/agent-monitor.d.ts.map +0 -1
- package/dist/coordination/agent-subagent-runner.d.ts.map +0 -1
- package/dist/coordination/agents/agent-prompts.d.ts.map +0 -1
- package/dist/coordination/agents/index.d.ts.map +0 -1
- package/dist/coordination/agents/index.js.map +0 -7
- package/dist/coordination/agents/phase1-discovery.d.ts.map +0 -1
- package/dist/coordination/agents/phase2-planning.d.ts.map +0 -1
- package/dist/coordination/agents/phase3-build.d.ts.map +0 -1
- package/dist/coordination/agents/phase3-techstack.d.ts.map +0 -1
- package/dist/coordination/agents/phase3-wave1-platform.d.ts.map +0 -1
- package/dist/coordination/agents/phase3-wave2-meta.d.ts.map +0 -1
- package/dist/coordination/agents/phase4-verify.d.ts.map +0 -1
- package/dist/coordination/agents/phase5-review.d.ts.map +0 -1
- package/dist/coordination/agents/phase6-domain.d.ts.map +0 -1
- package/dist/coordination/agents/phase7-knowledge.d.ts.map +0 -1
- package/dist/coordination/agents/phase8-delivery.d.ts.map +0 -1
- package/dist/coordination/agents/phase8-wave3-products.d.ts.map +0 -1
- package/dist/coordination/agents/phase9-meta.d.ts.map +0 -1
- package/dist/coordination/agents/phase9-wave4-platform-meta.d.ts.map +0 -1
- package/dist/coordination/agents/project-agent-config-validation.d.ts.map +0 -1
- package/dist/coordination/agents/project-agent-consolidation.d.ts.map +0 -1
- package/dist/coordination/agents/project-agent-files.d.ts.map +0 -1
- package/dist/coordination/agents/project-agent-identity-types.d.ts.map +0 -1
- package/dist/coordination/agents/project-agent-identity.d.ts.map +0 -1
- package/dist/coordination/agents/project-agent-knowledge-manifests.d.ts.map +0 -1
- package/dist/coordination/agents/project-agent-learning-entries.d.ts.map +0 -1
- package/dist/coordination/agents/project-agent-learning-normalize.d.ts.map +0 -1
- package/dist/coordination/agents/project-agent-learning-policy.d.ts.map +0 -1
- package/dist/coordination/agents/project-agent-learning-structured.d.ts.map +0 -1
- package/dist/coordination/agents/project-agent-paths.d.ts.map +0 -1
- package/dist/coordination/agents/project-agent-profile.d.ts.map +0 -1
- package/dist/coordination/agents/role-skills.d.ts.map +0 -1
- package/dist/coordination/agents/types.d.ts.map +0 -1
- package/dist/coordination/agents.d.ts.map +0 -1
- package/dist/coordination/auto-extend.d.ts.map +0 -1
- package/dist/coordination/autonomous-brain.d.ts.map +0 -1
- package/dist/coordination/autonomous-coordinator.d.ts.map +0 -1
- package/dist/coordination/brain-cache.d.ts.map +0 -1
- package/dist/coordination/brain-heuristics.d.ts.map +0 -1
- package/dist/coordination/brain-ledger.d.ts.map +0 -1
- package/dist/coordination/brain-monitor.d.ts.map +0 -1
- package/dist/coordination/brain-rules.d.ts.map +0 -1
- package/dist/coordination/brain-telemetry.d.ts.map +0 -1
- package/dist/coordination/brain-trace.d.ts.map +0 -1
- package/dist/coordination/brain.d.ts.map +0 -1
- package/dist/coordination/change-manager.d.ts.map +0 -1
- package/dist/coordination/checkpoint-wiring.d.ts.map +0 -1
- package/dist/coordination/collab-bus.d.ts.map +0 -1
- package/dist/coordination/collab-debug-types.d.ts.map +0 -1
- package/dist/coordination/collab-debug.d.ts.map +0 -1
- package/dist/coordination/collab-director-host.d.ts.map +0 -1
- package/dist/coordination/commit-safety.d.ts.map +0 -1
- package/dist/coordination/consensus-protocol.d.ts.map +0 -1
- package/dist/coordination/coordinator/error-classifier.d.ts.map +0 -1
- package/dist/coordination/delegate-tool.d.ts.map +0 -1
- package/dist/coordination/dep-watcher-bridge.d.ts.map +0 -1
- package/dist/coordination/dep-watcher.d.ts.map +0 -1
- package/dist/coordination/director/director-btw-notes.d.ts.map +0 -1
- package/dist/coordination/director/director-budget-policy.d.ts.map +0 -1
- package/dist/coordination/director/director-collab.d.ts.map +0 -1
- package/dist/coordination/director/director-errors.d.ts.map +0 -1
- package/dist/coordination/director/director-task-registry.d.ts.map +0 -1
- package/dist/coordination/director/director-toolset.d.ts.map +0 -1
- package/dist/coordination/director-basic-tools.d.ts.map +0 -1
- package/dist/coordination/director-collab-tools.d.ts.map +0 -1
- package/dist/coordination/director-host-contracts.d.ts.map +0 -1
- package/dist/coordination/director-input-helpers.d.ts.map +0 -1
- package/dist/coordination/director-kanban-queue-helpers.d.ts.map +0 -1
- package/dist/coordination/director-options.d.ts.map +0 -1
- package/dist/coordination/director-prompts.d.ts.map +0 -1
- package/dist/coordination/director-quality-gate-tool.d.ts.map +0 -1
- package/dist/coordination/director-session.d.ts.map +0 -1
- package/dist/coordination/director-spawn-model.d.ts.map +0 -1
- package/dist/coordination/director-tools.d.ts.map +0 -1
- package/dist/coordination/director.d.ts.map +0 -1
- package/dist/coordination/dispatcher.d.ts.map +0 -1
- package/dist/coordination/file-author-tracker.d.ts.map +0 -1
- package/dist/coordination/fleet-bus.d.ts.map +0 -1
- package/dist/coordination/fleet-event-validation.d.ts.map +0 -1
- package/dist/coordination/fleet-manager.d.ts.map +0 -1
- package/dist/coordination/fleet-spawn.d.ts.map +0 -1
- package/dist/coordination/fleet-status-tool.d.ts.map +0 -1
- package/dist/coordination/fleet-supervisor.d.ts.map +0 -1
- package/dist/coordination/fleet.d.ts.map +0 -1
- package/dist/coordination/global-mailbox-completion.d.ts.map +0 -1
- package/dist/coordination/global-mailbox-paths.d.ts.map +0 -1
- package/dist/coordination/icoordinator.d.ts.map +0 -1
- package/dist/coordination/ifleet-manager.d.ts.map +0 -1
- package/dist/coordination/in-memory-transport.d.ts.map +0 -1
- package/dist/coordination/index.d.ts.map +0 -1
- package/dist/coordination/index.js.map +0 -7
- package/dist/coordination/knowledge-graph.d.ts.map +0 -1
- package/dist/coordination/large-answer-store.d.ts.map +0 -1
- package/dist/coordination/mail-tools.d.ts.map +0 -1
- package/dist/coordination/mailbox-actions.d.ts.map +0 -1
- package/dist/coordination/mailbox-auth-types.d.ts.map +0 -1
- package/dist/coordination/mailbox-codecs.d.ts.map +0 -1
- package/dist/coordination/mailbox-constants.d.ts.map +0 -1
- package/dist/coordination/mailbox-credential-store.d.ts.map +0 -1
- package/dist/coordination/mailbox-events.d.ts.map +0 -1
- package/dist/coordination/mailbox-health.d.ts.map +0 -1
- package/dist/coordination/mailbox-hooks.d.ts.map +0 -1
- package/dist/coordination/mailbox-http-auth.d.ts.map +0 -1
- package/dist/coordination/mailbox-http-rate-limit.d.ts.map +0 -1
- package/dist/coordination/mailbox-http-router.d.ts.map +0 -1
- package/dist/coordination/mailbox-http-validation.d.ts.map +0 -1
- package/dist/coordination/mailbox-message-codec.d.ts.map +0 -1
- package/dist/coordination/mailbox-parse-state.d.ts.map +0 -1
- package/dist/coordination/mailbox-project-server-client.d.ts.map +0 -1
- package/dist/coordination/mailbox-project-server-endpoint.d.ts.map +0 -1
- package/dist/coordination/mailbox-project-server-protocol.d.ts.map +0 -1
- package/dist/coordination/mailbox-project-server.d.ts.map +0 -1
- package/dist/coordination/mailbox-project-server.js.map +0 -7
- package/dist/coordination/mailbox-receipt-folding.d.ts.map +0 -1
- package/dist/coordination/mailbox-registry-codec.d.ts.map +0 -1
- package/dist/coordination/mailbox-retention-state.d.ts.map +0 -1
- package/dist/coordination/mailbox-status-mappers.d.ts.map +0 -1
- package/dist/coordination/mailbox-tool.d.ts.map +0 -1
- package/dist/coordination/mailbox-type-properties.d.ts.map +0 -1
- package/dist/coordination/mailbox-types.d.ts.map +0 -1
- package/dist/coordination/model-matrix.d.ts.map +0 -1
- package/dist/coordination/multi-agent-coordinator.d.ts.map +0 -1
- package/dist/coordination/multi-agent-timeout.d.ts.map +0 -1
- package/dist/coordination/null-fleet-bus.d.ts.map +0 -1
- package/dist/coordination/package-author-tracker.d.ts.map +0 -1
- package/dist/coordination/package-outdated-watcher.d.ts.map +0 -1
- package/dist/coordination/provider-status-tracker.d.ts.map +0 -1
- package/dist/coordination/remote-mailbox-credential-store.d.ts.map +0 -1
- package/dist/coordination/remote-mailbox.d.ts.map +0 -1
- package/dist/coordination/single-instance-mailbox.d.ts.map +0 -1
- package/dist/coordination/spawn-budget.d.ts.map +0 -1
- package/dist/coordination/sqlite-mailbox-compaction.d.ts.map +0 -1
- package/dist/coordination/sqlite-mailbox-credentials.d.ts.map +0 -1
- package/dist/coordination/sqlite-mailbox-rows.d.ts.map +0 -1
- package/dist/coordination/sqlite-mailbox-schema.d.ts.map +0 -1
- package/dist/coordination/sqlite-mailbox.d.ts.map +0 -1
- package/dist/coordination/subagent-budget.d.ts.map +0 -1
- package/dist/coordination/subagent-nicknames.d.ts.map +0 -1
- package/dist/coordination/subagent-result-tool.d.ts.map +0 -1
- package/dist/coordination/task-auctioneer.d.ts.map +0 -1
- package/dist/coordination/task-dag.d.ts.map +0 -1
- package/dist/coordination/techstack-mailbox-consumer.d.ts.map +0 -1
- package/dist/coordination/transport.d.ts.map +0 -1
- package/dist/coordination/worktree-task-runner.d.ts.map +0 -1
- package/dist/core/agent-internals.d.ts.map +0 -1
- package/dist/core/agent-loop.d.ts.map +0 -1
- package/dist/core/agent-response.d.ts.map +0 -1
- package/dist/core/agent-tools.d.ts.map +0 -1
- package/dist/core/agent-types.d.ts.map +0 -1
- package/dist/core/agent.d.ts.map +0 -1
- package/dist/core/btw.d.ts.map +0 -1
- package/dist/core/context.d.ts.map +0 -1
- package/dist/core/continue-intent.d.ts.map +0 -1
- package/dist/core/continue-to-next-iteration.d.ts.map +0 -1
- package/dist/core/conversation-state.d.ts.map +0 -1
- package/dist/core/fallback-model.d.ts.map +0 -1
- package/dist/core/fallback-profile-manager.d.ts.map +0 -1
- package/dist/core/fleet-pulse.d.ts.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/index.js.map +0 -7
- package/dist/core/input-builder.d.ts.map +0 -1
- package/dist/core/instruction-bundle.d.ts.map +0 -1
- package/dist/core/iteration-limit.d.ts.map +0 -1
- package/dist/core/mailbox-loop.d.ts.map +0 -1
- package/dist/core/model-availability-calendar.d.ts.map +0 -1
- package/dist/core/model-ref.d.ts.map +0 -1
- package/dist/core/model-ref.js.map +0 -7
- package/dist/core/modes/brief.d.ts.map +0 -1
- package/dist/core/modes/default.d.ts.map +0 -1
- package/dist/core/modes/teach.d.ts.map +0 -1
- package/dist/core/provider-runner.d.ts.map +0 -1
- package/dist/core/queued-messages.d.ts.map +0 -1
- package/dist/core/request-provider-binding.d.ts.map +0 -1
- package/dist/core/run-env.d.ts.map +0 -1
- package/dist/core/streaming-response-builder.d.ts.map +0 -1
- package/dist/core/system-prompt-blocks.d.ts.map +0 -1
- package/dist/core/system-prompt-builder.d.ts.map +0 -1
- package/dist/core/system-prompt-environment-probes.d.ts.map +0 -1
- package/dist/core/system-prompt-environment.d.ts.map +0 -1
- package/dist/core/system-prompt-memory-skills.d.ts.map +0 -1
- package/dist/core/system-prompt-plan.d.ts.map +0 -1
- package/dist/core/system-prompt-shell.d.ts.map +0 -1
- package/dist/core/system-prompt-skill-bodies.d.ts.map +0 -1
- package/dist/core/system-prompt-skill-text.d.ts.map +0 -1
- package/dist/defaults/index.d.ts.map +0 -1
- package/dist/defaults/index.js.map +0 -7
- package/dist/design/index.d.ts.map +0 -1
- package/dist/design/index.js.map +0 -7
- package/dist/execution/auto-compaction-middleware.d.ts.map +0 -1
- package/dist/execution/autonomous-runner.d.ts.map +0 -1
- package/dist/execution/autonomy-brain.d.ts.map +0 -1
- package/dist/execution/autonomy-prompt-contributor.d.ts.map +0 -1
- package/dist/execution/brain-chain.d.ts.map +0 -1
- package/dist/execution/brain-circuit.d.ts.map +0 -1
- package/dist/execution/brain-evaluation.d.ts.map +0 -1
- package/dist/execution/brain-runtime-constants.d.ts.map +0 -1
- package/dist/execution/brain-runtime.d.ts.map +0 -1
- package/dist/execution/compaction-core.d.ts.map +0 -1
- package/dist/execution/compaction-scoring.d.ts.map +0 -1
- package/dist/execution/compaction-summary-cache.d.ts.map +0 -1
- package/dist/execution/compactor.d.ts.map +0 -1
- package/dist/execution/council-brain.d.ts.map +0 -1
- package/dist/execution/council-orchestrator.d.ts.map +0 -1
- package/dist/execution/council-personas.d.ts.map +0 -1
- package/dist/execution/council-profiles.d.ts.map +0 -1
- package/dist/execution/council-prompts.d.ts.map +0 -1
- package/dist/execution/council-resolution.d.ts.map +0 -1
- package/dist/execution/design-color.d.ts.map +0 -1
- package/dist/execution/design-detect.d.ts.map +0 -1
- package/dist/execution/design-kit-loader.d.ts.map +0 -1
- package/dist/execution/design-materialize.d.ts.map +0 -1
- package/dist/execution/design-project-store.d.ts.map +0 -1
- package/dist/execution/design-tune.d.ts.map +0 -1
- package/dist/execution/design-verify.d.ts.map +0 -1
- package/dist/execution/enhance-recovery.d.ts.map +0 -1
- package/dist/execution/error-handler.d.ts.map +0 -1
- package/dist/execution/eternal-autonomy-types.d.ts.map +0 -1
- package/dist/execution/eternal-autonomy.d.ts.map +0 -1
- package/dist/execution/goal-preamble.d.ts.map +0 -1
- package/dist/execution/index.d.ts.map +0 -1
- package/dist/execution/index.js.map +0 -7
- package/dist/execution/intelligent-compactor.d.ts.map +0 -1
- package/dist/execution/model-runtime.d.ts.map +0 -1
- package/dist/execution/one-shot-llm.d.ts.map +0 -1
- package/dist/execution/parallel-eternal-engine.d.ts.map +0 -1
- package/dist/execution/prompt-enhancer.d.ts.map +0 -1
- package/dist/execution/prompt-enhancer.js.map +0 -7
- package/dist/execution/prompt-loader.d.ts.map +0 -1
- package/dist/execution/provider-runner-impl.d.ts.map +0 -1
- package/dist/execution/regex-patterns.d.ts.map +0 -1
- package/dist/execution/retry-policy.d.ts.map +0 -1
- package/dist/execution/selective-compactor.d.ts.map +0 -1
- package/dist/execution/skill-loader.d.ts.map +0 -1
- package/dist/execution/strategy-compactor.d.ts.map +0 -1
- package/dist/execution/subagent-compaction.d.ts.map +0 -1
- package/dist/execution/tool-executor-logging.d.ts.map +0 -1
- package/dist/execution/tool-executor-results.d.ts.map +0 -1
- package/dist/execution/tool-executor-stream.d.ts.map +0 -1
- package/dist/execution/tool-executor-support.d.ts.map +0 -1
- package/dist/execution/tool-executor.d.ts.map +0 -1
- package/dist/extension/extension-points.d.ts.map +0 -1
- package/dist/extension/index.d.ts.map +0 -1
- package/dist/extension/index.js.map +0 -7
- package/dist/extension/registry.d.ts.map +0 -1
- package/dist/fleet-notifier.d.ts.map +0 -1
- package/dist/goal/checkpoint.d.ts.map +0 -1
- package/dist/goal/goal-assessor.d.ts.map +0 -1
- package/dist/goal/goal-planner.d.ts.map +0 -1
- package/dist/goal/goal-runner.d.ts.map +0 -1
- package/dist/goal/index.d.ts.map +0 -1
- package/dist/goal/index.js.map +0 -7
- package/dist/goal/phase-board-mutations.d.ts.map +0 -1
- package/dist/goal/phase-graph-builder.d.ts.map +0 -1
- package/dist/goal/phase-orchestrator-integration.d.ts.map +0 -1
- package/dist/goal/phase-orchestrator-queries.d.ts.map +0 -1
- package/dist/goal/phase-orchestrator-runtime.d.ts.map +0 -1
- package/dist/goal/phase-orchestrator-types.d.ts.map +0 -1
- package/dist/goal/phase-orchestrator.d.ts.map +0 -1
- package/dist/goal/phase-store.d.ts.map +0 -1
- package/dist/goal/types.d.ts.map +0 -1
- package/dist/hooks/http-executor.d.ts.map +0 -1
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js.map +0 -7
- package/dist/hooks/registry.d.ts.map +0 -1
- package/dist/hooks/runner.d.ts.map +0 -1
- package/dist/hooks/shell-executor.d.ts.map +0 -1
- package/dist/hooks/shell-hooks-equal.d.ts.map +0 -1
- package/dist/hq/alerts.d.ts.map +0 -1
- package/dist/hq/auth-audit.d.ts.map +0 -1
- package/dist/hq/auth-store.d.ts.map +0 -1
- package/dist/hq/bootstrap-store.d.ts.map +0 -1
- package/dist/hq/brain-bridge.d.ts.map +0 -1
- package/dist/hq/bridge-context.d.ts.map +0 -1
- package/dist/hq/commands.d.ts.map +0 -1
- package/dist/hq/cost-bridge.d.ts.map +0 -1
- package/dist/hq/exposure.d.ts.map +0 -1
- package/dist/hq/factory.d.ts.map +0 -1
- package/dist/hq/fleet-bridge.d.ts.map +0 -1
- package/dist/hq/index.d.ts.map +0 -1
- package/dist/hq/index.js.map +0 -7
- package/dist/hq/kanban-store.d.ts.map +0 -1
- package/dist/hq/mailbox-mapper.d.ts.map +0 -1
- package/dist/hq/persistence/event-log.d.ts.map +0 -1
- package/dist/hq/persistence/jsonl-io.d.ts.map +0 -1
- package/dist/hq/persistence/simple-log.d.ts.map +0 -1
- package/dist/hq/persistence/snapshot-store.d.ts.map +0 -1
- package/dist/hq/persistence/timeseries-store.d.ts.map +0 -1
- package/dist/hq/persistence.d.ts.map +0 -1
- package/dist/hq/protocol/brain.d.ts.map +0 -1
- package/dist/hq/protocol/browser.d.ts.map +0 -1
- package/dist/hq/protocol/client.d.ts.map +0 -1
- package/dist/hq/protocol/core.d.ts.map +0 -1
- package/dist/hq/protocol/fleet.d.ts.map +0 -1
- package/dist/hq/protocol/kanban.d.ts.map +0 -1
- package/dist/hq/protocol/mailbox.d.ts.map +0 -1
- package/dist/hq/protocol/mcp.d.ts.map +0 -1
- package/dist/hq/protocol/peer.d.ts.map +0 -1
- package/dist/hq/protocol/project.d.ts.map +0 -1
- package/dist/hq/protocol/resume.d.ts.map +0 -1
- package/dist/hq/protocol/session.d.ts.map +0 -1
- package/dist/hq/protocol/tool.d.ts.map +0 -1
- package/dist/hq/protocol.d.ts.map +0 -1
- package/dist/hq/publisher.d.ts.map +0 -1
- package/dist/hq/redaction.d.ts.map +0 -1
- package/dist/hq/session-bridge.d.ts.map +0 -1
- package/dist/hq/tool-bridge.d.ts.map +0 -1
- package/dist/hq/transcript-mapper.d.ts.map +0 -1
- package/dist/hq/worktree-bridge.d.ts.map +0 -1
- package/dist/hq/write-queues.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -7
- package/dist/infrastructure/context-manager.d.ts.map +0 -1
- package/dist/infrastructure/index.d.ts.map +0 -1
- package/dist/infrastructure/index.js.map +0 -7
- package/dist/infrastructure/logger.d.ts.map +0 -1
- package/dist/infrastructure/mcp-servers.d.ts.map +0 -1
- package/dist/infrastructure/path-resolver.d.ts.map +0 -1
- package/dist/infrastructure/provider-cache-ledger.d.ts.map +0 -1
- package/dist/infrastructure/token-counter.d.ts.map +0 -1
- package/dist/kernel/container.d.ts.map +0 -1
- package/dist/kernel/events/agent-events.d.ts.map +0 -1
- package/dist/kernel/events/brain-events.d.ts.map +0 -1
- package/dist/kernel/events/file-events.d.ts.map +0 -1
- package/dist/kernel/events/fleet-events.d.ts.map +0 -1
- package/dist/kernel/events/memory-events.d.ts.map +0 -1
- package/dist/kernel/events/network-events.d.ts.map +0 -1
- package/dist/kernel/events/process-events.d.ts.map +0 -1
- package/dist/kernel/events/provider-events.d.ts.map +0 -1
- package/dist/kernel/events/sdd-events.d.ts.map +0 -1
- package/dist/kernel/events/session-events.d.ts.map +0 -1
- package/dist/kernel/events/tool-events.d.ts.map +0 -1
- package/dist/kernel/events/worktree-events.d.ts.map +0 -1
- package/dist/kernel/events.d.ts.map +0 -1
- package/dist/kernel/index.d.ts.map +0 -1
- package/dist/kernel/index.js.map +0 -7
- package/dist/kernel/pipeline.d.ts.map +0 -1
- package/dist/kernel/run-controller.d.ts.map +0 -1
- package/dist/kernel/tokens.d.ts.map +0 -1
- package/dist/mailbox-attach.d.ts.map +0 -1
- package/dist/middleware/collab-pause.d.ts.map +0 -1
- package/dist/models/alibaba-token-plan-catalog.d.ts.map +0 -1
- package/dist/models/codex-catalog.d.ts.map +0 -1
- package/dist/models/index.d.ts.map +0 -1
- package/dist/models/index.js.map +0 -7
- package/dist/models/llm-selector.d.ts.map +0 -1
- package/dist/models/mode-store.d.ts.map +0 -1
- package/dist/models/model-intelligence.d.ts.map +0 -1
- package/dist/models/model-router.d.ts.map +0 -1
- package/dist/models/models-registry.d.ts.map +0 -1
- package/dist/models/provider-model-resolve.d.ts.map +0 -1
- package/dist/notifications/index.d.ts.map +0 -1
- package/dist/notifications/index.js.map +0 -7
- package/dist/notifications/notifier-impl.d.ts.map +0 -1
- package/dist/notifications/notifier.d.ts.map +0 -1
- package/dist/notifications/types.d.ts.map +0 -1
- package/dist/observability/event-bridge.d.ts.map +0 -1
- package/dist/observability/health.d.ts.map +0 -1
- package/dist/observability/index.d.ts.map +0 -1
- package/dist/observability/index.js.map +0 -7
- package/dist/observability/metrics.d.ts.map +0 -1
- package/dist/observability/network-telemetry.d.ts.map +0 -1
- package/dist/observability/otel-tracer.d.ts.map +0 -1
- package/dist/observability/otlp-metrics.d.ts.map +0 -1
- package/dist/observability/otlp-traces.d.ts.map +0 -1
- package/dist/observability/process-telemetry.d.ts.map +0 -1
- package/dist/observability/prometheus.d.ts.map +0 -1
- package/dist/observability/redact-command.d.ts.map +0 -1
- package/dist/observability/tracer.d.ts.map +0 -1
- package/dist/plugin/api.d.ts.map +0 -1
- package/dist/plugin/config.d.ts.map +0 -1
- package/dist/plugin/index.d.ts.map +0 -1
- package/dist/plugin/index.js.map +0 -7
- package/dist/plugin/loader.d.ts.map +0 -1
- package/dist/plugins/auto-review-plugin.d.ts.map +0 -1
- package/dist/plugins/chimera-plugin.d.ts.map +0 -1
- package/dist/plugins/prompts-plugin.d.ts.map +0 -1
- package/dist/plugins/review-claim-registry.d.ts.map +0 -1
- package/dist/plugins/review-context-builder.d.ts.map +0 -1
- package/dist/plugins/review-finding-commands.d.ts.map +0 -1
- package/dist/plugins/review-finding-integration.d.ts.map +0 -1
- package/dist/plugins/review-finding-parser.d.ts.map +0 -1
- package/dist/plugins/review-finding-store.d.ts.map +0 -1
- package/dist/plugins/review-finding-types.d.ts.map +0 -1
- package/dist/plugins/review-report-integration.d.ts.map +0 -1
- package/dist/plugins/review-report-store.d.ts.map +0 -1
- package/dist/plugins/review-report-types.d.ts.map +0 -1
- package/dist/plugins/review-types.d.ts.map +0 -1
- package/dist/plugins/skills-plugin.d.ts.map +0 -1
- package/dist/plugins/sync-plugin.d.ts.map +0 -1
- package/dist/prompts/index.d.ts.map +0 -1
- package/dist/prompts/prompt-installer.d.ts.map +0 -1
- package/dist/prompts/prompt-manifest-store.d.ts.map +0 -1
- package/dist/registry/index.d.ts.map +0 -1
- package/dist/registry/index.js.map +0 -7
- package/dist/registry/provider-registry.d.ts.map +0 -1
- package/dist/registry/slash-command-registry.d.ts.map +0 -1
- package/dist/registry/tool-registry.d.ts.map +0 -1
- package/dist/replay/hash.d.ts.map +0 -1
- package/dist/replay/index.d.ts.map +0 -1
- package/dist/replay/index.js.map +0 -7
- package/dist/replay/replay-provider-runner.d.ts.map +0 -1
- package/dist/security/capabilities.d.ts.map +0 -1
- package/dist/security/config-secrets.d.ts.map +0 -1
- package/dist/security/directory-permission-policy.d.ts.map +0 -1
- package/dist/security/directory-policy-schema.d.ts.map +0 -1
- package/dist/security/index.d.ts.map +0 -1
- package/dist/security/index.js.map +0 -7
- package/dist/security/kanban-boundary.d.ts.map +0 -1
- package/dist/security/permission-policy-schema.d.ts.map +0 -1
- package/dist/security/permission-policy.d.ts.map +0 -1
- package/dist/security/readonly-permission-policy.d.ts.map +0 -1
- package/dist/security/secret-scrubber.d.ts.map +0 -1
- package/dist/security/secret-vault.d.ts.map +0 -1
- package/dist/security/trust-boundary.d.ts.map +0 -1
- package/dist/security/yolo-risk.d.ts.map +0 -1
- package/dist/session-registry-atomic-file.d.ts.map +0 -1
- package/dist/session-registry-types.d.ts.map +0 -1
- package/dist/session-registry.d.ts.map +0 -1
- package/dist/skills/foreign-sources.d.ts.map +0 -1
- package/dist/skills/frontmatter.d.ts.map +0 -1
- package/dist/skills/github-fetcher.d.ts.map +0 -1
- package/dist/skills/index.d.ts.map +0 -1
- package/dist/skills/index.js.map +0 -7
- package/dist/skills/limits.d.ts.map +0 -1
- package/dist/skills/manifest-store.d.ts.map +0 -1
- package/dist/skills/registry/github-direct-adapter.d.ts.map +0 -1
- package/dist/skills/registry/registry-adapter.d.ts.map +0 -1
- package/dist/skills/registry/skills-sh-adapter.d.ts.map +0 -1
- package/dist/skills/skill-generator.d.ts.map +0 -1
- package/dist/skills/skill-installer.d.ts.map +0 -1
- package/dist/storage/annotations-store.d.ts.map +0 -1
- package/dist/storage/attachment-store.d.ts.map +0 -1
- package/dist/storage/cloud-sync.d.ts.map +0 -1
- package/dist/storage/completed-work-checkpoint.d.ts.map +0 -1
- package/dist/storage/config-loader/bootstrap.d.ts.map +0 -1
- package/dist/storage/config-loader/default-repair.d.ts.map +0 -1
- package/dist/storage/config-loader/defaults.d.ts.map +0 -1
- package/dist/storage/config-loader/diagnostics.d.ts.map +0 -1
- package/dist/storage/config-loader/env-overrides.d.ts.map +0 -1
- package/dist/storage/config-loader/in-project-policy.d.ts.map +0 -1
- package/dist/storage/config-loader/inline-provider-models.d.ts.map +0 -1
- package/dist/storage/config-loader/legacy-sage-migration.d.ts.map +0 -1
- package/dist/storage/config-loader/path-identity.d.ts.map +0 -1
- package/dist/storage/config-loader/types.d.ts.map +0 -1
- package/dist/storage/config-loader/validation.d.ts.map +0 -1
- package/dist/storage/config-loader.d.ts.map +0 -1
- package/dist/storage/config-migration.d.ts.map +0 -1
- package/dist/storage/config-store.d.ts.map +0 -1
- package/dist/storage/director-state.d.ts.map +0 -1
- package/dist/storage/file-session-writer.d.ts.map +0 -1
- package/dist/storage/goal-coordination.d.ts.map +0 -1
- package/dist/storage/goal-kanban.d.ts.map +0 -1
- package/dist/storage/goal-store.d.ts.map +0 -1
- package/dist/storage/index.d.ts.map +0 -1
- package/dist/storage/index.js.map +0 -7
- package/dist/storage/input-history-store.d.ts.map +0 -1
- package/dist/storage/memory-backend.d.ts.map +0 -1
- package/dist/storage/memory-consolidator.d.ts.map +0 -1
- package/dist/storage/memory-graph-backend.d.ts.map +0 -1
- package/dist/storage/plan-store.d.ts.map +0 -1
- package/dist/storage/plan-templates.d.ts.map +0 -1
- package/dist/storage/prompt-store.d.ts.map +0 -1
- package/dist/storage/prompt-usage-store.d.ts.map +0 -1
- package/dist/storage/provider-config-watcher.d.ts.map +0 -1
- package/dist/storage/queue-store.d.ts.map +0 -1
- package/dist/storage/recovery-lock.d.ts.map +0 -1
- package/dist/storage/replay-log-store.d.ts.map +0 -1
- package/dist/storage/session-analyzer.d.ts.map +0 -1
- package/dist/storage/session-checkpoint-cas.d.ts.map +0 -1
- package/dist/storage/session-event-bridge.d.ts.map +0 -1
- package/dist/storage/session-helpers.d.ts.map +0 -1
- package/dist/storage/session-id-resolver.d.ts.map +0 -1
- package/dist/storage/session-id.d.ts.map +0 -1
- package/dist/storage/session-read-scrubber.d.ts.map +0 -1
- package/dist/storage/session-reader.d.ts.map +0 -1
- package/dist/storage/session-recovery.d.ts.map +0 -1
- package/dist/storage/session-resume-validation.d.ts.map +0 -1
- package/dist/storage/session-rewind-apply.d.ts.map +0 -1
- package/dist/storage/session-rewinder.d.ts.map +0 -1
- package/dist/storage/session-store/delete-session-artifacts.d.ts.map +0 -1
- package/dist/storage/session-store/delete-session-guards.d.ts.map +0 -1
- package/dist/storage/session-store/directory-scan.d.ts.map +0 -1
- package/dist/storage/session-store/directory-session-files.d.ts.map +0 -1
- package/dist/storage/session-store/events.d.ts.map +0 -1
- package/dist/storage/session-store/fork-session.d.ts.map +0 -1
- package/dist/storage/session-store/index-reader.d.ts.map +0 -1
- package/dist/storage/session-store/load-cache.d.ts.map +0 -1
- package/dist/storage/session-store/load-session-data.d.ts.map +0 -1
- package/dist/storage/session-store/paths.d.ts.map +0 -1
- package/dist/storage/session-store/prune-helpers.d.ts.map +0 -1
- package/dist/storage/session-store/replay.d.ts.map +0 -1
- package/dist/storage/session-store/search-events.d.ts.map +0 -1
- package/dist/storage/session-store/shard-manifest.d.ts.map +0 -1
- package/dist/storage/session-store/summary-builder.d.ts.map +0 -1
- package/dist/storage/session-store/summary-header.d.ts.map +0 -1
- package/dist/storage/session-store/types.d.ts.map +0 -1
- package/dist/storage/session-store.d.ts.map +0 -1
- package/dist/storage/session-summary.d.ts.map +0 -1
- package/dist/storage/session-tool-call-ends.d.ts.map +0 -1
- package/dist/storage/session-writer-scrubber.d.ts.map +0 -1
- package/dist/storage/session-writer-truncate.d.ts.map +0 -1
- package/dist/storage/storage-concurrency.d.ts.map +0 -1
- package/dist/storage/task-store.d.ts.map +0 -1
- package/dist/storage/todos-checkpoint.d.ts.map +0 -1
- package/dist/storage/tool-audit-log.d.ts.map +0 -1
- package/dist/tasking/index.d.ts.map +0 -1
- package/dist/tasking/index.js.map +0 -7
- package/dist/tasking/task-store.d.ts.map +0 -1
- package/dist/tasking/task-tracker.d.ts.map +0 -1
- package/dist/tools/council-tool.d.ts.map +0 -1
- package/dist/tools/fallback-chain-manage-tool.d.ts.map +0 -1
- package/dist/tools/fallback-favorite-manage-tool.d.ts.map +0 -1
- package/dist/tools/fallback-manage-helpers.d.ts.map +0 -1
- package/dist/tools/fallback-manage-tool-options.d.ts.map +0 -1
- package/dist/tools/fallback-manage-tools.d.ts.map +0 -1
- package/dist/tools/fallback-model-ref-parse.d.ts.map +0 -1
- package/dist/tools/fallback-provider-key-store.d.ts.map +0 -1
- package/dist/tools/fallback-system-config-view-tool.d.ts.map +0 -1
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js.map +0 -7
- package/dist/tools/mcp-control.d.ts.map +0 -1
- package/dist/tools/mcp-use.d.ts.map +0 -1
- package/dist/tools/one-shot-llm-tool.d.ts.map +0 -1
- package/dist/tools/plugin-manager.d.ts.map +0 -1
- package/dist/types/agent-bridge.d.ts.map +0 -1
- package/dist/types/attachment.d.ts.map +0 -1
- package/dist/types/autonomy.d.ts.map +0 -1
- package/dist/types/blocks.d.ts.map +0 -1
- package/dist/types/compactor.d.ts.map +0 -1
- package/dist/types/config/autonomy.d.ts.map +0 -1
- package/dist/types/config/context.d.ts.map +0 -1
- package/dist/types/config/fleet-chat.d.ts.map +0 -1
- package/dist/types/config/mcp-features.d.ts.map +0 -1
- package/dist/types/config/providers.d.ts.map +0 -1
- package/dist/types/config/root.d.ts.map +0 -1
- package/dist/types/config/runtime.d.ts.map +0 -1
- package/dist/types/config/skills-fleet-brain.d.ts.map +0 -1
- package/dist/types/config/tools.d.ts.map +0 -1
- package/dist/types/config.d.ts.map +0 -1
- package/dist/types/context-evidence.d.ts.map +0 -1
- package/dist/types/context-window.d.ts.map +0 -1
- package/dist/types/council.d.ts.map +0 -1
- package/dist/types/default-config.d.ts.map +0 -1
- package/dist/types/design-kit.d.ts.map +0 -1
- package/dist/types/error-handler.d.ts.map +0 -1
- package/dist/types/errors.d.ts.map +0 -1
- package/dist/types/file-event-record.d.ts.map +0 -1
- package/dist/types/hooks.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js.map +0 -7
- package/dist/types/input-reader.d.ts.map +0 -1
- package/dist/types/logger.d.ts.map +0 -1
- package/dist/types/memory.d.ts.map +0 -1
- package/dist/types/messages.d.ts.map +0 -1
- package/dist/types/mode-prompts.d.ts.map +0 -1
- package/dist/types/mode.d.ts.map +0 -1
- package/dist/types/models-registry.d.ts.map +0 -1
- package/dist/types/multi-agent.d.ts.map +0 -1
- package/dist/types/observability.d.ts.map +0 -1
- package/dist/types/one-shot-llm.d.ts.map +0 -1
- package/dist/types/path-resolver.d.ts.map +0 -1
- package/dist/types/permission.d.ts.map +0 -1
- package/dist/types/plugin.d.ts.map +0 -1
- package/dist/types/prompt-registry.d.ts.map +0 -1
- package/dist/types/prompt.d.ts.map +0 -1
- package/dist/types/provider-runner.d.ts.map +0 -1
- package/dist/types/provider.d.ts.map +0 -1
- package/dist/types/quota-regex.d.ts.map +0 -1
- package/dist/types/renderer.d.ts.map +0 -1
- package/dist/types/retry-policy.d.ts.map +0 -1
- package/dist/types/secret-scrubber.d.ts.map +0 -1
- package/dist/types/secret-vault.d.ts.map +0 -1
- package/dist/types/selector.d.ts.map +0 -1
- package/dist/types/session-markers.d.ts.map +0 -1
- package/dist/types/session-markers.js.map +0 -7
- package/dist/types/session-reader.d.ts.map +0 -1
- package/dist/types/session-rewinder.d.ts.map +0 -1
- package/dist/types/session.d.ts.map +0 -1
- package/dist/types/side-effect.d.ts.map +0 -1
- package/dist/types/skill.d.ts.map +0 -1
- package/dist/types/slash-command.d.ts.map +0 -1
- package/dist/types/spec.d.ts.map +0 -1
- package/dist/types/system-prompt-contributor.d.ts.map +0 -1
- package/dist/types/system-prompt.d.ts.map +0 -1
- package/dist/types/task-graph.d.ts.map +0 -1
- package/dist/types/token-counter.d.ts.map +0 -1
- package/dist/types/tool-executor.d.ts.map +0 -1
- package/dist/types/tool-markers.d.ts.map +0 -1
- package/dist/types/tool.d.ts.map +0 -1
- package/dist/types/utility-types.d.ts.map +0 -1
- package/dist/utils/assert-never.d.ts.map +0 -1
- package/dist/utils/atomic-write.d.ts.map +0 -1
- package/dist/utils/cache-key.d.ts.map +0 -1
- package/dist/utils/child-env.d.ts.map +0 -1
- package/dist/utils/color.d.ts.map +0 -1
- package/dist/utils/compaction-preview.d.ts.map +0 -1
- package/dist/utils/config-backup.d.ts.map +0 -1
- package/dist/utils/config-json.d.ts.map +0 -1
- package/dist/utils/connectivity.d.ts.map +0 -1
- package/dist/utils/context-breakdown.d.ts.map +0 -1
- package/dist/utils/context-evidence.d.ts.map +0 -1
- package/dist/utils/continuous-memory-profiler.d.ts.map +0 -1
- package/dist/utils/crash-shield.d.ts.map +0 -1
- package/dist/utils/deep-merge.d.ts.map +0 -1
- package/dist/utils/diff.d.ts.map +0 -1
- package/dist/utils/error.d.ts.map +0 -1
- package/dist/utils/error.js.map +0 -7
- package/dist/utils/expect-defined.d.ts.map +0 -1
- package/dist/utils/expect-defined.js.map +0 -7
- package/dist/utils/glob-expand.d.ts.map +0 -1
- package/dist/utils/glob-match.d.ts.map +0 -1
- package/dist/utils/heap-watchdog-types.d.ts.map +0 -1
- package/dist/utils/heap-watchdog.d.ts.map +0 -1
- package/dist/utils/heap-watchdog.js.map +0 -7
- package/dist/utils/incoming-images.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js.map +0 -7
- package/dist/utils/instruction-file.d.ts.map +0 -1
- package/dist/utils/ip-guard.d.ts.map +0 -1
- package/dist/utils/json-repair.d.ts.map +0 -1
- package/dist/utils/json-schema-validate.d.ts.map +0 -1
- package/dist/utils/lru-cache.d.ts.map +0 -1
- package/dist/utils/memory-flight-recorder.d.ts.map +0 -1
- package/dist/utils/merge-custom-models.d.ts.map +0 -1
- package/dist/utils/merge-models-payload.d.ts.map +0 -1
- package/dist/utils/message-invariants.d.ts.map +0 -1
- package/dist/utils/newline-normalize.d.ts.map +0 -1
- package/dist/utils/perf-profile.d.ts.map +0 -1
- package/dist/utils/pid.d.ts.map +0 -1
- package/dist/utils/project-identity.d.ts.map +0 -1
- package/dist/utils/project-watch.d.ts.map +0 -1
- package/dist/utils/regex-guard.d.ts.map +0 -1
- package/dist/utils/safe-json.d.ts.map +0 -1
- package/dist/utils/sage-output-block.d.ts.map +0 -1
- package/dist/utils/session-scoped-path.d.ts.map +0 -1
- package/dist/utils/sleep.d.ts.map +0 -1
- package/dist/utils/slug.d.ts.map +0 -1
- package/dist/utils/socket-path.d.ts.map +0 -1
- package/dist/utils/sqlite-warning.d.ts.map +0 -1
- package/dist/utils/string.d.ts.map +0 -1
- package/dist/utils/task-format.d.ts.map +0 -1
- package/dist/utils/term.d.ts.map +0 -1
- package/dist/utils/todos-format.d.ts.map +0 -1
- package/dist/utils/token-estimate.d.ts.map +0 -1
- package/dist/utils/tool-description-mode.d.ts.map +0 -1
- package/dist/utils/tool-name.d.ts.map +0 -1
- package/dist/utils/tool-output-serializer.d.ts.map +0 -1
- package/dist/utils/tool-result-render-mode.d.ts.map +0 -1
- package/dist/utils/tool-subject.d.ts.map +0 -1
- package/dist/utils/tool-wire-compact.d.ts.map +0 -1
- package/dist/utils/tree-kill.d.ts.map +0 -1
- package/dist/utils/tree-kill.js.map +0 -7
- package/dist/utils/ulid.d.ts.map +0 -1
- package/dist/utils/walk-ignore.d.ts.map +0 -1
- package/dist/utils/wstack-paths.d.ts.map +0 -1
- package/dist/worktree/index.d.ts.map +0 -1
- package/dist/worktree/index.js.map +0 -7
- package/dist/worktree/worktree-git.d.ts.map +0 -1
- package/dist/worktree/worktree-managed-ops.d.ts.map +0 -1
- package/dist/worktree/worktree-manager.d.ts.map +0 -1
- package/dist/worktree/worktree-types.d.ts.map +0 -1
package/dist/execution/index.js
CHANGED
|
@@ -3105,7 +3105,7 @@ var DefaultLogger = class _DefaultLogger {
|
|
|
3105
3105
|
root.pendingFileWrites += 1;
|
|
3106
3106
|
root.pendingFileBytes += bytes;
|
|
3107
3107
|
this.enqueueRotate(this.file);
|
|
3108
|
-
this._tail = this._tail.then(() => fsp.appendFile(this.file, line)).catch(() => void 0).finally(() => {
|
|
3108
|
+
this._tail = this._tail.then(() => fsp.appendFile(this.file, line, { mode: 384 })).catch(() => void 0).finally(() => {
|
|
3109
3109
|
root.pendingFileWrites = Math.max(0, root.pendingFileWrites - 1);
|
|
3110
3110
|
root.pendingFileBytes = Math.max(0, root.pendingFileBytes - bytes);
|
|
3111
3111
|
});
|
|
@@ -4364,30 +4364,6 @@ function kindToCode(kind) {
|
|
|
4364
4364
|
return KIND_TO_CODE[kind];
|
|
4365
4365
|
}
|
|
4366
4366
|
|
|
4367
|
-
// src/core/model-ref.ts
|
|
4368
|
-
function parseModelRef(ref) {
|
|
4369
|
-
const trimmed = ref.trim();
|
|
4370
|
-
const slash = trimmed.indexOf("/");
|
|
4371
|
-
if (slash !== -1) {
|
|
4372
|
-
return {
|
|
4373
|
-
provider: trimmed.slice(0, slash) || void 0,
|
|
4374
|
-
model: trimmed.slice(slash + 1).trim()
|
|
4375
|
-
};
|
|
4376
|
-
}
|
|
4377
|
-
const parts = trimmed.split(/\s+/);
|
|
4378
|
-
if (parts.length >= 2) {
|
|
4379
|
-
return { provider: parts[0], model: parts.slice(1).join(" ") };
|
|
4380
|
-
}
|
|
4381
|
-
return { model: trimmed };
|
|
4382
|
-
}
|
|
4383
|
-
function formatModelRef(ref, defaultProvider) {
|
|
4384
|
-
const provider = ref.provider ?? defaultProvider;
|
|
4385
|
-
return provider ? `${provider}/${ref.model}` : ref.model;
|
|
4386
|
-
}
|
|
4387
|
-
function normalizeModelRef(ref, defaultProvider) {
|
|
4388
|
-
return formatModelRef(parseModelRef(ref), defaultProvider);
|
|
4389
|
-
}
|
|
4390
|
-
|
|
4391
4367
|
// src/core/model-availability-calendar.ts
|
|
4392
4368
|
function logicalCalendarTarget(providerId, model) {
|
|
4393
4369
|
if (providerId !== "omniroute") return { providerId, model };
|
|
@@ -4466,6 +4442,30 @@ function evaluateModelCalendar(rules, providerId, model, at = /* @__PURE__ */ ne
|
|
|
4466
4442
|
return { allowed: true };
|
|
4467
4443
|
}
|
|
4468
4444
|
|
|
4445
|
+
// src/core/model-ref.ts
|
|
4446
|
+
function parseModelRef(ref) {
|
|
4447
|
+
const trimmed = ref.trim();
|
|
4448
|
+
const slash = trimmed.indexOf("/");
|
|
4449
|
+
if (slash !== -1) {
|
|
4450
|
+
return {
|
|
4451
|
+
provider: trimmed.slice(0, slash) || void 0,
|
|
4452
|
+
model: trimmed.slice(slash + 1).trim()
|
|
4453
|
+
};
|
|
4454
|
+
}
|
|
4455
|
+
const parts = trimmed.split(/\s+/);
|
|
4456
|
+
if (parts.length >= 2) {
|
|
4457
|
+
return { provider: parts[0], model: parts.slice(1).join(" ") };
|
|
4458
|
+
}
|
|
4459
|
+
return { model: trimmed };
|
|
4460
|
+
}
|
|
4461
|
+
function formatModelRef(ref, defaultProvider) {
|
|
4462
|
+
const provider = ref.provider ?? defaultProvider;
|
|
4463
|
+
return provider ? `${provider}/${ref.model}` : ref.model;
|
|
4464
|
+
}
|
|
4465
|
+
function normalizeModelRef(ref, defaultProvider) {
|
|
4466
|
+
return formatModelRef(parseModelRef(ref), defaultProvider);
|
|
4467
|
+
}
|
|
4468
|
+
|
|
4469
4469
|
// src/core/fallback-profile-manager.ts
|
|
4470
4470
|
function hasText(value) {
|
|
4471
4471
|
return typeof value === "string" && value.trim().length > 0;
|
|
@@ -4566,18 +4566,42 @@ var FallbackProfileManager = class {
|
|
|
4566
4566
|
* Mirrors the previous `effectiveFallbackChain()` logic but centralized.
|
|
4567
4567
|
*/
|
|
4568
4568
|
resolveEffective(opts = {}) {
|
|
4569
|
+
const bridge = this.resolveBridge(opts.exclude);
|
|
4570
|
+
let selected = FREEZER_EMPTY;
|
|
4569
4571
|
if (opts.fallbackModels && opts.fallbackModels.length > 0) {
|
|
4570
4572
|
const resolved = this.resolveRefs(opts.fallbackModels, opts.exclude);
|
|
4571
|
-
if (resolved.length > 0)
|
|
4573
|
+
if (resolved.length > 0) selected = resolved;
|
|
4572
4574
|
}
|
|
4573
|
-
if (opts.fallbackProfile) {
|
|
4575
|
+
if (selected.length === 0 && opts.fallbackProfile) {
|
|
4574
4576
|
const resolved = this.resolve(opts.fallbackProfile, { exclude: opts.exclude });
|
|
4575
|
-
if (resolved.length > 0)
|
|
4577
|
+
if (resolved.length > 0) selected = resolved;
|
|
4576
4578
|
}
|
|
4577
|
-
if (opts.fallbackAuto !== false) {
|
|
4578
|
-
|
|
4579
|
+
if (selected.length === 0 && opts.fallbackAuto !== false) {
|
|
4580
|
+
selected = this.smartDefault(opts.exclude);
|
|
4579
4581
|
}
|
|
4580
|
-
return
|
|
4582
|
+
if (bridge.length === 0) return selected;
|
|
4583
|
+
if (selected.length === 0) return bridge;
|
|
4584
|
+
const seen = new Set(bridge.map((entry) => `${entry.providerId}/${entry.model}`));
|
|
4585
|
+
return Object.freeze([
|
|
4586
|
+
...bridge,
|
|
4587
|
+
...selected.filter((entry) => !seen.has(`${entry.providerId}/${entry.model}`))
|
|
4588
|
+
]);
|
|
4589
|
+
}
|
|
4590
|
+
/** Resolve the optional, fully-qualified emergency continuity route. */
|
|
4591
|
+
resolveBridge(exclude) {
|
|
4592
|
+
const ref = this.config.fallbackBridge?.trim();
|
|
4593
|
+
if (!ref) return FREEZER_EMPTY;
|
|
4594
|
+
const parsed = parseModelRef(ref);
|
|
4595
|
+
if (!parsed.provider || !parsed.model) return FREEZER_EMPTY;
|
|
4596
|
+
return this.resolveRefs([ref], exclude);
|
|
4597
|
+
}
|
|
4598
|
+
/**
|
|
4599
|
+
* Resolve every usable configured target as an uncapped last-resort chain.
|
|
4600
|
+
* Normal smart defaults stay bounded; callers append this only after the
|
|
4601
|
+
* preferred chain and only when automatic fallback is enabled.
|
|
4602
|
+
*/
|
|
4603
|
+
resolveAllConfigured(exclude) {
|
|
4604
|
+
return this.smartDefault(exclude, Number.POSITIVE_INFINITY);
|
|
4581
4605
|
}
|
|
4582
4606
|
// ── Provider availability (read-only) ──────────────────────────────────
|
|
4583
4607
|
checkProvider(providerId) {
|
|
@@ -4636,7 +4660,7 @@ var FallbackProfileManager = class {
|
|
|
4636
4660
|
* explicit is set. Same-provider alternatives first, then cross-provider.
|
|
4637
4661
|
* Limited to 4 entries to avoid burning through models on a transient blip.
|
|
4638
4662
|
*/
|
|
4639
|
-
smartDefault(exclude) {
|
|
4663
|
+
smartDefault(exclude, maxCandidates = 4) {
|
|
4640
4664
|
const leaderProvider = this.config.provider;
|
|
4641
4665
|
const leaderModel = this.config.model;
|
|
4642
4666
|
const providers = this.config.providers ?? {};
|
|
@@ -4677,8 +4701,18 @@ var FallbackProfileManager = class {
|
|
|
4677
4701
|
(id === leaderProvider ? sameProvider : crossProvider).push(ref);
|
|
4678
4702
|
}
|
|
4679
4703
|
}
|
|
4680
|
-
const
|
|
4681
|
-
const all =
|
|
4704
|
+
const ordered = [...favorites, ...sameProvider, ...crossProvider];
|
|
4705
|
+
const all = Number.isFinite(maxCandidates) ? ordered.slice(0, Math.max(0, maxCandidates)) : [...ordered];
|
|
4706
|
+
const firstCrossProvider = ordered.find((ref) => {
|
|
4707
|
+
const parsed = parseModelRef(ref);
|
|
4708
|
+
return (parsed.provider ?? leaderProvider) !== leaderProvider;
|
|
4709
|
+
});
|
|
4710
|
+
if (all.length > 0 && firstCrossProvider && !all.some((ref) => {
|
|
4711
|
+
const parsed = parseModelRef(ref);
|
|
4712
|
+
return (parsed.provider ?? leaderProvider) !== leaderProvider;
|
|
4713
|
+
})) {
|
|
4714
|
+
all[all.length - 1] = firstCrossProvider;
|
|
4715
|
+
}
|
|
4682
4716
|
return Object.freeze(
|
|
4683
4717
|
all.map((ref) => {
|
|
4684
4718
|
const p = parseModelRef(ref);
|
|
@@ -6391,6 +6425,11 @@ import { createReadStream } from "node:fs";
|
|
|
6391
6425
|
import { access, appendFile as appendFile2, mkdir as mkdir2, rename as rename2, stat as stat2 } from "node:fs/promises";
|
|
6392
6426
|
import { dirname as dirname3 } from "node:path";
|
|
6393
6427
|
import { createInterface } from "node:readline";
|
|
6428
|
+
|
|
6429
|
+
// src/security/file-permissions.ts
|
|
6430
|
+
var SECRET_FILE_MODE = 384;
|
|
6431
|
+
|
|
6432
|
+
// src/coordination/brain-ledger.ts
|
|
6394
6433
|
var QUESTION_MAX = 200;
|
|
6395
6434
|
var DETAIL_MAX = 240;
|
|
6396
6435
|
var truncate2 = (s, max) => s === void 0 ? void 0 : s.length > max ? `${s.slice(0, max - 1)}\u2026` : s;
|
|
@@ -6669,7 +6708,7 @@ var BrainDecisionLedger = class _BrainDecisionLedger {
|
|
|
6669
6708
|
this.dirReady = true;
|
|
6670
6709
|
}
|
|
6671
6710
|
await this.maybeRotate();
|
|
6672
|
-
await appendFile2(this.opts.filePath, line, "utf8");
|
|
6711
|
+
await appendFile2(this.opts.filePath, line, { encoding: "utf8", mode: SECRET_FILE_MODE });
|
|
6673
6712
|
}).catch(() => {
|
|
6674
6713
|
}).finally(() => {
|
|
6675
6714
|
this.pendingWriteCount = Math.max(0, this.pendingWriteCount - 1);
|
|
@@ -8092,17 +8131,98 @@ import { existsSync } from "node:fs";
|
|
|
8092
8131
|
import * as fs2 from "node:fs/promises";
|
|
8093
8132
|
import * as path5 from "node:path";
|
|
8094
8133
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
var
|
|
8134
|
+
|
|
8135
|
+
// src/skills/frontmatter.ts
|
|
8136
|
+
var SCALAR_KEYS = /* @__PURE__ */ new Set(["name", "description", "trigger", "version", "license", "compatibility"]);
|
|
8137
|
+
function parseSkillFrontmatter(raw) {
|
|
8138
|
+
const text = normalizeLineEndings(raw);
|
|
8139
|
+
if (!text.startsWith("---")) return {};
|
|
8140
|
+
const end = text.indexOf("\n---", 4);
|
|
8141
|
+
if (end === -1) return {};
|
|
8142
|
+
return parseFrontmatterBlock(text.slice(4, end));
|
|
8143
|
+
}
|
|
8098
8144
|
function stripFrontmatter(raw) {
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8145
|
+
const text = normalizeLineEndings(raw);
|
|
8146
|
+
if (!text.startsWith("---")) return text;
|
|
8147
|
+
const end = text.indexOf("\n---", 4);
|
|
8148
|
+
if (end === -1) return text;
|
|
8149
|
+
let body = text.slice(end + 4);
|
|
8103
8150
|
if (body.startsWith("\n")) body = body.slice(1);
|
|
8104
8151
|
return body;
|
|
8105
8152
|
}
|
|
8153
|
+
function normalizeLineEndings(s) {
|
|
8154
|
+
return s.replace(/\r\n?/g, "\n");
|
|
8155
|
+
}
|
|
8156
|
+
function parseFrontmatterBlock(block) {
|
|
8157
|
+
const out = {};
|
|
8158
|
+
const lines = block.split("\n");
|
|
8159
|
+
let i = 0;
|
|
8160
|
+
while (i < lines.length) {
|
|
8161
|
+
const line = lines[i] ?? "";
|
|
8162
|
+
const m = /^([a-zA-Z][a-zA-Z0-9_-]*):\s*(.*)$/.exec(line);
|
|
8163
|
+
if (!m) {
|
|
8164
|
+
i++;
|
|
8165
|
+
continue;
|
|
8166
|
+
}
|
|
8167
|
+
const key = m[1] ?? "";
|
|
8168
|
+
const rest = (m[2] ?? "").trim();
|
|
8169
|
+
if (key === "metadata") {
|
|
8170
|
+
const map = {};
|
|
8171
|
+
i++;
|
|
8172
|
+
while (i < lines.length) {
|
|
8173
|
+
const sub = lines[i] ?? "";
|
|
8174
|
+
const sm = /^\s+([a-zA-Z0-9_.-]+):\s*(.*)$/.exec(sub);
|
|
8175
|
+
if (!sm) break;
|
|
8176
|
+
map[sm[1] ?? ""] = unquote((sm[2] ?? "").trim());
|
|
8177
|
+
i++;
|
|
8178
|
+
}
|
|
8179
|
+
if (Object.keys(map).length > 0) out.metadata = map;
|
|
8180
|
+
continue;
|
|
8181
|
+
}
|
|
8182
|
+
if (rest === "|" || rest === ">") {
|
|
8183
|
+
const collected = [];
|
|
8184
|
+
i++;
|
|
8185
|
+
while (i < lines.length) {
|
|
8186
|
+
const sub = lines[i] ?? "";
|
|
8187
|
+
if (sub === "" || sub.startsWith(" ") || sub.startsWith(" ")) {
|
|
8188
|
+
collected.push(sub.replace(/^\s+/, ""));
|
|
8189
|
+
i++;
|
|
8190
|
+
} else break;
|
|
8191
|
+
}
|
|
8192
|
+
out[normalizeKey(key)] = collected.join("\n").trim();
|
|
8193
|
+
continue;
|
|
8194
|
+
}
|
|
8195
|
+
if (key === "allowed-tools" || key === "allowedTools") {
|
|
8196
|
+
out.allowedTools = rest.split(/[\s,]+/).filter(Boolean);
|
|
8197
|
+
i++;
|
|
8198
|
+
continue;
|
|
8199
|
+
}
|
|
8200
|
+
if (SCALAR_KEYS.has(key)) {
|
|
8201
|
+
out[key] = unquote(rest);
|
|
8202
|
+
i++;
|
|
8203
|
+
continue;
|
|
8204
|
+
}
|
|
8205
|
+
i++;
|
|
8206
|
+
}
|
|
8207
|
+
return out;
|
|
8208
|
+
}
|
|
8209
|
+
function normalizeKey(key) {
|
|
8210
|
+
return key === "allowed-tools" ? "allowedTools" : key;
|
|
8211
|
+
}
|
|
8212
|
+
function unquote(s) {
|
|
8213
|
+
if (s.length >= 2 && (s.startsWith('"') && s.endsWith('"') || s.startsWith("'") && s.endsWith("'"))) {
|
|
8214
|
+
return s.slice(1, -1);
|
|
8215
|
+
}
|
|
8216
|
+
return s;
|
|
8217
|
+
}
|
|
8218
|
+
function isValidSkillNameFormat(name) {
|
|
8219
|
+
return name.length >= 1 && name.length <= 64 && /^[a-z0-9]+(-[a-z0-9]+)*$/.test(name);
|
|
8220
|
+
}
|
|
8221
|
+
|
|
8222
|
+
// src/execution/design-kit-loader.ts
|
|
8223
|
+
var KIT_FILE = "KIT.md";
|
|
8224
|
+
var TOKENS_FILE = "tokens.json";
|
|
8225
|
+
var FOUNDATIONS_ID = "_foundations";
|
|
8106
8226
|
function parseList(value) {
|
|
8107
8227
|
const trimmed = value.trim();
|
|
8108
8228
|
const inner = trimmed.startsWith("[") && trimmed.endsWith("]") ? trimmed.slice(1, -1) : trimmed;
|
|
@@ -8924,15 +9044,18 @@ function buildRecoveryStrategies(opts) {
|
|
|
8924
9044
|
resolve8();
|
|
8925
9045
|
return;
|
|
8926
9046
|
}
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
|
|
8931
|
-
|
|
8932
|
-
|
|
8933
|
-
|
|
8934
|
-
|
|
8935
|
-
|
|
9047
|
+
let settled = false;
|
|
9048
|
+
let timer;
|
|
9049
|
+
const onAbort = () => finish();
|
|
9050
|
+
const finish = () => {
|
|
9051
|
+
if (settled) return;
|
|
9052
|
+
settled = true;
|
|
9053
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
9054
|
+
ctx.signal.removeEventListener("abort", onAbort);
|
|
9055
|
+
resolve8();
|
|
9056
|
+
};
|
|
9057
|
+
timer = setTimeout(finish, delay);
|
|
9058
|
+
ctx.signal.addEventListener("abort", onAbort, { once: true });
|
|
8936
9059
|
});
|
|
8937
9060
|
} else {
|
|
8938
9061
|
await new Promise((r) => setTimeout(r, delay));
|
|
@@ -10991,7 +11114,26 @@ var SubagentBudget = class _SubagentBudget {
|
|
|
10991
11114
|
var ToolCapabilities = {
|
|
10992
11115
|
/** Can execute arbitrary commands in the user's shell (the `bash` tool). */
|
|
10993
11116
|
SHELL_ARBITRARY: "shell.arbitrary",
|
|
10994
|
-
/**
|
|
11117
|
+
/**
|
|
11118
|
+
* Can execute the `exec` tool's allowlisted commands.
|
|
11119
|
+
*
|
|
11120
|
+
* "Restricted" describes the command NAME check, not the resulting power.
|
|
11121
|
+
* Treat this as equivalent to {@link SHELL_ARBITRARY} when deciding what to
|
|
11122
|
+
* grant: the allowlist includes general-purpose interpreters (`node`,
|
|
11123
|
+
* `python`, `perl`, `ruby`) and, on Windows, the platform shells (`cmd`,
|
|
11124
|
+
* `powershell`, `pwsh`) — deliberately, since without them `exec` cannot run
|
|
11125
|
+
* `dir`/`type`/any cmdlet. `node -e …` or `cmd /c …` therefore reaches
|
|
11126
|
+
* arbitrary execution, and per-argument denylisting cannot close that while
|
|
11127
|
+
* the shells remain (blocking `node -e` still leaves `cmd /c node -e`).
|
|
11128
|
+
*
|
|
11129
|
+
* What actually bounds this is downstream, not the name check: the permission
|
|
11130
|
+
* policy reconstructs the full command line and runs it through the
|
|
11131
|
+
* destructive classifier, so destructive calls still require confirmation.
|
|
11132
|
+
*
|
|
11133
|
+
* Granting `shell.restricted` while withholding `shell.arbitrary` therefore
|
|
11134
|
+
* buys no meaningful reduction in blast radius. Documented rather than
|
|
11135
|
+
* silently implied, because the two read as a narrow/wide pair (WS-083).
|
|
11136
|
+
*/
|
|
10995
11137
|
SHELL_RESTRICTED: "shell.restricted",
|
|
10996
11138
|
/** Can run a restricted project formatter/linter-style command. */
|
|
10997
11139
|
SHELL_EXEC: "shell.exec",
|
|
@@ -17091,84 +17233,6 @@ function resolveForeignToolIdsWithWarnings(opt) {
|
|
|
17091
17233
|
return { ids: FOREIGN_SKILL_TOOLS.map((t) => t.id), unknownIds: [] };
|
|
17092
17234
|
}
|
|
17093
17235
|
|
|
17094
|
-
// src/skills/frontmatter.ts
|
|
17095
|
-
var SCALAR_KEYS = /* @__PURE__ */ new Set(["name", "description", "version", "license", "compatibility"]);
|
|
17096
|
-
function parseSkillFrontmatter(raw) {
|
|
17097
|
-
const text = normalizeLineEndings(raw);
|
|
17098
|
-
if (!text.startsWith("---")) return {};
|
|
17099
|
-
const end = text.indexOf("\n---", 4);
|
|
17100
|
-
if (end === -1) return {};
|
|
17101
|
-
return parseFrontmatterBlock(text.slice(4, end));
|
|
17102
|
-
}
|
|
17103
|
-
function normalizeLineEndings(s) {
|
|
17104
|
-
return s.replace(/\r\n?/g, "\n");
|
|
17105
|
-
}
|
|
17106
|
-
function parseFrontmatterBlock(block) {
|
|
17107
|
-
const out = {};
|
|
17108
|
-
const lines = block.split("\n");
|
|
17109
|
-
let i = 0;
|
|
17110
|
-
while (i < lines.length) {
|
|
17111
|
-
const line = lines[i] ?? "";
|
|
17112
|
-
const m = /^([a-zA-Z][a-zA-Z0-9_-]*):\s*(.*)$/.exec(line);
|
|
17113
|
-
if (!m) {
|
|
17114
|
-
i++;
|
|
17115
|
-
continue;
|
|
17116
|
-
}
|
|
17117
|
-
const key = m[1] ?? "";
|
|
17118
|
-
const rest = (m[2] ?? "").trim();
|
|
17119
|
-
if (key === "metadata") {
|
|
17120
|
-
const map = {};
|
|
17121
|
-
i++;
|
|
17122
|
-
while (i < lines.length) {
|
|
17123
|
-
const sub = lines[i] ?? "";
|
|
17124
|
-
const sm = /^\s+([a-zA-Z0-9_.-]+):\s*(.*)$/.exec(sub);
|
|
17125
|
-
if (!sm) break;
|
|
17126
|
-
map[sm[1] ?? ""] = unquote((sm[2] ?? "").trim());
|
|
17127
|
-
i++;
|
|
17128
|
-
}
|
|
17129
|
-
if (Object.keys(map).length > 0) out.metadata = map;
|
|
17130
|
-
continue;
|
|
17131
|
-
}
|
|
17132
|
-
if (rest === "|" || rest === ">") {
|
|
17133
|
-
const collected = [];
|
|
17134
|
-
i++;
|
|
17135
|
-
while (i < lines.length) {
|
|
17136
|
-
const sub = lines[i] ?? "";
|
|
17137
|
-
if (sub === "" || sub.startsWith(" ") || sub.startsWith(" ")) {
|
|
17138
|
-
collected.push(sub.replace(/^\s+/, ""));
|
|
17139
|
-
i++;
|
|
17140
|
-
} else break;
|
|
17141
|
-
}
|
|
17142
|
-
out[normalizeKey(key)] = collected.join("\n").trim();
|
|
17143
|
-
continue;
|
|
17144
|
-
}
|
|
17145
|
-
if (key === "allowed-tools" || key === "allowedTools") {
|
|
17146
|
-
out.allowedTools = rest.split(/[\s,]+/).filter(Boolean);
|
|
17147
|
-
i++;
|
|
17148
|
-
continue;
|
|
17149
|
-
}
|
|
17150
|
-
if (SCALAR_KEYS.has(key)) {
|
|
17151
|
-
out[key] = unquote(rest);
|
|
17152
|
-
i++;
|
|
17153
|
-
continue;
|
|
17154
|
-
}
|
|
17155
|
-
i++;
|
|
17156
|
-
}
|
|
17157
|
-
return out;
|
|
17158
|
-
}
|
|
17159
|
-
function normalizeKey(key) {
|
|
17160
|
-
return key === "allowed-tools" ? "allowedTools" : key;
|
|
17161
|
-
}
|
|
17162
|
-
function unquote(s) {
|
|
17163
|
-
if (s.length >= 2 && (s.startsWith('"') && s.endsWith('"') || s.startsWith("'") && s.endsWith("'"))) {
|
|
17164
|
-
return s.slice(1, -1);
|
|
17165
|
-
}
|
|
17166
|
-
return s;
|
|
17167
|
-
}
|
|
17168
|
-
function isValidSkillNameFormat(name) {
|
|
17169
|
-
return name.length >= 1 && name.length <= 64 && /^[a-z0-9]+(-[a-z0-9]+)*$/.test(name);
|
|
17170
|
-
}
|
|
17171
|
-
|
|
17172
17236
|
// src/skills/limits.ts
|
|
17173
17237
|
var SKILL_LIMITS = {
|
|
17174
17238
|
/**
|
|
@@ -17210,6 +17274,14 @@ var SKILL_LIMITS = {
|
|
|
17210
17274
|
* Consumer: `downloadGitHubTarball`.
|
|
17211
17275
|
*/
|
|
17212
17276
|
MAX_TARBALL_SIZE: 50 * 1024 * 1024,
|
|
17277
|
+
/**
|
|
17278
|
+
* Maximum size of a GitHub skill tarball after gzip decompression. The
|
|
17279
|
+
* compressed download limit alone does not protect against highly
|
|
17280
|
+
* compressible archives expanding until the process runs out of memory.
|
|
17281
|
+
*
|
|
17282
|
+
* Consumer: `downloadGitHubTarball`.
|
|
17283
|
+
*/
|
|
17284
|
+
MAX_UNCOMPRESSED_TARBALL_SIZE: 64 * 1024 * 1024,
|
|
17213
17285
|
/**
|
|
17214
17286
|
* Default total char budget for skill bodies injected in eager mode when
|
|
17215
17287
|
* `config.skills.eagerMaxChars` is unset. ~6k tokens. Skills are injected
|
|
@@ -17221,6 +17293,17 @@ var SKILL_LIMITS = {
|
|
|
17221
17293
|
* `skillEagerMaxChars`).
|
|
17222
17294
|
*/
|
|
17223
17295
|
EAGER_DEFAULT_MAX_CHARS: 24e3,
|
|
17296
|
+
/**
|
|
17297
|
+
* Default total char budget for compact (token-saving) skill bodies injected
|
|
17298
|
+
* by `buildCompactSkillBodiesText`. Mirrors the eager ceiling so compact mode
|
|
17299
|
+
* can never inject more total skill text than eager mode. Before this bound
|
|
17300
|
+
* existed, compact mode injected EVERY skill's compact body with no cap, so
|
|
17301
|
+
* the section grew linearly with the number of installed skills. Skills past
|
|
17302
|
+
* the budget overflow to a name list the agent loads via the `skill` tool.
|
|
17303
|
+
*
|
|
17304
|
+
* Consumer: `buildCompactSkillBodiesText` (default for its `budget` param).
|
|
17305
|
+
*/
|
|
17306
|
+
COMPACT_DEFAULT_MAX_CHARS: 24e3,
|
|
17224
17307
|
/**
|
|
17225
17308
|
* Auto-compact body limits (the token-saving fallback used when a skill has
|
|
17226
17309
|
* no hand-crafted `SKILL.save.md`). The Overview and Rules sections are
|
|
@@ -17250,14 +17333,6 @@ var SKILL_LIMITS = {
|
|
|
17250
17333
|
};
|
|
17251
17334
|
|
|
17252
17335
|
// src/execution/skill-loader.ts
|
|
17253
|
-
function stripFrontmatter2(raw) {
|
|
17254
|
-
if (!raw.startsWith("---")) return raw;
|
|
17255
|
-
const end = raw.indexOf("\n---", 4);
|
|
17256
|
-
if (end === -1) return raw;
|
|
17257
|
-
let body = raw.slice(end + 4);
|
|
17258
|
-
if (body.startsWith("\n")) body = body.slice(1);
|
|
17259
|
-
return body;
|
|
17260
|
-
}
|
|
17261
17336
|
function compactSkillBody(body) {
|
|
17262
17337
|
const sections = [];
|
|
17263
17338
|
const overviewMatch = body.match(/##\s*Overview\s*\n([\s\S]*?)(?=\n##|\n$|$)/i);
|
|
@@ -17296,6 +17371,9 @@ var DefaultSkillLoader = class {
|
|
|
17296
17371
|
cache;
|
|
17297
17372
|
entriesCache;
|
|
17298
17373
|
bodyCache = /* @__PURE__ */ new Map();
|
|
17374
|
+
/** Load-time diagnostics from the most recent full `list()` scan. */
|
|
17375
|
+
skipped = [];
|
|
17376
|
+
shadowed = [];
|
|
17299
17377
|
constructor(opts) {
|
|
17300
17378
|
const readClaude = opts.readClaudeSkills !== false;
|
|
17301
17379
|
const foreignIds = resolveForeignToolIds(opts.foreignSources);
|
|
@@ -17325,6 +17403,9 @@ var DefaultSkillLoader = class {
|
|
|
17325
17403
|
if (this.cache) return this.cache;
|
|
17326
17404
|
const found = [];
|
|
17327
17405
|
const seen = /* @__PURE__ */ new Set();
|
|
17406
|
+
const claimedBy = /* @__PURE__ */ new Map();
|
|
17407
|
+
this.skipped = [];
|
|
17408
|
+
this.shadowed = [];
|
|
17328
17409
|
for (const { dir, source, originTool } of this.dirs) {
|
|
17329
17410
|
try {
|
|
17330
17411
|
const entries = (await fs4.readdir(dir, { withFileTypes: true })).sort(
|
|
@@ -17333,27 +17414,61 @@ var DefaultSkillLoader = class {
|
|
|
17333
17414
|
for (const e of entries) {
|
|
17334
17415
|
if (!await entryIsDirectory(dir, e)) continue;
|
|
17335
17416
|
const skillFile = path11.join(dir, e.name, "SKILL.md");
|
|
17417
|
+
let raw;
|
|
17336
17418
|
try {
|
|
17337
|
-
|
|
17338
|
-
|
|
17339
|
-
|
|
17340
|
-
|
|
17341
|
-
|
|
17342
|
-
|
|
17343
|
-
|
|
17419
|
+
raw = await fs4.readFile(skillFile, "utf8");
|
|
17420
|
+
} catch {
|
|
17421
|
+
continue;
|
|
17422
|
+
}
|
|
17423
|
+
const fm = parseSkillFrontmatter(raw);
|
|
17424
|
+
if (!fm.name) {
|
|
17425
|
+
this.skipped.push({ dir, entry: e.name, reason: "missing-name" });
|
|
17426
|
+
continue;
|
|
17427
|
+
}
|
|
17428
|
+
if (!fm.description) {
|
|
17429
|
+
this.skipped.push({
|
|
17430
|
+
dir,
|
|
17431
|
+
entry: e.name,
|
|
17432
|
+
reason: "missing-description",
|
|
17433
|
+
name: fm.name
|
|
17434
|
+
});
|
|
17435
|
+
continue;
|
|
17436
|
+
}
|
|
17437
|
+
if (!isValidSkillNameFormat(fm.name)) {
|
|
17438
|
+
this.skipped.push({
|
|
17439
|
+
dir,
|
|
17440
|
+
entry: e.name,
|
|
17441
|
+
reason: "invalid-name-format",
|
|
17442
|
+
name: fm.name
|
|
17443
|
+
});
|
|
17444
|
+
continue;
|
|
17445
|
+
}
|
|
17446
|
+
if (seen.has(fm.name)) {
|
|
17447
|
+
const claimant = claimedBy.get(fm.name);
|
|
17448
|
+
this.shadowed.push({
|
|
17344
17449
|
name: fm.name,
|
|
17345
|
-
description: fm.description,
|
|
17346
|
-
version: fm.version,
|
|
17347
|
-
license: fm.license,
|
|
17348
|
-
compatibility: fm.compatibility,
|
|
17349
|
-
metadata: fm.metadata,
|
|
17350
|
-
allowedTools: fm.allowedTools,
|
|
17351
|
-
path: skillFile,
|
|
17352
17450
|
source,
|
|
17353
|
-
|
|
17451
|
+
path: skillFile,
|
|
17452
|
+
shadowedBy: claimant?.source ?? "unknown",
|
|
17453
|
+
shadowedByPath: claimant?.path
|
|
17354
17454
|
});
|
|
17355
|
-
|
|
17455
|
+
continue;
|
|
17356
17456
|
}
|
|
17457
|
+
seen.add(fm.name);
|
|
17458
|
+
claimedBy.set(fm.name, { source, path: skillFile });
|
|
17459
|
+
found.push({
|
|
17460
|
+
name: fm.name,
|
|
17461
|
+
description: fm.description,
|
|
17462
|
+
trigger: fm.trigger,
|
|
17463
|
+
version: fm.version,
|
|
17464
|
+
license: fm.license,
|
|
17465
|
+
compatibility: fm.compatibility,
|
|
17466
|
+
metadata: fm.metadata,
|
|
17467
|
+
allowedTools: fm.allowedTools,
|
|
17468
|
+
path: skillFile,
|
|
17469
|
+
source,
|
|
17470
|
+
originTool
|
|
17471
|
+
});
|
|
17357
17472
|
}
|
|
17358
17473
|
} catch {
|
|
17359
17474
|
}
|
|
@@ -17382,11 +17497,12 @@ var DefaultSkillLoader = class {
|
|
|
17382
17497
|
const skills = await this.list();
|
|
17383
17498
|
const entries = [];
|
|
17384
17499
|
for (const s of skills) {
|
|
17385
|
-
const
|
|
17500
|
+
const parsed = parseDescriptionFromText(s.description ?? "");
|
|
17501
|
+
const trigger = s.trigger?.trim() || parsed.trigger;
|
|
17386
17502
|
entries.push({
|
|
17387
17503
|
name: s.name,
|
|
17388
17504
|
trigger,
|
|
17389
|
-
scope,
|
|
17505
|
+
scope: parsed.scope,
|
|
17390
17506
|
source: s.source,
|
|
17391
17507
|
originTool: s.originTool,
|
|
17392
17508
|
path: s.path
|
|
@@ -17399,6 +17515,16 @@ var DefaultSkillLoader = class {
|
|
|
17399
17515
|
this.cache = void 0;
|
|
17400
17516
|
this.entriesCache = void 0;
|
|
17401
17517
|
this.bodyCache.clear();
|
|
17518
|
+
this.skipped = [];
|
|
17519
|
+
this.shadowed = [];
|
|
17520
|
+
}
|
|
17521
|
+
/**
|
|
17522
|
+
* Load-time diagnostics from the most recent full `list()` scan: skills
|
|
17523
|
+
* skipped as malformed and skills shadowed by a higher-priority layer.
|
|
17524
|
+
* Returns copies so callers cannot mutate internal state.
|
|
17525
|
+
*/
|
|
17526
|
+
diagnostics() {
|
|
17527
|
+
return { skipped: [...this.skipped], shadowed: [...this.shadowed] };
|
|
17402
17528
|
}
|
|
17403
17529
|
async readBody(name) {
|
|
17404
17530
|
const key = name.toLowerCase();
|
|
@@ -17422,7 +17548,7 @@ var DefaultSkillLoader = class {
|
|
|
17422
17548
|
result = await fs4.readFile(savePath, "utf8");
|
|
17423
17549
|
} catch {
|
|
17424
17550
|
const full = await fs4.readFile(m.path, "utf8");
|
|
17425
|
-
const body =
|
|
17551
|
+
const body = stripFrontmatter(full);
|
|
17426
17552
|
const compact = compactSkillBody(body);
|
|
17427
17553
|
if (compact) {
|
|
17428
17554
|
result = `## Overview
|
|
@@ -18119,12 +18245,38 @@ function createToolOutputSerializer(opts = {}) {
|
|
|
18119
18245
|
return { text: "[truncated: iteration output cap exceeded]", newBudget: 0 };
|
|
18120
18246
|
}
|
|
18121
18247
|
const half = Math.floor(available / 2);
|
|
18122
|
-
const first = text
|
|
18123
|
-
const second =
|
|
18248
|
+
const first = utf8Prefix(text, half);
|
|
18249
|
+
const second = utf8Suffix(text, available - Buffer.byteLength(first, "utf8"));
|
|
18124
18250
|
return { text: `${first}${marker}${second}`, newBudget: 0 };
|
|
18125
18251
|
}
|
|
18126
18252
|
return { serialize, enforceCap, capBytes };
|
|
18127
18253
|
}
|
|
18254
|
+
function utf8Prefix(text, maxBytes) {
|
|
18255
|
+
if (maxBytes <= 0) return "";
|
|
18256
|
+
let low = 0;
|
|
18257
|
+
let high = text.length;
|
|
18258
|
+
while (low < high) {
|
|
18259
|
+
const mid = Math.ceil((low + high) / 2);
|
|
18260
|
+
if (Buffer.byteLength(text.slice(0, mid), "utf8") <= maxBytes) low = mid;
|
|
18261
|
+
else high = mid - 1;
|
|
18262
|
+
}
|
|
18263
|
+
let end = low;
|
|
18264
|
+
if (end > 0 && /[\uD800-\uDBFF]/.test(text[end - 1])) end--;
|
|
18265
|
+
return text.slice(0, end);
|
|
18266
|
+
}
|
|
18267
|
+
function utf8Suffix(text, maxBytes) {
|
|
18268
|
+
if (maxBytes <= 0) return "";
|
|
18269
|
+
let low = 0;
|
|
18270
|
+
let high = text.length;
|
|
18271
|
+
while (low < high) {
|
|
18272
|
+
const chars = Math.ceil((low + high) / 2);
|
|
18273
|
+
if (Buffer.byteLength(text.slice(text.length - chars), "utf8") <= maxBytes) low = chars;
|
|
18274
|
+
else high = chars - 1;
|
|
18275
|
+
}
|
|
18276
|
+
let start = text.length - low;
|
|
18277
|
+
if (start < text.length && /[\uDC00-\uDFFF]/.test(text[start])) start++;
|
|
18278
|
+
return text.slice(start);
|
|
18279
|
+
}
|
|
18128
18280
|
function renderToolObject(toolName, obj, input) {
|
|
18129
18281
|
if (toolName === "read" && typeof obj["text"] === "string") {
|
|
18130
18282
|
return joinSections([
|
|
@@ -18749,13 +18901,43 @@ function normalizePathSubject(value) {
|
|
|
18749
18901
|
function isPathSubjectKey(subjectKey) {
|
|
18750
18902
|
return subjectKey === "path" || subjectKey === "file" || subjectKey === "files";
|
|
18751
18903
|
}
|
|
18904
|
+
function renderCommandLine(command, args) {
|
|
18905
|
+
if (!Array.isArray(args) || args.length === 0) return command;
|
|
18906
|
+
const rendered = args.map((arg) => {
|
|
18907
|
+
const str = String(arg);
|
|
18908
|
+
return /\s/.test(str) ? `"${str.replace(/"/g, '\\"')}"` : str;
|
|
18909
|
+
});
|
|
18910
|
+
return [command, ...rendered].join(" ");
|
|
18911
|
+
}
|
|
18752
18912
|
function subjectForToolInput(toolName, input, subjectKey) {
|
|
18753
18913
|
if (!input || typeof input !== "object") return void 0;
|
|
18754
18914
|
const obj = input;
|
|
18755
18915
|
if (subjectKey) {
|
|
18756
18916
|
const value = obj[subjectKey];
|
|
18757
18917
|
if (typeof value === "string") {
|
|
18758
|
-
|
|
18918
|
+
if (isPathSubjectKey(subjectKey)) {
|
|
18919
|
+
const normalized = normalizePathSubject(value);
|
|
18920
|
+
if (subjectKey === "files" && obj["check"] === true) return `${normalized}:check`;
|
|
18921
|
+
if (subjectKey === "files" && obj["dry_run"] === true) return `${normalized}:dry-run`;
|
|
18922
|
+
return normalized;
|
|
18923
|
+
}
|
|
18924
|
+
if (subjectKey === "command") {
|
|
18925
|
+
const rendered = renderCommandLine(value, obj["args"]);
|
|
18926
|
+
if (value === "commit" && obj["dry_run"] === true) {
|
|
18927
|
+
return `${escapeGlobSubject(rendered)}:dry-run`;
|
|
18928
|
+
}
|
|
18929
|
+
return escapeGlobSubject(rendered);
|
|
18930
|
+
}
|
|
18931
|
+
if (subjectKey === "directory" && obj["dry_run"] === true) {
|
|
18932
|
+
return `${escapeGlobSubject(value)}:dry-run`;
|
|
18933
|
+
}
|
|
18934
|
+
if (subjectKey === "packages" && obj["dry_run"] === true) {
|
|
18935
|
+
return `${escapeGlobSubject(value)}:dry-run`;
|
|
18936
|
+
}
|
|
18937
|
+
if (subjectKey === "name" && obj["dry_run"] === true) {
|
|
18938
|
+
return `${escapeGlobSubject(value)}:dry-run`;
|
|
18939
|
+
}
|
|
18940
|
+
return escapeGlobSubject(value);
|
|
18759
18941
|
}
|
|
18760
18942
|
}
|
|
18761
18943
|
if (toolName === "bash" && typeof obj.command === "string") {
|
|
@@ -18888,26 +19070,24 @@ function readPolicy(ctx) {
|
|
|
18888
19070
|
|
|
18889
19071
|
// src/execution/tool-executor.ts
|
|
18890
19072
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
19073
|
+
import * as fs8 from "node:fs/promises";
|
|
19074
|
+
import * as path16 from "node:path";
|
|
19075
|
+
import { isDeepStrictEqual } from "node:util";
|
|
18891
19076
|
|
|
18892
|
-
// src/observability/
|
|
19077
|
+
// src/observability/network-telemetry.ts
|
|
18893
19078
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
18894
19079
|
var storage = new AsyncLocalStorage();
|
|
18895
|
-
function
|
|
19080
|
+
function runWithNetworkTelemetry(context, run) {
|
|
18896
19081
|
return storage.run(context, run);
|
|
18897
19082
|
}
|
|
18898
19083
|
|
|
18899
|
-
// src/observability/
|
|
19084
|
+
// src/observability/process-telemetry.ts
|
|
18900
19085
|
import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
|
|
18901
19086
|
var storage2 = new AsyncLocalStorage2();
|
|
18902
|
-
function
|
|
19087
|
+
function runWithProcessTelemetry(context, run) {
|
|
18903
19088
|
return storage2.run(context, run);
|
|
18904
19089
|
}
|
|
18905
19090
|
|
|
18906
|
-
// src/execution/tool-executor.ts
|
|
18907
|
-
import { isDeepStrictEqual } from "node:util";
|
|
18908
|
-
import * as fs8 from "node:fs/promises";
|
|
18909
|
-
import * as path16 from "node:path";
|
|
18910
|
-
|
|
18911
19091
|
// src/security/kanban-boundary.ts
|
|
18912
19092
|
import { realpath } from "node:fs/promises";
|
|
18913
19093
|
import * as path14 from "node:path";
|
|
@@ -19275,47 +19455,6 @@ function sliceUtf8Suffix(text, maxBytes) {
|
|
|
19275
19455
|
return text.slice(start);
|
|
19276
19456
|
}
|
|
19277
19457
|
|
|
19278
|
-
// src/execution/tool-executor-results.ts
|
|
19279
|
-
function unknownToolResult(use, listFns) {
|
|
19280
|
-
return {
|
|
19281
|
-
type: "tool_result",
|
|
19282
|
-
tool_use_id: use.id,
|
|
19283
|
-
content: `Tool "${use.name}" is not registered. Available tools: ${listFns().join(", ")}`,
|
|
19284
|
-
is_error: true
|
|
19285
|
-
};
|
|
19286
|
-
}
|
|
19287
|
-
function malformedInputResult(use, raw) {
|
|
19288
|
-
let content = `Tool "${use.name}" received arguments that were not a valid JSON object, so they could not be parsed. Re-issue the call with the arguments encoded as a single well-formed JSON object matching the tool's input schema.`;
|
|
19289
|
-
if (raw) {
|
|
19290
|
-
const max = 800;
|
|
19291
|
-
const excerpt = raw.length > max ? `${raw.slice(0, max)}\u2026 (truncated, ${raw.length} chars total)` : raw;
|
|
19292
|
-
content += ` Common cause: a string field (e.g. code in old_string/new_string) contains literal newlines, quotes, or backslashes that must be JSON-escaped, or the payload was cut off mid-stream. The raw arguments received were:
|
|
19293
|
-
${excerpt}`;
|
|
19294
|
-
}
|
|
19295
|
-
return {
|
|
19296
|
-
type: "tool_result",
|
|
19297
|
-
tool_use_id: use.id,
|
|
19298
|
-
content,
|
|
19299
|
-
is_error: true
|
|
19300
|
-
};
|
|
19301
|
-
}
|
|
19302
|
-
function deniedResult(use, reason) {
|
|
19303
|
-
return {
|
|
19304
|
-
type: "tool_result",
|
|
19305
|
-
tool_use_id: use.id,
|
|
19306
|
-
content: `Tool "${use.name}" denied: ${reason ?? "policy"}`,
|
|
19307
|
-
is_error: true
|
|
19308
|
-
};
|
|
19309
|
-
}
|
|
19310
|
-
function blockedByHookResult(use, reason) {
|
|
19311
|
-
return {
|
|
19312
|
-
type: "tool_result",
|
|
19313
|
-
tool_use_id: use.id,
|
|
19314
|
-
content: `Tool "${use.name}" was blocked by a PreToolUse hook: ${reason ?? "no reason given"}`,
|
|
19315
|
-
is_error: true
|
|
19316
|
-
};
|
|
19317
|
-
}
|
|
19318
|
-
|
|
19319
19458
|
// src/execution/tool-executor-logging.ts
|
|
19320
19459
|
function toolLogBase(ctx, use, toolName, durationMs) {
|
|
19321
19460
|
return {
|
|
@@ -19380,6 +19519,82 @@ function logToolFailure(opts, ctx, use, toolName, durationMs, err) {
|
|
|
19380
19519
|
});
|
|
19381
19520
|
}
|
|
19382
19521
|
|
|
19522
|
+
// src/execution/tool-executor-results.ts
|
|
19523
|
+
function unknownToolResult(use, listFns) {
|
|
19524
|
+
return {
|
|
19525
|
+
type: "tool_result",
|
|
19526
|
+
tool_use_id: use.id,
|
|
19527
|
+
content: `Tool "${use.name}" is not registered. Available tools: ${listFns().join(", ")}`,
|
|
19528
|
+
is_error: true
|
|
19529
|
+
};
|
|
19530
|
+
}
|
|
19531
|
+
function malformedInputResult(use, raw) {
|
|
19532
|
+
let content = `Tool "${use.name}" received arguments that were not a valid JSON object, so they could not be parsed. Re-issue the call with the arguments encoded as a single well-formed JSON object matching the tool's input schema.`;
|
|
19533
|
+
if (raw) {
|
|
19534
|
+
const max = 800;
|
|
19535
|
+
const excerpt = raw.length > max ? `${raw.slice(0, max)}\u2026 (truncated, ${raw.length} chars total)` : raw;
|
|
19536
|
+
content += ` Common cause: a string field (e.g. code in old_string/new_string) contains literal newlines, quotes, or backslashes that must be JSON-escaped, or the payload was cut off mid-stream. The raw arguments received were:
|
|
19537
|
+
${excerpt}`;
|
|
19538
|
+
}
|
|
19539
|
+
return {
|
|
19540
|
+
type: "tool_result",
|
|
19541
|
+
tool_use_id: use.id,
|
|
19542
|
+
content,
|
|
19543
|
+
is_error: true
|
|
19544
|
+
};
|
|
19545
|
+
}
|
|
19546
|
+
function deniedResult(use, reason) {
|
|
19547
|
+
return {
|
|
19548
|
+
type: "tool_result",
|
|
19549
|
+
tool_use_id: use.id,
|
|
19550
|
+
content: `Tool "${use.name}" denied: ${reason ?? "policy"}`,
|
|
19551
|
+
is_error: true
|
|
19552
|
+
};
|
|
19553
|
+
}
|
|
19554
|
+
function blockedByHookResult(use, reason) {
|
|
19555
|
+
return {
|
|
19556
|
+
type: "tool_result",
|
|
19557
|
+
tool_use_id: use.id,
|
|
19558
|
+
content: `Tool "${use.name}" was blocked by a PreToolUse hook: ${reason ?? "no reason given"}`,
|
|
19559
|
+
is_error: true
|
|
19560
|
+
};
|
|
19561
|
+
}
|
|
19562
|
+
|
|
19563
|
+
// src/execution/tool-error-taxonomy.ts
|
|
19564
|
+
function toolErrorResult(use, err, opts = {}) {
|
|
19565
|
+
const { category, retryable, detail } = classifyToolError(err);
|
|
19566
|
+
const rawMessage = err instanceof Error ? err.message : typeof err === "string" ? err : "Unknown error";
|
|
19567
|
+
const userMessage = opts.scrubber ? opts.scrubber(rawMessage) : rawMessage;
|
|
19568
|
+
const info = {
|
|
19569
|
+
category,
|
|
19570
|
+
retryable,
|
|
19571
|
+
userMessage,
|
|
19572
|
+
...detail !== void 0 ? { detail } : {}
|
|
19573
|
+
};
|
|
19574
|
+
const prefix = formatErrorPrefix(category, retryable);
|
|
19575
|
+
const detailSuffix = detail ? ` [${detail}]` : "";
|
|
19576
|
+
return {
|
|
19577
|
+
type: "tool_result",
|
|
19578
|
+
tool_use_id: use.id,
|
|
19579
|
+
content: `${prefix}: ${userMessage}${detailSuffix}`,
|
|
19580
|
+
is_error: true,
|
|
19581
|
+
// Attach structured info for programmatic consumers (retry logic,
|
|
19582
|
+
// audit log, observability).
|
|
19583
|
+
_toolErrorInfo: info
|
|
19584
|
+
};
|
|
19585
|
+
}
|
|
19586
|
+
function formatErrorPrefix(category, retryable) {
|
|
19587
|
+
const label = CATEGORY_LABELS[category] ?? "Error";
|
|
19588
|
+
return retryable ? `${label} (retryable)` : label;
|
|
19589
|
+
}
|
|
19590
|
+
var CATEGORY_LABELS = {
|
|
19591
|
+
["transient" /* TRANSIENT */]: "Transient error",
|
|
19592
|
+
["not_found" /* NOT_FOUND */]: "Not found",
|
|
19593
|
+
["permission" /* PERMISSION */]: "Permission denied",
|
|
19594
|
+
["validation" /* VALIDATION */]: "Validation error",
|
|
19595
|
+
["fatal" /* FATAL */]: "Error"
|
|
19596
|
+
};
|
|
19597
|
+
|
|
19383
19598
|
// src/execution/tool-executor-stream.ts
|
|
19384
19599
|
async function executeStreamedTool({
|
|
19385
19600
|
tool,
|
|
@@ -19480,12 +19695,27 @@ ${progressTail}` : progressTail;
|
|
|
19480
19695
|
}
|
|
19481
19696
|
|
|
19482
19697
|
// src/execution/tool-executor.ts
|
|
19698
|
+
async function mapWithConcurrency(items, limit, run) {
|
|
19699
|
+
if (items.length === 0) return [];
|
|
19700
|
+
const results = new Array(items.length);
|
|
19701
|
+
let nextIndex = 0;
|
|
19702
|
+
const worker = async () => {
|
|
19703
|
+
while (nextIndex < items.length) {
|
|
19704
|
+
const index = nextIndex++;
|
|
19705
|
+
results[index] = await run(items[index]);
|
|
19706
|
+
}
|
|
19707
|
+
};
|
|
19708
|
+
await Promise.all(Array.from({ length: Math.min(limit, items.length) }, () => worker()));
|
|
19709
|
+
return results;
|
|
19710
|
+
}
|
|
19483
19711
|
var ToolExecutor = class _ToolExecutor {
|
|
19484
19712
|
constructor(registry, opts) {
|
|
19485
19713
|
this.registry = registry;
|
|
19486
19714
|
this.opts = opts;
|
|
19487
19715
|
this.iterationTimeoutMs = opts.iterationTimeoutMs ?? 3e5;
|
|
19488
19716
|
this.maxToolTimeoutMs = opts.maxToolTimeoutMs ?? 3e5;
|
|
19717
|
+
const requestedParallelism = opts.maxParallelTools ?? 4;
|
|
19718
|
+
this.maxParallelTools = Number.isFinite(requestedParallelism) ? Math.max(1, Math.min(16, Math.floor(requestedParallelism))) : 4;
|
|
19489
19719
|
this.serializer = createToolOutputSerializer({
|
|
19490
19720
|
perIterationOutputCapBytes: opts.perIterationOutputCapBytes ?? 1e5
|
|
19491
19721
|
});
|
|
@@ -19501,6 +19731,7 @@ var ToolExecutor = class _ToolExecutor {
|
|
|
19501
19731
|
serializer;
|
|
19502
19732
|
iterationTimeoutMs;
|
|
19503
19733
|
maxToolTimeoutMs;
|
|
19734
|
+
maxParallelTools;
|
|
19504
19735
|
/**
|
|
19505
19736
|
* Clear the interactive confirm awaiter so the executor returns
|
|
19506
19737
|
* `ToolConfirmPendingResult` instead of blocking on stdin. Used by
|
|
@@ -19828,12 +20059,9 @@ ${post.additionalContext}`;
|
|
|
19828
20059
|
const { category, retryable, detail } = classifyToolError(err);
|
|
19829
20060
|
this.hintRenderMode(tool.name);
|
|
19830
20061
|
this.opts.renderer?.writeToolResult(tool.name, scrubbed, true);
|
|
19831
|
-
const result = {
|
|
19832
|
-
|
|
19833
|
-
|
|
19834
|
-
content: `Tool "${tool.name}" threw: ${scrubbed}`,
|
|
19835
|
-
is_error: true
|
|
19836
|
-
};
|
|
20062
|
+
const result = toolErrorResult(use, err, {
|
|
20063
|
+
scrubber: (s) => this.opts.secretScrubber.scrub(s)
|
|
20064
|
+
});
|
|
19837
20065
|
budget = this.budgetForString(result.content, budget);
|
|
19838
20066
|
if (err instanceof Error) span?.recordError(err);
|
|
19839
20067
|
span?.setAttribute("tool.is_error", true);
|
|
@@ -19853,21 +20081,17 @@ ${post.additionalContext}`;
|
|
|
19853
20081
|
const isStructured = isWrongStackError(err);
|
|
19854
20082
|
const msg = isStructured ? err.describe() : toErrorMessage(err);
|
|
19855
20083
|
const scrubbed = this.opts.secretScrubber.scrub(msg);
|
|
19856
|
-
const { category, retryable, detail } = classifyToolError(err);
|
|
19857
20084
|
const tool = this.registry.get(use.name);
|
|
19858
20085
|
const toolName = tool?.name ?? use.name;
|
|
19859
20086
|
this.hintRenderMode(toolName);
|
|
19860
20087
|
this.opts.renderer?.writeToolResult(toolName, scrubbed, true);
|
|
19861
|
-
const result = {
|
|
19862
|
-
|
|
19863
|
-
|
|
19864
|
-
|
|
19865
|
-
|
|
19866
|
-
}
|
|
20088
|
+
const result = toolErrorResult(use, err, {
|
|
20089
|
+
scrubber: (s) => this.opts.secretScrubber.scrub(s)
|
|
20090
|
+
});
|
|
20091
|
+
if (isStructured) {
|
|
20092
|
+
result.content = scrubbed;
|
|
20093
|
+
}
|
|
19867
20094
|
budget = this.budgetForString(result.content, budget);
|
|
19868
|
-
void category;
|
|
19869
|
-
void retryable;
|
|
19870
|
-
void detail;
|
|
19871
20095
|
return { result, tool, durationMs: 0 };
|
|
19872
20096
|
}
|
|
19873
20097
|
};
|
|
@@ -19879,7 +20103,7 @@ ${post.additionalContext}`;
|
|
|
19879
20103
|
return { outputs, remainingBudget: budget };
|
|
19880
20104
|
}
|
|
19881
20105
|
if (strategy === "parallel") {
|
|
19882
|
-
const outputs = await
|
|
20106
|
+
const outputs = await mapWithConcurrency(toolUses, this.maxParallelTools, safeRun);
|
|
19883
20107
|
return { outputs, remainingBudget: budget };
|
|
19884
20108
|
}
|
|
19885
20109
|
const nonMutating = [];
|
|
@@ -19890,7 +20114,7 @@ ${post.additionalContext}`;
|
|
|
19890
20114
|
if (tool?.mutating) mutating.push(use);
|
|
19891
20115
|
else nonMutating.push(use);
|
|
19892
20116
|
}
|
|
19893
|
-
const firstPass = await
|
|
20117
|
+
const firstPass = await mapWithConcurrency(nonMutating, this.maxParallelTools, safeRun);
|
|
19894
20118
|
const secondPass = [];
|
|
19895
20119
|
for (const use of mutating) {
|
|
19896
20120
|
secondPass.push(await safeRun(use));
|
|
@@ -20025,25 +20249,28 @@ ${post.additionalContext}`;
|
|
|
20025
20249
|
let output;
|
|
20026
20250
|
const execute = () => typeof tool.executeStream === "function" ? this.runStreamedTool(tool, input, ctx, combined, toolUseId) : (async () => tool.execute(input, ctx, { signal: combined }))();
|
|
20027
20251
|
const telemetryToolCallId = toolUseId ?? `nested-${randomUUID4()}`;
|
|
20028
|
-
const toolPromise = this.opts.events ? runWithNetworkTelemetry(
|
|
20029
|
-
events: this.opts.events,
|
|
20030
|
-
sessionId: resolveEventSessionId(ctx),
|
|
20031
|
-
...ctx.traceId ? { traceId: ctx.traceId } : {},
|
|
20032
|
-
...ctx.agentId ? { agentId: ctx.agentId } : {},
|
|
20033
|
-
toolCallId: telemetryToolCallId,
|
|
20034
|
-
initiator: "tool",
|
|
20035
|
-
operationName: tool.name
|
|
20036
|
-
}, () => runWithProcessTelemetry(
|
|
20252
|
+
const toolPromise = this.opts.events ? runWithNetworkTelemetry(
|
|
20037
20253
|
{
|
|
20038
20254
|
events: this.opts.events,
|
|
20039
20255
|
sessionId: resolveEventSessionId(ctx),
|
|
20040
20256
|
...ctx.traceId ? { traceId: ctx.traceId } : {},
|
|
20041
20257
|
...ctx.agentId ? { agentId: ctx.agentId } : {},
|
|
20042
20258
|
toolCallId: telemetryToolCallId,
|
|
20043
|
-
|
|
20259
|
+
initiator: "tool",
|
|
20260
|
+
operationName: tool.name
|
|
20044
20261
|
},
|
|
20045
|
-
|
|
20046
|
-
|
|
20262
|
+
() => runWithProcessTelemetry(
|
|
20263
|
+
{
|
|
20264
|
+
events: this.opts.events,
|
|
20265
|
+
sessionId: resolveEventSessionId(ctx),
|
|
20266
|
+
...ctx.traceId ? { traceId: ctx.traceId } : {},
|
|
20267
|
+
...ctx.agentId ? { agentId: ctx.agentId } : {},
|
|
20268
|
+
toolCallId: telemetryToolCallId,
|
|
20269
|
+
toolName: tool.name
|
|
20270
|
+
},
|
|
20271
|
+
execute
|
|
20272
|
+
)
|
|
20273
|
+
) : execute();
|
|
20047
20274
|
toolPromise.catch(() => {
|
|
20048
20275
|
});
|
|
20049
20276
|
try {
|
|
@@ -20295,19 +20522,39 @@ var OneShotOrchestrator = class {
|
|
|
20295
20522
|
*/
|
|
20296
20523
|
resolveFallbackChain(input, config, target) {
|
|
20297
20524
|
const mgr = this.opts.fallbackProfileManager;
|
|
20525
|
+
let selected = mgr.resolveEffective({
|
|
20526
|
+
fallbackAuto: false,
|
|
20527
|
+
exclude: target
|
|
20528
|
+
});
|
|
20298
20529
|
if (input.fallbackModels && input.fallbackModels.length > 0) {
|
|
20299
|
-
|
|
20300
|
-
|
|
20301
|
-
|
|
20302
|
-
|
|
20303
|
-
|
|
20304
|
-
if (config.
|
|
20305
|
-
|
|
20530
|
+
selected = mgr.resolveEffective({
|
|
20531
|
+
fallbackModels: input.fallbackModels,
|
|
20532
|
+
fallbackAuto: false,
|
|
20533
|
+
exclude: target
|
|
20534
|
+
});
|
|
20535
|
+
} else if (config.fallbackModels && config.fallbackModels.length > 0) {
|
|
20536
|
+
selected = mgr.resolveEffective({
|
|
20537
|
+
fallbackModels: config.fallbackModels,
|
|
20538
|
+
fallbackAuto: false,
|
|
20539
|
+
exclude: target
|
|
20540
|
+
});
|
|
20541
|
+
} else if (config.fallbackAuto !== false) {
|
|
20542
|
+
selected = mgr.resolveEffective({
|
|
20306
20543
|
fallbackAuto: true,
|
|
20307
20544
|
exclude: target
|
|
20308
20545
|
});
|
|
20309
20546
|
}
|
|
20310
|
-
|
|
20547
|
+
if (config.fallbackAuto === false) return selected;
|
|
20548
|
+
const combined = [...selected, ...mgr.resolveAllConfigured(target)];
|
|
20549
|
+
const seen = /* @__PURE__ */ new Set();
|
|
20550
|
+
return Object.freeze(
|
|
20551
|
+
combined.filter((entry) => {
|
|
20552
|
+
const key = `${entry.providerId}/${entry.model}`;
|
|
20553
|
+
if (seen.has(key)) return false;
|
|
20554
|
+
seen.add(key);
|
|
20555
|
+
return true;
|
|
20556
|
+
})
|
|
20557
|
+
);
|
|
20311
20558
|
}
|
|
20312
20559
|
/** Attempt a provider call while preserving the actual failure for callers. */
|
|
20313
20560
|
async tryCall(provider, request, signal, providerId, model) {
|