@pouchy_ai/admin-sdk 0.20.0 → 0.24.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/CHANGELOG.md CHANGED
@@ -2,6 +2,54 @@
2
2
 
3
3
  All notable changes to `@pouchy_ai/admin-sdk` are documented here.
4
4
 
5
+ ## 0.24.0 — 2026-08-08
6
+
7
+ - **New method `synthesizeSpeech`** (additive; nothing renamed or removed):
8
+ `POST /v1/admin/utility/tts`. Text → a spoken-audio mp3 FILE, OUTSIDE the
9
+ companion and OUTSIDE a realtime `/call` — the audio sibling of `extractJson`.
10
+ Stateless (no session, no persona, no memory); the voice is a catalog id
11
+ (`std_…` / `hd_…`) or `providerVoiceId` from `listVoices()`, the same id used
12
+ for a call's voice, restricted to enabled catalog rows + the built-in OpenAI
13
+ roster. Returns `{ data: { audioBase64, mimeType, format, voiceId, provider,
14
+ model }, usage: { characterCount } }`; failures are typed
15
+ (`voice_not_found`, `text_too_long`, `unsupported_format`, `unavailable`,
16
+ `provider_error`). Synthesis bills on your provider account like the other
17
+ voice planes — no separate platform credit rate; bounded by an input cap +
18
+ a per-project rate limit.
19
+
20
+ ## 0.23.0 — 2026-08-08
21
+
22
+ - **`ChannelTransportType` grows 6 members** (additive; nothing renamed or
23
+ removed): the developer-platform family — `github`, `gitlab`, `bitbucket`,
24
+ `jira`, `linear`, `discourse`. The agent answers in an issue / PR / ticket /
25
+ forum thread; these are thread-rooms (group mode on, mention-gated). All are
26
+ official-webhook adapters (no relay bridge), born closed (webhook signature
27
+ or a mandatory shared token), and creatable via `createChannel`;
28
+ per-transport `config` / `secret` fields are documented at
29
+ <https://pouchy.ai/docs/channel-setup>.
30
+
31
+ ## 0.22.0 — 2026-08-08
32
+
33
+ - **`ChannelTransportType` grows 4 members** (additive; nothing renamed or
34
+ removed): `zoom` (Zoom Team Chat Chatbot), `line-works` (LINE WORKS Bot API),
35
+ `ringcentral` (RingCentral Team Messaging), and `vonage` (Vonage Messages
36
+ API, the `sms` sibling). All are official-webhook adapters (no relay bridge),
37
+ born closed (signature / verification-token / signed-JWT gate), and creatable
38
+ via `createChannel`; per-transport `config` / `secret` fields are documented
39
+ at <https://pouchy.ai/docs/channel-setup>.
40
+
41
+ ## 0.21.0 — 2026-08-08
42
+
43
+ - **`ChannelTransportType` grows 15 members** (additive; nothing renamed or
44
+ removed): the customer-support inbox family — `crisp`, `freshchat`, `front`,
45
+ `gorgias`, `kustomer`, `helpscout`, `livechat`, `zohodesk`, `hubspot`,
46
+ `zendesk`, `salesforce` (the agent answers a support conversation, the
47
+ intercom template) — and four bot-token team chats — `webex`, `chatwork`,
48
+ `google-chat`, `zohocliq`. All are official-webhook adapters (no relay
49
+ bridge), born closed (the platform always authenticates), and creatable via
50
+ `createChannel`; per-transport `config` / `secret` fields are documented at
51
+ <https://pouchy.ai/docs/channel-setup>.
52
+
5
53
  ## 0.20.0 — 2026-08-08
6
54
 
7
55
  - **`ChannelTransportType` grows 10 members** (additive; nothing renamed or
package/README.md CHANGED
@@ -153,6 +153,34 @@ completion arrived but did not parse or satisfy the schema; the error carries
153
153
  `raw`, the text actually returned). Tokens roll into the project's month usage
154
154
  like any other model call.
155
155
 
156
+ ### Spoken audio — use `synthesizeSpeech`, not `/call`
157
+
158
+ The audio sibling of `extractJson`: text → a downloadable **mp3 file**, OUTSIDE
159
+ the companion and OUTSIDE a realtime call. `/call` is live ConvAI (a WebRTC
160
+ session); when you need an audio **file** for a headless / Ops job — a reference
161
+ clip for a downstream video / lip-sync API, a pre-rendered notification — this
162
+ is the stateless path.
163
+
164
+ ```ts
165
+ const { data, usage } = await admin.synthesizeSpeech({
166
+ text: 'Hey — just wanted to share this moment with you.',
167
+ voice: 'hd_ByhETIclHirOlWnWKhHc' // a catalog id OR providerVoiceId from listVoices()
168
+ });
169
+ // data.audioBase64 is the mp3 — decode and persist it (never hand a provider URL
170
+ // to a client). In Node: Buffer.from(data.audioBase64, 'base64'); in a browser:
171
+ // Uint8Array.from(atob(data.audioBase64), (c) => c.charCodeAt(0)).
172
+ console.log(data.mimeType, data.voiceId, data.provider, usage.characterCount);
173
+ ```
174
+
175
+ `voice` is the **same id you pass to a call's voice** (from `listVoices()`),
176
+ restricted to enabled catalog rows plus the built-in OpenAI roster — so the Ops
177
+ sample and the live call use one authoritative voice. Only `mp3` is produced in
178
+ v1. Failures are typed: `voice_not_found` (404), `text_too_long` (413),
179
+ `unsupported_format` (400), `unavailable` (503 — no TTS provider configured for
180
+ that voice), `provider_error` (502). Synthesis bills on your provider account
181
+ like the other voice planes — there is no separate platform credit rate; it is
182
+ bounded by an input cap and a per-project rate limit.
183
+
156
184
  Every skill knob (`setSkillRate`, `setSkillDailyCap`, `grantSkill`) returns
157
185
  `SkillKnobResult<T>` — the knob you set plus `reprovisioned` (instances the new
158
186
  def reached) and `truncated`. A knob only binds a running agent once the def
@@ -310,7 +338,7 @@ Reads (`GET`) are not covered by that bucket. `retryAfter` is available from
310
338
  | Escape hatch | `request(method, path, body?)` — any endpoint not yet typed |
311
339
 
312
340
  Channel types are checked at compile time: `createChannel` takes a
313
- `CreatableChannelType` (the platform's 57-transport union minus the adapterless
341
+ `CreatableChannelType` (the platform's 82-transport union minus the adapterless
314
342
  `internal-a2a`), and `secret` is a named `ChannelSecretInput`. Per-transport
315
343
  `secret.extra` fields are listed in <https://pouchy.ai/docs/channel-setup>.
316
344
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const ADMIN_SDK_VERSION = "0.20.0";
1
+ export declare const ADMIN_SDK_VERSION = "0.24.0";
2
2
  export declare const DEFAULT_BASE_URL = "https://pouchy.ai/v1/admin";
3
3
  /** Deadline for the routes whose server handler declares `maxDuration: 300` —
4
4
  * the server's own ceiling plus headroom, so a client abort can only ever mean
@@ -332,7 +332,7 @@ export interface DeliveryOutcome {
332
332
  * (`channels/types.ts`) — this package is standalone and cannot import it, so
333
333
  * `admin-sdk-channel-types.drift.test.ts` binds the two and fails CI if either
334
334
  * side gains a transport the other lacks. */
335
- export type ChannelTransportType = 'echo' | 'matrix' | 'telegram' | 'web' | 'activitypub' | 'internal-a2a' | 'discord' | 'slack' | 'nostr' | 'atproto' | 'sms' | 'email' | 'whatsapp' | 'messenger' | 'instagram' | 'line' | 'teams' | 'wechat' | 'wecom' | 'feishu' | 'dingtalk' | 'twitter' | 'xmpp' | 'qq' | 'kakao' | 'viber' | 'signal' | 'weibo' | 'alexa' | 'google-assistant' | 'voice' | 'onlyfans' | 'fansly' | 'fanvue' | 'imessage' | 'rcs' | 'intercom' | 'twitch' | 'zalo' | 'douyin' | 'kick' | 'reddit' | 'xmtp' | 'guilded' | 'youtube-live' | 'bilibili-live' | 'minecraft' | 'steam' | 'vk' | 'ok' | 'threads' | 'groupme' | 'threema' | 'mattermost' | 'rocketchat' | 'zulip' | 'farcaster' | 'tiktok';
335
+ export type ChannelTransportType = 'echo' | 'matrix' | 'telegram' | 'web' | 'activitypub' | 'internal-a2a' | 'discord' | 'slack' | 'nostr' | 'atproto' | 'sms' | 'email' | 'whatsapp' | 'messenger' | 'instagram' | 'line' | 'teams' | 'wechat' | 'wecom' | 'feishu' | 'dingtalk' | 'twitter' | 'xmpp' | 'qq' | 'kakao' | 'viber' | 'signal' | 'weibo' | 'alexa' | 'google-assistant' | 'voice' | 'onlyfans' | 'fansly' | 'fanvue' | 'imessage' | 'rcs' | 'intercom' | 'twitch' | 'zalo' | 'douyin' | 'kick' | 'reddit' | 'xmtp' | 'guilded' | 'youtube-live' | 'bilibili-live' | 'minecraft' | 'steam' | 'vk' | 'ok' | 'threads' | 'groupme' | 'threema' | 'mattermost' | 'rocketchat' | 'zulip' | 'farcaster' | 'tiktok' | 'crisp' | 'freshchat' | 'front' | 'gorgias' | 'kustomer' | 'helpscout' | 'livechat' | 'zohodesk' | 'hubspot' | 'zendesk' | 'salesforce' | 'webex' | 'chatwork' | 'google-chat' | 'zohocliq' | 'zoom' | 'line-works' | 'ringcentral' | 'vonage' | 'github' | 'gitlab' | 'bitbucket' | 'jira' | 'linear' | 'discourse';
336
336
  /** Transports `createChannel` accepts. `internal-a2a` is in the union but has
337
337
  * no adapter, so the server answers 400 — excluding it here turns a runtime
338
338
  * rejection into a compile error. */
@@ -711,6 +711,43 @@ export interface AdminClient {
711
711
  completionTokens: number;
712
712
  };
713
713
  }>;
714
+ /** Text → a spoken-audio FILE, OUTSIDE the companion and OUTSIDE a realtime
715
+ * call. The audio sibling of `extractJson`: stateless (no session, no
716
+ * persona, no memory), one synthesis call, a downloadable clip back. Use it
717
+ * for headless / Ops audio — e.g. a reference clip for a downstream
718
+ * video / lip-sync API — where `/call` (live ConvAI) does not fit.
719
+ *
720
+ * `voice` is a catalog id (`std_…` / `hd_…`) or a `providerVoiceId` from
721
+ * `listVoices()` — the SAME id you pass to a call's voice — restricted to
722
+ * enabled catalog rows plus the built-in OpenAI roster. `data.audioBase64`
723
+ * is the mp3 bytes; decode and persist them (never hand a provider URL to a
724
+ * client). Only `mp3` is produced in v1.
725
+ *
726
+ * Failures are typed, not audio: `voice_not_found` (404),
727
+ * `text_too_long` (413), `unsupported_format` (400), `unavailable` (503 —
728
+ * no TTS provider configured for that voice), `provider_error` (502).
729
+ *
730
+ * Synthesis bills on your provider account (like the platform voice
731
+ * planes), bounded by an input cap and a per-project rate limit — there is
732
+ * no separate platform credit rate. */
733
+ synthesizeSpeech(input: {
734
+ text: string;
735
+ voice: string;
736
+ format?: 'mp3';
737
+ model?: string;
738
+ }): Promise<{
739
+ data: {
740
+ audioBase64: string;
741
+ mimeType: string;
742
+ format: 'mp3';
743
+ voiceId: string;
744
+ provider: 'openAI' | 'elevenLabs';
745
+ model: string;
746
+ };
747
+ usage: {
748
+ characterCount: number;
749
+ };
750
+ }>;
714
751
  deleteKnowledge(docId: string): Promise<{
715
752
  deleted: boolean;
716
753
  }>;
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@
8
8
  // import { createAdminClient } from '@pouchy_ai/admin-sdk';
9
9
  // const admin = createAdminClient({ adminKey: process.env.POUCHY_ADMIN_KEY! });
10
10
  // const { agents } = await admin.listAgents();
11
- export const ADMIN_SDK_VERSION = '0.20.0';
11
+ export const ADMIN_SDK_VERSION = '0.24.0';
12
12
  export const DEFAULT_BASE_URL = 'https://pouchy.ai/v1/admin';
13
13
  /** Default per-request timeout (ms). A hung upstream otherwise never rejects. */
14
14
  const DEFAULT_TIMEOUT_MS = 30_000;
@@ -248,6 +248,7 @@ export function createAdminClient(opts) {
248
248
  ingestKnowledgeUrl: (input) => request('POST', '/knowledge/url', input),
249
249
  searchKnowledge: (query) => request('POST', '/knowledge/search', { query }),
250
250
  extractJson: (input) => request('POST', '/utility/json', input),
251
+ synthesizeSpeech: (input) => request('POST', '/utility/tts', input),
251
252
  deleteKnowledge: (id) => request('DELETE', `/knowledge/${encodeURIComponent(id)}`),
252
253
  listSkills: () => request('GET', '/skills'),
253
254
  installSkill: (input) => request('POST', '/skills', input),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pouchy_ai/admin-sdk",
3
- "version": "0.20.0",
3
+ "version": "0.24.0",
4
4
  "description": "Typed TypeScript client for the Pouchy Admin API \u2014 manage agents, keys, end users, knowledge, skills, channels, schedules, webhooks and credentials headlessly, with a project Admin key.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",