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/README.md
CHANGED
|
@@ -5,7 +5,7 @@ TypeScript/Node.js client for the CCCC daemon (IPC v1).
|
|
|
5
5
|
## Relationship to CCCC core
|
|
6
6
|
|
|
7
7
|
- CCCC core repository: https://github.com/ChesterRa/cccc
|
|
8
|
-
- `cccc` core provides daemon/web/CLI and owns runtime state.
|
|
8
|
+
- `cccc` core provides one native Rust daemon/web/CLI product and owns runtime state.
|
|
9
9
|
- `cccc-sdk` provides Node.js client APIs that call the daemon over IPC.
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
@@ -14,7 +14,9 @@ TypeScript/Node.js client for the CCCC daemon (IPC v1).
|
|
|
14
14
|
npm install cccc-sdk
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Compatibility is determined by Daemon IPC v1 contracts and operation probing,
|
|
17
|
+
Compatibility is determined by Daemon IPC v1 contracts and operation probing,
|
|
18
|
+
not by strict package-version matching. The current message contract is an
|
|
19
|
+
intentional atomic cut: upgrade SDK and daemon together.
|
|
18
20
|
|
|
19
21
|
## Quick start
|
|
20
22
|
|
|
@@ -26,34 +28,104 @@ async function main() {
|
|
|
26
28
|
|
|
27
29
|
await client.assertCompatible({
|
|
28
30
|
requireIpcV: 1,
|
|
29
|
-
|
|
30
|
-
requireOps: ['groups', 'send', 'reply', 'group_automation_manage'],
|
|
31
|
+
requireOps: ['groups', 'send', 'reply', 'tracked_send', 'context_sync'],
|
|
31
32
|
});
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
const groupId =
|
|
34
|
+
// Use an existing Group and an Agent ID from that Group.
|
|
35
|
+
const groupId = 'g_your_group_id';
|
|
35
36
|
|
|
36
37
|
await client.send({
|
|
37
38
|
groupId,
|
|
38
39
|
text: 'Please check this and reply.',
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
mode: 'request_reply',
|
|
41
|
+
to: ['peer-1'],
|
|
41
42
|
});
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
main().catch(
|
|
45
|
+
main().catch(error => {
|
|
46
|
+
console.error(error);
|
|
47
|
+
process.exitCode = 1;
|
|
48
|
+
});
|
|
45
49
|
```
|
|
46
50
|
|
|
47
51
|
## Message semantics
|
|
48
52
|
|
|
49
|
-
- `
|
|
50
|
-
- `
|
|
53
|
+
- `mode`: `'mail' | 'send' | 'request_reply'` (required for new messages)
|
|
54
|
+
- `insight`: optional visible, provisional sender perspective for independent recipient judgment
|
|
55
|
+
- `suggestedUserMessage`: optional proposed next human message; stored visibly and never auto-sent
|
|
51
56
|
|
|
52
57
|
Supported in:
|
|
53
58
|
- `send(options)`
|
|
54
|
-
- `reply(options)`
|
|
55
59
|
- `sendCrossGroup(options)`
|
|
56
60
|
|
|
61
|
+
`mail` stores without an immediate runtime prompt, `send` performs a
|
|
62
|
+
best-effort immediate Push, and `request_reply` adds a concrete reply request.
|
|
63
|
+
`reply(options)` defaults to Send and accepts `mode: 'mail'` for an agent-only,
|
|
64
|
+
non-urgent reply; both modes fulfill the original reply request. The visible
|
|
65
|
+
message emitted by `trackedSend(options)` remains Send. Generic ACK operations no longer exist; consume Inbox contents
|
|
66
|
+
with `inboxRead(options)`. Inbox contains only Mail; inspect past direct or Mail
|
|
67
|
+
traffic without changing the Mail cursor through `messageHistory(options)`.
|
|
68
|
+
|
|
69
|
+
`suggestedUserMessage` is supported by `send(options)` and `reply(options)`.
|
|
70
|
+
|
|
71
|
+
`contextGet(groupId, detail)` accepts `overview`, `summary`, or `full`.
|
|
72
|
+
`taskList(options)` supports exact batches, filters, atomic status pages, and
|
|
73
|
+
pagination. `groupSpaceSync(options)` is a read-only legacy-status call; use
|
|
74
|
+
explicit ingest/source operations for mutations.
|
|
75
|
+
|
|
76
|
+
## Workflow helpers
|
|
77
|
+
|
|
78
|
+
Current CCCC workflow contracts are exposed as focused wrappers over daemon IPC:
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
await client.trackedSend({
|
|
82
|
+
groupId,
|
|
83
|
+
title: 'Update SDK',
|
|
84
|
+
text: 'Please handle the compatibility update.',
|
|
85
|
+
insight: 'The compatibility plan may preserve an obsolete boundary.',
|
|
86
|
+
outcome: 'Tests and live compat pass',
|
|
87
|
+
assignee: 'peer-impl',
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
await client.coordinationBriefUpdate({
|
|
91
|
+
groupId,
|
|
92
|
+
objective: 'Ship SDK updates',
|
|
93
|
+
currentFocus: 'context v3 compatibility',
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
await client.taskMove({ groupId, taskId: 't_xxx', status: 'done' });
|
|
97
|
+
await client.agentStateUpdate({ groupId, actorId: 'peer-impl', focus: 'testing' });
|
|
98
|
+
await client.capabilitySearch({ groupId, query: 'docs' });
|
|
99
|
+
await client.memoryHealth({ groupId });
|
|
100
|
+
const profile = await client.memoryProfileGet({
|
|
101
|
+
groupId,
|
|
102
|
+
actorId: 'dingtalk-worker',
|
|
103
|
+
tags: ['dingtalk-profile', 'reply-style'],
|
|
104
|
+
});
|
|
105
|
+
const hits = await client.memorySearch({
|
|
106
|
+
groupId,
|
|
107
|
+
actorId: 'dingtalk-worker',
|
|
108
|
+
query: 'How should I reply to this message?',
|
|
109
|
+
limit: 5,
|
|
110
|
+
minScore: 0.2,
|
|
111
|
+
target: 'memory',
|
|
112
|
+
});
|
|
113
|
+
await client.memoryWrite({
|
|
114
|
+
groupId,
|
|
115
|
+
actorId: 'dingtalk-worker',
|
|
116
|
+
target: 'daily',
|
|
117
|
+
content: 'user: ...\nassistant: ...',
|
|
118
|
+
tags: ['dingtalk-auto-reply'],
|
|
119
|
+
sourceRefs: ['dingtalk:message:m1'],
|
|
120
|
+
idempotencyKey: 'dingtalk-reply:m1',
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Local memory helpers use daemon `memory_*` ops and are intended for fast local
|
|
125
|
+
CCCC memory access. They do not depend on Group Space / NotebookLM bindings.
|
|
126
|
+
For raw ReMe result shapes or source selection, use `memoryRemeSearch` and
|
|
127
|
+
`memoryRemeGet`. See `spec/SDK_LOCAL_MEMORY_API.md` in the repository root.
|
|
128
|
+
|
|
57
129
|
## Automation semantics
|
|
58
130
|
|
|
59
131
|
`groupAutomationManage` is action-list based (canonical daemon shape):
|
|
@@ -84,12 +156,10 @@ const client = await CCCCClient.create();
|
|
|
84
156
|
|
|
85
157
|
const upsert = await client.actorProfileUpsert({
|
|
86
158
|
profile: {
|
|
87
|
-
name: 'Codex
|
|
159
|
+
name: 'Codex',
|
|
88
160
|
runtime: 'codex',
|
|
89
|
-
|
|
90
|
-
command: ['codex', 'exec'],
|
|
161
|
+
command: ['codex'],
|
|
91
162
|
submit: 'enter',
|
|
92
|
-
env: { CODEX_MODEL: 'gpt-5' },
|
|
93
163
|
capabilityDefaults: {
|
|
94
164
|
autoloadCapabilities: ['pack:space'],
|
|
95
165
|
defaultScope: 'actor',
|
|
@@ -143,6 +213,194 @@ await client.contextSync({
|
|
|
143
213
|
|
|
144
214
|
If you need a daemon op that does not have a dedicated helper yet, you can always fall back to `call()` / `callRaw()`.
|
|
145
215
|
|
|
216
|
+
## Current native-daemon compatibility surface
|
|
217
|
+
|
|
218
|
+
```typescript
|
|
219
|
+
// Capture the bounded ANSI screen and exact raw cursor boundary.
|
|
220
|
+
const snapshot = await client.terminalSnapshot({
|
|
221
|
+
groupId,
|
|
222
|
+
actorId: 'web-model',
|
|
223
|
+
limitBytes: 512_000,
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
// Read or change the durable delivery mode for a Web Model actor.
|
|
227
|
+
const preference = await client.webModelDeliveryPreferencesGet({
|
|
228
|
+
groupId,
|
|
229
|
+
actorId: 'web-model',
|
|
230
|
+
});
|
|
231
|
+
await client.webModelDeliveryPreferencesUpdate({
|
|
232
|
+
groupId,
|
|
233
|
+
actorId: 'web-model',
|
|
234
|
+
mode: 'image_compat',
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
// Inspect a committed legacy turn without moving the actor cursor.
|
|
238
|
+
const recovered = await client.webModelRuntimeRecoverTurn({
|
|
239
|
+
groupId,
|
|
240
|
+
actorId: 'web-model',
|
|
241
|
+
eventIds: ['e_xxx'],
|
|
242
|
+
});
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
`termResize()` sends the standard `term_resize` operation. For older compatible
|
|
246
|
+
daemon builds that expose `terminal_resize`, the SDK falls back only
|
|
247
|
+
after receiving a structured `unknown_op`; transport failures are never
|
|
248
|
+
replayed, and the legacy result is normalized to the standard shape.
|
|
249
|
+
Auto-discovered clients re-read `ccccd.addr.json` when connection
|
|
250
|
+
establishment fails before any request bytes are sent. Explicit endpoints are
|
|
251
|
+
never replaced.
|
|
252
|
+
|
|
253
|
+
This alignment pass also corrects the exact ReMe, global Remote Access,
|
|
254
|
+
group-scoped IM authorization, Voice model installation, group-copy, and chat
|
|
255
|
+
wire fields. `capabilitySourceDelete()` is deliberately source-scoped: the
|
|
256
|
+
current daemon does not implement instance-scoped deletion and callers should
|
|
257
|
+
not assume otherwise.
|
|
258
|
+
|
|
259
|
+
## CCCC 0.4.33 compatibility delta
|
|
260
|
+
|
|
261
|
+
```typescript
|
|
262
|
+
// Deliberately rotate provider session metadata for Claude, Codex and Grok.
|
|
263
|
+
await client.actorNewSession(groupId, 'reviewer');
|
|
264
|
+
|
|
265
|
+
// Page through retained PTY output by cursor.
|
|
266
|
+
const page = await client.terminalHistory({
|
|
267
|
+
groupId,
|
|
268
|
+
actorId: 'reviewer',
|
|
269
|
+
limitBytes: 64_000,
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
// Large group copies use a daemon-local package path instead of base64 IPC.
|
|
273
|
+
const exported = await client.groupCopyExportFile({ groupId });
|
|
274
|
+
const packagePath = String(exported.package_path);
|
|
275
|
+
const preview = await client.groupCopyPreviewImport({ packagePath });
|
|
276
|
+
const copied = await client.groupCopyImport({ packagePath });
|
|
277
|
+
|
|
278
|
+
// Manage the startup body delivered to the next fresh provider session.
|
|
279
|
+
await client.groupPreambleSet({
|
|
280
|
+
groupId,
|
|
281
|
+
content: 'This initialization is not a task. Wait for the targeted mission.\n',
|
|
282
|
+
});
|
|
283
|
+
const preamble = await client.groupPreambleGet({ groupId });
|
|
284
|
+
await client.groupPreambleReset({ groupId, confirm: 'preamble' });
|
|
285
|
+
|
|
286
|
+
// Upload active-scope files and append one message with daemon-owned attachments.
|
|
287
|
+
await client.sendFiles({
|
|
288
|
+
groupId,
|
|
289
|
+
paths: ['reference.png', 'candidate.png'],
|
|
290
|
+
text: 'Inspect these files',
|
|
291
|
+
to: ['reviewer'],
|
|
292
|
+
});
|
|
293
|
+
|
|
294
|
+
// Current terminal operations.
|
|
295
|
+
const recent = await client.terminalSince({ groupId, actorId: 'reviewer', after: 0 });
|
|
296
|
+
await client.termResize({ groupId, actorId: 'reviewer', cols: 120, rows: 40 });
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
A changed preamble applies on its next delivery; it is not reinjected into a
|
|
300
|
+
session that already received one. `groupReset` creates a new group id and
|
|
301
|
+
does not carry the override forward. If the preamble establishes a standby
|
|
302
|
+
boundary, wait until the actor returns to `waiting` or `idle` before sending
|
|
303
|
+
the authoritative mission. `sendFiles` accepts only regular files beneath
|
|
304
|
+
the group's active scope and validates every path before appending the message.
|
|
305
|
+
|
|
306
|
+
`events_stream` compatibility is verified by probing the operation itself;
|
|
307
|
+
the SDK does not rely only on the daemon's advertised capability flag.
|
|
308
|
+
|
|
309
|
+
`groupReset` is destructive: it creates a clean replacement and removes the
|
|
310
|
+
old group after copying selected configuration. `confirmGroupId` must equal
|
|
311
|
+
`groupId`:
|
|
312
|
+
|
|
313
|
+
```typescript
|
|
314
|
+
await client.groupReset({ groupId, confirmGroupId: groupId });
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## CCCC 0.4.18 surface — Hermes runtime and Voice Secretary lease
|
|
318
|
+
|
|
319
|
+
```typescript
|
|
320
|
+
// Hermes runtime setup diagnostics and MCP preparation
|
|
321
|
+
const status = await client.runtimeHermesStatus();
|
|
322
|
+
await client.runtimeHermesPrepare({ cwd: '.', autoEnableTools: true });
|
|
323
|
+
await client.runtimeHermesMcpTest({ groupId, actorId: 'hermes-1' });
|
|
324
|
+
|
|
325
|
+
// Cross-tab Voice Secretary recording guard
|
|
326
|
+
const lease = await client.assistantVoiceRecordingLease({
|
|
327
|
+
groupId,
|
|
328
|
+
action: 'acquire',
|
|
329
|
+
ownerId: 'browser-tab-1',
|
|
330
|
+
ttlSeconds: 30,
|
|
331
|
+
});
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
## CCCC 0.4.17 surface — new op families
|
|
335
|
+
|
|
336
|
+
```typescript
|
|
337
|
+
const client = await CCCCClient.create();
|
|
338
|
+
|
|
339
|
+
// Tracked delegation — atomic task.create + send with idempotent replay
|
|
340
|
+
const tracked = await client.trackedSend({
|
|
341
|
+
groupId,
|
|
342
|
+
title: 'Fix login race',
|
|
343
|
+
text: 'Please pick this up — see issue link',
|
|
344
|
+
insight: 'The proposed fix may target the symptom rather than the ownership boundary.',
|
|
345
|
+
to: ['alice'],
|
|
346
|
+
idempotencyKey: 'fix-login-race-1',
|
|
347
|
+
refs: [{ kind: 'url', url: 'https://example.com/issue/42' }],
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
// Per-task drill-down
|
|
351
|
+
const task = await client.taskList({ groupId, taskId: String(tracked.task_id) });
|
|
352
|
+
|
|
353
|
+
// Structured refs on chat
|
|
354
|
+
await client.send({
|
|
355
|
+
groupId,
|
|
356
|
+
text: 'Looking at the demo deck',
|
|
357
|
+
insight: 'The deck may make the current option set look more settled than it is.',
|
|
358
|
+
refs: [{ kind: 'presentation_ref', slot_id: 'slot-1' }],
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
// Presentation workspace (slot-based viewer)
|
|
362
|
+
await client.presentationPublish({
|
|
363
|
+
groupId,
|
|
364
|
+
slot: 'slot-1',
|
|
365
|
+
title: 'Plan',
|
|
366
|
+
cardType: 'markdown',
|
|
367
|
+
content: '# Sprint plan\n- ...',
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
// Built-in Voice Secretary lifecycle
|
|
371
|
+
await client.assistantSettingsUpdate({
|
|
372
|
+
groupId,
|
|
373
|
+
assistantId: 'voice_secretary',
|
|
374
|
+
patch: { enabled: true },
|
|
375
|
+
});
|
|
376
|
+
|
|
377
|
+
// Copy a group for migration / backup
|
|
378
|
+
const pkg = await client.groupCopyExport({ groupId });
|
|
379
|
+
const newGroup = await client.groupCopyImport({ packageB64: String(pkg.package_b64) });
|
|
380
|
+
|
|
381
|
+
// Headless runtime control
|
|
382
|
+
await client.headlessSetStatus({ groupId, actorId: 'reviewer', status: 'working' });
|
|
383
|
+
|
|
384
|
+
// Capability Center extensions
|
|
385
|
+
await client.capabilityInstallTarget({
|
|
386
|
+
groupId,
|
|
387
|
+
target: 'github:owner/repo',
|
|
388
|
+
actorId: 'reviewer',
|
|
389
|
+
scope: 'session',
|
|
390
|
+
ttlSeconds: 600,
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
// Operator-side: terminal tail, ledger snapshot, branding/observability
|
|
394
|
+
await client.terminalTail({ groupId, actorId: 'reviewer', maxChars: 4000 });
|
|
395
|
+
await client.ledgerSnapshot({ groupId, reason: 'manual' });
|
|
396
|
+
await client.brandingUpdate({ patch: { product_name: 'My CCCC' } });
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
Use `call()` for intentionally low-level or newly added non-streaming ops that
|
|
400
|
+
do not yet have a dedicated helper. Duplex browser/VNC/PTY attach operations
|
|
401
|
+
remain outside this request/response client and require a separate streaming
|
|
402
|
+
transport contract. See `spec/ADAPTATION_PLAN.md` for the exact boundary.
|
|
403
|
+
|
|
146
404
|
## Events stream
|
|
147
405
|
|
|
148
406
|
```typescript
|
|
@@ -163,9 +421,37 @@ npm run build
|
|
|
163
421
|
|
|
164
422
|
## Requirements
|
|
165
423
|
|
|
166
|
-
- Node.js
|
|
424
|
+
- Node.js 18+
|
|
167
425
|
- Running CCCC daemon
|
|
168
426
|
|
|
169
427
|
## License
|
|
170
428
|
|
|
171
429
|
Apache-2.0
|
|
430
|
+
|
|
431
|
+
## CCCC 0.4.40 alignment
|
|
432
|
+
|
|
433
|
+
All three SDK package versions are 0.4.40; `spec/core.json` records the supported
|
|
434
|
+
core revision. The matching release number is not a replacement for IPC and
|
|
435
|
+
capability checks.
|
|
436
|
+
|
|
437
|
+
Qualified Connect sends require a stable caller-owned retry key:
|
|
438
|
+
|
|
439
|
+
```ts
|
|
440
|
+
await client.connectSend({ groupId: 'local', instanceId: 'remote-instance', targetGroupId: 'remote-group',
|
|
441
|
+
clientId: 'retained-caller-key', text: 'Please review', mode: 'mail' });
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
Use `connect_catalog` / `connectCatalog` to read authorized cached peers and
|
|
445
|
+
`connect_send_files` / `connectSendFiles` to send files from the daemon's project
|
|
446
|
+
scope. Accepted means queued locally, not confirmed delivery. Keep the same key
|
|
447
|
+
and body after an uncertain result; the SDK never automatically replays a send.
|
|
448
|
+
Connect replies use the local received event ID with the ordinary reply helper.
|
|
449
|
+
|
|
450
|
+
`context_sync(if_version=...)` / `contextSync({ ifVersion })` rejects stale
|
|
451
|
+
updates with `version_conflict`. Reload before deciding whether to reapply.
|
|
452
|
+
Terminal history accepts `render_before` / `renderBefore` alongside `before`.
|
|
453
|
+
|
|
454
|
+
Compatibility requirements that lack an advertised capability and an audited
|
|
455
|
+
safe probe now fail instead of being executed or silently skipped. Retired
|
|
456
|
+
Presentation browser and Voice model-install helpers fail locally with migration
|
|
457
|
+
guidance; their interactive replacement belongs to CCCC Web, not daemon IPC.
|
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CCCC SDK client
|
|
3
3
|
*/
|
|
4
|
-
import
|
|
4
|
+
import { type ConnectOps } from './client_connect_ops.js';
|
|
5
|
+
import type { DaemonEndpoint, DaemonResponse, CCCCClientOptions, CompatibilityOptions, ActorAddOptions, ActorUpdateOptions, GroupResetOptions, ActorEnvPrivateUpdateOptions, ActorProfileUpsertOptions, ActorProfileSecretUpdateOptions, ActorProfileSecretCopyFromActorOptions, ActorProfileSecretCopyFromProfileOptions, GroupCreateOptions, GroupUpdateOptions, CapabilityOverviewOptions, CapabilitySearchOptions, CapabilityEnableOptions, CapabilityBlockOptions, CapabilityStateOptions, CapabilityAllowlistGetOptions, CapabilityAllowlistValidateOptions, CapabilityAllowlistUpdateOptions, CapabilityAllowlistResetOptions, CapabilityImportOptions, CapabilityUninstallOptions, CapabilityToolCallOptions, CapabilityVisibilityOptions, CapabilityInstallTargetOptions, CapabilitySourceDeleteOptions, GroupAutomationUpdateOptions, GroupAutomationManageOptions, GroupAutomationResetBaselineOptions, ContextSyncOptions, CoordinationBriefUpdateOptions, CoordinationNoteAddOptions, TaskCreateOptions, TaskUpdateOptions, TaskMoveOptions, TaskRestoreOptions, TaskDeleteOptions, AgentStateUpdateOptions, AgentStateClearOptions, MetaMergeOptions, EventsStreamOptions, EventStreamItem, ContextGetResult, ContextDetail, CapabilityUseOptions, MemorySearchOptions, MemoryGetOptions, MemoryWriteOptions, MemoryHealthOptions, MemoryProfileGetOptions, TrackedSendOptions, TaskListOptions, HeadlessStatusOptions, HeadlessSetStatusOptions, GroupCopyExportOptions, GroupCopyPreviewImportOptions, GroupCopyImportOptions, PresentationGetOptions, PresentationPublishOptions, PresentationClearOptions, PresentationBrowserOpenOptions, PresentationBrowserInfoOptions, PresentationBrowserCloseOptions, AssistantStateOptions, AssistantVoiceRecordingLeaseOptions, AssistantSettingsUpdateOptions, AssistantStatusUpdateOptions, ObservabilityUpdateOptions, BrandingUpdateOptions, DebugSnapshotOptions, DebugTailLogsOptions, DebugClearLogsOptions, TerminalTailOptions, TerminalClearOptions, LedgerSnapshotOptions, LedgerCompactOptions, StreamEmitOptions, SystemNotifyOptions, RegistryReconcileOptions, GroupDetachScopeOptions, RuntimeHermesPrepareOptions, RuntimeHermesMcpTestOptions } from './types.js';
|
|
6
|
+
import { type CCCC0430Ops } from './client_0430_ops.js';
|
|
7
|
+
import { type CCCC0434Ops } from './client_0434_ops.js';
|
|
8
|
+
import { type GroupSpaceOps } from './client_group_space_ops.js';
|
|
9
|
+
import { type ChatOps } from './client_chat_ops.js';
|
|
5
10
|
/**
|
|
6
11
|
* Client for communicating with the CCCC daemon over IPC (Unix socket or TCP).
|
|
7
12
|
*
|
|
@@ -12,8 +17,10 @@ import type { DaemonEndpoint, DaemonResponse, CCCCClientOptions, CompatibilityOp
|
|
|
12
17
|
* ```
|
|
13
18
|
*/
|
|
14
19
|
export declare class CCCCClient {
|
|
15
|
-
private
|
|
20
|
+
private _endpoint;
|
|
16
21
|
private readonly _timeoutMs;
|
|
22
|
+
private readonly _ccccHome?;
|
|
23
|
+
private readonly _endpointExplicit;
|
|
17
24
|
private constructor();
|
|
18
25
|
/**
|
|
19
26
|
* Create a new client instance, auto-discovering the daemon endpoint.
|
|
@@ -77,6 +84,8 @@ export declare class CCCCClient {
|
|
|
77
84
|
* Delete group
|
|
78
85
|
*/
|
|
79
86
|
groupDelete(groupId: string, by?: string): Promise<Record<string, unknown>>;
|
|
87
|
+
/** Replace a group with a clean group while preserving selected configuration. */
|
|
88
|
+
groupReset(options: GroupResetOptions): Promise<Record<string, unknown>>;
|
|
80
89
|
/**
|
|
81
90
|
* Use group (set active scope)
|
|
82
91
|
*/
|
|
@@ -123,7 +132,7 @@ export declare class CCCCClient {
|
|
|
123
132
|
actorList(groupId: string): Promise<Record<string, unknown>>;
|
|
124
133
|
/**
|
|
125
134
|
* Add an actor to a group.
|
|
126
|
-
* @param options - Actor configuration (id, runtime,
|
|
135
|
+
* @param options - Actor configuration (id, runtime, command, etc.).
|
|
127
136
|
* @returns The daemon result (includes assigned actor id).
|
|
128
137
|
* @throws {DaemonAPIError} On invalid group or duplicate actor id.
|
|
129
138
|
*/
|
|
@@ -148,6 +157,9 @@ export declare class CCCCClient {
|
|
|
148
157
|
* Restart actor
|
|
149
158
|
*/
|
|
150
159
|
actorRestart(groupId: string, actorId: string, by?: string): Promise<Record<string, unknown>>;
|
|
160
|
+
runtimeHermesStatus(): Promise<Record<string, unknown>>;
|
|
161
|
+
runtimeHermesPrepare(options?: RuntimeHermesPrepareOptions): Promise<Record<string, unknown>>;
|
|
162
|
+
runtimeHermesMcpTest(options?: RuntimeHermesMcpTestOptions): Promise<Record<string, unknown>>;
|
|
151
163
|
/**
|
|
152
164
|
* List actor private env keys (without values)
|
|
153
165
|
*/
|
|
@@ -236,105 +248,84 @@ export declare class CCCCClient {
|
|
|
236
248
|
* Call one enabled dynamic capability tool through daemon IPC.
|
|
237
249
|
*/
|
|
238
250
|
capabilityToolCall(options: CapabilityToolCallOptions): Promise<Record<string, unknown>>;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
send(options: SendOptions): Promise<Record<string, unknown>>;
|
|
246
|
-
/**
|
|
247
|
-
* Send message across groups
|
|
248
|
-
*/
|
|
249
|
-
sendCrossGroup(options: SendCrossGroupOptions): Promise<Record<string, unknown>>;
|
|
250
|
-
/**
|
|
251
|
-
* Reply message
|
|
252
|
-
*/
|
|
253
|
-
reply(options: ReplyOptions): Promise<Record<string, unknown>>;
|
|
254
|
-
/**
|
|
255
|
-
* Acknowledge chat message
|
|
256
|
-
*/
|
|
257
|
-
chatAck(groupId: string, actorId: string, eventId: string, by?: string): Promise<Record<string, unknown>>;
|
|
258
|
-
/**
|
|
259
|
-
* List inbox
|
|
260
|
-
*/
|
|
261
|
-
inboxList(options: InboxListOptions): Promise<Record<string, unknown>>;
|
|
262
|
-
/**
|
|
263
|
-
* Mark message as read
|
|
264
|
-
*/
|
|
265
|
-
inboxMarkRead(groupId: string, actorId: string, eventId: string, by?: string): Promise<Record<string, unknown>>;
|
|
266
|
-
/**
|
|
267
|
-
* Mark all messages as read
|
|
268
|
-
*/
|
|
269
|
-
inboxMarkAllRead(groupId: string, actorId: string, by?: string, kindFilter?: string): Promise<Record<string, unknown>>;
|
|
270
|
-
/**
|
|
271
|
-
* Acknowledge notification
|
|
272
|
-
*/
|
|
273
|
-
notifyAck(groupId: string, actorId: string, notifyEventId: string, by?: string): Promise<Record<string, unknown>>;
|
|
251
|
+
capabilityUse(options: CapabilityUseOptions): Promise<Record<string, unknown>>;
|
|
252
|
+
memorySearch(options: MemorySearchOptions): Promise<Record<string, unknown>>;
|
|
253
|
+
memoryGet(options: MemoryGetOptions): Promise<Record<string, unknown>>;
|
|
254
|
+
memoryWrite(options: MemoryWriteOptions): Promise<Record<string, unknown>>;
|
|
255
|
+
memoryHealth(options: MemoryHealthOptions): Promise<Record<string, unknown>>;
|
|
256
|
+
memoryProfileGet(options: MemoryProfileGetOptions): Promise<Record<string, unknown>>;
|
|
274
257
|
/**
|
|
275
258
|
* Get group context
|
|
276
259
|
*/
|
|
277
|
-
contextGet(groupId: string): Promise<
|
|
260
|
+
contextGet(groupId: string, detail?: ContextDetail): Promise<ContextGetResult>;
|
|
278
261
|
/**
|
|
279
262
|
* Sync context
|
|
280
263
|
*/
|
|
281
264
|
contextSync(options: ContextSyncOptions): Promise<Record<string, unknown>>;
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
*
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
265
|
+
private contextOp;
|
|
266
|
+
coordinationBriefUpdate(options: CoordinationBriefUpdateOptions): Promise<Record<string, unknown>>;
|
|
267
|
+
coordinationNoteAdd(options: CoordinationNoteAddOptions): Promise<Record<string, unknown>>;
|
|
268
|
+
taskCreate(options: TaskCreateOptions): Promise<Record<string, unknown>>;
|
|
269
|
+
taskUpdate(options: TaskUpdateOptions): Promise<Record<string, unknown>>;
|
|
270
|
+
taskMove(options: TaskMoveOptions): Promise<Record<string, unknown>>;
|
|
271
|
+
taskRestore(options: TaskRestoreOptions): Promise<Record<string, unknown>>;
|
|
272
|
+
taskDelete(options: TaskDeleteOptions): Promise<Record<string, unknown>>;
|
|
273
|
+
agentStateUpdate(options: AgentStateUpdateOptions): Promise<Record<string, unknown>>;
|
|
274
|
+
agentStateClear(options: AgentStateClearOptions): Promise<Record<string, unknown>>;
|
|
275
|
+
metaMerge(options: MetaMergeOptions): Promise<Record<string, unknown>>;
|
|
276
|
+
/**
|
|
277
|
+
* Atomically create a tracked task and send the linked chat message. Daemon
|
|
278
|
+
* handles task.create + send in one transaction. Use `idempotencyKey` to make
|
|
279
|
+
* retries safe (the daemon replays the previous result on duplicate keys).
|
|
280
|
+
*/
|
|
281
|
+
trackedSend(options: TrackedSendOptions): Promise<Record<string, unknown>>;
|
|
282
|
+
/**
|
|
283
|
+
* List all tasks in a group, or fetch a single task (with children) by id.
|
|
284
|
+
*/
|
|
285
|
+
taskList(options: TaskListOptions): Promise<Record<string, unknown>>;
|
|
286
|
+
headlessStatus(options: HeadlessStatusOptions): Promise<Record<string, unknown>>;
|
|
287
|
+
headlessSetStatus(options: HeadlessSetStatusOptions): Promise<Record<string, unknown>>;
|
|
288
|
+
groupCopyExport(options: GroupCopyExportOptions): Promise<Record<string, unknown>>;
|
|
289
|
+
groupCopyPreviewImport(options: GroupCopyPreviewImportOptions): Promise<Record<string, unknown>>;
|
|
290
|
+
groupCopyImport(options: GroupCopyImportOptions): Promise<Record<string, unknown>>;
|
|
291
|
+
capabilityVisibility(options: CapabilityVisibilityOptions): Promise<Record<string, unknown>>;
|
|
292
|
+
capabilityInstallTarget(options: CapabilityInstallTargetOptions): Promise<Record<string, unknown>>;
|
|
293
|
+
capabilitySourceDelete(options: CapabilitySourceDeleteOptions): Promise<Record<string, unknown>>;
|
|
294
|
+
presentationGet(options: PresentationGetOptions): Promise<Record<string, unknown>>;
|
|
295
|
+
presentationPublish(options: PresentationPublishOptions): Promise<Record<string, unknown>>;
|
|
296
|
+
presentationClear(options: PresentationClearOptions): Promise<Record<string, unknown>>;
|
|
297
|
+
/** @deprecated This browser surface is served by CCCC Web, not daemon IPC. */
|
|
298
|
+
presentationBrowserOpen(options: PresentationBrowserOpenOptions): Promise<Record<string, unknown>>;
|
|
299
|
+
/** @deprecated This browser surface is served by CCCC Web, not daemon IPC. */
|
|
300
|
+
presentationBrowserInfo(options: PresentationBrowserInfoOptions): Promise<Record<string, unknown>>;
|
|
301
|
+
/** @deprecated This browser surface is served by CCCC Web, not daemon IPC. */
|
|
302
|
+
presentationBrowserClose(options: PresentationBrowserCloseOptions): Promise<Record<string, unknown>>;
|
|
303
|
+
assistantState(options: AssistantStateOptions): Promise<Record<string, unknown>>;
|
|
304
|
+
assistantVoiceRecordingLease(options: AssistantVoiceRecordingLeaseOptions): Promise<Record<string, unknown>>;
|
|
305
|
+
assistantSettingsUpdate(options: AssistantSettingsUpdateOptions): Promise<Record<string, unknown>>;
|
|
306
|
+
assistantStatusUpdate(options: AssistantStatusUpdateOptions): Promise<Record<string, unknown>>;
|
|
307
|
+
/** Trigger graceful daemon shutdown (no-args). */
|
|
308
|
+
shutdown(): Promise<Record<string, unknown>>;
|
|
309
|
+
observabilityGet(): Promise<Record<string, unknown>>;
|
|
310
|
+
observabilityUpdate(options: ObservabilityUpdateOptions): Promise<Record<string, unknown>>;
|
|
311
|
+
brandingGet(): Promise<Record<string, unknown>>;
|
|
312
|
+
brandingUpdate(options: BrandingUpdateOptions): Promise<Record<string, unknown>>;
|
|
313
|
+
debugSnapshot(options: DebugSnapshotOptions): Promise<Record<string, unknown>>;
|
|
314
|
+
debugTailLogs(options: DebugTailLogsOptions): Promise<Record<string, unknown>>;
|
|
315
|
+
debugClearLogs(options: DebugClearLogsOptions): Promise<Record<string, unknown>>;
|
|
316
|
+
terminalTail(options: TerminalTailOptions): Promise<Record<string, unknown>>;
|
|
317
|
+
terminalClear(options: TerminalClearOptions): Promise<Record<string, unknown>>;
|
|
318
|
+
ledgerSnapshot(options: LedgerSnapshotOptions): Promise<Record<string, unknown>>;
|
|
319
|
+
ledgerCompact(options: LedgerCompactOptions): Promise<Record<string, unknown>>;
|
|
320
|
+
/**
|
|
321
|
+
* Emit a chat.stream event (`op` = 'start' | 'update' | 'end').
|
|
322
|
+
* For 'start', a new stream_id is generated and returned. For
|
|
323
|
+
* 'update'/'end', supply the stream_id you got from 'start'.
|
|
324
|
+
*/
|
|
325
|
+
streamEmit(options: StreamEmitOptions): Promise<Record<string, unknown>>;
|
|
326
|
+
systemNotify(options: SystemNotifyOptions): Promise<Record<string, unknown>>;
|
|
327
|
+
registryReconcile(options?: RegistryReconcileOptions): Promise<Record<string, unknown>>;
|
|
328
|
+
groupDetachScope(options: GroupDetachScopeOptions): Promise<Record<string, unknown>>;
|
|
338
329
|
/**
|
|
339
330
|
* Subscribe to the group event stream (Server-Sent Events style, long-lived connection).
|
|
340
331
|
* Yields {@link EventStreamItem} objects as they arrive. The socket is destroyed
|
|
@@ -345,4 +336,6 @@ export declare class CCCCClient {
|
|
|
345
336
|
*/
|
|
346
337
|
eventsStream(options: EventsStreamOptions): AsyncGenerator<EventStreamItem>;
|
|
347
338
|
}
|
|
339
|
+
export interface CCCCClient extends CCCC0430Ops, CCCC0434Ops, GroupSpaceOps, ChatOps, ConnectOps {
|
|
340
|
+
}
|
|
348
341
|
//# sourceMappingURL=client.d.ts.map
|