@arbidocs/blocks 0.4.75 → 0.4.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/agents/index.cjs +265 -253
  2. package/dist/agents/index.js +3 -3
  3. package/dist/agents/tasks/TaskActivityTimeline.d.ts +1 -1
  4. package/dist/agents/tasks/WorkflowThreadStrip.d.ts +38 -1
  5. package/dist/agents/tasks/index.d.ts +2 -1
  6. package/dist/agents/tasks/linkedRuns.d.ts +31 -0
  7. package/dist/agents/workflows/index.d.ts +1 -1
  8. package/dist/agents/workflows/planSteps.d.ts +3 -1
  9. package/dist/agents/workflows/types.d.ts +27 -0
  10. package/dist/{chunk-YWYVIQ7T.js → chunk-22P5KNIM.js} +24 -4
  11. package/dist/chunk-22P5KNIM.js.map +1 -0
  12. package/dist/{chunk-F4LUD3YC.cjs → chunk-7FKARMA3.cjs} +158 -53
  13. package/dist/chunk-7FKARMA3.cjs.map +1 -0
  14. package/dist/{chunk-LT2UORRG.js → chunk-TKB7TVMW.js} +132 -29
  15. package/dist/chunk-TKB7TVMW.js.map +1 -0
  16. package/dist/{chunk-P2RBE3FD.cjs → chunk-VYRKO3XU.cjs} +24 -3
  17. package/dist/chunk-VYRKO3XU.cjs.map +1 -0
  18. package/dist/connect/index.cjs +10 -10
  19. package/dist/connect/index.js +3 -3
  20. package/dist/facts/index.cjs +1 -1
  21. package/dist/facts/index.js +1 -1
  22. package/dist/files/index.cjs +1 -1
  23. package/dist/files/index.js +1 -1
  24. package/dist/home/index.cjs +1 -1
  25. package/dist/home/index.js +1 -1
  26. package/dist/index.cjs +430 -418
  27. package/dist/index.js +7 -7
  28. package/dist/settings/index.cjs +1 -1
  29. package/dist/settings/index.js +1 -1
  30. package/dist/shell/index.cjs +1 -1
  31. package/dist/shell/index.js +1 -1
  32. package/dist/studio/index.cjs +1 -1
  33. package/dist/studio/index.js +1 -1
  34. package/dist/workflow-canvas/SignalsEditor.d.ts +41 -0
  35. package/dist/workflow-canvas/StepInspector.d.ts +4 -1
  36. package/dist/workflow-canvas/TriggerInspector.d.ts +11 -2
  37. package/dist/workflow-canvas/WorkflowBuilder.d.ts +7 -2
  38. package/dist/workflow-canvas/index.cjs +443 -149
  39. package/dist/workflow-canvas/index.cjs.map +1 -1
  40. package/dist/workflow-canvas/index.d.ts +2 -1
  41. package/dist/workflow-canvas/index.js +410 -123
  42. package/dist/workflow-canvas/index.js.map +1 -1
  43. package/dist/workflow-canvas/trigger.d.ts +20 -1
  44. package/package.json +4 -4
  45. package/dist/chunk-F4LUD3YC.cjs.map +0 -1
  46. package/dist/chunk-LT2UORRG.js.map +0 -1
  47. package/dist/chunk-P2RBE3FD.cjs.map +0 -1
  48. package/dist/chunk-YWYVIQ7T.js.map +0 -1
@@ -10,6 +10,8 @@ type Schemas = components['schemas'];
10
10
  type CreateWorkflowRequest = Schemas['CreateWorkflowRequest'];
11
11
  type UpdateWorkflowRequest = Schemas['UpdateWorkflowRequest'];
12
12
  type WorkflowResponse = Schemas['WorkflowResponse'];
13
+ /** The event a step's signal raises (`TaskPlanStep.signals`): "When a step signals". */
14
+ export declare const WORKFLOW_SIGNAL_EVENT = "workflow_signal";
13
15
  /**
14
16
  * When a workflow starts: `manual` when someone presses Run, `once` at a date, `repeat` on a
15
17
  * schedule, `event` when something happens in the workspace, `task` when another task is done.
@@ -24,6 +26,10 @@ export interface WorkflowTrigger {
24
26
  timezone: string;
25
27
  /** `event`: a notification type. */
26
28
  eventKind: string;
29
+ /** `event` on `workflow_signal`: the signal name it starts on (its `event_filter.signal`). */
30
+ signal: string;
31
+ /** `event` on any other kind: the saved equality filter, kept as it was. */
32
+ eventFilter?: Record<string, string | number | boolean> | null;
27
33
  /** `task`: the task (`con-…`) it waits on. */
28
34
  afterTaskId: string;
29
35
  /** The agent that runs it (`agt-…`); `''` = the owner's own assistant. */
@@ -38,7 +44,9 @@ export interface WorkflowBuilderValue {
38
44
  trigger: WorkflowTrigger;
39
45
  }
40
46
  /** What is missing before the trigger can be saved; `null` when it can. */
41
- export declare function triggerProblem(trigger: WorkflowTrigger): 'runAt' | 'rrule' | 'event' | 'task' | null;
47
+ export declare function triggerProblem(trigger: WorkflowTrigger): 'runAt' | 'rrule' | 'event' | 'signal' | 'task' | null;
48
+ /** Does the workflow start when a step (of any workflow) raises a signal? */
49
+ export declare const isSignalTrigger: (trigger: WorkflowTrigger) => boolean;
42
50
  /** A new saved workflow: its steps in the plan (prompts keep `{{field}}` for each run to fill). */
43
51
  export declare function builderToWorkflowRequest(value: WorkflowBuilderValue, workspaceId: string, options?: StepComposeOptions): CreateWorkflowRequest;
44
52
  /** An edit of a saved workflow: the steps and the trigger as the builder now has them. */
@@ -48,4 +56,15 @@ export declare function builderToWorkflowUpdate(value: WorkflowBuilderValue, opt
48
56
  * opens as a workflow of that one agent step; saving it keeps it as steps.
49
57
  */
50
58
  export declare function workflowRecordToBuilder(record: WorkflowResponse): WorkflowBuilderValue;
59
+ /** A signal a firm's workflow declares, as the "When a step signals" picker offers it. */
60
+ export interface DeclaredSignal {
61
+ value: string;
62
+ /** Where it is raised: `<workflow> › <step>` (the first place, when several raise it). */
63
+ label: string;
64
+ }
65
+ /**
66
+ * Every signal the given workflows' steps declare (saved records, plus the one being built), each
67
+ * name once, in the order first seen: the picker's options. Free text stays allowed.
68
+ */
69
+ export declare function declaredSignals(records: ReadonlyArray<Pick<WorkflowResponse, 'name' | 'plan'>>, current?: WorkflowDefinition): DeclaredSignal[];
51
70
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arbidocs/blocks",
3
- "version": "0.4.75",
3
+ "version": "0.4.76",
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.75",
270
- "@arbidocs/coedit": "0.4.75",
269
+ "@arbidocs/client": "0.4.76",
270
+ "@arbidocs/coedit": "0.4.76",
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.75",
296
+ "@arbidocs/react": "0.4.76",
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",