@craftedxp/sdk-node 0.5.0 → 0.9.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/index.d.mts +38 -2
- package/dist/index.d.ts +38 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -34,6 +34,21 @@ interface AgentVoice {
|
|
|
34
34
|
provider: TtsProvider;
|
|
35
35
|
voiceId?: string;
|
|
36
36
|
language?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Per-utterance variation, 0.0–1.0. Honoured by Fish Audio and
|
|
39
|
+
* Chatterbox (passed through to each provider's synthesis API).
|
|
40
|
+
* Other providers ignore the field. Lower = more deterministic /
|
|
41
|
+
* consistent delivery, higher = more expressive / lively.
|
|
42
|
+
* Undefined = provider default.
|
|
43
|
+
*/
|
|
44
|
+
temperature?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Emotion-intensity knob, 0.0–1.0. Honoured only by Chatterbox today
|
|
47
|
+
* (its `exaggeration` parameter). Other providers ignore it. 0.5 is
|
|
48
|
+
* neutral; 0.7–0.8 noticeably more expressive; >0.85 risks theatrical
|
|
49
|
+
* delivery. Undefined = provider default.
|
|
50
|
+
*/
|
|
51
|
+
exaggeration?: number;
|
|
37
52
|
}
|
|
38
53
|
interface AgentTranscriber {
|
|
39
54
|
provider: SttProvider;
|
|
@@ -74,7 +89,14 @@ interface Agent {
|
|
|
74
89
|
orgId: string;
|
|
75
90
|
name: string;
|
|
76
91
|
systemPrompt: string;
|
|
77
|
-
|
|
92
|
+
/**
|
|
93
|
+
* When `true` (default), the agent kicks off the conversation as soon
|
|
94
|
+
* as the call connects — the platform sends the LLM a synthetic
|
|
95
|
+
* `[CALL_START]` user turn so the model produces a greeting from the
|
|
96
|
+
* system prompt. When `false`, the agent stays silent until the
|
|
97
|
+
* caller speaks first.
|
|
98
|
+
*/
|
|
99
|
+
agentSpeaksFirst?: boolean;
|
|
78
100
|
voice: AgentVoice;
|
|
79
101
|
transcriber: AgentTranscriber;
|
|
80
102
|
model: AgentModel;
|
|
@@ -106,7 +128,7 @@ interface Agent {
|
|
|
106
128
|
interface AgentCreateInput {
|
|
107
129
|
name: string;
|
|
108
130
|
systemPrompt: string;
|
|
109
|
-
|
|
131
|
+
agentSpeaksFirst?: boolean;
|
|
110
132
|
voice?: AgentVoice;
|
|
111
133
|
transcriber?: AgentTranscriber;
|
|
112
134
|
model?: AgentModel;
|
|
@@ -308,6 +330,20 @@ interface CallTokenMintResult {
|
|
|
308
330
|
agentId: string;
|
|
309
331
|
expiresAt: number;
|
|
310
332
|
allowedOrigins?: string[];
|
|
333
|
+
/**
|
|
334
|
+
* Transport the agent is configured for. Forward this to the client
|
|
335
|
+
* SDK's `fetchToken` (rich return form) so it can dispatch correctly
|
|
336
|
+
* without a second round-trip. Always present in the response;
|
|
337
|
+
* defaults to `'ws'` for legacy agent docs missing the field.
|
|
338
|
+
*/
|
|
339
|
+
transport?: 'ws' | 'webrtc';
|
|
340
|
+
/**
|
|
341
|
+
* Signaling gateway base URL when `transport === 'webrtc'` AND the
|
|
342
|
+
* server has `WEBRTC_GATEWAY_BASE` configured. Forward alongside
|
|
343
|
+
* `transport` so the client SDK reaches the gateway directly instead
|
|
344
|
+
* of falling back to the Phase-1 routes on the API base (local dev).
|
|
345
|
+
*/
|
|
346
|
+
webrtcGatewayBase?: string;
|
|
311
347
|
}
|
|
312
348
|
interface CallTokenSummary {
|
|
313
349
|
tokenId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -34,6 +34,21 @@ interface AgentVoice {
|
|
|
34
34
|
provider: TtsProvider;
|
|
35
35
|
voiceId?: string;
|
|
36
36
|
language?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Per-utterance variation, 0.0–1.0. Honoured by Fish Audio and
|
|
39
|
+
* Chatterbox (passed through to each provider's synthesis API).
|
|
40
|
+
* Other providers ignore the field. Lower = more deterministic /
|
|
41
|
+
* consistent delivery, higher = more expressive / lively.
|
|
42
|
+
* Undefined = provider default.
|
|
43
|
+
*/
|
|
44
|
+
temperature?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Emotion-intensity knob, 0.0–1.0. Honoured only by Chatterbox today
|
|
47
|
+
* (its `exaggeration` parameter). Other providers ignore it. 0.5 is
|
|
48
|
+
* neutral; 0.7–0.8 noticeably more expressive; >0.85 risks theatrical
|
|
49
|
+
* delivery. Undefined = provider default.
|
|
50
|
+
*/
|
|
51
|
+
exaggeration?: number;
|
|
37
52
|
}
|
|
38
53
|
interface AgentTranscriber {
|
|
39
54
|
provider: SttProvider;
|
|
@@ -74,7 +89,14 @@ interface Agent {
|
|
|
74
89
|
orgId: string;
|
|
75
90
|
name: string;
|
|
76
91
|
systemPrompt: string;
|
|
77
|
-
|
|
92
|
+
/**
|
|
93
|
+
* When `true` (default), the agent kicks off the conversation as soon
|
|
94
|
+
* as the call connects — the platform sends the LLM a synthetic
|
|
95
|
+
* `[CALL_START]` user turn so the model produces a greeting from the
|
|
96
|
+
* system prompt. When `false`, the agent stays silent until the
|
|
97
|
+
* caller speaks first.
|
|
98
|
+
*/
|
|
99
|
+
agentSpeaksFirst?: boolean;
|
|
78
100
|
voice: AgentVoice;
|
|
79
101
|
transcriber: AgentTranscriber;
|
|
80
102
|
model: AgentModel;
|
|
@@ -106,7 +128,7 @@ interface Agent {
|
|
|
106
128
|
interface AgentCreateInput {
|
|
107
129
|
name: string;
|
|
108
130
|
systemPrompt: string;
|
|
109
|
-
|
|
131
|
+
agentSpeaksFirst?: boolean;
|
|
110
132
|
voice?: AgentVoice;
|
|
111
133
|
transcriber?: AgentTranscriber;
|
|
112
134
|
model?: AgentModel;
|
|
@@ -308,6 +330,20 @@ interface CallTokenMintResult {
|
|
|
308
330
|
agentId: string;
|
|
309
331
|
expiresAt: number;
|
|
310
332
|
allowedOrigins?: string[];
|
|
333
|
+
/**
|
|
334
|
+
* Transport the agent is configured for. Forward this to the client
|
|
335
|
+
* SDK's `fetchToken` (rich return form) so it can dispatch correctly
|
|
336
|
+
* without a second round-trip. Always present in the response;
|
|
337
|
+
* defaults to `'ws'` for legacy agent docs missing the field.
|
|
338
|
+
*/
|
|
339
|
+
transport?: 'ws' | 'webrtc';
|
|
340
|
+
/**
|
|
341
|
+
* Signaling gateway base URL when `transport === 'webrtc'` AND the
|
|
342
|
+
* server has `WEBRTC_GATEWAY_BASE` configured. Forward alongside
|
|
343
|
+
* `transport` so the client SDK reaches the gateway directly instead
|
|
344
|
+
* of falling back to the Phase-1 routes on the API base (local dev).
|
|
345
|
+
*/
|
|
346
|
+
webrtcGatewayBase?: string;
|
|
311
347
|
}
|
|
312
348
|
interface CallTokenSummary {
|
|
313
349
|
tokenId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@craftedxp/sdk-node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.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",
|