@pouchy_ai/admin-sdk 0.3.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 +15 -0
- package/README.md +1 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
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
|
+
|
|
5
20
|
## 0.3.0 — 2026-07-13
|
|
6
21
|
|
|
7
22
|
Skill-config parity — a docs-only skill (no `tools:` block) can now be
|
package/README.md
CHANGED
|
@@ -87,7 +87,7 @@ try {
|
|
|
87
87
|
| Secret keys | `listKeys` · `createKey` · `revokeKey` · `rotateKey` (24 h grace) |
|
|
88
88
|
| End users | `listUsers` · `setUserSuspended` · `deleteUser` · `getUserWallet` · `getUserTraces` · `importUsers` · `exportUser` · `getUserSessions` · `getUserTurns` |
|
|
89
89
|
| Knowledge | `listKnowledge` · `ingestKnowledge` · `deleteKnowledge` |
|
|
90
|
-
| Skills | `listSkills` · `installSkill` · `updateSkill` · `setSkillRate` · `grantSkill` (free-HTTP) · `uninstallSkill` |
|
|
90
|
+
| Skills | `listSkills` · `installSkill` · `updateSkill` · `setSkillRate` · `setSkillDailyCap` · `grantSkill` (free-HTTP) · `compileSkill` (prose→tools) · `uninstallSkill` |
|
|
91
91
|
| Credentials | `listCredentials` · `putCredentials` · `deleteCredentials` |
|
|
92
92
|
| Channels | `listChannels` · `createChannel` · `getChannel` · `updateChannel` · `deleteChannel` |
|
|
93
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. */
|
|
@@ -237,6 +237,25 @@ export interface AdminClient {
|
|
|
237
237
|
setSkillRate(slug: string, ratePerMin: number | null): Promise<{
|
|
238
238
|
ratePerMin: number | null;
|
|
239
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
|
+
}>;
|
|
240
259
|
/** Free-HTTP grant (universal import): let the agent drive this skill's API
|
|
241
260
|
* from its prose body via `http_request`, bounded to the manifest's
|
|
242
261
|
* `allowed_domains` ∪ `grantedDomains`. This is how a docs-only skill
|
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. */
|
|
@@ -75,6 +75,8 @@ export function createAdminClient(opts) {
|
|
|
75
75
|
installSkill: (input) => request('POST', '/skills', input),
|
|
76
76
|
updateSkill: (slug, patch) => request('PATCH', `/skills/${encodeURIComponent(slug)}`, patch),
|
|
77
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`, {}),
|
|
78
80
|
grantSkill: (slug, grant) => request('PATCH', `/skills/${encodeURIComponent(slug)}`, {
|
|
79
81
|
freeHttp: grant.freeHttp,
|
|
80
82
|
grantedDomains: grant.grantedDomains ?? []
|
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",
|