astrocode-workflow 0.1.17 → 0.1.18
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 +9 -2
- package/package.json +2 -2
- package/src/tools/workflow.ts +11 -2
package/dist/tools/workflow.js
CHANGED
|
@@ -136,10 +136,17 @@ export function createAstroWorkflowProceedTool(opts) {
|
|
|
136
136
|
const systemConfig = config;
|
|
137
137
|
// Check both the system config agent map (if present) OR the local agents map passed to the tool
|
|
138
138
|
const agentExists = (name) => {
|
|
139
|
-
|
|
139
|
+
// Check local agents map first (populated from src/index.ts)
|
|
140
|
+
if (agents && agents[name]) {
|
|
141
|
+
console.log(`[Astrocode] Found agent ${name} in local agents map`);
|
|
140
142
|
return true;
|
|
141
|
-
|
|
143
|
+
}
|
|
144
|
+
// Check system config agent map
|
|
145
|
+
if (systemConfig.agent && systemConfig.agent[name]) {
|
|
146
|
+
console.log(`[Astrocode] Found agent ${name} in systemConfig.agent`);
|
|
142
147
|
return true;
|
|
148
|
+
}
|
|
149
|
+
console.log(`[Astrocode] Agent ${name} NOT found in local map (keys: ${Object.keys(agents || {}).join(",")}) or systemConfig`);
|
|
143
150
|
return false;
|
|
144
151
|
};
|
|
145
152
|
if (!agentExists(agentName)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astrocode-workflow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
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.1.
|
|
21
|
+
"astrocode-workflow": "^0.1.17",
|
|
22
22
|
"jsonc-parser": "^3.2.0",
|
|
23
23
|
"zod": "4.1.8"
|
|
24
24
|
},
|
package/src/tools/workflow.ts
CHANGED
|
@@ -167,8 +167,17 @@ export function createAstroWorkflowProceedTool(opts: { ctx: any; config: Astroco
|
|
|
167
167
|
const systemConfig = config as any;
|
|
168
168
|
// Check both the system config agent map (if present) OR the local agents map passed to the tool
|
|
169
169
|
const agentExists = (name: string) => {
|
|
170
|
-
|
|
171
|
-
if (
|
|
170
|
+
// Check local agents map first (populated from src/index.ts)
|
|
171
|
+
if (agents && agents[name]) {
|
|
172
|
+
console.log(`[Astrocode] Found agent ${name} in local agents map`);
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
// Check system config agent map
|
|
176
|
+
if (systemConfig.agent && systemConfig.agent[name]) {
|
|
177
|
+
console.log(`[Astrocode] Found agent ${name} in systemConfig.agent`);
|
|
178
|
+
return true;
|
|
179
|
+
}
|
|
180
|
+
console.log(`[Astrocode] Agent ${name} NOT found in local map (keys: ${Object.keys(agents || {}).join(",")}) or systemConfig`);
|
|
172
181
|
return false;
|
|
173
182
|
};
|
|
174
183
|
|