@pouchy_ai/admin-sdk 0.8.0 → 0.9.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 +17 -0
- package/README.md +5 -0
- package/dist/index.d.ts +28 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@pouchy_ai/admin-sdk` are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.9.0 — 2026-07-28
|
|
6
|
+
|
|
7
|
+
- **Channel CRUD is typed (CR-77).** `createChannel` takes
|
|
8
|
+
`type: CreatableChannelType` instead of `string` — the full 31-transport
|
|
9
|
+
union, minus `internal-a2a`, which is in the platform's union but has no
|
|
10
|
+
adapter and is answered 400, so excluding it turns a runtime rejection into a
|
|
11
|
+
compile error. `secret` is now `ChannelSecretInput` (`token`,
|
|
12
|
+
`inboundSecret`, `extra`) rather than `Record<string, unknown>`.
|
|
13
|
+
- The union is a duplicate of the server's `TransportType` (this package is
|
|
14
|
+
standalone and cannot import it), so a drift gate binds the two and fails CI
|
|
15
|
+
in BOTH directions — a transport on one side and not the other is either an
|
|
16
|
+
integrator typed out of a working call, or a compile-time promise the API
|
|
17
|
+
rejects.
|
|
18
|
+
- Per-transport `secret.extra` field lists are still documented in
|
|
19
|
+
<https://pouchy.ai/docs/channel-setup> rather than modelled per type: the sets are
|
|
20
|
+
operator-supplied and move with each provider's own console.
|
|
21
|
+
|
|
5
22
|
## 0.8.0 — 2026-07-28
|
|
6
23
|
|
|
7
24
|
- **Durable runs.** `listRuns`, `createRun`, `getRun`, `cancelRun`, `resumeRun`,
|
package/README.md
CHANGED
|
@@ -142,6 +142,11 @@ Reads (`GET`) are not covered by that bucket. `retryAfter` is available from
|
|
|
142
142
|
| Channels | `listChannels` · `createChannel` · `getChannel` · `updateChannel` · `deleteChannel` |
|
|
143
143
|
| Schedules | `listSchedules` · `createSchedule` · `getSchedule` · `updateSchedule` · `deleteSchedule` |
|
|
144
144
|
| Durable runs | `listRuns` · `createRun` · `getRun` · `cancelRun` · `resumeRun` · `signalRun` |
|
|
145
|
+
|
|
146
|
+
Channel types are checked at compile time: `createChannel` takes a
|
|
147
|
+
`CreatableChannelType` (the platform's 31-transport union minus the adapterless
|
|
148
|
+
`internal-a2a`), and `secret` is a named `ChannelSecretInput`. Per-transport
|
|
149
|
+
`secret.extra` fields are listed in <https://pouchy.ai/docs/channel-setup>.
|
|
145
150
|
| Webhooks | `listWebhooks` · `createWebhook` · `updateWebhook` · `rotateWebhookSecret` · `deleteWebhook` · `testWebhook` · `redeliverWebhook` |
|
|
146
151
|
| Reporting | `getUsage` · `getBilling` · `getTracesSummary` · `getRecentTraces` · `getLogs` · `getProject` · `updateProject` |
|
|
147
152
|
| Escape hatch | `request(method, path, body?)` — any endpoint not yet typed |
|
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.9.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
|
|
@@ -166,6 +166,31 @@ export interface DeliveryOutcome {
|
|
|
166
166
|
}
|
|
167
167
|
/** The Admin API client. Every method returns the parsed JSON body; failures
|
|
168
168
|
* throw AdminApiError. */
|
|
169
|
+
/** Every transport the platform knows. Mirrors the server's `TransportType`
|
|
170
|
+
* (`channels/types.ts`) — this package is standalone and cannot import it, so
|
|
171
|
+
* `admin-sdk-channel-types.drift.test.ts` binds the two and fails CI if either
|
|
172
|
+
* side gains a transport the other lacks. */
|
|
173
|
+
export type ChannelTransportType = 'echo' | 'matrix' | 'telegram' | 'web' | 'activitypub' | 'internal-a2a' | 'discord' | 'slack' | 'nostr' | 'atproto' | 'sms' | 'email' | 'whatsapp' | 'messenger' | 'instagram' | 'line' | 'teams' | 'wechat' | 'wecom' | 'feishu' | 'dingtalk' | 'twitter' | 'xmpp' | 'qq' | 'kakao' | 'viber' | 'signal' | 'weibo' | 'alexa' | 'google-assistant' | 'voice';
|
|
174
|
+
/** Transports `createChannel` accepts. `internal-a2a` is in the union but has
|
|
175
|
+
* no adapter, so the server answers 400 — excluding it here turns a runtime
|
|
176
|
+
* rejection into a compile error. */
|
|
177
|
+
export type CreatableChannelType = Exclude<ChannelTransportType, 'internal-a2a'>;
|
|
178
|
+
/** Credentials for a connector, sealed server-side as one AES-GCM blob.
|
|
179
|
+
*
|
|
180
|
+
* `extra` is where the transports needing more than a token live — Twitter
|
|
181
|
+
* OAuth 1.0a (`consumerKey`/`consumerSecret`/`accessToken`/`accessTokenSecret`),
|
|
182
|
+
* Teams AAD (`appId`/`appPassword`), QQ (`appId` + Ed25519 seed), the WeChat
|
|
183
|
+
* family's mint credentials. Per-transport field lists are documented in
|
|
184
|
+
* https://pouchy.ai/docs/channel-setup; they are not modelled per-type here because the set
|
|
185
|
+
* is operator-supplied and moves with each provider's own console. */
|
|
186
|
+
export interface ChannelSecretInput {
|
|
187
|
+
/** Bot access token / API key used for outbound delivery. */
|
|
188
|
+
token?: string;
|
|
189
|
+
/** Inbound signing secret (e.g. Telegram `secret_token`, Matrix `hs_token`). */
|
|
190
|
+
inboundSecret?: string;
|
|
191
|
+
/** Extra named credentials for transports whose auth needs more than the pair above. */
|
|
192
|
+
extra?: Record<string, string>;
|
|
193
|
+
}
|
|
169
194
|
/** A durable run as the API returns it. Typed rather than `unknown` because
|
|
170
195
|
* the parked-run flow — read `status`, read `awaiting.token`, answer — is the
|
|
171
196
|
* SDK's most important interaction, and forcing a cast there would put the
|
|
@@ -511,13 +536,13 @@ export interface AdminClient {
|
|
|
511
536
|
connectors: unknown[];
|
|
512
537
|
}>;
|
|
513
538
|
createChannel(input: {
|
|
514
|
-
type:
|
|
539
|
+
type: CreatableChannelType;
|
|
515
540
|
agentId: string;
|
|
516
541
|
env?: Env;
|
|
517
542
|
config?: Record<string, unknown>;
|
|
518
543
|
/** Connector credentials (bot token, signing secret, …) — stored
|
|
519
544
|
* encrypted, never returned. */
|
|
520
|
-
secret?:
|
|
545
|
+
secret?: ChannelSecretInput;
|
|
521
546
|
}): Promise<{
|
|
522
547
|
connector: {
|
|
523
548
|
id: string;
|
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.9.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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pouchy_ai/admin-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.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",
|