@arbidocs/blocks 0.4.136 → 0.4.138

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 (110) hide show
  1. package/dist/agents/index.cjs +384 -353
  2. package/dist/agents/index.js +8 -9
  3. package/dist/agents/skills/SkillLibraryDetail.d.ts +26 -0
  4. package/dist/agents/skills/index.d.ts +2 -0
  5. package/dist/agents/skills/skillLibrary.d.ts +46 -0
  6. package/dist/agents/workflows/WorkflowDocumentsField.d.ts +42 -5
  7. package/dist/agents/workflows/index.d.ts +2 -2
  8. package/dist/agents/workflows/workspaceScope.d.ts +12 -0
  9. package/dist/calls/index.cjs +3 -3
  10. package/dist/calls/index.js +2 -2
  11. package/dist/chunk-2KUCVSFF.js +51 -0
  12. package/dist/chunk-2KUCVSFF.js.map +1 -0
  13. package/dist/{chunk-LIHRGG4M.cjs → chunk-3BI6EWKP.cjs} +2022 -89
  14. package/dist/chunk-3BI6EWKP.cjs.map +1 -0
  15. package/dist/{chunk-3FFRYZKV.js → chunk-3RJN2VTL.js} +36 -6
  16. package/dist/chunk-3RJN2VTL.js.map +1 -0
  17. package/dist/{chunk-OR4CO743.cjs → chunk-AAFX64WD.cjs} +3 -3
  18. package/dist/{chunk-OR4CO743.cjs.map → chunk-AAFX64WD.cjs.map} +1 -1
  19. package/dist/chunk-CQCC7LE7.js +210 -0
  20. package/dist/chunk-CQCC7LE7.js.map +1 -0
  21. package/dist/{chunk-ZAVEMQ37.cjs → chunk-DWZXSPMB.cjs} +3 -3
  22. package/dist/{chunk-ZAVEMQ37.cjs.map → chunk-DWZXSPMB.cjs.map} +1 -1
  23. package/dist/{chunk-VIU7AMHF.js → chunk-E5OYHJMU.js} +3 -3
  24. package/dist/{chunk-VIU7AMHF.js.map → chunk-E5OYHJMU.js.map} +1 -1
  25. package/dist/{chunk-RUB62J2X.js → chunk-ED4HHTIA.js} +3 -3
  26. package/dist/{chunk-RUB62J2X.js.map → chunk-ED4HHTIA.js.map} +1 -1
  27. package/dist/{chunk-5HFPRI3W.js → chunk-FUTMU4FR.js} +3 -3
  28. package/dist/{chunk-5HFPRI3W.js.map → chunk-FUTMU4FR.js.map} +1 -1
  29. package/dist/{chunk-C44D4WFG.cjs → chunk-HLB4DIYV.cjs} +3 -3
  30. package/dist/{chunk-C44D4WFG.cjs.map → chunk-HLB4DIYV.cjs.map} +1 -1
  31. package/dist/{chunk-N55UIXVT.cjs → chunk-JVL7HUIQ.cjs} +5 -5
  32. package/dist/{chunk-N55UIXVT.cjs.map → chunk-JVL7HUIQ.cjs.map} +1 -1
  33. package/dist/{chunk-6S5FLMWG.js → chunk-KSHKTOY2.js} +203 -7
  34. package/dist/chunk-KSHKTOY2.js.map +1 -0
  35. package/dist/{chunk-OZLWSNUC.cjs → chunk-MJKBVIV3.cjs} +83 -1650
  36. package/dist/chunk-MJKBVIV3.cjs.map +1 -0
  37. package/dist/{chunk-DJM7DLCT.cjs → chunk-OPTBQSCV.cjs} +3 -3
  38. package/dist/{chunk-DJM7DLCT.cjs.map → chunk-OPTBQSCV.cjs.map} +1 -1
  39. package/dist/{chunk-GFYGYME3.js → chunk-OQ7RUNOC.js} +3 -3
  40. package/dist/{chunk-GFYGYME3.js.map → chunk-OQ7RUNOC.js.map} +1 -1
  41. package/dist/chunk-RFIBUWLF.cjs +232 -0
  42. package/dist/chunk-RFIBUWLF.cjs.map +1 -0
  43. package/dist/{chunk-N26CXGXC.cjs → chunk-RQ2Y7USX.cjs} +201 -3
  44. package/dist/chunk-RQ2Y7USX.cjs.map +1 -0
  45. package/dist/{chunk-LT2X5N37.js → chunk-UBEI6WFJ.js} +58 -1592
  46. package/dist/chunk-UBEI6WFJ.js.map +1 -0
  47. package/dist/chunk-UUHUQHXR.cjs +56 -0
  48. package/dist/chunk-UUHUQHXR.cjs.map +1 -0
  49. package/dist/{chunk-ECERC6TI.js → chunk-VHJHY7TT.js} +3 -3
  50. package/dist/{chunk-ECERC6TI.js.map → chunk-VHJHY7TT.js.map} +1 -1
  51. package/dist/{chunk-44R3CCZT.cjs → chunk-WS5EX7DN.cjs} +37 -6
  52. package/dist/chunk-WS5EX7DN.cjs.map +1 -0
  53. package/dist/{chunk-IQU2GI6V.js → chunk-XVME4XYD.js} +1982 -93
  54. package/dist/chunk-XVME4XYD.js.map +1 -0
  55. package/dist/collaboration/index.cjs +42 -42
  56. package/dist/collaboration/index.js +2 -2
  57. package/dist/connect/docx.cjs +5 -5
  58. package/dist/connect/docx.js +4 -4
  59. package/dist/connect/index.cjs +710 -51
  60. package/dist/connect/index.cjs.map +1 -1
  61. package/dist/connect/index.d.ts +4 -0
  62. package/dist/connect/index.js +655 -20
  63. package/dist/connect/index.js.map +1 -1
  64. package/dist/connection/ConnectedSkillsLibrary.d.ts +26 -0
  65. package/dist/connection/ConnectedWorkflowBuilder.d.ts +1 -1
  66. package/dist/connection/ConnectedWorkflowLauncher.d.ts +35 -0
  67. package/dist/connection/ConnectedWorkflowsTable.d.ts +62 -0
  68. package/dist/connection/workspaceData.d.ts +45 -0
  69. package/dist/facts/index.cjs +2 -2
  70. package/dist/facts/index.js +2 -2
  71. package/dist/files/index.cjs +3 -3
  72. package/dist/files/index.js +3 -3
  73. package/dist/home/index.cjs +22 -23
  74. package/dist/home/index.cjs.map +1 -1
  75. package/dist/home/index.js +4 -5
  76. package/dist/home/index.js.map +1 -1
  77. package/dist/index.cjs +503 -472
  78. package/dist/index.cjs.map +1 -1
  79. package/dist/index.js +12 -13
  80. package/dist/index.js.map +1 -1
  81. package/dist/retrieval/index.cjs +1 -1
  82. package/dist/retrieval/index.js +1 -1
  83. package/dist/settings/index.cjs +49 -49
  84. package/dist/settings/index.js +6 -6
  85. package/dist/shell/index.cjs +2 -2
  86. package/dist/shell/index.js +2 -2
  87. package/dist/studio/index.cjs +2 -2
  88. package/dist/studio/index.js +2 -2
  89. package/dist/workflow-canvas/index.cjs +32 -30
  90. package/dist/workflow-canvas/index.cjs.map +1 -1
  91. package/dist/workflow-canvas/index.js +20 -18
  92. package/dist/workflow-canvas/index.js.map +1 -1
  93. package/node_modules/@arbidocs/coedit/package.json +1 -1
  94. package/package.json +4 -4
  95. package/dist/chunk-3FFRYZKV.js.map +0 -1
  96. package/dist/chunk-44R3CCZT.cjs.map +0 -1
  97. package/dist/chunk-4XJZ6AAY.js +0 -407
  98. package/dist/chunk-4XJZ6AAY.js.map +0 -1
  99. package/dist/chunk-6S5FLMWG.js.map +0 -1
  100. package/dist/chunk-7D737FLE.cjs +0 -43
  101. package/dist/chunk-7D737FLE.cjs.map +0 -1
  102. package/dist/chunk-IQU2GI6V.js.map +0 -1
  103. package/dist/chunk-LIHRGG4M.cjs.map +0 -1
  104. package/dist/chunk-LT2X5N37.js.map +0 -1
  105. package/dist/chunk-N26CXGXC.cjs.map +0 -1
  106. package/dist/chunk-OZLWSNUC.cjs.map +0 -1
  107. package/dist/chunk-S5HZBXZA.cjs +0 -430
  108. package/dist/chunk-S5HZBXZA.cjs.map +0 -1
  109. package/dist/chunk-XD2M6LIG.js +0 -41
  110. package/dist/chunk-XD2M6LIG.js.map +0 -1
@@ -1,10 +1,9 @@
1
1
  "use client";
2
- import { QuickActionDialogHeader, AddFilesFirst, ScopePicker, StartTiles } from './chunk-3FFRYZKV.js';
3
- import { DocumentPicker, MultiSelect } from './chunk-4XJZ6AAY.js';
2
+ import { MultiSelect } from './chunk-CQCC7LE7.js';
3
+ import { useWorkflowView, useControllableState, SkillTypeBadge, SkillGlobalBadge, SkillActionButton, activateOnKey, PersonPill, DEFAULT_TASK_ACTIVITY_LABELS, TaskActivityTimeline, activeStepId, DEFAULT_STEP_BAR_LABELS, StepBarFrame, workflowRunStatusLabel, STEP_LABEL_CURRENT, STEP_LABEL, STEP_LABEL_MAX, SchemaForm } from './chunk-XVME4XYD.js';
4
+ import { ScopePicker, FoldSection, AddFilesFirst } from './chunk-3RJN2VTL.js';
5
+ import { TriStateFilterMenu } from './chunk-KSHKTOY2.js';
4
6
  import { EmptyState } from './chunk-P6GHJSLR.js';
5
- import { SchemaForm, useWorkflowView, DEFAULT_TASK_ACTIVITY_LABELS, TaskActivityTimeline, activeStepId, DEFAULT_STEP_BAR_LABELS, StepBarFrame, STEP_LABEL_CURRENT, STEP_LABEL, STEP_LABEL_MAX } from './chunk-IQU2GI6V.js';
6
- import { FoldSection } from './chunk-XD2M6LIG.js';
7
- import { TriStateFilterMenu } from './chunk-6S5FLMWG.js';
8
7
  import { CellHoverIcon } from './chunk-RFXJYIDV.js';
9
8
  import { ToneBadge } from './chunk-5LXQPP2K.js';
10
9
  import { ActionLink } from './chunk-444XKG46.js';
@@ -12,296 +11,18 @@ import { SelectionBar, SelectionBarAction } from './chunk-NUNKSZKU.js';
12
11
  import { FilterInput } from './chunk-YU2KUMGE.js';
13
12
  import { GridView } from './chunk-N5YEF3LC.js';
14
13
  import { TabHeader } from './chunk-4WWM3GQ5.js';
15
- import { useBlocksEnvironment } from './chunk-YNIBUKV5.js';
16
- import { ModalHeader } from './chunk-TX2ZICS7.js';
17
- import { DEFAULT_STEP_RECORD_LABELS, DEFAULT_STEP_DOCUMENT_LABELS, DEFAULT_STEP_KIND_LABELS, defaultInputs, validateInputs, isWorkflowScope, workflowSteps, initialRunInputs, stepPhase, composeStepPrompt, useMentionAutocomplete, composeWorkflowPrompt, StepChip, StepDocumentButton, stepLevels, isRunFinished, stepKindOf, stepDocuments, eventWaitingDocuments, waitingForDocumentsText, buildLaunch, STEP_KIND_ICONS, StepDocumentCards, StepRecord, splitDocRef, waitingDocuments } from './chunk-Y5KTM3V5.js';
14
+ import { DEFAULT_STEP_RECORD_LABELS, DEFAULT_STEP_DOCUMENT_LABELS, DEFAULT_STEP_KIND_LABELS, isWorkflowScope, workflowSteps, initialRunInputs, stepPhase, composeStepPrompt, useMentionAutocomplete, composeWorkflowPrompt, StepChip, StepDocumentButton, stepLevels, isRunFinished, stepKindOf, stepDocuments, eventWaitingDocuments, waitingForDocumentsText, defaultInputs, STEP_KIND_ICONS, StepDocumentCards, StepRecord, splitDocRef, validateInputs, waitingDocuments } from './chunk-Y5KTM3V5.js';
18
15
  import { toMessageMentions, extractMentions, MentionMenu } from './chunk-AA3PT6KR.js';
19
16
  import { useIsPhone } from './chunk-SLSBJRWW.js';
20
17
  import { testIdOr, prefixedTestId } from './chunk-7F6CBP3Z.js';
21
- import { formatCount, initials } from './chunk-OXF2IFXG.js';
22
- import { memo, forwardRef, useState, useMemo, useId, useEffect, useRef, useCallback, useLayoutEffect } from 'react';
23
- 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, PopoverClose } from '@arbidocs/react/ui';
18
+ import { useBlocksEnvironment } from './chunk-YNIBUKV5.js';
19
+ import { ModalHeader } from './chunk-TX2ZICS7.js';
20
+ import { formatCount } from './chunk-OXF2IFXG.js';
24
21
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
25
- 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, ArrowUpRight, SendHorizontal, Zap, MessagesSquare, ChevronUp, Pause, Activity, Hourglass, MoreVertical, TriangleAlert, CheckSquare, Square, CheckCircle2, SquareArrowOutUpRight, ArrowLeft, LayoutGrid, List, CornerLeftUp, CornerUpLeft, CircleDashed, RotateCcw, ListPlus, Clock, CircleCheck, Hand, Link2, Bell, MousePointerClick, Flag } from 'lucide-react';
22
+ import { memo, forwardRef, useState, useMemo, useRef, useEffect, useCallback, useLayoutEffect } from 'react';
23
+ import { ChevronDown, ChevronRight, Plus, Trash2, MessageSquare, Eye, ClipboardList, Pencil, Copy, Bot, Sparkles, Loader2, Wand2, X, Download, Lock, Globe, ListChecks, AlertTriangle, FileX, SkipForward, Check, FileText, CornerDownRight, AlertCircle, KeyRound, Workflow, ChevronsUpDown, ChevronsDownUp, ListTodo, CheckCheck, MoreHorizontal, CalendarClock, ArrowUpRight, SendHorizontal, Zap, MessagesSquare, History, ChevronUp, Pause, Activity, Hourglass, MoreVertical, TriangleAlert, CheckSquare, Square, CheckCircle2, SquareArrowOutUpRight, ArrowLeft, CornerLeftUp, CornerUpLeft, CircleDashed, RotateCcw, ListPlus, Clock, CircleCheck, Hand, Flag, Play } from 'lucide-react';
24
+ import { cn, Label, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Textarea, Input, Switch, Button, Collapsible, CollapsibleTrigger, CollapsibleContent, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Badge, Slider, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, VisibilityToggle, Tooltip, TooltipTrigger, TooltipContent, EntityPill, ThreadVisibilityIcon, DialogClose, Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandItem, Checkbox, UserEntity, DropdownMenuSeparator, PopoverClose } from '@arbidocs/react/ui';
26
25
 
27
- function useControllableState(value, defaultValue, onChange) {
28
- const [inner, setInner] = useState(defaultValue);
29
- const isControlled = value !== void 0;
30
- const current = isControlled ? value : inner;
31
- const onChangeRef = useRef(onChange);
32
- onChangeRef.current = onChange;
33
- const set = useCallback(
34
- (next) => {
35
- if (!isControlled) setInner(next);
36
- onChangeRef.current?.(next);
37
- },
38
- [isControlled]
39
- );
40
- return [current, set];
41
- }
42
- var DEFAULT_AGENT_SELECT_LABELS = {
43
- label: "Run as",
44
- myAssistant: "My assistant"
45
- };
46
- var ME = "__me__";
47
- function AgentSelect({
48
- agents,
49
- value,
50
- defaultValue = "",
51
- onValueChange,
52
- hideLabel,
53
- disabled,
54
- className,
55
- labels,
56
- testId,
57
- optionTestId
58
- }) {
59
- const l = { ...DEFAULT_AGENT_SELECT_LABELS, ...labels };
60
- const triggerId = useId();
61
- const [current, setCurrent] = useControllableState(value, defaultValue, onValueChange);
62
- return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1.5", className), "data-slot": "agent-select", children: [
63
- /* @__PURE__ */ jsx(Label, { htmlFor: triggerId, className: hideLabel ? "sr-only" : void 0, children: l.label }),
64
- /* @__PURE__ */ jsxs(
65
- Select,
66
- {
67
- value: current === "" ? ME : current,
68
- onValueChange: (v) => setCurrent(v === ME ? "" : v),
69
- disabled,
70
- children: [
71
- /* @__PURE__ */ jsx(
72
- SelectTrigger,
73
- {
74
- id: triggerId,
75
- "data-testid": testIdOr(testId, { testId: "agent-select" }),
76
- className: "pointer-coarse:min-h-11",
77
- children: /* @__PURE__ */ jsx(SelectValue, {})
78
- }
79
- ),
80
- /* @__PURE__ */ jsxs(SelectContent, { children: [
81
- /* @__PURE__ */ jsx(
82
- SelectItem,
83
- {
84
- value: ME,
85
- "data-testid": prefixedTestId(optionTestId, "me", {
86
- testId: "agent-select-option-me"
87
- }),
88
- children: l.myAssistant
89
- }
90
- ),
91
- agents.map((agent) => /* @__PURE__ */ jsx(
92
- SelectItem,
93
- {
94
- value: agent.id,
95
- "data-testid": prefixedTestId(optionTestId, agent.id, {
96
- testId: `agent-select-option-${agent.id}`
97
- }),
98
- children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
99
- agent.avatar,
100
- /* @__PURE__ */ jsx("span", { children: agent.label }),
101
- agent.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: agent.description })
102
- ] })
103
- },
104
- agent.id
105
- ))
106
- ] })
107
- ]
108
- }
109
- )
110
- ] });
111
- }
112
- var DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS = {
113
- start: "Start",
114
- starting: "Starting\u2026",
115
- addFilesReason: "This reads your files, and there is nothing to read yet.",
116
- agentLabel: "Run as"
117
- };
118
- function WorkflowConfigDialog({
119
- workflow,
120
- open,
121
- onOpenChange,
122
- onLaunch,
123
- initialInputs,
124
- inputs: inputsProp,
125
- onInputsChange,
126
- scopeSource,
127
- renderScope,
128
- renderDocuments,
129
- renderIcon,
130
- addFilesAction,
131
- agents,
132
- agentId: agentIdProp,
133
- onAgentChange,
134
- isLaunching,
135
- submitLabel,
136
- fieldPlaceholder,
137
- renderNotice,
138
- labels,
139
- formLabels,
140
- agentLabels,
141
- testId,
142
- startTestId,
143
- className
144
- }) {
145
- const l = { ...DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, ...labels };
146
- const initialKey = JSON.stringify(initialInputs ?? {});
147
- const seedKey = JSON.stringify({ ...defaultInputs(workflow), ...JSON.parse(initialKey) });
148
- const seed = useMemo(() => JSON.parse(seedKey), [seedKey]);
149
- const [inputs, setInputs] = useControllableState(inputsProp, seed, onInputsChange);
150
- const [agentId, setAgentId] = useControllableState(
151
- agentIdProp,
152
- workflow.defaultAgentId ?? "",
153
- onAgentChange
154
- );
155
- useEffect(() => {
156
- if (open && inputsProp === void 0) setInputs(seed);
157
- }, [open, seed]);
158
- const setField = (name, value) => setInputs({ ...inputs, [name]: value });
159
- const errors = validateInputs(workflow, inputs);
160
- const valid = Object.keys(errors).length === 0;
161
- const visibleErrors = Object.fromEntries(
162
- Object.entries(errors).filter(([, e]) => e !== "required")
163
- );
164
- const scopeField = workflow.inputs.find((f) => f.type === "scope");
165
- const rawScope = scopeField ? inputs[scopeField.name] : void 0;
166
- const scopeValue = rawScope && typeof rawScope === "object" ? rawScope : { folders: [], labels: [] };
167
- const matchedCount = scopeSource && scopeField ? scopeSource.countMatching(scopeValue) : null;
168
- const noFiles = Boolean(workflow.requiresFiles && scopeSource && scopeSource.totalCount === 0);
169
- const blockedByScope = matchedCount !== null && matchedCount === 0 && Boolean(workflow.requiresFiles);
170
- const showAgent = workflow.run.kind === "prompt" && workflow.options?.agent !== false && agents !== void 0 && agents.length > 0;
171
- const launch = (values) => {
172
- Promise.resolve(onLaunch(buildLaunch(workflow, values, agentId))).catch(() => {
173
- });
174
- };
175
- const submit = () => {
176
- if (!valid || noFiles || blockedByScope || isLaunching) return;
177
- launch(inputs);
178
- };
179
- const fields = useMemo(
180
- () => workflow.inputs.map((f) => {
181
- const placeholder = fieldPlaceholder?.(f, inputs, workflow);
182
- return placeholder === void 0 ? f : { ...f, placeholder };
183
- }),
184
- [workflow, fieldPlaceholder, inputs]
185
- );
186
- const id = testIdOr(testId, { testId: "workflow-dialog" });
187
- const formRef = useRef(null);
188
- const firstField = workflow.inputs.find((f) => !f.advanced);
189
- const focusPromptFirst = firstField?.type === "text" || firstField?.type === "longtext";
190
- const defaultScopeRender = scopeSource ? (_field, value, onChange) => /* @__PURE__ */ jsx(
191
- ScopePicker,
192
- {
193
- folders: scopeSource.folders,
194
- unfiledCount: scopeSource.unfiledCount,
195
- labels: scopeSource.labels,
196
- totalCount: scopeSource.totalCount,
197
- matchedCount: scopeSource.countMatching(value),
198
- scope: value,
199
- onScopeChange: onChange
200
- }
201
- ) : void 0;
202
- return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(
203
- DialogContent,
204
- {
205
- presentation: "sheet",
206
- className: `max-h-[calc(100dvh-2rem)] overflow-y-auto sm:max-w-xl ${className ?? ""}`,
207
- "data-testid": id,
208
- "data-workflow": workflow.id,
209
- onOpenAutoFocus: (event) => {
210
- if (!focusPromptFirst || !firstField) return;
211
- const control = formRef.current?.querySelector(
212
- `[data-testid="${id}-field-${firstField.name}"]`
213
- );
214
- if (!control) return;
215
- event.preventDefault();
216
- control.focus();
217
- if (control instanceof HTMLInputElement || control instanceof HTMLTextAreaElement) {
218
- const end = control.value.length;
219
- control.setSelectionRange(end, end);
220
- }
221
- },
222
- children: [
223
- /* @__PURE__ */ jsx(
224
- QuickActionDialogHeader,
225
- {
226
- icon: workflow.icon && renderIcon ? renderIcon(workflow.icon) : null,
227
- title: workflow.title,
228
- description: workflow.details ?? workflow.description,
229
- descriptionTestId: `${id}-description`
230
- }
231
- ),
232
- /* @__PURE__ */ jsx(
233
- "form",
234
- {
235
- ref: formRef,
236
- className: "mt-2 flex flex-col gap-4",
237
- onSubmit: (event) => {
238
- event.preventDefault();
239
- submit();
240
- },
241
- children: noFiles ? /* @__PURE__ */ jsx(
242
- AddFilesFirst,
243
- {
244
- reason: l.addFilesReason,
245
- action: addFilesAction,
246
- testId: `${id}-empty-state`
247
- }
248
- ) : /* @__PURE__ */ jsxs(Fragment, { children: [
249
- /* @__PURE__ */ jsx(
250
- SchemaForm,
251
- {
252
- fields,
253
- values: inputs,
254
- onChange: setField,
255
- errors: visibleErrors,
256
- renderScope: renderScope ?? defaultScopeRender,
257
- renderDocuments,
258
- renderIcon,
259
- labels: formLabels,
260
- onEnterSubmit: submit,
261
- testIdPrefix: `${id}-field`
262
- }
263
- ),
264
- renderNotice?.({ workflow, inputs }),
265
- /* @__PURE__ */ jsxs(
266
- "div",
267
- {
268
- className: "flex flex-col gap-3 border-t border-border pt-3 sm:flex-row sm:items-end sm:justify-between",
269
- "data-slot": "workflow-footer",
270
- children: [
271
- showAgent ? /* @__PURE__ */ jsx(
272
- AgentSelect,
273
- {
274
- agents: agents ?? [],
275
- value: agentId,
276
- onValueChange: setAgentId,
277
- labels: { label: l.agentLabel, ...agentLabels },
278
- testId: `${id}-agent`,
279
- className: "sm:w-56"
280
- }
281
- ) : /* @__PURE__ */ jsx("span", {}),
282
- /* @__PURE__ */ jsxs(
283
- Button,
284
- {
285
- type: "submit",
286
- className: "gap-1.5 px-5 pointer-coarse:min-h-11",
287
- disabled: !valid || blockedByScope || isLaunching,
288
- "data-testid": testIdOr(startTestId, { testId: "workflow-start-button" }),
289
- children: [
290
- isLaunching ? /* @__PURE__ */ jsx(Loader2, { className: "size-4 animate-spin" }) : /* @__PURE__ */ jsx(Play, { className: "size-4" }),
291
- isLaunching ? l.starting : submitLabel?.({ workflow, inputs, matchedCount }) ?? workflow.startLabel ?? l.start
292
- ]
293
- }
294
- )
295
- ]
296
- }
297
- )
298
- ] })
299
- }
300
- )
301
- ]
302
- }
303
- ) });
304
- }
305
26
  function defaultScopeRenderer(scopeSource) {
306
27
  if (!scopeSource) return void 0;
307
28
  return function renderScope(_field, value, onChange) {
@@ -330,178 +51,6 @@ function resolveScopeInputs(workflow, inputs, scopeSource) {
330
51
  }
331
52
  return next;
332
53
  }
333
- function WorkflowLauncher({
334
- workflows,
335
- tileWorkflows,
336
- onLaunch,
337
- showTiles = true,
338
- caption,
339
- captionTestId,
340
- tileTestId,
341
- disabledReason,
342
- activeId: activeIdProp,
343
- onActiveIdChange,
344
- initialInputsFor,
345
- testId,
346
- extraTiles = [],
347
- className,
348
- children,
349
- renderIcon,
350
- ...dialog
351
- }) {
352
- const [activeId, setActiveId] = useControllableState(
353
- activeIdProp,
354
- null,
355
- onActiveIdChange
356
- );
357
- const [isLaunching, setIsLaunching] = useState(false);
358
- const active = workflows.find((w) => w.id === activeId) ?? null;
359
- const run = async (launch) => {
360
- setIsLaunching(true);
361
- try {
362
- await onLaunch(launch);
363
- setActiveId(null);
364
- } finally {
365
- setIsLaunching(false);
366
- }
367
- };
368
- const select = (workflow) => {
369
- if (workflow.run.kind === "operation" && workflow.inputs.length === 0) {
370
- const inputs = defaultInputs(workflow);
371
- if (Object.keys(validateInputs(workflow, inputs)).length === 0) {
372
- Promise.resolve(onLaunch(buildLaunch(workflow, inputs, void 0))).catch(() => {
373
- });
374
- return;
375
- }
376
- }
377
- setActiveId(workflow.id);
378
- };
379
- const tiles = (tileWorkflows ?? workflows).map((workflow) => {
380
- const reason = disabledReason?.(workflow);
381
- return {
382
- id: workflow.id,
383
- iconNode: workflow.icon && renderIcon ? renderIcon(workflow.icon) : void 0,
384
- title: workflow.title,
385
- description: workflow.description,
386
- onSelect: () => select(workflow),
387
- disabled: reason !== void 0,
388
- disabledReason: reason,
389
- testId: tileTestId?.(workflow) ?? `workflow-tile-${workflow.id}`
390
- };
391
- });
392
- return /* @__PURE__ */ jsxs("div", { className, "data-slot": "workflow-launcher", children: [
393
- showTiles && /* @__PURE__ */ jsx(
394
- StartTiles,
395
- {
396
- items: [...tiles, ...extraTiles],
397
- caption,
398
- captionTestId,
399
- testId
400
- }
401
- ),
402
- children,
403
- active && /* @__PURE__ */ jsx(
404
- WorkflowConfigDialog,
405
- {
406
- ...dialog,
407
- renderIcon,
408
- workflow: active,
409
- open: true,
410
- onOpenChange: (open) => !open && setActiveId(null),
411
- onLaunch: run,
412
- isLaunching,
413
- initialInputs: initialInputsFor?.(active)
414
- }
415
- )
416
- ] });
417
- }
418
-
419
- // src/agents/workflows/workspaceScope.ts
420
- var canonical = (path) => (path ?? "").split("/").map((part) => part.trim()).filter(Boolean).join("/");
421
- function matchWorkflowScope(docs, scope) {
422
- if (scope.documents?.length) {
423
- const ids = new Set(scope.documents);
424
- return docs.filter((doc) => ids.has(doc.external_id));
425
- }
426
- if (!scope.folders.length && !scope.labels.length) return docs;
427
- const folders = scope.folders.map(canonical);
428
- const labels = new Set(scope.labels);
429
- return docs.filter((doc) => {
430
- const folder = canonical(doc.folder);
431
- return folders.some(
432
- (path) => path === "" ? folder === "" : folder === path || folder.startsWith(`${path}/`)
433
- ) || doc.doctags?.some((tag) => labels.has(tag.tag_ext_id));
434
- });
435
- }
436
- function buildWorkflowScopeSource(docs, labels = []) {
437
- const counts = /* @__PURE__ */ new Map();
438
- for (const doc of docs) {
439
- const parts = canonical(doc.folder).split("/").filter(Boolean);
440
- for (let i = 1; i <= parts.length; i++) {
441
- const path = parts.slice(0, i).join("/");
442
- counts.set(path, (counts.get(path) ?? 0) + 1);
443
- }
444
- }
445
- return {
446
- folders: [...counts].sort(([a], [b]) => a.localeCompare(b)).map(([path, count]) => ({
447
- path,
448
- count,
449
- label: path.split("/").at(-1),
450
- depth: path.split("/").length - 1
451
- })),
452
- unfiledCount: docs.filter((doc) => !canonical(doc.folder)).length,
453
- labels: labels.map((label) => ({
454
- id: label.external_id,
455
- name: label.name,
456
- color: label.color ?? "currentColor",
457
- count: docs.filter((doc) => doc.doctags?.some((tag) => tag.tag_ext_id === label.external_id)).length
458
- })),
459
- totalCount: docs.length,
460
- countMatching: (scope) => matchWorkflowScope(docs, scope).length,
461
- resolveDocuments: (scope) => matchWorkflowScope(docs, scope).map((doc) => doc.external_id)
462
- };
463
- }
464
- function WorkflowDocumentsField({
465
- field,
466
- value,
467
- onChange,
468
- documents,
469
- addFilesAction
470
- }) {
471
- const ids = value.documents ?? [];
472
- const max = field.max ?? 1;
473
- const set = (documents2) => onChange({ ...value, documents: documents2 });
474
- return /* @__PURE__ */ jsxs("div", { "data-testid": `workflow-documents-${field.name}`, className: "space-y-2", children: [
475
- /* @__PURE__ */ jsx(
476
- DocumentPicker,
477
- {
478
- groups: [{ id: "workspace", docs: documents }],
479
- value: ids[0] ?? "",
480
- selected: documents.find((doc) => doc.id === ids[0]),
481
- selectedIds: max > 1 ? ids : void 0,
482
- onValueChange: (id) => set(
483
- ids.includes(id) ? ids.filter((selected) => selected !== id) : [...ids, id].slice(-max)
484
- )
485
- }
486
- ),
487
- ids.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: ids.map((id) => /* @__PURE__ */ jsxs(
488
- Button,
489
- {
490
- type: "button",
491
- variant: "outline",
492
- size: "sm",
493
- onClick: () => set(ids.filter((selected) => selected !== id)),
494
- "aria-label": `Remove ${documents.find((doc) => doc.id === id)?.title ?? id}`,
495
- children: [
496
- documents.find((doc) => doc.id === id)?.title ?? id,
497
- " \xD7"
498
- ]
499
- },
500
- id
501
- )) }),
502
- addFilesAction
503
- ] });
504
- }
505
54
  function useWorkflowPreview(workflow, { answer = "{prompt}", delayMs = 400, resolveWorkflow, compose } = {}) {
506
55
  const steps = workflowSteps(workflow);
507
56
  const [inputs, setInputs] = useState(() => initialRunInputs(workflow));
@@ -1317,79 +866,6 @@ function agentConfigSectionToValues(section, capabilityKeys) {
1317
866
  capabilities: Object.fromEntries(capabilityKeys.map((k) => [k, Boolean(s[k])]))
1318
867
  };
1319
868
  }
1320
- function SkillTypeBadge({ type, className }) {
1321
- return /* @__PURE__ */ jsx(
1322
- "span",
1323
- {
1324
- className: cn(
1325
- "shrink-0 rounded bg-background px-1.5 py-0.5 text-xs uppercase tracking-wide text-muted-foreground",
1326
- className
1327
- ),
1328
- "data-slot": "skill-type-badge",
1329
- children: type
1330
- }
1331
- );
1332
- }
1333
- var DEFAULT_SKILL_GLOBAL_BADGE_LABELS = {
1334
- global: "Global",
1335
- globalTitle: "Shared with everyone in the marketplace"
1336
- };
1337
- function SkillGlobalBadge({
1338
- className,
1339
- labels
1340
- }) {
1341
- const l = { ...DEFAULT_SKILL_GLOBAL_BADGE_LABELS, ...labels };
1342
- return /* @__PURE__ */ jsxs(
1343
- "span",
1344
- {
1345
- className: cn(
1346
- "inline-flex shrink-0 items-center gap-1 rounded bg-accent px-1.5 py-0.5 text-xs uppercase tracking-wide text-accent-foreground",
1347
- className
1348
- ),
1349
- title: l.globalTitle,
1350
- "data-slot": "skill-global-badge",
1351
- children: [
1352
- /* @__PURE__ */ jsx(Globe, { className: "size-3" }),
1353
- l.global
1354
- ]
1355
- }
1356
- );
1357
- }
1358
- function SkillActionButton({
1359
- label,
1360
- tooltip,
1361
- onClick,
1362
- children,
1363
- testId
1364
- }) {
1365
- return /* @__PURE__ */ jsxs(Tooltip, { children: [
1366
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, onFocusCapture: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx(
1367
- Button,
1368
- {
1369
- variant: "ghost",
1370
- size: "icon",
1371
- className: "size-7 shrink-0 pointer-coarse:size-11",
1372
- onClick: (e) => {
1373
- e.stopPropagation();
1374
- onClick(e);
1375
- },
1376
- "aria-label": label,
1377
- "data-testid": testId,
1378
- children
1379
- }
1380
- ) }),
1381
- /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("p", { children: tooltip ?? label }) })
1382
- ] });
1383
- }
1384
- function activateOnKey(handler) {
1385
- return (e) => {
1386
- if (e.target !== e.currentTarget) return;
1387
- if (e.key === "Enter" || e.key === " ") {
1388
- e.preventDefault();
1389
- handler();
1390
- }
1391
- };
1392
- }
1393
869
  var DEFAULT_SKILL_CARD_LABELS = {
1394
870
  global: "Global",
1395
871
  globalTitle: "Shared with everyone in the marketplace",
@@ -1583,376 +1059,48 @@ function SkillRow({
1583
1059
  }
1584
1060
  );
1585
1061
  }
1586
- var DEFAULT_SKILL_GENERATE_FORM_LABELS = {
1587
- title: "Generate with AI",
1588
- hint: "Describe what the skill should do. The assistant drafts it in chat, then you can edit it here.",
1589
- placeholder: "e.g. Summarize a contract into key obligations, dates, and parties",
1590
- generate: "Generate with AI",
1591
- writeManually: "\u2026or write it manually"
1062
+ var DEFAULT_TASK_PLAN_LABELS = {
1063
+ emptyTitle: "Draft a plan to review",
1064
+ emptyBody: "The assistant writes a short checklist of what its work must cover. You can edit it, and it checks its own draft against it before handing it to you.",
1065
+ drafting: "Drafting plan\u2026",
1066
+ generate: "Draft a plan",
1067
+ needWorkspace: "Open a workspace to plan: the checklist is encrypted under its key.",
1068
+ needObjective: "Say what the assistant should do first: the plan is drafted from it.",
1069
+ goalTask: "Drafted for your review",
1070
+ scopedTo: "for",
1071
+ redraft: "Redraft",
1072
+ removePlan: "Remove plan",
1073
+ goal: "Objective",
1074
+ goalPlaceholder: "What should the finished work achieve?",
1075
+ checklist: "The draft must",
1076
+ criteriaCount: (count) => `${count} ${count === 1 ? "criterion" : "criteria"}`,
1077
+ add: "Add",
1078
+ noCriteria: "Nothing yet. Add at least one thing the draft must cover.",
1079
+ criterionPlaceholder: "Something specific you can check\u2026",
1080
+ removeCriterion: (n) => `Remove item ${n}`,
1081
+ retryBudget: "Revision rounds",
1082
+ passes: (count) => `up to ${count} ${count === 1 ? "round" : "rounds"}`,
1083
+ passesHelp: "How many times the assistant may revise its own draft before it hands it over.",
1084
+ workingDocuments: "Documents it will use",
1085
+ workingDocumentsHelp: "The plan limits the assistant to these documents."
1592
1086
  };
1593
- function SkillGenerateForm({
1087
+ function nextCriterionId(criteria) {
1088
+ const max = criteria.reduce((m, c) => {
1089
+ const n = Number(/^c(\d+)$/.exec(c.id)?.[1] ?? 0);
1090
+ return Number.isFinite(n) && n > m ? n : m;
1091
+ }, 0);
1092
+ return `c${max + 1}`;
1093
+ }
1094
+ function TaskPlan({
1095
+ plan,
1096
+ onChange,
1594
1097
  onGenerate,
1595
- onManual,
1596
- icon,
1597
- labels,
1598
- testIds
1599
- }) {
1600
- const l = { ...DEFAULT_SKILL_GENERATE_FORM_LABELS, ...labels };
1601
- const [desc, setDesc] = useState("");
1602
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col gap-4 overflow-y-auto p-4", "data-slot": "skill-generate-form", children: [
1603
- /* @__PURE__ */ jsxs("div", { className: "rounded-lg bg-muted p-4", children: [
1604
- /* @__PURE__ */ jsxs("div", { className: "mb-1 flex items-center gap-2", children: [
1605
- /* @__PURE__ */ jsx(Wand2, { className: "size-4 text-primary" }),
1606
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: l.title })
1607
- ] }),
1608
- /* @__PURE__ */ jsx("p", { className: "mb-3 text-xs text-muted-foreground", children: l.hint }),
1609
- /* @__PURE__ */ jsx(
1610
- Textarea,
1611
- {
1612
- value: desc,
1613
- onChange: (e) => setDesc(e.target.value),
1614
- rows: 4,
1615
- placeholder: l.placeholder,
1616
- "data-testid": testIdOr(testIds?.description, { testId: "skills-panel-ai-desc" })
1617
- }
1618
- ),
1619
- /* @__PURE__ */ jsx("div", { className: "mt-3 flex justify-end", children: /* @__PURE__ */ jsxs(
1620
- Button,
1621
- {
1622
- size: "sm",
1623
- disabled: !desc.trim(),
1624
- onClick: () => onGenerate(desc.trim()),
1625
- "data-testid": testIdOr(testIds?.generate, { testId: "skills-panel-ai-generate" }),
1626
- children: [
1627
- icon && /* @__PURE__ */ jsx("span", { className: "mr-1 [&>svg]:size-4", children: icon }),
1628
- l.generate
1629
- ]
1630
- }
1631
- ) })
1632
- ] }),
1633
- /* @__PURE__ */ jsx(
1634
- "button",
1635
- {
1636
- type: "button",
1637
- className: "self-start text-sm text-muted-foreground underline-offset-2 hover:text-foreground hover:underline pointer-coarse:min-h-11",
1638
- onClick: onManual,
1639
- "data-testid": testIdOr(testIds?.writeManually, { testId: "skills-panel-write-manually" }),
1640
- children: l.writeManually
1641
- }
1642
- )
1643
- ] });
1644
- }
1645
- var DEFAULT_SKILL_EDIT_FORM_LABELS = {
1646
- name: "Name",
1647
- namePlaceholder: "contract-summary",
1648
- invokedAs: (name) => /* @__PURE__ */ jsxs(Fragment, { children: [
1649
- "Invoked as ",
1650
- /* @__PURE__ */ jsxs("span", { className: "font-mono", children: [
1651
- "/",
1652
- name || "skill-name"
1653
- ] })
1654
- ] }),
1655
- description: "Description",
1656
- descriptionPlaceholder: "What it does and when to use it",
1657
- instructions: "Instructions",
1658
- cancel: "Cancel",
1659
- saving: "Saving\u2026",
1660
- saveChanges: "Save changes",
1661
- create: "Create skill"
1662
- };
1663
- var FIELD_LABEL = "text-xs font-semibold uppercase tracking-wide text-muted-foreground";
1664
- function SkillEditForm({
1665
- name,
1666
- onNameChange,
1667
- isNameLocked,
1668
- nameError,
1669
- description,
1670
- onDescriptionChange,
1671
- editor,
1672
- isSaving,
1673
- isEditing,
1674
- onSave,
1675
- onCancel,
1676
- labels,
1677
- testIds
1678
- }) {
1679
- const l = { ...DEFAULT_SKILL_EDIT_FORM_LABELS, ...labels };
1680
- return /* @__PURE__ */ jsxs("div", { className: "flex h-full min-h-0 flex-col", "data-slot": "skill-edit-form", children: [
1681
- /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto p-4", children: [
1682
- /* @__PURE__ */ jsxs("div", { children: [
1683
- /* @__PURE__ */ jsx(Label, { htmlFor: "sp-name", className: FIELD_LABEL, children: l.name }),
1684
- /* @__PURE__ */ jsx(
1685
- Input,
1686
- {
1687
- id: "sp-name",
1688
- value: name,
1689
- disabled: isNameLocked,
1690
- placeholder: l.namePlaceholder,
1691
- onChange: (e) => onNameChange(e.target.value),
1692
- className: "mt-1",
1693
- "data-testid": testIdOr(testIds?.name, { testId: "skills-panel-edit-name" })
1694
- }
1695
- ),
1696
- /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: l.invokedAs(name) }),
1697
- nameError && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-destructive", children: nameError })
1698
- ] }),
1699
- /* @__PURE__ */ jsxs("div", { children: [
1700
- /* @__PURE__ */ jsx(Label, { htmlFor: "sp-desc", className: FIELD_LABEL, children: l.description }),
1701
- /* @__PURE__ */ jsx(
1702
- Input,
1703
- {
1704
- id: "sp-desc",
1705
- value: description,
1706
- placeholder: l.descriptionPlaceholder,
1707
- onChange: (e) => onDescriptionChange(e.target.value),
1708
- className: "mt-1",
1709
- "data-testid": testIdOr(testIds?.description, { testId: "skills-panel-edit-desc" })
1710
- }
1711
- )
1712
- ] }),
1713
- /* @__PURE__ */ jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [
1714
- /* @__PURE__ */ jsx(Label, { className: `${FIELD_LABEL} mb-1`, children: l.instructions }),
1715
- /* @__PURE__ */ jsx("div", { className: "min-h-[240px] flex-1 overflow-hidden rounded-md border border-border", children: editor })
1716
- ] })
1717
- ] }),
1718
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col-reverse sm:flex-row sm:justify-end gap-2 border-t border-border px-4 py-3", children: [
1719
- /* @__PURE__ */ jsx(Button, { variant: "outline", size: "sm", onClick: onCancel, children: l.cancel }),
1720
- /* @__PURE__ */ jsx(
1721
- Button,
1722
- {
1723
- size: "sm",
1724
- onClick: onSave,
1725
- disabled: isSaving,
1726
- "data-testid": testIdOr(testIds?.save, { testId: "skills-panel-edit-save" }),
1727
- children: isSaving ? l.saving : isEditing ? l.saveChanges : l.create
1728
- }
1729
- )
1730
- ] })
1731
- ] });
1732
- }
1733
- function SkillFilterChips({
1734
- options,
1735
- value,
1736
- onChange,
1737
- label,
1738
- testIdPrefix = "skills-filter",
1739
- className
1740
- }) {
1741
- return /* @__PURE__ */ jsx(
1742
- "div",
1743
- {
1744
- role: "radiogroup",
1745
- "aria-label": label,
1746
- className: cn("flex flex-wrap gap-2", className),
1747
- "data-slot": "skill-filter-chips",
1748
- children: options.map((option) => {
1749
- const selected = option.id === value;
1750
- return /* @__PURE__ */ jsxs(
1751
- "button",
1752
- {
1753
- type: "button",
1754
- role: "radio",
1755
- "aria-checked": selected,
1756
- onClick: () => onChange(option.id),
1757
- "data-testid": `${testIdPrefix}-${option.id}`,
1758
- className: cn(
1759
- "inline-flex min-h-8 items-center gap-1.5 rounded-full border px-3 text-sm transition-colors pointer-coarse:min-h-11 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1760
- selected ? "border-primary bg-primary/10 text-foreground" : "border-border bg-background text-muted-foreground [&:hover]:bg-muted"
1761
- ),
1762
- children: [
1763
- option.label,
1764
- option.count !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: option.count })
1765
- ]
1766
- },
1767
- option.id
1768
- );
1769
- })
1770
- }
1771
- );
1772
- }
1773
- var DEFAULT_SKILL_VIEW_TOGGLE_LABELS = {
1774
- group: "View",
1775
- gallery: "Gallery",
1776
- list: "List"
1777
- };
1778
- function SkillViewToggle({ value, onChange, labels, testId }) {
1779
- const l = { ...DEFAULT_SKILL_VIEW_TOGGLE_LABELS, ...labels };
1780
- const item = (view, label, icon) => /* @__PURE__ */ jsx(
1781
- "button",
1782
- {
1783
- type: "button",
1784
- role: "radio",
1785
- "aria-checked": value === view,
1786
- "aria-label": label,
1787
- title: label,
1788
- onClick: () => onChange(view),
1789
- "data-testid": `${testId ?? "skills-view-toggle"}-${view}`,
1790
- className: cn(
1791
- "flex size-8 items-center justify-center rounded-md pointer-coarse:size-11 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1792
- value === view ? "bg-background text-foreground shadow-sm" : "text-muted-foreground"
1793
- ),
1794
- children: icon
1795
- }
1796
- );
1797
- return /* @__PURE__ */ jsxs(
1798
- "div",
1799
- {
1800
- role: "radiogroup",
1801
- "aria-label": l.group,
1802
- className: "inline-flex shrink-0 gap-0.5 rounded-lg bg-muted p-0.5",
1803
- "data-testid": testId ?? "skills-view-toggle",
1804
- children: [
1805
- item("gallery", l.gallery, /* @__PURE__ */ jsx(LayoutGrid, { className: "size-4" })),
1806
- item("list", l.list, /* @__PURE__ */ jsx(List, { className: "size-4" }))
1807
- ]
1808
- }
1809
- );
1810
- }
1811
- function SkillTile({
1812
- name,
1813
- description,
1814
- sourceLabel,
1815
- type,
1816
- icon,
1817
- layout,
1818
- selected,
1819
- onSelect,
1820
- testId
1821
- }) {
1822
- const isRow = layout === "list";
1823
- return /* @__PURE__ */ jsxs(
1824
- "div",
1825
- {
1826
- role: "button",
1827
- tabIndex: 0,
1828
- "aria-pressed": selected,
1829
- onClick: onSelect,
1830
- onKeyDown: activateOnKey(onSelect),
1831
- "data-testid": testId ?? `skill-tile-${name}`,
1832
- "data-skill-name": name,
1833
- "data-slot": "skill-tile",
1834
- className: cn(
1835
- "flex cursor-pointer rounded-lg border p-3 text-left transition-colors pointer-coarse:min-h-11 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1836
- isRow ? "items-center gap-3" : "h-full flex-col gap-2",
1837
- selected ? "border-primary bg-primary/5" : "border-transparent bg-muted [&:hover]:bg-accent"
1838
- ),
1839
- children: [
1840
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
1841
- icon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-ai-ink [&>svg]:size-5", children: icon }),
1842
- /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-sm font-semibold text-foreground", children: name })
1843
- ] }),
1844
- /* @__PURE__ */ jsx(
1845
- "p",
1846
- {
1847
- className: cn(
1848
- "min-w-0 text-sm text-muted-foreground",
1849
- isRow ? "flex-1 truncate max-sm:hidden" : "line-clamp-3"
1850
- ),
1851
- children: description
1852
- }
1853
- ),
1854
- /* @__PURE__ */ jsxs("div", { className: cn("flex shrink-0 items-center gap-1.5", isRow && "ml-auto"), children: [
1855
- type && type !== "markdown" && /* @__PURE__ */ jsx("span", { className: "rounded bg-background px-1.5 py-0.5 text-xs uppercase tracking-wide text-muted-foreground", children: type }),
1856
- /* @__PURE__ */ jsx("span", { className: "rounded bg-background px-1.5 py-0.5 text-xs text-muted-foreground", children: sourceLabel })
1857
- ] })
1858
- ]
1859
- }
1860
- );
1861
- }
1862
- function SkillDetail({
1863
- title,
1864
- sourceLabel,
1865
- description,
1866
- icon,
1867
- notice,
1868
- children,
1869
- actions,
1870
- testId
1871
- }) {
1872
- return /* @__PURE__ */ jsxs(
1873
- "section",
1874
- {
1875
- className: "flex min-h-0 flex-1 flex-col",
1876
- "data-testid": testId ?? "skill-detail",
1877
- "data-slot": "skill-detail",
1878
- "aria-label": title,
1879
- children: [
1880
- /* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 space-y-4 overflow-y-auto p-4", children: [
1881
- /* @__PURE__ */ jsxs("header", { className: "space-y-1", children: [
1882
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
1883
- icon && /* @__PURE__ */ jsx("span", { className: "text-ai-ink [&>svg]:size-5", children: icon }),
1884
- /* @__PURE__ */ jsx("h3", { className: "text-base font-semibold text-foreground", children: title }),
1885
- /* @__PURE__ */ jsx("span", { className: "rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground", children: sourceLabel })
1886
- ] }),
1887
- description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: description }),
1888
- notice && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground", children: notice })
1889
- ] }),
1890
- children
1891
- ] }),
1892
- actions && /* @__PURE__ */ jsx(
1893
- "div",
1894
- {
1895
- className: "flex flex-wrap gap-2 border-t border-border bg-background p-3",
1896
- "data-slot": "skill-detail-actions",
1897
- children: actions
1898
- }
1899
- )
1900
- ]
1901
- }
1902
- );
1903
- }
1904
- function SkillDetailSection({
1905
- title,
1906
- children,
1907
- testId
1908
- }) {
1909
- return /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", "data-testid": testId, children: [
1910
- /* @__PURE__ */ jsx("h4", { className: "text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: title }),
1911
- children
1912
- ] });
1913
- }
1914
- var DEFAULT_TASK_PLAN_LABELS = {
1915
- emptyTitle: "Draft a plan to review",
1916
- emptyBody: "The assistant writes a short checklist of what its work must cover. You can edit it, and it checks its own draft against it before handing it to you.",
1917
- drafting: "Drafting plan\u2026",
1918
- generate: "Draft a plan",
1919
- needWorkspace: "Open a workspace to plan: the checklist is encrypted under its key.",
1920
- needObjective: "Say what the assistant should do first: the plan is drafted from it.",
1921
- goalTask: "Drafted for your review",
1922
- scopedTo: "for",
1923
- redraft: "Redraft",
1924
- removePlan: "Remove plan",
1925
- goal: "Objective",
1926
- goalPlaceholder: "What should the finished work achieve?",
1927
- checklist: "The draft must",
1928
- criteriaCount: (count) => `${count} ${count === 1 ? "criterion" : "criteria"}`,
1929
- add: "Add",
1930
- noCriteria: "Nothing yet. Add at least one thing the draft must cover.",
1931
- criterionPlaceholder: "Something specific you can check\u2026",
1932
- removeCriterion: (n) => `Remove item ${n}`,
1933
- retryBudget: "Revision rounds",
1934
- passes: (count) => `up to ${count} ${count === 1 ? "round" : "rounds"}`,
1935
- passesHelp: "How many times the assistant may revise its own draft before it hands it over.",
1936
- workingDocuments: "Documents it will use",
1937
- workingDocumentsHelp: "The plan limits the assistant to these documents."
1938
- };
1939
- function nextCriterionId(criteria) {
1940
- const max = criteria.reduce((m, c) => {
1941
- const n = Number(/^c(\d+)$/.exec(c.id)?.[1] ?? 0);
1942
- return Number.isFinite(n) && n > m ? n : m;
1943
- }, 0);
1944
- return `c${max + 1}`;
1945
- }
1946
- function TaskPlan({
1947
- plan,
1948
- onChange,
1949
- onGenerate,
1950
- isGenerating,
1951
- workspaceName,
1952
- objective,
1953
- documentNames,
1954
- testIds,
1955
- labels
1098
+ isGenerating,
1099
+ workspaceName,
1100
+ objective,
1101
+ documentNames,
1102
+ testIds,
1103
+ labels
1956
1104
  }) {
1957
1105
  const l = { ...DEFAULT_TASK_PLAN_LABELS, ...labels };
1958
1106
  const canGenerate = !!workspaceName && !!objective.trim() && !isGenerating;
@@ -2442,13 +1590,13 @@ function describeRRule(rrule) {
2442
1590
  if (!rrule) return "Recurring";
2443
1591
  const preset = parseRRule(rrule);
2444
1592
  if (!preset) return rrule;
2445
- const time2 = `${pad2(preset.hour)}:${pad2(preset.minute)}`;
2446
- if (preset.frequency === "daily") return `Daily at ${time2}`;
1593
+ const time = `${pad2(preset.hour)}:${pad2(preset.minute)}`;
1594
+ if (preset.frequency === "daily") return `Daily at ${time}`;
2447
1595
  if (preset.frequency === "weekly") {
2448
1596
  const days = preset.weekdays.map((d) => WEEKDAY_LABELS[d]).join(", ");
2449
- return `Weekly on ${days} at ${time2}`;
1597
+ return `Weekly on ${days} at ${time}`;
2450
1598
  }
2451
- return `Monthly on the ${ordinal(preset.monthDay)} at ${time2}`;
1599
+ return `Monthly on the ${ordinal(preset.monthDay)} at ${time}`;
2452
1600
  }
2453
1601
  var DEFAULT_RECURRENCE_BUILDER_LABELS = {
2454
1602
  rruleLabel: "Custom schedule (iCalendar rule)",
@@ -2646,22 +1794,6 @@ function goalProgress(task) {
2646
1794
  if (!gs || gs.criteria_total == null) return null;
2647
1795
  return { met: gs.criteria_met ?? 0, total: gs.criteria_total, done: gs.done === true };
2648
1796
  }
2649
- function PersonPill({ person, size = "sm", testId }) {
2650
- return /* @__PURE__ */ jsx("span", { "data-testid": testId, className: "inline-flex min-w-0", children: /* @__PURE__ */ jsx(
2651
- UserEntity,
2652
- {
2653
- variant: "pill",
2654
- size,
2655
- interactive: false,
2656
- showTooltip: false,
2657
- initials: initials(person.label),
2658
- displayName: person.label,
2659
- avatarStyle: person.id ? getEntityColorStyles(person.id) : void 0,
2660
- isAgent: person.isAgent,
2661
- isMe: person.isMe
2662
- }
2663
- ) });
2664
- }
2665
1797
  var DEFAULT_TASK_OUTPUTS_CELL_LABELS = {
2666
1798
  none: "\u2014",
2667
1799
  open: (count) => `${count} ${count === 1 ? "output" : "outputs"}`,
@@ -5535,672 +4667,6 @@ function NewThreadDialog({
5535
4667
  }
5536
4668
  ) });
5537
4669
  }
5538
- var DEFAULT_TASK_TRIGGER_CHIP_LABELS = {
5539
- after: (name) => `After \u201C${name}\u201D is done`,
5540
- afterUnknown: "After another task is done",
5541
- onDemand: "Manual"
5542
- };
5543
- function TriggerIcon({ type, chained }) {
5544
- const cls = "size-3.5 shrink-0 text-muted-foreground";
5545
- if (chained) return /* @__PURE__ */ jsx(Link2, { className: cls, "aria-hidden": true });
5546
- switch (type) {
5547
- case "on_demand":
5548
- return /* @__PURE__ */ jsx(MousePointerClick, { className: cls, "aria-hidden": true });
5549
- case "recurring":
5550
- return /* @__PURE__ */ jsx(Clock, { className: cls, "aria-hidden": true });
5551
- case "event":
5552
- return /* @__PURE__ */ jsx(Bell, { className: cls, "aria-hidden": true });
5553
- default:
5554
- return /* @__PURE__ */ jsx(Clock, { className: cls, "aria-hidden": true });
5555
- }
5556
- }
5557
- function TaskTriggerChip({
5558
- id,
5559
- triggerType,
5560
- summary,
5561
- afterTaskId,
5562
- afterTaskName,
5563
- testId,
5564
- labels
5565
- }) {
5566
- const l = { ...DEFAULT_TASK_TRIGGER_CHIP_LABELS, ...labels };
5567
- const chained = Boolean(afterTaskId);
5568
- const text2 = chained ? afterTaskName ? l.after(afterTaskName) : l.afterUnknown : triggerType === "on_demand" ? l.onDemand : summary;
5569
- return /* @__PURE__ */ jsxs(
5570
- "span",
5571
- {
5572
- className: "inline-flex min-w-0 max-w-full items-center gap-1.5 text-sm font-normal text-foreground",
5573
- "data-testid": testIdOr(testId, { testId: `task-trigger-${id}` }),
5574
- "data-trigger": chained ? "task" : triggerType,
5575
- children: [
5576
- /* @__PURE__ */ jsx(TriggerIcon, { type: triggerType, chained }),
5577
- /* @__PURE__ */ jsx("span", { className: "truncate", children: text2 })
5578
- ]
5579
- }
5580
- );
5581
- }
5582
-
5583
- // src/agents/tasks/workflowRows.ts
5584
- var isSkillRow = (row) => row.kind === "skill";
5585
- var hasTrigger = (row) => !row.on_demand && Boolean(row.rrule || row.run_at || row.event_kind || row.after_conversation_ext_id);
5586
- function workflowStatus(row) {
5587
- if (isSkillRow(row) || !hasTrigger(row)) return "on_demand";
5588
- return row.active ? "active" : "paused";
5589
- }
5590
- function workflowTriggerType(workflow) {
5591
- if (workflow.on_demand) return "on_demand";
5592
- if (workflow.after_conversation_ext_id) return "after";
5593
- if (workflow.event_kind) return "event";
5594
- if (workflow.rrule) return "recurring";
5595
- if (workflow.run_at) return "one_time";
5596
- return "on_demand";
5597
- }
5598
- function workflowRunStatusLabel(status) {
5599
- if (!status) return "None";
5600
- const labels = {
5601
- completed: "Success",
5602
- success: "Success",
5603
- failed: "Failed",
5604
- running: "In progress",
5605
- awaiting_authorization: "Awaiting access"
5606
- };
5607
- return labels[status] ?? status.replaceAll("_", " ");
5608
- }
5609
- function listedRunStatus(status, threadStatus) {
5610
- if (threadStatus === "done" && status === "running") return "completed";
5611
- return status;
5612
- }
5613
-
5614
- // src/agents/tasks/workflowColumns.tsx
5615
- var WORKFLOW_COLUMN_ORDER = [
5616
- "name",
5617
- "trigger",
5618
- "last_run",
5619
- "result",
5620
- "status",
5621
- "shared",
5622
- "actions"
5623
- ];
5624
- function cell2(render) {
5625
- return (params) => params.data ? render(params.data) : null;
5626
- }
5627
- var time = (iso) => iso ? Date.parse(iso) : Number.POSITIVE_INFINITY;
5628
- function createWorkflowColumns(o) {
5629
- const l = o.labels;
5630
- const base = {
5631
- sortable: false,
5632
- cellStyle: { display: "flex", alignItems: "center" }
5633
- };
5634
- return [
5635
- {
5636
- ...base,
5637
- colId: "name",
5638
- sortable: true,
5639
- headerName: l.colName,
5640
- flex: 3,
5641
- minWidth: 210,
5642
- valueGetter: (p) => p.data?.name.toLowerCase() ?? "",
5643
- cellRenderer: cell2(o.renderName)
5644
- },
5645
- {
5646
- ...base,
5647
- colId: "trigger",
5648
- headerName: l.colTrigger,
5649
- flex: 2.4,
5650
- minWidth: 185,
5651
- valueGetter: (p) => p.data ? o.getTriggerText(p.data) : "",
5652
- cellRenderer: cell2(o.renderTrigger)
5653
- },
5654
- {
5655
- ...base,
5656
- colId: "last_run",
5657
- sortable: true,
5658
- headerName: l.colLastRun,
5659
- flex: 1.4,
5660
- minWidth: 140,
5661
- cellStyle: { display: "flex", alignItems: "center", padding: 0 },
5662
- valueGetter: (p) => time(p.data?.last_fired_at),
5663
- cellRenderer: cell2(o.renderLastRun)
5664
- },
5665
- {
5666
- ...base,
5667
- colId: "result",
5668
- headerName: "Result",
5669
- width: 130,
5670
- valueGetter: (p) => p.data?.last_run_status ?? "",
5671
- cellStyle: { display: "flex", alignItems: "center", padding: 0 },
5672
- cellRenderer: cell2(o.renderResult)
5673
- },
5674
- {
5675
- ...base,
5676
- colId: "status",
5677
- sortable: true,
5678
- headerName: l.colStatus,
5679
- width: 120,
5680
- valueGetter: (p) => p.data ? workflowStatus(p.data) : "",
5681
- cellRenderer: cell2(o.renderStatus)
5682
- },
5683
- {
5684
- ...base,
5685
- colId: "shared",
5686
- headerName: l.colShared,
5687
- headerTooltip: l.shared,
5688
- width: 96,
5689
- cellStyle: { display: "flex", alignItems: "center", justifyContent: "center" },
5690
- valueGetter: (p) => p.data?.shared ?? false,
5691
- cellRenderer: cell2(o.renderShared)
5692
- },
5693
- {
5694
- ...base,
5695
- colId: "actions",
5696
- headerName: "",
5697
- width: 180,
5698
- minWidth: 180,
5699
- cellStyle: { display: "flex", alignItems: "center", justifyContent: "flex-end" },
5700
- cellRenderer: cell2(o.renderActions)
5701
- }
5702
- ];
5703
- }
5704
-
5705
- // src/agents/tasks/workflowTableLabels.ts
5706
- var DEFAULT_WORKFLOW_LIST_LABELS = {
5707
- colName: "Name",
5708
- colType: "Type",
5709
- colTrigger: "When",
5710
- colAction: "What it does",
5711
- colAgent: "Agent",
5712
- colStatus: "Active",
5713
- colShared: "Shared",
5714
- colLastRun: "Last run",
5715
- colNextRun: "Next run",
5716
- shared: "Shared with the workspace",
5717
- sharedOwnerOnly: "Only the creator can change who can see this",
5718
- deleteOwnerOnly: "Only the creator or workspace owner can delete this",
5719
- typeSkill: "Skill",
5720
- typeWorkflow: "Workflow",
5721
- statusActive: "Active",
5722
- statusPaused: "Inactive",
5723
- statusOnDemand: "On demand",
5724
- activeSwitch: (name) => `Active: \u201C${name}\u201D`,
5725
- agent: "Agent",
5726
- myAssistant: "My assistant",
5727
- me: "Me",
5728
- someone: "Someone",
5729
- never: "Never",
5730
- none: "\u2014",
5731
- reminder: "Reminder",
5732
- failed: "Failed",
5733
- lastRunFailed: "Last run failed",
5734
- openLastRun: "Open the task this run created",
5735
- editWorkflow: "Edit",
5736
- run: "Run",
5737
- runLater: "Run later",
5738
- runNow: "Run now",
5739
- runs: "Runs",
5740
- delete: "Delete",
5741
- moreActions: "More actions",
5742
- searchLabel: "Search workflows",
5743
- searchPlaceholder: "Search workflows and skills\u2026",
5744
- emptyTitle: "Nothing to run yet",
5745
- emptyMessage: "Skills and workflows you can run will appear here.",
5746
- firstRun: "Run a skill now, or choose Run later to save it as a workflow that runs on its own.",
5747
- noMatches: "Nothing in this view.",
5748
- filterAll: "All",
5749
- filterSkills: "Skills",
5750
- filterWorkflows: "Workflows",
5751
- filterActive: "Active",
5752
- filterPaused: "Inactive",
5753
- makeActive: "Make active",
5754
- makePaused: "Deactivate",
5755
- selectAll: "Select all",
5756
- selectWorkflow: (name) => `Select ${name}`
5757
- };
5758
- var ROW_HEIGHT2 = 40;
5759
- function WorkflowsTable(props) {
5760
- const { workflows, isLoading, busyId, header, testId } = props;
5761
- const l = { ...DEFAULT_WORKFLOW_LIST_LABELS, ...props.labels };
5762
- const [filterStates, setFilterStates] = useState(/* @__PURE__ */ new Map());
5763
- const [filterOpen, setFilterOpen] = useState(false);
5764
- const [query, setQuery] = useState("");
5765
- const [selected, setSelected] = useState([]);
5766
- const apiRef = useRef(null);
5767
- const q = query.trim().toLowerCase();
5768
- const matches = (w) => !q || `${w.name} ${w.description ?? ""} ${w.prompt ?? ""} ${w.skill_ref ?? ""}`.toLowerCase().includes(q);
5769
- const inFilter = (w, f) => f === "all" || f === "skills" && isSkillRow(w) || f === "workflows" && !isSkillRow(w) || f === "active" && workflowStatus(w) === "active" || f === "paused" && workflowStatus(w) === "paused";
5770
- const counts = useMemo(() => {
5771
- const out = { all: 0, skills: 0, workflows: 0, active: 0, paused: 0 };
5772
- for (const w of workflows) {
5773
- if (!matches(w)) continue;
5774
- for (const f of Object.keys(out)) if (inFilter(w, f)) out[f] += 1;
5775
- }
5776
- return out;
5777
- }, [workflows, q]);
5778
- const shown = useMemo(
5779
- () => workflows.filter((w) => {
5780
- if (!matches(w)) return false;
5781
- for (const group of [
5782
- ["skills", "workflows"],
5783
- ["active", "paused"]
5784
- ]) {
5785
- const included = group.filter((f) => filterStates.get(f) === "include");
5786
- if (included.length && !included.some((f) => inFilter(w, f))) return false;
5787
- if (group.some((f) => filterStates.get(f) === "exclude" && inFilter(w, f))) return false;
5788
- }
5789
- return true;
5790
- }),
5791
- [workflows, filterStates, q]
5792
- );
5793
- const renderPerson = props.renderPerson ?? ((p) => /* @__PURE__ */ jsx(PersonPill, { person: p }));
5794
- const actionText = (w) => {
5795
- if (w.action)
5796
- return w.action.type === "email_documents" ? "Email latest documents" : "AI Review";
5797
- if (isSkillRow(w))
5798
- return w.description || w.skill_ref && props.skillNames?.[w.skill_ref] || w.name;
5799
- return w.skill_ref ? props.skillNames?.[w.skill_ref] ?? w.skill_ref : w.prompt?.trim() || l.reminder;
5800
- };
5801
- const latest = useRef({ props, l, renderPerson, actionText });
5802
- latest.current = { props, l, renderPerson, actionText };
5803
- const columnDefs = useMemo(
5804
- () => createWorkflowColumns({
5805
- labels: l,
5806
- getTriggerText: (w) => isSkillRow(w) ? l.statusOnDemand : latest.current.props.describeTrigger(w),
5807
- renderName: (w) => {
5808
- const { l: lb } = latest.current;
5809
- const skill = isSkillRow(w);
5810
- const text2 = skill ? latest.current.actionText(w) : w.description || latest.current.actionText(w);
5811
- const stem = w.name.replace(/…$/, "").trim();
5812
- const about = text2 && text2.trim() !== w.name.trim() && text2.trim() !== stem ? text2 : "";
5813
- return /* @__PURE__ */ jsxs("div", { className: "min-w-0 leading-tight", children: [
5814
- /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
5815
- /* @__PURE__ */ jsx(
5816
- "span",
5817
- {
5818
- className: cn(
5819
- "truncate text-sm font-normal",
5820
- workflowStatus(w) === "paused" && "text-muted-foreground"
5821
- ),
5822
- "data-testid": `workflow-name-${w.external_id}`,
5823
- children: w.name
5824
- }
5825
- ),
5826
- skill && /* @__PURE__ */ jsx(
5827
- "span",
5828
- {
5829
- className: "shrink-0 rounded-full border border-border px-1.5 text-[11px] text-muted-foreground",
5830
- "data-testid": `workflow-type-${w.external_id}`,
5831
- children: lb.typeSkill
5832
- }
5833
- )
5834
- ] }),
5835
- about && !latest.current.props.automationsOnly && /* @__PURE__ */ jsx(
5836
- "p",
5837
- {
5838
- className: "truncate text-xs text-muted-foreground",
5839
- "data-testid": `workflow-action-${w.external_id}`,
5840
- children: about
5841
- }
5842
- )
5843
- ] });
5844
- },
5845
- renderTrigger: (w) => {
5846
- const { props: p } = latest.current;
5847
- const after = w.after_conversation_ext_id;
5848
- const skill = isSkillRow(w);
5849
- return /* @__PURE__ */ jsx("div", { className: "min-w-0 leading-tight", children: /* @__PURE__ */ jsx(
5850
- TaskTriggerChip,
5851
- {
5852
- id: w.external_id,
5853
- testId: `workflow-trigger-${w.external_id}`,
5854
- triggerType: workflowTriggerType(w),
5855
- summary: skill ? "" : p.describeTrigger(w),
5856
- afterTaskId: after,
5857
- afterTaskName: after ? p.taskNames?.[after] : void 0,
5858
- labels: p.triggerChipLabels
5859
- }
5860
- ) });
5861
- },
5862
- renderStatus: (w) => {
5863
- const { props: p, l: lb } = latest.current;
5864
- const canEdit = w.is_owner !== false || Boolean(p.canEditShared);
5865
- return /* @__PURE__ */ jsx(
5866
- Switch,
5867
- {
5868
- checked: hasTrigger(w) && !isSkillRow(w) && Boolean(w.active),
5869
- disabled: !hasTrigger(w) || isSkillRow(w) || !canEdit || p.busyId === w.external_id,
5870
- onCheckedChange: (next) => p.onToggleActive(w, next),
5871
- className: "disabled:data-[state=unchecked]:bg-muted dark:disabled:data-[state=unchecked]:bg-muted",
5872
- "aria-label": lb.activeSwitch(w.name),
5873
- "data-testid": `workflow-active-${w.external_id}`
5874
- }
5875
- );
5876
- },
5877
- renderShared: (w) => {
5878
- const { props: p, l: lb } = latest.current;
5879
- if (!p.onToggleShared || isSkillRow(w)) return null;
5880
- const isCreator = w.is_owner !== false;
5881
- return /* @__PURE__ */ jsx(
5882
- VisibilityToggle,
5883
- {
5884
- items: { shared: w.shared ?? false },
5885
- onToggle: (share) => latest.current.props.onToggleShared?.(w, share),
5886
- disabled: !isCreator || p.busyId === w.external_id,
5887
- disabledTooltip: lb.sharedOwnerOnly,
5888
- showLabel: false,
5889
- "data-testid": `workflow-shared-${w.external_id}`
5890
- }
5891
- );
5892
- },
5893
- renderLastRun: (w) => {
5894
- const { props: p, l: lb } = latest.current;
5895
- const at = w.last_fired_at ?? p.lastRuns?.[w.external_id]?.at;
5896
- return /* @__PURE__ */ jsx(
5897
- "button",
5898
- {
5899
- type: "button",
5900
- className: "h-full w-full truncate px-4 text-left text-sm hover:text-primary",
5901
- onClick: () => p.onViewRuns?.(w),
5902
- title: "View run history",
5903
- "data-testid": `workflow-last-run-${w.external_id}`,
5904
- children: at ? p.formatDate(at) : lb.never
5905
- }
5906
- );
5907
- },
5908
- renderResult: (w) => {
5909
- const status = listedRunStatus(
5910
- w.last_run_status,
5911
- latest.current.props.lastRuns?.[w.external_id]?.threadStatus
5912
- );
5913
- const label = workflowRunStatusLabel(status);
5914
- return /* @__PURE__ */ jsx(
5915
- "button",
5916
- {
5917
- type: "button",
5918
- onClick: () => latest.current.props.onViewRuns?.(w),
5919
- title: "View run history",
5920
- className: cn(
5921
- badgeVariants({ variant: "outline" }),
5922
- "mx-4 cursor-pointer text-xs font-medium",
5923
- status === "failed" ? "border-red-border bg-red-bg text-red-text hover:bg-red-bg/80" : status === "completed" || status === "success" ? "border-green-border bg-green-bg text-green-text hover:bg-green-bg/80" : status ? "border-primary/20 bg-primary/10 text-primary hover:bg-primary/15" : "border-border bg-muted text-muted-foreground hover:bg-muted/80"
5924
- ),
5925
- "data-testid": `workflow-result-${w.external_id}`,
5926
- children: label
5927
- }
5928
- );
5929
- },
5930
- renderActions: (w) => {
5931
- const { props: p, l: lb } = latest.current;
5932
- const id = w.external_id;
5933
- const skill = isSkillRow(w);
5934
- const busy = p.busyId === id;
5935
- const isOwner = w.is_owner !== false;
5936
- const canEdit = isOwner || Boolean(p.canEditShared);
5937
- const canAdmin = isOwner || Boolean(p.isWorkspaceOwner);
5938
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-1", children: [
5939
- (skill || canEdit) && /* @__PURE__ */ jsxs(
5940
- Button,
5941
- {
5942
- size: "sm",
5943
- variant: "outline",
5944
- className: "h-8 gap-1.5 pointer-coarse:h-11",
5945
- disabled: busy,
5946
- onClick: () => p.onRun(w),
5947
- "data-testid": `workflow-run-btn-${id}`,
5948
- children: [
5949
- /* @__PURE__ */ jsx(Play, { className: "size-3.5", "aria-hidden": true }),
5950
- lb.run
5951
- ]
5952
- }
5953
- ),
5954
- /* @__PURE__ */ jsxs(DropdownMenu, { children: [
5955
- /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
5956
- Button,
5957
- {
5958
- variant: "ghost",
5959
- size: "icon",
5960
- className: "size-8 pointer-coarse:size-11",
5961
- "aria-label": lb.moreActions,
5962
- "data-testid": `workflow-menu-${id}`,
5963
- children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4", "aria-hidden": true })
5964
- }
5965
- ) }),
5966
- /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", children: [
5967
- skill && p.onRunLater && /* @__PURE__ */ jsxs(
5968
- DropdownMenuItem,
5969
- {
5970
- onSelect: () => p.onRunLater?.(w),
5971
- "data-testid": `workflow-run-later-${id}`,
5972
- children: [
5973
- /* @__PURE__ */ jsx(History, { className: "mr-2 size-4", "aria-hidden": true }),
5974
- lb.runLater
5975
- ]
5976
- }
5977
- ),
5978
- !skill && canEdit && /* @__PURE__ */ jsxs(
5979
- DropdownMenuItem,
5980
- {
5981
- onSelect: () => p.onEdit(w),
5982
- "data-testid": `workflow-edit-${id}`,
5983
- children: [
5984
- /* @__PURE__ */ jsx(Pencil, { className: "mr-2 size-4", "aria-hidden": true }),
5985
- lb.editWorkflow
5986
- ]
5987
- }
5988
- ),
5989
- !skill && p.onViewRuns && /* @__PURE__ */ jsxs(
5990
- DropdownMenuItem,
5991
- {
5992
- onSelect: () => p.onViewRuns?.(w),
5993
- "data-testid": `workflow-runs-${id}`,
5994
- children: [
5995
- /* @__PURE__ */ jsx(History, { className: "mr-2 size-4", "aria-hidden": true }),
5996
- lb.runs
5997
- ]
5998
- }
5999
- ),
6000
- !skill && canEdit && /* @__PURE__ */ jsxs(Fragment, { children: [
6001
- /* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
6002
- /* @__PURE__ */ jsxs(
6003
- DropdownMenuItem,
6004
- {
6005
- disabled: busy || !canAdmin,
6006
- onSelect: () => p.onDelete(w),
6007
- title: canAdmin ? void 0 : lb.deleteOwnerOnly,
6008
- className: "text-destructive focus:text-destructive",
6009
- "data-testid": `workflow-delete-${id}`,
6010
- children: [
6011
- /* @__PURE__ */ jsx(Trash2, { className: "mr-2 size-4", "aria-hidden": true }),
6012
- lb.delete
6013
- ]
6014
- }
6015
- )
6016
- ] })
6017
- ] })
6018
- ] })
6019
- ] });
6020
- }
6021
- }),
6022
- // Stable on purpose: only the header texts rebuild the columns (see `latest`).
6023
- // eslint-disable-next-line react-hooks/exhaustive-deps
6024
- [
6025
- l.colName,
6026
- l.colType,
6027
- l.colTrigger,
6028
- l.colAction,
6029
- l.colAgent,
6030
- l.colStatus,
6031
- l.colShared,
6032
- l.shared,
6033
- l.colLastRun,
6034
- l.colNextRun
6035
- ]
6036
- );
6037
- useEffect(() => {
6038
- apiRef.current?.refreshCells({ force: true });
6039
- }, [
6040
- busyId,
6041
- props.agentNames,
6042
- props.skillNames,
6043
- props.taskNames,
6044
- props.lastRuns,
6045
- props.renderPerson,
6046
- props.labels,
6047
- props.canEditShared,
6048
- props.isWorkspaceOwner
6049
- ]);
6050
- const mine = selected.filter((w) => !isSkillRow(w));
6051
- const adminSelected = mine.filter((w) => w.is_owner !== false || props.isWorkspaceOwner);
6052
- const editableSelected = mine.filter(
6053
- (w) => hasTrigger(w) && (w.is_owner !== false || props.canEditShared)
6054
- );
6055
- const clearSelection = () => setSelected([]);
6056
- return /* @__PURE__ */ jsxs(
6057
- "div",
6058
- {
6059
- className: "flex min-h-0 flex-1 flex-col",
6060
- "data-testid": testIdOr(testId, { testId: "workflow-list" }),
6061
- children: [
6062
- /* @__PURE__ */ jsx(
6063
- TabHeader,
6064
- {
6065
- testId: "automations-tab-header",
6066
- tabs: [
6067
- {
6068
- id: "automations",
6069
- label: "",
6070
- count: shown.length,
6071
- countIcon: /* @__PURE__ */ jsx(Workflow, { className: "size-3.5" }),
6072
- countPlacement: "leading",
6073
- presentation: "count",
6074
- hasActiveFilters: !!q || [...filterStates.values()].some(Boolean)
6075
- },
6076
- ...props.tabs ?? []
6077
- ],
6078
- activeTabId: props.activeTabId ?? "automations",
6079
- onTabChange: props.onTabChange ?? (() => {
6080
- }),
6081
- firstTabContent: /* @__PURE__ */ jsx(
6082
- FilterInput,
6083
- {
6084
- value: query,
6085
- onChange: setQuery,
6086
- fields: ["text"],
6087
- onFieldsChange: () => {
6088
- },
6089
- hideFieldPicker: true,
6090
- ariaLabel: l.searchLabel,
6091
- testIds: { input: "workflow-search" },
6092
- filter: /* @__PURE__ */ jsx(
6093
- TriStateFilterMenu,
6094
- {
6095
- testId: "automations-filter-button",
6096
- open: filterOpen,
6097
- onOpenChange: setFilterOpen,
6098
- filterStates,
6099
- onFiltersChange: setFilterStates,
6100
- triggerClassName: "flex h-5 items-center gap-0.5 rounded px-1 text-muted-foreground hover:text-foreground pointer-coarse:h-11! pointer-coarse:min-w-11 pointer-coarse:justify-center",
6101
- renderChevron: true,
6102
- disableHoverOpen: true,
6103
- options: [
6104
- ...!props.automationsOnly ? [
6105
- { id: "skills", label: l.filterSkills, count: counts.skills },
6106
- {
6107
- id: "workflows",
6108
- label: l.filterWorkflows,
6109
- count: counts.workflows
6110
- }
6111
- ] : [],
6112
- { id: "active", label: l.filterActive, count: counts.active },
6113
- { id: "paused", label: l.filterPaused, count: counts.paused }
6114
- ]
6115
- }
6116
- )
6117
- }
6118
- ),
6119
- rightContent: header
6120
- }
6121
- ),
6122
- props.content ? props.content : workflows.length === 0 && !isLoading ? /* @__PURE__ */ jsx(
6123
- EmptyState,
6124
- {
6125
- icon: Workflow,
6126
- title: l.emptyTitle,
6127
- description: l.emptyMessage,
6128
- testId: "workflow-list-empty"
6129
- }
6130
- ) : /* @__PURE__ */ jsx("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsx(
6131
- GridView,
6132
- {
6133
- testId: "workflow-grid",
6134
- gridId: props.gridId ?? "workflows-grid-v2",
6135
- items: shown,
6136
- columnDefs,
6137
- getItemId: (w) => w.external_id,
6138
- getRowTestId: (w) => `workflow-row-${w.external_id}`,
6139
- isLoading,
6140
- showEmpty: shown.length === 0,
6141
- emptyState: { title: l.noMatches },
6142
- rowHeight: ROW_HEIGHT2,
6143
- height: "100%",
6144
- onGridReady: ({ api }) => {
6145
- apiRef.current = api;
6146
- },
6147
- onRowClick: (row) => props.onOpenRow?.(row),
6148
- selection: { mode: "multiple", selected, onSelectionChange: setSelected },
6149
- gridOptions: GRID_OPTIONS
6150
- }
6151
- ) }),
6152
- !props.content && /* @__PURE__ */ jsx(SelectionBar, { count: selected.length, onClear: clearSelection, children: (isCompact) => /* @__PURE__ */ jsxs(Fragment, { children: [
6153
- props.onToggleActiveMany && /* @__PURE__ */ jsxs(Fragment, { children: [
6154
- /* @__PURE__ */ jsx(
6155
- SelectionBarAction,
6156
- {
6157
- icon: Play,
6158
- label: l.makeActive,
6159
- onClick: () => {
6160
- props.onToggleActiveMany?.(editableSelected, true);
6161
- clearSelection();
6162
- },
6163
- disabled: editableSelected.length === 0,
6164
- isCompact,
6165
- testId: "workflow-bulk-activate"
6166
- }
6167
- ),
6168
- /* @__PURE__ */ jsx(
6169
- SelectionBarAction,
6170
- {
6171
- icon: Workflow,
6172
- label: l.makePaused,
6173
- onClick: () => {
6174
- props.onToggleActiveMany?.(editableSelected, false);
6175
- clearSelection();
6176
- },
6177
- disabled: editableSelected.length === 0,
6178
- isCompact,
6179
- testId: "workflow-bulk-pause"
6180
- }
6181
- )
6182
- ] }),
6183
- props.onDeleteMany && /* @__PURE__ */ jsx(
6184
- SelectionBarAction,
6185
- {
6186
- icon: Trash2,
6187
- label: l.delete,
6188
- onClick: () => {
6189
- props.onDeleteMany?.(adminSelected);
6190
- clearSelection();
6191
- },
6192
- disabled: adminSelected.length === 0,
6193
- isCompact,
6194
- className: "border-red-border text-red-text hover:bg-red-bg hover:text-red-text",
6195
- testId: "workflow-bulk-delete"
6196
- }
6197
- )
6198
- ] }) })
6199
- ]
6200
- }
6201
- );
6202
- }
6203
- var GRID_OPTIONS = { suppressClickEdit: true };
6204
4670
  function TaskActivityDialog({
6205
4671
  open,
6206
4672
  onOpenChange,
@@ -10430,6 +8896,6 @@ function AgentCreateView({
10430
8896
  ] });
10431
8897
  }
10432
8898
 
10433
- 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_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_THREAD_LAUNCHER_LABELS, DEFAULT_THREAD_STATE_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_RUN_STATUS_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, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TaskTriggerChip, TasksToolbar, ThreadActivity, ThreadLauncher, ThreadNotifyDialog, ThreadStatusLine, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WORKFLOW_COLUMN_ORDER, WorkflowConfigDialog, WorkflowDocumentsField, WorkflowLauncher, WorkflowRunStatus, 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, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowStatus, workflowTaskFields, workflowToComposerValues, workflowTriggerType, workflowWhen };
10434
- //# sourceMappingURL=chunk-LT2X5N37.js.map
10435
- //# sourceMappingURL=chunk-LT2X5N37.js.map
8899
+ export { AgentAvatarField, AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentCreateView, AgentCreatedView, AgentCreator, AgentEditView, AgentGallery, AgentMainView, 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_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_ROW_LABELS, DEFAULT_SUBAGENT_ROSTER_LABELS, DEFAULT_TASKS_CHROME_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_THREAD_LAUNCHER_LABELS, DEFAULT_THREAD_STATE_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOWS_CHROME_LABELS, DEFAULT_WORKFLOW_RUN_STATUS_LABELS, DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, EntityChip, GoalCriteria, MAX_TASK_DEPTH, NewThreadDialog, PillSelect, RecurrenceBuilder, STATUS_LABELS, STATUS_ORDER, STATUS_TONE, SkillCard, SkillRow, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TASK_COLUMN_ORDER, TRIGGER_LABELS, TaskActivityDialog, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TasksToolbar, ThreadActivity, ThreadLauncher, ThreadNotifyDialog, ThreadStatusLine, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WorkflowRunStatus, WorkflowThreadStartedBy, WorkflowThreadStrip, WorkflowsToolbar, agentConfigSectionToValues, agentCreatorToConfigSection, asTaskStatus, authModeFor, buildRRule, buildTaskRows, compactThreadActivity, composePersona, composerToTaskQuery, composerToWorkRequest, composerToWorkflowRequest, composerToWorkflowUpdate, createTaskColumns, createsWork, defaultScopeRenderer, defaultTaskComposerValues, deriveAgentName, deriveWorkflowName, descendantIds, describeRRule, filterConversationRows, firstWords, formatElapsed, goalProgress, groupThreadActivity, hasTaskFields, humanizeSection, indexTasks, inferType, inputDocumentIds, isAgenticWorkflow, isOutOfBounds, isPlainTodo, isValidAgentName, isoToLocalInput, linkedRunsFromActivity, localInputToIso, moveTargets, newThreadToRequest, nextCriterionId, ownerExtId, parseRRule, prettifyKey, resolveScopeInputs, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowTaskFields, workflowToComposerValues, workflowWhen };
8900
+ //# sourceMappingURL=chunk-UBEI6WFJ.js.map
8901
+ //# sourceMappingURL=chunk-UBEI6WFJ.js.map