@pouchy_ai/admin-sdk 0.25.1 → 0.26.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,24 @@
2
2
 
3
3
  All notable changes to `@pouchy_ai/admin-sdk` are documented here.
4
4
 
5
+ ## 0.26.0 — 2026-08-09
6
+
7
+ - **New methods `importAgentPlugin` / `exportAgentPlugin`** (additive; nothing
8
+ renamed or removed): interop with the cross-vendor **Agent Plugins 1.0.0**
9
+ packaging standard (agent-plugins.org). Import takes the plugin as an
10
+ explicit file map — `skills/<dir>/SKILL.md` installs as a docs-only skill,
11
+ `mcp.json` streamable-http servers connect through the MCP path (stdio/sse
12
+ are skipped per component; the platform is serverless), and a
13
+ Pouchy-exported plugin's `extensions["ai.pouchy"]` manifest round-trips
14
+ losslessly. Every component runs the same install safety judge as the
15
+ native install paths, and declared mcp `headers` are never forwarded
16
+ (store credentials with `putCredentials` instead — the spec itself calls
17
+ headers visible package data). Export composes a conformant package for any
18
+ installed skill: SKILL.md prose or an mcp.json reference as the portable
19
+ face, the full Pouchy manifest under `extensions["ai.pouchy"]` as the
20
+ lossless face. Per-component failures are non-fatal (201 with
21
+ `installed`/`skipped`/`errors`; 422 only when nothing was installable).
22
+
5
23
  ## 0.25.1 — 2026-08-09
6
24
 
7
25
  - **Docs-only: the README's 409 vocabulary table gains the `one_shot_spent`
package/README.md CHANGED
@@ -192,6 +192,51 @@ agents / 200 instances) and the remainder still hold the **old** def; they do
192
192
  not catch up on their next session. Treat a *revoking* call that returns
193
193
  `truncated: true` as a partial revocation and re-issue it.
194
194
 
195
+ ### Agent Plugins (agent-plugins.org) — import & export
196
+
197
+ Pouchy consumes and emits the cross-vendor **Agent Plugins 1.0.0** packaging
198
+ standard. Import takes the plugin as an explicit file map (read the directory
199
+ yourself — no archive upload): `skills/<dir>/SKILL.md` installs as a docs-only
200
+ skill, `mcp.json` `streamable-http` servers connect through the MCP path, and
201
+ a Pouchy-exported plugin round-trips losslessly via its
202
+ `extensions["ai.pouchy"]` manifest. `stdio`/`sse` transports and bundled
203
+ script files are skipped per component with a reason (the platform is
204
+ serverless — the spec requires clients to support only one transport).
205
+ Declared mcp `headers` are **never forwarded** — the spec itself calls them
206
+ visible package data; store real credentials with `putCredentials` after
207
+ install. Every imported component runs the same install safety judge as the
208
+ native install paths.
209
+
210
+ ```ts
211
+ import { createAdminClient } from '@pouchy_ai/admin-sdk';
212
+
213
+ const admin = createAdminClient({ adminKey: process.env.POUCHY_ADMIN_KEY! });
214
+
215
+ // The plugin travels as an explicit { path, content } file map — read the
216
+ // plugin directory with your runtime's fs and preserve relative POSIX paths.
217
+ const result = await admin.importAgentPlugin({
218
+ files: [
219
+ {
220
+ path: 'plugin.json',
221
+ content: JSON.stringify({
222
+ $schema: 'https://agent-plugins.org/schemas/1.0.0/plugin.schema.json',
223
+ name: 'hello-plugin'
224
+ })
225
+ },
226
+ {
227
+ path: 'skills/greet/SKILL.md',
228
+ content: '---\nname: greet\ndescription: Greet the user and offer help.\n---\n\nGreet the user warmly.\n'
229
+ }
230
+ ]
231
+ });
232
+ console.log(result.installed); // [{ slug: 'greet', kind: 'http', component: 'skills/greet' }]
233
+ for (const s of result.skipped) console.warn(`${s.component}: ${s.reason}`);
234
+
235
+ // Export any installed skill as a conformant plugin (write it out / zip it).
236
+ const pkg = await admin.exportAgentPlugin('greet');
237
+ for (const f of pkg.files) console.log(f.path, f.content.length);
238
+ ```
239
+
195
240
  ## Options
196
241
 
197
242
  ```ts
@@ -332,7 +377,7 @@ Reads (`GET`) are not covered by that bucket. `retryAfter` is available from
332
377
  | Secret keys | `listKeys` · `createKey` · `revokeKey` · `rotateKey` (24 h grace) |
333
378
  | 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
379
  | 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` |
380
+ | Skills | `listSkills` · `installSkill` · `updateSkill` · `setSkillRate` · `setSkillDailyCap` · `grantSkill` (free-HTTP) · `compileSkill` (prose→tools) · `uninstallSkill` · `importAgentPlugin` / `exportAgentPlugin` (Agent Plugins 1.0.0 interop) |
336
381
  | Credentials | `listCredentials` · `putCredentials` · `deleteCredentials` |
337
382
  | Channels | `listChannels` · `createChannel` · `getChannel` · `updateChannel` · `deleteChannel` |
338
383
  | Schedules | `listSchedules` · `createSchedule` · `getSchedule` · `updateSchedule` · `deleteSchedule` |
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const ADMIN_SDK_VERSION = "0.25.1";
1
+ export declare const ADMIN_SDK_VERSION = "0.26.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
@@ -828,6 +828,56 @@ export interface AdminClient {
828
828
  uninstallSkill(slug: string): Promise<{
829
829
  deleted: boolean;
830
830
  }>;
831
+ /** Import an Agent Plugins 1.0.0 package (agent-plugins.org — the
832
+ * cross-vendor plugin packaging standard) as custom skills. Pass the
833
+ * plugin as an explicit file map (read the directory yourself; no archive
834
+ * upload). `skills/<dir>/SKILL.md` installs as a docs-only skill,
835
+ * `mcp.json` streamable-http servers connect through the MCP path
836
+ * (stdio/sse are skipped per component — the platform is serverless), and
837
+ * a Pouchy-exported plugin's `extensions["ai.pouchy"]` manifest
838
+ * round-trips losslessly. Every component runs the same install safety
839
+ * judge as the native paths; declared mcp `headers` are never forwarded —
840
+ * store credentials with `putCredentials` after install. Resolves 201
841
+ * when at least one component installed (`skipped`/`errors` carry the
842
+ * rest); a package with nothing installable rejects with a 422 naming
843
+ * the first per-component reason. */
844
+ importAgentPlugin(input: {
845
+ files: Array<{
846
+ path: string;
847
+ content: string;
848
+ }>;
849
+ }): Promise<{
850
+ plugin: {
851
+ name: string;
852
+ version?: string;
853
+ };
854
+ installed: Array<{
855
+ slug: string;
856
+ kind: string;
857
+ component: string;
858
+ }>;
859
+ skipped: Array<{
860
+ component: string;
861
+ reason: string;
862
+ }>;
863
+ errors: Array<{
864
+ component: string;
865
+ error: string;
866
+ }>;
867
+ }>;
868
+ /** Export one installed skill as a conformant Agent Plugins 1.0.0 package
869
+ * (file map — write it to a directory or zip it yourself). Portable face:
870
+ * SKILL.md instruction prose or an mcp.json streamable-http reference;
871
+ * lossless face: the full Pouchy manifest under plugin.json
872
+ * `extensions["ai.pouchy"]` (a Pouchy re-import round-trips exactly —
873
+ * other conformant clients ignore the namespace). Credential values never
874
+ * leave the vault. */
875
+ exportAgentPlugin(slug: string): Promise<{
876
+ files: Array<{
877
+ path: string;
878
+ content: string;
879
+ }>;
880
+ }>;
831
881
  /** Secret-free vault metadata: `enabled` says whether the deployment has a
832
882
  * vault at all; `skills` lists which skill slugs hold credentials (values
833
883
  * 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.25.1';
11
+ export const ADMIN_SDK_VERSION = '0.26.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;
@@ -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.25.1",
3
+ "version": "0.26.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",