@webiny/mcp 6.3.0-beta.4 → 6.4.0-beta.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/cli.js CHANGED
@@ -1,60 +1,61 @@
1
1
  import { startMcpServer } from "./cli/McpServer.js";
2
2
  import { configureMcp } from "./cli/ConfigureMcp.js";
3
- const args = process.argv.slice(2);
4
- const command = args[0];
3
+ const cli_args = process.argv.slice(2);
4
+ const command = cli_args[0];
5
5
  function parseFlags(args) {
6
- const flags = {};
7
- for (const arg of args) {
8
- if (!arg.startsWith("--")) {
9
- continue;
6
+ const flags = {};
7
+ for (const arg of args){
8
+ if (!arg.startsWith("--")) continue;
9
+ const [key, ...rest] = arg.slice(2).split("=");
10
+ const value = rest.length > 0 ? rest.join("=") : true;
11
+ const existing = flags[key];
12
+ if (void 0 !== existing) flags[key] = Array.isArray(existing) ? [
13
+ ...existing,
14
+ value
15
+ ] : [
16
+ existing,
17
+ value
18
+ ];
19
+ else flags[key] = value;
10
20
  }
11
- const [key, ...rest] = arg.slice(2).split("=");
12
- const value = rest.length > 0 ? rest.join("=") : true;
13
-
14
- // Support repeated flags as arrays.
15
- const existing = flags[key];
16
- if (existing !== undefined) {
17
- flags[key] = Array.isArray(existing) ? [...existing, value] : [existing, value];
18
- } else {
19
- flags[key] = value;
20
- }
21
- }
22
- return flags;
21
+ return flags;
23
22
  }
24
23
  async function main() {
25
- if (command === "serve") {
26
- const flags = parseFlags(args.slice(1));
27
- const additionalSkills = flags["additional-skills"];
28
- await startMcpServer({
29
- skills: typeof flags.skills === "string" ? flags.skills : undefined,
30
- additionalSkills: Array.isArray(additionalSkills) ? additionalSkills : typeof additionalSkills === "string" ? [additionalSkills] : undefined
31
- });
32
- } else if (command === "configure") {
33
- const agent = args[1] && !args[1].startsWith("--") ? args[1] : undefined;
34
- const flags = parseFlags(args.slice(1));
35
- await configureMcp({
36
- agent,
37
- instructions: flags.instructions === true
38
- });
39
- } else {
40
- console.log("Usage: webiny-mcp <command>");
41
- console.log("");
42
- console.log("Commands:");
43
- console.log(" serve Start the MCP server (stdio transport)");
44
- console.log(" configure Configure MCP server for a specific agent");
45
- console.log("");
46
- console.log("Examples:");
47
- console.log(" npx webiny-mcp serve");
48
- console.log(" npx webiny-mcp serve --additional-skills=./my-skills");
49
- console.log(" npx webiny-mcp configure claude");
50
- console.log(" npx webiny-mcp configure cursor");
51
- console.log(" npx webiny-mcp configure --instructions");
52
- process.exit(command ? 1 : 0);
53
- }
24
+ if ("serve" === command) {
25
+ const flags = parseFlags(cli_args.slice(1));
26
+ const additionalSkills = flags["additional-skills"];
27
+ await startMcpServer({
28
+ skills: "string" == typeof flags.skills ? flags.skills : void 0,
29
+ additionalSkills: Array.isArray(additionalSkills) ? additionalSkills : "string" == typeof additionalSkills ? [
30
+ additionalSkills
31
+ ] : void 0
32
+ });
33
+ } else if ("configure" === command) {
34
+ const agent = cli_args[1] && !cli_args[1].startsWith("--") ? cli_args[1] : void 0;
35
+ const flags = parseFlags(cli_args.slice(1));
36
+ await configureMcp({
37
+ agent,
38
+ instructions: true === flags.instructions
39
+ });
40
+ } else {
41
+ console.log("Usage: webiny-mcp <command>");
42
+ console.log("");
43
+ console.log("Commands:");
44
+ console.log(" serve Start the MCP server (stdio transport)");
45
+ console.log(" configure Configure MCP server for a specific agent");
46
+ console.log("");
47
+ console.log("Examples:");
48
+ console.log(" npx webiny-mcp serve");
49
+ console.log(" npx webiny-mcp serve --additional-skills=./my-skills");
50
+ console.log(" npx webiny-mcp configure claude");
51
+ console.log(" npx webiny-mcp configure cursor");
52
+ console.log(" npx webiny-mcp configure --instructions");
53
+ process.exit(command ? 1 : 0);
54
+ }
54
55
  }
55
- main().catch(err => {
56
- console.error(err);
57
- process.exit(1);
56
+ main().catch((err)=>{
57
+ console.error(err);
58
+ process.exit(1);
58
59
  });
59
60
 
60
61
  //# sourceMappingURL=cli.js.map
package/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["startMcpServer","configureMcp","args","process","argv","slice","command","parseFlags","flags","arg","startsWith","key","rest","split","value","length","join","existing","undefined","Array","isArray","main","additionalSkills","skills","agent","instructions","console","log","exit","catch","err","error"],"sources":["cli.ts"],"sourcesContent":["import { startMcpServer } from \"./cli/McpServer.js\";\nimport { configureMcp } from \"./cli/ConfigureMcp.js\";\n\nconst args = process.argv.slice(2);\nconst command = args[0];\n\nfunction parseFlags(args: string[]): Record<string, string | string[] | boolean> {\n const flags: Record<string, string | string[] | boolean> = {};\n for (const arg of args) {\n if (!arg.startsWith(\"--\")) {\n continue;\n }\n const [key, ...rest] = arg.slice(2).split(\"=\");\n const value = rest.length > 0 ? rest.join(\"=\") : true;\n\n // Support repeated flags as arrays.\n const existing = flags[key];\n if (existing !== undefined) {\n flags[key] = Array.isArray(existing)\n ? [...existing, value as string]\n : [existing as string, value as string];\n } else {\n flags[key] = value;\n }\n }\n return flags;\n}\n\nasync function main(): Promise<void> {\n if (command === \"serve\") {\n const flags = parseFlags(args.slice(1));\n const additionalSkills = flags[\"additional-skills\"];\n await startMcpServer({\n skills: typeof flags.skills === \"string\" ? flags.skills : undefined,\n additionalSkills: Array.isArray(additionalSkills)\n ? additionalSkills\n : typeof additionalSkills === \"string\"\n ? [additionalSkills]\n : undefined\n });\n } else if (command === \"configure\") {\n const agent = args[1] && !args[1].startsWith(\"--\") ? args[1] : undefined;\n const flags = parseFlags(args.slice(1));\n await configureMcp({\n agent,\n instructions: flags.instructions === true\n });\n } else {\n console.log(\"Usage: webiny-mcp <command>\");\n console.log(\"\");\n console.log(\"Commands:\");\n console.log(\" serve Start the MCP server (stdio transport)\");\n console.log(\" configure Configure MCP server for a specific agent\");\n console.log(\"\");\n console.log(\"Examples:\");\n console.log(\" npx webiny-mcp serve\");\n console.log(\" npx webiny-mcp serve --additional-skills=./my-skills\");\n console.log(\" npx webiny-mcp configure claude\");\n console.log(\" npx webiny-mcp configure cursor\");\n console.log(\" npx webiny-mcp configure --instructions\");\n process.exit(command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CAAC;IACxDxB,OAAO,CAACyB,IAAI,CAACtB,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;EACjC;AACJ;AAEAe,IAAI,CAAC,CAAC,CAACQ,KAAK,CAACC,GAAG,IAAI;EAChBJ,OAAO,CAACK,KAAK,CAACD,GAAG,CAAC;EAClB3B,OAAO,CAACyB,IAAI,CAAC,CAAC,CAAC;AACnB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"cli.js","sources":["../src/cli.ts"],"sourcesContent":["import { startMcpServer } from \"./cli/McpServer.js\";\nimport { configureMcp } from \"./cli/ConfigureMcp.js\";\n\nconst args = process.argv.slice(2);\nconst command = args[0];\n\nfunction parseFlags(args: string[]): Record<string, string | string[] | boolean> {\n const flags: Record<string, string | string[] | boolean> = {};\n for (const arg of args) {\n if (!arg.startsWith(\"--\")) {\n continue;\n }\n const [key, ...rest] = arg.slice(2).split(\"=\");\n const value = rest.length > 0 ? rest.join(\"=\") : true;\n\n // Support repeated flags as arrays.\n const existing = flags[key];\n if (existing !== undefined) {\n flags[key] = Array.isArray(existing)\n ? [...existing, value as string]\n : [existing as string, value as string];\n } else {\n flags[key] = value;\n }\n }\n return flags;\n}\n\nasync function main(): Promise<void> {\n if (command === \"serve\") {\n const flags = parseFlags(args.slice(1));\n const additionalSkills = flags[\"additional-skills\"];\n await startMcpServer({\n skills: typeof flags.skills === \"string\" ? flags.skills : undefined,\n additionalSkills: Array.isArray(additionalSkills)\n ? additionalSkills\n : typeof additionalSkills === \"string\"\n ? [additionalSkills]\n : undefined\n });\n } else if (command === \"configure\") {\n const agent = args[1] && !args[1].startsWith(\"--\") ? args[1] : undefined;\n const flags = parseFlags(args.slice(1));\n await configureMcp({\n agent,\n instructions: flags.instructions === true\n });\n } else {\n console.log(\"Usage: webiny-mcp <command>\");\n console.log(\"\");\n console.log(\"Commands:\");\n console.log(\" serve Start the MCP server (stdio transport)\");\n console.log(\" configure Configure MCP server for a specific agent\");\n console.log(\"\");\n console.log(\"Examples:\");\n console.log(\" npx webiny-mcp serve\");\n console.log(\" npx webiny-mcp serve --additional-skills=./my-skills\");\n console.log(\" npx webiny-mcp configure claude\");\n console.log(\" npx webiny-mcp configure cursor\");\n console.log(\" npx webiny-mcp configure --instructions\");\n process.exit(command ? 1 : 0);\n }\n}\n\nmain().catch(err => {\n console.error(err);\n process.exit(1);\n});\n"],"names":["args","process","command","parseFlags","flags","arg","key","rest","value","existing","undefined","Array","main","additionalSkills","startMcpServer","agent","configureMcp","console","err"],"mappings":";;AAGA,MAAMA,WAAOC,QAAQ,IAAI,CAAC,KAAK,CAAC;AAChC,MAAMC,UAAUF,QAAI,CAAC,EAAE;AAEvB,SAASG,WAAWH,IAAc;IAC9B,MAAMI,QAAqD,CAAC;IAC5D,KAAK,MAAMC,OAAOL,KAAM;QACpB,IAAI,CAACK,IAAI,UAAU,CAAC,OAChB;QAEJ,MAAM,CAACC,KAAK,GAAGC,KAAK,GAAGF,IAAI,KAAK,CAAC,GAAG,KAAK,CAAC;QAC1C,MAAMG,QAAQD,KAAK,MAAM,GAAG,IAAIA,KAAK,IAAI,CAAC,OAAO;QAGjD,MAAME,WAAWL,KAAK,CAACE,IAAI;QAC3B,IAAIG,AAAaC,WAAbD,UACAL,KAAK,CAACE,IAAI,GAAGK,MAAM,OAAO,CAACF,YACrB;eAAIA;YAAUD;SAAgB,GAC9B;YAACC;YAAoBD;SAAgB;aAE3CJ,KAAK,CAACE,IAAI,GAAGE;IAErB;IACA,OAAOJ;AACX;AAEA,eAAeQ;IACX,IAAIV,AAAY,YAAZA,SAAqB;QACrB,MAAME,QAAQD,WAAWH,SAAK,KAAK,CAAC;QACpC,MAAMa,mBAAmBT,KAAK,CAAC,oBAAoB;QACnD,MAAMU,eAAe;YACjB,QAAQ,AAAwB,YAAxB,OAAOV,MAAM,MAAM,GAAgBA,MAAM,MAAM,GAAGM;YAC1D,kBAAkBC,MAAM,OAAO,CAACE,oBAC1BA,mBACA,AAA4B,YAA5B,OAAOA,mBACL;gBAACA;aAAiB,GAClBH;QACZ;IACJ,OAAO,IAAIR,AAAY,gBAAZA,SAAyB;QAChC,MAAMa,QAAQf,QAAI,CAAC,EAAE,IAAI,CAACA,QAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQA,QAAI,CAAC,EAAE,GAAGU;QAC/D,MAAMN,QAAQD,WAAWH,SAAK,KAAK,CAAC;QACpC,MAAMgB,aAAa;YACfD;YACA,cAAcX,AAAuB,SAAvBA,MAAM,YAAY;QACpC;IACJ,OAAO;QACHa,QAAQ,GAAG,CAAC;QACZA,QAAQ,GAAG,CAAC;QACZA,QAAQ,GAAG,CAAC;QACZA,QAAQ,GAAG,CAAC;QACZA,QAAQ,GAAG,CAAC;QACZA,QAAQ,GAAG,CAAC;QACZA,QAAQ,GAAG,CAAC;QACZA,QAAQ,GAAG,CAAC;QACZA,QAAQ,GAAG,CAAC;QACZA,QAAQ,GAAG,CAAC;QACZA,QAAQ,GAAG,CAAC;QACZA,QAAQ,GAAG,CAAC;QACZhB,QAAQ,IAAI,CAACC,UAAU,IAAI;IAC/B;AACJ;AAEAU,OAAO,KAAK,CAACM,CAAAA;IACTD,QAAQ,KAAK,CAACC;IACdjB,QAAQ,IAAI,CAAC;AACjB"}
package/index.js CHANGED
@@ -1,11 +1,4 @@
1
- // Ui interface and console implementation
2
-
3
1
  export { ConsoleUi } from "./ui.js";
4
-
5
- // Core functions
6
2
  export { startMcpServer } from "./cli/McpServer.js";
7
3
  export { configureMcp } from "./cli/ConfigureMcp.js";
8
- // Agent discovery
9
4
  export { discoverAgents, discoverPresets } from "./agents/discover.js";
10
-
11
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/mcp",
3
- "version": "6.3.0-beta.4",
3
+ "version": "6.4.0-beta.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./index.js",
@@ -23,12 +23,12 @@
23
23
  "dependencies": {
24
24
  "@modelcontextprotocol/sdk": "1.29.0",
25
25
  "front-matter": "4.0.2",
26
- "zod": "4.3.6"
26
+ "zod": "4.4.3"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/lodash": "4.17.24",
30
30
  "@types/ncp": "2.0.8",
31
- "@webiny/build-tools": "6.3.0-beta.4",
31
+ "@webiny/build-tools": "6.4.0-beta.0",
32
32
  "execa": "5.1.1",
33
33
  "tsx": "4.21.0",
34
34
  "typescript": "6.0.3"
@@ -36,5 +36,5 @@
36
36
  "scripts": {
37
37
  "prepublishOnly": "bash ./prepublishOnly.sh"
38
38
  },
39
- "gitHead": "7cefe15431dbd65504e1f58147dc9e55bcbfa693"
39
+ "gitHead": "a545d7529828af07d08d49c3da1bcb967483b9ce"
40
40
  }
@@ -2,7 +2,7 @@
2
2
  name: webiny-api-catalog
3
3
  context: webiny-api
4
4
  description: >
5
- api — 21 abstractions.
5
+ api — 22 abstractions.
6
6
  ---
7
7
 
8
8
  # api
@@ -137,3 +137,8 @@ Inspired by functional programming constructs like `Either` or `Result` in other
137
137
  **Source:** `@webiny/handler/abstractions/Route.ts`
138
138
 
139
139
  ---
140
+ **Name:** `WebsocketService`
141
+ **Import:** `import { WebsocketService } from "webiny/api"`
142
+ **Source:** `@webiny/api-websockets/features/WebsocketService/index.ts`
143
+
144
+ ---
@@ -2,7 +2,7 @@
2
2
  name: webiny-api-cms-catalog
3
3
  context: webiny-api
4
4
  description: >
5
- API — Headless CMS — 124 abstractions.
5
+ API — Headless CMS — 127 abstractions.
6
6
  Entry, model, and group event handlers and use cases.
7
7
  ---
8
8
 
@@ -294,6 +294,12 @@ Provides storageId, list, validation, renderer, and other data-field methods.
294
294
  **Source:** `@webiny/api-headless-cms/features/contentEntry/UpdateEntry/events.ts`
295
295
  **Description:** Hook into entry lifecycle after an entry is updated.
296
296
 
297
+ ---
298
+ **Name:** `EntryAfterUpdateRevisionDescriptionEventHandler`
299
+ **Import:** `import { EntryAfterUpdateRevisionDescriptionEventHandler } from "webiny/api/cms/entry"`
300
+ **Source:** `@webiny/api-headless-cms/features/contentEntry/UpdateRevisionDescription/events.ts`
301
+ **Description:** Hook into entry lifecycle after an entry is updated.
302
+
297
303
  ---
298
304
  **Name:** `EntryBeforeCreateEventHandler`
299
305
  **Import:** `import { EntryBeforeCreateEventHandler } from "webiny/api/cms/entry"`
@@ -348,6 +354,12 @@ Provides storageId, list, validation, renderer, and other data-field methods.
348
354
  **Source:** `@webiny/api-headless-cms/features/contentEntry/UpdateEntry/events.ts`
349
355
  **Description:** Hook into entry lifecycle before an entry is updated.
350
356
 
357
+ ---
358
+ **Name:** `EntryBeforeUpdateRevisionDescriptionEventHandler`
359
+ **Import:** `import { EntryBeforeUpdateRevisionDescriptionEventHandler } from "webiny/api/cms/entry"`
360
+ **Source:** `@webiny/api-headless-cms/features/contentEntry/UpdateRevisionDescription/events.ts`
361
+ **Description:** Hook into entry lifecycle before an entry is updated.
362
+
351
363
  ---
352
364
  **Name:** `EntryId`
353
365
  **Import:** `import { EntryId } from "webiny/api/cms/entry"`
@@ -741,6 +753,12 @@ Call .private() or .public() to get the appropriate typed builder.
741
753
  **Source:** `@webiny/api-headless-cms/features/contentModel/UpdateModel/abstractions.ts`
742
754
  **Description:** Update a content model.
743
755
 
756
+ ---
757
+ **Name:** `UpdateRevisionDescriptionUseCase`
758
+ **Import:** `import { UpdateRevisionDescriptionUseCase } from "webiny/api/cms/entry"`
759
+ **Source:** `@webiny/api-headless-cms/features/contentEntry/UpdateRevisionDescription/abstractions.ts`
760
+ **Description:** Update a content revision description.
761
+
744
762
  ---
745
763
  **Name:** `UpdateSingletonEntryUseCase`
746
764
  **Import:** `import { UpdateSingletonEntryUseCase } from "webiny/api/cms/entry"`
package/ui.js CHANGED
@@ -1,31 +1,23 @@
1
- /**
2
- * Minimal UI interface for MCP output.
3
- * This is a structural subtype of @webiny/cli-core's IUiService,
4
- * so Webiny's Ui can be passed directly without an adapter.
5
- */
6
-
7
- /**
8
- * Console-based Ui for standalone usage (no @webiny/cli-core needed).
9
- */
10
- export class ConsoleUi {
11
- info(text, ...args) {
12
- console.log(text, ...args);
13
- }
14
- success(text, ...args) {
15
- console.log(text, ...args);
16
- }
17
- error(text, ...args) {
18
- console.error(text, ...args);
19
- }
20
- warning(text, ...args) {
21
- console.warn(text, ...args);
22
- }
23
- text(text) {
24
- console.log(text);
25
- }
26
- emptyLine() {
27
- console.log();
28
- }
1
+ class ConsoleUi {
2
+ info(text, ...args) {
3
+ console.log(text, ...args);
4
+ }
5
+ success(text, ...args) {
6
+ console.log(text, ...args);
7
+ }
8
+ error(text, ...args) {
9
+ console.error(text, ...args);
10
+ }
11
+ warning(text, ...args) {
12
+ console.warn(text, ...args);
13
+ }
14
+ text(text) {
15
+ console.log(text);
16
+ }
17
+ emptyLine() {
18
+ console.log();
19
+ }
29
20
  }
21
+ export { ConsoleUi };
30
22
 
31
23
  //# sourceMappingURL=ui.js.map
package/ui.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["ConsoleUi","info","text","args","console","log","success","error","warning","warn","emptyLine"],"sources":["ui.ts"],"sourcesContent":["/**\n * Minimal UI interface for MCP output.\n * This is a structural subtype of @webiny/cli-core's IUiService,\n * so Webiny's Ui can be passed directly without an adapter.\n */\nexport interface IUi {\n info(text: string, ...args: any[]): void;\n success(text: string, ...args: any[]): void;\n error(text: string, ...args: any[]): void;\n warning(text: string, ...args: any[]): void;\n text(text: string): void;\n emptyLine(): void;\n}\n\n/**\n * Console-based Ui for standalone usage (no @webiny/cli-core needed).\n */\nexport class ConsoleUi implements IUi {\n info(text: string, ...args: any[]): void {\n console.log(text, ...args);\n }\n\n success(text: string, ...args: any[]): void {\n console.log(text, ...args);\n }\n\n error(text: string, ...args: any[]): void {\n console.error(text, ...args);\n }\n\n warning(text: string, ...args: any[]): void {\n console.warn(text, ...args);\n }\n\n text(text: string): void {\n console.log(text);\n }\n\n emptyLine(): void {\n console.log();\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA,OAAO,MAAMA,SAAS,CAAgB;EAClCC,IAAIA,CAACC,IAAY,EAAE,GAAGC,IAAW,EAAQ;IACrCC,OAAO,CAACC,GAAG,CAACH,IAAI,EAAE,GAAGC,IAAI,CAAC;EAC9B;EAEAG,OAAOA,CAACJ,IAAY,EAAE,GAAGC,IAAW,EAAQ;IACxCC,OAAO,CAACC,GAAG,CAACH,IAAI,EAAE,GAAGC,IAAI,CAAC;EAC9B;EAEAI,KAAKA,CAACL,IAAY,EAAE,GAAGC,IAAW,EAAQ;IACtCC,OAAO,CAACG,KAAK,CAACL,IAAI,EAAE,GAAGC,IAAI,CAAC;EAChC;EAEAK,OAAOA,CAACN,IAAY,EAAE,GAAGC,IAAW,EAAQ;IACxCC,OAAO,CAACK,IAAI,CAACP,IAAI,EAAE,GAAGC,IAAI,CAAC;EAC/B;EAEAD,IAAIA,CAACA,IAAY,EAAQ;IACrBE,OAAO,CAACC,GAAG,CAACH,IAAI,CAAC;EACrB;EAEAQ,SAASA,CAAA,EAAS;IACdN,OAAO,CAACC,GAAG,CAAC,CAAC;EACjB;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"ui.js","sources":["../src/ui.ts"],"sourcesContent":["/**\n * Minimal UI interface for MCP output.\n * This is a structural subtype of @webiny/cli-core's IUiService,\n * so Webiny's Ui can be passed directly without an adapter.\n */\nexport interface IUi {\n info(text: string, ...args: any[]): void;\n success(text: string, ...args: any[]): void;\n error(text: string, ...args: any[]): void;\n warning(text: string, ...args: any[]): void;\n text(text: string): void;\n emptyLine(): void;\n}\n\n/**\n * Console-based Ui for standalone usage (no @webiny/cli-core needed).\n */\nexport class ConsoleUi implements IUi {\n info(text: string, ...args: any[]): void {\n console.log(text, ...args);\n }\n\n success(text: string, ...args: any[]): void {\n console.log(text, ...args);\n }\n\n error(text: string, ...args: any[]): void {\n console.error(text, ...args);\n }\n\n warning(text: string, ...args: any[]): void {\n console.warn(text, ...args);\n }\n\n text(text: string): void {\n console.log(text);\n }\n\n emptyLine(): void {\n console.log();\n }\n}\n"],"names":["ConsoleUi","text","args","console"],"mappings":"AAiBO,MAAMA;IACT,KAAKC,IAAY,EAAE,GAAGC,IAAW,EAAQ;QACrCC,QAAQ,GAAG,CAACF,SAASC;IACzB;IAEA,QAAQD,IAAY,EAAE,GAAGC,IAAW,EAAQ;QACxCC,QAAQ,GAAG,CAACF,SAASC;IACzB;IAEA,MAAMD,IAAY,EAAE,GAAGC,IAAW,EAAQ;QACtCC,QAAQ,KAAK,CAACF,SAASC;IAC3B;IAEA,QAAQD,IAAY,EAAE,GAAGC,IAAW,EAAQ;QACxCC,QAAQ,IAAI,CAACF,SAASC;IAC1B;IAEA,KAAKD,IAAY,EAAQ;QACrBE,QAAQ,GAAG,CAACF;IAChB;IAEA,YAAkB;QACdE,QAAQ,GAAG;IACf;AACJ"}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { IUi } from \"../ui.js\";\n\nexport interface AgentPreset {\n slug: string;\n displayName: string;\n configFile: string;\n configNote?: string;\n hintFile?: string;\n hintNote?: string;\n}\n\nexport interface AgentModule {\n preset: AgentPreset;\n init: (params: { ui: IUi; cwd: string }) => Promise<void>;\n}\n"],"mappings":"","ignoreList":[]}
package/bin.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["bin.js"],"sourcesContent":["#!/usr/bin/env node\nimport \"./cli.js\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
package/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"names":["ConsoleUi","startMcpServer","configureMcp","discoverAgents","discoverPresets"],"sources":["index.ts"],"sourcesContent":["// Ui interface and console implementation\nexport type { IUi } from \"./ui.js\";\nexport { ConsoleUi } from \"./ui.js\";\n\n// Core functions\nexport { startMcpServer } from \"./cli/McpServer.js\";\nexport type { IMcpServerParams } from \"./cli/McpServer.js\";\nexport { configureMcp } from \"./cli/ConfigureMcp.js\";\nexport type { IConfigureMcpParams } from \"./cli/ConfigureMcp.js\";\n\n// Agent discovery\nexport { discoverAgents, discoverPresets } from \"./agents/discover.js\";\nexport type { AgentPreset, AgentModule } from \"./agents/types.js\";\n"],"mappings":"AAAA;;AAEA,SAASA,SAAS;;AAElB;AACA,SAASC,cAAc;AAEvB,SAASC,YAAY;AAGrB;AACA,SAASC,cAAc,EAAEC,eAAe","ignoreList":[]}