@wrongstack/core 0.296.4 → 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 +1076 -283
- package/dist/coordination/agents/index.js +136 -1
- package/dist/coordination/agents/role-skills.d.ts +3 -2
- package/dist/coordination/brain-cache.d.ts +14 -0
- 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 +16514 -15945
- 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-http-router.d.ts +6 -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 +1270 -289
- 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 +30 -4
- package/dist/coordination/sqlite-mailbox-credentials.d.ts +11 -0
- package/dist/core/context.d.ts +5 -5
- package/dist/core/fallback-profile-manager.d.ts +14 -0
- package/dist/core/index.js +624 -168
- 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 +2393 -1302
- package/dist/design/index.js +47 -8
- package/dist/execution/design-materialize.d.ts +22 -0
- package/dist/execution/index.js +582 -285
- 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 +71 -17
- package/dist/goal/phase-store.d.ts +7 -0
- 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 +680 -163
- package/dist/hq/kanban-store.d.ts +3 -0
- package/dist/hq/persistence/event-log.d.ts +25 -0
- package/dist/hq/persistence.d.ts +1 -1
- package/dist/hq/protocol/browser.d.ts +2 -1
- package/dist/hq/protocol/client.d.ts +18 -1
- package/dist/hq/protocol/core.d.ts +5 -16
- package/dist/hq/protocol/envelope.d.ts +29 -0
- package/dist/hq/protocol/governance.d.ts +34 -0
- package/dist/hq/protocol/peer.d.ts +55 -0
- package/dist/hq/protocol/project.d.ts +3 -0
- package/dist/hq/protocol/resume.d.ts +56 -0
- package/dist/hq/protocol.d.ts +11 -8
- package/dist/hq/protocol.js +675 -0
- package/dist/hq/publisher.d.ts +31 -2
- package/dist/hq/session-bridge.d.ts +8 -0
- package/dist/index.js +7197 -4006
- 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.d.ts +1 -1
- package/dist/observability/index.js +103 -5
- package/dist/observability/metrics.d.ts +37 -0
- package/dist/observability/prometheus.d.ts +11 -0
- package/dist/plugin/index.d.ts +5 -1
- package/dist/plugin/index.js +965 -511
- package/dist/plugins/auto-review-plugin.d.ts +6 -0
- 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/file-session-writer.d.ts +23 -0
- package/dist/storage/index.js +1140 -905
- package/dist/storage/provider-config-watcher.d.ts +1 -0
- package/dist/storage/session-helpers.d.ts +1 -0
- package/dist/storage/session-reader.d.ts +0 -7
- package/dist/storage/session-store/types.d.ts +12 -1
- package/dist/storage/session-store.d.ts +11 -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 +305 -133
- 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 +15 -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/observability.d.ts +13 -0
- package/dist/types/secret-vault.d.ts +8 -0
- package/dist/types/session.d.ts +42 -0
- package/dist/types/skill.d.ts +56 -0
- package/dist/types/tool-executor.d.ts +2 -0
- package/dist/utils/continuous-memory-profiler.d.ts +35 -0
- package/dist/utils/env-typed.d.ts +64 -0
- package/dist/utils/glob-match.d.ts +21 -1
- package/dist/utils/heap-watchdog-types.d.ts +62 -0
- package/dist/utils/heap-watchdog.d.ts +15 -34
- package/dist/utils/heap-watchdog.js +592 -18
- package/dist/utils/incoming-images.d.ts +19 -0
- package/dist/utils/index.d.ts +15 -11
- package/dist/utils/index.js +1425 -545
- package/dist/utils/memory-flight-recorder.d.ts +47 -0
- package/dist/utils/path-segment.d.ts +29 -0
- package/dist/utils/tool-name.d.ts +34 -0
- package/dist/utils/win32-cmd.d.ts +25 -0
- package/dist/worktree/index.js +5 -0
- package/package.json +11 -3
- package/skills/chimera/SKILL.md +16 -4
- package/skills/data-governance/SKILL.md +92 -0
- package/skills/wrongstack-kanban/SKILL.md +129 -0
- package/skills/wrongstack-kanban/agents/openai.yaml +4 -0
- package/skills/wrongstack-mailbox-mcp/SKILL.md +72 -0
- package/skills/wrongstack-mailbox-mcp/agents/openai.yaml +4 -0
- 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/project.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/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.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/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-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
|
@@ -3,9 +3,35 @@ 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
|
+
/**
|
|
7
|
+
* Reason a persistent "always allow" cannot be recorded for this call, or
|
|
8
|
+
* `undefined` when it can (WS-046).
|
|
9
|
+
*
|
|
10
|
+
* A stored trust pattern is only ever consulted as
|
|
11
|
+
* `entry.allow && subject && matchesTrust(entry.allow, subject)`. When the tool
|
|
12
|
+
* produces no subject, that condition can never be true — so `trust()` with the
|
|
13
|
+
* fallback `pattern: tool.name` writes an entry that is dead on arrival.
|
|
14
|
+
*
|
|
15
|
+
* The user experience of that bug is the damaging part. They pick "always
|
|
16
|
+
* allow", are asked again on the very next identical call, conclude the feature
|
|
17
|
+
* is broken, and reach for the one thing that does work: a blanket
|
|
18
|
+
* `{"exec": {"auto": true}}`. A silent no-op does not just fail to help — it
|
|
19
|
+
* actively trains people into the widest possible grant.
|
|
20
|
+
*
|
|
21
|
+
* So the option is refused with a stated reason instead of accepted and
|
|
22
|
+
* discarded. Exported so a UI can hide the choice rather than offer one that
|
|
23
|
+
* cannot be honoured.
|
|
24
|
+
*/
|
|
25
|
+
export declare function alwaysAllowUnavailableReason(tool: Tool, input: unknown): string | undefined;
|
|
6
26
|
export interface PermissionPolicyOptions {
|
|
7
27
|
trustFile: string;
|
|
8
28
|
yolo?: boolean | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Let YOLO auto-approve destructive shell commands too. Off by default: with
|
|
31
|
+
* YOLO on, `rm -rf`, git history rewrites and external publishes still ask
|
|
32
|
+
* (WS-008).
|
|
33
|
+
*/
|
|
34
|
+
yoloDestructive?: boolean | undefined;
|
|
9
35
|
promptDelegate?: (tool: Tool, input: unknown, suggestedPattern: string) => Promise<'yes' | 'no' | 'always' | 'deny'>;
|
|
10
36
|
inputReader?: InputReader | undefined;
|
|
11
37
|
}
|
|
@@ -45,9 +71,13 @@ export declare class DefaultPermissionPolicy implements PermissionPolicy {
|
|
|
45
71
|
/** Pre-compiled wildcard patterns — rebuilt on reload for O(1) lookup. */
|
|
46
72
|
private wildcardEntries;
|
|
47
73
|
/**
|
|
48
|
-
* Evaluate-result cache. Keyed by `tool.name::subject`
|
|
49
|
-
* with the same tool+input skip namespace matching,
|
|
50
|
-
* and pattern matching (matchAny).
|
|
74
|
+
* Evaluate-result cache. Keyed by `tool.name::subject::permissionFingerprint`
|
|
75
|
+
* so repeated calls with the same tool+input skip namespace matching,
|
|
76
|
+
* subject computation, and pattern matching (matchAny). The fingerprint
|
|
77
|
+
* suffix covers the `Tool` fields `evaluate()` reads (`permission`,
|
|
78
|
+
* `riskTier`, `mutating`, `capabilities`), so a tool redefined via
|
|
79
|
+
* `ToolRegistry.wrap()` misses the cache instead of inheriting a stale
|
|
80
|
+
* verdict.
|
|
51
81
|
*
|
|
52
82
|
* Cleared on any state change (reload, trust, deny, yolo toggle) because
|
|
53
83
|
* the result depends on the full policy state. The write-tool smart-bypass
|
|
@@ -63,7 +93,29 @@ export declare class DefaultPermissionPolicy implements PermissionPolicy {
|
|
|
63
93
|
private _evalCache;
|
|
64
94
|
private policyDiagnostics;
|
|
65
95
|
private policyInvalid;
|
|
96
|
+
/**
|
|
97
|
+
* When true, YOLO also auto-approves clearly destructive shell commands.
|
|
98
|
+
*
|
|
99
|
+
* WS-008: `isClearlyDestructiveBashCommand` was exported and heavily tested
|
|
100
|
+
* but called from zero production modules, so YOLO returned `auto` for
|
|
101
|
+
* everything — including `rm -rf`, git history rewrites, and external
|
|
102
|
+
* publishes. The `'yolo_destructive'` decision source, the getter/setter on
|
|
103
|
+
* PermissionPolicy, and the TUI branch that reads it all existed; only the
|
|
104
|
+
* gate itself was missing. Defaults to false: destructive commands still ask,
|
|
105
|
+
* even in YOLO.
|
|
106
|
+
*/
|
|
107
|
+
private yoloDestructive;
|
|
66
108
|
constructor(opts: PermissionPolicyOptions);
|
|
109
|
+
/** Allow YOLO to cover destructive shell commands too (off by default). */
|
|
110
|
+
setYoloDestructive(enabled: boolean): void;
|
|
111
|
+
/** Whether YOLO currently extends to destructive shell commands. */
|
|
112
|
+
getYoloDestructive(): boolean;
|
|
113
|
+
/**
|
|
114
|
+
* True when YOLO is on but this specific call is a destructive shell command
|
|
115
|
+
* the user has not opted to auto-approve. Shared by `evaluate()` and the
|
|
116
|
+
* explain/trace path so the two cannot drift.
|
|
117
|
+
*/
|
|
118
|
+
private yoloBlockedAsDestructive;
|
|
67
119
|
/**
|
|
68
120
|
* Replace (or clear) the interactive prompt delegate at runtime.
|
|
69
121
|
* Used by the CLI to switch from inline prompts (REPL) to event-driven
|
|
@@ -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
|
/**
|
package/dist/skills/limits.d.ts
CHANGED
|
@@ -51,6 +51,14 @@ export declare const SKILL_LIMITS: {
|
|
|
51
51
|
* Consumer: `downloadGitHubTarball`.
|
|
52
52
|
*/
|
|
53
53
|
readonly MAX_TARBALL_SIZE: number;
|
|
54
|
+
/**
|
|
55
|
+
* Maximum size of a GitHub skill tarball after gzip decompression. The
|
|
56
|
+
* compressed download limit alone does not protect against highly
|
|
57
|
+
* compressible archives expanding until the process runs out of memory.
|
|
58
|
+
*
|
|
59
|
+
* Consumer: `downloadGitHubTarball`.
|
|
60
|
+
*/
|
|
61
|
+
readonly MAX_UNCOMPRESSED_TARBALL_SIZE: number;
|
|
54
62
|
/**
|
|
55
63
|
* Default total char budget for skill bodies injected in eager mode when
|
|
56
64
|
* `config.skills.eagerMaxChars` is unset. ~6k tokens. Skills are injected
|
|
@@ -62,6 +70,17 @@ export declare const SKILL_LIMITS: {
|
|
|
62
70
|
* `skillEagerMaxChars`).
|
|
63
71
|
*/
|
|
64
72
|
readonly EAGER_DEFAULT_MAX_CHARS: 24000;
|
|
73
|
+
/**
|
|
74
|
+
* Default total char budget for compact (token-saving) skill bodies injected
|
|
75
|
+
* by `buildCompactSkillBodiesText`. Mirrors the eager ceiling so compact mode
|
|
76
|
+
* can never inject more total skill text than eager mode. Before this bound
|
|
77
|
+
* existed, compact mode injected EVERY skill's compact body with no cap, so
|
|
78
|
+
* the section grew linearly with the number of installed skills. Skills past
|
|
79
|
+
* the budget overflow to a name list the agent loads via the `skill` tool.
|
|
80
|
+
*
|
|
81
|
+
* Consumer: `buildCompactSkillBodiesText` (default for its `budget` param).
|
|
82
|
+
*/
|
|
83
|
+
readonly COMPACT_DEFAULT_MAX_CHARS: 24000;
|
|
65
84
|
/**
|
|
66
85
|
* Auto-compact body limits (the token-saving fallback used when a skill has
|
|
67
86
|
* no hand-crafted `SKILL.save.md`). The Overview and Rules sections are
|
|
@@ -109,6 +109,19 @@ export declare class SkillInstaller {
|
|
|
109
109
|
/**
|
|
110
110
|
* Remove all files for an installed skill.
|
|
111
111
|
*/
|
|
112
|
+
/**
|
|
113
|
+
* Delete an installed skill's directory.
|
|
114
|
+
*
|
|
115
|
+
* The containment check is not ceremonial: this is a `recursive: true,
|
|
116
|
+
* force: true` delete whose target is built from a skill NAME taken from
|
|
117
|
+
* manifest frontmatter. `path.join` normalises `..`, so a crafted name
|
|
118
|
+
* escapes `targetDir` and takes the recursive delete with it. This file
|
|
119
|
+
* already had `isInside` and applied it on the copy path but not here.
|
|
120
|
+
*
|
|
121
|
+
* The strict-subdirectory requirement matters separately: `isInside` allows
|
|
122
|
+
* equality by design, and an empty or `.` name resolves `skillDir` to
|
|
123
|
+
* `targetDir` itself — deleting every installed skill (WS-097).
|
|
124
|
+
*/
|
|
112
125
|
private removeSkillFiles;
|
|
113
126
|
/**
|
|
114
127
|
* Invalidate the skill loader's cache so newly installed skills appear.
|
|
@@ -39,10 +39,29 @@ export declare class FileSessionWriter implements SessionWriter {
|
|
|
39
39
|
private lastAppendWarnAt;
|
|
40
40
|
private readonly secretScrubber?;
|
|
41
41
|
private readonly checkpointCas?;
|
|
42
|
+
/** Mutable slot for onAppend callback — constructor opts seed it, setOnAppend replaces it. */
|
|
43
|
+
private _onAppend;
|
|
44
|
+
/** Implements SessionWriter.onAppend — public getter/setter for direct property access. */
|
|
45
|
+
get onAppend(): ((event: SessionEvent) => void) | undefined;
|
|
46
|
+
set onAppend(cb: ((event: SessionEvent) => void) | undefined);
|
|
47
|
+
/** Mutable slot for onAppendBatch callback. */
|
|
48
|
+
private _onAppendBatch;
|
|
49
|
+
/** Implements SessionWriter.onAppendBatch — public getter/setter for direct property access. */
|
|
50
|
+
get onAppendBatch(): ((events: SessionEvent[]) => void) | undefined;
|
|
51
|
+
set onAppendBatch(cb: ((events: SessionEvent[]) => void) | undefined);
|
|
42
52
|
private readonly onCloseCb?;
|
|
43
53
|
private readonly resolveNameCb?;
|
|
44
54
|
/** Implements SessionWriter.traceId — propagated from ContextInit.traceId. */
|
|
45
55
|
traceId: string | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Set or replace the onAppend callback. Used by telemetry bridges that
|
|
58
|
+
* receive the writer as an already-constructed dependency.
|
|
59
|
+
*/
|
|
60
|
+
setOnAppend(cb: ((event: SessionEvent) => void) | undefined): void;
|
|
61
|
+
/**
|
|
62
|
+
* Set or replace the onAppendBatch callback.
|
|
63
|
+
*/
|
|
64
|
+
setOnAppendBatch(cb: ((events: SessionEvent[]) => void) | undefined): void;
|
|
46
65
|
private writeBuffer;
|
|
47
66
|
private writeBufferBytes;
|
|
48
67
|
private flushTimer;
|
|
@@ -107,6 +126,10 @@ export declare class FileSessionWriter implements SessionWriter {
|
|
|
107
126
|
filePath?: string | undefined;
|
|
108
127
|
secretScrubber?: SecretScrubber | undefined;
|
|
109
128
|
checkpointCas?: SessionCheckpointCas | undefined;
|
|
129
|
+
/** Called synchronously after each event is scrubbed + observed, before it enters the write buffer. */
|
|
130
|
+
onAppend?: ((event: SessionEvent) => void) | undefined;
|
|
131
|
+
/** Batch variant called after all events in the batch have been scrubbed + observed. */
|
|
132
|
+
onAppendBatch?: ((events: SessionEvent[]) => void) | undefined;
|
|
110
133
|
/** Existing cumulative summary when reopening a persisted session. */
|
|
111
134
|
initialSummary?: SessionSummary | undefined;
|
|
112
135
|
/** Called on close() with the finalized summary for index/sidecar writes. */
|