@sudocode-ai/local-server 0.1.10 → 0.1.12
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/execution/executors/agent-executor-wrapper.d.ts.map +1 -1
- package/dist/execution/executors/agent-executor-wrapper.js +57 -2
- package/dist/execution/executors/agent-executor-wrapper.js.map +1 -1
- package/dist/execution/process/builders/claude.d.ts.map +1 -1
- package/dist/execution/process/builders/claude.js +32 -1
- package/dist/execution/process/builders/claude.js.map +1 -1
- package/dist/execution/worktree/git-cli.d.ts +48 -0
- package/dist/execution/worktree/git-cli.d.ts.map +1 -1
- package/dist/execution/worktree/git-cli.js +81 -0
- package/dist/execution/worktree/git-cli.js.map +1 -1
- package/dist/execution/worktree/git-sync-cli.d.ts +28 -1
- package/dist/execution/worktree/git-sync-cli.d.ts.map +1 -1
- package/dist/execution/worktree/git-sync-cli.js +65 -2
- package/dist/execution/worktree/git-sync-cli.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/public/assets/index-CLIkhhGD.js +824 -0
- package/dist/public/assets/index-CLIkhhGD.js.map +1 -0
- package/dist/public/assets/index-p0337DGd.css +1 -0
- package/dist/public/assets/{react-vendor-DiL5hC7l.js → react-vendor-5f1Wq1qs.js} +5 -5
- package/dist/public/assets/{react-vendor-DiL5hC7l.js.map → react-vendor-5f1Wq1qs.js.map} +1 -1
- package/dist/public/assets/{ui-vendor-B4WMPEfa.js → ui-vendor-BDDPoYki.js} +2 -2
- package/dist/public/assets/{ui-vendor-B4WMPEfa.js.map → ui-vendor-BDDPoYki.js.map} +1 -1
- package/dist/public/index.html +4 -4
- package/dist/routes/workflows.d.ts +8 -0
- package/dist/routes/workflows.d.ts.map +1 -0
- package/dist/routes/workflows.js +1729 -0
- package/dist/routes/workflows.js.map +1 -0
- package/dist/services/execution-event-callbacks.d.ts +73 -0
- package/dist/services/execution-event-callbacks.d.ts.map +1 -0
- package/dist/services/execution-event-callbacks.js +82 -0
- package/dist/services/execution-event-callbacks.js.map +1 -0
- package/dist/services/execution-lifecycle.d.ts +36 -0
- package/dist/services/execution-lifecycle.d.ts.map +1 -1
- package/dist/services/execution-lifecycle.js +87 -0
- package/dist/services/execution-lifecycle.js.map +1 -1
- package/dist/services/execution-service.d.ts +31 -3
- package/dist/services/execution-service.d.ts.map +1 -1
- package/dist/services/execution-service.js +161 -34
- package/dist/services/execution-service.js.map +1 -1
- package/dist/services/executions.d.ts +1 -0
- package/dist/services/executions.d.ts.map +1 -1
- package/dist/services/executions.js +4 -0
- package/dist/services/executions.js.map +1 -1
- package/dist/services/project-context.d.ts +25 -0
- package/dist/services/project-context.d.ts.map +1 -1
- package/dist/services/project-context.js +53 -3
- package/dist/services/project-context.js.map +1 -1
- package/dist/services/project-manager.d.ts +7 -0
- package/dist/services/project-manager.d.ts.map +1 -1
- package/dist/services/project-manager.js +90 -1
- package/dist/services/project-manager.js.map +1 -1
- package/dist/services/websocket.d.ts +10 -2
- package/dist/services/websocket.d.ts.map +1 -1
- package/dist/services/websocket.js +18 -0
- package/dist/services/websocket.js.map +1 -1
- package/dist/services/workflow-broadcast-service.d.ts +43 -0
- package/dist/services/workflow-broadcast-service.d.ts.map +1 -0
- package/dist/services/workflow-broadcast-service.js +155 -0
- package/dist/services/workflow-broadcast-service.js.map +1 -0
- package/dist/services/worktree-sync-service.d.ts +40 -1
- package/dist/services/worktree-sync-service.d.ts.map +1 -1
- package/dist/services/worktree-sync-service.js +189 -16
- package/dist/services/worktree-sync-service.js.map +1 -1
- package/dist/workflow/base-workflow-engine.d.ts +186 -0
- package/dist/workflow/base-workflow-engine.d.ts.map +1 -0
- package/dist/workflow/base-workflow-engine.js +549 -0
- package/dist/workflow/base-workflow-engine.js.map +1 -0
- package/dist/workflow/dependency-analyzer.d.ts +78 -0
- package/dist/workflow/dependency-analyzer.d.ts.map +1 -0
- package/dist/workflow/dependency-analyzer.js +264 -0
- package/dist/workflow/dependency-analyzer.js.map +1 -0
- package/dist/workflow/engines/orchestrator-engine.d.ts +237 -0
- package/dist/workflow/engines/orchestrator-engine.d.ts.map +1 -0
- package/dist/workflow/engines/orchestrator-engine.js +749 -0
- package/dist/workflow/engines/orchestrator-engine.js.map +1 -0
- package/dist/workflow/engines/sequential-engine.d.ts +276 -0
- package/dist/workflow/engines/sequential-engine.d.ts.map +1 -0
- package/dist/workflow/engines/sequential-engine.js +1110 -0
- package/dist/workflow/engines/sequential-engine.js.map +1 -0
- package/dist/workflow/index.d.ts +15 -0
- package/dist/workflow/index.d.ts.map +1 -0
- package/dist/workflow/index.js +22 -0
- package/dist/workflow/index.js.map +1 -0
- package/dist/workflow/mcp/api-client.d.ts +103 -0
- package/dist/workflow/mcp/api-client.d.ts.map +1 -0
- package/dist/workflow/mcp/api-client.js +193 -0
- package/dist/workflow/mcp/api-client.js.map +1 -0
- package/dist/workflow/mcp/index.d.ts +16 -0
- package/dist/workflow/mcp/index.d.ts.map +1 -0
- package/dist/workflow/mcp/index.js +114 -0
- package/dist/workflow/mcp/index.js.map +1 -0
- package/dist/workflow/mcp/server.d.ts +85 -0
- package/dist/workflow/mcp/server.d.ts.map +1 -0
- package/dist/workflow/mcp/server.js +520 -0
- package/dist/workflow/mcp/server.js.map +1 -0
- package/dist/workflow/mcp/tools/escalation.d.ts +36 -0
- package/dist/workflow/mcp/tools/escalation.d.ts.map +1 -0
- package/dist/workflow/mcp/tools/escalation.js +47 -0
- package/dist/workflow/mcp/tools/escalation.js.map +1 -0
- package/dist/workflow/mcp/tools/execution.d.ts +59 -0
- package/dist/workflow/mcp/tools/execution.d.ts.map +1 -0
- package/dist/workflow/mcp/tools/execution.js +67 -0
- package/dist/workflow/mcp/tools/execution.js.map +1 -0
- package/dist/workflow/mcp/tools/inspection.d.ts +82 -0
- package/dist/workflow/mcp/tools/inspection.d.ts.map +1 -0
- package/dist/workflow/mcp/tools/inspection.js +57 -0
- package/dist/workflow/mcp/tools/inspection.js.map +1 -0
- package/dist/workflow/mcp/tools/workflow.d.ts +59 -0
- package/dist/workflow/mcp/tools/workflow.d.ts.map +1 -0
- package/dist/workflow/mcp/tools/workflow.js +40 -0
- package/dist/workflow/mcp/tools/workflow.js.map +1 -0
- package/dist/workflow/mcp/types.d.ts +345 -0
- package/dist/workflow/mcp/types.d.ts.map +1 -0
- package/dist/workflow/mcp/types.js +7 -0
- package/dist/workflow/mcp/types.js.map +1 -0
- package/dist/workflow/services/prompt-builder.d.ts +36 -0
- package/dist/workflow/services/prompt-builder.d.ts.map +1 -0
- package/dist/workflow/services/prompt-builder.js +329 -0
- package/dist/workflow/services/prompt-builder.js.map +1 -0
- package/dist/workflow/services/wakeup-service.d.ts +262 -0
- package/dist/workflow/services/wakeup-service.d.ts.map +1 -0
- package/dist/workflow/services/wakeup-service.js +809 -0
- package/dist/workflow/services/wakeup-service.js.map +1 -0
- package/dist/workflow/workflow-engine.d.ts +221 -0
- package/dist/workflow/workflow-engine.d.ts.map +1 -0
- package/dist/workflow/workflow-engine.js +94 -0
- package/dist/workflow/workflow-engine.js.map +1 -0
- package/dist/workflow/workflow-event-emitter.d.ts +278 -0
- package/dist/workflow/workflow-event-emitter.d.ts.map +1 -0
- package/dist/workflow/workflow-event-emitter.js +259 -0
- package/dist/workflow/workflow-event-emitter.js.map +1 -0
- package/package.json +8 -6
- package/dist/public/assets/index-CQoCSnhl.css +0 -1
- package/dist/public/assets/index-iWE3gSYw.js +0 -758
- package/dist/public/assets/index-iWE3gSYw.js.map +0 -1
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WorkflowPromptBuilder
|
|
3
|
+
*
|
|
4
|
+
* Constructs prompts for the orchestrator agent.
|
|
5
|
+
* Builds initial prompts when workflows start and wakeup messages when events occur.
|
|
6
|
+
*/
|
|
7
|
+
// =============================================================================
|
|
8
|
+
// Helper Functions
|
|
9
|
+
// =============================================================================
|
|
10
|
+
/**
|
|
11
|
+
* Format a duration in milliseconds to human-readable string
|
|
12
|
+
*/
|
|
13
|
+
function formatDuration(ms) {
|
|
14
|
+
const seconds = Math.floor(ms / 1000);
|
|
15
|
+
const minutes = Math.floor(seconds / 60);
|
|
16
|
+
const hours = Math.floor(minutes / 60);
|
|
17
|
+
if (hours > 0) {
|
|
18
|
+
const remainingMinutes = minutes % 60;
|
|
19
|
+
return `${hours}h ${remainingMinutes}m`;
|
|
20
|
+
}
|
|
21
|
+
if (minutes > 0) {
|
|
22
|
+
const remainingSeconds = seconds % 60;
|
|
23
|
+
return `${minutes}m ${remainingSeconds}s`;
|
|
24
|
+
}
|
|
25
|
+
return `${seconds}s`;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Parse files_changed JSON string to get count and stats
|
|
29
|
+
*/
|
|
30
|
+
function parseFilesChanged(filesChanged) {
|
|
31
|
+
if (!filesChanged) {
|
|
32
|
+
return { count: 0, additions: 0, deletions: 0 };
|
|
33
|
+
}
|
|
34
|
+
try {
|
|
35
|
+
const files = JSON.parse(filesChanged);
|
|
36
|
+
const additions = files.reduce((sum, f) => sum + (f.additions || 0), 0);
|
|
37
|
+
const deletions = files.reduce((sum, f) => sum + (f.deletions || 0), 0);
|
|
38
|
+
return { count: files.length, additions, deletions };
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return { count: 0, additions: 0, deletions: 0 };
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Format workflow source for display
|
|
46
|
+
*/
|
|
47
|
+
function formatSource(source) {
|
|
48
|
+
switch (source.type) {
|
|
49
|
+
case "spec":
|
|
50
|
+
return `Implementing spec \`${source.specId}\``;
|
|
51
|
+
case "issues":
|
|
52
|
+
return `Executing ${source.issueIds.length} issues: ${source.issueIds.join(", ")}`;
|
|
53
|
+
case "root_issue":
|
|
54
|
+
return `Completing issue \`${source.issueId}\` and its blockers`;
|
|
55
|
+
case "goal":
|
|
56
|
+
return `Goal: ${source.goal}`;
|
|
57
|
+
default:
|
|
58
|
+
return "Unknown source";
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Format config for display
|
|
63
|
+
*/
|
|
64
|
+
function formatConfig(config) {
|
|
65
|
+
const lines = [];
|
|
66
|
+
lines.push(`- **Autonomy Level**: ${config.autonomyLevel === "full_auto" ? "Full Auto (no user intervention)" : "Human-in-the-Loop"}`);
|
|
67
|
+
lines.push(`- **On Failure**: ${config.onFailure}`);
|
|
68
|
+
lines.push(`- **Default Agent**: ${config.defaultAgentType}`);
|
|
69
|
+
if (config.orchestratorModel) {
|
|
70
|
+
lines.push(`- **Model**: ${config.orchestratorModel}`);
|
|
71
|
+
}
|
|
72
|
+
if (config.executionTimeoutMs) {
|
|
73
|
+
lines.push(`- **Execution Timeout**: ${formatDuration(config.executionTimeoutMs)}`);
|
|
74
|
+
}
|
|
75
|
+
return lines.join("\n");
|
|
76
|
+
}
|
|
77
|
+
// =============================================================================
|
|
78
|
+
// WorkflowPromptBuilder
|
|
79
|
+
// =============================================================================
|
|
80
|
+
/**
|
|
81
|
+
* Builds prompts and messages for the orchestrator agent.
|
|
82
|
+
*/
|
|
83
|
+
export class WorkflowPromptBuilder {
|
|
84
|
+
/**
|
|
85
|
+
* Build the initial prompt for the orchestrator when workflow starts.
|
|
86
|
+
* Includes: workflow source, config, available issues, relationships.
|
|
87
|
+
*/
|
|
88
|
+
buildInitialPrompt(workflow, issues) {
|
|
89
|
+
const sections = [];
|
|
90
|
+
// Header
|
|
91
|
+
sections.push("# Workflow Orchestration");
|
|
92
|
+
sections.push("");
|
|
93
|
+
sections.push(`You are orchestrating workflow \`${workflow.id}\`: **${workflow.title}**`);
|
|
94
|
+
sections.push("");
|
|
95
|
+
// Source
|
|
96
|
+
sections.push("## Objective");
|
|
97
|
+
sections.push("");
|
|
98
|
+
sections.push(formatSource(workflow.source));
|
|
99
|
+
sections.push("");
|
|
100
|
+
// Configuration
|
|
101
|
+
sections.push("## Configuration");
|
|
102
|
+
sections.push("");
|
|
103
|
+
sections.push(formatConfig(workflow.config));
|
|
104
|
+
sections.push("");
|
|
105
|
+
// Available Tools
|
|
106
|
+
sections.push("## Available Tools");
|
|
107
|
+
sections.push("");
|
|
108
|
+
sections.push("You have access to workflow orchestration tools:");
|
|
109
|
+
sections.push("");
|
|
110
|
+
sections.push("| Tool | Purpose |");
|
|
111
|
+
sections.push("|------|---------|");
|
|
112
|
+
sections.push("| `workflow_status` | Get current workflow state, active executions, ready issues |");
|
|
113
|
+
sections.push("| `execute_issue` | Start an agent execution for an issue |");
|
|
114
|
+
sections.push("| `execution_status` | Check status of a running/completed execution |");
|
|
115
|
+
sections.push("| `execution_cancel` | Cancel a running execution |");
|
|
116
|
+
sections.push("| `execution_trajectory` | Get summarized trajectory (tool calls, decisions) |");
|
|
117
|
+
sections.push("| `execution_changes` | Get file changes from an execution |");
|
|
118
|
+
sections.push("| `escalate_to_user` | Request user input (async - response via wakeup) |");
|
|
119
|
+
sections.push("| `notify_user` | Send notification without blocking |");
|
|
120
|
+
sections.push("| `workflow_complete` | Mark workflow as complete |");
|
|
121
|
+
sections.push("");
|
|
122
|
+
sections.push("You also have access to sudocode tools (`ready`, `show_issue`, `upsert_issue`, `link`, etc.) for managing issues and specs.");
|
|
123
|
+
sections.push("");
|
|
124
|
+
// Issues
|
|
125
|
+
if (issues.length > 0) {
|
|
126
|
+
sections.push("## Issues to Execute");
|
|
127
|
+
sections.push("");
|
|
128
|
+
for (const issue of issues) {
|
|
129
|
+
const priority = issue.priority !== undefined ? ` (P${issue.priority})` : "";
|
|
130
|
+
sections.push(`### ${issue.id}: ${issue.title}${priority}`);
|
|
131
|
+
sections.push("");
|
|
132
|
+
sections.push(`Status: ${issue.status}`);
|
|
133
|
+
if (issue.content) {
|
|
134
|
+
// Truncate long content
|
|
135
|
+
const content = issue.content.length > 500
|
|
136
|
+
? issue.content.slice(0, 500) + "..."
|
|
137
|
+
: issue.content;
|
|
138
|
+
sections.push("");
|
|
139
|
+
sections.push(content);
|
|
140
|
+
}
|
|
141
|
+
sections.push("");
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
else if (workflow.source.type === "goal") {
|
|
145
|
+
sections.push("## Getting Started");
|
|
146
|
+
sections.push("");
|
|
147
|
+
sections.push("This is a goal-based workflow. No issues have been created yet.");
|
|
148
|
+
sections.push("Use `upsert_issue` to create issues and `link` to establish dependencies.");
|
|
149
|
+
sections.push("Then use `execute_issue` to run agents on the issues.");
|
|
150
|
+
sections.push("");
|
|
151
|
+
}
|
|
152
|
+
// Instructions
|
|
153
|
+
sections.push("## Instructions");
|
|
154
|
+
sections.push("");
|
|
155
|
+
sections.push("1. Review the issues and their dependencies");
|
|
156
|
+
sections.push("2. Use `execute_issue` to start agents on ready issues");
|
|
157
|
+
sections.push("3. You will receive wakeup messages when executions complete or fail");
|
|
158
|
+
sections.push("4. Inspect results with `execution_trajectory` and `execution_changes`");
|
|
159
|
+
sections.push("5. Handle failures by retrying, creating fix issues, or escalating");
|
|
160
|
+
sections.push("6. When all work is done, call `workflow_complete` with a summary");
|
|
161
|
+
sections.push("");
|
|
162
|
+
sections.push("Begin by reviewing the current state and starting the first execution.");
|
|
163
|
+
return sections.join("\n");
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Build a wakeup message from workflow events.
|
|
167
|
+
* Summarizes what happened since last orchestrator interaction.
|
|
168
|
+
*
|
|
169
|
+
* @param events - Unprocessed workflow events
|
|
170
|
+
* @param executions - Map of execution ID to execution data
|
|
171
|
+
* @param resolvedAwait - Optional resolved await context (if woken from await_events)
|
|
172
|
+
*/
|
|
173
|
+
buildWakeupMessage(events, executions, resolvedAwait) {
|
|
174
|
+
const sections = [];
|
|
175
|
+
sections.push("[Workflow Event]");
|
|
176
|
+
sections.push("");
|
|
177
|
+
// If woken from await, explain what triggered it
|
|
178
|
+
if (resolvedAwait) {
|
|
179
|
+
sections.push("=== AWAIT RESOLVED ===");
|
|
180
|
+
sections.push(`You were waiting for: ${resolvedAwait.eventTypes.join(", ")}`);
|
|
181
|
+
sections.push(`Triggered by: ${resolvedAwait.resolvedBy}`);
|
|
182
|
+
if (resolvedAwait.message) {
|
|
183
|
+
sections.push(`Context: ${resolvedAwait.message}`);
|
|
184
|
+
}
|
|
185
|
+
if (resolvedAwait.executionIds && resolvedAwait.executionIds.length > 0) {
|
|
186
|
+
sections.push(`Filtered executions: ${resolvedAwait.executionIds.join(", ")}`);
|
|
187
|
+
}
|
|
188
|
+
sections.push("");
|
|
189
|
+
}
|
|
190
|
+
if (events.length === 0) {
|
|
191
|
+
if (resolvedAwait) {
|
|
192
|
+
// If we have a resolved await but no events, it was likely a timeout
|
|
193
|
+
sections.push("No new events - this is likely a timeout wakeup.");
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
sections.push("No new events since last update.");
|
|
197
|
+
}
|
|
198
|
+
sections.push("");
|
|
199
|
+
sections.push("What would you like to do next?");
|
|
200
|
+
return sections.join("\n");
|
|
201
|
+
}
|
|
202
|
+
// Group events by type
|
|
203
|
+
const executionEvents = events.filter((e) => e.type === "step_completed" ||
|
|
204
|
+
e.type === "step_failed" ||
|
|
205
|
+
e.type === "step_started");
|
|
206
|
+
const escalationEvents = events.filter((e) => e.type === "escalation_resolved" || e.type === "user_response");
|
|
207
|
+
const lifecycleEvents = events.filter((e) => e.type === "workflow_paused" ||
|
|
208
|
+
e.type === "workflow_resumed");
|
|
209
|
+
// Execution updates
|
|
210
|
+
if (executionEvents.length > 0) {
|
|
211
|
+
sections.push("Executions changed since last update:");
|
|
212
|
+
sections.push("");
|
|
213
|
+
for (const event of executionEvents) {
|
|
214
|
+
const execution = event.executionId
|
|
215
|
+
? executions.get(event.executionId)
|
|
216
|
+
: undefined;
|
|
217
|
+
if (execution) {
|
|
218
|
+
sections.push(this.summarizeExecution(execution));
|
|
219
|
+
sections.push("");
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
// Fallback if execution not found
|
|
223
|
+
const issueId = event.payload.issueId || "unknown";
|
|
224
|
+
sections.push(`## ${issueId}`);
|
|
225
|
+
sections.push(`- Event: ${event.type}`);
|
|
226
|
+
if (event.payload) {
|
|
227
|
+
sections.push(`- Details: ${JSON.stringify(event.payload)}`);
|
|
228
|
+
}
|
|
229
|
+
sections.push("");
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
// Escalation responses
|
|
234
|
+
if (escalationEvents.length > 0) {
|
|
235
|
+
sections.push("User responses:");
|
|
236
|
+
sections.push("");
|
|
237
|
+
for (const event of escalationEvents) {
|
|
238
|
+
const payload = event.payload;
|
|
239
|
+
sections.push(`- **Action**: ${payload.action || "unknown"}`);
|
|
240
|
+
if (payload.message) {
|
|
241
|
+
sections.push(` Message: "${payload.message}"`);
|
|
242
|
+
}
|
|
243
|
+
sections.push("");
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
// Lifecycle events
|
|
247
|
+
if (lifecycleEvents.length > 0) {
|
|
248
|
+
for (const event of lifecycleEvents) {
|
|
249
|
+
if (event.type === "workflow_paused") {
|
|
250
|
+
sections.push("⚠️ Workflow was paused by user.");
|
|
251
|
+
sections.push("");
|
|
252
|
+
}
|
|
253
|
+
else if (event.type === "workflow_resumed") {
|
|
254
|
+
sections.push("✓ Workflow resumed.");
|
|
255
|
+
sections.push("");
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
sections.push("---");
|
|
260
|
+
sections.push("");
|
|
261
|
+
sections.push("Use `execution_trajectory` or `execution_changes` for details.");
|
|
262
|
+
sections.push("What would you like to do next?");
|
|
263
|
+
return sections.join("\n");
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Create a compact summary of an execution result.
|
|
267
|
+
*/
|
|
268
|
+
summarizeExecution(execution) {
|
|
269
|
+
const lines = [];
|
|
270
|
+
// Header with issue ID and title (from issue_id if available)
|
|
271
|
+
const issueId = execution.issue_id || "unknown";
|
|
272
|
+
lines.push(`## ${issueId}`);
|
|
273
|
+
// Status
|
|
274
|
+
const statusEmoji = this.getStatusEmoji(execution.status);
|
|
275
|
+
lines.push(`- Status: ${statusEmoji} ${execution.status.toUpperCase()}`);
|
|
276
|
+
// Duration
|
|
277
|
+
if (execution.started_at && execution.completed_at) {
|
|
278
|
+
const startTime = new Date(execution.started_at).getTime();
|
|
279
|
+
const endTime = new Date(execution.completed_at).getTime();
|
|
280
|
+
const duration = endTime - startTime;
|
|
281
|
+
lines.push(`- Duration: ${formatDuration(duration)}`);
|
|
282
|
+
}
|
|
283
|
+
// Files changed
|
|
284
|
+
const { count, additions, deletions } = parseFilesChanged(execution.files_changed);
|
|
285
|
+
if (count > 0) {
|
|
286
|
+
lines.push(`- Files changed: ${count} (+${additions}, -${deletions})`);
|
|
287
|
+
}
|
|
288
|
+
// For completed executions, show summary
|
|
289
|
+
if (execution.status === "completed" && execution.summary) {
|
|
290
|
+
const summary = execution.summary.length > 200
|
|
291
|
+
? execution.summary.slice(0, 200) + "..."
|
|
292
|
+
: execution.summary;
|
|
293
|
+
lines.push(`- Summary: "${summary}"`);
|
|
294
|
+
}
|
|
295
|
+
// For failed executions, show error
|
|
296
|
+
if (execution.status === "failed") {
|
|
297
|
+
if (execution.exit_code !== null) {
|
|
298
|
+
lines.push(`- Exit code: ${execution.exit_code}`);
|
|
299
|
+
}
|
|
300
|
+
if (execution.error_message) {
|
|
301
|
+
const error = execution.error_message.length > 200
|
|
302
|
+
? execution.error_message.slice(0, 200) + "..."
|
|
303
|
+
: execution.error_message;
|
|
304
|
+
lines.push(`- Error: "${error}"`);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
return lines.join("\n");
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Get emoji for execution status
|
|
311
|
+
*/
|
|
312
|
+
getStatusEmoji(status) {
|
|
313
|
+
switch (status) {
|
|
314
|
+
case "completed":
|
|
315
|
+
return "✓";
|
|
316
|
+
case "failed":
|
|
317
|
+
return "✗";
|
|
318
|
+
case "running":
|
|
319
|
+
return "⏳";
|
|
320
|
+
case "stopped":
|
|
321
|
+
return "⏹";
|
|
322
|
+
case "pending":
|
|
323
|
+
return "○";
|
|
324
|
+
default:
|
|
325
|
+
return "•";
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
//# sourceMappingURL=prompt-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt-builder.js","sourceRoot":"","sources":["../../../src/workflow/services/prompt-builder.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;GAEG;AACH,SAAS,cAAc,CAAC,EAAU;IAChC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IACzC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC;IAEvC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;QACd,MAAM,gBAAgB,GAAG,OAAO,GAAG,EAAE,CAAC;QACtC,OAAO,GAAG,KAAK,KAAK,gBAAgB,GAAG,CAAC;IAC1C,CAAC;IACD,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,MAAM,gBAAgB,GAAG,OAAO,GAAG,EAAE,CAAC;QACtC,OAAO,GAAG,OAAO,KAAK,gBAAgB,GAAG,CAAC;IAC5C,CAAC;IACD,OAAO,GAAG,OAAO,GAAG,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,SAAS,iBAAiB,CAAC,YAA2B;IAKpD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAClD,CAAC;IAED,IAAI,CAAC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**
|
|
2
|
+
* WorkflowWakeupService
|
|
3
|
+
*
|
|
4
|
+
* Handles event recording and orchestrator wakeups.
|
|
5
|
+
* Events are batched within a configurable window before triggering wakeups.
|
|
6
|
+
*/
|
|
7
|
+
import type Database from "better-sqlite3";
|
|
8
|
+
import type { WorkflowEvent, WorkflowEventType } from "@sudocode-ai/types";
|
|
9
|
+
import type { AwaitableEventType } from "../mcp/types.js";
|
|
10
|
+
import type { ExecutionService } from "../../services/execution-service.js";
|
|
11
|
+
import type { WorkflowEventEmitter } from "../workflow-event-emitter.js";
|
|
12
|
+
import { WorkflowPromptBuilder } from "./prompt-builder.js";
|
|
13
|
+
/**
|
|
14
|
+
* Configuration for wakeup behavior
|
|
15
|
+
*/
|
|
16
|
+
export interface WakeupConfig {
|
|
17
|
+
/** Batch window in ms - events within this window are batched into one wakeup */
|
|
18
|
+
batchWindowMs: number;
|
|
19
|
+
/** Optional: wake orchestrator if idle for this long */
|
|
20
|
+
idleTimeoutMs?: number;
|
|
21
|
+
/** Optional: wake orchestrator if execution takes longer than this */
|
|
22
|
+
executionTimeoutMs?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Default wakeup configuration
|
|
26
|
+
*/
|
|
27
|
+
export declare const DEFAULT_WAKEUP_CONFIG: WakeupConfig;
|
|
28
|
+
/**
|
|
29
|
+
* Event to record
|
|
30
|
+
*/
|
|
31
|
+
export interface RecordEventParams {
|
|
32
|
+
workflowId: string;
|
|
33
|
+
type: WorkflowEventType;
|
|
34
|
+
executionId?: string;
|
|
35
|
+
stepId?: string;
|
|
36
|
+
payload: Record<string, unknown>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Internal structure for tracking pending await conditions.
|
|
40
|
+
* Stored in-memory, not persisted to database.
|
|
41
|
+
*/
|
|
42
|
+
export interface PendingAwait {
|
|
43
|
+
id: string;
|
|
44
|
+
workflowId: string;
|
|
45
|
+
eventTypes: AwaitableEventType[];
|
|
46
|
+
executionIds?: string[];
|
|
47
|
+
timeoutAt?: string;
|
|
48
|
+
message?: string;
|
|
49
|
+
createdAt: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Resolved await with trigger information
|
|
53
|
+
*/
|
|
54
|
+
export interface ResolvedAwait extends PendingAwait {
|
|
55
|
+
resolvedBy: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Parameters for registering an await condition
|
|
59
|
+
*/
|
|
60
|
+
export interface RegisterAwaitParams {
|
|
61
|
+
workflowId: string;
|
|
62
|
+
eventTypes: AwaitableEventType[];
|
|
63
|
+
executionIds?: string[];
|
|
64
|
+
timeoutSeconds?: number;
|
|
65
|
+
message?: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Service for recording workflow events and triggering orchestrator wakeups.
|
|
69
|
+
*
|
|
70
|
+
* Events are batched within a configurable window. When the window expires,
|
|
71
|
+
* a wakeup is triggered by creating a follow-up execution for the orchestrator.
|
|
72
|
+
*/
|
|
73
|
+
export declare class WorkflowWakeupService {
|
|
74
|
+
private db;
|
|
75
|
+
private executionService;
|
|
76
|
+
private promptBuilder;
|
|
77
|
+
private eventEmitter;
|
|
78
|
+
private config;
|
|
79
|
+
/** Pending wakeup timers by workflow ID */
|
|
80
|
+
private pendingWakeups;
|
|
81
|
+
/** Active execution timeout timers by execution ID */
|
|
82
|
+
private executionTimeouts;
|
|
83
|
+
/** Pending await conditions by workflow ID */
|
|
84
|
+
private pendingAwaits;
|
|
85
|
+
/** Await timeout timers by await ID */
|
|
86
|
+
private awaitTimeouts;
|
|
87
|
+
/** Last resolved await for each workflow (for wakeup message context) */
|
|
88
|
+
private resolvedAwaits;
|
|
89
|
+
/** Whether the service is running (for timeout monitoring) */
|
|
90
|
+
private _isRunning;
|
|
91
|
+
/** Check if the service is running */
|
|
92
|
+
get isRunning(): boolean;
|
|
93
|
+
constructor(deps: {
|
|
94
|
+
db: Database.Database;
|
|
95
|
+
executionService: ExecutionService;
|
|
96
|
+
promptBuilder: WorkflowPromptBuilder;
|
|
97
|
+
eventEmitter: WorkflowEventEmitter;
|
|
98
|
+
config?: Partial<WakeupConfig>;
|
|
99
|
+
});
|
|
100
|
+
/**
|
|
101
|
+
* Record a workflow event.
|
|
102
|
+
* Automatically schedules a wakeup after the batch window.
|
|
103
|
+
* If an await condition is satisfied, triggers immediate wakeup.
|
|
104
|
+
*/
|
|
105
|
+
recordEvent(params: RecordEventParams): Promise<void>;
|
|
106
|
+
/**
|
|
107
|
+
* Get all unprocessed events for a workflow.
|
|
108
|
+
*/
|
|
109
|
+
getUnprocessedEvents(workflowId: string): WorkflowEvent[];
|
|
110
|
+
/**
|
|
111
|
+
* Mark events as processed.
|
|
112
|
+
*/
|
|
113
|
+
markEventsProcessed(eventIds: string[]): void;
|
|
114
|
+
/**
|
|
115
|
+
* Schedule a wakeup for a workflow.
|
|
116
|
+
* Debounced within the batch window - multiple events will be batched.
|
|
117
|
+
*/
|
|
118
|
+
scheduleWakeup(workflowId: string): void;
|
|
119
|
+
/**
|
|
120
|
+
* Cancel a pending wakeup for a workflow.
|
|
121
|
+
*/
|
|
122
|
+
cancelPendingWakeup(workflowId: string): void;
|
|
123
|
+
/**
|
|
124
|
+
* Start a timeout for an execution.
|
|
125
|
+
*
|
|
126
|
+
* When the timeout fires, the execution is cancelled and a step_failed
|
|
127
|
+
* event is recorded with reason "timeout".
|
|
128
|
+
*
|
|
129
|
+
* The timeout deadline is persisted to the database so it can be recovered
|
|
130
|
+
* after server restart.
|
|
131
|
+
*
|
|
132
|
+
* @param executionId - The execution to track
|
|
133
|
+
* @param workflowId - The workflow the execution belongs to
|
|
134
|
+
* @param stepId - The workflow step ID
|
|
135
|
+
* @param timeoutMs - Timeout duration in milliseconds
|
|
136
|
+
*/
|
|
137
|
+
startExecutionTimeout(executionId: string, workflowId: string, stepId: string, timeoutMs: number): void;
|
|
138
|
+
/**
|
|
139
|
+
* Clear timeout for an execution.
|
|
140
|
+
*
|
|
141
|
+
* Call this when an execution completes normally to prevent
|
|
142
|
+
* the timeout from firing. Also marks the persisted timeout
|
|
143
|
+
* event as processed in the database.
|
|
144
|
+
*
|
|
145
|
+
* @param executionId - The execution to clear timeout for
|
|
146
|
+
*/
|
|
147
|
+
clearExecutionTimeout(executionId: string): void;
|
|
148
|
+
/**
|
|
149
|
+
* Handle an execution timeout.
|
|
150
|
+
*
|
|
151
|
+
* Cancels the execution and records a step_failed event.
|
|
152
|
+
*
|
|
153
|
+
* @param executionId - The timed-out execution
|
|
154
|
+
* @param workflowId - The workflow containing the execution
|
|
155
|
+
* @param stepId - The workflow step that timed out
|
|
156
|
+
*/
|
|
157
|
+
private handleExecutionTimeout;
|
|
158
|
+
/**
|
|
159
|
+
* Trigger an immediate wakeup for a workflow.
|
|
160
|
+
* Collects unprocessed events, builds a wakeup message, and creates
|
|
161
|
+
* a follow-up execution for the orchestrator.
|
|
162
|
+
*/
|
|
163
|
+
triggerWakeup(workflowId: string): Promise<void>;
|
|
164
|
+
/**
|
|
165
|
+
* Start the wakeup service (enables timeout monitoring).
|
|
166
|
+
*/
|
|
167
|
+
start(): void;
|
|
168
|
+
/**
|
|
169
|
+
* Recover state from the database after server restart.
|
|
170
|
+
*
|
|
171
|
+
* This method:
|
|
172
|
+
* 1. Recovers pending await conditions from workflow_events
|
|
173
|
+
* 2. Reschedules await timeouts (calculating remaining time)
|
|
174
|
+
* 3. Triggers immediate wakeup for expired awaits
|
|
175
|
+
* 4. Schedules wakeups for workflows with unprocessed events
|
|
176
|
+
* 5. Recovers execution timeout timers
|
|
177
|
+
*
|
|
178
|
+
* Should be called during server startup after the service is constructed.
|
|
179
|
+
*/
|
|
180
|
+
recoverState(): Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* Recover pending await conditions from the database.
|
|
183
|
+
*/
|
|
184
|
+
private recoverPendingAwaits;
|
|
185
|
+
/**
|
|
186
|
+
* Schedule wakeups for workflows with unprocessed events.
|
|
187
|
+
*/
|
|
188
|
+
private recoverPendingWakeups;
|
|
189
|
+
/**
|
|
190
|
+
* Recover execution timeout timers from the database.
|
|
191
|
+
*
|
|
192
|
+
* Finds unprocessed execution_timeout events and reschedules the timers
|
|
193
|
+
* with the remaining time. If the timeout has already expired, handles
|
|
194
|
+
* the timeout immediately.
|
|
195
|
+
*/
|
|
196
|
+
private recoverExecutionTimeouts;
|
|
197
|
+
/**
|
|
198
|
+
* Stop the wakeup service.
|
|
199
|
+
* Cancels all pending wakeups, execution timeouts, and await conditions.
|
|
200
|
+
*/
|
|
201
|
+
stop(): void;
|
|
202
|
+
/**
|
|
203
|
+
* Register a new await condition.
|
|
204
|
+
* Called by the await-events API endpoint.
|
|
205
|
+
*
|
|
206
|
+
* Persists the await to workflow_events for recovery after server restart.
|
|
207
|
+
*/
|
|
208
|
+
registerAwait(params: RegisterAwaitParams): {
|
|
209
|
+
id: string;
|
|
210
|
+
timeoutAt?: string;
|
|
211
|
+
};
|
|
212
|
+
/**
|
|
213
|
+
* Check if an event satisfies the pending await for a workflow.
|
|
214
|
+
* Called internally when recording events.
|
|
215
|
+
*/
|
|
216
|
+
private checkAwaitCondition;
|
|
217
|
+
/**
|
|
218
|
+
* Map workflow event type to awaitable event type.
|
|
219
|
+
*/
|
|
220
|
+
private mapToAwaitableEventType;
|
|
221
|
+
/**
|
|
222
|
+
* Resolve an await condition (internal).
|
|
223
|
+
*
|
|
224
|
+
* Marks the await event as processed in the database for recovery tracking.
|
|
225
|
+
*/
|
|
226
|
+
private resolveAwait;
|
|
227
|
+
/**
|
|
228
|
+
* Schedule timeout for an await.
|
|
229
|
+
*/
|
|
230
|
+
private scheduleAwaitTimeout;
|
|
231
|
+
/**
|
|
232
|
+
* Get the last resolved await for a workflow (for wakeup message).
|
|
233
|
+
* Clears after retrieval.
|
|
234
|
+
*/
|
|
235
|
+
getAndClearResolvedAwait(workflowId: string): ResolvedAwait | undefined;
|
|
236
|
+
/**
|
|
237
|
+
* Clear all await state for a workflow (on cancel/complete).
|
|
238
|
+
* Marks any pending await events as processed in the database.
|
|
239
|
+
*/
|
|
240
|
+
clearAwaitState(workflowId: string): void;
|
|
241
|
+
/**
|
|
242
|
+
* Check if a workflow has a pending await condition.
|
|
243
|
+
*/
|
|
244
|
+
hasPendingAwait(workflowId: string): boolean;
|
|
245
|
+
/**
|
|
246
|
+
* Get the pending await for a workflow (if any).
|
|
247
|
+
*/
|
|
248
|
+
getPendingAwait(workflowId: string): PendingAwait | undefined;
|
|
249
|
+
/**
|
|
250
|
+
* Get a workflow by ID.
|
|
251
|
+
*/
|
|
252
|
+
private getWorkflow;
|
|
253
|
+
/**
|
|
254
|
+
* Get executions referenced by events.
|
|
255
|
+
*/
|
|
256
|
+
private getExecutionsForEvents;
|
|
257
|
+
/**
|
|
258
|
+
* Update the workflow's orchestrator execution ID.
|
|
259
|
+
*/
|
|
260
|
+
private updateOrchestratorExecution;
|
|
261
|
+
}
|
|
262
|
+
//# sourceMappingURL=wakeup-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wakeup-service.d.ts","sourceRoot":"","sources":["../../../src/workflow/services/wakeup-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,KAAK,EAEV,aAAa,EACb,iBAAiB,EAGlB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAM5D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,iFAAiF;IACjF,aAAa,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sEAAsE;IACtE,kBA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