@pouchy_ai/admin-sdk 0.2.0 → 0.4.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 +29 -0
- package/README.md +14 -1
- package/dist/index.d.ts +38 -1
- package/dist/index.js +8 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@pouchy_ai/admin-sdk` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.4.0 — 2026-07-13
|
|
6
|
+
|
|
7
|
+
Full skill-lifecycle parity — the two knobs the dashboard grew (a runaway
|
|
8
|
+
guard + the prose→tools upgrade) are now typed on the client:
|
|
9
|
+
|
|
10
|
+
- **`setSkillDailyCap(slug, maxCallsPerDay)`** — the opt-in daily call ceiling
|
|
11
|
+
(`PATCH /v1/admin/skills/{slug}` with `{ maxCallsPerDay }`, 1..20000, null to
|
|
12
|
+
clear): max HTTP calls per rolling 24h for a skill, a runaway guard for
|
|
13
|
+
autonomous outbound the per-minute cap doesn't cover. Returns `reprovisioned`.
|
|
14
|
+
- **`compileSkill(slug)`** — compile a docs-only skill's prose into declared
|
|
15
|
+
`http` tools (`POST /v1/admin/skills/{slug}/compile`): a one-shot LLM proposes
|
|
16
|
+
tools bound to the skill's allowlist, re-installed (reversible via rollback).
|
|
17
|
+
Returns `{ skill, toolNames, warnings }`.
|
|
18
|
+
- (Also fixes the `ADMIN_SDK_VERSION` constant, which had drifted to `0.2.0`.)
|
|
19
|
+
|
|
20
|
+
## 0.3.0 — 2026-07-13
|
|
21
|
+
|
|
22
|
+
Skill-config parity — a docs-only skill (no `tools:` block) can now be
|
|
23
|
+
installed AND armed entirely via the API, no dashboard step:
|
|
24
|
+
|
|
25
|
+
- **`grantSkill(slug, { freeHttp, grantedDomains? })`** — the free-HTTP grant
|
|
26
|
+
(`PATCH /v1/admin/skills/{slug}`): let the agent drive a skill's API from its
|
|
27
|
+
prose body via `http_request`, bounded to the manifest's `allowed_domains` ∪
|
|
28
|
+
`grantedDomains`. The new def is re-pushed to running instances; the result's
|
|
29
|
+
`reprovisioned` reports how many picked it up. Full flow: `installSkill` →
|
|
30
|
+
`updateAgent(id, { skills: [...] })` → `grantSkill`.
|
|
31
|
+
- **`setSkillRate(slug, ratePerMin)`** — typed convenience over `updateSkill`
|
|
32
|
+
for the per-minute call budget (1..120, or null to restore the default).
|
|
33
|
+
|
|
5
34
|
## 0.2.0 — 2026-07-11
|
|
6
35
|
|
|
7
36
|
Provisioning-parity release (driven by integrator feedback — programmatic
|
package/README.md
CHANGED
|
@@ -40,6 +40,19 @@ console.log(key.token); // shown ONCE
|
|
|
40
40
|
// Read this month's usage
|
|
41
41
|
const usage = await admin.getUsage();
|
|
42
42
|
console.log(usage.mau, '/', usage.mauLimit, 'MAU');
|
|
43
|
+
|
|
44
|
+
// Equip an agent with ANY skill — including a docs-only skill.md that has no
|
|
45
|
+
// `tools:` block — entirely via the API:
|
|
46
|
+
const { skill } = await admin.installSkill({
|
|
47
|
+
md: '---\nname: echo-probe\nallowed_domains:\n - postman-echo.com\n---\nGET https://postman-echo.com/get echoes the request.'
|
|
48
|
+
});
|
|
49
|
+
await admin.updateAgent(agent.agentId, { skills: [skill.slug] }); // attach to the agent
|
|
50
|
+
const armed = await admin.grantSkill(skill.slug, {
|
|
51
|
+
freeHttp: true,
|
|
52
|
+
grantedDomains: ['postman-echo.com'] // unioned with the manifest's allowed_domains
|
|
53
|
+
});
|
|
54
|
+
console.log(`armed — ${armed.reprovisioned} running instance(s) updated`);
|
|
55
|
+
// The agent can now drive the API from the skill's prose via http_request.
|
|
43
56
|
```
|
|
44
57
|
|
|
45
58
|
## Options
|
|
@@ -74,7 +87,7 @@ try {
|
|
|
74
87
|
| Secret keys | `listKeys` · `createKey` · `revokeKey` · `rotateKey` (24 h grace) |
|
|
75
88
|
| End users | `listUsers` · `setUserSuspended` · `deleteUser` · `getUserWallet` · `getUserTraces` · `importUsers` · `exportUser` · `getUserSessions` · `getUserTurns` |
|
|
76
89
|
| Knowledge | `listKnowledge` · `ingestKnowledge` · `deleteKnowledge` |
|
|
77
|
-
| Skills | `listSkills` · `installSkill` · `updateSkill` · `uninstallSkill` |
|
|
90
|
+
| Skills | `listSkills` · `installSkill` · `updateSkill` · `setSkillRate` · `setSkillDailyCap` · `grantSkill` (free-HTTP) · `compileSkill` (prose→tools) · `uninstallSkill` |
|
|
78
91
|
| Credentials | `listCredentials` · `putCredentials` · `deleteCredentials` |
|
|
79
92
|
| Channels | `listChannels` · `createChannel` · `getChannel` · `updateChannel` · `deleteChannel` |
|
|
80
93
|
| 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.4.0";
|
|
2
2
|
export declare const DEFAULT_BASE_URL = "https://pouchy.ai/v1/admin";
|
|
3
3
|
export interface AdminClientOptions {
|
|
4
4
|
/** A project Admin key (`pchy_admin_…`) from the dashboard Admin Keys page. */
|
|
@@ -233,6 +233,43 @@ export interface AdminClient {
|
|
|
233
233
|
slug: string;
|
|
234
234
|
};
|
|
235
235
|
}>;
|
|
236
|
+
/** Set a skill's per-minute call budget (1..120; null restores the default). */
|
|
237
|
+
setSkillRate(slug: string, ratePerMin: number | null): Promise<{
|
|
238
|
+
ratePerMin: number | null;
|
|
239
|
+
}>;
|
|
240
|
+
/** Set a skill's opt-in daily call ceiling — max HTTP calls per rolling 24h
|
|
241
|
+
* (1..20000; null clears it, leaving only the per-minute cap). A runaway
|
|
242
|
+
* guard for autonomous outbound. Re-pushes the def to running instances. */
|
|
243
|
+
setSkillDailyCap(slug: string, maxCallsPerDay: number | null): Promise<{
|
|
244
|
+
maxCallsPerDay: number | null;
|
|
245
|
+
reprovisioned: number;
|
|
246
|
+
}>;
|
|
247
|
+
/** Compile a docs-only skill's prose (curl snippets / endpoint tables) into
|
|
248
|
+
* declared `http` tools via a one-shot LLM, then re-install the result
|
|
249
|
+
* (safety gate + version archive → reversible via rollback). Each tool is
|
|
250
|
+
* bound to the skill's allowlist; `warnings` lists any dropped by a bad host
|
|
251
|
+
* or shape. Turns a free-HTTP skill into structured `run_skill` tools. */
|
|
252
|
+
compileSkill(slug: string): Promise<{
|
|
253
|
+
skill: {
|
|
254
|
+
slug: string;
|
|
255
|
+
};
|
|
256
|
+
toolNames: string[];
|
|
257
|
+
warnings: string[];
|
|
258
|
+
}>;
|
|
259
|
+
/** Free-HTTP grant (universal import): let the agent drive this skill's API
|
|
260
|
+
* from its prose body via `http_request`, bounded to the manifest's
|
|
261
|
+
* `allowed_domains` ∪ `grantedDomains`. This is how a docs-only skill
|
|
262
|
+
* (no `tools:` block) becomes runnable — install it, attach it to an agent
|
|
263
|
+
* (`updateAgent(id, { skills: [...] })`), then grant it here. The new def is
|
|
264
|
+
* re-pushed to running instances; `reprovisioned` is how many were updated. */
|
|
265
|
+
grantSkill(slug: string, grant: {
|
|
266
|
+
freeHttp: boolean;
|
|
267
|
+
grantedDomains?: string[];
|
|
268
|
+
}): Promise<{
|
|
269
|
+
freeHttp: boolean;
|
|
270
|
+
grantedDomains: string[];
|
|
271
|
+
reprovisioned: number;
|
|
272
|
+
}>;
|
|
236
273
|
uninstallSkill(slug: string): Promise<{
|
|
237
274
|
deleted: boolean;
|
|
238
275
|
}>;
|
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.4.0';
|
|
12
12
|
export const DEFAULT_BASE_URL = 'https://pouchy.ai/v1/admin';
|
|
13
13
|
/** Thrown on any non-2xx response. `status` is the HTTP status; `message` is the
|
|
14
14
|
* server's `error` string when present. */
|
|
@@ -74,6 +74,13 @@ export function createAdminClient(opts) {
|
|
|
74
74
|
listSkills: () => request('GET', '/skills'),
|
|
75
75
|
installSkill: (input) => request('POST', '/skills', input),
|
|
76
76
|
updateSkill: (slug, patch) => request('PATCH', `/skills/${encodeURIComponent(slug)}`, patch),
|
|
77
|
+
setSkillRate: (slug, ratePerMin) => request('PATCH', `/skills/${encodeURIComponent(slug)}`, { ratePerMin }),
|
|
78
|
+
setSkillDailyCap: (slug, maxCallsPerDay) => request('PATCH', `/skills/${encodeURIComponent(slug)}`, { maxCallsPerDay }),
|
|
79
|
+
compileSkill: (slug) => request('POST', `/skills/${encodeURIComponent(slug)}/compile`, {}),
|
|
80
|
+
grantSkill: (slug, grant) => request('PATCH', `/skills/${encodeURIComponent(slug)}`, {
|
|
81
|
+
freeHttp: grant.freeHttp,
|
|
82
|
+
grantedDomains: grant.grantedDomains ?? []
|
|
83
|
+
}),
|
|
77
84
|
uninstallSkill: (slug) => request('DELETE', `/skills/${encodeURIComponent(slug)}`),
|
|
78
85
|
listCredentials: () => request('GET', '/credentials'),
|
|
79
86
|
putCredentials: (input) => request('POST', '/credentials', input),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pouchy_ai/admin-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Typed TypeScript client for the Pouchy Admin API — 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",
|