@pouchy_ai/admin-sdk 0.24.0 → 0.24.2
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 +30 -1
- package/README.md +6 -2
- package/dist/index.d.ts +11 -7
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@pouchy_ai/admin-sdk` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.24.2 — 2026-08-08
|
|
6
|
+
|
|
7
|
+
- **Docs-only: `extractJson` failure vocabulary gains `request_invalid`**
|
|
8
|
+
(server-side change; no SDK code moved — the code rides the open
|
|
9
|
+
`AdminErrorCode` string arm). The provider rejecting the REQUEST itself —
|
|
10
|
+
an unknown `model` (provider 404), or a parameter outside the provider's
|
|
11
|
+
validation (422) — now surfaces as `code: 'request_invalid'` with HTTP 400
|
|
12
|
+
and the provider's own message, instead of `unavailable`, whose documented
|
|
13
|
+
recovery ("back off and retry") sent integrators into an infinite backoff
|
|
14
|
+
loop for a request that can never succeed (e.g. a typo'd model name).
|
|
15
|
+
`schema_invalid` still covers provider-rejected schemas; `unavailable` is
|
|
16
|
+
now reliably transient. Also: `schemaName` is validated locally against the
|
|
17
|
+
provider's identifier grammar (letters/digits/underscores/dashes), so a bad
|
|
18
|
+
name is an immediate 400 naming `schemaName` rather than a provider 400
|
|
19
|
+
mislabelled `schema_invalid`.
|
|
20
|
+
|
|
21
|
+
## 0.24.1 — 2026-08-08
|
|
22
|
+
|
|
23
|
+
- **Docs-only correction for `synthesizeSpeech`** (no code change): the rate
|
|
24
|
+
limit on `/v1/admin/utility/tts` is the shared **per-IP** utility bucket,
|
|
25
|
+
not per-project — the 0.24.0 notes (and the README/docstring) claimed
|
|
26
|
+
per-project keying the server never had (CR-404). Also documents that
|
|
27
|
+
`unavailable` (503) now additionally covers a temporarily unreachable voice
|
|
28
|
+
catalog (retry), and that a `model` from the other provider's namespace is
|
|
29
|
+
silently ignored in favour of the provider default (server-side CR-404/
|
|
30
|
+
CR-410 fixes; an unknown model within the right namespace still surfaces as
|
|
31
|
+
`provider_error` 502).
|
|
32
|
+
|
|
5
33
|
## 0.24.0 — 2026-08-08
|
|
6
34
|
|
|
7
35
|
- **New method `synthesizeSpeech`** (additive; nothing renamed or removed):
|
|
@@ -15,7 +43,8 @@ All notable changes to `@pouchy_ai/admin-sdk` are documented here.
|
|
|
15
43
|
(`voice_not_found`, `text_too_long`, `unsupported_format`, `unavailable`,
|
|
16
44
|
`provider_error`). Synthesis bills on your provider account like the other
|
|
17
45
|
voice planes — no separate platform credit rate; bounded by an input cap +
|
|
18
|
-
a per-project
|
|
46
|
+
a rate limit (documented at release as per-project; corrected in 0.24.1 —
|
|
47
|
+
the bucket keys per client IP).
|
|
19
48
|
|
|
20
49
|
## 0.23.0 — 2026-08-08
|
|
21
50
|
|
package/README.md
CHANGED
|
@@ -148,6 +148,8 @@ const { data } = await admin.extractJson<{ items: { kind: string; summary: strin
|
|
|
148
148
|
|
|
149
149
|
Failures are typed rather than prose, so the recoveries are distinguishable:
|
|
150
150
|
`schema_invalid` (400 — fix the schema; retrying verbatim cannot help),
|
|
151
|
+
`request_invalid` (400 — the provider rejected the request itself: an unknown
|
|
152
|
+
`model`, or a parameter outside the provider's validation; fix the request),
|
|
151
153
|
`unavailable` (5xx — transient, back off), and `invalid_json` (502 — a
|
|
152
154
|
completion arrived but did not parse or satisfy the schema; the error carries
|
|
153
155
|
`raw`, the text actually returned). Tokens roll into the project's month usage
|
|
@@ -177,9 +179,10 @@ restricted to enabled catalog rows plus the built-in OpenAI roster — so the Op
|
|
|
177
179
|
sample and the live call use one authoritative voice. Only `mp3` is produced in
|
|
178
180
|
v1. Failures are typed: `voice_not_found` (404), `text_too_long` (413),
|
|
179
181
|
`unsupported_format` (400), `unavailable` (503 — no TTS provider configured for
|
|
180
|
-
that voice
|
|
182
|
+
that voice, or the voice catalog is temporarily unreachable; retry),
|
|
183
|
+
`provider_error` (502). Synthesis bills on your provider account
|
|
181
184
|
like the other voice planes — there is no separate platform credit rate; it is
|
|
182
|
-
bounded by an input cap and
|
|
185
|
+
bounded by an input cap and the shared per-IP utility rate limit.
|
|
183
186
|
|
|
184
187
|
Every skill knob (`setSkillRate`, `setSkillDailyCap`, `grantSkill`) returns
|
|
185
188
|
`SkillKnobResult<T>` — the knob you set plus `reprovisioned` (instances the new
|
|
@@ -335,6 +338,7 @@ Reads (`GET`) are not covered by that bucket. `retryAfter` is available from
|
|
|
335
338
|
| Data capabilities | `listCapabilities` (heads + MASKED signing status) · `publishCapability` (TYPED `CapabilityDeclaration`; immutable next version, idempotent on content) · `setCapabilityDisabled` (per-capability live revoke) · `listCapabilityVersions` (history; rollback = republish an old declaration) · `testReadCapability` · `testActionCapability({ confirmDuplicates: true, … })` (REAL deliveries incl. intentional duplicates — 428 without consent) · `listActionExecutions` (the durable Action journal, incl. `authorizedBy: 'automation'`) · `listEventReceipts` (receipts + wake trail) |
|
|
336
339
|
| Webhooks | `listWebhooks` · `createWebhook` · `updateWebhook` · `rotateWebhookSecret` · `deleteWebhook` · `testWebhook` · `redeliverWebhook` |
|
|
337
340
|
| Reporting | `getUsage` · `getUsageHistory` · `getBilling` · `getTracesSummary` · `getRecentTraces` · `getLogs` · `getProject` · `updateProject` |
|
|
341
|
+
| Utilities | `extractJson` (structured JSON from prose, schema-shaped) · `synthesizeSpeech` (short TTS clip in a catalog voice, base64 mp3) |
|
|
338
342
|
| Escape hatch | `request(method, path, body?)` — any endpoint not yet typed |
|
|
339
343
|
|
|
340
344
|
Channel types are checked at compile time: `createChannel` takes a
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ADMIN_SDK_VERSION = "0.24.
|
|
1
|
+
export declare const ADMIN_SDK_VERSION = "0.24.2";
|
|
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
|
|
@@ -679,9 +679,12 @@ export interface AdminClient {
|
|
|
679
679
|
*
|
|
680
680
|
* Failures are typed rather than prose, which is the point:
|
|
681
681
|
* `schema_invalid` (400 — fix the schema, retrying verbatim cannot help),
|
|
682
|
-
* `
|
|
683
|
-
*
|
|
684
|
-
*
|
|
682
|
+
* `request_invalid` (400 — the provider rejected the request itself:
|
|
683
|
+
* an unknown `model`, or a parameter outside the provider's validation;
|
|
684
|
+
* fix the request, retrying verbatim cannot help), `unavailable` (5xx —
|
|
685
|
+
* transient, back off), `invalid_json` (502 — a completion arrived but
|
|
686
|
+
* did not parse or did not satisfy the schema; the error carries `raw`,
|
|
687
|
+
* the text actually returned).
|
|
685
688
|
*
|
|
686
689
|
* `reasoningEffort` is the thinking budget, default `'low'`. It matters more
|
|
687
690
|
* than it sounds for extraction: the shared one-shot floor is `'minimal'`,
|
|
@@ -725,11 +728,12 @@ export interface AdminClient {
|
|
|
725
728
|
*
|
|
726
729
|
* Failures are typed, not audio: `voice_not_found` (404),
|
|
727
730
|
* `text_too_long` (413), `unsupported_format` (400), `unavailable` (503 —
|
|
728
|
-
* no TTS provider configured for that voice
|
|
731
|
+
* no TTS provider configured for that voice, or the voice catalog is
|
|
732
|
+
* temporarily unreachable; retry), `provider_error` (502).
|
|
729
733
|
*
|
|
730
734
|
* Synthesis bills on your provider account (like the platform voice
|
|
731
|
-
* planes), bounded by an input cap and
|
|
732
|
-
* no separate platform credit rate. */
|
|
735
|
+
* planes), bounded by an input cap and the shared per-IP utility rate
|
|
736
|
+
* limit — there is no separate platform credit rate. */
|
|
733
737
|
synthesizeSpeech(input: {
|
|
734
738
|
text: string;
|
|
735
739
|
voice: string;
|
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.24.
|
|
11
|
+
export const ADMIN_SDK_VERSION = '0.24.2';
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pouchy_ai/admin-sdk",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.2",
|
|
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",
|