@pouchy_ai/admin-sdk 0.31.1 → 0.32.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,20 @@
2
2
 
3
3
  All notable changes to `@pouchy_ai/admin-sdk` are documented here.
4
4
 
5
+ ## 0.32.0 — 2026-09-06
6
+
7
+ - **Diff entries are `{ field, before, after }`** — `diffAgentVersions` and
8
+ `getAgentPromotion` were typed `{ field, from, to }` since they were added,
9
+ and the server has always sent `before` / `after` (`diffAgentTemplates`).
10
+ Reading `d.from` / `d.to` gave `undefined` for every changed field. The
11
+ types (and the published OpenAPI spec) now say what the wire says; no
12
+ runtime change. If you read the keys by name, rename them.
13
+ - **`getAgentPromotion().pinnedSnapshotMissing?`** — true when the production
14
+ pin names an archived snapshot that no longer exists, in which case live
15
+ instances run the staging head until a re-promote re-pins. Additive;
16
+ older servers omit it. The diff is empty in that state, so read this before
17
+ reading an empty diff as "in sync".
18
+
5
19
  ## 0.31.1 — 2026-09-06
6
20
 
7
21
  - **`AdminApiError.errorId`** — the server's lookup reference (`err_…`) for a
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const ADMIN_SDK_VERSION = "0.31.1";
1
+ export declare const ADMIN_SDK_VERSION = "0.32.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
@@ -517,8 +517,8 @@ export interface AdminClient {
517
517
  to: string;
518
518
  diff: Array<{
519
519
  field: string;
520
- from: unknown;
521
- to: unknown;
520
+ before: unknown;
521
+ after: unknown;
522
522
  }>;
523
523
  }>;
524
524
  /** Roll an agent back to an archived revision. git-revert semantics: the
@@ -529,16 +529,21 @@ export interface AdminClient {
529
529
  }>;
530
530
  /** Promotion status: the head (staging) vs the pinned production version, plus
531
531
  * the diff a promotion would ship (empty when in sync). `pending` is false
532
- * when the agent was never promoted (live follows the head). */
532
+ * when the agent was never promoted (live follows the head).
533
+ * `pinnedSnapshotMissing` (0.32.0) is true when the pin names a snapshot
534
+ * that no longer exists — live instances are then running the staging head
535
+ * and a re-promote re-pins; the diff is empty in that state for the OTHER
536
+ * reason, so read this field before reading an empty diff as "in sync". */
533
537
  getAgentPromotion(agentId: string): Promise<{
534
538
  stagingRev: number;
535
539
  prodRev: number | null;
536
540
  pending: boolean;
537
541
  diff: Array<{
538
542
  field: string;
539
- from: unknown;
540
- to: unknown;
543
+ before: unknown;
544
+ after: unknown;
541
545
  }>;
546
+ pinnedSnapshotMissing?: boolean;
542
547
  }>;
543
548
  /** Promote the head to production: freezes the head as an archived version and
544
549
  * pins prodRev WITHOUT bumping the rev. Live instances re-resolve on their
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.31.1';
11
+ export const ADMIN_SDK_VERSION = '0.32.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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pouchy_ai/admin-sdk",
3
- "version": "0.31.1",
3
+ "version": "0.32.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",