@synergenius/flow-weaver-pack-weaver 0.9.153 → 0.9.154
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/system-prompt.d.ts.map +1 -1
- package/dist/bot/system-prompt.js +2 -0
- package/dist/bot/system-prompt.js.map +1 -1
- package/dist/bot/weaver-tools.d.ts.map +1 -1
- package/dist/bot/weaver-tools.js +6 -0
- package/dist/bot/weaver-tools.js.map +1 -1
- package/dist/node-types/build-context.d.ts.map +1 -1
- package/dist/node-types/build-context.js +11 -0
- package/dist/node-types/build-context.js.map +1 -1
- package/dist/ui/chat-task-result.js +7 -7
- package/dist/ui/swarm-dashboard.js +12 -12
- package/dist/ui/task-detail-view.js +10 -10
- package/dist/ui/task-editor.js +1 -1
- package/dist/ui/task-pool-list.js +1 -1
- package/dist/workflows/weaver-bot.d.ts +3 -2
- package/dist/workflows/weaver-bot.d.ts.map +1 -1
- package/dist/workflows/weaver-bot.js +4 -4
- package/dist/workflows/weaver-bot.js.map +1 -1
- package/flowweaver.manifest.json +1 -1
- package/package.json +1 -1
- package/src/bot/system-prompt.ts +2 -0
- package/src/bot/weaver-tools.ts +7 -0
- package/src/node-types/build-context.ts +11 -0
- package/src/ui/chat-task-result.tsx +10 -8
- package/src/ui/swarm-dashboard.tsx +1 -1
- package/src/ui/task-detail-view.tsx +11 -11
- package/src/ui/task-editor.tsx +2 -2
- package/src/ui/task-pool-list.tsx +2 -2
- package/src/workflows/weaver-bot.ts +4 -4
|
@@ -24,7 +24,7 @@ import type { HistoricalRun } from './trace-to-timeline';
|
|
|
24
24
|
// Types
|
|
25
25
|
// ---------------------------------------------------------------------------
|
|
26
26
|
|
|
27
|
-
type TaskStatus = 'pending' | 'in-progress' | 'blocked' | 'done' | '
|
|
27
|
+
type TaskStatus = 'open' | 'pending' | 'in-progress' | 'blocked' | 'done' | 'cancelled';
|
|
28
28
|
|
|
29
29
|
interface TaskContext {
|
|
30
30
|
files: string[];
|
|
@@ -89,19 +89,19 @@ interface TaskDetailViewProps {
|
|
|
89
89
|
// ---------------------------------------------------------------------------
|
|
90
90
|
|
|
91
91
|
const statusToIcon: Record<TaskStatus, string> = {
|
|
92
|
+
'open': 'pending',
|
|
92
93
|
'pending': 'pending',
|
|
93
94
|
'in-progress': 'running',
|
|
94
95
|
'done': 'completed',
|
|
95
|
-
'failed': 'failed',
|
|
96
96
|
'blocked': 'pending',
|
|
97
97
|
'cancelled': 'failed',
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
const statusToLabel: Record<TaskStatus, string> = {
|
|
101
|
-
'
|
|
102
|
-
'
|
|
101
|
+
'open': 'Open',
|
|
102
|
+
'pending': 'Queued',
|
|
103
|
+
'in-progress': 'Running',
|
|
103
104
|
'done': 'Done',
|
|
104
|
-
'failed': 'Failed',
|
|
105
105
|
'blocked': 'Blocked',
|
|
106
106
|
'cancelled': 'Cancelled',
|
|
107
107
|
};
|
|
@@ -568,10 +568,10 @@ function TaskDetailView({ taskId, onBack, onEdit }: TaskDetailViewProps) {
|
|
|
568
568
|
// Meta row: status tag, assigned profile, priority, attempts
|
|
569
569
|
React.createElement(Flex, { variant: 'row-center-start-wrap-6' },
|
|
570
570
|
React.createElement(Chip, {
|
|
571
|
-
label: statusToLabel[task.status] || task.status || '
|
|
571
|
+
label: statusToLabel[task.status as TaskStatus] || task.status || 'open',
|
|
572
572
|
size: 'small',
|
|
573
573
|
color: task.status === 'done' ? 'color-status-positive'
|
|
574
|
-
: task.status === '
|
|
574
|
+
: task.status === 'cancelled' ? 'color-status-negative'
|
|
575
575
|
: task.status === 'in-progress' ? 'color-status-info'
|
|
576
576
|
: task.status === 'blocked' ? 'color-status-caution'
|
|
577
577
|
: 'color-brand-alt',
|
|
@@ -583,10 +583,10 @@ function TaskDetailView({ taskId, onBack, onEdit }: TaskDetailViewProps) {
|
|
|
583
583
|
label: `P${task.priority}`, size: 'small', color: task.priority >= 3 ? 'color-status-caution' : 'color-status-info',
|
|
584
584
|
}),
|
|
585
585
|
|
|
586
|
-
|
|
586
|
+
task.maxAttempts != null && task.maxAttempts > 1 && React.createElement(Typography, {
|
|
587
587
|
variant: 'smallCaption-regular',
|
|
588
588
|
color: 'color-text-subtle',
|
|
589
|
-
},
|
|
589
|
+
}, `${task.runs?.length ?? 0}/${task.maxAttempts} runs`),
|
|
590
590
|
),
|
|
591
591
|
|
|
592
592
|
// Description
|
|
@@ -696,14 +696,14 @@ function TaskDetailView({ taskId, onBack, onEdit }: TaskDetailViewProps) {
|
|
|
696
696
|
React.createElement(Flex, { variant: 'column-stretch-start-nowrap-8' },
|
|
697
697
|
React.createElement(Typography, { variant: 'caption-thick', color: 'color-text-medium' }, 'Status'),
|
|
698
698
|
React.createElement(Flex, { variant: 'row-center-start-nowrap-6' },
|
|
699
|
-
(task.status === '
|
|
699
|
+
(task.status === 'open' && (task.attempt ?? 0) > 0) && React.createElement(Button, {
|
|
700
700
|
size: 'xs', variant: 'fill', color: 'primary',
|
|
701
701
|
onClick: handleRetry,
|
|
702
702
|
loading: actionLoading === 'retry',
|
|
703
703
|
disabled: !!actionLoading,
|
|
704
704
|
}, 'Retry Task'),
|
|
705
705
|
|
|
706
|
-
(task.status === 'pending' || task.status === 'in-progress' || task.status === 'blocked') && React.createElement(Button, {
|
|
706
|
+
(task.status === 'open' || task.status === 'pending' || task.status === 'in-progress' || task.status === 'blocked') && React.createElement(Button, {
|
|
707
707
|
size: 'xs', variant: 'outlined', color: 'danger',
|
|
708
708
|
onClick: handleCancel,
|
|
709
709
|
loading: actionLoading === 'cancel',
|
package/src/ui/task-editor.tsx
CHANGED
|
@@ -29,7 +29,7 @@ interface TaskEditorProps {
|
|
|
29
29
|
onDelete?: () => void;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
type TaskStatus = 'pending' | 'in-progress' | 'blocked' | 'done' | '
|
|
32
|
+
type TaskStatus = 'open' | 'pending' | 'in-progress' | 'blocked' | 'done' | 'cancelled';
|
|
33
33
|
|
|
34
34
|
interface TaskData {
|
|
35
35
|
id: string;
|
|
@@ -77,11 +77,11 @@ const COMPLEXITY_OPTIONS = [
|
|
|
77
77
|
];
|
|
78
78
|
|
|
79
79
|
const STATUS_COLOR: Record<string, string> = {
|
|
80
|
+
'open': 'color-brand-alt',
|
|
80
81
|
'pending': 'color-brand-alt',
|
|
81
82
|
'in-progress': 'color-status-info',
|
|
82
83
|
'blocked': 'color-status-caution',
|
|
83
84
|
'done': 'color-status-positive',
|
|
84
|
-
'failed': 'color-status-negative',
|
|
85
85
|
'cancelled': 'color-status-negative',
|
|
86
86
|
};
|
|
87
87
|
|
|
@@ -11,7 +11,7 @@ const { Flex, Typography, Icon, StatusIcon, Chip, ScrollArea, Badge, EmptyState
|
|
|
11
11
|
|
|
12
12
|
// --- Types ---
|
|
13
13
|
|
|
14
|
-
type TaskStatus = 'pending' | 'in-progress' | 'blocked' | 'done' | '
|
|
14
|
+
type TaskStatus = 'open' | 'pending' | 'in-progress' | 'blocked' | 'done' | 'cancelled';
|
|
15
15
|
|
|
16
16
|
interface Task {
|
|
17
17
|
id: string;
|
|
@@ -32,10 +32,10 @@ interface TaskPoolListProps {
|
|
|
32
32
|
// --- Status mapping ---
|
|
33
33
|
|
|
34
34
|
const statusToIcon: Record<TaskStatus, string> = {
|
|
35
|
+
'open': 'pending',
|
|
35
36
|
'pending': 'pending',
|
|
36
37
|
'in-progress': 'running',
|
|
37
38
|
'done': 'completed',
|
|
38
|
-
'failed': 'failed',
|
|
39
39
|
'blocked': 'pending',
|
|
40
40
|
'cancelled': 'failed',
|
|
41
41
|
};
|
|
@@ -423,7 +423,7 @@ class GeneratedExecutionContext {
|
|
|
423
423
|
|
|
424
424
|
/**
|
|
425
425
|
* @flowWeaver workflow
|
|
426
|
-
* @node cfg weaverLoadConfig [color: "teal"] [icon: "settings"] [position: 200 200]
|
|
426
|
+
* @node cfg weaverLoadConfig [color: "teal"] [icon: "settings"] [suppress: "AGENT_UNGUARDED_TOOL_EXECUTOR"] [position: 200 200]
|
|
427
427
|
* @node detect weaverDetectProvider [color: "cyan"] [icon: "search"] [suppress: "OBJECT_TYPE_MISMATCH", "ANNOTATION_SIGNATURE_TYPE_MISMATCH"] [position: 400 200]
|
|
428
428
|
* @node receive weaverReceiveTask [color: "blue"] [icon: "send"] [position: 600 200]
|
|
429
429
|
* @node route weaverRouteTask [color: "purple"] [icon: "flow"] [position: 800 200]
|
|
@@ -441,7 +441,7 @@ class GeneratedExecutionContext {
|
|
|
441
441
|
* @node resolveReviewModel weaverResolveModel [label: "Review Model"] [expr: phaseName="'review'"] [minimized] [color: "green"] [icon: "tune"] [position: 1900 50]
|
|
442
442
|
* @node review weaverReviewResult [color: "green"] [icon: "spellcheck"] [position: 1950 100]
|
|
443
443
|
* @node mergeReview weaverCtxMerge [label: "Merge Review"] [minimized] [color: "teal"] [icon: "callMerge"] [position: 2050 200]
|
|
444
|
-
* @node gitOps weaverGitOps [color: "green"] [icon: "code"] [position: 2150 100]
|
|
444
|
+
* @node gitOps weaverGitOps [color: "green"] [icon: "code"] [suppress: "UNUSED_OUTPUT_PORT"] [position: 2150 100]
|
|
445
445
|
* @node notify weaverSendNotify [color: "yellow"] [icon: "send"] [suppress: "UNUSED_OUTPUT_PORT"] [position: 2050 400]
|
|
446
446
|
* @node report weaverBotReport [color: "green"] [icon: "description"] [suppress: "UNUSED_OUTPUT_PORT", "DESIGN_ASYNC_NO_ERROR_PATH"] [position: 2350 200]
|
|
447
447
|
* @path Start -> cfg -> detect -> receive -> route -> context -> gatePlan -> resolvePlanModel -> plan -> mergePlan -> approve -> resolveExecModel -> execRetry -> gateReview -> resolveReviewModel -> review -> mergeReview -> gitOps -> report -> Exit
|
|
@@ -470,6 +470,7 @@ class GeneratedExecutionContext {
|
|
|
470
470
|
* @connect abort.ctx -> report.abortCtx
|
|
471
471
|
* @connect plan.ctx -> report.failCtx
|
|
472
472
|
* @connect report.summary -> Exit.summary
|
|
473
|
+
* @connect review.onFailure -> report.execute
|
|
473
474
|
* @param execute [order:-1] - Execute
|
|
474
475
|
* @param taskJson [order:0] - TaskJson
|
|
475
476
|
* @param projectDir [order:1] - ProjectDir
|
|
@@ -2116,7 +2117,7 @@ export async function weaverBot(
|
|
|
2116
2117
|
});
|
|
2117
2118
|
|
|
2118
2119
|
try {
|
|
2119
|
-
const report_execute = (readWfIdx !== undefined ? await ctx.getVariable({ id: 'readWf', portName: 'onSuccess', executionIndex: readWfIdx }) as boolean : false) || (abortIdx !== undefined ? await ctx.getVariable({ id: 'abort', portName: 'onSuccess', executionIndex: abortIdx }) as boolean : false) || (notifyIdx !== undefined ? await ctx.getVariable({ id: 'notify', portName: 'onSuccess', executionIndex: notifyIdx }) as boolean : false) || (gitOpsIdx !== undefined ? await ctx.getVariable({ id: 'gitOps', portName: 'onSuccess', executionIndex: gitOpsIdx }) as boolean : false) || (receiveIdx !== undefined ? await ctx.getVariable({ id: 'receive', portName: 'onFailure', executionIndex: receiveIdx }) as boolean : false) || (planIdx !== undefined ? await ctx.getVariable({ id: 'plan', portName: 'onFailure', executionIndex: planIdx }) as boolean : false) || (execRetryIdx !== undefined ? await ctx.getVariable({ id: 'execRetry', portName: 'onFailure', executionIndex: execRetryIdx }) as boolean : false);
|
|
2120
|
+
const report_execute = (readWfIdx !== undefined ? await ctx.getVariable({ id: 'readWf', portName: 'onSuccess', executionIndex: readWfIdx }) as boolean : false) || (abortIdx !== undefined ? await ctx.getVariable({ id: 'abort', portName: 'onSuccess', executionIndex: abortIdx }) as boolean : false) || (notifyIdx !== undefined ? await ctx.getVariable({ id: 'notify', portName: 'onSuccess', executionIndex: notifyIdx }) as boolean : false) || (gitOpsIdx !== undefined ? await ctx.getVariable({ id: 'gitOps', portName: 'onSuccess', executionIndex: gitOpsIdx }) as boolean : false) || (receiveIdx !== undefined ? await ctx.getVariable({ id: 'receive', portName: 'onFailure', executionIndex: receiveIdx }) as boolean : false) || (planIdx !== undefined ? await ctx.getVariable({ id: 'plan', portName: 'onFailure', executionIndex: planIdx }) as boolean : false) || (execRetryIdx !== undefined ? await ctx.getVariable({ id: 'execRetry', portName: 'onFailure', executionIndex: execRetryIdx }) as boolean : false) || (reviewIdx !== undefined ? await ctx.getVariable({ id: 'review', portName: 'onFailure', executionIndex: reviewIdx }) as boolean : false);
|
|
2120
2121
|
await ctx.setVariable({ id: 'report', portName: 'execute', executionIndex: reportIdx, nodeTypeName: 'weaverBotReport' }, report_execute);
|
|
2121
2122
|
const report_mainCtx = mergePlanIdx !== undefined ? await ctx.getVariable({ id: 'mergePlan', portName: 'ctx', executionIndex: mergePlanIdx }) as string : undefined;
|
|
2122
2123
|
await ctx.setVariable({ id: 'report', portName: 'mainCtx', executionIndex: reportIdx, nodeTypeName: 'weaverBotReport' }, report_mainCtx);
|
|
@@ -2128,7 +2129,6 @@ export async function weaverBot(
|
|
|
2128
2129
|
await ctx.setVariable({ id: 'report', portName: 'failCtx', executionIndex: reportIdx, nodeTypeName: 'weaverBotReport' }, report_failCtx);
|
|
2129
2130
|
const reportResult = await weaverBotReport(report_execute, report_mainCtx, report_readCtx, report_abortCtx, report_failCtx);
|
|
2130
2131
|
await ctx.setVariable({ id: 'report', portName: 'summary', executionIndex: reportIdx, nodeTypeName: 'weaverBotReport' }, reportResult.summary);
|
|
2131
|
-
await ctx.setVariable({ id: 'report', portName: 'report', executionIndex: reportIdx, nodeTypeName: 'weaverBotReport' }, reportResult.report);
|
|
2132
2132
|
await ctx.setVariable({ id: 'report', portName: 'reportJson', executionIndex: reportIdx, nodeTypeName: 'weaverBotReport' }, reportResult.reportJson);
|
|
2133
2133
|
await ctx.setVariable({ id: 'report', portName: 'onFailure', executionIndex: reportIdx, nodeTypeName: 'weaverBotReport' }, reportResult.onFailure);
|
|
2134
2134
|
await ctx.setVariable({ id: 'report', portName: 'onSuccess', executionIndex: reportIdx, nodeTypeName: 'weaverBotReport' }, reportResult.onSuccess);
|