@cleocode/contracts 2026.4.0 → 2026.4.2
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/adapter.d.ts +60 -0
- package/dist/adapter.d.ts.map +1 -1
- package/dist/brain.d.ts +19 -0
- package/dist/brain.d.ts.map +1 -1
- package/dist/capabilities.d.ts +1 -0
- package/dist/capabilities.d.ts.map +1 -1
- package/dist/conduit.d.ts +5 -0
- package/dist/conduit.d.ts.map +1 -1
- package/dist/config.d.ts +38 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/errors.d.ts +30 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +30 -0
- package/dist/errors.js.map +1 -1
- package/dist/install.d.ts +1 -1
- package/dist/install.d.ts.map +1 -1
- package/dist/lafs.d.ts +167 -11
- package/dist/lafs.d.ts.map +1 -1
- package/dist/lafs.js +57 -3
- package/dist/lafs.js.map +1 -1
- package/dist/memory.d.ts +77 -0
- package/dist/memory.d.ts.map +1 -1
- package/dist/operations/issues.d.ts +1 -1
- package/dist/operations/issues.d.ts.map +1 -1
- package/dist/operations/session.d.ts +1 -1
- package/dist/operations/session.js +1 -1
- package/dist/operations/tasks.d.ts +1 -1
- package/dist/operations/tasks.js +1 -1
- package/dist/results.d.ts +89 -0
- package/dist/results.d.ts.map +1 -1
- package/dist/session.d.ts +78 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +5 -0
- package/dist/session.js.map +1 -1
- package/dist/status-registry.d.ts +1 -1
- package/dist/status-registry.js +1 -1
- package/dist/task.d.ts +106 -33
- package/dist/task.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/adapter.ts +60 -0
- package/src/brain.ts +19 -0
- package/src/capabilities.ts +1 -0
- package/src/conduit.ts +3 -0
- package/src/config.ts +38 -3
- package/src/errors.ts +30 -0
- package/src/install.ts +1 -1
- package/src/lafs.ts +169 -13
- package/src/memory.ts +77 -0
- package/src/operations/issues.ts +1 -1
- package/src/operations/session.ts +1 -1
- package/src/operations/tasks.ts +1 -1
- package/src/results.ts +89 -0
- package/src/session.ts +78 -0
- package/src/status-registry.ts +1 -1
- package/src/task.ts +106 -33
package/dist/task.d.ts
CHANGED
|
@@ -38,32 +38,54 @@ export type VerificationAgent = 'planner' | 'coder' | 'testing' | 'qa' | 'cleanu
|
|
|
38
38
|
export type VerificationGate = 'implemented' | 'testsPassed' | 'qaPassed' | 'cleanupDone' | 'securityPassed' | 'documented';
|
|
39
39
|
/** Verification failure log entry. */
|
|
40
40
|
export interface VerificationFailure {
|
|
41
|
+
/** Verification round number when the failure occurred. */
|
|
41
42
|
round: number;
|
|
43
|
+
/** Agent that performed the verification and reported the failure. */
|
|
42
44
|
agent: string;
|
|
45
|
+
/** Human-readable description of why verification failed. */
|
|
43
46
|
reason: string;
|
|
47
|
+
/** ISO 8601 timestamp of when the failure was recorded. */
|
|
44
48
|
timestamp: string;
|
|
45
49
|
}
|
|
46
50
|
/** Task verification state. */
|
|
47
51
|
export interface TaskVerification {
|
|
52
|
+
/** Whether all required verification gates have passed. */
|
|
48
53
|
passed: boolean;
|
|
54
|
+
/** Current verification round number (starts at 1). */
|
|
49
55
|
round: number;
|
|
56
|
+
/** Gate pass/fail/pending status for each verification gate. */
|
|
50
57
|
gates: Partial<Record<VerificationGate, boolean | null>>;
|
|
58
|
+
/** The last agent that performed a verification check, or `null`. */
|
|
51
59
|
lastAgent: VerificationAgent | null;
|
|
60
|
+
/** ISO 8601 timestamp of the most recent verification update, or `null`. */
|
|
52
61
|
lastUpdated: string | null;
|
|
62
|
+
/** Ordered log of all verification failures across rounds. */
|
|
53
63
|
failureLog: VerificationFailure[];
|
|
54
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* ISO timestamp set when verification was first initialized on task creation (T061).
|
|
66
|
+
* @defaultValue undefined
|
|
67
|
+
*/
|
|
55
68
|
initializedAt?: string | null;
|
|
56
69
|
}
|
|
57
70
|
/** Task provenance tracking. */
|
|
58
71
|
export interface TaskProvenance {
|
|
72
|
+
/** Agent or user that created this task, or `null` if unknown. */
|
|
59
73
|
createdBy: string | null;
|
|
74
|
+
/** Agent or user that last modified this task, or `null` if unknown. */
|
|
60
75
|
modifiedBy: string | null;
|
|
76
|
+
/** Session ID during which this task was created, or `null`. */
|
|
61
77
|
sessionId: string | null;
|
|
62
78
|
}
|
|
63
79
|
/** A single task relation entry. */
|
|
64
80
|
export interface TaskRelation {
|
|
81
|
+
/** ID of the related task. */
|
|
65
82
|
taskId: string;
|
|
83
|
+
/** Relation type (e.g. `"blocks"`, `"related-to"`, `"duplicates"`). */
|
|
66
84
|
type: string;
|
|
85
|
+
/**
|
|
86
|
+
* Optional reason explaining the relationship.
|
|
87
|
+
* @defaultValue undefined
|
|
88
|
+
*/
|
|
67
89
|
reason?: string;
|
|
68
90
|
}
|
|
69
91
|
/**
|
|
@@ -87,60 +109,66 @@ export interface Task {
|
|
|
87
109
|
status: TaskStatus;
|
|
88
110
|
/** Task priority level. Defaults to `'medium'` on creation. */
|
|
89
111
|
priority: TaskPriority;
|
|
90
|
-
/** Task type in hierarchy. Inferred from parent context if not specified. */
|
|
112
|
+
/** Task type in hierarchy. Inferred from parent context if not specified. @defaultValue undefined */
|
|
91
113
|
type?: TaskType;
|
|
92
|
-
/** ID of the parent task. `null` for root-level tasks. */
|
|
114
|
+
/** ID of the parent task. `null` for root-level tasks. @defaultValue undefined */
|
|
93
115
|
parentId?: string | null;
|
|
94
|
-
/** Sort position within sibling scope. */
|
|
116
|
+
/** Sort position within sibling scope. @defaultValue undefined */
|
|
95
117
|
position?: number | null;
|
|
96
|
-
/** Optimistic concurrency version for position changes. */
|
|
118
|
+
/** Optimistic concurrency version for position changes. @defaultValue undefined */
|
|
97
119
|
positionVersion?: number;
|
|
98
|
-
/** Relative scope sizing (small/medium/large). NOT a time estimate. */
|
|
120
|
+
/** Relative scope sizing (small/medium/large). NOT a time estimate. @defaultValue undefined */
|
|
99
121
|
size?: TaskSize | null;
|
|
100
|
-
/** Phase slug this task belongs to. */
|
|
122
|
+
/** Phase slug this task belongs to. @defaultValue undefined */
|
|
101
123
|
phase?: string;
|
|
102
|
-
/** File paths associated with this task. */
|
|
124
|
+
/** File paths associated with this task. @defaultValue undefined */
|
|
103
125
|
files?: string[];
|
|
104
|
-
/** Acceptance criteria for completion. */
|
|
126
|
+
/** Acceptance criteria for completion. @defaultValue undefined */
|
|
105
127
|
acceptance?: string[];
|
|
106
|
-
/** IDs of tasks this task depends on. */
|
|
128
|
+
/** IDs of tasks this task depends on. @defaultValue undefined */
|
|
107
129
|
depends?: string[];
|
|
108
|
-
/** Related task entries (non-dependency relationships). */
|
|
130
|
+
/** Related task entries (non-dependency relationships). @defaultValue undefined */
|
|
109
131
|
relates?: TaskRelation[];
|
|
110
|
-
/** Epic lifecycle state. Only meaningful when `type = 'epic'`. */
|
|
132
|
+
/** Epic lifecycle state. Only meaningful when `type = 'epic'`. @defaultValue undefined */
|
|
111
133
|
epicLifecycle?: EpicLifecycle | null;
|
|
112
|
-
/** When true, epic will not auto-complete when all children are done. */
|
|
134
|
+
/** When true, epic will not auto-complete when all children are done. @defaultValue undefined */
|
|
113
135
|
noAutoComplete?: boolean | null;
|
|
114
|
-
/** Reason the task is blocked (free-form text). */
|
|
136
|
+
/** Reason the task is blocked (free-form text). @defaultValue undefined */
|
|
115
137
|
blockedBy?: string;
|
|
116
|
-
/** Timestamped notes appended during task lifecycle. */
|
|
138
|
+
/** Timestamped notes appended during task lifecycle. @defaultValue undefined */
|
|
117
139
|
notes?: string[];
|
|
118
|
-
/** Classification labels for filtering and grouping. */
|
|
140
|
+
/** Classification labels for filtering and grouping. @defaultValue undefined */
|
|
119
141
|
labels?: string[];
|
|
120
|
-
/** Task origin/provenance category. */
|
|
142
|
+
/** Task origin/provenance category. @defaultValue undefined */
|
|
121
143
|
origin?: TaskOrigin | null;
|
|
122
144
|
/** ISO 8601 timestamp of task creation. Must not be in the future. */
|
|
123
145
|
createdAt: string;
|
|
124
|
-
/** ISO 8601 timestamp of last update. Set automatically on mutation. */
|
|
146
|
+
/** ISO 8601 timestamp of last update. Set automatically on mutation. @defaultValue undefined */
|
|
125
147
|
updatedAt?: string | null;
|
|
126
148
|
/**
|
|
127
149
|
* ISO 8601 timestamp of task completion. Set when `status` transitions to `'done'`.
|
|
128
150
|
* See {@link CompletedTask} for the status-narrowed type where this is required.
|
|
151
|
+
*
|
|
152
|
+
* @defaultValue undefined
|
|
129
153
|
*/
|
|
130
154
|
completedAt?: string;
|
|
131
155
|
/**
|
|
132
156
|
* ISO 8601 timestamp of task cancellation. Set when `status` transitions to `'cancelled'`.
|
|
133
157
|
* See {@link CancelledTask} for the status-narrowed type where this is required.
|
|
158
|
+
*
|
|
159
|
+
* @defaultValue undefined
|
|
134
160
|
*/
|
|
135
161
|
cancelledAt?: string;
|
|
136
162
|
/**
|
|
137
163
|
* Reason for cancellation. Required when `status = 'cancelled'`.
|
|
138
164
|
* See {@link CancelledTask} for the status-narrowed type where this is required.
|
|
165
|
+
*
|
|
166
|
+
* @defaultValue undefined
|
|
139
167
|
*/
|
|
140
168
|
cancellationReason?: string;
|
|
141
|
-
/** Verification pipeline state. */
|
|
169
|
+
/** Verification pipeline state. @defaultValue undefined */
|
|
142
170
|
verification?: TaskVerification | null;
|
|
143
|
-
/** Provenance tracking (who created/modified, which session). */
|
|
171
|
+
/** Provenance tracking (who created/modified, which session). @defaultValue undefined */
|
|
144
172
|
provenance?: TaskProvenance | null;
|
|
145
173
|
/**
|
|
146
174
|
* RCASD-IVTR+C pipeline stage this task is associated with.
|
|
@@ -150,9 +178,10 @@ export interface Task {
|
|
|
150
178
|
*
|
|
151
179
|
* Auto-assigned on creation; only moves forward through stages.
|
|
152
180
|
* @task T060
|
|
181
|
+
* @defaultValue undefined
|
|
153
182
|
*/
|
|
154
183
|
pipelineStage?: string | null;
|
|
155
|
-
/** Agent ID that has claimed/is assigned to this task. Null when unclaimed. */
|
|
184
|
+
/** Agent ID that has claimed/is assigned to this task. Null when unclaimed. @defaultValue undefined */
|
|
156
185
|
assignee?: string | null;
|
|
157
186
|
}
|
|
158
187
|
/**
|
|
@@ -173,29 +202,29 @@ export interface TaskCreate {
|
|
|
173
202
|
* without a description, and require it to differ from the title.
|
|
174
203
|
*/
|
|
175
204
|
description: string;
|
|
176
|
-
/** Initial status. Defaults to `'pending'`. */
|
|
205
|
+
/** Initial status. Defaults to `'pending'`. @defaultValue 'pending' */
|
|
177
206
|
status?: TaskStatus;
|
|
178
|
-
/** Priority level. Defaults to `'medium'`. */
|
|
207
|
+
/** Priority level. Defaults to `'medium'`. @defaultValue 'medium' */
|
|
179
208
|
priority?: TaskPriority;
|
|
180
|
-
/** Task type. Inferred from parent context if not specified. */
|
|
209
|
+
/** Task type. Inferred from parent context if not specified. @defaultValue undefined */
|
|
181
210
|
type?: TaskType;
|
|
182
|
-
/** Parent task ID for hierarchy placement. */
|
|
211
|
+
/** Parent task ID for hierarchy placement. @defaultValue undefined */
|
|
183
212
|
parentId?: string | null;
|
|
184
|
-
/** Relative scope sizing. Defaults to `'medium'`. */
|
|
213
|
+
/** Relative scope sizing. Defaults to `'medium'`. @defaultValue 'medium' */
|
|
185
214
|
size?: TaskSize;
|
|
186
|
-
/** Phase slug to assign. Inherited from project.currentPhase if not specified. */
|
|
215
|
+
/** Phase slug to assign. Inherited from project.currentPhase if not specified. @defaultValue undefined */
|
|
187
216
|
phase?: string;
|
|
188
|
-
/** Classification labels. */
|
|
217
|
+
/** Classification labels. @defaultValue undefined */
|
|
189
218
|
labels?: string[];
|
|
190
|
-
/** File paths associated with this task. */
|
|
219
|
+
/** File paths associated with this task. @defaultValue undefined */
|
|
191
220
|
files?: string[];
|
|
192
|
-
/** Acceptance criteria. */
|
|
221
|
+
/** Acceptance criteria. @defaultValue undefined */
|
|
193
222
|
acceptance?: string[];
|
|
194
|
-
/** IDs of tasks this task depends on. */
|
|
223
|
+
/** IDs of tasks this task depends on. @defaultValue undefined */
|
|
195
224
|
depends?: string[];
|
|
196
|
-
/** Initial note to attach. */
|
|
225
|
+
/** Initial note to attach. @defaultValue undefined */
|
|
197
226
|
notes?: string;
|
|
198
|
-
/** Sort position. Auto-calculated if not specified. */
|
|
227
|
+
/** Sort position. Auto-calculated if not specified. @defaultValue undefined */
|
|
199
228
|
position?: number;
|
|
200
229
|
}
|
|
201
230
|
/**
|
|
@@ -229,69 +258,113 @@ export type CancelledTask = Task & {
|
|
|
229
258
|
export type PhaseStatus = 'pending' | 'active' | 'completed';
|
|
230
259
|
/** Phase definition. */
|
|
231
260
|
export interface Phase {
|
|
261
|
+
/** Sort order of this phase in the project lifecycle. */
|
|
232
262
|
order: number;
|
|
263
|
+
/** Human-readable phase name. */
|
|
233
264
|
name: string;
|
|
265
|
+
/** Phase description. @defaultValue undefined */
|
|
234
266
|
description?: string;
|
|
267
|
+
/** Current phase lifecycle status. */
|
|
235
268
|
status: PhaseStatus;
|
|
269
|
+
/** ISO 8601 timestamp of when the phase started. @defaultValue undefined */
|
|
236
270
|
startedAt?: string | null;
|
|
271
|
+
/** ISO 8601 timestamp of when the phase completed. @defaultValue undefined */
|
|
237
272
|
completedAt?: string | null;
|
|
238
273
|
}
|
|
239
274
|
/** Phase transition record. */
|
|
240
275
|
export interface PhaseTransition {
|
|
276
|
+
/** Slug of the phase that transitioned. */
|
|
241
277
|
phase: string;
|
|
278
|
+
/** Type of transition that occurred. */
|
|
242
279
|
transitionType: 'started' | 'completed' | 'rollback';
|
|
280
|
+
/** ISO 8601 timestamp of the transition. */
|
|
243
281
|
timestamp: string;
|
|
282
|
+
/** Number of tasks in the phase at transition time. */
|
|
244
283
|
taskCount: number;
|
|
284
|
+
/** Previous phase slug for rollback transitions. @defaultValue undefined */
|
|
245
285
|
fromPhase?: string | null;
|
|
286
|
+
/** Optional reason for the transition. @defaultValue undefined */
|
|
246
287
|
reason?: string;
|
|
247
288
|
}
|
|
248
289
|
/** Release status. */
|
|
249
290
|
export type ReleaseStatus = 'planned' | 'active' | 'released';
|
|
250
291
|
/** Release definition. */
|
|
251
292
|
export interface Release {
|
|
293
|
+
/** Semantic version string (e.g. `"v2026.4.0"`). */
|
|
252
294
|
version: string;
|
|
295
|
+
/** Current release lifecycle status. */
|
|
253
296
|
status: ReleaseStatus;
|
|
297
|
+
/** Target release date in ISO 8601. @defaultValue undefined */
|
|
254
298
|
targetDate?: string | null;
|
|
299
|
+
/** Actual release date in ISO 8601. @defaultValue undefined */
|
|
255
300
|
releasedAt?: string | null;
|
|
301
|
+
/** Task IDs included in this release. */
|
|
256
302
|
tasks: string[];
|
|
303
|
+
/** Release notes text. @defaultValue undefined */
|
|
257
304
|
notes?: string | null;
|
|
305
|
+
/** Generated changelog content. @defaultValue undefined */
|
|
258
306
|
changelog?: string | null;
|
|
259
307
|
}
|
|
260
308
|
/** Project metadata. */
|
|
261
309
|
export interface ProjectMeta {
|
|
310
|
+
/** Project name from `.cleo/project-context.json`. */
|
|
262
311
|
name: string;
|
|
312
|
+
/** Slug of the currently active phase. @defaultValue undefined */
|
|
263
313
|
currentPhase?: string | null;
|
|
314
|
+
/** Phase definitions keyed by slug. */
|
|
264
315
|
phases: Record<string, Phase>;
|
|
316
|
+
/** Ordered history of phase transitions. @defaultValue undefined */
|
|
265
317
|
phaseHistory?: PhaseTransition[];
|
|
318
|
+
/** Release definitions for the project. @defaultValue undefined */
|
|
266
319
|
releases?: Release[];
|
|
267
320
|
}
|
|
268
321
|
/** File metadata (_meta block). */
|
|
269
322
|
export interface FileMeta {
|
|
323
|
+
/** Schema version of the task data file. */
|
|
270
324
|
schemaVersion: string;
|
|
325
|
+
/** Spec version for forward compatibility. @defaultValue undefined */
|
|
271
326
|
specVersion?: string;
|
|
327
|
+
/** Integrity checksum of the data file. */
|
|
272
328
|
checksum: string;
|
|
329
|
+
/** Configuration version used when the file was last written. */
|
|
273
330
|
configVersion: string;
|
|
331
|
+
/** ID of the last session that modified this file. @defaultValue undefined */
|
|
274
332
|
lastSessionId?: string | null;
|
|
333
|
+
/** ID of the currently active session. @defaultValue undefined */
|
|
275
334
|
activeSession?: string | null;
|
|
335
|
+
/** Number of active sessions at last write. @defaultValue undefined */
|
|
276
336
|
activeSessionCount?: number;
|
|
337
|
+
/** Path to the sessions storage file. @defaultValue undefined */
|
|
277
338
|
sessionsFile?: string | null;
|
|
339
|
+
/** Monotonically increasing file generation counter. @defaultValue undefined */
|
|
278
340
|
generation?: number;
|
|
279
341
|
}
|
|
280
342
|
/** Session note in taskWork block. */
|
|
281
343
|
export interface SessionNote {
|
|
344
|
+
/** Note text content. */
|
|
282
345
|
note: string;
|
|
346
|
+
/** ISO 8601 timestamp of when the note was recorded. */
|
|
283
347
|
timestamp: string;
|
|
348
|
+
/** Conversation ID for multi-turn context. @defaultValue undefined */
|
|
284
349
|
conversationId?: string | null;
|
|
350
|
+
/** Agent that recorded this note. @defaultValue undefined */
|
|
285
351
|
agent?: string | null;
|
|
286
352
|
}
|
|
287
353
|
/** Task work state. */
|
|
288
354
|
export interface TaskWorkState {
|
|
355
|
+
/** ID of the task currently being worked on. @defaultValue undefined */
|
|
289
356
|
currentTask?: string | null;
|
|
357
|
+
/** Slug of the current project phase. @defaultValue undefined */
|
|
290
358
|
currentPhase?: string | null;
|
|
359
|
+
/** ISO 8601 timestamp until which work is blocked. @defaultValue undefined */
|
|
291
360
|
blockedUntil?: string | null;
|
|
361
|
+
/** Most recent session note (legacy, use sessionNotes). @defaultValue undefined */
|
|
292
362
|
sessionNote?: string | null;
|
|
363
|
+
/** Ordered list of session notes. @defaultValue undefined */
|
|
293
364
|
sessionNotes?: SessionNote[];
|
|
365
|
+
/** Suggested next action for the agent. @defaultValue undefined */
|
|
294
366
|
nextAction?: string | null;
|
|
367
|
+
/** ID of the primary session managing this work state. @defaultValue undefined */
|
|
295
368
|
primarySession?: string | null;
|
|
296
369
|
}
|
|
297
370
|
//# sourceMappingURL=task.d.ts.map
|
package/dist/task.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.d.ts","sourceRoot":"","s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AW,WAAW;IAC1B,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,uBAAuB;AACvB,MAAM,WAAW,aAAa;IAC5B,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,8EAA8E;IAC9E,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,6DAA6D;IAC7D,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,kFAAkF;IAClF,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC"}
|
package/package.json
CHANGED
package/src/adapter.ts
CHANGED
|
@@ -14,25 +14,85 @@ import type { AdapterSpawnProvider } from './spawn.js';
|
|
|
14
14
|
import type { ExternalTaskProvider } from './task-sync.js';
|
|
15
15
|
import type { AdapterTransportProvider } from './transport.js';
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Core provider adapter interface that every CLEO provider must implement.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Provider adapters bridge CLEO's core engine to specific LLM providers
|
|
22
|
+
* (Claude, GPT, etc.). Each adapter declares its capabilities and exposes
|
|
23
|
+
* optional sub-providers for hooks, spawning, paths, and transport.
|
|
24
|
+
*/
|
|
17
25
|
export interface CLEOProviderAdapter {
|
|
26
|
+
/** Unique identifier for this adapter (e.g. `"claude"`, `"openai"`). */
|
|
18
27
|
readonly id: string;
|
|
28
|
+
/** Human-readable display name for the adapter. */
|
|
19
29
|
readonly name: string;
|
|
30
|
+
/** Semantic version of the adapter implementation. */
|
|
20
31
|
readonly version: string;
|
|
32
|
+
/** Capability flags declaring what this adapter supports. */
|
|
21
33
|
capabilities: AdapterCapabilities;
|
|
34
|
+
/**
|
|
35
|
+
* Optional hook provider for lifecycle event integration.
|
|
36
|
+
*
|
|
37
|
+
* @defaultValue undefined
|
|
38
|
+
*/
|
|
22
39
|
hooks?: AdapterHookProvider;
|
|
40
|
+
/**
|
|
41
|
+
* Optional spawn provider for launching sub-agents.
|
|
42
|
+
*
|
|
43
|
+
* @defaultValue undefined
|
|
44
|
+
*/
|
|
23
45
|
spawn?: AdapterSpawnProvider;
|
|
46
|
+
/** Installation provider for scaffolding adapter-specific config files. */
|
|
24
47
|
install: AdapterInstallProvider;
|
|
48
|
+
/**
|
|
49
|
+
* Optional path provider for adapter-specific file locations.
|
|
50
|
+
*
|
|
51
|
+
* @defaultValue undefined
|
|
52
|
+
*/
|
|
25
53
|
paths?: AdapterPathProvider;
|
|
54
|
+
/**
|
|
55
|
+
* Optional context monitor provider for tracking token usage.
|
|
56
|
+
*
|
|
57
|
+
* @defaultValue undefined
|
|
58
|
+
*/
|
|
26
59
|
contextMonitor?: AdapterContextMonitorProvider;
|
|
60
|
+
/**
|
|
61
|
+
* Optional transport provider for inter-agent messaging.
|
|
62
|
+
*
|
|
63
|
+
* @defaultValue undefined
|
|
64
|
+
*/
|
|
27
65
|
transport?: AdapterTransportProvider;
|
|
66
|
+
/**
|
|
67
|
+
* Optional external task sync provider for bidirectional issue tracking.
|
|
68
|
+
*
|
|
69
|
+
* @defaultValue undefined
|
|
70
|
+
*/
|
|
28
71
|
taskSync?: ExternalTaskProvider;
|
|
72
|
+
/** Initialize the adapter for the given project directory. */
|
|
29
73
|
initialize(projectDir: string): Promise<void>;
|
|
74
|
+
/** Release all resources held by the adapter. */
|
|
30
75
|
dispose(): Promise<void>;
|
|
76
|
+
/** Return the current health status of the adapter. */
|
|
31
77
|
healthCheck(): Promise<AdapterHealthStatus>;
|
|
32
78
|
}
|
|
33
79
|
|
|
80
|
+
/**
|
|
81
|
+
* Health check result returned by {@link CLEOProviderAdapter.healthCheck}.
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* Used by the `cleo doctor` command to verify adapter connectivity and
|
|
85
|
+
* surface provider-specific diagnostic information.
|
|
86
|
+
*/
|
|
34
87
|
export interface AdapterHealthStatus {
|
|
88
|
+
/** Whether the adapter is currently operational. */
|
|
35
89
|
healthy: boolean;
|
|
90
|
+
/** Name of the provider this status applies to. */
|
|
36
91
|
provider: string;
|
|
92
|
+
/**
|
|
93
|
+
* Provider-specific diagnostic key-value pairs.
|
|
94
|
+
*
|
|
95
|
+
* @defaultValue undefined
|
|
96
|
+
*/
|
|
37
97
|
details?: Record<string, unknown>;
|
|
38
98
|
}
|
package/src/brain.ts
CHANGED
|
@@ -9,31 +9,50 @@
|
|
|
9
9
|
|
|
10
10
|
/** Compact brain entry reference used in contradiction analysis. */
|
|
11
11
|
export interface BrainEntryRef {
|
|
12
|
+
/** Brain.db entry identifier. */
|
|
12
13
|
id: string;
|
|
14
|
+
/** Entry type (e.g. `"observation"`, `"learning"`, `"decision"`). */
|
|
13
15
|
type: string;
|
|
16
|
+
/** Full text content of the brain entry. */
|
|
14
17
|
content: string;
|
|
18
|
+
/** ISO 8601 timestamp of when the entry was created. */
|
|
15
19
|
createdAt: string;
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
/** Brain entry reference with summary, used in superseded analysis. */
|
|
19
23
|
export interface BrainEntrySummary {
|
|
24
|
+
/** Brain.db entry identifier. */
|
|
20
25
|
id: string;
|
|
26
|
+
/** Entry type (e.g. `"observation"`, `"learning"`, `"decision"`). */
|
|
21
27
|
type: string;
|
|
28
|
+
/** ISO 8601 timestamp of when the entry was created. */
|
|
22
29
|
createdAt: string;
|
|
30
|
+
/** Truncated summary of the entry content. */
|
|
23
31
|
summary: string;
|
|
24
32
|
}
|
|
25
33
|
|
|
26
34
|
/** Contradiction detail between two brain entries. */
|
|
27
35
|
export interface ContradictionDetail {
|
|
36
|
+
/** First entry in the contradicting pair. */
|
|
28
37
|
entryA: BrainEntryRef;
|
|
38
|
+
/** Second entry in the contradicting pair. */
|
|
29
39
|
entryB: BrainEntryRef;
|
|
40
|
+
/**
|
|
41
|
+
* Additional context explaining the scope of the contradiction.
|
|
42
|
+
*
|
|
43
|
+
* @defaultValue undefined
|
|
44
|
+
*/
|
|
30
45
|
context?: string;
|
|
46
|
+
/** Description of how the two entries conflict. */
|
|
31
47
|
conflictDetails: string;
|
|
32
48
|
}
|
|
33
49
|
|
|
34
50
|
/** Superseded entry pair showing old and replacement entries. */
|
|
35
51
|
export interface SupersededEntry {
|
|
52
|
+
/** The older entry that has been superseded. */
|
|
36
53
|
oldEntry: BrainEntrySummary;
|
|
54
|
+
/** The newer entry that replaces the old one. */
|
|
37
55
|
replacement: BrainEntrySummary;
|
|
56
|
+
/** Topic or category grouping these entries together. */
|
|
38
57
|
grouping: string;
|
|
39
58
|
}
|
package/src/capabilities.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface AdapterCapabilities {
|
|
|
9
9
|
supportedHookEvents: string[];
|
|
10
10
|
supportsSpawn: boolean;
|
|
11
11
|
supportsInstall: boolean;
|
|
12
|
+
/** Always false. CLI is the only dispatch channel. */
|
|
12
13
|
supportsMcp: boolean;
|
|
13
14
|
supportsInstructionFiles: boolean;
|
|
14
15
|
/** Provider-specific instruction file name, e.g. "CLAUDE.md", ".cursorrules" */
|
package/src/conduit.ts
CHANGED
|
@@ -109,6 +109,9 @@ export interface Conduit {
|
|
|
109
109
|
/** Subscribe to incoming messages. Returns unsubscribe function. */
|
|
110
110
|
onMessage(handler: (message: ConduitMessage) => void): ConduitUnsubscribe;
|
|
111
111
|
|
|
112
|
+
/** One-shot poll for new messages. Returns messages without subscribing. */
|
|
113
|
+
poll(options?: { limit?: number; since?: string }): Promise<ConduitMessage[]>;
|
|
114
|
+
|
|
112
115
|
// --- Presence ---
|
|
113
116
|
|
|
114
117
|
/** Send a heartbeat to indicate this agent is alive. */
|
package/src/config.ts
CHANGED
|
@@ -17,17 +17,25 @@ export type DateFormat = 'relative' | 'iso' | 'short' | 'long';
|
|
|
17
17
|
|
|
18
18
|
/** Output configuration. */
|
|
19
19
|
export interface OutputConfig {
|
|
20
|
+
/** Default output format for CLI responses. */
|
|
20
21
|
defaultFormat: OutputFormat;
|
|
22
|
+
/** Whether to use ANSI color codes in terminal output. */
|
|
21
23
|
showColor: boolean;
|
|
24
|
+
/** Whether to use Unicode symbols (checkmarks, arrows) in output. */
|
|
22
25
|
showUnicode: boolean;
|
|
26
|
+
/** Whether to display progress bars for long-running operations. */
|
|
23
27
|
showProgressBars: boolean;
|
|
28
|
+
/** Date display format for timestamps in output. */
|
|
24
29
|
dateFormat: DateFormat;
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
/** Backup configuration. */
|
|
28
33
|
export interface BackupConfig {
|
|
34
|
+
/** Maximum number of operational backups to retain during normal operations. */
|
|
29
35
|
maxOperationalBackups: number;
|
|
36
|
+
/** Maximum number of safety backups to retain for disaster recovery. */
|
|
30
37
|
maxSafetyBackups: number;
|
|
38
|
+
/** Whether to compress backup files to reduce disk usage. */
|
|
31
39
|
compressionEnabled: boolean;
|
|
32
40
|
}
|
|
33
41
|
|
|
@@ -36,8 +44,11 @@ export type EnforcementProfile = 'llm-agent-first' | 'human-cognitive' | 'custom
|
|
|
36
44
|
|
|
37
45
|
/** Hierarchy configuration. */
|
|
38
46
|
export interface HierarchyConfig {
|
|
47
|
+
/** Maximum nesting depth for task hierarchy (epic > task > subtask). */
|
|
39
48
|
maxDepth: number;
|
|
49
|
+
/** Maximum number of sibling tasks under a single parent. */
|
|
40
50
|
maxSiblings: number;
|
|
51
|
+
/** Whether deleting a parent cascades to all descendant tasks. */
|
|
41
52
|
cascadeDelete: boolean;
|
|
42
53
|
/** Maximum number of active (non-done) siblings. 0 = disabled. */
|
|
43
54
|
maxActiveSiblings: number;
|
|
@@ -49,8 +60,11 @@ export interface HierarchyConfig {
|
|
|
49
60
|
|
|
50
61
|
/** Session configuration. */
|
|
51
62
|
export interface SessionConfig {
|
|
63
|
+
/** Whether to auto-start a session on first mutate operation. */
|
|
52
64
|
autoStart: boolean;
|
|
65
|
+
/** Whether session end requires at least one note. */
|
|
53
66
|
requireNotes: boolean;
|
|
67
|
+
/** Whether multiple concurrent sessions are allowed. */
|
|
54
68
|
multiSession: boolean;
|
|
55
69
|
}
|
|
56
70
|
|
|
@@ -115,6 +129,7 @@ export type LifecycleEnforcementMode = 'strict' | 'advisory' | 'off';
|
|
|
115
129
|
|
|
116
130
|
/** Lifecycle enforcement configuration. */
|
|
117
131
|
export interface LifecycleConfig {
|
|
132
|
+
/** Enforcement mode controlling how lifecycle rules are applied. */
|
|
118
133
|
mode: LifecycleEnforcementMode;
|
|
119
134
|
}
|
|
120
135
|
|
|
@@ -184,7 +199,7 @@ export interface BrainConfig {
|
|
|
184
199
|
autoCapture: boolean;
|
|
185
200
|
/** Whether to capture file change events (default: false). */
|
|
186
201
|
captureFiles: boolean;
|
|
187
|
-
/**
|
|
202
|
+
/** Unused. CLI dispatch only. */
|
|
188
203
|
captureMcp: boolean;
|
|
189
204
|
/** Whether to capture active-work dispatch mutations (tasks.add, tasks.update) (default: false). */
|
|
190
205
|
captureWork: boolean;
|
|
@@ -232,19 +247,37 @@ export interface SignalDockConfig {
|
|
|
232
247
|
|
|
233
248
|
/** CLEO project configuration (config.json). */
|
|
234
249
|
export interface CleoConfig {
|
|
250
|
+
/** Configuration schema version string. */
|
|
235
251
|
version: string;
|
|
252
|
+
/** Output formatting preferences. */
|
|
236
253
|
output: OutputConfig;
|
|
254
|
+
/** Database backup retention and compression settings. */
|
|
237
255
|
backup: BackupConfig;
|
|
256
|
+
/** Task hierarchy depth and sibling constraints. */
|
|
238
257
|
hierarchy: HierarchyConfig;
|
|
258
|
+
/** Session auto-start and multi-session policies. */
|
|
239
259
|
session: SessionConfig;
|
|
260
|
+
/** Acceptance criteria and session enforcement rules. */
|
|
240
261
|
enforcement: EnforcementConfig;
|
|
262
|
+
/** Verification gate pipeline settings. */
|
|
241
263
|
verification: VerificationConfig;
|
|
264
|
+
/** Task lifecycle enforcement mode. */
|
|
242
265
|
lifecycle: LifecycleConfig;
|
|
266
|
+
/** Log level, rotation, and audit retention settings. */
|
|
243
267
|
logging: LoggingConfig;
|
|
268
|
+
/** Multi-contributor `.cleo/` state sharing settings. */
|
|
244
269
|
sharing: SharingConfig;
|
|
245
|
-
/**
|
|
270
|
+
/**
|
|
271
|
+
* SignalDock inter-agent transport (optional, disabled by default).
|
|
272
|
+
*
|
|
273
|
+
* @defaultValue undefined
|
|
274
|
+
*/
|
|
246
275
|
signaldock?: SignalDockConfig;
|
|
247
|
-
/**
|
|
276
|
+
/**
|
|
277
|
+
* Brain memory system configuration (optional, uses defaults when absent).
|
|
278
|
+
*
|
|
279
|
+
* @defaultValue undefined
|
|
280
|
+
*/
|
|
248
281
|
brain?: BrainConfig;
|
|
249
282
|
}
|
|
250
283
|
|
|
@@ -253,6 +286,8 @@ export type ConfigSource = 'cli' | 'env' | 'project' | 'global' | 'default';
|
|
|
253
286
|
|
|
254
287
|
/** A resolved config value with its source. */
|
|
255
288
|
export interface ResolvedValue<T> {
|
|
289
|
+
/** The resolved configuration value. */
|
|
256
290
|
value: T;
|
|
291
|
+
/** Where this value was resolved from in the cascade. */
|
|
257
292
|
source: ConfigSource;
|
|
258
293
|
}
|