astrocode-workflow 0.1.34 → 0.1.35
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/tools/workflow.js +19 -0
- package/package.json +1 -1
- package/src/tools/workflow.ts +22 -0
package/dist/tools/workflow.js
CHANGED
|
@@ -122,6 +122,25 @@ export function createAstroWorkflowProceedTool(opts) {
|
|
|
122
122
|
if (config.ui.toasts.enabled && config.ui.toasts.show_run_completed) {
|
|
123
123
|
await toasts.show({ title: "Astrocode", message: `Run completed (${next.run_id})`, variant: "success" });
|
|
124
124
|
}
|
|
125
|
+
// Inject continuation directive for workflow resumption
|
|
126
|
+
if (sessionId) {
|
|
127
|
+
const continueDirective = [
|
|
128
|
+
`[SYSTEM DIRECTIVE: ASTROCODE — CONTINUE]`,
|
|
129
|
+
``,
|
|
130
|
+
`Run ${next.run_id} completed successfully.`,
|
|
131
|
+
``,
|
|
132
|
+
`The Clara Forms implementation run has finished all stages. The spec has been analyzed and decomposed into prioritized implementation stories.`,
|
|
133
|
+
``,
|
|
134
|
+
`Next actions: Review the generated stories and approve the next one to continue development.`,
|
|
135
|
+
].join("\n");
|
|
136
|
+
await injectChatPrompt({
|
|
137
|
+
ctx,
|
|
138
|
+
sessionId,
|
|
139
|
+
text: continueDirective,
|
|
140
|
+
agent: "Astro"
|
|
141
|
+
});
|
|
142
|
+
actions.push(`injected continuation directive for completed run ${next.run_id}`);
|
|
143
|
+
}
|
|
125
144
|
// Check for next approved story to start
|
|
126
145
|
const nextStory = db.prepare("SELECT story_key, title FROM stories WHERE state = 'approved' ORDER BY priority DESC, created_at ASC LIMIT 1").get();
|
|
127
146
|
if (nextStory && sessionId) {
|
package/package.json
CHANGED
package/src/tools/workflow.ts
CHANGED
|
@@ -153,6 +153,28 @@ export function createAstroWorkflowProceedTool(opts: { ctx: any; config: Astroco
|
|
|
153
153
|
await toasts.show({ title: "Astrocode", message: `Run completed (${next.run_id})`, variant: "success" });
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
+
// Inject continuation directive for workflow resumption
|
|
157
|
+
if (sessionId) {
|
|
158
|
+
const continueDirective = [
|
|
159
|
+
`[SYSTEM DIRECTIVE: ASTROCODE — CONTINUE]`,
|
|
160
|
+
``,
|
|
161
|
+
`Run ${next.run_id} completed successfully.`,
|
|
162
|
+
``,
|
|
163
|
+
`The Clara Forms implementation run has finished all stages. The spec has been analyzed and decomposed into prioritized implementation stories.`,
|
|
164
|
+
``,
|
|
165
|
+
`Next actions: Review the generated stories and approve the next one to continue development.`,
|
|
166
|
+
].join("\n");
|
|
167
|
+
|
|
168
|
+
await injectChatPrompt({
|
|
169
|
+
ctx,
|
|
170
|
+
sessionId,
|
|
171
|
+
text: continueDirective,
|
|
172
|
+
agent: "Astro"
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
actions.push(`injected continuation directive for completed run ${next.run_id}`);
|
|
176
|
+
}
|
|
177
|
+
|
|
156
178
|
// Check for next approved story to start
|
|
157
179
|
const nextStory = db.prepare(
|
|
158
180
|
"SELECT story_key, title FROM stories WHERE state = 'approved' ORDER BY priority DESC, created_at ASC LIMIT 1"
|