@wrongstack/core 0.286.0 → 0.287.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/boot.d.ts.map +1 -1
- package/dist/coordination/brain-monitor.d.ts +15 -0
- package/dist/coordination/brain-monitor.d.ts.map +1 -1
- package/dist/coordination/delegate-tool.d.ts +8 -14
- package/dist/coordination/delegate-tool.d.ts.map +1 -1
- package/dist/coordination/director/director-btw-notes.d.ts +20 -0
- package/dist/coordination/director/director-btw-notes.d.ts.map +1 -0
- package/dist/coordination/director/director-collab.d.ts +40 -0
- package/dist/coordination/director/director-collab.d.ts.map +1 -0
- package/dist/coordination/director.d.ts +27 -8
- package/dist/coordination/director.d.ts.map +1 -1
- package/dist/coordination/fleet-manager.d.ts +21 -0
- package/dist/coordination/fleet-manager.d.ts.map +1 -1
- package/dist/coordination/fleet.d.ts +2 -3
- package/dist/coordination/fleet.d.ts.map +1 -1
- package/dist/coordination/global-mailbox.d.ts +36 -22
- package/dist/coordination/global-mailbox.d.ts.map +1 -1
- package/dist/coordination/icoordinator.d.ts +1 -3
- package/dist/coordination/icoordinator.d.ts.map +1 -1
- package/dist/coordination/index.js +708 -442
- package/dist/coordination/index.js.map +4 -4
- package/dist/coordination/mail-tools.d.ts.map +1 -1
- package/dist/coordination/mailbox-message-codec.d.ts +21 -1
- package/dist/coordination/mailbox-message-codec.d.ts.map +1 -1
- package/dist/coordination/mailbox-types.d.ts +42 -1
- package/dist/coordination/mailbox-types.d.ts.map +1 -1
- package/dist/core/agent-loop.d.ts.map +1 -1
- package/dist/core/agent-response.d.ts +10 -1
- package/dist/core/agent-response.d.ts.map +1 -1
- package/dist/core/agent-tools.d.ts.map +1 -1
- package/dist/core/agent.d.ts +8 -0
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/context.d.ts +25 -0
- package/dist/core/context.d.ts.map +1 -1
- package/dist/core/conversation-state.d.ts +6 -0
- package/dist/core/conversation-state.d.ts.map +1 -1
- package/dist/core/fallback-model.d.ts.map +1 -1
- package/dist/core/mailbox-loop.d.ts +12 -5
- package/dist/core/mailbox-loop.d.ts.map +1 -1
- package/dist/core/system-prompt-builder.d.ts +14 -6
- package/dist/core/system-prompt-builder.d.ts.map +1 -1
- package/dist/defaults/index.d.ts +0 -1
- package/dist/defaults/index.d.ts.map +1 -1
- package/dist/defaults/index.js +834 -1465
- package/dist/defaults/index.js.map +4 -4
- package/dist/execution/auto-compaction-middleware.d.ts +8 -1
- 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.map +1 -1
- package/dist/execution/council-orchestrator.d.ts +32 -0
- package/dist/execution/council-orchestrator.d.ts.map +1 -0
- package/dist/execution/council-personas.d.ts +19 -0
- package/dist/execution/council-personas.d.ts.map +1 -0
- package/dist/execution/council-profiles.d.ts +34 -0
- package/dist/execution/council-profiles.d.ts.map +1 -0
- package/dist/execution/council-prompts.d.ts +21 -0
- package/dist/execution/council-prompts.d.ts.map +1 -0
- package/dist/execution/council-resolution.d.ts +57 -0
- package/dist/execution/council-resolution.d.ts.map +1 -0
- package/dist/execution/design-kit-loader.d.ts.map +1 -1
- package/dist/execution/enhance-recovery.d.ts +35 -0
- package/dist/execution/enhance-recovery.d.ts.map +1 -0
- package/dist/execution/error-handler.d.ts.map +1 -1
- package/dist/execution/index.d.ts +6 -0
- package/dist/execution/index.d.ts.map +1 -1
- package/dist/execution/index.js +1738 -161
- package/dist/execution/index.js.map +4 -4
- package/dist/execution/intelligent-compactor.d.ts +18 -7
- package/dist/execution/intelligent-compactor.d.ts.map +1 -1
- package/dist/execution/one-shot-llm.d.ts +52 -0
- package/dist/execution/one-shot-llm.d.ts.map +1 -0
- package/dist/execution/prompt-enhancer.d.ts +23 -4
- package/dist/execution/prompt-enhancer.d.ts.map +1 -1
- package/dist/execution/prompt-enhancer.js +24 -6
- package/dist/execution/prompt-enhancer.js.map +2 -2
- package/dist/execution/selective-compactor.d.ts +4 -4
- package/dist/execution/strategy-compactor.d.ts +7 -0
- package/dist/execution/strategy-compactor.d.ts.map +1 -1
- package/dist/execution/tool-executor.d.ts +19 -5
- package/dist/execution/tool-executor.d.ts.map +1 -1
- package/dist/hooks/registry.d.ts.map +1 -1
- package/dist/hooks/runner.d.ts.map +1 -1
- package/dist/hooks/shell-executor.d.ts.map +1 -1
- package/dist/hq/alerts.d.ts +5 -0
- package/dist/hq/alerts.d.ts.map +1 -1
- package/dist/hq/auth-store.d.ts +17 -7
- package/dist/hq/auth-store.d.ts.map +1 -1
- package/dist/hq/commands.d.ts +8 -4
- package/dist/hq/commands.d.ts.map +1 -1
- package/dist/hq/cost-bridge.d.ts +5 -3
- package/dist/hq/cost-bridge.d.ts.map +1 -1
- package/dist/hq/fleet-bridge.d.ts.map +1 -1
- package/dist/hq/index.d.ts +0 -1
- package/dist/hq/index.d.ts.map +1 -1
- package/dist/hq/index.js +471 -294
- package/dist/hq/index.js.map +4 -4
- package/dist/hq/persistence.d.ts +42 -0
- package/dist/hq/persistence.d.ts.map +1 -1
- package/dist/hq/protocol/brain.d.ts +24 -0
- package/dist/hq/protocol/brain.d.ts.map +1 -0
- package/dist/hq/protocol/browser.d.ts +12 -0
- package/dist/hq/protocol/browser.d.ts.map +1 -0
- package/dist/hq/protocol/client.d.ts +69 -0
- package/dist/hq/protocol/client.d.ts.map +1 -0
- package/dist/hq/protocol/core.d.ts +130 -0
- package/dist/hq/protocol/core.d.ts.map +1 -0
- package/dist/hq/protocol/fleet.d.ts +73 -0
- package/dist/hq/protocol/fleet.d.ts.map +1 -0
- package/dist/hq/protocol/mailbox.d.ts +76 -0
- package/dist/hq/protocol/mailbox.d.ts.map +1 -0
- package/dist/hq/protocol/mcp.d.ts +51 -0
- package/dist/hq/protocol/mcp.d.ts.map +1 -0
- package/dist/hq/protocol/project.d.ts +26 -0
- package/dist/hq/protocol/project.d.ts.map +1 -0
- package/dist/hq/protocol/session.d.ts +153 -0
- package/dist/hq/protocol/session.d.ts.map +1 -0
- package/dist/hq/protocol/tool.d.ts +31 -0
- package/dist/hq/protocol/tool.d.ts.map +1 -0
- package/dist/hq/protocol.d.ts +10 -611
- package/dist/hq/protocol.d.ts.map +1 -1
- package/dist/index.d.ts +12 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4540 -2283
- package/dist/index.js.map +4 -4
- package/dist/infrastructure/index.js +13 -11
- package/dist/infrastructure/index.js.map +2 -2
- package/dist/infrastructure/token-counter.d.ts.map +1 -1
- package/dist/kernel/events/agent-events.d.ts +283 -0
- package/dist/kernel/events/agent-events.d.ts.map +1 -0
- package/dist/kernel/events/brain-events.d.ts +176 -0
- package/dist/kernel/events/brain-events.d.ts.map +1 -0
- package/dist/kernel/events/fleet-events.d.ts +39 -0
- package/dist/kernel/events/fleet-events.d.ts.map +1 -0
- package/dist/kernel/events/memory-events.d.ts +165 -0
- package/dist/kernel/events/memory-events.d.ts.map +1 -0
- package/dist/kernel/events/provider-events.d.ts +98 -0
- package/dist/kernel/events/provider-events.d.ts.map +1 -0
- package/dist/kernel/events/sdd-events.d.ts +118 -0
- package/dist/kernel/events/sdd-events.d.ts.map +1 -0
- package/dist/kernel/events/session-events.d.ts +227 -0
- package/dist/kernel/events/session-events.d.ts.map +1 -0
- package/dist/kernel/events/tool-events.d.ts +185 -0
- package/dist/kernel/events/tool-events.d.ts.map +1 -0
- package/dist/kernel/events/worktree-events.d.ts +58 -0
- package/dist/kernel/events/worktree-events.d.ts.map +1 -0
- package/dist/kernel/events.d.ts +10 -1298
- package/dist/kernel/events.d.ts.map +1 -1
- package/dist/kernel/index.js +22 -2
- package/dist/kernel/index.js.map +2 -2
- package/dist/kernel/run-controller.d.ts +15 -0
- package/dist/kernel/run-controller.d.ts.map +1 -1
- package/dist/mailbox-attach.d.ts.map +1 -1
- package/dist/models/index.js +19 -6
- package/dist/models/index.js.map +2 -2
- package/dist/models/llm-selector.d.ts +7 -0
- package/dist/models/llm-selector.d.ts.map +1 -1
- package/dist/plugins/auto-review-plugin.d.ts +36 -0
- package/dist/plugins/auto-review-plugin.d.ts.map +1 -0
- package/dist/plugins/chimera-plugin.d.ts +8 -0
- package/dist/plugins/chimera-plugin.d.ts.map +1 -1
- package/dist/security/index.js +7 -2
- package/dist/security/index.js.map +2 -2
- package/dist/security/secret-scrubber.d.ts.map +1 -1
- package/dist/skills/index.js.map +2 -2
- package/dist/storage/config-loader.d.ts.map +1 -1
- package/dist/storage/goal-kanban.d.ts +69 -0
- package/dist/storage/goal-kanban.d.ts.map +1 -0
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +425 -717
- package/dist/storage/index.js.map +4 -4
- package/dist/storage/memory-consolidator.d.ts +9 -1
- package/dist/storage/memory-consolidator.d.ts.map +1 -1
- package/dist/tools/council-tool.d.ts +25 -0
- package/dist/tools/council-tool.d.ts.map +1 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1884 -12
- package/dist/tools/index.js.map +4 -4
- package/dist/tools/one-shot-llm-tool.d.ts +51 -0
- package/dist/tools/one-shot-llm-tool.d.ts.map +1 -0
- package/dist/types/config.d.ts +27 -3
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/context-window.d.ts.map +1 -1
- package/dist/types/council.d.ts +134 -0
- package/dist/types/council.d.ts.map +1 -0
- package/dist/types/default-config.d.ts +3 -3
- package/dist/types/hooks.d.ts +14 -0
- package/dist/types/hooks.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +29 -8
- package/dist/types/index.js.map +3 -3
- package/dist/types/one-shot-llm.d.ts +128 -0
- package/dist/types/one-shot-llm.d.ts.map +1 -0
- package/dist/types/plugin.d.ts +6 -0
- package/dist/types/plugin.d.ts.map +1 -1
- package/dist/types/provider.d.ts +17 -0
- package/dist/types/provider.d.ts.map +1 -1
- package/dist/types/system-prompt.d.ts +2 -1
- package/dist/types/system-prompt.d.ts.map +1 -1
- package/dist/types/tool-executor.d.ts +10 -0
- package/dist/types/tool-executor.d.ts.map +1 -1
- package/dist/utils/atomic-write.d.ts.map +1 -1
- package/dist/utils/index.js +75 -8
- package/dist/utils/index.js.map +3 -3
- package/dist/utils/tool-wire-compact.d.ts +1 -0
- package/dist/utils/tool-wire-compact.d.ts.map +1 -1
- package/dist/utils/wstack-paths.d.ts +20 -4
- package/dist/utils/wstack-paths.d.ts.map +1 -1
- package/instructions/cli/next-task-predictor.md +5 -3
- package/instructions/coordination/subagent-baseline.md +8 -7
- package/instructions/leader-after-task.md +18 -9
- package/instructions/llm/council-judge.md +19 -0
- package/instructions/llm/council-voter.md +22 -0
- package/instructions/modes/architect.md +14 -9
- package/instructions/modes/audit-lite.md +9 -7
- package/instructions/modes/brief-system.md +12 -12
- package/instructions/modes/brief.md +7 -5
- package/instructions/modes/code-auditor.md +13 -8
- package/instructions/modes/code-reviewer.md +13 -8
- package/instructions/modes/debug-lite.md +7 -6
- package/instructions/modes/debugger.md +13 -9
- package/instructions/modes/devops.md +13 -9
- package/instructions/modes/plan-lite.md +7 -6
- package/instructions/modes/refactor-lite.md +7 -6
- package/instructions/modes/refactorer.md +14 -9
- package/instructions/modes/research-lite.md +8 -6
- package/instructions/modes/research-web.md +18 -55
- package/instructions/modes/review-lite.md +7 -6
- package/instructions/modes/teach-system.md +15 -15
- package/instructions/modes/teach.md +13 -12
- package/instructions/modes/test-lite.md +6 -5
- package/instructions/modes/tester.md +13 -9
- package/instructions/modes/ui-design.md +14 -8
- package/instructions/sections/tool/commit-hygiene.md +1 -7
- package/instructions/sections/tool/common-patterns.md +5 -5
- package/instructions/sections/tool/delegation-full.md +3 -31
- package/instructions/sections/tool/mailbox-compact.md +1 -1
- package/instructions/sections/tool/mailbox-full.md +6 -22
- package/instructions/system.md +278 -39
- package/package.json +2 -2
- package/skills/mailbox-bridge/SKILL.md +16 -7
- package/skills/output-standards/SKILL.md +16 -16
- package/skills/wrongstack-mailbox/SKILL.md +6 -0
- package/dist/coordination/director-construction.d.ts +0 -90
- package/dist/coordination/director-construction.d.ts.map +0 -1
- package/dist/hq/agent-bridge.d.ts +0 -27
- package/dist/hq/agent-bridge.d.ts.map +0 -1
- package/dist/storage/memory-store.d.ts +0 -119
- package/dist/storage/memory-store.d.ts.map +0 -1
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import type { Context } from '../../core/context.js';
|
|
2
|
+
import type { PermissionDecision } from '../../types/permission.js';
|
|
3
|
+
import type { RiskTier, Tool, ToolErrorCategory, ToolProgressEvent } from '../../types/tool.js';
|
|
4
|
+
import type { ToolOutputMetadata } from '../../types/context-evidence.js';
|
|
5
|
+
export interface ToolEventMap {
|
|
6
|
+
'tool.started': {
|
|
7
|
+
sessionId?: string | undefined;
|
|
8
|
+
name: string;
|
|
9
|
+
id: string;
|
|
10
|
+
input?: unknown | undefined;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Fired when a tool call finishes successfully. Metrics collectors can count
|
|
14
|
+
* calls and build latency histograms without parsing renderer output.
|
|
15
|
+
*/
|
|
16
|
+
'tool.completed': {
|
|
17
|
+
name: string;
|
|
18
|
+
id: string;
|
|
19
|
+
sessionId: string;
|
|
20
|
+
traceId?: string | undefined;
|
|
21
|
+
agentId: string;
|
|
22
|
+
durationMs: number;
|
|
23
|
+
outputChars: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Fired when a tool call throws. Does not include raw tool input/output.
|
|
27
|
+
*/
|
|
28
|
+
'tool.failed': {
|
|
29
|
+
name: string;
|
|
30
|
+
id: string;
|
|
31
|
+
sessionId: string;
|
|
32
|
+
traceId?: string | undefined;
|
|
33
|
+
agentId: string;
|
|
34
|
+
durationMs: number;
|
|
35
|
+
category: ToolErrorCategory;
|
|
36
|
+
retryable: boolean;
|
|
37
|
+
detail?: string | undefined;
|
|
38
|
+
errorCode?: string | undefined;
|
|
39
|
+
errorSubsystem?: string | undefined;
|
|
40
|
+
errorSeverity?: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Fired for each ToolProgressEvent yielded by `Tool.executeStream`. UIs
|
|
44
|
+
* subscribe to render incremental progress (streaming bash output, file
|
|
45
|
+
* tree counts, etc.) without the tool having to know about the UI.
|
|
46
|
+
*/
|
|
47
|
+
'tool.progress': {
|
|
48
|
+
sessionId?: string | undefined;
|
|
49
|
+
name: string;
|
|
50
|
+
id: string;
|
|
51
|
+
event: ToolProgressEvent;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Fired when a tool call needs confirmation
|
|
55
|
+
* is registered on the executor. The TUI renders a confirmation dialog
|
|
56
|
+
* from this event. Resolution is driven by calling the resolve function
|
|
57
|
+
* passed in the payload with a decision string ('yes' | 'no' | 'always' | 'deny').
|
|
58
|
+
*/
|
|
59
|
+
'tool.confirm_needed': {
|
|
60
|
+
sessionId?: string | undefined;
|
|
61
|
+
tool: Tool;
|
|
62
|
+
input: unknown;
|
|
63
|
+
toolUseId: string;
|
|
64
|
+
suggestedPattern: string;
|
|
65
|
+
decisionSource?: PermissionDecision['source'] | undefined;
|
|
66
|
+
riskTier?: RiskTier | undefined;
|
|
67
|
+
resolve: (decision: 'yes' | 'no' | 'always' | 'deny') => void;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Fired when the agent loop detects that the model is repeating itself —
|
|
71
|
+
* a tight loop that would otherwise burn iterations indefinitely. In the
|
|
72
|
+
* default `steer-then-cut` mode the first detection injects a corrective
|
|
73
|
+
* note into the conversation (`action: 'steer'`) and lets the run
|
|
74
|
+
* continue; persistent repetition cuts the turn with status
|
|
75
|
+
* `max_iterations` (`action: 'cut'`). Legacy `cut` mode hard-stops on
|
|
76
|
+
* first detection.
|
|
77
|
+
*
|
|
78
|
+
* Flavours caught by the same safety valve:
|
|
79
|
+
* - `kind: 'tool'` — the same tool(s) called with effectively the same
|
|
80
|
+
* inputs (catches k2p7's tendency to retry identical tool calls when
|
|
81
|
+
* a tool returns an unexpected empty result).
|
|
82
|
+
* - `kind: 'message'` — the same assistant text repeated, with no tool
|
|
83
|
+
* calls. K2P7 and other weak-instruction-following models can echo
|
|
84
|
+
* their last assistant turn verbatim across many iterations in
|
|
85
|
+
* autonomous-continue mode. The fingerprint also matches this case
|
|
86
|
+
* so the safety valve catches it too.
|
|
87
|
+
* - `kind: 'mixed'` — both: the response contains tool calls AND text,
|
|
88
|
+
* and the combined fingerprint (tool names + text) repeats.
|
|
89
|
+
*
|
|
90
|
+
* UIs can render a warning chip. The `kind`, `action`, and `scope` fields
|
|
91
|
+
* are additive — older subscribers that only read `tools` continue to work.
|
|
92
|
+
*/
|
|
93
|
+
'tool.loop_detected': {
|
|
94
|
+
sessionId?: string | undefined;
|
|
95
|
+
ctx: Context;
|
|
96
|
+
/** Comma-separated tool names involved in the loop, or empty string for pure message loops. */
|
|
97
|
+
tools: string;
|
|
98
|
+
/** Number of repeats detected (consecutive iterations, or identical calls within the window for `scope: 'call'`). */
|
|
99
|
+
repeatCount: number;
|
|
100
|
+
/** 0-based iteration index where the loop was detected. */
|
|
101
|
+
iteration: number;
|
|
102
|
+
/**
|
|
103
|
+
* Shape of the loop. `tool` = identical tool calls; `message` = identical
|
|
104
|
+
* text-only response; `mixed` = both tool calls and text repeated.
|
|
105
|
+
* Defaults to `tool` for backward compatibility with subscribers that
|
|
106
|
+
* pre-date the field.
|
|
107
|
+
*/
|
|
108
|
+
kind?: 'tool' | 'message' | 'mixed' | undefined;
|
|
109
|
+
/**
|
|
110
|
+
* What the detector did. `steer` = a corrective note was folded into the
|
|
111
|
+
* conversation and the run continues; `cut` = the turn was ended with
|
|
112
|
+
* status `max_iterations`. Defaults to `cut` for subscribers that
|
|
113
|
+
* pre-date the field.
|
|
114
|
+
*/
|
|
115
|
+
action?: 'steer' | 'cut' | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* Which detector fired. `iteration` = consecutive effectively-identical
|
|
118
|
+
* iterations; `call` = the same (tool name + canonicalized args) call
|
|
119
|
+
* repeated within the sliding window, possibly interleaved with other
|
|
120
|
+
* calls (e.g. re-reading the same file for the 4th time).
|
|
121
|
+
*/
|
|
122
|
+
scope?: 'iteration' | 'call' | undefined;
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* `output` is a truncated preview of the tool's serialized result text
|
|
126
|
+
* (capped at ~400 chars by the emitter). UIs render this inline in the
|
|
127
|
+
* tool history line without re-fetching from the session log.
|
|
128
|
+
*/
|
|
129
|
+
'tool.executed': {
|
|
130
|
+
sessionId?: string | undefined;
|
|
131
|
+
/**
|
|
132
|
+
* The tool_use id (e.g. "toolu_…") issued by the provider for this call.
|
|
133
|
+
* Pairs with `tool.started.id` so subscribers can correlate start/finish
|
|
134
|
+
* even when the model fires multiple tools in parallel with identical
|
|
135
|
+
* inputs. Optional only for legacy emit sites — new code should always
|
|
136
|
+
* set it.
|
|
137
|
+
*/
|
|
138
|
+
id?: string | undefined;
|
|
139
|
+
name: string;
|
|
140
|
+
durationMs: number;
|
|
141
|
+
ok: boolean;
|
|
142
|
+
input?: unknown | undefined;
|
|
143
|
+
output?: string | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* Full UTF-8 byte length of the serialized tool result that the model
|
|
146
|
+
* actually sees (post-cap, post-scrub). The `output` preview is capped
|
|
147
|
+
* at ~400 chars for transport; this number lets UIs surface what the
|
|
148
|
+
* model is really paying tokens for. Optional only for legacy emit
|
|
149
|
+
* sites that may not yet populate it.
|
|
150
|
+
*/
|
|
151
|
+
outputBytes?: number | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Estimated token count for the full result body the model sees.
|
|
154
|
+
* Computed from `outputBytes` with the standard ~3.5 chars/token
|
|
155
|
+
* heuristic. Cheap to show in the TUI; not authoritative — the real
|
|
156
|
+
* provider count lives in `provider.response.usage`. */
|
|
157
|
+
outputTokens?: number | undefined;
|
|
158
|
+
/**
|
|
159
|
+
* For tools whose output has a clear "line" notion (file reads with
|
|
160
|
+
* numbered prefixes, grep hits, bash stdout), the agent counts the
|
|
161
|
+
* actual lines the model received and forwards it here. Undefined
|
|
162
|
+
* for tools without a meaningful line count. */
|
|
163
|
+
outputLines?: number | undefined;
|
|
164
|
+
/**
|
|
165
|
+
* Parsed context-management metadata for the result the model saw. This is
|
|
166
|
+
* intentionally compact: file/symbol/error/path-integrity hints, not the
|
|
167
|
+
* full output body. Compaction uses it to distinguish seen information from
|
|
168
|
+
* information later referenced by the assistant.
|
|
169
|
+
*/
|
|
170
|
+
metadata?: ToolOutputMetadata | undefined;
|
|
171
|
+
};
|
|
172
|
+
'mcp.server.connected': {
|
|
173
|
+
name: string;
|
|
174
|
+
toolCount: number;
|
|
175
|
+
};
|
|
176
|
+
'mcp.server.reconnected': {
|
|
177
|
+
name: string;
|
|
178
|
+
toolCount: number;
|
|
179
|
+
};
|
|
180
|
+
'mcp.server.disconnected': {
|
|
181
|
+
name: string;
|
|
182
|
+
reason: string;
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
//# sourceMappingURL=tool-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-events.d.ts","sourceRoot":"","sources":["../../../src/kernel/events/tool-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAChG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAE1E,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE;QACd,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC/B,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,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AC,EAAE,MAAM,GAAG,SAAS,CAAC;QACjC;;;;;WAKG;QACH,QAAQ,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;KAC3C,CAAC;IACF,sBAAsB,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,wBAAwB,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9D,yBAAyB,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7D"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface WorktreeEventMap {
|
|
2
|
+
/**
|
|
3
|
+
* Git-worktree lifecycle, emitted by WorktreeManager. AutoPhase allocates one
|
|
4
|
+
* worktree per phase so parallelizable phases run isolated, then merges them
|
|
5
|
+
* back sequentially. The WebUI/TUI subscribe to render live swim-lanes/DAG.
|
|
6
|
+
*/
|
|
7
|
+
'worktree.allocated': {
|
|
8
|
+
sessionId?: string | undefined;
|
|
9
|
+
handleId: string;
|
|
10
|
+
ownerId: string;
|
|
11
|
+
ownerLabel: string;
|
|
12
|
+
slug: string;
|
|
13
|
+
dir: string;
|
|
14
|
+
branch: string;
|
|
15
|
+
baseBranch: string;
|
|
16
|
+
};
|
|
17
|
+
'worktree.committed': {
|
|
18
|
+
sessionId?: string | undefined;
|
|
19
|
+
handleId: string;
|
|
20
|
+
ownerId: string;
|
|
21
|
+
branch: string;
|
|
22
|
+
committed: boolean;
|
|
23
|
+
insertions: number;
|
|
24
|
+
deletions: number;
|
|
25
|
+
files: number;
|
|
26
|
+
sha?: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
'worktree.merged': {
|
|
29
|
+
sessionId?: string | undefined;
|
|
30
|
+
handleId: string;
|
|
31
|
+
ownerId: string;
|
|
32
|
+
branch: string;
|
|
33
|
+
baseBranch: string;
|
|
34
|
+
squash: boolean;
|
|
35
|
+
};
|
|
36
|
+
'worktree.conflict': {
|
|
37
|
+
sessionId?: string | undefined;
|
|
38
|
+
handleId: string;
|
|
39
|
+
ownerId: string;
|
|
40
|
+
branch: string;
|
|
41
|
+
conflictFiles: string[];
|
|
42
|
+
};
|
|
43
|
+
'worktree.released': {
|
|
44
|
+
sessionId?: string | undefined;
|
|
45
|
+
handleId: string;
|
|
46
|
+
ownerId: string;
|
|
47
|
+
branch: string;
|
|
48
|
+
kept: boolean;
|
|
49
|
+
};
|
|
50
|
+
'worktree.failed': {
|
|
51
|
+
sessionId?: string | undefined;
|
|
52
|
+
handleId: string;
|
|
53
|
+
ownerId: string;
|
|
54
|
+
branch?: string | undefined;
|
|
55
|
+
error: string;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=worktree-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worktree-events.d.ts","sourceRoot":"","sources":["../../../src/kernel/events/worktree-events.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,oBAAoB,EAAE;QACpB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC/B,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,oBAAoB,EAAE;QACpB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC/B,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,OAAO,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CA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