@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
|
@@ -865,7 +865,7 @@ var DefaultLogger = class _DefaultLogger {
|
|
|
865
865
|
root.pendingFileWrites += 1;
|
|
866
866
|
root.pendingFileBytes += bytes;
|
|
867
867
|
this.enqueueRotate(this.file);
|
|
868
|
-
this._tail = this._tail.then(() => fsp.appendFile(this.file, line)).catch(() => void 0).finally(() => {
|
|
868
|
+
this._tail = this._tail.then(() => fsp.appendFile(this.file, line, { mode: 384 })).catch(() => void 0).finally(() => {
|
|
869
869
|
root.pendingFileWrites = Math.max(0, root.pendingFileWrites - 1);
|
|
870
870
|
root.pendingFileBytes = Math.max(0, root.pendingFileBytes - bytes);
|
|
871
871
|
});
|
|
@@ -2227,6 +2227,47 @@ function isSecretField(name) {
|
|
|
2227
2227
|
return SECRET_KEY_PATTERN.test(lc);
|
|
2228
2228
|
}
|
|
2229
2229
|
|
|
2230
|
+
// src/security/file-permissions.ts
|
|
2231
|
+
import { chmod } from "node:fs/promises";
|
|
2232
|
+
var SECRET_FILE_MODE = 384;
|
|
2233
|
+
async function restrictFilePermissions(filePath, opts) {
|
|
2234
|
+
const label = opts?.label ?? "file-permissions";
|
|
2235
|
+
const warn = opts?.warn ?? ((msg) => console.warn(msg));
|
|
2236
|
+
if (process.platform === "win32") {
|
|
2237
|
+
try {
|
|
2238
|
+
const { execFile } = await import("node:child_process");
|
|
2239
|
+
const { promisify } = await import("node:util");
|
|
2240
|
+
const execFileAsync = promisify(execFile);
|
|
2241
|
+
const user = windowsAccountName();
|
|
2242
|
+
if (!user) {
|
|
2243
|
+
warn(
|
|
2244
|
+
`[${label}] Could not determine the current Windows user for ${filePath}; skipping icacls hardening.`
|
|
2245
|
+
);
|
|
2246
|
+
return;
|
|
2247
|
+
}
|
|
2248
|
+
await execFileAsync("icacls", [filePath, "/inheritance:r", "/grant:r", `${user}:(F)`], {
|
|
2249
|
+
windowsHide: true
|
|
2250
|
+
});
|
|
2251
|
+
} catch {
|
|
2252
|
+
warn(
|
|
2253
|
+
`[${label}] Could not restrict permissions on ${filePath} \u2014 it may be readable by other users on this system.`
|
|
2254
|
+
);
|
|
2255
|
+
}
|
|
2256
|
+
} else {
|
|
2257
|
+
try {
|
|
2258
|
+
await chmod(filePath, SECRET_FILE_MODE);
|
|
2259
|
+
} catch {
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2263
|
+
function windowsAccountName() {
|
|
2264
|
+
const username = process.env.USERNAME || process.env.USER;
|
|
2265
|
+
if (!username || username.includes("\0")) return void 0;
|
|
2266
|
+
const domain = process.env.USERDOMAIN;
|
|
2267
|
+
if (domain && !domain.includes("\0")) return `${domain}\\${username}`;
|
|
2268
|
+
return username;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2230
2271
|
// src/utils/deep-merge.ts
|
|
2231
2272
|
var FORBIDDEN_PROTO_KEYS = /* @__PURE__ */ new Set([
|
|
2232
2273
|
"__proto__",
|
|
@@ -2378,8 +2419,12 @@ function checkKeyFilePermissions(keyFile, opts) {
|
|
|
2378
2419
|
const stat5 = fs2.statSync(keyFile);
|
|
2379
2420
|
const actualMode = stat5.mode & 511;
|
|
2380
2421
|
if (actualMode !== KEY_FILE_MODE) {
|
|
2422
|
+
void restrictFilePermissions(keyFile, {
|
|
2423
|
+
label: "secret-vault",
|
|
2424
|
+
warn
|
|
2425
|
+
}).catch(() => void 0);
|
|
2381
2426
|
warn(
|
|
2382
|
-
`Key file ${keyFile} has mode ${actualMode.toString(8)} \u2014 expected ${KEY_FILE_MODE.toString(8)}.
|
|
2427
|
+
`Key file ${keyFile} has mode ${actualMode.toString(8)} \u2014 expected ${KEY_FILE_MODE.toString(8)}. Hardening\u2026`
|
|
2383
2428
|
);
|
|
2384
2429
|
}
|
|
2385
2430
|
} catch {
|
|
@@ -2412,6 +2457,14 @@ var DefaultSecretVault = class {
|
|
|
2412
2457
|
logger;
|
|
2413
2458
|
key;
|
|
2414
2459
|
_keyVersion = 1;
|
|
2460
|
+
/**
|
|
2461
|
+
* Pending key-file hardening promises (Windows ACL restrictions via icacls).
|
|
2462
|
+
* Tracked so async callers can `flushHardening()` before returning, ensuring
|
|
2463
|
+
* a short-lived CLI process does not exit before the hardening resolves.
|
|
2464
|
+
* Sync-only callers (encrypt/decrypt lazy-load) leave these pending —
|
|
2465
|
+
* hardening remains best-effort in that case.
|
|
2466
|
+
*/
|
|
2467
|
+
pendingHardening = [];
|
|
2415
2468
|
constructor(opts) {
|
|
2416
2469
|
this.keyFile = opts.keyFile;
|
|
2417
2470
|
this.logger = opts.logger;
|
|
@@ -2428,6 +2481,26 @@ var DefaultSecretVault = class {
|
|
|
2428
2481
|
console.warn(JSON.stringify({ ...ctx, message: msg, timestamp: (/* @__PURE__ */ new Date()).toISOString() }));
|
|
2429
2482
|
}
|
|
2430
2483
|
}
|
|
2484
|
+
/**
|
|
2485
|
+
* Schedule best-effort key-file hardening and track the promise so async
|
|
2486
|
+
* callers can await it via `flushHardening()` before returning. Rejections
|
|
2487
|
+
* are swallowed here (the helper already warns on failure) so a rejection
|
|
2488
|
+
* can never become an unhandled one.
|
|
2489
|
+
*/
|
|
2490
|
+
scheduleKeyHardening() {
|
|
2491
|
+
const p = restrictFilePermissions(this.keyFile, {
|
|
2492
|
+
label: "secret-vault-key",
|
|
2493
|
+
warn: (msg) => this.logWarn(msg)
|
|
2494
|
+
}).catch(() => void 0);
|
|
2495
|
+
this.pendingHardening.push(p);
|
|
2496
|
+
}
|
|
2497
|
+
/** Flush all pending key-file hardening promises. */
|
|
2498
|
+
flushHardening() {
|
|
2499
|
+
if (this.pendingHardening.length === 0) return Promise.resolve();
|
|
2500
|
+
const all = Promise.all(this.pendingHardening).then(() => void 0);
|
|
2501
|
+
this.pendingHardening = [];
|
|
2502
|
+
return all;
|
|
2503
|
+
}
|
|
2431
2504
|
/** Current key version. Starts at 1; incremented by rotateKey(). */
|
|
2432
2505
|
get keyVersion() {
|
|
2433
2506
|
if (!this.key) this.loadOrCreateKey();
|
|
@@ -2469,16 +2542,18 @@ var DefaultSecretVault = class {
|
|
|
2469
2542
|
const iv = Buffer.from(ivB64, "base64");
|
|
2470
2543
|
const tag = Buffer.from(tagB64, "base64");
|
|
2471
2544
|
const ct = Buffer.from(ctB64, "base64");
|
|
2472
|
-
if (iv.length !== IV_BYTES)
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2545
|
+
if (iv.length !== IV_BYTES)
|
|
2546
|
+
throw new ConfigError({
|
|
2547
|
+
message: "SecretVault: bad IV length",
|
|
2548
|
+
code: ERROR_CODES.CONFIG_PARSE_FAILED,
|
|
2549
|
+
context: { expected: IV_BYTES, actual: iv.length }
|
|
2550
|
+
});
|
|
2551
|
+
if (tag.length !== TAG_BYTES)
|
|
2552
|
+
throw new ConfigError({
|
|
2553
|
+
message: "SecretVault: bad tag length",
|
|
2554
|
+
code: ERROR_CODES.CONFIG_PARSE_FAILED,
|
|
2555
|
+
context: { expected: TAG_BYTES, actual: tag.length }
|
|
2556
|
+
});
|
|
2482
2557
|
const key = this.loadOrCreateKey();
|
|
2483
2558
|
const decipher = createDecipheriv(ALGO, key, iv);
|
|
2484
2559
|
decipher.setAuthTag(tag);
|
|
@@ -2505,6 +2580,7 @@ var DefaultSecretVault = class {
|
|
|
2505
2580
|
newKey.copy(keyFileBuf, KEY_FILE_MAGIC.length + 1);
|
|
2506
2581
|
writeKeyFileAtomicSync(this.keyFile, keyFileBuf);
|
|
2507
2582
|
}
|
|
2583
|
+
this.scheduleKeyHardening();
|
|
2508
2584
|
checkKeyFilePermissions(this.keyFile, { warn: (msg) => this.logWarn(msg) });
|
|
2509
2585
|
this.key = newKey;
|
|
2510
2586
|
this._keyVersion = newVersion;
|
|
@@ -2521,7 +2597,11 @@ var DefaultSecretVault = class {
|
|
|
2521
2597
|
const passphrase = getVaultPassphrase();
|
|
2522
2598
|
if (!passphrase || !this.key) return;
|
|
2523
2599
|
try {
|
|
2524
|
-
writeKeyFileAtomicSync(
|
|
2600
|
+
writeKeyFileAtomicSync(
|
|
2601
|
+
this.keyFile,
|
|
2602
|
+
wrapDataKey(this.key, this._keyVersion, passphrase)
|
|
2603
|
+
);
|
|
2604
|
+
this.scheduleKeyHardening();
|
|
2525
2605
|
checkKeyFilePermissions(this.keyFile, { warn: (msg) => this.logWarn(msg) });
|
|
2526
2606
|
} catch {
|
|
2527
2607
|
}
|
|
@@ -2582,8 +2662,10 @@ var DefaultSecretVault = class {
|
|
|
2582
2662
|
const initialBytes = passphrase ? wrapDataKey(key, 1, passphrase) : key;
|
|
2583
2663
|
try {
|
|
2584
2664
|
fs2.writeFileSync(this.keyFile, initialBytes, { mode: 384, flag: "wx" });
|
|
2665
|
+
this.scheduleKeyHardening();
|
|
2585
2666
|
} catch (err) {
|
|
2586
2667
|
if (err.code !== "EEXIST") throw err;
|
|
2668
|
+
this.scheduleKeyHardening();
|
|
2587
2669
|
const buf = fs2.readFileSync(this.keyFile);
|
|
2588
2670
|
if (isWrappedKeyFile(buf)) {
|
|
2589
2671
|
const { key: winnerKey, version } = unwrapDataKey(buf, this.keyFile);
|
|
@@ -2642,45 +2724,15 @@ async function migratePlaintextSecrets(configPath, vault, logger) {
|
|
|
2642
2724
|
const migrated = walkCount(parsed, vault, counter);
|
|
2643
2725
|
if (counter.n === 0) return { migrated: 0, file: configPath };
|
|
2644
2726
|
await atomicWrite(configPath, JSON.stringify(migrated, null, 2), { mode: 384 });
|
|
2645
|
-
await
|
|
2727
|
+
await restrictFilePermissions2(
|
|
2646
2728
|
configPath,
|
|
2647
2729
|
logger ? { warn: (msg) => logger.warn(msg) } : void 0
|
|
2648
2730
|
);
|
|
2731
|
+
await vault.flushHardening?.();
|
|
2649
2732
|
return { migrated: counter.n, file: configPath };
|
|
2650
2733
|
}
|
|
2651
|
-
async function
|
|
2652
|
-
|
|
2653
|
-
if (process.platform === "win32") {
|
|
2654
|
-
try {
|
|
2655
|
-
const { execFile } = await import("node:child_process");
|
|
2656
|
-
const { promisify } = await import("node:util");
|
|
2657
|
-
const execFileAsync = promisify(execFile);
|
|
2658
|
-
const user = windowsAccountName();
|
|
2659
|
-
if (!user) {
|
|
2660
|
-
warn(
|
|
2661
|
-
`[secret-vault] Could not determine the current Windows user for ${filePath}; skipping icacls hardening.`
|
|
2662
|
-
);
|
|
2663
|
-
return;
|
|
2664
|
-
}
|
|
2665
|
-
await execFileAsync("icacls", [filePath, "/inheritance:r", "/grant:r", `${user}:(F)`]);
|
|
2666
|
-
} catch {
|
|
2667
|
-
warn(
|
|
2668
|
-
`[secret-vault] Could not restrict permissions on ${filePath} \u2014 config file may be readable by other users on this system.`
|
|
2669
|
-
);
|
|
2670
|
-
}
|
|
2671
|
-
} else {
|
|
2672
|
-
try {
|
|
2673
|
-
await fsp2.chmod(filePath, 384);
|
|
2674
|
-
} catch {
|
|
2675
|
-
}
|
|
2676
|
-
}
|
|
2677
|
-
}
|
|
2678
|
-
function windowsAccountName() {
|
|
2679
|
-
const username = process.env.USERNAME || process.env.USER;
|
|
2680
|
-
if (!username || username.includes("\0")) return void 0;
|
|
2681
|
-
const domain = process.env.USERDOMAIN;
|
|
2682
|
-
if (domain && !domain.includes("\0")) return `${domain}\\${username}`;
|
|
2683
|
-
return username;
|
|
2734
|
+
async function restrictFilePermissions2(filePath, opts) {
|
|
2735
|
+
await restrictFilePermissions(filePath, { label: "secret-vault", warn: opts?.warn });
|
|
2684
2736
|
}
|
|
2685
2737
|
function walkCount(node, vault, counter) {
|
|
2686
2738
|
if (node === null || node === void 0) return node;
|
|
@@ -3041,7 +3093,13 @@ var CONFIG_BEHAVIOR_DEFAULTS = {
|
|
|
3041
3093
|
// models still get cost savings without capability loss. Explicit tiers
|
|
3042
3094
|
// are respected verbatim.
|
|
3043
3095
|
tokenSavingMode: "auto",
|
|
3044
|
-
|
|
3096
|
+
// Derived, never written by hand: this and `tools.restrictToProjectRoot`
|
|
3097
|
+
// (line 41) are the two halves of one switch, and they used to be declared
|
|
3098
|
+
// independently in this same object — one `true`, one `true` — with
|
|
3099
|
+
// session.ts resolving the contradiction via `??` in favour of the
|
|
3100
|
+
// permissive half. The confinement guard therefore shipped disabled on a
|
|
3101
|
+
// fresh install even though the other half asked for it (WS-075).
|
|
3102
|
+
allowOutsideProjectRoot: !DEFAULT_TOOLS_CONFIG.restrictToProjectRoot
|
|
3045
3103
|
},
|
|
3046
3104
|
Sage: {
|
|
3047
3105
|
enabled: true,
|
|
@@ -3120,7 +3178,9 @@ var CONFIG_BEHAVIOR_DEFAULTS = {
|
|
|
3120
3178
|
enhance: true,
|
|
3121
3179
|
enhanceDelayMs: 6e4,
|
|
3122
3180
|
enhanceLanguage: "original",
|
|
3123
|
-
|
|
3181
|
+
// Product-wide statusline density default. Mirrored by the TUI's
|
|
3182
|
+
// DEFAULT_STATUSLINE_MODE (packages/tui/src/components/settings-picker-model.ts).
|
|
3183
|
+
statuslineMode: "minimum",
|
|
3124
3184
|
thinkingWord: DEFAULT_TUI_THINKING_WORD,
|
|
3125
3185
|
showAgentSwarmPanel: true
|
|
3126
3186
|
},
|
|
@@ -3249,6 +3309,7 @@ var IN_PROJECT_ALLOWED_KEYS = /* @__PURE__ */ new Set([
|
|
|
3249
3309
|
"maxConcurrent",
|
|
3250
3310
|
"uiLocale",
|
|
3251
3311
|
"fallbackModels",
|
|
3312
|
+
"fallbackBridge",
|
|
3252
3313
|
"fallbackProfiles",
|
|
3253
3314
|
"favoriteModels",
|
|
3254
3315
|
"favoriteModelsOnly",
|
|
@@ -3311,6 +3372,7 @@ var KNOWN_CONFIG_TOP_LEVEL_KEYS = /* @__PURE__ */ new Set([
|
|
|
3311
3372
|
"tools",
|
|
3312
3373
|
"mcpServers",
|
|
3313
3374
|
"fallbackModels",
|
|
3375
|
+
"fallbackBridge",
|
|
3314
3376
|
"fallbackProfiles",
|
|
3315
3377
|
"favoriteModels",
|
|
3316
3378
|
"favoriteModelsOnly",
|
|
@@ -3345,6 +3407,75 @@ var KNOWN_CONFIG_TOP_LEVEL_KEYS = /* @__PURE__ */ new Set([
|
|
|
3345
3407
|
"brain",
|
|
3346
3408
|
"git"
|
|
3347
3409
|
]);
|
|
3410
|
+
var IN_PROJECT_DENIED_PATHS = [
|
|
3411
|
+
{
|
|
3412
|
+
path: "tools.exec.allow",
|
|
3413
|
+
reason: "Extends the exec allow-list; a repo could authorise its own binaries."
|
|
3414
|
+
},
|
|
3415
|
+
{ path: "tools.exec.danger", reason: "Weakens the destructive-command banner." },
|
|
3416
|
+
{ path: "skills.extraDirs", reason: "Loads skill definitions from repo-chosen directories." },
|
|
3417
|
+
{ path: "skills.registryUrl", reason: "Redirects skill installs to a repo-chosen host." },
|
|
3418
|
+
// Deliberately NOT denied: skills.mode and skills.eagerMaxChars. The audit
|
|
3419
|
+
// suggested stripping both, but config-loader-extra.test.ts classifies `mode`
|
|
3420
|
+
// as a safe preference with a stated rationale, and a repo can only use these
|
|
3421
|
+
// to move injection volume in either direction — the trust problem was that
|
|
3422
|
+
// repo-supplied skill bodies were indistinguishable from the user's own, which
|
|
3423
|
+
// the provenance tag in system-prompt-skill-bodies.ts now fixes. Re-classifying
|
|
3424
|
+
// them is a product call.
|
|
3425
|
+
{ path: "Sage.storage.directory", reason: "Redirects memory storage outside the profile." },
|
|
3426
|
+
{
|
|
3427
|
+
path: "autonomy.yolo",
|
|
3428
|
+
reason: "Alias for the denied top-level `yolo`, and it wins over the user setting \u2014 a repo-committed config could disable every permission prompt."
|
|
3429
|
+
},
|
|
3430
|
+
{
|
|
3431
|
+
path: "autonomy.defaultMode",
|
|
3432
|
+
reason: "Sets the startup autonomy mode; autonomy is user-owned, never repo-owned."
|
|
3433
|
+
},
|
|
3434
|
+
// Deliberately NOT denied: autonomy.autoProceedDelayMs and
|
|
3435
|
+
// autoProceedMaxIterations. They tune a mode the user has already switched on
|
|
3436
|
+
// rather than granting it, and config-loader-extra.test.ts classifies the
|
|
3437
|
+
// delay as a benign project preference. Re-classifying them is a product call.
|
|
3438
|
+
{
|
|
3439
|
+
path: "launch.autonomy",
|
|
3440
|
+
reason: "Launch-time autonomy mode; same user-owned boundary as autonomy.defaultMode."
|
|
3441
|
+
},
|
|
3442
|
+
{
|
|
3443
|
+
path: "features.allowOutsideProjectRoot",
|
|
3444
|
+
reason: "Short-circuits both the project-root containment check and the symlink realpath check in the file tools."
|
|
3445
|
+
},
|
|
3446
|
+
{
|
|
3447
|
+
path: "tools.restrictToProjectRoot",
|
|
3448
|
+
reason: "The other half of the filesystem confinement switch."
|
|
3449
|
+
}
|
|
3450
|
+
];
|
|
3451
|
+
function deleteNestedPath(target, path11) {
|
|
3452
|
+
const segments = path11.split(".");
|
|
3453
|
+
const last = segments[segments.length - 1];
|
|
3454
|
+
if (last === void 0) return false;
|
|
3455
|
+
let cursor = target;
|
|
3456
|
+
const chain = [];
|
|
3457
|
+
for (const segment of segments.slice(0, -1)) {
|
|
3458
|
+
const next = cursor[segment];
|
|
3459
|
+
if (!next || typeof next !== "object" || Array.isArray(next)) return false;
|
|
3460
|
+
chain.push({ parent: cursor, key: segment });
|
|
3461
|
+
cursor = next;
|
|
3462
|
+
}
|
|
3463
|
+
if (!(last in cursor)) return false;
|
|
3464
|
+
const clonedLeaf = { ...cursor };
|
|
3465
|
+
delete clonedLeaf[last];
|
|
3466
|
+
let replacement = clonedLeaf;
|
|
3467
|
+
for (let i = chain.length - 1; i >= 0; i--) {
|
|
3468
|
+
const link = chain[i];
|
|
3469
|
+
if (!link) continue;
|
|
3470
|
+
replacement = { ...link.parent, [link.key]: replacement };
|
|
3471
|
+
if (i === 0) {
|
|
3472
|
+
for (const [k, v] of Object.entries(replacement)) target[k] = v;
|
|
3473
|
+
return true;
|
|
3474
|
+
}
|
|
3475
|
+
}
|
|
3476
|
+
for (const [k, v] of Object.entries(replacement)) target[k] = v;
|
|
3477
|
+
return true;
|
|
3478
|
+
}
|
|
3348
3479
|
function assertInProjectAllowListComplete() {
|
|
3349
3480
|
const missingFromBoth = [];
|
|
3350
3481
|
for (const key of KNOWN_CONFIG_TOP_LEVEL_KEYS) {
|
|
@@ -3374,6 +3505,22 @@ function assertInProjectAllowListComplete() {
|
|
|
3374
3505
|
`field(s) appear in BOTH IN_PROJECT_ALLOWED_KEYS and KNOWN_DENIED_IN_PROJECT: ` + duplicate.join(", ") + ". The allow-list wins at runtime; remove from one of the two."
|
|
3375
3506
|
);
|
|
3376
3507
|
}
|
|
3508
|
+
const orphanedPaths = IN_PROJECT_DENIED_PATHS.filter(
|
|
3509
|
+
({ path: path11 }) => !IN_PROJECT_ALLOWED_KEYS.has(path11.split(".")[0] ?? "")
|
|
3510
|
+
).map(({ path: path11 }) => path11);
|
|
3511
|
+
if (orphanedPaths.length > 0) {
|
|
3512
|
+
problems.push(
|
|
3513
|
+
`IN_PROJECT_DENIED_PATHS entr(ies) whose top-level parent is not allowed: ` + orphanedPaths.join(", ") + ". The parent is already stripped wholesale, so the nested denial is dead \u2014 remove it."
|
|
3514
|
+
);
|
|
3515
|
+
}
|
|
3516
|
+
const malformedPaths = IN_PROJECT_DENIED_PATHS.filter(
|
|
3517
|
+
({ path: path11 }) => path11.split(".").length < 2 || path11.split(".").some((s) => s.length === 0)
|
|
3518
|
+
).map(({ path: path11 }) => path11);
|
|
3519
|
+
if (malformedPaths.length > 0) {
|
|
3520
|
+
problems.push(
|
|
3521
|
+
`IN_PROJECT_DENIED_PATHS entr(ies) are not dotted nested paths: ` + malformedPaths.join(", ") + ". Top-level keys belong in KNOWN_DENIED_IN_PROJECT instead."
|
|
3522
|
+
);
|
|
3523
|
+
}
|
|
3377
3524
|
if (problems.length > 0) {
|
|
3378
3525
|
throw new Error(
|
|
3379
3526
|
`stripUnsafeInProjectFields drift check failed:
|
|
@@ -3396,58 +3543,8 @@ function stripUnsafeInProjectFields(inProject, sourcePath, warn = (msg) => conso
|
|
|
3396
3543
|
}
|
|
3397
3544
|
stripped.push(k);
|
|
3398
3545
|
}
|
|
3399
|
-
const
|
|
3400
|
-
|
|
3401
|
-
const execCfg = outTools["exec"];
|
|
3402
|
-
if (execCfg && typeof execCfg === "object") {
|
|
3403
|
-
const hasAllow = "allow" in execCfg;
|
|
3404
|
-
const hasDanger = "danger" in execCfg;
|
|
3405
|
-
if (hasAllow || hasDanger) {
|
|
3406
|
-
const clonedExec = { ...execCfg };
|
|
3407
|
-
if (hasAllow) {
|
|
3408
|
-
delete clonedExec["allow"];
|
|
3409
|
-
stripped.push("tools.exec.allow");
|
|
3410
|
-
}
|
|
3411
|
-
if (hasDanger) {
|
|
3412
|
-
delete clonedExec["danger"];
|
|
3413
|
-
stripped.push("tools.exec.danger");
|
|
3414
|
-
}
|
|
3415
|
-
out["tools"] = {
|
|
3416
|
-
...outTools,
|
|
3417
|
-
exec: clonedExec
|
|
3418
|
-
};
|
|
3419
|
-
}
|
|
3420
|
-
}
|
|
3421
|
-
}
|
|
3422
|
-
const outSkills = out["skills"];
|
|
3423
|
-
if (outSkills && typeof outSkills === "object") {
|
|
3424
|
-
const skillsRec = outSkills;
|
|
3425
|
-
const needsClone = "extraDirs" in skillsRec || "registryUrl" in skillsRec;
|
|
3426
|
-
if (needsClone) {
|
|
3427
|
-
const clonedSkills = { ...skillsRec };
|
|
3428
|
-
if ("extraDirs" in clonedSkills) {
|
|
3429
|
-
delete clonedSkills["extraDirs"];
|
|
3430
|
-
stripped.push("skills.extraDirs");
|
|
3431
|
-
}
|
|
3432
|
-
if ("registryUrl" in clonedSkills) {
|
|
3433
|
-
delete clonedSkills["registryUrl"];
|
|
3434
|
-
stripped.push("skills.registryUrl");
|
|
3435
|
-
}
|
|
3436
|
-
out["skills"] = clonedSkills;
|
|
3437
|
-
}
|
|
3438
|
-
}
|
|
3439
|
-
const outSage = out["Sage"];
|
|
3440
|
-
if (outSage && typeof outSage === "object") {
|
|
3441
|
-
const storage = outSage["storage"];
|
|
3442
|
-
if (storage && typeof storage === "object" && "directory" in storage) {
|
|
3443
|
-
const clonedStorage = { ...storage };
|
|
3444
|
-
delete clonedStorage["directory"];
|
|
3445
|
-
out["Sage"] = {
|
|
3446
|
-
...outSage,
|
|
3447
|
-
storage: clonedStorage
|
|
3448
|
-
};
|
|
3449
|
-
stripped.push("Sage.storage.directory");
|
|
3450
|
-
}
|
|
3546
|
+
for (const { path: path11 } of IN_PROJECT_DENIED_PATHS) {
|
|
3547
|
+
if (deleteNestedPath(out, path11)) stripped.push(path11);
|
|
3451
3548
|
}
|
|
3452
3549
|
if (stripped.length > 0) {
|
|
3453
3550
|
warn(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Context } from '../../core/context.js';
|
|
2
2
|
import type { Usage } from '../../types/provider.js';
|
|
3
|
+
import type { WorkspaceCheckpointRef } from '../../types/session.js';
|
|
3
4
|
import type { TrackedAgentSnapshot } from '../events.js';
|
|
4
5
|
export interface SessionEventMap {
|
|
5
6
|
'session.started': {
|
|
@@ -223,6 +224,8 @@ export interface SessionEventMap {
|
|
|
223
224
|
promptPreview: string;
|
|
224
225
|
ts: string;
|
|
225
226
|
fileCount: number;
|
|
227
|
+
/** Deterministic Git HEAD + dirty workspace identity, absent when capture failed. */
|
|
228
|
+
workspaceCheckpoint?: WorkspaceCheckpointRef | undefined;
|
|
226
229
|
};
|
|
227
230
|
/**
|
|
228
231
|
* Fired by SessionWriter.writeInFlightMarker() — the agent loop has
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Context } from '../../core/context.js';
|
|
2
|
+
import type { ToolOutputMetadata } from '../../types/context-evidence.js';
|
|
2
3
|
import type { PermissionDecision } from '../../types/permission.js';
|
|
3
4
|
import type { RiskTier, Tool, ToolErrorCategory, ToolProgressEvent } from '../../types/tool.js';
|
|
4
|
-
import type { ToolOutputMetadata } from '../../types/context-evidence.js';
|
|
5
5
|
export interface ToolEventMap {
|
|
6
6
|
'tool.started': {
|
|
7
7
|
sessionId?: string | undefined;
|
|
@@ -197,6 +197,8 @@ export interface ToolEventMap {
|
|
|
197
197
|
name: string;
|
|
198
198
|
durationMs: number;
|
|
199
199
|
ok: boolean;
|
|
200
|
+
/** Canonical tool-registry mutation classification; absent only on legacy emit sites. */
|
|
201
|
+
mutating?: boolean | undefined;
|
|
200
202
|
input?: unknown | undefined;
|
|
201
203
|
output?: string | undefined;
|
|
202
204
|
/**
|
package/dist/models/index.js
CHANGED
|
@@ -227,7 +227,7 @@ var DefaultLogger = class _DefaultLogger {
|
|
|
227
227
|
root.pendingFileWrites += 1;
|
|
228
228
|
root.pendingFileBytes += bytes;
|
|
229
229
|
this.enqueueRotate(this.file);
|
|
230
|
-
this._tail = this._tail.then(() => fsp.appendFile(this.file, line)).catch(() => void 0).finally(() => {
|
|
230
|
+
this._tail = this._tail.then(() => fsp.appendFile(this.file, line, { mode: 384 })).catch(() => void 0).finally(() => {
|
|
231
231
|
root.pendingFileWrites = Math.max(0, root.pendingFileWrites - 1);
|
|
232
232
|
root.pendingFileBytes = Math.max(0, root.pendingFileBytes - bytes);
|
|
233
233
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { InMemoryMetricsSink, NoopMetricsSink } from './metrics.js';
|
|
1
|
+
export { InMemoryMetricsSink, type InMemoryMetricsSinkOptions, NoopMetricsSink, } from './metrics.js';
|
|
2
2
|
export { DefaultHealthRegistry } from './health.js';
|
|
3
3
|
export { NoopTracer } from './tracer.js';
|
|
4
4
|
export { OTelTracer } from './otel-tracer.js';
|
|
@@ -14,7 +14,25 @@ var InMemoryMetricsSink = class {
|
|
|
14
14
|
counters = /* @__PURE__ */ new Map();
|
|
15
15
|
gauges = /* @__PURE__ */ new Map();
|
|
16
16
|
histograms = /* @__PURE__ */ new Map();
|
|
17
|
+
/**
|
|
18
|
+
* Per-metric dropped observation counts. Keyed by the metric's full name
|
|
19
|
+
* (counter / gauge / histogram families share a name space by convention;
|
|
20
|
+
* families are tracked in the respective `droppedByMetric` Map).
|
|
21
|
+
*/
|
|
22
|
+
droppedByMetric = /* @__PURE__ */ new Map();
|
|
23
|
+
maxSeriesPerMetric;
|
|
24
|
+
constructor(opts = {}) {
|
|
25
|
+
const cap = opts.maxSeriesPerMetric;
|
|
26
|
+
this.maxSeriesPerMetric = cap !== void 0 && cap > 0 ? cap : void 0;
|
|
27
|
+
}
|
|
17
28
|
counter(name, value = 1, labels) {
|
|
29
|
+
if (this.maxSeriesPerMetric !== void 0) {
|
|
30
|
+
const series2 = this.counters.get(name) ?? /* @__PURE__ */ new Map();
|
|
31
|
+
if (!series2.has(labelKey(labels)) && series2.size >= this.maxSeriesPerMetric) {
|
|
32
|
+
this.recordDrop(name);
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
18
36
|
const series = this.getOrCreate(this.counters, name);
|
|
19
37
|
const key = labelKey(labels);
|
|
20
38
|
const state = series.get(key) ?? { value: 0 };
|
|
@@ -22,17 +40,36 @@ var InMemoryMetricsSink = class {
|
|
|
22
40
|
series.set(key, state);
|
|
23
41
|
}
|
|
24
42
|
gauge(name, value, labels) {
|
|
43
|
+
if (this.maxSeriesPerMetric !== void 0) {
|
|
44
|
+
const series2 = this.gauges.get(name) ?? /* @__PURE__ */ new Map();
|
|
45
|
+
if (!series2.has(labelKey(labels)) && series2.size >= this.maxSeriesPerMetric) {
|
|
46
|
+
this.recordDrop(name);
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
25
50
|
const series = this.getOrCreate(this.gauges, name);
|
|
26
51
|
series.set(labelKey(labels), { value });
|
|
27
52
|
}
|
|
28
53
|
histogram(name, value, labels) {
|
|
54
|
+
if (this.maxSeriesPerMetric !== void 0) {
|
|
55
|
+
const series2 = this.histograms.get(name) ?? /* @__PURE__ */ new Map();
|
|
56
|
+
if (!series2.has(labelKey(labels)) && series2.size >= this.maxSeriesPerMetric) {
|
|
57
|
+
this.recordDrop(name);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
29
61
|
const series = this.getOrCreate(this.histograms, name);
|
|
30
62
|
const key = labelKey(labels);
|
|
31
|
-
|
|
32
|
-
if (!
|
|
33
|
-
|
|
34
|
-
series.set(key,
|
|
63
|
+
const existing = series.get(key);
|
|
64
|
+
if (!existing) {
|
|
65
|
+
const created = { count: 0, sum: 0, min: value, max: value, samples: [] };
|
|
66
|
+
series.set(key, created);
|
|
67
|
+
this.advanceHistogram(created, value);
|
|
68
|
+
return;
|
|
35
69
|
}
|
|
70
|
+
this.advanceHistogram(existing, value);
|
|
71
|
+
}
|
|
72
|
+
advanceHistogram(state, value) {
|
|
36
73
|
state.count++;
|
|
37
74
|
state.sum += value;
|
|
38
75
|
if (value < state.min) state.min = value;
|
|
@@ -85,12 +122,40 @@ var InMemoryMetricsSink = class {
|
|
|
85
122
|
});
|
|
86
123
|
}
|
|
87
124
|
}
|
|
88
|
-
return { timestamp: Date.now(), series };
|
|
125
|
+
return { timestamp: Date.now(), series, droppedObservations: this.droppedByMetricSnapshot() };
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Cumulative drop counts across all metrics. Use to detect cardinality
|
|
129
|
+
* explosions (drift upward) without scraping the full snapshot. Returns 0
|
|
130
|
+
* for a sink created without `maxSeriesPerMetric`.
|
|
131
|
+
*/
|
|
132
|
+
droppedObservations() {
|
|
133
|
+
let total = 0;
|
|
134
|
+
for (const n of this.droppedByMetric.values()) total += n;
|
|
135
|
+
return total;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Drop count for a single metric, or 0 if no drops have been recorded.
|
|
139
|
+
* Cheaper than `droppedObservations()` for one-name lookups.
|
|
140
|
+
*/
|
|
141
|
+
droppedFor(name) {
|
|
142
|
+
return this.droppedByMetric.get(name) ?? 0;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Snapshot of per-metric drop counts. `undefined` for sinks without a cap
|
|
146
|
+
* (caller can treat the absence as "no drops possible"). For capped sinks
|
|
147
|
+
* an empty object means "cap set, no drops yet".
|
|
148
|
+
*/
|
|
149
|
+
droppedByMetricSnapshot() {
|
|
150
|
+
if (this.maxSeriesPerMetric === void 0) return void 0;
|
|
151
|
+
if (this.droppedByMetric.size === 0) return {};
|
|
152
|
+
return Object.fromEntries(this.droppedByMetric);
|
|
89
153
|
}
|
|
90
154
|
reset() {
|
|
91
155
|
this.counters.clear();
|
|
92
156
|
this.gauges.clear();
|
|
93
157
|
this.histograms.clear();
|
|
158
|
+
this.droppedByMetric.clear();
|
|
94
159
|
}
|
|
95
160
|
getOrCreate(bag, name) {
|
|
96
161
|
let series = bag.get(name);
|
|
@@ -100,6 +165,9 @@ var InMemoryMetricsSink = class {
|
|
|
100
165
|
}
|
|
101
166
|
return series;
|
|
102
167
|
}
|
|
168
|
+
recordDrop(name) {
|
|
169
|
+
this.droppedByMetric.set(name, (this.droppedByMetric.get(name) ?? 0) + 1);
|
|
170
|
+
}
|
|
103
171
|
};
|
|
104
172
|
function parseLabelKey(key) {
|
|
105
173
|
if (!key) return {};
|
|
@@ -120,6 +188,9 @@ var NoopMetricsSink = class {
|
|
|
120
188
|
snapshot() {
|
|
121
189
|
return { timestamp: Date.now(), series: [] };
|
|
122
190
|
}
|
|
191
|
+
droppedObservations() {
|
|
192
|
+
return 0;
|
|
193
|
+
}
|
|
123
194
|
reset() {
|
|
124
195
|
}
|
|
125
196
|
};
|
|
@@ -558,6 +629,7 @@ function hash(value) {
|
|
|
558
629
|
}
|
|
559
630
|
|
|
560
631
|
// src/observability/prometheus.ts
|
|
632
|
+
import { timingSafeEqual } from "node:crypto";
|
|
561
633
|
var NUMBER_FORMAT_INFINITY = "NaN";
|
|
562
634
|
function escapeLabelValue(v) {
|
|
563
635
|
return v.replace(/\\/g, "\\\\").replace(/\n/g, "\\n").replace(/"/g, '\\"');
|
|
@@ -614,6 +686,19 @@ function renderPrometheus(snapshot) {
|
|
|
614
686
|
return lines.join("\n") + "\n";
|
|
615
687
|
}
|
|
616
688
|
var PROMETHEUS_CONTENT_TYPE = "text/plain; version=0.0.4; charset=utf-8";
|
|
689
|
+
function isLoopbackBindHost(host) {
|
|
690
|
+
const h = host.trim().toLowerCase().replace(/^\[|\]$/g, "");
|
|
691
|
+
return h === "127.0.0.1" || h === "localhost" || h === "::1" || h.startsWith("127.");
|
|
692
|
+
}
|
|
693
|
+
function bearerMatches(header, token) {
|
|
694
|
+
if (!header) return false;
|
|
695
|
+
const prefix = "bearer ";
|
|
696
|
+
if (!header.toLowerCase().startsWith(prefix)) return false;
|
|
697
|
+
const supplied = Buffer.from(header.slice(prefix.length).trim(), "utf8");
|
|
698
|
+
const expected = Buffer.from(token, "utf8");
|
|
699
|
+
if (supplied.length !== expected.length) return false;
|
|
700
|
+
return timingSafeEqual(supplied, expected);
|
|
701
|
+
}
|
|
617
702
|
async function startMetricsServer(opts) {
|
|
618
703
|
const tls = opts.tls;
|
|
619
704
|
const useHttps = !!(tls?.cert && tls?.key);
|
|
@@ -621,12 +706,25 @@ async function startMetricsServer(opts) {
|
|
|
621
706
|
const path = opts.path ?? "/metrics";
|
|
622
707
|
const healthPath = opts.healthPath ?? "/healthz";
|
|
623
708
|
const healthRegistry = opts.healthRegistry;
|
|
709
|
+
const token = opts.token;
|
|
710
|
+
if (!isLoopbackBindHost(host) && !token) {
|
|
711
|
+
throw new Error(
|
|
712
|
+
`startMetricsServer: refusing to bind to non-loopback host "${host}" without a token \u2014 pass a token to expose metrics to the network, or bind to 127.0.0.1.`
|
|
713
|
+
);
|
|
714
|
+
}
|
|
624
715
|
const listener = (req, res) => {
|
|
625
716
|
if (!req.url || req.method !== "GET") {
|
|
626
717
|
res.statusCode = req.url ? 405 : 400;
|
|
627
718
|
res.end();
|
|
628
719
|
return;
|
|
629
720
|
}
|
|
721
|
+
if (token && !bearerMatches(req.headers.authorization, token)) {
|
|
722
|
+
res.statusCode = 401;
|
|
723
|
+
res.setHeader("www-authenticate", "Bearer");
|
|
724
|
+
res.setHeader("content-type", "text/plain; charset=utf-8");
|
|
725
|
+
res.end("Unauthorized");
|
|
726
|
+
return;
|
|
727
|
+
}
|
|
630
728
|
const url = req.url.split("?")[0];
|
|
631
729
|
if (url === path) {
|
|
632
730
|
let body;
|