@synergenius/flow-weaver-pack-weaver 0.9.181 → 0.9.183
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/bot/capability-registry.d.ts.map +1 -1
- package/dist/bot/capability-registry.js +107 -364
- package/dist/bot/capability-registry.js.map +1 -1
- package/dist/bot/swarm-controller.d.ts.map +1 -1
- package/dist/bot/swarm-controller.js +1 -0
- package/dist/bot/swarm-controller.js.map +1 -1
- package/dist/bot/system-prompt.d.ts.map +1 -1
- package/dist/bot/system-prompt.js +1 -8
- package/dist/bot/system-prompt.js.map +1 -1
- package/dist/node-types/plan-task.d.ts.map +1 -1
- package/dist/node-types/plan-task.js +11 -7
- package/dist/node-types/plan-task.js.map +1 -1
- package/dist/ui/capability-editor.js +105 -363
- package/dist/ui/profile-editor.js +105 -363
- package/dist/ui/swarm-dashboard.js +101 -359
- package/flowweaver.manifest.json +1 -1
- package/package.json +1 -1
- package/src/bot/capability-registry.ts +108 -365
- package/src/bot/swarm-controller.ts +1 -0
- package/src/bot/system-prompt.ts +1 -8
- package/src/node-types/plan-task.ts +11 -7
|
@@ -3,7 +3,7 @@ import { callPlatformWithMessages, callCapabilityTriage } from '../bot/ai-client
|
|
|
3
3
|
import type { AiTool, AiCallResult, ChatMessage } from '../bot/ai-client.js';
|
|
4
4
|
import { auditEmit } from '../bot/audit-logger.js';
|
|
5
5
|
import { executeStep } from '../bot/step-executor.js';
|
|
6
|
-
import { getCapabilitiesByNames, BUILT_IN_CAPABILITIES } from '../bot/capability-registry.js';
|
|
6
|
+
import { getCapabilitiesByNames, BUILT_IN_CAPABILITIES, PROFILE_CAPABILITIES } from '../bot/capability-registry.js';
|
|
7
7
|
|
|
8
8
|
// ---------------------------------------------------------------------------
|
|
9
9
|
// Tool definitions — built dynamically from capability-granted operations
|
|
@@ -168,16 +168,20 @@ export async function weaverPlanTask(
|
|
|
168
168
|
}
|
|
169
169
|
const task = JSON.parse(context.taskJson);
|
|
170
170
|
|
|
171
|
-
// Resolve available capabilities
|
|
171
|
+
// Resolve available capabilities: profile pool > behavior config > all defaults
|
|
172
172
|
const behavior = context.behaviorJson ? JSON.parse(context.behaviorJson) : undefined;
|
|
173
|
-
const
|
|
173
|
+
const profilePool = task.assignedProfile ? PROFILE_CAPABILITIES[task.assignedProfile] : undefined;
|
|
174
|
+
const availableCapNames: string[] = profilePool ?? behavior?.capabilities ?? BUILT_IN_CAPABILITIES.map(c => c.name);
|
|
174
175
|
const availableCaps = getCapabilitiesByNames(availableCapNames);
|
|
175
176
|
|
|
176
|
-
// Capability triage:
|
|
177
|
+
// Capability triage: only run when using the default (all) pool.
|
|
178
|
+
// Profile pools are already scoped — triage would just add latency + cost.
|
|
177
179
|
let selectedCaps = availableCaps;
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
if (!profilePool) {
|
|
181
|
+
const triageResult = await callCapabilityTriage(pInfo, task.instruction, availableCaps);
|
|
182
|
+
if (triageResult) {
|
|
183
|
+
selectedCaps = getCapabilitiesByNames(triageResult);
|
|
184
|
+
}
|
|
181
185
|
}
|
|
182
186
|
|
|
183
187
|
// Build system prompt from capabilities
|