cccc-sdk 0.1.0 → 0.1.1
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 +68 -186
- package/dist/client.d.ts +101 -186
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +373 -410
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +28 -10
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +42 -16
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -10
- package/dist/index.js.map +1 -0
- package/dist/transport.d.ts +19 -24
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +202 -92
- package/dist/transport.js.map +1 -0
- package/dist/types.d.ts +273 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/package.json +24 -25
- package/dist/types/actor.d.ts +0 -42
- package/dist/types/actor.d.ts.map +0 -1
- package/dist/types/actor.js +0 -5
- package/dist/types/actor.js.map +0 -1
- package/dist/types/context.d.ts +0 -89
- package/dist/types/context.d.ts.map +0 -1
- package/dist/types/context.js +0 -5
- package/dist/types/context.js.map +0 -1
- package/dist/types/event.d.ts +0 -15
- package/dist/types/event.d.ts.map +0 -1
- package/dist/types/event.js +0 -5
- package/dist/types/event.js.map +0 -1
- package/dist/types/group.d.ts +0 -33
- package/dist/types/group.d.ts.map +0 -1
- package/dist/types/group.js +0 -5
- package/dist/types/group.js.map +0 -1
- package/dist/types/index.d.ts +0 -10
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -10
- package/dist/types/index.js.map +0 -1
- package/dist/types/ipc.d.ts +0 -24
- package/dist/types/ipc.d.ts.map +0 -1
- package/dist/types/ipc.js +0 -10
- package/dist/types/ipc.js.map +0 -1
- package/dist/types/message.d.ts +0 -53
- package/dist/types/message.d.ts.map +0 -1
- package/dist/types/message.js +0 -5
- package/dist/types/message.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,221 +1,103 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CCCC TypeScript SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
TypeScript/Node.js client for the CCCC daemon (IPC v1).
|
|
4
4
|
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @cccc/sdk
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Requirements
|
|
12
|
-
|
|
13
|
-
- Node.js >= 18.0.0
|
|
14
|
-
- CCCC daemon running locally
|
|
15
|
-
|
|
16
|
-
## Quick Start
|
|
17
|
-
|
|
18
|
-
```typescript
|
|
19
|
-
import { CCCCClient } from '@cccc/sdk';
|
|
20
|
-
|
|
21
|
-
const client = new CCCCClient();
|
|
22
|
-
|
|
23
|
-
// Check daemon is running
|
|
24
|
-
const isRunning = await client.ping();
|
|
25
|
-
console.log('Daemon running:', isRunning);
|
|
26
|
-
|
|
27
|
-
// List all groups
|
|
28
|
-
const groups = await client.groups.list();
|
|
29
|
-
console.log('Groups:', groups);
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## API Overview
|
|
5
|
+
## Relationship to CCCC core
|
|
33
6
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
// List groups
|
|
38
|
-
const groups = await client.groups.list();
|
|
39
|
-
|
|
40
|
-
// Get group info
|
|
41
|
-
const group = await client.groups.get('g_abc123');
|
|
42
|
-
|
|
43
|
-
// Create group
|
|
44
|
-
const newGroup = await client.groups.create({
|
|
45
|
-
title: 'My Project',
|
|
46
|
-
topic: 'Building something awesome',
|
|
47
|
-
url: '/path/to/project',
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
// Start/Stop group
|
|
51
|
-
await client.groups.start('g_abc123');
|
|
52
|
-
await client.groups.stop('g_abc123');
|
|
53
|
-
|
|
54
|
-
// Set group state
|
|
55
|
-
await client.groups.setState('g_abc123', 'active', 'user');
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Actors
|
|
59
|
-
|
|
60
|
-
```typescript
|
|
61
|
-
// List actors
|
|
62
|
-
const actors = await client.actors.list('g_abc123');
|
|
63
|
-
|
|
64
|
-
// Add actor
|
|
65
|
-
const actor = await client.actors.add('g_abc123', 'user', {
|
|
66
|
-
actor_id: 'agent-1',
|
|
67
|
-
runtime: 'claude',
|
|
68
|
-
runner: 'pty',
|
|
69
|
-
title: 'Claude Agent',
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
// Start/Stop/Restart actor
|
|
73
|
-
await client.actors.start('g_abc123', 'agent-1', 'user');
|
|
74
|
-
await client.actors.stop('g_abc123', 'agent-1', 'user');
|
|
75
|
-
await client.actors.restart('g_abc123', 'agent-1', 'user');
|
|
76
|
-
|
|
77
|
-
// Remove actor
|
|
78
|
-
await client.actors.remove('g_abc123', 'agent-1', 'user');
|
|
79
|
-
```
|
|
7
|
+
- CCCC core repository: https://github.com/ChesterRa/cccc
|
|
8
|
+
- `cccc` core provides daemon/web/CLI and owns runtime state.
|
|
9
|
+
- `cccc-sdk` provides Node.js client APIs that call the daemon over IPC.
|
|
80
10
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
```typescript
|
|
84
|
-
// Send message
|
|
85
|
-
const event = await client.messages.send('g_abc123', 'user', {
|
|
86
|
-
text: 'Hello agents!',
|
|
87
|
-
to: ['agent-1', 'agent-2'],
|
|
88
|
-
});
|
|
11
|
+
## Installation
|
|
89
12
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
event_id: 'abc123',
|
|
93
|
-
text: 'Got it!',
|
|
94
|
-
});
|
|
13
|
+
```bash
|
|
14
|
+
npm install cccc-sdk
|
|
95
15
|
```
|
|
96
16
|
|
|
97
|
-
|
|
17
|
+
## Quick start
|
|
98
18
|
|
|
99
19
|
```typescript
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
20
|
+
import { CCCCClient } from 'cccc-sdk';
|
|
21
|
+
|
|
22
|
+
async function main() {
|
|
23
|
+
const client = await CCCCClient.create();
|
|
24
|
+
|
|
25
|
+
await client.assertCompatible({
|
|
26
|
+
requireIpcV: 1,
|
|
27
|
+
requireCapabilities: { events_stream: true },
|
|
28
|
+
requireOps: ['groups', 'send', 'reply', 'group_automation_manage'],
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const group = await client.groupCreate({ title: 'TS demo' });
|
|
32
|
+
const groupId = String(group.group_id || '');
|
|
33
|
+
|
|
34
|
+
await client.send({
|
|
35
|
+
groupId,
|
|
36
|
+
text: 'Please check this and reply.',
|
|
37
|
+
priority: 'attention',
|
|
38
|
+
replyRequired: true,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
108
41
|
|
|
109
|
-
|
|
110
|
-
await client.inbox.markAllRead('g_abc123', 'agent-1');
|
|
42
|
+
main().catch(console.error);
|
|
111
43
|
```
|
|
112
44
|
|
|
113
|
-
|
|
45
|
+
## Message semantics
|
|
114
46
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
const ctx = await client.context.get('g_abc123');
|
|
118
|
-
console.log('Vision:', ctx.vision);
|
|
119
|
-
console.log('Milestones:', ctx.milestones);
|
|
47
|
+
- `priority`: `'normal' | 'attention'`
|
|
48
|
+
- `replyRequired`: `boolean` (maps to daemon `reply_required`)
|
|
120
49
|
|
|
121
|
-
|
|
122
|
-
|
|
50
|
+
Supported in:
|
|
51
|
+
- `send(options)`
|
|
52
|
+
- `reply(options)`
|
|
53
|
+
- `sendCrossGroup(options)`
|
|
123
54
|
|
|
124
|
-
|
|
125
|
-
await client.sketch.update('g_abc123', '## Architecture\n...');
|
|
126
|
-
```
|
|
55
|
+
## Automation semantics
|
|
127
56
|
|
|
128
|
-
|
|
57
|
+
`groupAutomationManage` is action-list based (canonical daemon shape):
|
|
129
58
|
|
|
130
59
|
```typescript
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
60
|
+
await client.groupAutomationManage({
|
|
61
|
+
groupId,
|
|
62
|
+
actions: [
|
|
63
|
+
{
|
|
64
|
+
type: 'create_rule',
|
|
65
|
+
rule: {
|
|
66
|
+
id: 'standup',
|
|
67
|
+
enabled: true,
|
|
68
|
+
scope: 'group',
|
|
69
|
+
to: ['@foreman'],
|
|
70
|
+
trigger: { kind: 'interval', every_seconds: 900 },
|
|
71
|
+
action: { kind: 'notify', snippet_ref: 'standup' },
|
|
72
|
+
},
|
|
73
|
+
},
|
|
142
74
|
],
|
|
143
75
|
});
|
|
144
|
-
|
|
145
|
-
// Update task status
|
|
146
|
-
await client.tasks.update('g_abc123', {
|
|
147
|
-
task_id: task.id,
|
|
148
|
-
status: 'active',
|
|
149
|
-
});
|
|
150
76
|
```
|
|
151
77
|
|
|
152
|
-
|
|
78
|
+
## Events stream
|
|
153
79
|
|
|
154
80
|
```typescript
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
description: 'Minimum viable product',
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
// Complete milestone
|
|
162
|
-
await client.milestones.complete('g_abc123', milestone.id, 'Shipped!');
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
## Error Handling
|
|
166
|
-
|
|
167
|
-
```typescript
|
|
168
|
-
import { CCCCClient, CCCCError } from '@cccc/sdk';
|
|
169
|
-
|
|
170
|
-
const client = new CCCCClient();
|
|
171
|
-
|
|
172
|
-
try {
|
|
173
|
-
await client.groups.get('invalid-id');
|
|
174
|
-
} catch (error) {
|
|
175
|
-
if (error instanceof CCCCError) {
|
|
176
|
-
console.error('CCCC Error:', error.code, error.message);
|
|
177
|
-
// Handle specific errors
|
|
178
|
-
switch (error.code) {
|
|
179
|
-
case 'DAEMON_NOT_RUNNING':
|
|
180
|
-
console.error('Please start CCCC daemon first');
|
|
181
|
-
break;
|
|
182
|
-
case 'GROUP_NOT_FOUND':
|
|
183
|
-
console.error('Group does not exist');
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
81
|
+
for await (const item of client.eventsStream({ groupId })) {
|
|
82
|
+
if (item.t === 'event') {
|
|
83
|
+
console.log(item.event.kind, item.event.id);
|
|
186
84
|
}
|
|
187
85
|
}
|
|
188
86
|
```
|
|
189
87
|
|
|
190
|
-
##
|
|
88
|
+
## Build and checks
|
|
191
89
|
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
// Request timeout in ms (default: 60000)
|
|
197
|
-
timeoutMs: 30000,
|
|
198
|
-
});
|
|
90
|
+
```bash
|
|
91
|
+
npm ci
|
|
92
|
+
npm run typecheck
|
|
93
|
+
npm run build
|
|
199
94
|
```
|
|
200
95
|
|
|
201
|
-
##
|
|
202
|
-
|
|
203
|
-
For operations not covered by the high-level API:
|
|
204
|
-
|
|
205
|
-
```typescript
|
|
206
|
-
// Direct daemon call
|
|
207
|
-
const response = await client.call('custom_op', {
|
|
208
|
-
arg1: 'value1',
|
|
209
|
-
arg2: 'value2',
|
|
210
|
-
});
|
|
96
|
+
## Requirements
|
|
211
97
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
} else {
|
|
215
|
-
console.error('Error:', response.error);
|
|
216
|
-
}
|
|
217
|
-
```
|
|
98
|
+
- Node.js 16+
|
|
99
|
+
- Running CCCC daemon
|
|
218
100
|
|
|
219
101
|
## License
|
|
220
102
|
|
|
221
|
-
|
|
103
|
+
Apache-2.0
|
package/dist/client.d.ts
CHANGED
|
@@ -1,262 +1,177 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CCCC
|
|
3
|
-
*
|
|
4
|
-
* High-level API for interacting with CCCC daemon
|
|
2
|
+
* CCCC SDK client
|
|
5
3
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { type DaemonResponse } from './types/ipc.js';
|
|
8
|
-
import type { Actor, ActorAddOptions, GroupState, HeadlessState } from './types/actor.js';
|
|
9
|
-
import type { GroupInfo, GroupCreateOptions, GroupUpdatePatch } from './types/group.js';
|
|
10
|
-
import type { SendMessageOptions, ReplyMessageOptions, InboxMessage, InboxListOptions } from './types/message.js';
|
|
11
|
-
import type { Event } from './types/event.js';
|
|
12
|
-
import type { Context, ContextSyncOp, Task, TaskCreateOptions, TaskUpdateOptions, Milestone, MilestoneCreateOptions } from './types/context.js';
|
|
13
|
-
export interface CCCCClientOptions extends TransportOptions {
|
|
14
|
-
}
|
|
4
|
+
import type { DaemonEndpoint, DaemonResponse, CCCCClientOptions, CompatibilityOptions, SendOptions, SendCrossGroupOptions, ReplyOptions, ActorAddOptions, ActorUpdateOptions, ActorEnvPrivateUpdateOptions, GroupCreateOptions, GroupUpdateOptions, GroupAutomationUpdateOptions, GroupAutomationManageOptions, GroupAutomationResetBaselineOptions, InboxListOptions, ContextSyncOptions, EventsStreamOptions, EventStreamItem } from './types.js';
|
|
15
5
|
/**
|
|
16
|
-
*
|
|
6
|
+
* CCCC client
|
|
17
7
|
*/
|
|
18
|
-
declare class
|
|
19
|
-
private
|
|
20
|
-
|
|
8
|
+
export declare class CCCCClient {
|
|
9
|
+
private readonly _endpoint;
|
|
10
|
+
private readonly _timeoutMs;
|
|
11
|
+
private constructor();
|
|
21
12
|
/**
|
|
22
|
-
*
|
|
13
|
+
* Async factory method: create a client instance
|
|
23
14
|
*/
|
|
24
|
-
|
|
15
|
+
static create(options?: CCCCClientOptions): Promise<CCCCClient>;
|
|
25
16
|
/**
|
|
26
|
-
* Get
|
|
17
|
+
* Get the current endpoint
|
|
27
18
|
*/
|
|
28
|
-
get(
|
|
19
|
+
get endpoint(): DaemonEndpoint;
|
|
29
20
|
/**
|
|
30
|
-
*
|
|
21
|
+
* Send raw IPC request and return the full response
|
|
31
22
|
*/
|
|
32
|
-
|
|
23
|
+
callRaw(op: string, args?: Record<string, unknown>): Promise<DaemonResponse>;
|
|
33
24
|
/**
|
|
34
|
-
*
|
|
25
|
+
* Send IPC request and return only result payload
|
|
26
|
+
*/
|
|
27
|
+
call(op: string, args?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
28
|
+
/**
|
|
29
|
+
* Compatibility check
|
|
30
|
+
*/
|
|
31
|
+
assertCompatible(options?: CompatibilityOptions): Promise<Record<string, unknown>>;
|
|
32
|
+
/**
|
|
33
|
+
* Ping daemon
|
|
34
|
+
*/
|
|
35
|
+
ping(): Promise<Record<string, unknown>>;
|
|
36
|
+
/**
|
|
37
|
+
* List all groups
|
|
35
38
|
*/
|
|
36
|
-
|
|
39
|
+
groups(): Promise<Record<string, unknown>>;
|
|
37
40
|
/**
|
|
38
|
-
*
|
|
41
|
+
* Show group details
|
|
39
42
|
*/
|
|
40
|
-
|
|
43
|
+
groupShow(groupId: string): Promise<Record<string, unknown>>;
|
|
41
44
|
/**
|
|
42
|
-
*
|
|
45
|
+
* Create group
|
|
43
46
|
*/
|
|
44
|
-
|
|
47
|
+
groupCreate(options?: GroupCreateOptions): Promise<Record<string, unknown>>;
|
|
45
48
|
/**
|
|
46
49
|
* Update group
|
|
47
50
|
*/
|
|
48
|
-
|
|
51
|
+
groupUpdate(options: GroupUpdateOptions): Promise<Record<string, unknown>>;
|
|
49
52
|
/**
|
|
50
53
|
* Delete group
|
|
51
54
|
*/
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Actors API
|
|
56
|
-
*/
|
|
57
|
-
declare class ActorsAPI {
|
|
58
|
-
private client;
|
|
59
|
-
constructor(client: CCCCClient);
|
|
55
|
+
groupDelete(groupId: string, by?: string): Promise<Record<string, unknown>>;
|
|
60
56
|
/**
|
|
61
|
-
*
|
|
57
|
+
* Use group (set active scope)
|
|
62
58
|
*/
|
|
63
|
-
|
|
59
|
+
groupUse(groupId: string, path: string, by?: string): Promise<Record<string, unknown>>;
|
|
64
60
|
/**
|
|
65
|
-
*
|
|
61
|
+
* Set group state
|
|
66
62
|
*/
|
|
67
|
-
|
|
63
|
+
groupSetState(groupId: string, state: 'active' | 'idle' | 'paused', by?: string): Promise<Record<string, unknown>>;
|
|
68
64
|
/**
|
|
69
|
-
*
|
|
65
|
+
* Update group settings
|
|
70
66
|
*/
|
|
71
|
-
|
|
67
|
+
groupSettingsUpdate(groupId: string, patch: Record<string, unknown>, by?: string): Promise<Record<string, unknown>>;
|
|
72
68
|
/**
|
|
73
|
-
*
|
|
69
|
+
* Read group-level automation state (rules, snippets, next run, ...)
|
|
74
70
|
*/
|
|
75
|
-
|
|
71
|
+
groupAutomationState(groupId: string, by?: string): Promise<Record<string, unknown>>;
|
|
76
72
|
/**
|
|
77
|
-
*
|
|
73
|
+
* Replace group-level automation (rules + snippets)
|
|
78
74
|
*/
|
|
79
|
-
|
|
75
|
+
groupAutomationUpdate(options: GroupAutomationUpdateOptions): Promise<Record<string, unknown>>;
|
|
80
76
|
/**
|
|
81
|
-
*
|
|
77
|
+
* Incrementally manage group-level automation (actions[])
|
|
82
78
|
*/
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Messages API
|
|
87
|
-
*/
|
|
88
|
-
declare class MessagesAPI {
|
|
89
|
-
private client;
|
|
90
|
-
constructor(client: CCCCClient);
|
|
79
|
+
groupAutomationManage(options: GroupAutomationManageOptions): Promise<Record<string, unknown>>;
|
|
91
80
|
/**
|
|
92
|
-
*
|
|
81
|
+
* Reset group-level automation to baseline
|
|
93
82
|
*/
|
|
94
|
-
|
|
83
|
+
groupAutomationResetBaseline(options: GroupAutomationResetBaselineOptions): Promise<Record<string, unknown>>;
|
|
95
84
|
/**
|
|
96
|
-
*
|
|
85
|
+
* Start group
|
|
97
86
|
*/
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Inbox API
|
|
102
|
-
*/
|
|
103
|
-
declare class InboxAPI {
|
|
104
|
-
private client;
|
|
105
|
-
constructor(client: CCCCClient);
|
|
87
|
+
groupStart(groupId: string, by?: string): Promise<Record<string, unknown>>;
|
|
106
88
|
/**
|
|
107
|
-
*
|
|
89
|
+
* Stop group
|
|
108
90
|
*/
|
|
109
|
-
|
|
91
|
+
groupStop(groupId: string, by?: string): Promise<Record<string, unknown>>;
|
|
110
92
|
/**
|
|
111
|
-
*
|
|
93
|
+
* Attach path to group
|
|
112
94
|
*/
|
|
113
|
-
|
|
95
|
+
attach(path: string, groupId?: string, by?: string): Promise<Record<string, unknown>>;
|
|
114
96
|
/**
|
|
115
|
-
*
|
|
97
|
+
* List actors in group
|
|
116
98
|
*/
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Context API
|
|
121
|
-
*/
|
|
122
|
-
declare class ContextAPI {
|
|
123
|
-
private client;
|
|
124
|
-
constructor(client: CCCCClient);
|
|
99
|
+
actorList(groupId: string): Promise<Record<string, unknown>>;
|
|
125
100
|
/**
|
|
126
|
-
*
|
|
101
|
+
* Add actor
|
|
127
102
|
*/
|
|
128
|
-
|
|
103
|
+
actorAdd(options: ActorAddOptions): Promise<Record<string, unknown>>;
|
|
129
104
|
/**
|
|
130
|
-
*
|
|
105
|
+
* Update actor
|
|
131
106
|
*/
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Tasks API
|
|
136
|
-
*/
|
|
137
|
-
declare class TasksAPI {
|
|
138
|
-
private client;
|
|
139
|
-
constructor(client: CCCCClient);
|
|
107
|
+
actorUpdate(options: ActorUpdateOptions): Promise<Record<string, unknown>>;
|
|
140
108
|
/**
|
|
141
|
-
*
|
|
109
|
+
* Remove actor
|
|
142
110
|
*/
|
|
143
|
-
|
|
111
|
+
actorRemove(groupId: string, actorId: string, by?: string): Promise<Record<string, unknown>>;
|
|
144
112
|
/**
|
|
145
|
-
*
|
|
113
|
+
* Start actor
|
|
146
114
|
*/
|
|
147
|
-
|
|
115
|
+
actorStart(groupId: string, actorId: string, by?: string): Promise<Record<string, unknown>>;
|
|
148
116
|
/**
|
|
149
|
-
*
|
|
117
|
+
* Stop actor
|
|
150
118
|
*/
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Milestones API
|
|
155
|
-
*/
|
|
156
|
-
declare class MilestonesAPI {
|
|
157
|
-
private client;
|
|
158
|
-
constructor(client: CCCCClient);
|
|
119
|
+
actorStop(groupId: string, actorId: string, by?: string): Promise<Record<string, unknown>>;
|
|
159
120
|
/**
|
|
160
|
-
*
|
|
121
|
+
* Restart actor
|
|
161
122
|
*/
|
|
162
|
-
|
|
123
|
+
actorRestart(groupId: string, actorId: string, by?: string): Promise<Record<string, unknown>>;
|
|
163
124
|
/**
|
|
164
|
-
*
|
|
125
|
+
* List actor private env keys (without values)
|
|
165
126
|
*/
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Vision API
|
|
170
|
-
*/
|
|
171
|
-
declare class VisionAPI {
|
|
172
|
-
private client;
|
|
173
|
-
constructor(client: CCCCClient);
|
|
127
|
+
actorEnvPrivateKeys(groupId: string, actorId: string, by?: string): Promise<Record<string, unknown>>;
|
|
174
128
|
/**
|
|
175
|
-
* Update
|
|
129
|
+
* Update actor private env vars (runtime-only; values are never echoed)
|
|
176
130
|
*/
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Sketch API
|
|
181
|
-
*/
|
|
182
|
-
declare class SketchAPI {
|
|
183
|
-
private client;
|
|
184
|
-
constructor(client: CCCCClient);
|
|
131
|
+
actorEnvPrivateUpdate(options: ActorEnvPrivateUpdateOptions): Promise<Record<string, unknown>>;
|
|
185
132
|
/**
|
|
186
|
-
*
|
|
133
|
+
* Send message
|
|
187
134
|
*/
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Headless API for MCP-driven actors
|
|
192
|
-
*/
|
|
193
|
-
declare class HeadlessAPI {
|
|
194
|
-
private client;
|
|
195
|
-
constructor(client: CCCCClient);
|
|
135
|
+
send(options: SendOptions): Promise<Record<string, unknown>>;
|
|
196
136
|
/**
|
|
197
|
-
*
|
|
137
|
+
* Send message across groups
|
|
198
138
|
*/
|
|
199
|
-
|
|
139
|
+
sendCrossGroup(options: SendCrossGroupOptions): Promise<Record<string, unknown>>;
|
|
200
140
|
/**
|
|
201
|
-
*
|
|
141
|
+
* Reply message
|
|
202
142
|
*/
|
|
203
|
-
|
|
143
|
+
reply(options: ReplyOptions): Promise<Record<string, unknown>>;
|
|
204
144
|
/**
|
|
205
|
-
* Acknowledge
|
|
145
|
+
* Acknowledge chat message
|
|
206
146
|
*/
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
* runtime: 'claude',
|
|
225
|
-
* runner: 'pty'
|
|
226
|
-
* });
|
|
227
|
-
*
|
|
228
|
-
* // Send a message
|
|
229
|
-
* await client.messages.send(groupId, 'user', {
|
|
230
|
-
* text: 'Hello agents!',
|
|
231
|
-
* to: ['agent-1']
|
|
232
|
-
* });
|
|
233
|
-
* ```
|
|
234
|
-
*/
|
|
235
|
-
export declare class CCCCClient {
|
|
236
|
-
private options;
|
|
237
|
-
readonly groups: GroupsAPI;
|
|
238
|
-
readonly actors: ActorsAPI;
|
|
239
|
-
readonly messages: MessagesAPI;
|
|
240
|
-
readonly inbox: InboxAPI;
|
|
241
|
-
readonly context: ContextAPI;
|
|
242
|
-
readonly tasks: TasksAPI;
|
|
243
|
-
readonly milestones: MilestonesAPI;
|
|
244
|
-
readonly vision: VisionAPI;
|
|
245
|
-
readonly sketch: SketchAPI;
|
|
246
|
-
readonly headless: HeadlessAPI;
|
|
247
|
-
constructor(options?: CCCCClientOptions);
|
|
147
|
+
chatAck(groupId: string, actorId: string, eventId: string, by?: string): Promise<Record<string, unknown>>;
|
|
148
|
+
/**
|
|
149
|
+
* List inbox
|
|
150
|
+
*/
|
|
151
|
+
inboxList(options: InboxListOptions): Promise<Record<string, unknown>>;
|
|
152
|
+
/**
|
|
153
|
+
* Mark message as read
|
|
154
|
+
*/
|
|
155
|
+
inboxMarkRead(groupId: string, actorId: string, eventId: string, by?: string): Promise<Record<string, unknown>>;
|
|
156
|
+
/**
|
|
157
|
+
* Mark all messages as read
|
|
158
|
+
*/
|
|
159
|
+
inboxMarkAllRead(groupId: string, actorId: string, by?: string, kindFilter?: string): Promise<Record<string, unknown>>;
|
|
160
|
+
/**
|
|
161
|
+
* Acknowledge notification
|
|
162
|
+
*/
|
|
163
|
+
notifyAck(groupId: string, actorId: string, notifyEventId: string, by?: string): Promise<Record<string, unknown>>;
|
|
248
164
|
/**
|
|
249
|
-
*
|
|
165
|
+
* Get group context
|
|
250
166
|
*/
|
|
251
|
-
|
|
167
|
+
contextGet(groupId: string): Promise<Record<string, unknown>>;
|
|
252
168
|
/**
|
|
253
|
-
*
|
|
169
|
+
* Sync context
|
|
254
170
|
*/
|
|
255
|
-
|
|
171
|
+
contextSync(options: ContextSyncOptions): Promise<Record<string, unknown>>;
|
|
256
172
|
/**
|
|
257
|
-
*
|
|
173
|
+
* Subscribe to event stream
|
|
258
174
|
*/
|
|
259
|
-
|
|
175
|
+
eventsStream(options: EventsStreamOptions): AsyncGenerator<EventStreamItem>;
|
|
260
176
|
}
|
|
261
|
-
export {};
|
|
262
177
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,cAAc,EAEd,cAAc,EACd,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,EACX,qBAAqB,EACrB,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,4BAA4B,EAC5B,kBAA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