@pouchy_ai/admin-sdk 0.44.1 → 0.45.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 +19 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.js +13 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@pouchy_ai/admin-sdk` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.45.0 — 2026-10-17
|
|
6
|
+
|
|
7
|
+
- **`extractJson({ model })` takes only a model the deployment enables.** The
|
|
8
|
+
server now refuses any other `model` with `400` / `code: 'model_not_allowed'`
|
|
9
|
+
before the provider call, and the body lists `allowedModels` (the deployment's
|
|
10
|
+
default, its pro tier, and any model the operator adds with
|
|
11
|
+
`POUCHY_ALLOWED_MODELS`). Before, `model` was forwarded to the provider as
|
|
12
|
+
given, on the operator's key. Omitting `model` behaves as before. No method
|
|
13
|
+
signature changed; the docs on `extractJson` name the new code.
|
|
14
|
+
|
|
15
|
+
## 0.44.2 — 2026-10-16
|
|
16
|
+
|
|
17
|
+
- **Five codes join `ADMIN_ERROR_CODES`**, all 409s the server already sends:
|
|
18
|
+
`not_a_serial`, `episode_not_ended` and `series_complete` from starting a
|
|
19
|
+
worldline's next episode, and `evidence_history_exceeds_window` /
|
|
20
|
+
`evidence_history_gap` from a whole-instance script draft or eval. They
|
|
21
|
+
reached the wire through shared helpers the vocabulary's drift check did not
|
|
22
|
+
scan, so the list never named them. Vocabulary only; no method changed.
|
|
23
|
+
|
|
5
24
|
## 0.44.1 — 2026-10-16
|
|
6
25
|
|
|
7
26
|
- **`story_contract_v5_write_disabled`** joins `ADMIN_ERROR_CODES` — a Story
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ADMIN_SDK_VERSION = "0.
|
|
1
|
+
export declare const ADMIN_SDK_VERSION = "0.45.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
|
|
@@ -60,7 +60,7 @@ export interface AdminClientOptions {
|
|
|
60
60
|
* published: on this plane the status line never disambiguates, so two of the
|
|
61
61
|
* durable-run routes answer 409 for two entirely different reasons each, with
|
|
62
62
|
* different recoveries. `code` is the only thing that tells them apart. */
|
|
63
|
-
export declare const ADMIN_ERROR_CODES: readonly ["story_contract_v2_write_disabled", "story_contract_v3_write_disabled", "story_contract_v4_write_disabled", "story_contract_v5_write_disabled", "has_pins", "pins_unknown", "story_package_limit", "story_package_documents_limit", "episode_history_incomplete", "episode_ended", "idempotency_key_reused", "stale_deliberation", "deliberation_disabled", "deliberation_uncalibrated", "deliberation_not_enabled", "deliberation_candidates_exceeded", "schedule_limit_reached", "one_shot_spent", "ghost_row", "channel_limit_reached", "webhook_limit_reached", "run_limit_reached", "reembed_required", "run_terminal", "run_not_parked", "stale_token", "run_not_waiting", "event_mismatch", "subscription_exists", "world_actor_conflict", "world_revision_mismatch", "world_provider_mismatch"];
|
|
63
|
+
export declare const ADMIN_ERROR_CODES: readonly ["story_contract_v2_write_disabled", "story_contract_v3_write_disabled", "story_contract_v4_write_disabled", "story_contract_v5_write_disabled", "has_pins", "pins_unknown", "story_package_limit", "story_package_documents_limit", "episode_history_incomplete", "episode_ended", "idempotency_key_reused", "stale_deliberation", "deliberation_disabled", "deliberation_uncalibrated", "deliberation_not_enabled", "deliberation_candidates_exceeded", "schedule_limit_reached", "one_shot_spent", "ghost_row", "channel_limit_reached", "webhook_limit_reached", "run_limit_reached", "reembed_required", "run_terminal", "run_not_parked", "stale_token", "run_not_waiting", "event_mismatch", "subscription_exists", "world_actor_conflict", "world_revision_mismatch", "world_provider_mismatch", "not_a_serial", "episode_not_ended", "series_complete", "evidence_history_exceeds_window", "evidence_history_gap"];
|
|
64
64
|
/** `AdminApiError.code` values. The `(string & {})` arm keeps the type open for
|
|
65
65
|
* codes newer than this SDK build while preserving autocomplete — same
|
|
66
66
|
* doctrine as the companion SDK's `CompanionErrorCodeValue`. */
|
|
@@ -939,6 +939,9 @@ export interface AdminClient {
|
|
|
939
939
|
* validation.
|
|
940
940
|
*
|
|
941
941
|
* Failures are typed rather than prose, which is the point:
|
|
942
|
+
* `model_not_allowed` (400, since 0.45.0 — `model` names a model this
|
|
943
|
+
* deployment does not enable; the body lists `allowedModels`; omit `model`
|
|
944
|
+
* for the default),
|
|
942
945
|
* `schema_invalid` (400 — fix the schema, retrying verbatim cannot help;
|
|
943
946
|
* only reachable on a STRICT call, because `strict: false` never puts a
|
|
944
947
|
* schema on the wire), `request_invalid` (400 — the provider rejected the
|
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.
|
|
11
|
+
export const ADMIN_SDK_VERSION = '0.45.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;
|
|
@@ -108,7 +108,18 @@ export const ADMIN_ERROR_CODES = [
|
|
|
108
108
|
// two concurrent FIRST mints of one world instance; retry the mint.
|
|
109
109
|
'world_actor_conflict',
|
|
110
110
|
'world_revision_mismatch',
|
|
111
|
-
'world_provider_mismatch'
|
|
111
|
+
'world_provider_mismatch',
|
|
112
|
+
// 0.44.2 — the serial-episode refusals (`not_a_serial` / `episode_not_ended`
|
|
113
|
+
// / `series_complete`, from starting the next episode) and the two reasons a
|
|
114
|
+
// whole-instance evidence read is refused (`evidence_history_exceeds_window`:
|
|
115
|
+
// draft one ended episode with `episodeRunId` instead; `evidence_history_gap`:
|
|
116
|
+
// a committed beat is missing). The server has sent all five since they
|
|
117
|
+
// shipped; this only declares them.
|
|
118
|
+
'not_a_serial',
|
|
119
|
+
'episode_not_ended',
|
|
120
|
+
'series_complete',
|
|
121
|
+
'evidence_history_exceeds_window',
|
|
122
|
+
'evidence_history_gap'
|
|
112
123
|
];
|
|
113
124
|
/** Thrown on any non-2xx response AND on a transport failure that never reached
|
|
114
125
|
* the server (network / DNS / timeout), which carries `status: 0`. `status` is
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pouchy_ai/admin-sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Typed TypeScript client for the Pouchy Admin API
|
|
3
|
+
"version": "0.45.0",
|
|
4
|
+
"description": "Typed TypeScript client for the Pouchy Admin API — 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",
|
|
7
7
|
"homepage": "https://pouchy.ai/sdk",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/oviswang/Pouchy.git",
|
|
10
|
+
"url": "git+https://github.com/oviswang/Pouchy.git",
|
|
11
11
|
"directory": "packages/admin-sdk"
|
|
12
12
|
},
|
|
13
13
|
"bugs": {
|