@synergenius/flow-weaver-pack-weaver 0.9.202 → 0.9.203

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.
Files changed (34) hide show
  1. package/dist/bot/task-create-handler.d.ts +9 -0
  2. package/dist/bot/task-create-handler.d.ts.map +1 -1
  3. package/dist/bot/task-create-handler.js +26 -0
  4. package/dist/bot/task-create-handler.js.map +1 -1
  5. package/dist/node-types/agent-execute.d.ts.map +1 -1
  6. package/dist/node-types/agent-execute.js +26 -9
  7. package/dist/node-types/agent-execute.js.map +1 -1
  8. package/dist/node-types/plan-task.d.ts.map +1 -1
  9. package/dist/node-types/plan-task.js +28 -2
  10. package/dist/node-types/plan-task.js.map +1 -1
  11. package/dist/ui/bot-slot-card.js +10 -0
  12. package/dist/ui/budget-bar.js +5 -3
  13. package/dist/ui/budget-strip.js +156 -0
  14. package/dist/ui/chat-task-result.js +22 -27
  15. package/dist/ui/instance-stream-view.js +36 -0
  16. package/dist/ui/swarm-dashboard.js +1596 -1654
  17. package/dist/ui/task-detail-view.js +973 -485
  18. package/dist/ui/task-editor.js +32 -34
  19. package/dist/ui/task-pool-list.js +11 -3
  20. package/flowweaver.manifest.json +1 -1
  21. package/package.json +3 -2
  22. package/src/bot/task-create-handler.ts +39 -0
  23. package/src/node-types/agent-execute.ts +27 -10
  24. package/src/node-types/plan-task.ts +25 -2
  25. package/src/ui/bot-slot-card.tsx +23 -0
  26. package/src/ui/budget-bar.tsx +13 -5
  27. package/src/ui/budget-strip.tsx +199 -0
  28. package/src/ui/chat-task-result.tsx +5 -25
  29. package/src/ui/instance-stream-view.tsx +50 -1
  30. package/src/ui/swarm-dashboard.tsx +89 -84
  31. package/src/ui/task-detail-view.tsx +376 -442
  32. package/src/ui/task-editor.tsx +65 -96
  33. package/src/ui/task-pool-list.tsx +3 -12
  34. package/src/ui/task-status.ts +60 -0
@@ -26,6 +26,25 @@ __export(chat_task_result_exports, {
26
26
  module.exports = __toCommonJS(chat_task_result_exports);
27
27
  var import_react = require("react");
28
28
  var import_plugin_ui_kit = require("@fw/plugin-ui-kit");
29
+
30
+ // src/ui/task-status.ts
31
+ var TASK_STATUS_ICON = {
32
+ "open": "pending",
33
+ "in-progress": "running",
34
+ "done": "completed",
35
+ "cancelled": "failed"
36
+ };
37
+ var TASK_STATUS_ICON_OVERRIDE = {
38
+ "in-progress": "pendingActions"
39
+ };
40
+ var TASK_STATUS_LABEL = {
41
+ "open": "Open",
42
+ "in-progress": "In Progress",
43
+ "done": "Done",
44
+ "cancelled": "Cancelled"
45
+ };
46
+
47
+ // src/ui/chat-task-result.tsx
29
48
  var import_jsx_runtime = require("react/jsx-runtime");
30
49
  function parseResult(result) {
31
50
  try {
@@ -39,33 +58,9 @@ function parseResult(result) {
39
58
  return { task: null, subtasks: [] };
40
59
  }
41
60
  }
42
- function statusToIcon(status) {
43
- switch (status) {
44
- case "open":
45
- return "pending";
46
- case "in-progress":
47
- return "running";
48
- case "done":
49
- return "completed";
50
- case "cancelled":
51
- return "failed";
52
- default:
53
- return "pending";
54
- }
55
- }
56
61
  function statusLabel(status) {
57
- switch (status) {
58
- case "open":
59
- return "Open";
60
- case "in-progress":
61
- return "Running";
62
- case "done":
63
- return "Done";
64
- case "cancelled":
65
- return "Cancelled";
66
- default:
67
- return status;
68
- }
62
+ if (status === "in-progress") return "Running";
63
+ return TASK_STATUS_LABEL[status] ?? status;
69
64
  }
70
65
  function isTerminal(status) {
71
66
  return status === "done" || status === "cancelled";
@@ -141,7 +136,7 @@ function ChatTaskResult(props) {
141
136
  backgroundColor: "var(--color-surface-low)"
142
137
  },
143
138
  children: [
144
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_plugin_ui_kit.StatusIcon, { status: statusToIcon(task.status), size: "sm" }),
139
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_plugin_ui_kit.StatusIcon, { status: TASK_STATUS_ICON[task.status] || "pending", icon: TASK_STATUS_ICON_OVERRIDE[task.status], size: "sm" }),
145
140
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
146
141
  import_plugin_ui_kit.Flex,
147
142
  {
@@ -220,6 +220,27 @@ function buildConversation(events) {
220
220
  });
221
221
  lastType = "bot-failed";
222
222
  break;
223
+ // ── Session/bridge warnings (from CliSession markDead, active turn kill) ──
224
+ case "session-warning":
225
+ flushThinking(false);
226
+ flushText(false);
227
+ blocks.push({
228
+ kind: "warning",
229
+ label: d.label ?? "Session warning",
230
+ detail: d.detail ?? d.stderr ?? void 0
231
+ });
232
+ lastType = "session-warning";
233
+ break;
234
+ case "audit:bridge-tool-filtered":
235
+ if (d.textToolCallDetected > 0) {
236
+ blocks.push({
237
+ kind: "warning",
238
+ label: `MCP tools not connected \u2014 ${d.textToolCallDetected} tool calls output as text`,
239
+ detail: "The CLI session does not have MCP tools registered. Tool calls were output as text instead of structured tool_use."
240
+ });
241
+ }
242
+ lastType = "audit:bridge-tool-filtered";
243
+ break;
223
244
  // ── Swarm/workflow-level events (emitted by runner + swarm-controller) ──
224
245
  case "task-claimed":
225
246
  blocks.push({
@@ -361,6 +382,8 @@ function useConversationTypewriter(blocks) {
361
382
  }
362
383
  case "status":
363
384
  return (block.detail ?? "").length;
385
+ case "warning":
386
+ return (block.detail ?? "").length;
364
387
  default:
365
388
  return 0;
366
389
  }
@@ -674,6 +697,19 @@ function InstanceStreamView({
674
697
  }
675
698
  );
676
699
  }
700
+ case "warning":
701
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
702
+ import_plugin_ui_kit.CollapsibleBlock,
703
+ {
704
+ status: "error",
705
+ label: block.label,
706
+ expanded: !!block.detail,
707
+ canExpand: !!block.detail,
708
+ onToggle: () => {
709
+ },
710
+ children: block.detail && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_plugin_ui_kit.Section, { padding: "compact", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_plugin_ui_kit.Typography, { variant: "body-regular", color: "color-danger-main", children: block.detail }) })
711
+ }
712
+ );
677
713
  default:
678
714
  return null;
679
715
  }