@pouchy_ai/admin-sdk 0.41.0 → 0.42.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,19 @@
2
2
 
3
3
  All notable changes to `@pouchy_ai/admin-sdk` are documented here.
4
4
 
5
+ ## 0.42.0 — 2026-10-08
6
+
7
+ - **`getRecentTraces({ from, to })`: a custom window by UTC day** (admin API
8
+ 1.19.0). The run browser could only look back from now (`sinceHours`); a
9
+ window that ends in the past (last Tuesday's failures) had no expression.
10
+ `from` / `to` are inclusive UTC days, given together, within the 30-day trace
11
+ retention — older is a 400, never an empty list that reads as "no runs".
12
+ `window.untilMs` (exclusive) is typed and present on such a window.
13
+ `sinceHours` alone behaves as before. Additive.
14
+ - **`getUsageHistory()` rows carry `credits`** — the credits charged that
15
+ month (the pooled account figure on `scope: 'account'`), typed as optional
16
+ because an older server does not send it.
17
+
5
18
  ## 0.41.0 — 2026-10-02
6
19
 
7
20
  - **Three world session-mint codes join `ADMIN_ERROR_CODES`.** `POST
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const ADMIN_SDK_VERSION = "0.41.0";
1
+ export declare const ADMIN_SDK_VERSION = "0.42.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
@@ -373,6 +373,9 @@ export interface MonthUsageHistoryEntry {
373
373
  mau: number;
374
374
  mauTest: number;
375
375
  sessions: number;
376
+ /** 0.42.0 (admin API 1.19.0): credits charged that month. Absent from an
377
+ * older server. */
378
+ credits?: number;
376
379
  [k: string]: unknown;
377
380
  }
378
381
  export interface AuditRow {
@@ -1461,12 +1464,21 @@ export interface AdminClient {
1461
1464
  getRecentTraces(params?: {
1462
1465
  agentId?: string;
1463
1466
  sinceHours?: number;
1467
+ /** 0.42.0 (admin API 1.19.0): a custom window by UTC day, inclusive,
1468
+ * both required together. Run traces are kept 30 days, so `from` must
1469
+ * fall within the last 30 UTC days — older is a 400, not an empty list.
1470
+ * `sinceHours` is ignored when these are given. */
1471
+ from?: string;
1472
+ to?: string;
1464
1473
  errorsOnly?: boolean;
1465
1474
  limit?: number;
1466
1475
  }): Promise<{
1467
1476
  sinceHours: number;
1477
+ /** `untilMs` (exclusive) is present only on a custom window ending
1478
+ * before now. */
1468
1479
  window: {
1469
1480
  sinceMs: number;
1481
+ untilMs?: number;
1470
1482
  };
1471
1483
  degraded: false | 'index' | 'error';
1472
1484
  traces: RecentTrace[];
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.41.0';
11
+ export const ADMIN_SDK_VERSION = '0.42.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.41.0",
3
+ "version": "0.42.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",