@craftedxp/sdk-node 0.16.0 → 0.18.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 +29 -8
- package/dist/index.d.ts +29 -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
|
+
- **Unreleased** _(forward-looking)_ — Per-call `agentSpeaksFirst` override on `callTokens.mint` (0.18.0, publish pending; server support 2026-09-02).
|
|
288
|
+
- **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.
|
|
287
289
|
- **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.
|
|
288
290
|
- **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.
|
|
289
291
|
- **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.
|
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;
|
|
@@ -397,13 +397,33 @@ interface CallTokenMintInput {
|
|
|
397
397
|
* default user-initiated connect. See docs/sdks.md "Agent-initiated calls".
|
|
398
398
|
*/
|
|
399
399
|
initiatedBy?: 'user' | 'agent';
|
|
400
|
+
/**
|
|
401
|
+
* Per-call override of the agent's `agentSpeaksFirst`. `false` opens the
|
|
402
|
+
* call silently — the caller speaks first (a look-to-wake desk device, a
|
|
403
|
+
* "tap to talk" surface). `true` forces the agent's greeting turn even on
|
|
404
|
+
* an agent configured silent (an alarm the device dialled on the user's
|
|
405
|
+
* behalf, briefed via `context`). Omit to use the agent's own setting.
|
|
406
|
+
* Assistant agents only; room/transcribe agents are always silent and the
|
|
407
|
+
* field is accepted but ignored. The `context` briefing shapes the
|
|
408
|
+
* greeting only when the agent has no pre-rendered `opening`; an agent
|
|
409
|
+
* with `opening.enabled` plays its static opening line. With `false`, the
|
|
410
|
+
* platform also suppresses its idle "are you still there?" nudge until
|
|
411
|
+
* the caller's first turn; a caller who never speaks is simply timed out
|
|
412
|
+
* in silence.
|
|
413
|
+
* Server support: 2026-09-02.
|
|
414
|
+
*/
|
|
415
|
+
agentSpeaksFirst?: boolean;
|
|
400
416
|
/**
|
|
401
417
|
* 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
|
-
*
|
|
418
|
+
* `text` routes to HTTP+SSE chat via the `chats` resource (or the same WS
|
|
419
|
+
* as `voice`, as a typed session). `text` requires a `type: 'assistant'`
|
|
420
|
+
* agent; non-assistant agents are rejected at mint (`wrong_agent_type`),
|
|
421
|
+
* as is `mode: 'learning'` on a non-assistant agent. `multimodal` combines
|
|
422
|
+
* typed turns and live audio in one WS session — accepted at mint as of
|
|
423
|
+
* this SDK version, and the server's handler semantics for it shipped
|
|
424
|
+
* 2026-09-01 (phase 2/3); the HTTP+SSE `chats` resource always rejects it.
|
|
405
425
|
*/
|
|
406
|
-
channel?: 'voice' | 'text';
|
|
426
|
+
channel?: 'voice' | 'text' | 'multimodal';
|
|
407
427
|
/**
|
|
408
428
|
* Session purpose. `standard` (default) is a regular call. `learning`
|
|
409
429
|
* (admin-bypass only) flags a self-learning session — see Phase 19.
|
|
@@ -441,9 +461,10 @@ interface CallTokenMintResult {
|
|
|
441
461
|
/**
|
|
442
462
|
* Session channel echoed back from the mint. Useful for the client SDK
|
|
443
463
|
* to dispatch correctly — text-mode tokens go to `chatsFor(token)`,
|
|
444
|
-
* voice-mode tokens go to `voice-js`/`voice-rn
|
|
464
|
+
* voice-mode tokens go to `voice-js`/`voice-rn`, multimodal-mode tokens
|
|
465
|
+
* go to the WS call path (handler semantics shipped 2026-09-01, phase 2/3).
|
|
445
466
|
*/
|
|
446
|
-
channel?: 'voice' | 'text';
|
|
467
|
+
channel?: 'voice' | 'text' | 'multimodal';
|
|
447
468
|
}
|
|
448
469
|
interface CallTokenSummary {
|
|
449
470
|
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;
|
|
@@ -397,13 +397,33 @@ interface CallTokenMintInput {
|
|
|
397
397
|
* default user-initiated connect. See docs/sdks.md "Agent-initiated calls".
|
|
398
398
|
*/
|
|
399
399
|
initiatedBy?: 'user' | 'agent';
|
|
400
|
+
/**
|
|
401
|
+
* Per-call override of the agent's `agentSpeaksFirst`. `false` opens the
|
|
402
|
+
* call silently — the caller speaks first (a look-to-wake desk device, a
|
|
403
|
+
* "tap to talk" surface). `true` forces the agent's greeting turn even on
|
|
404
|
+
* an agent configured silent (an alarm the device dialled on the user's
|
|
405
|
+
* behalf, briefed via `context`). Omit to use the agent's own setting.
|
|
406
|
+
* Assistant agents only; room/transcribe agents are always silent and the
|
|
407
|
+
* field is accepted but ignored. The `context` briefing shapes the
|
|
408
|
+
* greeting only when the agent has no pre-rendered `opening`; an agent
|
|
409
|
+
* with `opening.enabled` plays its static opening line. With `false`, the
|
|
410
|
+
* platform also suppresses its idle "are you still there?" nudge until
|
|
411
|
+
* the caller's first turn; a caller who never speaks is simply timed out
|
|
412
|
+
* in silence.
|
|
413
|
+
* Server support: 2026-09-02.
|
|
414
|
+
*/
|
|
415
|
+
agentSpeaksFirst?: boolean;
|
|
400
416
|
/**
|
|
401
417
|
* 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
|
-
*
|
|
418
|
+
* `text` routes to HTTP+SSE chat via the `chats` resource (or the same WS
|
|
419
|
+
* as `voice`, as a typed session). `text` requires a `type: 'assistant'`
|
|
420
|
+
* agent; non-assistant agents are rejected at mint (`wrong_agent_type`),
|
|
421
|
+
* as is `mode: 'learning'` on a non-assistant agent. `multimodal` combines
|
|
422
|
+
* typed turns and live audio in one WS session — accepted at mint as of
|
|
423
|
+
* this SDK version, and the server's handler semantics for it shipped
|
|
424
|
+
* 2026-09-01 (phase 2/3); the HTTP+SSE `chats` resource always rejects it.
|
|
405
425
|
*/
|
|
406
|
-
channel?: 'voice' | 'text';
|
|
426
|
+
channel?: 'voice' | 'text' | 'multimodal';
|
|
407
427
|
/**
|
|
408
428
|
* Session purpose. `standard` (default) is a regular call. `learning`
|
|
409
429
|
* (admin-bypass only) flags a self-learning session — see Phase 19.
|
|
@@ -441,9 +461,10 @@ interface CallTokenMintResult {
|
|
|
441
461
|
/**
|
|
442
462
|
* Session channel echoed back from the mint. Useful for the client SDK
|
|
443
463
|
* to dispatch correctly — text-mode tokens go to `chatsFor(token)`,
|
|
444
|
-
* voice-mode tokens go to `voice-js`/`voice-rn
|
|
464
|
+
* voice-mode tokens go to `voice-js`/`voice-rn`, multimodal-mode tokens
|
|
465
|
+
* go to the WS call path (handler semantics shipped 2026-09-01, phase 2/3).
|
|
445
466
|
*/
|
|
446
|
-
channel?: 'voice' | 'text';
|
|
467
|
+
channel?: 'voice' | 'text' | 'multimodal';
|
|
447
468
|
}
|
|
448
469
|
interface CallTokenSummary {
|
|
449
470
|
tokenId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@craftedxp/sdk-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.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",
|