@arbidocs/blocks 0.4.15 → 0.4.17
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 +369 -171
- package/dist/agents/index.js +4 -2
- package/dist/agents/tasks/DueDateMenu.d.ts +32 -0
- package/dist/agents/tasks/NewThreadDialog.d.ts +53 -0
- package/dist/agents/tasks/PersonPill.d.ts +22 -0
- package/dist/agents/tasks/PillSelect.d.ts +39 -0
- package/dist/agents/tasks/TaskActivityDialog.d.ts +14 -0
- package/dist/agents/tasks/TaskActivityTimeline.d.ts +54 -0
- package/dist/agents/tasks/TaskComposer.d.ts +6 -106
- package/dist/agents/tasks/TaskMoveDialog.d.ts +25 -0
- package/dist/agents/tasks/TaskOutputsCell.d.ts +23 -0
- package/dist/agents/tasks/TaskPlan.d.ts +4 -2
- package/dist/agents/tasks/TaskReviewActions.d.ts +44 -0
- package/dist/agents/tasks/TaskRowMenu.d.ts +28 -0
- package/dist/agents/tasks/TaskStatusPill.d.ts +24 -0
- package/dist/agents/tasks/TaskTable.d.ts +99 -0
- package/dist/agents/tasks/TaskThreadChip.d.ts +19 -0
- package/dist/agents/tasks/TaskTriggerChip.d.ts +24 -0
- package/dist/agents/tasks/TasksChrome.d.ts +17 -17
- package/dist/agents/tasks/WorkflowComposer.d.ts +10 -0
- package/dist/agents/tasks/WorkflowsTable.d.ts +72 -0
- package/dist/agents/tasks/gridWidth.d.ts +11 -0
- package/dist/agents/tasks/index.d.ts +23 -7
- package/dist/agents/tasks/taskColumns.d.ts +39 -63
- package/dist/agents/tasks/taskComposerTypes.d.ts +217 -0
- package/dist/agents/tasks/taskLabels.d.ts +27 -10
- package/dist/agents/tasks/taskRequest.d.ts +151 -25
- package/dist/agents/tasks/taskRows.d.ts +111 -0
- package/dist/agents/tasks/taskTableLabels.d.ts +64 -0
- package/dist/agents/tasks/workflowColumns.d.ts +23 -0
- package/dist/agents/tasks/workflowRows.d.ts +44 -0
- package/dist/agents/tasks/workflowTableLabels.d.ts +53 -0
- package/dist/agents/workflows/WorkflowConfigDialog.d.ts +5 -0
- package/dist/agents/workflows/index.d.ts +1 -0
- package/dist/agents/workflows/scopeRender.d.ts +10 -0
- package/dist/agents/workflows/types.d.ts +2 -0
- package/dist/chat/AssistantModeToggle.d.ts +25 -0
- package/dist/chat/MentionMenu.d.ts +52 -0
- package/dist/chat/index.cjs +119 -63
- package/dist/chat/index.d.ts +4 -0
- package/dist/chat/index.js +1 -1
- package/dist/chat/mentions.d.ts +64 -0
- package/dist/chat/useMentionAutocomplete.d.ts +33 -0
- package/dist/{chunk-IMA6I73C.js → chunk-ABSII3ND.js} +336 -4
- package/dist/chunk-ABSII3ND.js.map +1 -0
- package/dist/{chunk-22T6KHGB.cjs → chunk-C2V6HQKG.cjs} +348 -2
- package/dist/chunk-C2V6HQKG.cjs.map +1 -0
- package/dist/chunk-IC2VHFWR.js +158 -0
- package/dist/chunk-IC2VHFWR.js.map +1 -0
- package/dist/{chunk-67HGXV4I.cjs → chunk-IWOOGRNG.cjs} +4276 -855
- package/dist/chunk-IWOOGRNG.cjs.map +1 -0
- package/dist/{chunk-D6XY3C4O.cjs → chunk-JGZTRLKL.cjs} +207 -139
- package/dist/chunk-JGZTRLKL.cjs.map +1 -0
- package/dist/{chunk-H7OD4CHN.js → chunk-NUPVHEJW.js} +208 -140
- package/dist/chunk-NUPVHEJW.js.map +1 -0
- package/dist/{chunk-CVFBSUXL.js → chunk-OMF7444S.js} +4223 -851
- package/dist/chunk-OMF7444S.js.map +1 -0
- package/dist/chunk-ZPERNIMP.cjs +162 -0
- package/dist/chunk-ZPERNIMP.cjs.map +1 -0
- package/dist/connection/ai.d.ts +4 -1
- package/dist/facts/FactRowActions.d.ts +5 -1
- package/dist/facts/factColumns.d.ts +1 -1
- package/dist/facts/index.cjs +18 -9
- package/dist/facts/index.cjs.map +1 -1
- package/dist/facts/index.js +13 -4
- package/dist/facts/index.js.map +1 -1
- package/dist/files/GridView.d.ts +5 -0
- package/dist/files/index.cjs +17 -17
- package/dist/files/index.js +3 -4
- package/dist/files/index.js.map +1 -1
- package/dist/index.cjs +495 -243
- package/dist/index.js +4 -4
- package/dist/settings/ConversationSettingsParts.d.ts +5 -1
- package/dist/settings/index.cjs +8 -3
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.js +8 -3
- package/dist/settings/index.js.map +1 -1
- package/dist/site/index.cjs +9 -9
- package/dist/site/index.js +1 -1
- package/dist/workspaces/index.cjs +1 -1
- package/dist/workspaces/index.cjs.map +1 -1
- package/dist/workspaces/index.js +1 -1
- package/dist/workspaces/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/agents/tasks/LiveRunsBanner.d.ts +0 -26
- package/dist/agents/tasks/TaskRowActions.d.ts +0 -43
- package/dist/chunk-22T6KHGB.cjs.map +0 -1
- package/dist/chunk-67HGXV4I.cjs.map +0 -1
- package/dist/chunk-CVFBSUXL.js.map +0 -1
- package/dist/chunk-D6XY3C4O.cjs.map +0 -1
- package/dist/chunk-H7OD4CHN.js.map +0 -1
- package/dist/chunk-IMA6I73C.js.map +0 -1
- package/dist/chunk-NUNKSZKU.js +0 -203
- package/dist/chunk-NUNKSZKU.js.map +0 -1
- package/dist/chunk-V4ISCZJ7.cjs +0 -207
- package/dist/chunk-V4ISCZJ7.cjs.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface TaskThreadChipLabels {
|
|
2
|
+
open: string;
|
|
3
|
+
watch: string;
|
|
4
|
+
none: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const DEFAULT_TASK_THREAD_CHIP_LABELS: TaskThreadChipLabels;
|
|
7
|
+
export interface TaskThreadChipProps {
|
|
8
|
+
/** Task id: keys the test id (`task-thread-{id}`). */
|
|
9
|
+
id: string;
|
|
10
|
+
/** The task's conversation (a task is a conversation: its own id). */
|
|
11
|
+
conversationId?: string | null;
|
|
12
|
+
/** An agent is writing into the thread right now. */
|
|
13
|
+
generating?: boolean;
|
|
14
|
+
onOpen: (conversationId: string) => void;
|
|
15
|
+
testId?: string;
|
|
16
|
+
labels?: Partial<TaskThreadChipLabels>;
|
|
17
|
+
}
|
|
18
|
+
/** The link from a task to its thread — live-pulsing while the agent works, muted before there is one. */
|
|
19
|
+
export declare function TaskThreadChip({ id, conversationId, generating, onOpen, testId, labels, }: TaskThreadChipProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { WorkflowTriggerType } from './taskLabels';
|
|
2
|
+
export interface TaskTriggerChipLabels {
|
|
3
|
+
/** "After “X” is done" — the workflow waits on a task. */
|
|
4
|
+
after: (taskName: string) => string;
|
|
5
|
+
/** The workflow waits on a task that is not visible to the viewer. */
|
|
6
|
+
afterUnknown: string;
|
|
7
|
+
/** No trigger: it runs when someone presses Run. */
|
|
8
|
+
onDemand: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const DEFAULT_TASK_TRIGGER_CHIP_LABELS: TaskTriggerChipLabels;
|
|
11
|
+
export interface TaskTriggerChipProps {
|
|
12
|
+
/** Workflow id: keys the test id (`task-trigger-{id}`). */
|
|
13
|
+
id: string;
|
|
14
|
+
triggerType: WorkflowTriggerType;
|
|
15
|
+
/** Host-formatted summary for time and event triggers ("Every weekday at 9:00", "On document uploaded"). */
|
|
16
|
+
summary: string;
|
|
17
|
+
/** Set when this workflow waits on a task; the name it shows (or undefined if not visible). */
|
|
18
|
+
afterTaskId?: string | null;
|
|
19
|
+
afterTaskName?: string;
|
|
20
|
+
testId?: string;
|
|
21
|
+
labels?: Partial<TaskTriggerChipLabels>;
|
|
22
|
+
}
|
|
23
|
+
/** What starts a workflow, in one line: a time, a repeat, an event, or a task finishing. */
|
|
24
|
+
export declare function TaskTriggerChip({ id, triggerType, summary, afterTaskId, afterTaskName, testId, labels, }: TaskTriggerChipProps): import("react").JSX.Element;
|
|
@@ -2,15 +2,12 @@
|
|
|
2
2
|
export interface TasksChromeLabels {
|
|
3
3
|
tasksTab: string;
|
|
4
4
|
newTask: string;
|
|
5
|
-
delete: string;
|
|
6
5
|
}
|
|
7
6
|
export declare const DEFAULT_TASKS_CHROME_LABELS: TasksChromeLabels;
|
|
8
7
|
export interface TasksToolbarProps {
|
|
9
8
|
/** Number of tasks (shown on the single "Tasks" tab). */
|
|
10
9
|
count: number;
|
|
11
10
|
onNewTask: () => void;
|
|
12
|
-
/** The list is empty: its empty state carries the one filled button, so this one goes tonal. */
|
|
13
|
-
isEmpty?: boolean;
|
|
14
11
|
testIds?: Partial<{
|
|
15
12
|
tab: string;
|
|
16
13
|
newTask: string;
|
|
@@ -18,19 +15,22 @@ export interface TasksToolbarProps {
|
|
|
18
15
|
labels?: Partial<TasksChromeLabels>;
|
|
19
16
|
}
|
|
20
17
|
/** The Tasks page header: one "Tasks" tab with a count, and New task (the page's primary action). */
|
|
21
|
-
export declare function TasksToolbar({ count, onNewTask,
|
|
22
|
-
/**
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export interface
|
|
18
|
+
export declare function TasksToolbar({ count, onNewTask, testIds, labels }: TasksToolbarProps): import("react").JSX.Element;
|
|
19
|
+
/** Fixed strings of the Workflows page chrome. */
|
|
20
|
+
export interface WorkflowsChromeLabels {
|
|
21
|
+
workflowsTab: string;
|
|
22
|
+
newWorkflow: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const DEFAULT_WORKFLOWS_CHROME_LABELS: WorkflowsChromeLabels;
|
|
25
|
+
export interface WorkflowsToolbarProps {
|
|
26
|
+
/** Number of workflows (shown on the single "Workflows" tab). */
|
|
29
27
|
count: number;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
onNewWorkflow: () => void;
|
|
29
|
+
testIds?: Partial<{
|
|
30
|
+
tab: string;
|
|
31
|
+
newWorkflow: string;
|
|
32
|
+
}>;
|
|
33
|
+
labels?: Partial<WorkflowsChromeLabels>;
|
|
34
34
|
}
|
|
35
|
-
/**
|
|
36
|
-
export declare function
|
|
35
|
+
/** The Workflows page header: one "Workflows" tab with a count, and New workflow. */
|
|
36
|
+
export declare function WorkflowsToolbar({ count, onNewWorkflow, testIds, labels }: WorkflowsToolbarProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type TaskComposerProps } from './taskComposerTypes';
|
|
2
|
+
/**
|
|
3
|
+
* The workflow dialog, where a skill is run: what it does, when it runs (Now by default, or on a date, a
|
|
4
|
+
* repeat, an event or after a task) and who runs it (the person, or an agent), up front and in that
|
|
5
|
+
* order, each saying in plain words what is missing. "Now" runs it at once and saves nothing; every
|
|
6
|
+
* other start saves a workflow, which needs an agent because nobody is present when it fires. The name, details, sign-off, visibility, plan and unattended
|
|
7
|
+
* access are optional and sit behind "More options". A blank name is derived from the template or the
|
|
8
|
+
* instruction and shown as the placeholder, so the Create button needs only the three required parts.
|
|
9
|
+
*/
|
|
10
|
+
export declare function WorkflowComposer({ open, onOpenChange, isEdit, workflows, agents, people, tasks, values: valuesProp, initialValues, onValuesChange, timezones, goal, standingAccess, scopeSource, renderScope, renderDocuments, addFilesAction, onDropFiles, defaultAgentId, isPending, planDrafting, hasPlan, onSubmit, renderIcon, labels, formLabels, recurrence, testId, }: TaskComposerProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type TaskPerson } from './PersonPill';
|
|
3
|
+
import { type TaskTriggerChipLabels } from './TaskTriggerChip';
|
|
4
|
+
import { type WorkflowListRow } from './workflowRows';
|
|
5
|
+
import { type WorkflowListLabels } from './workflowTableLabels';
|
|
6
|
+
export interface WorkflowsTableProps<T extends WorkflowListRow> {
|
|
7
|
+
/** Everything the viewer can run: saved workflows, and skills as virtual rows (`kind: 'skill'`). */
|
|
8
|
+
workflows: T[];
|
|
9
|
+
isLoading?: boolean;
|
|
10
|
+
/** Human summary of when a workflow starts ("Every weekday at 9:00", "On document uploaded"). */
|
|
11
|
+
describeTrigger: (workflow: T) => string;
|
|
12
|
+
/** Friendly display of an ISO timestamp. */
|
|
13
|
+
formatDate: (iso: string) => string;
|
|
14
|
+
/** Pause or resume a workflow that starts by itself (an on-demand one has no switch). */
|
|
15
|
+
onToggleActive: (workflow: T, active: boolean) => void;
|
|
16
|
+
/** Share a workflow with the workspace or make it private (the toggle appears with it). */
|
|
17
|
+
onToggleShared?: (workflow: T, shouldShare: boolean) => void;
|
|
18
|
+
/** Open the workflow in the composer (workflow-edit mode). */
|
|
19
|
+
onEdit: (workflow: T) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Run it. A saved workflow just runs (its inputs are stored); a skill needs its inputs, so the host
|
|
22
|
+
* opens the run dialog with that skill selected.
|
|
23
|
+
*/
|
|
24
|
+
onRun: (row: T) => void;
|
|
25
|
+
/** Run a skill later: the run dialog, on its schedule view. Offered on skill rows. */
|
|
26
|
+
onRunLater?: (skill: T) => void;
|
|
27
|
+
onDelete: (workflow: T) => void;
|
|
28
|
+
/** Show the tasks this workflow created. */
|
|
29
|
+
onViewRuns?: (workflow: T) => void;
|
|
30
|
+
/** Click on a row (not on one of its controls): a skill's detail, a workflow's editor. */
|
|
31
|
+
onOpenRow?: (row: T) => void;
|
|
32
|
+
/** Open the task a workflow's last run created. */
|
|
33
|
+
onOpenThread?: (conversationId: string) => void;
|
|
34
|
+
/** Each workflow's latest run: the newest task it created, by workflow id. */
|
|
35
|
+
lastRuns?: Record<string, {
|
|
36
|
+
conversationId: string;
|
|
37
|
+
at: string;
|
|
38
|
+
}>;
|
|
39
|
+
/** Bulk actions on the selected workflows (skills are skipped). */
|
|
40
|
+
onDeleteMany?: (workflows: T[]) => void;
|
|
41
|
+
onToggleActiveMany?: (workflows: T[], active: boolean) => void;
|
|
42
|
+
/** Agent names by id, for the Agent column (falls back to "Agent"). */
|
|
43
|
+
agentNames?: Record<string, string>;
|
|
44
|
+
/** Skill names by `skill_ref`, for the action cell (falls back to the reference). */
|
|
45
|
+
skillNames?: Record<string, string>;
|
|
46
|
+
/** Task names by id, for an "after <task>" trigger. */
|
|
47
|
+
taskNames?: Record<string, string>;
|
|
48
|
+
/** How an agent appears in the Agent column; defaults to the app's user pill. */
|
|
49
|
+
renderPerson?: (person: TaskPerson) => ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* The viewer edits the workspace (owner or collaborator): they may then edit, pause, resume and run a
|
|
52
|
+
* workflow shared with it. A guest leaves this off.
|
|
53
|
+
*/
|
|
54
|
+
canEditShared?: boolean;
|
|
55
|
+
/** The viewer owns the workspace: with the creator, the only one who deletes a workflow. Who can see it stays the creator's alone. */
|
|
56
|
+
isWorkspaceOwner?: boolean;
|
|
57
|
+
/** Workflow id with a request in flight: its row disables its controls. */
|
|
58
|
+
busyId?: string | null;
|
|
59
|
+
header?: ReactNode;
|
|
60
|
+
gridId?: string;
|
|
61
|
+
labels?: Partial<WorkflowListLabels>;
|
|
62
|
+
triggerChipLabels?: Partial<TaskTriggerChipLabels>;
|
|
63
|
+
testId?: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Everything the viewer can run, in one list: skills (they run on demand) and saved workflows (they start
|
|
67
|
+
* on a date, a repeat, an event or after a task, or on demand). Each row has its type, when it starts, what
|
|
68
|
+
* it does, who runs it, its status (Active or Paused with a switch; On demand has none), when it last ran
|
|
69
|
+
* (linking to the task that run created) and runs next, and a visible Run. The same grid as every other
|
|
70
|
+
* list in the app.
|
|
71
|
+
*/
|
|
72
|
+
export declare function WorkflowsTable<T extends WorkflowListRow>(props: WorkflowsTableProps<T>): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drop the least useful columns as a grid gets narrower, so the actions column (Approve, Run, the menu)
|
|
3
|
+
* is never pushed off the edge. Each rule keeps its column while the grid is at least `minWidth` wide.
|
|
4
|
+
*/
|
|
5
|
+
import type { GridApi } from 'ag-grid-community';
|
|
6
|
+
export interface ColumnWidthRule {
|
|
7
|
+
colId: string;
|
|
8
|
+
/** The narrowest grid (px) that still shows the column. */
|
|
9
|
+
minWidth: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function applyColumnWidthRules(api: Pick<GridApi, 'getColumn' | 'setColumnsVisible'>, gridWidth: number, rules: readonly ColumnWidthRule[]): void;
|
|
@@ -2,13 +2,29 @@ export { TaskPlan, DEFAULT_TASK_PLAN_LABELS, nextCriterionId, type TaskPlanLabel
|
|
|
2
2
|
export { UploadTaskItem, DEFAULT_UPLOAD_TASK_ITEM_LABELS, type UploadTaskItemProps, type UploadTaskItemLabels, type UploadTaskItemTestIds, } from './UploadTaskItem';
|
|
3
3
|
export { formatElapsed } from './elapsed';
|
|
4
4
|
export { UploadTaskList, DEFAULT_UPLOAD_TASK_LIST_LABELS, type UploadTaskListProps, type UploadTaskListLabels, type UploadTaskView, } from './UploadTaskList';
|
|
5
|
-
export { LiveRunsBanner, DEFAULT_LIVE_RUNS_BANNER_LABELS, type LiveRun, type LiveRunsBannerProps, type LiveRunsBannerLabels, } from './LiveRunsBanner';
|
|
6
5
|
export { RecurrenceBuilder, DEFAULT_RECURRENCE_BUILDER_LABELS, type RecurrenceBuilderProps, type RecurrenceBuilderLabels, type RecurrenceBuilderTestIds, } from './RecurrenceBuilder';
|
|
7
6
|
export * from './rrule';
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
7
|
+
export { STATUS_LABELS, STATUS_ORDER, STATUS_TONE, TRIGGER_LABELS, asTaskStatus, goalProgress, type TaskGoalState, type TaskStatusKey, type WorkflowTriggerType, } from './taskLabels';
|
|
8
|
+
export { TaskTable, type TaskTableProps } from './TaskTable';
|
|
9
|
+
export { DEFAULT_TASK_LIST_LABELS, type TaskListLabels } from './taskTableLabels';
|
|
10
|
+
export { createTaskColumns, TASK_COLUMN_ORDER, type CreateTaskColumnsOptions } from './taskColumns';
|
|
11
|
+
export { NewThreadDialog, DEFAULT_NEW_THREAD_DIALOG_LABELS, type NewThreadDialogProps, type NewThreadDialogLabels, } from './NewThreadDialog';
|
|
12
|
+
export { MAX_TASK_DEPTH, buildTaskRows, ownerExtId, descendantIds, indexTasks, isPlainTodo, moveTargets, type BuildTaskRowsOptions, type TaskTree, type TaskFilter, type TaskGridRow, type TaskListRow, } from './taskRows';
|
|
13
|
+
export { WorkflowsTable, type WorkflowsTableProps } from './WorkflowsTable';
|
|
14
|
+
export { WORKFLOW_COLUMN_ORDER, createWorkflowColumns } from './workflowColumns';
|
|
15
|
+
export { hasTrigger, isSkillRow, workflowStatus, workflowTriggerType, type WorkflowListRow, type WorkflowStatusKey, } from './workflowRows';
|
|
16
|
+
export { DEFAULT_WORKFLOW_LIST_LABELS, type WorkflowListLabels } from './workflowTableLabels';
|
|
17
|
+
export { TaskMoveDialog, type TaskMoveDialogProps, type TaskMoveDialogLabels, type TaskMoveOption, } from './TaskMoveDialog';
|
|
18
|
+
export { PersonPill, type PersonPillProps, type TaskPerson } from './PersonPill';
|
|
19
|
+
export { TaskStatusPill, DEFAULT_TASK_STATUS_PILL_LABELS, type TaskStatusPillProps, type TaskStatusPillLabels, } from './TaskStatusPill';
|
|
20
|
+
export { TaskActivityTimeline, DEFAULT_TASK_ACTIVITY_LABELS, type TaskActivityEvent, type TaskActivityKind, type TaskActivityLabels, type TaskActivityTimelineProps, } from './TaskActivityTimeline';
|
|
21
|
+
export { TaskActivityDialog, type TaskActivityDialogProps } from './TaskActivityDialog';
|
|
22
|
+
export { TaskOutputsCell, DEFAULT_TASK_OUTPUTS_CELL_LABELS, type TaskOutput, type TaskOutputsCellProps, type TaskOutputsCellLabels, } from './TaskOutputsCell';
|
|
23
|
+
export { TaskThreadChip, DEFAULT_TASK_THREAD_CHIP_LABELS, type TaskThreadChipProps, type TaskThreadChipLabels, } from './TaskThreadChip';
|
|
24
|
+
export { TaskTriggerChip, DEFAULT_TASK_TRIGGER_CHIP_LABELS, type TaskTriggerChipProps, type TaskTriggerChipLabels, } from './TaskTriggerChip';
|
|
25
|
+
export { TaskReviewActions, DEFAULT_TASK_REVIEW_ACTIONS_LABELS, type TaskReviewActionsProps, type TaskReviewActionsLabels, } from './TaskReviewActions';
|
|
11
26
|
export { TaskRunsDialog, DEFAULT_TASK_RUNS_DIALOG_LABELS, type TaskRunsDialogProps, type TaskRunsDialogLabels, type TaskRunsDialogTestIds, type TaskRunView, } from './TaskRunsDialog';
|
|
12
|
-
export { TasksToolbar,
|
|
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
|
|
27
|
+
export { TasksToolbar, DEFAULT_TASKS_CHROME_LABELS, type TasksChromeLabels, type TasksToolbarProps, WorkflowsToolbar, DEFAULT_WORKFLOWS_CHROME_LABELS, type WorkflowsChromeLabels, type WorkflowsToolbarProps, } from './TasksChrome';
|
|
28
|
+
export { TaskComposer, DEFAULT_TASK_COMPOSER_LABELS, defaultTaskComposerValues, type TaskComposerProps, type TaskComposerLabels, type TaskComposerValues, type TaskOption, type PersonOption, type TaskWhen, type TaskAccessMode, type TaskAssignee, } from './TaskComposer';
|
|
29
|
+
export { authModeFor, workflowTaskFields, isAgenticWorkflow, createsWork, EMPTY_NEW_THREAD, hasTaskFields, newThreadToRequest, type NewThreadRequest, type NewThreadValues, deriveWorkflowName, firstWords, DERIVED_NAME_WORDS, composerToWorkRequest, composerToTaskQuery, inputDocumentIds, composerToWorkflowRequest, composerToWorkflowUpdate, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskToComposerValues, workflowToComposerValues, workflowWhen, taskNeedsAccess, isoToLocalInput, localInputToIso, type TaskAuthMode, type ComposerCreate, type TaskQuery, type ThreadQuery, type WorkflowTaskFields, type TaskRequestContext, type TaskValuesWorkflows, } from './taskRequest';
|
|
30
|
+
export { PillSelect, DEFAULT_PILL_SELECT_LABELS, type PillSelectProps, type PillSelectLabels, type PillOption, } from './PillSelect';
|
|
@@ -1,68 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Column definitions for the
|
|
3
|
-
* column state by id: see CLAUDE.md). The
|
|
2
|
+
* Column definitions for the tasks grid. Every column has an
|
|
3
|
+
* explicit `colId` (AG Grid persists column state by id: see CLAUDE.md). The table supplies behaviour and
|
|
4
|
+
* the cells that need it through slots; the structure, widths and headers live here. The slots must be
|
|
5
|
+
* stable functions (the table keeps the latest handlers behind them) so the definitions are built once
|
|
6
|
+
* and the grid never refreshes its columns on a selection or expand.
|
|
7
|
+
*
|
|
8
|
+
* Every conversation is a task: Owner (who has the next step), due, shared, thread link,
|
|
9
|
+
* status, outputs. Rows are `TaskGridRow`s: a task plus where it sits in the sub-task tree, so the
|
|
10
|
+
* order is the tree's. A column's header still shows and reports the sort, but the grid's own sort is
|
|
11
|
+
* a no-op (`keepOrder`): that would tear sub-tasks away from their parent, so the table sorts within
|
|
12
|
+
* each level instead (see `buildTaskRows`).
|
|
4
13
|
*/
|
|
5
14
|
import type { ReactNode } from 'react';
|
|
6
15
|
import type { ColDef } from 'ag-grid-community';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
import type { TaskGridRow, TaskListRow } from './taskRows';
|
|
17
|
+
import type { TaskListLabels } from './taskTableLabels';
|
|
18
|
+
/** The actions column's usual width (Approve, ask someone, the menu). */
|
|
19
|
+
export declare const ACTIONS_WIDTH = 210;
|
|
20
|
+
export declare const TASK_COLUMN_ORDER: readonly ["name", "owner", "due", "status", "outputs", "shared", "actions"];
|
|
21
|
+
export type TaskColumnId = (typeof TASK_COLUMN_ORDER)[number];
|
|
22
|
+
export interface CreateTaskColumnsOptions<T extends TaskListRow> {
|
|
23
|
+
labels: TaskListLabels;
|
|
24
|
+
renderName: (row: TaskGridRow<T>) => ReactNode;
|
|
25
|
+
/** Who has the next step. */
|
|
26
|
+
renderOwner: (row: TaskGridRow<T>) => ReactNode;
|
|
27
|
+
renderDue: (row: TaskGridRow<T>) => ReactNode;
|
|
28
|
+
renderShared: (row: TaskGridRow<T>) => ReactNode;
|
|
29
|
+
/** The documents the task generated. */
|
|
30
|
+
renderOutputs: (row: TaskGridRow<T>) => ReactNode;
|
|
31
|
+
/** A phone-width grid: the actions column is just the menu. */
|
|
32
|
+
narrow?: boolean;
|
|
33
|
+
/** Whether the Outputs column is shown: only worth the room once some task has outputs. */
|
|
34
|
+
showOutputs?: boolean;
|
|
35
|
+
renderStatus: (row: TaskGridRow<T>) => ReactNode;
|
|
36
|
+
/** Who is in the thread (Threads view). */
|
|
37
|
+
renderActions: (row: TaskGridRow<T>) => ReactNode;
|
|
38
|
+
/** Plain text of the owner cell, for sorting, filters and the clipboard. */
|
|
39
|
+
getOwnerName: (row: TaskGridRow<T>) => string;
|
|
25
40
|
}
|
|
26
|
-
/**
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
action: string;
|
|
31
|
-
target: string;
|
|
32
|
-
status: string;
|
|
33
|
-
nextRun: string;
|
|
34
|
-
lastRun: string;
|
|
35
|
-
untitled: string;
|
|
36
|
-
goal: string;
|
|
37
|
-
workspace: string;
|
|
38
|
-
defaultAgent: string;
|
|
39
|
-
running: string;
|
|
40
|
-
/** A run is waiting for the owner to allow access. */
|
|
41
|
-
waitingForAccess: string;
|
|
42
|
-
never: string;
|
|
43
|
-
/** Goal progress, e.g. "2/3 met". */
|
|
44
|
-
goalMet: (met: number, total: number) => string;
|
|
45
|
-
}
|
|
46
|
-
export declare const DEFAULT_TASK_COLUMN_LABELS: TaskColumnLabels;
|
|
47
|
-
/** Per-task test ids derived from the task id (defaults `task-name-{id}`, ...). */
|
|
48
|
-
export interface TaskColumnTestIds {
|
|
49
|
-
name: (id: string) => string;
|
|
50
|
-
goalBadge: (id: string) => string;
|
|
51
|
-
goalProgress: (id: string) => string;
|
|
52
|
-
error: (id: string) => string;
|
|
53
|
-
}
|
|
54
|
-
export interface TaskColumnSlots<T extends TaskRowView> {
|
|
55
|
-
/** Human summary of when the task fires. */
|
|
56
|
-
describeTrigger: (task: T) => string;
|
|
57
|
-
/** Friendly display of an ISO timestamp. */
|
|
58
|
-
formatDate: (iso: string) => string;
|
|
59
|
-
/** The row actions cell (`TaskRowActions` bound to the app's mutations). */
|
|
60
|
-
renderActions: (task: T) => ReactNode;
|
|
61
|
-
/** Destination of a task's name; makes it a real link (modified clicks go to the browser). */
|
|
62
|
-
getHref?: (task: T) => string | undefined;
|
|
63
|
-
/** Plain click on the linked name (owns navigation); without `getHref` the name is plain text. */
|
|
64
|
-
onOpen?: (task: T) => void;
|
|
65
|
-
testIds?: Partial<TaskColumnTestIds>;
|
|
66
|
-
labels?: Partial<TaskColumnLabels>;
|
|
67
|
-
}
|
|
68
|
-
export declare function createTaskColumns<T extends TaskRowView>(slots: TaskColumnSlots<T>): ColDef<T>[];
|
|
41
|
+
/** Columns the user can sort by, per view. */
|
|
42
|
+
export declare const SORTABLE_TASK_COLUMNS: readonly ["name", "owner", "due", "status", "updated", "messages"];
|
|
43
|
+
export type SortableTaskColumn = (typeof SORTABLE_TASK_COLUMNS)[number];
|
|
44
|
+
export declare function createTaskColumns<T extends TaskListRow>(o: CreateTaskColumnsOptions<T>): ColDef<TaskGridRow<T>>[];
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { AgentOption } from '../workflows/AgentSelect';
|
|
3
|
+
import type { SchemaFormLabels } from '../workflows/SchemaForm';
|
|
4
|
+
import type { WorkflowScopeSource } from '../workflows/WorkflowConfigDialog';
|
|
5
|
+
import type { WorkflowDefinition, WorkflowField, WorkflowInputs, WorkflowScope } from '../workflows/types';
|
|
6
|
+
import type { RecurrenceBuilderProps } from './RecurrenceBuilder';
|
|
7
|
+
/**
|
|
8
|
+
* When the assistant starts. `manual` means it only acts when asked (an @mention, or sending work back);
|
|
9
|
+
* `now` starts it at once; `once`, `repeat`, `event` and `task` (after another task is signed off) start
|
|
10
|
+
* it unattended.
|
|
11
|
+
*/
|
|
12
|
+
export type TaskWhen = 'manual' | 'now' | 'once' | 'repeat' | 'event' | 'task';
|
|
13
|
+
export type TaskAccessMode = 'ask_each_run' | 'standing';
|
|
14
|
+
/**
|
|
15
|
+
* Whether the assistant has been given work. Every task has an assistant; `agent` means it was configured
|
|
16
|
+
* to prepare the task (it has an instruction and a start), `me` means it is on standby.
|
|
17
|
+
*/
|
|
18
|
+
export type TaskAssignee = 'me' | 'agent';
|
|
19
|
+
/** Everything the composer collects. The host maps it onto its API. */
|
|
20
|
+
export interface TaskComposerValues {
|
|
21
|
+
assignee: TaskAssignee;
|
|
22
|
+
workflowId: string;
|
|
23
|
+
inputs: WorkflowInputs;
|
|
24
|
+
when: TaskWhen;
|
|
25
|
+
/** datetime-local value (`once`). */
|
|
26
|
+
runAt: string;
|
|
27
|
+
rrule: string;
|
|
28
|
+
timezone: string;
|
|
29
|
+
eventKind: string;
|
|
30
|
+
/** `task`: the id (`con-…`) of the task (conversation) this one waits on. */
|
|
31
|
+
afterTaskId: string;
|
|
32
|
+
/** The task this is a sub-task of (`con-…`); `''` = a top-level task. */
|
|
33
|
+
parentTaskId: string;
|
|
34
|
+
/** The person who signs the task off (`usr-…`); `''` = me. Always a human. */
|
|
35
|
+
signoffUserId: string;
|
|
36
|
+
/** Shared with the workspace's members (like a document); off keeps it private to its owner. */
|
|
37
|
+
shared: boolean;
|
|
38
|
+
/** What the task is, in the owner's words. */
|
|
39
|
+
description: string;
|
|
40
|
+
/** datetime-local value; empty = no due date. */
|
|
41
|
+
dueAt: string;
|
|
42
|
+
/** `''` = the user's own assistant. */
|
|
43
|
+
agentId: string;
|
|
44
|
+
/** The task's title. */
|
|
45
|
+
name: string;
|
|
46
|
+
/** The reviewer is always told when the assistant finishes; kept so hosts can map it. */
|
|
47
|
+
notifyOnComplete: boolean;
|
|
48
|
+
/** Only asked for tasks the assistant starts unattended. */
|
|
49
|
+
access: TaskAccessMode;
|
|
50
|
+
/** A workflow's saved equality filters on its event; carried through an edit unchanged (no control). */
|
|
51
|
+
eventFilter?: Record<string, string | number | boolean> | null;
|
|
52
|
+
}
|
|
53
|
+
export interface TaskComposerLabels {
|
|
54
|
+
titleNew: string;
|
|
55
|
+
titleEdit: string;
|
|
56
|
+
description: string;
|
|
57
|
+
titleNewWorkflow: string;
|
|
58
|
+
titleRunTemplate: (name: string) => string;
|
|
59
|
+
titleEditWorkflow: string;
|
|
60
|
+
descriptionWorkflow: string;
|
|
61
|
+
workflowNamePlaceholder: string;
|
|
62
|
+
createWorkflow: string;
|
|
63
|
+
/** The workflow dialog's three required parts, in order, and what is missing from each. */
|
|
64
|
+
whenHeading: string;
|
|
65
|
+
whoHeading: string;
|
|
66
|
+
/** "Run as": the person themself (the default for Run now) or an agent (required for a scheduled run). */
|
|
67
|
+
runAs: string;
|
|
68
|
+
runLater: string;
|
|
69
|
+
addFilesReason: string;
|
|
70
|
+
needDocument: string;
|
|
71
|
+
addPlan: string;
|
|
72
|
+
hidePlan: string;
|
|
73
|
+
/** The toggle when the workflow already has a plan. */
|
|
74
|
+
showPlan: string;
|
|
75
|
+
runAsMe: string;
|
|
76
|
+
runAsAgentHint: string;
|
|
77
|
+
needAgent: string;
|
|
78
|
+
runNow: string;
|
|
79
|
+
saveWorkflow: string;
|
|
80
|
+
needWhat: string;
|
|
81
|
+
needRunAt: string;
|
|
82
|
+
needRrule: string;
|
|
83
|
+
needEvent: string;
|
|
84
|
+
needAfterTask: string;
|
|
85
|
+
/** The "More options" disclosure (name, details, sign-off, visibility, plan, unattended access). */
|
|
86
|
+
moreOptions: string;
|
|
87
|
+
fewerOptions: string;
|
|
88
|
+
nameHint: string;
|
|
89
|
+
titleLabel: string;
|
|
90
|
+
titlePlaceholder: string;
|
|
91
|
+
descriptionLabel: string;
|
|
92
|
+
descriptionPlaceholder: string;
|
|
93
|
+
signoff: string;
|
|
94
|
+
signoffMe: string;
|
|
95
|
+
due: string;
|
|
96
|
+
dueNone: string;
|
|
97
|
+
dueClear: string;
|
|
98
|
+
parentTask: string;
|
|
99
|
+
parentTaskNone: string;
|
|
100
|
+
visibility: string;
|
|
101
|
+
visibilityWorkspace: string;
|
|
102
|
+
visibilityPrivate: string;
|
|
103
|
+
assistant: string;
|
|
104
|
+
assistantStandby: string;
|
|
105
|
+
assistantPreparing: (when: string) => string;
|
|
106
|
+
configure: string;
|
|
107
|
+
configureClose: string;
|
|
108
|
+
what: string;
|
|
109
|
+
template: string;
|
|
110
|
+
whatPlaceholder: string;
|
|
111
|
+
plan: string;
|
|
112
|
+
planHint: string;
|
|
113
|
+
start: string;
|
|
114
|
+
whenOptions: Record<TaskWhen, string>;
|
|
115
|
+
runAt: string;
|
|
116
|
+
/** Shown when the start time is already past: the server refuses it. */
|
|
117
|
+
runAtPast: string;
|
|
118
|
+
event: string;
|
|
119
|
+
eventPlaceholder: string;
|
|
120
|
+
eventHint: ReactNode;
|
|
121
|
+
afterTask: string;
|
|
122
|
+
afterTaskPlaceholder: string;
|
|
123
|
+
which: string;
|
|
124
|
+
myAssistant: string;
|
|
125
|
+
permission: string;
|
|
126
|
+
/** The disclosure that holds who runs it, access, name, owner and visibility. */
|
|
127
|
+
runOptions: string;
|
|
128
|
+
/** Its summary line: "Runs as Assistant · ask me each time". */
|
|
129
|
+
runOptionsSummary: (agent: string, access: string) => string;
|
|
130
|
+
permissionHint: string;
|
|
131
|
+
accessOptions: Record<TaskAccessMode, {
|
|
132
|
+
label: string;
|
|
133
|
+
hint: string;
|
|
134
|
+
}>;
|
|
135
|
+
timezone: string;
|
|
136
|
+
search: string;
|
|
137
|
+
empty: string;
|
|
138
|
+
cancel: string;
|
|
139
|
+
addTask: string;
|
|
140
|
+
addAndStart: string;
|
|
141
|
+
addAndSchedule: string;
|
|
142
|
+
save: string;
|
|
143
|
+
saving: string;
|
|
144
|
+
}
|
|
145
|
+
export declare const DEFAULT_TASK_COMPOSER_LABELS: TaskComposerLabels;
|
|
146
|
+
export interface TaskOption {
|
|
147
|
+
id: string;
|
|
148
|
+
name: string;
|
|
149
|
+
}
|
|
150
|
+
/** A person who can be asked to sign a task off. */
|
|
151
|
+
export interface PersonOption {
|
|
152
|
+
id: string;
|
|
153
|
+
label: string;
|
|
154
|
+
/** Small line after the name (e.g. their role). */
|
|
155
|
+
description?: string;
|
|
156
|
+
}
|
|
157
|
+
export interface TaskComposerProps {
|
|
158
|
+
open: boolean;
|
|
159
|
+
onOpenChange: (open: boolean) => void;
|
|
160
|
+
/**
|
|
161
|
+
* `work` (default) adds a task: "Now" starts it at once and any other start saves a workflow.
|
|
162
|
+
* `workflow` is the workflow dialog itself (new or edit): a trigger and an action are required, and
|
|
163
|
+
* the task-only properties (due date, parent) are hidden.
|
|
164
|
+
*/
|
|
165
|
+
kind?: 'work' | 'workflow';
|
|
166
|
+
/**
|
|
167
|
+
* Editing an existing task, or a workflow. A task keeps the start and assistant it was created with;
|
|
168
|
+
* a workflow can change both.
|
|
169
|
+
*/
|
|
170
|
+
isEdit?: boolean;
|
|
171
|
+
/** Workflows the assistant can run. The host includes its "my own instruction" entry. */
|
|
172
|
+
workflows: WorkflowDefinition[];
|
|
173
|
+
agents: AgentOption[];
|
|
174
|
+
/** People who can sign a task off (humans who can edit the workspace, besides me). Omit to hide the field. */
|
|
175
|
+
people?: PersonOption[];
|
|
176
|
+
/** Tasks a new task can be part of, or wait on (`when: 'task'`) — conversations with a status. */
|
|
177
|
+
tasks?: TaskOption[];
|
|
178
|
+
/**
|
|
179
|
+
* The owner's Assistant (an agent id). A scheduled workflow needs an agent, so switching away from
|
|
180
|
+
* "Now" selects this one when "Run as" is still the person themself.
|
|
181
|
+
*/
|
|
182
|
+
defaultAgentId?: string;
|
|
183
|
+
/** Controlled values; omit to let the composer hold them (seeded by `initialValues`). */
|
|
184
|
+
values?: TaskComposerValues;
|
|
185
|
+
initialValues?: Partial<TaskComposerValues>;
|
|
186
|
+
onValuesChange?: (values: TaskComposerValues) => void;
|
|
187
|
+
timezones?: string[];
|
|
188
|
+
/** The plan editor, shown inline when the assistant is configured. Omit when not applicable. */
|
|
189
|
+
goal?: ReactNode | ((values: TaskComposerValues) => ReactNode);
|
|
190
|
+
/** What "always allowed" means for this assistant (e.g. the workspaces it will hold standing access to). */
|
|
191
|
+
standingAccess?: ReactNode | ((values: TaskComposerValues) => ReactNode);
|
|
192
|
+
isPending?: boolean;
|
|
193
|
+
/** A plan is being drafted: saving waits for it, or the plan would be dropped. */
|
|
194
|
+
planDrafting?: boolean;
|
|
195
|
+
/** The plan already stored (an edit): the toggle offers to show it rather than to add one. */
|
|
196
|
+
hasPlan?: boolean;
|
|
197
|
+
onSubmit: (values: TaskComposerValues) => void;
|
|
198
|
+
/**
|
|
199
|
+
* The workspace's files behind `scope` fields (the folder/label picker) and a `documents` field (an
|
|
200
|
+
* explicit pick). The host owns the file data; without these those fields render nothing. A scope pick
|
|
201
|
+
* is resolved to explicit file ids on submit (`scopeSource.resolveDocuments`).
|
|
202
|
+
*/
|
|
203
|
+
scopeSource?: WorkflowScopeSource;
|
|
204
|
+
renderScope?: (field: WorkflowField, value: WorkflowScope, onChange: (s: WorkflowScope) => void) => ReactNode;
|
|
205
|
+
renderDocuments?: (field: WorkflowField, value: WorkflowScope, onChange: (s: WorkflowScope) => void) => ReactNode;
|
|
206
|
+
/** The host's "Add files" control, offered instead of the form when a template needs files and there are none. */
|
|
207
|
+
addFilesAction?: ReactNode;
|
|
208
|
+
/** Files dropped on the "add files" state: the host uploads them. */
|
|
209
|
+
onDropFiles?: (files: File[]) => void;
|
|
210
|
+
/** The assistant's workflow input forms: `renderIcon` maps a field option's icon key. */
|
|
211
|
+
renderIcon?: (key: string) => ReactNode;
|
|
212
|
+
labels?: Partial<TaskComposerLabels>;
|
|
213
|
+
formLabels?: Partial<SchemaFormLabels>;
|
|
214
|
+
recurrence?: Pick<RecurrenceBuilderProps, 'testIds' | 'labels'>;
|
|
215
|
+
testId?: string;
|
|
216
|
+
}
|
|
217
|
+
export declare function defaultTaskComposerValues(workflows: WorkflowDefinition[], initial?: Partial<TaskComposerValues>): TaskComposerValues;
|
|
@@ -1,12 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { Tone } from '../../components/tones';
|
|
2
|
+
/**
|
|
3
|
+
* What starts a workflow: a moment (`one_time`), a repeating schedule (`recurring`), a notification
|
|
4
|
+
* (`event`), another conversation finishing (`after`), or nothing but someone pressing Run (`on_demand`).
|
|
5
|
+
*/
|
|
6
|
+
export type WorkflowTriggerType = 'one_time' | 'recurring' | 'event' | 'after' | 'on_demand';
|
|
7
|
+
/**
|
|
8
|
+
* Where a task (a conversation with a status) is in the human workflow. Agents prepare work; only a
|
|
9
|
+
* person marks it `done`.
|
|
10
|
+
* - `todo`: nothing automated pending.
|
|
11
|
+
* - `generating`: an agent run is in flight.
|
|
12
|
+
* - `ready_for_review`: prepared, waiting for a person.
|
|
13
|
+
* - `done`: a person accepted it.
|
|
14
|
+
* - `chat`: no status at all: a plain conversation, listed beside the tasks.
|
|
15
|
+
*/
|
|
16
|
+
export type TaskStatusKey = 'todo' | 'generating' | 'ready_for_review' | 'done' | 'chat';
|
|
17
|
+
export declare const TRIGGER_LABELS: Record<WorkflowTriggerType, string>;
|
|
6
18
|
export declare const STATUS_LABELS: Record<TaskStatusKey, string>;
|
|
7
|
-
|
|
8
|
-
export declare
|
|
9
|
-
|
|
19
|
+
/** The order sections appear in the list: what needs a person first, finished work last. */
|
|
20
|
+
export declare const STATUS_ORDER: readonly TaskStatusKey[];
|
|
21
|
+
export declare const STATUS_TONE: Record<TaskStatusKey, Tone>;
|
|
22
|
+
/**
|
|
23
|
+
* A status string from the API narrowed to the known set. No status is a plain chat; anything else
|
|
24
|
+
* unexpected reads as a to-do.
|
|
25
|
+
*/
|
|
26
|
+
export declare function asTaskStatus(status: string | null | undefined): TaskStatusKey;
|
|
27
|
+
/** The goal-state fields the list reads from a goal task's last run. */
|
|
10
28
|
export interface TaskGoalState {
|
|
11
29
|
done?: boolean;
|
|
12
30
|
criteria_met?: number;
|
|
@@ -14,10 +32,9 @@ export interface TaskGoalState {
|
|
|
14
32
|
}
|
|
15
33
|
/**
|
|
16
34
|
* Goal progress from a goal task's last run (its `/goal` gate verdict), or null when the task
|
|
17
|
-
*
|
|
35
|
+
* has no goal state yet.
|
|
18
36
|
*/
|
|
19
37
|
export declare function goalProgress(task: {
|
|
20
|
-
is_goal_task?: boolean | null;
|
|
21
38
|
goal_state?: unknown;
|
|
22
39
|
}): {
|
|
23
40
|
met: number;
|