@arbidocs/blocks 0.4.78 → 0.4.80
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.
- package/dist/agents/index.cjs +281 -281
- package/dist/agents/index.js +6 -6
- package/dist/agents/workflows/StepBarFrame.d.ts +8 -2
- package/dist/agents/workflows/stepWindow.d.ts +7 -0
- package/dist/chat/index.cjs +125 -125
- package/dist/chat/index.js +3 -3
- package/dist/{chunk-VFIZYSZB.cjs → chunk-2FEQGDW2.cjs} +28 -12
- package/dist/chunk-2FEQGDW2.cjs.map +1 -0
- package/dist/{chunk-5OC5CGYX.js → chunk-A5WCK6ZG.js} +8 -8
- package/dist/chunk-A5WCK6ZG.js.map +1 -0
- package/dist/{chunk-IF6VAYIA.cjs → chunk-C3DRLFU7.cjs} +5 -5
- package/dist/{chunk-IF6VAYIA.cjs.map → chunk-C3DRLFU7.cjs.map} +1 -1
- package/dist/{chunk-GJV2G4FC.js → chunk-E367ZUHE.js} +3 -3
- package/dist/{chunk-GJV2G4FC.js.map → chunk-E367ZUHE.js.map} +1 -1
- package/dist/{chunk-XMBYDLZQ.cjs → chunk-HUJLKDWX.cjs} +4 -4
- package/dist/{chunk-XMBYDLZQ.cjs.map → chunk-HUJLKDWX.cjs.map} +1 -1
- package/dist/{chunk-ICBAFX5B.js → chunk-LBE36YNZ.js} +3 -3
- package/dist/{chunk-ICBAFX5B.js.map → chunk-LBE36YNZ.js.map} +1 -1
- package/dist/{chunk-SSDISIDW.cjs → chunk-LGDX34UR.cjs} +45 -45
- package/dist/chunk-LGDX34UR.cjs.map +1 -0
- package/dist/{chunk-B3WCKBJ7.cjs → chunk-MFDGNUKX.cjs} +3 -3
- package/dist/{chunk-B3WCKBJ7.cjs.map → chunk-MFDGNUKX.cjs.map} +1 -1
- package/dist/{chunk-MP6FK43E.cjs → chunk-O5NDG4EA.cjs} +3 -3
- package/dist/{chunk-MP6FK43E.cjs.map → chunk-O5NDG4EA.cjs.map} +1 -1
- package/dist/{chunk-DDF5GPIJ.js → chunk-P5ST47VY.js} +3 -3
- package/dist/{chunk-DDF5GPIJ.js.map → chunk-P5ST47VY.js.map} +1 -1
- package/dist/{chunk-EWSEQEPL.js → chunk-PFA43QNX.js} +3 -3
- package/dist/{chunk-EWSEQEPL.js.map → chunk-PFA43QNX.js.map} +1 -1
- package/dist/{chunk-WXRCMIAE.js → chunk-QFA3NCWL.js} +27 -13
- package/dist/chunk-QFA3NCWL.js.map +1 -0
- package/dist/{chunk-CWAZNXC5.js → chunk-SWSVPQNB.js} +30 -8
- package/dist/chunk-SWSVPQNB.js.map +1 -0
- package/dist/{chunk-MLAHDAN5.cjs → chunk-UA2AMDR6.cjs} +30 -8
- package/dist/chunk-UA2AMDR6.cjs.map +1 -0
- package/dist/{chunk-XQDM6T6C.js → chunk-WDD255XQ.js} +3 -3
- package/dist/{chunk-XQDM6T6C.js.map → chunk-WDD255XQ.js.map} +1 -1
- package/dist/{chunk-Z5VUZ6YD.cjs → chunk-ZV3BKLFY.cjs} +3 -3
- package/dist/{chunk-Z5VUZ6YD.cjs.map → chunk-ZV3BKLFY.cjs.map} +1 -1
- package/dist/connect/index.cjs +68 -64
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +1 -1
- package/dist/connect/index.js +18 -14
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedWorkflowRunner.d.ts +16 -1
- package/dist/databases/ColumnConfigFields.d.ts +68 -0
- package/dist/databases/DatabaseColumnDialog.d.ts +27 -2
- package/dist/databases/DatabaseTable.d.ts +8 -1
- package/dist/databases/PickCellEditor.d.ts +21 -0
- package/dist/databases/column-types.d.ts +73 -9
- package/dist/databases/databaseColumns.d.ts +4 -0
- package/dist/databases/index.cjs +758 -27
- package/dist/databases/index.cjs.map +1 -1
- package/dist/databases/index.d.ts +4 -1
- package/dist/databases/index.js +745 -31
- package/dist/databases/index.js.map +1 -1
- package/dist/databases/linkCells.d.ts +48 -0
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/index.cjs +2 -2
- package/dist/files/index.js +2 -2
- package/dist/home/index.cjs +17 -17
- package/dist/home/index.js +3 -3
- package/dist/index.cjs +513 -513
- package/dist/index.js +11 -11
- package/dist/retrieval/index.cjs +1 -1
- package/dist/retrieval/index.js +1 -1
- package/dist/settings/index.cjs +35 -35
- package/dist/settings/index.js +2 -2
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/studio/index.cjs +4 -4
- package/dist/studio/index.js +3 -3
- package/dist/workflow-canvas/index.cjs +49 -49
- package/dist/workflow-canvas/index.js +6 -6
- package/dist/workspaces/index.cjs +2 -2
- package/dist/workspaces/index.js +2 -2
- package/package.json +4 -4
- package/dist/chunk-5OC5CGYX.js.map +0 -1
- package/dist/chunk-CWAZNXC5.js.map +0 -1
- package/dist/chunk-MLAHDAN5.cjs.map +0 -1
- package/dist/chunk-SSDISIDW.cjs.map +0 -1
- package/dist/chunk-VFIZYSZB.cjs.map +0 -1
- package/dist/chunk-WXRCMIAE.js.map +0 -1
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkMUMH3Z6K_cjs = require('../chunk-MUMH3Z6K.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkLGDX34UR_cjs = require('../chunk-LGDX34UR.cjs');
|
|
6
6
|
require('../chunk-YJQVLVBJ.cjs');
|
|
7
7
|
require('../chunk-ZW6FPIFC.cjs');
|
|
8
|
-
var
|
|
8
|
+
var chunk2FEQGDW2_cjs = require('../chunk-2FEQGDW2.cjs');
|
|
9
9
|
require('../chunk-7RGLTF76.cjs');
|
|
10
|
-
require('../chunk-Z5VUZ6YD.cjs');
|
|
11
|
-
require('../chunk-7D737FLE.cjs');
|
|
12
10
|
require('../chunk-3AFWGEDJ.cjs');
|
|
13
11
|
require('../chunk-VFUWWH52.cjs');
|
|
14
12
|
require('../chunk-DETZZBG2.cjs');
|
|
15
13
|
require('../chunk-V4ISCZJ7.cjs');
|
|
16
14
|
require('../chunk-2EI7NCUA.cjs');
|
|
17
15
|
require('../chunk-IXALYQT7.cjs');
|
|
16
|
+
require('../chunk-ZV3BKLFY.cjs');
|
|
17
|
+
require('../chunk-7D737FLE.cjs');
|
|
18
18
|
require('../chunk-OB5F4577.cjs');
|
|
19
19
|
require('../chunk-B4SRYJLM.cjs');
|
|
20
20
|
require('../chunk-7UTB4PHM.cjs');
|
|
21
21
|
require('../chunk-FX3K6LNZ.cjs');
|
|
22
22
|
require('../chunk-PPCATBOY.cjs');
|
|
23
|
-
require('../chunk-C54XEN5T.cjs');
|
|
24
|
-
require('../chunk-KDG6FER6.cjs');
|
|
25
23
|
require('../chunk-ULWRNGGE.cjs');
|
|
26
24
|
require('../chunk-MHVNT4J3.cjs');
|
|
25
|
+
require('../chunk-C54XEN5T.cjs');
|
|
26
|
+
require('../chunk-KDG6FER6.cjs');
|
|
27
27
|
require('../chunk-DES3K4SD.cjs');
|
|
28
28
|
var react = require('react');
|
|
29
29
|
var react$2 = require('@arbidocs/react');
|
|
@@ -58,11 +58,11 @@ function withSteps(workflow, steps, layout) {
|
|
|
58
58
|
const run = workflow.run.kind === "steps" ? workflow.run : { kind: "steps", steps: [] };
|
|
59
59
|
return {
|
|
60
60
|
...workflow,
|
|
61
|
-
run: { ...run, steps:
|
|
61
|
+
run: { ...run, steps: chunk2FEQGDW2_cjs.orderSteps(steps), layout: layout ?? run.layout }
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
var layoutOf = (workflow) => workflow.run.kind === "steps" && workflow.run.layout || {};
|
|
65
|
-
var explicit = (steps) => steps.map((s) => ({ ...s, after:
|
|
65
|
+
var explicit = (steps) => steps.map((s) => ({ ...s, after: chunk2FEQGDW2_cjs.stepDependencies(steps, s.id) }));
|
|
66
66
|
function stepIdFor(steps, title) {
|
|
67
67
|
const base = title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").replace(/^[^a-z]+/, "") || "step";
|
|
68
68
|
const taken = new Set(steps.map((s) => s.id));
|
|
@@ -109,7 +109,7 @@ function blankStep(kind, id, title) {
|
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
function addStep(workflow, kind, options = {}) {
|
|
112
|
-
const steps = explicit(
|
|
112
|
+
const steps = explicit(chunk2FEQGDW2_cjs.workflowSteps(workflow));
|
|
113
113
|
const title = options.title ?? DEFAULT_TITLES[kind];
|
|
114
114
|
const id = stepIdFor(steps, title);
|
|
115
115
|
const step = { ...blankStep(kind, id, title), after: options.after ? [options.after] : [] };
|
|
@@ -118,7 +118,7 @@ function addStep(workflow, kind, options = {}) {
|
|
|
118
118
|
return { workflow: withSteps(workflow, [...steps, step], layout), id };
|
|
119
119
|
}
|
|
120
120
|
function removeStep(workflow, id) {
|
|
121
|
-
const steps = explicit(
|
|
121
|
+
const steps = explicit(chunk2FEQGDW2_cjs.workflowSteps(workflow));
|
|
122
122
|
const removed = steps.find((s) => s.id === id);
|
|
123
123
|
if (!removed) return workflow;
|
|
124
124
|
const bridged = steps.filter((s) => s.id !== id).map(
|
|
@@ -131,8 +131,8 @@ function removeStep(workflow, id) {
|
|
|
131
131
|
return withSteps(workflow, bridged, layout);
|
|
132
132
|
}
|
|
133
133
|
function connectSteps(workflow, from, to) {
|
|
134
|
-
const steps = explicit(
|
|
135
|
-
if (from === to || !steps.some((s) => s.id === from) ||
|
|
134
|
+
const steps = explicit(chunk2FEQGDW2_cjs.workflowSteps(workflow));
|
|
135
|
+
if (from === to || !steps.some((s) => s.id === from) || chunk2FEQGDW2_cjs.dependsOn(steps, from, to)) {
|
|
136
136
|
return workflow;
|
|
137
137
|
}
|
|
138
138
|
return withSteps(
|
|
@@ -142,16 +142,16 @@ function connectSteps(workflow, from, to) {
|
|
|
142
142
|
)
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
|
-
var wouldCycle = (workflow, from, to) => from === to ||
|
|
145
|
+
var wouldCycle = (workflow, from, to) => from === to || chunk2FEQGDW2_cjs.dependsOn(chunk2FEQGDW2_cjs.workflowSteps(workflow), from, to);
|
|
146
146
|
function disconnectSteps(workflow, from, to) {
|
|
147
|
-
const steps = explicit(
|
|
147
|
+
const steps = explicit(chunk2FEQGDW2_cjs.workflowSteps(workflow));
|
|
148
148
|
return withSteps(
|
|
149
149
|
workflow,
|
|
150
150
|
steps.map((s) => s.id === to ? { ...s, after: (s.after ?? []).filter((d) => d !== from) } : s)
|
|
151
151
|
);
|
|
152
152
|
}
|
|
153
153
|
function updateStep(workflow, id, patch) {
|
|
154
|
-
const steps = explicit(
|
|
154
|
+
const steps = explicit(chunk2FEQGDW2_cjs.workflowSteps(workflow));
|
|
155
155
|
return withSteps(
|
|
156
156
|
workflow,
|
|
157
157
|
steps.map(
|
|
@@ -165,7 +165,7 @@ var renameIn = (text, from, to) => text.replace(
|
|
|
165
165
|
);
|
|
166
166
|
function renameInput(workflow, from, to) {
|
|
167
167
|
if (from === to) return workflow;
|
|
168
|
-
const steps =
|
|
168
|
+
const steps = chunk2FEQGDW2_cjs.workflowSteps(workflow).map((s) => {
|
|
169
169
|
if (s.kind === "agent")
|
|
170
170
|
return {
|
|
171
171
|
...s,
|
|
@@ -214,13 +214,13 @@ function renameInput(workflow, from, to) {
|
|
|
214
214
|
var renamePerson = (a, from, to) => "input" in a && a.input === from ? { input: to } : a;
|
|
215
215
|
var renameRef = (r, from, to) => "input" in r && r.input === from ? { input: to } : r;
|
|
216
216
|
function moveStep(workflow, id, position) {
|
|
217
|
-
return withSteps(workflow,
|
|
217
|
+
return withSteps(workflow, chunk2FEQGDW2_cjs.workflowSteps(workflow), { ...layoutOf(workflow), [id]: position });
|
|
218
218
|
}
|
|
219
219
|
var COLUMN = 300;
|
|
220
220
|
var ROW = 140;
|
|
221
221
|
function autoLayout(steps) {
|
|
222
222
|
const layout = {};
|
|
223
|
-
|
|
223
|
+
chunk2FEQGDW2_cjs.stepLevels(steps).forEach(
|
|
224
224
|
(level, x) => level.forEach((s, y) => {
|
|
225
225
|
layout[s.id] = { x: x * COLUMN, y: (y - (level.length - 1) / 2) * ROW };
|
|
226
226
|
})
|
|
@@ -228,7 +228,7 @@ function autoLayout(steps) {
|
|
|
228
228
|
return layout;
|
|
229
229
|
}
|
|
230
230
|
function layoutWithDefaults(workflow) {
|
|
231
|
-
const auto = autoLayout(
|
|
231
|
+
const auto = autoLayout(chunk2FEQGDW2_cjs.workflowSteps(workflow));
|
|
232
232
|
return { ...auto, ...layoutOf(workflow) };
|
|
233
233
|
}
|
|
234
234
|
var DEFAULT_SIGNALS_EDITOR_LABELS = {
|
|
@@ -325,9 +325,9 @@ function SignalsEditor({
|
|
|
325
325
|
{
|
|
326
326
|
className: ui.cn(
|
|
327
327
|
"space-y-1.5 rounded-md border p-2",
|
|
328
|
-
|
|
328
|
+
chunk2FEQGDW2_cjs.isIncompleteSignal(signal) ? "border-destructive/50" : "border-border"
|
|
329
329
|
),
|
|
330
|
-
"data-incomplete":
|
|
330
|
+
"data-incomplete": chunk2FEQGDW2_cjs.isIncompleteSignal(signal) || void 0,
|
|
331
331
|
"data-testid": `${testId}-${i}`,
|
|
332
332
|
children: [
|
|
333
333
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
@@ -1042,7 +1042,7 @@ function StepInspector({
|
|
|
1042
1042
|
testId = "step-inspector"
|
|
1043
1043
|
}) {
|
|
1044
1044
|
const l = { ...DEFAULT_STEP_INSPECTOR_LABELS, ...labels };
|
|
1045
|
-
const steps =
|
|
1045
|
+
const steps = chunk2FEQGDW2_cjs.workflowSteps(workflow);
|
|
1046
1046
|
const step = steps.find((s) => s.id === stepId);
|
|
1047
1047
|
const run = workflow.run.kind === "steps" ? workflow.run : void 0;
|
|
1048
1048
|
if (!step || !run) {
|
|
@@ -1069,8 +1069,8 @@ function StepInspector({
|
|
|
1069
1069
|
const patch = (p) => onChange(updateStep(workflow, step.id, p));
|
|
1070
1070
|
const al = { ...DEFAULT_STEP_ACTION_SETTINGS_LABELS, ...actionLabels };
|
|
1071
1071
|
const ctx = {
|
|
1072
|
-
earlier:
|
|
1073
|
-
fields:
|
|
1072
|
+
earlier: chunk2FEQGDW2_cjs.upstreamSteps(steps, step.id),
|
|
1073
|
+
fields: chunk2FEQGDW2_cjs.runFields(workflow),
|
|
1074
1074
|
people,
|
|
1075
1075
|
tags,
|
|
1076
1076
|
documents
|
|
@@ -1091,7 +1091,7 @@ function StepInspector({
|
|
|
1091
1091
|
)
|
|
1092
1092
|
);
|
|
1093
1093
|
};
|
|
1094
|
-
const deps =
|
|
1094
|
+
const deps = chunk2FEQGDW2_cjs.stepDependencies(steps, step.id);
|
|
1095
1095
|
const titleOf = (id) => steps.find((s) => s.id === id)?.title ?? id;
|
|
1096
1096
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", "data-testid": `${testId}-step`, children: [
|
|
1097
1097
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
@@ -1171,7 +1171,7 @@ function StepInspector({
|
|
|
1171
1171
|
{
|
|
1172
1172
|
step,
|
|
1173
1173
|
workflows,
|
|
1174
|
-
fields:
|
|
1174
|
+
fields: chunk2FEQGDW2_cjs.runFields(workflow).map((f) => f.name),
|
|
1175
1175
|
patch,
|
|
1176
1176
|
l,
|
|
1177
1177
|
testId
|
|
@@ -1231,7 +1231,7 @@ function StepInspector({
|
|
|
1231
1231
|
testId: `${testId}-review-grid`
|
|
1232
1232
|
}
|
|
1233
1233
|
),
|
|
1234
|
-
|
|
1234
|
+
chunk2FEQGDW2_cjs.canAssign(step) && /* @__PURE__ */ jsxRuntime.jsx(AssigneeSettings, { step, patch, ctx, l: al, testId }),
|
|
1235
1235
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1236
1236
|
SignalsEditor,
|
|
1237
1237
|
{
|
|
@@ -1487,7 +1487,7 @@ function triggerFields(trigger, clearOthers) {
|
|
|
1487
1487
|
return {
|
|
1488
1488
|
timezone: trigger.timezone,
|
|
1489
1489
|
rrule: trigger.start === "repeat" ? trigger.rrule.trim() : none,
|
|
1490
|
-
run_at: trigger.start === "once" ?
|
|
1490
|
+
run_at: trigger.start === "once" ? chunkLGDX34UR_cjs.localInputToIso(trigger.runAt) : none,
|
|
1491
1491
|
event_kind: trigger.start === "event" ? trigger.eventKind.trim() : none,
|
|
1492
1492
|
// A step signal is `workflow_signal` narrowed to one signal name.
|
|
1493
1493
|
event_filter: filter ?? none,
|
|
@@ -1503,7 +1503,7 @@ function plan(value, options) {
|
|
|
1503
1503
|
criteria: [],
|
|
1504
1504
|
max_passes: 3,
|
|
1505
1505
|
documents: [],
|
|
1506
|
-
steps:
|
|
1506
|
+
steps: chunk2FEQGDW2_cjs.toPlanSteps(value.workflow, options)
|
|
1507
1507
|
};
|
|
1508
1508
|
}
|
|
1509
1509
|
function builderToWorkflowRequest(value, workspaceId, options = {}) {
|
|
@@ -1538,7 +1538,7 @@ function builderToWorkflowUpdate(value, options = {}) {
|
|
|
1538
1538
|
}
|
|
1539
1539
|
function workflowRecordToBuilder(record) {
|
|
1540
1540
|
const planned = record.plan?.steps ?? [];
|
|
1541
|
-
const steps = planned.length ?
|
|
1541
|
+
const steps = planned.length ? chunk2FEQGDW2_cjs.fromPlanSteps(planned) : record.prompt || record.skill_ref ? [
|
|
1542
1542
|
{
|
|
1543
1543
|
id: "work",
|
|
1544
1544
|
kind: "agent",
|
|
@@ -1546,7 +1546,7 @@ function workflowRecordToBuilder(record) {
|
|
|
1546
1546
|
...record.skill_ref ? { workflow: record.skill_ref } : { run: { kind: "prompt", promptTemplate: record.prompt } }
|
|
1547
1547
|
}
|
|
1548
1548
|
] : [];
|
|
1549
|
-
const when =
|
|
1549
|
+
const when = chunkLGDX34UR_cjs.workflowWhen(record);
|
|
1550
1550
|
return {
|
|
1551
1551
|
workflow: {
|
|
1552
1552
|
id: record.external_id,
|
|
@@ -1555,12 +1555,12 @@ function workflowRecordToBuilder(record) {
|
|
|
1555
1555
|
inputs: [],
|
|
1556
1556
|
landing: "chat",
|
|
1557
1557
|
schedulable: false,
|
|
1558
|
-
run: { kind: "steps", steps, layout:
|
|
1558
|
+
run: { kind: "steps", steps, layout: chunk2FEQGDW2_cjs.layoutFromPlanSteps(planned ?? []) }
|
|
1559
1559
|
},
|
|
1560
1560
|
trigger: {
|
|
1561
1561
|
...DEFAULT_WORKFLOW_TRIGGER,
|
|
1562
1562
|
start: when === "now" ? "manual" : when,
|
|
1563
|
-
runAt:
|
|
1563
|
+
runAt: chunkLGDX34UR_cjs.isoToLocalInput(record.run_at),
|
|
1564
1564
|
rrule: record.rrule ?? "",
|
|
1565
1565
|
timezone: record.timezone || DEFAULT_WORKFLOW_TRIGGER.timezone,
|
|
1566
1566
|
eventKind: record.event_kind ?? "",
|
|
@@ -1616,7 +1616,7 @@ function triggerSummary(trigger, options = {}) {
|
|
|
1616
1616
|
case "once":
|
|
1617
1617
|
return trigger.runAt ? new Date(trigger.runAt).toLocaleString() : l.starts.once;
|
|
1618
1618
|
case "repeat":
|
|
1619
|
-
return trigger.rrule ?
|
|
1619
|
+
return trigger.rrule ? chunkLGDX34UR_cjs.describeRRule(trigger.rrule) : l.starts.repeat;
|
|
1620
1620
|
case "event":
|
|
1621
1621
|
if (isSignalTrigger(trigger))
|
|
1622
1622
|
return trigger.signal ? l.signalSummary.replace("{signal}", trigger.signal) : l.stepSignals;
|
|
@@ -1675,7 +1675,7 @@ function TriggerInspector({
|
|
|
1675
1675
|
}
|
|
1676
1676
|
)
|
|
1677
1677
|
] }),
|
|
1678
|
-
trigger.start === "repeat" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1678
|
+
trigger.start === "repeat" && /* @__PURE__ */ jsxRuntime.jsx(chunkLGDX34UR_cjs.RecurrenceBuilder, { rrule: trigger.rrule, onChange: (rrule) => set({ rrule }) }),
|
|
1679
1679
|
trigger.start === "event" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
1680
1680
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { className: "text-xs", children: l.event }),
|
|
1681
1681
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1727,7 +1727,7 @@ function TriggerInspector({
|
|
|
1727
1727
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5", children: [
|
|
1728
1728
|
/* @__PURE__ */ jsxRuntime.jsx(ui.Label, { className: "text-xs", children: l.agent }),
|
|
1729
1729
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1730
|
-
|
|
1730
|
+
chunkLGDX34UR_cjs.AgentSelect,
|
|
1731
1731
|
{
|
|
1732
1732
|
agents,
|
|
1733
1733
|
value: trigger.agentId,
|
|
@@ -2037,12 +2037,12 @@ function WorkflowCanvas({
|
|
|
2037
2037
|
testId = "workflow-canvas"
|
|
2038
2038
|
}) {
|
|
2039
2039
|
const l = react.useMemo(() => ({ ...DEFAULT_WORKFLOW_CANVAS_LABELS, ...labels }), [labels]);
|
|
2040
|
-
const steps =
|
|
2040
|
+
const steps = chunk2FEQGDW2_cjs.workflowSteps(workflow);
|
|
2041
2041
|
const editable = !!onChange;
|
|
2042
2042
|
const built = react.useMemo(() => {
|
|
2043
2043
|
const layout = layoutWithDefaults(workflow);
|
|
2044
|
-
const all =
|
|
2045
|
-
const roots = all.filter((s) =>
|
|
2044
|
+
const all = chunk2FEQGDW2_cjs.workflowSteps(workflow);
|
|
2045
|
+
const roots = all.filter((s) => chunk2FEQGDW2_cjs.stepDependencies(all, s.id).length === 0);
|
|
2046
2046
|
const triggerNode = trigger ? [
|
|
2047
2047
|
{
|
|
2048
2048
|
id: TRIGGER_NODE,
|
|
@@ -2091,7 +2091,7 @@ function WorkflowCanvas({
|
|
|
2091
2091
|
react.useEffect(() => setNodes(built), [built]);
|
|
2092
2092
|
const edges = react.useMemo(
|
|
2093
2093
|
() => steps.flatMap((s) => {
|
|
2094
|
-
const deps =
|
|
2094
|
+
const deps = chunk2FEQGDW2_cjs.stepDependencies(steps, s.id);
|
|
2095
2095
|
const from = deps.length ? deps : trigger ? [TRIGGER_NODE] : [];
|
|
2096
2096
|
return from.map((d) => ({
|
|
2097
2097
|
id: `${d}->${s.id}`,
|
|
@@ -2342,12 +2342,12 @@ function WorkflowBuilder({
|
|
|
2342
2342
|
const [mode, setMode] = react.useState("design");
|
|
2343
2343
|
const [adding, setAdding] = react.useState(false);
|
|
2344
2344
|
const { workflow, trigger } = value;
|
|
2345
|
-
const steps =
|
|
2346
|
-
const problems =
|
|
2347
|
-
const missing =
|
|
2345
|
+
const steps = chunk2FEQGDW2_cjs.workflowSteps(workflow);
|
|
2346
|
+
const problems = chunk2FEQGDW2_cjs.validateWorkflowGraph(steps);
|
|
2347
|
+
const missing = chunk2FEQGDW2_cjs.stepConfigProblems(steps);
|
|
2348
2348
|
const nameOf = (id) => people.find((p) => p.value === id)?.label;
|
|
2349
|
-
const fields =
|
|
2350
|
-
const assigneeOf = (step) =>
|
|
2349
|
+
const fields = chunk2FEQGDW2_cjs.runFields(workflow);
|
|
2350
|
+
const assigneeOf = (step) => chunk2FEQGDW2_cjs.canAssign(step) ? chunk2FEQGDW2_cjs.assigneeName(step.assignee, { nameOf, fields }) : void 0;
|
|
2351
2351
|
const titles = react.useMemo(() => new Map(workflows.map((w) => [w.id, w.title])), [workflows]);
|
|
2352
2352
|
const setWorkflow = (next) => onChange({ ...value, workflow: next });
|
|
2353
2353
|
const addAfter = (from, kind) => {
|
|
@@ -2578,13 +2578,13 @@ function WorkflowPreview({
|
|
|
2578
2578
|
renderIcon,
|
|
2579
2579
|
testId
|
|
2580
2580
|
}) {
|
|
2581
|
-
const run =
|
|
2581
|
+
const run = chunkLGDX34UR_cjs.useWorkflowPreview(workflow, {
|
|
2582
2582
|
resolveWorkflow: (id) => workflows.find((w) => w.id === id),
|
|
2583
2583
|
compose,
|
|
2584
2584
|
answer
|
|
2585
2585
|
});
|
|
2586
2586
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2587
|
-
|
|
2587
|
+
chunk2FEQGDW2_cjs.WorkflowRunner,
|
|
2588
2588
|
{
|
|
2589
2589
|
workflow,
|
|
2590
2590
|
run,
|
|
@@ -2668,7 +2668,7 @@ function ConnectedWorkflowBuilder({
|
|
|
2668
2668
|
() => [
|
|
2669
2669
|
...hostWorkflows,
|
|
2670
2670
|
...(skills.data ?? []).map(
|
|
2671
|
-
(s) =>
|
|
2671
|
+
(s) => chunk2FEQGDW2_cjs.skillToWorkflow({
|
|
2672
2672
|
name: s.name,
|
|
2673
2673
|
slug: s.slug,
|
|
2674
2674
|
description: s.description,
|
|
@@ -2684,7 +2684,7 @@ function ConnectedWorkflowBuilder({
|
|
|
2684
2684
|
}));
|
|
2685
2685
|
const tasks = (conversations.data ?? []).filter((c) => c.status && c.status !== "done").map((c) => ({ value: c.external_id, label: c.title || c.external_id }));
|
|
2686
2686
|
const options = { resolveWorkflow: (wid) => workflows.find((w) => w.id === wid), compose };
|
|
2687
|
-
const problem = triggerProblem(value.trigger) ?? (
|
|
2687
|
+
const problem = triggerProblem(value.trigger) ?? (chunk2FEQGDW2_cjs.validateWorkflowGraph(chunk2FEQGDW2_cjs.workflowSteps(value.workflow)).length || chunk2FEQGDW2_cjs.stepConfigProblems(chunk2FEQGDW2_cjs.workflowSteps(value.workflow)).length ? "graph" : null);
|
|
2688
2688
|
const busy = create.isPending || update.isPending || run.isPending;
|
|
2689
2689
|
const save = async () => {
|
|
2690
2690
|
if (!workspaceId) return void 0;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useConnection } from '../chunk-OYMWV45N.js';
|
|
3
|
-
import { workflowWhen, isoToLocalInput, describeRRule, RecurrenceBuilder, AgentSelect, useWorkflowPreview, localInputToIso } from '../chunk-
|
|
3
|
+
import { workflowWhen, isoToLocalInput, describeRRule, RecurrenceBuilder, AgentSelect, useWorkflowPreview, localInputToIso } from '../chunk-A5WCK6ZG.js';
|
|
4
4
|
import '../chunk-CKB64Z4R.js';
|
|
5
5
|
import '../chunk-P6GHJSLR.js';
|
|
6
|
-
import { workflowSteps, dependsOn, stepLevels, isIncompleteSignal, runFields, upstreamSteps, stepDependencies, canAssign, fromPlanSteps, layoutFromPlanSteps, validateWorkflowGraph, stepConfigProblems, WorkflowRunner, skillToWorkflow, assigneeName, orderSteps, toPlanSteps } from '../chunk-
|
|
6
|
+
import { workflowSteps, dependsOn, stepLevels, isIncompleteSignal, runFields, upstreamSteps, stepDependencies, canAssign, fromPlanSteps, layoutFromPlanSteps, validateWorkflowGraph, stepConfigProblems, WorkflowRunner, skillToWorkflow, assigneeName, orderSteps, toPlanSteps } from '../chunk-QFA3NCWL.js';
|
|
7
7
|
import '../chunk-4WWM3GQ5.js';
|
|
8
|
-
import '../chunk-DDF5GPIJ.js';
|
|
9
|
-
import '../chunk-XD2M6LIG.js';
|
|
10
8
|
import '../chunk-RFXJYIDV.js';
|
|
11
9
|
import '../chunk-DPLRHEJZ.js';
|
|
12
10
|
import '../chunk-EVUEIBNU.js';
|
|
13
11
|
import '../chunk-NUNKSZKU.js';
|
|
14
12
|
import '../chunk-YU2KUMGE.js';
|
|
15
13
|
import '../chunk-ZPLG7QYF.js';
|
|
14
|
+
import '../chunk-P5ST47VY.js';
|
|
15
|
+
import '../chunk-XD2M6LIG.js';
|
|
16
16
|
import '../chunk-S7PSMMRG.js';
|
|
17
17
|
import '../chunk-HOXKR26S.js';
|
|
18
18
|
import '../chunk-AA3PT6KR.js';
|
|
19
19
|
import '../chunk-SLSBJRWW.js';
|
|
20
20
|
import '../chunk-NPLYHR2E.js';
|
|
21
|
-
import '../chunk-76JDDMSP.js';
|
|
22
|
-
import '../chunk-OXF2IFXG.js';
|
|
23
21
|
import '../chunk-TX2ZICS7.js';
|
|
24
22
|
import '../chunk-7F6CBP3Z.js';
|
|
23
|
+
import '../chunk-76JDDMSP.js';
|
|
24
|
+
import '../chunk-OXF2IFXG.js';
|
|
25
25
|
import '../chunk-VUNV25KB.js';
|
|
26
26
|
import { useMemo, useState, useEffect, useCallback, useRef } from 'react';
|
|
27
27
|
import { useWorkspaceUsers, useTags, useDocuments, useWorkflows, useSkills, useAgents, useConversations, useCreateWorkflow, useUpdateWorkflow, useRunWorkflow } from '@arbidocs/react';
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
var chunkXZIYRKLW_cjs = require('../chunk-XZIYRKLW.cjs');
|
|
5
5
|
var chunkXAJIKT6Y_cjs = require('../chunk-XAJIKT6Y.cjs');
|
|
6
6
|
var chunkOB5F4577_cjs = require('../chunk-OB5F4577.cjs');
|
|
7
|
-
require('../chunk-C54XEN5T.cjs');
|
|
8
|
-
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
9
7
|
var chunk7G2LJMUG_cjs = require('../chunk-7G2LJMUG.cjs');
|
|
10
8
|
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
9
|
+
require('../chunk-C54XEN5T.cjs');
|
|
10
|
+
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
11
11
|
require('../chunk-DES3K4SD.cjs');
|
|
12
12
|
var react = require('react');
|
|
13
13
|
var lucideReact = require('lucide-react');
|
package/dist/workspaces/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { CollapsibleSection, KeyValueRow } from '../chunk-LGBAZD37.js';
|
|
3
3
|
import { MemberAvatarStack } from '../chunk-XNOASBGW.js';
|
|
4
4
|
import { ActionLink } from '../chunk-S7PSMMRG.js';
|
|
5
|
-
import '../chunk-76JDDMSP.js';
|
|
6
|
-
import { fromNow, fmtDate } from '../chunk-OXF2IFXG.js';
|
|
7
5
|
export { RoleBadge, WorkspaceTypeBadgeView } from '../chunk-NBV56SGU.js';
|
|
8
6
|
import { ModalHeader } from '../chunk-TX2ZICS7.js';
|
|
7
|
+
import '../chunk-76JDDMSP.js';
|
|
8
|
+
import { fromNow, fmtDate } from '../chunk-OXF2IFXG.js';
|
|
9
9
|
import '../chunk-VUNV25KB.js';
|
|
10
10
|
import { createContext, useContext, useMemo, useState, useCallback, useId } from 'react';
|
|
11
11
|
import { FileText, MessagesSquare, Users, Check, ChevronRight, UserPlus, LogOut, AlertCircle, Plus, ArrowUpRight, AlignLeft, Globe, CreditCard, Loader2, FolderLock } from 'lucide-react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbidocs/blocks",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.80",
|
|
4
4
|
"description": "Composable, domain-neutral UI blocks for ARBI apps, organised by capability (retrieval, facts, agents, workspaces, citations, collaboration) plus shell, theme and site primitives, on top of @arbidocs/react.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -266,8 +266,8 @@
|
|
|
266
266
|
"example:test:e2e": "playwright test -c examples/custom-ui/playwright.config.ts"
|
|
267
267
|
},
|
|
268
268
|
"dependencies": {
|
|
269
|
-
"@arbidocs/client": "0.4.
|
|
270
|
-
"@arbidocs/coedit": "0.4.
|
|
269
|
+
"@arbidocs/client": "0.4.80",
|
|
270
|
+
"@arbidocs/coedit": "0.4.80",
|
|
271
271
|
"@dnd-kit/core": "^6.3.1",
|
|
272
272
|
"@dnd-kit/sortable": "^10.0.0",
|
|
273
273
|
"@dnd-kit/utilities": "^3.2.2",
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
"zustand": "^5.0.14"
|
|
294
294
|
},
|
|
295
295
|
"peerDependencies": {
|
|
296
|
-
"@arbidocs/react": "0.4.
|
|
296
|
+
"@arbidocs/react": "0.4.80",
|
|
297
297
|
"@docx-editor.dev/core": "2.28.0",
|
|
298
298
|
"@docx-editor.dev/react": "2.28.0",
|
|
299
299
|
"@mdxeditor/editor": "^4.0.4",
|