@gonzih/cc-wire 0.1.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/dist/cjs/channels.cjs +144 -0
- package/dist/cjs/index.cjs +26 -0
- package/dist/cjs/types.cjs +12 -0
- package/dist/esm/channels.d.ts +107 -0
- package/dist/esm/channels.d.ts.map +1 -0
- package/dist/esm/channels.js +120 -0
- package/dist/esm/channels.js.map +1 -0
- package/dist/esm/index.d.ts +11 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +11 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types.d.ts +218 -0
- package/dist/esm/types.d.ts.map +1 -0
- package/dist/esm/types.js +12 -0
- package/dist/esm/types.js.map +1 -0
- package/package.json +42 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* cc-wire: channels.ts
|
|
4
|
+
*
|
|
5
|
+
* Single source of truth for every Redis key pattern and pub/sub channel
|
|
6
|
+
* used across the cc-suite (cc-agent, cc-tg, cc-agent-ui).
|
|
7
|
+
*
|
|
8
|
+
* Conventions:
|
|
9
|
+
* - SCREAMING_SNAKE_CASE — static key/channel names (no parameters)
|
|
10
|
+
* - camelCase functions — dynamic key/channel builders (one or more parameters)
|
|
11
|
+
*
|
|
12
|
+
* All values match the exact strings used in the source repos as of 2026-05.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.TIMING = exports.CAP = exports.TTL = exports.swarmKey = exports.cronsKey = exports.learningsKey = exports.metaAgentStatusKey = exports.metaInputKey = exports.metaKey = exports.chatOutgoingChannel = exports.chatIncomingChannel = exports.chatLogKey = exports.notifyLogKey = 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.CC_AGENT_VERSION_KEY = exports.TOKEN_INDEX_KEY = exports.PROFILES_INDEX = exports.META_AGENTS_INDEX = exports.COORDINATOR_GROUP = exports.EVENT_STREAM = void 0;
|
|
16
|
+
// ─── Static Keys ─────────────────────────────────────────────────────────────
|
|
17
|
+
/** Redis Stream written by cc-agent on every job status change. */
|
|
18
|
+
exports.EVENT_STREAM = "cca:event-stream";
|
|
19
|
+
/** Consumer group name used by the coordinator to read from EVENT_STREAM. */
|
|
20
|
+
exports.COORDINATOR_GROUP = "coordinator";
|
|
21
|
+
/** SET — canonical registry of meta-agent namespaces. */
|
|
22
|
+
exports.META_AGENTS_INDEX = "cca:meta:agents:index";
|
|
23
|
+
/** SET — index of saved profile names. */
|
|
24
|
+
exports.PROFILES_INDEX = "cca:profiles:index";
|
|
25
|
+
/** STRING — current token rotation index (INCR/GET). */
|
|
26
|
+
exports.TOKEN_INDEX_KEY = "cca:token:index";
|
|
27
|
+
/** STRING — running cc-agent npm version. */
|
|
28
|
+
exports.CC_AGENT_VERSION_KEY = "cca:meta:cc-agent:version";
|
|
29
|
+
/** STRING — running cc-tg npm version. */
|
|
30
|
+
exports.CC_TG_VERSION_KEY = "cca:meta:cc-tg:version";
|
|
31
|
+
/** LIST — cc-tg voice transcription pending queue (RPUSH, LRANGE, LREM). */
|
|
32
|
+
exports.VOICE_PENDING_KEY = "voice:pending";
|
|
33
|
+
/** LIST — cc-tg voice transcription failure log (RPUSH), TTL 48h. */
|
|
34
|
+
exports.VOICE_FAILED_KEY = "voice:failed";
|
|
35
|
+
/** LIST — swarm task request queue (LPUSH). */
|
|
36
|
+
exports.SWARM_REQUESTS_KEY = "cca:swarm:requests";
|
|
37
|
+
// ─── Job Keys (dynamic) ───────────────────────────────────────────────────────
|
|
38
|
+
/** SET — job IDs for a given namespace. */
|
|
39
|
+
const jobIndexKey = (namespace) => `cca:jobs:${namespace}`;
|
|
40
|
+
exports.jobIndexKey = jobIndexKey;
|
|
41
|
+
/** STRING (JSON) — full JobRecord, TTL 7 days. */
|
|
42
|
+
const jobKey = (jobId) => `cca:job:${jobId}`;
|
|
43
|
+
exports.jobKey = jobKey;
|
|
44
|
+
/** LIST — log lines (RPUSH, LRANGE), TTL 7 days. */
|
|
45
|
+
const jobOutputKey = (jobId) => `cca:job:${jobId}:output`;
|
|
46
|
+
exports.jobOutputKey = jobOutputKey;
|
|
47
|
+
/** STRING — control signal written by cancel/wake: `"cancel"` | `"wake"`. */
|
|
48
|
+
const jobSignalKey = (jobId) => `cca:job:${jobId}:signal`;
|
|
49
|
+
exports.jobSignalKey = jobSignalKey;
|
|
50
|
+
/** LIST — in-flight messages queued for a running job (RPUSH/RPOP). */
|
|
51
|
+
const jobInputKey = (jobId) => `cca:job:${jobId}:input`;
|
|
52
|
+
exports.jobInputKey = jobInputKey;
|
|
53
|
+
/** CHANNEL — live output lines published as the job runs (pub/sub). */
|
|
54
|
+
const jobOutputLiveChannel = (jobId) => `cca:job:${jobId}:output:live`;
|
|
55
|
+
exports.jobOutputLiveChannel = jobOutputLiveChannel;
|
|
56
|
+
/** CHANNEL — job completion notification (pub/sub). */
|
|
57
|
+
const jobDoneChannel = (jobId) => `cca:job:done:${jobId}`;
|
|
58
|
+
exports.jobDoneChannel = jobDoneChannel;
|
|
59
|
+
/** LIST — LPUSH/BLPOP queue for wait_for_job, TTL 7 days. */
|
|
60
|
+
const jobDoneQueueKey = (jobId) => `cca:job:done:${jobId}:queue`;
|
|
61
|
+
exports.jobDoneQueueKey = jobDoneQueueKey;
|
|
62
|
+
// ─── Coordinator Keys (dynamic) ───────────────────────────────────────────────
|
|
63
|
+
/** STRING — coordinator plan JSON stored per job. */
|
|
64
|
+
const coordinatorPlanKey = (jobId) => `cca:coordinator:plan:${jobId}`;
|
|
65
|
+
exports.coordinatorPlanKey = coordinatorPlanKey;
|
|
66
|
+
// ─── Plan Keys (dynamic) ──────────────────────────────────────────────────────
|
|
67
|
+
/** STRING (JSON) — PlanRecord, TTL 30 days. */
|
|
68
|
+
const planKey = (planId) => `cca:plan:${planId}`;
|
|
69
|
+
exports.planKey = planKey;
|
|
70
|
+
// ─── Profile Keys (dynamic) ───────────────────────────────────────────────────
|
|
71
|
+
/** STRING (JSON) — saved Profile. */
|
|
72
|
+
const profileKey = (name) => `cca:profile:${name}`;
|
|
73
|
+
exports.profileKey = profileKey;
|
|
74
|
+
// ─── Notify / Chat Keys (dynamic) ────────────────────────────────────────────
|
|
75
|
+
/** CHANNEL — job completion notifications published by coordinator (pub/sub). */
|
|
76
|
+
const notifyChannel = (namespace) => `cca:notify:${namespace}`;
|
|
77
|
+
exports.notifyChannel = notifyChannel;
|
|
78
|
+
/** LIST — notification log (LPUSH capped at 100, LIFO). */
|
|
79
|
+
const notifyLogKey = (namespace) => `cca:notify-log:${namespace}`;
|
|
80
|
+
exports.notifyLogKey = notifyLogKey;
|
|
81
|
+
/** LIST — chat history (LPUSH capped at 500, LIFO — newest at index 0). */
|
|
82
|
+
const chatLogKey = (namespace) => `cca:chat:log:${namespace}`;
|
|
83
|
+
exports.chatLogKey = chatLogKey;
|
|
84
|
+
/** CHANNEL — UI → cc-tg messages (pub/sub). */
|
|
85
|
+
const chatIncomingChannel = (namespace) => `cca:chat:incoming:${namespace}`;
|
|
86
|
+
exports.chatIncomingChannel = chatIncomingChannel;
|
|
87
|
+
/** CHANNEL — cc-tg / meta-agent → UI messages (pub/sub). */
|
|
88
|
+
const chatOutgoingChannel = (namespace) => `cca:chat:outgoing:${namespace}`;
|
|
89
|
+
exports.chatOutgoingChannel = chatOutgoingChannel;
|
|
90
|
+
// ─── Meta-Agent Keys (dynamic) ───────────────────────────────────────────────
|
|
91
|
+
/** STRING (JSON) — MetaAgentInfo state, TTL 30 days. */
|
|
92
|
+
const metaKey = (namespace) => `cca:meta:${namespace}`;
|
|
93
|
+
exports.metaKey = metaKey;
|
|
94
|
+
/** LIST — input queue for a meta-agent (RPUSH by cc-tg, RPOP by cc-agent). */
|
|
95
|
+
const metaInputKey = (namespace) => `cca:meta:${namespace}:input`;
|
|
96
|
+
exports.metaInputKey = metaInputKey;
|
|
97
|
+
/** STRING (JSON) — live meta-agent status (typing, tool, etc.), TTL 7 days. */
|
|
98
|
+
const metaAgentStatusKey = (namespace) => `cca:meta-agent:status:${namespace}`;
|
|
99
|
+
exports.metaAgentStatusKey = metaAgentStatusKey;
|
|
100
|
+
// ─── Learnings Keys (dynamic) ─────────────────────────────────────────────────
|
|
101
|
+
/** LIST — learnings for a namespace (LPUSH capped at 50, LIFO), TTL 90 days. */
|
|
102
|
+
const learningsKey = (namespace) => `cca:learnings:${namespace}`;
|
|
103
|
+
exports.learningsKey = learningsKey;
|
|
104
|
+
// ─── Cron Keys (dynamic) ──────────────────────────────────────────────────────
|
|
105
|
+
/** STRING (JSON array) — cron job definitions for a namespace. */
|
|
106
|
+
const cronsKey = (namespace) => `cca:crons:${namespace}`;
|
|
107
|
+
exports.cronsKey = cronsKey;
|
|
108
|
+
// ─── Swarm Keys (dynamic) ─────────────────────────────────────────────────────
|
|
109
|
+
/** STRING (JSON) — SwarmRecord for a given swarm ID. */
|
|
110
|
+
const swarmKey = (swarmId) => `cca:swarm:${swarmId}`;
|
|
111
|
+
exports.swarmKey = swarmKey;
|
|
112
|
+
// ─── TTL Constants ────────────────────────────────────────────────────────────
|
|
113
|
+
exports.TTL = {
|
|
114
|
+
/** 7 days in seconds — job records, output lists, done queues, meta-agent status. */
|
|
115
|
+
JOB_SECONDS: 7 * 24 * 60 * 60,
|
|
116
|
+
/** 30 days in seconds — plans, meta-agent state. */
|
|
117
|
+
PLAN_SECONDS: 30 * 24 * 60 * 60,
|
|
118
|
+
/** 90 days in seconds — learnings lists. */
|
|
119
|
+
LEARNINGS_SECONDS: 90 * 24 * 60 * 60,
|
|
120
|
+
/** 48 hours in seconds — voice:failed list. */
|
|
121
|
+
VOICE_FAILED_SECONDS: 48 * 60 * 60,
|
|
122
|
+
};
|
|
123
|
+
// ─── Cap Constants ────────────────────────────────────────────────────────────
|
|
124
|
+
exports.CAP = {
|
|
125
|
+
/** Maximum entries in cca:notify-log:{ns} (LTRIM 0 N-1). */
|
|
126
|
+
NOTIFY_LOG: 100,
|
|
127
|
+
/** Maximum entries in cca:chat:log:{ns} (LTRIM 0 N-1). */
|
|
128
|
+
CHAT_LOG: 500,
|
|
129
|
+
/** Maximum entries in cca:learnings:{ns} (LTRIM 0 N-1). */
|
|
130
|
+
LEARNINGS: 50,
|
|
131
|
+
/** Maximum entries in cca:event-stream (XTRIM MAXLEN ~). */
|
|
132
|
+
EVENT_STREAM: 500,
|
|
133
|
+
};
|
|
134
|
+
// ─── Timing Constants ─────────────────────────────────────────────────────────
|
|
135
|
+
exports.TIMING = {
|
|
136
|
+
/** How often the coordinator polls the event stream for new entries (ms). */
|
|
137
|
+
COORDINATOR_POLL_MS: 2000,
|
|
138
|
+
/** How often the dependency scheduler checks pending jobs (ms). */
|
|
139
|
+
DEPENDENCY_TICK_MS: 3000,
|
|
140
|
+
/** How often the meta-agent poller drains input queues (ms). */
|
|
141
|
+
INPUT_POLL_INTERVAL_MS: 3000,
|
|
142
|
+
/** Debounce delay before cc-tg flushes meta-agent streaming output (ms). */
|
|
143
|
+
META_AGENT_FLUSH_DELAY_MS: 1500,
|
|
144
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @gonzih/cc-wire
|
|
4
|
+
*
|
|
5
|
+
* Single source of truth for Redis channel names, key patterns, and message
|
|
6
|
+
* shapes across the cc-suite (cc-agent, cc-tg, cc-agent-ui).
|
|
7
|
+
*
|
|
8
|
+
* No runtime deps, no Redis client — just constants, builders, and types.
|
|
9
|
+
*/
|
|
10
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
13
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
14
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
15
|
+
}
|
|
16
|
+
Object.defineProperty(o, k2, desc);
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
22
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
__exportStar(require("./channels.cjs"), exports);
|
|
26
|
+
__exportStar(require("./types.cjs"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* cc-wire: types.ts
|
|
4
|
+
*
|
|
5
|
+
* TypeScript interfaces for every message payload and record shape
|
|
6
|
+
* published/stored on each Redis channel or key across the cc-suite.
|
|
7
|
+
*
|
|
8
|
+
* Derived from actual source: cc-agent/src/types.ts, cc-agent/src/store.ts,
|
|
9
|
+
* cc-agent/src/meta-agent.ts, cc-tg/src/notifier.ts, cc-agent-ui/server.js,
|
|
10
|
+
* and docs/redis-protocol.md (both repos).
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cc-wire: channels.ts
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for every Redis key pattern and pub/sub channel
|
|
5
|
+
* used across the cc-suite (cc-agent, cc-tg, cc-agent-ui).
|
|
6
|
+
*
|
|
7
|
+
* Conventions:
|
|
8
|
+
* - SCREAMING_SNAKE_CASE — static key/channel names (no parameters)
|
|
9
|
+
* - camelCase functions — dynamic key/channel builders (one or more parameters)
|
|
10
|
+
*
|
|
11
|
+
* All values match the exact strings used in the source repos as of 2026-05.
|
|
12
|
+
*/
|
|
13
|
+
/** Redis Stream written by cc-agent on every job status change. */
|
|
14
|
+
export declare const EVENT_STREAM = "cca:event-stream";
|
|
15
|
+
/** Consumer group name used by the coordinator to read from EVENT_STREAM. */
|
|
16
|
+
export declare const COORDINATOR_GROUP = "coordinator";
|
|
17
|
+
/** SET — canonical registry of meta-agent namespaces. */
|
|
18
|
+
export declare const META_AGENTS_INDEX = "cca:meta:agents:index";
|
|
19
|
+
/** SET — index of saved profile names. */
|
|
20
|
+
export declare const PROFILES_INDEX = "cca:profiles:index";
|
|
21
|
+
/** STRING — current token rotation index (INCR/GET). */
|
|
22
|
+
export declare const TOKEN_INDEX_KEY = "cca:token:index";
|
|
23
|
+
/** STRING — running cc-agent npm version. */
|
|
24
|
+
export declare const CC_AGENT_VERSION_KEY = "cca:meta:cc-agent:version";
|
|
25
|
+
/** STRING — running cc-tg npm version. */
|
|
26
|
+
export declare const CC_TG_VERSION_KEY = "cca:meta:cc-tg:version";
|
|
27
|
+
/** LIST — cc-tg voice transcription pending queue (RPUSH, LRANGE, LREM). */
|
|
28
|
+
export declare const VOICE_PENDING_KEY = "voice:pending";
|
|
29
|
+
/** LIST — cc-tg voice transcription failure log (RPUSH), TTL 48h. */
|
|
30
|
+
export declare const VOICE_FAILED_KEY = "voice:failed";
|
|
31
|
+
/** LIST — swarm task request queue (LPUSH). */
|
|
32
|
+
export declare const SWARM_REQUESTS_KEY = "cca:swarm:requests";
|
|
33
|
+
/** SET — job IDs for a given namespace. */
|
|
34
|
+
export declare const jobIndexKey: (namespace: string) => string;
|
|
35
|
+
/** STRING (JSON) — full JobRecord, TTL 7 days. */
|
|
36
|
+
export declare const jobKey: (jobId: string) => string;
|
|
37
|
+
/** LIST — log lines (RPUSH, LRANGE), TTL 7 days. */
|
|
38
|
+
export declare const jobOutputKey: (jobId: string) => string;
|
|
39
|
+
/** STRING — control signal written by cancel/wake: `"cancel"` | `"wake"`. */
|
|
40
|
+
export declare const jobSignalKey: (jobId: string) => string;
|
|
41
|
+
/** LIST — in-flight messages queued for a running job (RPUSH/RPOP). */
|
|
42
|
+
export declare const jobInputKey: (jobId: string) => string;
|
|
43
|
+
/** CHANNEL — live output lines published as the job runs (pub/sub). */
|
|
44
|
+
export declare const jobOutputLiveChannel: (jobId: string) => string;
|
|
45
|
+
/** CHANNEL — job completion notification (pub/sub). */
|
|
46
|
+
export declare const jobDoneChannel: (jobId: string) => string;
|
|
47
|
+
/** LIST — LPUSH/BLPOP queue for wait_for_job, TTL 7 days. */
|
|
48
|
+
export declare const jobDoneQueueKey: (jobId: string) => string;
|
|
49
|
+
/** STRING — coordinator plan JSON stored per job. */
|
|
50
|
+
export declare const coordinatorPlanKey: (jobId: string) => string;
|
|
51
|
+
/** STRING (JSON) — PlanRecord, TTL 30 days. */
|
|
52
|
+
export declare const planKey: (planId: string) => string;
|
|
53
|
+
/** STRING (JSON) — saved Profile. */
|
|
54
|
+
export declare const profileKey: (name: string) => string;
|
|
55
|
+
/** CHANNEL — job completion notifications published by coordinator (pub/sub). */
|
|
56
|
+
export declare const notifyChannel: (namespace: string) => string;
|
|
57
|
+
/** LIST — notification log (LPUSH capped at 100, LIFO). */
|
|
58
|
+
export declare const notifyLogKey: (namespace: string) => string;
|
|
59
|
+
/** LIST — chat history (LPUSH capped at 500, LIFO — newest at index 0). */
|
|
60
|
+
export declare const chatLogKey: (namespace: string) => string;
|
|
61
|
+
/** CHANNEL — UI → cc-tg messages (pub/sub). */
|
|
62
|
+
export declare const chatIncomingChannel: (namespace: string) => string;
|
|
63
|
+
/** CHANNEL — cc-tg / meta-agent → UI messages (pub/sub). */
|
|
64
|
+
export declare const chatOutgoingChannel: (namespace: string) => string;
|
|
65
|
+
/** STRING (JSON) — MetaAgentInfo state, TTL 30 days. */
|
|
66
|
+
export declare const metaKey: (namespace: string) => string;
|
|
67
|
+
/** LIST — input queue for a meta-agent (RPUSH by cc-tg, RPOP by cc-agent). */
|
|
68
|
+
export declare const metaInputKey: (namespace: string) => string;
|
|
69
|
+
/** STRING (JSON) — live meta-agent status (typing, tool, etc.), TTL 7 days. */
|
|
70
|
+
export declare const metaAgentStatusKey: (namespace: string) => string;
|
|
71
|
+
/** LIST — learnings for a namespace (LPUSH capped at 50, LIFO), TTL 90 days. */
|
|
72
|
+
export declare const learningsKey: (namespace: string) => string;
|
|
73
|
+
/** STRING (JSON array) — cron job definitions for a namespace. */
|
|
74
|
+
export declare const cronsKey: (namespace: string) => string;
|
|
75
|
+
/** STRING (JSON) — SwarmRecord for a given swarm ID. */
|
|
76
|
+
export declare const swarmKey: (swarmId: string) => string;
|
|
77
|
+
export declare const TTL: {
|
|
78
|
+
/** 7 days in seconds — job records, output lists, done queues, meta-agent status. */
|
|
79
|
+
readonly JOB_SECONDS: number;
|
|
80
|
+
/** 30 days in seconds — plans, meta-agent state. */
|
|
81
|
+
readonly PLAN_SECONDS: number;
|
|
82
|
+
/** 90 days in seconds — learnings lists. */
|
|
83
|
+
readonly LEARNINGS_SECONDS: number;
|
|
84
|
+
/** 48 hours in seconds — voice:failed list. */
|
|
85
|
+
readonly VOICE_FAILED_SECONDS: number;
|
|
86
|
+
};
|
|
87
|
+
export declare const CAP: {
|
|
88
|
+
/** Maximum entries in cca:notify-log:{ns} (LTRIM 0 N-1). */
|
|
89
|
+
readonly NOTIFY_LOG: 100;
|
|
90
|
+
/** Maximum entries in cca:chat:log:{ns} (LTRIM 0 N-1). */
|
|
91
|
+
readonly CHAT_LOG: 500;
|
|
92
|
+
/** Maximum entries in cca:learnings:{ns} (LTRIM 0 N-1). */
|
|
93
|
+
readonly LEARNINGS: 50;
|
|
94
|
+
/** Maximum entries in cca:event-stream (XTRIM MAXLEN ~). */
|
|
95
|
+
readonly EVENT_STREAM: 500;
|
|
96
|
+
};
|
|
97
|
+
export declare const TIMING: {
|
|
98
|
+
/** How often the coordinator polls the event stream for new entries (ms). */
|
|
99
|
+
readonly COORDINATOR_POLL_MS: 2000;
|
|
100
|
+
/** How often the dependency scheduler checks pending jobs (ms). */
|
|
101
|
+
readonly DEPENDENCY_TICK_MS: 3000;
|
|
102
|
+
/** How often the meta-agent poller drains input queues (ms). */
|
|
103
|
+
readonly INPUT_POLL_INTERVAL_MS: 3000;
|
|
104
|
+
/** Debounce delay before cc-tg flushes meta-agent streaming output (ms). */
|
|
105
|
+
readonly META_AGENT_FLUSH_DELAY_MS: 1500;
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=channels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../src/channels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,mEAAmE;AACnE,eAAO,MAAM,YAAY,qBAAqB,CAAC;AAE/C,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,gBAAgB,CAAC;AAE/C,yDAAyD;AACzD,eAAO,MAAM,iBAAiB,0BAA0B,CAAC;AAEzD,0CAA0C;AAC1C,eAAO,MAAM,cAAc,uBAAuB,CAAC;AAEnD,wDAAwD;AACxD,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,6CAA6C;AAC7C,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AAEhE,0CAA0C;AAC1C,eAAO,MAAM,iBAAiB,2BAA2B,CAAC;AAE1D,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD,qEAAqE;AACrE,eAAO,MAAM,gBAAgB,iBAAiB,CAAC;AAE/C,+CAA+C;AAC/C,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAIvD,2CAA2C;AAC3C,eAAO,MAAM,WAAW,GAAI,WAAW,MAAM,KAAG,MACvB,CAAC;AAE1B,kDAAkD;AAClD,eAAO,MAAM,MAAM,GAAI,OAAO,MAAM,KAAG,MACnB,CAAC;AAErB,oDAAoD;AACp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/E,eAAO,MAAM,kBAAkB,GAAI,WAAW,MAAM,KAAG,MACjB,CAAC;AAIvC,gFAAgF;AAChF,eAAO,MAAM,YAAY,GAAI,WAAW,MAAM,KAAG,MACnB,CAAC;AAI/B,kEAAkE;AAClE,eAAO,MAAM,QAAQ,GAAI,WAAW,MAAM,KAAG,MACnB,CAAC;AAI3B,wDAAwD;AACxD,eAAO,MAAM,QAAQ,GAAI,SAAS,MAAM,KAAG,MACnB,CAAC;AAIzB,eAAO,MAAM,GAAG;IACd,qFAAqF;;IAErF,oDAAoD;;IAEpD,4CAA4C;;IAE5C,+CAA+C;;CAEvC,CAAC;AAIX,eAAO,MAAM,GAAG;IACd,4DAA4D;;IAE5D,0DAA0D;;IAE1D,2DAA2D;;IAE3D,4DAA4D;;CAEpD,CAAC;AAIX,eAAO,MAAM,MAAM;IACjB,6EAA6E;;IAE7E,mEAAmE;;IAEnE,gEAAgE;;IAEhE,4EAA4E;;CAEpE,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cc-wire: channels.ts
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for every Redis key pattern and pub/sub channel
|
|
5
|
+
* used across the cc-suite (cc-agent, cc-tg, cc-agent-ui).
|
|
6
|
+
*
|
|
7
|
+
* Conventions:
|
|
8
|
+
* - SCREAMING_SNAKE_CASE — static key/channel names (no parameters)
|
|
9
|
+
* - camelCase functions — dynamic key/channel builders (one or more parameters)
|
|
10
|
+
*
|
|
11
|
+
* All values match the exact strings used in the source repos as of 2026-05.
|
|
12
|
+
*/
|
|
13
|
+
// ─── Static Keys ─────────────────────────────────────────────────────────────
|
|
14
|
+
/** Redis Stream written by cc-agent on every job status change. */
|
|
15
|
+
export const EVENT_STREAM = "cca:event-stream";
|
|
16
|
+
/** Consumer group name used by the coordinator to read from EVENT_STREAM. */
|
|
17
|
+
export const COORDINATOR_GROUP = "coordinator";
|
|
18
|
+
/** SET — canonical registry of meta-agent namespaces. */
|
|
19
|
+
export const META_AGENTS_INDEX = "cca:meta:agents:index";
|
|
20
|
+
/** SET — index of saved profile names. */
|
|
21
|
+
export const PROFILES_INDEX = "cca:profiles:index";
|
|
22
|
+
/** STRING — current token rotation index (INCR/GET). */
|
|
23
|
+
export const TOKEN_INDEX_KEY = "cca:token:index";
|
|
24
|
+
/** STRING — running cc-agent npm version. */
|
|
25
|
+
export const CC_AGENT_VERSION_KEY = "cca:meta:cc-agent:version";
|
|
26
|
+
/** STRING — running cc-tg npm version. */
|
|
27
|
+
export const CC_TG_VERSION_KEY = "cca:meta:cc-tg:version";
|
|
28
|
+
/** LIST — cc-tg voice transcription pending queue (RPUSH, LRANGE, LREM). */
|
|
29
|
+
export const VOICE_PENDING_KEY = "voice:pending";
|
|
30
|
+
/** LIST — cc-tg voice transcription failure log (RPUSH), TTL 48h. */
|
|
31
|
+
export const VOICE_FAILED_KEY = "voice:failed";
|
|
32
|
+
/** LIST — swarm task request queue (LPUSH). */
|
|
33
|
+
export const SWARM_REQUESTS_KEY = "cca:swarm:requests";
|
|
34
|
+
// ─── Job Keys (dynamic) ───────────────────────────────────────────────────────
|
|
35
|
+
/** SET — job IDs for a given namespace. */
|
|
36
|
+
export const jobIndexKey = (namespace) => `cca:jobs:${namespace}`;
|
|
37
|
+
/** STRING (JSON) — full JobRecord, TTL 7 days. */
|
|
38
|
+
export const jobKey = (jobId) => `cca:job:${jobId}`;
|
|
39
|
+
/** LIST — log lines (RPUSH, LRANGE), TTL 7 days. */
|
|
40
|
+
export const jobOutputKey = (jobId) => `cca:job:${jobId}:output`;
|
|
41
|
+
/** STRING — control signal written by cancel/wake: `"cancel"` | `"wake"`. */
|
|
42
|
+
export const jobSignalKey = (jobId) => `cca:job:${jobId}:signal`;
|
|
43
|
+
/** LIST — in-flight messages queued for a running job (RPUSH/RPOP). */
|
|
44
|
+
export const jobInputKey = (jobId) => `cca:job:${jobId}:input`;
|
|
45
|
+
/** CHANNEL — live output lines published as the job runs (pub/sub). */
|
|
46
|
+
export const jobOutputLiveChannel = (jobId) => `cca:job:${jobId}:output:live`;
|
|
47
|
+
/** CHANNEL — job completion notification (pub/sub). */
|
|
48
|
+
export const jobDoneChannel = (jobId) => `cca:job:done:${jobId}`;
|
|
49
|
+
/** LIST — LPUSH/BLPOP queue for wait_for_job, TTL 7 days. */
|
|
50
|
+
export const jobDoneQueueKey = (jobId) => `cca:job:done:${jobId}:queue`;
|
|
51
|
+
// ─── Coordinator Keys (dynamic) ───────────────────────────────────────────────
|
|
52
|
+
/** STRING — coordinator plan JSON stored per job. */
|
|
53
|
+
export const coordinatorPlanKey = (jobId) => `cca:coordinator:plan:${jobId}`;
|
|
54
|
+
// ─── Plan Keys (dynamic) ──────────────────────────────────────────────────────
|
|
55
|
+
/** STRING (JSON) — PlanRecord, TTL 30 days. */
|
|
56
|
+
export const planKey = (planId) => `cca:plan:${planId}`;
|
|
57
|
+
// ─── Profile Keys (dynamic) ───────────────────────────────────────────────────
|
|
58
|
+
/** STRING (JSON) — saved Profile. */
|
|
59
|
+
export const profileKey = (name) => `cca:profile:${name}`;
|
|
60
|
+
// ─── Notify / Chat Keys (dynamic) ────────────────────────────────────────────
|
|
61
|
+
/** CHANNEL — job completion notifications published by coordinator (pub/sub). */
|
|
62
|
+
export const notifyChannel = (namespace) => `cca:notify:${namespace}`;
|
|
63
|
+
/** LIST — notification log (LPUSH capped at 100, LIFO). */
|
|
64
|
+
export const notifyLogKey = (namespace) => `cca:notify-log:${namespace}`;
|
|
65
|
+
/** LIST — chat history (LPUSH capped at 500, LIFO — newest at index 0). */
|
|
66
|
+
export const chatLogKey = (namespace) => `cca:chat:log:${namespace}`;
|
|
67
|
+
/** CHANNEL — UI → cc-tg messages (pub/sub). */
|
|
68
|
+
export const chatIncomingChannel = (namespace) => `cca:chat:incoming:${namespace}`;
|
|
69
|
+
/** CHANNEL — cc-tg / meta-agent → UI messages (pub/sub). */
|
|
70
|
+
export const chatOutgoingChannel = (namespace) => `cca:chat:outgoing:${namespace}`;
|
|
71
|
+
// ─── Meta-Agent Keys (dynamic) ───────────────────────────────────────────────
|
|
72
|
+
/** STRING (JSON) — MetaAgentInfo state, TTL 30 days. */
|
|
73
|
+
export const metaKey = (namespace) => `cca:meta:${namespace}`;
|
|
74
|
+
/** LIST — input queue for a meta-agent (RPUSH by cc-tg, RPOP by cc-agent). */
|
|
75
|
+
export const metaInputKey = (namespace) => `cca:meta:${namespace}:input`;
|
|
76
|
+
/** STRING (JSON) — live meta-agent status (typing, tool, etc.), TTL 7 days. */
|
|
77
|
+
export const metaAgentStatusKey = (namespace) => `cca:meta-agent:status:${namespace}`;
|
|
78
|
+
// ─── Learnings Keys (dynamic) ─────────────────────────────────────────────────
|
|
79
|
+
/** LIST — learnings for a namespace (LPUSH capped at 50, LIFO), TTL 90 days. */
|
|
80
|
+
export const learningsKey = (namespace) => `cca:learnings:${namespace}`;
|
|
81
|
+
// ─── Cron Keys (dynamic) ──────────────────────────────────────────────────────
|
|
82
|
+
/** STRING (JSON array) — cron job definitions for a namespace. */
|
|
83
|
+
export const cronsKey = (namespace) => `cca:crons:${namespace}`;
|
|
84
|
+
// ─── Swarm Keys (dynamic) ─────────────────────────────────────────────────────
|
|
85
|
+
/** STRING (JSON) — SwarmRecord for a given swarm ID. */
|
|
86
|
+
export const swarmKey = (swarmId) => `cca:swarm:${swarmId}`;
|
|
87
|
+
// ─── TTL Constants ────────────────────────────────────────────────────────────
|
|
88
|
+
export const TTL = {
|
|
89
|
+
/** 7 days in seconds — job records, output lists, done queues, meta-agent status. */
|
|
90
|
+
JOB_SECONDS: 7 * 24 * 60 * 60,
|
|
91
|
+
/** 30 days in seconds — plans, meta-agent state. */
|
|
92
|
+
PLAN_SECONDS: 30 * 24 * 60 * 60,
|
|
93
|
+
/** 90 days in seconds — learnings lists. */
|
|
94
|
+
LEARNINGS_SECONDS: 90 * 24 * 60 * 60,
|
|
95
|
+
/** 48 hours in seconds — voice:failed list. */
|
|
96
|
+
VOICE_FAILED_SECONDS: 48 * 60 * 60,
|
|
97
|
+
};
|
|
98
|
+
// ─── Cap Constants ────────────────────────────────────────────────────────────
|
|
99
|
+
export const CAP = {
|
|
100
|
+
/** Maximum entries in cca:notify-log:{ns} (LTRIM 0 N-1). */
|
|
101
|
+
NOTIFY_LOG: 100,
|
|
102
|
+
/** Maximum entries in cca:chat:log:{ns} (LTRIM 0 N-1). */
|
|
103
|
+
CHAT_LOG: 500,
|
|
104
|
+
/** Maximum entries in cca:learnings:{ns} (LTRIM 0 N-1). */
|
|
105
|
+
LEARNINGS: 50,
|
|
106
|
+
/** Maximum entries in cca:event-stream (XTRIM MAXLEN ~). */
|
|
107
|
+
EVENT_STREAM: 500,
|
|
108
|
+
};
|
|
109
|
+
// ─── Timing Constants ─────────────────────────────────────────────────────────
|
|
110
|
+
export const TIMING = {
|
|
111
|
+
/** How often the coordinator polls the event stream for new entries (ms). */
|
|
112
|
+
COORDINATOR_POLL_MS: 2000,
|
|
113
|
+
/** How often the dependency scheduler checks pending jobs (ms). */
|
|
114
|
+
DEPENDENCY_TICK_MS: 3000,
|
|
115
|
+
/** How often the meta-agent poller drains input queues (ms). */
|
|
116
|
+
INPUT_POLL_INTERVAL_MS: 3000,
|
|
117
|
+
/** Debounce delay before cc-tg flushes meta-agent streaming output (ms). */
|
|
118
|
+
META_AGENT_FLUSH_DELAY_MS: 1500,
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=channels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channels.js","sourceRoot":"","sources":["../../src/channels.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,gFAAgF;AAEhF,mEAAmE;AACnE,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAE/C,6EAA6E;AAC7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAC;AAE/C,yDAAyD;AACzD,MAAM,CAAC,MAAM,iBAAiB,GAAG,uBAAuB,CAAC;AAEzD,0CAA0C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kBAAkB,EAAE,IAAI;IACxB,gEAAgE;IAChE,sBAAsB,EAAE,IAAI;IAC5B,4EAA4E;IAC5E,yBAAyB,EAAE,IAAI;CACvB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @gonzih/cc-wire
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for Redis channel names, key patterns, and message
|
|
5
|
+
* shapes across the cc-suite (cc-agent, cc-tg, cc-agent-ui).
|
|
6
|
+
*
|
|
7
|
+
* No runtime deps, no Redis client — just constants, builders, and types.
|
|
8
|
+
*/
|
|
9
|
+
export * from "./channels.js";
|
|
10
|
+
export * from "./types.js";
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @gonzih/cc-wire
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for Redis channel names, key patterns, and message
|
|
5
|
+
* shapes across the cc-suite (cc-agent, cc-tg, cc-agent-ui).
|
|
6
|
+
*
|
|
7
|
+
* No runtime deps, no Redis client — just constants, builders, and types.
|
|
8
|
+
*/
|
|
9
|
+
export * from "./channels.js";
|
|
10
|
+
export * from "./types.js";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cc-wire: types.ts
|
|
3
|
+
*
|
|
4
|
+
* TypeScript interfaces for every message payload and record shape
|
|
5
|
+
* published/stored on each Redis channel or key across the cc-suite.
|
|
6
|
+
*
|
|
7
|
+
* Derived from actual source: cc-agent/src/types.ts, cc-agent/src/store.ts,
|
|
8
|
+
* cc-agent/src/meta-agent.ts, cc-tg/src/notifier.ts, cc-agent-ui/server.js,
|
|
9
|
+
* and docs/redis-protocol.md (both repos).
|
|
10
|
+
*/
|
|
11
|
+
export type JobStatus = "pending" | "cloning" | "running" | "done" | "failed" | "cancelled" | "sleeping" | "pending_approval" | "rejected" | "interrupted";
|
|
12
|
+
/**
|
|
13
|
+
* Full job metadata stored in `cca:job:{id}`.
|
|
14
|
+
* JSON-encoded string, TTL 7 days.
|
|
15
|
+
*/
|
|
16
|
+
export interface JobRecord {
|
|
17
|
+
id: string;
|
|
18
|
+
status: JobStatus;
|
|
19
|
+
repoUrl: string;
|
|
20
|
+
task: string;
|
|
21
|
+
branch?: string;
|
|
22
|
+
createBranch?: string;
|
|
23
|
+
dependsOn?: string[];
|
|
24
|
+
startedAt?: string;
|
|
25
|
+
finishedAt?: string;
|
|
26
|
+
exitCode?: number;
|
|
27
|
+
error?: string;
|
|
28
|
+
pid?: number;
|
|
29
|
+
sessionIdAfter?: string;
|
|
30
|
+
totalInputTokens?: number;
|
|
31
|
+
totalOutputTokens?: number;
|
|
32
|
+
totalCacheReadTokens?: number;
|
|
33
|
+
totalCacheWriteTokens?: number;
|
|
34
|
+
costUsd?: number;
|
|
35
|
+
recentTools: string[];
|
|
36
|
+
outputLineCount: number;
|
|
37
|
+
sleepUntil?: string;
|
|
38
|
+
sleepReason?: string;
|
|
39
|
+
approvalIssueUrl?: string;
|
|
40
|
+
approvalRepo?: string;
|
|
41
|
+
approvalIssueNumber?: number;
|
|
42
|
+
score?: number | null;
|
|
43
|
+
scoreSource?: "self_reported" | "heuristic" | null;
|
|
44
|
+
variantIndex?: number;
|
|
45
|
+
parentVariant?: string;
|
|
46
|
+
siblings?: string[];
|
|
47
|
+
dockerIsolation?: boolean;
|
|
48
|
+
isolation?: "docker" | "host";
|
|
49
|
+
resumedFrom?: string;
|
|
50
|
+
interruptedAt?: string;
|
|
51
|
+
tokenIndex?: number;
|
|
52
|
+
agentDriver?: string;
|
|
53
|
+
agentModel?: string;
|
|
54
|
+
noPreamble?: boolean;
|
|
55
|
+
retryCount?: number;
|
|
56
|
+
timeoutMinutes?: number;
|
|
57
|
+
timedOut?: boolean;
|
|
58
|
+
failReason?: string;
|
|
59
|
+
}
|
|
60
|
+
/** Values that may be written to `cca:job:{id}:signal`. */
|
|
61
|
+
export type JobSignal = "cancel" | "wake";
|
|
62
|
+
/**
|
|
63
|
+
* JSON payload published to `cca:job:done:{id}` and LPUSH'd to
|
|
64
|
+
* `cca:job:done:{id}:queue`.
|
|
65
|
+
*/
|
|
66
|
+
export interface JobDonePayload {
|
|
67
|
+
job_id: string;
|
|
68
|
+
status: JobStatus;
|
|
69
|
+
score?: number | null;
|
|
70
|
+
score_source?: "self_reported" | "heuristic" | null;
|
|
71
|
+
finished_at?: string;
|
|
72
|
+
exit_code?: number;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Fields written to `cca:event-stream` via XADD.
|
|
76
|
+
* All field values are strings (Redis Stream requirement).
|
|
77
|
+
*/
|
|
78
|
+
export interface JobEvent {
|
|
79
|
+
jobId: string;
|
|
80
|
+
status: string;
|
|
81
|
+
title: string;
|
|
82
|
+
repoUrl: string;
|
|
83
|
+
lastLines: string[];
|
|
84
|
+
score?: number;
|
|
85
|
+
timestamp: string;
|
|
86
|
+
coordinatorPlan?: CoordinatorPlan;
|
|
87
|
+
}
|
|
88
|
+
/** Optional follow-up job plan attached to a job event. */
|
|
89
|
+
export interface CoordinatorPlan {
|
|
90
|
+
next_step?: {
|
|
91
|
+
repo_url: string;
|
|
92
|
+
task: string;
|
|
93
|
+
};
|
|
94
|
+
summary?: string;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* JSON payload published to `cca:notify:{namespace}` and LPUSH'd to
|
|
98
|
+
* `cca:notify-log:{namespace}`.
|
|
99
|
+
*/
|
|
100
|
+
export interface NotificationPayload {
|
|
101
|
+
text: string;
|
|
102
|
+
driver?: string;
|
|
103
|
+
model?: string;
|
|
104
|
+
cost?: number;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Shape for all messages written to chat channels and the chat log.
|
|
108
|
+
*
|
|
109
|
+
* Ordering note: `cca:chat:log:{ns}` is LIFO (LPUSH). Consumers must reverse
|
|
110
|
+
* the LRANGE result for chronological display.
|
|
111
|
+
*/
|
|
112
|
+
export interface ChatMessage {
|
|
113
|
+
id: string;
|
|
114
|
+
source: "telegram" | "ui" | "claude" | "cc-tg";
|
|
115
|
+
role: "user" | "assistant" | "tool";
|
|
116
|
+
content: string;
|
|
117
|
+
timestamp: string;
|
|
118
|
+
chatId: number;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Persisted meta-agent state stored in `cca:meta:{namespace}`.
|
|
122
|
+
* JSON-encoded string, TTL 30 days.
|
|
123
|
+
*/
|
|
124
|
+
export interface MetaAgentInfo {
|
|
125
|
+
namespace: string;
|
|
126
|
+
repoUrl: string;
|
|
127
|
+
cwd: string;
|
|
128
|
+
pid?: number;
|
|
129
|
+
status: "running" | "idle";
|
|
130
|
+
startedAt: string;
|
|
131
|
+
lastMessageAt?: string;
|
|
132
|
+
lastActivity?: string;
|
|
133
|
+
currentTool?: string;
|
|
134
|
+
isTyping?: boolean;
|
|
135
|
+
lastMessage?: string;
|
|
136
|
+
turnCount?: number;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Live status written to `cca:meta-agent:status:{namespace}` on every change.
|
|
140
|
+
* JSON-encoded string, TTL 7 days.
|
|
141
|
+
*/
|
|
142
|
+
export interface MetaAgentStatus {
|
|
143
|
+
namespace: string;
|
|
144
|
+
status: "running" | "idle";
|
|
145
|
+
pid?: number;
|
|
146
|
+
startedAt?: string;
|
|
147
|
+
lastActivity?: string;
|
|
148
|
+
currentTool?: string;
|
|
149
|
+
isTyping: boolean;
|
|
150
|
+
lastMessage?: string;
|
|
151
|
+
turnCount: number;
|
|
152
|
+
updatedAt: string;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Saved spawn profile stored in `cca:profile:{name}`.
|
|
156
|
+
* JSON-encoded string (no TTL).
|
|
157
|
+
*/
|
|
158
|
+
export interface Profile {
|
|
159
|
+
name: string;
|
|
160
|
+
repoUrl: string;
|
|
161
|
+
taskTemplate: string;
|
|
162
|
+
defaultBudgetUsd?: number;
|
|
163
|
+
branch?: string;
|
|
164
|
+
description?: string;
|
|
165
|
+
preamble?: string;
|
|
166
|
+
builtin?: boolean;
|
|
167
|
+
createdAt: string;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Multi-step plan record stored in `cca:plan:{id}`.
|
|
171
|
+
* JSON-encoded string, TTL 30 days.
|
|
172
|
+
*/
|
|
173
|
+
export interface PlanRecord {
|
|
174
|
+
id: string;
|
|
175
|
+
goal: string;
|
|
176
|
+
steps: Array<{
|
|
177
|
+
stepId: string;
|
|
178
|
+
jobId: string;
|
|
179
|
+
status: string;
|
|
180
|
+
}>;
|
|
181
|
+
createdAt: string;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* A single cron job entry inside the JSON array at `cca:crons:{namespace}`.
|
|
185
|
+
*/
|
|
186
|
+
export interface CronJob {
|
|
187
|
+
id: string;
|
|
188
|
+
schedule: string;
|
|
189
|
+
prompt: string;
|
|
190
|
+
createdAt: string;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Swarm orchestration record stored in `cca:swarm:{swarm_id}`.
|
|
194
|
+
* JSON-encoded string.
|
|
195
|
+
*/
|
|
196
|
+
export interface SwarmRecord {
|
|
197
|
+
swarm_id: string;
|
|
198
|
+
[key: string]: unknown;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Entry in the `voice:pending` list (RPUSH'd by cc-tg).
|
|
202
|
+
* JSON-encoded string.
|
|
203
|
+
*/
|
|
204
|
+
export interface VoicePendingEntry {
|
|
205
|
+
id: string;
|
|
206
|
+
chatId: number;
|
|
207
|
+
threadId?: number;
|
|
208
|
+
filePath: string;
|
|
209
|
+
enqueuedAt: string;
|
|
210
|
+
}
|
|
211
|
+
/** Token usage breakdown reported by agent drivers. */
|
|
212
|
+
export interface TokenUsage {
|
|
213
|
+
inputTokens: number;
|
|
214
|
+
outputTokens: number;
|
|
215
|
+
cacheReadTokens?: number;
|
|
216
|
+
cacheCreationTokens?: number;
|
|
217
|
+
}
|
|
218
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,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,oBAA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MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC,CAAC;IACH,SAAS,EAAE,MAAM,CAAC;CACnB;AAID;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAID;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAID;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAID,uDAAuD;AACvD,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cc-wire: types.ts
|
|
3
|
+
*
|
|
4
|
+
* TypeScript interfaces for every message payload and record shape
|
|
5
|
+
* published/stored on each Redis channel or key across the cc-suite.
|
|
6
|
+
*
|
|
7
|
+
* Derived from actual source: cc-agent/src/types.ts, cc-agent/src/store.ts,
|
|
8
|
+
* cc-agent/src/meta-agent.ts, cc-tg/src/notifier.ts, cc-agent-ui/server.js,
|
|
9
|
+
* and docs/redis-protocol.md (both repos).
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@gonzih/cc-wire",
|
|
3
|
+
"version": "0.1.0",
|
|
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
|
+
"type": "module",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/gonzih/cc-wire.git"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/esm/index.js",
|
|
16
|
+
"require": "./dist/cjs/index.cjs",
|
|
17
|
+
"types": "./dist/esm/index.d.ts"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"main": "./dist/cjs/index.cjs",
|
|
21
|
+
"module": "./dist/esm/index.js",
|
|
22
|
+
"types": "./dist/esm/index.d.ts",
|
|
23
|
+
"files": [
|
|
24
|
+
"dist/"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "npm run build:esm && npm run build:cjs",
|
|
28
|
+
"build:esm": "tsc -p tsconfig.json",
|
|
29
|
+
"build:cjs": "tsc -p tsconfig.cjs.json && node scripts/fix-cjs.mjs"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"typescript": "5.8.3"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"redis",
|
|
36
|
+
"cc-agent",
|
|
37
|
+
"cc-tg",
|
|
38
|
+
"cc-suite",
|
|
39
|
+
"channels"
|
|
40
|
+
],
|
|
41
|
+
"license": "MIT"
|
|
42
|
+
}
|