@arbidocs/blocks 0.4.2 → 0.4.4

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 (156) hide show
  1. package/README.md +42 -0
  2. package/dist/agents/definitions/AgentCreator.d.ts +11 -2
  3. package/dist/agents/definitions/index.d.ts +1 -0
  4. package/dist/agents/definitions/persona.d.ts +16 -0
  5. package/dist/agents/index.cjs +199 -146
  6. package/dist/agents/index.js +3 -2
  7. package/dist/agents/tasks/TaskRunsDialog.d.ts +15 -3
  8. package/dist/agents/tasks/index.d.ts +1 -0
  9. package/dist/agents/tasks/taskRequest.d.ts +61 -0
  10. package/dist/chat/AssistantDock.d.ts +39 -0
  11. package/dist/chat/ChatDocuments.d.ts +17 -0
  12. package/dist/chat/ChatPage.d.ts +16 -0
  13. package/dist/chat/ChatThreads.d.ts +28 -0
  14. package/dist/chat/chat-page-types.d.ts +121 -0
  15. package/dist/chat/chat-surface.d.ts +9 -0
  16. package/dist/chat/index.cjs +247 -205
  17. package/dist/chat/index.d.ts +6 -0
  18. package/dist/chat/index.js +4 -2
  19. package/dist/{chunk-OBLSURHV.js → chunk-2NNTQLBY.js} +3 -3
  20. package/dist/{chunk-OBLSURHV.js.map → chunk-2NNTQLBY.js.map} +1 -1
  21. package/dist/chunk-2VBJ763Y.js +296 -0
  22. package/dist/chunk-2VBJ763Y.js.map +1 -0
  23. package/dist/{chunk-2ORA62OF.js → chunk-67MKU5U7.js} +3 -3
  24. package/dist/{chunk-2ORA62OF.js.map → chunk-67MKU5U7.js.map} +1 -1
  25. package/dist/{chunk-AE5FHFZ5.cjs → chunk-6CHMNKXC.cjs} +6 -6
  26. package/dist/{chunk-AE5FHFZ5.cjs.map → chunk-6CHMNKXC.cjs.map} +1 -1
  27. package/dist/{chunk-TYZUCAT7.js → chunk-7YADKWZT.js} +43 -6
  28. package/dist/chunk-7YADKWZT.js.map +1 -0
  29. package/dist/chunk-ATXPAD6S.cjs +1952 -0
  30. package/dist/chunk-ATXPAD6S.cjs.map +1 -0
  31. package/dist/{chunk-YBXCZEWS.js → chunk-B673CCW5.js} +29 -6
  32. package/dist/chunk-B673CCW5.js.map +1 -0
  33. package/dist/{chunk-ITGHMJOM.js → chunk-BBEMPS6C.js} +169 -26
  34. package/dist/chunk-BBEMPS6C.js.map +1 -0
  35. package/dist/{chunk-XNBAXRY7.cjs → chunk-DGVKBOY5.cjs} +188 -32
  36. package/dist/chunk-DGVKBOY5.cjs.map +1 -0
  37. package/dist/{chunk-2K33YGM6.cjs → chunk-DN3NFNIA.cjs} +63 -294
  38. package/dist/chunk-DN3NFNIA.cjs.map +1 -0
  39. package/dist/{chunk-XQ7PKKDY.cjs → chunk-G4YOH5DU.cjs} +3 -3
  40. package/dist/{chunk-XQ7PKKDY.cjs.map → chunk-G4YOH5DU.cjs.map} +1 -1
  41. package/dist/{chunk-AXIZ2MDV.js → chunk-HER7MTRR.js} +3 -3
  42. package/dist/{chunk-AXIZ2MDV.js.map → chunk-HER7MTRR.js.map} +1 -1
  43. package/dist/{chunk-SYDHKKRZ.cjs → chunk-IZHWP6WQ.cjs} +47 -5
  44. package/dist/chunk-IZHWP6WQ.cjs.map +1 -0
  45. package/dist/chunk-JPO3F4J7.js +1899 -0
  46. package/dist/chunk-JPO3F4J7.js.map +1 -0
  47. package/dist/{chunk-WJMEXTVD.cjs → chunk-KDG6FER6.cjs} +28 -2
  48. package/dist/chunk-KDG6FER6.cjs.map +1 -0
  49. package/dist/chunk-KHX2BX3S.cjs +307 -0
  50. package/dist/chunk-KHX2BX3S.cjs.map +1 -0
  51. package/dist/{chunk-WTNMWEBC.js → chunk-NJL4LIXX.js} +4 -3
  52. package/dist/chunk-NJL4LIXX.js.map +1 -0
  53. package/dist/{chunk-J2BGSWXM.cjs → chunk-O637DUKS.cjs} +27 -27
  54. package/dist/{chunk-J2BGSWXM.cjs.map → chunk-O637DUKS.cjs.map} +1 -1
  55. package/dist/{chunk-WW6EOVZA.js → chunk-OXF2IFXG.js} +26 -3
  56. package/dist/chunk-OXF2IFXG.js.map +1 -0
  57. package/dist/{chunk-6HIPFEID.cjs → chunk-PBS5MFIY.cjs} +4 -4
  58. package/dist/{chunk-6HIPFEID.cjs.map → chunk-PBS5MFIY.cjs.map} +1 -1
  59. package/dist/{chunk-AZQDNYH4.js → chunk-RCP6THBS.js} +9 -1249
  60. package/dist/chunk-RCP6THBS.js.map +1 -0
  61. package/dist/{chunk-GDFWJ73C.cjs → chunk-RIL7G7AS.cjs} +4 -1286
  62. package/dist/chunk-RIL7G7AS.cjs.map +1 -0
  63. package/dist/{chunk-DREI7EQ2.cjs → chunk-SS23F63U.cjs} +9 -9
  64. package/dist/{chunk-DREI7EQ2.cjs.map → chunk-SS23F63U.cjs.map} +1 -1
  65. package/dist/{chunk-7PEELPMA.js → chunk-TI4UTYRL.js} +62 -285
  66. package/dist/chunk-TI4UTYRL.js.map +1 -0
  67. package/dist/{chunk-6P6AEQJB.js → chunk-WJZBJUPX.js} +4 -4
  68. package/dist/{chunk-6P6AEQJB.js.map → chunk-WJZBJUPX.js.map} +1 -1
  69. package/dist/{chunk-UFHMLHIR.cjs → chunk-XAJIKT6Y.cjs} +32 -11
  70. package/dist/chunk-XAJIKT6Y.cjs.map +1 -0
  71. package/dist/{chunk-G3G7LZPM.cjs → chunk-XKKGGUU2.cjs} +29 -3
  72. package/dist/chunk-XKKGGUU2.cjs.map +1 -0
  73. package/dist/{chunk-UWGIB3VQ.js → chunk-XNOASBGW.js} +33 -12
  74. package/dist/chunk-XNOASBGW.js.map +1 -0
  75. package/dist/{chunk-CTZ5745I.js → chunk-XQKGYGCJ.js} +3 -3
  76. package/dist/{chunk-CTZ5745I.js.map → chunk-XQKGYGCJ.js.map} +1 -1
  77. package/dist/{chunk-54Q3RNJU.cjs → chunk-ZVPTFTGV.cjs} +4 -3
  78. package/dist/chunk-ZVPTFTGV.cjs.map +1 -0
  79. package/dist/citations/index.cjs +11 -11
  80. package/dist/citations/index.js +2 -2
  81. package/dist/collaboration/contacts/AddContactsParts.d.ts +9 -4
  82. package/dist/collaboration/contacts/index.d.ts +1 -0
  83. package/dist/collaboration/contacts/parseEmails.d.ts +26 -0
  84. package/dist/collaboration/index.cjs +51 -31
  85. package/dist/collaboration/index.js +1 -1
  86. package/dist/components/MemberAvatarStack.d.ts +7 -2
  87. package/dist/connect/index.cjs +41 -12
  88. package/dist/connect/index.cjs.map +1 -1
  89. package/dist/connect/index.d.ts +3 -2
  90. package/dist/connect/index.js +20 -4
  91. package/dist/connect/index.js.map +1 -1
  92. package/dist/connection/ConnectionProvider.d.ts +2 -0
  93. package/dist/connection/ai.d.ts +13 -1
  94. package/dist/connection/useConnectedShellWorkspaces.d.ts +15 -0
  95. package/dist/facts/index.cjs +3 -3
  96. package/dist/facts/index.cjs.map +1 -1
  97. package/dist/facts/index.js +2 -2
  98. package/dist/facts/index.js.map +1 -1
  99. package/dist/files/index.cjs +4 -3
  100. package/dist/files/index.cjs.map +1 -1
  101. package/dist/files/index.js +4 -3
  102. package/dist/files/index.js.map +1 -1
  103. package/dist/home/index.cjs +18 -17
  104. package/dist/home/index.cjs.map +1 -1
  105. package/dist/home/index.js +3 -2
  106. package/dist/home/index.js.map +1 -1
  107. package/dist/index.cjs +824 -695
  108. package/dist/index.cjs.map +1 -1
  109. package/dist/index.d.ts +1 -1
  110. package/dist/index.js +16 -15
  111. package/dist/index.js.map +1 -1
  112. package/dist/lib/format.d.ts +31 -0
  113. package/dist/retrieval/index.cjs +36 -36
  114. package/dist/retrieval/index.js +1 -1
  115. package/dist/settings/index.cjs +13 -11
  116. package/dist/settings/index.cjs.map +1 -1
  117. package/dist/settings/index.js +13 -11
  118. package/dist/settings/index.js.map +1 -1
  119. package/dist/shell/SplitLayout.d.ts +32 -0
  120. package/dist/shell/index.cjs +72 -68
  121. package/dist/shell/index.d.ts +1 -0
  122. package/dist/shell/index.js +2 -2
  123. package/dist/site/index.cjs +71 -71
  124. package/dist/site/index.js +3 -3
  125. package/dist/studio/index.cjs +79 -76
  126. package/dist/studio/index.cjs.map +1 -1
  127. package/dist/studio/index.js +9 -6
  128. package/dist/studio/index.js.map +1 -1
  129. package/dist/workspaces/WorkspaceGallery.d.ts +42 -0
  130. package/dist/workspaces/index.cjs +74 -7
  131. package/dist/workspaces/index.cjs.map +1 -1
  132. package/dist/workspaces/index.d.ts +2 -0
  133. package/dist/workspaces/index.js +73 -7
  134. package/dist/workspaces/index.js.map +1 -1
  135. package/package.json +3 -3
  136. package/src/blocks.css +10 -13
  137. package/dist/chunk-2K33YGM6.cjs.map +0 -1
  138. package/dist/chunk-54Q3RNJU.cjs.map +0 -1
  139. package/dist/chunk-7PEELPMA.js.map +0 -1
  140. package/dist/chunk-AZQDNYH4.js.map +0 -1
  141. package/dist/chunk-G3G7LZPM.cjs.map +0 -1
  142. package/dist/chunk-GDFWJ73C.cjs.map +0 -1
  143. package/dist/chunk-ITGHMJOM.js.map +0 -1
  144. package/dist/chunk-SCFYPAG6.cjs +0 -18
  145. package/dist/chunk-SCFYPAG6.cjs.map +0 -1
  146. package/dist/chunk-SYDHKKRZ.cjs.map +0 -1
  147. package/dist/chunk-TYZUCAT7.js.map +0 -1
  148. package/dist/chunk-UFHMLHIR.cjs.map +0 -1
  149. package/dist/chunk-UWGIB3VQ.js.map +0 -1
  150. package/dist/chunk-WJMEXTVD.cjs.map +0 -1
  151. package/dist/chunk-WTNMWEBC.js.map +0 -1
  152. package/dist/chunk-WW6EOVZA.js.map +0 -1
  153. package/dist/chunk-XNBAXRY7.cjs.map +0 -1
  154. package/dist/chunk-YBXCZEWS.js.map +0 -1
  155. package/dist/chunk-YDHO4AVL.js +0 -16
  156. package/dist/chunk-YDHO4AVL.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- export { ACTION_LABELS, 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, 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_LIVE_RUNS_BANNER_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SCHEMA_FORM_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_COLUMN_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_ROW_ACTIONS_LABELS, DEFAULT_TASK_RUNS_DIALOG_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, EMPTY_WORKFLOW_SCOPE, GoalCriteria, LiveRunsBanner, NewTaskEmptyAction, RecurrenceBuilder, SKILL_PROMPT_FALLBACK_PLACEHOLDER, SKILL_PROMPT_LABEL, STATUS_LABELS, SchemaForm, SkillActionButton, SkillCard, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillGlobalBadge, SkillRow, SkillTile, SkillTypeBadge, SkillViewToggle, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TRIGGER_LABELS, TaskComposer, TaskPlan, TaskRowActions, TaskRunsDialog, TasksBulkBar, TasksToolbar, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WorkflowConfigDialog, WorkflowLauncher, buildLaunch, buildRRule, composeWorkflowPrompt, createTaskColumns, defaultInputs, defaultTaskComposerValues, deriveAgentName, describeRRule, formatElapsed, goalProgress, humanizeSection, inferType, inputsFromContext, isEmptyWorkflowScope, isOutOfBounds, isValidAgentName, isWorkflowScope, nextCriterionId, parseRRule, prettifyKey, promptFieldName, skillToWorkflow, statusBadgeVariant, summarizeAgent, summarizeCapabilities, validateInputs, workflowAccepts, workflowFromFrontmatter, workflowsAccepting, workflowsForHost } from '../chunk-ITGHMJOM.js';
3
- import '../chunk-WTNMWEBC.js';
2
+ export { ACTION_LABELS, 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, 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_LIVE_RUNS_BANNER_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SCHEMA_FORM_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_COLUMN_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_ROW_ACTIONS_LABELS, DEFAULT_TASK_RUNS_DIALOG_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, EMPTY_WORKFLOW_SCOPE, GoalCriteria, LiveRunsBanner, NewTaskEmptyAction, RecurrenceBuilder, SKILL_PROMPT_FALLBACK_PLACEHOLDER, SKILL_PROMPT_LABEL, STATUS_LABELS, SchemaForm, SkillActionButton, SkillCard, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillGlobalBadge, SkillRow, SkillTile, SkillTypeBadge, SkillViewToggle, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TRIGGER_LABELS, TaskComposer, TaskPlan, TaskRowActions, TaskRunsDialog, TasksBulkBar, TasksToolbar, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WorkflowConfigDialog, WorkflowLauncher, agentConfigSectionToValues, agentCreatorToConfigSection, authModeFor, buildLaunch, buildRRule, composePersona, composeWorkflowPrompt, createTaskColumns, defaultInputs, defaultTaskComposerValues, deriveAgentName, describeRRule, formatElapsed, goalProgress, humanizeSection, inferType, inputsFromContext, isAgenticWorkflow, isEmptyWorkflowScope, isOutOfBounds, isValidAgentName, isWorkflowScope, isoToLocalInput, localInputToIso, nextCriterionId, parseRRule, prettifyKey, promptFieldName, skillToWorkflow, statusBadgeVariant, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, validateInputs, workflowAccepts, workflowFromFrontmatter, workflowTaskFields, workflowsAccepting, workflowsForHost } from '../chunk-BBEMPS6C.js';
3
+ import '../chunk-NJL4LIXX.js';
4
4
  import '../chunk-CQCC7LE7.js';
5
5
  import '../chunk-P6GHJSLR.js';
6
6
  import '../chunk-S7PSMMRG.js';
@@ -9,6 +9,7 @@ import '../chunk-NUNKSZKU.js';
9
9
  import '../chunk-UBNVIIBT.js';
10
10
  import '../chunk-NPLYHR2E.js';
11
11
  import '../chunk-76JDDMSP.js';
12
+ import '../chunk-OXF2IFXG.js';
12
13
  import '../chunk-7F6CBP3Z.js';
13
14
  //# sourceMappingURL=index.js.map
14
15
  //# sourceMappingURL=index.js.map
@@ -5,7 +5,7 @@ export interface TaskRunView {
5
5
  /** Formatted finish (or start) time; empty for none. */
6
6
  when?: string;
7
7
  error?: string | null;
8
- /** The conversation the run's messages landed in; enables Open. */
8
+ /** The run's `conversation_ext_id`; enables Open. See `TaskRunsDialogProps.onOpenRun`. */
9
9
  conversationId?: string | null;
10
10
  }
11
11
  /** Fixed strings of the run-history dialog. */
@@ -31,9 +31,21 @@ export interface TaskRunsDialogProps {
31
31
  taskName?: string;
32
32
  runs: TaskRunView[];
33
33
  isLoading: boolean;
34
- /** Jump into a run's conversation (the dialog closes afterwards). */
34
+ /**
35
+ * Jump into a run's conversation (the dialog closes afterwards).
36
+ *
37
+ * Deep-link contract: `conversationId` is the run's `conversation_ext_id` (`con-xxxxxxxx`, from
38
+ * `useTaskRuns` / `TaskRunResponse`). ARBI defines no URL for it: the HOST decides where a
39
+ * conversation lives (`/chat/${id}`, a dock, a modal). The conversation belongs to the task's
40
+ * workspace (`TaskResponse.workspace_ext_id`), so a host whose route needs the workspace open
41
+ * must switch to it first, then navigate. A run with no `conversationId` gets no Open button.
42
+ */
35
43
  onOpenRun: (conversationId: string) => void;
36
- /** Destination of a run's conversation; makes Open a real link. */
44
+ /**
45
+ * The same destination as an href, so Open is a real link (middle-click, copy address, new tab).
46
+ * Return the URL for `run.conversationId`; `onOpenRun` still fires on a plain click for SPA
47
+ * navigation. Leave unset for a button-only Open.
48
+ */
37
49
  getRunHref?: (run: TaskRunView) => string | undefined;
38
50
  testIds?: Partial<TaskRunsDialogTestIds>;
39
51
  labels?: Partial<TaskRunsDialogLabels>;
@@ -11,3 +11,4 @@ export { createTaskColumns, DEFAULT_TASK_COLUMN_LABELS, type TaskColumnSlots, ty
11
11
  export { TaskRunsDialog, DEFAULT_TASK_RUNS_DIALOG_LABELS, type TaskRunsDialogProps, type TaskRunsDialogLabels, type TaskRunsDialogTestIds, type TaskRunView, } from './TaskRunsDialog';
12
12
  export { TasksToolbar, NewTaskEmptyAction, TasksBulkBar, DEFAULT_TASKS_CHROME_LABELS, type TasksChromeLabels, type TasksToolbarProps, type TasksBulkBarProps, } from './TasksChrome';
13
13
  export { TaskComposer, DEFAULT_TASK_COMPOSER_LABELS, defaultTaskComposerValues, type TaskComposerProps, type TaskComposerLabels, type TaskComposerValues, type TaskWhen, type TaskAccessMode, } from './TaskComposer';
14
+ export { authModeFor, workflowTaskFields, isAgenticWorkflow, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskToComposerValues, taskNeedsAccess, isoToLocalInput, localInputToIso, type TaskAuthMode, type TaskActionKind, type WorkflowTaskFields, type TaskRequestContext, type TaskValuesWorkflows, } from './taskRequest';
@@ -0,0 +1,61 @@
1
+ /**
2
+ * TaskComposer values to API requests (and back): the pure mapping every host would write the same
3
+ * way. No SDK call is made here; hand the result to `useCreateTask` / `useUpdateTask` from
4
+ * `@arbidocs/react`.
5
+ */
6
+ import type { components } from '@arbidocs/client';
7
+ import type { WorkflowDefinition, WorkflowInputs } from '../workflows/types';
8
+ import type { TaskComposerValues } from './TaskComposer';
9
+ type CreateTaskRequest = components['schemas']['CreateTaskRequest'];
10
+ type UpdateTaskRequest = components['schemas']['UpdateTaskRequest'];
11
+ type TaskResponse = components['schemas']['TaskResponse'];
12
+ export type TaskAuthMode = NonNullable<CreateTaskRequest['auth_mode']>;
13
+ export type TaskActionKind = NonNullable<CreateTaskRequest['action_type']>;
14
+ /**
15
+ * The plain-language access choice becomes the backend authorisation tier: a run-now task is
16
+ * authorised for that one run, a scheduled one either keeps standing access or asks each run.
17
+ */
18
+ export declare function authModeFor(values: Pick<TaskComposerValues, 'when' | 'access'>): TaskAuthMode;
19
+ /** `datetime-local` value (no zone) to an ISO instant. Throws on an empty or invalid value. */
20
+ export declare function localInputToIso(local: string): string;
21
+ /** An ISO instant to the `datetime-local` value the composer edits; empty for none or invalid. */
22
+ export declare function isoToLocalInput(iso: string | null | undefined): string;
23
+ export interface WorkflowTaskFields {
24
+ name: string;
25
+ action_type: TaskActionKind;
26
+ prompt: string;
27
+ skill_ref: string | null;
28
+ }
29
+ /**
30
+ * How a workflow becomes the body of a task:
31
+ * - `options.agent === false` is a reminder (`notify`): the composed text is the notification;
32
+ * - a workflow with a `skill` runs that skill, its `args` input being the arguments;
33
+ * - anything else is an agent prompt, the composed workflow prompt.
34
+ * `name` (typed by the user) wins over the derived one.
35
+ */
36
+ export declare function workflowTaskFields(workflow: WorkflowDefinition, inputs: WorkflowInputs, name?: string): WorkflowTaskFields;
37
+ /** Does this workflow need a workspace to run (everything except a plain reminder)? */
38
+ export declare const isAgenticWorkflow: (workflow: WorkflowDefinition) => boolean;
39
+ export interface TaskRequestContext {
40
+ workflow: WorkflowDefinition;
41
+ values: TaskComposerValues;
42
+ }
43
+ /**
44
+ * The create request for a composer submission. An agent task is bound to `workspaceId` (throws
45
+ * when there is none); a reminder is not. A run-now task is a one-time task due immediately: the
46
+ * host starts it explicitly with `useRunTask` after creating it.
47
+ */
48
+ export declare function taskComposerToCreateRequest({ workflow, values }: TaskRequestContext, workspaceId: string | undefined): CreateTaskRequest;
49
+ /** The patch for editing a task (the trigger kind, workspace and agent stay as created). */
50
+ export declare function taskComposerToUpdateRequest({ workflow, values, }: TaskRequestContext): UpdateTaskRequest;
51
+ /** Does the task need the owner to authorise workspace access before it can run? */
52
+ export declare const taskNeedsAccess: (task: Pick<TaskResponse, "pending_auth_request_id">) => boolean;
53
+ export interface TaskValuesWorkflows {
54
+ /** The workflow that stands for an instruction task (its first input is `instruction`). */
55
+ customWorkflowId: string;
56
+ /** The workflow that stands for a reminder (its first input is `message`). */
57
+ reminderWorkflowId: string;
58
+ }
59
+ /** What an existing task looks like when reopened in the composer. */
60
+ export declare function taskToComposerValues(task: TaskResponse, workflows: TaskValuesWorkflows): Partial<TaskComposerValues>;
61
+ export {};
@@ -0,0 +1,39 @@
1
+ import type { ChatPageController, ChatPageProps } from './chat-page-types';
2
+ declare function set(next: boolean): void;
3
+ export declare function useAssistantDock(): {
4
+ isOpen: boolean;
5
+ setOpen: typeof set;
6
+ toggle: () => void;
7
+ };
8
+ export interface AssistantDockToggleProps {
9
+ /** Accessible name. Default "Open assistant chat". */
10
+ label?: string;
11
+ testId?: string;
12
+ }
13
+ /** Topbar button that opens and closes the dock. Renders nothing while a page chat is mounted. */
14
+ export declare function AssistantDockToggle({ label, testId, }: AssistantDockToggleProps): import("react").JSX.Element | null;
15
+ export interface AssistantDockProps extends Omit<ChatPageProps, 'chat' | 'surface'> {
16
+ chat: ChatPageController;
17
+ /** Phone layout: the dock covers the screen as a modal. */
18
+ isMobile?: boolean;
19
+ /** Desktop width. Default 380. */
20
+ width?: number | string;
21
+ /** Accessible name of the dock. Default "Assistant chat". */
22
+ label?: string;
23
+ closeLabel?: string;
24
+ }
25
+ /**
26
+ * The assistant as a right-hand dock: `Shell.Dock` around the same `ChatPage` as the full page
27
+ * (`surface="dock"`), with its open state in `useAssistantDock`. It yields to a mounted page chat
28
+ * (`useChatSurface`), so the host only mounts it once, next to `Shell.Root`'s `aside`:
29
+ *
30
+ * ```tsx
31
+ * <Shell.Root aside={<AssistantDock chat={chat} isMobile={isMobile} />} ... />
32
+ * <AssistantDockToggle /> // in the topbar
33
+ * ```
34
+ *
35
+ * Keep the `chat` controller in a component that stays mounted (the layout), so the conversation
36
+ * survives closing the dock.
37
+ */
38
+ export declare function AssistantDock({ chat, isMobile, width, label, closeLabel, headerActions, ...pageProps }: AssistantDockProps): import("react").JSX.Element | null;
39
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { ChatPageController, ChatPageLabels } from './chat-page-types';
2
+ interface ChatDocumentsProps {
3
+ chat: Pick<ChatPageController, 'documents' | 'isUploading' | 'toggleDocument' | 'selectAllDocuments'>;
4
+ labels: ChatPageLabels;
5
+ onPickFiles: () => void;
6
+ testIds?: Partial<{
7
+ documents: string;
8
+ upload: string;
9
+ }>;
10
+ }
11
+ /**
12
+ * The document context chip of the composer: how many documents the questions are grounded on,
13
+ * and a popover to pick them or upload more. The count is on the chip, the names are in the list,
14
+ * so the same part reads in a dock (no room) and on a page.
15
+ */
16
+ export declare function ChatDocuments({ chat, labels, onPickFiles, testIds }: ChatDocumentsProps): import("react").JSX.Element;
17
+ export {};
@@ -0,0 +1,16 @@
1
+ import { type ChatPageProps } from './chat-page-types';
2
+ /**
3
+ * A complete assistant chat, composed from the same parts as the dock: conversation list with
4
+ * auto-titles, message list, composer with the document chip and upload, empty state, error and
5
+ * retry. Drive it with `useArbiChat()` from `@arbidocs/react` (or fill `ChatPageController`).
6
+ *
7
+ * It sizes to its container, not the viewport (container queries on the root), so it holds up in
8
+ * a card, beside an open dock or on a phone: the conversation list is a column from 48rem and a
9
+ * select below; the `aside` slot (workflow launcher) is a column from 72rem and a collapsible
10
+ * panel below. Give it a height (`h-full` of a sized parent, or a `className`). Colours come from
11
+ * the tokens only; the user bubble has two optional ones (see `USER_BUBBLE`).
12
+ *
13
+ * With `surface="page"` it claims the page-chat slot, so `useChatSurface()` tells the host's dock
14
+ * to yield: one chat on screen, never two.
15
+ */
16
+ export declare function ChatPage({ chat, surface, header, headerActions, aside, prompts, emptyTitle, emptyDescription, identity, renderContent, accept, labels, className, testIds, }: ChatPageProps): import("react").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import type { ChatPageLabels, ChatPageThread } from './chat-page-types';
2
+ interface ThreadProps {
3
+ threads: ReadonlyArray<ChatPageThread>;
4
+ activeId: string;
5
+ labels: ChatPageLabels;
6
+ onSelect: (id: string) => void;
7
+ onNew: () => void;
8
+ onDelete?: (id: string) => void;
9
+ testIds?: Partial<{
10
+ list: string;
11
+ row: string;
12
+ delete: string;
13
+ new: string;
14
+ select: string;
15
+ }>;
16
+ }
17
+ /**
18
+ * The conversation list as a column (wide containers): New chat on top, one row per thread with a
19
+ * delete action. The active row is `aria-current`. Rows are real buttons, so keyboard and touch
20
+ * work; delete is always visible on touch and appears on hover/focus elsewhere.
21
+ */
22
+ export declare function ChatThreadList({ threads, activeId, labels, onSelect, onNew, onDelete, testIds, }: ThreadProps): import("react").JSX.Element;
23
+ /**
24
+ * The conversation list as one native select (narrow containers, the dock). Native on purpose:
25
+ * the platform picker on a phone, a label for screen readers, text at least 16px on touch.
26
+ */
27
+ export declare function ChatThreadSelect({ threads, activeId, labels, onSelect, testIds, }: Pick<ThreadProps, 'threads' | 'activeId' | 'labels' | 'onSelect' | 'testIds'>): import("react").JSX.Element;
28
+ export {};
@@ -0,0 +1,121 @@
1
+ import type { ReactNode } from 'react';
2
+ /**
3
+ * The view-model of a chat page. It is the shape `useArbiChat()` from `@arbidocs/react` returns,
4
+ * so `<ChatPage chat={useArbiChat(...)} />` works without an adapter; any other source (a demo,
5
+ * another backend) can fill it in. Plain data and callbacks: no SDK, store or router.
6
+ */
7
+ export interface ChatPageMessage {
8
+ id: string;
9
+ role: 'user' | 'assistant';
10
+ /** Markdown for an assistant message, plain text for a user message. */
11
+ content: string;
12
+ status: 'streaming' | 'complete' | 'error';
13
+ /** Why an assistant message failed. */
14
+ error?: string;
15
+ /** Agent steps the answer took so far. */
16
+ stepCount?: number;
17
+ }
18
+ export interface ChatPageThread {
19
+ id: string;
20
+ /** Empty until the first question titles it. */
21
+ title: string;
22
+ }
23
+ export interface ChatPageDocument {
24
+ id: string;
25
+ name: string;
26
+ isSelected: boolean;
27
+ }
28
+ export interface ChatPageController {
29
+ threads: ReadonlyArray<ChatPageThread>;
30
+ activeThreadId: string;
31
+ messages: ReadonlyArray<ChatPageMessage>;
32
+ isRunning: boolean;
33
+ /** The last turn failed. */
34
+ error: string | null;
35
+ documents: ReadonlyArray<ChatPageDocument>;
36
+ isLoadingDocuments: boolean;
37
+ isUploading: boolean;
38
+ uploadError: string | null;
39
+ send: (text: string) => void | Promise<void>;
40
+ retry: () => void | Promise<void>;
41
+ selectThread: (id: string) => void;
42
+ newThread: () => void;
43
+ /** Omit to hide the delete action. */
44
+ deleteThread?: (id: string) => void;
45
+ toggleDocument: (id: string) => void;
46
+ selectAllDocuments: () => void;
47
+ upload: (files: File[]) => void | Promise<void>;
48
+ }
49
+ /** Every fixed string of the chat page. Pass a partial `labels` to translate or reword. */
50
+ export interface ChatPageLabels {
51
+ /** Accessible name of the whole chat. */
52
+ chat: string;
53
+ conversations: string;
54
+ newChat: string;
55
+ untitled: string;
56
+ deleteConversation: (title: string) => string;
57
+ /** Assistant name on the answer's byline. */
58
+ assistant: string;
59
+ thinking: string;
60
+ steps: (count: number) => string;
61
+ responseFailed: string;
62
+ answerFailedTitle: string;
63
+ uploadFailedTitle: string;
64
+ placeholder: string;
65
+ composerAriaLabel: string;
66
+ documentsInChat: (selected: number, total: number) => string;
67
+ documentsHeading: string;
68
+ selectAllDocuments: string;
69
+ noDocuments: string;
70
+ uploadDocuments: string;
71
+ uploading: string;
72
+ emptyTitle: string;
73
+ emptyDescription: string;
74
+ emptyUploadTitle: string;
75
+ emptyUploadDescription: string;
76
+ workflows: string;
77
+ loadingDocuments: string;
78
+ }
79
+ export declare const DEFAULT_CHAT_PAGE_LABELS: ChatPageLabels;
80
+ export interface ChatPageProps {
81
+ chat: ChatPageController;
82
+ /**
83
+ * `page` (default): a full-page chat; while it is mounted the dock yields (see
84
+ * `useChatSurface`). `dock`: the same chat in the dock, which does not claim the page slot.
85
+ */
86
+ surface?: 'page' | 'dock';
87
+ /** Replaces the heading (default: the active conversation's title). */
88
+ header?: ReactNode;
89
+ /** Actions at the right of the header bar. */
90
+ headerActions?: ReactNode;
91
+ /**
92
+ * The workflow launcher column. A column beside the chat when the container is wide, a
93
+ * collapsible panel under the header when it is not (so an open dock never squeezes it).
94
+ */
95
+ aside?: ReactNode;
96
+ /** Starter questions on the empty conversation; clicking one fills the composer. */
97
+ prompts?: ReadonlyArray<string>;
98
+ /** Heading of the empty state; wins over `labels.emptyTitle`. */
99
+ emptyTitle?: string;
100
+ /** Sub-heading of the empty state; wins over `labels.emptyDescription`. */
101
+ emptyDescription?: string;
102
+ /** Identity chip on the answer's byline (default: the assistant label). */
103
+ identity?: ReactNode;
104
+ /** Renders an answer. Default: the shared markdown renderer (lists, tables, cited words). */
105
+ renderContent?: (message: ChatPageMessage) => ReactNode;
106
+ /** Accepted upload types for the file picker. */
107
+ accept?: string;
108
+ labels?: Partial<ChatPageLabels>;
109
+ className?: string;
110
+ testIds?: Partial<{
111
+ root: string;
112
+ transcript: string;
113
+ input: string;
114
+ send: string;
115
+ documents: string;
116
+ upload: string;
117
+ alert: string;
118
+ asideToggle: string;
119
+ aside: string;
120
+ }>;
121
+ }
@@ -0,0 +1,9 @@
1
+ /** Claims the page-chat slot while `enabled` and the caller is mounted. `ChatPage` calls this. */
2
+ export declare function useRegisterEmbeddedChat(enabled?: boolean): void;
3
+ export interface ChatSurface {
4
+ /** A full-page chat is mounted. */
5
+ hasEmbeddedChat: boolean;
6
+ /** The dock (and its topbar button) may be offered: false while a page chat is mounted. */
7
+ isDockAvailable: boolean;
8
+ }
9
+ export declare function useChatSurface(): ChatSurface;