cccc-sdk 0.4.3 → 0.4.40
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/README.md +303 -17
- package/dist/client.d.ts +88 -95
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +716 -270
- package/dist/client.js.map +1 -1
- package/dist/client_0430_admin_ops.d.ts +56 -0
- package/dist/client_0430_admin_ops.d.ts.map +1 -0
- package/dist/client_0430_admin_ops.js +143 -0
- package/dist/client_0430_admin_ops.js.map +1 -0
- package/dist/client_0430_assistant_ops.d.ts +106 -0
- package/dist/client_0430_assistant_ops.d.ts.map +1 -0
- package/dist/client_0430_assistant_ops.js +122 -0
- package/dist/client_0430_assistant_ops.js.map +1 -0
- package/dist/client_0430_memory_ops.d.ts +14 -0
- package/dist/client_0430_memory_ops.d.ts.map +1 -0
- package/dist/client_0430_memory_ops.js +84 -0
- package/dist/client_0430_memory_ops.js.map +1 -0
- package/dist/client_0430_ops.d.ts +8 -0
- package/dist/client_0430_ops.d.ts.map +1 -0
- package/dist/client_0430_ops.js +9 -0
- package/dist/client_0430_ops.js.map +1 -0
- package/dist/client_0430_shared.d.ts +15 -0
- package/dist/client_0430_shared.d.ts.map +1 -0
- package/dist/client_0430_shared.js +4 -0
- package/dist/client_0430_shared.js.map +1 -0
- package/dist/client_0434_ops.d.ts +10 -0
- package/dist/client_0434_ops.d.ts.map +1 -0
- package/dist/client_0434_ops.js +43 -0
- package/dist/client_0434_ops.js.map +1 -0
- package/dist/client_chat_ops.d.ts +28 -0
- package/dist/client_chat_ops.d.ts.map +1 -0
- package/dist/client_chat_ops.js +213 -0
- package/dist/client_chat_ops.js.map +1 -0
- package/dist/client_connect_ops.d.ts +9 -0
- package/dist/client_connect_ops.d.ts.map +1 -0
- package/dist/client_connect_ops.js +44 -0
- package/dist/client_connect_ops.js.map +1 -0
- package/dist/client_group_space_ops.d.ts +24 -0
- package/dist/client_group_space_ops.d.ts.map +1 -0
- package/dist/client_group_space_ops.js +167 -0
- package/dist/client_group_space_ops.js.map +1 -0
- package/dist/errors.d.ts +47 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +56 -1
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/transport.d.ts +4 -3
- package/dist/transport.d.ts.map +1 -1
- package/dist/transport.js +236 -117
- package/dist/transport.js.map +1 -1
- package/dist/types.d.ts +1015 -26
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +20 -1
- package/dist/types.js.map +1 -1
- package/package.json +3 -3
package/dist/types.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface DaemonRequest {
|
|
|
9
9
|
}
|
|
10
10
|
/** IPC response envelope */
|
|
11
11
|
export interface DaemonResponse {
|
|
12
|
-
v
|
|
12
|
+
v: number;
|
|
13
13
|
ok: boolean;
|
|
14
14
|
result?: Record<string, unknown>;
|
|
15
15
|
error?: DaemonErrorPayload;
|
|
@@ -38,25 +38,120 @@ export interface AddressDescriptor {
|
|
|
38
38
|
version?: string;
|
|
39
39
|
ts?: string;
|
|
40
40
|
}
|
|
41
|
-
/** Event stream item */
|
|
42
|
-
export
|
|
41
|
+
/** Event stream item: event */
|
|
42
|
+
export interface EventStreamEvent {
|
|
43
43
|
t: 'event';
|
|
44
44
|
event: CCCSEvent;
|
|
45
|
-
}
|
|
45
|
+
}
|
|
46
|
+
/** Event stream item: heartbeat */
|
|
47
|
+
export interface EventStreamHeartbeat {
|
|
46
48
|
t: 'heartbeat';
|
|
47
49
|
ts: string;
|
|
48
|
-
}
|
|
50
|
+
}
|
|
51
|
+
/** Event stream item: unknown type (forward-compatible) */
|
|
52
|
+
export interface EventStreamUnknown {
|
|
49
53
|
t: string;
|
|
50
54
|
[key: string]: unknown;
|
|
51
|
-
}
|
|
55
|
+
}
|
|
56
|
+
/** Event stream item (discriminated on `t`) */
|
|
57
|
+
export type EventStreamItem = EventStreamEvent | EventStreamHeartbeat | EventStreamUnknown;
|
|
52
58
|
/** CCCS event */
|
|
53
59
|
export interface CCCSEvent {
|
|
54
60
|
id: string;
|
|
55
61
|
ts: string;
|
|
56
62
|
kind: string;
|
|
57
63
|
group_id: string;
|
|
64
|
+
scope_key?: string;
|
|
65
|
+
by?: string;
|
|
58
66
|
data: Record<string, unknown>;
|
|
59
67
|
}
|
|
68
|
+
/** Data payload for `chat.message` events */
|
|
69
|
+
export interface ChatMessageEventData {
|
|
70
|
+
text: string;
|
|
71
|
+
insight?: string | null;
|
|
72
|
+
format?: string;
|
|
73
|
+
/** Absent only on immutable messages written before the current contract. */
|
|
74
|
+
message_mode?: MessageMode;
|
|
75
|
+
to?: string[];
|
|
76
|
+
reply_to?: string | null;
|
|
77
|
+
quote_text?: string | null;
|
|
78
|
+
source_platform?: string | null;
|
|
79
|
+
source_user_name?: string | null;
|
|
80
|
+
source_user_id?: string | null;
|
|
81
|
+
mention_user_ids?: string[] | null;
|
|
82
|
+
sender_title?: string | null;
|
|
83
|
+
sender_runtime?: string | null;
|
|
84
|
+
sender_avatar_path?: string | null;
|
|
85
|
+
src_instance_id?: string | null;
|
|
86
|
+
src_instance_name?: string | null;
|
|
87
|
+
src_group_title?: string | null;
|
|
88
|
+
src_group_id?: string | null;
|
|
89
|
+
src_event_id?: string | null;
|
|
90
|
+
src_by?: string | null;
|
|
91
|
+
remote_reply_to?: string[] | null;
|
|
92
|
+
dst_instance_id?: string | null;
|
|
93
|
+
dst_instance_name?: string | null;
|
|
94
|
+
dst_group_title?: string | null;
|
|
95
|
+
dst_actor_titles?: Record<string, string>;
|
|
96
|
+
dst_group_id?: string | null;
|
|
97
|
+
dst_to?: string[] | null;
|
|
98
|
+
dst_message_mode?: MessageMode | null;
|
|
99
|
+
refs?: unknown[];
|
|
100
|
+
attachments?: unknown[];
|
|
101
|
+
thread?: string;
|
|
102
|
+
stream_id?: string | null;
|
|
103
|
+
pending_event_id?: string | null;
|
|
104
|
+
client_id?: string | null;
|
|
105
|
+
suggested_user_message?: string | null;
|
|
106
|
+
}
|
|
107
|
+
/** Data payload for `mail.read` events */
|
|
108
|
+
export interface MailReadEventData {
|
|
109
|
+
actor_id: string;
|
|
110
|
+
event_id: string;
|
|
111
|
+
}
|
|
112
|
+
/** Data payload for `chat.cross_group_receipt` events. */
|
|
113
|
+
export interface ChatCrossGroupReceiptEventData {
|
|
114
|
+
source_event_id: string;
|
|
115
|
+
dst_group_id: string;
|
|
116
|
+
dst_event_id?: string;
|
|
117
|
+
remote_event_id?: string;
|
|
118
|
+
registration_id?: string;
|
|
119
|
+
idempotency_key?: string;
|
|
120
|
+
status?: string;
|
|
121
|
+
}
|
|
122
|
+
/** Data payload for `notify.reminder` events */
|
|
123
|
+
export interface NotifyReminderEventData {
|
|
124
|
+
rule_id: string;
|
|
125
|
+
title?: string;
|
|
126
|
+
message?: string;
|
|
127
|
+
snippet?: string;
|
|
128
|
+
priority?: string;
|
|
129
|
+
}
|
|
130
|
+
/** A chat.message event with strongly-typed data */
|
|
131
|
+
export interface ChatMessageEvent extends CCCSEvent {
|
|
132
|
+
kind: 'chat.message';
|
|
133
|
+
data: ChatMessageEventData & Record<string, unknown>;
|
|
134
|
+
}
|
|
135
|
+
/** A mail.read event with strongly-typed data */
|
|
136
|
+
export interface MailReadEvent extends CCCSEvent {
|
|
137
|
+
kind: 'mail.read';
|
|
138
|
+
data: MailReadEventData & Record<string, unknown>;
|
|
139
|
+
}
|
|
140
|
+
/** A cross-group delivery receipt with strongly-typed data. */
|
|
141
|
+
export interface ChatCrossGroupReceiptEvent extends CCCSEvent {
|
|
142
|
+
kind: 'chat.cross_group_receipt';
|
|
143
|
+
data: ChatCrossGroupReceiptEventData & Record<string, unknown>;
|
|
144
|
+
}
|
|
145
|
+
/** Type guard: is this event a chat.message? */
|
|
146
|
+
export declare function isChatMessageEvent(event: CCCSEvent): event is ChatMessageEvent;
|
|
147
|
+
/** Type guard: is this event a mail.read? */
|
|
148
|
+
export declare function isMailReadEvent(event: CCCSEvent): event is MailReadEvent;
|
|
149
|
+
/** Type guard: is this event a chat.cross_group_receipt? */
|
|
150
|
+
export declare function isChatCrossGroupReceiptEvent(event: CCCSEvent): event is ChatCrossGroupReceiptEvent;
|
|
151
|
+
/** Type guard: is this stream item an event? */
|
|
152
|
+
export declare function isStreamEvent(item: EventStreamItem): item is EventStreamEvent;
|
|
153
|
+
/** Type guard: is this stream item a heartbeat? */
|
|
154
|
+
export declare function isStreamHeartbeat(item: EventStreamItem): item is EventStreamHeartbeat;
|
|
60
155
|
/** Client initialization options */
|
|
61
156
|
export interface CCCCClientOptions {
|
|
62
157
|
ccccHome?: string;
|
|
@@ -69,50 +164,185 @@ export interface CompatibilityOptions {
|
|
|
69
164
|
requireCapabilities?: Record<string, boolean>;
|
|
70
165
|
requireOps?: string[];
|
|
71
166
|
}
|
|
167
|
+
/**
|
|
168
|
+
* Structured chat-message reference (task_ref, presentation_ref, file/url/commit/text).
|
|
169
|
+
* Daemon accepts arbitrary `kind` values; the typed forms are the most common.
|
|
170
|
+
*/
|
|
171
|
+
export type MessageRef = ConnectGroupRef | {
|
|
172
|
+
kind: 'file';
|
|
173
|
+
path: string;
|
|
174
|
+
title?: string;
|
|
175
|
+
sha?: string;
|
|
176
|
+
bytes?: number;
|
|
177
|
+
[extra: string]: unknown;
|
|
178
|
+
} | {
|
|
179
|
+
kind: 'url';
|
|
180
|
+
url: string;
|
|
181
|
+
title?: string;
|
|
182
|
+
[extra: string]: unknown;
|
|
183
|
+
} | {
|
|
184
|
+
kind: 'commit';
|
|
185
|
+
sha: string;
|
|
186
|
+
title?: string;
|
|
187
|
+
[extra: string]: unknown;
|
|
188
|
+
} | {
|
|
189
|
+
kind: 'text';
|
|
190
|
+
title?: string;
|
|
191
|
+
[extra: string]: unknown;
|
|
192
|
+
} | {
|
|
193
|
+
kind: 'task_ref';
|
|
194
|
+
task_id: string;
|
|
195
|
+
title?: string;
|
|
196
|
+
status?: string;
|
|
197
|
+
waiting_on?: string;
|
|
198
|
+
handoff_to?: string;
|
|
199
|
+
[extra: string]: unknown;
|
|
200
|
+
} | {
|
|
201
|
+
kind: 'presentation_ref';
|
|
202
|
+
slot_id?: string;
|
|
203
|
+
title?: string;
|
|
204
|
+
source_label?: string;
|
|
205
|
+
source_ref?: string;
|
|
206
|
+
[extra: string]: unknown;
|
|
207
|
+
} | {
|
|
208
|
+
kind: string;
|
|
209
|
+
[extra: string]: unknown;
|
|
210
|
+
};
|
|
211
|
+
/** Chat-message attachment metadata (payload stored under blobs/) */
|
|
212
|
+
export interface MessageAttachment {
|
|
213
|
+
kind?: 'text' | 'image' | 'file';
|
|
214
|
+
path?: string;
|
|
215
|
+
title?: string;
|
|
216
|
+
mime_type?: string;
|
|
217
|
+
bytes?: number;
|
|
218
|
+
sha256?: string;
|
|
219
|
+
[extra: string]: unknown;
|
|
220
|
+
}
|
|
72
221
|
/** Send message options */
|
|
222
|
+
export type MessageMode = 'send' | 'request_reply' | 'mail';
|
|
223
|
+
export type ReplyMessageMode = 'send' | 'mail';
|
|
73
224
|
export interface SendOptions {
|
|
74
225
|
groupId: string;
|
|
75
226
|
text: string;
|
|
227
|
+
mode: MessageMode;
|
|
228
|
+
insight?: string;
|
|
229
|
+
suggestedUserMessage?: string;
|
|
76
230
|
by?: string;
|
|
77
231
|
to?: string[];
|
|
78
|
-
priority?: 'normal' | 'attention';
|
|
79
|
-
replyRequired?: boolean;
|
|
80
232
|
path?: string;
|
|
233
|
+
refs?: MessageRef[];
|
|
234
|
+
attachments?: MessageAttachment[];
|
|
235
|
+
clientId?: string;
|
|
236
|
+
requirePeerInsight?: boolean;
|
|
237
|
+
}
|
|
238
|
+
/** Upload active-scope files and send them in one chat message. */
|
|
239
|
+
export interface SendFilesOptions {
|
|
240
|
+
groupId: string;
|
|
241
|
+
paths: string[];
|
|
242
|
+
mode: MessageMode;
|
|
243
|
+
text?: string;
|
|
244
|
+
insight?: string;
|
|
245
|
+
by?: string;
|
|
246
|
+
to?: string[];
|
|
247
|
+
clientId?: string;
|
|
81
248
|
}
|
|
82
249
|
/** Send-cross-group options */
|
|
83
250
|
export interface SendCrossGroupOptions {
|
|
84
251
|
groupId: string;
|
|
85
252
|
dstGroupId: string;
|
|
86
253
|
text: string;
|
|
254
|
+
mode: MessageMode;
|
|
255
|
+
insight?: string;
|
|
87
256
|
by?: string;
|
|
88
257
|
to?: string[];
|
|
89
|
-
|
|
90
|
-
replyRequired?: boolean;
|
|
258
|
+
requirePeerInsight?: boolean;
|
|
91
259
|
}
|
|
92
260
|
/** Reply message options */
|
|
93
261
|
export interface ReplyOptions {
|
|
94
262
|
groupId: string;
|
|
95
263
|
replyTo: string;
|
|
96
264
|
text: string;
|
|
265
|
+
/** Defaults to Send. Mail is valid only when every reply recipient is an agent. */
|
|
266
|
+
mode?: ReplyMessageMode;
|
|
267
|
+
insight?: string;
|
|
268
|
+
suggestedUserMessage?: string;
|
|
97
269
|
by?: string;
|
|
98
270
|
to?: string[];
|
|
99
|
-
|
|
100
|
-
|
|
271
|
+
refs?: MessageRef[];
|
|
272
|
+
attachments?: MessageAttachment[];
|
|
273
|
+
clientId?: string;
|
|
274
|
+
requirePeerInsight?: boolean;
|
|
101
275
|
}
|
|
276
|
+
/**
|
|
277
|
+
* Tracked-delegation: atomically create a task and send the linked chat message.
|
|
278
|
+
* Daemon ensures task.create + send happen as one unit with idempotency replay.
|
|
279
|
+
*/
|
|
280
|
+
export interface TrackedSendOptions {
|
|
281
|
+
groupId: string;
|
|
282
|
+
text: string;
|
|
283
|
+
insight?: string;
|
|
284
|
+
/** Falls back to a compact derivation from text if omitted. */
|
|
285
|
+
title?: string;
|
|
286
|
+
by?: string;
|
|
287
|
+
to?: string[];
|
|
288
|
+
path?: string;
|
|
289
|
+
/** Task-domain priority. The linked visible message always uses Send. */
|
|
290
|
+
taskPriority?: string;
|
|
291
|
+
/** Used to dedupe retries. Daemon caches the result of the first successful call. */
|
|
292
|
+
idempotencyKey?: string;
|
|
293
|
+
outcome?: string;
|
|
294
|
+
/** Initial task status. Default 'planned'. */
|
|
295
|
+
status?: string;
|
|
296
|
+
/** What the task is waiting on. Default 'actor' when assignee is set, else 'none'. */
|
|
297
|
+
waitingOn?: string;
|
|
298
|
+
/** 'free' | 'standard' | 'optimization'. Default 'standard'. */
|
|
299
|
+
taskType?: string;
|
|
300
|
+
checklist?: Array<Record<string, unknown>>;
|
|
301
|
+
notes?: string;
|
|
302
|
+
blockedBy?: string[];
|
|
303
|
+
handoffTo?: string;
|
|
304
|
+
assignee?: string;
|
|
305
|
+
refs?: MessageRef[];
|
|
306
|
+
requirePeerInsight?: boolean;
|
|
307
|
+
}
|
|
308
|
+
/** Task list (returns either all tasks or one task plus its children). */
|
|
309
|
+
export interface TaskListOptions {
|
|
310
|
+
groupId: string;
|
|
311
|
+
taskId?: string;
|
|
312
|
+
taskIds?: string[];
|
|
313
|
+
status?: 'planned' | 'active' | 'done' | 'archived';
|
|
314
|
+
statuses?: Array<'planned' | 'active' | 'done' | 'archived'>;
|
|
315
|
+
query?: string;
|
|
316
|
+
/** Use `__unassigned__` for tasks without an assignee. */
|
|
317
|
+
assignee?: string;
|
|
318
|
+
attention?: 'blocked' | 'waiting_user' | 'handoff' | 'unassigned';
|
|
319
|
+
offset?: number;
|
|
320
|
+
/** Page size from 1 through 100. */
|
|
321
|
+
limit?: number;
|
|
322
|
+
includeIndex?: boolean;
|
|
323
|
+
}
|
|
324
|
+
/** Built-in actor kind flag. */
|
|
325
|
+
export type ActorInternalKind = 'voice_secretary';
|
|
326
|
+
/** Source of runtime activity state for an actor. */
|
|
327
|
+
export type ActorRuntimeStateSource = 'terminal' | 'app_server';
|
|
328
|
+
/** Known agent runtimes. Allow string for forward compatibility. */
|
|
329
|
+
export type AgentRuntime = 'amp' | 'antigravity' | 'auggie' | 'claude' | 'cline' | 'codex' | 'copilot' | 'cursor' | 'devin' | 'kiro' | 'kilo' | 'droid' | 'grok' | 'hermes' | 'kimi' | 'opencode' | 'web_model' | 'custom' | (string & {});
|
|
102
330
|
/** Add actor options */
|
|
103
331
|
export interface ActorAddOptions {
|
|
104
332
|
groupId: string;
|
|
105
333
|
actorId?: string;
|
|
106
334
|
title?: string;
|
|
107
|
-
runtime?:
|
|
108
|
-
runner?: string;
|
|
335
|
+
runtime?: AgentRuntime;
|
|
109
336
|
command?: string[];
|
|
110
337
|
env?: Record<string, string>;
|
|
111
338
|
envPrivate?: Record<string, string>;
|
|
112
339
|
capabilityAutoload?: string[];
|
|
340
|
+
capabilityHidden?: string[];
|
|
113
341
|
profileId?: string;
|
|
342
|
+
profileScope?: 'global' | 'user';
|
|
343
|
+
profileOwner?: string;
|
|
114
344
|
defaultScopeKey?: string;
|
|
115
|
-
submit?: string;
|
|
345
|
+
submit?: 'enter' | 'newline' | 'none' | (string & {});
|
|
116
346
|
by?: string;
|
|
117
347
|
}
|
|
118
348
|
/** Update actor options */
|
|
@@ -124,6 +354,341 @@ export interface ActorUpdateOptions {
|
|
|
124
354
|
profileAction?: 'convert_to_custom';
|
|
125
355
|
by?: string;
|
|
126
356
|
}
|
|
357
|
+
/** Destructive clean replacement of a group; confirmation must equal groupId. */
|
|
358
|
+
export interface GroupResetOptions {
|
|
359
|
+
groupId: string;
|
|
360
|
+
confirmGroupId: string;
|
|
361
|
+
by?: string;
|
|
362
|
+
}
|
|
363
|
+
/** Create or replace a non-empty group startup preamble override. */
|
|
364
|
+
export interface GroupPreambleSetOptions {
|
|
365
|
+
groupId: string;
|
|
366
|
+
content: string;
|
|
367
|
+
by?: string;
|
|
368
|
+
}
|
|
369
|
+
/** Delete the group startup preamble override and restore the built-in body. */
|
|
370
|
+
export interface GroupPreambleResetOptions {
|
|
371
|
+
groupId: string;
|
|
372
|
+
confirm: 'preamble';
|
|
373
|
+
by?: string;
|
|
374
|
+
}
|
|
375
|
+
/** Headless-actor runtime status. */
|
|
376
|
+
export type HeadlessStatus = 'idle' | 'working' | 'waiting' | 'stopped';
|
|
377
|
+
/** Headless status read options */
|
|
378
|
+
export interface HeadlessStatusOptions {
|
|
379
|
+
groupId: string;
|
|
380
|
+
actorId: string;
|
|
381
|
+
}
|
|
382
|
+
/** Headless set-status options */
|
|
383
|
+
export interface HeadlessSetStatusOptions {
|
|
384
|
+
groupId: string;
|
|
385
|
+
actorId: string;
|
|
386
|
+
status: HeadlessStatus;
|
|
387
|
+
taskId?: string;
|
|
388
|
+
}
|
|
389
|
+
/** Group copy: export the current group as a portable package. */
|
|
390
|
+
export interface GroupCopyExportOptions {
|
|
391
|
+
groupId: string;
|
|
392
|
+
by?: string;
|
|
393
|
+
}
|
|
394
|
+
export interface RemoteAccessOptions {
|
|
395
|
+
by?: string;
|
|
396
|
+
}
|
|
397
|
+
export interface RemoteAccessConfigureOptions extends RemoteAccessOptions {
|
|
398
|
+
provider?: 'off' | 'manual' | 'tailscale';
|
|
399
|
+
mode?: string;
|
|
400
|
+
requireAccessToken?: boolean;
|
|
401
|
+
webHost?: string;
|
|
402
|
+
webPort?: number;
|
|
403
|
+
webPublicUrl?: string;
|
|
404
|
+
}
|
|
405
|
+
/** Group copy: preview what would be imported from a package. */
|
|
406
|
+
export type GroupCopyPackageInput = {
|
|
407
|
+
packageB64: string;
|
|
408
|
+
packagePath?: never;
|
|
409
|
+
} | {
|
|
410
|
+
packageB64?: never;
|
|
411
|
+
packagePath: string;
|
|
412
|
+
};
|
|
413
|
+
export type GroupCopyPreviewImportOptions = GroupCopyPackageInput;
|
|
414
|
+
/** Group copy: apply a previously exported package as a new group. */
|
|
415
|
+
export type GroupCopyImportOptions = GroupCopyPackageInput & {
|
|
416
|
+
workspaceRoot?: string;
|
|
417
|
+
title?: string;
|
|
418
|
+
};
|
|
419
|
+
/** Capability visibility (per-actor hide/show). */
|
|
420
|
+
export interface CapabilityVisibilityOptions {
|
|
421
|
+
groupId: string;
|
|
422
|
+
capabilityId: string;
|
|
423
|
+
hidden?: boolean;
|
|
424
|
+
actorId?: string;
|
|
425
|
+
reason?: string;
|
|
426
|
+
by?: string;
|
|
427
|
+
}
|
|
428
|
+
/** Capability install target — accepts capability_id or a remote source URI. */
|
|
429
|
+
export interface CapabilityInstallTargetOptions {
|
|
430
|
+
groupId: string;
|
|
431
|
+
target: string;
|
|
432
|
+
actorId?: string;
|
|
433
|
+
scope?: 'actor' | 'group' | 'session';
|
|
434
|
+
ttlSeconds?: number;
|
|
435
|
+
reason?: string;
|
|
436
|
+
by?: string;
|
|
437
|
+
}
|
|
438
|
+
/** Capability source delete. */
|
|
439
|
+
export interface CapabilitySourceDeleteOptions {
|
|
440
|
+
groupId: string;
|
|
441
|
+
sourceId: 'manual_import' | 'agent_self_proposed' | 'github_import' | 'url_import' | 'local_import';
|
|
442
|
+
reason?: string;
|
|
443
|
+
actorId?: string;
|
|
444
|
+
by?: string;
|
|
445
|
+
}
|
|
446
|
+
/** Presentation table content. */
|
|
447
|
+
export interface PresentationTableData {
|
|
448
|
+
columns: string[];
|
|
449
|
+
rows: string[][];
|
|
450
|
+
}
|
|
451
|
+
/** Presentation card types supported by the daemon. */
|
|
452
|
+
export type PresentationCardType = 'markdown' | 'table' | 'image' | 'pdf' | 'file' | 'web_preview';
|
|
453
|
+
/** Presentation get. */
|
|
454
|
+
export interface PresentationGetOptions {
|
|
455
|
+
groupId: string;
|
|
456
|
+
}
|
|
457
|
+
/** Presentation publish options. Pick one content source. */
|
|
458
|
+
export interface PresentationPublishOptions {
|
|
459
|
+
groupId: string;
|
|
460
|
+
by?: string;
|
|
461
|
+
slot?: string;
|
|
462
|
+
title?: string;
|
|
463
|
+
summary?: string;
|
|
464
|
+
sourceLabel?: string;
|
|
465
|
+
sourceRef?: string;
|
|
466
|
+
cardType?: PresentationCardType;
|
|
467
|
+
content?: string;
|
|
468
|
+
path?: string;
|
|
469
|
+
url?: string;
|
|
470
|
+
blobRelPath?: string;
|
|
471
|
+
table?: PresentationTableData;
|
|
472
|
+
}
|
|
473
|
+
/** Presentation clear options. */
|
|
474
|
+
export interface PresentationClearOptions {
|
|
475
|
+
groupId: string;
|
|
476
|
+
slot?: string;
|
|
477
|
+
by?: string;
|
|
478
|
+
}
|
|
479
|
+
/** Open a browser-backed presentation surface. */
|
|
480
|
+
export interface PresentationBrowserOpenOptions {
|
|
481
|
+
groupId: string;
|
|
482
|
+
slot: string;
|
|
483
|
+
url: string;
|
|
484
|
+
width?: number;
|
|
485
|
+
height?: number;
|
|
486
|
+
by?: string;
|
|
487
|
+
}
|
|
488
|
+
export interface PresentationBrowserInfoOptions {
|
|
489
|
+
groupId: string;
|
|
490
|
+
slot?: string;
|
|
491
|
+
}
|
|
492
|
+
export interface PresentationBrowserCloseOptions {
|
|
493
|
+
groupId: string;
|
|
494
|
+
slot?: string;
|
|
495
|
+
by?: string;
|
|
496
|
+
}
|
|
497
|
+
/** Built-in assistant lifecycle. */
|
|
498
|
+
export type AssistantLifecycle = 'disabled' | 'idle' | 'running' | 'working' | 'waiting' | 'failed';
|
|
499
|
+
/** Built-in assistant id supported by CCCC v0.4.32. */
|
|
500
|
+
export type AssistantId = 'voice_secretary';
|
|
501
|
+
/** Read assistant state. */
|
|
502
|
+
export interface AssistantStateOptions {
|
|
503
|
+
groupId: string;
|
|
504
|
+
assistantId?: AssistantId;
|
|
505
|
+
promptRequestId?: string;
|
|
506
|
+
}
|
|
507
|
+
export type AssistantVoiceRecordingLeaseAction = 'acquire' | 'heartbeat' | 'release' | 'status';
|
|
508
|
+
/** Acquire, refresh, release, or inspect the daemon-owned Voice Secretary recording lease. */
|
|
509
|
+
export interface AssistantVoiceRecordingLeaseOptions {
|
|
510
|
+
groupId: string;
|
|
511
|
+
action: AssistantVoiceRecordingLeaseAction;
|
|
512
|
+
by?: string;
|
|
513
|
+
ownerId?: string;
|
|
514
|
+
leaseId?: string;
|
|
515
|
+
ttlSeconds?: number;
|
|
516
|
+
captureMode?: string;
|
|
517
|
+
recognitionBackend?: string;
|
|
518
|
+
}
|
|
519
|
+
/** Update assistant settings (patch). */
|
|
520
|
+
export interface AssistantSettingsUpdateOptions {
|
|
521
|
+
groupId: string;
|
|
522
|
+
assistantId: AssistantId;
|
|
523
|
+
patch: Record<string, unknown>;
|
|
524
|
+
by?: string;
|
|
525
|
+
}
|
|
526
|
+
/** Update assistant runtime status. */
|
|
527
|
+
export interface AssistantStatusUpdateOptions {
|
|
528
|
+
groupId: string;
|
|
529
|
+
assistantId: AssistantId;
|
|
530
|
+
lifecycle: AssistantLifecycle;
|
|
531
|
+
health?: Record<string, unknown>;
|
|
532
|
+
by?: string;
|
|
533
|
+
}
|
|
534
|
+
/** Global observability settings update. */
|
|
535
|
+
export interface ObservabilityUpdateOptions {
|
|
536
|
+
patch: Record<string, unknown>;
|
|
537
|
+
by?: string;
|
|
538
|
+
}
|
|
539
|
+
/** Branding settings update. */
|
|
540
|
+
export interface BrandingUpdateOptions {
|
|
541
|
+
patch: Record<string, unknown>;
|
|
542
|
+
by?: string;
|
|
543
|
+
}
|
|
544
|
+
/** Daemon-wide diagnostics snapshot. */
|
|
545
|
+
export interface DebugSnapshotOptions {
|
|
546
|
+
groupId: string;
|
|
547
|
+
by?: string;
|
|
548
|
+
}
|
|
549
|
+
/** Tail logs from a daemon component. */
|
|
550
|
+
export interface DebugTailLogsOptions {
|
|
551
|
+
component: string;
|
|
552
|
+
groupId?: string;
|
|
553
|
+
lines?: number;
|
|
554
|
+
by?: string;
|
|
555
|
+
}
|
|
556
|
+
/** Clear logs for a daemon component. */
|
|
557
|
+
export interface DebugClearLogsOptions {
|
|
558
|
+
component: string;
|
|
559
|
+
groupId?: string;
|
|
560
|
+
by?: string;
|
|
561
|
+
}
|
|
562
|
+
/** Read PTY transcript tail. */
|
|
563
|
+
export interface TerminalTailOptions {
|
|
564
|
+
groupId: string;
|
|
565
|
+
actorId: string;
|
|
566
|
+
maxChars?: number;
|
|
567
|
+
stripAnsi?: boolean;
|
|
568
|
+
compact?: boolean;
|
|
569
|
+
by?: string;
|
|
570
|
+
}
|
|
571
|
+
/** Read a cursor-paginated PTY transcript page. */
|
|
572
|
+
export interface TerminalHistoryOptions {
|
|
573
|
+
renderBefore?: number;
|
|
574
|
+
groupId: string;
|
|
575
|
+
actorId: string;
|
|
576
|
+
before?: number;
|
|
577
|
+
limitBytes?: number;
|
|
578
|
+
stripAnsi?: boolean;
|
|
579
|
+
compact?: boolean;
|
|
580
|
+
by?: string;
|
|
581
|
+
}
|
|
582
|
+
/** Read raw terminal output produced after a cursor. */
|
|
583
|
+
export interface TerminalSinceOptions {
|
|
584
|
+
groupId: string;
|
|
585
|
+
actorId: string;
|
|
586
|
+
after: number;
|
|
587
|
+
limitBytes?: number;
|
|
588
|
+
by?: string;
|
|
589
|
+
}
|
|
590
|
+
/** Capture the bounded ANSI screen and its raw cursor boundary. */
|
|
591
|
+
export interface TerminalSnapshotOptions {
|
|
592
|
+
groupId: string;
|
|
593
|
+
actorId: string;
|
|
594
|
+
limitBytes?: number;
|
|
595
|
+
by?: string;
|
|
596
|
+
}
|
|
597
|
+
export type WebModelDeliveryMode = 'standard' | 'image_compat';
|
|
598
|
+
export interface WebModelDeliveryPreferencesGetOptions {
|
|
599
|
+
groupId: string;
|
|
600
|
+
actorId: string;
|
|
601
|
+
}
|
|
602
|
+
export interface WebModelDeliveryPreferencesUpdateOptions extends WebModelDeliveryPreferencesGetOptions {
|
|
603
|
+
mode: WebModelDeliveryMode;
|
|
604
|
+
by?: 'user';
|
|
605
|
+
}
|
|
606
|
+
export interface WebModelRuntimeRecoverTurnOptions extends WebModelDeliveryPreferencesGetOptions {
|
|
607
|
+
eventIds: string[];
|
|
608
|
+
}
|
|
609
|
+
/** Clear PTY backlog. */
|
|
610
|
+
export interface TerminalClearOptions {
|
|
611
|
+
groupId: string;
|
|
612
|
+
actorId: string;
|
|
613
|
+
by?: string;
|
|
614
|
+
}
|
|
615
|
+
/** Ledger snapshot (durable point-in-time). */
|
|
616
|
+
export interface LedgerSnapshotOptions {
|
|
617
|
+
groupId: string;
|
|
618
|
+
by?: string;
|
|
619
|
+
reason?: string;
|
|
620
|
+
}
|
|
621
|
+
/** Ledger compaction. */
|
|
622
|
+
export interface LedgerCompactOptions {
|
|
623
|
+
groupId: string;
|
|
624
|
+
by?: string;
|
|
625
|
+
reason?: string;
|
|
626
|
+
force?: boolean;
|
|
627
|
+
}
|
|
628
|
+
/** Emit a chat.stream event (start/update/end). */
|
|
629
|
+
export interface StreamEmitOptions {
|
|
630
|
+
groupId: string;
|
|
631
|
+
op: 'start' | 'update' | 'end';
|
|
632
|
+
by: string;
|
|
633
|
+
streamId?: string;
|
|
634
|
+
text?: string;
|
|
635
|
+
format?: 'plain' | 'markdown';
|
|
636
|
+
seq?: number;
|
|
637
|
+
to?: string[];
|
|
638
|
+
replyTo?: string;
|
|
639
|
+
clientId?: string;
|
|
640
|
+
}
|
|
641
|
+
/** Write a system.notify event directly. */
|
|
642
|
+
export interface SystemNotifyOptions {
|
|
643
|
+
groupId: string;
|
|
644
|
+
message?: string;
|
|
645
|
+
title?: string;
|
|
646
|
+
kind?: string;
|
|
647
|
+
priority?: 'low' | 'normal' | 'high' | 'urgent';
|
|
648
|
+
targetActorId?: string;
|
|
649
|
+
imVisibility?: 'internal' | 'public';
|
|
650
|
+
context?: Record<string, unknown>;
|
|
651
|
+
by?: string;
|
|
652
|
+
}
|
|
653
|
+
/** Reconcile the group registry against on-disk state. */
|
|
654
|
+
export interface RegistryReconcileOptions {
|
|
655
|
+
removeMissing?: boolean;
|
|
656
|
+
}
|
|
657
|
+
/** Detach a scope from a group. */
|
|
658
|
+
export interface GroupDetachScopeOptions {
|
|
659
|
+
groupId: string;
|
|
660
|
+
scopeKey: string;
|
|
661
|
+
by?: string;
|
|
662
|
+
}
|
|
663
|
+
/** Prepare the selected Hermes profile with the CCCC MCP server. */
|
|
664
|
+
export interface RuntimeHermesPrepareOptions {
|
|
665
|
+
cwd?: string;
|
|
666
|
+
autoEnableTools?: boolean;
|
|
667
|
+
forceMcp?: boolean;
|
|
668
|
+
}
|
|
669
|
+
/** Run Hermes' MCP probe for the configured CCCC server. */
|
|
670
|
+
export interface RuntimeHermesMcpTestOptions {
|
|
671
|
+
cwd?: string;
|
|
672
|
+
groupId?: string;
|
|
673
|
+
actorId?: string;
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Async-result envelope merged into many long-running ops' results.
|
|
677
|
+
*
|
|
678
|
+
* Consumers typically check `completed`; if `false`, the operation was accepted
|
|
679
|
+
* and clients should subscribe to `events_stream` for `completion_signal` rather
|
|
680
|
+
* than poll. See `spec/CCCC_DAEMON_IPC_V1.md` for details.
|
|
681
|
+
*/
|
|
682
|
+
export interface AsyncResultEnvelope {
|
|
683
|
+
accepted: boolean;
|
|
684
|
+
completed: boolean;
|
|
685
|
+
queued?: boolean;
|
|
686
|
+
background?: boolean;
|
|
687
|
+
completion_signal?: string;
|
|
688
|
+
recommended_next_action?: string;
|
|
689
|
+
polling_discouraged?: boolean;
|
|
690
|
+
wait_guidance?: string;
|
|
691
|
+
}
|
|
127
692
|
/** Actor private env vars (secrets, runtime-only) */
|
|
128
693
|
export interface ActorEnvPrivateUpdateOptions {
|
|
129
694
|
groupId: string;
|
|
@@ -206,7 +771,7 @@ export interface CapabilityOverviewOptions {
|
|
|
206
771
|
}
|
|
207
772
|
/** Capability search options */
|
|
208
773
|
export interface CapabilitySearchOptions {
|
|
209
|
-
groupId
|
|
774
|
+
groupId?: string;
|
|
210
775
|
actorId?: string;
|
|
211
776
|
by?: string;
|
|
212
777
|
query?: string;
|
|
@@ -219,7 +784,7 @@ export interface CapabilitySearchOptions {
|
|
|
219
784
|
}
|
|
220
785
|
/** Capability enable/disable options */
|
|
221
786
|
export interface CapabilityEnableOptions {
|
|
222
|
-
groupId
|
|
787
|
+
groupId?: string;
|
|
223
788
|
capabilityId: string;
|
|
224
789
|
scope?: 'group' | 'actor' | 'session';
|
|
225
790
|
enabled?: boolean;
|
|
@@ -242,7 +807,7 @@ export interface CapabilityBlockOptions {
|
|
|
242
807
|
}
|
|
243
808
|
/** Capability state options */
|
|
244
809
|
export interface CapabilityStateOptions {
|
|
245
|
-
groupId
|
|
810
|
+
groupId?: string;
|
|
246
811
|
actorId?: string;
|
|
247
812
|
by?: string;
|
|
248
813
|
}
|
|
@@ -365,7 +930,7 @@ export interface GroupSpaceArtifactOptions {
|
|
|
365
930
|
wait?: boolean;
|
|
366
931
|
saveToSpace?: boolean;
|
|
367
932
|
outputPath?: string;
|
|
368
|
-
outputFormat?: 'json' | 'markdown' | 'html';
|
|
933
|
+
outputFormat?: 'json' | 'markdown' | 'html' | 'pdf' | 'pptx' | 'csv';
|
|
369
934
|
artifactId?: string;
|
|
370
935
|
timeoutSeconds?: number;
|
|
371
936
|
initialInterval?: number;
|
|
@@ -388,8 +953,6 @@ export interface GroupSpaceJobsOptions {
|
|
|
388
953
|
export interface GroupSpaceSyncOptions {
|
|
389
954
|
groupId: string;
|
|
390
955
|
lane: GroupSpaceLane;
|
|
391
|
-
action?: 'status' | 'run';
|
|
392
|
-
force?: boolean;
|
|
393
956
|
provider?: GroupSpaceProvider;
|
|
394
957
|
by?: string;
|
|
395
958
|
}
|
|
@@ -409,12 +972,14 @@ export interface GroupSpaceProviderCredentialUpdateOptions {
|
|
|
409
972
|
export interface GroupSpaceProviderHealthCheckOptions {
|
|
410
973
|
provider?: GroupSpaceProvider;
|
|
411
974
|
by?: string;
|
|
975
|
+
authJson?: string;
|
|
412
976
|
}
|
|
413
977
|
/** Provider auth flow options */
|
|
414
978
|
export interface GroupSpaceProviderAuthOptions {
|
|
415
979
|
provider?: GroupSpaceProvider;
|
|
416
|
-
action?: 'status' | 'start' | 'cancel';
|
|
980
|
+
action?: 'status' | 'start' | 'cancel' | 'disconnect';
|
|
417
981
|
timeoutSeconds?: number;
|
|
982
|
+
projected?: boolean;
|
|
418
983
|
by?: string;
|
|
419
984
|
}
|
|
420
985
|
/** Automation notify priority */
|
|
@@ -444,7 +1009,6 @@ export interface AutomationActionNotify {
|
|
|
444
1009
|
snippet_ref?: string | null;
|
|
445
1010
|
message?: string;
|
|
446
1011
|
priority?: AutomationNotifyPriority;
|
|
447
|
-
requires_ack?: boolean;
|
|
448
1012
|
}
|
|
449
1013
|
/** Automation action (group state) */
|
|
450
1014
|
export interface AutomationActionGroupState {
|
|
@@ -522,21 +1086,125 @@ export interface GroupAutomationResetBaselineOptions {
|
|
|
522
1086
|
by?: string;
|
|
523
1087
|
expectedVersion?: number;
|
|
524
1088
|
}
|
|
525
|
-
/** Inbox
|
|
526
|
-
export interface
|
|
1089
|
+
/** Read or peek at an actor Inbox. Reading advances the read cursor. */
|
|
1090
|
+
export interface InboxOptions {
|
|
527
1091
|
groupId: string;
|
|
528
1092
|
actorId: string;
|
|
529
1093
|
by?: string;
|
|
530
1094
|
limit?: number;
|
|
531
|
-
|
|
1095
|
+
}
|
|
1096
|
+
/** Inspect actor-visible chat history without consuming Mail. */
|
|
1097
|
+
export interface MessageHistoryOptions extends InboxOptions {
|
|
1098
|
+
mode?: 'all' | MessageMode;
|
|
1099
|
+
query?: string;
|
|
1100
|
+
beforeEventId?: string;
|
|
1101
|
+
}
|
|
1102
|
+
export interface ReplyRequestCancelOptions {
|
|
1103
|
+
groupId: string;
|
|
1104
|
+
sourceEventId: string;
|
|
1105
|
+
by?: string;
|
|
1106
|
+
}
|
|
1107
|
+
export interface MessageDeliverOptions {
|
|
1108
|
+
groupId: string;
|
|
1109
|
+
sourceEventId: string;
|
|
1110
|
+
actorIds: string[];
|
|
1111
|
+
by?: string;
|
|
1112
|
+
forceAmbiguous?: boolean;
|
|
532
1113
|
}
|
|
533
1114
|
/** Context sync options */
|
|
534
1115
|
export interface ContextSyncOptions {
|
|
1116
|
+
ifVersion?: string;
|
|
535
1117
|
groupId: string;
|
|
536
1118
|
ops: Record<string, unknown>[];
|
|
537
1119
|
by?: string;
|
|
538
1120
|
dryRun?: boolean;
|
|
539
1121
|
}
|
|
1122
|
+
/** Common context_sync wrapper options. */
|
|
1123
|
+
export interface ContextWrapperOptions {
|
|
1124
|
+
groupId: string;
|
|
1125
|
+
by?: string;
|
|
1126
|
+
dryRun?: boolean;
|
|
1127
|
+
}
|
|
1128
|
+
/** Update the shared coordination brief (Context Ops v3). */
|
|
1129
|
+
export interface CoordinationBriefUpdateOptions extends ContextWrapperOptions {
|
|
1130
|
+
objective?: string;
|
|
1131
|
+
currentFocus?: string;
|
|
1132
|
+
constraints?: string[];
|
|
1133
|
+
projectBrief?: string;
|
|
1134
|
+
projectBriefStale?: boolean;
|
|
1135
|
+
}
|
|
1136
|
+
/** Add a compact coordination note. */
|
|
1137
|
+
export interface CoordinationNoteAddOptions extends ContextWrapperOptions {
|
|
1138
|
+
kind: 'decision' | 'handoff';
|
|
1139
|
+
summary: string;
|
|
1140
|
+
taskId?: string | null;
|
|
1141
|
+
}
|
|
1142
|
+
/** Create/update/move/restore task options for Context Ops v3. */
|
|
1143
|
+
export interface TaskCreateOptions extends ContextWrapperOptions {
|
|
1144
|
+
title: string;
|
|
1145
|
+
outcome?: string;
|
|
1146
|
+
status?: 'planned' | 'active' | 'done' | 'archived';
|
|
1147
|
+
parentId?: string | null;
|
|
1148
|
+
assignee?: string | null;
|
|
1149
|
+
priority?: string;
|
|
1150
|
+
blockedBy?: string[];
|
|
1151
|
+
waitingOn?: 'none' | 'user' | 'actor' | 'external';
|
|
1152
|
+
handoffTo?: string | null;
|
|
1153
|
+
taskType?: 'free' | 'standard' | 'optimization';
|
|
1154
|
+
notes?: string;
|
|
1155
|
+
checklist?: Array<{
|
|
1156
|
+
id?: string;
|
|
1157
|
+
text: string;
|
|
1158
|
+
status?: 'pending' | 'in_progress' | 'done';
|
|
1159
|
+
}>;
|
|
1160
|
+
}
|
|
1161
|
+
export interface TaskUpdateOptions extends ContextWrapperOptions {
|
|
1162
|
+
taskId: string;
|
|
1163
|
+
title?: string;
|
|
1164
|
+
outcome?: string;
|
|
1165
|
+
status?: 'planned' | 'active' | 'done' | 'archived';
|
|
1166
|
+
assignee?: string | null;
|
|
1167
|
+
priority?: string;
|
|
1168
|
+
blockedBy?: string[];
|
|
1169
|
+
waitingOn?: 'none' | 'user' | 'actor' | 'external';
|
|
1170
|
+
handoffTo?: string | null;
|
|
1171
|
+
notes?: string;
|
|
1172
|
+
checklist?: Array<{
|
|
1173
|
+
id?: string;
|
|
1174
|
+
text: string;
|
|
1175
|
+
status?: 'pending' | 'in_progress' | 'done';
|
|
1176
|
+
}>;
|
|
1177
|
+
}
|
|
1178
|
+
export interface TaskMoveOptions extends ContextWrapperOptions {
|
|
1179
|
+
taskId: string;
|
|
1180
|
+
status: 'planned' | 'active' | 'done' | 'archived';
|
|
1181
|
+
}
|
|
1182
|
+
export interface TaskRestoreOptions extends ContextWrapperOptions {
|
|
1183
|
+
taskId: string;
|
|
1184
|
+
}
|
|
1185
|
+
export interface TaskDeleteOptions extends ContextWrapperOptions {
|
|
1186
|
+
taskId: string;
|
|
1187
|
+
}
|
|
1188
|
+
/** Update or clear per-actor working memory. */
|
|
1189
|
+
export interface AgentStateUpdateOptions extends ContextWrapperOptions {
|
|
1190
|
+
actorId: string;
|
|
1191
|
+
activeTaskId?: string;
|
|
1192
|
+
focus?: string;
|
|
1193
|
+
nextAction?: string;
|
|
1194
|
+
whatChanged?: string;
|
|
1195
|
+
blockers?: string[];
|
|
1196
|
+
openLoops?: string[];
|
|
1197
|
+
commitments?: string[];
|
|
1198
|
+
environmentSummary?: string;
|
|
1199
|
+
userModel?: string;
|
|
1200
|
+
personaNotes?: string;
|
|
1201
|
+
}
|
|
1202
|
+
export interface AgentStateClearOptions extends ContextWrapperOptions {
|
|
1203
|
+
actorId: string;
|
|
1204
|
+
}
|
|
1205
|
+
export interface MetaMergeOptions extends ContextWrapperOptions {
|
|
1206
|
+
data: Record<string, unknown>;
|
|
1207
|
+
}
|
|
540
1208
|
/** Event stream options */
|
|
541
1209
|
export interface EventsStreamOptions {
|
|
542
1210
|
groupId: string;
|
|
@@ -545,5 +1213,326 @@ export interface EventsStreamOptions {
|
|
|
545
1213
|
sinceEventId?: string;
|
|
546
1214
|
sinceTs?: string;
|
|
547
1215
|
timeoutMs?: number;
|
|
1216
|
+
/** AbortSignal to tear down the stream. When aborted the async generator returns. */
|
|
1217
|
+
signal?: AbortSignal;
|
|
1218
|
+
}
|
|
1219
|
+
/** Result of send, sendFiles, or reply. */
|
|
1220
|
+
export interface SendResult {
|
|
1221
|
+
event: CCCSEvent;
|
|
1222
|
+
/** Canonical mode stored on the event; replies always return `send`. */
|
|
1223
|
+
message_mode: MessageMode;
|
|
1224
|
+
}
|
|
1225
|
+
/** Options for sendAndWaitForReply */
|
|
1226
|
+
export type SendAndWaitOptions = Omit<SendOptions, 'mode'> & {
|
|
1227
|
+
/** Actor ID that will listen for the reply (used to open events stream). */
|
|
1228
|
+
listenAs: string;
|
|
1229
|
+
/** Timeout in ms to wait for a reply (default 60_000). */
|
|
1230
|
+
waitTimeoutMs?: number;
|
|
1231
|
+
/** AbortSignal to cancel the wait. */
|
|
1232
|
+
signal?: AbortSignal;
|
|
1233
|
+
};
|
|
1234
|
+
/** Actor descriptor returned by daemon */
|
|
1235
|
+
export interface ActorInfo {
|
|
1236
|
+
id: string;
|
|
1237
|
+
role?: string;
|
|
1238
|
+
title?: string;
|
|
1239
|
+
enabled?: boolean;
|
|
1240
|
+
running?: boolean;
|
|
1241
|
+
runner?: string;
|
|
1242
|
+
runtime?: string;
|
|
1243
|
+
submit?: string;
|
|
1244
|
+
unread_count?: number;
|
|
1245
|
+
updated_at?: string;
|
|
1246
|
+
created_at?: string;
|
|
1247
|
+
}
|
|
1248
|
+
/** Scope descriptor */
|
|
1249
|
+
export interface ScopeInfo {
|
|
1250
|
+
scope_key: string;
|
|
1251
|
+
url: string;
|
|
1252
|
+
label?: string;
|
|
1253
|
+
git_remote?: string;
|
|
1254
|
+
}
|
|
1255
|
+
/** Group descriptor returned by daemon */
|
|
1256
|
+
export interface GroupInfo {
|
|
1257
|
+
group_id: string;
|
|
1258
|
+
title?: string;
|
|
1259
|
+
topic?: string;
|
|
1260
|
+
state?: string;
|
|
1261
|
+
running?: boolean;
|
|
1262
|
+
active_scope_key?: string;
|
|
1263
|
+
created_at?: string;
|
|
1264
|
+
updated_at?: string;
|
|
1265
|
+
scopes?: ScopeInfo[];
|
|
1266
|
+
}
|
|
1267
|
+
/** Result of ping */
|
|
1268
|
+
export interface PingResult {
|
|
1269
|
+
version: string;
|
|
1270
|
+
implementation: string;
|
|
1271
|
+
pid: number;
|
|
1272
|
+
ts: string;
|
|
1273
|
+
ipc_v: number;
|
|
1274
|
+
capabilities: Record<string, unknown>;
|
|
1275
|
+
compatibility?: string;
|
|
1276
|
+
[key: string]: unknown;
|
|
1277
|
+
}
|
|
1278
|
+
/** Result of groups list */
|
|
1279
|
+
export interface GroupsResult {
|
|
1280
|
+
groups: GroupInfo[];
|
|
1281
|
+
}
|
|
1282
|
+
/** Result of group_show */
|
|
1283
|
+
export interface GroupShowResult {
|
|
1284
|
+
group: GroupInfo;
|
|
1285
|
+
actors?: ActorInfo[];
|
|
1286
|
+
}
|
|
1287
|
+
/** Result of group_create */
|
|
1288
|
+
export interface GroupCreateResult {
|
|
1289
|
+
group: GroupInfo;
|
|
1290
|
+
}
|
|
1291
|
+
/** Result of actor_list */
|
|
1292
|
+
export interface ActorListResult {
|
|
1293
|
+
actors: ActorInfo[];
|
|
1294
|
+
}
|
|
1295
|
+
/** Result of actor_add */
|
|
1296
|
+
export interface ActorAddResult {
|
|
1297
|
+
actor_id: string;
|
|
1298
|
+
}
|
|
1299
|
+
/** Result of inbox_peek */
|
|
1300
|
+
export interface InboxPeekResult {
|
|
1301
|
+
messages: CCCSEvent[];
|
|
1302
|
+
cursor: {
|
|
1303
|
+
event_id: string;
|
|
1304
|
+
ts: string;
|
|
1305
|
+
};
|
|
1306
|
+
}
|
|
1307
|
+
/** Result of inbox_read */
|
|
1308
|
+
export interface InboxReadResult extends InboxPeekResult {
|
|
1309
|
+
event: CCCSEvent | null;
|
|
1310
|
+
cursor: InboxPeekResult['cursor'] & {
|
|
1311
|
+
updated_at?: string;
|
|
1312
|
+
};
|
|
1313
|
+
}
|
|
1314
|
+
/** Result of message_history. */
|
|
1315
|
+
export interface MessageHistoryResult {
|
|
1316
|
+
messages: CCCSEvent[];
|
|
1317
|
+
has_more: boolean;
|
|
1318
|
+
}
|
|
1319
|
+
export interface TerminalSnapshotResult {
|
|
1320
|
+
data: string;
|
|
1321
|
+
start_cursor: number;
|
|
1322
|
+
end_cursor: number;
|
|
1323
|
+
}
|
|
1324
|
+
export interface WebModelDeliveryPreferencesResult {
|
|
1325
|
+
group_id: string;
|
|
1326
|
+
actor_id: string;
|
|
1327
|
+
preference: {
|
|
1328
|
+
mode: WebModelDeliveryMode;
|
|
1329
|
+
updated_at: string;
|
|
1330
|
+
updated_by: string;
|
|
1331
|
+
};
|
|
1332
|
+
}
|
|
1333
|
+
export interface WebModelRuntimeRecoverTurnResult {
|
|
1334
|
+
status: 'recovered';
|
|
1335
|
+
turn: {
|
|
1336
|
+
turn_id: string;
|
|
1337
|
+
group_id: string;
|
|
1338
|
+
actor_id: string;
|
|
1339
|
+
event_ids: string[];
|
|
1340
|
+
latest_event_id: string;
|
|
1341
|
+
latest_ts: string;
|
|
1342
|
+
messages: CCCSEvent[];
|
|
1343
|
+
coalesced_text: string;
|
|
1344
|
+
system_prompt: string;
|
|
1345
|
+
delivery: {
|
|
1346
|
+
mode: 'recovery_no_cursor_mutation';
|
|
1347
|
+
cursor_committed: true;
|
|
1348
|
+
web_model_mode: WebModelDeliveryMode;
|
|
1349
|
+
};
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
export interface CapabilityUseOptions extends CapabilityEnableOptions {
|
|
1353
|
+
toolName?: string;
|
|
1354
|
+
toolArguments?: Record<string, unknown>;
|
|
1355
|
+
}
|
|
1356
|
+
/** Local CCCC memory operation options. */
|
|
1357
|
+
export interface MemorySearchOptions {
|
|
1358
|
+
groupId: string;
|
|
1359
|
+
actorId?: string;
|
|
1360
|
+
query: string;
|
|
1361
|
+
limit?: number;
|
|
1362
|
+
maxResults?: number;
|
|
1363
|
+
vectorWeight?: number;
|
|
1364
|
+
candidateMultiplier?: number;
|
|
1365
|
+
minScore?: number;
|
|
1366
|
+
tags?: string[];
|
|
1367
|
+
target?: 'memory' | 'daily';
|
|
1368
|
+
}
|
|
1369
|
+
export interface MemoryWriteOptions {
|
|
1370
|
+
groupId: string;
|
|
1371
|
+
actorId?: string;
|
|
1372
|
+
target: 'memory' | 'daily';
|
|
1373
|
+
content: string;
|
|
1374
|
+
tags?: string[];
|
|
1375
|
+
sourceRefs?: string[];
|
|
1376
|
+
idempotencyKey?: string;
|
|
1377
|
+
dedupIntent?: 'new' | 'update' | 'supersede' | 'silent';
|
|
1378
|
+
dedupQuery?: string;
|
|
1379
|
+
}
|
|
1380
|
+
export interface MemoryGetOptions {
|
|
1381
|
+
groupId: string;
|
|
1382
|
+
actorId?: string;
|
|
1383
|
+
path?: string;
|
|
1384
|
+
target?: 'memory' | 'daily';
|
|
1385
|
+
date?: string;
|
|
1386
|
+
offset?: number;
|
|
1387
|
+
limit?: number;
|
|
1388
|
+
}
|
|
1389
|
+
export interface MemoryHealthOptions {
|
|
1390
|
+
groupId: string;
|
|
1391
|
+
}
|
|
1392
|
+
export interface MemoryProfileGetOptions {
|
|
1393
|
+
groupId: string;
|
|
1394
|
+
actorId?: string;
|
|
1395
|
+
userId?: string;
|
|
1396
|
+
tags?: string[];
|
|
1397
|
+
}
|
|
1398
|
+
export interface MemoryRemeMessage {
|
|
1399
|
+
role: string;
|
|
1400
|
+
name?: string;
|
|
1401
|
+
content: string;
|
|
1402
|
+
}
|
|
1403
|
+
export interface MemoryRemeLayoutGetOptions {
|
|
1404
|
+
groupId: string;
|
|
1405
|
+
}
|
|
1406
|
+
export interface MemoryRemeIndexSyncOptions {
|
|
1407
|
+
groupId: string;
|
|
1408
|
+
mode?: 'scan' | 'rebuild';
|
|
1409
|
+
}
|
|
1410
|
+
/** Lower-level ReMe options retained for callers that need source controls. */
|
|
1411
|
+
export interface MemoryRemeSearchOptions {
|
|
1412
|
+
groupId: string;
|
|
1413
|
+
query: string;
|
|
1414
|
+
maxResults?: number;
|
|
1415
|
+
minScore?: number;
|
|
1416
|
+
sources?: string[];
|
|
1417
|
+
vectorWeight?: number;
|
|
1418
|
+
candidateMultiplier?: number;
|
|
1419
|
+
}
|
|
1420
|
+
export interface MemoryRemeGetOptions {
|
|
1421
|
+
groupId: string;
|
|
1422
|
+
path: string;
|
|
1423
|
+
offset?: number;
|
|
1424
|
+
limit?: number;
|
|
1425
|
+
}
|
|
1426
|
+
export interface MemoryRemeContextCheckOptions {
|
|
1427
|
+
groupId: string;
|
|
1428
|
+
messages: MemoryRemeMessage[];
|
|
1429
|
+
contextWindowTokens?: number;
|
|
1430
|
+
reserveTokens?: number;
|
|
1431
|
+
keepRecentTokens?: number;
|
|
1432
|
+
}
|
|
1433
|
+
export interface MemoryRemeCompactOptions {
|
|
1434
|
+
groupId: string;
|
|
1435
|
+
messagesToSummarize: MemoryRemeMessage[];
|
|
1436
|
+
turnPrefixMessages?: MemoryRemeMessage[];
|
|
1437
|
+
previousSummary?: string;
|
|
1438
|
+
language?: string;
|
|
1439
|
+
returnPrompt?: boolean;
|
|
1440
|
+
}
|
|
1441
|
+
export type MemoryRemeDedupIntent = 'new' | 'update' | 'supersede' | 'silent';
|
|
1442
|
+
export interface MemoryRemeDailyFlushOptions {
|
|
1443
|
+
groupId: string;
|
|
1444
|
+
messages: MemoryRemeMessage[];
|
|
1445
|
+
date?: string;
|
|
1446
|
+
version?: string;
|
|
1447
|
+
language?: string;
|
|
1448
|
+
returnPrompt?: boolean;
|
|
1449
|
+
signalPack?: Record<string, unknown>;
|
|
1450
|
+
signalPackTokenBudget?: number;
|
|
1451
|
+
dedupIntent?: MemoryRemeDedupIntent;
|
|
1452
|
+
dedupQuery?: string;
|
|
1453
|
+
}
|
|
1454
|
+
export interface MemoryRemeWriteOptions {
|
|
1455
|
+
groupId: string;
|
|
1456
|
+
target: 'memory' | 'daily';
|
|
1457
|
+
content: string;
|
|
1458
|
+
date?: string;
|
|
1459
|
+
mode?: 'append' | 'replace';
|
|
1460
|
+
idempotencyKey?: string;
|
|
1461
|
+
actorId?: string;
|
|
1462
|
+
sourceRefs?: string[];
|
|
1463
|
+
tags?: string[];
|
|
1464
|
+
supersedes?: string[];
|
|
1465
|
+
dedupIntent?: MemoryRemeDedupIntent;
|
|
1466
|
+
dedupQuery?: string;
|
|
1467
|
+
}
|
|
1468
|
+
export type ContextDetail = 'overview' | 'summary' | 'full';
|
|
1469
|
+
/** Result of context_get; omitted projections depend on the requested detail. */
|
|
1470
|
+
export interface ContextGetResult {
|
|
1471
|
+
version: string;
|
|
1472
|
+
tasks_version: string;
|
|
1473
|
+
coordination: {
|
|
1474
|
+
brief: {
|
|
1475
|
+
objective: string;
|
|
1476
|
+
current_focus: string;
|
|
1477
|
+
constraints: string[];
|
|
1478
|
+
project_brief: string;
|
|
1479
|
+
project_brief_stale: boolean;
|
|
1480
|
+
updated_by: string;
|
|
1481
|
+
updated_at: string;
|
|
1482
|
+
};
|
|
1483
|
+
tasks?: Array<Record<string, unknown>>;
|
|
1484
|
+
recent_decisions?: Array<Record<string, unknown>>;
|
|
1485
|
+
recent_handoffs?: Array<Record<string, unknown>>;
|
|
1486
|
+
};
|
|
1487
|
+
agent_states: Array<Record<string, unknown>>;
|
|
1488
|
+
actors_runtime?: Array<Record<string, unknown>>;
|
|
1489
|
+
tasks_summary?: {
|
|
1490
|
+
total: number;
|
|
1491
|
+
done: number;
|
|
1492
|
+
active: number;
|
|
1493
|
+
planned: number;
|
|
1494
|
+
archived: number;
|
|
1495
|
+
root_count?: number;
|
|
1496
|
+
};
|
|
1497
|
+
attention?: Record<string, unknown>;
|
|
1498
|
+
board?: Record<string, Array<Record<string, unknown>>>;
|
|
1499
|
+
meta?: Record<string, unknown>;
|
|
1500
|
+
}
|
|
1501
|
+
/** Read cached authorized peers; never refreshes peers or starts Actors. */
|
|
1502
|
+
export interface ConnectCatalogOptions {
|
|
1503
|
+
groupId: string;
|
|
1504
|
+
instanceId?: string;
|
|
1505
|
+
targetGroupId?: string;
|
|
1506
|
+
by?: string;
|
|
1507
|
+
after?: string;
|
|
1508
|
+
limit?: number;
|
|
1509
|
+
}
|
|
1510
|
+
/** Remote acceptance is durable queueing, not proof of delivery. */
|
|
1511
|
+
export interface ConnectSendOptions {
|
|
1512
|
+
groupId: string;
|
|
1513
|
+
instanceId: string;
|
|
1514
|
+
targetGroupId: string;
|
|
1515
|
+
/** Required stable retry key, at most 128 UTF-8 bytes. */
|
|
1516
|
+
clientId: string;
|
|
1517
|
+
text: string;
|
|
1518
|
+
mode: MessageMode;
|
|
1519
|
+
by?: string;
|
|
1520
|
+
to?: string[];
|
|
1521
|
+
format?: string;
|
|
1522
|
+
insight?: string;
|
|
1523
|
+
attachments?: Record<string, unknown>[];
|
|
1524
|
+
}
|
|
1525
|
+
export interface ConnectSendFilesOptions extends Omit<ConnectSendOptions, 'text' | 'attachments' | 'format'> {
|
|
1526
|
+
text?: string;
|
|
1527
|
+
paths: string[];
|
|
1528
|
+
}
|
|
1529
|
+
/** A mention identifies a remote Group; it does not send to that Group. */
|
|
1530
|
+
export interface ConnectGroupRef {
|
|
1531
|
+
kind: 'connect_group_ref';
|
|
1532
|
+
instance_name?: string;
|
|
1533
|
+
group_title?: string;
|
|
1534
|
+
token?: string;
|
|
1535
|
+
instance_id: string;
|
|
1536
|
+
group_id: string;
|
|
548
1537
|
}
|
|
549
1538
|
//# sourceMappingURL=types.d.ts.map
|