astrocode-workflow 0.1.48 → 0.1.51
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 +8 -9
- package/dist/ui/inject.js +2 -2
- package/package.json +1 -1
- package/src/tools/workflow.ts +8 -9
- package/src/ui/inject.ts +2 -2
package/dist/tools/workflow.js
CHANGED
|
@@ -10,13 +10,13 @@ import { debug } from "../shared/log";
|
|
|
10
10
|
import { createToastManager } from "../ui/toasts";
|
|
11
11
|
// Agent name mapping for case-sensitive resolution
|
|
12
12
|
const STAGE_TO_AGENT_MAP = {
|
|
13
|
-
frame: "
|
|
14
|
-
plan: "
|
|
15
|
-
spec: "
|
|
16
|
-
implement: "
|
|
17
|
-
review: "
|
|
18
|
-
verify: "
|
|
19
|
-
close: "
|
|
13
|
+
frame: "frame",
|
|
14
|
+
plan: "plan",
|
|
15
|
+
spec: "spec",
|
|
16
|
+
implement: "implement",
|
|
17
|
+
review: "review",
|
|
18
|
+
verify: "verify",
|
|
19
|
+
close: "close"
|
|
20
20
|
};
|
|
21
21
|
function resolveAgentName(stageKey, config) {
|
|
22
22
|
// Use configurable agent names from config, fallback to hardcoded map, then General
|
|
@@ -193,8 +193,7 @@ export function createAstroWorkflowProceedTool(opts) {
|
|
|
193
193
|
return false;
|
|
194
194
|
};
|
|
195
195
|
if (!agentExists(agentName)) {
|
|
196
|
-
console.warn(`[Astrocode] Agent ${agentName} not found in config. Falling back to orchestrator
|
|
197
|
-
console.warn(`[Astrocode] Agent check: config.agent exists: ${!!systemConfig.agent}, agentName in config: ${systemConfig.agent ? agentName in systemConfig.agent : 'N/A'}`);
|
|
196
|
+
console.warn(`[Astrocode] Agent ${agentName} not found in config. Falling back to orchestrator.`);
|
|
198
197
|
// Skip General fallback for stage agents to avoid malformed output
|
|
199
198
|
agentName = config.agents?.orchestrator_name || "Astro";
|
|
200
199
|
if (!agentExists(agentName)) {
|
package/dist/ui/inject.js
CHANGED
|
@@ -6,7 +6,7 @@ export async function injectChatPrompt(opts) {
|
|
|
6
6
|
const prefixedText = `[${agent}]\n\n${text}`;
|
|
7
7
|
if (isInjecting) {
|
|
8
8
|
// Replace any existing queued injection (keep only latest)
|
|
9
|
-
queuedInjection =
|
|
9
|
+
queuedInjection = opts;
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
isInjecting = true;
|
|
@@ -39,7 +39,7 @@ export async function injectChatPrompt(opts) {
|
|
|
39
39
|
const next = queuedInjection;
|
|
40
40
|
queuedInjection = null;
|
|
41
41
|
// Schedule next injection asynchronously to prevent recursion
|
|
42
|
-
setImmediate(() => injectChatPrompt(
|
|
42
|
+
setImmediate(() => injectChatPrompt(next));
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
}
|
package/package.json
CHANGED
package/src/tools/workflow.ts
CHANGED
|
@@ -14,13 +14,13 @@ import { createToastManager } from "../ui/toasts";
|
|
|
14
14
|
|
|
15
15
|
// Agent name mapping for case-sensitive resolution
|
|
16
16
|
const STAGE_TO_AGENT_MAP: Record<string, string> = {
|
|
17
|
-
frame: "
|
|
18
|
-
plan: "
|
|
19
|
-
spec: "
|
|
20
|
-
implement: "
|
|
21
|
-
review: "
|
|
22
|
-
verify: "
|
|
23
|
-
close: "
|
|
17
|
+
frame: "frame",
|
|
18
|
+
plan: "plan",
|
|
19
|
+
spec: "spec",
|
|
20
|
+
implement: "implement",
|
|
21
|
+
review: "review",
|
|
22
|
+
verify: "verify",
|
|
23
|
+
close: "close"
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
function resolveAgentName(stageKey: StageKey, config: AstrocodeConfig): string {
|
|
@@ -235,8 +235,7 @@ export function createAstroWorkflowProceedTool(opts: { ctx: any; config: Astroco
|
|
|
235
235
|
};
|
|
236
236
|
|
|
237
237
|
if (!agentExists(agentName)) {
|
|
238
|
-
console.warn(`[Astrocode] Agent ${agentName} not found in config. Falling back to orchestrator
|
|
239
|
-
console.warn(`[Astrocode] Agent check: config.agent exists: ${!!systemConfig.agent}, agentName in config: ${systemConfig.agent ? agentName in systemConfig.agent : 'N/A'}`);
|
|
238
|
+
console.warn(`[Astrocode] Agent ${agentName} not found in config. Falling back to orchestrator.`);
|
|
240
239
|
// Skip General fallback for stage agents to avoid malformed output
|
|
241
240
|
agentName = config.agents?.orchestrator_name || "Astro";
|
|
242
241
|
if (!agentExists(agentName)) {
|
package/src/ui/inject.ts
CHANGED
|
@@ -14,7 +14,7 @@ export async function injectChatPrompt(opts: {
|
|
|
14
14
|
|
|
15
15
|
if (isInjecting) {
|
|
16
16
|
// Replace any existing queued injection (keep only latest)
|
|
17
|
-
queuedInjection =
|
|
17
|
+
queuedInjection = opts;
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -49,7 +49,7 @@ export async function injectChatPrompt(opts: {
|
|
|
49
49
|
const next = queuedInjection;
|
|
50
50
|
queuedInjection = null;
|
|
51
51
|
// Schedule next injection asynchronously to prevent recursion
|
|
52
|
-
setImmediate(() => injectChatPrompt(
|
|
52
|
+
setImmediate(() => injectChatPrompt(next));
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|