maestro-flow 0.4.7 → 0.4.9
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/.claude/commands/maestro-ralph.md +548 -377
- package/.claude/commands/maestro.md +220 -191
- package/.codex/skills/maestro/SKILL.md +495 -462
- package/.codex/skills/maestro-ralph/SKILL.md +491 -339
- package/dashboard/dist/assets/{ArtifactsPage-CVh0Z2I2.js → ArtifactsPage-BLvAqQlQ.js} +1 -1
- package/dashboard/dist/assets/{ChatInput-CBI3qHQQ.js → ChatInput-DU9YGZKX.js} +1 -1
- package/dashboard/dist/assets/{ChatPage-BjJ9CYox.js → ChatPage-DYHfheXC.js} +1 -1
- package/dashboard/dist/assets/{CollabPage-CprGGO9y.js → CollabPage-CSlmvEa-.js} +1 -1
- package/dashboard/dist/assets/{ExecutionPanel-CClxD7cH.js → ExecutionPanel-RYWf0dYC.js} +1 -1
- package/dashboard/dist/assets/{KanbanPage-copqjdPg.js → KanbanPage-N55Iv0-X.js} +1 -1
- package/dashboard/dist/assets/{MaestroCoordinatePage-CioZjQ9N.js → MaestroCoordinatePage-BxwZ6yy5.js} +1 -1
- package/dashboard/dist/assets/{MarkdownRenderer-CtUhoxCT.js → MarkdownRenderer-ZGtOY7Ti.js} +1 -1
- package/dashboard/dist/assets/{McpPage-BcPPcJpr.js → McpPage-Im6s4pGR.js} +1 -1
- package/dashboard/dist/assets/{MeetingRoomPage-BgmAKxU-.js → MeetingRoomPage-CxHRn1xx.js} +1 -1
- package/dashboard/dist/assets/{OutputPanel-DgT3gMyp.js → OutputPanel-DaL8c1i5.js} +1 -1
- package/dashboard/dist/assets/{ProblemsPanel-BmG7rxoG.js → ProblemsPanel-BQTd5812.js} +1 -1
- package/dashboard/dist/assets/{RequirementBoardPage-k8YoeQ0r.js → RequirementBoardPage-22y9u1qh.js} +1 -1
- package/dashboard/dist/assets/{RequirementPage-Da2354px.js → RequirementPage-_mO743Xm.js} +1 -1
- package/dashboard/dist/assets/{RoomsPage-BtqDiYaU.js → RoomsPage-CExTbOGr.js} +1 -1
- package/dashboard/dist/assets/{SpecsPage-ByPVH_M3.js → SpecsPage-gr4KX51-.js} +1 -1
- package/dashboard/dist/assets/{TeamsPage-sFDLN30L.js → TeamsPage-BxEXLb5g.js} +1 -1
- package/dashboard/dist/assets/{TreeBrowser-oEx8YJXV.js → TreeBrowser-CVtPF5C9.js} +1 -1
- package/dashboard/dist/assets/{WorkflowPage-JrX7CVHh.js → WorkflowPage-BoN18Lhs.js} +1 -1
- package/dashboard/dist/assets/{arrow-left-DYvgSdIH.js → arrow-left-C5ROg97G.js} +1 -1
- package/dashboard/dist/assets/{check-jcgYBWVR.js → check-Bs8PM0tQ.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-DvZ5sMOg.js → chevron-right-SmErd_1F.js} +1 -1
- package/dashboard/dist/assets/{circle-DYT-zoRZ.js → circle-CjpslL_D.js} +1 -1
- package/dashboard/dist/assets/{circle-alert-Bfbv3gt4.js → circle-alert-CuzAg2fd.js} +1 -1
- package/dashboard/dist/assets/{circle-check-D82WnpbI.js → circle-check-BIkDU5D5.js} +1 -1
- package/dashboard/dist/assets/{circle-check-big-CPVD1GKF.js → circle-check-big-CYctV8bK.js} +1 -1
- package/dashboard/dist/assets/{code-B3bKFGI4.js → code-DoB7rfxt.js} +1 -1
- package/dashboard/dist/assets/{columns-3-BeMAQCix.js → columns-3-Ch5KIyRa.js} +1 -1
- package/dashboard/dist/assets/{download-BCtpoWYB.js → download-DadtG2Nr.js} +1 -1
- package/dashboard/dist/assets/{folder-CTj6SNNu.js → folder-B8ODoZfb.js} +1 -1
- package/dashboard/dist/assets/{index-BxR_3IbJ.js → index-BL4h1OKY.js} +1 -1
- package/dashboard/dist/assets/{index-DpcPd-UG.js → index-DQIlX2w_.js} +4 -4
- package/dashboard/dist/assets/{index-CWBJLu42.js → index-DaFwSmVJ.js} +10 -10
- package/dashboard/dist/assets/{list-BMv8pIQn.js → list-CI-XIPZh.js} +1 -1
- package/dashboard/dist/assets/{loader-DdM4VOgF.js → loader-DpdMoQvh.js} +1 -1
- package/dashboard/dist/assets/{minus-D15s2E__.js → minus-BVbfXGrC.js} +1 -1
- package/dashboard/dist/assets/{pen-line-DO6o4xWz.js → pen-line-CR8GaHt-.js} +1 -1
- package/dashboard/dist/assets/{pencil-qGxg9jOe.js → pencil-I7GE0y29.js} +1 -1
- package/dashboard/dist/assets/{proxy-DOffTzwA.js → proxy-CcYyZZWI.js} +1 -1
- package/dashboard/dist/assets/{refresh-cw-C9UNdLCy.js → refresh-cw-BG9V_T4R.js} +1 -1
- package/dashboard/dist/assets/{rows-2-CifAA5SL.js → rows-2-DP6NjQFk.js} +1 -1
- package/dashboard/dist/assets/{search-pe7pU1YN.js → search-b78eLlw2.js} +1 -1
- package/dashboard/dist/assets/{shallow-r7YynQYA.js → shallow-CJEesgtu.js} +1 -1
- package/dashboard/dist/assets/{table-Bh772iIw.js → table-B_lk-a1d.js} +1 -1
- package/dashboard/dist/assets/{team-types-C_HqX2p2.js → team-types-Se7f9LfJ.js} +1 -1
- package/dashboard/dist/assets/{terminal-EpmtGBlw.js → terminal-DXx4tvzq.js} +1 -1
- package/dashboard/dist/assets/{trash-2-Xen46iNQ.js → trash-2-CVh9mnRj.js} +1 -1
- package/dashboard/dist/assets/{users-BLueDPxF.js → users-Da9zGME5.js} +1 -1
- package/dashboard/dist/assets/{zap-DsQCPF61.js → zap-C0zaC7gJ.js} +1 -1
- package/dashboard/dist/index.html +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/adapter-factory.js +4 -0
- package/dashboard/dist-server/dashboard/src/server/agents/adapter-factory.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/agy-adapter.d.ts +39 -0
- package/dashboard/dist-server/dashboard/src/server/agents/agy-adapter.js +423 -0
- package/dashboard/dist-server/dashboard/src/server/agents/agy-adapter.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +25 -33
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.test.js +9 -3
- package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-app-server-adapter.js +5 -2
- package/dashboard/dist-server/dashboard/src/server/agents/codex-app-server-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.d.ts +6 -0
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +129 -8
- package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/gemini-a2a-adapter.js +6 -3
- package/dashboard/dist-server/dashboard/src/server/agents/gemini-a2a-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/gemini-a2a-adapter.test.js +7 -1
- package/dashboard/dist-server/dashboard/src/server/agents/gemini-a2a-adapter.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/opencode-adapter.d.ts +2 -0
- package/dashboard/dist-server/dashboard/src/server/agents/opencode-adapter.js +40 -15
- package/dashboard/dist-server/dashboard/src/server/agents/opencode-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.js +59 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.test.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.test.js +78 -0
- package/dashboard/dist-server/dashboard/src/server/agents/process-tree-kill.test.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.d.ts +25 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.js +40 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.test.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.test.js +89 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stale-handler.test.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js +19 -8
- package/dashboard/dist-server/dashboard/src/server/agents/stream-json-adapter.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.d.ts +6 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.js +7 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.test.d.ts +1 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.test.js +46 -0
- package/dashboard/dist-server/dashboard/src/server/agents/stream-monitor.test.js.map +1 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js +2 -0
- package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
- package/dashboard/dist-server/shared/agent-types.d.ts +7 -1
- package/dist/shared/agent-types.d.ts +7 -1
- package/dist/shared/agent-types.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.d.ts +3 -0
- package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +4 -0
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/commands/delegate.d.ts +2 -0
- package/dist/src/commands/delegate.d.ts.map +1 -1
- package/dist/src/commands/delegate.js +18 -0
- package/dist/src/commands/delegate.js.map +1 -1
- package/dist/src/commands/hooks.d.ts +64 -0
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +107 -0
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/install.d.ts.map +1 -1
- package/dist/src/commands/install.js +17 -3
- package/dist/src/commands/install.js.map +1 -1
- package/dist/src/commands/update.d.ts.map +1 -1
- package/dist/src/commands/update.js +53 -0
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/config/cli-tools-config.d.ts +22 -5
- package/dist/src/config/cli-tools-config.d.ts.map +1 -1
- package/dist/src/config/cli-tools-config.js +77 -32
- package/dist/src/config/cli-tools-config.js.map +1 -1
- package/dist/src/config/cli-tools-defaults.json +2 -1
- package/dist/src/core/component-defs.d.ts.map +1 -1
- package/dist/src/core/component-defs.js +53 -0
- package/dist/src/core/component-defs.js.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.d.ts.map +1 -1
- package/dist/src/tui/install-ui/InstallExecution.js +5 -3
- package/dist/src/tui/install-ui/InstallExecution.js.map +1 -1
- package/dist/src/utils/update-notices.d.ts +62 -0
- package/dist/src/utils/update-notices.d.ts.map +1 -0
- package/dist/src/utils/update-notices.js +178 -0
- package/dist/src/utils/update-notices.js.map +1 -0
- package/package.json +82 -82
- package/shared/agent-types.ts +237 -231
- package/workflows/agy-instructions.md +124 -0
package/shared/agent-types.ts
CHANGED
|
@@ -1,231 +1,237 @@
|
|
|
1
|
-
// ---------------------------------------------------------------------------
|
|
2
|
-
// Agent type system — protocol abstraction for CLI agent processes
|
|
3
|
-
//
|
|
4
|
-
// CANONICAL source of truth for all agent types. Both the maestro CLI (src/)
|
|
5
|
-
// and dashboard (dashboard/src/) import from this file.
|
|
6
|
-
// ---------------------------------------------------------------------------
|
|
7
|
-
|
|
8
|
-
/** Supported agent CLI types */
|
|
9
|
-
export type AgentType = 'claude-code' | 'codex' | 'codex-server' | 'gemini' | 'gemini-a2a' | 'qwen' | 'opencode' | 'agent-sdk';
|
|
10
|
-
|
|
11
|
-
/** Agent process lifecycle status */
|
|
12
|
-
export type AgentProcessStatus =
|
|
13
|
-
| 'spawning'
|
|
14
|
-
| 'running'
|
|
15
|
-
| 'paused'
|
|
16
|
-
| 'stopping'
|
|
17
|
-
| 'stopped'
|
|
18
|
-
| 'error';
|
|
19
|
-
|
|
20
|
-
// ---------------------------------------------------------------------------
|
|
21
|
-
// Agent configuration & process
|
|
22
|
-
// ---------------------------------------------------------------------------
|
|
23
|
-
|
|
24
|
-
/** Configuration for spawning an agent process */
|
|
25
|
-
export interface AgentConfig {
|
|
26
|
-
type: AgentType;
|
|
27
|
-
prompt: string;
|
|
28
|
-
workDir: string;
|
|
29
|
-
env?: Record<string, string>;
|
|
30
|
-
model?: string;
|
|
31
|
-
approvalMode?: 'suggest' | 'auto';
|
|
32
|
-
baseUrl?: string;
|
|
33
|
-
apiKey?: string;
|
|
34
|
-
settingsFile?: string;
|
|
35
|
-
/** Path to .env file for loading environment variables before spawn */
|
|
36
|
-
envFile?: string;
|
|
37
|
-
/** When true, spawn in interactive mode (stdin kept open for follow-up messages) */
|
|
38
|
-
interactive?: boolean;
|
|
39
|
-
/** Path to MCP config JSON file for CLI agents (claude-code --mcp-config) */
|
|
40
|
-
mcpConfigPath?: string;
|
|
41
|
-
/** Opaque metadata bag — used to pass team session context through the spawn pipeline */
|
|
42
|
-
metadata?: Record<string, unknown>;
|
|
43
|
-
/** Reasoning effort level (undefined = tool default) */
|
|
44
|
-
reasoningEffort?: 'low' | 'medium' | 'high' | 'max';
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
| '
|
|
81
|
-
| '
|
|
82
|
-
| '
|
|
83
|
-
| '
|
|
84
|
-
| '
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export interface
|
|
100
|
-
type: '
|
|
101
|
-
content: string;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export interface
|
|
140
|
-
type: '
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export interface
|
|
146
|
-
type: '
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export interface
|
|
152
|
-
type: '
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
export interface
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
/** Payload for agent:
|
|
190
|
-
export interface
|
|
191
|
-
processId: string;
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/** Payload for agent:
|
|
196
|
-
export interface
|
|
197
|
-
processId: string;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
reason?: string;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/** Payload for agent:
|
|
209
|
-
export interface
|
|
210
|
-
processId: string;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
1
|
+
// ---------------------------------------------------------------------------
|
|
2
|
+
// Agent type system — protocol abstraction for CLI agent processes
|
|
3
|
+
//
|
|
4
|
+
// CANONICAL source of truth for all agent types. Both the maestro CLI (src/)
|
|
5
|
+
// and dashboard (dashboard/src/) import from this file.
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
|
|
8
|
+
/** Supported agent CLI types */
|
|
9
|
+
export type AgentType = 'claude-code' | 'codex' | 'codex-server' | 'gemini' | 'gemini-a2a' | 'qwen' | 'opencode' | 'agy' | 'agent-sdk';
|
|
10
|
+
|
|
11
|
+
/** Agent process lifecycle status */
|
|
12
|
+
export type AgentProcessStatus =
|
|
13
|
+
| 'spawning'
|
|
14
|
+
| 'running'
|
|
15
|
+
| 'paused'
|
|
16
|
+
| 'stopping'
|
|
17
|
+
| 'stopped'
|
|
18
|
+
| 'error';
|
|
19
|
+
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
// Agent configuration & process
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
/** Configuration for spawning an agent process */
|
|
25
|
+
export interface AgentConfig {
|
|
26
|
+
type: AgentType;
|
|
27
|
+
prompt: string;
|
|
28
|
+
workDir: string;
|
|
29
|
+
env?: Record<string, string>;
|
|
30
|
+
model?: string;
|
|
31
|
+
approvalMode?: 'suggest' | 'auto';
|
|
32
|
+
baseUrl?: string;
|
|
33
|
+
apiKey?: string;
|
|
34
|
+
settingsFile?: string;
|
|
35
|
+
/** Path to .env file for loading environment variables before spawn */
|
|
36
|
+
envFile?: string;
|
|
37
|
+
/** When true, spawn in interactive mode (stdin kept open for follow-up messages) */
|
|
38
|
+
interactive?: boolean;
|
|
39
|
+
/** Path to MCP config JSON file for CLI agents (claude-code --mcp-config) */
|
|
40
|
+
mcpConfigPath?: string;
|
|
41
|
+
/** Opaque metadata bag — used to pass team session context through the spawn pipeline */
|
|
42
|
+
metadata?: Record<string, unknown>;
|
|
43
|
+
/** Reasoning effort level (undefined = tool default) */
|
|
44
|
+
reasoningEffort?: 'low' | 'medium' | 'high' | 'max';
|
|
45
|
+
/**
|
|
46
|
+
* Stale-stream silence window in ms before the adapter force-terminates a
|
|
47
|
+
* silent CLI. Undefined = StreamMonitor default (10 min). Threaded from
|
|
48
|
+
* `maestro delegate --timeout` / cli-tools.json `streamTimeoutMs`.
|
|
49
|
+
*/
|
|
50
|
+
streamTimeoutMs?: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Runtime state of a spawned agent process */
|
|
54
|
+
export interface AgentProcess {
|
|
55
|
+
id: string;
|
|
56
|
+
type: AgentType;
|
|
57
|
+
status: AgentProcessStatus;
|
|
58
|
+
config: AgentConfig;
|
|
59
|
+
startedAt: string;
|
|
60
|
+
pid?: number;
|
|
61
|
+
/** Whether the agent supports interactive follow-up messages */
|
|
62
|
+
interactive?: boolean;
|
|
63
|
+
/** Opaque metadata from config — carries team session context etc. */
|
|
64
|
+
metadata?: Record<string, unknown>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// ---------------------------------------------------------------------------
|
|
68
|
+
// NormalizedEntry — 11-type discriminated union for unified agent output
|
|
69
|
+
// ---------------------------------------------------------------------------
|
|
70
|
+
|
|
71
|
+
/** Base fields shared by all normalized entries */
|
|
72
|
+
export interface NormalizedEntryBase {
|
|
73
|
+
id: string;
|
|
74
|
+
processId: string;
|
|
75
|
+
timestamp: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** All possible entry type discriminators */
|
|
79
|
+
export type EntryType =
|
|
80
|
+
| 'user_message'
|
|
81
|
+
| 'assistant_message'
|
|
82
|
+
| 'thinking'
|
|
83
|
+
| 'tool_use'
|
|
84
|
+
| 'file_change'
|
|
85
|
+
| 'command_exec'
|
|
86
|
+
| 'approval_request'
|
|
87
|
+
| 'approval_response'
|
|
88
|
+
| 'error'
|
|
89
|
+
| 'status_change'
|
|
90
|
+
| 'token_usage';
|
|
91
|
+
|
|
92
|
+
// --- Individual entry types ------------------------------------------------
|
|
93
|
+
|
|
94
|
+
export interface UserMessageEntry extends NormalizedEntryBase {
|
|
95
|
+
type: 'user_message';
|
|
96
|
+
content: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface AssistantMessageEntry extends NormalizedEntryBase {
|
|
100
|
+
type: 'assistant_message';
|
|
101
|
+
content: string;
|
|
102
|
+
partial: boolean;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface ThinkingEntry extends NormalizedEntryBase {
|
|
106
|
+
type: 'thinking';
|
|
107
|
+
content: string;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export interface ToolUseEntry extends NormalizedEntryBase {
|
|
111
|
+
type: 'tool_use';
|
|
112
|
+
name: string;
|
|
113
|
+
input: Record<string, unknown>;
|
|
114
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
115
|
+
result?: string;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface FileChangeEntry extends NormalizedEntryBase {
|
|
119
|
+
type: 'file_change';
|
|
120
|
+
path: string;
|
|
121
|
+
action: 'create' | 'modify' | 'delete';
|
|
122
|
+
diff?: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface CommandExecEntry extends NormalizedEntryBase {
|
|
126
|
+
type: 'command_exec';
|
|
127
|
+
command: string;
|
|
128
|
+
exitCode?: number;
|
|
129
|
+
output?: string;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface ApprovalRequestEntry extends NormalizedEntryBase {
|
|
133
|
+
type: 'approval_request';
|
|
134
|
+
toolName: string;
|
|
135
|
+
toolInput: Record<string, unknown>;
|
|
136
|
+
requestId: string;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface ApprovalResponseEntry extends NormalizedEntryBase {
|
|
140
|
+
type: 'approval_response';
|
|
141
|
+
requestId: string;
|
|
142
|
+
allowed: boolean;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface ErrorEntry extends NormalizedEntryBase {
|
|
146
|
+
type: 'error';
|
|
147
|
+
message: string;
|
|
148
|
+
code?: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface StatusChangeEntry extends NormalizedEntryBase {
|
|
152
|
+
type: 'status_change';
|
|
153
|
+
status: AgentProcessStatus;
|
|
154
|
+
reason?: string;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export interface TokenUsageEntry extends NormalizedEntryBase {
|
|
158
|
+
type: 'token_usage';
|
|
159
|
+
inputTokens: number;
|
|
160
|
+
outputTokens: number;
|
|
161
|
+
cacheReadTokens?: number;
|
|
162
|
+
cacheWriteTokens?: number;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** Discriminated union of all 11 normalized entry types */
|
|
166
|
+
export type NormalizedEntry =
|
|
167
|
+
| UserMessageEntry
|
|
168
|
+
| AssistantMessageEntry
|
|
169
|
+
| ThinkingEntry
|
|
170
|
+
| ToolUseEntry
|
|
171
|
+
| FileChangeEntry
|
|
172
|
+
| CommandExecEntry
|
|
173
|
+
| ApprovalRequestEntry
|
|
174
|
+
| ApprovalResponseEntry
|
|
175
|
+
| ErrorEntry
|
|
176
|
+
| StatusChangeEntry
|
|
177
|
+
| TokenUsageEntry;
|
|
178
|
+
|
|
179
|
+
// ---------------------------------------------------------------------------
|
|
180
|
+
// Agent event payload types (used in WS/SSE event envelopes)
|
|
181
|
+
// ---------------------------------------------------------------------------
|
|
182
|
+
|
|
183
|
+
/** Thought data from agent reasoning */
|
|
184
|
+
export interface ThoughtData {
|
|
185
|
+
subject: string;
|
|
186
|
+
description: string;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/** Payload for agent:thought events */
|
|
190
|
+
export interface AgentThoughtPayload {
|
|
191
|
+
processId: string;
|
|
192
|
+
thought: ThoughtData;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/** Payload for agent:streaming events */
|
|
196
|
+
export interface AgentStreamingPayload {
|
|
197
|
+
processId: string;
|
|
198
|
+
streaming: boolean;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/** Payload for agent:status events */
|
|
202
|
+
export interface AgentStatusPayload {
|
|
203
|
+
processId: string;
|
|
204
|
+
status: AgentProcessStatus;
|
|
205
|
+
reason?: string;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/** Payload for agent:stopped events */
|
|
209
|
+
export interface AgentStoppedPayload {
|
|
210
|
+
processId: string;
|
|
211
|
+
reason?: string;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/** Payload for agent:turnCompleted events (codex-server multi-turn) */
|
|
215
|
+
export interface AgentTurnCompletedPayload {
|
|
216
|
+
processId: string;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// ---------------------------------------------------------------------------
|
|
220
|
+
// Approval workflow types
|
|
221
|
+
// ---------------------------------------------------------------------------
|
|
222
|
+
|
|
223
|
+
/** Server-side approval request (sent to client for user decision) */
|
|
224
|
+
export interface ApprovalRequest {
|
|
225
|
+
id: string;
|
|
226
|
+
processId: string;
|
|
227
|
+
toolName: string;
|
|
228
|
+
toolInput: Record<string, unknown>;
|
|
229
|
+
timestamp: string;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** Client-side approval decision (sent back to server) */
|
|
233
|
+
export interface ApprovalDecision {
|
|
234
|
+
id: string;
|
|
235
|
+
allow: boolean;
|
|
236
|
+
processId: string;
|
|
237
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Maestro for Antigravity CLI
|
|
2
|
+
|
|
3
|
+
Workflow orchestration CLI with MCP endpoint support and extensible architecture, adapted for Antigravity CLI tooling.
|
|
4
|
+
|
|
5
|
+
- **Coding Philosophy**: @~/.maestro/workflows/coding-philosophy.md
|
|
6
|
+
|
|
7
|
+
## Delegate & CLI
|
|
8
|
+
|
|
9
|
+
- **Delegate Usage**: @~/.maestro/workflows/delegate-usage.md
|
|
10
|
+
- **CLI Endpoints Config**: @~/.maestro/cli-tools.json
|
|
11
|
+
|
|
12
|
+
**Strictly follow the cli-tools.json configuration**
|
|
13
|
+
|
|
14
|
+
Available CLI endpoints are dynamically defined by the config file. Use `maestro delegate --to agy` to dispatch tasks to the Antigravity CLI.
|
|
15
|
+
|
|
16
|
+
## Antigravity Tool Priority
|
|
17
|
+
|
|
18
|
+
When choosing between equivalent tools, prefer the agy native primitives over shell fallbacks:
|
|
19
|
+
|
|
20
|
+
| Need | Prefer | Fallback |
|
|
21
|
+
|------|--------|----------|
|
|
22
|
+
| Read a file | `view_file(AbsolutePath, StartLine, EndLine)` | `run_command("Get-Content ...")` |
|
|
23
|
+
| Read external URL | `read_url_content(Url)` | `run_command("curl ...")` |
|
|
24
|
+
| Create / overwrite file | `write_to_file(TargetFile, CodeContent, Overwrite)` | n/a |
|
|
25
|
+
| Single-block edit | `replace_file_content(TargetFile, StartLine, EndLine, TargetContent, ReplacementContent)` | n/a |
|
|
26
|
+
| Multi-block edit on same file | `multi_replace_file_content(TargetFile, ReplacementChunks=[...])` | repeated `replace_file_content` |
|
|
27
|
+
| Search text | `grep_search(SearchPath, Query, IsRegex, Includes)` | `run_command("rg ...")` |
|
|
28
|
+
| List directory | `list_dir(DirectoryPath)` | `run_command("ls ...")` |
|
|
29
|
+
| Execute shell | `run_command(CommandLine, Cwd, WaitMsBeforeAsync)` | n/a |
|
|
30
|
+
| Web search | `search_web(query, domain)` | n/a |
|
|
31
|
+
| Ask user | `ask_question(questions=[{question, options, is_multi_select}])` | n/a |
|
|
32
|
+
|
|
33
|
+
Always pass `Cwd` to `run_command`; do not rely on inherited shell cwd. On Windows, set UTF-8 in PowerShell before chained commands:
|
|
34
|
+
|
|
35
|
+
```powershell
|
|
36
|
+
[Console]::InputEncoding = [Text.UTF8Encoding]::new($false)
|
|
37
|
+
[Console]::OutputEncoding = [Text.UTF8Encoding]::new($false)
|
|
38
|
+
chcp 65001 > $null
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Sub-Agent Orchestration (Two Phases)
|
|
42
|
+
|
|
43
|
+
Antigravity uses an explicit two-phase model for sub-agents — unlike Claude's single `Agent(...)` call:
|
|
44
|
+
|
|
45
|
+
1. **Define**: declare the sub-agent type once per session (idempotent within a session)
|
|
46
|
+
```
|
|
47
|
+
define_subagent(
|
|
48
|
+
name="team-worker",
|
|
49
|
+
description="Generic role-spec worker",
|
|
50
|
+
system_prompt="<contents of antigravity-cli/agents/team-worker.md>",
|
|
51
|
+
enable_write_tools=true,
|
|
52
|
+
enable_mcp_tools=true,
|
|
53
|
+
enable_subagent_tools=false
|
|
54
|
+
)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
2. **Invoke**: spawn one or more instances; capture the returned ConversationId for later messaging
|
|
58
|
+
```
|
|
59
|
+
invoke_subagent([
|
|
60
|
+
{ TypeName: "team-worker",
|
|
61
|
+
Role: "<concrete role label>",
|
|
62
|
+
Prompt: "<task-specific instructions>",
|
|
63
|
+
Workspace: "inherit" # inherit | branch | share
|
|
64
|
+
}
|
|
65
|
+
])
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Workspace modes**:
|
|
69
|
+
- `inherit` — share the parent's working directory (default; matches Claude semantics)
|
|
70
|
+
- `branch` — independent filesystem branch (useful for parallel waves that must not collide)
|
|
71
|
+
- `share` — explicit cross-worker sharing (rare; use only when workers must atomically see each other's writes)
|
|
72
|
+
|
|
73
|
+
**Inter-agent messaging**: `send_message(Recipient=<ConversationId>, Message=<text>)`. The Recipient must be a ConversationId returned by `invoke_subagent`, never a role name.
|
|
74
|
+
|
|
75
|
+
**Background OS tasks vs sub-agents**: `manage_task` handles `run_command` async instances (list / kill / status / send_input). Do **not** repurpose it for named task tracking — use `.workflow/tasks/<id>.json` files instead.
|
|
76
|
+
|
|
77
|
+
## Cross-Skill Invocation
|
|
78
|
+
|
|
79
|
+
Agent-internal chaining uses the **inline-execute** pattern:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
view_file(AbsolutePath="<agy-skills-dir>/<target-skill>/SKILL.md") + execute inline (args: "...")
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
`<agy-skills-dir>` resolves to:
|
|
86
|
+
- global install: `~/.gemini/antigravity-cli/skills/`
|
|
87
|
+
- workspace install: `<project>/.agents/skills/`
|
|
88
|
+
|
|
89
|
+
The agent reads the target SKILL.md, treats its body as additional instructions, and executes them in the same conversation context. Args are passed conceptually as input variables — substitute them when running the loaded instructions.
|
|
90
|
+
|
|
91
|
+
User-initiated invocation uses `/skills`.
|
|
92
|
+
|
|
93
|
+
## Cross-Worker Coordination
|
|
94
|
+
|
|
95
|
+
Antigravity has no built-in message bus. For shared logs across workers, write JSONL lines to `.workflow/.team/<session>/.msg/messages.jsonl`:
|
|
96
|
+
|
|
97
|
+
- Log: `write_to_file(TargetFile=".workflow/.team/<session>/.msg/messages.jsonl", CodeContent="<json line>\n", Overwrite=false)`
|
|
98
|
+
- Read: `view_file(AbsolutePath=".workflow/.team/<session>/.msg/messages.jsonl")` then filter client-side
|
|
99
|
+
- Status snapshot: write `<session>/.msg/state.json` and read with `view_file`
|
|
100
|
+
|
|
101
|
+
For point-to-point delivery, use `send_message` directly.
|
|
102
|
+
|
|
103
|
+
## Code Diagnostics
|
|
104
|
+
|
|
105
|
+
- **Prefer `mcp__ide__getDiagnostics`** for code error checking over shell-based TypeScript compilation when the MCP channel is available.
|
|
106
|
+
|
|
107
|
+
## Knowledge System
|
|
108
|
+
|
|
109
|
+
### Search — Query Before Acting
|
|
110
|
+
|
|
111
|
+
When tackling unfamiliar domains or cross-cutting concerns, search existing knowledge first:
|
|
112
|
+
- `maestro spec load --category <cat>` — load rules by category (coding/arch/debug/test/review/learning)
|
|
113
|
+
- `maestro spec load --keyword <kw>` — cross-category keyword match
|
|
114
|
+
- `maestro wiki search "<query>"` — full-text search across all knowhow
|
|
115
|
+
- `maestro wiki list --category <cat>` → `maestro wiki load <id>` — browse then load full detail
|
|
116
|
+
|
|
117
|
+
### Record — Capture Knowledge
|
|
118
|
+
|
|
119
|
+
When execution surfaces non-obvious knowledge (decisions, root causes, pitfalls, patterns), persist it:
|
|
120
|
+
|
|
121
|
+
- **Spec entry** (short rule/constraint) → `/spec-add <category> "title" "content" --keywords kw1,kw2`
|
|
122
|
+
- **Knowhow document** (detailed recipe/template/decision/reference) → `/manage-knowhow-capture`
|
|
123
|
+
|
|
124
|
+
Category routing: decisions→`arch`, patterns→`coding`, pitfalls→`debug`/`learning`, rules→`review`, test strategy→`test`.
|