@pouchy_ai/admin-sdk 0.24.1 → 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 CHANGED
@@ -2,6 +2,22 @@
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
+
5
21
  ## 0.24.1 — 2026-08-08
6
22
 
7
23
  - **Docs-only correction for `synthesizeSpeech`** (no code change): the rate
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
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const ADMIN_SDK_VERSION = "0.24.1";
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
- * `unavailable` (5xxtransient, back off), `invalid_json` (502 — a
683
- * completion arrived but did not parse or did not satisfy the schema; the
684
- * error carries `raw`, the text actually returned).
682
+ * `request_invalid` (400the 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'`,
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.1';
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.1",
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",