@arbidocs/blocks 0.4.75 → 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 (48) hide show
  1. package/dist/agents/index.cjs +265 -253
  2. package/dist/agents/index.js +3 -3
  3. package/dist/agents/tasks/TaskActivityTimeline.d.ts +1 -1
  4. package/dist/agents/tasks/WorkflowThreadStrip.d.ts +38 -1
  5. package/dist/agents/tasks/index.d.ts +2 -1
  6. package/dist/agents/tasks/linkedRuns.d.ts +31 -0
  7. package/dist/agents/workflows/index.d.ts +1 -1
  8. package/dist/agents/workflows/planSteps.d.ts +3 -1
  9. package/dist/agents/workflows/types.d.ts +27 -0
  10. package/dist/{chunk-YWYVIQ7T.js → chunk-22P5KNIM.js} +24 -4
  11. package/dist/chunk-22P5KNIM.js.map +1 -0
  12. package/dist/{chunk-F4LUD3YC.cjs → chunk-7FKARMA3.cjs} +158 -53
  13. package/dist/chunk-7FKARMA3.cjs.map +1 -0
  14. package/dist/{chunk-LT2UORRG.js → chunk-TKB7TVMW.js} +132 -29
  15. package/dist/chunk-TKB7TVMW.js.map +1 -0
  16. package/dist/{chunk-P2RBE3FD.cjs → chunk-VYRKO3XU.cjs} +24 -3
  17. package/dist/chunk-VYRKO3XU.cjs.map +1 -0
  18. package/dist/connect/index.cjs +10 -10
  19. package/dist/connect/index.js +3 -3
  20. package/dist/facts/index.cjs +1 -1
  21. package/dist/facts/index.js +1 -1
  22. package/dist/files/index.cjs +1 -1
  23. package/dist/files/index.js +1 -1
  24. package/dist/home/index.cjs +1 -1
  25. package/dist/home/index.js +1 -1
  26. package/dist/index.cjs +430 -418
  27. package/dist/index.js +7 -7
  28. package/dist/settings/index.cjs +1 -1
  29. package/dist/settings/index.js +1 -1
  30. package/dist/shell/index.cjs +1 -1
  31. package/dist/shell/index.js +1 -1
  32. package/dist/studio/index.cjs +1 -1
  33. package/dist/studio/index.js +1 -1
  34. package/dist/workflow-canvas/SignalsEditor.d.ts +41 -0
  35. package/dist/workflow-canvas/StepInspector.d.ts +4 -1
  36. package/dist/workflow-canvas/TriggerInspector.d.ts +11 -2
  37. package/dist/workflow-canvas/WorkflowBuilder.d.ts +7 -2
  38. package/dist/workflow-canvas/index.cjs +443 -149
  39. package/dist/workflow-canvas/index.cjs.map +1 -1
  40. package/dist/workflow-canvas/index.d.ts +2 -1
  41. package/dist/workflow-canvas/index.js +410 -123
  42. package/dist/workflow-canvas/index.js.map +1 -1
  43. package/dist/workflow-canvas/trigger.d.ts +20 -1
  44. package/package.json +4 -4
  45. package/dist/chunk-F4LUD3YC.cjs.map +0 -1
  46. package/dist/chunk-LT2UORRG.js.map +0 -1
  47. package/dist/chunk-P2RBE3FD.cjs.map +0 -1
  48. package/dist/chunk-YWYVIQ7T.js.map +0 -1
@@ -1,7 +1,7 @@
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';
@@ -11,17 +11,17 @@ import { GridView } from './chunk-ZPLG7QYF.js';
11
11
  import { QuickActionDialogHeader, AddFilesFirst, ScopePicker, StartTiles } from './chunk-DDF5GPIJ.js';
12
12
  import { FoldSection } from './chunk-XD2M6LIG.js';
13
13
  import { ActionLink } from './chunk-S7PSMMRG.js';
14
+ import { useBlocksEnvironment } from './chunk-76JDDMSP.js';
14
15
  import { useMentionAutocomplete } from './chunk-HOXKR26S.js';
15
16
  import { toMessageMentions, extractMentions, MentionMenu } from './chunk-AA3PT6KR.js';
16
17
  import { useIsPhone } from './chunk-SLSBJRWW.js';
17
- import { useBlocksEnvironment } from './chunk-76JDDMSP.js';
18
18
  import { formatCount, initials } from './chunk-OXF2IFXG.js';
19
19
  import { ModalHeader } from './chunk-TX2ZICS7.js';
20
20
  import { testIdOr, prefixedTestId } from './chunk-7F6CBP3Z.js';
21
21
  import { memo, forwardRef, useState, useMemo, useId, useEffect, useRef, useCallback, useLayoutEffect } from 'react';
22
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';
23
23
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
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, 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';
25
25
 
26
26
  function useControllableState(value, defaultValue, onChange) {
27
27
  const [inner, setInner] = useState(defaultValue);
@@ -504,7 +504,7 @@ function WorkflowDocumentsField({
504
504
 
505
505
  // src/agents/workflows/skillMarkdown.ts
506
506
  var JSON_KEYS = /* @__PURE__ */ new Set(["inputs"]);
507
- var oneLine = (text) => text.replace(/\s*\n\s*/g, " ").trim();
507
+ var oneLine = (text2) => text2.replace(/\s*\n\s*/g, " ").trim();
508
508
  var skillSlug = (raw) => raw.toLowerCase().replace(/[^a-z0-9-]/g, "");
509
509
  function workflowToSkillMarkdown(workflow) {
510
510
  const { run } = workflow;
@@ -523,10 +523,10 @@ function workflowToSkillMarkdown(workflow) {
523
523
  lines.push("---", "", run.promptTemplate.trim(), "");
524
524
  return lines.join("\n");
525
525
  }
526
- function workflowFromSkillMarkdown(id, text) {
527
- 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);
528
528
  const frontmatter = {};
529
- const body = match ? match[2] : text;
529
+ const body = match ? match[2] : text2;
530
530
  for (const line of (match ? match[1] : "").split("\n")) {
531
531
  const i = line.indexOf(":");
532
532
  if (i < 1) continue;
@@ -2028,7 +2028,7 @@ function TaskPlan({
2028
2028
  );
2029
2029
  }
2030
2030
  const patch = (fields) => onChange({ ...plan, ...fields });
2031
- 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) });
2032
2032
  const addCriterion = () => patch({ criteria: [...plan.criteria, { id: nextCriterionId(plan.criteria), text: "" }] });
2033
2033
  const removeCriterion = (idx) => patch({ criteria: plan.criteria.filter((_, i) => i !== idx) });
2034
2034
  const count = plan.criteria.length;
@@ -2974,10 +2974,10 @@ function TaskStatusPill({
2974
2974
  const generating = key === "generating";
2975
2975
  const now = useNow(generating && Boolean(runStartedAt));
2976
2976
  const started = runStartedAt ? Date.parse(runStartedAt) : NaN;
2977
- let text = STATUS_LABELS[key];
2977
+ let text2 = STATUS_LABELS[key];
2978
2978
  let tone = STATUS_TONE[key];
2979
2979
  if (awaitingAccess) {
2980
- text = l.waitingForAccess;
2980
+ text2 = l.waitingForAccess;
2981
2981
  tone = "danger";
2982
2982
  }
2983
2983
  const elapsed = generating && !Number.isNaN(started) ? formatElapsed(started, now) : null;
@@ -2990,7 +2990,7 @@ function TaskStatusPill({
2990
2990
  "data-status": key,
2991
2991
  "data-testid": testIdOr(testId, { testId: `task-status-${id}` }),
2992
2992
  children: [
2993
- text,
2993
+ text2,
2994
2994
  elapsed && /* @__PURE__ */ jsxs("span", { className: "tabular-nums opacity-70", children: [
2995
2995
  "\xB7 ",
2996
2996
  elapsed
@@ -3396,8 +3396,8 @@ function TaskTable(props) {
3396
3396
  const map = new Map(STATUS_ORDER.map((s) => [s, 0]));
3397
3397
  let all = 0;
3398
3398
  for (const task of tasks) {
3399
- const text = `${nameOf(task)} ${task.description ?? ""}`.toLowerCase();
3400
- if (q && !text.includes(q)) continue;
3399
+ const text2 = `${nameOf(task)} ${task.description ?? ""}`.toLowerCase();
3400
+ if (q && !text2.includes(q)) continue;
3401
3401
  all += 1;
3402
3402
  const s = asTaskStatus(task.status);
3403
3403
  map.set(s, (map.get(s) ?? 0) + 1);
@@ -4942,8 +4942,8 @@ function isoToLocalInput(iso) {
4942
4942
  return new Date(d.getTime() - d.getTimezoneOffset() * 6e4).toISOString().slice(0, 16);
4943
4943
  }
4944
4944
  var DERIVED_NAME_WORDS = 6;
4945
- function firstWords(text, count = DERIVED_NAME_WORDS) {
4946
- 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);
4947
4947
  if (words.length <= count) return words.join(" ");
4948
4948
  return `${words.slice(0, count).join(" ")}\u2026`;
4949
4949
  }
@@ -5537,7 +5537,7 @@ function TaskTriggerChip({
5537
5537
  }) {
5538
5538
  const l = { ...DEFAULT_TASK_TRIGGER_CHIP_LABELS, ...labels };
5539
5539
  const chained = Boolean(afterTaskId);
5540
- 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;
5541
5541
  return /* @__PURE__ */ jsxs(
5542
5542
  "span",
5543
5543
  {
@@ -5546,7 +5546,7 @@ function TaskTriggerChip({
5546
5546
  "data-trigger": chained ? "task" : triggerType,
5547
5547
  children: [
5548
5548
  /* @__PURE__ */ jsx(TriggerIcon, { type: triggerType, chained }),
5549
- /* @__PURE__ */ jsx("span", { className: "truncate", children: text })
5549
+ /* @__PURE__ */ jsx("span", { className: "truncate", children: text2 })
5550
5550
  ]
5551
5551
  }
5552
5552
  );
@@ -5779,9 +5779,9 @@ function WorkflowsTable(props) {
5779
5779
  renderName: (w) => {
5780
5780
  const { l: lb } = latest.current;
5781
5781
  const skill = isSkillRow(w);
5782
- 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);
5783
5783
  const stem = w.name.replace(/…$/, "").trim();
5784
- 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 : "";
5785
5785
  return /* @__PURE__ */ jsxs("div", { className: "min-w-0 leading-tight", children: [
5786
5786
  /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
5787
5787
  /* @__PURE__ */ jsx(
@@ -6210,7 +6210,9 @@ var ICONS = {
6210
6210
  step_started: /* @__PURE__ */ jsx(Play, { className: "size-3.5", "aria-hidden": true }),
6211
6211
  step_done: /* @__PURE__ */ jsx(CheckCircle2, { className: "size-3.5", "aria-hidden": true }),
6212
6212
  step_skipped: /* @__PURE__ */ jsx(RotateCcw, { className: "size-3.5", "aria-hidden": true }),
6213
- 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 })
6214
6216
  };
6215
6217
  var asString = (v) => typeof v === "string" && v.trim() ? v : null;
6216
6218
  function summarizeError(error) {
@@ -6255,6 +6257,12 @@ function TaskActivityTimeline({
6255
6257
  return { headline: "Step done" };
6256
6258
  case "step_skipped":
6257
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
+ };
6258
6266
  case "step_failed":
6259
6267
  return {
6260
6268
  headline: "Step failed",
@@ -6485,8 +6493,64 @@ function groupThreadActivity(steps, items) {
6485
6493
  var DEFAULT_WORKFLOW_THREAD_STRIP_LABELS = {
6486
6494
  happened: "{count} in this step",
6487
6495
  nothingYet: "Nothing here yet.",
6488
- 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"
6489
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
+ }
6490
6554
  function Mark({ phase, icon }) {
6491
6555
  if (phase === "done") return /* @__PURE__ */ jsx(Check, { className: "size-3.5" });
6492
6556
  if (phase === "running") return /* @__PURE__ */ jsx(Loader2, { className: "size-3.5 animate-spin" });
@@ -6527,11 +6591,14 @@ function WorkflowThreadStrip({
6527
6591
  renderIcon,
6528
6592
  onSkip,
6529
6593
  renderStepAction,
6594
+ signals = [],
6595
+ startedBy,
6530
6596
  labels,
6531
6597
  className
6532
6598
  }) {
6533
6599
  const l = { ...DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, ...labels };
6534
6600
  const grouped = groupThreadActivity(steps, items);
6601
+ const strays = signals.filter((s) => !steps.some((step) => step.id === s.step));
6535
6602
  const chevron = /* @__PURE__ */ jsx(ChevronRight, { className: "size-3 shrink-0 text-muted-foreground" });
6536
6603
  return /* @__PURE__ */ jsx(
6537
6604
  "div",
@@ -6541,6 +6608,10 @@ function WorkflowThreadStrip({
6541
6608
  "aria-label": "Workflow steps",
6542
6609
  "data-testid": "workflow-thread-strip",
6543
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
+ ] }),
6544
6615
  grouped.before.map((item) => /* @__PURE__ */ jsxs("li", { className: "flex shrink-0 items-center gap-1", children: [
6545
6616
  /* @__PURE__ */ jsx(Entry, { item }),
6546
6617
  chevron
@@ -6597,18 +6668,50 @@ function WorkflowThreadStrip({
6597
6668
  }
6598
6669
  )
6599
6670
  ] }),
6600
- (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
6601
6673
  ] }, step.id);
6602
6674
  }),
6603
6675
  grouped.after.map((item, i) => /* @__PURE__ */ jsxs("li", { className: "flex shrink-0 items-center gap-1", children: [
6604
6676
  /* @__PURE__ */ jsx(Entry, { item }),
6605
- i < grouped.after.length - 1 && chevron
6606
- ] }, 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}`))
6607
6680
  ] })
6608
6681
  }
6609
6682
  );
6610
6683
  }
6611
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
+
6612
6715
  // src/agents/tasks/compact-thread-activity.ts
6613
6716
  var STEP_LABELS = {
6614
6717
  step_started: "Step started",
@@ -9019,7 +9122,7 @@ function AgentBarNotes({
9019
9122
  return /* @__PURE__ */ jsx("div", { className: cn("mx-3 mb-2 space-y-1.5", className), children });
9020
9123
  }
9021
9124
  function AgentBarQueuedNote({
9022
- text,
9125
+ text: text2,
9023
9126
  isAcknowledged,
9024
9127
  labels,
9025
9128
  testId = "agent-queued-message"
@@ -9041,7 +9144,7 @@ function AgentBarQueuedNote({
9041
9144
  children: l.queuedMessage
9042
9145
  }
9043
9146
  ),
9044
- /* @__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 })
9045
9148
  ] })
9046
9149
  ]
9047
9150
  }
@@ -9902,6 +10005,6 @@ function AgentCreateView({
9902
10005
  ] });
9903
10006
  }
9904
10007
 
9905
- 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 };
9906
- //# sourceMappingURL=chunk-LT2UORRG.js.map
9907
- //# sourceMappingURL=chunk-LT2UORRG.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