@pouchy_ai/admin-sdk 0.27.1 → 0.29.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 +35 -0
- package/README.md +3 -2
- package/dist/index.d.ts +36 -6
- package/dist/index.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@pouchy_ai/admin-sdk` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.29.0 — 2026-08-31
|
|
6
|
+
|
|
7
|
+
- **`setSkillAutoRunTools(slug, toolNames)` — the per-tool confirm exemptions
|
|
8
|
+
(免确认工具) the Admin API could not reach.** Admin API 1.12.0. The knob
|
|
9
|
+
existed on the owner plane and in the dashboard since 2026-08 and was never
|
|
10
|
+
added here, so a headless provisioning flow could install a skill, rate-limit
|
|
11
|
+
it, grant its domains and attach it to an agent — and then answer nothing.
|
|
12
|
+
For MCP skills that is not an edge case: `mcpRecord` hard-codes
|
|
13
|
+
`platformSafe: false`, so every `run_skill` raises a confirm, and a platform
|
|
14
|
+
instance has no human who could ever approve one. This was the only route out.
|
|
15
|
+
|
|
16
|
+
A full REPLACE, not a merge — pass the complete list each call. Names the
|
|
17
|
+
skill does not declare are dropped and echoed in `dropped`, so a typo is
|
|
18
|
+
visible rather than silently ungranted. Grant the READ tools (a storefront's
|
|
19
|
+
`search_catalog` / `get_product`); leave cart mutations and order placement
|
|
20
|
+
gated.
|
|
21
|
+
|
|
22
|
+
Opening this to a long-lived admin key was an explicit decision, not a
|
|
23
|
+
symmetry fix: the confirm being waived is not a human in the loop (on an
|
|
24
|
+
instance nobody can approve it), and the same key already grants the strictly
|
|
25
|
+
wider `freeHttp` + `grantedDomains`.
|
|
26
|
+
|
|
27
|
+
## 0.28.0 — 2026-08-29
|
|
28
|
+
|
|
29
|
+
- **`installSkill` / `importAgentPlugin` now type the re-push outcome.** Both
|
|
30
|
+
installs re-push the new def to running instances (a RE-install/RE-import
|
|
31
|
+
takes effect now, not on the next persona edit — server change 2026-08-29;
|
|
32
|
+
Admin API 1.11.0), and both results now carry `reprovisioned` /
|
|
33
|
+
`truncated`, same semantics as the skill-knob calls: `truncated: true`
|
|
34
|
+
means the sweep hit a cap (100 agents / 200 instances) and the remainder
|
|
35
|
+
keep the OLD def until a persona edit. `installSkill` also gains the
|
|
36
|
+
`warnings?: string[]` the server always sent (e.g. skipped OpenAPI
|
|
37
|
+
operations). Types only — no runtime change; existing destructuring keeps
|
|
38
|
+
working.
|
|
39
|
+
|
|
5
40
|
## 0.27.1 — 2026-08-28
|
|
6
41
|
|
|
7
42
|
- **Docs-only, but read it if you use `encodingFormat: 'base64'`.** The 0.27.0
|
package/README.md
CHANGED
|
@@ -243,7 +243,8 @@ that voice, or the voice catalog is temporarily unreachable; retry),
|
|
|
243
243
|
like the other voice planes — there is no separate platform credit rate; it is
|
|
244
244
|
bounded by an input cap and the shared per-IP utility rate limit.
|
|
245
245
|
|
|
246
|
-
Every skill knob (`setSkillRate`, `setSkillDailyCap`, `grantSkill
|
|
246
|
+
Every skill knob (`setSkillRate`, `setSkillDailyCap`, `grantSkill`,
|
|
247
|
+
`setSkillAutoRunTools`) returns
|
|
247
248
|
`SkillKnobResult<T>` — the knob you set plus `reprovisioned` (instances the new
|
|
248
249
|
def reached) and `truncated`. A knob only binds a running agent once the def
|
|
249
250
|
reaches its instance, so `truncated: true` means the sweep hit its cap (100
|
|
@@ -436,7 +437,7 @@ Reads (`GET`) are not covered by that bucket. `retryAfter` is available from
|
|
|
436
437
|
| Secret keys | `listKeys` · `createKey` · `revokeKey` · `rotateKey` (24 h grace) |
|
|
437
438
|
| End users | `listUsers({ limit?, cursor? })` (cursor-paginated — the response's `nextCursor` feeds the next page; filter variants: `external_user_id` / `external_user_prefix`) · `setUserSuspended` · `deleteUser` · `getUserWallet` · `getUserTraces` · `importUsers` · `exportUser` · `getUserSessions` · `getUserTurns` |
|
|
438
439
|
| Knowledge | `listKnowledge` · `ingestKnowledge` · `ingestKnowledgeFile` (PDF/audio/video/image) · `ingestKnowledgeUrl` (web page) · `searchKnowledge` (recall probe) · `deleteKnowledge` |
|
|
439
|
-
| Skills | `listSkills` · `installSkill` · `updateSkill` · `setSkillRate` · `setSkillDailyCap` · `grantSkill` (free-HTTP) · `compileSkill` (prose→tools) · `uninstallSkill` · `importAgentPlugin` / `exportAgentPlugin` (Agent Plugins 1.0.0 interop) |
|
|
440
|
+
| Skills | `listSkills` · `installSkill` · `updateSkill` · `setSkillRate` · `setSkillDailyCap` · `grantSkill` (free-HTTP) · `setSkillAutoRunTools` (免确认工具 — required to arm an MCP skill on an instance) · `compileSkill` (prose→tools) · `uninstallSkill` · `importAgentPlugin` / `exportAgentPlugin` (Agent Plugins 1.0.0 interop) |
|
|
440
441
|
| Credentials | `listCredentials` · `putCredentials` · `deleteCredentials` |
|
|
441
442
|
| Channels | `listChannels` · `createChannel` · `getChannel` · `updateChannel` · `deleteChannel` |
|
|
442
443
|
| Schedules | `listSchedules` · `createSchedule` · `getSchedule` · `updateSchedule` · `deleteSchedule` |
|
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.29.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
|
|
@@ -813,6 +813,13 @@ export interface AdminClient {
|
|
|
813
813
|
listSkills(): Promise<{
|
|
814
814
|
skills: unknown[];
|
|
815
815
|
}>;
|
|
816
|
+
/** Install (or RE-install — same slug, next version) a custom skill. The
|
|
817
|
+
* new def is re-pushed to running instances in one bounded sweep, so a
|
|
818
|
+
* re-import takes effect now rather than on the next persona edit; the
|
|
819
|
+
* result carries the same `reprovisioned` / `truncated` outcome as the
|
|
820
|
+
* skill-knob calls (`truncated: true` = the sweep hit a cap and the
|
|
821
|
+
* remainder keep the OLD def until a persona edit — see SkillKnobResult).
|
|
822
|
+
* `warnings` lists non-fatal drops (e.g. skipped OpenAPI operations). */
|
|
816
823
|
installSkill(input: {
|
|
817
824
|
md?: string;
|
|
818
825
|
url?: string;
|
|
@@ -820,12 +827,13 @@ export interface AdminClient {
|
|
|
820
827
|
openapi?: string;
|
|
821
828
|
openapiUrl?: string;
|
|
822
829
|
slug?: string;
|
|
823
|
-
}): Promise<{
|
|
830
|
+
}): Promise<SkillKnobResult<{
|
|
824
831
|
skill: {
|
|
825
832
|
slug: string;
|
|
826
833
|
version: number;
|
|
827
834
|
};
|
|
828
|
-
|
|
835
|
+
warnings?: string[];
|
|
836
|
+
}>>;
|
|
829
837
|
/** Generic PATCH of a skill's knobs. **Exactly ONE knob per call** — the
|
|
830
838
|
* endpoint disambiguates by payload, so a patch naming two (say
|
|
831
839
|
* `{ ratePerMin, maxCallsPerDay }`) is refused with 400 rather than
|
|
@@ -880,6 +888,25 @@ export interface AdminClient {
|
|
|
880
888
|
freeHttp: boolean;
|
|
881
889
|
grantedDomains: string[];
|
|
882
890
|
}>>;
|
|
891
|
+
/** Per-tool confirm exemptions (免确认工具) — the tools an INSTANCE may call
|
|
892
|
+
* without a confirm card.
|
|
893
|
+
*
|
|
894
|
+
* The one knob a headless flow could not reach before 0.29.0, and for MCP
|
|
895
|
+
* skills it is not optional: `mcpRecord` hard-codes `platformSafe: false`,
|
|
896
|
+
* so every `run_skill` raises a confirm — and a platform instance has no
|
|
897
|
+
* human who could ever approve one (a synthetic uid has no Firebase user).
|
|
898
|
+
* Without this the skill installs, rate-limits and attaches cleanly and then
|
|
899
|
+
* answers nothing. Grant the READ tools (a storefront's `search_catalog` /
|
|
900
|
+
* `get_product`) and leave anything that mutates a cart or places an order
|
|
901
|
+
* gated.
|
|
902
|
+
*
|
|
903
|
+
* A full REPLACE, not a merge — pass the complete list every call. Names the
|
|
904
|
+
* skill does not declare are dropped and echoed back in `dropped`, so a typo
|
|
905
|
+
* is visible rather than silently ungranted. */
|
|
906
|
+
setSkillAutoRunTools(slug: string, toolNames: string[]): Promise<SkillKnobResult<{
|
|
907
|
+
autoRunTools: string[];
|
|
908
|
+
dropped: string[];
|
|
909
|
+
}>>;
|
|
883
910
|
uninstallSkill(slug: string): Promise<{
|
|
884
911
|
deleted: boolean;
|
|
885
912
|
}>;
|
|
@@ -895,13 +922,16 @@ export interface AdminClient {
|
|
|
895
922
|
* store credentials with `putCredentials` after install. Resolves 201
|
|
896
923
|
* when at least one component installed (`skipped`/`errors` carry the
|
|
897
924
|
* rest); a package with nothing installable rejects with a 422 naming
|
|
898
|
-
* the first per-component reason.
|
|
925
|
+
* the first per-component reason. The whole installed set is re-pushed to
|
|
926
|
+
* running instances in ONE bounded sweep (a RE-import takes effect now,
|
|
927
|
+
* not on the next persona edit) — `reprovisioned` / `truncated` report
|
|
928
|
+
* it, same semantics as the skill-knob calls. */
|
|
899
929
|
importAgentPlugin(input: {
|
|
900
930
|
files: Array<{
|
|
901
931
|
path: string;
|
|
902
932
|
content: string;
|
|
903
933
|
}>;
|
|
904
|
-
}): Promise<{
|
|
934
|
+
}): Promise<SkillKnobResult<{
|
|
905
935
|
plugin: {
|
|
906
936
|
name: string;
|
|
907
937
|
version?: string;
|
|
@@ -919,7 +949,7 @@ export interface AdminClient {
|
|
|
919
949
|
component: string;
|
|
920
950
|
error: string;
|
|
921
951
|
}>;
|
|
922
|
-
}
|
|
952
|
+
}>>;
|
|
923
953
|
/** Export one installed skill as a conformant Agent Plugins 1.0.0 package
|
|
924
954
|
* (file map — write it to a directory or zip it yourself). Portable face:
|
|
925
955
|
* SKILL.md instruction prose or an mcp.json streamable-http reference;
|
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.29.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;
|
|
@@ -266,6 +266,7 @@ export function createAdminClient(opts) {
|
|
|
266
266
|
listSkills: () => request('GET', '/skills'),
|
|
267
267
|
installSkill: (input) => request('POST', '/skills', input),
|
|
268
268
|
updateSkill: (slug, patch) => request('PATCH', `/skills/${encodeURIComponent(slug)}`, patch),
|
|
269
|
+
setSkillAutoRunTools: (slug, toolNames) => request('PATCH', `/skills/${encodeURIComponent(slug)}`, { autoRunTools: toolNames }),
|
|
269
270
|
setSkillRate: (slug, ratePerMin) => request('PATCH', `/skills/${encodeURIComponent(slug)}`, { ratePerMin }),
|
|
270
271
|
setSkillDailyCap: (slug, maxCallsPerDay) => request('PATCH', `/skills/${encodeURIComponent(slug)}`, { maxCallsPerDay }),
|
|
271
272
|
compileSkill: (slug) => request('POST', `/skills/${encodeURIComponent(slug)}/compile`, {}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pouchy_ai/admin-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.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",
|