cccc-sdk 0.4.4 → 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.
Files changed (58) hide show
  1. package/README.md +252 -16
  2. package/dist/client.d.ts +87 -163
  3. package/dist/client.d.ts.map +1 -1
  4. package/dist/client.js +663 -536
  5. package/dist/client.js.map +1 -1
  6. package/dist/client_0430_admin_ops.d.ts +56 -0
  7. package/dist/client_0430_admin_ops.d.ts.map +1 -0
  8. package/dist/client_0430_admin_ops.js +143 -0
  9. package/dist/client_0430_admin_ops.js.map +1 -0
  10. package/dist/client_0430_assistant_ops.d.ts +106 -0
  11. package/dist/client_0430_assistant_ops.d.ts.map +1 -0
  12. package/dist/client_0430_assistant_ops.js +122 -0
  13. package/dist/client_0430_assistant_ops.js.map +1 -0
  14. package/dist/client_0430_memory_ops.d.ts +14 -0
  15. package/dist/client_0430_memory_ops.d.ts.map +1 -0
  16. package/dist/client_0430_memory_ops.js +84 -0
  17. package/dist/client_0430_memory_ops.js.map +1 -0
  18. package/dist/client_0430_ops.d.ts +8 -0
  19. package/dist/client_0430_ops.d.ts.map +1 -0
  20. package/dist/client_0430_ops.js +9 -0
  21. package/dist/client_0430_ops.js.map +1 -0
  22. package/dist/client_0430_shared.d.ts +15 -0
  23. package/dist/client_0430_shared.d.ts.map +1 -0
  24. package/dist/client_0430_shared.js +4 -0
  25. package/dist/client_0430_shared.js.map +1 -0
  26. package/dist/client_0434_ops.d.ts +10 -0
  27. package/dist/client_0434_ops.d.ts.map +1 -0
  28. package/dist/client_0434_ops.js +43 -0
  29. package/dist/client_0434_ops.js.map +1 -0
  30. package/dist/client_chat_ops.d.ts +28 -0
  31. package/dist/client_chat_ops.d.ts.map +1 -0
  32. package/dist/client_chat_ops.js +213 -0
  33. package/dist/client_chat_ops.js.map +1 -0
  34. package/dist/client_connect_ops.d.ts +9 -0
  35. package/dist/client_connect_ops.d.ts.map +1 -0
  36. package/dist/client_connect_ops.js +44 -0
  37. package/dist/client_connect_ops.js.map +1 -0
  38. package/dist/client_group_space_ops.d.ts +24 -0
  39. package/dist/client_group_space_ops.d.ts.map +1 -0
  40. package/dist/client_group_space_ops.js +167 -0
  41. package/dist/client_group_space_ops.js.map +1 -0
  42. package/dist/errors.d.ts +17 -1
  43. package/dist/errors.d.ts.map +1 -1
  44. package/dist/errors.js +26 -1
  45. package/dist/errors.js.map +1 -1
  46. package/dist/index.d.ts +4 -4
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +3 -3
  49. package/dist/index.js.map +1 -1
  50. package/dist/transport.d.ts +4 -3
  51. package/dist/transport.d.ts.map +1 -1
  52. package/dist/transport.js +236 -120
  53. package/dist/transport.js.map +1 -1
  54. package/dist/types.d.ts +752 -89
  55. package/dist/types.d.ts.map +1 -1
  56. package/dist/types.js +7 -3
  57. package/dist/types.js.map +1 -1
  58. 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?: 1;
12
+ v: number;
13
13
  ok: boolean;
14
14
  result?: Record<string, unknown>;
15
15
  error?: DaemonErrorPayload;
@@ -68,26 +68,57 @@ export interface CCCSEvent {
68
68
  /** Data payload for `chat.message` events */
69
69
  export interface ChatMessageEventData {
70
70
  text: string;
71
+ insight?: string | null;
71
72
  format?: string;
72
- priority?: 'normal' | 'attention';
73
- reply_required?: boolean;
73
+ /** Absent only on immutable messages written before the current contract. */
74
+ message_mode?: MessageMode;
74
75
  to?: string[];
75
76
  reply_to?: string | null;
76
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;
77
88
  src_group_id?: string | null;
78
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>;
79
96
  dst_group_id?: string | null;
80
97
  dst_to?: string[] | null;
98
+ dst_message_mode?: MessageMode | null;
81
99
  refs?: unknown[];
82
100
  attachments?: unknown[];
83
101
  thread?: string;
102
+ stream_id?: string | null;
103
+ pending_event_id?: string | null;
84
104
  client_id?: string | null;
105
+ suggested_user_message?: string | null;
85
106
  }
86
- /** Data payload for `chat.read` events */
87
- export interface ChatReadEventData {
107
+ /** Data payload for `mail.read` events */
108
+ export interface MailReadEventData {
88
109
  actor_id: string;
89
110
  event_id: string;
90
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
+ }
91
122
  /** Data payload for `notify.reminder` events */
92
123
  export interface NotifyReminderEventData {
93
124
  rule_id: string;
@@ -95,22 +126,28 @@ export interface NotifyReminderEventData {
95
126
  message?: string;
96
127
  snippet?: string;
97
128
  priority?: string;
98
- requires_ack?: boolean;
99
129
  }
100
130
  /** A chat.message event with strongly-typed data */
101
131
  export interface ChatMessageEvent extends CCCSEvent {
102
132
  kind: 'chat.message';
103
133
  data: ChatMessageEventData & Record<string, unknown>;
104
134
  }
105
- /** A chat.read event with strongly-typed data */
106
- export interface ChatReadEvent extends CCCSEvent {
107
- kind: 'chat.read';
108
- data: ChatReadEventData & Record<string, unknown>;
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>;
109
144
  }
110
145
  /** Type guard: is this event a chat.message? */
111
146
  export declare function isChatMessageEvent(event: CCCSEvent): event is ChatMessageEvent;
112
- /** Type guard: is this event a chat.read? */
113
- export declare function isChatReadEvent(event: CCCSEvent): event is ChatReadEvent;
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;
114
151
  /** Type guard: is this stream item an event? */
115
152
  export declare function isStreamEvent(item: EventStreamItem): item is EventStreamEvent;
116
153
  /** Type guard: is this stream item a heartbeat? */
@@ -127,64 +164,185 @@ export interface CompatibilityOptions {
127
164
  requireCapabilities?: Record<string, boolean>;
128
165
  requireOps?: string[];
129
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
+ }
130
221
  /** Send message options */
222
+ export type MessageMode = 'send' | 'request_reply' | 'mail';
223
+ export type ReplyMessageMode = 'send' | 'mail';
131
224
  export interface SendOptions {
132
225
  groupId: string;
133
226
  text: string;
227
+ mode: MessageMode;
228
+ insight?: string;
229
+ suggestedUserMessage?: string;
134
230
  by?: string;
135
231
  to?: string[];
136
- priority?: 'normal' | 'attention';
137
- replyRequired?: boolean;
138
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;
139
248
  }
140
249
  /** Send-cross-group options */
141
250
  export interface SendCrossGroupOptions {
142
251
  groupId: string;
143
252
  dstGroupId: string;
144
253
  text: string;
254
+ mode: MessageMode;
255
+ insight?: string;
145
256
  by?: string;
146
257
  to?: string[];
147
- priority?: 'normal' | 'attention';
148
- replyRequired?: boolean;
149
- }
150
- /** Create a task and send a linked visible delegation message. */
151
- export interface TrackedSendOptions extends SendOptions {
152
- title: string;
153
- outcome?: string;
154
- assignee?: string;
155
- handoffTo?: string;
156
- waitingOn?: 'none' | 'user' | 'actor' | 'external';
157
- checklist?: Array<{
158
- id?: string;
159
- text: string;
160
- status?: 'pending' | 'in_progress' | 'done';
161
- }>;
162
- notes?: string;
258
+ requirePeerInsight?: boolean;
163
259
  }
164
260
  /** Reply message options */
165
261
  export interface ReplyOptions {
166
262
  groupId: string;
167
263
  replyTo: string;
168
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;
269
+ by?: string;
270
+ to?: string[];
271
+ refs?: MessageRef[];
272
+ attachments?: MessageAttachment[];
273
+ clientId?: string;
274
+ requirePeerInsight?: boolean;
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;
169
286
  by?: string;
170
287
  to?: string[];
171
- priority?: 'normal' | 'attention';
172
- replyRequired?: boolean;
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;
173
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 & {});
174
330
  /** Add actor options */
175
331
  export interface ActorAddOptions {
176
332
  groupId: string;
177
333
  actorId?: string;
178
334
  title?: string;
179
- runtime?: string;
180
- runner?: string;
335
+ runtime?: AgentRuntime;
181
336
  command?: string[];
182
337
  env?: Record<string, string>;
183
338
  envPrivate?: Record<string, string>;
184
339
  capabilityAutoload?: string[];
340
+ capabilityHidden?: string[];
185
341
  profileId?: string;
342
+ profileScope?: 'global' | 'user';
343
+ profileOwner?: string;
186
344
  defaultScopeKey?: string;
187
- submit?: string;
345
+ submit?: 'enter' | 'newline' | 'none' | (string & {});
188
346
  by?: string;
189
347
  }
190
348
  /** Update actor options */
@@ -196,6 +354,341 @@ export interface ActorUpdateOptions {
196
354
  profileAction?: 'convert_to_custom';
197
355
  by?: string;
198
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
+ }
199
692
  /** Actor private env vars (secrets, runtime-only) */
200
693
  export interface ActorEnvPrivateUpdateOptions {
201
694
  groupId: string;
@@ -437,7 +930,7 @@ export interface GroupSpaceArtifactOptions {
437
930
  wait?: boolean;
438
931
  saveToSpace?: boolean;
439
932
  outputPath?: string;
440
- outputFormat?: 'json' | 'markdown' | 'html';
933
+ outputFormat?: 'json' | 'markdown' | 'html' | 'pdf' | 'pptx' | 'csv';
441
934
  artifactId?: string;
442
935
  timeoutSeconds?: number;
443
936
  initialInterval?: number;
@@ -460,8 +953,6 @@ export interface GroupSpaceJobsOptions {
460
953
  export interface GroupSpaceSyncOptions {
461
954
  groupId: string;
462
955
  lane: GroupSpaceLane;
463
- action?: 'status' | 'run';
464
- force?: boolean;
465
956
  provider?: GroupSpaceProvider;
466
957
  by?: string;
467
958
  }
@@ -481,12 +972,14 @@ export interface GroupSpaceProviderCredentialUpdateOptions {
481
972
  export interface GroupSpaceProviderHealthCheckOptions {
482
973
  provider?: GroupSpaceProvider;
483
974
  by?: string;
975
+ authJson?: string;
484
976
  }
485
977
  /** Provider auth flow options */
486
978
  export interface GroupSpaceProviderAuthOptions {
487
979
  provider?: GroupSpaceProvider;
488
- action?: 'status' | 'start' | 'cancel';
980
+ action?: 'status' | 'start' | 'cancel' | 'disconnect';
489
981
  timeoutSeconds?: number;
982
+ projected?: boolean;
490
983
  by?: string;
491
984
  }
492
985
  /** Automation notify priority */
@@ -516,7 +1009,6 @@ export interface AutomationActionNotify {
516
1009
  snippet_ref?: string | null;
517
1010
  message?: string;
518
1011
  priority?: AutomationNotifyPriority;
519
- requires_ack?: boolean;
520
1012
  }
521
1013
  /** Automation action (group state) */
522
1014
  export interface AutomationActionGroupState {
@@ -594,16 +1086,34 @@ export interface GroupAutomationResetBaselineOptions {
594
1086
  by?: string;
595
1087
  expectedVersion?: number;
596
1088
  }
597
- /** Inbox list options */
598
- export interface InboxListOptions {
1089
+ /** Read or peek at an actor Inbox. Reading advances the read cursor. */
1090
+ export interface InboxOptions {
599
1091
  groupId: string;
600
1092
  actorId: string;
601
1093
  by?: string;
602
1094
  limit?: number;
603
- kindFilter?: string;
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;
604
1113
  }
605
1114
  /** Context sync options */
606
1115
  export interface ContextSyncOptions {
1116
+ ifVersion?: string;
607
1117
  groupId: string;
608
1118
  ops: Record<string, unknown>[];
609
1119
  by?: string;
@@ -672,6 +1182,9 @@ export interface TaskMoveOptions extends ContextWrapperOptions {
672
1182
  export interface TaskRestoreOptions extends ContextWrapperOptions {
673
1183
  taskId: string;
674
1184
  }
1185
+ export interface TaskDeleteOptions extends ContextWrapperOptions {
1186
+ taskId: string;
1187
+ }
675
1188
  /** Update or clear per-actor working memory. */
676
1189
  export interface AgentStateUpdateOptions extends ContextWrapperOptions {
677
1190
  actorId: string;
@@ -685,7 +1198,6 @@ export interface AgentStateUpdateOptions extends ContextWrapperOptions {
685
1198
  environmentSummary?: string;
686
1199
  userModel?: string;
687
1200
  personaNotes?: string;
688
- resumeHint?: string;
689
1201
  }
690
1202
  export interface AgentStateClearOptions extends ContextWrapperOptions {
691
1203
  actorId: string;
@@ -704,20 +1216,21 @@ export interface EventsStreamOptions {
704
1216
  /** AbortSignal to tear down the stream. When aborted the async generator returns. */
705
1217
  signal?: AbortSignal;
706
1218
  }
707
- /** Result of send / reply / sendCrossGroup */
1219
+ /** Result of send, sendFiles, or reply. */
708
1220
  export interface SendResult {
709
1221
  event: CCCSEvent;
710
- ack_event: CCCSEvent | null;
1222
+ /** Canonical mode stored on the event; replies always return `send`. */
1223
+ message_mode: MessageMode;
711
1224
  }
712
1225
  /** Options for sendAndWaitForReply */
713
- export interface SendAndWaitOptions extends SendOptions {
1226
+ export type SendAndWaitOptions = Omit<SendOptions, 'mode'> & {
714
1227
  /** Actor ID that will listen for the reply (used to open events stream). */
715
1228
  listenAs: string;
716
1229
  /** Timeout in ms to wait for a reply (default 60_000). */
717
1230
  waitTimeoutMs?: number;
718
1231
  /** AbortSignal to cancel the wait. */
719
1232
  signal?: AbortSignal;
720
- }
1233
+ };
721
1234
  /** Actor descriptor returned by daemon */
722
1235
  export interface ActorInfo {
723
1236
  id: string;
@@ -753,9 +1266,13 @@ export interface GroupInfo {
753
1266
  }
754
1267
  /** Result of ping */
755
1268
  export interface PingResult {
1269
+ version: string;
1270
+ implementation: string;
1271
+ pid: number;
1272
+ ts: string;
756
1273
  ipc_v: number;
757
- version?: string;
758
- capabilities?: Record<string, boolean>;
1274
+ capabilities: Record<string, unknown>;
1275
+ compatibility?: string;
759
1276
  [key: string]: unknown;
760
1277
  }
761
1278
  /** Result of groups list */
@@ -779,37 +1296,58 @@ export interface ActorListResult {
779
1296
  export interface ActorAddResult {
780
1297
  actor_id: string;
781
1298
  }
782
- /** Result of inbox_list */
783
- export interface InboxListResult {
1299
+ /** Result of inbox_peek */
1300
+ export interface InboxPeekResult {
784
1301
  messages: CCCSEvent[];
785
- cursor?: {
1302
+ cursor: {
786
1303
  event_id: string;
787
1304
  ts: string;
788
1305
  };
789
1306
  }
790
- /** File send options */
791
- export interface FileSendOptions {
792
- groupId: string;
793
- path: string;
794
- text?: string;
795
- by?: string;
796
- to?: string[];
797
- priority?: 'normal' | 'attention';
798
- replyRequired?: boolean;
1307
+ /** Result of inbox_read */
1308
+ export interface InboxReadResult extends InboxPeekResult {
1309
+ event: CCCSEvent | null;
1310
+ cursor: InboxPeekResult['cursor'] & {
1311
+ updated_at?: string;
1312
+ };
799
1313
  }
800
- /** Ledger tail options */
801
- export interface LedgerTailOptions {
802
- groupId: string;
803
- limit?: number;
804
- maxChars?: number;
805
- by?: string;
1314
+ /** Result of message_history. */
1315
+ export interface MessageHistoryResult {
1316
+ messages: CCCSEvent[];
1317
+ has_more: boolean;
806
1318
  }
807
- /** Terminal tail options */
808
- export interface TerminalTailOptions {
809
- groupId: string;
810
- actorId: string;
811
- lines?: number;
812
- by?: string;
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
+ };
813
1351
  }
814
1352
  export interface CapabilityUseOptions extends CapabilityEnableOptions {
815
1353
  toolName?: string;
@@ -817,15 +1355,19 @@ export interface CapabilityUseOptions extends CapabilityEnableOptions {
817
1355
  }
818
1356
  /** Local CCCC memory operation options. */
819
1357
  export interface MemorySearchOptions {
820
- groupId?: string;
1358
+ groupId: string;
821
1359
  actorId?: string;
822
1360
  query: string;
823
1361
  limit?: number;
1362
+ maxResults?: number;
1363
+ vectorWeight?: number;
1364
+ candidateMultiplier?: number;
1365
+ minScore?: number;
824
1366
  tags?: string[];
825
1367
  target?: 'memory' | 'daily';
826
1368
  }
827
1369
  export interface MemoryWriteOptions {
828
- groupId?: string;
1370
+ groupId: string;
829
1371
  actorId?: string;
830
1372
  target: 'memory' | 'daily';
831
1373
  content: string;
@@ -836,7 +1378,7 @@ export interface MemoryWriteOptions {
836
1378
  dedupQuery?: string;
837
1379
  }
838
1380
  export interface MemoryGetOptions {
839
- groupId?: string;
1381
+ groupId: string;
840
1382
  actorId?: string;
841
1383
  path?: string;
842
1384
  target?: 'memory' | 'daily';
@@ -845,31 +1387,152 @@ export interface MemoryGetOptions {
845
1387
  limit?: number;
846
1388
  }
847
1389
  export interface MemoryHealthOptions {
848
- groupId?: string;
1390
+ groupId: string;
849
1391
  }
850
1392
  export interface MemoryProfileGetOptions {
851
- groupId?: string;
1393
+ groupId: string;
852
1394
  actorId?: string;
853
1395
  userId?: string;
854
1396
  tags?: string[];
855
1397
  }
856
- /** Result of context_get */
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. */
857
1470
  export interface ContextGetResult {
858
1471
  version: string;
859
- vision?: string | null;
860
- sketch?: string | null;
861
- milestones?: unknown[];
862
- notes?: unknown[];
863
- references?: unknown[];
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>>;
864
1489
  tasks_summary?: {
865
1490
  total: number;
866
1491
  done: number;
867
1492
  active: number;
868
1493
  planned: number;
1494
+ archived: number;
1495
+ root_count?: number;
869
1496
  };
870
- active_task?: unknown;
871
- presence?: {
872
- agents: unknown[];
873
- };
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;
874
1537
  }
875
1538
  //# sourceMappingURL=types.d.ts.map