@synergenius/flow-weaver-pack-weaver 0.9.90 → 0.9.92
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/runner.d.ts.map +1 -1
- package/dist/bot/runner.js +16 -3
- package/dist/bot/runner.js.map +1 -1
- package/dist/node-types/abort-task.d.ts +2 -0
- package/dist/node-types/abort-task.d.ts.map +1 -1
- package/dist/node-types/abort-task.js +2 -0
- package/dist/node-types/abort-task.js.map +1 -1
- package/dist/node-types/agent-execute.d.ts +2 -0
- package/dist/node-types/agent-execute.d.ts.map +1 -1
- package/dist/node-types/agent-execute.js +2 -0
- package/dist/node-types/agent-execute.js.map +1 -1
- package/dist/node-types/approval-gate.d.ts +2 -0
- package/dist/node-types/approval-gate.d.ts.map +1 -1
- package/dist/node-types/approval-gate.js +2 -0
- package/dist/node-types/approval-gate.js.map +1 -1
- package/dist/node-types/bot-report.d.ts +2 -0
- package/dist/node-types/bot-report.d.ts.map +1 -1
- package/dist/node-types/bot-report.js +2 -0
- package/dist/node-types/bot-report.js.map +1 -1
- package/dist/node-types/build-context.d.ts +2 -0
- package/dist/node-types/build-context.d.ts.map +1 -1
- package/dist/node-types/build-context.js +2 -0
- package/dist/node-types/build-context.js.map +1 -1
- package/dist/node-types/detect-provider.d.ts +2 -0
- package/dist/node-types/detect-provider.d.ts.map +1 -1
- package/dist/node-types/detect-provider.js +2 -0
- package/dist/node-types/detect-provider.js.map +1 -1
- package/dist/node-types/exec-validate-retry.d.ts +2 -0
- package/dist/node-types/exec-validate-retry.d.ts.map +1 -1
- package/dist/node-types/exec-validate-retry.js +2 -0
- package/dist/node-types/exec-validate-retry.js.map +1 -1
- package/dist/node-types/execute-plan.d.ts +2 -0
- package/dist/node-types/execute-plan.d.ts.map +1 -1
- package/dist/node-types/execute-plan.js +2 -0
- package/dist/node-types/execute-plan.js.map +1 -1
- package/dist/node-types/execute-target.d.ts +2 -0
- package/dist/node-types/execute-target.d.ts.map +1 -1
- package/dist/node-types/execute-target.js +2 -0
- package/dist/node-types/execute-target.js.map +1 -1
- package/dist/node-types/fix-errors.d.ts +2 -0
- package/dist/node-types/fix-errors.d.ts.map +1 -1
- package/dist/node-types/fix-errors.js +2 -0
- package/dist/node-types/fix-errors.js.map +1 -1
- package/dist/node-types/genesis-apply-retry.d.ts +2 -0
- package/dist/node-types/genesis-apply-retry.d.ts.map +1 -1
- package/dist/node-types/genesis-apply-retry.js +2 -0
- package/dist/node-types/genesis-apply-retry.js.map +1 -1
- package/dist/node-types/genesis-apply.d.ts +2 -0
- package/dist/node-types/genesis-apply.d.ts.map +1 -1
- package/dist/node-types/genesis-apply.js +2 -0
- package/dist/node-types/genesis-apply.js.map +1 -1
- package/dist/node-types/genesis-approve.d.ts +2 -0
- package/dist/node-types/genesis-approve.d.ts.map +1 -1
- package/dist/node-types/genesis-approve.js +2 -0
- package/dist/node-types/genesis-approve.js.map +1 -1
- package/dist/node-types/genesis-check-stabilize.d.ts +2 -0
- package/dist/node-types/genesis-check-stabilize.d.ts.map +1 -1
- package/dist/node-types/genesis-check-stabilize.js +2 -0
- package/dist/node-types/genesis-check-stabilize.js.map +1 -1
- package/dist/node-types/genesis-check-threshold.d.ts +2 -0
- package/dist/node-types/genesis-check-threshold.d.ts.map +1 -1
- package/dist/node-types/genesis-check-threshold.js +2 -0
- package/dist/node-types/genesis-check-threshold.js.map +1 -1
- package/dist/node-types/genesis-commit.d.ts +2 -0
- package/dist/node-types/genesis-commit.d.ts.map +1 -1
- package/dist/node-types/genesis-commit.js +2 -0
- package/dist/node-types/genesis-commit.js.map +1 -1
- package/dist/node-types/genesis-compile-validate.d.ts +2 -0
- package/dist/node-types/genesis-compile-validate.d.ts.map +1 -1
- package/dist/node-types/genesis-compile-validate.js +2 -0
- package/dist/node-types/genesis-compile-validate.js.map +1 -1
- package/dist/node-types/genesis-diff-fingerprint.d.ts +2 -0
- package/dist/node-types/genesis-diff-fingerprint.d.ts.map +1 -1
- package/dist/node-types/genesis-diff-fingerprint.js +2 -0
- package/dist/node-types/genesis-diff-fingerprint.js.map +1 -1
- package/dist/node-types/genesis-diff-workflow.d.ts +2 -0
- package/dist/node-types/genesis-diff-workflow.d.ts.map +1 -1
- package/dist/node-types/genesis-diff-workflow.js +2 -0
- package/dist/node-types/genesis-diff-workflow.js.map +1 -1
- package/dist/node-types/genesis-escrow-grace.d.ts +2 -0
- package/dist/node-types/genesis-escrow-grace.d.ts.map +1 -1
- package/dist/node-types/genesis-escrow-grace.js +2 -0
- package/dist/node-types/genesis-escrow-grace.js.map +1 -1
- package/dist/node-types/genesis-escrow-migrate.d.ts +2 -0
- package/dist/node-types/genesis-escrow-migrate.d.ts.map +1 -1
- package/dist/node-types/genesis-escrow-migrate.js +2 -0
- package/dist/node-types/genesis-escrow-migrate.js.map +1 -1
- package/dist/node-types/genesis-escrow-recover.d.ts +2 -0
- package/dist/node-types/genesis-escrow-recover.d.ts.map +1 -1
- package/dist/node-types/genesis-escrow-recover.js +2 -0
- package/dist/node-types/genesis-escrow-recover.js.map +1 -1
- package/dist/node-types/genesis-escrow-stage.d.ts +2 -0
- package/dist/node-types/genesis-escrow-stage.d.ts.map +1 -1
- package/dist/node-types/genesis-escrow-stage.js +2 -0
- package/dist/node-types/genesis-escrow-stage.js.map +1 -1
- package/dist/node-types/genesis-escrow-validate.d.ts +2 -0
- package/dist/node-types/genesis-escrow-validate.d.ts.map +1 -1
- package/dist/node-types/genesis-escrow-validate.js +2 -0
- package/dist/node-types/genesis-escrow-validate.js.map +1 -1
- package/dist/node-types/genesis-load-config.d.ts +2 -0
- package/dist/node-types/genesis-load-config.d.ts.map +1 -1
- package/dist/node-types/genesis-load-config.js +2 -0
- package/dist/node-types/genesis-load-config.js.map +1 -1
- package/dist/node-types/genesis-observe.d.ts +2 -0
- package/dist/node-types/genesis-observe.d.ts.map +1 -1
- package/dist/node-types/genesis-observe.js +2 -0
- package/dist/node-types/genesis-observe.js.map +1 -1
- package/dist/node-types/genesis-propose.d.ts +2 -0
- package/dist/node-types/genesis-propose.d.ts.map +1 -1
- package/dist/node-types/genesis-propose.js +2 -0
- package/dist/node-types/genesis-propose.js.map +1 -1
- package/dist/node-types/genesis-report.d.ts +2 -0
- package/dist/node-types/genesis-report.d.ts.map +1 -1
- package/dist/node-types/genesis-report.js +2 -0
- package/dist/node-types/genesis-report.js.map +1 -1
- package/dist/node-types/genesis-snapshot.d.ts +2 -0
- package/dist/node-types/genesis-snapshot.d.ts.map +1 -1
- package/dist/node-types/genesis-snapshot.js +2 -0
- package/dist/node-types/genesis-snapshot.js.map +1 -1
- package/dist/node-types/genesis-try-apply.d.ts +2 -0
- package/dist/node-types/genesis-try-apply.d.ts.map +1 -1
- package/dist/node-types/genesis-try-apply.js +2 -0
- package/dist/node-types/genesis-try-apply.js.map +1 -1
- package/dist/node-types/genesis-update-history.d.ts +2 -0
- package/dist/node-types/genesis-update-history.d.ts.map +1 -1
- package/dist/node-types/genesis-update-history.js +2 -0
- package/dist/node-types/genesis-update-history.js.map +1 -1
- package/dist/node-types/genesis-validate-proposal.d.ts +2 -0
- package/dist/node-types/genesis-validate-proposal.d.ts.map +1 -1
- package/dist/node-types/genesis-validate-proposal.js +2 -0
- package/dist/node-types/genesis-validate-proposal.js.map +1 -1
- package/dist/node-types/git-ops.d.ts +2 -0
- package/dist/node-types/git-ops.d.ts.map +1 -1
- package/dist/node-types/git-ops.js +2 -0
- package/dist/node-types/git-ops.js.map +1 -1
- package/dist/node-types/load-config.d.ts +2 -0
- package/dist/node-types/load-config.d.ts.map +1 -1
- package/dist/node-types/load-config.js +2 -0
- package/dist/node-types/load-config.js.map +1 -1
- package/dist/node-types/orchestrator-dispatch.d.ts +2 -0
- package/dist/node-types/orchestrator-dispatch.d.ts.map +1 -1
- package/dist/node-types/orchestrator-dispatch.js +2 -0
- package/dist/node-types/orchestrator-dispatch.js.map +1 -1
- package/dist/node-types/orchestrator-load-state.d.ts +2 -0
- package/dist/node-types/orchestrator-load-state.d.ts.map +1 -1
- package/dist/node-types/orchestrator-load-state.js +2 -0
- package/dist/node-types/orchestrator-load-state.js.map +1 -1
- package/dist/node-types/orchestrator-route.d.ts +2 -0
- package/dist/node-types/orchestrator-route.d.ts.map +1 -1
- package/dist/node-types/orchestrator-route.js +2 -0
- package/dist/node-types/orchestrator-route.js.map +1 -1
- package/dist/node-types/plan-task.d.ts +2 -0
- package/dist/node-types/plan-task.d.ts.map +1 -1
- package/dist/node-types/plan-task.js +2 -0
- package/dist/node-types/plan-task.js.map +1 -1
- package/dist/node-types/read-workflow.d.ts +2 -0
- package/dist/node-types/read-workflow.d.ts.map +1 -1
- package/dist/node-types/read-workflow.js +2 -0
- package/dist/node-types/read-workflow.js.map +1 -1
- package/dist/node-types/receive-task.d.ts +2 -0
- package/dist/node-types/receive-task.d.ts.map +1 -1
- package/dist/node-types/receive-task.js +2 -0
- package/dist/node-types/receive-task.js.map +1 -1
- package/dist/node-types/report.d.ts +2 -0
- package/dist/node-types/report.d.ts.map +1 -1
- package/dist/node-types/report.js +2 -0
- package/dist/node-types/report.js.map +1 -1
- package/dist/node-types/resolve-target.d.ts +2 -0
- package/dist/node-types/resolve-target.d.ts.map +1 -1
- package/dist/node-types/resolve-target.js +2 -0
- package/dist/node-types/resolve-target.js.map +1 -1
- package/dist/node-types/route-task.d.ts +2 -0
- package/dist/node-types/route-task.d.ts.map +1 -1
- package/dist/node-types/route-task.js +2 -0
- package/dist/node-types/route-task.js.map +1 -1
- package/dist/node-types/send-notify.d.ts +2 -0
- package/dist/node-types/send-notify.d.ts.map +1 -1
- package/dist/node-types/send-notify.js +2 -0
- package/dist/node-types/send-notify.js.map +1 -1
- package/dist/node-types/validate-gate.d.ts +2 -0
- package/dist/node-types/validate-gate.d.ts.map +1 -1
- package/dist/node-types/validate-gate.js +2 -0
- package/dist/node-types/validate-gate.js.map +1 -1
- package/dist/node-types/validate-result.d.ts +2 -0
- package/dist/node-types/validate-result.d.ts.map +1 -1
- package/dist/node-types/validate-result.js +2 -0
- package/dist/node-types/validate-result.js.map +1 -1
- package/dist/ui/chat-task-result.js +2 -1
- package/dist/ui/swarm-dashboard.js +7 -1
- package/dist/ui/task-detail-view.js +7 -1
- package/dist/ui/use-stream-timeline.d.ts.map +1 -1
- package/dist/ui/use-stream-timeline.js +6 -0
- package/dist/ui/use-stream-timeline.js.map +1 -1
- package/package.json +2 -2
- package/src/bot/runner.ts +14 -3
- package/src/node-types/abort-task.ts +2 -0
- package/src/node-types/agent-execute.ts +2 -0
- package/src/node-types/approval-gate.ts +2 -0
- package/src/node-types/bot-report.ts +2 -0
- package/src/node-types/build-context.ts +2 -0
- package/src/node-types/detect-provider.ts +2 -0
- package/src/node-types/exec-validate-retry.ts +2 -0
- package/src/node-types/execute-plan.ts +2 -0
- package/src/node-types/execute-target.ts +2 -0
- package/src/node-types/fix-errors.ts +2 -0
- package/src/node-types/genesis-apply-retry.ts +2 -0
- package/src/node-types/genesis-apply.ts +2 -0
- package/src/node-types/genesis-approve.ts +2 -0
- package/src/node-types/genesis-check-stabilize.ts +2 -0
- package/src/node-types/genesis-check-threshold.ts +2 -0
- package/src/node-types/genesis-commit.ts +2 -0
- package/src/node-types/genesis-compile-validate.ts +2 -0
- package/src/node-types/genesis-diff-fingerprint.ts +2 -0
- package/src/node-types/genesis-diff-workflow.ts +2 -0
- package/src/node-types/genesis-escrow-grace.ts +2 -0
- package/src/node-types/genesis-escrow-migrate.ts +2 -0
- package/src/node-types/genesis-escrow-recover.ts +2 -0
- package/src/node-types/genesis-escrow-stage.ts +2 -0
- package/src/node-types/genesis-escrow-validate.ts +2 -0
- package/src/node-types/genesis-load-config.ts +2 -0
- package/src/node-types/genesis-observe.ts +2 -0
- package/src/node-types/genesis-propose.ts +2 -0
- package/src/node-types/genesis-report.ts +2 -0
- package/src/node-types/genesis-snapshot.ts +2 -0
- package/src/node-types/genesis-try-apply.ts +2 -0
- package/src/node-types/genesis-update-history.ts +2 -0
- package/src/node-types/genesis-validate-proposal.ts +2 -0
- package/src/node-types/git-ops.ts +2 -0
- package/src/node-types/load-config.ts +2 -0
- package/src/node-types/orchestrator-dispatch.ts +2 -0
- package/src/node-types/orchestrator-load-state.ts +2 -0
- package/src/node-types/orchestrator-route.ts +2 -0
- package/src/node-types/plan-task.ts +2 -0
- package/src/node-types/read-workflow.ts +2 -0
- package/src/node-types/receive-task.ts +2 -0
- package/src/node-types/report.ts +2 -0
- package/src/node-types/resolve-target.ts +2 -0
- package/src/node-types/route-task.ts +2 -0
- package/src/node-types/send-notify.ts +2 -0
- package/src/node-types/validate-gate.ts +2 -0
- package/src/node-types/validate-result.ts +2 -0
- package/src/ui/chat-task-result.tsx +2 -1
- package/src/ui/use-stream-timeline.ts +6 -0
package/src/bot/runner.ts
CHANGED
|
@@ -233,6 +233,7 @@ export async function runWorkflow(
|
|
|
233
233
|
// Pre-parse node labels and port labels from the workflow AST so live
|
|
234
234
|
// stream events carry human-readable names instead of code identifiers.
|
|
235
235
|
const nodeLabels = new Map<string, string>(); // nodeTypeName | instanceId → label
|
|
236
|
+
const nodeVisuals = new Map<string, { color?: string; icon?: string }>(); // nodeTypeName | instanceId → visual meta
|
|
236
237
|
const portLabels = new Map<string, string>(); // "nodeTypeName.portName" → label
|
|
237
238
|
try {
|
|
238
239
|
const parserMod = '@synergenius/flow-weaver';
|
|
@@ -241,6 +242,7 @@ export async function runWorkflow(
|
|
|
241
242
|
const parseResult = fwParser.parse(absPath);
|
|
242
243
|
for (const nt of parseResult?.nodeTypes ?? []) {
|
|
243
244
|
if (nt.label) nodeLabels.set(nt.name, nt.label);
|
|
245
|
+
if (nt.color || nt.icon) nodeVisuals.set(nt.name, { color: nt.color, icon: nt.icon });
|
|
244
246
|
// Extract output port labels: outputs is Record<string, PortConfig>
|
|
245
247
|
if (nt.outputs && typeof nt.outputs === 'object') {
|
|
246
248
|
for (const [portName, portCfg] of Object.entries(nt.outputs)) {
|
|
@@ -252,6 +254,9 @@ export async function runWorkflow(
|
|
|
252
254
|
for (const inst of parseResult?.workflow?.instances ?? []) {
|
|
253
255
|
const label = inst.config?.label ?? nodeLabels.get(inst.nodeType);
|
|
254
256
|
if (label) nodeLabels.set(inst.id, label);
|
|
257
|
+
// Inherit visual meta from node type to instance
|
|
258
|
+
const ntVisuals = nodeVisuals.get(inst.nodeType);
|
|
259
|
+
if (ntVisuals) nodeVisuals.set(inst.id, ntVisuals);
|
|
255
260
|
}
|
|
256
261
|
} catch { /* non-fatal — live events will use code names */ }
|
|
257
262
|
|
|
@@ -341,8 +346,11 @@ export async function runWorkflow(
|
|
|
341
346
|
collectedTrace.push(event);
|
|
342
347
|
options?.onEvent?.(event);
|
|
343
348
|
const nodeLabel = nodeLabels.get(nodeId) ?? nodeLabels.get(event.nodeType ?? '') ?? undefined;
|
|
349
|
+
const nm = nodeVisuals.get(nodeId) ?? (event.nodeType ? nodeVisuals.get(event.nodeType) : undefined);
|
|
344
350
|
logEvent?.({ type: event.type, timestamp: event.timestamp, data: {
|
|
345
|
-
nodeId: event.nodeId, nodeType: event.nodeType, label: nodeLabel,
|
|
351
|
+
nodeId: event.nodeId, nodeType: event.nodeType, label: nodeLabel,
|
|
352
|
+
color: nm?.color, icon: nm?.icon,
|
|
353
|
+
durationMs: event.durationMs, error: event.error,
|
|
346
354
|
outputs: event.outputs,
|
|
347
355
|
}});
|
|
348
356
|
|
|
@@ -369,13 +377,16 @@ export async function runWorkflow(
|
|
|
369
377
|
const summary = buildSummary(result);
|
|
370
378
|
const outcome = success ? 'completed' : 'failed';
|
|
371
379
|
|
|
372
|
-
// Build nodeMeta from
|
|
380
|
+
// Build nodeMeta from labels + visual meta (already populated before execution)
|
|
373
381
|
let nodeMeta: Record<string, { label?: string; color?: string; icon?: string }> | undefined;
|
|
374
|
-
if (nodeLabels.size > 0) {
|
|
382
|
+
if (nodeLabels.size > 0 || nodeVisuals.size > 0) {
|
|
375
383
|
const meta: Record<string, { label?: string; color?: string; icon?: string }> = {};
|
|
376
384
|
for (const [key, label] of nodeLabels) {
|
|
377
385
|
meta[key] = { label };
|
|
378
386
|
}
|
|
387
|
+
for (const [key, visuals] of nodeVisuals) {
|
|
388
|
+
meta[key] = { ...meta[key], ...visuals };
|
|
389
|
+
}
|
|
379
390
|
nodeMeta = meta;
|
|
380
391
|
}
|
|
381
392
|
|
|
@@ -7,6 +7,8 @@ import type { WeaverContext } from '../bot/types.js';
|
|
|
7
7
|
* @flowWeaver nodeType
|
|
8
8
|
* @expression
|
|
9
9
|
* @label Abort Task
|
|
10
|
+
* @icon stop
|
|
11
|
+
* @color red
|
|
10
12
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
11
13
|
* @output ctx [order:0] - Weaver context with abort resultJson (JSON)
|
|
12
14
|
* @output onFailure [hidden]
|
|
@@ -87,6 +87,8 @@ type LocalStepLogEntry = { step: string; status: string; detail: string };
|
|
|
87
87
|
*
|
|
88
88
|
* @flowWeaver nodeType
|
|
89
89
|
* @label Agent Execute
|
|
90
|
+
* @icon psychology
|
|
91
|
+
* @color purple
|
|
90
92
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
91
93
|
* @output ctx [order:0] - Weaver context with results (JSON)
|
|
92
94
|
* @output onSuccess [order:-2] - On Success
|
|
@@ -67,6 +67,8 @@ const approvalRegistryLocal = {
|
|
|
67
67
|
*
|
|
68
68
|
* @flowWeaver nodeType
|
|
69
69
|
* @label Approval Gate
|
|
70
|
+
* @icon pending
|
|
71
|
+
* @color orange
|
|
70
72
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
71
73
|
* @output ctx [order:0] - Weaver context with rejectionReason (JSON)
|
|
72
74
|
* @output onSuccess [order:-2] - On Success
|
|
@@ -8,6 +8,8 @@ import { TaskStore } from '../bot/task-store.js';
|
|
|
8
8
|
*
|
|
9
9
|
* @flowWeaver nodeType
|
|
10
10
|
* @label Bot Report
|
|
11
|
+
* @icon list
|
|
12
|
+
* @color cyan
|
|
11
13
|
* @executeWhen DISJUNCTION
|
|
12
14
|
* @input [mainCtx] [order:0] - Context from main path (JSON, optional)
|
|
13
15
|
* @input [readCtx] [order:1] - Context from read-only path (JSON, optional)
|
|
@@ -11,6 +11,8 @@ import type { WeaverContext } from '../bot/types.js';
|
|
|
11
11
|
* @flowWeaver nodeType
|
|
12
12
|
* @expression
|
|
13
13
|
* @label Build Context
|
|
14
|
+
* @icon build
|
|
15
|
+
* @color cyan
|
|
14
16
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
15
17
|
* @output ctx [order:0] - Weaver context with contextBundle (JSON)
|
|
16
18
|
* @output onFailure [hidden]
|
|
@@ -18,6 +18,8 @@ function whichSafe(cmd: string, cwd: string): string {
|
|
|
18
18
|
* @flowWeaver nodeType
|
|
19
19
|
* @expression
|
|
20
20
|
* @label Detect Provider
|
|
21
|
+
* @icon search
|
|
22
|
+
* @color blue
|
|
21
23
|
* @input projectDir [order:0] - Project root directory
|
|
22
24
|
* @input config [order:1] - Weaver configuration
|
|
23
25
|
* @output env [order:0] - Weaver environment bundle
|
|
@@ -13,6 +13,8 @@ import { auditEmit } from '../bot/audit-logger.js';
|
|
|
13
13
|
*
|
|
14
14
|
* @flowWeaver nodeType
|
|
15
15
|
* @label Execute & Validate
|
|
16
|
+
* @icon engineering
|
|
17
|
+
* @color purple
|
|
16
18
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
17
19
|
* @output ctx [order:0] - Weaver context with results (JSON)
|
|
18
20
|
* @output onSuccess [order:-2] - On Success
|
|
@@ -10,6 +10,8 @@ import { executeStep, resetPlanFileCounter } from '../bot/step-executor.js';
|
|
|
10
10
|
*
|
|
11
11
|
* @flowWeaver nodeType
|
|
12
12
|
* @label Execute Plan
|
|
13
|
+
* @icon engineering
|
|
14
|
+
* @color purple
|
|
13
15
|
* @input env [order:0] - Weaver environment bundle
|
|
14
16
|
* @input planJson [order:1] - Plan (JSON)
|
|
15
17
|
* @input taskJson [order:2] - Task (JSON)
|
|
@@ -148,6 +148,8 @@ Return ONLY valid JSON. No markdown, no code fences, no explanation outside the
|
|
|
148
148
|
*
|
|
149
149
|
* @flowWeaver nodeType
|
|
150
150
|
* @label Execute Target
|
|
151
|
+
* @icon engineering
|
|
152
|
+
* @color orange
|
|
151
153
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
152
154
|
* @output ctx [order:0] - Weaver context with resultJson (JSON)
|
|
153
155
|
* @output onSuccess [order:-2] - On Success
|
|
@@ -7,6 +7,8 @@ import { callAI, parseJsonResponse, normalizePlan } from '../bot/ai-client.js';
|
|
|
7
7
|
*
|
|
8
8
|
* @flowWeaver nodeType
|
|
9
9
|
* @label Fix Errors
|
|
10
|
+
* @icon build
|
|
11
|
+
* @color orange
|
|
10
12
|
* @input env [order:0] - Weaver environment bundle
|
|
11
13
|
* @input validationResultJson [order:1] - Validation results (JSON)
|
|
12
14
|
* @input taskJson [order:2] - Task (JSON, pass-through)
|
|
@@ -12,6 +12,8 @@ import { getGenesisSystemPrompt, getOperationExamples } from '../bot/genesis-pro
|
|
|
12
12
|
*
|
|
13
13
|
* @flowWeaver nodeType
|
|
14
14
|
* @label Genesis Apply Retry
|
|
15
|
+
* @icon build
|
|
16
|
+
* @color pink
|
|
15
17
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
16
18
|
* @output start scope:attempt [order:10] [hidden] - Trigger scope execution (boolean)
|
|
17
19
|
* @output attemptCtx scope:attempt [order:11] - Context for child (JSON)
|
|
@@ -8,6 +8,8 @@ import type { WeaverEnv, GenesisConfig, GenesisProposal, GenesisOperation } from
|
|
|
8
8
|
*
|
|
9
9
|
* @flowWeaver nodeType
|
|
10
10
|
* @label Genesis Apply
|
|
11
|
+
* @icon build
|
|
12
|
+
* @color pink
|
|
11
13
|
* @input env [order:0] - Weaver environment bundle
|
|
12
14
|
* @input genesisConfigJson [order:1] - Genesis configuration (JSON)
|
|
13
15
|
* @input proposalJson [order:2] - Genesis proposal (JSON)
|
|
@@ -8,6 +8,8 @@ import type { GenesisProposal, GenesisContext } from '../bot/types.js';
|
|
|
8
8
|
*
|
|
9
9
|
* @flowWeaver nodeType
|
|
10
10
|
* @label Genesis Approve
|
|
11
|
+
* @icon check
|
|
12
|
+
* @color pink
|
|
11
13
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
12
14
|
* @output ctx [order:0] - Genesis context with approved (JSON)
|
|
13
15
|
* @output onSuccess [order:-2] - On Success
|
|
@@ -9,6 +9,8 @@ import { GenesisStore } from '../bot/genesis-store.js';
|
|
|
9
9
|
* @flowWeaver nodeType
|
|
10
10
|
* @expression
|
|
11
11
|
* @label Genesis Check Stabilize
|
|
12
|
+
* @icon check
|
|
13
|
+
* @color pink
|
|
12
14
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
13
15
|
* @output ctx [order:0] - Genesis context with stabilized (JSON)
|
|
14
16
|
* @output onFailure [hidden]
|
|
@@ -14,6 +14,8 @@ const IMPACT_ORDER: Record<GenesisImpactLevel, number> = {
|
|
|
14
14
|
* @flowWeaver nodeType
|
|
15
15
|
* @expression
|
|
16
16
|
* @label Genesis Check Threshold
|
|
17
|
+
* @icon check
|
|
18
|
+
* @color pink
|
|
17
19
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
18
20
|
* @output ctx [order:0] - Genesis context with approvalRequired (JSON)
|
|
19
21
|
* @output onFailure [hidden]
|
|
@@ -10,6 +10,8 @@ import { GenesisStore } from '../bot/genesis-store.js';
|
|
|
10
10
|
*
|
|
11
11
|
* @flowWeaver nodeType
|
|
12
12
|
* @label Genesis Commit
|
|
13
|
+
* @icon code
|
|
14
|
+
* @color pink
|
|
13
15
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
14
16
|
* @output ctx [order:0] - Genesis context with commitResultJson (JSON)
|
|
15
17
|
* @output onSuccess [order:-2] - On Success
|
|
@@ -11,6 +11,8 @@ import { GenesisStore } from '../bot/genesis-store.js';
|
|
|
11
11
|
*
|
|
12
12
|
* @flowWeaver nodeType
|
|
13
13
|
* @label Genesis Compile & Validate
|
|
14
|
+
* @icon check
|
|
15
|
+
* @color pink
|
|
14
16
|
* @input env [order:0] - Weaver environment bundle
|
|
15
17
|
* @input genesisConfigJson [order:1] - Genesis configuration (JSON)
|
|
16
18
|
* @input snapshotPath [order:2] - Path to the pre-apply snapshot
|
|
@@ -8,6 +8,8 @@ import { GenesisStore } from '../bot/genesis-store.js';
|
|
|
8
8
|
* @flowWeaver nodeType
|
|
9
9
|
* @expression
|
|
10
10
|
* @label Genesis Diff Fingerprint
|
|
11
|
+
* @icon search
|
|
12
|
+
* @color pink
|
|
11
13
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
12
14
|
* @output ctx [order:0] - Genesis context with diffJson (JSON)
|
|
13
15
|
* @output onFailure [hidden]
|
|
@@ -10,6 +10,8 @@ import type { GenesisConfig, GenesisContext } from '../bot/types.js';
|
|
|
10
10
|
* @flowWeaver nodeType
|
|
11
11
|
* @expression
|
|
12
12
|
* @label Genesis Diff Workflow
|
|
13
|
+
* @icon search
|
|
14
|
+
* @color pink
|
|
13
15
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
14
16
|
* @output ctx [order:0] - Genesis context with workflowDiffJson (JSON)
|
|
15
17
|
* @output onFailure [hidden]
|
|
@@ -11,6 +11,8 @@ import { rollbackFromBackup } from './genesis-escrow-migrate.js';
|
|
|
11
11
|
* @flowWeaver nodeType
|
|
12
12
|
* @expression
|
|
13
13
|
* @label Genesis Escrow Grace
|
|
14
|
+
* @icon pending
|
|
15
|
+
* @color pink
|
|
14
16
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
15
17
|
* @output ctx [order:0] - Genesis context (JSON)
|
|
16
18
|
*/
|
|
@@ -10,6 +10,8 @@ import { withFileLock } from '../bot/file-lock.js';
|
|
|
10
10
|
*
|
|
11
11
|
* @flowWeaver nodeType
|
|
12
12
|
* @label Genesis Escrow Migrate
|
|
13
|
+
* @icon build
|
|
14
|
+
* @color pink
|
|
13
15
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
14
16
|
* @output ctx [order:0] - Genesis context with migration result (JSON)
|
|
15
17
|
* @output onSuccess [order:-2] - On Success
|
|
@@ -12,6 +12,8 @@ import { rollbackFromBackup } from './genesis-escrow-migrate.js';
|
|
|
12
12
|
* @flowWeaver nodeType
|
|
13
13
|
* @expression
|
|
14
14
|
* @label Genesis Escrow Recover
|
|
15
|
+
* @icon warning
|
|
16
|
+
* @color pink
|
|
15
17
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
16
18
|
* @output ctx [order:0] - Genesis context with escrow state flags (JSON)
|
|
17
19
|
*/
|
|
@@ -10,6 +10,8 @@ import { GenesisStore } from '../bot/genesis-store.js';
|
|
|
10
10
|
*
|
|
11
11
|
* @flowWeaver nodeType
|
|
12
12
|
* @label Genesis Escrow Stage
|
|
13
|
+
* @icon build
|
|
14
|
+
* @color pink
|
|
13
15
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
14
16
|
* @output ctx [order:0] - Genesis context with escrow staging result (JSON)
|
|
15
17
|
* @output onSuccess [order:-2] - On Success
|
|
@@ -11,6 +11,8 @@ import { GenesisStore } from '../bot/genesis-store.js';
|
|
|
11
11
|
*
|
|
12
12
|
* @flowWeaver nodeType
|
|
13
13
|
* @label Genesis Escrow Validate
|
|
14
|
+
* @icon check
|
|
15
|
+
* @color pink
|
|
14
16
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
15
17
|
* @output ctx [order:0] - Genesis context with escrow validation result (JSON)
|
|
16
18
|
* @output onSuccess [order:-2] - On Success
|
|
@@ -11,6 +11,8 @@ import { GenesisStore } from '../bot/genesis-store.js';
|
|
|
11
11
|
* @flowWeaver nodeType
|
|
12
12
|
* @expression
|
|
13
13
|
* @label Genesis Load Config
|
|
14
|
+
* @icon settings
|
|
15
|
+
* @color pink
|
|
14
16
|
* @input env [order:0] - Weaver environment bundle
|
|
15
17
|
* @output ctx [order:0] - Genesis context (JSON)
|
|
16
18
|
* @output onFailure [hidden]
|
|
@@ -12,6 +12,8 @@ import { getWorkflowDescription } from '../bot/genesis-prompt-context.js';
|
|
|
12
12
|
*
|
|
13
13
|
* @flowWeaver nodeType
|
|
14
14
|
* @label Genesis Observe
|
|
15
|
+
* @icon search
|
|
16
|
+
* @color pink
|
|
15
17
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
16
18
|
* @output ctx [order:0] - Genesis context with fingerprintJson (JSON)
|
|
17
19
|
* @output onSuccess [order:-2] - On Success
|
|
@@ -9,6 +9,8 @@ import { getGenesisSystemPrompt, getOperationExamples } from '../bot/genesis-pro
|
|
|
9
9
|
*
|
|
10
10
|
* @flowWeaver nodeType
|
|
11
11
|
* @label Genesis Propose
|
|
12
|
+
* @icon edit
|
|
13
|
+
* @color pink
|
|
12
14
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
13
15
|
* @output ctx [order:0] - Genesis context with proposalJson (JSON)
|
|
14
16
|
* @output onSuccess [order:-2] - On Success
|
|
@@ -8,6 +8,8 @@ import type { GenesisCycleRecord, GenesisContext } from '../bot/types.js';
|
|
|
8
8
|
* @flowWeaver nodeType
|
|
9
9
|
* @expression
|
|
10
10
|
* @label Genesis Report
|
|
11
|
+
* @icon list
|
|
12
|
+
* @color pink
|
|
11
13
|
* @executeWhen DISJUNCTION
|
|
12
14
|
* @input [successCtx] [order:0] - Genesis context from success path (JSON)
|
|
13
15
|
* @input [failCtx] [order:1] - Genesis context from apply-retry fail path (JSON)
|
|
@@ -10,6 +10,8 @@ import { GenesisStore } from '../bot/genesis-store.js';
|
|
|
10
10
|
* @flowWeaver nodeType
|
|
11
11
|
* @expression
|
|
12
12
|
* @label Genesis Snapshot
|
|
13
|
+
* @icon wandStars
|
|
14
|
+
* @color pink
|
|
13
15
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
14
16
|
* @output ctx [order:0] - Genesis context with snapshotPath (JSON)
|
|
15
17
|
* @output onFailure [hidden]
|
|
@@ -11,6 +11,8 @@ import { GenesisStore } from '../bot/genesis-store.js';
|
|
|
11
11
|
*
|
|
12
12
|
* @flowWeaver nodeType
|
|
13
13
|
* @label Genesis Try Apply
|
|
14
|
+
* @icon build
|
|
15
|
+
* @color pink
|
|
14
16
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
15
17
|
* @output ctx [order:0] - Genesis context with apply results (JSON)
|
|
16
18
|
* @output onSuccess [order:-2] - On Success
|
|
@@ -8,6 +8,8 @@ import { GenesisStore } from '../bot/genesis-store.js';
|
|
|
8
8
|
* @flowWeaver nodeType
|
|
9
9
|
* @expression
|
|
10
10
|
* @label Genesis Update History
|
|
11
|
+
* @icon edit
|
|
12
|
+
* @color pink
|
|
11
13
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
12
14
|
* @output ctx [order:0] - Genesis context with cycleRecordJson (JSON)
|
|
13
15
|
* @output onFailure [hidden]
|
|
@@ -23,6 +23,8 @@ const SELF_MODIFY_TYPES = new Set(['selfModifyWorkflow', 'selfModifyNodeType', '
|
|
|
23
23
|
* @flowWeaver nodeType
|
|
24
24
|
* @expression
|
|
25
25
|
* @label Genesis Validate Proposal
|
|
26
|
+
* @icon check
|
|
27
|
+
* @color pink
|
|
26
28
|
* @input ctx [order:0] - Genesis context (JSON)
|
|
27
29
|
* @output ctx [order:0] - Genesis context with validated proposalJson (JSON)
|
|
28
30
|
* @output onFailure [hidden]
|
|
@@ -64,6 +64,8 @@ function reviewStagedDiff(cwd: string): string[] {
|
|
|
64
64
|
* @flowWeaver nodeType
|
|
65
65
|
* @expression
|
|
66
66
|
* @label Git Operations
|
|
67
|
+
* @icon code
|
|
68
|
+
* @color green
|
|
67
69
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
68
70
|
* @output ctx [order:0] - Weaver context with gitResultJson (JSON)
|
|
69
71
|
* @output onFailure [hidden]
|
|
@@ -8,6 +8,8 @@ import type { BotConfig } from '../bot/types.js';
|
|
|
8
8
|
* @flowWeaver nodeType
|
|
9
9
|
* @expression
|
|
10
10
|
* @label Load Config
|
|
11
|
+
* @icon settings
|
|
12
|
+
* @color cyan
|
|
11
13
|
* @input [projectDir] [order:0] - Project root directory (defaults to cwd)
|
|
12
14
|
* @output projectDir [order:0] - Project root directory (pass-through)
|
|
13
15
|
* @output config [order:1] - Weaver configuration
|
|
@@ -5,6 +5,8 @@ import type { OrchestratorOutput } from '../bot/profile-types.js';
|
|
|
5
5
|
*
|
|
6
6
|
* @flowWeaver nodeType
|
|
7
7
|
* @label Dispatch Tasks
|
|
8
|
+
* @icon playArrow
|
|
9
|
+
* @color green
|
|
8
10
|
* @input decisions [order:0] - JSON OrchestratorOutput
|
|
9
11
|
* @input projectDir [order:1] - Project directory path
|
|
10
12
|
* @output results [order:0] - JSON dispatch results
|
|
@@ -5,6 +5,8 @@ import type { OrchestratorInput } from '../bot/profile-types.js';
|
|
|
5
5
|
*
|
|
6
6
|
* @flowWeaver nodeType
|
|
7
7
|
* @label Load Swarm State
|
|
8
|
+
* @icon download
|
|
9
|
+
* @color cyan
|
|
8
10
|
* @input projectDir [order:0] - Project directory path
|
|
9
11
|
* @output state [order:0] - JSON OrchestratorInput snapshot
|
|
10
12
|
* @output onSuccess [order:-2] - Loaded successfully
|
|
@@ -6,6 +6,8 @@ import type { OrchestratorInput } from '../bot/profile-types.js';
|
|
|
6
6
|
*
|
|
7
7
|
* @flowWeaver nodeType
|
|
8
8
|
* @label Route Tasks
|
|
9
|
+
* @icon altRoute
|
|
10
|
+
* @color orange
|
|
9
11
|
* @input state [order:0] - JSON OrchestratorInput
|
|
10
12
|
* @output decisions [order:0] - JSON OrchestratorOutput
|
|
11
13
|
* @output onSuccess [order:-2] - Routing complete
|
|
@@ -8,6 +8,8 @@ import { auditEmit } from '../bot/audit-logger.js';
|
|
|
8
8
|
*
|
|
9
9
|
* @flowWeaver nodeType
|
|
10
10
|
* @label Plan Task
|
|
11
|
+
* @icon checklist
|
|
12
|
+
* @color blue
|
|
11
13
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
12
14
|
* @output ctx [order:0] - Weaver context with planJson (JSON)
|
|
13
15
|
* @output onSuccess [order:-2] - On Success
|
|
@@ -10,6 +10,8 @@ import type { WeaverContext } from '../bot/types.js';
|
|
|
10
10
|
* @flowWeaver nodeType
|
|
11
11
|
* @expression
|
|
12
12
|
* @label Read Workflow
|
|
13
|
+
* @icon search
|
|
14
|
+
* @color blue
|
|
13
15
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
14
16
|
* @output ctx [order:0] - Weaver context with resultJson (JSON)
|
|
15
17
|
* @output onFailure [hidden]
|
|
@@ -6,6 +6,8 @@ import type { WeaverEnv, WeaverContext } from '../bot/types.js';
|
|
|
6
6
|
*
|
|
7
7
|
* @flowWeaver nodeType
|
|
8
8
|
* @label Receive Task
|
|
9
|
+
* @icon download
|
|
10
|
+
* @color purple
|
|
9
11
|
* @input env [order:0] - Weaver environment bundle
|
|
10
12
|
* @input [taskJson] [order:1] - Pre-supplied task (JSON, optional)
|
|
11
13
|
* @output ctx [order:0] - Weaver context (JSON)
|
package/src/node-types/report.ts
CHANGED
|
@@ -7,6 +7,8 @@ import type { WeaverContext } from '../bot/types.js';
|
|
|
7
7
|
* @flowWeaver nodeType
|
|
8
8
|
* @expression
|
|
9
9
|
* @label Report
|
|
10
|
+
* @icon list
|
|
11
|
+
* @color cyan
|
|
10
12
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
11
13
|
* @output summary [order:0] - Summary string
|
|
12
14
|
* @output onFailure [hidden]
|
|
@@ -9,6 +9,8 @@ import type { WeaverEnv, WeaverContext } from '../bot/types.js';
|
|
|
9
9
|
* @flowWeaver nodeType
|
|
10
10
|
* @expression
|
|
11
11
|
* @label Resolve Target
|
|
12
|
+
* @icon search
|
|
13
|
+
* @color blue
|
|
12
14
|
* @input env [order:0] - Weaver environment bundle
|
|
13
15
|
* @output ctx [order:0] - Weaver context (JSON)
|
|
14
16
|
* @output onFailure [hidden]
|
|
@@ -7,6 +7,8 @@ import type { WeaverContext } from '../bot/types.js';
|
|
|
7
7
|
* @flowWeaver nodeType
|
|
8
8
|
* @expression
|
|
9
9
|
* @label Route Task
|
|
10
|
+
* @icon altRoute
|
|
11
|
+
* @color orange
|
|
10
12
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
11
13
|
* @output ctx [order:0] - Weaver context (pass-through, JSON)
|
|
12
14
|
*/
|
|
@@ -49,6 +49,8 @@ function sendWebhook(
|
|
|
49
49
|
* @flowWeaver nodeType
|
|
50
50
|
* @expression
|
|
51
51
|
* @label Notify Result
|
|
52
|
+
* @icon pending
|
|
53
|
+
* @color blue
|
|
52
54
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
53
55
|
* @output ctx [order:0] - Weaver context (pass-through, JSON)
|
|
54
56
|
* @output onFailure [hidden]
|
|
@@ -9,6 +9,8 @@ import type { WeaverContext } from '../bot/types.js';
|
|
|
9
9
|
* @flowWeaver nodeType
|
|
10
10
|
* @expression
|
|
11
11
|
* @label Validate Gate
|
|
12
|
+
* @icon check
|
|
13
|
+
* @color green
|
|
12
14
|
* @input ctx [order:0] - Weaver context (JSON)
|
|
13
15
|
* @output ctx [order:0] - Weaver context with validation result (JSON)
|
|
14
16
|
* @output onSuccess [order:-2] - All files valid
|
|
@@ -8,6 +8,8 @@ import { validateFiles } from '../bot/file-validator.js';
|
|
|
8
8
|
* @flowWeaver nodeType
|
|
9
9
|
* @expression
|
|
10
10
|
* @label Validate Result
|
|
11
|
+
* @icon check
|
|
12
|
+
* @color green
|
|
11
13
|
* @input env [order:0] - Weaver environment bundle
|
|
12
14
|
* @input executionResultJson [order:1] - Execution result (JSON)
|
|
13
15
|
* @input taskJson [order:2] - Task (JSON, pass-through)
|
|
@@ -94,7 +94,8 @@ function isTerminal(status: TaskData['status']): boolean {
|
|
|
94
94
|
// Component
|
|
95
95
|
// ---------------------------------------------------------------------------
|
|
96
96
|
|
|
97
|
-
function ChatTaskResult(
|
|
97
|
+
function ChatTaskResult(props: ChatTaskResultProps | null) {
|
|
98
|
+
const { result = null, args = {}, callTool, openWorkspace } = props ?? {} as ChatTaskResultProps;
|
|
98
99
|
const initial = parseResult(result);
|
|
99
100
|
const [task, setTask] = useState<TaskData | null>(initial.task);
|
|
100
101
|
const [subtasks, setSubtasks] = useState<SubtaskData[]>(initial.subtasks);
|
|
@@ -103,6 +103,8 @@ export function useStreamTimeline(events: StreamEvent[], isDone: boolean): Strea
|
|
|
103
103
|
type: 'node-started',
|
|
104
104
|
nodeId,
|
|
105
105
|
label: (d.label as string) ?? (d.nodeType as string) ?? nodeId ?? 'Node',
|
|
106
|
+
color: d.color as string | undefined,
|
|
107
|
+
icon: d.icon as string | undefined,
|
|
106
108
|
});
|
|
107
109
|
break;
|
|
108
110
|
}
|
|
@@ -123,6 +125,8 @@ export function useStreamTimeline(events: StreamEvent[], isDone: boolean): Strea
|
|
|
123
125
|
nodeId,
|
|
124
126
|
label: (d.label as string) ?? (d.nodeType as string) ?? nodeId ?? 'Node',
|
|
125
127
|
duration,
|
|
128
|
+
color: d.color as string | undefined,
|
|
129
|
+
icon: d.icon as string | undefined,
|
|
126
130
|
outputs: rawOutputs && rawOutputs.length > 0 ? rawOutputs : undefined,
|
|
127
131
|
};
|
|
128
132
|
|
|
@@ -154,6 +158,8 @@ export function useStreamTimeline(events: StreamEvent[], isDone: boolean): Strea
|
|
|
154
158
|
label: (d.label as string) ?? (d.nodeType as string) ?? nodeId ?? 'Node',
|
|
155
159
|
detail: d.error as string | undefined,
|
|
156
160
|
duration,
|
|
161
|
+
color: d.color as string | undefined,
|
|
162
|
+
icon: d.icon as string | undefined,
|
|
157
163
|
outputs: rawOutputs && rawOutputs.length > 0 ? rawOutputs : undefined,
|
|
158
164
|
};
|
|
159
165
|
|