@synergenius/flow-weaver-pack-weaver 0.9.142 → 0.9.145
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/behavior-defaults.d.ts +2 -2
- package/dist/bot/behavior-defaults.d.ts.map +1 -1
- package/dist/bot/behavior-defaults.js +11 -6
- package/dist/bot/behavior-defaults.js.map +1 -1
- package/dist/bot/capability-registry.d.ts +2 -0
- package/dist/bot/capability-registry.d.ts.map +1 -1
- package/dist/bot/capability-registry.js +97 -0
- package/dist/bot/capability-registry.js.map +1 -1
- package/dist/bot/profile-store.d.ts.map +1 -1
- package/dist/bot/profile-store.js +7 -0
- package/dist/bot/profile-store.js.map +1 -1
- package/dist/bot/runner.d.ts.map +1 -1
- package/dist/bot/runner.js +53 -8
- package/dist/bot/runner.js.map +1 -1
- package/dist/bot/step-executor.d.ts.map +1 -1
- package/dist/bot/step-executor.js +3 -0
- package/dist/bot/step-executor.js.map +1 -1
- package/dist/bot/swarm-controller.d.ts.map +1 -1
- package/dist/bot/swarm-controller.js +7 -3
- package/dist/bot/swarm-controller.js.map +1 -1
- package/dist/bot/task-prompt-builder.js +8 -0
- package/dist/bot/task-prompt-builder.js.map +1 -1
- package/dist/bot/task-types.d.ts +2 -0
- package/dist/bot/task-types.d.ts.map +1 -1
- package/dist/bot/types.d.ts +4 -0
- package/dist/bot/types.d.ts.map +1 -1
- package/dist/node-types/bot-report.d.ts +3 -1
- package/dist/node-types/bot-report.d.ts.map +1 -1
- package/dist/node-types/bot-report.js +60 -9
- package/dist/node-types/bot-report.js.map +1 -1
- package/dist/node-types/report.d.ts +3 -1
- package/dist/node-types/report.d.ts.map +1 -1
- package/dist/node-types/report.js +7 -3
- package/dist/node-types/report.js.map +1 -1
- package/dist/ui/capability-editor.js +84 -0
- package/dist/ui/profile-editor.js +87 -3
- package/dist/ui/swarm-dashboard.js +96 -7
- package/dist/ui/task-detail-view.js +9 -4
- package/dist/ui/trace-to-timeline.d.ts +2 -0
- package/dist/ui/trace-to-timeline.d.ts.map +1 -1
- package/dist/ui/trace-to-timeline.js.map +1 -1
- package/dist/ui/use-stream-timeline.d.ts +2 -0
- package/dist/ui/use-stream-timeline.d.ts.map +1 -1
- package/dist/ui/use-stream-timeline.js +7 -5
- package/dist/ui/use-stream-timeline.js.map +1 -1
- package/flowweaver.manifest.json +1 -1
- package/package.json +1 -1
- package/src/bot/behavior-defaults.ts +12 -5
- package/src/bot/capability-registry.ts +104 -0
- package/src/bot/profile-store.ts +7 -0
- package/src/bot/runner.ts +55 -9
- package/src/bot/step-executor.ts +3 -0
- package/src/bot/swarm-controller.ts +7 -3
- package/src/bot/task-prompt-builder.ts +10 -0
- package/src/bot/task-types.ts +2 -0
- package/src/bot/types.ts +4 -0
- package/src/node-types/bot-report.ts +61 -10
- package/src/node-types/report.ts +8 -4
- package/src/ui/task-detail-view.tsx +3 -0
- package/src/ui/trace-to-timeline.ts +2 -0
- package/src/ui/use-stream-timeline.ts +8 -5
|
@@ -281,6 +281,7 @@ function TaskDetailView({ taskId, onBack, onEdit }: TaskDetailViewProps) {
|
|
|
281
281
|
cost: liveCost,
|
|
282
282
|
plan,
|
|
283
283
|
awaitingApproval,
|
|
284
|
+
report: liveReport,
|
|
284
285
|
} = useStreamTimeline(stream.events, stream.isDone);
|
|
285
286
|
|
|
286
287
|
const currentRunId = task?.currentRunId;
|
|
@@ -616,6 +617,7 @@ function TaskDetailView({ taskId, onBack, onEdit }: TaskDetailViewProps) {
|
|
|
616
617
|
state: isSuccess ? 'completed' : 'failed',
|
|
617
618
|
instruction: extractInstruction(run),
|
|
618
619
|
timeline: runTimeline,
|
|
620
|
+
report: run.report ?? null,
|
|
619
621
|
cost: typeof run.cost === 'number' ? run.cost : ((run.costDetail?.totalCost as number) ?? null),
|
|
620
622
|
plan: run.plan,
|
|
621
623
|
startedAt: run.startedAt,
|
|
@@ -630,6 +632,7 @@ function TaskDetailView({ taskId, onBack, onEdit }: TaskDetailViewProps) {
|
|
|
630
632
|
state: 'running',
|
|
631
633
|
instruction: liveInstruction ?? task.title,
|
|
632
634
|
timeline: liveTimeline,
|
|
635
|
+
report: liveReport,
|
|
633
636
|
phase: livePhase,
|
|
634
637
|
elapsed,
|
|
635
638
|
cost: liveCost,
|
|
@@ -68,6 +68,8 @@ export interface HistoricalRun {
|
|
|
68
68
|
durationMs?: number;
|
|
69
69
|
duration?: number; // fallback
|
|
70
70
|
summary?: string;
|
|
71
|
+
/** Markdown report for rich UI display. */
|
|
72
|
+
report?: string;
|
|
71
73
|
outputs?: Record<string, unknown>;
|
|
72
74
|
startedAt?: string;
|
|
73
75
|
finishedAt?: string;
|
|
@@ -42,6 +42,8 @@ export interface StreamTimelineState {
|
|
|
42
42
|
steps: Array<{ id: string; operation: string; description: string }>;
|
|
43
43
|
} | null;
|
|
44
44
|
awaitingApproval: boolean;
|
|
45
|
+
/** Markdown report from bot-completed event. */
|
|
46
|
+
report: string | null;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
export function useStreamTimeline(events: StreamEvent[], isDone: boolean): StreamTimelineState {
|
|
@@ -244,12 +246,13 @@ export function useStreamTimeline(events: StreamEvent[], isDone: boolean): Strea
|
|
|
244
246
|
}, [events]);
|
|
245
247
|
|
|
246
248
|
// Extract metadata from events
|
|
247
|
-
const { phase, instruction, cost, plan, awaitingApproval } = useMemo(() => {
|
|
249
|
+
const { phase, instruction, cost, plan, awaitingApproval, report } = useMemo(() => {
|
|
248
250
|
let phase: StreamTimelineState['phase'] = 'idle';
|
|
249
251
|
let instruction: string | null = null;
|
|
250
252
|
let cost: number | null = null;
|
|
251
253
|
let plan: StreamTimelineState['plan'] = null;
|
|
252
254
|
let awaitingApproval = false;
|
|
255
|
+
let report: string | null = null;
|
|
253
256
|
|
|
254
257
|
for (const event of events) {
|
|
255
258
|
const d = event.data ?? {};
|
|
@@ -261,12 +264,12 @@ export function useStreamTimeline(events: StreamEvent[], isDone: boolean): Strea
|
|
|
261
264
|
phase = 'executing';
|
|
262
265
|
} else if (event.type === 'bot-completed') {
|
|
263
266
|
phase = (d.success as boolean) ? 'completed' : 'failed';
|
|
267
|
+
if (typeof d.report === 'string') report = d.report;
|
|
264
268
|
} else if (event.type === 'bot-failed') {
|
|
265
269
|
phase = 'failed';
|
|
266
270
|
} else if (event.type === 'cost-update') {
|
|
267
271
|
cost = (d.totalCost as number) ?? cost;
|
|
268
272
|
} else if (event.type === 'audit:plan-created' || event.type === 'plan-created') {
|
|
269
|
-
// Plan data may be at d.plan (structured) or directly on d (audit event)
|
|
270
273
|
const planData = (d.plan as Record<string, unknown>) ?? d;
|
|
271
274
|
const summary = (planData.summary as string) ?? '';
|
|
272
275
|
const steps =
|
|
@@ -282,11 +285,11 @@ export function useStreamTimeline(events: StreamEvent[], isDone: boolean): Strea
|
|
|
282
285
|
}
|
|
283
286
|
|
|
284
287
|
if (isDone && phase !== 'completed' && phase !== 'failed') {
|
|
285
|
-
phase = 'completed';
|
|
288
|
+
phase = 'completed';
|
|
286
289
|
}
|
|
287
290
|
|
|
288
|
-
return { phase, instruction, cost, plan, awaitingApproval };
|
|
291
|
+
return { phase, instruction, cost, plan, awaitingApproval, report };
|
|
289
292
|
}, [events, isDone]);
|
|
290
293
|
|
|
291
|
-
return { timeline, phase, instruction, elapsed, cost, plan, awaitingApproval };
|
|
294
|
+
return { timeline, phase, instruction, elapsed, cost, plan, awaitingApproval, report };
|
|
292
295
|
}
|