@arbidocs/blocks 0.4.141 → 0.4.142

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 (55) hide show
  1. package/dist/agents/index.cjs +261 -260
  2. package/dist/agents/index.js +4 -3
  3. package/dist/chunk-AHDJXIUB.cjs +25 -0
  4. package/dist/chunk-AHDJXIUB.cjs.map +1 -0
  5. package/dist/{chunk-2UUNSHDI.cjs → chunk-DPGFEMVT.cjs} +9 -24
  6. package/dist/chunk-DPGFEMVT.cjs.map +1 -0
  7. package/dist/{chunk-3ZYOASAX.js → chunk-FXG7TFAG.js} +3 -3
  8. package/dist/{chunk-3ZYOASAX.js.map → chunk-FXG7TFAG.js.map} +1 -1
  9. package/dist/{chunk-OAQEUTNJ.cjs → chunk-GBS6QVGS.cjs} +5 -5
  10. package/dist/{chunk-OAQEUTNJ.cjs.map → chunk-GBS6QVGS.cjs.map} +1 -1
  11. package/dist/{chunk-CQ4MFKFC.cjs → chunk-HIJUXAWS.cjs} +31 -30
  12. package/dist/chunk-HIJUXAWS.cjs.map +1 -0
  13. package/dist/{chunk-O6W6RW3B.js → chunk-I7WG3JRD.js} +206 -53
  14. package/dist/chunk-I7WG3JRD.js.map +1 -0
  15. package/dist/{chunk-YWY2KIX2.js → chunk-N5X37J3D.js} +5 -4
  16. package/dist/chunk-N5X37J3D.js.map +1 -0
  17. package/dist/{chunk-YFF3GTJQ.js → chunk-PROK33G6.js} +6 -20
  18. package/dist/chunk-PROK33G6.js.map +1 -0
  19. package/dist/chunk-RLWIUUQ5.js +23 -0
  20. package/dist/chunk-RLWIUUQ5.js.map +1 -0
  21. package/dist/{chunk-GFRQG36Y.cjs → chunk-YFY3TQ6Q.cjs} +208 -52
  22. package/dist/chunk-YFY3TQ6Q.cjs.map +1 -0
  23. package/dist/connect/index.cjs +56 -55
  24. package/dist/connect/index.cjs.map +1 -1
  25. package/dist/connect/index.js +5 -4
  26. package/dist/connect/index.js.map +1 -1
  27. package/dist/facts/index.cjs +1 -1
  28. package/dist/facts/index.js +1 -1
  29. package/dist/index.cjs +358 -345
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.js +7 -6
  32. package/dist/index.js.map +1 -1
  33. package/dist/lib/sidebar-mode.d.ts +1 -3
  34. package/dist/lib/use-close-on-escape.d.ts +6 -0
  35. package/dist/settings/index.cjs +1 -1
  36. package/dist/settings/index.js +1 -1
  37. package/dist/shell/ShellSidebar.d.ts +37 -0
  38. package/dist/shell/Sidebar.d.ts +6 -6
  39. package/dist/shell/index.cjs +61 -48
  40. package/dist/shell/index.d.ts +4 -1
  41. package/dist/shell/index.js +3 -2
  42. package/dist/shell/types.d.ts +18 -0
  43. package/dist/shell/use-sidebar-controller.d.ts +59 -0
  44. package/dist/workflow-canvas/index.cjs +17 -16
  45. package/dist/workflow-canvas/index.cjs.map +1 -1
  46. package/dist/workflow-canvas/index.js +4 -3
  47. package/dist/workflow-canvas/index.js.map +1 -1
  48. package/node_modules/@arbidocs/coedit/package.json +1 -1
  49. package/package.json +4 -4
  50. package/dist/chunk-2UUNSHDI.cjs.map +0 -1
  51. package/dist/chunk-CQ4MFKFC.cjs.map +0 -1
  52. package/dist/chunk-GFRQG36Y.cjs.map +0 -1
  53. package/dist/chunk-O6W6RW3B.js.map +0 -1
  54. package/dist/chunk-YFF3GTJQ.js.map +0 -1
  55. package/dist/chunk-YWY2KIX2.js.map +0 -1
@@ -11,13 +11,14 @@ require('../chunk-S24XEVPS.cjs');
11
11
  require('../chunk-V5OAXIBN.cjs');
12
12
  require('../chunk-5FYU7ZIU.cjs');
13
13
  var chunkO4YPVYPO_cjs = require('../chunk-O4YPVYPO.cjs');
14
- var chunkOAQEUTNJ_cjs = require('../chunk-OAQEUTNJ.cjs');
14
+ var chunkGBS6QVGS_cjs = require('../chunk-GBS6QVGS.cjs');
15
15
  var chunkV46W7YLI_cjs = require('../chunk-V46W7YLI.cjs');
16
16
  var chunkO6IEZDRC_cjs = require('../chunk-O6IEZDRC.cjs');
17
17
  var chunkI2QSDQQV_cjs = require('../chunk-I2QSDQQV.cjs');
18
18
  require('../chunk-RC25WMVB.cjs');
19
- var chunk2UUNSHDI_cjs = require('../chunk-2UUNSHDI.cjs');
19
+ var chunkDPGFEMVT_cjs = require('../chunk-DPGFEMVT.cjs');
20
20
  require('../chunk-WS5EX7DN.cjs');
21
+ require('../chunk-AHDJXIUB.cjs');
21
22
  var chunkMIDXCYZB_cjs = require('../chunk-MIDXCYZB.cjs');
22
23
  require('../chunk-ZW6FPIFC.cjs');
23
24
  require('../chunk-DETZZBG2.cjs');
@@ -29,6 +30,8 @@ var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
29
30
  require('../chunk-ADOKTJHV.cjs');
30
31
  var chunk6YTHQ73P_cjs = require('../chunk-6YTHQ73P.cjs');
31
32
  var chunkBIXHB4LV_cjs = require('../chunk-BIXHB4LV.cjs');
33
+ var chunkDWZXSPMB_cjs = require('../chunk-DWZXSPMB.cjs');
34
+ var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
32
35
  var chunk7YLJHTDC_cjs = require('../chunk-7YLJHTDC.cjs');
33
36
  require('../chunk-B6MVQCXW.cjs');
34
37
  var chunkJKB7WT7L_cjs = require('../chunk-JKB7WT7L.cjs');
@@ -36,8 +39,6 @@ var chunkOWCEQKAR_cjs = require('../chunk-OWCEQKAR.cjs');
36
39
  require('../chunk-7UTB4PHM.cjs');
37
40
  require('../chunk-32HW2Q33.cjs');
38
41
  require('../chunk-FX3K6LNZ.cjs');
39
- var chunkDWZXSPMB_cjs = require('../chunk-DWZXSPMB.cjs');
40
- var chunk7RGLTF76_cjs = require('../chunk-7RGLTF76.cjs');
41
42
  require('../chunk-PPCATBOY.cjs');
42
43
  require('../chunk-MHVNT4J3.cjs');
43
44
  var chunk5FTIHRZH_cjs = require('../chunk-5FTIHRZH.cjs');
@@ -135,7 +136,7 @@ function ConnectedWorkspaceActivity({
135
136
  [feed.data]
136
137
  );
137
138
  return /* @__PURE__ */ jsxRuntime.jsx(
138
- chunkOAQEUTNJ_cjs.WorkspaceActivityList,
139
+ chunkGBS6QVGS_cjs.WorkspaceActivityList,
139
140
  {
140
141
  ...listProps,
141
142
  items,
@@ -808,7 +809,7 @@ function ConnectedWorkspaceNotificationMenu({
808
809
  });
809
810
  if (!workspaceId) return null;
810
811
  return /* @__PURE__ */ jsxRuntime.jsx(
811
- chunkOAQEUTNJ_cjs.WorkspaceNotificationMenu,
812
+ chunkGBS6QVGS_cjs.WorkspaceNotificationMenu,
812
813
  {
813
814
  ...menuProps,
814
815
  level,
@@ -827,7 +828,7 @@ function ConnectedThreadFollow({
827
828
  enabled: status === "authenticated"
828
829
  });
829
830
  if (!conversationId) return null;
830
- const Control = as === "menu-item" ? chunkOAQEUTNJ_cjs.ThreadFollowMenuItem : chunkOAQEUTNJ_cjs.ThreadFollowButton;
831
+ const Control = as === "menu-item" ? chunkGBS6QVGS_cjs.ThreadFollowMenuItem : chunkGBS6QVGS_cjs.ThreadFollowButton;
831
832
  return /* @__PURE__ */ jsxRuntime.jsx(
832
833
  Control,
833
834
  {
@@ -867,7 +868,7 @@ var DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS = {
867
868
  var messageOf = (error) => error instanceof Error ? error.message : "";
868
869
  function ConnectedWorkflowsTable({
869
870
  filter,
870
- describeTrigger = (w) => chunk2UUNSHDI_cjs.workflowTriggerType(w).replaceAll("_", " "),
871
+ describeTrigger = (w) => chunkDPGFEMVT_cjs.workflowTriggerType(w).replaceAll("_", " "),
871
872
  formatDate: formatDate2 = chunkKDG6FER6_cjs.fmtDate,
872
873
  onViewRuns,
873
874
  connectedLabels,
@@ -929,7 +930,7 @@ function ConnectedWorkflowsTable({
929
930
  await act(workflow, () => remove.mutateAsync(workflow.external_id));
930
931
  };
931
932
  return /* @__PURE__ */ jsxRuntime.jsx(
932
- chunk2UUNSHDI_cjs.WorkflowsTable,
933
+ chunkDPGFEMVT_cjs.WorkflowsTable,
933
934
  {
934
935
  ...tableProps,
935
936
  workflows,
@@ -990,7 +991,7 @@ function toWorkflowFieldDocument(doc) {
990
991
  function useConnectedWorkflowScopeSource() {
991
992
  const { data: docs } = chunkJZNXRMLH_cjs.useConnectedDocuments();
992
993
  const { data: tags } = chunkJZNXRMLH_cjs.useConnectedTags();
993
- return react.useMemo(() => chunk2UUNSHDI_cjs.buildWorkflowScopeSource(docs, chunk2UUNSHDI_cjs.documentScopeLabels(tags)), [docs, tags]);
994
+ return react.useMemo(() => chunkDPGFEMVT_cjs.buildWorkflowScopeSource(docs, chunkDPGFEMVT_cjs.documentScopeLabels(tags)), [docs, tags]);
994
995
  }
995
996
  function useConnectedAgentOptions() {
996
997
  const { data: agents } = react$1.useAgents();
@@ -1048,7 +1049,7 @@ function ConnectedWorkflowDocumentsField({
1048
1049
  }
1049
1050
  ),
1050
1051
  /* @__PURE__ */ jsxRuntime.jsx(
1051
- chunk2UUNSHDI_cjs.WorkflowDocumentsField,
1052
+ chunkDPGFEMVT_cjs.WorkflowDocumentsField,
1052
1053
  {
1053
1054
  field,
1054
1055
  value,
@@ -1070,7 +1071,7 @@ function ConnectedWorkflowLauncher({
1070
1071
  const scopeSource = useConnectedWorkflowScopeSource();
1071
1072
  const agents = useConnectedAgentOptions();
1072
1073
  return /* @__PURE__ */ jsxRuntime.jsx(
1073
- chunk2UUNSHDI_cjs.WorkflowLauncher,
1074
+ chunkDPGFEMVT_cjs.WorkflowLauncher,
1074
1075
  {
1075
1076
  ...props,
1076
1077
  scopeSource,
@@ -1149,7 +1150,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
1149
1150
  onChange: (e) => {
1150
1151
  const file = e.target.files?.[0];
1151
1152
  e.target.value = "";
1152
- if (file) void add(() => chunk2UUNSHDI_cjs.importSkillFile(file));
1153
+ if (file) void add(() => chunkDPGFEMVT_cjs.importSkillFile(file));
1153
1154
  }
1154
1155
  }
1155
1156
  ),
@@ -1174,7 +1175,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
1174
1175
  className: "space-y-2",
1175
1176
  onSubmit: (e) => {
1176
1177
  e.preventDefault();
1177
- if (url.trim()) void add(() => chunk2UUNSHDI_cjs.importSkillFromUrl(url));
1178
+ if (url.trim()) void add(() => chunkDPGFEMVT_cjs.importSkillFromUrl(url));
1178
1179
  },
1179
1180
  children: [
1180
1181
  /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "skills-add-url", children: l.fromLink }),
@@ -1238,9 +1239,9 @@ function ConnectedSkillsLibrary({
1238
1239
  const [type, setType] = react.useState("all");
1239
1240
  const [view, setView] = react.useState("gallery");
1240
1241
  const [isBusy, setIsBusy] = react.useState(false);
1241
- const all = react.useMemo(() => chunk2UUNSHDI_cjs.buildLibrarySkills(builtins, listings ?? []), [builtins, listings]);
1242
+ const all = react.useMemo(() => chunkDPGFEMVT_cjs.buildLibrarySkills(builtins, listings ?? []), [builtins, listings]);
1242
1243
  const shown = react.useMemo(
1243
- () => chunk2UUNSHDI_cjs.filterLibrarySkills(all, { query, source, type }),
1244
+ () => chunkDPGFEMVT_cjs.filterLibrarySkills(all, { query, source, type }),
1244
1245
  [all, query, source, type]
1245
1246
  );
1246
1247
  const current = all.find((s) => s.slug === selected) ?? null;
@@ -1251,21 +1252,21 @@ function ConnectedSkillsLibrary({
1251
1252
  const count = (s) => all.filter((x) => x.source === s).length;
1252
1253
  const sourceOptions = [
1253
1254
  { id: "all", label: "All", count: all.length },
1254
- { id: "builtin", label: chunk2UUNSHDI_cjs.SKILL_SOURCE_LABELS.builtin, count: count("builtin") },
1255
- { id: "mine", label: chunk2UUNSHDI_cjs.SKILL_SOURCE_LABELS.mine, count: count("mine") },
1256
- { id: "shared", label: chunk2UUNSHDI_cjs.SKILL_SOURCE_LABELS.shared, count: count("shared") }
1255
+ { id: "builtin", label: chunkDPGFEMVT_cjs.SKILL_SOURCE_LABELS.builtin, count: count("builtin") },
1256
+ { id: "mine", label: chunkDPGFEMVT_cjs.SKILL_SOURCE_LABELS.mine, count: count("mine") },
1257
+ { id: "shared", label: chunkDPGFEMVT_cjs.SKILL_SOURCE_LABELS.shared, count: count("shared") }
1257
1258
  ];
1258
1259
  const types = [...new Set(all.map((s) => s.type))];
1259
1260
  const typeOptions = [
1260
1261
  { id: "all", label: "Any kind" },
1261
- ...types.map((t) => ({ id: t, label: chunk2UUNSHDI_cjs.SKILL_TYPE_LABELS[t] ?? t }))
1262
+ ...types.map((t) => ({ id: t, label: chunkDPGFEMVT_cjs.SKILL_TYPE_LABELS[t] ?? t }))
1262
1263
  ];
1263
1264
  const pick = (slug) => {
1264
1265
  setSelected(slug);
1265
1266
  setMode("detail");
1266
1267
  };
1267
1268
  const markdownOf = async (skill) => {
1268
- if (!skill.docExtId) return chunk2UUNSHDI_cjs.workflowToSkillMarkdown(skill.workflow);
1269
+ if (!skill.docExtId) return chunkDPGFEMVT_cjs.workflowToSkillMarkdown(skill.workflow);
1269
1270
  const response = await arbi.documents.download(skill.docExtId);
1270
1271
  if (!response.ok) throw new Error(`Could not read the skill (${response.status})`);
1271
1272
  return response.text();
@@ -1273,7 +1274,7 @@ function ConnectedSkillsLibrary({
1273
1274
  const saveAs = (slug, markdown, shared = false) => upload.mutateAsync([
1274
1275
  {
1275
1276
  folder: `${SKILL_FOLDER}${slug}`,
1276
- fileName: chunk2UUNSHDI_cjs.SKILL_MAIN_FILENAME,
1277
+ fileName: chunkDPGFEMVT_cjs.SKILL_MAIN_FILENAME,
1277
1278
  content: new Blob([markdown], { type: "text/markdown" }),
1278
1279
  shared
1279
1280
  }
@@ -1336,7 +1337,7 @@ function ConnectedSkillsLibrary({
1336
1337
  try {
1337
1338
  documentTools.downloadBlob(
1338
1339
  new Blob([await markdownOf(skill)], { type: "text/markdown" }),
1339
- chunk2UUNSHDI_cjs.SKILL_MAIN_FILENAME
1340
+ chunkDPGFEMVT_cjs.SKILL_MAIN_FILENAME
1340
1341
  );
1341
1342
  } catch (error) {
1342
1343
  notify(errorText(error, "Could not export the skill"), "error");
@@ -1377,10 +1378,10 @@ function ConnectedSkillsLibrary({
1377
1378
  }
1378
1379
  )
1379
1380
  ] }),
1380
- /* @__PURE__ */ jsxRuntime.jsx(chunk2UUNSHDI_cjs.SkillViewToggle, { value: view, onChange: setView })
1381
+ /* @__PURE__ */ jsxRuntime.jsx(chunkDPGFEMVT_cjs.SkillViewToggle, { value: view, onChange: setView })
1381
1382
  ] }),
1382
1383
  /* @__PURE__ */ jsxRuntime.jsx(
1383
- chunk2UUNSHDI_cjs.SkillFilterChips,
1384
+ chunkDPGFEMVT_cjs.SkillFilterChips,
1384
1385
  {
1385
1386
  label: "Show",
1386
1387
  value: source,
@@ -1389,7 +1390,7 @@ function ConnectedSkillsLibrary({
1389
1390
  }
1390
1391
  ),
1391
1392
  types.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
1392
- chunk2UUNSHDI_cjs.SkillFilterChips,
1393
+ chunkDPGFEMVT_cjs.SkillFilterChips,
1393
1394
  {
1394
1395
  label: "Kind",
1395
1396
  value: type,
@@ -1436,12 +1437,12 @@ function ConnectedSkillsLibrary({
1436
1437
  view === "gallery" ? "grid grid-cols-[repeat(auto-fill,minmax(9.5rem,1fr))]" : "flex flex-col"
1437
1438
  ),
1438
1439
  children: shown.map((skill) => /* @__PURE__ */ jsxRuntime.jsx(
1439
- chunk2UUNSHDI_cjs.SkillTile,
1440
+ chunkDPGFEMVT_cjs.SkillTile,
1440
1441
  {
1441
1442
  name: skill.title,
1442
1443
  testId: `skill-tile-${skill.slug}`,
1443
1444
  description: skill.description,
1444
- sourceLabel: skill.isShared ? `${chunk2UUNSHDI_cjs.SKILL_SOURCE_LABELS.mine}, shared` : chunk2UUNSHDI_cjs.SKILL_SOURCE_LABELS[skill.source],
1445
+ sourceLabel: skill.isShared ? `${chunkDPGFEMVT_cjs.SKILL_SOURCE_LABELS.mine}, shared` : chunkDPGFEMVT_cjs.SKILL_SOURCE_LABELS[skill.source],
1445
1446
  type: skill.type,
1446
1447
  icon,
1447
1448
  layout: view,
@@ -1476,7 +1477,7 @@ function ConnectedSkillsLibrary({
1476
1477
  }
1477
1478
  ),
1478
1479
  mode === "new" && /* @__PURE__ */ jsxRuntime.jsx(
1479
- chunk2UUNSHDI_cjs.SkillGenerateForm,
1480
+ chunkDPGFEMVT_cjs.SkillGenerateForm,
1480
1481
  {
1481
1482
  icon,
1482
1483
  onGenerate: (desc) => {
@@ -1503,11 +1504,11 @@ function ConnectedSkillsLibrary({
1503
1504
  ),
1504
1505
  mode === "add" && /* @__PURE__ */ jsxRuntime.jsx(ConnectedSkillUpload, { onDone: done }),
1505
1506
  mode === "detail" && current && /* @__PURE__ */ jsxRuntime.jsx(
1506
- chunk2UUNSHDI_cjs.SkillLibraryDetail,
1507
+ chunkDPGFEMVT_cjs.SkillLibraryDetail,
1507
1508
  {
1508
1509
  skill: current,
1509
1510
  icon,
1510
- instructions: current.docExtId ? currentText ? chunk2UUNSHDI_cjs.parseSkillFrontmatter(currentText, chunk2UUNSHDI_cjs.SKILL_MAIN_FILENAME).content : "" : current.workflow.run.kind === "prompt" ? current.workflow.run.promptTemplate : "",
1511
+ instructions: current.docExtId ? currentText ? chunkDPGFEMVT_cjs.parseSkillFrontmatter(currentText, chunkDPGFEMVT_cjs.SKILL_MAIN_FILENAME).content : "" : current.workflow.run.kind === "prompt" ? current.workflow.run.promptTemplate : "",
1511
1512
  isLoading: !!current.docExtId && textLoading,
1512
1513
  actions: {
1513
1514
  onRun: () => onRun(current.slug),
@@ -1542,7 +1543,7 @@ function SkillEditor({
1542
1543
  const [seeded, setSeeded] = react.useState(!isEditing);
1543
1544
  const [nameError, setNameError] = react.useState(null);
1544
1545
  if (isEditing && !seeded && text !== void 0) {
1545
- const parsed = chunk2UUNSHDI_cjs.parseSkillFrontmatter(text, chunk2UUNSHDI_cjs.SKILL_MAIN_FILENAME);
1546
+ const parsed = chunkDPGFEMVT_cjs.parseSkillFrontmatter(text, chunkDPGFEMVT_cjs.SKILL_MAIN_FILENAME);
1546
1547
  setDescription(parsed.description ?? "");
1547
1548
  setBody(parsed.content ?? "");
1548
1549
  setSeeded(true);
@@ -1556,15 +1557,15 @@ function SkillEditor({
1556
1557
  notify("Add a short description.", "error");
1557
1558
  return;
1558
1559
  }
1559
- const slug = chunk2UUNSHDI_cjs.skillSlug(name);
1560
+ const slug = chunkDPGFEMVT_cjs.skillSlug(name);
1560
1561
  try {
1561
- await onSave(slug, chunk2UUNSHDI_cjs.serializeSkill({ name: slug, description, body }), isEditing);
1562
+ await onSave(slug, chunkDPGFEMVT_cjs.serializeSkill({ name: slug, description, body }), isEditing);
1562
1563
  } catch (err) {
1563
1564
  notify(errorText(err, "Could not save the skill"), "error");
1564
1565
  }
1565
1566
  };
1566
1567
  return /* @__PURE__ */ jsxRuntime.jsx(
1567
- chunk2UUNSHDI_cjs.SkillEditForm,
1568
+ chunkDPGFEMVT_cjs.SkillEditForm,
1568
1569
  {
1569
1570
  name,
1570
1571
  onNameChange: setName,
@@ -1600,9 +1601,9 @@ function ConnectedAgentCreator({
1600
1601
  agent,
1601
1602
  initialName,
1602
1603
  onSaved,
1603
- capabilities = chunk2UUNSHDI_cjs.DEFAULT_AGENT_CAPABILITIES,
1604
- templates = chunk2UUNSHDI_cjs.DEFAULT_AGENT_TEMPLATES,
1605
- types = chunk2UUNSHDI_cjs.DEFAULT_AGENT_TYPES,
1604
+ capabilities = chunkDPGFEMVT_cjs.DEFAULT_AGENT_CAPABILITIES,
1605
+ templates = chunkDPGFEMVT_cjs.DEFAULT_AGENT_TEMPLATES,
1606
+ types = chunkDPGFEMVT_cjs.DEFAULT_AGENT_TYPES,
1606
1607
  canRevokeWorkspaces = false,
1607
1608
  labels
1608
1609
  }) {
@@ -1644,7 +1645,7 @@ function ConnectedAgentCreator({
1644
1645
  const initialValues = react.useMemo(
1645
1646
  () => ({
1646
1647
  name: agent?.given_name ?? initialName ?? "",
1647
- persona: isEdit ? chunk2UUNSHDI_cjs.stripPersonaPreamble(String(agents.PERSONA ?? "")) : "",
1648
+ persona: isEdit ? chunkDPGFEMVT_cjs.stripPersonaPreamble(String(agents.PERSONA ?? "")) : "",
1648
1649
  modelName: String(agents.AGENT_MODEL_NAME ?? ""),
1649
1650
  capabilities: Object.fromEntries(capabilities.map(({ key }) => [key, Boolean(agents[key])])),
1650
1651
  type: "builtin",
@@ -1663,7 +1664,7 @@ function ConnectedAgentCreator({
1663
1664
  try {
1664
1665
  let agentExtId = agent?.external_id ?? early?.id ?? "";
1665
1666
  if (!agentExtId) {
1666
- if (!chunk2UUNSHDI_cjs.isValidAgentName(values.name)) {
1667
+ if (!chunkDPGFEMVT_cjs.isValidAgentName(values.name)) {
1667
1668
  notify("Give the agent a name first.", "error");
1668
1669
  return;
1669
1670
  }
@@ -1699,7 +1700,7 @@ function ConnectedAgentCreator({
1699
1700
  title: `agent-${name}`,
1700
1701
  sections: {
1701
1702
  Agents: {
1702
- PERSONA: chunk2UUNSHDI_cjs.composePersona(name, values.persona),
1703
+ PERSONA: chunkDPGFEMVT_cjs.composePersona(name, values.persona),
1703
1704
  ...values.modelName ? { AGENT_MODEL_NAME: values.modelName } : {},
1704
1705
  ...Object.fromEntries(capabilities.map(({ key }) => [key, !!values.capabilities[key]])),
1705
1706
  ENABLED_SKILLS: values.capabilities.SKILLS_ENABLED && skills.length ? skills : null,
@@ -1722,7 +1723,7 @@ function ConnectedAgentCreator({
1722
1723
  };
1723
1724
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1724
1725
  /* @__PURE__ */ jsxRuntime.jsx(
1725
- chunk2UUNSHDI_cjs.AgentCreator,
1726
+ chunkDPGFEMVT_cjs.AgentCreator,
1726
1727
  {
1727
1728
  open: ready,
1728
1729
  onOpenChange,
@@ -1738,11 +1739,11 @@ function ConnectedAgentCreator({
1738
1739
  ) : void 0,
1739
1740
  revokingWorkspaceId: revokeAccess.isPending ? revokeAccess.variables?.workspaceId : void 0,
1740
1741
  avatar: (values) => /* @__PURE__ */ jsxRuntime.jsx(
1741
- chunk2UUNSHDI_cjs.AgentAvatarField,
1742
+ chunkDPGFEMVT_cjs.AgentAvatarField,
1742
1743
  {
1743
1744
  picture,
1744
1745
  isBusy: avatarBusy,
1745
- canGenerate: isEdit || chunk2UUNSHDI_cjs.isValidAgentName(values.name),
1746
+ canGenerate: isEdit || chunkDPGFEMVT_cjs.isValidAgentName(values.name),
1746
1747
  onGenerate: () => handleGenerateAvatar(values)
1747
1748
  }
1748
1749
  ),
@@ -1794,7 +1795,7 @@ function ConnectedAgentCreator({
1794
1795
  /* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: "Connect your agent" }),
1795
1796
  /* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { children: "This key is shown once. Run the script on the machine that will host the agent." })
1796
1797
  ] }),
1797
- connect && /* @__PURE__ */ jsxRuntime.jsx(chunk2UUNSHDI_cjs.AgentConnectInstructions, { email: connect.email, signingKey: connect.signingKey })
1798
+ connect && /* @__PURE__ */ jsxRuntime.jsx(chunkDPGFEMVT_cjs.AgentConnectInstructions, { email: connect.email, signingKey: connect.signingKey })
1798
1799
  ]
1799
1800
  }
1800
1801
  ) })
@@ -1831,7 +1832,7 @@ function ConnectedWorkflowHistory({
1831
1832
  const { openConversation } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
1832
1833
  const { data: runs = [], isLoading } = react$1.useWorkflowRuns(workflow?.external_id);
1833
1834
  return /* @__PURE__ */ jsxRuntime.jsx(
1834
- chunk2UUNSHDI_cjs.TaskRunsDialog,
1835
+ chunkDPGFEMVT_cjs.TaskRunsDialog,
1835
1836
  {
1836
1837
  inline,
1837
1838
  hideHeader,
@@ -1874,7 +1875,7 @@ function ConnectedTaskActivityDialog({
1874
1875
  const member = members.find((m) => m.user.external_id === id)?.user;
1875
1876
  const name = member && [member.given_name, member.family_name].filter(Boolean).join(" ") || member?.email;
1876
1877
  const person = { id, label: isMe ? "You" : name || "Someone", isMe };
1877
- return renderTaskPerson ? renderTaskPerson(person) : /* @__PURE__ */ jsxRuntime.jsx(chunk2UUNSHDI_cjs.PersonPill, { person });
1878
+ return renderTaskPerson ? renderTaskPerson(person) : /* @__PURE__ */ jsxRuntime.jsx(chunkDPGFEMVT_cjs.PersonPill, { person });
1878
1879
  },
1879
1880
  [renderTaskPerson, userId, members]
1880
1881
  );
@@ -1883,7 +1884,7 @@ function ConnectedTaskActivityDialog({
1883
1884
  [agents]
1884
1885
  );
1885
1886
  return /* @__PURE__ */ jsxRuntime.jsx(
1886
- chunk2UUNSHDI_cjs.TaskActivityDialog,
1887
+ chunkDPGFEMVT_cjs.TaskActivityDialog,
1887
1888
  {
1888
1889
  open: true,
1889
1890
  onOpenChange: (open) => !open && onClose(),
@@ -2029,7 +2030,7 @@ function useWorkflowThread(workflow, options = {}) {
2029
2030
  );
2030
2031
  const conversation = conversations.data?.find((c) => c.external_id === threadId);
2031
2032
  const steps = react.useMemo(
2032
- () => chunkOWCEQKAR_cjs.workflowSteps(workflow).length > 0 ? chunkOWCEQKAR_cjs.workflowSteps(workflow) : chunk2UUNSHDI_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
2033
+ () => chunkOWCEQKAR_cjs.workflowSteps(workflow).length > 0 ? chunkOWCEQKAR_cjs.workflowSteps(workflow) : chunkDPGFEMVT_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
2033
2034
  [workflow, conversation?.plan?.steps]
2034
2035
  );
2035
2036
  const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
@@ -2089,7 +2090,7 @@ function useWorkflowThread(workflow, options = {}) {
2089
2090
  criteria: [],
2090
2091
  max_passes: 3,
2091
2092
  documents: [],
2092
- steps: chunk2UUNSHDI_cjs.toPlanSteps(workflow, {
2093
+ steps: chunkDPGFEMVT_cjs.toPlanSteps(workflow, {
2093
2094
  inputs: values,
2094
2095
  resolveWorkflow: options.resolveWorkflow,
2095
2096
  compose: options.compose
@@ -2176,7 +2177,7 @@ function useWorkflowThread(workflow, options = {}) {
2176
2177
  const anyRunning = Object.values(states).some((s) => s.status === "running");
2177
2178
  const needsStart = !threadId || idle && !anyRunning;
2178
2179
  const runError = idle ? conversation?.last_error ?? null : null;
2179
- const view = chunk2UUNSHDI_cjs.useWorkflowView({
2180
+ const view = chunkDPGFEMVT_cjs.useWorkflowView({
2180
2181
  steps,
2181
2182
  states,
2182
2183
  inputs,
@@ -2653,7 +2654,7 @@ function ConnectedWorkflowRunner({
2653
2654
  );
2654
2655
  };
2655
2656
  const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
2656
- chunk2UUNSHDI_cjs.WorkflowRunner,
2657
+ chunkDPGFEMVT_cjs.WorkflowRunner,
2657
2658
  {
2658
2659
  people,
2659
2660
  ...runnerProps,
@@ -2699,7 +2700,7 @@ function ConnectedWorkflowRunner({
2699
2700
  ) }),
2700
2701
  inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2701
2702
  /* @__PURE__ */ jsxRuntime.jsx(
2702
- chunk2UUNSHDI_cjs.WorkflowStepBar,
2703
+ chunkDPGFEMVT_cjs.WorkflowStepBar,
2703
2704
  {
2704
2705
  run: view,
2705
2706
  levels: chunkOWCEQKAR_cjs.stepLevels(view.steps),
@@ -2900,7 +2901,7 @@ function ConnectedTagTable({
2900
2901
  const fail = (e) => setError(e instanceof Error ? e.message : String(e));
2901
2902
  const snapshot = (data) => {
2902
2903
  const title = exportTitle ?? KIND_TITLES[kind];
2903
- const bytes = chunkOAQEUTNJ_cjs.tagTableDocx(data, {
2904
+ const bytes = chunkGBS6QVGS_cjs.tagTableDocx(data, {
2904
2905
  title,
2905
2906
  nameOf: (id) => people.find((p) => p.value === id)?.label
2906
2907
  });
@@ -2910,7 +2911,7 @@ function ConnectedTagTable({
2910
2911
  };
2911
2912
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2912
2913
  /* @__PURE__ */ jsxRuntime.jsx(
2913
- chunkOAQEUTNJ_cjs.TagTable,
2914
+ chunkGBS6QVGS_cjs.TagTable,
2914
2915
  {
2915
2916
  ...props,
2916
2917
  table,