@imqueue/mcp 1.0.1 → 1.1.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 CHANGED
@@ -9,8 +9,25 @@ A [Model Context Protocol](https://modelcontextprotocol.io) server for **[@imque
9
9
  | `search_docs` | Search the official docs (guides, tutorial, CLI manual, API reference, articles) and return the most relevant pages + URLs. |
10
10
  | `get_doc` | Fetch the full markdown of a doc page by URL. |
11
11
  | `list_packages` | List the main @imqueue packages with install commands. |
12
- | `scaffold_service` | Generate an `IMQService` subclass with `@expose()`d, JSDoc-typed methods + a bootstrap. |
13
- | `scaffold_client` | Show how to generate and use the fully-typed client for a service. |
12
+ | `scaffold_service` | Generate an `IMQService` subclass with `@expose()`d, JSDoc-typed methods + a bootstrap (offline, no CLI needed). |
13
+ | `scaffold_client` | Show how to generate and use the fully-typed client for a service (offline). |
14
+
15
+ ### CLI-backed tools (require `@imqueue/cli` on PATH)
16
+
17
+ When the `imq` CLI is installed locally, these drive the **real** CLI:
18
+
19
+ | Tool | What it does |
20
+ |---|---|
21
+ | `cli_status` | Detect `imq` and report its version. |
22
+ | `cli_install` | Install `@imqueue/cli` globally (`npm i -g @imqueue/cli`) when it's missing. |
23
+ | `cli_help` | `imq <command> --help` — exact, version-accurate flags (no side effects). |
24
+ | `create_service` | `imq service create` — **dry-run by default** (writes nothing); pass `apply: true` to actually create the project. |
25
+ | `generate_client` | `imq client generate <Service>` — the real typed client (the service must be running). |
26
+ | `fleet` | `imq ctl <start\|stop\|restart\|status>` — manage a directory of service repos. `status` is read-only. |
27
+ | `config` | `imq config <check\|get\|set\|init>` — read/write CLI configuration (`set` for automation; `init` is interactive). |
28
+ | `logs` | `imq log` — `dump` current fleet logs (never follows; capped) or `clean` them. |
29
+
30
+ Calls run with stdin closed and a timeout, so a missing-flag prompt fails fast instead of hanging. If `imq` isn't installed, run `cli_install` or use the offline `scaffold_*` tools.
14
31
 
15
32
  Docs are fetched live from imqueue.org's machine-readable feeds (`/llms.txt`, per-page `…/index.md` mirrors), so the server never ships stale content. It only ever fetches `imqueue.org`.
16
33
 
package/SPEC.md CHANGED
@@ -9,10 +9,14 @@ hallucinating an API. This is the GEO (Generative Engine Optimization) counterpa
9
9
  to SEO: instead of ranking in a search page, we rank **at code-time**, inside the
10
10
  tools developers already use.
11
11
 
12
- Two capabilities, five tools:
12
+ Three capabilities, thirteen tools:
13
13
 
14
14
  - **Docs access** — `search_docs`, `get_doc`, `list_packages`
15
- - **Scaffolding** — `scaffold_service`, `scaffold_client`
15
+ - **Offline scaffolding** — `scaffold_service`, `scaffold_client` (templates, no deps)
16
+ - **CLI bridge** — `cli_status`, `cli_install`, `cli_help`, `create_service`,
17
+ `generate_client`, `fleet` (`imq ctl`), `config` (`imq config`), `logs` (`imq log`)
18
+ (drive the installed `imq` binary — install it, create projects, generate clients,
19
+ manage the local fleet and CLI configuration)
16
20
 
17
21
  ## 2. Architecture
18
22
 
@@ -67,6 +71,24 @@ starter template. Points to `imq service create` for a fully provider-wired proj
67
71
  (`imq client generate <Name>`), so types never drift. The tool returns that command
68
72
  plus an illustrative usage snippet (it does not fabricate a client that could go stale).
69
73
 
74
+ ### CLI bridge — `cli_status`, `cli_help`, `create_service`, `generate_client`
75
+ The server runs locally, so when `@imqueue/cli` is on PATH it can drive the **real**
76
+ `imq` (see `src/cli.ts`). Safety posture:
77
+ - Every call runs `imq` with **stdin closed and a timeout**, so an interactive prompt
78
+ (a missing flag) fails fast with guidance rather than hanging the server.
79
+ - `create_service` runs `imq service create … --dry-run` **by default** (writes
80
+ nothing); a real run requires an explicit `apply: true` — an agent must never
81
+ create repos / push to remotes silently. `cli_help` surfaces the exact flags to
82
+ pass so the run is non-interactive.
83
+ - `generate_client` runs `imq client generate` (the service must be running).
84
+ - `cli_install` runs `npm install -g @imqueue/cli` to bootstrap the CLI when absent.
85
+ - `fleet` wraps `imq ctl <start|stop|restart|status>` (status is read-only; the
86
+ others change running processes).
87
+ - `config` wraps `imq config <check|get|set|init>` (get/check read-only; set writes a
88
+ single value; init is interactive so automation should prefer set).
89
+ - If `imq` is absent, the tools return an install hint and the offline `scaffold_*`
90
+ tools remain available.
91
+
70
92
  ## 4. Input schemas (zod)
71
93
 
72
94
  - `search_docs`: `{ query: string, limit?: 1..20 }`
package/dist/cli.d.ts ADDED
@@ -0,0 +1,47 @@
1
+ export interface CliResult {
2
+ ok: boolean;
3
+ code: number | null;
4
+ output: string;
5
+ }
6
+ /** Run `imq` with args in cwd. Never rejects — returns a structured result. */
7
+ export declare function runImq(args: string[], cwd?: string, timeoutMs?: number): Promise<CliResult>;
8
+ /** Install @imqueue/cli globally via npm. */
9
+ export declare function installCli(version?: string): Promise<string>;
10
+ /** Control the local services fleet: `imq ctl <start|stop|restart|status>`. */
11
+ export declare function fleet(opts: {
12
+ action: "start" | "stop" | "restart" | "status";
13
+ path?: string;
14
+ services?: string;
15
+ update?: boolean;
16
+ calm?: boolean;
17
+ verbose?: boolean;
18
+ cwd?: string;
19
+ }): Promise<string>;
20
+ /** Manage CLI configuration: `imq config <check|get|set|init>`. */
21
+ export declare function config(opts: {
22
+ action: "check" | "get" | "set" | "init";
23
+ option?: string;
24
+ value?: string;
25
+ cwd?: string;
26
+ }): Promise<string>;
27
+ /** Read (dump) or clean fleet logs: `imq log`. Never follows (that would hang). */
28
+ export declare function logs(opts: {
29
+ action?: "dump" | "clean";
30
+ services?: string;
31
+ prefix?: boolean;
32
+ cwd?: string;
33
+ }): Promise<string>;
34
+ /** Detect the CLI and its version. */
35
+ export declare function cliStatus(): Promise<string>;
36
+ /** Pass through `imq [command] --help` so the agent learns exact, current flags. */
37
+ export declare function cliHelp(command?: string): Promise<string>;
38
+ /** Preview or (with apply) run `imq service create`. */
39
+ export declare function createService(opts: {
40
+ name: string;
41
+ path?: string;
42
+ flags?: string[];
43
+ cwd?: string;
44
+ apply?: boolean;
45
+ }): Promise<string>;
46
+ /** Generate the real typed client from a running service. */
47
+ export declare function generateClient(service: string, path?: string, cwd?: string): Promise<string>;
package/dist/cli.js ADDED
@@ -0,0 +1,142 @@
1
+ // Bridge to the installed @imqueue/cli (`imq`). The MCP server runs locally, so
2
+ // when the developer has `imq` on PATH we can drive the real CLI instead of only
3
+ // emitting templates.
4
+ //
5
+ // Safety posture:
6
+ // * stdin is closed and every call is time-boxed, so an interactive prompt
7
+ // (a missing flag) fails fast instead of hanging the server.
8
+ // * `imq service create` runs with --dry-run UNLESS the caller explicitly opts
9
+ // in (apply: true) — an agent must not create repos / push to remotes silently.
10
+ import { execFile } from "node:child_process";
11
+ const NOT_FOUND = "The `imq` CLI was not found on PATH. Install it with `npm i -g @imqueue/cli`, " +
12
+ "or use scaffold_service/scaffold_client for offline code templates.";
13
+ /** Run any binary with args. Never rejects — returns a structured result. */
14
+ function exec(file, args, opts = {}) {
15
+ const { cwd, timeoutMs = 60_000, notFound = `\`${file}\` was not found on PATH.` } = opts;
16
+ return new Promise((resolve) => {
17
+ execFile(file, args, { cwd: cwd || process.cwd(), timeout: timeoutMs, encoding: "utf8", windowsHide: true }, (err, stdout, stderr) => {
18
+ const e = err;
19
+ if (e && e.code === "ENOENT") {
20
+ resolve({ ok: false, code: null, output: notFound });
21
+ return;
22
+ }
23
+ const out = `${stdout || ""}${stderr || ""}`.trim();
24
+ if (e && e.killed) {
25
+ resolve({ ok: false, code: null, output: `${file} timed out after ${timeoutMs}ms. If it was waiting for input, pass the required flags/values (see cli_help) instead.\n\n${out}` });
26
+ return;
27
+ }
28
+ const code = typeof e?.code === "number" ? e.code : e ? 1 : 0;
29
+ resolve({ ok: !e, code, output: out || "(no output)" });
30
+ });
31
+ });
32
+ }
33
+ /** Run `imq` with args in cwd. Never rejects — returns a structured result. */
34
+ export function runImq(args, cwd, timeoutMs = 60_000) {
35
+ return exec("imq", args, { cwd, timeoutMs, notFound: NOT_FOUND });
36
+ }
37
+ /** Install @imqueue/cli globally via npm. */
38
+ export async function installCli(version = "latest") {
39
+ const spec = `@imqueue/cli@${version}`;
40
+ const r = await exec("npm", ["install", "-g", spec], {
41
+ timeoutMs: 180_000,
42
+ notFound: "npm was not found on PATH.",
43
+ });
44
+ if (r.ok) {
45
+ return `Installed ${spec} globally. Run cli_status to confirm, then use create_service / generate_client / fleet / config.\n\n${r.output}`;
46
+ }
47
+ return `Failed to install ${spec} (npm exit ${r.code}). A global install may need a user-writable npm prefix (e.g. via nvm) or elevated permissions.\n\n${r.output}`;
48
+ }
49
+ /** Control the local services fleet: `imq ctl <start|stop|restart|status>`. */
50
+ export async function fleet(opts) {
51
+ const args = ["ctl", opts.action];
52
+ if (opts.path)
53
+ args.push("-p", opts.path);
54
+ if (opts.services)
55
+ args.push("-s", opts.services);
56
+ if (opts.update)
57
+ args.push("-u");
58
+ if (opts.calm)
59
+ args.push("-c");
60
+ if (opts.verbose)
61
+ args.push("-v");
62
+ const timeoutMs = opts.action === "status" ? 30_000 : 120_000;
63
+ const r = await runImq(args, opts.cwd, timeoutMs);
64
+ return `\`imq ${args.join(" ")}\`\n\n${r.output}`;
65
+ }
66
+ /** Manage CLI configuration: `imq config <check|get|set|init>`. */
67
+ export async function config(opts) {
68
+ const args = ["config", opts.action];
69
+ if (opts.action === "get" && opts.option)
70
+ args.push(opts.option);
71
+ if (opts.action === "set") {
72
+ if (!opts.option || opts.value === undefined) {
73
+ return "config set requires both `option` and `value` (e.g. option='ci.provider', value='github-actions'). Nested keys use a dot-path.";
74
+ }
75
+ args.push(opts.option, opts.value);
76
+ }
77
+ const r = await runImq(args, opts.cwd, 30_000);
78
+ return `\`imq ${args.join(" ")}\`\n\n${r.output}`;
79
+ }
80
+ const LOG_MAX = 20_000; // cap dumped log output so it can't flood the agent context
81
+ /** Read (dump) or clean fleet logs: `imq log`. Never follows (that would hang). */
82
+ export async function logs(opts) {
83
+ if ((opts.action ?? "dump") === "clean") {
84
+ const r = await runImq(["log", "--clean"], opts.cwd, 30_000);
85
+ return `\`imq log --clean\`\n\n${r.output}`;
86
+ }
87
+ const args = ["log"];
88
+ if (opts.services) {
89
+ args.push(...opts.services.split(",").map((s) => s.trim()).filter(Boolean));
90
+ }
91
+ args.push("--no-follow"); // always bounded — the streaming --follow default is unsafe here
92
+ if (opts.prefix === false)
93
+ args.push("--no-prefix");
94
+ const r = await runImq(args, opts.cwd, 30_000);
95
+ let out = r.output;
96
+ let note = "";
97
+ if (out.length > LOG_MAX) {
98
+ out = out.slice(-LOG_MAX);
99
+ note = ` (truncated to last ${LOG_MAX} chars)`;
100
+ }
101
+ return `\`imq ${args.join(" ")}\`${note}\n\n${out}`;
102
+ }
103
+ /** Detect the CLI and its version. */
104
+ export async function cliStatus() {
105
+ const r = await runImq(["--version"], undefined, 15_000);
106
+ if (!r.ok)
107
+ return r.output;
108
+ return `imq is available (version ${r.output}).`;
109
+ }
110
+ /** Pass through `imq [command] --help` so the agent learns exact, current flags. */
111
+ export async function cliHelp(command) {
112
+ const args = command ? [...command.split(/\s+/), "--help"] : ["--help"];
113
+ const r = await runImq(args, undefined, 15_000);
114
+ return r.output;
115
+ }
116
+ /** Preview or (with apply) run `imq service create`. */
117
+ export async function createService(opts) {
118
+ const args = ["service", "create", opts.name];
119
+ if (opts.path)
120
+ args.push(opts.path);
121
+ if (opts.flags?.length)
122
+ args.push(...opts.flags);
123
+ if (!opts.apply)
124
+ args.push("--dry-run");
125
+ const r = await runImq(args, opts.cwd, opts.apply ? 120_000 : 30_000);
126
+ const header = opts.apply
127
+ ? "Ran `imq service create` (apply mode — files were written):"
128
+ : "Dry-run plan (nothing was written). Re-call with apply: true to create it for real:";
129
+ return `${header}\n\n\`imq ${args.join(" ")}\`\n\n${r.output}`;
130
+ }
131
+ /** Generate the real typed client from a running service. */
132
+ export async function generateClient(service, path, cwd) {
133
+ const args = ["client", "generate", service];
134
+ if (path)
135
+ args.push(path);
136
+ const r = await runImq(args, cwd, 90_000);
137
+ const note = r.ok
138
+ ? "Generated the typed client."
139
+ : "Client generation needs the target service to be RUNNING (it introspects the live service). Start the service, then retry.";
140
+ return `${note}\n\n\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CAAC"}
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ import { createRequire } from "node:module";
8
8
  import { searchDocs, getDoc } from "./docs.js";
9
9
  import { renderPackages } from "./packages.js";
10
10
  import { scaffoldService, scaffoldClient } from "./scaffold.js";
11
+ import { cliStatus, cliHelp, createService, generateClient, installCli, fleet, config, logs } from "./cli.js";
11
12
  // Read the version from package.json at runtime so it always matches the
12
13
  // published package (no hardcoded string to keep in sync).
13
14
  const require = createRequire(import.meta.url);
@@ -110,6 +111,135 @@ server.registerTool("scaffold_client", {
110
111
  return fail(e);
111
112
  }
112
113
  });
114
+ // --- CLI-backed tools (require the `imq` binary on PATH) --------------------
115
+ server.registerTool("cli_status", {
116
+ title: "Check the @imqueue CLI",
117
+ description: "Detect whether the `imq` CLI (@imqueue/cli) is installed locally and report its version. Call this before create_service/generate_client; if it's missing, fall back to scaffold_service/scaffold_client.",
118
+ inputSchema: {},
119
+ }, async () => {
120
+ try {
121
+ return text(await cliStatus());
122
+ }
123
+ catch (e) {
124
+ return fail(e);
125
+ }
126
+ });
127
+ server.registerTool("cli_help", {
128
+ title: "Show @imqueue CLI help",
129
+ description: "Run `imq [command] --help` and return the exact, version-accurate flags for a command (e.g. 'service create', 'client generate'). Use this to discover the flags to pass to create_service. No side effects.",
130
+ inputSchema: {
131
+ command: z.string().optional().describe("A subcommand, e.g. 'service create' (omit for top-level help)"),
132
+ },
133
+ }, async ({ command }) => {
134
+ try {
135
+ return text(await cliHelp(command));
136
+ }
137
+ catch (e) {
138
+ return fail(e);
139
+ }
140
+ });
141
+ server.registerTool("create_service", {
142
+ title: "Create an @imqueue service with the CLI",
143
+ description: "Scaffold a real, provider-wired @imqueue service via `imq service create`. Runs as a DRY-RUN by default (shows the plan, writes nothing). Set apply=true to actually create it — that writes files and may init git / configure CI / push to a remote, so only apply with the user's intent. Pass CLI flags (see cli_help) to avoid interactive prompts. Requires `imq` (see cli_status).",
144
+ inputSchema: {
145
+ name: z.string().describe("Service name, e.g. 'user'"),
146
+ path: z.string().optional().describe("Target directory (optional)"),
147
+ flags: z.array(z.string()).optional().describe("Extra `imq` flags, e.g. ['--vcs','github','--ci','github-actions']. Get exact flags from cli_help."),
148
+ cwd: z.string().optional().describe("Working directory to run in (defaults to the server's cwd)"),
149
+ apply: z.boolean().optional().describe("false/omitted = dry-run preview; true = actually create (writes files)"),
150
+ },
151
+ }, async ({ name, path, flags, cwd, apply }) => {
152
+ try {
153
+ return text(await createService({ name, path, flags, cwd, apply }));
154
+ }
155
+ catch (e) {
156
+ return fail(e);
157
+ }
158
+ });
159
+ server.registerTool("generate_client", {
160
+ title: "Generate a typed client with the CLI",
161
+ description: "Run `imq client generate <Service>` to emit the real, fully-typed client. The target service must be RUNNING (the CLI introspects the live service). Requires `imq` (see cli_status).",
162
+ inputSchema: {
163
+ service: z.string().describe("Service name to generate a client for, e.g. 'User' / 'UserService'"),
164
+ path: z.string().optional().describe("Output directory (optional)"),
165
+ cwd: z.string().optional().describe("Working directory to run in"),
166
+ },
167
+ }, async ({ service, path, cwd }) => {
168
+ try {
169
+ return text(await generateClient(service, path, cwd));
170
+ }
171
+ catch (e) {
172
+ return fail(e);
173
+ }
174
+ });
175
+ server.registerTool("cli_install", {
176
+ title: "Install the @imqueue CLI",
177
+ description: "Install @imqueue/cli globally via `npm install -g @imqueue/cli`. Use when cli_status reports it's missing. A global install may require a user-writable npm prefix or elevated permissions.",
178
+ inputSchema: {
179
+ version: z.string().optional().describe("npm version/tag to install (default 'latest')"),
180
+ },
181
+ }, async ({ version }) => {
182
+ try {
183
+ return text(await installCli(version));
184
+ }
185
+ catch (e) {
186
+ return fail(e);
187
+ }
188
+ });
189
+ server.registerTool("fleet", {
190
+ title: "Control the local @imqueue services fleet",
191
+ description: "Run `imq ctl <action>` over a directory of service repositories. `status` is read-only; `start`/`stop`/`restart` change running processes. Requires `imq` (see cli_status).",
192
+ inputSchema: {
193
+ action: z.enum(["start", "stop", "restart", "status"]).describe("What to do to the fleet"),
194
+ path: z.string().optional().describe("Directory containing the service repositories (default '.')"),
195
+ services: z.string().optional().describe("Comma-separated service names; omit to scan the path"),
196
+ update: z.boolean().optional().describe("git pull each service before starting (start/restart)"),
197
+ calm: z.boolean().optional().describe("Start services one at a time, waiting for each to be ready"),
198
+ verbose: z.boolean().optional().describe("Verbose output"),
199
+ cwd: z.string().optional().describe("Working directory to run in"),
200
+ },
201
+ }, async ({ action, path, services, update, calm, verbose, cwd }) => {
202
+ try {
203
+ return text(await fleet({ action, path, services, update, calm, verbose, cwd }));
204
+ }
205
+ catch (e) {
206
+ return fail(e);
207
+ }
208
+ });
209
+ server.registerTool("config", {
210
+ title: "Manage @imqueue CLI configuration",
211
+ description: "Run `imq config <action>`. `check` = is config initialized; `get [option]` = read a value (or list all); `set option value` = write a value (nested keys use a dot-path, e.g. 'ci.provider'); `init` = interactive setup (prefer `set` for automation — `init` will time out non-interactively). Requires `imq` (see cli_status).",
212
+ inputSchema: {
213
+ action: z.enum(["check", "get", "set", "init"]).describe("Config operation"),
214
+ option: z.string().optional().describe("Config key (dot-path for nested), for get/set"),
215
+ value: z.string().optional().describe("Value to set (required for `set`)"),
216
+ cwd: z.string().optional().describe("Working directory to run in"),
217
+ },
218
+ }, async ({ action, option, value, cwd }) => {
219
+ try {
220
+ return text(await config({ action, option, value, cwd }));
221
+ }
222
+ catch (e) {
223
+ return fail(e);
224
+ }
225
+ });
226
+ server.registerTool("logs", {
227
+ title: "Read or clean @imqueue fleet logs",
228
+ description: "Work with logs of services started by `imq ctl`. action='dump' (default) returns the current combined logs and exits — it never follows/streams, and output is capped. action='clean' deletes collected logs. Requires `imq` (see cli_status).",
229
+ inputSchema: {
230
+ action: z.enum(["dump", "clean"]).optional().describe("dump = read current logs (default); clean = delete collected logs"),
231
+ services: z.string().optional().describe("Comma-separated service names; omit to combine all"),
232
+ prefix: z.boolean().optional().describe("Prefix each line with the service name (default true)"),
233
+ cwd: z.string().optional().describe("Working directory to run in"),
234
+ },
235
+ }, async ({ action, services, prefix, cwd }) => {
236
+ try {
237
+ return text(await logs({ action, services, prefix, cwd }));
238
+ }
239
+ catch (e) {
240
+ return fail(e);
241
+ }
242
+ });
113
243
  async function main() {
114
244
  const transport = new StdioServerTransport();
115
245
  await server.connect(transport);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,wEAAwE;AACxE,uEAAuE;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAmB,MAAM,eAAe,CAAC;AAEjF,yEAAyE;AACzE,2DAA2D;AAC3D,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAwB,CAAC;AAEtE,MAAM,IAAI,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AAChF,MAAM,IAAI,GAAG,CAAC,CAAU,EAAE,EAAE,CAAC,CAAC;IAC5B,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,UAAU,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,C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EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;KACnE;CACF,EACD,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE;IAC1C,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IAC7D,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC;AACH,CAAC,CACF,CAAC;AAEF,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,2DAA2D;IAC3D,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;AACxD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imqueue/mcp",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Model Context Protocol server for @imqueue — lets AI coding agents search the docs and scaffold typed services & clients.",
5
5
  "keywords": [
6
6
  "mcp",