@gonzih/cc-wire 0.1.6 → 0.2.0
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 +178 -120
- package/dist/cjs/channels.cjs +71 -4
- package/dist/esm/channels.d.ts +50 -3
- package/dist/esm/channels.d.ts.map +1 -1
- package/dist/esm/channels.js +60 -3
- package/dist/esm/channels.js.map +1 -1
- package/dist/esm/types.d.ts +18 -4
- package/dist/esm/types.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @gonzih/cc-wire
|
|
2
2
|
|
|
3
|
-
Single source of truth for Redis channel names, key patterns, and message shapes across the cc-suite (`cc-agent`, `cc-tg`, `cc-agent-ui`).
|
|
3
|
+
Single source of truth for Redis channel names, key patterns, and message shapes across the cc-suite (`cc-agent`, `cc-discord`, `cc-tg`, `cc-agent-ui`).
|
|
4
4
|
|
|
5
5
|
No runtime dependencies. No Redis client. Just constants, builders, and types.
|
|
6
6
|
|
|
@@ -10,61 +10,121 @@ No runtime dependencies. No Redis client. Just constants, builders, and types.
|
|
|
10
10
|
npm install @gonzih/cc-wire
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
+
## Architecture — Service Ownership
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
17
|
+
│ cc-wire (this package) │
|
|
18
|
+
│ Owns: Redis key contracts, type definitions │
|
|
19
|
+
└─────────────────────────────────┬────────────────────────────────┘
|
|
20
|
+
│ imported by
|
|
21
|
+
┌───────────────────────┼───────────────────────┐
|
|
22
|
+
│ │ │
|
|
23
|
+
▼ ▼ ▼
|
|
24
|
+
┌─────────────────┐ ┌─────────────────────┐ ┌──────────────────┐
|
|
25
|
+
│ cc-discord │ │ cc-tg │ │ cc-agent │
|
|
26
|
+
│ │ │ │ │ │
|
|
27
|
+
│ Owns: │ │ Owns: │ │ Owns: │
|
|
28
|
+
│ per-namespace │ │ money-brain session│ │ job execution │
|
|
29
|
+
│ Claude sessions│ │ (single session) │ │ (spawn_agent) │
|
|
30
|
+
│ Discord bridge │ │ Telegram bridge │ │ no meta-agent │
|
|
31
|
+
│ │ │ │ │ lifecycle │
|
|
32
|
+
│ Workspace: │ │ Workspace: │ │ │
|
|
33
|
+
│ ~/cc-discord- │ │ ~/money-brain │ │ │
|
|
34
|
+
│ workspace/{ns} │ │ │ │ │
|
|
35
|
+
└─────────────────┘ └─────────────────────┘ └──────────────────┘
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Key principle:** cc-tg and cc-discord are completely isolated — they share no Redis keys,
|
|
39
|
+
no sessions, and no state. cc-agent is a pure job runner; it no longer manages meta-agent
|
|
40
|
+
lifecycle.
|
|
41
|
+
|
|
13
42
|
## Usage
|
|
14
43
|
|
|
15
44
|
```typescript
|
|
16
45
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
46
|
+
// cc-discord service keys
|
|
47
|
+
discordMetaInputKey,
|
|
48
|
+
discordMetaStatusKey,
|
|
49
|
+
discordChatOutgoing,
|
|
50
|
+
discordChatLog,
|
|
51
|
+
discordChatIncoming,
|
|
52
|
+
discordNotify,
|
|
53
|
+
// cc-tg service keys
|
|
54
|
+
tgChatOutgoing,
|
|
55
|
+
tgChatIncoming,
|
|
56
|
+
tgNotify,
|
|
57
|
+
// Service ownership constants
|
|
58
|
+
CC_DISCORD_WORKSPACE_ROOT,
|
|
59
|
+
CC_TG_WORKSPACE,
|
|
60
|
+
// Job keys (cc-agent)
|
|
22
61
|
jobKey,
|
|
23
62
|
jobIndexKey,
|
|
24
|
-
|
|
63
|
+
// Shared utility
|
|
64
|
+
notifyPublishCommand,
|
|
25
65
|
TTL,
|
|
26
66
|
CAP,
|
|
27
|
-
type
|
|
28
|
-
type
|
|
67
|
+
type ChatMessage,
|
|
68
|
+
type SpawnParams,
|
|
29
69
|
} from "@gonzih/cc-wire";
|
|
30
70
|
|
|
31
|
-
//
|
|
32
|
-
const
|
|
33
|
-
|
|
71
|
+
// cc-discord — per-namespace session keys
|
|
72
|
+
const inputQueue = discordMetaInputKey("simorgh-mobile-app");
|
|
73
|
+
// => "cca:discord:meta:simorgh-mobile-app:input"
|
|
74
|
+
const statusKey = discordMetaStatusKey("simorgh-mobile-app");
|
|
75
|
+
// => "cca:discord:meta:simorgh-mobile-app:status"
|
|
76
|
+
const notifyChan = discordNotify("simorgh-mobile-app");
|
|
77
|
+
// => "cca:discord:notify:simorgh-mobile-app"
|
|
78
|
+
|
|
79
|
+
// cc-tg — single dedicated money-brain session
|
|
80
|
+
const tgOut = tgChatOutgoing(); // "cca:tg:chat:outgoing"
|
|
81
|
+
const tgIn = tgChatIncoming(); // "cca:tg:chat:incoming"
|
|
82
|
+
const tgNtfy = tgNotify(); // "cca:tg:notify"
|
|
83
|
+
|
|
84
|
+
// Workspace paths
|
|
85
|
+
const discordWs = `${process.env.HOME}/${CC_DISCORD_WORKSPACE_ROOT}/simorgh-mobile-app`;
|
|
86
|
+
const tgWs = `${process.env.HOME}/${CC_TG_WORKSPACE}`;
|
|
87
|
+
|
|
88
|
+
// ChatMessage — with service field
|
|
89
|
+
const msg: ChatMessage = {
|
|
90
|
+
id: crypto.randomUUID(),
|
|
91
|
+
source: "discord",
|
|
92
|
+
service: "cc-discord",
|
|
93
|
+
role: "user",
|
|
94
|
+
content: "deploy the app",
|
|
95
|
+
namespace: "simorgh-mobile-app",
|
|
96
|
+
timestamp: new Date().toISOString(),
|
|
97
|
+
};
|
|
98
|
+
```
|
|
34
99
|
|
|
35
|
-
|
|
36
|
-
const job = jobKey("abc-123"); // "cca:job:abc-123"
|
|
37
|
-
const idx = jobIndexKey("myns"); // "cca:jobs:myns"
|
|
100
|
+
## Key Reference
|
|
38
101
|
|
|
39
|
-
|
|
40
|
-
const chan = notifyChannel("myns"); // "cca:notify:myns"
|
|
41
|
-
const list = notifyListKey("myns"); // "cca:notify:myns" (same key, dual-purpose)
|
|
102
|
+
### cc-discord Keys
|
|
42
103
|
|
|
43
|
-
|
|
44
|
-
const payload: NotificationPayload = {
|
|
45
|
-
text: "Build finished ✓",
|
|
46
|
-
routing: ["discord"], // omit or leave empty for all transports
|
|
47
|
-
};
|
|
104
|
+
cc-discord owns all namespace-scoped Claude sessions. All keys live under `cca:discord:`.
|
|
48
105
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
106
|
+
| Builder | Pattern | Redis type | Owner | Description |
|
|
107
|
+
|---|---|---|---|---|
|
|
108
|
+
| `discordMetaInputKey(ns)` | `cca:discord:meta:{ns}:input` | LIST | cc-discord | Input queue for namespace session (RPUSH/RPOP). |
|
|
109
|
+
| `discordMetaStatusKey(ns)` | `cca:discord:meta:{ns}:status` | STRING (JSON) | cc-discord | Live session status (typing, tool, etc.), TTL 7d. |
|
|
110
|
+
| `discordChatOutgoing(ns)` | `cca:discord:chat:outgoing:{ns}` | CHANNEL | cc-discord | Outgoing messages to UI (pub/sub). |
|
|
111
|
+
| `discordChatLog(ns)` | `cca:discord:chat:log:{ns}` | LIST | cc-discord | Chat history, capped at 500, LIFO. |
|
|
112
|
+
| `discordChatIncoming(ns)` | `cca:discord:chat:incoming:{ns}` | CHANNEL | cc-discord | Incoming messages from UI/Discord (pub/sub). |
|
|
113
|
+
| `discordNotify(ns)` | `cca:discord:notify:{ns}` | CHANNEL + LIST | cc-discord | Job-completion notifications (PUBLISH + RPOP poll). |
|
|
52
114
|
|
|
53
|
-
|
|
54
|
-
TTL.JOB_SECONDS // 604800
|
|
55
|
-
CAP.CHAT_LOG // 500
|
|
56
|
-
```
|
|
115
|
+
### cc-tg Keys
|
|
57
116
|
|
|
58
|
-
|
|
117
|
+
cc-tg owns a single dedicated `money-brain` session with no namespace scoping.
|
|
59
118
|
|
|
60
|
-
|
|
119
|
+
| Builder | Pattern | Redis type | Owner | Description |
|
|
120
|
+
|---|---|---|---|---|
|
|
121
|
+
| `tgChatOutgoing()` | `cca:tg:chat:outgoing` | CHANNEL | cc-tg | Outgoing messages to UI (pub/sub). |
|
|
122
|
+
| `tgChatIncoming()` | `cca:tg:chat:incoming` | CHANNEL | cc-tg | Incoming messages from UI/Telegram (pub/sub). |
|
|
123
|
+
| `tgNotify()` | `cca:tg:notify` | CHANNEL + LIST | cc-tg | Job-completion notifications (PUBLISH + RPOP poll). |
|
|
61
124
|
|
|
62
|
-
|
|
63
|
-
|---|---|---|---|
|
|
64
|
-
| `wikiKey(repoSlug)` | `cca:wiki:{repoSlug}` | HASH | Per-repo wiki pages. Field = page name, value = markdown. |
|
|
65
|
-
| `wikiUpdatedKey(repoSlug)` | `cca:wiki:{repoSlug}:updated` | STRING | ISO timestamp of last wiki update. |
|
|
125
|
+
### cc-agent Keys (jobs only)
|
|
66
126
|
|
|
67
|
-
|
|
127
|
+
cc-agent is a pure job runner. It no longer manages meta-agent lifecycle.
|
|
68
128
|
|
|
69
129
|
| Builder | Pattern | Redis type | Description |
|
|
70
130
|
|---|---|---|---|
|
|
@@ -76,109 +136,107 @@ CAP.CHAT_LOG // 500
|
|
|
76
136
|
| `jobDoneChannel(id)` | `cca:job:done:{id}` | CHANNEL | Job completion pub/sub. |
|
|
77
137
|
| `jobDoneQueueKey(id)` | `cca:job:done:{id}:queue` | LIST | LPUSH/BLPOP queue for `wait_for_job`, TTL 7d. |
|
|
78
138
|
| `jobIndexKey(ns)` | `cca:jobs:{ns}` | SET | Job IDs per namespace. |
|
|
139
|
+
| `EVENT_STREAM` | `cca:event-stream` | STREAM | Job status events (XADD/XREADGROUP). |
|
|
140
|
+
| `COORDINATOR_GROUP` | `coordinator` | — | Consumer group name. |
|
|
79
141
|
|
|
80
|
-
###
|
|
81
|
-
|
|
82
|
-
| Constant | Value | Description |
|
|
83
|
-
|---|---|---|
|
|
84
|
-
| `EVENT_STREAM` | `cca:event-stream` | Redis Stream — job status events. |
|
|
85
|
-
| `COORDINATOR_GROUP` | `coordinator` | Consumer group name. |
|
|
86
|
-
|
|
87
|
-
### Notify / Chat
|
|
88
|
-
|
|
89
|
-
| Builder | Pattern | Description |
|
|
90
|
-
|---|---|---|
|
|
91
|
-
| `notifyChannel(ns)` | `cca:notify:{ns}` | CHANNEL — coordinator publishes job completion. |
|
|
92
|
-
| `notifyListKey(ns)` | `cca:notify:{ns}` | LIST — delivery queue (RPUSH/RPOP). Same key as channel (safe — Redis pub/sub and list namespaces are independent). |
|
|
93
|
-
| `notifyLogKey(ns)` | `cca:notify-log:{ns}` | LIST — persistent audit log, capped at `CAP.NOTIFY_LOG` (100). |
|
|
94
|
-
| `notifyPublishCommand(ns, payload)` | — | Returns a `redis-cli PUBLISH` shell command string. Useful for cron prompts. |
|
|
95
|
-
| `chatLogKey(ns)` | `cca:chat:log:{ns}` | LIST — chat history, capped at `CAP.CHAT_LOG` (500), LIFO. |
|
|
96
|
-
| `chatIncomingChannel(ns)` | `cca:chat:incoming:{ns}` | CHANNEL — UI → cc-tg. |
|
|
97
|
-
| `chatOutgoingChannel(ns)` | `cca:chat:outgoing:{ns}` | CHANNEL — cc-tg → UI. |
|
|
98
|
-
|
|
99
|
-
### Meta-Agent
|
|
142
|
+
### Shared / Utility Keys
|
|
100
143
|
|
|
101
|
-
| Builder | Pattern | Description |
|
|
102
|
-
|
|
103
|
-
| `
|
|
104
|
-
| `
|
|
105
|
-
| `
|
|
106
|
-
| `
|
|
144
|
+
| Builder / Constant | Pattern | Redis type | Description |
|
|
145
|
+
|---|---|---|---|
|
|
146
|
+
| `notifyChannel(ns)` | `cca:notify:{ns}` | CHANNEL | Legacy coordinator notify (use service-scoped builders for new code). |
|
|
147
|
+
| `notifyListKey(ns)` | `cca:notify:{ns}` | LIST | Same key — delivery queue. |
|
|
148
|
+
| `notifyLogKey(ns)` | `cca:notify-log:{ns}` | LIST | Notification audit log, capped at 100, LIFO. |
|
|
149
|
+
| `notifyPublishCommand(ns, payload)` | — | — | Returns a `redis-cli PUBLISH` shell command string. Useful for cron prompts. |
|
|
150
|
+
| `planKey(id)` | `cca:plan:{id}` | STRING (JSON) | PlanRecord, TTL 30d. |
|
|
151
|
+
| `coordinatorPlanKey(jobId)` | `cca:coordinator:plan:{jobId}` | STRING | Coordinator plan JSON. |
|
|
152
|
+
| `profileKey(name)` | `cca:profile:{name}` | STRING (JSON) | Saved Profile. |
|
|
153
|
+
| `PROFILES_INDEX` | `cca:profiles:index` | SET | Profile names. |
|
|
154
|
+
| `cronsKey(ns)` | `cca:crons:{ns}` | STRING (JSON array) | Cron definitions. |
|
|
155
|
+
| `deletedCronsKey(ns)` | `cca:deleted-crons:{ns}` | SET | Tombstone IDs, TTL 7d. |
|
|
156
|
+
| `learningsKey(ns)` | `cca:learnings:{ns}` | LIST | Learnings (LPUSH, capped at 50), TTL 90d, LIFO. |
|
|
157
|
+
| `wikiKey(repoSlug)` | `cca:wiki:{repoSlug}` | HASH | Wiki pages. Field = page name, value = markdown. |
|
|
158
|
+
| `wikiUpdatedKey(repoSlug)` | `cca:wiki:{repoSlug}:updated` | STRING | ISO timestamp of last wiki update. |
|
|
159
|
+
| `swarmKey(id)` | `cca:swarm:{id}` | STRING (JSON) | SwarmRecord. |
|
|
160
|
+
| `SWARM_REQUESTS_KEY` | `cca:swarm:requests` | LIST | Swarm task request queue (LPUSH). |
|
|
161
|
+
| `CC_AGENT_VERSION_KEY` | `cca:meta:cc-agent:version` | STRING | Running cc-agent version. |
|
|
162
|
+
| `CC_TG_VERSION_KEY` | `cca:meta:cc-tg:version` | STRING | Running cc-tg version. |
|
|
163
|
+
| `TOKEN_INDEX_KEY` | `cca:token:index` | STRING | Token rotation index. |
|
|
164
|
+
| `VOICE_PENDING_KEY` | `voice:pending` | LIST | Transcription pending queue (cc-tg only). |
|
|
165
|
+
| `VOICE_FAILED_KEY` | `voice:failed` | LIST | Failure log, TTL 48h (cc-tg only). |
|
|
107
166
|
|
|
108
|
-
###
|
|
167
|
+
### Service Ownership Constants
|
|
109
168
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
| `wikiUpdatedKey(repoSlug)` | `cca:wiki:{repoSlug}:updated` | STRING — ISO timestamp of last update. |
|
|
169
|
+
```typescript
|
|
170
|
+
CC_DISCORD_WORKSPACE_ROOT // "cc-discord-workspace"
|
|
171
|
+
// Usage: `${HOME}/${CC_DISCORD_WORKSPACE_ROOT}/{namespace}`
|
|
114
172
|
|
|
115
|
-
|
|
173
|
+
CC_TG_WORKSPACE // "money-brain"
|
|
174
|
+
// Usage: `${HOME}/${CC_TG_WORKSPACE}`
|
|
175
|
+
```
|
|
116
176
|
|
|
117
|
-
|
|
118
|
-
|---|---|---|
|
|
119
|
-
| `profileKey(name)` | `cca:profile:{name}` | STRING (JSON) — saved Profile. |
|
|
120
|
-
| `PROFILES_INDEX` | `cca:profiles:index` | SET — profile names. |
|
|
177
|
+
## Constants
|
|
121
178
|
|
|
122
|
-
|
|
179
|
+
```typescript
|
|
180
|
+
TTL.JOB_SECONDS // 604800 (7 days)
|
|
181
|
+
TTL.PLAN_SECONDS // 2592000 (30 days)
|
|
182
|
+
TTL.LEARNINGS_SECONDS // 7776000 (90 days)
|
|
183
|
+
TTL.VOICE_FAILED_SECONDS // 172800 (48 hours)
|
|
184
|
+
|
|
185
|
+
CAP.NOTIFY_LOG // 100
|
|
186
|
+
CAP.CHAT_LOG // 500
|
|
187
|
+
CAP.LEARNINGS // 50
|
|
188
|
+
CAP.EVENT_STREAM // 500
|
|
189
|
+
|
|
190
|
+
TIMING.COORDINATOR_POLL_MS // 2000
|
|
191
|
+
TIMING.DEPENDENCY_TICK_MS // 3000
|
|
192
|
+
TIMING.INPUT_POLL_INTERVAL_MS // 3000
|
|
193
|
+
TIMING.META_AGENT_FLUSH_DELAY_MS // 1500
|
|
194
|
+
```
|
|
123
195
|
|
|
124
|
-
|
|
125
|
-
|---|---|---|
|
|
126
|
-
| `cronsKey(ns)` | `cca:crons:{ns}` | STRING (JSON array) — cron definitions. |
|
|
127
|
-
| `deletedCronsKey(ns)` | `cca:deleted-crons:{ns}` | SET — tombstone IDs, TTL 7d. |
|
|
196
|
+
## Notification Routing
|
|
128
197
|
|
|
129
|
-
|
|
198
|
+
Each service subscribes to its own notify channel for job-completion notifications:
|
|
130
199
|
|
|
131
|
-
|
|
|
200
|
+
| Service | Notify key builder | Pattern |
|
|
132
201
|
|---|---|---|
|
|
133
|
-
| `
|
|
202
|
+
| cc-discord | `discordNotify(ns)` | `cca:discord:notify:{ns}` |
|
|
203
|
+
| cc-tg | `tgNotify()` | `cca:tg:notify` |
|
|
134
204
|
|
|
135
|
-
|
|
205
|
+
Both use the same dual-purpose pattern: the coordinator PUBLISHes on the channel (pub/sub)
|
|
206
|
+
and also RPUSHes to the same key as a list (poll fallback). Redis pub/sub and list namespaces
|
|
207
|
+
are independent so this is safe.
|
|
136
208
|
|
|
137
|
-
|
|
138
|
-
|---|---|---|
|
|
139
|
-
| `planKey(id)` | `cca:plan:{id}` | STRING (JSON) — PlanRecord, TTL 30d. |
|
|
140
|
-
| `coordinatorPlanKey(jobId)` | `cca:coordinator:plan:{jobId}` | STRING — coordinator plan JSON. |
|
|
209
|
+
### Setting spawning_namespace on spawn calls
|
|
141
210
|
|
|
142
|
-
|
|
211
|
+
Any caller spawning jobs via cc-agent must set `spawning_namespace` on `SpawnParams` so
|
|
212
|
+
the coordinator routes completion notifications to the right service:
|
|
143
213
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
| `swarmKey(id)` | `cca:swarm:{id}` | STRING (JSON) — SwarmRecord. |
|
|
147
|
-
| `SWARM_REQUESTS_KEY` | `cca:swarm:requests` | LIST — task request queue (LPUSH). |
|
|
214
|
+
```typescript
|
|
215
|
+
import type { SpawnParams } from "@gonzih/cc-wire";
|
|
148
216
|
|
|
149
|
-
|
|
217
|
+
const params: SpawnParams = {
|
|
218
|
+
repoUrl: "https://github.com/org/repo",
|
|
219
|
+
task: "fix the build",
|
|
220
|
+
spawning_namespace: "simorgh-mobile-app", // cc-agent uses this to route the notify
|
|
221
|
+
};
|
|
222
|
+
```
|
|
150
223
|
|
|
151
|
-
|
|
152
|
-
|---|---|---|
|
|
153
|
-
| `CC_AGENT_VERSION_KEY` | `cca:meta:cc-agent:version` | STRING — running cc-agent version. |
|
|
154
|
-
| `CC_TG_VERSION_KEY` | `cca:meta:cc-tg:version` | STRING — running cc-tg version. |
|
|
155
|
-
| `TOKEN_INDEX_KEY` | `cca:token:index` | STRING — token rotation index. |
|
|
224
|
+
## Migration from v0.1.x
|
|
156
225
|
|
|
157
|
-
|
|
226
|
+
If you were using the old cc-agent-owned meta-agent keys, replace them:
|
|
158
227
|
|
|
159
|
-
|
|
|
228
|
+
| Old (deprecated) | New | Owner |
|
|
160
229
|
|---|---|---|
|
|
161
|
-
| `
|
|
162
|
-
| `
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
CAP.NOTIFY_LOG // 100
|
|
173
|
-
CAP.CHAT_LOG // 500
|
|
174
|
-
CAP.LEARNINGS // 50
|
|
175
|
-
CAP.EVENT_STREAM // 500
|
|
176
|
-
|
|
177
|
-
TIMING.COORDINATOR_POLL_MS // 2000
|
|
178
|
-
TIMING.DEPENDENCY_TICK_MS // 3000
|
|
179
|
-
TIMING.INPUT_POLL_INTERVAL_MS // 3000
|
|
180
|
-
TIMING.META_AGENT_FLUSH_DELAY_MS // 1500
|
|
181
|
-
```
|
|
230
|
+
| `metaInputKey(ns)` → `cca:meta:{ns}:input` | `discordMetaInputKey(ns)` → `cca:discord:meta:{ns}:input` | cc-discord |
|
|
231
|
+
| `metaAgentStatusKey(ns)` → `cca:meta-agent:status:{ns}` | `discordMetaStatusKey(ns)` → `cca:discord:meta:{ns}:status` | cc-discord |
|
|
232
|
+
| `META_AGENTS_INDEX` → `cca:meta:agents:index` | — (cc-discord maintains its own registry) | cc-discord |
|
|
233
|
+
| `chatLogKey(ns)` → `cca:chat:log:{ns}` | `discordChatLog(ns)` → `cca:discord:chat:log:{ns}` | cc-discord |
|
|
234
|
+
| `chatOutgoingChannel(ns)` → `cca:chat:outgoing:{ns}` | `discordChatOutgoing(ns)` → `cca:discord:chat:outgoing:{ns}` | cc-discord |
|
|
235
|
+
| `chatIncomingChannel(ns)` → `cca:chat:incoming:{ns}` | `discordChatIncoming(ns)` → `cca:discord:chat:incoming:{ns}` | cc-discord |
|
|
236
|
+
| `notifyChannel(ns)` (Discord use) | `discordNotify(ns)` | cc-discord |
|
|
237
|
+
| `notifyChannel(ns)` / `notifyListKey(ns)` (tg use) | `tgNotify()` | cc-tg |
|
|
238
|
+
|
|
239
|
+
The deprecated exports remain in v0.2.x for migration; they will be removed in v0.3.x.
|
|
182
240
|
|
|
183
241
|
## Development
|
|
184
242
|
|
package/dist/cjs/channels.cjs
CHANGED
|
@@ -12,13 +12,29 @@
|
|
|
12
12
|
* All values match the exact strings used in the source repos as of 2026-05.
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
15
|
+
exports.swarmKey = exports.wikiUpdatedKey = exports.wikiKey = exports.deletedCronsKey = exports.cronsKey = exports.learningsKey = exports.tgNotify = exports.tgChatIncoming = exports.tgChatOutgoing = exports.discordNotify = exports.discordChatIncoming = exports.discordChatLog = exports.discordChatOutgoing = exports.discordMetaStatusKey = exports.discordMetaInputKey = exports.metaAgentStatusKey = exports.metaInputKey = exports.metaKey = exports.chatOutgoingChannel = exports.chatIncomingChannel = exports.chatLogKey = exports.notifyPublishCommand = exports.notifyLogKey = exports.notifyListKey = exports.notifyChannel = exports.profileKey = exports.planKey = exports.coordinatorPlanKey = exports.jobDoneQueueKey = exports.jobDoneChannel = exports.jobOutputLiveChannel = exports.jobInputKey = exports.jobSignalKey = exports.jobOutputKey = exports.jobKey = exports.jobIndexKey = exports.SWARM_REQUESTS_KEY = exports.VOICE_FAILED_KEY = exports.VOICE_PENDING_KEY = exports.CC_TG_VERSION_KEY = exports.JOB_INDEX_PREFIX = exports.JOB_INDEX_GLOB = exports.CC_AGENT_VERSION_KEY = exports.TOKEN_INDEX_KEY = exports.PROFILES_INDEX = exports.META_AGENTS_INDEX = exports.COORDINATOR_GROUP = exports.EVENT_STREAM = exports.CC_TG_WORKSPACE = exports.CC_DISCORD_WORKSPACE_ROOT = void 0;
|
|
16
|
+
exports.TIMING = exports.CAP = exports.TTL = void 0;
|
|
17
|
+
// ─── Service Ownership Constants ─────────────────────────────────────────────
|
|
18
|
+
/**
|
|
19
|
+
* Root directory (relative to HOME) where cc-discord checks out per-namespace
|
|
20
|
+
* workspace clones: `~/cc-discord-workspace/{namespace}`.
|
|
21
|
+
*/
|
|
22
|
+
exports.CC_DISCORD_WORKSPACE_ROOT = "cc-discord-workspace";
|
|
23
|
+
/**
|
|
24
|
+
* Directory name (relative to HOME) of the money-brain repo used by cc-tg
|
|
25
|
+
* for its dedicated session: `~/money-brain`.
|
|
26
|
+
*/
|
|
27
|
+
exports.CC_TG_WORKSPACE = "money-brain";
|
|
16
28
|
// ─── Static Keys ─────────────────────────────────────────────────────────────
|
|
17
29
|
/** Redis Stream written by cc-agent on every job status change. */
|
|
18
30
|
exports.EVENT_STREAM = "cca:event-stream";
|
|
19
31
|
/** Consumer group name used by the coordinator to read from EVENT_STREAM. */
|
|
20
32
|
exports.COORDINATOR_GROUP = "coordinator";
|
|
21
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* SET — canonical registry of meta-agent namespaces.
|
|
35
|
+
* @deprecated cc-discord now maintains its own namespace registry.
|
|
36
|
+
* This key is no longer written by the cc-suite; kept for migration only.
|
|
37
|
+
*/
|
|
22
38
|
exports.META_AGENTS_INDEX = "cca:meta:agents:index";
|
|
23
39
|
/** SET — index of saved profile names. */
|
|
24
40
|
exports.PROFILES_INDEX = "cca:profiles:index";
|
|
@@ -118,12 +134,63 @@ exports.chatOutgoingChannel = chatOutgoingChannel;
|
|
|
118
134
|
/** STRING (JSON) — MetaAgentInfo state, TTL 30 days. */
|
|
119
135
|
const metaKey = (namespace) => `cca:meta:${namespace}`;
|
|
120
136
|
exports.metaKey = metaKey;
|
|
121
|
-
/**
|
|
137
|
+
/**
|
|
138
|
+
* LIST — input queue for a meta-agent (RPUSH by cc-tg, RPOP by cc-agent).
|
|
139
|
+
* @deprecated Use `discordMetaInputKey(ns)` — cc-discord now owns namespace sessions directly.
|
|
140
|
+
*/
|
|
122
141
|
const metaInputKey = (namespace) => `cca:meta:${namespace}:input`;
|
|
123
142
|
exports.metaInputKey = metaInputKey;
|
|
124
|
-
/**
|
|
143
|
+
/**
|
|
144
|
+
* STRING (JSON) — live meta-agent status (typing, tool, etc.), TTL 7 days.
|
|
145
|
+
* @deprecated Use `discordMetaStatusKey(ns)` — cc-discord now owns namespace sessions directly.
|
|
146
|
+
*/
|
|
125
147
|
const metaAgentStatusKey = (namespace) => `cca:meta-agent:status:${namespace}`;
|
|
126
148
|
exports.metaAgentStatusKey = metaAgentStatusKey;
|
|
149
|
+
// ─── cc-discord Keys (dynamic) ───────────────────────────────────────────────
|
|
150
|
+
//
|
|
151
|
+
// cc-discord owns all namespace-scoped Claude sessions. It reads from the
|
|
152
|
+
// meta input queue, writes status, and publishes/subscribes to chat/notify
|
|
153
|
+
// channels — all under the "cca:discord:" prefix to avoid collisions with
|
|
154
|
+
// the old cc-agent-owned keys.
|
|
155
|
+
/** LIST — input queue for a cc-discord-managed namespace session (RPUSH/RPOP). */
|
|
156
|
+
const discordMetaInputKey = (namespace) => `cca:discord:meta:${namespace}:input`;
|
|
157
|
+
exports.discordMetaInputKey = discordMetaInputKey;
|
|
158
|
+
/** STRING (JSON) — live status for a cc-discord-managed namespace session, TTL 7 days. */
|
|
159
|
+
const discordMetaStatusKey = (namespace) => `cca:discord:meta:${namespace}:status`;
|
|
160
|
+
exports.discordMetaStatusKey = discordMetaStatusKey;
|
|
161
|
+
/** CHANNEL — cc-discord → UI outgoing chat messages (pub/sub). */
|
|
162
|
+
const discordChatOutgoing = (namespace) => `cca:discord:chat:outgoing:${namespace}`;
|
|
163
|
+
exports.discordChatOutgoing = discordChatOutgoing;
|
|
164
|
+
/** LIST — cc-discord chat history (LPUSH capped at 500, LIFO). */
|
|
165
|
+
const discordChatLog = (namespace) => `cca:discord:chat:log:${namespace}`;
|
|
166
|
+
exports.discordChatLog = discordChatLog;
|
|
167
|
+
/** CHANNEL — UI/Discord → cc-discord incoming chat messages (pub/sub). */
|
|
168
|
+
const discordChatIncoming = (namespace) => `cca:discord:chat:incoming:${namespace}`;
|
|
169
|
+
exports.discordChatIncoming = discordChatIncoming;
|
|
170
|
+
/**
|
|
171
|
+
* CHANNEL + LIST — job-completion notifications for a Discord namespace.
|
|
172
|
+
*
|
|
173
|
+
* Same dual-purpose pattern as `notifyChannel`/`notifyListKey`: PUBLISH by
|
|
174
|
+
* coordinator (pub/sub) and RPUSH/RPOP delivery queue; Redis pub/sub and list
|
|
175
|
+
* namespaces are independent so the dual use is safe.
|
|
176
|
+
*/
|
|
177
|
+
const discordNotify = (namespace) => `cca:discord:notify:${namespace}`;
|
|
178
|
+
exports.discordNotify = discordNotify;
|
|
179
|
+
// ─── cc-tg Keys (static) ─────────────────────────────────────────────────────
|
|
180
|
+
//
|
|
181
|
+
// cc-tg owns a single dedicated money-brain session with no namespace scoping.
|
|
182
|
+
/** CHANNEL — cc-tg → UI outgoing chat messages (pub/sub). */
|
|
183
|
+
const tgChatOutgoing = () => "cca:tg:chat:outgoing";
|
|
184
|
+
exports.tgChatOutgoing = tgChatOutgoing;
|
|
185
|
+
/** CHANNEL — UI/Telegram → cc-tg incoming chat messages (pub/sub). */
|
|
186
|
+
const tgChatIncoming = () => "cca:tg:chat:incoming";
|
|
187
|
+
exports.tgChatIncoming = tgChatIncoming;
|
|
188
|
+
/**
|
|
189
|
+
* CHANNEL + LIST — job-completion notifications for the cc-tg session.
|
|
190
|
+
* Same dual-purpose pattern (pub/sub + RPOP poll fallback).
|
|
191
|
+
*/
|
|
192
|
+
const tgNotify = () => "cca:tg:notify";
|
|
193
|
+
exports.tgNotify = tgNotify;
|
|
127
194
|
// ─── Learnings Keys (dynamic) ─────────────────────────────────────────────────
|
|
128
195
|
/** LIST — learnings for a namespace (LPUSH capped at 50, LIFO), TTL 90 days. */
|
|
129
196
|
const learningsKey = (namespace) => `cca:learnings:${namespace}`;
|
package/dist/esm/channels.d.ts
CHANGED
|
@@ -11,11 +11,25 @@
|
|
|
11
11
|
* All values match the exact strings used in the source repos as of 2026-05.
|
|
12
12
|
*/
|
|
13
13
|
import type { NotificationPayload } from "./types.js";
|
|
14
|
+
/**
|
|
15
|
+
* Root directory (relative to HOME) where cc-discord checks out per-namespace
|
|
16
|
+
* workspace clones: `~/cc-discord-workspace/{namespace}`.
|
|
17
|
+
*/
|
|
18
|
+
export declare const CC_DISCORD_WORKSPACE_ROOT = "cc-discord-workspace";
|
|
19
|
+
/**
|
|
20
|
+
* Directory name (relative to HOME) of the money-brain repo used by cc-tg
|
|
21
|
+
* for its dedicated session: `~/money-brain`.
|
|
22
|
+
*/
|
|
23
|
+
export declare const CC_TG_WORKSPACE = "money-brain";
|
|
14
24
|
/** Redis Stream written by cc-agent on every job status change. */
|
|
15
25
|
export declare const EVENT_STREAM = "cca:event-stream";
|
|
16
26
|
/** Consumer group name used by the coordinator to read from EVENT_STREAM. */
|
|
17
27
|
export declare const COORDINATOR_GROUP = "coordinator";
|
|
18
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* SET — canonical registry of meta-agent namespaces.
|
|
30
|
+
* @deprecated cc-discord now maintains its own namespace registry.
|
|
31
|
+
* This key is no longer written by the cc-suite; kept for migration only.
|
|
32
|
+
*/
|
|
19
33
|
export declare const META_AGENTS_INDEX = "cca:meta:agents:index";
|
|
20
34
|
/** SET — index of saved profile names. */
|
|
21
35
|
export declare const PROFILES_INDEX = "cca:profiles:index";
|
|
@@ -86,10 +100,43 @@ export declare const chatIncomingChannel: (namespace: string) => string;
|
|
|
86
100
|
export declare const chatOutgoingChannel: (namespace: string) => string;
|
|
87
101
|
/** STRING (JSON) — MetaAgentInfo state, TTL 30 days. */
|
|
88
102
|
export declare const metaKey: (namespace: string) => string;
|
|
89
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* LIST — input queue for a meta-agent (RPUSH by cc-tg, RPOP by cc-agent).
|
|
105
|
+
* @deprecated Use `discordMetaInputKey(ns)` — cc-discord now owns namespace sessions directly.
|
|
106
|
+
*/
|
|
90
107
|
export declare const metaInputKey: (namespace: string) => string;
|
|
91
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* STRING (JSON) — live meta-agent status (typing, tool, etc.), TTL 7 days.
|
|
110
|
+
* @deprecated Use `discordMetaStatusKey(ns)` — cc-discord now owns namespace sessions directly.
|
|
111
|
+
*/
|
|
92
112
|
export declare const metaAgentStatusKey: (namespace: string) => string;
|
|
113
|
+
/** LIST — input queue for a cc-discord-managed namespace session (RPUSH/RPOP). */
|
|
114
|
+
export declare const discordMetaInputKey: (namespace: string) => string;
|
|
115
|
+
/** STRING (JSON) — live status for a cc-discord-managed namespace session, TTL 7 days. */
|
|
116
|
+
export declare const discordMetaStatusKey: (namespace: string) => string;
|
|
117
|
+
/** CHANNEL — cc-discord → UI outgoing chat messages (pub/sub). */
|
|
118
|
+
export declare const discordChatOutgoing: (namespace: string) => string;
|
|
119
|
+
/** LIST — cc-discord chat history (LPUSH capped at 500, LIFO). */
|
|
120
|
+
export declare const discordChatLog: (namespace: string) => string;
|
|
121
|
+
/** CHANNEL — UI/Discord → cc-discord incoming chat messages (pub/sub). */
|
|
122
|
+
export declare const discordChatIncoming: (namespace: string) => string;
|
|
123
|
+
/**
|
|
124
|
+
* CHANNEL + LIST — job-completion notifications for a Discord namespace.
|
|
125
|
+
*
|
|
126
|
+
* Same dual-purpose pattern as `notifyChannel`/`notifyListKey`: PUBLISH by
|
|
127
|
+
* coordinator (pub/sub) and RPUSH/RPOP delivery queue; Redis pub/sub and list
|
|
128
|
+
* namespaces are independent so the dual use is safe.
|
|
129
|
+
*/
|
|
130
|
+
export declare const discordNotify: (namespace: string) => string;
|
|
131
|
+
/** CHANNEL — cc-tg → UI outgoing chat messages (pub/sub). */
|
|
132
|
+
export declare const tgChatOutgoing: () => string;
|
|
133
|
+
/** CHANNEL — UI/Telegram → cc-tg incoming chat messages (pub/sub). */
|
|
134
|
+
export declare const tgChatIncoming: () => string;
|
|
135
|
+
/**
|
|
136
|
+
* CHANNEL + LIST — job-completion notifications for the cc-tg session.
|
|
137
|
+
* Same dual-purpose pattern (pub/sub + RPOP poll fallback).
|
|
138
|
+
*/
|
|
139
|
+
export declare const tgNotify: () => string;
|
|
93
140
|
/** LIST — learnings for a namespace (LPUSH capped at 50, LIFO), TTL 90 days. */
|
|
94
141
|
export declare const learningsKey: (namespace: string) => string;
|
|
95
142
|
/** STRING (JSON array) — cron job definitions for a namespace. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../src/channels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAItD,mEAAmE;AACnE,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAE/C,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../src/channels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAItD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,yBAAyB,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,eAAe,gBAAgB,CAAC;AAI7C,mEAAmE;AACnE,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAE/C,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAE/C;;;;GAIG;AACH,eAAO,M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
// ─── Service Ownership Constants ─────────────────────────────────────────────
|
|
14
|
+
/**
|
|
15
|
+
* Root directory (relative to HOME) where cc-discord checks out per-namespace
|
|
16
|
+
* workspace clones: `~/cc-discord-workspace/{namespace}`.
|
|
17
|
+
*/
|
|
18
|
+
export const CC_DISCORD_WORKSPACE_ROOT = "cc-discord-workspace";
|
|
19
|
+
/**
|
|
20
|
+
* Directory name (relative to HOME) of the money-brain repo used by cc-tg
|
|
21
|
+
* for its dedicated session: `~/money-brain`.
|
|
22
|
+
*/
|
|
23
|
+
export const CC_TG_WORKSPACE = "money-brain";
|
|
13
24
|
// ─── Static Keys ─────────────────────────────────────────────────────────────
|
|
14
25
|
/** Redis Stream written by cc-agent on every job status change. */
|
|
15
26
|
export const EVENT_STREAM = "cca:event-stream";
|
|
16
27
|
/** Consumer group name used by the coordinator to read from EVENT_STREAM. */
|
|
17
28
|
export const COORDINATOR_GROUP = "coordinator";
|
|
18
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* SET — canonical registry of meta-agent namespaces.
|
|
31
|
+
* @deprecated cc-discord now maintains its own namespace registry.
|
|
32
|
+
* This key is no longer written by the cc-suite; kept for migration only.
|
|
33
|
+
*/
|
|
19
34
|
export const META_AGENTS_INDEX = "cca:meta:agents:index";
|
|
20
35
|
/** SET — index of saved profile names. */
|
|
21
36
|
export const PROFILES_INDEX = "cca:profiles:index";
|
|
@@ -96,10 +111,52 @@ export const chatOutgoingChannel = (namespace) => `cca:chat:outgoing:${namespace
|
|
|
96
111
|
// ─── Meta-Agent Keys (dynamic) ───────────────────────────────────────────────
|
|
97
112
|
/** STRING (JSON) — MetaAgentInfo state, TTL 30 days. */
|
|
98
113
|
export const metaKey = (namespace) => `cca:meta:${namespace}`;
|
|
99
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* LIST — input queue for a meta-agent (RPUSH by cc-tg, RPOP by cc-agent).
|
|
116
|
+
* @deprecated Use `discordMetaInputKey(ns)` — cc-discord now owns namespace sessions directly.
|
|
117
|
+
*/
|
|
100
118
|
export const metaInputKey = (namespace) => `cca:meta:${namespace}:input`;
|
|
101
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* STRING (JSON) — live meta-agent status (typing, tool, etc.), TTL 7 days.
|
|
121
|
+
* @deprecated Use `discordMetaStatusKey(ns)` — cc-discord now owns namespace sessions directly.
|
|
122
|
+
*/
|
|
102
123
|
export const metaAgentStatusKey = (namespace) => `cca:meta-agent:status:${namespace}`;
|
|
124
|
+
// ─── cc-discord Keys (dynamic) ───────────────────────────────────────────────
|
|
125
|
+
//
|
|
126
|
+
// cc-discord owns all namespace-scoped Claude sessions. It reads from the
|
|
127
|
+
// meta input queue, writes status, and publishes/subscribes to chat/notify
|
|
128
|
+
// channels — all under the "cca:discord:" prefix to avoid collisions with
|
|
129
|
+
// the old cc-agent-owned keys.
|
|
130
|
+
/** LIST — input queue for a cc-discord-managed namespace session (RPUSH/RPOP). */
|
|
131
|
+
export const discordMetaInputKey = (namespace) => `cca:discord:meta:${namespace}:input`;
|
|
132
|
+
/** STRING (JSON) — live status for a cc-discord-managed namespace session, TTL 7 days. */
|
|
133
|
+
export const discordMetaStatusKey = (namespace) => `cca:discord:meta:${namespace}:status`;
|
|
134
|
+
/** CHANNEL — cc-discord → UI outgoing chat messages (pub/sub). */
|
|
135
|
+
export const discordChatOutgoing = (namespace) => `cca:discord:chat:outgoing:${namespace}`;
|
|
136
|
+
/** LIST — cc-discord chat history (LPUSH capped at 500, LIFO). */
|
|
137
|
+
export const discordChatLog = (namespace) => `cca:discord:chat:log:${namespace}`;
|
|
138
|
+
/** CHANNEL — UI/Discord → cc-discord incoming chat messages (pub/sub). */
|
|
139
|
+
export const discordChatIncoming = (namespace) => `cca:discord:chat:incoming:${namespace}`;
|
|
140
|
+
/**
|
|
141
|
+
* CHANNEL + LIST — job-completion notifications for a Discord namespace.
|
|
142
|
+
*
|
|
143
|
+
* Same dual-purpose pattern as `notifyChannel`/`notifyListKey`: PUBLISH by
|
|
144
|
+
* coordinator (pub/sub) and RPUSH/RPOP delivery queue; Redis pub/sub and list
|
|
145
|
+
* namespaces are independent so the dual use is safe.
|
|
146
|
+
*/
|
|
147
|
+
export const discordNotify = (namespace) => `cca:discord:notify:${namespace}`;
|
|
148
|
+
// ─── cc-tg Keys (static) ─────────────────────────────────────────────────────
|
|
149
|
+
//
|
|
150
|
+
// cc-tg owns a single dedicated money-brain session with no namespace scoping.
|
|
151
|
+
/** CHANNEL — cc-tg → UI outgoing chat messages (pub/sub). */
|
|
152
|
+
export const tgChatOutgoing = () => "cca:tg:chat:outgoing";
|
|
153
|
+
/** CHANNEL — UI/Telegram → cc-tg incoming chat messages (pub/sub). */
|
|
154
|
+
export const tgChatIncoming = () => "cca:tg:chat:incoming";
|
|
155
|
+
/**
|
|
156
|
+
* CHANNEL + LIST — job-completion notifications for the cc-tg session.
|
|
157
|
+
* Same dual-purpose pattern (pub/sub + RPOP poll fallback).
|
|
158
|
+
*/
|
|
159
|
+
export const tgNotify = () => "cca:tg:notify";
|
|
103
160
|
// ─── Learnings Keys (dynamic) ─────────────────────────────────────────────────
|
|
104
161
|
/** LIST — learnings for a namespace (LPUSH capped at 50, LIFO), TTL 90 days. */
|
|
105
162
|
export const learningsKey = (namespace) => `cca:learnings:${namespace}`;
|
package/dist/esm/channels.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channels.js","sourceRoot":"","sources":["../../src/channels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,gFAAgF;AAEhF,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAE/C,6EAA6E;AAC7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAE/C
|
|
1
|
+
{"version":3,"file":"channels.js","sourceRoot":"","sources":["../../src/channels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,CAAC,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face NotificationPayload {
|
|
|
127
127
|
/**
|
|
128
128
|
* Shape for all messages written to chat channels and the chat log.
|
|
129
129
|
*
|
|
130
|
-
* Ordering note: `cca:chat:log:{ns}`
|
|
131
|
-
* the LRANGE result for chronological
|
|
130
|
+
* Ordering note: `cca:discord:chat:log:{ns}` and legacy `cca:chat:log:{ns}`
|
|
131
|
+
* are LIFO (LPUSH). Consumers must reverse the LRANGE result for chronological
|
|
132
|
+
* display.
|
|
132
133
|
*/
|
|
133
134
|
export interface ChatMessage {
|
|
134
135
|
id: string;
|
|
135
|
-
source: "telegram" | "ui" | "claude" | "cc-tg";
|
|
136
|
+
source: "telegram" | "ui" | "claude" | "cc-tg" | "discord";
|
|
137
|
+
/** Which bridge service produced or consumed this message. */
|
|
138
|
+
service?: "cc-discord" | "cc-tg";
|
|
136
139
|
role: "user" | "assistant" | "tool";
|
|
137
140
|
content: string;
|
|
141
|
+
/** The namespace (Discord channel slug or "money-brain") this message belongs to. */
|
|
142
|
+
namespace?: string;
|
|
138
143
|
timestamp: string;
|
|
139
|
-
chatId
|
|
144
|
+
chatId?: number;
|
|
140
145
|
}
|
|
141
146
|
/**
|
|
142
147
|
* Persisted meta-agent state stored in `cca:meta:{namespace}`.
|
|
@@ -190,6 +195,14 @@ export interface Profile {
|
|
|
190
195
|
/**
|
|
191
196
|
* Parameters passed when spawning a new job (cc-agent spawn RPC, coordinator
|
|
192
197
|
* next_step, plan steps). All scheduling-specific fields are optional.
|
|
198
|
+
*
|
|
199
|
+
* `spawning_namespace` controls where job-completion notifications are routed:
|
|
200
|
+
* - absent → coordinator's own namespace (e.g. "money-brain")
|
|
201
|
+
* - present → that namespace's cca:notify:{spawning_namespace} channel
|
|
202
|
+
*
|
|
203
|
+
* Callers that need notifications routed back to themselves MUST set this.
|
|
204
|
+
* cc-tg injects it client-side; cc-agent meta-agent context should inject it
|
|
205
|
+
* server-side (see gonzih/cc-agent#<issue>).
|
|
193
206
|
*/
|
|
194
207
|
export interface SpawnParams {
|
|
195
208
|
repoUrl: string;
|
|
@@ -199,6 +212,7 @@ export interface SpawnParams {
|
|
|
199
212
|
dependsOn?: string[];
|
|
200
213
|
effort_level?: EffortLevel;
|
|
201
214
|
fast_mode?: boolean;
|
|
215
|
+
spawning_namespace?: string;
|
|
202
216
|
}
|
|
203
217
|
/** A single step inside a PlanRecord. */
|
|
204
218
|
export interface PlanStep {
|
package/dist/esm/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAI/E,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,SAAS,GACT,SAAS,GACT,MAAM,GACN,QAAQ,GACR,WAAW,GACX,UAAU,GACV,kBAAkB,GAClB,UAAU,GACV,aAAa,CAAC;AAIlB;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB,CAAC,EA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
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gonzih/cc-wire",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Single source of truth for Redis channel names, key patterns, and message shapes across the cc-suite (cc-tg, cc-agent, cc-agent-ui)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "22.15.21",
|
|
34
|
-
"tsx": "4.
|
|
34
|
+
"tsx": "4.22.4",
|
|
35
35
|
"typescript": "5.8.3"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|