@inetafrica/open-claudia 3.1.28 → 3.2.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/CHANGELOG.md +31 -0
- package/bin/cli.js +105 -0
- package/bin/entity.js +9 -0
- package/bin/pack.js +10 -0
- package/bin/recall-case.js +90 -0
- package/bin/remind.js +82 -0
- package/bin/tool.js +8 -3
- package/channels/kazee/adapter.js +37 -3
- package/channels/kazee/call/manager.js +128 -2
- package/channels/kazee/call/session.js +63 -25
- package/channels/kazee/socket.js +3 -0
- package/channels/spaces/socket.js +3 -0
- package/channels/telegram/adapter.js +9 -5
- package/core/apprenticeship.js +104 -0
- package/core/approvals.js +39 -0
- package/core/cost-report.js +140 -0
- package/core/dedup-adjudicator.js +250 -0
- package/core/dream.js +41 -8
- package/core/entities.js +27 -5
- package/core/loopback.js +51 -1
- package/core/media.js +58 -5
- package/core/pack-review.js +115 -12
- package/core/packs.js +102 -4
- package/core/prospective.js +135 -0
- package/core/recall-regressions.js +171 -0
- package/core/socket-reconnect.js +71 -0
- package/core/system-prompt.js +84 -6
- package/core/tools.js +77 -0
- package/package.json +3 -3
- package/test-fixtures/fake-agent-cli.js +5 -1
- package/test-kazee-call-manager.js +44 -1
- package/test-kazee-call-session.js +45 -2
- package/test-provider-language.js +11 -1
|
@@ -41,12 +41,12 @@ class FakeSpeechStream {
|
|
|
41
41
|
close() { this.closedStream = true; }
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
function makeSession({ synthesize, maxCallMs, idleMs } = {}) {
|
|
44
|
+
function makeSession({ synthesize, maxCallMs, idleMs, asCaller, greeting } = {}) {
|
|
45
45
|
const ended = [];
|
|
46
46
|
const transcripts = [];
|
|
47
47
|
const session = new KazeeCallSession({
|
|
48
48
|
roomId: 7, chatId: "chat", callerId: "owner", botUserId: "bot", janusUrl: "ws://test",
|
|
49
|
-
maxCallMs, idleMs,
|
|
49
|
+
maxCallMs, idleMs, asCaller, greeting,
|
|
50
50
|
synthesize: synthesize || (async () => ({ pcm: Buffer.alloc(WEBRTC_SAMPLES * 2 * 2), sampleRate: 48000 })),
|
|
51
51
|
onTranscript: (text, meta) => transcripts.push({ text, meta }),
|
|
52
52
|
onEnded: (reason) => ended.push(reason),
|
|
@@ -228,6 +228,47 @@ async function testJoinGivesUpAfterRetries() {
|
|
|
228
228
|
await session.close();
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
+
async function testCallerModeRoomLifecycle() {
|
|
232
|
+
const { session } = makeSession({ asCaller: true, greeting: "hi there" });
|
|
233
|
+
const messages = [];
|
|
234
|
+
session.janus.message = async (_handle, body) => {
|
|
235
|
+
messages.push(body);
|
|
236
|
+
if (body?.request === "create") return { plugindata: { data: { videoroom: "created", room: 7 } } };
|
|
237
|
+
return {};
|
|
238
|
+
};
|
|
239
|
+
await session.start();
|
|
240
|
+
assert.strictEqual(messages[0].request, "create", "caller creates the room before joining");
|
|
241
|
+
assert.strictEqual(messages[0].room, 7);
|
|
242
|
+
assert.strictEqual(messages[0].audiocodec, "opus");
|
|
243
|
+
assert.strictEqual(messages[1].request, "join");
|
|
244
|
+
assert.strictEqual(session._createdRoom, true);
|
|
245
|
+
const spoken = [];
|
|
246
|
+
session.speak = async (text) => { spoken.push(text); return true; };
|
|
247
|
+
await session._subscribe(101, "sumeet@kazee");
|
|
248
|
+
await session._subscribe(102, "second@kazee");
|
|
249
|
+
assert.deepStrictEqual(spoken, ["hi there"], "greeting speaks exactly once, on first remote feed");
|
|
250
|
+
await session.close();
|
|
251
|
+
const destroy = messages.find((m) => m?.request === "destroy");
|
|
252
|
+
assert.ok(destroy && destroy.room === 7, "created room is destroyed on close");
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
async function testCallerModeRoomExistsAndFailure() {
|
|
256
|
+
const { session } = makeSession({ asCaller: true });
|
|
257
|
+
session.janus.message = async (_handle, body) => body?.request === "create"
|
|
258
|
+
? { plugindata: { data: { videoroom: "event", error_code: 427, error: "Room 7 already exists" } } }
|
|
259
|
+
: {};
|
|
260
|
+
await session.start();
|
|
261
|
+
assert.strictEqual(session._createdRoom, true, "already-exists (427) counts as created");
|
|
262
|
+
await session.close();
|
|
263
|
+
|
|
264
|
+
const bad = makeSession({ asCaller: true }).session;
|
|
265
|
+
bad.janus.message = async (_handle, body) => body?.request === "create"
|
|
266
|
+
? { plugindata: { data: { videoroom: "event", error_code: 499, error: "boom" } } }
|
|
267
|
+
: {};
|
|
268
|
+
await assert.rejects(() => bad.start(), /boom/, "hard create failure fails the call");
|
|
269
|
+
await bad.close();
|
|
270
|
+
}
|
|
271
|
+
|
|
231
272
|
async function testThinkingCues() {
|
|
232
273
|
const { session } = makeSession({
|
|
233
274
|
synthesize: async () => ({ pcm: Buffer.alloc(WEBRTC_SAMPLES * 2 * 3), sampleRate: 48000 }),
|
|
@@ -300,6 +341,8 @@ async function testCloseResolvesSpeech() {
|
|
|
300
341
|
await testMaxDuration();
|
|
301
342
|
await testJoinRetriesNoSuchRoom();
|
|
302
343
|
await testJoinGivesUpAfterRetries();
|
|
344
|
+
await testCallerModeRoomLifecycle();
|
|
345
|
+
await testCallerModeRoomExistsAndFailure();
|
|
303
346
|
await testThinkingCues();
|
|
304
347
|
await testCloseResolvesSpeech();
|
|
305
348
|
console.log("kazee call session: ok");
|
|
@@ -341,7 +341,17 @@ assert.match(pkg.description, /provider-agnostic coding-agent harness/i);
|
|
|
341
341
|
// hold so no getUpdates could ever complete, and _armHealthyCheck cleared its
|
|
342
342
|
// own pending timer on every re-arm so the only code that resets _wedgedSince
|
|
343
343
|
// never ran. One ordinary ECONNRESET cost 10 minutes and a process.exit.
|
|
344
|
-
|
|
344
|
+
// 3.2.0 approved by Sumeet 2026-08-03 ("i like them all then go ahead and add
|
|
345
|
+
// to a plan then go ahead and implement all the plans pending from this review
|
|
346
|
+
// into a new version work through till the end and deploy out a new version"):
|
|
347
|
+
// the employee batch — memory adoption A1-A4, the codegraph reusable tool,
|
|
348
|
+
// employee capabilities C1-C6, and the Kazee group speaker-identity fix.
|
|
349
|
+
// 3.2.1 approved by Sumeet 2026-08-08 ("Push it", answering "Your go on the
|
|
350
|
+
// v3.2.1 cut → commit, tag, CI image, fleet roll"): terminal socket-reconnect
|
|
351
|
+
// fix from the chat-central outage, the call-platform batch (outgoing calls,
|
|
352
|
+
// greetings, TURN via /webrtc/config, ring-phase teardown fixes), the
|
|
353
|
+
// received-media .bin extension fix, and the tts/transcribe agent verbs.
|
|
354
|
+
assert.strictEqual(pkg.version, "3.2.1", "release version must remain unchanged without explicit approval");
|
|
345
355
|
for (const keyword of ["claude", "codex", "coding-agent", "provider-agnostic"]) {
|
|
346
356
|
assert.ok(pkg.keywords.includes(keyword), `package keyword missing: ${keyword}`);
|
|
347
357
|
}
|