@agentproto/cli 0.7.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/README.md +4 -1
- package/dist/cli.mjs +23113 -13746
- package/dist/cli.mjs.map +1 -1
- package/dist/index.d.ts +53 -4
- package/dist/index.mjs +25322 -16225
- package/dist/index.mjs.map +1 -1
- package/dist/registry/builtins.mjs +1 -1
- package/dist/registry/manifest.mjs +1 -1
- package/dist/registry/plugins.mjs +1 -1
- package/dist/registry/runtime.mjs +1 -1
- package/dist/util/credentials.mjs +1 -1
- package/package.json +18 -17
package/dist/index.d.ts
CHANGED
|
@@ -98,6 +98,33 @@ declare function runServe(args: readonly string[]): Promise<number>;
|
|
|
98
98
|
*/
|
|
99
99
|
declare function runAcp(args: readonly string[]): Promise<number>;
|
|
100
100
|
|
|
101
|
+
declare function runPackSkill(args: readonly string[]): Promise<number>;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Single shared `zip` implementation for a skill pack directory. Used by
|
|
105
|
+
* `claude-plugin.ts` (consumer-side install, `agentproto install skill/...`)
|
|
106
|
+
* and by a package's own release-time build script (producer-side, see
|
|
107
|
+
* `packages/skill-pack-<name>/scripts/build.mjs`) — one zip technique, not
|
|
108
|
+
* one per caller.
|
|
109
|
+
*/
|
|
110
|
+
interface ZipPackResult {
|
|
111
|
+
zipped: boolean;
|
|
112
|
+
zipPath: string;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Best-effort zip of `dirToZip` into `<dirToZip>.zip` (or `zipPath` when
|
|
116
|
+
* given). The directory is the canonical artifact; the archive is a
|
|
117
|
+
* convenience — `zip` may be absent on minimal/Windows environments, so a
|
|
118
|
+
* failure to zip is reported via `zipped: false` rather than thrown.
|
|
119
|
+
*
|
|
120
|
+
* Runs `zip` with cwd set to `dirToZip`'s parent and zips its bare basename,
|
|
121
|
+
* so archive entries read as `<name>/...` — not the full absolute path a
|
|
122
|
+
* naive `zip -r <zipPath> <dirToZip>` would bake in when `dirToZip` is
|
|
123
|
+
* absolute (as every caller here passes it). Unzipping must not recreate
|
|
124
|
+
* the machine's own directory tree.
|
|
125
|
+
*/
|
|
126
|
+
declare function zipPackDir(dirToZip: string, zipPath?: string): Promise<ZipPackResult>;
|
|
127
|
+
|
|
101
128
|
/**
|
|
102
129
|
* Resolve a slug like "claude-code" to a runnable `AgentCliHandle`.
|
|
103
130
|
*
|
|
@@ -185,6 +212,19 @@ interface AdapterInfo {
|
|
|
185
212
|
* `provider`/`mode` are undefined for a bare-string entry — an
|
|
186
213
|
* unstated provider is never guessed here (see AdapterModelInfo). */
|
|
187
214
|
modelDetails: AdapterModelInfo[];
|
|
215
|
+
/**
|
|
216
|
+
* How this adapter selects a model (AIP-45 `models.apply`, defaulted the
|
|
217
|
+
* same way the driver does — omitted manifest field ⇒ `"config"`). Tells
|
|
218
|
+
* a client whether a mid-session model switch (`POST /sessions/:id/
|
|
219
|
+
* model`) can even work for this adapter: `"arg"` bakes the model into
|
|
220
|
+
* spawn-time argv, so EVERY switch attempt reports `requires-restart`
|
|
221
|
+
* regardless of target model — a picker should mark every row that way
|
|
222
|
+
* rather than let the user discover it per-pick. Absent for the ACP
|
|
223
|
+
* generic-config adapter family (`listAcpGenericAdapters`), which has no
|
|
224
|
+
* `models.apply` concept of its own; treat an absent value as `"config"`,
|
|
225
|
+
* the same default the manifest schema applies.
|
|
226
|
+
*/
|
|
227
|
+
modelApply?: "config" | "command" | "arg";
|
|
188
228
|
}
|
|
189
229
|
/** One entry of an adapter's declared model menu, projected from a
|
|
190
230
|
* `models.allowed` item — bare string or {@link AgentCliModelEntry}.
|
|
@@ -231,14 +271,23 @@ declare function listInstalledAdapters(opts?: {
|
|
|
231
271
|
* with its runtime availability status:
|
|
232
272
|
*
|
|
233
273
|
* "supported" — known to agentproto, package not importable (not installed)
|
|
234
|
-
* "available" — package resolves; requiresSetup but no ledger yet
|
|
235
|
-
*
|
|
274
|
+
* "available" — package resolves; requiresSetup but no ledger yet, OR
|
|
275
|
+
* authRequired but no billing credential resolves
|
|
276
|
+
* "ready" — package resolves + setup complete (or no setup needed) AND
|
|
277
|
+
* (authRequired is false, or a credential DOES resolve)
|
|
236
278
|
*
|
|
237
279
|
* Also appends any adapters discovered in node_modules that aren't in the
|
|
238
280
|
* catalog, so locally-installed custom adapters still appear.
|
|
239
281
|
*
|
|
240
282
|
* Status is derived via the kit's `computeStatus`: resolved × requiresSetup ×
|
|
241
|
-
* ledger-exists — never via `handle.check()`
|
|
283
|
+
* ledger-exists × (authRequired × authConfigured) — never via `handle.check()`
|
|
284
|
+
* (per OQ-5). The auth axis is independent of `requiresSetup`: claude-code
|
|
285
|
+
* declares no `setup[]` at all (`requiresSetup` is always false for it) but
|
|
286
|
+
* `authEnforce:"always"` hard-fails every spawn without a billing credential
|
|
287
|
+
* — `authProbe` (wired to the runtime's `isAgentCliAuthConfigured`, which
|
|
288
|
+
* mirrors `resolveAuthSpec`'s exact precedence including the explicit-gate
|
|
289
|
+
* on the providers store, PR #321) is what makes that honest instead of the
|
|
290
|
+
* old `!requiresSetup` short-circuit reporting "ready" on zero credentials.
|
|
242
291
|
*
|
|
243
292
|
* A fourth status, `"unresolvable"`, sits outside that kit-owned vocabulary:
|
|
244
293
|
* when `resolveAdapter` falls back to its last-known-good cache (see there),
|
|
@@ -369,4 +418,4 @@ declare function listAcpGenericAdapters(opts?: {
|
|
|
369
418
|
excludeSlugs?: ReadonlySet<string>;
|
|
370
419
|
}): Promise<AcpGenericListEntry[]>;
|
|
371
420
|
|
|
372
|
-
export { ACP_CATALOG, type AcpAgentSpec, type AcpGenericListEntry, type AcpSpecSource, type AdapterInfo, type AdapterListing, type ResolvedAdapter, acpHandleFromSpec, binOnPath, listAcpGenericAdapters, listAdaptersWithAcp, listAdaptersWithCatalog, listInstalledAdapters, resolveAcpSpec, resolveAdapter, runAcp, runInstall, runRun, runServe };
|
|
421
|
+
export { ACP_CATALOG, type AcpAgentSpec, type AcpGenericListEntry, type AcpSpecSource, type AdapterInfo, type AdapterListing, type ResolvedAdapter, type ZipPackResult, acpHandleFromSpec, binOnPath, listAcpGenericAdapters, listAdaptersWithAcp, listAdaptersWithCatalog, listInstalledAdapters, resolveAcpSpec, resolveAdapter, runAcp, runInstall, runPackSkill, runRun, runServe, zipPackDir };
|