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.
@@ -98,13 +98,13 @@ export function createAstroAgents(opts) {
98
98
  pluginConfig.agents = {
99
99
  orchestrator_name: "Astro",
100
100
  stage_agent_names: {
101
- frame: "AstroFrame",
102
- plan: "AstroPlan",
103
- spec: "AstroSpec",
104
- implement: "AstroImplement",
105
- review: "AstroReview",
106
- verify: "AstroVerify",
107
- close: "AstroClose"
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",
@@ -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("Astro — Frame"),
133
- plan: z.string().default("Astro — Plan"),
134
- spec: z.string().default("Astro — Spec"),
135
- implement: z.string().default("Astro — Implement"),
136
- review: z.string().default("Astro — Review"),
137
- verify: z.string().default("Astro — Verify"),
138
- close: z.string().default("Astro — Close"),
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.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": "^0.0.5",
21
+ "astrocode-workflow": "0.1.1",
22
22
  "jsonc-parser": "^3.2.0",
23
23
  "zod": "4.1.8"
24
24
  },
@@ -126,13 +126,13 @@ export function createAstroAgents(opts: {
126
126
  pluginConfig.agents = {
127
127
  orchestrator_name: "Astro",
128
128
  stage_agent_names: {
129
- frame: "AstroFrame",
130
- plan: "AstroPlan",
131
- spec: "AstroSpec",
132
- implement: "AstroImplement",
133
- review: "AstroReview",
134
- verify: "AstroVerify",
135
- close: "AstroClose"
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",
@@ -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("Astro — Frame"),
158
- plan: z.string().default("Astro — Plan"),
159
- spec: z.string().default("Astro — Spec"),
160
- implement: z.string().default("Astro — Implement"),
161
- review: z.string().default("Astro — Review"),
162
- verify: z.string().default("Astro — Verify"),
163
- close: z.string().default("Astro — Close"),
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
  }