astrocode-workflow 0.1.1 → 0.1.2
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/agents/registry.js +7 -7
- package/dist/config/schema.js +7 -7
- package/dist/ui/inject.js +10 -1
- package/package.json +2 -2
- package/src/agents/registry.ts +7 -7
- package/src/config/schema.ts +7 -7
- package/src/ui/inject.ts +10 -1
package/dist/agents/registry.js
CHANGED
|
@@ -98,13 +98,13 @@ export function createAstroAgents(opts) {
|
|
|
98
98
|
pluginConfig.agents = {
|
|
99
99
|
orchestrator_name: "Astro",
|
|
100
100
|
stage_agent_names: {
|
|
101
|
-
frame: "
|
|
102
|
-
plan: "
|
|
103
|
-
spec: "
|
|
104
|
-
implement: "
|
|
105
|
-
review: "
|
|
106
|
-
verify: "
|
|
107
|
-
close: "
|
|
101
|
+
frame: "Frame",
|
|
102
|
+
plan: "Plan",
|
|
103
|
+
spec: "Spec",
|
|
104
|
+
implement: "Implement",
|
|
105
|
+
review: "Review",
|
|
106
|
+
verify: "Verify",
|
|
107
|
+
close: "Close"
|
|
108
108
|
},
|
|
109
109
|
librarian_name: "Librarian",
|
|
110
110
|
explore_name: "Explore",
|
package/dist/config/schema.js
CHANGED
|
@@ -129,13 +129,13 @@ const AgentsSchema = z.object({
|
|
|
129
129
|
// Display names for the stage sub-agents.
|
|
130
130
|
stage_agent_names: z
|
|
131
131
|
.object({
|
|
132
|
-
frame: z.string().default("
|
|
133
|
-
plan: z.string().default("
|
|
134
|
-
spec: z.string().default("
|
|
135
|
-
implement: z.string().default("
|
|
136
|
-
review: z.string().default("
|
|
137
|
-
verify: z.string().default("
|
|
138
|
-
close: z.string().default("
|
|
132
|
+
frame: z.string().default("Frame"),
|
|
133
|
+
plan: z.string().default("Plan"),
|
|
134
|
+
spec: z.string().default("Spec"),
|
|
135
|
+
implement: z.string().default("Implement"),
|
|
136
|
+
review: z.string().default("Review"),
|
|
137
|
+
verify: z.string().default("Verify"),
|
|
138
|
+
close: z.string().default("Close"),
|
|
139
139
|
})
|
|
140
140
|
.partial()
|
|
141
141
|
.default({}),
|
package/dist/ui/inject.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
let isInjecting = false;
|
|
2
|
+
let queuedInjection = null;
|
|
2
3
|
export async function injectChatPrompt(opts) {
|
|
3
4
|
const { ctx, sessionId, text } = opts;
|
|
4
|
-
// Skip if already injecting (max 1 at a time, no queuing)
|
|
5
5
|
if (isInjecting) {
|
|
6
|
+
// Replace any existing queued injection (keep only latest)
|
|
7
|
+
queuedInjection = opts;
|
|
6
8
|
return;
|
|
7
9
|
}
|
|
8
10
|
isInjecting = true;
|
|
@@ -16,5 +18,12 @@ export async function injectChatPrompt(opts) {
|
|
|
16
18
|
}
|
|
17
19
|
finally {
|
|
18
20
|
isInjecting = false;
|
|
21
|
+
// Process queued injection if any
|
|
22
|
+
if (queuedInjection) {
|
|
23
|
+
const next = queuedInjection;
|
|
24
|
+
queuedInjection = null;
|
|
25
|
+
// Schedule next injection asynchronously to prevent recursion
|
|
26
|
+
setImmediate(() => injectChatPrompt(next));
|
|
27
|
+
}
|
|
19
28
|
}
|
|
20
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astrocode-workflow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@opencode-ai/plugin": "^1.1.19",
|
|
20
20
|
"@opencode-ai/sdk": "^1.1.19",
|
|
21
|
-
"astrocode-workflow": "
|
|
21
|
+
"astrocode-workflow": "0.1.1",
|
|
22
22
|
"jsonc-parser": "^3.2.0",
|
|
23
23
|
"zod": "4.1.8"
|
|
24
24
|
},
|
package/src/agents/registry.ts
CHANGED
|
@@ -126,13 +126,13 @@ export function createAstroAgents(opts: {
|
|
|
126
126
|
pluginConfig.agents = {
|
|
127
127
|
orchestrator_name: "Astro",
|
|
128
128
|
stage_agent_names: {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
129
|
+
frame: "Frame",
|
|
130
|
+
plan: "Plan",
|
|
131
|
+
spec: "Spec",
|
|
132
|
+
implement: "Implement",
|
|
133
|
+
review: "Review",
|
|
134
|
+
verify: "Verify",
|
|
135
|
+
close: "Close"
|
|
136
136
|
},
|
|
137
137
|
librarian_name: "Librarian",
|
|
138
138
|
explore_name: "Explore",
|
package/src/config/schema.ts
CHANGED
|
@@ -154,13 +154,13 @@ const AgentsSchema = z.object({
|
|
|
154
154
|
// Display names for the stage sub-agents.
|
|
155
155
|
stage_agent_names: z
|
|
156
156
|
.object({
|
|
157
|
-
frame: z.string().default("
|
|
158
|
-
plan: z.string().default("
|
|
159
|
-
spec: z.string().default("
|
|
160
|
-
implement: z.string().default("
|
|
161
|
-
review: z.string().default("
|
|
162
|
-
verify: z.string().default("
|
|
163
|
-
close: z.string().default("
|
|
157
|
+
frame: z.string().default("Frame"),
|
|
158
|
+
plan: z.string().default("Plan"),
|
|
159
|
+
spec: z.string().default("Spec"),
|
|
160
|
+
implement: z.string().default("Implement"),
|
|
161
|
+
review: z.string().default("Review"),
|
|
162
|
+
verify: z.string().default("Verify"),
|
|
163
|
+
close: z.string().default("Close"),
|
|
164
164
|
})
|
|
165
165
|
.partial()
|
|
166
166
|
.default({}),
|
package/src/ui/inject.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
let isInjecting = false;
|
|
2
|
+
let queuedInjection: { ctx: any; sessionId: string; text: string } | null = null;
|
|
2
3
|
|
|
3
4
|
export async function injectChatPrompt(opts: {
|
|
4
5
|
ctx: any;
|
|
@@ -7,8 +8,9 @@ export async function injectChatPrompt(opts: {
|
|
|
7
8
|
}) {
|
|
8
9
|
const { ctx, sessionId, text } = opts;
|
|
9
10
|
|
|
10
|
-
// Skip if already injecting (max 1 at a time, no queuing)
|
|
11
11
|
if (isInjecting) {
|
|
12
|
+
// Replace any existing queued injection (keep only latest)
|
|
13
|
+
queuedInjection = opts;
|
|
12
14
|
return;
|
|
13
15
|
}
|
|
14
16
|
|
|
@@ -23,5 +25,12 @@ export async function injectChatPrompt(opts: {
|
|
|
23
25
|
});
|
|
24
26
|
} finally {
|
|
25
27
|
isInjecting = false;
|
|
28
|
+
// Process queued injection if any
|
|
29
|
+
if (queuedInjection) {
|
|
30
|
+
const next = queuedInjection;
|
|
31
|
+
queuedInjection = null;
|
|
32
|
+
// Schedule next injection asynchronously to prevent recursion
|
|
33
|
+
setImmediate(() => injectChatPrompt(next));
|
|
34
|
+
}
|
|
26
35
|
}
|
|
27
36
|
}
|