@craftedxp/sdk-node 0.15.0 → 0.17.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 +2 -0
- package/dist/index.d.mts +21 -8
- package/dist/index.d.ts +21 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -284,6 +284,8 @@ for await (const call of client.calls.listAll({ agentId })) {
|
|
|
284
284
|
## Changelog
|
|
285
285
|
|
|
286
286
|
- **Unreleased** _(forward-looking)_ — `isPersonal?: boolean` on `Agent` and `AgentCreateInput` (and so on `AgentUpdateInput`). Assistant-only: when `true`, the learning tools (`remember_fact`, `add_correction`, `add_skill_hint`) are live on every `ct_`-token call rather than only on `mode=learning`. Server-side field — no runtime change in this package.
|
|
287
|
+
- **0.17.0** — `channel` on `CallTokenMintInput` / `CallTokenMintResult` / `CallRecord` widened to include `'multimodal'` (typed turns + live audio in one WS session). Type-only plumbing in this package — accepted at mint (assistant-only, same gate as `'text'`) and threaded through; the server's handler semantics for it shipped 2026-09-01 (phase 2/3); `chatsFor(token)` (HTTP+SSE) always rejects a `'multimodal'` token. No runtime change in this package.
|
|
288
|
+
- **0.16.0** — `debug?: boolean` on `CallTokenMintInput`. Operator-gated (Firebase-admin or `sk_`-key mints only — silently stripped otherwise); when set, the call streams diagnostic frames (`tool_call` / `tool_result` / `phase_marker` / `prefetch*`) to the client. Request-only field — the mint response does not echo it back (see `docs/openapi.yaml`). No client-side behavior change; the HTTP layer already posts `body: input` verbatim, so this is a type-only addition.
|
|
287
289
|
- **0.15.0** — `client.speech` namespace (`synthesize` / `enqueue` / `get` / `list` / `delete`) for pre-generated agent audio (`POST /v1/speech`), plus `speech.ready` / `speech.failed` webhook event types and the `accepted` error code (`synthesize` → 202 handoff). Requires server ≥ the 2026-08 speech release.
|
|
288
290
|
- **0.14.0** — `client.spaces` namespace (create / get / list / update / delete) for durable multi-party spaces, plus the standalone `buildJoinUrl(spaceOrCode, { baseUrl, style? })` helper for white-label participant links. No server changes — the `/v1/spaces` endpoints already existed.
|
|
289
291
|
|
package/dist/index.d.mts
CHANGED
|
@@ -293,8 +293,8 @@ interface CallRecord {
|
|
|
293
293
|
costBreakdown?: CostBreakdown;
|
|
294
294
|
errorMessage?: string;
|
|
295
295
|
metadata?: Record<string, string>;
|
|
296
|
-
/** Transport channel the call was carried over (`'voice'` = WebRTC/WS audio, `'text'` = text-only). */
|
|
297
|
-
channel?: 'voice' | 'text';
|
|
296
|
+
/** Transport channel the call was carried over (`'voice'` = WebRTC/WS audio, `'text'` = text-only, `'multimodal'` = typed turns + live audio in one WS session). */
|
|
297
|
+
channel?: 'voice' | 'text' | 'multimodal';
|
|
298
298
|
}
|
|
299
299
|
interface CallListFilters {
|
|
300
300
|
agentId?: string;
|
|
@@ -399,16 +399,28 @@ interface CallTokenMintInput {
|
|
|
399
399
|
initiatedBy?: 'user' | 'agent';
|
|
400
400
|
/**
|
|
401
401
|
* Session channel selector. `voice` (default) routes to WS/WebRTC audio;
|
|
402
|
-
* `text` routes to HTTP+SSE chat via the `chats` resource
|
|
403
|
-
* a `type: 'assistant'`
|
|
404
|
-
*
|
|
402
|
+
* `text` routes to HTTP+SSE chat via the `chats` resource (or the same WS
|
|
403
|
+
* as `voice`, as a typed session). `text` requires a `type: 'assistant'`
|
|
404
|
+
* agent; non-assistant agents are rejected at mint (`wrong_agent_type`),
|
|
405
|
+
* as is `mode: 'learning'` on a non-assistant agent. `multimodal` combines
|
|
406
|
+
* typed turns and live audio in one WS session — accepted at mint as of
|
|
407
|
+
* this SDK version, and the server's handler semantics for it shipped
|
|
408
|
+
* 2026-09-01 (phase 2/3); the HTTP+SSE `chats` resource always rejects it.
|
|
405
409
|
*/
|
|
406
|
-
channel?: 'voice' | 'text';
|
|
410
|
+
channel?: 'voice' | 'text' | 'multimodal';
|
|
407
411
|
/**
|
|
408
412
|
* Session purpose. `standard` (default) is a regular call. `learning`
|
|
409
413
|
* (admin-bypass only) flags a self-learning session — see Phase 19.
|
|
410
414
|
*/
|
|
411
415
|
mode?: 'standard' | 'learning';
|
|
416
|
+
/**
|
|
417
|
+
* Operator-only: stream diagnostic frames (`tool_call`, `tool_result`,
|
|
418
|
+
* `phase_marker`, `prefetch*`) to this call's client. Requires
|
|
419
|
+
* Firebase-admin auth or an `sk_` key — silently stripped (not an error)
|
|
420
|
+
* for untrusted mints (public/anonymous paths). Default `false`. Stored
|
|
421
|
+
* on the token server-side; NOT echoed back in the mint response.
|
|
422
|
+
*/
|
|
423
|
+
debug?: boolean;
|
|
412
424
|
}
|
|
413
425
|
interface CallTokenMintResult {
|
|
414
426
|
tokenId: string;
|
|
@@ -433,9 +445,10 @@ interface CallTokenMintResult {
|
|
|
433
445
|
/**
|
|
434
446
|
* Session channel echoed back from the mint. Useful for the client SDK
|
|
435
447
|
* to dispatch correctly — text-mode tokens go to `chatsFor(token)`,
|
|
436
|
-
* voice-mode tokens go to `voice-js`/`voice-rn
|
|
448
|
+
* voice-mode tokens go to `voice-js`/`voice-rn`, multimodal-mode tokens
|
|
449
|
+
* go to the WS call path (handler semantics shipped 2026-09-01, phase 2/3).
|
|
437
450
|
*/
|
|
438
|
-
channel?: 'voice' | 'text';
|
|
451
|
+
channel?: 'voice' | 'text' | 'multimodal';
|
|
439
452
|
}
|
|
440
453
|
interface CallTokenSummary {
|
|
441
454
|
tokenId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -293,8 +293,8 @@ interface CallRecord {
|
|
|
293
293
|
costBreakdown?: CostBreakdown;
|
|
294
294
|
errorMessage?: string;
|
|
295
295
|
metadata?: Record<string, string>;
|
|
296
|
-
/** Transport channel the call was carried over (`'voice'` = WebRTC/WS audio, `'text'` = text-only). */
|
|
297
|
-
channel?: 'voice' | 'text';
|
|
296
|
+
/** Transport channel the call was carried over (`'voice'` = WebRTC/WS audio, `'text'` = text-only, `'multimodal'` = typed turns + live audio in one WS session). */
|
|
297
|
+
channel?: 'voice' | 'text' | 'multimodal';
|
|
298
298
|
}
|
|
299
299
|
interface CallListFilters {
|
|
300
300
|
agentId?: string;
|
|
@@ -399,16 +399,28 @@ interface CallTokenMintInput {
|
|
|
399
399
|
initiatedBy?: 'user' | 'agent';
|
|
400
400
|
/**
|
|
401
401
|
* Session channel selector. `voice` (default) routes to WS/WebRTC audio;
|
|
402
|
-
* `text` routes to HTTP+SSE chat via the `chats` resource
|
|
403
|
-
* a `type: 'assistant'`
|
|
404
|
-
*
|
|
402
|
+
* `text` routes to HTTP+SSE chat via the `chats` resource (or the same WS
|
|
403
|
+
* as `voice`, as a typed session). `text` requires a `type: 'assistant'`
|
|
404
|
+
* agent; non-assistant agents are rejected at mint (`wrong_agent_type`),
|
|
405
|
+
* as is `mode: 'learning'` on a non-assistant agent. `multimodal` combines
|
|
406
|
+
* typed turns and live audio in one WS session — accepted at mint as of
|
|
407
|
+
* this SDK version, and the server's handler semantics for it shipped
|
|
408
|
+
* 2026-09-01 (phase 2/3); the HTTP+SSE `chats` resource always rejects it.
|
|
405
409
|
*/
|
|
406
|
-
channel?: 'voice' | 'text';
|
|
410
|
+
channel?: 'voice' | 'text' | 'multimodal';
|
|
407
411
|
/**
|
|
408
412
|
* Session purpose. `standard` (default) is a regular call. `learning`
|
|
409
413
|
* (admin-bypass only) flags a self-learning session — see Phase 19.
|
|
410
414
|
*/
|
|
411
415
|
mode?: 'standard' | 'learning';
|
|
416
|
+
/**
|
|
417
|
+
* Operator-only: stream diagnostic frames (`tool_call`, `tool_result`,
|
|
418
|
+
* `phase_marker`, `prefetch*`) to this call's client. Requires
|
|
419
|
+
* Firebase-admin auth or an `sk_` key — silently stripped (not an error)
|
|
420
|
+
* for untrusted mints (public/anonymous paths). Default `false`. Stored
|
|
421
|
+
* on the token server-side; NOT echoed back in the mint response.
|
|
422
|
+
*/
|
|
423
|
+
debug?: boolean;
|
|
412
424
|
}
|
|
413
425
|
interface CallTokenMintResult {
|
|
414
426
|
tokenId: string;
|
|
@@ -433,9 +445,10 @@ interface CallTokenMintResult {
|
|
|
433
445
|
/**
|
|
434
446
|
* Session channel echoed back from the mint. Useful for the client SDK
|
|
435
447
|
* to dispatch correctly — text-mode tokens go to `chatsFor(token)`,
|
|
436
|
-
* voice-mode tokens go to `voice-js`/`voice-rn
|
|
448
|
+
* voice-mode tokens go to `voice-js`/`voice-rn`, multimodal-mode tokens
|
|
449
|
+
* go to the WS call path (handler semantics shipped 2026-09-01, phase 2/3).
|
|
437
450
|
*/
|
|
438
|
-
channel?: 'voice' | 'text';
|
|
451
|
+
channel?: 'voice' | 'text' | 'multimodal';
|
|
439
452
|
}
|
|
440
453
|
interface CallTokenSummary {
|
|
441
454
|
tokenId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@craftedxp/sdk-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Node.js / TypeScript SDK for the voice agent platform. Server-side API client — mint call tokens, manage agents, query calls, upload knowledge-base docs.",
|
|
5
5
|
"author": "Crafted XP",
|
|
6
6
|
"license": "MIT",
|