@synergenius/flow-weaver-pack-weaver 0.9.59 → 0.9.77
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/ai-chat-provider.d.ts +12 -0
- package/dist/ai-chat-provider.d.ts.map +1 -1
- package/dist/ai-chat-provider.js +351 -335
- package/dist/ai-chat-provider.js.map +1 -1
- package/dist/bot/agent-loop.d.ts +20 -0
- package/dist/bot/agent-loop.d.ts.map +1 -0
- package/dist/bot/agent-loop.js +331 -0
- package/dist/bot/agent-loop.js.map +1 -0
- package/dist/bot/ai-router.d.ts +19 -0
- package/dist/bot/ai-router.d.ts.map +1 -0
- package/dist/bot/ai-router.js +104 -0
- package/dist/bot/ai-router.js.map +1 -0
- package/dist/bot/assistant-tools.d.ts.map +1 -1
- package/dist/bot/assistant-tools.js +49 -33
- package/dist/bot/assistant-tools.js.map +1 -1
- package/dist/bot/async-mutex.d.ts +13 -0
- package/dist/bot/async-mutex.d.ts.map +1 -0
- package/dist/bot/async-mutex.js +37 -0
- package/dist/bot/async-mutex.js.map +1 -0
- package/dist/bot/bot-manager.d.ts +2 -2
- package/dist/bot/bot-manager.d.ts.map +1 -1
- package/dist/bot/bot-manager.js +3 -3
- package/dist/bot/bot-manager.js.map +1 -1
- package/dist/bot/bot-registry.js +2 -2
- package/dist/bot/bot-registry.js.map +1 -1
- package/dist/bot/conversation-store.d.ts +1 -0
- package/dist/bot/conversation-store.d.ts.map +1 -1
- package/dist/bot/conversation-store.js.map +1 -1
- package/dist/bot/dashboard.d.ts.map +1 -1
- package/dist/bot/dashboard.js +17 -8
- package/dist/bot/dashboard.js.map +1 -1
- package/dist/bot/improve-loop.js.map +1 -1
- package/dist/bot/index.d.ts +2 -4
- package/dist/bot/index.d.ts.map +1 -1
- package/dist/bot/index.js +1 -2
- package/dist/bot/index.js.map +1 -1
- package/dist/bot/instance-manager.d.ts +31 -0
- package/dist/bot/instance-manager.d.ts.map +1 -0
- package/dist/bot/instance-manager.js +115 -0
- package/dist/bot/instance-manager.js.map +1 -0
- package/dist/bot/orchestrator.d.ts +36 -0
- package/dist/bot/orchestrator.d.ts.map +1 -0
- package/dist/bot/orchestrator.js +176 -0
- package/dist/bot/orchestrator.js.map +1 -0
- package/dist/bot/profile-store.d.ts +36 -0
- package/dist/bot/profile-store.d.ts.map +1 -0
- package/dist/bot/profile-store.js +208 -0
- package/dist/bot/profile-store.js.map +1 -0
- package/dist/bot/profile-types.d.ts +126 -0
- package/dist/bot/profile-types.d.ts.map +1 -0
- package/dist/bot/profile-types.js +7 -0
- package/dist/bot/profile-types.js.map +1 -0
- package/dist/bot/run-store.d.ts.map +1 -1
- package/dist/bot/run-store.js +8 -0
- package/dist/bot/run-store.js.map +1 -1
- package/dist/bot/runner.d.ts +4 -0
- package/dist/bot/runner.d.ts.map +1 -1
- package/dist/bot/runner.js +5 -1
- package/dist/bot/runner.js.map +1 -1
- package/dist/bot/swarm-controller.d.ts +109 -0
- package/dist/bot/swarm-controller.d.ts.map +1 -0
- package/dist/bot/swarm-controller.js +640 -0
- package/dist/bot/swarm-controller.js.map +1 -0
- package/dist/bot/swarm-event-log.d.ts +28 -0
- package/dist/bot/swarm-event-log.d.ts.map +1 -0
- package/dist/bot/swarm-event-log.js +54 -0
- package/dist/bot/swarm-event-log.js.map +1 -0
- package/dist/bot/task-prompt-builder.d.ts +22 -0
- package/dist/bot/task-prompt-builder.d.ts.map +1 -0
- package/dist/bot/task-prompt-builder.js +240 -0
- package/dist/bot/task-prompt-builder.js.map +1 -0
- package/dist/bot/task-store.d.ts +21 -0
- package/dist/bot/task-store.d.ts.map +1 -0
- package/dist/bot/task-store.js +364 -0
- package/dist/bot/task-store.js.map +1 -0
- package/dist/bot/task-types.d.ts +79 -0
- package/dist/bot/task-types.d.ts.map +1 -0
- package/dist/bot/task-types.js +6 -0
- package/dist/bot/task-types.js.map +1 -0
- package/dist/bot/types.d.ts +8 -0
- package/dist/bot/types.d.ts.map +1 -1
- package/dist/cli-handlers.d.ts.map +1 -1
- package/dist/cli-handlers.js +79 -54
- package/dist/cli-handlers.js.map +1 -1
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +749 -0
- package/dist/cli.js.map +1 -0
- package/dist/docs/docs/weaver-bot-usage.md +35 -18
- package/dist/docs/docs/weaver-config.md +20 -0
- package/dist/docs/docs/weaver-task-queue.md +31 -19
- package/dist/docs/weaver-config.md +15 -9
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-tools.d.ts +17 -0
- package/dist/mcp-tools.d.ts.map +1 -1
- package/dist/mcp-tools.js +98 -279
- package/dist/mcp-tools.js.map +1 -1
- package/dist/node-types/bot-report.d.ts.map +1 -1
- package/dist/node-types/bot-report.js +6 -24
- package/dist/node-types/bot-report.js.map +1 -1
- package/dist/node-types/orchestrator-dispatch.d.ts +17 -0
- package/dist/node-types/orchestrator-dispatch.d.ts.map +1 -0
- package/dist/node-types/orchestrator-dispatch.js +63 -0
- package/dist/node-types/orchestrator-dispatch.js.map +1 -0
- package/dist/node-types/orchestrator-load-state.d.ts +16 -0
- package/dist/node-types/orchestrator-load-state.d.ts.map +1 -0
- package/dist/node-types/orchestrator-load-state.js +60 -0
- package/dist/node-types/orchestrator-load-state.js.map +1 -0
- package/dist/node-types/orchestrator-route.d.ts +16 -0
- package/dist/node-types/orchestrator-route.d.ts.map +1 -0
- package/dist/node-types/orchestrator-route.js +28 -0
- package/dist/node-types/orchestrator-route.js.map +1 -0
- package/dist/node-types/receive-task.d.ts +2 -3
- package/dist/node-types/receive-task.d.ts.map +1 -1
- package/dist/node-types/receive-task.js +3 -48
- package/dist/node-types/receive-task.js.map +1 -1
- package/dist/templates/weaver-template.d.ts +11 -0
- package/dist/templates/weaver-template.d.ts.map +1 -0
- package/dist/templates/weaver-template.js +53 -0
- package/dist/templates/weaver-template.js.map +1 -0
- package/dist/ui/bot-activity.js +2 -2
- package/dist/ui/bot-constants.d.ts +14 -0
- package/dist/ui/bot-constants.d.ts.map +1 -0
- package/dist/ui/bot-constants.js +189 -0
- package/dist/ui/bot-constants.js.map +1 -0
- package/dist/ui/bot-panel.js +207 -245
- package/dist/ui/bot-slot-card.js +141 -0
- package/dist/ui/budget-bar.js +59 -0
- package/dist/ui/chat-task-result.js +178 -0
- package/dist/ui/decision-log.js +136 -0
- package/dist/ui/profile-card.js +158 -0
- package/dist/ui/profile-editor.js +597 -0
- package/dist/ui/swarm-controls.js +245 -0
- package/dist/ui/swarm-dashboard.js +3012 -0
- package/dist/ui/task-create-form.js +98 -0
- package/dist/ui/task-detail-view.js +1044 -0
- package/dist/ui/task-pool-list.js +156 -0
- package/dist/workflows/orchestrator.d.ts +21 -0
- package/dist/workflows/orchestrator.d.ts.map +1 -0
- package/dist/workflows/orchestrator.js +281 -0
- package/dist/workflows/orchestrator.js.map +1 -0
- package/dist/workflows/weaver-bot-session.d.ts +65 -0
- package/dist/workflows/weaver-bot-session.d.ts.map +1 -0
- package/dist/workflows/weaver-bot-session.js +68 -0
- package/dist/workflows/weaver-bot-session.js.map +1 -0
- package/dist/workflows/weaver.d.ts +24 -0
- package/dist/workflows/weaver.d.ts.map +1 -0
- package/dist/workflows/weaver.js +28 -0
- package/dist/workflows/weaver.js.map +1 -0
- package/flowweaver.manifest.json +547 -133
- package/package.json +1 -1
- package/src/ai-chat-provider.ts +378 -371
- package/src/bot/ai-router.ts +132 -0
- package/src/bot/assistant-tools.ts +47 -29
- package/src/bot/async-mutex.ts +37 -0
- package/src/bot/bot-manager.ts +3 -3
- package/src/bot/bot-registry.ts +2 -2
- package/src/bot/conversation-store.ts +2 -1
- package/src/bot/dashboard.ts +17 -8
- package/src/bot/improve-loop.ts +6 -6
- package/src/bot/index.ts +2 -4
- package/src/bot/instance-manager.ts +128 -0
- package/src/bot/orchestrator.ts +244 -0
- package/src/bot/profile-store.ts +225 -0
- package/src/bot/profile-types.ts +141 -0
- package/src/bot/run-store.ts +8 -0
- package/src/bot/runner.ts +9 -1
- package/src/bot/swarm-controller.ts +780 -0
- package/src/bot/swarm-event-log.ts +57 -0
- package/src/bot/task-prompt-builder.ts +309 -0
- package/src/bot/task-store.ts +407 -0
- package/src/bot/task-types.ts +100 -0
- package/src/bot/types.ts +8 -0
- package/src/cli-handlers.ts +78 -53
- package/src/docs/weaver-bot-usage.md +35 -18
- package/src/docs/weaver-config.md +20 -0
- package/src/docs/weaver-task-queue.md +31 -19
- package/src/index.ts +5 -4
- package/src/mcp-tools.ts +129 -372
- package/src/node-types/bot-report.ts +6 -24
- package/src/node-types/orchestrator-dispatch.ts +71 -0
- package/src/node-types/orchestrator-load-state.ts +66 -0
- package/src/node-types/orchestrator-route.ts +33 -0
- package/src/node-types/receive-task.ts +3 -57
- package/src/ui/bot-activity.tsx +2 -2
- package/src/ui/bot-constants.ts +192 -0
- package/src/ui/bot-panel.tsx +213 -247
- package/src/ui/bot-slot-card.tsx +139 -0
- package/src/ui/budget-bar.tsx +30 -0
- package/src/ui/chat-task-result.tsx +236 -0
- package/src/ui/decision-log.tsx +148 -0
- package/src/ui/profile-card.tsx +157 -0
- package/src/ui/profile-editor.tsx +384 -0
- package/src/ui/swarm-controls.tsx +260 -0
- package/src/ui/swarm-dashboard.tsx +647 -0
- package/src/ui/task-create-form.tsx +87 -0
- package/src/ui/task-detail-view.tsx +841 -0
- package/src/ui/task-pool-list.tsx +187 -0
- package/src/workflows/orchestrator.ts +302 -0
- package/dist/docs/weaver-bot-usage.md +0 -34
- package/dist/docs/weaver-genesis.md +0 -32
- package/dist/docs/weaver-task-queue.md +0 -34
- package/dist/ui/bot-workspace.js +0 -1015
- package/dist/ui/chat-bot-result.js +0 -71
- package/dist/ui/queue-input.js +0 -82
- package/dist/ui/session-bar.js +0 -174
- package/src/bot/error-guide.ts +0 -4
- package/src/bot/retry-utils.ts +0 -4
- package/src/bot/session-state.ts +0 -116
- package/src/bot/task-queue.ts +0 -262
- package/src/ui/bot-workspace.tsx +0 -442
- package/src/ui/chat-bot-result.tsx +0 -81
- package/src/ui/queue-input.tsx +0 -56
- package/src/ui/session-bar.tsx +0 -157
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Loads the current swarm state for the orchestrator to make routing decisions.
|
|
3
|
+
*
|
|
4
|
+
* @flowWeaver nodeType
|
|
5
|
+
* @label Load Swarm State
|
|
6
|
+
* @input projectDir [order:0] - Project directory path
|
|
7
|
+
* @output state [order:0] - JSON OrchestratorInput snapshot
|
|
8
|
+
* @output onSuccess [order:-2] - Loaded successfully
|
|
9
|
+
* @output onFailure [order:-1] [hidden] - Load failed
|
|
10
|
+
*/
|
|
11
|
+
export async function orchestratorLoadState(execute, projectDir) {
|
|
12
|
+
if (!execute) {
|
|
13
|
+
return { onSuccess: true, onFailure: false, state: '{"pendingTasks":[],"profiles":[],"instances":[],"budgetRemaining":{"tokens":0,"cost":0}}' };
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
const { SwarmController } = await import('../bot/swarm-controller.js');
|
|
17
|
+
const controller = SwarmController.getInstance(projectDir);
|
|
18
|
+
const profileStore = controller.getProfileStore();
|
|
19
|
+
const instanceManager = controller.getInstanceManager();
|
|
20
|
+
const swarmStatus = controller.getStatus();
|
|
21
|
+
// Load profiles
|
|
22
|
+
const profiles = profileStore.list();
|
|
23
|
+
// Load instances
|
|
24
|
+
const instances = instanceManager.listAll();
|
|
25
|
+
// Calculate budget remaining from swarm state
|
|
26
|
+
const { workspace, session } = swarmStatus.budgets;
|
|
27
|
+
const remainingTokens = [];
|
|
28
|
+
const remainingCost = [];
|
|
29
|
+
if (session.limitTokens > 0)
|
|
30
|
+
remainingTokens.push(session.limitTokens - session.usedTokens);
|
|
31
|
+
if (workspace.limitTokens > 0)
|
|
32
|
+
remainingTokens.push(workspace.limitTokens - workspace.usedTokens);
|
|
33
|
+
if (session.limitCost > 0)
|
|
34
|
+
remainingCost.push(session.limitCost - session.usedCost);
|
|
35
|
+
if (workspace.limitCost > 0)
|
|
36
|
+
remainingCost.push(workspace.limitCost - workspace.usedCost);
|
|
37
|
+
const budgetRemaining = {
|
|
38
|
+
tokens: remainingTokens.length > 0 ? Math.min(...remainingTokens) : Infinity,
|
|
39
|
+
cost: remainingCost.length > 0 ? Math.min(...remainingCost) : Infinity,
|
|
40
|
+
};
|
|
41
|
+
// Note: pending tasks are not loaded here — the node only loads
|
|
42
|
+
// profiles, instances, and budget. Task loading requires TaskStore
|
|
43
|
+
// access which is internal to SwarmController's dispatch loop.
|
|
44
|
+
// The caller should provide tasks via the workflow or the dispatch loop
|
|
45
|
+
// builds the full OrchestratorInput itself.
|
|
46
|
+
const input = {
|
|
47
|
+
pendingTasks: [],
|
|
48
|
+
profiles,
|
|
49
|
+
instances,
|
|
50
|
+
budgetRemaining,
|
|
51
|
+
};
|
|
52
|
+
return { onSuccess: true, onFailure: false, state: JSON.stringify(input) };
|
|
53
|
+
}
|
|
54
|
+
catch (err) {
|
|
55
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
56
|
+
console.error(`\x1b[31m→ Load swarm state failed: ${msg}\x1b[0m`);
|
|
57
|
+
return { onSuccess: false, onFailure: true, state: null };
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=orchestrator-load-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator-load-state.js","sourceRoot":"","sources":["../../src/node-types/orchestrator-load-state.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,OAAgB,EAChB,UAAkB;IAElB,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,0FAA0F,EAAE,CAAC;IAClJ,CAAC;IAED,IAAI,CAAC;QACH,MAAM,EAAE,eAAe,EAAE,GAAG,MA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AQ;YAC5E,IAAI,EAAE,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ;SACvE,CAAC;QAEF,gEAAgE;QAChE,mEAAmE;QACnE,+DAA+D;QAC/D,wEAAwE;QACxE,4CAA4C;QAC5C,MAAM,KAAK,GAAsB;YAC/B,YAAY,EAAE,EAAE;YAChB,QAAQ;YACR,SAAS;YACT,eAAe;SAChB,CAAC;QAEF,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;IAC7E,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,OAAO,CAAC,KAAK,CAAC,sCAAsC,GAAG,SAAS,CAAC,CAAC;QAClE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC5D,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Routes pending tasks to appropriate bot profiles using the orchestrator brain.
|
|
3
|
+
*
|
|
4
|
+
* @flowWeaver nodeType
|
|
5
|
+
* @label Route Tasks
|
|
6
|
+
* @input state [order:0] - JSON OrchestratorInput
|
|
7
|
+
* @output decisions [order:0] - JSON OrchestratorOutput
|
|
8
|
+
* @output onSuccess [order:-2] - Routing complete
|
|
9
|
+
* @output onFailure [order:-1] [hidden] - Routing failed
|
|
10
|
+
*/
|
|
11
|
+
export declare function orchestratorRoute(execute: boolean, state: string): Promise<{
|
|
12
|
+
onSuccess: boolean;
|
|
13
|
+
onFailure: boolean;
|
|
14
|
+
decisions: string | null;
|
|
15
|
+
}>;
|
|
16
|
+
//# sourceMappingURL=orchestrator-route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator-route.d.ts","sourceRoot":"","sources":["../../src/node-types/orchestrator-route.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CAgB/E"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Orchestrator } from '../bot/orchestrator.js';
|
|
2
|
+
/**
|
|
3
|
+
* Routes pending tasks to appropriate bot profiles using the orchestrator brain.
|
|
4
|
+
*
|
|
5
|
+
* @flowWeaver nodeType
|
|
6
|
+
* @label Route Tasks
|
|
7
|
+
* @input state [order:0] - JSON OrchestratorInput
|
|
8
|
+
* @output decisions [order:0] - JSON OrchestratorOutput
|
|
9
|
+
* @output onSuccess [order:-2] - Routing complete
|
|
10
|
+
* @output onFailure [order:-1] [hidden] - Routing failed
|
|
11
|
+
*/
|
|
12
|
+
export async function orchestratorRoute(execute, state) {
|
|
13
|
+
if (!execute) {
|
|
14
|
+
return { onSuccess: true, onFailure: false, decisions: '{"assignments":[],"scaleActions":[],"skippedTasks":[]}' };
|
|
15
|
+
}
|
|
16
|
+
try {
|
|
17
|
+
const input = JSON.parse(state);
|
|
18
|
+
const orchestrator = new Orchestrator();
|
|
19
|
+
const output = await orchestrator.route(input);
|
|
20
|
+
return { onSuccess: true, onFailure: false, decisions: JSON.stringify(output) };
|
|
21
|
+
}
|
|
22
|
+
catch (err) {
|
|
23
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
24
|
+
console.error(`\x1b[31m→ Route tasks failed: ${msg}\x1b[0m`);
|
|
25
|
+
return { onSuccess: false, onFailure: true, decisions: null };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=orchestrator-route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orchestrator-route.js","sourceRoot":"","sources":["../../src/node-types/orchestrator-route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAgB,EAChB,KAAa;IAEb,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,wDAAwD,EAAE,CAAC;IACpH,CAAC;IAED,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAsB,CAAC;QACrD,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE/C,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;IAClF,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,MAAM,GAAG,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC7D,OAAO,CAAC,KAAK,CAAC,iCAAiC,GAAG,SAAS,CAAC,CAAC;QAC7D,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IAChE,CAAC;AACH,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { WeaverEnv } from '../bot/types.js';
|
|
2
2
|
/**
|
|
3
|
-
* Receives a task
|
|
4
|
-
*
|
|
5
|
-
* WeaverContext that threads through the bot pipeline.
|
|
3
|
+
* Receives a pre-supplied task and creates the WeaverContext that
|
|
4
|
+
* threads through the bot pipeline.
|
|
6
5
|
*
|
|
7
6
|
* @flowWeaver nodeType
|
|
8
7
|
* @label Receive Task
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receive-task.d.ts","sourceRoot":"","sources":["../../src/node-types/receive-task.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"receive-task.d.ts","sourceRoot":"","sources":["../../src/node-types/receive-task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAiB,MAAM,iBAAiB,CAAC;AAEhE;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,SAAS,EACd,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC;IACT,SAAS,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IACvC,GAAG,EAAE,MAAM,CAAC;CACb,CAAC,CAqBD"}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import * as fs from 'node:fs';
|
|
2
|
-
import * as path from 'node:path';
|
|
3
|
-
import * as os from 'node:os';
|
|
4
|
-
import { withFileLock } from '../bot/file-lock.js';
|
|
5
1
|
/**
|
|
6
|
-
* Receives a task
|
|
7
|
-
*
|
|
8
|
-
* WeaverContext that threads through the bot pipeline.
|
|
2
|
+
* Receives a pre-supplied task and creates the WeaverContext that
|
|
3
|
+
* threads through the bot pipeline.
|
|
9
4
|
*
|
|
10
5
|
* @flowWeaver nodeType
|
|
11
6
|
* @label Receive Task
|
|
@@ -20,7 +15,6 @@ export async function weaverReceiveTask(execute, env, taskJson) {
|
|
|
20
15
|
if (!execute) {
|
|
21
16
|
return { onSuccess: true, onFailure: false, ctx: JSON.stringify(context) };
|
|
22
17
|
}
|
|
23
|
-
// If taskJson is pre-supplied, use it directly
|
|
24
18
|
if (taskJson) {
|
|
25
19
|
try {
|
|
26
20
|
const parsed = JSON.parse(taskJson);
|
|
@@ -31,46 +25,7 @@ export async function weaverReceiveTask(execute, env, taskJson) {
|
|
|
31
25
|
return { onSuccess: true, onFailure: false, ctx: JSON.stringify(context) };
|
|
32
26
|
}
|
|
33
27
|
}
|
|
34
|
-
catch { /*
|
|
35
|
-
}
|
|
36
|
-
// Check task queue (with file locking to prevent race conditions)
|
|
37
|
-
const queuePath = path.join(os.homedir(), '.weaver', 'task-queue.ndjson');
|
|
38
|
-
try {
|
|
39
|
-
const claimed = await withFileLock(queuePath, () => {
|
|
40
|
-
if (!fs.existsSync(queuePath))
|
|
41
|
-
return null;
|
|
42
|
-
const content = fs.readFileSync(queuePath, 'utf-8').trim();
|
|
43
|
-
if (!content)
|
|
44
|
-
return null;
|
|
45
|
-
const tasks = content.split('\n').filter(Boolean).map(l => JSON.parse(l));
|
|
46
|
-
const pending = tasks
|
|
47
|
-
.filter(t => t.status === 'pending')
|
|
48
|
-
.sort((a, b) => b.priority - a.priority || a.addedAt - b.addedAt);
|
|
49
|
-
if (pending.length === 0)
|
|
50
|
-
return null;
|
|
51
|
-
const task = pending[0];
|
|
52
|
-
// Atomically mark as running inside the lock
|
|
53
|
-
const updated = tasks.map(t => t.id === task.id ? { ...t, status: 'running' } : t);
|
|
54
|
-
fs.writeFileSync(queuePath, updated.map(t => JSON.stringify(t)).join('\n') + '\n', 'utf-8');
|
|
55
|
-
return task;
|
|
56
|
-
});
|
|
57
|
-
if (claimed) {
|
|
58
|
-
const botTask = {
|
|
59
|
-
instruction: claimed.instruction,
|
|
60
|
-
mode: claimed.mode ?? 'create',
|
|
61
|
-
targets: claimed.targets,
|
|
62
|
-
options: claimed.options,
|
|
63
|
-
queueId: claimed.id,
|
|
64
|
-
};
|
|
65
|
-
console.log(`\x1b[36m→ Task from queue [${claimed.id}]: ${claimed.instruction.slice(0, 80)}\x1b[0m`);
|
|
66
|
-
context.taskJson = JSON.stringify(botTask);
|
|
67
|
-
context.hasTask = true;
|
|
68
|
-
return { onSuccess: true, onFailure: false, ctx: JSON.stringify(context) };
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
catch (err) {
|
|
72
|
-
if (process.env.WEAVER_VERBOSE)
|
|
73
|
-
console.error('[receive-task] queue error:', err);
|
|
28
|
+
catch { /* invalid JSON — no task */ }
|
|
74
29
|
}
|
|
75
30
|
console.log('\x1b[33m→ No task found\x1b[0m');
|
|
76
31
|
return { onSuccess: false, onFailure: true, ctx: JSON.stringify(context) };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receive-task.js","sourceRoot":"","sources":["../../src/node-types/receive-task.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"receive-task.js","sourceRoot":"","sources":["../../src/node-types/receive-task.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAgB,EAChB,GAAc,EACd,QAAiB;IAKjB,MAAM,OAAO,GAAkB,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAEvE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7E,CAAC;IAED,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;YACpC,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;gBACvB,OAAO,CAAC,GAAG,CAAC,4BAA4B,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC;gBAClF,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBAC5B,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;gBACvB,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;YAC7E,CAAC;QACH,CAAC;QAAC,MAAM,CAAC,CAAC,4BAA4B,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;IAC9C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface WorkflowTemplate {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
category: string;
|
|
6
|
+
generate: (opts: {
|
|
7
|
+
projectDir?: string;
|
|
8
|
+
}) => string;
|
|
9
|
+
}
|
|
10
|
+
export declare const weaverTemplate: WorkflowTemplate;
|
|
11
|
+
//# sourceMappingURL=weaver-template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weaver-template.d.ts","sourceRoot":"","sources":["../../src/templates/weaver-template.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,CAAC,IAAI,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;CACrD;AAED,eAAO,MAAM,cAAc,EAAE,gBAmD5B,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export const weaverTemplate = {
|
|
2
|
+
id: 'weaver',
|
|
3
|
+
name: 'Weaver: Autonomous workflow runner',
|
|
4
|
+
description: 'AI-powered runner that executes any Flow Weaver workflow autonomously, with auto-detected providers and notification support',
|
|
5
|
+
category: 'automation',
|
|
6
|
+
generate: (_opts) => {
|
|
7
|
+
return `// Generated by flowweaver-pack-weaver. Compile before running:
|
|
8
|
+
// flow-weaver compile weaver.ts
|
|
9
|
+
// flow-weaver run weaver.ts
|
|
10
|
+
// Or use the CLI directly: npx weaver weaver.ts
|
|
11
|
+
//
|
|
12
|
+
// Node types are provided by @synergenius/flowweaver-pack-weaver.
|
|
13
|
+
// Install it: npm install @synergenius/flowweaver-pack-weaver
|
|
14
|
+
|
|
15
|
+
import { weaverLoadConfig } from '@synergenius/flowweaver-pack-weaver/node-types';
|
|
16
|
+
import { weaverDetectProvider } from '@synergenius/flowweaver-pack-weaver/node-types';
|
|
17
|
+
import { weaverResolveTarget } from '@synergenius/flowweaver-pack-weaver/node-types';
|
|
18
|
+
import { weaverExecuteTarget } from '@synergenius/flowweaver-pack-weaver/node-types';
|
|
19
|
+
import { weaverSendNotify } from '@synergenius/flowweaver-pack-weaver/node-types';
|
|
20
|
+
import { weaverReport } from '@synergenius/flowweaver-pack-weaver/node-types';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @flowWeaver workflow
|
|
24
|
+
* @node cfg weaverLoadConfig [color: "teal"] [icon: "settings"] [position: 100 0]
|
|
25
|
+
* @node detect weaverDetectProvider [color: "cyan"] [icon: "search"] [position: 250 0]
|
|
26
|
+
* @node target weaverResolveTarget [color: "blue"] [icon: "code"] [position: 400 0]
|
|
27
|
+
* @node exec weaverExecuteTarget [color: "purple"] [icon: "psychology"] [position: 550 0]
|
|
28
|
+
* @node notify weaverSendNotify [color: "yellow"] [icon: "notifications"] [position: 700 0]
|
|
29
|
+
* @node rep weaverReport [color: "green"] [icon: "description"] [position: 850 0]
|
|
30
|
+
* @path Start -> cfg -> detect -> target -> exec -> notify -> rep -> Exit
|
|
31
|
+
* @position Start 0 0
|
|
32
|
+
* @position Exit 1000 0
|
|
33
|
+
* @connect rep.summary -> Exit.summary
|
|
34
|
+
* @param execute [order:-1] - Execute
|
|
35
|
+
* @param params [order:0] - Params
|
|
36
|
+
* @returns onSuccess [order:-2] - On Success
|
|
37
|
+
* @returns onFailure [order:-1] - On Failure
|
|
38
|
+
* @returns summary [order:0] - Summary text
|
|
39
|
+
*/
|
|
40
|
+
export async function weaver(
|
|
41
|
+
execute: boolean,
|
|
42
|
+
params: Record<string, never> = {},
|
|
43
|
+
__abortSignal__?: AbortSignal,
|
|
44
|
+
): Promise<{ onSuccess: boolean; onFailure: boolean; summary: string | null }> {
|
|
45
|
+
// @flow-weaver-body-start
|
|
46
|
+
// (auto-generated by compiler)
|
|
47
|
+
// @flow-weaver-body-end
|
|
48
|
+
return { onSuccess: false, onFailure: true, summary: null };
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=weaver-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weaver-template.js","sourceRoot":"","sources":["../../src/templates/weaver-template.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,cAAc,GAAqB;IAC9C,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE,8HAA8H;IAC3I,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;QAClB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2CV,CAAC;IACA,CAAC;CACF,CAAC"}
|
package/dist/ui/bot-activity.js
CHANGED
|
@@ -138,7 +138,7 @@ function BotActivity({ packName, botId }) {
|
|
|
138
138
|
const fetchAll = useCallback(async () => {
|
|
139
139
|
const [hist, q, ins, st] = await Promise.allSettled([
|
|
140
140
|
callTool("fw_weaver_history", { limit: 15 }),
|
|
141
|
-
callTool("
|
|
141
|
+
callTool("fw_weaver_task_list", { status: "pending" }),
|
|
142
142
|
callTool("fw_weaver_insights"),
|
|
143
143
|
callTool("fw_weaver_status")
|
|
144
144
|
]);
|
|
@@ -164,7 +164,7 @@ function BotActivity({ packName, botId }) {
|
|
|
164
164
|
}));
|
|
165
165
|
}, [botId]);
|
|
166
166
|
const handleRemoveQueueItem = useCallback(async (id) => {
|
|
167
|
-
await callTool("
|
|
167
|
+
await callTool("fw_weaver_task_cancel", { id });
|
|
168
168
|
setQueue((prev) => prev.filter((q) => q.id !== id));
|
|
169
169
|
}, []);
|
|
170
170
|
const handlePause = useCallback(async (e) => {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared constants for bot panel components: icon catalog, colors, helpers.
|
|
3
|
+
*/
|
|
4
|
+
export declare const ICON_CATALOG: {
|
|
5
|
+
category: string;
|
|
6
|
+
icons: string[];
|
|
7
|
+
}[];
|
|
8
|
+
export declare const BOT_COLORS: {
|
|
9
|
+
label: string;
|
|
10
|
+
token: string;
|
|
11
|
+
}[];
|
|
12
|
+
/** Convert camelCase icon name to searchable words: "cloudSync" -> "cloud sync" */
|
|
13
|
+
export declare function iconToWords(name: string): string;
|
|
14
|
+
//# sourceMappingURL=bot-constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bot-constants.d.ts","sourceRoot":"","sources":["../../src/ui/bot-constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,YAAY,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,EAuK/D,CAAC;AAEF,eAAO,MAAM,UAAU;;;GAWtB,CAAC;AAEF,mFAAmF;AACnF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared constants for bot panel components: icon catalog, colors, helpers.
|
|
3
|
+
*/
|
|
4
|
+
/* ── Categorised icon catalog ──────────────────────────────────────── */
|
|
5
|
+
export const ICON_CATALOG = [
|
|
6
|
+
{
|
|
7
|
+
category: 'Actions',
|
|
8
|
+
icons: [
|
|
9
|
+
'playArrow',
|
|
10
|
+
'stop',
|
|
11
|
+
'pause',
|
|
12
|
+
'restart',
|
|
13
|
+
'send',
|
|
14
|
+
'check',
|
|
15
|
+
'edit',
|
|
16
|
+
'copy',
|
|
17
|
+
'add',
|
|
18
|
+
'reset',
|
|
19
|
+
'resume',
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
category: 'AI & Science',
|
|
24
|
+
icons: ['smartToy', 'psychology', 'autoAwesome', 'modelTraining', 'biotech', 'science', 'ai'],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
category: 'Data & Storage',
|
|
28
|
+
icons: ['database', 'dataObject', 'dataArray', 'tableChart', 'token', 'dns', 'cloudStorage'],
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
category: 'Logic & Flow',
|
|
32
|
+
icons: [
|
|
33
|
+
'altRoute',
|
|
34
|
+
'callSplit',
|
|
35
|
+
'callMerge',
|
|
36
|
+
'rule',
|
|
37
|
+
'filterAlt',
|
|
38
|
+
'sort',
|
|
39
|
+
'loop',
|
|
40
|
+
'repeat',
|
|
41
|
+
'compareArrows',
|
|
42
|
+
'swapHoriz',
|
|
43
|
+
'syncAlt',
|
|
44
|
+
'changeCircle',
|
|
45
|
+
'allInclusive',
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
category: 'Cloud & Network',
|
|
50
|
+
icons: [
|
|
51
|
+
'cloudSync',
|
|
52
|
+
'cloudUpload',
|
|
53
|
+
'cloudDownload',
|
|
54
|
+
'cloudDone',
|
|
55
|
+
'api',
|
|
56
|
+
'webhook',
|
|
57
|
+
'public',
|
|
58
|
+
'router',
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
category: 'Communication',
|
|
63
|
+
icons: ['email', 'chat', 'forum', 'notifications', 'campaign', 'rssFeed', 'sms'],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
category: 'Security',
|
|
67
|
+
icons: [
|
|
68
|
+
'key',
|
|
69
|
+
'shield',
|
|
70
|
+
'security',
|
|
71
|
+
'vpnKey',
|
|
72
|
+
'adminPanel',
|
|
73
|
+
'policy',
|
|
74
|
+
'verified',
|
|
75
|
+
'lockClosed',
|
|
76
|
+
'lockOpened',
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
category: 'Time',
|
|
81
|
+
icons: [
|
|
82
|
+
'timer',
|
|
83
|
+
'alarm',
|
|
84
|
+
'hourglassEmpty',
|
|
85
|
+
'pendingActions',
|
|
86
|
+
'update',
|
|
87
|
+
'watchLater',
|
|
88
|
+
'scheduled',
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
category: 'Tasks & Workflow',
|
|
93
|
+
icons: [
|
|
94
|
+
'task',
|
|
95
|
+
'taskAlt',
|
|
96
|
+
'checklist',
|
|
97
|
+
'assignment',
|
|
98
|
+
'publish',
|
|
99
|
+
'build',
|
|
100
|
+
'construction',
|
|
101
|
+
'engineering',
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
category: 'Analytics',
|
|
106
|
+
icons: [
|
|
107
|
+
'analytics',
|
|
108
|
+
'insights',
|
|
109
|
+
'barChart',
|
|
110
|
+
'pieChart',
|
|
111
|
+
'trendingUp',
|
|
112
|
+
'showChart',
|
|
113
|
+
'leaderboard',
|
|
114
|
+
'monitoring',
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
category: 'Flow Nodes',
|
|
119
|
+
icons: [
|
|
120
|
+
'schema',
|
|
121
|
+
'hub',
|
|
122
|
+
'deviceHub',
|
|
123
|
+
'source',
|
|
124
|
+
'trigger',
|
|
125
|
+
'pulse',
|
|
126
|
+
'step',
|
|
127
|
+
'event',
|
|
128
|
+
'outlinedFlow',
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
category: 'Files & Documents',
|
|
133
|
+
icons: [
|
|
134
|
+
'file',
|
|
135
|
+
'filePresent',
|
|
136
|
+
'fileCopy',
|
|
137
|
+
'textSnippet',
|
|
138
|
+
'attachFile',
|
|
139
|
+
'uploadFile',
|
|
140
|
+
'save',
|
|
141
|
+
'upload',
|
|
142
|
+
'download',
|
|
143
|
+
],
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
category: 'General',
|
|
147
|
+
icons: [
|
|
148
|
+
'rocketLaunch',
|
|
149
|
+
'code',
|
|
150
|
+
'terminal',
|
|
151
|
+
'logs',
|
|
152
|
+
'info',
|
|
153
|
+
'help',
|
|
154
|
+
'list',
|
|
155
|
+
'category',
|
|
156
|
+
'hash',
|
|
157
|
+
'calendar',
|
|
158
|
+
'history',
|
|
159
|
+
'integration',
|
|
160
|
+
'layers',
|
|
161
|
+
'link',
|
|
162
|
+
'search',
|
|
163
|
+
'outlinedSettings',
|
|
164
|
+
'outlinedBug',
|
|
165
|
+
'collaboration',
|
|
166
|
+
'person',
|
|
167
|
+
'people',
|
|
168
|
+
'backup',
|
|
169
|
+
'healthAndSafety',
|
|
170
|
+
],
|
|
171
|
+
},
|
|
172
|
+
];
|
|
173
|
+
export const BOT_COLORS = [
|
|
174
|
+
{ label: 'Blue', token: 'color-node-blue-icon' },
|
|
175
|
+
{ label: 'Purple', token: 'color-node-purple-icon' },
|
|
176
|
+
{ label: 'Cyan', token: 'color-node-cyan-icon' },
|
|
177
|
+
{ label: 'Orange', token: 'color-node-orange-icon' },
|
|
178
|
+
{ label: 'Pink', token: 'color-node-pink-icon' },
|
|
179
|
+
{ label: 'Green', token: 'color-node-green-icon' },
|
|
180
|
+
{ label: 'Brand', token: 'color-brand-main' },
|
|
181
|
+
{ label: 'Accent', token: 'color-brand-alt' },
|
|
182
|
+
{ label: 'Positive', token: 'color-status-positive' },
|
|
183
|
+
{ label: 'Info', token: 'color-status-info' },
|
|
184
|
+
];
|
|
185
|
+
/** Convert camelCase icon name to searchable words: "cloudSync" -> "cloud sync" */
|
|
186
|
+
export function iconToWords(name) {
|
|
187
|
+
return name.replace(/([A-Z])/g, ' $1').toLowerCase();
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=bot-constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bot-constants.js","sourceRoot":"","sources":["../../src/ui/bot-constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,0EAA0E;AAE1E,MAAM,CAAC,MAAM,YAAY,GAA4C;IACnE;QACE,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE;YACL,WAAW;YACX,MAAM;YACN,OAAO;YACP,SAAS;YACT,MAAM;YACN,OAAO;YACP,MAAM;YACN,MAAM;YACN,KAAK;YACL,OAAO;YACP,QAAQ;SACT;KACF;IACD;QACE,QAAQ,EAAE,cAAc;QACxB,KAAK,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC;KAC9F;IACD;QACE,QAAQ,EAAE,gBAAgB;QAC1B,KAAK,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,CAAC;KAC7F;IACD;QACE,QAAQ,EAAE,cAAc;QACxB,KAAK,EAAE;YACL,UAAU;YACV,WAAW;YACX,WAAW;YACX,MAAM;YACN,WAAW;YACX,MAAM;YACN,MAAM;YACN,QAAQ;YACR,eAAe;YACf,WAAW;YACX,SAAS;YACT,cAAc;YACd,cAAc;SACf;KACF;IACD;QACE,QAAQ,EAAE,iBAAiB;QAC3B,KAAK,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