@arbidocs/blocks 0.4.76 → 0.4.78

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 (123) hide show
  1. package/dist/agents/index.cjs +346 -258
  2. package/dist/agents/index.js +5 -5
  3. package/dist/agents/tasks/TaskActivityTimeline.d.ts +1 -1
  4. package/dist/agents/tasks/WorkflowThreadStrip.d.ts +15 -4
  5. package/dist/agents/workflows/SchemaForm.d.ts +6 -1
  6. package/dist/agents/workflows/StepBarFrame.d.ts +75 -0
  7. package/dist/agents/workflows/StepParts.d.ts +109 -0
  8. package/dist/agents/workflows/WorkflowRunner.d.ts +15 -2
  9. package/dist/agents/workflows/WorkflowStepBar.d.ts +9 -11
  10. package/dist/agents/workflows/index.d.ts +5 -2
  11. package/dist/agents/workflows/planSteps.d.ts +8 -1
  12. package/dist/agents/workflows/run.d.ts +61 -8
  13. package/dist/agents/workflows/stepWindow.d.ts +59 -0
  14. package/dist/agents/workflows/types.d.ts +133 -4
  15. package/dist/agents/workflows/useWorkflowPreview.d.ts +2 -1
  16. package/dist/agents/workflows/useWorkflowView.d.ts +19 -0
  17. package/dist/chat/ChatPage.d.ts +1 -1
  18. package/dist/chat/WorkflowStepChip.d.ts +24 -0
  19. package/dist/chat/chat-page-types.d.ts +9 -0
  20. package/dist/chat/index.cjs +130 -122
  21. package/dist/chat/index.d.ts +1 -0
  22. package/dist/chat/index.js +2 -2
  23. package/dist/{chunk-TKB7TVMW.js → chunk-5OC5CGYX.js} +168 -100
  24. package/dist/chunk-5OC5CGYX.js.map +1 -0
  25. package/dist/{chunk-ZWA7UUZL.cjs → chunk-7YUFMNFW.cjs} +2 -54
  26. package/dist/chunk-7YUFMNFW.cjs.map +1 -0
  27. package/dist/chunk-A24C6BNA.js +92 -0
  28. package/dist/chunk-A24C6BNA.js.map +1 -0
  29. package/dist/chunk-AINNADMT.cjs +62 -0
  30. package/dist/chunk-AINNADMT.cjs.map +1 -0
  31. package/dist/chunk-CWAZNXC5.js +441 -0
  32. package/dist/chunk-CWAZNXC5.js.map +1 -0
  33. package/dist/{chunk-UIWLDSTF.js → chunk-EWSEQEPL.js} +71 -7
  34. package/dist/chunk-EWSEQEPL.js.map +1 -0
  35. package/dist/chunk-FE4ULGOR.js +151 -0
  36. package/dist/chunk-FE4ULGOR.js.map +1 -0
  37. package/dist/chunk-FT5FFXSJ.js +60 -0
  38. package/dist/chunk-FT5FFXSJ.js.map +1 -0
  39. package/dist/{chunk-WJEKRSPH.js → chunk-ICBAFX5B.js} +3 -3
  40. package/dist/{chunk-WJEKRSPH.js.map → chunk-ICBAFX5B.js.map} +1 -1
  41. package/dist/{chunk-7CVF3DK2.cjs → chunk-IF6VAYIA.cjs} +5 -5
  42. package/dist/{chunk-7CVF3DK2.cjs.map → chunk-IF6VAYIA.cjs.map} +1 -1
  43. package/dist/chunk-MLAHDAN5.cjs +450 -0
  44. package/dist/chunk-MLAHDAN5.cjs.map +1 -0
  45. package/dist/{chunk-IPGKTUF7.cjs → chunk-MP6FK43E.cjs} +71 -5
  46. package/dist/chunk-MP6FK43E.cjs.map +1 -0
  47. package/dist/{chunk-5EBGRG3X.js → chunk-OPA2Y6YZ.js} +3 -54
  48. package/dist/chunk-OPA2Y6YZ.js.map +1 -0
  49. package/dist/{chunk-7FKARMA3.cjs → chunk-SSDISIDW.cjs} +190 -122
  50. package/dist/chunk-SSDISIDW.cjs.map +1 -0
  51. package/dist/chunk-TZR36PPP.cjs +95 -0
  52. package/dist/chunk-TZR36PPP.cjs.map +1 -0
  53. package/dist/chunk-VFIZYSZB.cjs +2783 -0
  54. package/dist/chunk-VFIZYSZB.cjs.map +1 -0
  55. package/dist/chunk-WXRCMIAE.js +2707 -0
  56. package/dist/chunk-WXRCMIAE.js.map +1 -0
  57. package/dist/{chunk-HITAN7JF.cjs → chunk-XMBYDLZQ.cjs} +4 -4
  58. package/dist/{chunk-HITAN7JF.cjs.map → chunk-XMBYDLZQ.cjs.map} +1 -1
  59. package/dist/{chunk-MK6NJQGF.js → chunk-XQDM6T6C.js} +3 -3
  60. package/dist/{chunk-MK6NJQGF.js.map → chunk-XQDM6T6C.js.map} +1 -1
  61. package/dist/chunk-ZVBPRMHJ.cjs +153 -0
  62. package/dist/chunk-ZVBPRMHJ.cjs.map +1 -0
  63. package/dist/connect/docx.cjs +10 -88
  64. package/dist/connect/docx.cjs.map +1 -1
  65. package/dist/connect/docx.js +6 -86
  66. package/dist/connect/docx.js.map +1 -1
  67. package/dist/connect/index.cjs +468 -49
  68. package/dist/connect/index.cjs.map +1 -1
  69. package/dist/connect/index.d.ts +2 -0
  70. package/dist/connect/index.js +454 -37
  71. package/dist/connect/index.js.map +1 -1
  72. package/dist/connection/ConnectedTagMatrix.d.ts +20 -0
  73. package/dist/connection/ConnectedWorkflowRunner.d.ts +28 -2
  74. package/dist/connection/WorkflowRunThread.d.ts +21 -0
  75. package/dist/connection/WorkflowRunnerDialogs.d.ts +37 -0
  76. package/dist/connection/useWorkflowThread.d.ts +12 -0
  77. package/dist/document-tools/index.cjs +7 -143
  78. package/dist/document-tools/index.cjs.map +1 -1
  79. package/dist/document-tools/index.js +5 -144
  80. package/dist/document-tools/index.js.map +1 -1
  81. package/dist/docx/index.cjs +18 -17
  82. package/dist/docx/index.cjs.map +1 -1
  83. package/dist/docx/index.js +3 -2
  84. package/dist/docx/index.js.map +1 -1
  85. package/dist/facts/index.cjs +1 -1
  86. package/dist/facts/index.js +1 -1
  87. package/dist/files/index.cjs +1 -1
  88. package/dist/files/index.js +1 -1
  89. package/dist/home/index.cjs +1 -1
  90. package/dist/home/index.js +1 -1
  91. package/dist/index.cjs +560 -431
  92. package/dist/index.cjs.map +1 -1
  93. package/dist/index.d.ts +1 -0
  94. package/dist/index.js +10 -9
  95. package/dist/index.js.map +1 -1
  96. package/dist/shell/index.cjs +1 -1
  97. package/dist/shell/index.js +1 -1
  98. package/dist/studio/index.cjs +4 -4
  99. package/dist/studio/index.js +3 -3
  100. package/dist/tags/TagMatrix.d.ts +64 -0
  101. package/dist/tags/index.d.ts +3 -0
  102. package/dist/tags/tagMatrixModel.d.ts +39 -0
  103. package/dist/workflow-canvas/StepActionSettings.d.ts +132 -0
  104. package/dist/workflow-canvas/StepInspector.d.ts +25 -2
  105. package/dist/workflow-canvas/WorkflowBuilder.d.ts +11 -3
  106. package/dist/workflow-canvas/WorkflowCanvas.d.ts +27 -2
  107. package/dist/workflow-canvas/edit.d.ts +9 -1
  108. package/dist/workflow-canvas/index.cjs +882 -102
  109. package/dist/workflow-canvas/index.cjs.map +1 -1
  110. package/dist/workflow-canvas/index.js +849 -69
  111. package/dist/workflow-canvas/index.js.map +1 -1
  112. package/package.json +4 -4
  113. package/src/workflow-canvas/canvas.css +9 -0
  114. package/dist/chunk-22P5KNIM.js +0 -1422
  115. package/dist/chunk-22P5KNIM.js.map +0 -1
  116. package/dist/chunk-5EBGRG3X.js.map +0 -1
  117. package/dist/chunk-7FKARMA3.cjs.map +0 -1
  118. package/dist/chunk-IPGKTUF7.cjs.map +0 -1
  119. package/dist/chunk-TKB7TVMW.js.map +0 -1
  120. package/dist/chunk-UIWLDSTF.js.map +0 -1
  121. package/dist/chunk-VYRKO3XU.cjs +0 -1469
  122. package/dist/chunk-VYRKO3XU.cjs.map +0 -1
  123. package/dist/chunk-ZWA7UUZL.cjs.map +0 -1
@@ -1,23 +1,23 @@
1
1
  "use client";
2
- 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_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_TASK_THREAD_CHIP_LABELS, DEFAULT_TASK_TRIGGER_CHIP_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_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, 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, TaskActivityTimeline, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TaskTriggerChip, TasksToolbar, ThreadActivity, ThreadNotifyDialog, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WORKFLOW_COLUMN_ORDER, WorkflowConfigDialog, WorkflowDocumentsField, WorkflowLauncher, 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, skillSlug, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowFromSkillMarkdown, workflowStatus, workflowTaskFields, workflowToComposerValues, workflowToSkillMarkdown, workflowTriggerType, workflowWhen } from '../chunk-TKB7TVMW.js';
2
+ 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_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_TASK_THREAD_CHIP_LABELS, DEFAULT_TASK_TRIGGER_CHIP_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_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, 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, TaskActivityTimeline, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TaskTriggerChip, TasksToolbar, ThreadActivity, ThreadNotifyDialog, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WORKFLOW_COLUMN_ORDER, WorkflowConfigDialog, WorkflowDocumentsField, WorkflowLauncher, 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, skillSlug, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowFromSkillMarkdown, workflowStatus, workflowTaskFields, workflowToComposerValues, workflowToSkillMarkdown, workflowTriggerType, workflowWhen } from '../chunk-5OC5CGYX.js';
3
3
  import '../chunk-CKB64Z4R.js';
4
4
  import '../chunk-P6GHJSLR.js';
5
- export { DEFAULT_SCHEMA_FORM_LABELS, DEFAULT_WORKFLOW_RUNNER_LABELS, EMPTY_WORKFLOW_SCOPE, SKILL_PROMPT_FALLBACK_PLACEHOLDER, SKILL_PROMPT_LABEL, SchemaForm, WorkflowRunner, buildLaunch, composeStepPrompt, composeWorkflowPrompt, defaultInputs, dependsOn, fieldToFrontmatter, fillRunText, fillStepInputs, fromPlanSteps, initialRunInputs, inputsFromContext, isEmptyWorkflowScope, isIncompleteSignal, isPersonStep, isRunFinished, isSteppedWorkflow, isWorkflowScope, layoutFromPlanSteps, nextAction, orderSteps, promptFieldName, reviewInstructions, runFields, runThreadTitle, skillToWorkflow, stepDependencies, stepLevels, stepPhase, stepStatesFromActivity, toPlanSteps, useWorkflowView, validateInputs, validateStep, validateWorkflowGraph, workflowAccepts, workflowFromFrontmatter, workflowSteps, workflowsAccepting, workflowsForHost } from '../chunk-22P5KNIM.js';
5
+ export { ActionStepBody, ApprovalEvidence, AssigneeLine, DEFAULT_ASSIGNEE_WORDING, DEFAULT_SCHEMA_FORM_LABELS, DEFAULT_STEP_BAR_LABELS, DEFAULT_WORKFLOW_RUNNER_LABELS, DEFAULT_WORKFLOW_STEP_PARTS_LABELS, EMPTY_WORKFLOW_SCOPE, SKILL_PROMPT_FALLBACK_PLACEHOLDER, SKILL_PROMPT_LABEL, SchemaForm, SendBackControl, WorkflowRunner, activeStepId, assigneeName, buildLaunch, canAssign, composeStepPrompt, composeWorkflowPrompt, defaultInputs, dependsOn, fieldToFrontmatter, fillRunText, fillStepInputs, fromPlanAssignee, fromPlanDocumentRef, fromPlanSteps, initialRunInputs, inputsFromContext, isEmptyWorkflowScope, isIncompleteSignal, isPersonAction, isPersonStep, isRunFinished, isSteppedWorkflow, isWorkflowScope, layoutFromPlanSteps, nextAction, orderSteps, promptFieldName, reviewInstructions, runFields, runFieldsOf, runThreadTitle, sendBackTargets, skillToWorkflow, splitDocRef, stepConfigProblems, stepDependencies, stepFields, stepLevels, stepPhase, stepStatesFromActivity, stepWindow, toPlanAssignee, toPlanDocumentRef, toPlanSteps, upstreamSteps, useWorkflowView, validateInputs, validateStep, validateWorkflowGraph, workflowAccepts, workflowFromFrontmatter, workflowSteps, workflowsAccepting, workflowsForHost } from '../chunk-WXRCMIAE.js';
6
6
  import '../chunk-4WWM3GQ5.js';
7
+ import '../chunk-DDF5GPIJ.js';
8
+ import '../chunk-XD2M6LIG.js';
7
9
  import '../chunk-RFXJYIDV.js';
8
10
  import '../chunk-DPLRHEJZ.js';
9
11
  import '../chunk-EVUEIBNU.js';
10
12
  import '../chunk-NUNKSZKU.js';
11
13
  import '../chunk-YU2KUMGE.js';
12
14
  import '../chunk-ZPLG7QYF.js';
13
- import '../chunk-DDF5GPIJ.js';
14
- import '../chunk-XD2M6LIG.js';
15
15
  import '../chunk-S7PSMMRG.js';
16
- import '../chunk-76JDDMSP.js';
17
16
  import '../chunk-HOXKR26S.js';
18
17
  import '../chunk-AA3PT6KR.js';
19
18
  import '../chunk-SLSBJRWW.js';
20
19
  import '../chunk-NPLYHR2E.js';
20
+ import '../chunk-76JDDMSP.js';
21
21
  import '../chunk-OXF2IFXG.js';
22
22
  import '../chunk-TX2ZICS7.js';
23
23
  import '../chunk-7F6CBP3Z.js';
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- export type TaskActivityKind = 'created' | 'run_started' | 'awaiting_access' | 'access_granted' | 'done' | 'reopened' | 'failed' | 'participant_joined' | 'assistant_responded' | 'assistant_stopped' | 'artifact_created' | 'artifact_edited' | 'document_added' | 'document_removed' | 'notified' | 'step_started' | 'step_done' | 'step_skipped' | 'step_failed' | 'step_signal' | 'linked_run';
2
+ export type TaskActivityKind = 'created' | 'run_started' | 'awaiting_access' | 'access_granted' | 'done' | 'reopened' | 'failed' | 'participant_joined' | 'assistant_responded' | 'assistant_stopped' | 'artifact_created' | 'artifact_edited' | 'document_added' | 'document_removed' | 'notified' | 'step_started' | 'step_done' | 'step_skipped' | 'step_failed' | 'step_waiting' | 'step_progress' | 'step_sent_back' | 'step_ready' | 'step_reminded' | 'step_signal' | 'linked_run';
3
3
  /** One event of a task's history, as the backend returns it (oldest first). */
4
4
  export interface TaskActivityEvent {
5
5
  external_id: string;
@@ -1,14 +1,17 @@
1
1
  /**
2
- * The top bar of a thread that runs a workflow: the workflow's named steps (done, under way, still
3
- * to come), with everything that actually happened in the thread attached to the step it happened
2
+ * The top bar of a thread that runs a workflow: where the run is — the previous, current and next
3
+ * steps by name, the rest behind ‹ › and "…", parallel steps as a "+N" chip, and every running step
4
+ * out of view as "Working: <title>" (`StepBarFrame`, the same model as the runner's stepper) — with
5
+ * everything that actually happened in the thread attached to the step it happened
4
6
  * during — the assistant's turns, a draft sent back, people's messages and edits, notifications.
5
7
  * What happened before the first step or after the last stays as ordinary entries at either end.
6
8
  * Linked runs show too: a signal a step raised and the linked thread it started (after the step),
7
9
  * and, for a thread a signal started, "Started by <step> in <thread>" (before the steps).
8
10
  * A thread without a workflow shows `TaskFlow` instead.
9
11
  */
10
- import type { ReactNode } from 'react';
12
+ import { type ReactNode } from 'react';
11
13
  import { type WorkflowStepPhase } from '../workflows/run';
14
+ import { type StepBarLabels } from '../workflows/StepBarFrame';
12
15
  import type { WorkflowStep, WorkflowStepState } from '../workflows/types';
13
16
  import type { TaskFlowItem } from './TaskFlow';
14
17
  /** An activity entry, with what the strip needs to place it. */
@@ -44,6 +47,10 @@ export interface WorkflowThreadStripLabels {
44
47
  signalled: string;
45
48
  /** A linked thread's tooltip; `{signal}` is replaced. */
46
49
  linkedRun: string;
50
+ /** A step that waits for someone; `{name}` is replaced. */
51
+ waitingFor: string;
52
+ /** A step the work was sent back to. */
53
+ sentBack: string;
47
54
  }
48
55
  export declare const DEFAULT_WORKFLOW_THREAD_STRIP_LABELS: WorkflowThreadStripLabels;
49
56
  /** A linked thread a signal started, as the host names it. */
@@ -84,7 +91,11 @@ export interface WorkflowThreadStripProps {
84
91
  signals?: readonly WorkflowThreadSignal[];
85
92
  /** For a thread a signal started: where it came from. */
86
93
  startedBy?: WorkflowThreadOrigin;
94
+ /** Who a step is for, in words (`assigneeName`): shown on the step while it waits for them. */
95
+ assigneeOf?: (step: WorkflowStep) => string | undefined;
87
96
  labels?: Partial<WorkflowThreadStripLabels>;
97
+ /** The bar's own wording (arrows, "…", "Working: <title>", status words). */
98
+ barLabels?: Partial<StepBarLabels>;
88
99
  className?: string;
89
100
  }
90
101
  /** "Started by <step> in <thread>": a linked run's way back to the thread that started it. */
@@ -92,4 +103,4 @@ export declare function WorkflowThreadStartedBy({ origin, labels, }: {
92
103
  origin: WorkflowThreadOrigin;
93
104
  labels?: Partial<WorkflowThreadStripLabels>;
94
105
  }): import("react").JSX.Element;
95
- export declare function WorkflowThreadStrip({ steps, states, items, renderIcon, onSkip, renderStepAction, signals, startedBy, labels, className, }: WorkflowThreadStripProps): import("react").JSX.Element;
106
+ export declare function WorkflowThreadStrip({ steps, states, items, renderIcon, onSkip, renderStepAction, signals, startedBy, assigneeOf, labels, barLabels, className, }: WorkflowThreadStripProps): import("react").JSX.Element;
@@ -20,6 +20,11 @@ export interface SchemaFormProps {
20
20
  renderDocuments?: (field: WorkflowField, value: WorkflowScope, onChange: (s: WorkflowScope) => void) => ReactNode;
21
21
  /** Maps an option's `icon` key to a mark. */
22
22
  renderIcon?: (key: string) => ReactNode;
23
+ /** Who a `person` field offers (the workspace's members); without them it takes an id. */
24
+ people?: ReadonlyArray<{
25
+ value: string;
26
+ label: string;
27
+ }>;
23
28
  /**
24
29
  * Plain Enter in a multi-line field submits the form (Shift+Enter inserts the newline), the
25
30
  * chat's own convention. Single-line fields submit natively.
@@ -34,4 +39,4 @@ export interface SchemaFormProps {
34
39
  * Renders a workflow's declared inputs as a form. Controlled: the caller owns `values` (see
35
40
  * `defaultInputs`) and decides when to validate (`validateInputs`) and show `errors`.
36
41
  */
37
- export declare function SchemaForm({ fields, values, onChange, errors, renderScope, renderDocuments, renderIcon, onEnterSubmit, testIdPrefix, labels, className, }: SchemaFormProps): import("react").JSX.Element;
42
+ export declare function SchemaForm({ fields, values, onChange, errors, renderScope, renderDocuments, renderIcon, onEnterSubmit, people, testIdPrefix, labels, className, }: SchemaFormProps): import("react").JSX.Element;
@@ -0,0 +1,75 @@
1
+ /**
2
+ * The frame both step bars share (`WorkflowStepBar` in a runner, `WorkflowThreadStrip` on a
3
+ * thread): `‹ … [previous] [CURRENT] [next] … ›`, from `stepWindow`. Each visible level shows one
4
+ * step by name (its pill is the host's), a parallel level adds a "+N" chip that lists the group,
5
+ * "…" on either side lists every step, and every running step the window does not show gets a
6
+ * "Working: <title>" pill at the end. The bar is a nav landmark; ←/→ (Home/End) move the window.
7
+ */
8
+ import { type ReactNode } from 'react';
9
+ import type { WorkflowStepPhase } from './run';
10
+ import { type StepWindow, type StepWindowLevel, type StepWindowStep } from './stepWindow';
11
+ export declare function PhaseMark({ phase, icon }: {
12
+ phase: WorkflowStepPhase;
13
+ icon?: ReactNode;
14
+ }): import("react").JSX.Element;
15
+ export interface StepBarLabels {
16
+ nav: string;
17
+ back: string;
18
+ forward: string;
19
+ /** The "…" before the window; `{count}` is replaced. */
20
+ hiddenBefore: string;
21
+ /** The "…" after the window; `{count}` is replaced. */
22
+ hiddenAfter: string;
23
+ /** The full list's heading; `{position}` and `{total}` are replaced. */
24
+ position: string;
25
+ /** A parallel group's chip; `{count}` is replaced. */
26
+ parallel: string;
27
+ inParallel: string;
28
+ /** A running step out of view; `{title}` is replaced. */
29
+ working: string;
30
+ /** Several more running out of view; `{count}` is replaced. */
31
+ moreWorking: string;
32
+ /** A step that waits for someone; `{name}` is replaced. */
33
+ waitingFor: string;
34
+ phases: Record<WorkflowStepPhase, string>;
35
+ }
36
+ export declare const DEFAULT_STEP_BAR_LABELS: StepBarLabels;
37
+ /** A pill's colours: the status shows in the text colour as well as the icon. */
38
+ export declare function stepPillTone(phase: WorkflowStepPhase, current: boolean): string;
39
+ export declare const STEP_PILL = "flex min-w-0 items-center gap-1.5 whitespace-nowrap rounded-full border px-2.5 py-1 text-xs font-medium transition-colors";
40
+ /** A label is the full title, cut with an ellipsis only when very long (in full in `title`). */
41
+ export declare const STEP_LABEL = "min-w-[2.5rem] truncate";
42
+ /** What follows a name on its pill ("Waiting for …"): cut before the name is. */
43
+ export declare const STEP_EXTRA = "min-w-0 shrink-[6] truncate font-normal opacity-80";
44
+ /** A step in the frame's lists: its title, for naming it. */
45
+ export interface StepBarStep extends StepWindowStep {
46
+ title: string;
47
+ }
48
+ export interface StepBarFrameProps<T extends StepBarStep> {
49
+ levels: T[][];
50
+ phaseOf: (id: string) => WorkflowStepPhase;
51
+ /** The step in view (none = where the run is). */
52
+ current?: string | null;
53
+ /** Go to a step: from a group, the full list or a "Working" pill. */
54
+ onSelect: (id: string) => void;
55
+ /** The pill of a level's primary step (a button or a popover trigger). */
56
+ renderStep: (step: T, level: StepWindowLevel<T>, win: StepWindow<T>, narrow: boolean) => ReactNode;
57
+ /**
58
+ * What the step in view waits on ("Waiting for …"): on its pill when wide, on a line of its own
59
+ * when narrow (where the pill has room for its name only).
60
+ */
61
+ noteOf?: (id: string) => string | undefined;
62
+ /** What follows a level's pill (signals it raised…). */
63
+ renderAfter?: (level: StepWindowLevel<T>) => ReactNode;
64
+ /** Before the steps / after them: shown while the window is at that end. */
65
+ leading?: ReactNode;
66
+ trailing?: ReactNode;
67
+ /** Steps that cannot be gone to (the completion marker). */
68
+ isSelectable?: (id: string) => boolean;
69
+ icon?: (step: T) => ReactNode;
70
+ disabled?: boolean;
71
+ labels?: Partial<StepBarLabels>;
72
+ tid: (suffix: string) => string;
73
+ className?: string;
74
+ }
75
+ export declare function StepBarFrame<T extends StepBarStep>({ levels, phaseOf, current, onSelect, renderStep, noteOf, renderAfter, leading, trailing, isSelectable, icon, disabled, labels, tid, className, }: StepBarFrameProps<T>): import("react").JSX.Element;
@@ -0,0 +1,109 @@
1
+ /**
2
+ * The runner's step parts beyond a form, an upload and an agent's answer: an action step (a
3
+ * signature, an email draft, a tabular review), a review's fields, its send-back and what it
4
+ * approved, the "Waiting for <person>" line, and "Open in Word" for a tracked-changes version.
5
+ * Everything that leaves the runner (opening a document, mail, a grid, the sign flow) goes through
6
+ * the host's `WorkflowRunnerActions`.
7
+ */
8
+ import { type ReactNode } from 'react';
9
+ import type { WorkflowRunView } from './useWorkflowView';
10
+ import type { WorkflowActionStep, WorkflowAgentStep, WorkflowReviewStep, WorkflowStepState } from './types';
11
+ /** Where the runner hands off to the host. Each is optional: absent, its button is not shown. */
12
+ export interface WorkflowRunnerActions {
13
+ /** Open a document, or one version of it (`doc-…@v3`). */
14
+ openDocument?: (ref: string) => void;
15
+ /** Open the document of a signature step to sign it (the signer's turn). */
16
+ sign?: (step: WorkflowActionStep, state: WorkflowStepState) => void;
17
+ /** Open an email step's draft in native mail. */
18
+ openDraft?: (draftId: string, mailbox?: string) => void;
19
+ /** Open a finished tabular review's grid: its columns (labels) over its documents. */
20
+ openReview?: (tags: string[], documents: string[]) => void;
21
+ /** Open a tracked-changes version in the Word editor, to accept or reject the changes. */
22
+ openRedline?: (ref: string) => void;
23
+ /** Show a step's answer where it is in the thread. */
24
+ openMessage?: (messageId: string) => void;
25
+ /** The person on screen (`usr-…`): a signature offers "Open and sign" to its signers only. */
26
+ me?: string;
27
+ }
28
+ export interface WorkflowStepPartsLabels {
29
+ waitingFor: string;
30
+ sendBack: string;
31
+ sendBackTo: string;
32
+ sendBackNote: string;
33
+ cancel: string;
34
+ sentBackHere: string;
35
+ approvedBy: string;
36
+ approvedAt: string;
37
+ approvedWhat: string;
38
+ viewAnswer: string;
39
+ fieldsHeading: string;
40
+ signers: string;
41
+ signed: string;
42
+ notSigned: string;
43
+ openAndSign: string;
44
+ decline: string;
45
+ declineNote: string;
46
+ declineConfirm: string;
47
+ declined: string;
48
+ signedVersion: string;
49
+ preparingSign: string;
50
+ expires: string;
51
+ preparingDraft: string;
52
+ draftReady: string;
53
+ openDraft: string;
54
+ emailSent: string;
55
+ reviewRunning: string;
56
+ reviewDone: string;
57
+ openReview: string;
58
+ openInWord: string;
59
+ redlineHint: string;
60
+ someone: string;
61
+ }
62
+ export declare const DEFAULT_WORKFLOW_STEP_PARTS_LABELS: WorkflowStepPartsLabels;
63
+ /** "Waiting for Sophie Lindqvist" on a step a person has to do. */
64
+ export declare function AssigneeLine({ run, stepId, l, testId, }: {
65
+ run: WorkflowRunView;
66
+ stepId: string;
67
+ l: WorkflowStepPartsLabels;
68
+ testId: string;
69
+ }): import("react").JSX.Element | null;
70
+ /** A step reopened by a send-back says so. */
71
+ export declare function SentBackNote({ state, l, testId, }: {
72
+ state: WorkflowStepState | undefined;
73
+ l: WorkflowStepPartsLabels;
74
+ testId: string;
75
+ }): import("react").JSX.Element | null;
76
+ /** "Send back" on a ready step: pick the earlier step to redo and say what needs to change. */
77
+ export declare function SendBackControl({ run, step, l, testId, }: {
78
+ run: WorkflowRunView;
79
+ step: WorkflowReviewStep;
80
+ l: WorkflowStepPartsLabels;
81
+ testId: string;
82
+ }): import("react").JSX.Element | null;
83
+ /** What a completed review recorded: who approved, the answers and versions, the fields. */
84
+ export declare function ApprovalEvidence({ run, step, actions, nameOfDoc, l, testId, }: {
85
+ run: WorkflowRunView;
86
+ step: WorkflowReviewStep;
87
+ actions?: WorkflowRunnerActions;
88
+ nameOfDoc?: (id: string) => string | undefined;
89
+ l: WorkflowStepPartsLabels;
90
+ testId: string;
91
+ }): import("react").JSX.Element | null;
92
+ /** "Open in Word" for an agent step that edited a document with tracked changes. */
93
+ export declare function RedlineOpen({ step, state, actions, l, testId, }: {
94
+ step: WorkflowAgentStep;
95
+ state: WorkflowStepState | undefined;
96
+ actions?: WorkflowRunnerActions;
97
+ l: WorkflowStepPartsLabels;
98
+ testId: string;
99
+ }): import("react").JSX.Element | null;
100
+ /** A platform action step: where it is, and what its person can do now. */
101
+ export declare function ActionStepBody({ step, run, actions, nameOfDoc, heading, l, testId, }: {
102
+ step: WorkflowActionStep;
103
+ run: WorkflowRunView;
104
+ actions?: WorkflowRunnerActions;
105
+ nameOfDoc?: (id: string) => string | undefined;
106
+ heading: ReactNode;
107
+ l: WorkflowStepPartsLabels;
108
+ testId: string;
109
+ }): import("react").JSX.Element;
@@ -6,6 +6,7 @@
6
6
  */
7
7
  import { type ReactNode } from 'react';
8
8
  import { type SchemaFormProps } from './SchemaForm';
9
+ import { type WorkflowRunnerActions, type WorkflowStepPartsLabels } from './StepParts';
9
10
  import type { WorkflowRunView } from './useWorkflowView';
10
11
  import type { WorkflowAgentStep, WorkflowDefinition, WorkflowReviewStep, WorkflowStep, WorkflowStepState, WorkflowUploadStep } from './types';
11
12
  export interface WorkflowRunnerLabels {
@@ -44,6 +45,8 @@ export interface WorkflowRunnerLabels {
44
45
  fileFailed: string;
45
46
  /** Continue on an upload step while its files are read; `{current}` and `{count}` are replaced. */
46
47
  readingFiles: string;
48
+ /** The primary button on an email step waiting to be sent. */
49
+ markSent: string;
47
50
  }
48
51
  export declare const DEFAULT_WORKFLOW_RUNNER_LABELS: WorkflowRunnerLabels;
49
52
  /** A file the upload step lists (what is in the run's workspace). */
@@ -55,7 +58,7 @@ export interface WorkflowRunnerFile {
55
58
  /** The upload step it was added on in this run (listed first there, and holds it while read). */
56
59
  addedFor?: string;
57
60
  }
58
- export interface WorkflowRunnerProps extends Pick<SchemaFormProps, 'renderScope' | 'renderDocuments' | 'renderIcon'> {
61
+ export interface WorkflowRunnerProps extends Pick<SchemaFormProps, 'renderScope' | 'renderDocuments' | 'renderIcon' | 'people'> {
59
62
  workflow: WorkflowDefinition;
60
63
  run: WorkflowRunView;
61
64
  /** An agent step's output (its answer, a drafted document). */
@@ -73,7 +76,17 @@ export interface WorkflowRunnerProps extends Pick<SchemaFormProps, 'renderScope'
73
76
  renderStepNote?: (step: WorkflowStep, run: WorkflowRunView) => ReactNode;
74
77
  /** Replaces the finish screen. */
75
78
  renderComplete?: (run: WorkflowRunView) => ReactNode;
79
+ /** Leave out the stepper (the host shows it elsewhere, e.g. above the run's thread). */
80
+ hideStepBar?: boolean;
81
+ /** A narrow panel beside a thread: tighter cards, the full width they are given. */
82
+ compact?: boolean;
83
+ /** Where the runner hands off to the host: documents, the sign flow, mail, a review grid. */
84
+ actions?: WorkflowRunnerActions;
85
+ /** A document's name by id (chips show it instead of the id). */
86
+ nameOfDoc?: (id: string) => string | undefined;
76
87
  labels?: Partial<WorkflowRunnerLabels>;
88
+ /** The wording of action steps, assignees, send-backs and approvals. */
89
+ partsLabels?: Partial<WorkflowStepPartsLabels>;
77
90
  /**
78
91
  * Test ids: `<prefix>-step-<id>` (pill), `<prefix>-<id>` (body), `<prefix>-field-<name>`,
79
92
  * `<prefix>-next` / `-back`, `<prefix>-done`.
@@ -81,6 +94,6 @@ export interface WorkflowRunnerProps extends Pick<SchemaFormProps, 'renderScope'
81
94
  testIdPrefix?: string;
82
95
  className?: string;
83
96
  }
84
- export declare function WorkflowRunner({ workflow, run, renderAgentOutput, renderReview, onUpload, uploading, files, renderUpload, renderStepNote, renderComplete, renderScope, renderDocuments, renderIcon, labels, testIdPrefix, className, }: WorkflowRunnerProps): import("react").JSX.Element;
97
+ export declare function WorkflowRunner({ workflow, run, renderAgentOutput, renderReview, onUpload, uploading, files, renderUpload, renderStepNote, renderComplete, renderScope, renderDocuments, renderIcon, people, actions, nameOfDoc, hideStepBar, compact, labels, partsLabels, testIdPrefix, className, }: WorkflowRunnerProps): import("react").JSX.Element;
85
98
  /** m:ss (h:mm:ss past an hour). */
86
99
  export declare function formatElapsed(ms: number): string;
@@ -1,17 +1,14 @@
1
1
  /**
2
- * The run's stepper: the graph by depth (a sequence is one row, steps side by side stack in a
3
- * column). It shows every label while they fit the width it has; when they do not, only the step
4
- * in view keeps its label and the rest are icons (named on hover and to assistive technology).
5
- * Labels never run past their pill: a long title is cut with an ellipsis, in full in `title`.
2
+ * The run's stepper: where you are, what is done, what is next and what is still running. It
3
+ * names the previous, current and next steps of the graph (`StepBarFrame` over `stepLevels`); the
4
+ * rest is a click away (‹ ›, "…"), a parallel level is one step plus a "+N" chip, and a running
5
+ * step out of view shows as "Working: <title>". The run's completion is the last step.
6
6
  */
7
- import { type ReactNode } from 'react';
8
- import type { WorkflowStepPhase } from './run';
7
+ import type { ReactNode } from 'react';
9
8
  import type { WorkflowRunView } from './useWorkflowView';
10
9
  import type { WorkflowStep } from './types';
11
- export declare function PhaseMark({ phase, icon }: {
12
- phase: WorkflowStepPhase;
13
- icon?: ReactNode;
14
- }): import("react").JSX.Element | null;
10
+ import { PhaseMark, type StepBarLabels } from './StepBarFrame';
11
+ export { PhaseMark };
15
12
  export interface WorkflowStepBarProps {
16
13
  run: WorkflowRunView;
17
14
  levels: WorkflowStep[][];
@@ -19,5 +16,6 @@ export interface WorkflowStepBarProps {
19
16
  doneIcon?: ReactNode;
20
17
  icon: (key?: string) => ReactNode;
21
18
  tid: (suffix: string) => string;
19
+ labels?: Partial<StepBarLabels>;
22
20
  }
23
- export declare function WorkflowStepBar({ run, levels, doneTitle, doneIcon, icon, tid, }: WorkflowStepBarProps): import("react").JSX.Element;
21
+ export declare function WorkflowStepBar({ run, levels, doneTitle, doneIcon, icon, tid, labels, }: WorkflowStepBarProps): import("react").JSX.Element;
@@ -7,9 +7,12 @@ export { defaultScopeRenderer, resolveScopeInputs } from './scopeRender';
7
7
  export { WorkflowLauncher, type WorkflowLauncherProps } from './WorkflowLauncher';
8
8
  export { buildWorkflowScopeSource, matchWorkflowScope, type WorkflowScopeDocument, type WorkflowScopeLabel, } from './workspaceScope';
9
9
  export { WorkflowDocumentsField, type WorkflowDocumentsFieldProps } from './WorkflowDocumentsField';
10
- export { workflowSteps, isSteppedWorkflow, stepDependencies, dependsOn, orderSteps, validateWorkflowGraph, stepLevels, stepStatesFromActivity, runFields, initialRunInputs, stepPhase, isRunFinished, isPersonStep, nextAction, validateStep, fillRunText, fillStepInputs, runThreadTitle, reviewInstructions, composeStepPrompt, type StepComposeOptions, type WorkflowActivityEvent, type WorkflowGraphProblem, type WorkflowStepPhase, type WorkflowNextAction, } from './run';
11
- export { toPlanSteps, fromPlanSteps, layoutFromPlanSteps, isIncompleteSignal, type TaskPlanStep, type ToPlanOptions, } from './planSteps';
10
+ export { workflowSteps, isSteppedWorkflow, stepDependencies, dependsOn, orderSteps, validateWorkflowGraph, stepLevels, stepStatesFromActivity, runFields, initialRunInputs, stepPhase, isRunFinished, isPersonStep, nextAction, validateStep, fillRunText, fillStepInputs, runThreadTitle, reviewInstructions, composeStepPrompt, stepFields, runFieldsOf, isPersonAction, canAssign, upstreamSteps, sendBackTargets, stepConfigProblems, splitDocRef, assigneeName, DEFAULT_ASSIGNEE_WORDING, type AssigneeWording, type WorkflowStepProblem, type StepComposeOptions, type WorkflowActivityEvent, type WorkflowGraphProblem, type WorkflowStepPhase, type WorkflowNextAction, } from './run';
11
+ export { toPlanSteps, fromPlanSteps, layoutFromPlanSteps, isIncompleteSignal, toPlanAssignee, fromPlanAssignee, toPlanDocumentRef, fromPlanDocumentRef, type TaskPlanStep, type ToPlanOptions, } from './planSteps';
12
12
  export { workflowToSkillMarkdown, workflowFromSkillMarkdown, skillSlug } from './skillMarkdown';
13
13
  export { useWorkflowView, type UseWorkflowViewOptions, type WorkflowRunView, } from './useWorkflowView';
14
14
  export { useWorkflowPreview, type UseWorkflowPreviewOptions } from './useWorkflowPreview';
15
15
  export { WorkflowRunner, DEFAULT_WORKFLOW_RUNNER_LABELS, type WorkflowRunnerProps, type WorkflowRunnerLabels, type WorkflowRunnerFile, } from './WorkflowRunner';
16
+ export { stepWindow, activeStepId, type StepWindow, type StepWindowLevel, type StepWindowOptions, type StepWindowStep, } from './stepWindow';
17
+ export { DEFAULT_STEP_BAR_LABELS, type StepBarLabels } from './StepBarFrame';
18
+ export { ActionStepBody, ApprovalEvidence, AssigneeLine, SendBackControl, DEFAULT_WORKFLOW_STEP_PARTS_LABELS, type WorkflowRunnerActions, type WorkflowStepPartsLabels, } from './StepParts';
@@ -6,9 +6,15 @@
6
6
  */
7
7
  import type { components } from '@arbidocs/client';
8
8
  import { type StepComposeOptions } from './run';
9
- import type { WorkflowDefinition, WorkflowInputs, WorkflowSignal, WorkflowStep } from './types';
9
+ import type { WorkflowAssignee, WorkflowDefinition, WorkflowDocumentRef, WorkflowInputs, WorkflowSignal, WorkflowStep } from './types';
10
10
  export type TaskPlanStep = components['schemas']['TaskPlanStep'];
11
+ type StepAssignee = components['schemas']['StepAssignee'];
12
+ type PlanDocumentRef = string | components['schemas']['StepDocumentRef'];
11
13
  export type TaskPlan = components['schemas']['TaskPlan'];
14
+ export declare function toPlanAssignee(a: WorkflowAssignee): StepAssignee;
15
+ export declare function fromPlanAssignee(a: StepAssignee | null | undefined): WorkflowAssignee | undefined;
16
+ export declare function toPlanDocumentRef(ref: WorkflowDocumentRef): PlanDocumentRef;
17
+ export declare function fromPlanDocumentRef(ref: PlanDocumentRef | null | undefined): WorkflowDocumentRef | undefined;
12
18
  export interface ToPlanOptions extends StepComposeOptions {
13
19
  /**
14
20
  * The run's inputs when it starts: prompts are composed with them. Fields not given yet (or
@@ -28,3 +34,4 @@ export declare function layoutFromPlanSteps(steps: TaskPlanStep[] | null | undef
28
34
  x: number;
29
35
  y: number;
30
36
  }> | undefined;
37
+ export {};
@@ -4,7 +4,7 @@
4
4
  * run's thread records it (`stepStatesFromActivity`). Pure functions, shared by the thread runner
5
5
  * (`useWorkflowThread`), the builder's preview and the thread's top bar.
6
6
  */
7
- import type { WorkflowAgentStep, WorkflowDefinition, WorkflowErrors, WorkflowInputs, WorkflowReviewStep, WorkflowStep, WorkflowStepState } from './types';
7
+ import type { WorkflowActionStep, WorkflowAgentStep, WorkflowAssignee, WorkflowField, WorkflowDefinition, WorkflowErrors, WorkflowInputs, WorkflowReviewStep, WorkflowStep, WorkflowStepState } from './types';
8
8
  /** A stepped workflow's steps; empty for a single-run one. */
9
9
  export declare function workflowSteps(workflow: WorkflowDefinition): WorkflowStep[];
10
10
  export declare const isSteppedWorkflow: (workflow: WorkflowDefinition) => boolean;
@@ -45,23 +45,37 @@ export declare function stepLevels(steps: WorkflowStep[]): WorkflowStep[][];
45
45
  export interface WorkflowActivityEvent {
46
46
  kind: string;
47
47
  detail?: Record<string, unknown> | null;
48
+ actor_ext_id?: string | null;
48
49
  created_at?: string;
49
50
  }
50
- /** Each step's state from the thread's activity log (oldest first): its latest step event wins. */
51
+ /**
52
+ * Each step's state from the thread's activity log (oldest first): its latest step event wins.
53
+ * A send-back reopens the steps it lists as pending (only the one it went `to` is `sentBack`); a
54
+ * `step_ready` records who was told and a `step_progress` what a waiting step now waits on, until
55
+ * the step's next change. Mirrors the server (`workflow_steps.progress`).
56
+ */
51
57
  export declare function stepStatesFromActivity(events: WorkflowActivityEvent[]): Record<string, WorkflowStepState>;
52
- /** Every field the run asks for: the launch form's, then each form step's. */
53
- export declare function runFields(workflow: WorkflowDefinition): import("./types").WorkflowField[];
58
+ /** The fields a person fills in on a step: a form's inputs, a review's fields. */
59
+ export declare function stepFields(step: WorkflowStep): WorkflowField[];
60
+ /** The fields the steps ask for (forms and reviews), in plan order. */
61
+ export declare const runFieldsOf: (steps: WorkflowStep[]) => WorkflowField[];
62
+ /** Every field the run asks for: the launch form's, then each form's and review's. */
63
+ export declare function runFields(workflow: WorkflowDefinition): WorkflowField[];
54
64
  /** A fresh run's inputs: every field at its default, then the prefills. */
55
65
  export declare function initialRunInputs(workflow: WorkflowDefinition, inputs?: WorkflowInputs): WorkflowInputs;
56
66
  /**
57
67
  * Where a step stands: `blocked` until everything it waits for has finished (done or skipped),
58
- * then `ready`, then its own status.
68
+ * then `ready`, then its own status (`waiting`: an action step waiting on its people).
59
69
  */
60
- export type WorkflowStepPhase = 'blocked' | 'ready' | 'running' | 'done' | 'skipped' | 'failed';
70
+ export type WorkflowStepPhase = 'blocked' | 'ready' | 'running' | 'waiting' | 'done' | 'skipped' | 'failed';
61
71
  export declare function stepPhase(steps: WorkflowStep[], states: Record<string, WorkflowStepState>, id: string): WorkflowStepPhase;
62
72
  export declare const isRunFinished: (steps: WorkflowStep[], states: Record<string, WorkflowStepState>) => boolean;
63
- /** A step a person does (form, upload, review); agent steps run themselves. */
73
+ /** A step a person does (form, upload, review); agent and action steps start by themselves. */
64
74
  export declare const isPersonStep: (step: WorkflowStep) => boolean;
75
+ /** An action step whose waiting phase is a person's: signing, sending the email. */
76
+ export declare const isPersonAction: (step: WorkflowStep) => step is WorkflowActionStep;
77
+ /** A step that can have an assignee and a reminder: a person step, or a signature or email. */
78
+ export declare const canAssign: (step: WorkflowStep) => boolean;
65
79
  /**
66
80
  * What the primary button does on the step in view:
67
81
  * - `complete`: finish this form, upload or review (approve) and move on;
@@ -72,8 +86,47 @@ export declare const isPersonStep: (step: WorkflowStep) => boolean;
72
86
  */
73
87
  export type WorkflowNextAction = 'complete' | 'move' | 'skip' | 'finish' | 'wait';
74
88
  export declare function nextAction(steps: WorkflowStep[], states: Record<string, WorkflowStepState>, current: string | null): WorkflowNextAction;
75
- /** A form step's problems (empty = it can move on); other steps have none. */
89
+ /** A form's or a fielded review's problems (empty = it can move on); other steps have none. */
76
90
  export declare function validateStep(step: WorkflowStep, inputs: WorkflowInputs): WorkflowErrors;
91
+ /** Every step `id` waits for, directly or through others, in plan order. */
92
+ export declare function upstreamSteps(steps: WorkflowStep[], id: string): WorkflowStep[];
93
+ /**
94
+ * Where a ready step can send the work back to: an earlier step it waits for that has something
95
+ * to redo (done, skipped or failed), nearest first.
96
+ */
97
+ export declare function sendBackTargets(steps: WorkflowStep[], states: Record<string, WorkflowStepState>, id: string): WorkflowStep[];
98
+ /** Something a step still needs before it can run, for the builder to point out. */
99
+ export interface WorkflowStepProblem {
100
+ step: string;
101
+ missing: 'document' | 'signers' | 'recipients' | 'tags' | 'documents';
102
+ }
103
+ /** What the steps still need before they can run: an action's document, signers, … */
104
+ export declare function stepConfigProblems(steps: WorkflowStep[]): WorkflowStepProblem[];
105
+ /** A document version id (`doc-…@v3`) split into the document and its version. */
106
+ export declare function splitDocRef(ref: string): {
107
+ id: string;
108
+ version?: number;
109
+ };
110
+ /** How an assignee that names no one directly is described. */
111
+ export interface AssigneeWording {
112
+ runOwner: string;
113
+ projectLead: string;
114
+ /** `{field}`: the person field's label. */
115
+ input: string;
116
+ }
117
+ export declare const DEFAULT_ASSIGNEE_WORDING: AssigneeWording;
118
+ /**
119
+ * Who a step is for, in words: the person it was announced to, the member it names, the person a
120
+ * form field holds (each through `nameOf`), else its role. Undefined when it names no one.
121
+ */
122
+ export declare function assigneeName(assignee: WorkflowAssignee | undefined, options?: {
123
+ nameOf?: (id: string) => string | undefined;
124
+ inputs?: WorkflowInputs;
125
+ fields?: WorkflowField[];
126
+ /** Who the server told (the assignee resolved): wins over a role. */
127
+ announcedTo?: string | null;
128
+ wording?: Partial<AssigneeWording>;
129
+ }): string | undefined;
77
130
  /**
78
131
  * Fill a step's `with` templates from the run's inputs: `{{a}}`, `{{a || b}}` (first non-blank).
79
132
  * A template that is exactly one bare reference passes the value through untouched.
@@ -0,0 +1,59 @@
1
+ /**
2
+ * What a step bar shows of a run: a window of a few levels of the graph (`stepLevels`) around the
3
+ * step in view — previous, current, next — with how many steps it hides on either side, each
4
+ * parallel level collapsed to one primary step plus the rest, and the running steps the window
5
+ * does not show (so work that is still going on is never out of sight). Pure: both bars
6
+ * (`WorkflowStepBar` in a runner, `WorkflowThreadStrip` on a thread) render from it.
7
+ */
8
+ import type { WorkflowStepPhase } from './run';
9
+ /** A step as far as the window is concerned. */
10
+ export interface StepWindowStep {
11
+ id: string;
12
+ }
13
+ /** One level of the graph: a step, or steps that run side by side (a parallel group). */
14
+ export interface StepWindowLevel<T extends StepWindowStep> {
15
+ index: number;
16
+ steps: T[];
17
+ /** The step the bar shows for the level: the running one, else the one in view, else … */
18
+ primary: T;
19
+ /** The level's other steps, behind a "+N" chip. */
20
+ others: T[];
21
+ /** Where the level stands relative to the step in view. */
22
+ role: 'previous' | 'current' | 'next' | 'other';
23
+ }
24
+ export interface StepWindow<T extends StepWindowStep> {
25
+ levels: StepWindowLevel<T>[];
26
+ /** The levels in the window, in order. */
27
+ visible: StepWindowLevel<T>[];
28
+ /** The window's first level and the one after its last. */
29
+ start: number;
30
+ end: number;
31
+ /** The level of the step in view. */
32
+ currentLevel: number;
33
+ /** Steps in the levels before and after the window. */
34
+ hiddenBefore: number;
35
+ hiddenAfter: number;
36
+ canBack: boolean;
37
+ canForward: boolean;
38
+ /** Running steps the bar does not show: outside the window, or collapsed in a group. */
39
+ runningHidden: T[];
40
+ /** 1-based position of the step in view among all steps, and how many there are. */
41
+ position: number;
42
+ total: number;
43
+ }
44
+ export interface StepWindowOptions<T extends StepWindowStep> {
45
+ levels: T[][];
46
+ phaseOf: (id: string) => WorkflowStepPhase;
47
+ /** The step in view; none (or unknown) = the step the run is at (`activeStepId`). */
48
+ current?: string | null;
49
+ /** The window's first level, as the arrows moved it; none = around the step in view. */
50
+ start?: number | null;
51
+ /** How many levels the window shows (3: previous, current, next). */
52
+ span?: number;
53
+ }
54
+ /**
55
+ * The step a run is at, when nothing else says which step is in view: a running one, else one
56
+ * waiting on someone, else one that failed, else one ready to do, else the last one.
57
+ */
58
+ export declare function activeStepId<T extends StepWindowStep>(levels: T[][], phaseOf: (id: string) => WorkflowStepPhase): string | undefined;
59
+ export declare function stepWindow<T extends StepWindowStep>({ levels: raw, phaseOf, current, start: requested, span, }: StepWindowOptions<T>): StepWindow<T>;