@pouchy_ai/admin-sdk 0.25.1 → 0.26.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 +34 -0
- package/README.md +52 -4
- package/dist/index.d.ts +57 -4
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,40 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@pouchy_ai/admin-sdk` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.26.1 — 2026-08-09
|
|
6
|
+
|
|
7
|
+
- **Docs-only.** No type, method or signature moves. `extractJson`'s failure
|
|
8
|
+
table now says which arm each 400 can come from: `schema_invalid` is
|
|
9
|
+
reachable only on a **strict** call, because `strict: false` sends
|
|
10
|
+
`{type:'json_object'}` and the schema never reaches the wire. A provider
|
|
11
|
+
rejection of a schema-less call — JSON mode refusing a custom `system`
|
|
12
|
+
prompt that never contains the word "json" is the common one — is
|
|
13
|
+
`request_invalid`, the code that already meant "the provider rejected the
|
|
14
|
+
request itself". Server-side change; both codes are 400 and neither is
|
|
15
|
+
retryable, so no client logic that branches on retry direction is affected.
|
|
16
|
+
- `schemaName: ''` is accepted again as "unset" (it falls back to the
|
|
17
|
+
documented `extraction` default). The 0.24.x-era identifier-grammar check
|
|
18
|
+
400'd it with a charset message that named characters the empty string does
|
|
19
|
+
not have.
|
|
20
|
+
|
|
21
|
+
## 0.26.0 — 2026-08-09
|
|
22
|
+
|
|
23
|
+
- **New methods `importAgentPlugin` / `exportAgentPlugin`** (additive; nothing
|
|
24
|
+
renamed or removed): interop with the cross-vendor **Agent Plugins 1.0.0**
|
|
25
|
+
packaging standard (agent-plugins.org). Import takes the plugin as an
|
|
26
|
+
explicit file map — `skills/<dir>/SKILL.md` installs as a docs-only skill,
|
|
27
|
+
`mcp.json` streamable-http servers connect through the MCP path (stdio/sse
|
|
28
|
+
are skipped per component; the platform is serverless), and a
|
|
29
|
+
Pouchy-exported plugin's `extensions["ai.pouchy"]` manifest round-trips
|
|
30
|
+
losslessly. Every component runs the same install safety judge as the
|
|
31
|
+
native install paths, and declared mcp `headers` are never forwarded
|
|
32
|
+
(store credentials with `putCredentials` instead — the spec itself calls
|
|
33
|
+
headers visible package data). Export composes a conformant package for any
|
|
34
|
+
installed skill: SKILL.md prose or an mcp.json reference as the portable
|
|
35
|
+
face, the full Pouchy manifest under `extensions["ai.pouchy"]` as the
|
|
36
|
+
lossless face. Per-component failures are non-fatal (201 with
|
|
37
|
+
`installed`/`skipped`/`errors`; 422 only when nothing was installable).
|
|
38
|
+
|
|
5
39
|
## 0.25.1 — 2026-08-09
|
|
6
40
|
|
|
7
41
|
- **Docs-only: the README's 409 vocabulary table gains the `one_shot_spent`
|
package/README.md
CHANGED
|
@@ -147,9 +147,12 @@ const { data } = await admin.extractJson<{ items: { kind: string; summary: strin
|
|
|
147
147
|
```
|
|
148
148
|
|
|
149
149
|
Failures are typed rather than prose, so the recoveries are distinguishable:
|
|
150
|
-
`schema_invalid` (400 — fix the schema; retrying verbatim cannot help
|
|
151
|
-
|
|
152
|
-
`
|
|
150
|
+
`schema_invalid` (400 — fix the schema; retrying verbatim cannot help; only
|
|
151
|
+
reachable on a **strict** call, since `strict: false` never puts a schema on the
|
|
152
|
+
wire), `request_invalid` (400 — the provider rejected the request itself: an
|
|
153
|
+
unknown `model`, a parameter outside the provider's validation, or any rejection
|
|
154
|
+
of a schema-less `strict: false` call — for example JSON mode refusing a custom
|
|
155
|
+
`system` prompt that never says "json"; fix the request),
|
|
153
156
|
`unavailable` (5xx — transient, back off), and `invalid_json` (502 — a
|
|
154
157
|
completion arrived but did not parse or satisfy the schema; the error carries
|
|
155
158
|
`raw`, the text actually returned). Tokens roll into the project's month usage
|
|
@@ -192,6 +195,51 @@ agents / 200 instances) and the remainder still hold the **old** def; they do
|
|
|
192
195
|
not catch up on their next session. Treat a *revoking* call that returns
|
|
193
196
|
`truncated: true` as a partial revocation and re-issue it.
|
|
194
197
|
|
|
198
|
+
### Agent Plugins (agent-plugins.org) — import & export
|
|
199
|
+
|
|
200
|
+
Pouchy consumes and emits the cross-vendor **Agent Plugins 1.0.0** packaging
|
|
201
|
+
standard. Import takes the plugin as an explicit file map (read the directory
|
|
202
|
+
yourself — no archive upload): `skills/<dir>/SKILL.md` installs as a docs-only
|
|
203
|
+
skill, `mcp.json` `streamable-http` servers connect through the MCP path, and
|
|
204
|
+
a Pouchy-exported plugin round-trips losslessly via its
|
|
205
|
+
`extensions["ai.pouchy"]` manifest. `stdio`/`sse` transports and bundled
|
|
206
|
+
script files are skipped per component with a reason (the platform is
|
|
207
|
+
serverless — the spec requires clients to support only one transport).
|
|
208
|
+
Declared mcp `headers` are **never forwarded** — the spec itself calls them
|
|
209
|
+
visible package data; store real credentials with `putCredentials` after
|
|
210
|
+
install. Every imported component runs the same install safety judge as the
|
|
211
|
+
native install paths.
|
|
212
|
+
|
|
213
|
+
```ts
|
|
214
|
+
import { createAdminClient } from '@pouchy_ai/admin-sdk';
|
|
215
|
+
|
|
216
|
+
const admin = createAdminClient({ adminKey: process.env.POUCHY_ADMIN_KEY! });
|
|
217
|
+
|
|
218
|
+
// The plugin travels as an explicit { path, content } file map — read the
|
|
219
|
+
// plugin directory with your runtime's fs and preserve relative POSIX paths.
|
|
220
|
+
const result = await admin.importAgentPlugin({
|
|
221
|
+
files: [
|
|
222
|
+
{
|
|
223
|
+
path: 'plugin.json',
|
|
224
|
+
content: JSON.stringify({
|
|
225
|
+
$schema: 'https://agent-plugins.org/schemas/1.0.0/plugin.schema.json',
|
|
226
|
+
name: 'hello-plugin'
|
|
227
|
+
})
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
path: 'skills/greet/SKILL.md',
|
|
231
|
+
content: '---\nname: greet\ndescription: Greet the user and offer help.\n---\n\nGreet the user warmly.\n'
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
});
|
|
235
|
+
console.log(result.installed); // [{ slug: 'greet', kind: 'http', component: 'skills/greet' }]
|
|
236
|
+
for (const s of result.skipped) console.warn(`${s.component}: ${s.reason}`);
|
|
237
|
+
|
|
238
|
+
// Export any installed skill as a conformant plugin (write it out / zip it).
|
|
239
|
+
const pkg = await admin.exportAgentPlugin('greet');
|
|
240
|
+
for (const f of pkg.files) console.log(f.path, f.content.length);
|
|
241
|
+
```
|
|
242
|
+
|
|
195
243
|
## Options
|
|
196
244
|
|
|
197
245
|
```ts
|
|
@@ -332,7 +380,7 @@ Reads (`GET`) are not covered by that bucket. `retryAfter` is available from
|
|
|
332
380
|
| Secret keys | `listKeys` · `createKey` · `revokeKey` · `rotateKey` (24 h grace) |
|
|
333
381
|
| 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` |
|
|
334
382
|
| Knowledge | `listKnowledge` · `ingestKnowledge` · `ingestKnowledgeFile` (PDF/audio/video/image) · `ingestKnowledgeUrl` (web page) · `searchKnowledge` (recall probe) · `deleteKnowledge` |
|
|
335
|
-
| Skills | `listSkills` · `installSkill` · `updateSkill` · `setSkillRate` · `setSkillDailyCap` · `grantSkill` (free-HTTP) · `compileSkill` (prose→tools) · `uninstallSkill` |
|
|
383
|
+
| Skills | `listSkills` · `installSkill` · `updateSkill` · `setSkillRate` · `setSkillDailyCap` · `grantSkill` (free-HTTP) · `compileSkill` (prose→tools) · `uninstallSkill` · `importAgentPlugin` / `exportAgentPlugin` (Agent Plugins 1.0.0 interop) |
|
|
336
384
|
| Credentials | `listCredentials` · `putCredentials` · `deleteCredentials` |
|
|
337
385
|
| Channels | `listChannels` · `createChannel` · `getChannel` · `updateChannel` · `deleteChannel` |
|
|
338
386
|
| 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.26.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
|
|
@@ -678,9 +678,12 @@ export interface AdminClient {
|
|
|
678
678
|
* validation.
|
|
679
679
|
*
|
|
680
680
|
* Failures are typed rather than prose, which is the point:
|
|
681
|
-
* `schema_invalid` (400 — fix the schema, retrying verbatim cannot help
|
|
682
|
-
*
|
|
683
|
-
*
|
|
681
|
+
* `schema_invalid` (400 — fix the schema, retrying verbatim cannot help;
|
|
682
|
+
* only reachable on a STRICT call, because `strict: false` never puts a
|
|
683
|
+
* schema on the wire), `request_invalid` (400 — the provider rejected the
|
|
684
|
+
* request itself: an unknown `model`, a parameter outside the provider's
|
|
685
|
+
* validation, or any rejection of a schema-less `strict: false` call, such
|
|
686
|
+
* as JSON mode refusing a `system` prompt that never says "json";
|
|
684
687
|
* fix the request, retrying verbatim cannot help), `unavailable` (5xx —
|
|
685
688
|
* transient, back off), `invalid_json` (502 — a completion arrived but
|
|
686
689
|
* did not parse or did not satisfy the schema; the error carries `raw`,
|
|
@@ -828,6 +831,56 @@ export interface AdminClient {
|
|
|
828
831
|
uninstallSkill(slug: string): Promise<{
|
|
829
832
|
deleted: boolean;
|
|
830
833
|
}>;
|
|
834
|
+
/** Import an Agent Plugins 1.0.0 package (agent-plugins.org — the
|
|
835
|
+
* cross-vendor plugin packaging standard) as custom skills. Pass the
|
|
836
|
+
* plugin as an explicit file map (read the directory yourself; no archive
|
|
837
|
+
* upload). `skills/<dir>/SKILL.md` installs as a docs-only skill,
|
|
838
|
+
* `mcp.json` streamable-http servers connect through the MCP path
|
|
839
|
+
* (stdio/sse are skipped per component — the platform is serverless), and
|
|
840
|
+
* a Pouchy-exported plugin's `extensions["ai.pouchy"]` manifest
|
|
841
|
+
* round-trips losslessly. Every component runs the same install safety
|
|
842
|
+
* judge as the native paths; declared mcp `headers` are never forwarded —
|
|
843
|
+
* store credentials with `putCredentials` after install. Resolves 201
|
|
844
|
+
* when at least one component installed (`skipped`/`errors` carry the
|
|
845
|
+
* rest); a package with nothing installable rejects with a 422 naming
|
|
846
|
+
* the first per-component reason. */
|
|
847
|
+
importAgentPlugin(input: {
|
|
848
|
+
files: Array<{
|
|
849
|
+
path: string;
|
|
850
|
+
content: string;
|
|
851
|
+
}>;
|
|
852
|
+
}): Promise<{
|
|
853
|
+
plugin: {
|
|
854
|
+
name: string;
|
|
855
|
+
version?: string;
|
|
856
|
+
};
|
|
857
|
+
installed: Array<{
|
|
858
|
+
slug: string;
|
|
859
|
+
kind: string;
|
|
860
|
+
component: string;
|
|
861
|
+
}>;
|
|
862
|
+
skipped: Array<{
|
|
863
|
+
component: string;
|
|
864
|
+
reason: string;
|
|
865
|
+
}>;
|
|
866
|
+
errors: Array<{
|
|
867
|
+
component: string;
|
|
868
|
+
error: string;
|
|
869
|
+
}>;
|
|
870
|
+
}>;
|
|
871
|
+
/** Export one installed skill as a conformant Agent Plugins 1.0.0 package
|
|
872
|
+
* (file map — write it to a directory or zip it yourself). Portable face:
|
|
873
|
+
* SKILL.md instruction prose or an mcp.json streamable-http reference;
|
|
874
|
+
* lossless face: the full Pouchy manifest under plugin.json
|
|
875
|
+
* `extensions["ai.pouchy"]` (a Pouchy re-import round-trips exactly —
|
|
876
|
+
* other conformant clients ignore the namespace). Credential values never
|
|
877
|
+
* leave the vault. */
|
|
878
|
+
exportAgentPlugin(slug: string): Promise<{
|
|
879
|
+
files: Array<{
|
|
880
|
+
path: string;
|
|
881
|
+
content: string;
|
|
882
|
+
}>;
|
|
883
|
+
}>;
|
|
831
884
|
/** Secret-free vault metadata: `enabled` says whether the deployment has a
|
|
832
885
|
* vault at all; `skills` lists which skill slugs hold credentials (values
|
|
833
886
|
* are never returned by any endpoint). */
|
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.26.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;
|
|
@@ -263,6 +263,8 @@ export function createAdminClient(opts) {
|
|
|
263
263
|
grantedDomains: grant.grantedDomains ?? []
|
|
264
264
|
}),
|
|
265
265
|
uninstallSkill: (slug) => request('DELETE', `/skills/${encodeURIComponent(slug)}`),
|
|
266
|
+
importAgentPlugin: (input) => request('POST', '/skills/agent-plugin', input),
|
|
267
|
+
exportAgentPlugin: (slug) => request('GET', `/skills/${encodeURIComponent(slug)}/agent-plugin`),
|
|
266
268
|
listCredentials: () => request('GET', '/credentials'),
|
|
267
269
|
putCredentials: (input) => request('POST', '/credentials', input),
|
|
268
270
|
deleteCredentials: (skill) => request('DELETE', `/credentials/${encodeURIComponent(skill)}`),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pouchy_ai/admin-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.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",
|