@arbidocs/blocks 0.5.95 → 0.5.97

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 (109) hide show
  1. package/README.md +21 -8
  2. package/dist/{ConnectedNativeDocxComparison-FNHQKY57.js → ConnectedNativeDocxComparison-6KL5XI3L.js} +6 -6
  3. package/dist/{ConnectedNativeDocxComparison-FNHQKY57.js.map → ConnectedNativeDocxComparison-6KL5XI3L.js.map} +1 -1
  4. package/dist/{ConnectedNativeDocxComparison-KIMSYQV2.cjs → ConnectedNativeDocxComparison-P346QOX5.cjs} +7 -7
  5. package/dist/{ConnectedNativeDocxComparison-KIMSYQV2.cjs.map → ConnectedNativeDocxComparison-P346QOX5.cjs.map} +1 -1
  6. package/dist/{ConnectedNativeDocxEditor-UOZGILPM.cjs → ConnectedNativeDocxEditor-7JHSQ6KI.cjs} +7 -7
  7. package/dist/{ConnectedNativeDocxEditor-UOZGILPM.cjs.map → ConnectedNativeDocxEditor-7JHSQ6KI.cjs.map} +1 -1
  8. package/dist/{ConnectedNativeDocxEditor-WFDFGJYW.js → ConnectedNativeDocxEditor-ATZ2TG2L.js} +5 -5
  9. package/dist/{ConnectedNativeDocxEditor-WFDFGJYW.js.map → ConnectedNativeDocxEditor-ATZ2TG2L.js.map} +1 -1
  10. package/dist/{ConnectedStreamedWordArtifact-WFKYXIX5.cjs → ConnectedStreamedWordArtifact-5HI3WSAJ.cjs} +7 -7
  11. package/dist/ConnectedStreamedWordArtifact-5HI3WSAJ.cjs.map +1 -0
  12. package/dist/{ConnectedStreamedWordArtifact-SFELZUTS.js → ConnectedStreamedWordArtifact-FHSGQHXQ.js} +6 -6
  13. package/dist/{ConnectedStreamedWordArtifact-SFELZUTS.js.map → ConnectedStreamedWordArtifact-FHSGQHXQ.js.map} +1 -1
  14. package/dist/{DocumentReviewCard-X5DXEU2G.js → DocumentReviewCard-7UFQGDOG.js} +3 -3
  15. package/dist/{DocumentReviewCard-X5DXEU2G.js.map → DocumentReviewCard-7UFQGDOG.js.map} +1 -1
  16. package/dist/{DocumentReviewCard-7XUBPCQD.cjs → DocumentReviewCard-E3HB3K2G.cjs} +3 -3
  17. package/dist/{DocumentReviewCard-7XUBPCQD.cjs.map → DocumentReviewCard-E3HB3K2G.cjs.map} +1 -1
  18. package/dist/{FilesViewerDialog-H4ZXFNLV.cjs → FilesViewerDialog-3KWTQARB.cjs} +41 -32
  19. package/dist/FilesViewerDialog-3KWTQARB.cjs.map +1 -0
  20. package/dist/{FilesViewerDialog-4Q6WJMSX.js → FilesViewerDialog-EQKBFAWI.js} +40 -31
  21. package/dist/FilesViewerDialog-EQKBFAWI.js.map +1 -0
  22. package/dist/WorkspaceTableView-DYABS53K.js +1 -1
  23. package/dist/WorkspaceTableView-ZIQ7JWT5.cjs +1 -1
  24. package/dist/agents/index.cjs +254 -254
  25. package/dist/agents/index.js +4 -4
  26. package/dist/agents/workflows/WorkflowStepAction.d.ts +9 -2
  27. package/dist/agents/workflows/requiredLabels.d.ts +7 -2
  28. package/dist/{chunk-CY2K4K5M.js → chunk-42IVGYNL.js} +4 -4
  29. package/dist/{chunk-CY2K4K5M.js.map → chunk-42IVGYNL.js.map} +1 -1
  30. package/dist/{chunk-45M4QWCM.js → chunk-4LTDELP2.js} +3 -3
  31. package/dist/{chunk-45M4QWCM.js.map → chunk-4LTDELP2.js.map} +1 -1
  32. package/dist/{chunk-NIXAAPIG.js → chunk-4RCLA52C.js} +5 -5
  33. package/dist/{chunk-NIXAAPIG.js.map → chunk-4RCLA52C.js.map} +1 -1
  34. package/dist/{chunk-CJBDBBN2.cjs → chunk-6IS3IRUF.cjs} +4 -4
  35. package/dist/{chunk-CJBDBBN2.cjs.map → chunk-6IS3IRUF.cjs.map} +1 -1
  36. package/dist/{chunk-I4PB257E.js → chunk-76O7J6IZ.js} +3 -3
  37. package/dist/{chunk-I4PB257E.js.map → chunk-76O7J6IZ.js.map} +1 -1
  38. package/dist/{chunk-ZSWMRG72.cjs → chunk-AINS6VU6.cjs} +4 -4
  39. package/dist/{chunk-ZSWMRG72.cjs.map → chunk-AINS6VU6.cjs.map} +1 -1
  40. package/dist/{chunk-U4ZLFL6M.cjs → chunk-CCALU47C.cjs} +5 -5
  41. package/dist/{chunk-U4ZLFL6M.cjs.map → chunk-CCALU47C.cjs.map} +1 -1
  42. package/dist/{chunk-5ZWEUUJN.cjs → chunk-ECCV4YOL.cjs} +8 -8
  43. package/dist/{chunk-5ZWEUUJN.cjs.map → chunk-ECCV4YOL.cjs.map} +1 -1
  44. package/dist/{chunk-D3ABKS7T.cjs → chunk-HDPT7D6F.cjs} +3 -3
  45. package/dist/{chunk-D3ABKS7T.cjs.map → chunk-HDPT7D6F.cjs.map} +1 -1
  46. package/dist/{chunk-MBXQSBG3.cjs → chunk-J4CXF4A7.cjs} +170 -12
  47. package/dist/chunk-J4CXF4A7.cjs.map +1 -0
  48. package/dist/{chunk-TG4S236F.js → chunk-LZI4EGOW.js} +206 -53
  49. package/dist/chunk-LZI4EGOW.js.map +1 -0
  50. package/dist/{chunk-AJ4TBTA3.js → chunk-PCAWLVHE.js} +3 -3
  51. package/dist/{chunk-AJ4TBTA3.js.map → chunk-PCAWLVHE.js.map} +1 -1
  52. package/dist/{chunk-O5MH74TI.js → chunk-QSBPOYWA.js} +3 -3
  53. package/dist/{chunk-O5MH74TI.js.map → chunk-QSBPOYWA.js.map} +1 -1
  54. package/dist/{chunk-H2DG5HIO.js → chunk-RZG4ALKZ.js} +3 -3
  55. package/dist/{chunk-H2DG5HIO.js.map → chunk-RZG4ALKZ.js.map} +1 -1
  56. package/dist/{chunk-CVYFX7AD.js → chunk-SEBNGA3F.js} +31 -15
  57. package/dist/chunk-SEBNGA3F.js.map +1 -0
  58. package/dist/{chunk-6HI5OXB6.cjs → chunk-SYWJNSPS.cjs} +3 -3
  59. package/dist/{chunk-6HI5OXB6.cjs.map → chunk-SYWJNSPS.cjs.map} +1 -1
  60. package/dist/{chunk-SOBLG72E.js → chunk-T7LLYVOW.js} +166 -8
  61. package/dist/chunk-T7LLYVOW.js.map +1 -0
  62. package/dist/{chunk-VVQEEHDV.cjs → chunk-V2CNHRLZ.cjs} +4 -4
  63. package/dist/{chunk-VVQEEHDV.cjs.map → chunk-V2CNHRLZ.cjs.map} +1 -1
  64. package/dist/{chunk-KTHBUDYQ.cjs → chunk-WN7XPEYK.cjs} +5 -5
  65. package/dist/{chunk-KTHBUDYQ.cjs.map → chunk-WN7XPEYK.cjs.map} +1 -1
  66. package/dist/{chunk-DCHNB7DF.cjs → chunk-XM4KRGCK.cjs} +246 -93
  67. package/dist/chunk-XM4KRGCK.cjs.map +1 -0
  68. package/dist/{chunk-CIXA5A65.cjs → chunk-YZ6YOOTF.cjs} +30 -14
  69. package/dist/chunk-YZ6YOOTF.cjs.map +1 -0
  70. package/dist/{chunk-HU3MX5PY.js → chunk-Z4IPTLRS.js} +3 -3
  71. package/dist/{chunk-HU3MX5PY.js.map → chunk-Z4IPTLRS.js.map} +1 -1
  72. package/dist/connect/docx.cjs +10 -10
  73. package/dist/connect/docx.js +6 -6
  74. package/dist/connect/index.cjs +279 -249
  75. package/dist/connect/index.cjs.map +1 -1
  76. package/dist/connect/index.js +52 -22
  77. package/dist/connect/index.js.map +1 -1
  78. package/dist/connect/viewer.cjs +3 -3
  79. package/dist/connect/viewer.js +2 -2
  80. package/dist/connection/files/page/ConnectedFilesPage.d.ts +11 -7
  81. package/dist/connection/viewer/DocumentViewerDialog.d.ts +3 -0
  82. package/dist/connection/viewer/documentPlace.d.ts +10 -4
  83. package/dist/connection/workflows/ConnectedWorkflowRunPage.d.ts +4 -3
  84. package/dist/connection/workflows/WorkflowRunPage.d.ts +18 -15
  85. package/dist/connection/workflows/index.d.ts +2 -1
  86. package/dist/connection/workflows/runProject.d.ts +47 -0
  87. package/dist/embed/index.cjs +2 -2
  88. package/dist/embed/index.js +2 -2
  89. package/dist/facts/index.cjs +43 -43
  90. package/dist/facts/index.js +2 -2
  91. package/dist/index.cjs +307 -307
  92. package/dist/index.js +6 -6
  93. package/dist/settings/index.cjs +1 -1
  94. package/dist/settings/index.js +1 -1
  95. package/dist/workflow-canvas/index.cjs +23 -23
  96. package/dist/workflow-canvas/index.js +8 -8
  97. package/dist/workspaces/index.cjs +8 -8
  98. package/dist/workspaces/index.js +1 -1
  99. package/node_modules/@arbidocs/coedit/package.json +1 -1
  100. package/package.json +5 -5
  101. package/dist/ConnectedStreamedWordArtifact-WFKYXIX5.cjs.map +0 -1
  102. package/dist/FilesViewerDialog-4Q6WJMSX.js.map +0 -1
  103. package/dist/FilesViewerDialog-H4ZXFNLV.cjs.map +0 -1
  104. package/dist/chunk-CIXA5A65.cjs.map +0 -1
  105. package/dist/chunk-CVYFX7AD.js.map +0 -1
  106. package/dist/chunk-DCHNB7DF.cjs.map +0 -1
  107. package/dist/chunk-MBXQSBG3.cjs.map +0 -1
  108. package/dist/chunk-SOBLG72E.js.map +0 -1
  109. package/dist/chunk-TG4S236F.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
  import { parseRRule, DEFAULT_RECURRENCE, buildRRule, WEEKDAYS, EntityChip } from './chunk-RIBQCTBQ.js';
3
3
  import { ProgressChevronBar, ProgressChevron } from './chunk-LRPGXNMA.js';
4
4
  import { WORD_WORKFLOWS } from './chunk-3NBIP4K2.js';
5
- import { SchemaForm, PersonPill } from './chunk-H2DG5HIO.js';
5
+ import { SchemaForm, PersonPill } from './chunk-RZG4ALKZ.js';
6
6
  import { workflowRunStatusLabel } from './chunk-4QUUU7GH.js';
7
7
  import { ScopePicker, FoldSection, AddFilesFirst } from './chunk-DL6KPLNR.js';
8
8
  import { MultiSelect } from './chunk-I2W77S37.js';
@@ -27,8 +27,8 @@ import { ModalHeader } from './chunk-TX2ZICS7.js';
27
27
  import { testIdOr } from './chunk-UP3GCNPM.js';
28
28
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
29
29
  import { memo, forwardRef, useState, useMemo, useRef, useEffect, useCallback, useSyncExternalStore } from 'react';
30
- import { ChevronDown, ChevronRight, Plus, Trash2, Globe, Terminal, Telescope, ListChecks, FileText, ImageIcon, Brain, Wand2, UserRound, CornerUpLeft, ShieldCheck, MessageSquare, Check, Hourglass, Clock, PenLine, X, ExternalLink, Mail, Table2, CheckCircle2, ArrowLeft, Loader2, ArrowRight, RotateCw, GitBranch, AlertTriangle, Sparkles, Library, Image, Languages, NotebookPen, GanttChartSquare, Eye, ClipboardList, Pencil, Copy, Bot, Play, Lock, Download, FileX, SkipForward, CornerDownRight, AlertCircle, KeyRound, Workflow, ChevronsUpDown, ChevronsDownUp, ListTodo, CheckCheck, CalendarClock, Zap, MessagesSquare, History, ChevronUp, Pause, Activity, MoreVertical, LayoutGrid, List, CornerLeftUp, CircleDashed, MoreHorizontal, RotateCcw, ListPlus, CircleCheck, Hand, ArrowUpRight, BellRing, Flag, Disc, Phone, UserRoundCog, MessageSquareReply, Square, ChevronLeft } from 'lucide-react';
31
- import { cn, Label, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Textarea, Input, Switch, Button, Collapsible, CollapsibleTrigger, CollapsibleContent, Card, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Badge, Slider, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, VisibilityToggle, ThreadVisibilityIcon, Popover, PopoverTrigger, EntityPill, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandItem, UserEntity, ARBI_MARK_SRC, DropdownMenuSeparator, DialogClose, PopoverClose } from '@arbidocs/react/ui';
30
+ import { ChevronDown, ChevronRight, Plus, Trash2, Globe, Terminal, Telescope, ListChecks, FileText, ImageIcon, Brain, Wand2, UserRound, CornerUpLeft, ShieldCheck, MessageSquare, Check, Hourglass, Clock, PenLine, X, ExternalLink, Mail, Table2, CheckCircle2, ArrowLeft, Loader2, ArrowRight, RotateCw, GitBranch, AlertTriangle, Sparkles, Library, Image, Languages, NotebookPen, GanttChartSquare, MoreHorizontal, Eye, ClipboardList, Pencil, Copy, Bot, Play, Lock, Download, FileX, SkipForward, CornerDownRight, AlertCircle, KeyRound, Workflow, ChevronsUpDown, ChevronsDownUp, ListTodo, CheckCheck, CalendarClock, Zap, MessagesSquare, History, ChevronUp, Pause, Activity, MoreVertical, LayoutGrid, List, CornerLeftUp, CircleDashed, RotateCcw, ListPlus, CircleCheck, Hand, ArrowUpRight, BellRing, Flag, Disc, Phone, UserRoundCog, MessageSquareReply, Square, ChevronLeft } from 'lucide-react';
31
+ import { cn, Label, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Textarea, Input, Switch, Button, Collapsible, CollapsibleTrigger, CollapsibleContent, Card, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Badge, Slider, VisibilityToggle, ThreadVisibilityIcon, Popover, PopoverTrigger, EntityPill, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandItem, UserEntity, ARBI_MARK_SRC, DropdownMenuSeparator, DialogClose, PopoverClose } from '@arbidocs/react/ui';
32
32
  import { unzip, strFromU8 } from 'fflate';
33
33
  import { isSharedSkill } from '@arbidocs/sdk/browser';
34
34
 
@@ -2278,6 +2278,162 @@ var asForm = (step) => ({
2278
2278
  landing: "chat"
2279
2279
  });
2280
2280
  function WorkflowStepAction({
2281
+ step,
2282
+ phase,
2283
+ steps,
2284
+ states,
2285
+ inputs,
2286
+ me,
2287
+ nameOf,
2288
+ onComplete,
2289
+ onUpload,
2290
+ onSendBack,
2291
+ onDecline,
2292
+ onOpenDocument,
2293
+ onOpenDraft,
2294
+ onOpenReview
2295
+ }) {
2296
+ if (step.kind === "upload" && phase === "ready" && onUpload)
2297
+ return /* @__PURE__ */ jsx(UploadStepAction, { step, onUpload, onComplete });
2298
+ return /* @__PURE__ */ jsx(
2299
+ StepAction,
2300
+ {
2301
+ ...{ step, phase, steps, states, inputs, me, nameOf, onComplete, onSendBack, onDecline },
2302
+ ...{ onOpenDocument, onOpenDraft, onOpenReview }
2303
+ }
2304
+ );
2305
+ }
2306
+ var FILE_STATUS = {
2307
+ uploading: "Uploading",
2308
+ added: "Added",
2309
+ failed: "Failed"
2310
+ };
2311
+ function UploadStepAction({
2312
+ step,
2313
+ onUpload,
2314
+ onComplete
2315
+ }) {
2316
+ const [files, setFiles] = useState([]);
2317
+ const [busy, setBusy] = useState(false);
2318
+ const [error, setError] = useState(null);
2319
+ const seq = useRef(0);
2320
+ const tid = `workflow-step-action-${step.id}`;
2321
+ const uploading = files.some((f) => f.status === "uploading");
2322
+ const documents = files.flatMap((f) => f.documents);
2323
+ const settle = (key, patch) => setFiles((all) => all.map((f) => f.key === key ? { ...f, ...patch } : f));
2324
+ const send = (key, file) => onUpload([file]).then(
2325
+ (ids) => settle(key, { status: "added", documents: ids, error: void 0 }),
2326
+ (e) => settle(key, {
2327
+ status: "failed",
2328
+ error: e instanceof Error && e.message ? e.message : "Upload failed"
2329
+ })
2330
+ );
2331
+ const add = (picked) => {
2332
+ const batch = picked.map((file) => ({
2333
+ key: ++seq.current,
2334
+ file,
2335
+ status: "uploading",
2336
+ documents: []
2337
+ }));
2338
+ setFiles((all) => [...all, ...batch]);
2339
+ for (const f of batch) void send(f.key, f.file);
2340
+ };
2341
+ const retry = (f) => {
2342
+ settle(f.key, { status: "uploading", error: void 0 });
2343
+ void send(f.key, f.file);
2344
+ };
2345
+ const remove = (key) => setFiles((all) => all.filter((f) => f.key !== key));
2346
+ const complete = async (docs) => {
2347
+ setBusy(true);
2348
+ setError(null);
2349
+ try {
2350
+ await onComplete(void 0, docs);
2351
+ } catch (e) {
2352
+ setError(e instanceof Error ? e.message : "Could not do that");
2353
+ } finally {
2354
+ setBusy(false);
2355
+ }
2356
+ };
2357
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-2 p-1", "data-testid": tid, children: [
2358
+ /* @__PURE__ */ jsx(
2359
+ UploadDropzone,
2360
+ {
2361
+ onFiles: add,
2362
+ accept: step.accept,
2363
+ hint: step.hint,
2364
+ disabled: busy,
2365
+ className: "py-4",
2366
+ testId: `${tid}-drop`
2367
+ }
2368
+ ),
2369
+ /* @__PURE__ */ jsx("ul", { "aria-live": "polite", className: "space-y-0.5 text-xs", "data-testid": `${tid}-added`, children: files.map((f) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-1.5", children: [
2370
+ f.status === "uploading" ? /* @__PURE__ */ jsx(Loader2, { className: "size-3 shrink-0 animate-spin text-muted-foreground", "aria-hidden": true }) : f.status === "added" ? /* @__PURE__ */ jsx(Check, { className: "size-3 shrink-0 text-success", "aria-hidden": true }) : /* @__PURE__ */ jsx(AlertTriangle, { className: "size-3 shrink-0 text-destructive", "aria-hidden": true }),
2371
+ /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
2372
+ FILE_STATUS[f.status],
2373
+ ":"
2374
+ ] }),
2375
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: f.file.name }),
2376
+ f.status === "failed" && /* @__PURE__ */ jsxs(Fragment, { children: [
2377
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-destructive", children: f.error }),
2378
+ /* @__PURE__ */ jsxs("span", { className: "ml-auto flex shrink-0 gap-0.5", children: [
2379
+ /* @__PURE__ */ jsx(
2380
+ Button,
2381
+ {
2382
+ size: "icon",
2383
+ variant: "ghost",
2384
+ className: "size-6",
2385
+ "aria-label": `Retry ${f.file.name}`,
2386
+ disabled: busy,
2387
+ onClick: () => retry(f),
2388
+ children: /* @__PURE__ */ jsx(RotateCw, { className: "size-3", "aria-hidden": true })
2389
+ }
2390
+ ),
2391
+ /* @__PURE__ */ jsx(
2392
+ Button,
2393
+ {
2394
+ size: "icon",
2395
+ variant: "ghost",
2396
+ className: "size-6",
2397
+ "aria-label": `Remove ${f.file.name}`,
2398
+ onClick: () => remove(f.key),
2399
+ children: /* @__PURE__ */ jsx(X, { className: "size-3", "aria-hidden": true })
2400
+ }
2401
+ )
2402
+ ] })
2403
+ ] })
2404
+ ] }, f.key)) }),
2405
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
2406
+ /* @__PURE__ */ jsx(
2407
+ Button,
2408
+ {
2409
+ size: "sm",
2410
+ className: "flex-1",
2411
+ disabled: busy || uploading || !documents.length,
2412
+ onClick: () => void complete(documents),
2413
+ "data-testid": `${tid}-done`,
2414
+ children: "Done"
2415
+ }
2416
+ ),
2417
+ /* @__PURE__ */ jsxs(DropdownMenu, { children: [
2418
+ /* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
2419
+ Button,
2420
+ {
2421
+ size: "sm",
2422
+ variant: "outline",
2423
+ className: "px-2",
2424
+ disabled: busy || uploading,
2425
+ "aria-label": "More for this step",
2426
+ "data-testid": `${tid}-more`,
2427
+ children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "size-4", "aria-hidden": true })
2428
+ }
2429
+ ) }),
2430
+ /* @__PURE__ */ jsx(DropdownMenuContent, { align: "end", children: /* @__PURE__ */ jsx(DropdownMenuItem, { onSelect: () => void complete(), "data-testid": `${tid}-already-added`, children: "Files are already added" }) })
2431
+ ] })
2432
+ ] }),
2433
+ error && /* @__PURE__ */ jsx("p", { role: "alert", className: "text-xs text-destructive", children: error })
2434
+ ] });
2435
+ }
2436
+ function StepAction({
2281
2437
  step,
2282
2438
  phase,
2283
2439
  steps,
@@ -2557,14 +2713,16 @@ function withLabelIds(workflow, ids) {
2557
2713
  });
2558
2714
  return changed ? { ...workflow, run: { ...workflow.run, steps } } : workflow;
2559
2715
  }
2716
+ var COLUMN_KINDS = /* @__PURE__ */ new Set(["label", "annotation"]);
2560
2717
  var norm = (name) => name.trim().toLowerCase();
2561
2718
  function matchRequiredLabels(required, existing) {
2562
- const byName = new Map(existing.map((t) => [norm(t.name), t.external_id]));
2719
+ const oldestFirst = existing.filter((t) => COLUMN_KINDS.has(t.kind ?? "label")).map((t, i) => ({ t, i })).sort((a, b) => (a.t.created_at ?? "").localeCompare(b.t.created_at ?? "") || a.i - b.i).map(({ t }) => t);
2563
2720
  const ids = {};
2564
2721
  const missing = [];
2565
2722
  for (const label of required) {
2566
- const id = byName.get(norm(label.name));
2567
- if (id) ids[label.key] = id;
2723
+ const name = label.name.trim();
2724
+ const found = oldestFirst.find((t) => t.name.trim() === name) ?? oldestFirst.find((t) => norm(t.name) === norm(name));
2725
+ if (found) ids[label.key] = found.external_id;
2568
2726
  else missing.push(label);
2569
2727
  }
2570
2728
  return { ids, missing };
@@ -10405,5 +10563,5 @@ function AgentCreateView({
10405
10563
  }
10406
10564
 
10407
10565
  export { ANNOTATE, ANNOTATE_ID, ActionStepBody, AgentAvatarField, AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentConnectInstructions, AgentCreateView, AgentCreatedView, AgentCreator, AgentEditView, AgentGallery, AgentMainView, AgentTypeSelector, ApprovalEvidence, AssigneeLine, BUILTIN_SKILLS, CHRONOLOGY, CHRONOLOGY_ID, CUSTOM_TASK, CUSTOM_TASK_ID, CapabilityGrid, CapabilityTile, ConfigField, ConfigForm, ConsentActions, ConsentBulletList, ConsentCard, ConsentFootnote, ConsentHeader, ConsentMessage, ConsentNotice, ConsentPage, ConsentPermissionList, ConsentSection, ConsentStrong, ConsentText, ConversationListView, ConversationTurnSpeaker, CopyableUrl, DASHBOARD_OPERATIONS, DASHBOARD_PINNED, DEEP_RESEARCH, DEEP_RESEARCH_ID, DEFAULT_AGENT_AVATAR_FIELD_LABELS, DEFAULT_AGENT_BAR_LABELS, DEFAULT_AGENT_CAPABILITIES, DEFAULT_AGENT_CARD_LABELS, DEFAULT_AGENT_CREATOR_LABELS, DEFAULT_AGENT_GALLERY_LABELS, DEFAULT_AGENT_TEMPLATES, DEFAULT_AGENT_TYPES, 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_BUILDER_LABELS, DEFAULT_SKILL_EDIT_FORM_LABELS, DEFAULT_SKILL_GENERATE_FORM_LABELS, DEFAULT_SKILL_VIEW_TOGGLE_LABELS, DEFAULT_STEP_BAR_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_THREAD_STATE_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOW_RUNNER_LABELS, DEFAULT_WORKFLOW_RUN_STATUS_LABELS, DEFAULT_WORKFLOW_STEP_PARTS_LABELS, DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, GENERATE_IMAGE, GENERATE_IMAGE_ID, IMAGE_ASPECT_AUTO, IMAGE_ASPECT_RATIOS, MAX_TASK_DEPTH, NewThreadDialog, PillSelect, REMIND_TASK, REMIND_TASK_ID, RecurrenceBuilder, SKILL_FIELD_TYPE_LABELS, SKILL_MAIN_FILENAME, SKILL_SOURCE_LABELS, SKILL_TYPES, SKILL_TYPE_LABELS, STATUS_LABELS, STATUS_ORDER, STATUS_TONE, SUMMARISE, SUMMARISE_ID, SendBackControl, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillLibraryDetail, SkillTile, SkillViewToggle, TASK_COLUMN_ORDER, TIMELINE, TIMELINE_ID, TIMELINE_PROMPT, TRANSLATE, TRANSLATE_ID, TRANSLATE_LANGUAGES, TRIGGER_LABELS, TaskActivityDialog, TaskActivityTimeline, TaskComposer, TaskEmptyState, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStatusPill, TaskTable, ThreadStatusLine, TupleArrayField, UploadTaskItem, UploadTaskList, WEB_WORKFLOWS, WORKFLOW_REGISTRY, WorkflowRunStatus, WorkflowRunner, WorkflowStepAction, WorkflowStepBar, WorkflowThreadStartedBy, WorkflowThreadStrip, activeStepId, agentConfigSectionToValues, agentCreatorToConfigSection, asTaskStatus, authModeFor, buildLibrarySkills, buildTaskRows, buildZipSkillImport, closeWorkflowLaunch, composePersona, composerToTaskQuery, composerToWorkRequest, composerToWorkflowRequest, composerToWorkflowUpdate, createTaskColumns, createsWork, defaultScopeRenderer, defaultTaskComposerValues, deriveAgentName, deriveAnnotationName, deriveWorkflowName, descendantIds, filterConversationRows, filterLibrarySkills, firstWords, formatElapsed2 as formatElapsed, goalProgress, groupAgentTasks, groupThreadActivity, hasTaskFields, humanizeSection, importMarkdownSkill, importSkillFile, importSkillFromUrl, indexTasks, inferType, inputDocumentIds, isAgenticWorkflow, isMainSkillFile, isOutOfBounds, isPlainTodo, isValidAgentName, isoToLocalInput, labelRef, labelRefKey, localInputToIso, matchRequiredLabels, moveTargets, newThreadToRequest, nextCriterionId, openWorkflowLaunch, ownerExtId, parseSkillFrontmatter, prettifyKey, readSkillArchive, recordWorkflowUse, renderWorkflowIcon, requiredLabelsOf, resetWorkflowUsage, resolveScopeInputs, serializeSkill, skillSlug, sortByRecentUse, stepWindow, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskActivityHeadline, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, unresolvedLabelRefs, useWorkflowLaunchRequest, useWorkflowUsage, useWorkflowView, withLabelIds, workflowFromSkillMarkdown, workflowTaskFields, workflowToComposerValues, workflowToSkillMarkdown, workflowWhen };
10408
- //# sourceMappingURL=chunk-SOBLG72E.js.map
10409
- //# sourceMappingURL=chunk-SOBLG72E.js.map
10566
+ //# sourceMappingURL=chunk-T7LLYVOW.js.map
10567
+ //# sourceMappingURL=chunk-T7LLYVOW.js.map