digital-tasks 2.3.0 → 2.4.0
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/.turbo/turbo-build.log +4 -0
- package/CHANGELOG.md +9 -0
- package/dist/client.d.ts +202 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +85 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +74 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +76 -0
- package/dist/index.js.map +1 -0
- package/dist/markdown.d.ts +112 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +531 -0
- package/dist/markdown.js.map +1 -0
- package/dist/project.d.ts +259 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +415 -0
- package/dist/project.js.map +1 -0
- package/dist/queue.d.ts +17 -0
- package/dist/queue.d.ts.map +1 -0
- package/dist/queue.js +386 -0
- package/dist/queue.js.map +1 -0
- package/dist/task.d.ts +69 -0
- package/dist/task.d.ts.map +1 -0
- package/dist/task.js +383 -0
- package/dist/task.js.map +1 -0
- package/dist/types.d.ts +405 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +23 -0
- package/dist/types.js.map +1 -0
- package/dist/worker.d.ts +264 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +656 -0
- package/dist/worker.js.map +1 -0
- package/package.json +4 -4
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for digital-tasks
|
|
3
|
+
*
|
|
4
|
+
* Task = Action + issue-shaped metadata (title, body, comments, labels,
|
|
5
|
+
* dependencies, assignees, project). A Task is a specialization of an
|
|
6
|
+
* `Action` (`digital-objects.Action`) with project-management overlay,
|
|
7
|
+
* per the SVO co-design (`docs/plans/2026-05-05-svo-co-design.md`).
|
|
8
|
+
*
|
|
9
|
+
* Every task wraps a callable Verb — historically the `function` field
|
|
10
|
+
* (an `ai-functions.FunctionDefinition`). Per CONTEXT.md the canonical
|
|
11
|
+
* name for callable Verbs is **Tool**; `function` is being renamed to
|
|
12
|
+
* `tool` over time. See the `function` / `tool` fields below.
|
|
13
|
+
*
|
|
14
|
+
* The function (now Tool) can be:
|
|
15
|
+
* - Code: generates executable code
|
|
16
|
+
* - Generative: AI generates content (no tools)
|
|
17
|
+
* - Agentic: AI with tools in a loop
|
|
18
|
+
* - Human: requires human input
|
|
19
|
+
*
|
|
20
|
+
* @packageDocumentation
|
|
21
|
+
*/
|
|
22
|
+
import type { FunctionDefinition, CodeFunctionDefinition, GenerativeFunctionDefinition, AgenticFunctionDefinition, HumanFunctionDefinition } from 'ai-functions';
|
|
23
|
+
import type { Action } from 'digital-objects';
|
|
24
|
+
export type { FunctionDefinition, CodeFunctionDefinition, GenerativeFunctionDefinition, AgenticFunctionDefinition, HumanFunctionDefinition, };
|
|
25
|
+
export type { Action };
|
|
26
|
+
/**
|
|
27
|
+
* Task lifecycle status
|
|
28
|
+
*/
|
|
29
|
+
export type TaskStatus = 'pending' | 'queued' | 'assigned' | 'in_progress' | 'blocked' | 'review' | 'completed' | 'failed' | 'cancelled';
|
|
30
|
+
/**
|
|
31
|
+
* Task priority levels
|
|
32
|
+
*/
|
|
33
|
+
export type TaskPriority = 'low' | 'normal' | 'high' | 'urgent' | 'critical';
|
|
34
|
+
/**
|
|
35
|
+
* Who can work on this task
|
|
36
|
+
*/
|
|
37
|
+
export type WorkerType = 'agent' | 'human' | 'team' | 'any';
|
|
38
|
+
/**
|
|
39
|
+
* Worker reference
|
|
40
|
+
*/
|
|
41
|
+
export interface WorkerRef {
|
|
42
|
+
type: WorkerType;
|
|
43
|
+
id: string;
|
|
44
|
+
name?: string;
|
|
45
|
+
role?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Task assignment
|
|
49
|
+
*/
|
|
50
|
+
export interface TaskAssignment {
|
|
51
|
+
worker: WorkerRef;
|
|
52
|
+
assignedAt: Date;
|
|
53
|
+
assignedBy?: string;
|
|
54
|
+
notes?: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Dependency type
|
|
58
|
+
*/
|
|
59
|
+
export type DependencyType = 'blocks' | 'blocked_by' | 'related_to' | 'parent' | 'child';
|
|
60
|
+
/**
|
|
61
|
+
* Task dependency
|
|
62
|
+
*/
|
|
63
|
+
export interface TaskDependency {
|
|
64
|
+
type: DependencyType;
|
|
65
|
+
taskId: string;
|
|
66
|
+
satisfied?: boolean;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Task progress
|
|
70
|
+
*/
|
|
71
|
+
export interface TaskProgress {
|
|
72
|
+
percent: number;
|
|
73
|
+
step?: string;
|
|
74
|
+
totalSteps?: number;
|
|
75
|
+
currentStep?: number;
|
|
76
|
+
estimatedTimeRemaining?: number;
|
|
77
|
+
updatedAt: Date;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Task event for history
|
|
81
|
+
*/
|
|
82
|
+
export interface TaskEvent {
|
|
83
|
+
id: string;
|
|
84
|
+
type: 'created' | 'assigned' | 'started' | 'progress' | 'blocked' | 'unblocked' | 'completed' | 'failed' | 'cancelled' | 'comment';
|
|
85
|
+
timestamp: Date;
|
|
86
|
+
actor?: WorkerRef;
|
|
87
|
+
data?: unknown;
|
|
88
|
+
message?: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Comment - a thin wrapper around a comment posted on a Task.
|
|
92
|
+
*
|
|
93
|
+
* Per the SVO co-design, comments are child Actions of verb 'commented'
|
|
94
|
+
* whose `cause` role points back at the parent Task's Action id. This
|
|
95
|
+
* shape is the surfaced view of such an Action for issue-shaped UIs.
|
|
96
|
+
*/
|
|
97
|
+
export interface Comment {
|
|
98
|
+
/** Comment id (matches the underlying Action id when persisted) */
|
|
99
|
+
id: string;
|
|
100
|
+
/** Markdown body of the comment */
|
|
101
|
+
body: string;
|
|
102
|
+
/** Who posted the comment */
|
|
103
|
+
author?: WorkerRef;
|
|
104
|
+
/** When the comment was posted */
|
|
105
|
+
createdAt: Date;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Task = Action + issue-shaped metadata
|
|
109
|
+
*
|
|
110
|
+
* A Task is a specialization of `digital-objects.Action` carrying
|
|
111
|
+
* project-management overlay (title, body, comments, labels,
|
|
112
|
+
* dependencies, assignees, milestone/project). The Action supertype
|
|
113
|
+
* provides id/verb/subject/object/roles/data/createdAt/completedAt.
|
|
114
|
+
*
|
|
115
|
+
* Status: Action's status taxonomy is lifecycle-only
|
|
116
|
+
* (pending/active/completed/failed/cancelled). Task's status taxonomy
|
|
117
|
+
* is project-management shaped (queued/assigned/in_progress/blocked/
|
|
118
|
+
* review/...). We omit Action's `status` and replace it with the
|
|
119
|
+
* Task-specific `TaskStatus`. Both supersets share `pending`,
|
|
120
|
+
* `completed`, `failed`, `cancelled`.
|
|
121
|
+
*
|
|
122
|
+
* Verb: every Task is an Action of some Verb. For tasks created via
|
|
123
|
+
* the legacy `createTask({ function })` path, `verb` defaults to the
|
|
124
|
+
* function's name (e.g. `'summarize'`).
|
|
125
|
+
*
|
|
126
|
+
* Backward compatibility: all previously-valid Task shapes remain
|
|
127
|
+
* assignable. Newly added fields (title/body/labels/project/assignees/
|
|
128
|
+
* comments/$type/verb) are optional or have defaults populated by
|
|
129
|
+
* `createTask`.
|
|
130
|
+
*/
|
|
131
|
+
export type Task<TInput = unknown, TOutput = unknown> = Omit<Action<TInput>, 'status'> & {
|
|
132
|
+
/** MDXLD type discriminator */
|
|
133
|
+
$type?: 'Task';
|
|
134
|
+
/**
|
|
135
|
+
* The Tool (callable Verb) this task executes. This is the canonical
|
|
136
|
+
* field per CONTEXT.md. `createTask` always populates `tool`; the
|
|
137
|
+
* legacy `function` alias is also populated during the deprecation
|
|
138
|
+
* window so existing readers keep working.
|
|
139
|
+
*
|
|
140
|
+
* Optional on the type so that older literals constructed with only
|
|
141
|
+
* `function` still typecheck; in practice every Task has exactly one
|
|
142
|
+
* underlying callable Verb available via `task.tool ?? task.function`.
|
|
143
|
+
*/
|
|
144
|
+
tool?: FunctionDefinition<TInput, TOutput>;
|
|
145
|
+
/**
|
|
146
|
+
* Legacy alias for `tool`.
|
|
147
|
+
*
|
|
148
|
+
* @deprecated Use `tool` instead. The canonical name for callable
|
|
149
|
+
* Verbs is **Tool** (see CONTEXT.md). `createTask` continues to
|
|
150
|
+
* populate this alongside `tool` for the duration of the deprecation
|
|
151
|
+
* window. Slated for removal in the next major version.
|
|
152
|
+
*/
|
|
153
|
+
function?: FunctionDefinition<TInput, TOutput>;
|
|
154
|
+
/** Issue title (short, single-line) */
|
|
155
|
+
title?: string;
|
|
156
|
+
/** Rich markdown body / description */
|
|
157
|
+
body?: string;
|
|
158
|
+
/** GitHub-issue-shaped labels */
|
|
159
|
+
labels?: string[];
|
|
160
|
+
/** Milestone or project reference (string ref; cf. `projectId` for
|
|
161
|
+
* the durable internal id when a `Project` exists in this package). */
|
|
162
|
+
project?: string;
|
|
163
|
+
/** Comments posted on this task (child Actions of verb 'commented') */
|
|
164
|
+
comments?: Comment[];
|
|
165
|
+
/** Workers assigned to this task */
|
|
166
|
+
assignees?: WorkerRef[];
|
|
167
|
+
/** Current task status (specialization — see jsdoc above) */
|
|
168
|
+
status: TaskStatus;
|
|
169
|
+
/** Priority level */
|
|
170
|
+
priority: TaskPriority;
|
|
171
|
+
/** Input value (resolved from function.args) */
|
|
172
|
+
input?: TInput;
|
|
173
|
+
/** Output value (when completed) */
|
|
174
|
+
output?: TOutput;
|
|
175
|
+
/** Error (when failed) */
|
|
176
|
+
error?: string;
|
|
177
|
+
/** Worker types permitted to claim this task */
|
|
178
|
+
allowedWorkers?: WorkerType[];
|
|
179
|
+
/** Current assignment (single primary worker) */
|
|
180
|
+
assignment?: TaskAssignment;
|
|
181
|
+
/** Task dependencies */
|
|
182
|
+
dependencies?: TaskDependency[];
|
|
183
|
+
/** Current progress */
|
|
184
|
+
progress?: TaskProgress;
|
|
185
|
+
/** Scheduled start time */
|
|
186
|
+
scheduledFor?: Date;
|
|
187
|
+
/** Deadline */
|
|
188
|
+
deadline?: Date;
|
|
189
|
+
/** When started */
|
|
190
|
+
startedAt?: Date;
|
|
191
|
+
/** Timeout in ms */
|
|
192
|
+
timeout?: number;
|
|
193
|
+
/** Parent task ID */
|
|
194
|
+
parentId?: string;
|
|
195
|
+
/** Project ID (internal `Project.id` when this Task belongs to a
|
|
196
|
+
* Project in this package; distinct from `project` ref string) */
|
|
197
|
+
projectId?: string;
|
|
198
|
+
/** Tags */
|
|
199
|
+
tags?: string[];
|
|
200
|
+
/** Custom metadata */
|
|
201
|
+
metadata?: Record<string, unknown>;
|
|
202
|
+
/** Event history */
|
|
203
|
+
events?: TaskEvent[];
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* Task dependency tuple — minimal shape from the SVO design doc.
|
|
207
|
+
*
|
|
208
|
+
* `TaskDependency` (above) is the richer in-package shape with a
|
|
209
|
+
* full DependencyType set; `TaskDep` is the issue-shaped pair from
|
|
210
|
+
* the design doc, retained as a convenience export.
|
|
211
|
+
*/
|
|
212
|
+
export interface TaskDep {
|
|
213
|
+
taskId: string;
|
|
214
|
+
type: 'blocked_by' | 'related';
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Any task (for collections)
|
|
218
|
+
*/
|
|
219
|
+
export type AnyTask = Task<any, any>;
|
|
220
|
+
/**
|
|
221
|
+
* Create task from a Code function
|
|
222
|
+
*/
|
|
223
|
+
export interface CodeTaskOptions<TInput = unknown, TOutput = unknown> {
|
|
224
|
+
/** Tool (callable Verb) to run. Preferred over `function`. */
|
|
225
|
+
tool?: CodeFunctionDefinition<TInput, TOutput>;
|
|
226
|
+
/** @deprecated Use `tool` instead. */
|
|
227
|
+
function?: CodeFunctionDefinition<TInput, TOutput>;
|
|
228
|
+
input?: TInput;
|
|
229
|
+
priority?: TaskPriority;
|
|
230
|
+
assignTo?: WorkerRef;
|
|
231
|
+
dependencies?: string[];
|
|
232
|
+
deadline?: Date;
|
|
233
|
+
tags?: string[];
|
|
234
|
+
parentId?: string;
|
|
235
|
+
projectId?: string;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Create task from a Generative function
|
|
239
|
+
*/
|
|
240
|
+
export interface GenerativeTaskOptions<TInput = unknown, TOutput = unknown> {
|
|
241
|
+
/** Tool (callable Verb) to run. Preferred over `function`. */
|
|
242
|
+
tool?: GenerativeFunctionDefinition<TInput, TOutput>;
|
|
243
|
+
/** @deprecated Use `tool` instead. */
|
|
244
|
+
function?: GenerativeFunctionDefinition<TInput, TOutput>;
|
|
245
|
+
input?: TInput;
|
|
246
|
+
priority?: TaskPriority;
|
|
247
|
+
assignTo?: WorkerRef;
|
|
248
|
+
dependencies?: string[];
|
|
249
|
+
deadline?: Date;
|
|
250
|
+
tags?: string[];
|
|
251
|
+
parentId?: string;
|
|
252
|
+
projectId?: string;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Create task from an Agentic function
|
|
256
|
+
*/
|
|
257
|
+
export interface AgenticTaskOptions<TInput = unknown, TOutput = unknown> {
|
|
258
|
+
/** Tool (callable Verb) to run. Preferred over `function`. */
|
|
259
|
+
tool?: AgenticFunctionDefinition<TInput, TOutput>;
|
|
260
|
+
/** @deprecated Use `tool` instead. */
|
|
261
|
+
function?: AgenticFunctionDefinition<TInput, TOutput>;
|
|
262
|
+
input?: TInput;
|
|
263
|
+
priority?: TaskPriority;
|
|
264
|
+
assignTo?: WorkerRef;
|
|
265
|
+
dependencies?: string[];
|
|
266
|
+
deadline?: Date;
|
|
267
|
+
tags?: string[];
|
|
268
|
+
parentId?: string;
|
|
269
|
+
projectId?: string;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Create task from a Human function
|
|
273
|
+
*/
|
|
274
|
+
export interface HumanTaskOptions<TInput = unknown, TOutput = unknown> {
|
|
275
|
+
/** Tool (callable Verb) to run. Preferred over `function`. */
|
|
276
|
+
tool?: HumanFunctionDefinition<TInput, TOutput>;
|
|
277
|
+
/** @deprecated Use `tool` instead. */
|
|
278
|
+
function?: HumanFunctionDefinition<TInput, TOutput>;
|
|
279
|
+
input?: TInput;
|
|
280
|
+
priority?: TaskPriority;
|
|
281
|
+
assignTo?: WorkerRef;
|
|
282
|
+
dependencies?: string[];
|
|
283
|
+
deadline?: Date;
|
|
284
|
+
tags?: string[];
|
|
285
|
+
parentId?: string;
|
|
286
|
+
projectId?: string;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Generic task creation options
|
|
290
|
+
*
|
|
291
|
+
* Either `tool` (preferred) or the deprecated `function` alias must be
|
|
292
|
+
* provided. `createTask` normalizes to `tool` and also populates the
|
|
293
|
+
* legacy `function` alias on the resulting Task for backward compat.
|
|
294
|
+
*/
|
|
295
|
+
export interface CreateTaskOptions<TInput = unknown, TOutput = unknown> {
|
|
296
|
+
/** Tool (callable Verb) to run. Preferred over `function`. */
|
|
297
|
+
tool?: FunctionDefinition<TInput, TOutput>;
|
|
298
|
+
/** @deprecated Use `tool` instead. */
|
|
299
|
+
function?: FunctionDefinition<TInput, TOutput>;
|
|
300
|
+
input?: TInput;
|
|
301
|
+
priority?: TaskPriority;
|
|
302
|
+
allowedWorkers?: WorkerType[];
|
|
303
|
+
assignTo?: WorkerRef;
|
|
304
|
+
/** Multiple assignees (issue-shaped); first becomes the primary `assignment` */
|
|
305
|
+
assignees?: WorkerRef[];
|
|
306
|
+
dependencies?: string[];
|
|
307
|
+
scheduledFor?: Date;
|
|
308
|
+
deadline?: Date;
|
|
309
|
+
timeout?: number;
|
|
310
|
+
tags?: string[];
|
|
311
|
+
parentId?: string;
|
|
312
|
+
projectId?: string;
|
|
313
|
+
metadata?: Record<string, unknown>;
|
|
314
|
+
/** Issue title (short, single-line) */
|
|
315
|
+
title?: string;
|
|
316
|
+
/** Rich markdown body / description */
|
|
317
|
+
body?: string;
|
|
318
|
+
/** GitHub-issue-shaped labels */
|
|
319
|
+
labels?: string[];
|
|
320
|
+
/** Milestone or project ref string */
|
|
321
|
+
project?: string;
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Task update options
|
|
325
|
+
*/
|
|
326
|
+
export interface UpdateTaskOptions {
|
|
327
|
+
status?: TaskStatus;
|
|
328
|
+
progress?: Partial<TaskProgress>;
|
|
329
|
+
assignment?: TaskAssignment;
|
|
330
|
+
priority?: TaskPriority;
|
|
331
|
+
event?: Omit<TaskEvent, 'id' | 'timestamp'>;
|
|
332
|
+
metadata?: Record<string, unknown>;
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Task query options
|
|
336
|
+
*/
|
|
337
|
+
export interface TaskQuery {
|
|
338
|
+
status?: TaskStatus | TaskStatus[];
|
|
339
|
+
priority?: TaskPriority | TaskPriority[];
|
|
340
|
+
functionType?: 'code' | 'generative' | 'agentic' | 'human';
|
|
341
|
+
assignedTo?: string;
|
|
342
|
+
tags?: string[];
|
|
343
|
+
projectId?: string;
|
|
344
|
+
parentId?: string;
|
|
345
|
+
search?: string;
|
|
346
|
+
sortBy?: 'createdAt' | 'priority' | 'deadline' | 'status';
|
|
347
|
+
sortOrder?: 'asc' | 'desc';
|
|
348
|
+
limit?: number;
|
|
349
|
+
offset?: number;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Task queue options
|
|
353
|
+
*/
|
|
354
|
+
export interface TaskQueueOptions {
|
|
355
|
+
name?: string;
|
|
356
|
+
concurrency?: number;
|
|
357
|
+
defaultTimeout?: number;
|
|
358
|
+
persistent?: boolean;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Task queue interface
|
|
362
|
+
*/
|
|
363
|
+
export interface TaskQueue {
|
|
364
|
+
add(task: AnyTask): Promise<void>;
|
|
365
|
+
get(id: string): Promise<AnyTask | undefined>;
|
|
366
|
+
update(id: string, options: UpdateTaskOptions): Promise<AnyTask | undefined>;
|
|
367
|
+
remove(id: string): Promise<boolean>;
|
|
368
|
+
query(options: TaskQuery): Promise<AnyTask[]>;
|
|
369
|
+
getNextForWorker(worker: WorkerRef): Promise<AnyTask | undefined>;
|
|
370
|
+
claim(taskId: string, worker: WorkerRef): Promise<boolean>;
|
|
371
|
+
complete(taskId: string, output: unknown): Promise<void>;
|
|
372
|
+
fail(taskId: string, error: string): Promise<void>;
|
|
373
|
+
stats(): Promise<TaskQueueStats>;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Task queue stats
|
|
377
|
+
*/
|
|
378
|
+
export interface TaskQueueStats {
|
|
379
|
+
total: number;
|
|
380
|
+
byStatus: Record<TaskStatus, number>;
|
|
381
|
+
byPriority: Record<TaskPriority, number>;
|
|
382
|
+
byFunctionType?: Record<string, number>;
|
|
383
|
+
avgWaitTime?: number;
|
|
384
|
+
avgCompletionTime?: number;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Task execution result
|
|
388
|
+
*/
|
|
389
|
+
export interface TaskResult<TOutput = unknown> {
|
|
390
|
+
taskId: string;
|
|
391
|
+
success: boolean;
|
|
392
|
+
output?: TOutput;
|
|
393
|
+
error?: {
|
|
394
|
+
code: string;
|
|
395
|
+
message: string;
|
|
396
|
+
details?: unknown;
|
|
397
|
+
};
|
|
398
|
+
metadata?: {
|
|
399
|
+
duration: number;
|
|
400
|
+
startedAt: Date;
|
|
401
|
+
completedAt: Date;
|
|
402
|
+
worker?: WorkerRef;
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EACV,kBAAkB,EAClB,sBAAsB,EACtB,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAi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AS,CAAA;KACnB,CAAA;CACF"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for digital-tasks
|
|
3
|
+
*
|
|
4
|
+
* Task = Action + issue-shaped metadata (title, body, comments, labels,
|
|
5
|
+
* dependencies, assignees, project). A Task is a specialization of an
|
|
6
|
+
* `Action` (`digital-objects.Action`) with project-management overlay,
|
|
7
|
+
* per the SVO co-design (`docs/plans/2026-05-05-svo-co-design.md`).
|
|
8
|
+
*
|
|
9
|
+
* Every task wraps a callable Verb — historically the `function` field
|
|
10
|
+
* (an `ai-functions.FunctionDefinition`). Per CONTEXT.md the canonical
|
|
11
|
+
* name for callable Verbs is **Tool**; `function` is being renamed to
|
|
12
|
+
* `tool` over time. See the `function` / `tool` fields below.
|
|
13
|
+
*
|
|
14
|
+
* The function (now Tool) can be:
|
|
15
|
+
* - Code: generates executable code
|
|
16
|
+
* - Generative: AI generates content (no tools)
|
|
17
|
+
* - Agentic: AI with tools in a loop
|
|
18
|
+
* - Human: requires human input
|
|
19
|
+
*
|
|
20
|
+
* @packageDocumentation
|
|
21
|
+
*/
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG"}
|