@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.
Files changed (251) hide show
  1. package/dist/boot.d.ts.map +1 -1
  2. package/dist/coordination/brain-monitor.d.ts +15 -0
  3. package/dist/coordination/brain-monitor.d.ts.map +1 -1
  4. package/dist/coordination/delegate-tool.d.ts +8 -14
  5. package/dist/coordination/delegate-tool.d.ts.map +1 -1
  6. package/dist/coordination/director/director-btw-notes.d.ts +20 -0
  7. package/dist/coordination/director/director-btw-notes.d.ts.map +1 -0
  8. package/dist/coordination/director/director-collab.d.ts +40 -0
  9. package/dist/coordination/director/director-collab.d.ts.map +1 -0
  10. package/dist/coordination/director.d.ts +27 -8
  11. package/dist/coordination/director.d.ts.map +1 -1
  12. package/dist/coordination/fleet-manager.d.ts +21 -0
  13. package/dist/coordination/fleet-manager.d.ts.map +1 -1
  14. package/dist/coordination/fleet.d.ts +2 -3
  15. package/dist/coordination/fleet.d.ts.map +1 -1
  16. package/dist/coordination/global-mailbox.d.ts +36 -22
  17. package/dist/coordination/global-mailbox.d.ts.map +1 -1
  18. package/dist/coordination/icoordinator.d.ts +1 -3
  19. package/dist/coordination/icoordinator.d.ts.map +1 -1
  20. package/dist/coordination/index.js +708 -442
  21. package/dist/coordination/index.js.map +4 -4
  22. package/dist/coordination/mail-tools.d.ts.map +1 -1
  23. package/dist/coordination/mailbox-message-codec.d.ts +21 -1
  24. package/dist/coordination/mailbox-message-codec.d.ts.map +1 -1
  25. package/dist/coordination/mailbox-types.d.ts +42 -1
  26. package/dist/coordination/mailbox-types.d.ts.map +1 -1
  27. package/dist/core/agent-loop.d.ts.map +1 -1
  28. package/dist/core/agent-response.d.ts +10 -1
  29. package/dist/core/agent-response.d.ts.map +1 -1
  30. package/dist/core/agent-tools.d.ts.map +1 -1
  31. package/dist/core/agent.d.ts +8 -0
  32. package/dist/core/agent.d.ts.map +1 -1
  33. package/dist/core/context.d.ts +25 -0
  34. package/dist/core/context.d.ts.map +1 -1
  35. package/dist/core/conversation-state.d.ts +6 -0
  36. package/dist/core/conversation-state.d.ts.map +1 -1
  37. package/dist/core/fallback-model.d.ts.map +1 -1
  38. package/dist/core/mailbox-loop.d.ts +12 -5
  39. package/dist/core/mailbox-loop.d.ts.map +1 -1
  40. package/dist/core/system-prompt-builder.d.ts +14 -6
  41. package/dist/core/system-prompt-builder.d.ts.map +1 -1
  42. package/dist/defaults/index.d.ts +0 -1
  43. package/dist/defaults/index.d.ts.map +1 -1
  44. package/dist/defaults/index.js +834 -1465
  45. package/dist/defaults/index.js.map +4 -4
  46. package/dist/execution/auto-compaction-middleware.d.ts +8 -1
  47. package/dist/execution/auto-compaction-middleware.d.ts.map +1 -1
  48. package/dist/execution/compaction-core.d.ts.map +1 -1
  49. package/dist/execution/council-brain.d.ts.map +1 -1
  50. package/dist/execution/council-orchestrator.d.ts +32 -0
  51. package/dist/execution/council-orchestrator.d.ts.map +1 -0
  52. package/dist/execution/council-personas.d.ts +19 -0
  53. package/dist/execution/council-personas.d.ts.map +1 -0
  54. package/dist/execution/council-profiles.d.ts +34 -0
  55. package/dist/execution/council-profiles.d.ts.map +1 -0
  56. package/dist/execution/council-prompts.d.ts +21 -0
  57. package/dist/execution/council-prompts.d.ts.map +1 -0
  58. package/dist/execution/council-resolution.d.ts +57 -0
  59. package/dist/execution/council-resolution.d.ts.map +1 -0
  60. package/dist/execution/design-kit-loader.d.ts.map +1 -1
  61. package/dist/execution/enhance-recovery.d.ts +35 -0
  62. package/dist/execution/enhance-recovery.d.ts.map +1 -0
  63. package/dist/execution/error-handler.d.ts.map +1 -1
  64. package/dist/execution/index.d.ts +6 -0
  65. package/dist/execution/index.d.ts.map +1 -1
  66. package/dist/execution/index.js +1738 -161
  67. package/dist/execution/index.js.map +4 -4
  68. package/dist/execution/intelligent-compactor.d.ts +18 -7
  69. package/dist/execution/intelligent-compactor.d.ts.map +1 -1
  70. package/dist/execution/one-shot-llm.d.ts +52 -0
  71. package/dist/execution/one-shot-llm.d.ts.map +1 -0
  72. package/dist/execution/prompt-enhancer.d.ts +23 -4
  73. package/dist/execution/prompt-enhancer.d.ts.map +1 -1
  74. package/dist/execution/prompt-enhancer.js +24 -6
  75. package/dist/execution/prompt-enhancer.js.map +2 -2
  76. package/dist/execution/selective-compactor.d.ts +4 -4
  77. package/dist/execution/strategy-compactor.d.ts +7 -0
  78. package/dist/execution/strategy-compactor.d.ts.map +1 -1
  79. package/dist/execution/tool-executor.d.ts +19 -5
  80. package/dist/execution/tool-executor.d.ts.map +1 -1
  81. package/dist/hooks/registry.d.ts.map +1 -1
  82. package/dist/hooks/runner.d.ts.map +1 -1
  83. package/dist/hooks/shell-executor.d.ts.map +1 -1
  84. package/dist/hq/alerts.d.ts +5 -0
  85. package/dist/hq/alerts.d.ts.map +1 -1
  86. package/dist/hq/auth-store.d.ts +17 -7
  87. package/dist/hq/auth-store.d.ts.map +1 -1
  88. package/dist/hq/commands.d.ts +8 -4
  89. package/dist/hq/commands.d.ts.map +1 -1
  90. package/dist/hq/cost-bridge.d.ts +5 -3
  91. package/dist/hq/cost-bridge.d.ts.map +1 -1
  92. package/dist/hq/fleet-bridge.d.ts.map +1 -1
  93. package/dist/hq/index.d.ts +0 -1
  94. package/dist/hq/index.d.ts.map +1 -1
  95. package/dist/hq/index.js +471 -294
  96. package/dist/hq/index.js.map +4 -4
  97. package/dist/hq/persistence.d.ts +42 -0
  98. package/dist/hq/persistence.d.ts.map +1 -1
  99. package/dist/hq/protocol/brain.d.ts +24 -0
  100. package/dist/hq/protocol/brain.d.ts.map +1 -0
  101. package/dist/hq/protocol/browser.d.ts +12 -0
  102. package/dist/hq/protocol/browser.d.ts.map +1 -0
  103. package/dist/hq/protocol/client.d.ts +69 -0
  104. package/dist/hq/protocol/client.d.ts.map +1 -0
  105. package/dist/hq/protocol/core.d.ts +130 -0
  106. package/dist/hq/protocol/core.d.ts.map +1 -0
  107. package/dist/hq/protocol/fleet.d.ts +73 -0
  108. package/dist/hq/protocol/fleet.d.ts.map +1 -0
  109. package/dist/hq/protocol/mailbox.d.ts +76 -0
  110. package/dist/hq/protocol/mailbox.d.ts.map +1 -0
  111. package/dist/hq/protocol/mcp.d.ts +51 -0
  112. package/dist/hq/protocol/mcp.d.ts.map +1 -0
  113. package/dist/hq/protocol/project.d.ts +26 -0
  114. package/dist/hq/protocol/project.d.ts.map +1 -0
  115. package/dist/hq/protocol/session.d.ts +153 -0
  116. package/dist/hq/protocol/session.d.ts.map +1 -0
  117. package/dist/hq/protocol/tool.d.ts +31 -0
  118. package/dist/hq/protocol/tool.d.ts.map +1 -0
  119. package/dist/hq/protocol.d.ts +10 -611
  120. package/dist/hq/protocol.d.ts.map +1 -1
  121. package/dist/index.d.ts +12 -2
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +4540 -2283
  124. package/dist/index.js.map +4 -4
  125. package/dist/infrastructure/index.js +13 -11
  126. package/dist/infrastructure/index.js.map +2 -2
  127. package/dist/infrastructure/token-counter.d.ts.map +1 -1
  128. package/dist/kernel/events/agent-events.d.ts +283 -0
  129. package/dist/kernel/events/agent-events.d.ts.map +1 -0
  130. package/dist/kernel/events/brain-events.d.ts +176 -0
  131. package/dist/kernel/events/brain-events.d.ts.map +1 -0
  132. package/dist/kernel/events/fleet-events.d.ts +39 -0
  133. package/dist/kernel/events/fleet-events.d.ts.map +1 -0
  134. package/dist/kernel/events/memory-events.d.ts +165 -0
  135. package/dist/kernel/events/memory-events.d.ts.map +1 -0
  136. package/dist/kernel/events/provider-events.d.ts +98 -0
  137. package/dist/kernel/events/provider-events.d.ts.map +1 -0
  138. package/dist/kernel/events/sdd-events.d.ts +118 -0
  139. package/dist/kernel/events/sdd-events.d.ts.map +1 -0
  140. package/dist/kernel/events/session-events.d.ts +227 -0
  141. package/dist/kernel/events/session-events.d.ts.map +1 -0
  142. package/dist/kernel/events/tool-events.d.ts +185 -0
  143. package/dist/kernel/events/tool-events.d.ts.map +1 -0
  144. package/dist/kernel/events/worktree-events.d.ts +58 -0
  145. package/dist/kernel/events/worktree-events.d.ts.map +1 -0
  146. package/dist/kernel/events.d.ts +10 -1298
  147. package/dist/kernel/events.d.ts.map +1 -1
  148. package/dist/kernel/index.js +22 -2
  149. package/dist/kernel/index.js.map +2 -2
  150. package/dist/kernel/run-controller.d.ts +15 -0
  151. package/dist/kernel/run-controller.d.ts.map +1 -1
  152. package/dist/mailbox-attach.d.ts.map +1 -1
  153. package/dist/models/index.js +19 -6
  154. package/dist/models/index.js.map +2 -2
  155. package/dist/models/llm-selector.d.ts +7 -0
  156. package/dist/models/llm-selector.d.ts.map +1 -1
  157. package/dist/plugins/auto-review-plugin.d.ts +36 -0
  158. package/dist/plugins/auto-review-plugin.d.ts.map +1 -0
  159. package/dist/plugins/chimera-plugin.d.ts +8 -0
  160. package/dist/plugins/chimera-plugin.d.ts.map +1 -1
  161. package/dist/security/index.js +7 -2
  162. package/dist/security/index.js.map +2 -2
  163. package/dist/security/secret-scrubber.d.ts.map +1 -1
  164. package/dist/skills/index.js.map +2 -2
  165. package/dist/storage/config-loader.d.ts.map +1 -1
  166. package/dist/storage/goal-kanban.d.ts +69 -0
  167. package/dist/storage/goal-kanban.d.ts.map +1 -0
  168. package/dist/storage/index.d.ts +1 -1
  169. package/dist/storage/index.d.ts.map +1 -1
  170. package/dist/storage/index.js +425 -717
  171. package/dist/storage/index.js.map +4 -4
  172. package/dist/storage/memory-consolidator.d.ts +9 -1
  173. package/dist/storage/memory-consolidator.d.ts.map +1 -1
  174. package/dist/tools/council-tool.d.ts +25 -0
  175. package/dist/tools/council-tool.d.ts.map +1 -0
  176. package/dist/tools/index.d.ts +2 -0
  177. package/dist/tools/index.d.ts.map +1 -1
  178. package/dist/tools/index.js +1884 -12
  179. package/dist/tools/index.js.map +4 -4
  180. package/dist/tools/one-shot-llm-tool.d.ts +51 -0
  181. package/dist/tools/one-shot-llm-tool.d.ts.map +1 -0
  182. package/dist/types/config.d.ts +27 -3
  183. package/dist/types/config.d.ts.map +1 -1
  184. package/dist/types/context-window.d.ts.map +1 -1
  185. package/dist/types/council.d.ts +134 -0
  186. package/dist/types/council.d.ts.map +1 -0
  187. package/dist/types/default-config.d.ts +3 -3
  188. package/dist/types/hooks.d.ts +14 -0
  189. package/dist/types/hooks.d.ts.map +1 -1
  190. package/dist/types/index.d.ts +2 -0
  191. package/dist/types/index.d.ts.map +1 -1
  192. package/dist/types/index.js +29 -8
  193. package/dist/types/index.js.map +3 -3
  194. package/dist/types/one-shot-llm.d.ts +128 -0
  195. package/dist/types/one-shot-llm.d.ts.map +1 -0
  196. package/dist/types/plugin.d.ts +6 -0
  197. package/dist/types/plugin.d.ts.map +1 -1
  198. package/dist/types/provider.d.ts +17 -0
  199. package/dist/types/provider.d.ts.map +1 -1
  200. package/dist/types/system-prompt.d.ts +2 -1
  201. package/dist/types/system-prompt.d.ts.map +1 -1
  202. package/dist/types/tool-executor.d.ts +10 -0
  203. package/dist/types/tool-executor.d.ts.map +1 -1
  204. package/dist/utils/atomic-write.d.ts.map +1 -1
  205. package/dist/utils/index.js +75 -8
  206. package/dist/utils/index.js.map +3 -3
  207. package/dist/utils/tool-wire-compact.d.ts +1 -0
  208. package/dist/utils/tool-wire-compact.d.ts.map +1 -1
  209. package/dist/utils/wstack-paths.d.ts +20 -4
  210. package/dist/utils/wstack-paths.d.ts.map +1 -1
  211. package/instructions/cli/next-task-predictor.md +5 -3
  212. package/instructions/coordination/subagent-baseline.md +8 -7
  213. package/instructions/leader-after-task.md +18 -9
  214. package/instructions/llm/council-judge.md +19 -0
  215. package/instructions/llm/council-voter.md +22 -0
  216. package/instructions/modes/architect.md +14 -9
  217. package/instructions/modes/audit-lite.md +9 -7
  218. package/instructions/modes/brief-system.md +12 -12
  219. package/instructions/modes/brief.md +7 -5
  220. package/instructions/modes/code-auditor.md +13 -8
  221. package/instructions/modes/code-reviewer.md +13 -8
  222. package/instructions/modes/debug-lite.md +7 -6
  223. package/instructions/modes/debugger.md +13 -9
  224. package/instructions/modes/devops.md +13 -9
  225. package/instructions/modes/plan-lite.md +7 -6
  226. package/instructions/modes/refactor-lite.md +7 -6
  227. package/instructions/modes/refactorer.md +14 -9
  228. package/instructions/modes/research-lite.md +8 -6
  229. package/instructions/modes/research-web.md +18 -55
  230. package/instructions/modes/review-lite.md +7 -6
  231. package/instructions/modes/teach-system.md +15 -15
  232. package/instructions/modes/teach.md +13 -12
  233. package/instructions/modes/test-lite.md +6 -5
  234. package/instructions/modes/tester.md +13 -9
  235. package/instructions/modes/ui-design.md +14 -8
  236. package/instructions/sections/tool/commit-hygiene.md +1 -7
  237. package/instructions/sections/tool/common-patterns.md +5 -5
  238. package/instructions/sections/tool/delegation-full.md +3 -31
  239. package/instructions/sections/tool/mailbox-compact.md +1 -1
  240. package/instructions/sections/tool/mailbox-full.md +6 -22
  241. package/instructions/system.md +278 -39
  242. package/package.json +2 -2
  243. package/skills/mailbox-bridge/SKILL.md +16 -7
  244. package/skills/output-standards/SKILL.md +16 -16
  245. package/skills/wrongstack-mailbox/SKILL.md +6 -0
  246. package/dist/coordination/director-construction.d.ts +0 -90
  247. package/dist/coordination/director-construction.d.ts.map +0 -1
  248. package/dist/hq/agent-bridge.d.ts +0 -27
  249. package/dist/hq/agent-bridge.d.ts.map +0 -1
  250. package/dist/storage/memory-store.d.ts +0 -119
  251. 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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;;;;OAIG;IACH,eAAe,EAAE;QACf,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC/B;;;;;;WAMG;QACH,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACxB,IAAI,EAAE,MAAM,CAAC;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,EAAE,EAAE,OAAO,CAAC;QACZ,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;QAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC5B;;;;;;WAMG;QACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QACjC;;;;gEAIwD;QACxD,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAClC;;;;wDAIgD;QAChD,WAAW,CAAC,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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