@wrongstack/core 0.287.0 → 0.291.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/agent-status-tracker.d.ts +13 -0
- package/dist/agent-status-tracker.d.ts.map +1 -1
- package/dist/boot.d.ts.map +1 -1
- package/dist/chronicle/context.d.ts +13 -0
- package/dist/chronicle/context.d.ts.map +1 -0
- package/dist/chronicle/decision-adapter.d.ts +13 -0
- package/dist/chronicle/decision-adapter.d.ts.map +1 -0
- package/dist/chronicle/domain-adapter.d.ts +13 -0
- package/dist/chronicle/domain-adapter.d.ts.map +1 -0
- package/dist/chronicle/file-observer.d.ts +20 -0
- package/dist/chronicle/file-observer.d.ts.map +1 -0
- package/dist/chronicle/health-monitor.d.ts +11 -0
- package/dist/chronicle/health-monitor.d.ts.map +1 -0
- package/dist/chronicle/identity.d.ts +18 -0
- package/dist/chronicle/identity.d.ts.map +1 -0
- package/dist/chronicle/index.d.ts +16 -0
- package/dist/chronicle/index.d.ts.map +1 -0
- package/dist/chronicle/index.js +2555 -0
- package/dist/chronicle/index.js.map +7 -0
- package/dist/chronicle/journal.d.ts +81 -0
- package/dist/chronicle/journal.d.ts.map +1 -0
- package/dist/chronicle/process-adapter.d.ts +14 -0
- package/dist/chronicle/process-adapter.d.ts.map +1 -0
- package/dist/chronicle/prompt-manifest.d.ts +34 -0
- package/dist/chronicle/prompt-manifest.d.ts.map +1 -0
- package/dist/chronicle/provider-adapter.d.ts +13 -0
- package/dist/chronicle/provider-adapter.d.ts.map +1 -0
- package/dist/chronicle/query.d.ts +108 -0
- package/dist/chronicle/query.d.ts.map +1 -0
- package/dist/chronicle/rollup-adapter.d.ts +14 -0
- package/dist/chronicle/rollup-adapter.d.ts.map +1 -0
- package/dist/chronicle/stream-adapter.d.ts +13 -0
- package/dist/chronicle/stream-adapter.d.ts.map +1 -0
- package/dist/chronicle/tool-adapter.d.ts +15 -0
- package/dist/chronicle/tool-adapter.d.ts.map +1 -0
- package/dist/chronicle/types.d.ts +82 -0
- package/dist/chronicle/types.d.ts.map +1 -0
- package/dist/coordination/agent-monitor.d.ts +40 -0
- package/dist/coordination/agent-monitor.d.ts.map +1 -1
- package/dist/coordination/agent-subagent-runner.d.ts +7 -1
- package/dist/coordination/agent-subagent-runner.d.ts.map +1 -1
- package/dist/coordination/agents/phase6-domain.d.ts.map +1 -1
- package/dist/coordination/autonomous-coordinator.d.ts +2 -0
- package/dist/coordination/autonomous-coordinator.d.ts.map +1 -1
- package/dist/coordination/brain-monitor.d.ts +1 -1
- package/dist/coordination/brain.d.ts +3 -2
- package/dist/coordination/brain.d.ts.map +1 -1
- package/dist/coordination/collab-debug.d.ts +0 -9
- package/dist/coordination/collab-debug.d.ts.map +1 -1
- package/dist/coordination/coordinator/error-classifier.d.ts.map +1 -1
- package/dist/coordination/dep-watcher.d.ts +2 -1
- package/dist/coordination/dep-watcher.d.ts.map +1 -1
- package/dist/coordination/director/director-collab.d.ts +1 -1
- package/dist/coordination/director/director-collab.d.ts.map +1 -1
- package/dist/coordination/director-tools.d.ts.map +1 -1
- package/dist/coordination/director.d.ts +10 -1
- package/dist/coordination/director.d.ts.map +1 -1
- package/dist/coordination/file-author-tracker.d.ts.map +1 -1
- package/dist/coordination/fleet-bus.d.ts.map +1 -1
- package/dist/coordination/fleet-event-validation.d.ts +0 -7
- package/dist/coordination/fleet-event-validation.d.ts.map +1 -1
- package/dist/coordination/fleet-spawn.d.ts.map +1 -1
- package/dist/coordination/fleet-supervisor.d.ts +1 -1
- package/dist/coordination/fleet-supervisor.d.ts.map +1 -1
- package/dist/coordination/fleet.d.ts +0 -44
- package/dist/coordination/fleet.d.ts.map +1 -1
- package/dist/coordination/global-mailbox.d.ts +7 -1
- package/dist/coordination/global-mailbox.d.ts.map +1 -1
- package/dist/coordination/index.d.ts +5 -3
- package/dist/coordination/index.d.ts.map +1 -1
- package/dist/coordination/index.js +2426 -299
- package/dist/coordination/index.js.map +4 -4
- package/dist/coordination/knowledge-graph.d.ts +2 -1
- package/dist/coordination/knowledge-graph.d.ts.map +1 -1
- package/dist/coordination/large-answer-store.d.ts +0 -6
- package/dist/coordination/large-answer-store.d.ts.map +1 -1
- package/dist/coordination/mail-tools.d.ts +2 -2
- package/dist/coordination/mail-tools.d.ts.map +1 -1
- package/dist/coordination/mailbox-hooks.d.ts +2 -0
- package/dist/coordination/mailbox-hooks.d.ts.map +1 -1
- package/dist/coordination/mailbox-http-router.d.ts +43 -0
- package/dist/coordination/mailbox-http-router.d.ts.map +1 -0
- package/dist/coordination/mailbox-message-codec.d.ts +35 -0
- package/dist/coordination/mailbox-message-codec.d.ts.map +1 -1
- package/dist/coordination/mailbox-tool.d.ts +1 -1
- package/dist/coordination/mailbox-tool.d.ts.map +1 -1
- package/dist/coordination/mailbox-types.d.ts +170 -10
- package/dist/coordination/mailbox-types.d.ts.map +1 -1
- package/dist/coordination/mailbox.d.ts +1 -1
- package/dist/coordination/mailbox.d.ts.map +1 -1
- package/dist/coordination/package-author-tracker.d.ts.map +1 -1
- package/dist/coordination/provider-status-tracker.d.ts +236 -0
- package/dist/coordination/provider-status-tracker.d.ts.map +1 -0
- package/dist/coordination/subagent-budget.d.ts +2 -1
- package/dist/coordination/subagent-budget.d.ts.map +1 -1
- package/dist/core/agent-loop.d.ts +8 -3
- package/dist/core/agent-loop.d.ts.map +1 -1
- package/dist/core/agent-response.d.ts +5 -4
- package/dist/core/agent-response.d.ts.map +1 -1
- package/dist/core/agent-tools.d.ts +1 -1
- package/dist/core/agent-tools.d.ts.map +1 -1
- package/dist/core/agent.d.ts +4 -2
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/context.d.ts +55 -1
- package/dist/core/context.d.ts.map +1 -1
- package/dist/core/fallback-model.d.ts +14 -8
- package/dist/core/fallback-model.d.ts.map +1 -1
- package/dist/core/fallback-profile-manager.d.ts +118 -0
- package/dist/core/fallback-profile-manager.d.ts.map +1 -0
- package/dist/core/fleet-pulse.d.ts +2 -1
- package/dist/core/fleet-pulse.d.ts.map +1 -1
- package/dist/core/iteration-limit.d.ts +2 -1
- package/dist/core/iteration-limit.d.ts.map +1 -1
- package/dist/core/mailbox-loop.d.ts +16 -1
- package/dist/core/mailbox-loop.d.ts.map +1 -1
- package/dist/core/model-availability-calendar.d.ts +27 -0
- package/dist/core/model-availability-calendar.d.ts.map +1 -0
- package/dist/core/provider-runner.d.ts.map +1 -1
- package/dist/core/system-prompt-builder.d.ts +2 -1
- package/dist/core/system-prompt-builder.d.ts.map +1 -1
- package/dist/defaults/index.js +1920 -598
- package/dist/defaults/index.js.map +4 -4
- package/dist/execution/auto-compaction-middleware.d.ts +3 -2
- package/dist/execution/auto-compaction-middleware.d.ts.map +1 -1
- package/dist/execution/compaction-core.d.ts.map +1 -1
- package/dist/execution/council-brain.d.ts +28 -49
- package/dist/execution/council-brain.d.ts.map +1 -1
- package/dist/execution/council-orchestrator.d.ts +30 -0
- package/dist/execution/council-orchestrator.d.ts.map +1 -1
- package/dist/execution/enhance-recovery.d.ts +8 -0
- package/dist/execution/enhance-recovery.d.ts.map +1 -1
- package/dist/execution/error-handler.d.ts +2 -2
- package/dist/execution/error-handler.d.ts.map +1 -1
- package/dist/execution/eternal-autonomy.d.ts.map +1 -1
- package/dist/execution/index.js +2600 -1903
- package/dist/execution/index.js.map +4 -4
- package/dist/execution/intelligent-compactor.d.ts +0 -16
- package/dist/execution/intelligent-compactor.d.ts.map +1 -1
- package/dist/execution/model-runtime.d.ts.map +1 -1
- package/dist/execution/one-shot-llm.d.ts +9 -1
- package/dist/execution/one-shot-llm.d.ts.map +1 -1
- package/dist/execution/prompt-enhancer.d.ts +36 -0
- package/dist/execution/prompt-enhancer.d.ts.map +1 -1
- package/dist/execution/prompt-enhancer.js +158 -10
- package/dist/execution/prompt-enhancer.js.map +2 -2
- package/dist/execution/retry-policy.d.ts +0 -13
- package/dist/execution/retry-policy.d.ts.map +1 -1
- package/dist/execution/skill-loader.d.ts.map +1 -1
- package/dist/execution/tool-executor.d.ts.map +1 -1
- package/dist/goal/checkpoint.d.ts.map +1 -0
- package/dist/{autophase/auto-phase-planner.d.ts → goal/goal-planner.d.ts} +8 -8
- package/dist/goal/goal-planner.d.ts.map +1 -0
- package/dist/{autophase/auto-phase-runner.d.ts → goal/goal-runner.d.ts} +10 -10
- package/dist/goal/goal-runner.d.ts.map +1 -0
- package/dist/{autophase → goal}/index.d.ts +3 -3
- package/dist/goal/index.d.ts.map +1 -0
- package/dist/goal/phase-graph-builder.d.ts.map +1 -0
- package/dist/{autophase → goal}/phase-orchestrator.d.ts +2 -2
- package/dist/goal/phase-orchestrator.d.ts.map +1 -0
- package/dist/goal/phase-store.d.ts.map +1 -0
- package/dist/{autophase → goal}/types.d.ts +2 -2
- package/dist/goal/types.d.ts.map +1 -0
- package/dist/hq/auth-store.d.ts.map +1 -1
- package/dist/hq/commands.d.ts +2 -1
- package/dist/hq/commands.d.ts.map +1 -1
- package/dist/hq/exposure.d.ts +66 -0
- package/dist/hq/exposure.d.ts.map +1 -0
- package/dist/hq/index.d.ts +1 -0
- package/dist/hq/index.d.ts.map +1 -1
- package/dist/hq/index.js +190 -21
- package/dist/hq/index.js.map +4 -4
- package/dist/hq/mailbox-mapper.d.ts +13 -1
- package/dist/hq/mailbox-mapper.d.ts.map +1 -1
- package/dist/hq/protocol/browser.d.ts +9 -1
- package/dist/hq/protocol/browser.d.ts.map +1 -1
- package/dist/hq/protocol/client.d.ts +2 -2
- package/dist/hq/protocol/client.d.ts.map +1 -1
- package/dist/hq/protocol/core.d.ts.map +1 -1
- package/dist/hq/protocol/mailbox.d.ts +6 -0
- package/dist/hq/protocol/mailbox.d.ts.map +1 -1
- package/dist/hq/protocol/session.d.ts +4 -0
- package/dist/hq/protocol/session.d.ts.map +1 -1
- package/dist/hq/publisher.d.ts.map +1 -1
- package/dist/index.d.ts +34 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +30287 -22214
- package/dist/index.js.map +4 -4
- package/dist/infrastructure/index.js +60 -5
- package/dist/infrastructure/index.js.map +2 -2
- package/dist/kernel/events/agent-events.d.ts +33 -1
- package/dist/kernel/events/agent-events.d.ts.map +1 -1
- package/dist/kernel/events/file-events.d.ts +65 -0
- package/dist/kernel/events/file-events.d.ts.map +1 -0
- package/dist/kernel/events/memory-events.d.ts +36 -0
- package/dist/kernel/events/memory-events.d.ts.map +1 -1
- package/dist/kernel/events/network-events.d.ts +60 -0
- package/dist/kernel/events/network-events.d.ts.map +1 -0
- package/dist/kernel/events/process-events.d.ts +44 -0
- package/dist/kernel/events/process-events.d.ts.map +1 -0
- package/dist/kernel/events/provider-events.d.ts +89 -0
- package/dist/kernel/events/provider-events.d.ts.map +1 -1
- package/dist/kernel/events/tool-events.d.ts +10 -0
- package/dist/kernel/events/tool-events.d.ts.map +1 -1
- package/dist/kernel/events/worktree-events.d.ts +1 -1
- package/dist/kernel/events.d.ts +14 -1
- package/dist/kernel/events.d.ts.map +1 -1
- package/dist/kernel/index.js +2 -1
- package/dist/kernel/index.js.map +2 -2
- package/dist/kernel/tokens.d.ts +3 -1
- package/dist/kernel/tokens.d.ts.map +1 -1
- package/dist/mailbox-attach.d.ts.map +1 -1
- package/dist/models/index.js.map +2 -2
- package/dist/observability/index.d.ts +3 -0
- package/dist/observability/index.d.ts.map +1 -1
- package/dist/observability/index.js +278 -0
- package/dist/observability/index.js.map +4 -4
- package/dist/observability/network-telemetry.d.ts +15 -0
- package/dist/observability/network-telemetry.d.ts.map +1 -0
- package/dist/observability/process-telemetry.d.ts +18 -0
- package/dist/observability/process-telemetry.d.ts.map +1 -0
- package/dist/observability/redact-command.d.ts +20 -0
- package/dist/observability/redact-command.d.ts.map +1 -0
- package/dist/plugins/auto-review-plugin.d.ts +56 -3
- package/dist/plugins/auto-review-plugin.d.ts.map +1 -1
- package/dist/plugins/chimera-plugin.d.ts +164 -5
- package/dist/plugins/chimera-plugin.d.ts.map +1 -1
- package/dist/plugins/review-context-builder.d.ts +52 -0
- package/dist/plugins/review-context-builder.d.ts.map +1 -0
- package/dist/security/index.d.ts +1 -0
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +186 -9
- package/dist/security/index.js.map +4 -4
- package/dist/security/kanban-boundary.d.ts +10 -0
- package/dist/security/kanban-boundary.d.ts.map +1 -0
- package/dist/security/permission-policy.d.ts +1 -0
- package/dist/security/permission-policy.d.ts.map +1 -1
- package/dist/session-registry.d.ts +80 -0
- package/dist/session-registry.d.ts.map +1 -1
- package/dist/skills/index.js.map +2 -2
- package/dist/storage/config-loader.d.ts +7 -0
- package/dist/storage/config-loader.d.ts.map +1 -1
- package/dist/storage/file-session-writer.d.ts +20 -7
- package/dist/storage/file-session-writer.d.ts.map +1 -1
- package/dist/storage/goal-coordination.d.ts +40 -0
- package/dist/storage/goal-coordination.d.ts.map +1 -0
- package/dist/storage/goal-store.d.ts +9 -5
- package/dist/storage/goal-store.d.ts.map +1 -1
- package/dist/storage/index.d.ts +4 -2
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +1066 -226
- package/dist/storage/index.js.map +4 -4
- package/dist/storage/memory-consolidator.d.ts +49 -4
- package/dist/storage/memory-consolidator.d.ts.map +1 -1
- package/dist/storage/memory-graph-backend.d.ts +11 -0
- package/dist/storage/memory-graph-backend.d.ts.map +1 -1
- package/dist/storage/provider-config-watcher.d.ts +19 -0
- package/dist/storage/provider-config-watcher.d.ts.map +1 -1
- package/dist/storage/session-event-bridge.d.ts +2 -2
- package/dist/storage/session-event-bridge.d.ts.map +1 -1
- package/dist/storage/session-resume-validation.d.ts +10 -0
- package/dist/storage/session-resume-validation.d.ts.map +1 -1
- package/dist/storage/session-rewind-apply.d.ts +53 -0
- package/dist/storage/session-rewind-apply.d.ts.map +1 -0
- package/dist/storage/session-rewinder.d.ts.map +1 -1
- package/dist/storage/session-store.d.ts.map +1 -1
- package/dist/tasking/index.js.map +1 -1
- package/dist/tasking/task-store.d.ts +1 -1
- package/dist/tools/council-tool.d.ts +3 -0
- package/dist/tools/council-tool.d.ts.map +1 -1
- package/dist/tools/fallback-manage-tools.d.ts +82 -0
- package/dist/tools/fallback-manage-tools.d.ts.map +1 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +3423 -192
- package/dist/tools/index.js.map +4 -4
- package/dist/tools/one-shot-llm-tool.d.ts +2 -0
- package/dist/tools/one-shot-llm-tool.d.ts.map +1 -1
- package/dist/types/config.d.ts +76 -7
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/file-event-record.d.ts +68 -0
- package/dist/types/file-event-record.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +13 -8
- package/dist/types/index.js.map +3 -3
- package/dist/types/memory.d.ts +12 -0
- package/dist/types/memory.d.ts.map +1 -1
- package/dist/types/multi-agent.d.ts +12 -1
- package/dist/types/multi-agent.d.ts.map +1 -1
- package/dist/types/one-shot-llm.d.ts +16 -7
- package/dist/types/one-shot-llm.d.ts.map +1 -1
- package/dist/types/provider.d.ts +1 -1
- package/dist/types/provider.d.ts.map +1 -1
- package/dist/types/session.d.ts +68 -2
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/tool-executor.d.ts +2 -0
- package/dist/types/tool-executor.d.ts.map +1 -1
- package/dist/types/tool.d.ts +5 -0
- package/dist/types/tool.d.ts.map +1 -1
- package/dist/utils/atomic-write.d.ts.map +1 -1
- package/dist/utils/index.d.ts +10 -10
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +497 -254
- package/dist/utils/index.js.map +4 -4
- package/dist/utils/message-invariants.d.ts +9 -0
- package/dist/utils/message-invariants.d.ts.map +1 -1
- package/dist/utils/safe-json.d.ts +1 -1
- package/dist/utils/safe-json.d.ts.map +1 -1
- package/dist/utils/term.d.ts +279 -0
- package/dist/utils/term.d.ts.map +1 -1
- package/dist/utils/tool-wire-compact.d.ts +9 -0
- package/dist/utils/tool-wire-compact.d.ts.map +1 -1
- package/dist/utils/wstack-paths.d.ts +12 -2
- package/dist/utils/wstack-paths.d.ts.map +1 -1
- package/dist/worktree/worktree-manager.d.ts +1 -1
- package/dist/worktree/worktree-manager.d.ts.map +1 -1
- package/instructions/agents/ios.md +113 -0
- package/instructions/agents/search.md +1 -1
- package/instructions/llm/chimera-review.md +66 -9
- package/instructions/llm/memory-consolidator.md +4 -12
- package/instructions/llm/prompt-enhancer.md +3 -1
- package/instructions/sections/tool/common-patterns.md +3 -3
- package/instructions/system.md +40 -5
- package/package.json +7 -3
- package/skills/auto-review/SKILL.md +176 -0
- package/skills/mnemosyne/SKILL.md +156 -0
- package/skills/mnemosyne/instructions/agent-prompt.md +200 -0
- package/dist/autophase/auto-phase-planner.d.ts.map +0 -1
- package/dist/autophase/auto-phase-runner.d.ts.map +0 -1
- package/dist/autophase/checkpoint.d.ts.map +0 -1
- package/dist/autophase/index.d.ts.map +0 -1
- package/dist/autophase/phase-graph-builder.d.ts.map +0 -1
- package/dist/autophase/phase-orchestrator.d.ts.map +0 -1
- package/dist/autophase/phase-store.d.ts.map +0 -1
- package/dist/autophase/types.d.ts.map +0 -1
- /package/dist/{autophase → goal}/checkpoint.d.ts +0 -0
- /package/dist/{autophase → goal}/phase-graph-builder.d.ts +0 -0
- /package/dist/{autophase → goal}/phase-store.d.ts +0 -0
- /package/instructions/{autophase → goal}/phase-planner.md +0 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProviderModelStatusTracker — centralized, shared status tracking for every
|
|
3
|
+
* provider/model combination used across the agent, subagents, fallback
|
|
4
|
+
* chains, and the one-shot LLM helper.
|
|
5
|
+
*
|
|
6
|
+
* ## Design
|
|
7
|
+
*
|
|
8
|
+
* - **Single shared instance**: created once per process, injected into every
|
|
9
|
+
* component that calls providers or resolves fallback chains. The same
|
|
10
|
+
* in-memory state is visible to the fallback extension, the one-shot
|
|
11
|
+
* orchestrator, the dispatcher, and fleet-spawn — so a provider blocked
|
|
12
|
+
* by a rate-limit spike is filtered EVERYWHERE, not just in one path.
|
|
13
|
+
*
|
|
14
|
+
* - **State machine** per (providerId, model) pair:
|
|
15
|
+
* ```
|
|
16
|
+
* healthy ──(failure)──▶ degraded ──(more failures)──▶ blocked
|
|
17
|
+
* ▲ │
|
|
18
|
+
* └──────────────(success streak / timeout)────────────┘
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* - **Thresholds** are configurable via constructor opts. Defaults:
|
|
22
|
+
* | Metric | Threshold | Action |
|
|
23
|
+
* |--------|-----------|--------|
|
|
24
|
+
* | consecutive failures ≥ 2 | → `degraded` for 30 s |
|
|
25
|
+
* | rate-limit hits ≥ 3 | → `blocked` for 5 min |
|
|
26
|
+
* | consecutive failures ≥ 5 | → `blocked` for 5 min |
|
|
27
|
+
* | success streak ≥ 3 | → back to `healthy` |
|
|
28
|
+
* | `blocked` timeout elapses | → back to `healthy` |
|
|
29
|
+
*
|
|
30
|
+
* - **Error history**: keeps the last N errors per pair, with session id,
|
|
31
|
+
* agent id, kind, and message so the WebUI and `/provider-status` can
|
|
32
|
+
* render a meaningful timeline.
|
|
33
|
+
*
|
|
34
|
+
* - **Events**: emits `provider.status_changed` on every state transition.
|
|
35
|
+
*
|
|
36
|
+
* - **Thread-safety**: not needed — Node.js event-loop concurrency means
|
|
37
|
+
* all access is single-threaded (async gaps don't race on the Map).
|
|
38
|
+
*
|
|
39
|
+
* @module coordination/provider-status-tracker
|
|
40
|
+
*/
|
|
41
|
+
import type { EventBus } from '../kernel/events.js';
|
|
42
|
+
import type { ProviderErrorKind } from '../types/provider.js';
|
|
43
|
+
export type ProviderModelState = 'healthy' | 'degraded' | 'blocked';
|
|
44
|
+
export interface ErrorHistoryEntry {
|
|
45
|
+
readonly timestamp: number;
|
|
46
|
+
readonly kind: ProviderErrorKind;
|
|
47
|
+
readonly status: number;
|
|
48
|
+
readonly message: string;
|
|
49
|
+
readonly sessionId?: string | undefined;
|
|
50
|
+
readonly agentId?: string | undefined;
|
|
51
|
+
readonly retryAfterMs?: number | undefined;
|
|
52
|
+
}
|
|
53
|
+
export interface ProviderModelStatus {
|
|
54
|
+
readonly providerId: string;
|
|
55
|
+
readonly model: string;
|
|
56
|
+
/** Current state in the state machine. */
|
|
57
|
+
readonly state: ProviderModelState;
|
|
58
|
+
readonly consecutiveFailures: number;
|
|
59
|
+
readonly totalFailures: number;
|
|
60
|
+
readonly rateLimitHits: number;
|
|
61
|
+
readonly overloadedHits: number;
|
|
62
|
+
readonly serverErrors: number;
|
|
63
|
+
readonly otherErrors: number;
|
|
64
|
+
readonly consecutiveSuccesses: number;
|
|
65
|
+
readonly totalSuccesses: number;
|
|
66
|
+
readonly lastSuccessAt: number | null;
|
|
67
|
+
readonly firstFailureAt: number | null;
|
|
68
|
+
readonly lastFailureAt: number | null;
|
|
69
|
+
/** When the current degraded or blocked state expires (ms epoch), or null. */
|
|
70
|
+
readonly stateExpiresAt: number | null;
|
|
71
|
+
readonly lastErrorKind: ProviderErrorKind | null;
|
|
72
|
+
readonly lastErrorMessage: string | null;
|
|
73
|
+
readonly lastErrorStatus: number | null;
|
|
74
|
+
readonly lastSessionId: string | null;
|
|
75
|
+
readonly lastAgentId: string | null;
|
|
76
|
+
/** Recent error history (newest-first, capped to `maxErrorHistory`). */
|
|
77
|
+
readonly recentErrors: readonly ErrorHistoryEntry[];
|
|
78
|
+
}
|
|
79
|
+
export interface ProviderStatusTrackerConfig {
|
|
80
|
+
/**
|
|
81
|
+
* Consecutive failures before entering `degraded`. Default: 2.
|
|
82
|
+
*/
|
|
83
|
+
degradedAfterFailures?: number;
|
|
84
|
+
/**
|
|
85
|
+
* Duration (ms) the provider stays in `degraded` before reverting to healthy.
|
|
86
|
+
* Default: 30_000 (30 s).
|
|
87
|
+
*/
|
|
88
|
+
degradedDurationMs?: number;
|
|
89
|
+
/**
|
|
90
|
+
* Rate-limit hits (error kind = 'rate_limit') before entering `blocked`.
|
|
91
|
+
* Default: 3.
|
|
92
|
+
*/
|
|
93
|
+
blockAfterRateLimitHits?: number;
|
|
94
|
+
/**
|
|
95
|
+
* Consecutive failures before entering `blocked` directly.
|
|
96
|
+
* Default: 5.
|
|
97
|
+
*/
|
|
98
|
+
blockAfterFailures?: number;
|
|
99
|
+
/**
|
|
100
|
+
* Duration (ms) the provider stays `blocked`. Default: 300_000 (5 min).
|
|
101
|
+
*/
|
|
102
|
+
blockDurationMs?: number;
|
|
103
|
+
/**
|
|
104
|
+
* Cooldown for an explicit exhausted-credit/quota response when the
|
|
105
|
+
* provider does not publish a reset hint. These failures enter the waiting
|
|
106
|
+
* room immediately instead of consuming the ordinary rate-limit threshold.
|
|
107
|
+
* Default: 900_000 (15 min).
|
|
108
|
+
*/
|
|
109
|
+
quotaBlockDurationMs?: number;
|
|
110
|
+
/**
|
|
111
|
+
* Consecutive successes needed to leave `degraded` or `blocked` and return
|
|
112
|
+
* to `healthy` (if the timeout hasn't already cleared it). Default: 3.
|
|
113
|
+
*/
|
|
114
|
+
recoverAfterSuccesses?: number;
|
|
115
|
+
/**
|
|
116
|
+
* Maximum error history entries kept per (providerId, model) pair.
|
|
117
|
+
* Default: 50.
|
|
118
|
+
*/
|
|
119
|
+
maxErrorHistory?: number;
|
|
120
|
+
}
|
|
121
|
+
export declare class ProviderModelStatusTracker {
|
|
122
|
+
private readonly cfg;
|
|
123
|
+
private readonly map;
|
|
124
|
+
private readonly events;
|
|
125
|
+
constructor(opts?: {
|
|
126
|
+
config?: ProviderStatusTrackerConfig | undefined;
|
|
127
|
+
events?: EventBus | undefined;
|
|
128
|
+
});
|
|
129
|
+
/** Resolve the logical health/display identity without changing wire routing. */
|
|
130
|
+
logicalIdentity(providerId: string, model: string): {
|
|
131
|
+
providerId: string;
|
|
132
|
+
model: string;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Record a successful provider call. Resets consecutive failure counters
|
|
136
|
+
* and may transition out of degraded/blocked.
|
|
137
|
+
*/
|
|
138
|
+
recordSuccess(providerId: string, model: string, _meta?: {
|
|
139
|
+
sessionId?: string | undefined;
|
|
140
|
+
agentId?: string | undefined;
|
|
141
|
+
}): void;
|
|
142
|
+
/**
|
|
143
|
+
* Record a failed provider call. Transitions state based on thresholds.
|
|
144
|
+
*
|
|
145
|
+
* @returns The new state after recording this failure.
|
|
146
|
+
*/
|
|
147
|
+
recordFailure(providerId: string, model: string, kind: ProviderErrorKind, status: number, message: string, meta?: {
|
|
148
|
+
sessionId?: string | undefined;
|
|
149
|
+
agentId?: string | undefined;
|
|
150
|
+
retryAfterMs?: number | undefined;
|
|
151
|
+
}): ProviderModelState;
|
|
152
|
+
/**
|
|
153
|
+
* Check if a (providerId, model) pair is currently usable.
|
|
154
|
+
* Returns `true` when healthy or degraded (degraded is still usable,
|
|
155
|
+
* just known flaky). Returns `false` when blocked or when the error
|
|
156
|
+
* kind is `auth` (no point retrying ever).
|
|
157
|
+
*/
|
|
158
|
+
isAvailable(providerId: string, model: string): boolean;
|
|
159
|
+
/**
|
|
160
|
+
* Check if a (providerId, model) pair is currently rate-limited.
|
|
161
|
+
* This is a stronger signal than just `!isAvailable()` — it tells
|
|
162
|
+
* callers that requests should be re-tried after a delay rather
|
|
163
|
+
* than skipped permanently.
|
|
164
|
+
*/
|
|
165
|
+
isRateLimited(providerId: string, model: string): boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Get the full status for a (providerId, model) pair, or `undefined`
|
|
168
|
+
* if no failures have been recorded.
|
|
169
|
+
*/
|
|
170
|
+
getStatus(providerId: string, model: string): ProviderModelStatus | undefined;
|
|
171
|
+
/**
|
|
172
|
+
* Returns a snapshot of ALL tracked provider/model statuses.
|
|
173
|
+
* Useful for the `/provider-status` command and WebUI.
|
|
174
|
+
*/
|
|
175
|
+
getAllStatuses(): ProviderModelStatus[];
|
|
176
|
+
/**
|
|
177
|
+
* Move every expired waiting-room entry back to healthy. Runtime routing
|
|
178
|
+
* already performs this check lazily; this explicit sweep lets a UI/status
|
|
179
|
+
* timer refresh the room even while no model calls are being made.
|
|
180
|
+
*
|
|
181
|
+
* @returns Number of entries released by this sweep.
|
|
182
|
+
*/
|
|
183
|
+
sweepExpired(): number;
|
|
184
|
+
/**
|
|
185
|
+
* Release one entry for an immediate half-open probe on its next real use.
|
|
186
|
+
* History and totals are retained so operators do not lose diagnostics.
|
|
187
|
+
*/
|
|
188
|
+
retryNow(providerId: string, model: string): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Returns only currently blocked entries.
|
|
191
|
+
*/
|
|
192
|
+
getBlocked(): ProviderModelStatus[];
|
|
193
|
+
/**
|
|
194
|
+
* Returns only currently degraded entries.
|
|
195
|
+
*/
|
|
196
|
+
getDegraded(): ProviderModelStatus[];
|
|
197
|
+
/**
|
|
198
|
+
* Filter an array of objects that have `providerId` and `model` fields,
|
|
199
|
+
* removing entries whose (providerId, model) is blocked.
|
|
200
|
+
*/
|
|
201
|
+
filterAvailable<T extends {
|
|
202
|
+
providerId: string;
|
|
203
|
+
model: string;
|
|
204
|
+
}>(entries: readonly T[]): T[];
|
|
205
|
+
/**
|
|
206
|
+
* Check if a (providerId, model) pair would be blocked, WITHOUT the
|
|
207
|
+
* side-effect of auto-recovering stale entries. Used in hot paths
|
|
208
|
+
* where we don't want to mutate state during a quick peek.
|
|
209
|
+
*/
|
|
210
|
+
isBlocked(providerId: string, model: string): boolean;
|
|
211
|
+
/**
|
|
212
|
+
* Reset tracking for a specific (providerId, model) pair, or for ALL
|
|
213
|
+
* pairs when both arguments are omitted.
|
|
214
|
+
*/
|
|
215
|
+
clear(providerId?: string, model?: string): void;
|
|
216
|
+
/**
|
|
217
|
+
* Get a JSON-safe snapshot suitable for WebUI rendering.
|
|
218
|
+
* Includes summary stats + per-pair details.
|
|
219
|
+
*/
|
|
220
|
+
getSnapshot(): ProviderStatusSnapshot;
|
|
221
|
+
/** Restore non-expired waiting-room entries from a previous process. */
|
|
222
|
+
restoreSnapshot(value: unknown): number;
|
|
223
|
+
private getOrCreate;
|
|
224
|
+
private freezeStatus;
|
|
225
|
+
private emitStatusChanged;
|
|
226
|
+
}
|
|
227
|
+
export interface ProviderStatusSnapshot {
|
|
228
|
+
readonly totalPairs: number;
|
|
229
|
+
readonly healthy: number;
|
|
230
|
+
readonly degraded: number;
|
|
231
|
+
readonly blocked: number;
|
|
232
|
+
readonly totalFailures: number;
|
|
233
|
+
readonly totalRateLimits: number;
|
|
234
|
+
readonly statuses: readonly ProviderModelStatus[];
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=provider-status-tracker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider-status-tracker.d.ts","sourceRoot":"","sources":["../../src/coordination/provider-status-tracker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAI9D,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAEpE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5C;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,0CAA0C;IAC1C,QAAQ,CAAC,KAAK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M,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,SAAS,mBAAmB,EAAE,CAAC;CACnD"}
|
|
@@ -61,7 +61,7 @@ export interface BudgetLimits {
|
|
|
61
61
|
*/
|
|
62
62
|
export type BudgetNegotiationMode = 'auto' | 'sync';
|
|
63
63
|
export type BudgetSessionIdSource = string | (() => string | undefined);
|
|
64
|
-
|
|
64
|
+
interface SubagentBudgetOptions {
|
|
65
65
|
sessionId?: BudgetSessionIdSource | undefined;
|
|
66
66
|
}
|
|
67
67
|
export interface BudgetUsage {
|
|
@@ -320,4 +320,5 @@ export declare class SubagentBudget {
|
|
|
320
320
|
isTimedOut(): boolean;
|
|
321
321
|
usage(): BudgetUsage;
|
|
322
322
|
}
|
|
323
|
+
export {};
|
|
323
324
|
//# sourceMappingURL=subagent-budget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-budget.d.ts","sourceRoot":"","sources":["../../src/coordination/subagent-budget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,cAAc,GAAG,MAAM,CAAC;AAEtG;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,QAAS,CAAC;AAE1C,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CA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YACW,mBAAmB;IAoCjC,eAAe,IAAI,IAAI,CAItB;IAED,cAAc,IAAI,IAAI,CAIrB;IAED,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,SAAI,GAAG,IAAI,CAM3C;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,YAAY,IAAI,IAAI,CAkBnB;IAED,kFAAkF;IAClF,UAAU,IAAI,OAAO,CAMpB;IAED,KAAK,IAAI,WAAW,CAYnB;CACF"}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent loop handler — extracted from Agent class.
|
|
3
|
+
* Contains runInner (the main iteration loop), checkIterationLimit,
|
|
4
|
+
* compactContextIfNeeded, emitContextPct, and injectPendingBtwNotes.
|
|
5
|
+
*/
|
|
1
6
|
import type { RunController } from '../kernel/run-controller.js';
|
|
2
|
-
import type { RunOptions } from './context.js';
|
|
3
|
-
import type { RunResult, UserInputPayload } from './agent-types.js';
|
|
4
7
|
import type { AgentInternals } from './agent-internals.js';
|
|
5
|
-
import type { AgentToolHandler } from './agent-tools.js';
|
|
6
8
|
import type { AgentResponseHandler } from './agent-response.js';
|
|
9
|
+
import type { AgentToolHandler } from './agent-tools.js';
|
|
10
|
+
import type { RunResult, UserInputPayload } from './agent-types.js';
|
|
11
|
+
import type { RunOptions } from './context.js';
|
|
7
12
|
/** Extract a human-readable reason from an AbortSignal. */
|
|
8
13
|
export declare function signalAbortReason(signal: AbortSignal): string;
|
|
9
14
|
interface LoopHandlers {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-loop.d.ts","sourceRoot":"","sources":["../../src/core/agent-loop.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-loop.d.ts","sourceRoot":"","sources":["../../src/core/agent-loop.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAiBjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAW/C,2DAA2D;AAC3D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAK7D;AAED,UAAU,YAAY;IACpB,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,oBAAoB,CAAC;CAChC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CACN,YAAY,EAAE,gBAAgB,EAC9B,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,aAAa,EACzB,kBAAkB,EAAE,OAAO,GAC1B,OAAO,CAAC,SAAS,CAAC,CAAC;CACvB;AAED,wBAAgB,sBAAsB,CACpC,CAAC,EAAE,cAAc,EACjB,QAAQ,EAAE,YAAY,GACrB,gBAAgB,CA29BlB"}
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Handles provider response pipeline, event emission, session
|
|
4
4
|
* persistence, text rendering, and autonomous continuation parsing.
|
|
5
5
|
*/
|
|
6
|
-
import type { Request, Response } from '../types/provider.js';
|
|
7
6
|
import { type TextBlock } from '../types/blocks.js';
|
|
8
|
-
import {
|
|
9
|
-
import type { Context, RunOptions } from './context.js';
|
|
7
|
+
import type { Request, Response } from '../types/provider.js';
|
|
10
8
|
import type { AgentInternals } from './agent-internals.js';
|
|
11
|
-
|
|
9
|
+
import type { Context, RunOptions } from './context.js';
|
|
10
|
+
import { type ContinueDirective } from './continue-to-next-iteration.js';
|
|
11
|
+
interface ProcessResponseResult {
|
|
12
12
|
finalText: string;
|
|
13
13
|
aborted: boolean;
|
|
14
14
|
done: boolean;
|
|
@@ -27,4 +27,5 @@ export interface AgentResponseHandler {
|
|
|
27
27
|
*/
|
|
28
28
|
export declare function buildLiveNextStepsGateBlock(ctx: Pick<Context, 'agentId' | 'todos'>): TextBlock | undefined;
|
|
29
29
|
export declare function createAgentResponseHandler(a: AgentInternals): AgentResponseHandler;
|
|
30
|
+
export {};
|
|
30
31
|
//# sourceMappingURL=agent-response.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-response.d.ts","sourceRoot":"","sources":["../../src/core/agent-response.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"agent-response.d.ts","sourceRoot":"","sources":["../../src/core/agent-response.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAO9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,KAAK,iBAAiB,EAA0B,MAAM,iCAAiC,CAAC;AAEjG,UAAU,qBAAqB;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,CAAC,EAAE,iBAAiB,GAAG,SAAS,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB;IACnC,0BAA0B,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/D,eAAe,CAAC,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;CAC9E;AAKD;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,GACtC,SAAS,GAAG,SAAS,CA+CvB;AAED,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,cAAc,GAAG,oBAAoB,CAkJlF"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Handles batch tool execution, confirmation flow, and post-execution
|
|
4
4
|
* pipeline/session/event emission.
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
6
|
+
import type { ToolResultBlock, ToolUseBlock } from '../types/blocks.js';
|
|
7
7
|
import type { Tool } from '../types/tool.js';
|
|
8
8
|
import type { AgentInternals } from './agent-internals.js';
|
|
9
9
|
export interface AgentToolHandler {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-tools.d.ts","sourceRoot":"","sources":["../../src/core/agent-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAgB,
|
|
1
|
+
{"version":3,"file":"agent-tools.d.ts","sourceRoot":"","sources":["../../src/core/agent-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAgB,eAAe,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEtF,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAI7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAc3D,MAAM,WAAW,gBAAgB;IAC/B,YAAY,CAAC,QAAQ,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IACnE,yBAAyB,CACvB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,GAChD,OAAO,CAAC;QAAE,MAAM,EAAE,eAAe,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7D;AAED,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,cAAc,GAAG,gBAAgB,CAkU1E"}
|
package/dist/core/agent.d.ts
CHANGED
|
@@ -12,9 +12,9 @@ import type { Renderer } from '../types/renderer.js';
|
|
|
12
12
|
import type { RetryPolicy } from '../types/retry-policy.js';
|
|
13
13
|
import type { Tool } from '../types/tool.js';
|
|
14
14
|
import type { ToolExecutorLike } from '../types/tool-executor.js';
|
|
15
|
-
import { type
|
|
15
|
+
import { type AgentInit, type AgentInput, type AgentPipelines, type ResolvedLoopDetectionConfig, type RunResult } from './agent-types.js';
|
|
16
16
|
import type { Context, RunOptions } from './context.js';
|
|
17
|
-
export {
|
|
17
|
+
export { type AgentInit, type AgentInput, type AgentPipelines, createDefaultPipelines, DEFAULT_MAX_ITERATIONS, normalizeInput, type ResolvedLoopDetectionConfig, type RunResult, resolveLoopDetection, type ToolCallPipelinePayload, type UserInputPayload, } from './agent-types.js';
|
|
18
18
|
export declare class Agent {
|
|
19
19
|
readonly container: Container;
|
|
20
20
|
readonly tools: ToolRegistry;
|
|
@@ -47,6 +47,8 @@ export declare class Agent {
|
|
|
47
47
|
* conversation or racing abort signals.
|
|
48
48
|
*/
|
|
49
49
|
private _runInProgress;
|
|
50
|
+
/** SHA-256 of the last submitted input content — prevents duplicate runs. */
|
|
51
|
+
private _lastInputHash;
|
|
50
52
|
constructor(init: AgentInit);
|
|
51
53
|
get logger(): Logger;
|
|
52
54
|
get retry(): RetryPolicy;
|
package/dist/core/agent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/core/agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/core/agent.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,E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I,GAAG,IAAI,CAEzB;IAEK,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAGvD;IAEK,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAgC9B;IAEK,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,IAAI,GAAE,UAAe,GAAG,OAAO,CAAC,SAAS,CAAC,CAwI1E;CAGF"}
|
package/dist/core/context.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { TextBlock } from '../types/blocks.js';
|
|
2
|
+
import type { ContextEvidenceState } from '../types/context-evidence.js';
|
|
3
|
+
import type { FileEventRecord } from '../types/file-event-record.js';
|
|
2
4
|
import type { Message } from '../types/messages.js';
|
|
3
5
|
import type { Provider, Usage } from '../types/provider.js';
|
|
4
6
|
import type { SessionWriter } from '../types/session.js';
|
|
5
|
-
import type { ContextEvidenceState } from '../types/context-evidence.js';
|
|
6
7
|
import type { TokenCounter } from '../types/token-counter.js';
|
|
7
8
|
import type { Tool } from '../types/tool.js';
|
|
8
9
|
import { ConversationState } from './conversation-state.js';
|
|
@@ -121,6 +122,13 @@ export declare class Context implements RunEnv {
|
|
|
121
122
|
* `clearFileTracking()` alongside read/written-file tracking.
|
|
122
123
|
*/
|
|
123
124
|
sideEffects: import('../types/side-effect.js').SideEffect[];
|
|
125
|
+
/**
|
|
126
|
+
* Tracked file events for the current session. Populated by
|
|
127
|
+
* `recordFileEvent()` — used for in-memory audit and real-time
|
|
128
|
+
* subscription (EventBus `file.event`). Also persisted to session
|
|
129
|
+
* JSONL as `file_event` events for durable storage.
|
|
130
|
+
*/
|
|
131
|
+
fileEvents: FileEventRecord[];
|
|
124
132
|
contextEvidence: ContextEvidenceState;
|
|
125
133
|
systemPrompt: TextBlock[];
|
|
126
134
|
provider: Provider;
|
|
@@ -145,6 +153,16 @@ export declare class Context implements RunEnv {
|
|
|
145
153
|
agentId: string;
|
|
146
154
|
/** Human-readable agent name. */
|
|
147
155
|
agentName: string;
|
|
156
|
+
/**
|
|
157
|
+
* Current kanban task ID, set by the agent/coordinator when working
|
|
158
|
+
* on a specific kanban task. Tools use this via `recordFileEvent()`
|
|
159
|
+
* to associate file operations with the active task.
|
|
160
|
+
*/
|
|
161
|
+
currentKanbanTaskId: string | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* Current kanban board ID, paired with `currentKanbanTaskId`.
|
|
164
|
+
*/
|
|
165
|
+
currentKanbanBoardId: string | undefined;
|
|
148
166
|
/**
|
|
149
167
|
* Session-level trace ID for correlating storage events with agent
|
|
150
168
|
* iterations. Stored here and also propagated to `session.traceId`
|
|
@@ -192,6 +210,9 @@ export declare class Context implements RunEnv {
|
|
|
192
210
|
* `onChange`. New code should prefer the wrapper API.
|
|
193
211
|
*/
|
|
194
212
|
private _state;
|
|
213
|
+
private _conversationJournalTail;
|
|
214
|
+
/** Wait until every exact conversation-state event queued so far is in the writer buffer. */
|
|
215
|
+
flushConversationJournal(): Promise<void>;
|
|
195
216
|
get state(): ConversationState;
|
|
196
217
|
/**
|
|
197
218
|
* Register a teardown hook tied to the current run's abort signal.
|
|
@@ -263,6 +284,39 @@ export declare class Context implements RunEnv {
|
|
|
263
284
|
* tool execution.
|
|
264
285
|
*/
|
|
265
286
|
recordSideEffect(sideEffect: import('../types/side-effect.js').SideEffect): void;
|
|
287
|
+
/**
|
|
288
|
+
* Set the current kanban task context for subsequent file operations.
|
|
289
|
+
* Tools call this (or the agent loop sets it) so that `recordFileEvent()`
|
|
290
|
+
* can associate operations with the active kanban task.
|
|
291
|
+
*
|
|
292
|
+
* Pass `undefined` for both to clear the task association.
|
|
293
|
+
*/
|
|
294
|
+
setCurrentKanbanTask(taskId: string | undefined, boardId?: string | undefined): void;
|
|
295
|
+
/**
|
|
296
|
+
* Record a comprehensive file event for the audit trail.
|
|
297
|
+
* Persists the event as a `file_event` session JSONL event.
|
|
298
|
+
* Consumers that need `file.event` EventBus events should subscribe
|
|
299
|
+
* at the executor level (see `ToolExecutor`'s auto-emission).
|
|
300
|
+
*
|
|
301
|
+
* The `scope` field is auto-derived from `currentKanbanTaskId`:
|
|
302
|
+
* - When a kanban task is set, scope = `'task'` and `taskId`/`boardId`
|
|
303
|
+
* are populated from `currentKanbanTaskId`/`currentKanbanBoardId`.
|
|
304
|
+
* - Otherwise scope = `'session'`.
|
|
305
|
+
*
|
|
306
|
+
* Fire-and-forget: errors are swallowed so recording never blocks
|
|
307
|
+
* tool execution.
|
|
308
|
+
*/
|
|
309
|
+
recordFileEvent(input: {
|
|
310
|
+
operation: 'create' | 'read' | 'update' | 'delete' | 'rename';
|
|
311
|
+
filePath: string;
|
|
312
|
+
absPath: string;
|
|
313
|
+
toolName: string;
|
|
314
|
+
toolUseId: string;
|
|
315
|
+
durationMs?: number | undefined;
|
|
316
|
+
fileSize?: number | undefined;
|
|
317
|
+
lines?: number | undefined;
|
|
318
|
+
bytes?: number | undefined;
|
|
319
|
+
}): void;
|
|
266
320
|
/**
|
|
267
321
|
* True if the model/user has explicitly seen this file's content via `read`
|
|
268
322
|
* (or an edit auto-read). Tool-only writes (`source: 'write'`) do NOT count
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/core/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/core/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,E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,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,CAM5E;IAED,KAAK,IAAI,KAAK,CAEb;CACF"}
|
|
@@ -11,14 +11,22 @@
|
|
|
11
11
|
* Moved here from `@wrongstack/cli` (it only ever depended on core types) so the
|
|
12
12
|
* runtime light factory can wire fallbacks for SDD worker subagents.
|
|
13
13
|
*/
|
|
14
|
+
import type { ProviderModelStatusTracker } from '../coordination/provider-status-tracker.js';
|
|
14
15
|
import type { AgentExtension } from '../extension/extension-points.js';
|
|
15
16
|
import type { EventBus } from '../kernel/events.js';
|
|
16
17
|
import type { Config } from '../types/config.js';
|
|
17
18
|
import type { Logger } from '../types/logger.js';
|
|
18
19
|
import { type Provider } from '../types/provider.js';
|
|
20
|
+
import { FallbackProfileManager } from './fallback-profile-manager.js';
|
|
19
21
|
export interface FallbackModelDeps {
|
|
20
22
|
/** Returns the live config (re-read each turn so `/model` switches are honored). */
|
|
21
23
|
getConfig: () => Config;
|
|
24
|
+
/** Shared live manager from the runtime container. */
|
|
25
|
+
fallbackProfileManager?: FallbackProfileManager | undefined;
|
|
26
|
+
/** Live named profile selected for this worker (for example by `/setmodel`). */
|
|
27
|
+
getFallbackProfile?: (() => string | undefined) | undefined;
|
|
28
|
+
/** Live task/role-specific chain. Explicit task fallbacks may return a stable list. */
|
|
29
|
+
getFallbackModels?: (() => readonly string[] | undefined) | undefined;
|
|
22
30
|
/**
|
|
23
31
|
* Builds a credential-resolved Provider for a provider id (alias-resolved),
|
|
24
32
|
* WITHOUT persisting anything to config/configStore. Supplied by the boot
|
|
@@ -49,6 +57,12 @@ export interface FallbackModelDeps {
|
|
|
49
57
|
primaryCooldownMaxMs?: number | undefined;
|
|
50
58
|
/** Test hook for deterministic cooldown assertions. */
|
|
51
59
|
now?: (() => number) | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* Shared provider/model status tracker. When set, the extension records
|
|
62
|
+
* failures and successes in the tracker, and skips blocked entries in
|
|
63
|
+
* the fallback chain.
|
|
64
|
+
*/
|
|
65
|
+
statusTracker?: ProviderModelStatusTracker | undefined;
|
|
52
66
|
}
|
|
53
67
|
interface ModelRef {
|
|
54
68
|
provider?: string | undefined;
|
|
@@ -59,14 +73,6 @@ export declare function parseModelRef(ref: string): ModelRef;
|
|
|
59
73
|
export declare function formatModelRef(ref: ModelRef, defaultProvider?: string | undefined): string;
|
|
60
74
|
export declare function normalizeModelRef(ref: string, defaultProvider?: string | undefined): string;
|
|
61
75
|
export declare function fallbackProfileChain(config: Config, profileName: string | undefined): string[];
|
|
62
|
-
/**
|
|
63
|
-
* Derive a fallback chain from the configured providers when the user has not
|
|
64
|
-
* set an explicit `fallbackModels` list. Picks declared models from every
|
|
65
|
-
* keyed provider — same-provider alternatives first (same key, cheapest
|
|
66
|
-
* failover), then cross-provider — excluding the active leader model. Returns
|
|
67
|
-
* `[]` when nothing usable is configured (e.g. providers with no `models`
|
|
68
|
-
* list), in which case the extension is a no-op.
|
|
69
|
-
*/
|
|
70
76
|
export declare function smartDefaultFallbackChain(config: Config): string[];
|
|
71
77
|
/**
|
|
72
78
|
* The effective fallback chain for a turn: the explicit `fallbackModels` list
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fallback-model.d.ts","sourceRoot":"","sources":["../../src/core/fallback-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"fallback-model.d.ts","sourceRoot":"","sources":["../../src/core/fallback-model.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACj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