@pouchy_ai/admin-sdk 0.2.0 → 0.3.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 +14 -0
- package/README.md +14 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.js +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@pouchy_ai/admin-sdk` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.3.0 — 2026-07-13
|
|
6
|
+
|
|
7
|
+
Skill-config parity — a docs-only skill (no `tools:` block) can now be
|
|
8
|
+
installed AND armed entirely via the API, no dashboard step:
|
|
9
|
+
|
|
10
|
+
- **`grantSkill(slug, { freeHttp, grantedDomains? })`** — the free-HTTP grant
|
|
11
|
+
(`PATCH /v1/admin/skills/{slug}`): let the agent drive a skill's API from its
|
|
12
|
+
prose body via `http_request`, bounded to the manifest's `allowed_domains` ∪
|
|
13
|
+
`grantedDomains`. The new def is re-pushed to running instances; the result's
|
|
14
|
+
`reprovisioned` reports how many picked it up. Full flow: `installSkill` →
|
|
15
|
+
`updateAgent(id, { skills: [...] })` → `grantSkill`.
|
|
16
|
+
- **`setSkillRate(slug, ratePerMin)`** — typed convenience over `updateSkill`
|
|
17
|
+
for the per-minute call budget (1..120, or null to restore the default).
|
|
18
|
+
|
|
5
19
|
## 0.2.0 — 2026-07-11
|
|
6
20
|
|
|
7
21
|
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` · `grantSkill` (free-HTTP) · `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
|
@@ -233,6 +233,24 @@ 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
|
+
/** Free-HTTP grant (universal import): let the agent drive this skill's API
|
|
241
|
+
* from its prose body via `http_request`, bounded to the manifest's
|
|
242
|
+
* `allowed_domains` ∪ `grantedDomains`. This is how a docs-only skill
|
|
243
|
+
* (no `tools:` block) becomes runnable — install it, attach it to an agent
|
|
244
|
+
* (`updateAgent(id, { skills: [...] })`), then grant it here. The new def is
|
|
245
|
+
* re-pushed to running instances; `reprovisioned` is how many were updated. */
|
|
246
|
+
grantSkill(slug: string, grant: {
|
|
247
|
+
freeHttp: boolean;
|
|
248
|
+
grantedDomains?: string[];
|
|
249
|
+
}): Promise<{
|
|
250
|
+
freeHttp: boolean;
|
|
251
|
+
grantedDomains: string[];
|
|
252
|
+
reprovisioned: number;
|
|
253
|
+
}>;
|
|
236
254
|
uninstallSkill(slug: string): Promise<{
|
|
237
255
|
deleted: boolean;
|
|
238
256
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -74,6 +74,11 @@ 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
|
+
grantSkill: (slug, grant) => request('PATCH', `/skills/${encodeURIComponent(slug)}`, {
|
|
79
|
+
freeHttp: grant.freeHttp,
|
|
80
|
+
grantedDomains: grant.grantedDomains ?? []
|
|
81
|
+
}),
|
|
77
82
|
uninstallSkill: (slug) => request('DELETE', `/skills/${encodeURIComponent(slug)}`),
|
|
78
83
|
listCredentials: () => request('GET', '/credentials'),
|
|
79
84
|
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.3.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",
|