@arbidocs/blocks 0.4.74 → 0.4.76

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 (84) hide show
  1. package/README.md +2 -1
  2. package/dist/agents/index.cjs +267 -254
  3. package/dist/agents/index.js +5 -4
  4. package/dist/agents/tasks/TaskActivityTimeline.d.ts +1 -1
  5. package/dist/agents/tasks/WorkflowThreadStrip.d.ts +38 -1
  6. package/dist/agents/tasks/index.d.ts +2 -1
  7. package/dist/agents/tasks/linkedRuns.d.ts +31 -0
  8. package/dist/agents/workflows/index.d.ts +1 -1
  9. package/dist/agents/workflows/planSteps.d.ts +3 -1
  10. package/dist/agents/workflows/types.d.ts +27 -0
  11. package/dist/{chunk-YWYVIQ7T.js → chunk-22P5KNIM.js} +24 -4
  12. package/dist/chunk-22P5KNIM.js.map +1 -0
  13. package/dist/{chunk-5LP54CWR.cjs → chunk-7FKARMA3.cjs} +175 -69
  14. package/dist/chunk-7FKARMA3.cjs.map +1 -0
  15. package/dist/{chunk-IA7RTPT3.cjs → chunk-IXALYQT7.cjs} +2 -200
  16. package/dist/chunk-IXALYQT7.cjs.map +1 -0
  17. package/dist/chunk-NUNKSZKU.js +203 -0
  18. package/dist/chunk-NUNKSZKU.js.map +1 -0
  19. package/dist/{chunk-6OL5S7MJ.cjs → chunk-NYBIKDWI.cjs} +5 -2
  20. package/dist/chunk-NYBIKDWI.cjs.map +1 -0
  21. package/dist/{chunk-D46ZAPEE.js → chunk-R3PDNQYT.js} +5 -2
  22. package/dist/chunk-R3PDNQYT.js.map +1 -0
  23. package/dist/{chunk-KOSGX3UK.js → chunk-TKB7TVMW.js} +134 -30
  24. package/dist/chunk-TKB7TVMW.js.map +1 -0
  25. package/dist/chunk-V4ISCZJ7.cjs +207 -0
  26. package/dist/chunk-V4ISCZJ7.cjs.map +1 -0
  27. package/dist/{chunk-P2RBE3FD.cjs → chunk-VYRKO3XU.cjs} +24 -3
  28. package/dist/chunk-VYRKO3XU.cjs.map +1 -0
  29. package/dist/{chunk-BUHKUKKB.js → chunk-ZPLG7QYF.js} +4 -199
  30. package/dist/chunk-ZPLG7QYF.js.map +1 -0
  31. package/dist/connect/index.cjs +9 -9
  32. package/dist/connect/index.js +2 -2
  33. package/dist/databases/DatabaseColumnDialog.d.ts +43 -0
  34. package/dist/databases/DatabaseList.d.ts +28 -0
  35. package/dist/databases/DatabaseTable.d.ts +38 -0
  36. package/dist/databases/DatabaseToolbar.d.ts +38 -0
  37. package/dist/databases/NewDatabaseDialog.d.ts +25 -0
  38. package/dist/databases/SelectCellEditor.d.ts +6 -0
  39. package/dist/databases/SelectChip.d.ts +4 -0
  40. package/dist/databases/column-types.d.ts +58 -0
  41. package/dist/databases/databaseColumns.d.ts +28 -0
  42. package/dist/databases/index.cjs +1081 -0
  43. package/dist/databases/index.cjs.map +1 -0
  44. package/dist/databases/index.d.ts +13 -0
  45. package/dist/databases/index.js +1055 -0
  46. package/dist/databases/index.js.map +1 -0
  47. package/dist/facts/index.cjs +8 -7
  48. package/dist/facts/index.cjs.map +1 -1
  49. package/dist/facts/index.js +4 -3
  50. package/dist/facts/index.js.map +1 -1
  51. package/dist/files/index.cjs +15 -14
  52. package/dist/files/index.cjs.map +1 -1
  53. package/dist/files/index.js +5 -3
  54. package/dist/files/index.js.map +1 -1
  55. package/dist/home/index.cjs +1 -1
  56. package/dist/home/index.js +1 -1
  57. package/dist/index.cjs +508 -495
  58. package/dist/index.cjs.map +1 -1
  59. package/dist/index.js +9 -8
  60. package/dist/index.js.map +1 -1
  61. package/dist/shell/ActionCluster.d.ts +3 -1
  62. package/dist/shell/index.cjs +46 -46
  63. package/dist/shell/index.js +2 -2
  64. package/dist/studio/index.cjs +1 -1
  65. package/dist/studio/index.js +1 -1
  66. package/dist/workflow-canvas/SignalsEditor.d.ts +41 -0
  67. package/dist/workflow-canvas/StepInspector.d.ts +4 -1
  68. package/dist/workflow-canvas/TriggerInspector.d.ts +11 -2
  69. package/dist/workflow-canvas/WorkflowBuilder.d.ts +7 -2
  70. package/dist/workflow-canvas/index.cjs +445 -150
  71. package/dist/workflow-canvas/index.cjs.map +1 -1
  72. package/dist/workflow-canvas/index.d.ts +2 -1
  73. package/dist/workflow-canvas/index.js +412 -124
  74. package/dist/workflow-canvas/index.js.map +1 -1
  75. package/dist/workflow-canvas/trigger.d.ts +20 -1
  76. package/package.json +9 -4
  77. package/dist/chunk-5LP54CWR.cjs.map +0 -1
  78. package/dist/chunk-6OL5S7MJ.cjs.map +0 -1
  79. package/dist/chunk-BUHKUKKB.js.map +0 -1
  80. package/dist/chunk-D46ZAPEE.js.map +0 -1
  81. package/dist/chunk-IA7RTPT3.cjs.map +0 -1
  82. package/dist/chunk-KOSGX3UK.js.map +0 -1
  83. package/dist/chunk-P2RBE3FD.cjs.map +0 -1
  84. package/dist/chunk-YWYVIQ7T.js.map +0 -1
@@ -1,26 +1,27 @@
1
1
  "use client";
2
2
  import { DocumentPicker, TriStateFilterMenu, MultiSelect } from './chunk-CKB64Z4R.js';
3
3
  import { EmptyState } from './chunk-P6GHJSLR.js';
4
- import { defaultInputs, validateInputs, SchemaForm, isWorkflowScope, fieldToFrontmatter, workflowFromFrontmatter, workflowSteps, initialRunInputs, stepPhase, composeStepPrompt, useWorkflowView, composeWorkflowPrompt, isRunFinished, buildLaunch } from './chunk-YWYVIQ7T.js';
4
+ import { defaultInputs, validateInputs, SchemaForm, isWorkflowScope, fieldToFrontmatter, workflowFromFrontmatter, workflowSteps, initialRunInputs, stepPhase, composeStepPrompt, useWorkflowView, composeWorkflowPrompt, isRunFinished, buildLaunch } from './chunk-22P5KNIM.js';
5
5
  import { TabHeader } from './chunk-4WWM3GQ5.js';
6
6
  import { CellHoverIcon } from './chunk-RFXJYIDV.js';
7
7
  import { ToneBadge } from './chunk-DPLRHEJZ.js';
8
- import { GridView, SelectionBar, SelectionBarAction } from './chunk-BUHKUKKB.js';
8
+ import { SelectionBar, SelectionBarAction } from './chunk-NUNKSZKU.js';
9
9
  import { FilterInput } from './chunk-YU2KUMGE.js';
10
+ import { GridView } from './chunk-ZPLG7QYF.js';
10
11
  import { QuickActionDialogHeader, AddFilesFirst, ScopePicker, StartTiles } from './chunk-DDF5GPIJ.js';
11
12
  import { FoldSection } from './chunk-XD2M6LIG.js';
12
13
  import { ActionLink } from './chunk-S7PSMMRG.js';
14
+ import { useBlocksEnvironment } from './chunk-76JDDMSP.js';
13
15
  import { useMentionAutocomplete } from './chunk-HOXKR26S.js';
14
16
  import { toMessageMentions, extractMentions, MentionMenu } from './chunk-AA3PT6KR.js';
15
17
  import { useIsPhone } from './chunk-SLSBJRWW.js';
16
- import { useBlocksEnvironment } from './chunk-76JDDMSP.js';
17
18
  import { formatCount, initials } from './chunk-OXF2IFXG.js';
18
19
  import { ModalHeader } from './chunk-TX2ZICS7.js';
19
20
  import { testIdOr, prefixedTestId } from './chunk-7F6CBP3Z.js';
20
21
  import { memo, forwardRef, useState, useMemo, useId, useEffect, useRef, useCallback, useLayoutEffect } from 'react';
21
22
  import { cn, Label, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Textarea, Input, Switch, Button, Collapsible, CollapsibleTrigger, CollapsibleContent, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Tooltip, TooltipTrigger, TooltipContent, Badge, Slider, UserEntity, getEntityColorStyles, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, VisibilityToggle, EntityPill, ThreadVisibilityIcon, DialogClose, Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandItem, DropdownMenuSeparator, badgeVariants, Checkbox } from '@arbidocs/react/ui';
22
23
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
23
- import { ChevronDown, ChevronRight, Plus, Trash2, Loader2, Play, MessageSquare, Eye, ClipboardList, Pencil, Copy, Bot, Sparkles, Wand2, X, Globe, Download, Lock, ListChecks, AlertTriangle, FileX, SkipForward, Check, FileText, CornerDownRight, AlertCircle, KeyRound, Workflow, ChevronsUpDown, ChevronsDownUp, ListTodo, CheckCheck, MoreHorizontal, CalendarClock, History, ChevronUp, Pause, Activity, Hourglass, MoreVertical, TriangleAlert, CheckSquare, Square, CheckCircle2, SquareArrowOutUpRight, ArrowLeft, LayoutGrid, List, CircleDashed, RotateCcw, ListPlus, Link2, Clock, Bell, MousePointerClick, UserRoundCog, MessageSquareReply, MinusCircle, Zap } from 'lucide-react';
24
+ import { ChevronDown, ChevronRight, Plus, Trash2, Loader2, Play, MessageSquare, Eye, ClipboardList, Pencil, Copy, Bot, Sparkles, Wand2, X, Globe, Download, Lock, ListChecks, AlertTriangle, FileX, SkipForward, Check, FileText, CornerDownRight, AlertCircle, KeyRound, Workflow, ChevronsUpDown, ChevronsDownUp, ListTodo, CheckCheck, MoreHorizontal, CalendarClock, History, ChevronUp, Pause, Activity, Hourglass, MoreVertical, TriangleAlert, CheckSquare, Square, CheckCircle2, SquareArrowOutUpRight, ArrowLeft, LayoutGrid, List, CornerLeftUp, CircleDashed, RotateCcw, ListPlus, Link2, Clock, Bell, MousePointerClick, ArrowUpRight, Flag, UserRoundCog, MessageSquareReply, MinusCircle, Zap } from 'lucide-react';
24
25
 
25
26
  function useControllableState(value, defaultValue, onChange) {
26
27
  const [inner, setInner] = useState(defaultValue);
@@ -503,7 +504,7 @@ function WorkflowDocumentsField({
503
504
 
504
505
  // src/agents/workflows/skillMarkdown.ts
505
506
  var JSON_KEYS = /* @__PURE__ */ new Set(["inputs"]);
506
- var oneLine = (text) => text.replace(/\s*\n\s*/g, " ").trim();
507
+ var oneLine = (text2) => text2.replace(/\s*\n\s*/g, " ").trim();
507
508
  var skillSlug = (raw) => raw.toLowerCase().replace(/[^a-z0-9-]/g, "");
508
509
  function workflowToSkillMarkdown(workflow) {
509
510
  const { run } = workflow;
@@ -522,10 +523,10 @@ function workflowToSkillMarkdown(workflow) {
522
523
  lines.push("---", "", run.promptTemplate.trim(), "");
523
524
  return lines.join("\n");
524
525
  }
525
- function workflowFromSkillMarkdown(id, text) {
526
- const match = /^---\n([\s\S]*?)\n---\n?([\s\S]*)$/.exec(text);
526
+ function workflowFromSkillMarkdown(id, text2) {
527
+ const match = /^---\n([\s\S]*?)\n---\n?([\s\S]*)$/.exec(text2);
527
528
  const frontmatter = {};
528
- const body = match ? match[2] : text;
529
+ const body = match ? match[2] : text2;
529
530
  for (const line of (match ? match[1] : "").split("\n")) {
530
531
  const i = line.indexOf(":");
531
532
  if (i < 1) continue;
@@ -2027,7 +2028,7 @@ function TaskPlan({
2027
2028
  );
2028
2029
  }
2029
2030
  const patch = (fields) => onChange({ ...plan, ...fields });
2030
- const setCriterion = (idx, text) => patch({ criteria: plan.criteria.map((c, i) => i === idx ? { ...c, text } : c) });
2031
+ const setCriterion = (idx, text2) => patch({ criteria: plan.criteria.map((c, i) => i === idx ? { ...c, text: text2 } : c) });
2031
2032
  const addCriterion = () => patch({ criteria: [...plan.criteria, { id: nextCriterionId(plan.criteria), text: "" }] });
2032
2033
  const removeCriterion = (idx) => patch({ criteria: plan.criteria.filter((_, i) => i !== idx) });
2033
2034
  const count = plan.criteria.length;
@@ -2973,10 +2974,10 @@ function TaskStatusPill({
2973
2974
  const generating = key === "generating";
2974
2975
  const now = useNow(generating && Boolean(runStartedAt));
2975
2976
  const started = runStartedAt ? Date.parse(runStartedAt) : NaN;
2976
- let text = STATUS_LABELS[key];
2977
+ let text2 = STATUS_LABELS[key];
2977
2978
  let tone = STATUS_TONE[key];
2978
2979
  if (awaitingAccess) {
2979
- text = l.waitingForAccess;
2980
+ text2 = l.waitingForAccess;
2980
2981
  tone = "danger";
2981
2982
  }
2982
2983
  const elapsed = generating && !Number.isNaN(started) ? formatElapsed(started, now) : null;
@@ -2989,7 +2990,7 @@ function TaskStatusPill({
2989
2990
  "data-status": key,
2990
2991
  "data-testid": testIdOr(testId, { testId: `task-status-${id}` }),
2991
2992
  children: [
2992
- text,
2993
+ text2,
2993
2994
  elapsed && /* @__PURE__ */ jsxs("span", { className: "tabular-nums opacity-70", children: [
2994
2995
  "\xB7 ",
2995
2996
  elapsed
@@ -3395,8 +3396,8 @@ function TaskTable(props) {
3395
3396
  const map = new Map(STATUS_ORDER.map((s) => [s, 0]));
3396
3397
  let all = 0;
3397
3398
  for (const task of tasks) {
3398
- const text = `${nameOf(task)} ${task.description ?? ""}`.toLowerCase();
3399
- if (q && !text.includes(q)) continue;
3399
+ const text2 = `${nameOf(task)} ${task.description ?? ""}`.toLowerCase();
3400
+ if (q && !text2.includes(q)) continue;
3400
3401
  all += 1;
3401
3402
  const s = asTaskStatus(task.status);
3402
3403
  map.set(s, (map.get(s) ?? 0) + 1);
@@ -4941,8 +4942,8 @@ function isoToLocalInput(iso) {
4941
4942
  return new Date(d.getTime() - d.getTimezoneOffset() * 6e4).toISOString().slice(0, 16);
4942
4943
  }
4943
4944
  var DERIVED_NAME_WORDS = 6;
4944
- function firstWords(text, count = DERIVED_NAME_WORDS) {
4945
- const words = text.trim().split(/\s+/).filter(Boolean);
4945
+ function firstWords(text2, count = DERIVED_NAME_WORDS) {
4946
+ const words = text2.trim().split(/\s+/).filter(Boolean);
4946
4947
  if (words.length <= count) return words.join(" ");
4947
4948
  return `${words.slice(0, count).join(" ")}\u2026`;
4948
4949
  }
@@ -5536,7 +5537,7 @@ function TaskTriggerChip({
5536
5537
  }) {
5537
5538
  const l = { ...DEFAULT_TASK_TRIGGER_CHIP_LABELS, ...labels };
5538
5539
  const chained = Boolean(afterTaskId);
5539
- const text = chained ? afterTaskName ? l.after(afterTaskName) : l.afterUnknown : triggerType === "on_demand" ? l.onDemand : summary;
5540
+ const text2 = chained ? afterTaskName ? l.after(afterTaskName) : l.afterUnknown : triggerType === "on_demand" ? l.onDemand : summary;
5540
5541
  return /* @__PURE__ */ jsxs(
5541
5542
  "span",
5542
5543
  {
@@ -5545,7 +5546,7 @@ function TaskTriggerChip({
5545
5546
  "data-trigger": chained ? "task" : triggerType,
5546
5547
  children: [
5547
5548
  /* @__PURE__ */ jsx(TriggerIcon, { type: triggerType, chained }),
5548
- /* @__PURE__ */ jsx("span", { className: "truncate", children: text })
5549
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: text2 })
5549
5550
  ]
5550
5551
  }
5551
5552
  );
@@ -5778,9 +5779,9 @@ function WorkflowsTable(props) {
5778
5779
  renderName: (w) => {
5779
5780
  const { l: lb } = latest.current;
5780
5781
  const skill = isSkillRow(w);
5781
- const text = skill ? latest.current.actionText(w) : w.description || latest.current.actionText(w);
5782
+ const text2 = skill ? latest.current.actionText(w) : w.description || latest.current.actionText(w);
5782
5783
  const stem = w.name.replace(/…$/, "").trim();
5783
- const about = text && text.trim() !== w.name.trim() && text.trim() !== stem ? text : "";
5784
+ const about = text2 && text2.trim() !== w.name.trim() && text2.trim() !== stem ? text2 : "";
5784
5785
  return /* @__PURE__ */ jsxs("div", { className: "min-w-0 leading-tight", children: [
5785
5786
  /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
5786
5787
  /* @__PURE__ */ jsx(
@@ -6209,7 +6210,9 @@ var ICONS = {
6209
6210
  step_started: /* @__PURE__ */ jsx(Play, { className: "size-3.5", "aria-hidden": true }),
6210
6211
  step_done: /* @__PURE__ */ jsx(CheckCircle2, { className: "size-3.5", "aria-hidden": true }),
6211
6212
  step_skipped: /* @__PURE__ */ jsx(RotateCcw, { className: "size-3.5", "aria-hidden": true }),
6212
- step_failed: /* @__PURE__ */ jsx(AlertTriangle, { className: "size-3.5", "aria-hidden": true })
6213
+ step_failed: /* @__PURE__ */ jsx(AlertTriangle, { className: "size-3.5", "aria-hidden": true }),
6214
+ step_signal: /* @__PURE__ */ jsx(Flag, { className: "size-3.5", "aria-hidden": true }),
6215
+ linked_run: /* @__PURE__ */ jsx(ArrowUpRight, { className: "size-3.5", "aria-hidden": true })
6213
6216
  };
6214
6217
  var asString = (v) => typeof v === "string" && v.trim() ? v : null;
6215
6218
  function summarizeError(error) {
@@ -6254,6 +6257,12 @@ function TaskActivityTimeline({
6254
6257
  return { headline: "Step done" };
6255
6258
  case "step_skipped":
6256
6259
  return { headline: "Step skipped" };
6260
+ case "step_signal":
6261
+ return { headline: `Signalled \u201C${asString(detail.signal) ?? "a signal"}\u201D` };
6262
+ case "linked_run":
6263
+ return {
6264
+ headline: `Started a linked workflow on \u201C${asString(detail.signal) ?? "a signal"}\u201D`
6265
+ };
6257
6266
  case "step_failed":
6258
6267
  return {
6259
6268
  headline: "Step failed",
@@ -6484,8 +6493,64 @@ function groupThreadActivity(steps, items) {
6484
6493
  var DEFAULT_WORKFLOW_THREAD_STRIP_LABELS = {
6485
6494
  happened: "{count} in this step",
6486
6495
  nothingYet: "Nothing here yet.",
6487
- skip: "Skip this step"
6496
+ skip: "Skip this step",
6497
+ startedBy: "Started by {step} in {thread}",
6498
+ signalled: "This step signalled \u201C{signal}\u201D",
6499
+ linkedRun: "Started on \u201C{signal}\u201D: open its thread"
6488
6500
  };
6501
+ function WorkflowThreadStartedBy({
6502
+ origin,
6503
+ labels
6504
+ }) {
6505
+ const l = { ...DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, ...labels };
6506
+ const text2 = l.startedBy.replace("{step}", origin.stepTitle).replace("{thread}", origin.threadTitle);
6507
+ const className = "flex max-w-64 shrink-0 items-center gap-1 truncate rounded-full border border-border px-2 py-0.5 text-[11px] text-muted-foreground";
6508
+ const content = /* @__PURE__ */ jsxs(Fragment, { children: [
6509
+ /* @__PURE__ */ jsx(CornerLeftUp, { className: "size-3 shrink-0" }),
6510
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: text2 })
6511
+ ] });
6512
+ return origin.onSelect ? /* @__PURE__ */ jsx(
6513
+ "button",
6514
+ {
6515
+ type: "button",
6516
+ onClick: origin.onSelect,
6517
+ title: origin.signal ? `${text2} (${origin.signal})` : text2,
6518
+ className: cn(className, "hover:border-primary/40 hover:text-primary"),
6519
+ "data-testid": "workflow-thread-started-by",
6520
+ children: content
6521
+ }
6522
+ ) : /* @__PURE__ */ jsx("span", { className, title: text2, "data-testid": "workflow-thread-started-by", children: content });
6523
+ }
6524
+ function SignalPill({ signal, l }) {
6525
+ return /* @__PURE__ */ jsxs(
6526
+ "span",
6527
+ {
6528
+ className: "flex shrink-0 items-center gap-1 rounded-full border border-amber-500/40 bg-amber-500/10 px-1.5 py-0.5 text-[11px] text-amber-700 dark:text-amber-300",
6529
+ title: l.signalled.replace("{signal}", signal.signal),
6530
+ "data-testid": `workflow-thread-signal-${signal.step}-${signal.signal}`,
6531
+ children: [
6532
+ /* @__PURE__ */ jsx(Flag, { className: "size-3 shrink-0" }),
6533
+ /* @__PURE__ */ jsx("span", { className: "font-mono", children: signal.signal }),
6534
+ signal.runs.map((run) => /* @__PURE__ */ jsxs(
6535
+ "button",
6536
+ {
6537
+ type: "button",
6538
+ onClick: run.onSelect,
6539
+ disabled: !run.onSelect,
6540
+ title: l.linkedRun.replace("{signal}", signal.signal),
6541
+ className: "flex max-w-40 items-center gap-0.5 truncate rounded-full bg-background/80 px-1.5 text-foreground hover:text-primary disabled:cursor-default",
6542
+ "data-testid": `workflow-thread-linked-${run.id}`,
6543
+ children: [
6544
+ /* @__PURE__ */ jsx(ArrowUpRight, { className: "size-3 shrink-0" }),
6545
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: run.label })
6546
+ ]
6547
+ },
6548
+ run.id
6549
+ ))
6550
+ ]
6551
+ }
6552
+ );
6553
+ }
6489
6554
  function Mark({ phase, icon }) {
6490
6555
  if (phase === "done") return /* @__PURE__ */ jsx(Check, { className: "size-3.5" });
6491
6556
  if (phase === "running") return /* @__PURE__ */ jsx(Loader2, { className: "size-3.5 animate-spin" });
@@ -6526,11 +6591,14 @@ function WorkflowThreadStrip({
6526
6591
  renderIcon,
6527
6592
  onSkip,
6528
6593
  renderStepAction,
6594
+ signals = [],
6595
+ startedBy,
6529
6596
  labels,
6530
6597
  className
6531
6598
  }) {
6532
6599
  const l = { ...DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, ...labels };
6533
6600
  const grouped = groupThreadActivity(steps, items);
6601
+ const strays = signals.filter((s) => !steps.some((step) => step.id === s.step));
6534
6602
  const chevron = /* @__PURE__ */ jsx(ChevronRight, { className: "size-3 shrink-0 text-muted-foreground" });
6535
6603
  return /* @__PURE__ */ jsx(
6536
6604
  "div",
@@ -6540,6 +6608,10 @@ function WorkflowThreadStrip({
6540
6608
  "aria-label": "Workflow steps",
6541
6609
  "data-testid": "workflow-thread-strip",
6542
6610
  children: /* @__PURE__ */ jsxs("ol", { className: "flex w-max min-w-full items-center gap-1", children: [
6611
+ startedBy && /* @__PURE__ */ jsxs("li", { className: "flex shrink-0 items-center gap-1", children: [
6612
+ /* @__PURE__ */ jsx(WorkflowThreadStartedBy, { origin: startedBy, labels }),
6613
+ chevron
6614
+ ] }),
6543
6615
  grouped.before.map((item) => /* @__PURE__ */ jsxs("li", { className: "flex shrink-0 items-center gap-1", children: [
6544
6616
  /* @__PURE__ */ jsx(Entry, { item }),
6545
6617
  chevron
@@ -6596,18 +6668,50 @@ function WorkflowThreadStrip({
6596
6668
  }
6597
6669
  )
6598
6670
  ] }),
6599
- (i < steps.length - 1 || grouped.after.length > 0) && chevron
6671
+ signals.filter((s) => s.step === step.id).map((s) => /* @__PURE__ */ jsx(SignalPill, { signal: s, l }, `${s.step}-${s.signal}`)),
6672
+ (i < steps.length - 1 || grouped.after.length > 0 || strays.length > 0) && chevron
6600
6673
  ] }, step.id);
6601
6674
  }),
6602
6675
  grouped.after.map((item, i) => /* @__PURE__ */ jsxs("li", { className: "flex shrink-0 items-center gap-1", children: [
6603
6676
  /* @__PURE__ */ jsx(Entry, { item }),
6604
- i < grouped.after.length - 1 && chevron
6605
- ] }, item.id))
6677
+ (i < grouped.after.length - 1 || strays.length > 0) && chevron
6678
+ ] }, item.id)),
6679
+ strays.map((s) => /* @__PURE__ */ jsx("li", { className: "flex shrink-0 items-center gap-1", children: /* @__PURE__ */ jsx(SignalPill, { signal: s, l }) }, `${s.step}-${s.signal}`))
6606
6680
  ] })
6607
6681
  }
6608
6682
  );
6609
6683
  }
6610
6684
 
6685
+ // src/agents/tasks/linkedRuns.ts
6686
+ var text = (v) => typeof v === "string" && v ? v : void 0;
6687
+ function linkedRunsFromActivity(events) {
6688
+ const raised = [];
6689
+ let startedBy;
6690
+ const entry = (step, signal) => {
6691
+ let found = raised.find((r) => r.step === step && r.signal === signal);
6692
+ if (!found) raised.push(found = { step, signal, runs: [] });
6693
+ return found;
6694
+ };
6695
+ for (const e of events ?? []) {
6696
+ const d = e.detail ?? {};
6697
+ const step = text(d.step);
6698
+ const signal = text(d.signal);
6699
+ if (e.kind === "step_signal" && step && signal) entry(step, signal);
6700
+ else if (e.kind === "linked_run" && step && signal) {
6701
+ const conversationId = text(d.conversation_ext_id);
6702
+ const runs = entry(step, signal).runs;
6703
+ if (conversationId && !runs.some((r) => r.conversationId === conversationId))
6704
+ runs.push({ conversationId, workflowId: text(d.workflow_ext_id) });
6705
+ } else if (e.kind === "created" && d.linked_from && typeof d.linked_from === "object") {
6706
+ const from = d.linked_from;
6707
+ const conversationId = text(from.conversation_ext_id);
6708
+ if (conversationId)
6709
+ startedBy = { conversationId, step: text(from.step), signal: text(from.signal) };
6710
+ }
6711
+ }
6712
+ return startedBy ? { raised, startedBy } : { raised };
6713
+ }
6714
+
6611
6715
  // src/agents/tasks/compact-thread-activity.ts
6612
6716
  var STEP_LABELS = {
6613
6717
  step_started: "Step started",
@@ -9018,7 +9122,7 @@ function AgentBarNotes({
9018
9122
  return /* @__PURE__ */ jsx("div", { className: cn("mx-3 mb-2 space-y-1.5", className), children });
9019
9123
  }
9020
9124
  function AgentBarQueuedNote({
9021
- text,
9125
+ text: text2,
9022
9126
  isAcknowledged,
9023
9127
  labels,
9024
9128
  testId = "agent-queued-message"
@@ -9040,7 +9144,7 @@ function AgentBarQueuedNote({
9040
9144
  children: l.queuedMessage
9041
9145
  }
9042
9146
  ),
9043
- /* @__PURE__ */ jsx("p", { className: "line-clamp-2 whitespace-pre-line text-sm text-foreground", title: text, children: text })
9147
+ /* @__PURE__ */ jsx("p", { className: "line-clamp-2 whitespace-pre-line text-sm text-foreground", title: text2, children: text2 })
9044
9148
  ] })
9045
9149
  ]
9046
9150
  }
@@ -9901,6 +10005,6 @@ function AgentCreateView({
9901
10005
  ] });
9902
10006
  }
9903
10007
 
9904
- export { AgentAvatarField, AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentCreateView, AgentCreatedView, AgentCreator, AgentEditView, AgentGallery, AgentMainView, AgentSelect, AgentTypeSelector, CapabilityGrid, CapabilityTile, ConfigField, ConfigForm, ConsentActions, ConsentBulletList, ConsentCard, ConsentFootnote, ConsentHeader, ConsentMessage, ConsentNotice, ConsentPage, ConsentPermissionList, ConsentSection, ConsentStrong, ConsentText, ConversationListView, ConversationTurnSpeaker, CopyableUrl, DEFAULT_AGENT_AVATAR_FIELD_LABELS, DEFAULT_AGENT_BAR_LABELS, DEFAULT_AGENT_CARD_LABELS, DEFAULT_AGENT_CREATOR_LABELS, DEFAULT_AGENT_GALLERY_LABELS, DEFAULT_AGENT_SELECT_LABELS, DEFAULT_AGENT_STEPS_LABELS, DEFAULT_AGENT_TYPE_SELECTOR_LABELS, DEFAULT_AUTHORIZE_AGENT_LABELS, DEFAULT_CONFIG_FIELD_LABELS, DEFAULT_CONFIG_FORM_LABELS, DEFAULT_CONSENT_ACTIONS_LABELS, DEFAULT_COPYABLE_URL_LABELS, DEFAULT_NEW_THREAD_DIALOG_LABELS, DEFAULT_PILL_SELECT_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SKILL_CARD_LABELS, DEFAULT_SKILL_EDIT_FORM_LABELS, DEFAULT_SKILL_GENERATE_FORM_LABELS, DEFAULT_SKILL_GLOBAL_BADGE_LABELS, DEFAULT_SKILL_ROW_LABELS, DEFAULT_SKILL_VIEW_TOGGLE_LABELS, DEFAULT_SUBAGENT_ROSTER_LABELS, DEFAULT_TASKS_CHROME_LABELS, DEFAULT_TASK_ACTIVITY_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_LIST_LABELS, DEFAULT_TASK_OUTPUTS_CELL_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_RUNS_DIALOG_LABELS, DEFAULT_TASK_STATUS_PILL_LABELS, DEFAULT_TASK_THREAD_CHIP_LABELS, DEFAULT_TASK_TRIGGER_CHIP_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOWS_CHROME_LABELS, DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, DEFAULT_WORKFLOW_LIST_LABELS, DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, EntityChip, GoalCriteria, MAX_TASK_DEPTH, NewThreadDialog, PersonPill, PillSelect, RecurrenceBuilder, STATUS_LABELS, STATUS_ORDER, STATUS_TONE, SkillActionButton, SkillCard, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillGlobalBadge, SkillRow, SkillTile, SkillTypeBadge, SkillViewToggle, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TASK_COLUMN_ORDER, TRIGGER_LABELS, TaskActivityDialog, TaskActivityTimeline, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TaskTriggerChip, TasksToolbar, ThreadActivity, ThreadNotifyDialog, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WORKFLOW_COLUMN_ORDER, WorkflowConfigDialog, WorkflowDocumentsField, WorkflowLauncher, WorkflowThreadStrip, WorkflowsTable, WorkflowsToolbar, agentConfigSectionToValues, agentCreatorToConfigSection, asTaskStatus, authModeFor, buildRRule, buildTaskRows, buildWorkflowScopeSource, compactThreadActivity, composePersona, composerToTaskQuery, composerToWorkRequest, composerToWorkflowRequest, composerToWorkflowUpdate, createTaskColumns, createWorkflowColumns, createsWork, defaultScopeRenderer, defaultTaskComposerValues, deriveAgentName, deriveWorkflowName, descendantIds, describeRRule, filterConversationRows, firstWords, formatElapsed, goalProgress, groupThreadActivity, hasTaskFields, hasTrigger, humanizeSection, indexTasks, inferType, inputDocumentIds, isAgenticWorkflow, isOutOfBounds, isPlainTodo, isSkillRow, isValidAgentName, isoToLocalInput, localInputToIso, matchWorkflowScope, moveTargets, newThreadToRequest, nextCriterionId, ownerExtId, parseRRule, prettifyKey, resolveScopeInputs, skillSlug, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowFromSkillMarkdown, workflowStatus, workflowTaskFields, workflowToComposerValues, workflowToSkillMarkdown, workflowTriggerType, workflowWhen };
9905
- //# sourceMappingURL=chunk-KOSGX3UK.js.map
9906
- //# sourceMappingURL=chunk-KOSGX3UK.js.map
10008
+ export { AgentAvatarField, AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentCreateView, AgentCreatedView, AgentCreator, AgentEditView, AgentGallery, AgentMainView, AgentSelect, AgentTypeSelector, CapabilityGrid, CapabilityTile, ConfigField, ConfigForm, ConsentActions, ConsentBulletList, ConsentCard, ConsentFootnote, ConsentHeader, ConsentMessage, ConsentNotice, ConsentPage, ConsentPermissionList, ConsentSection, ConsentStrong, ConsentText, ConversationListView, ConversationTurnSpeaker, CopyableUrl, DEFAULT_AGENT_AVATAR_FIELD_LABELS, DEFAULT_AGENT_BAR_LABELS, DEFAULT_AGENT_CARD_LABELS, DEFAULT_AGENT_CREATOR_LABELS, DEFAULT_AGENT_GALLERY_LABELS, DEFAULT_AGENT_SELECT_LABELS, DEFAULT_AGENT_STEPS_LABELS, DEFAULT_AGENT_TYPE_SELECTOR_LABELS, DEFAULT_AUTHORIZE_AGENT_LABELS, DEFAULT_CONFIG_FIELD_LABELS, DEFAULT_CONFIG_FORM_LABELS, DEFAULT_CONSENT_ACTIONS_LABELS, DEFAULT_COPYABLE_URL_LABELS, DEFAULT_NEW_THREAD_DIALOG_LABELS, DEFAULT_PILL_SELECT_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SKILL_CARD_LABELS, DEFAULT_SKILL_EDIT_FORM_LABELS, DEFAULT_SKILL_GENERATE_FORM_LABELS, DEFAULT_SKILL_GLOBAL_BADGE_LABELS, DEFAULT_SKILL_ROW_LABELS, DEFAULT_SKILL_VIEW_TOGGLE_LABELS, DEFAULT_SUBAGENT_ROSTER_LABELS, DEFAULT_TASKS_CHROME_LABELS, DEFAULT_TASK_ACTIVITY_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_LIST_LABELS, DEFAULT_TASK_OUTPUTS_CELL_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_RUNS_DIALOG_LABELS, DEFAULT_TASK_STATUS_PILL_LABELS, DEFAULT_TASK_THREAD_CHIP_LABELS, DEFAULT_TASK_TRIGGER_CHIP_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOWS_CHROME_LABELS, DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, DEFAULT_WORKFLOW_LIST_LABELS, DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, EntityChip, GoalCriteria, MAX_TASK_DEPTH, NewThreadDialog, PersonPill, PillSelect, RecurrenceBuilder, STATUS_LABELS, STATUS_ORDER, STATUS_TONE, SkillActionButton, SkillCard, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillGlobalBadge, SkillRow, SkillTile, SkillTypeBadge, SkillViewToggle, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TASK_COLUMN_ORDER, TRIGGER_LABELS, TaskActivityDialog, TaskActivityTimeline, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TaskTriggerChip, TasksToolbar, ThreadActivity, ThreadNotifyDialog, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WORKFLOW_COLUMN_ORDER, WorkflowConfigDialog, WorkflowDocumentsField, WorkflowLauncher, WorkflowThreadStartedBy, WorkflowThreadStrip, WorkflowsTable, WorkflowsToolbar, agentConfigSectionToValues, agentCreatorToConfigSection, asTaskStatus, authModeFor, buildRRule, buildTaskRows, buildWorkflowScopeSource, compactThreadActivity, composePersona, composerToTaskQuery, composerToWorkRequest, composerToWorkflowRequest, composerToWorkflowUpdate, createTaskColumns, createWorkflowColumns, createsWork, defaultScopeRenderer, defaultTaskComposerValues, deriveAgentName, deriveWorkflowName, descendantIds, describeRRule, filterConversationRows, firstWords, formatElapsed, goalProgress, groupThreadActivity, hasTaskFields, hasTrigger, humanizeSection, indexTasks, inferType, inputDocumentIds, isAgenticWorkflow, isOutOfBounds, isPlainTodo, isSkillRow, isValidAgentName, isoToLocalInput, linkedRunsFromActivity, localInputToIso, matchWorkflowScope, moveTargets, newThreadToRequest, nextCriterionId, ownerExtId, parseRRule, prettifyKey, resolveScopeInputs, skillSlug, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowFromSkillMarkdown, workflowStatus, workflowTaskFields, workflowToComposerValues, workflowToSkillMarkdown, workflowTriggerType, workflowWhen };
10009
+ //# sourceMappingURL=chunk-TKB7TVMW.js.map
10010
+ //# sourceMappingURL=chunk-TKB7TVMW.js.map