@pouchy_ai/admin-sdk 0.16.0 → 0.16.1
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 +24 -0
- package/dist/index.d.ts +16 -7
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@pouchy_ai/admin-sdk` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.16.1 — 2026-08-06
|
|
6
|
+
|
|
7
|
+
Documentation only — no type, signature or runtime change. Two doc comments
|
|
8
|
+
were describing a contract the server does not have.
|
|
9
|
+
|
|
10
|
+
- **`updateSkill` said the response echoes "the knob(s) you changed".** It is
|
|
11
|
+
one knob per call. `PATCH /skills/{slug}` disambiguates by payload, so a
|
|
12
|
+
patch naming two groups — `{ ratePerMin, maxCallsPerDay }` — used to perform
|
|
13
|
+
whichever the server checked first and silently drop the rest under a `200`.
|
|
14
|
+
The plural in this package's own doc invited exactly that call. The server
|
|
15
|
+
now refuses an ambiguous body with a `400` naming the groups it found, and
|
|
16
|
+
the doc states the rule. `{ freeHttp, grantedDomains }` remains ONE knob (a
|
|
17
|
+
single write), not two.
|
|
18
|
+
|
|
19
|
+
The typed conveniences (`setSkillRate`, `setSkillDailyCap`, `grantSkill`)
|
|
20
|
+
were never affected — each sends exactly one knob by construction. Only a
|
|
21
|
+
hand-built `updateSkill` patch could reach it.
|
|
22
|
+
|
|
23
|
+
- **`grantSkill` is a full REPLACE and did not say so.** `grantedDomains` is
|
|
24
|
+
optional in the signature, which reads as "leave it alone"; it is sent as
|
|
25
|
+
`[]` when omitted, clearing the extra allowlist. Pass the domains you want to
|
|
26
|
+
end up with on every call. (The manifest's own `allowed_domains` is a
|
|
27
|
+
separate list and is never touched by this call.)
|
|
28
|
+
|
|
5
29
|
## 0.16.0 — 2026-08-06
|
|
6
30
|
|
|
7
31
|
- **Catches the package up to a server change that already shipped.**
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ADMIN_SDK_VERSION = "0.16.
|
|
1
|
+
export declare const ADMIN_SDK_VERSION = "0.16.1";
|
|
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
|
|
@@ -671,11 +671,15 @@ export interface AdminClient {
|
|
|
671
671
|
version: number;
|
|
672
672
|
};
|
|
673
673
|
}>;
|
|
674
|
-
/** Generic PATCH of a skill's knobs.
|
|
675
|
-
*
|
|
676
|
-
*
|
|
677
|
-
*
|
|
678
|
-
*
|
|
674
|
+
/** Generic PATCH of a skill's knobs. **Exactly ONE knob per call** — the
|
|
675
|
+
* endpoint disambiguates by payload, so a patch naming two (say
|
|
676
|
+
* `{ ratePerMin, maxCallsPerDay }`) is refused with 400 rather than
|
|
677
|
+
* half-applied. `{ freeHttp, grantedDomains }` is one knob, not two: the
|
|
678
|
+
* grant is a single write. The response echoes the knob you changed plus
|
|
679
|
+
* the re-push outcome every knob carries (`reprovisioned`, `truncated`).
|
|
680
|
+
* Prefer the typed conveniences (setSkillRate / setSkillDailyCap /
|
|
681
|
+
* grantSkill) — they are one knob each by construction and give a precise
|
|
682
|
+
* return type. */
|
|
679
683
|
updateSkill(slug: string, patch: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
680
684
|
/** Set a skill's per-minute call budget (1..120; null restores the default).
|
|
681
685
|
* Re-pushes the def to running instances — the limiter reads the budget off
|
|
@@ -708,7 +712,12 @@ export interface AdminClient {
|
|
|
708
712
|
* `allowed_domains` ∪ `grantedDomains`. This is how a docs-only skill
|
|
709
713
|
* (no `tools:` block) becomes runnable — install it, attach it to an agent
|
|
710
714
|
* (`updateAgent(id, { skills: [...] })`), then grant it here. The new def is
|
|
711
|
-
* re-pushed to running instances; `reprovisioned` is how many were updated.
|
|
715
|
+
* re-pushed to running instances; `reprovisioned` is how many were updated.
|
|
716
|
+
*
|
|
717
|
+
* This is a full REPLACE of the grant, not a merge: omitting
|
|
718
|
+
* `grantedDomains` sends `[]` and clears the extra allowlist (the manifest's
|
|
719
|
+
* own `allowed_domains` is unaffected). Pass the domains you want to end up
|
|
720
|
+
* with on every call. */
|
|
712
721
|
grantSkill(slug: string, grant: {
|
|
713
722
|
freeHttp: boolean;
|
|
714
723
|
grantedDomains?: string[];
|
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.16.
|
|
11
|
+
export const ADMIN_SDK_VERSION = '0.16.1';
|
|
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.16.
|
|
3
|
+
"version": "0.16.1",
|
|
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",
|