@pouchy_ai/admin-sdk 0.39.0 → 0.40.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 +26 -0
- package/dist/index.d.ts +27 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@pouchy_ai/admin-sdk` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.40.0 — 2026-09-29
|
|
6
|
+
|
|
7
|
+
- **`recording` on agents.** Turning it on grants `call.record` on the agent's
|
|
8
|
+
session mints, so a call started with `record: true` (companion-sdk 0.65.0)
|
|
9
|
+
is recorded by the voice provider — both voices, one MP3, kept 7 days — and
|
|
10
|
+
fetchable with `getCallRecording`. Default false; the template flag is the
|
|
11
|
+
only way to get the scope. You own telling readers their calls are recorded
|
|
12
|
+
and getting their consent.
|
|
13
|
+
|
|
14
|
+
## 0.39.1 — 2026-09-28
|
|
15
|
+
|
|
16
|
+
Type corrections. The server's responses did not change; three return types
|
|
17
|
+
described fields it never sent (CR-1101).
|
|
18
|
+
|
|
19
|
+
- **`importUsers()`: `invalid` is a number**, the count of ids refused for
|
|
20
|
+
their shape, not `string[]`. Code that called `res.invalid.join()` threw.
|
|
21
|
+
The type also gains `requested` and `env`, which the server always sent.
|
|
22
|
+
- **`promoteAgent()` returns `{ prodRev, stagingRev }`.** It was typed
|
|
23
|
+
`{ prodRev, templateRev }`, so `templateRev` was always `undefined`.
|
|
24
|
+
- **`getRecentTraces()` types `degraded`** (`false | 'index' | 'error'`), plus
|
|
25
|
+
`sinceHours` and `window`. When `degraded` is not `false` the read failed,
|
|
26
|
+
and an empty `traces` does NOT mean "no runs".
|
|
27
|
+
|
|
28
|
+
If your code relied on the old types, the compiler will now point at it. Each
|
|
29
|
+
of those reads was already wrong at runtime.
|
|
30
|
+
|
|
5
31
|
## 0.39.0 — 2026-09-26
|
|
6
32
|
|
|
7
33
|
- **`getUserWallet()` now types the figures, and a failed read throws.**
|
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.40.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
|
|
@@ -176,6 +176,13 @@ export interface Agent {
|
|
|
176
176
|
* on purpose, so asking for it in the session-mint body is narrowed away.
|
|
177
177
|
* Leave it off unless your backend assembles per-turn rules itself. */
|
|
178
178
|
instructions?: boolean;
|
|
179
|
+
/** Grant `call.record` on this agent's session mints (0.40.0), so a call
|
|
180
|
+
* started with `record: true` is recorded by the voice provider — both
|
|
181
|
+
* voices, one MP3, kept 7 days — and fetchable with the companion SDK's
|
|
182
|
+
* `getCallRecording`. Default false; this flag is the ONLY way to obtain
|
|
183
|
+
* the scope. Turning it on makes you responsible for telling readers their
|
|
184
|
+
* calls are recorded and getting their consent. */
|
|
185
|
+
recording?: boolean;
|
|
179
186
|
/** Reply-cue opt-in (see ReplyCues). */
|
|
180
187
|
replyCues?: ReplyCues;
|
|
181
188
|
templateRev: number;
|
|
@@ -617,10 +624,12 @@ export interface AdminClient {
|
|
|
617
624
|
}>;
|
|
618
625
|
/** Promote the head to production: freezes the head as an archived version and
|
|
619
626
|
* pins prodRev WITHOUT bumping the rev. Live instances re-resolve on their
|
|
620
|
-
* next mint; test instances always run the head.
|
|
627
|
+
* next mint; test instances always run the head. `stagingRev` equals
|
|
628
|
+
* `prodRev` right after a promote (0.39.1: this was typed `templateRev`,
|
|
629
|
+
* which the server never sent). */
|
|
621
630
|
promoteAgent(agentId: string): Promise<{
|
|
622
631
|
prodRev: number;
|
|
623
|
-
|
|
632
|
+
stagingRev: number;
|
|
624
633
|
}>;
|
|
625
634
|
listKeys(): Promise<{
|
|
626
635
|
keys: SecretKey[];
|
|
@@ -679,15 +688,19 @@ export interface AdminClient {
|
|
|
679
688
|
traces: unknown[];
|
|
680
689
|
}>;
|
|
681
690
|
/** Batch-import end users from your own id list (idempotent per external id;
|
|
682
|
-
* never meters MAU — imported users bill only when they actually mint).
|
|
691
|
+
* never meters MAU — imported users bill only when they actually mint).
|
|
692
|
+
* `invalid` is a COUNT of ids refused for their shape (0.39.1: it was typed
|
|
693
|
+
* `string[]`, so `res.invalid.join()` threw). */
|
|
683
694
|
importUsers(input: {
|
|
684
695
|
externalUserIds: string[] | string;
|
|
685
696
|
agentId?: string;
|
|
686
697
|
env?: Env;
|
|
687
698
|
}): Promise<{
|
|
699
|
+
requested: number;
|
|
688
700
|
created: number;
|
|
689
701
|
skipped: number;
|
|
690
|
-
|
|
702
|
+
env: Env;
|
|
703
|
+
invalid: number;
|
|
691
704
|
}>;
|
|
692
705
|
/** GDPR data-portability export: registry, character state, memories, contacts. */
|
|
693
706
|
exportUser(instanceId: string): Promise<Record<string, unknown>>;
|
|
@@ -1441,13 +1454,21 @@ export interface AdminClient {
|
|
|
1441
1454
|
agentId: string;
|
|
1442
1455
|
sinceHours?: number;
|
|
1443
1456
|
}): Promise<Record<string, unknown>>;
|
|
1444
|
-
/** Recent run rows project-wide (the failed-run browser).
|
|
1457
|
+
/** Recent run rows project-wide (the failed-run browser). `degraded` other
|
|
1458
|
+
* than `false` means the READ failed (`'index'` a missing index, `'error'`
|
|
1459
|
+
* a fault): an empty `traces` is then NOT "no runs" and must not be shown as
|
|
1460
|
+
* one (0.39.1: the field was missing from this type). */
|
|
1445
1461
|
getRecentTraces(params?: {
|
|
1446
1462
|
agentId?: string;
|
|
1447
1463
|
sinceHours?: number;
|
|
1448
1464
|
errorsOnly?: boolean;
|
|
1449
1465
|
limit?: number;
|
|
1450
1466
|
}): Promise<{
|
|
1467
|
+
sinceHours: number;
|
|
1468
|
+
window: {
|
|
1469
|
+
sinceMs: number;
|
|
1470
|
+
};
|
|
1471
|
+
degraded: false | 'index' | 'error';
|
|
1451
1472
|
traces: RecentTrace[];
|
|
1452
1473
|
}>;
|
|
1453
1474
|
/** Enabled platform voices for programmatic provisioning. Filter by gender /
|
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.40.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.
|
|
3
|
+
"version": "0.40.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",
|