@shogo-ai/voice 1.10.0 → 2.4.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/README.md +89 -0
- package/dist/{chunk-S3S2RNO6.js → chunk-BI6SL35K.js} +1 -184
- package/dist/chunk-CLF25CZC.js +987 -0
- package/dist/chunk-KMSL5PWK.js +540 -0
- package/dist/chunk-ME3SIZZU.js +581 -0
- package/dist/chunk-TQOBJMEK.js +17 -0
- package/dist/{chunk-T3T4EBWY.js → chunk-UH75UVM2.js} +6 -2
- package/dist/chunk-UW7VQ3S6.js +148 -0
- package/dist/chunk-XE4LLC7Z.js +1067 -0
- package/dist/chunk-ZAW6F3YT.js +172 -0
- package/dist/index.cjs +735 -25
- package/dist/index.d.cts +373 -3
- package/dist/index.d.ts +373 -3
- package/dist/index.js +59 -3
- package/dist/live/client.cjs +173 -0
- package/dist/live/client.d.cts +132 -0
- package/dist/live/client.d.ts +132 -0
- package/dist/live/client.js +9 -0
- package/dist/native/index.d.cts +5 -2
- package/dist/native/index.d.ts +5 -2
- package/dist/native/index.js +15 -11
- package/dist/{organicParticlesShaders-DIva0vBO.d.ts → organicParticlesShaders-seZq7jYX.d.cts} +1 -421
- package/dist/{organicParticlesShaders-DIva0vBO.d.cts → organicParticlesShaders-seZq7jYX.d.ts} +1 -421
- package/dist/particlesConfig-0YbdPOdY.d.cts +223 -0
- package/dist/particlesConfig-0YbdPOdY.d.ts +223 -0
- package/dist/react/conversation.cjs +789 -0
- package/dist/react/conversation.d.cts +134 -0
- package/dist/react/conversation.d.ts +134 -0
- package/dist/react/conversation.js +13 -0
- package/dist/react/index.cjs +374 -36
- package/dist/react/index.d.cts +10 -141
- package/dist/react/index.d.ts +10 -141
- package/dist/react/index.js +23 -770
- package/dist/react/visuals.cjs +1048 -0
- package/dist/react/visuals.d.cts +70 -0
- package/dist/react/visuals.d.ts +70 -0
- package/dist/react/visuals.js +10 -0
- package/dist/route/agent.cjs +1038 -85
- package/dist/route/agent.js +3 -3
- package/dist/route/audio-tags.cjs +1038 -85
- package/dist/route/audio-tags.js +3 -3
- package/dist/route/index.cjs +1042 -85
- package/dist/route/index.d.cts +19 -3
- package/dist/route/index.d.ts +19 -3
- package/dist/route/index.js +3 -3
- package/dist/route/music.cjs +1038 -85
- package/dist/route/music.js +3 -3
- package/dist/route/op.cjs +2118 -0
- package/dist/route/op.d.cts +43 -0
- package/dist/route/op.d.ts +43 -0
- package/dist/route/op.js +27 -0
- package/dist/route/signed-url.cjs +1038 -85
- package/dist/route/signed-url.js +3 -3
- package/dist/route/tts-preview.cjs +1038 -85
- package/dist/route/tts-preview.d.cts +6 -4
- package/dist/route/tts-preview.d.ts +6 -4
- package/dist/route/tts-preview.js +3 -3
- package/dist/server.cjs +1038 -85
- package/dist/server.d.cts +40 -8
- package/dist/server.d.ts +40 -8
- package/dist/server.js +2 -2
- package/dist/types-Bfhu-aQH.d.cts +199 -0
- package/dist/types-Bfhu-aQH.d.ts +199 -0
- package/dist/{types-W9y6eMj3.d.ts → types-CadjTXNH.d.cts} +193 -12
- package/dist/{types-W9y6eMj3.d.cts → types-CadjTXNH.d.ts} +193 -12
- package/package.json +21 -1
- package/dist/chunk-B4JC3DK2.js +0 -529
- package/dist/chunk-O362EJQR.js +0 -524
package/dist/route/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VoiceHandlersConfig, VoiceHandlers } from '../server.cjs';
|
|
2
2
|
import 'node:http';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-CadjTXNH.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @shogo-ai/sdk/voice/route
|
|
@@ -10,7 +10,7 @@ import '../types-W9y6eMj3.cjs';
|
|
|
10
10
|
* `route.ts`, Cloudflare Workers, Bun.serve, Deno, Hono, etc.).
|
|
11
11
|
*
|
|
12
12
|
* The per-resource sub-modules (`./signed-url`, `./tts-preview`,
|
|
13
|
-
* `./agent`, `./audio-tags`) re-export pre-instantiated `GET`/`POST`/
|
|
13
|
+
* `./agent`, `./audio-tags`, `./op`) re-export pre-instantiated `GET`/`POST`/
|
|
14
14
|
* `PATCH`/`DELETE` handlers that delegate to {@link createVoiceHandlers}
|
|
15
15
|
* with zero configuration — pod apps just point a route file at them:
|
|
16
16
|
*
|
|
@@ -27,12 +27,23 @@ import '../types-W9y6eMj3.cjs';
|
|
|
27
27
|
*
|
|
28
28
|
* // app/api/voice/agent+api.ts
|
|
29
29
|
* export { POST, PATCH, DELETE } from '@shogo-ai/sdk/voice/route/agent'
|
|
30
|
+
*
|
|
31
|
+
* // app/api/voice/op/[opId]+api.ts — every op in the registry, one file
|
|
32
|
+
* export { GET, POST } from '@shogo-ai/sdk/voice/route/op'
|
|
30
33
|
* ```
|
|
31
34
|
*
|
|
32
35
|
* In a Shogo-managed pod, `RUNTIME_AUTH_SECRET` and `PROJECT_ID` are
|
|
33
36
|
* injected automatically; `createVoiceHandlers({})` detects them and
|
|
34
37
|
* proxies to the Shogo API. No keys, no `getUser`, no companion store
|
|
35
|
-
* are required for the proxy path
|
|
38
|
+
* are required for the proxy path, and `tts` / `music` work there —
|
|
39
|
+
* `tts` forwards to the hosted `POST /api/voice/tts`, `music` to
|
|
40
|
+
* `POST /api/voice/music`. Only the user-scoped handlers (`signedUrl`,
|
|
41
|
+
* `agent.*`) return 501 in proxy mode; everything on `elevenLabs` except
|
|
42
|
+
* `textToSpeech` / `composeMusic` throws.
|
|
43
|
+
*
|
|
44
|
+
* An explicit `apiKey` wins over the ambient runtime token, so
|
|
45
|
+
* `createVoiceHandlers({ apiKey })` stays BYO even inside a pod —
|
|
46
|
+
* `config.mode` (`'auto' | 'byo' | 'proxy'`) can force either transport.
|
|
36
47
|
*
|
|
37
48
|
* @example Next.js App Router (BYO ElevenLabs)
|
|
38
49
|
* ```ts
|
|
@@ -93,6 +104,11 @@ interface VoiceRoute {
|
|
|
93
104
|
audioTags: {
|
|
94
105
|
GET: (req: Request) => Promise<Response>;
|
|
95
106
|
};
|
|
107
|
+
/** `GET|POST /voice/op/:opId` — every registry op through one handler. */
|
|
108
|
+
op: {
|
|
109
|
+
GET: (req: Request, opId?: string) => Promise<Response>;
|
|
110
|
+
POST: (req: Request, opId?: string) => Promise<Response>;
|
|
111
|
+
};
|
|
96
112
|
}
|
|
97
113
|
/**
|
|
98
114
|
* Build per-resource route handlers from an explicit
|
package/dist/route/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VoiceHandlersConfig, VoiceHandlers } from '../server.js';
|
|
2
2
|
import 'node:http';
|
|
3
|
-
import '../types-
|
|
3
|
+
import '../types-CadjTXNH.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @shogo-ai/sdk/voice/route
|
|
@@ -10,7 +10,7 @@ import '../types-W9y6eMj3.js';
|
|
|
10
10
|
* `route.ts`, Cloudflare Workers, Bun.serve, Deno, Hono, etc.).
|
|
11
11
|
*
|
|
12
12
|
* The per-resource sub-modules (`./signed-url`, `./tts-preview`,
|
|
13
|
-
* `./agent`, `./audio-tags`) re-export pre-instantiated `GET`/`POST`/
|
|
13
|
+
* `./agent`, `./audio-tags`, `./op`) re-export pre-instantiated `GET`/`POST`/
|
|
14
14
|
* `PATCH`/`DELETE` handlers that delegate to {@link createVoiceHandlers}
|
|
15
15
|
* with zero configuration — pod apps just point a route file at them:
|
|
16
16
|
*
|
|
@@ -27,12 +27,23 @@ import '../types-W9y6eMj3.js';
|
|
|
27
27
|
*
|
|
28
28
|
* // app/api/voice/agent+api.ts
|
|
29
29
|
* export { POST, PATCH, DELETE } from '@shogo-ai/sdk/voice/route/agent'
|
|
30
|
+
*
|
|
31
|
+
* // app/api/voice/op/[opId]+api.ts — every op in the registry, one file
|
|
32
|
+
* export { GET, POST } from '@shogo-ai/sdk/voice/route/op'
|
|
30
33
|
* ```
|
|
31
34
|
*
|
|
32
35
|
* In a Shogo-managed pod, `RUNTIME_AUTH_SECRET` and `PROJECT_ID` are
|
|
33
36
|
* injected automatically; `createVoiceHandlers({})` detects them and
|
|
34
37
|
* proxies to the Shogo API. No keys, no `getUser`, no companion store
|
|
35
|
-
* are required for the proxy path
|
|
38
|
+
* are required for the proxy path, and `tts` / `music` work there —
|
|
39
|
+
* `tts` forwards to the hosted `POST /api/voice/tts`, `music` to
|
|
40
|
+
* `POST /api/voice/music`. Only the user-scoped handlers (`signedUrl`,
|
|
41
|
+
* `agent.*`) return 501 in proxy mode; everything on `elevenLabs` except
|
|
42
|
+
* `textToSpeech` / `composeMusic` throws.
|
|
43
|
+
*
|
|
44
|
+
* An explicit `apiKey` wins over the ambient runtime token, so
|
|
45
|
+
* `createVoiceHandlers({ apiKey })` stays BYO even inside a pod —
|
|
46
|
+
* `config.mode` (`'auto' | 'byo' | 'proxy'`) can force either transport.
|
|
36
47
|
*
|
|
37
48
|
* @example Next.js App Router (BYO ElevenLabs)
|
|
38
49
|
* ```ts
|
|
@@ -93,6 +104,11 @@ interface VoiceRoute {
|
|
|
93
104
|
audioTags: {
|
|
94
105
|
GET: (req: Request) => Promise<Response>;
|
|
95
106
|
};
|
|
107
|
+
/** `GET|POST /voice/op/:opId` — every registry op through one handler. */
|
|
108
|
+
op: {
|
|
109
|
+
GET: (req: Request, opId?: string) => Promise<Response>;
|
|
110
|
+
POST: (req: Request, opId?: string) => Promise<Response>;
|
|
111
|
+
};
|
|
96
112
|
}
|
|
97
113
|
/**
|
|
98
114
|
* Build per-resource route handlers from an explicit
|
package/dist/route/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createVoiceRoute,
|
|
3
3
|
defaultHandlers
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-UH75UVM2.js";
|
|
5
|
+
import "../chunk-CLF25CZC.js";
|
|
6
|
+
import "../chunk-XE4LLC7Z.js";
|
|
7
7
|
import "../chunk-Q3TJAJ54.js";
|
|
8
8
|
export {
|
|
9
9
|
createVoiceRoute,
|