@slashfi/agents-sdk 0.21.0 → 0.23.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.
@@ -0,0 +1,171 @@
1
+ /**
2
+ * MCP Introspection
3
+ *
4
+ * Connects to an MCP server, introspects its tools,
5
+ * and outputs a SerializedAgentDefinition (agent.json).
6
+ *
7
+ * Deduplicates shared $defs across tools.
8
+ */
9
+
10
+ import { spawn } from "node:child_process";
11
+ import { mkdirSync, writeFileSync } from "node:fs";
12
+ import { dirname, resolve } from "node:path";
13
+
14
+ export interface IntrospectOptions {
15
+ server: string;
16
+ name: string;
17
+ out?: string;
18
+ env?: Record<string, string>;
19
+ }
20
+
21
+ function deduplicateDefs(tools: Record<string, unknown>[]): {
22
+ tools: Record<string, unknown>[];
23
+ sharedDefs: Record<string, unknown>;
24
+ } {
25
+ const defsByContent = new Map<string, { name: string; schema: unknown }>();
26
+
27
+ for (const tool of tools) {
28
+ const schema = tool.inputSchema as Record<string, unknown> | undefined;
29
+ const defs = schema?.$defs;
30
+ if (!defs || typeof defs !== "object") continue;
31
+ for (const [defName, defSchema] of Object.entries(
32
+ defs as Record<string, unknown>,
33
+ )) {
34
+ const key = JSON.stringify(defSchema);
35
+ if (!defsByContent.has(key)) {
36
+ defsByContent.set(key, { name: defName, schema: defSchema });
37
+ }
38
+ }
39
+ }
40
+
41
+ const sharedDefs: Record<string, unknown> = {};
42
+ for (const { name, schema } of Array.from(defsByContent.values())) {
43
+ sharedDefs[name] = schema;
44
+ }
45
+
46
+ const cleanedTools = tools.map((t) => {
47
+ const schema = { ...(t.inputSchema as Record<string, unknown>) };
48
+ schema.$defs = undefined;
49
+ return { ...t, inputSchema: schema };
50
+ });
51
+
52
+ return { tools: cleanedTools, sharedDefs };
53
+ }
54
+
55
+ export async function introspectMcp(options: IntrospectOptions): Promise<void> {
56
+ const { server, name, out } = options;
57
+
58
+ const parts = server.split(/\s+/);
59
+ const proc = spawn(parts[0], parts.slice(1), {
60
+ stdio: ["pipe", "pipe", "pipe"],
61
+ env: { ...process.env, ...options.env },
62
+ });
63
+
64
+ let buffer = "";
65
+ let messageId = 0;
66
+
67
+ function sendJsonRpc(
68
+ method: string,
69
+ params: Record<string, unknown> = {},
70
+ ): number {
71
+ const id = ++messageId;
72
+ const msg = JSON.stringify({ jsonrpc: "2.0", id, method, params });
73
+ proc.stdin?.write(`${msg}\n`);
74
+ return id;
75
+ }
76
+
77
+ function waitForResponse(targetId: number): Promise<Record<string, unknown>> {
78
+ return new Promise((res, reject) => {
79
+ const timeout = setTimeout(() => reject(new Error("Timeout")), 30000);
80
+ const handler = (chunk: Buffer) => {
81
+ buffer += chunk.toString();
82
+ const lines = buffer.split("\n");
83
+ buffer = lines.pop() || "";
84
+ for (const line of lines) {
85
+ const trimmed = line.trim();
86
+ if (!trimmed) continue;
87
+ try {
88
+ const parsed = JSON.parse(trimmed);
89
+ if (parsed.id === targetId) {
90
+ clearTimeout(timeout);
91
+ proc.stdout?.removeListener("data", handler);
92
+ if (parsed.error) reject(new Error(JSON.stringify(parsed.error)));
93
+ else res(parsed.result);
94
+ }
95
+ } catch {
96
+ /* ignore non-JSON */
97
+ }
98
+ }
99
+ };
100
+ proc.stdout?.on("data", handler);
101
+ });
102
+ }
103
+
104
+ try {
105
+ console.log(`Connecting to MCP server: ${server}`);
106
+
107
+ const initId = sendJsonRpc("initialize", {
108
+ protocolVersion: "2024-11-05",
109
+ capabilities: {},
110
+ clientInfo: { name: "adk-introspect", version: "1.0.0" },
111
+ });
112
+ const initResult = (await waitForResponse(initId)) as Record<
113
+ string,
114
+ unknown
115
+ >;
116
+ const serverInfo = initResult.serverInfo as
117
+ | Record<string, string>
118
+ | undefined;
119
+ console.log(`Server: ${serverInfo?.name} v${serverInfo?.version}`);
120
+
121
+ proc.stdin?.write(
122
+ `${JSON.stringify({ jsonrpc: "2.0", method: "notifications/initialized" })}\n`,
123
+ );
124
+
125
+ const toolsId = sendJsonRpc("tools/list", {});
126
+ const toolsResult = (await waitForResponse(toolsId)) as Record<
127
+ string,
128
+ unknown
129
+ >;
130
+ const rawTools = (
131
+ (toolsResult.tools || []) as Record<string, unknown>[]
132
+ ).map((t) => ({
133
+ name: t.name as string,
134
+ description: (t.description as string) || "",
135
+ inputSchema: (t.inputSchema as Record<string, unknown>) || {
136
+ type: "object",
137
+ properties: {},
138
+ },
139
+ }));
140
+ console.log(`Discovered ${rawTools.length} tools`);
141
+
142
+ const { tools, sharedDefs } = deduplicateDefs(rawTools);
143
+ const defsCount = Object.keys(sharedDefs).length;
144
+ if (defsCount > 0) {
145
+ console.log(`Hoisted ${defsCount} shared $defs`);
146
+ }
147
+
148
+ const definition: Record<string, unknown> = {
149
+ path: name,
150
+ name: serverInfo?.name || name,
151
+ description: `Agent for ${serverInfo?.name || name}`,
152
+ version: serverInfo?.version || "1.0.0",
153
+ visibility: "public",
154
+ serverSource: server,
155
+ serverInfo,
156
+ ...(defsCount > 0 ? { $defs: sharedDefs } : {}),
157
+ tools,
158
+ generatedAt: new Date().toISOString(),
159
+ sdkVersion: "0.22.0",
160
+ };
161
+
162
+ const outPath = out || `./${name}.json`;
163
+ const resolved = resolve(outPath);
164
+ mkdirSync(dirname(resolved), { recursive: true });
165
+ writeFileSync(resolved, `${JSON.stringify(definition, null, 2)}\n`);
166
+ const sizeKB = (JSON.stringify(definition).length / 1024).toFixed(1);
167
+ console.log(`\nWrote ${resolved} (${sizeKB}KB, ${tools.length} tools)`);
168
+ } finally {
169
+ proc.kill();
170
+ }
171
+ }
package/src/jsonc.ts ADDED
@@ -0,0 +1,83 @@
1
+ /**
2
+ * JSONC Parser
3
+ *
4
+ * Parses JSON with comments (single-line and multi-line)
5
+ * so agent.json files can be annotated.
6
+ */
7
+
8
+ import { readFileSync } from "node:fs";
9
+
10
+ /**
11
+ * Strip comments from JSONC content and parse as JSON.
12
+ */
13
+ export function parseJsonc(content: string): unknown {
14
+ let result = "";
15
+ let i = 0;
16
+ let inString = false;
17
+ let stringChar = "";
18
+
19
+ while (i < content.length) {
20
+ if (inString) {
21
+ if (content[i] === "\\" && i + 1 < content.length) {
22
+ result += content[i] + content[i + 1];
23
+ i += 2;
24
+ continue;
25
+ }
26
+ if (content[i] === stringChar) {
27
+ inString = false;
28
+ }
29
+ result += content[i];
30
+ i++;
31
+ continue;
32
+ }
33
+
34
+ if (content[i] === '"') {
35
+ inString = true;
36
+ stringChar = content[i];
37
+ result += content[i];
38
+ i++;
39
+ continue;
40
+ }
41
+
42
+ // Single-line comment
43
+ if (
44
+ content[i] === "/" &&
45
+ i + 1 < content.length &&
46
+ content[i + 1] === "/"
47
+ ) {
48
+ while (i < content.length && content[i] !== "\n") i++;
49
+ continue;
50
+ }
51
+
52
+ // Multi-line comment
53
+ if (
54
+ content[i] === "/" &&
55
+ i + 1 < content.length &&
56
+ content[i + 1] === "*"
57
+ ) {
58
+ i += 2;
59
+ while (
60
+ i + 1 < content.length &&
61
+ !(content[i] === "*" && content[i + 1] === "/")
62
+ )
63
+ i++;
64
+ i += 2;
65
+ continue;
66
+ }
67
+
68
+ result += content[i];
69
+ i++;
70
+ }
71
+
72
+ // Handle trailing commas
73
+ const cleaned = result.replace(/,\s*([}\]])/g, "$1");
74
+ return JSON.parse(cleaned);
75
+ }
76
+
77
+ /**
78
+ * Read and parse a JSONC file.
79
+ */
80
+ export function readJsoncFile(path: string): unknown {
81
+ const content = readFileSync(path, "utf-8");
82
+ return parseJsonc(content);
83
+ }
package/src/pack.ts ADDED
@@ -0,0 +1,395 @@
1
+ /**
2
+ * ADK Pack
3
+ *
4
+ * Generates a publishable npm package from an agent.json file.
5
+ *
6
+ * Input: agent.json (SerializedAgentDefinition)
7
+ * Output: ready-to-publish directory with:
8
+ * - package.json
9
+ * - agent.json (copy)
10
+ * - meta.json (version metadata + diff)
11
+ * - index.js + index.d.ts (typed export)
12
+ */
13
+
14
+ import { spawnSync } from "node:child_process";
15
+ import { createHash } from "node:crypto";
16
+ import {
17
+ existsSync,
18
+ mkdirSync,
19
+ readFileSync,
20
+ writeFileSync,
21
+ } from "node:fs";
22
+ import { resolve } from "node:path";
23
+ import { parseJsonc } from "./jsonc.js";
24
+ import type { SerializedAgentDefinition } from "./serialized.js";
25
+
26
+ // ============================================
27
+ // Types
28
+ // ============================================
29
+
30
+ export interface PackOptions {
31
+ /** Path to agent.json */
32
+ agentFile: string;
33
+ /** Output directory (default: ./dist) */
34
+ outDir?: string;
35
+ /** npm scope (default: @agentdef) */
36
+ scope?: string;
37
+ /** Previous version's agent.json path for diff (optional) */
38
+ previousAgentFile?: string;
39
+ }
40
+
41
+ export interface PackResult {
42
+ packageDir: string;
43
+ packageName: string;
44
+ version: string;
45
+ hash: string;
46
+ meta: VersionMeta;
47
+ }
48
+
49
+ export interface VersionMeta {
50
+ hash: string;
51
+ serverVersion: string;
52
+ npmPackage?: string;
53
+ toolCount: number;
54
+ sizeBytes: number;
55
+ generatedAt: string;
56
+ sdkVersion: string;
57
+ changes?: VersionChanges;
58
+ }
59
+
60
+ export interface VersionChanges {
61
+ previousHash?: string;
62
+ toolsAdded: string[];
63
+ toolsRemoved: string[];
64
+ toolsModified: string[];
65
+ schemaChanges: string[];
66
+ }
67
+
68
+ // ============================================
69
+ // Hash
70
+ // ============================================
71
+
72
+ function contentHash(content: string): string {
73
+ return createHash("sha256").update(content).digest("hex").slice(0, 8);
74
+ }
75
+
76
+ // ============================================
77
+ // Diff
78
+ // ============================================
79
+
80
+ function diffDefinitions(
81
+ current: SerializedAgentDefinition,
82
+ previous: SerializedAgentDefinition,
83
+ previousRawContent: string,
84
+ ): VersionChanges {
85
+ const prevToolNames = new Set(previous.tools.map((t) => t.name));
86
+ const currToolNames = new Set(current.tools.map((t) => t.name));
87
+
88
+ const toolsAdded = current.tools
89
+ .filter((t) => !prevToolNames.has(t.name))
90
+ .map((t) => t.name);
91
+ const toolsRemoved = previous.tools
92
+ .filter((t) => !currToolNames.has(t.name))
93
+ .map((t) => t.name);
94
+
95
+ // Find modified tools (same name, different schema)
96
+ const toolsModified: string[] = [];
97
+ const schemaChanges: string[] = [];
98
+ const prevToolMap = new Map(previous.tools.map((t) => [t.name, t]));
99
+
100
+ for (const tool of current.tools) {
101
+ const prev = prevToolMap.get(tool.name);
102
+ if (!prev) continue;
103
+ const currSchema = JSON.stringify(tool.inputSchema);
104
+ const prevSchema = JSON.stringify(prev.inputSchema);
105
+ if (currSchema !== prevSchema) {
106
+ toolsModified.push(tool.name);
107
+ // Generate human-readable schema change description
108
+ const currProps = Object.keys(
109
+ ((tool.inputSchema as Record<string, unknown>).properties as Record<
110
+ string,
111
+ unknown
112
+ >) || {},
113
+ );
114
+ const prevProps = Object.keys(
115
+ ((prev.inputSchema as Record<string, unknown>).properties as Record<
116
+ string,
117
+ unknown
118
+ >) || {},
119
+ );
120
+ const added = currProps.filter((p) => !prevProps.includes(p));
121
+ const removed = prevProps.filter((p) => !currProps.includes(p));
122
+ if (added.length > 0) {
123
+ schemaChanges.push(
124
+ `${tool.name}: added properties: ${added.join(", ")}`,
125
+ );
126
+ }
127
+ if (removed.length > 0) {
128
+ schemaChanges.push(
129
+ `${tool.name}: removed properties: ${removed.join(", ")}`,
130
+ );
131
+ }
132
+ if (added.length === 0 && removed.length === 0) {
133
+ schemaChanges.push(`${tool.name}: schema modified`);
134
+ }
135
+ }
136
+ }
137
+
138
+ return {
139
+ previousHash: contentHash(previousRawContent),
140
+ toolsAdded,
141
+ toolsRemoved,
142
+ toolsModified,
143
+ schemaChanges,
144
+ };
145
+ }
146
+
147
+ // ============================================
148
+ // Pack
149
+ // ============================================
150
+
151
+ export function pack(options: PackOptions): PackResult {
152
+ const { agentFile, outDir = "./dist", scope = "@agentdef" } = options;
153
+
154
+ // Read agent.json
155
+ const agentPath = resolve(agentFile);
156
+ if (!existsSync(agentPath)) {
157
+ throw new Error(`agent.json not found: ${agentPath}`);
158
+ }
159
+ const agentContent = readFileSync(agentPath, "utf-8");
160
+ const definition = parseJsonc(agentContent) as SerializedAgentDefinition;
161
+
162
+ // Compute hash + version
163
+ const hash = contentHash(agentContent);
164
+ const version = `${definition.version || "1.0.0"}`;
165
+ const packageName = `${scope}/${definition.path}`;
166
+
167
+ // Create output directory
168
+ const packageDir = resolve(outDir, definition.path);
169
+ mkdirSync(packageDir, { recursive: true });
170
+
171
+ // Generate meta.json
172
+ const meta: VersionMeta = {
173
+ hash,
174
+ serverVersion:
175
+ definition.serverInfo?.version || definition.version || "1.0.0",
176
+ npmPackage: definition.serverSource,
177
+ toolCount: definition.tools.length,
178
+ sizeBytes: Buffer.byteLength(agentContent, "utf-8"),
179
+ generatedAt: definition.generatedAt || new Date().toISOString(),
180
+ sdkVersion: definition.sdkVersion || "0.21.0",
181
+ };
182
+
183
+ // Diff against previous if provided
184
+ if (options.previousAgentFile) {
185
+ const prevPath = resolve(options.previousAgentFile);
186
+ if (existsSync(prevPath)) {
187
+ const prevContent = readFileSync(prevPath, "utf-8");
188
+ const prevDef = parseJsonc(prevContent) as SerializedAgentDefinition;
189
+ meta.changes = diffDefinitions(definition, prevDef, prevContent);
190
+ }
191
+ }
192
+
193
+ // Write agent.json
194
+ writeFileSync(resolve(packageDir, "agent.json"), agentContent);
195
+
196
+ // Write meta.json
197
+ writeFileSync(
198
+ resolve(packageDir, "meta.json"),
199
+ `${JSON.stringify(meta, null, 2)}\n`,
200
+ );
201
+
202
+ // Write package.json
203
+ const pkg = {
204
+ name: packageName,
205
+ version,
206
+ description:
207
+ definition.description || `Agent definition for ${definition.name}`,
208
+ type: "module",
209
+ main: "index.js",
210
+ types: "index.d.ts",
211
+ exports: {
212
+ ".": {
213
+ import: "./index.js",
214
+ types: "./index.d.ts",
215
+ },
216
+ "./agent.json": "./agent.json",
217
+ "./meta.json": "./meta.json",
218
+ },
219
+ files: ["index.js", "index.d.ts", "agent.json", "meta.json"],
220
+ peerDependencies: {
221
+ "@slashfi/agents-sdk": ">=0.21.0",
222
+ },
223
+ keywords: ["agent", "mcp", "agentdef", definition.path],
224
+ license: "MIT",
225
+ repository: {
226
+ type: "git",
227
+ url: "https://github.com/slashfi/agents-sdk",
228
+ },
229
+ };
230
+ writeFileSync(
231
+ resolve(packageDir, "package.json"),
232
+ `${JSON.stringify(pkg, null, 2)}\n`,
233
+ );
234
+
235
+ // Write index.js
236
+ writeFileSync(
237
+ resolve(packageDir, "index.js"),
238
+ [
239
+ 'import { readFileSync } from "node:fs";',
240
+ 'import { fileURLToPath } from "node:url";',
241
+ 'import { dirname, resolve } from "node:path";',
242
+ "",
243
+ "const __dirname = dirname(fileURLToPath(import.meta.url));",
244
+ 'const definition = JSON.parse(readFileSync(resolve(__dirname, "agent.json"), "utf-8"));',
245
+ "export default definition;",
246
+ "export { definition };",
247
+ "",
248
+ ].join("\n"),
249
+ );
250
+
251
+ // Write index.d.ts
252
+ writeFileSync(
253
+ resolve(packageDir, "index.d.ts"),
254
+ [
255
+ 'import type { SerializedAgentDefinition } from "@slashfi/agents-sdk";',
256
+ "",
257
+ "declare const definition: SerializedAgentDefinition;",
258
+ "export default definition;",
259
+ "export { definition };",
260
+ "",
261
+ ].join("\n"),
262
+ );
263
+
264
+ return { packageDir, packageName, version, hash, meta };
265
+ }
266
+
267
+ // ============================================
268
+ // Publish
269
+ // ============================================
270
+
271
+ export interface PublishOptions extends PackOptions {
272
+ /** Dry run (don't actually publish) */
273
+ dryRun?: boolean;
274
+ /** npm tag (default: latest) */
275
+ tag?: string;
276
+ /** npm access level */
277
+ access?: "public" | "restricted";
278
+ /** npm registry URL */
279
+ registry?: string;
280
+ }
281
+
282
+ /**
283
+ * Compare semver: returns true if `a` is older than `b`.
284
+ */
285
+ function isOlderVersion(a: string, b: string): boolean {
286
+ const pa = a.split(".").map(Number);
287
+ const pb = b.split(".").map(Number);
288
+ for (let i = 0; i < 3; i++) {
289
+ if ((pa[i] || 0) < (pb[i] || 0)) return true;
290
+ if ((pa[i] || 0) > (pb[i] || 0)) return false;
291
+ }
292
+ return false; // equal
293
+ }
294
+
295
+ export function publish(options: PublishOptions): PackResult {
296
+ const result = pack(options);
297
+
298
+ // Check if this version already exists in the registry
299
+ const registryArgs = options.registry ? ["--registry", options.registry] : [];
300
+ const viewProc = spawnSync(
301
+ "npm",
302
+ ["view", `${result.packageName}`, "versions", "--json", ...registryArgs],
303
+ { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] },
304
+ );
305
+
306
+ if (viewProc.status === 0 && viewProc.stdout) {
307
+ try {
308
+ const raw = JSON.parse(viewProc.stdout);
309
+ const existing: string[] = Array.isArray(raw) ? raw : [raw];
310
+
311
+ // E409 prevention: version already exists
312
+ if (existing.includes(result.version)) {
313
+ const versions = existing.join(", ");
314
+ throw new Error(
315
+ `\x1b[31m\u2717 ${result.packageName}@${result.version} already exists in registry\x1b[0m\n\n Published versions: ${versions}\n Hint: bump the version in agent.json, or use --tag to publish a pre-release`,
316
+ );
317
+ }
318
+
319
+ // Out-of-order protection: warn if publishing older than latest
320
+ const latestViewProc = spawnSync(
321
+ "npm",
322
+ ["view", `${result.packageName}`, "dist-tags.latest", ...registryArgs],
323
+ { encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] },
324
+ );
325
+ if (latestViewProc.status === 0 && latestViewProc.stdout) {
326
+ const latest = latestViewProc.stdout.trim();
327
+ if (latest && !options.tag && isOlderVersion(result.version, latest)) {
328
+ console.warn(
329
+ `\x1b[33m\u26A0 Warning: publishing ${result.version} which is older than latest (${latest})\x1b[0m`,
330
+ );
331
+ console.warn(
332
+ ` This will move the "latest" tag from ${latest} to ${result.version}.`,
333
+ );
334
+ console.warn(
335
+ " Use --tag <name> to publish without affecting latest.",
336
+ );
337
+ throw new Error(
338
+ `Refusing to clobber latest tag. Use --tag <name> to publish ${result.version} alongside ${latest}.`,
339
+ );
340
+ }
341
+ }
342
+ } catch (e) {
343
+ if (e instanceof Error && e.message.includes("already exists")) throw e;
344
+ if (e instanceof Error && e.message.includes("Refusing to clobber"))
345
+ throw e;
346
+ // JSON parse error or other issue — continue with publish
347
+ }
348
+ }
349
+
350
+ const npmArgs = ["publish", result.packageDir];
351
+ npmArgs.push("--access", options.access || "public");
352
+ if (options.tag) npmArgs.push("--tag", options.tag);
353
+ if (options.dryRun) npmArgs.push("--dry-run");
354
+ if (options.registry) npmArgs.push("--registry", options.registry);
355
+
356
+ console.log(
357
+ `Publishing ${result.packageName}@${result.version} (hash: ${result.hash})`,
358
+ );
359
+ const proc = spawnSync("npm", npmArgs, {
360
+ stdio: ["pipe", "pipe", "pipe"],
361
+ encoding: "utf-8",
362
+ });
363
+
364
+ if (proc.status !== 0) {
365
+ const stderr = proc.stderr || "";
366
+ // Extract npm log path for debug hint
367
+ const logMatch = stderr.match(/complete log[^:]*:\s*(.+\.log)/i);
368
+ const logHint = logMatch
369
+ ? `\n Debug: cat ${logMatch[1].trim()} | tail -40`
370
+ : "";
371
+ // Parse npm error for better messages
372
+ if (stderr.includes("E409") || stderr.includes("already present")) {
373
+ throw new Error(
374
+ `\x1b[31m\u2717 ${result.packageName}@${result.version} already exists in registry\x1b[0m\n\n` +
375
+ ` Hint: bump the version in agent.json, or use --tag to publish a pre-release${logHint}`,
376
+ );
377
+ }
378
+ if (stderr.includes("E401") || stderr.includes("authentication")) {
379
+ throw new Error(
380
+ `\x1b[31m\u2717 Authentication failed\x1b[0m\n\n Run: npm login --scope=@agentdef\n Or set NPM_TOKEN in your environment${logHint}`,
381
+ );
382
+ }
383
+ if (stderr.includes("E403") || stderr.includes("Forbidden")) {
384
+ throw new Error(
385
+ `\x1b[31m\u2717 Permission denied publishing ${result.packageName}\x1b[0m\n\n Make sure you have publish access to the @agentdef scope.\n Run: npm access ls-packages @agentdef${logHint}`,
386
+ );
387
+ }
388
+ // Fallback: show raw error
389
+ throw new Error(
390
+ `npm publish failed (exit ${proc.status}):${logHint}\n${stderr}`,
391
+ );
392
+ }
393
+
394
+ return result;
395
+ }
package/dist/cli.d.ts DELETED
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env bun
2
- /**
3
- * agents-sdk CLI
4
- *
5
- * Unified command-line interface for the agents SDK.
6
- *
7
- * Commands:
8
- * codegen - Generate agent definitions from an MCP server
9
- * use - Execute a tool on a codegenned agent
10
- *
11
- * @example
12
- * ```bash
13
- * # Generate from MCP server
14
- * agents-sdk codegen --server 'npx @mcp/notion' --name notion --out ./agents/@notion
15
- *
16
- * # Use a tool
17
- * agents-sdk use notion search_pages '{"query": "hello"}'
18
- *
19
- * # List tools on a codegenned agent
20
- * agents-sdk use notion --list
21
- * ```
22
- */
23
- export {};
24
- //# sourceMappingURL=cli.d.ts.map
package/dist/cli.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;GAoBG"}