@agentproto/cli 0.3.0 → 0.5.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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AgentCliHandle } from '@agentproto/driver-agent-cli';
1
+ import { AgentCliMode, AgentCliHandle } from '@agentproto/driver-agent-cli';
2
2
 
3
3
  /**
4
4
  * `agentproto install <slug>`
@@ -49,7 +49,7 @@ declare function runRun(args: readonly string[]): Promise<number>;
49
49
  * `--connect <url>` is set. With or without the tunnel:
50
50
  *
51
51
  * - HTTP /sessions, /sessions/agent, /sessions/:id/* routes work
52
- * - MCP tools (start_agent_session, prompt_agent_session, …) are
52
+ * - MCP tools (agent_start, agent_prompt, …) are
53
53
  * reachable via the daemon's /mcp transport
54
54
  * - the LocalDaemonSessionsCard in guilde-web sees every spawn
55
55
  *
@@ -102,10 +102,21 @@ interface ResolvedAdapter {
102
102
  readonly source: "npm" | "file" | "bundled";
103
103
  readonly packageName?: string;
104
104
  }
105
+ /** Mode metadata surfaced in `adapter_list` — the UI-safe subset of an
106
+ * AIP-45 `modes[]` entry. Omits the spawn internals (`bin_args_*`, `env`)
107
+ * since those aren't information a picker needs; carries the honest
108
+ * `status`/`status_note` so a declared-but-no-op mode is visible. */
109
+ interface AdapterMode {
110
+ id: string;
111
+ description?: string;
112
+ /** Absent in the manifest ⇒ normalised to "active" here. */
113
+ status: NonNullable<AgentCliMode["status"]>;
114
+ status_note?: string;
115
+ }
105
116
  /**
106
117
  * Compact metadata about an installed adapter — the shape returned
107
118
  * by `listInstalledAdapters()` and exposed via the daemon's
108
- * `GET /adapters` route + `list_adapters` MCP tool. Only fields
119
+ * `GET /adapters` route + `adapter_list` MCP tool. Only fields
109
120
  * safe to surface in a UI list (no install scripts, no env keys).
110
121
  * For full handle access call `resolveAdapter(slug)`.
111
122
  */
@@ -129,15 +140,20 @@ interface AdapterInfo {
129
140
  /** Known-valid model identifiers for this adapter, drawn from the
130
141
  * adapter manifest's `models.allowed` field. Empty when the adapter
131
142
  * doesn't declare a model list (accepts whatever the underlying
132
- * binary accepts). Pass one of these as `model` in `start_agent_session`
143
+ * binary accepts). Pass one of these as `model` in `agent_start`
133
144
  * to avoid trial-and-error validation errors. */
134
145
  models: string[];
146
+ /** AIP-45 `modes[]` the adapter declares, projected to the UI-safe
147
+ * subset (id + description + honest status). Empty when the adapter
148
+ * declares no modes. `status` defaults to "active" when the manifest
149
+ * omits it, so a declared mode is never silently statusless. */
150
+ modes: AdapterMode[];
135
151
  }
136
152
  declare function resolveAdapter(slug: string): Promise<ResolvedAdapter>;
137
153
  /**
138
154
  * Enumerate every `@agentproto/adapter-*` package reachable from the
139
155
  * current node module-resolution path. Used by the daemon's
140
- * `GET /adapters` route and `list_adapters` MCP tool so UIs (web
156
+ * `GET /adapters` route and `adapter_list` MCP tool so UIs (web
141
157
  * spawn dialog) and operators can pick from the installed set
142
158
  * without trial-and-error against `resolveAdapter(slug)`.
143
159
  *