comfyui-mcp 0.9.2 → 0.9.4

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.
Files changed (222) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +17 -0
  3. package/llms-install.md +139 -0
  4. package/package.json +1 -1
  5. package/dist/comfyui/client.d.ts +0 -67
  6. package/dist/comfyui/client.d.ts.map +0 -1
  7. package/dist/comfyui/cloud-client.d.ts +0 -37
  8. package/dist/comfyui/cloud-client.d.ts.map +0 -1
  9. package/dist/comfyui/events.d.ts +0 -9
  10. package/dist/comfyui/events.d.ts.map +0 -1
  11. package/dist/comfyui/types.d.ts +0 -176
  12. package/dist/comfyui/types.d.ts.map +0 -1
  13. package/dist/config.d.ts +0 -48
  14. package/dist/config.d.ts.map +0 -1
  15. package/dist/experimental/agent-poc.d.ts +0 -30
  16. package/dist/experimental/agent-poc.d.ts.map +0 -1
  17. package/dist/experimental/chat-handler.d.ts +0 -21
  18. package/dist/experimental/chat-handler.d.ts.map +0 -1
  19. package/dist/experimental/provider-registry.d.ts +0 -4
  20. package/dist/experimental/provider-registry.d.ts.map +0 -1
  21. package/dist/experimental/run.d.ts +0 -3
  22. package/dist/experimental/run.d.ts.map +0 -1
  23. package/dist/experimental/ui-message-stream-parser.d.ts +0 -21
  24. package/dist/experimental/ui-message-stream-parser.d.ts.map +0 -1
  25. package/dist/index.d.ts +0 -3
  26. package/dist/index.d.ts.map +0 -1
  27. package/dist/services/api-nodes.d.ts +0 -77
  28. package/dist/services/api-nodes.d.ts.map +0 -1
  29. package/dist/services/asset-registry.d.ts +0 -64
  30. package/dist/services/asset-registry.d.ts.map +0 -1
  31. package/dist/services/civitai-lookup.d.ts +0 -24
  32. package/dist/services/civitai-lookup.d.ts.map +0 -1
  33. package/dist/services/civitai-resolver.d.ts +0 -27
  34. package/dist/services/civitai-resolver.d.ts.map +0 -1
  35. package/dist/services/defaults-manager.d.ts +0 -31
  36. package/dist/services/defaults-manager.d.ts.map +0 -1
  37. package/dist/services/download-auth.d.ts +0 -30
  38. package/dist/services/download-auth.d.ts.map +0 -1
  39. package/dist/services/download-cache.d.ts +0 -28
  40. package/dist/services/download-cache.d.ts.map +0 -1
  41. package/dist/services/file-hasher.d.ts +0 -32
  42. package/dist/services/file-hasher.d.ts.map +0 -1
  43. package/dist/services/generate-conditioned.d.ts +0 -50
  44. package/dist/services/generate-conditioned.d.ts.map +0 -1
  45. package/dist/services/generate-image.d.ts +0 -35
  46. package/dist/services/generate-image.d.ts.map +0 -1
  47. package/dist/services/generation-tracker.d.ts +0 -84
  48. package/dist/services/generation-tracker.d.ts.map +0 -1
  49. package/dist/services/health-check.d.ts +0 -6
  50. package/dist/services/health-check.d.ts.map +0 -1
  51. package/dist/services/hierarchical-mermaid.d.ts +0 -12
  52. package/dist/services/hierarchical-mermaid.d.ts.map +0 -1
  53. package/dist/services/image-convert.d.ts +0 -29
  54. package/dist/services/image-convert.d.ts.map +0 -1
  55. package/dist/services/image-management.d.ts +0 -61
  56. package/dist/services/image-management.d.ts.map +0 -1
  57. package/dist/services/install-comfyui.d.ts +0 -89
  58. package/dist/services/install-comfyui.d.ts.map +0 -1
  59. package/dist/services/job-history.d.ts +0 -28
  60. package/dist/services/job-history.d.ts.map +0 -1
  61. package/dist/services/job-watcher.d.ts +0 -55
  62. package/dist/services/job-watcher.d.ts.map +0 -1
  63. package/dist/services/manager-config.d.ts +0 -59
  64. package/dist/services/manager-config.d.ts.map +0 -1
  65. package/dist/services/manifest.d.ts +0 -63
  66. package/dist/services/manifest.d.ts.map +0 -1
  67. package/dist/services/mermaid-converter.d.ts +0 -24
  68. package/dist/services/mermaid-converter.d.ts.map +0 -1
  69. package/dist/services/mermaid-parser.d.ts +0 -31
  70. package/dist/services/mermaid-parser.d.ts.map +0 -1
  71. package/dist/services/model-resolver.d.ts +0 -26
  72. package/dist/services/model-resolver.d.ts.map +0 -1
  73. package/dist/services/node-authoring.d.ts +0 -117
  74. package/dist/services/node-authoring.d.ts.map +0 -1
  75. package/dist/services/node-bisect.d.ts +0 -105
  76. package/dist/services/node-bisect.d.ts.map +0 -1
  77. package/dist/services/node-management.d.ts +0 -97
  78. package/dist/services/node-management.d.ts.map +0 -1
  79. package/dist/services/node-snapshots.d.ts +0 -27
  80. package/dist/services/node-snapshots.d.ts.map +0 -1
  81. package/dist/services/node-verify.d.ts +0 -35
  82. package/dist/services/node-verify.d.ts.map +0 -1
  83. package/dist/services/process-control.d.ts +0 -65
  84. package/dist/services/process-control.d.ts.map +0 -1
  85. package/dist/services/queue-manager.d.ts +0 -27
  86. package/dist/services/queue-manager.d.ts.map +0 -1
  87. package/dist/services/registry-client.d.ts +0 -28
  88. package/dist/services/registry-client.d.ts.map +0 -1
  89. package/dist/services/skill-cache.d.ts +0 -26
  90. package/dist/services/skill-cache.d.ts.map +0 -1
  91. package/dist/services/skill-generator.d.ts +0 -33
  92. package/dist/services/skill-generator.d.ts.map +0 -1
  93. package/dist/services/storage/azure-blob.d.ts +0 -8
  94. package/dist/services/storage/azure-blob.d.ts.map +0 -1
  95. package/dist/services/storage/hf.d.ts +0 -7
  96. package/dist/services/storage/hf.d.ts.map +0 -1
  97. package/dist/services/storage/http.d.ts +0 -6
  98. package/dist/services/storage/http.d.ts.map +0 -1
  99. package/dist/services/storage/index.d.ts +0 -28
  100. package/dist/services/storage/index.d.ts.map +0 -1
  101. package/dist/services/storage/s3.d.ts +0 -12
  102. package/dist/services/storage/s3.d.ts.map +0 -1
  103. package/dist/services/storage/types.d.ts +0 -22
  104. package/dist/services/storage/types.d.ts.map +0 -1
  105. package/dist/services/storage/utils.d.ts +0 -6
  106. package/dist/services/storage/utils.d.ts.map +0 -1
  107. package/dist/services/storage-upload.d.ts +0 -18
  108. package/dist/services/storage-upload.d.ts.map +0 -1
  109. package/dist/services/tunnel.d.ts +0 -23
  110. package/dist/services/tunnel.d.ts.map +0 -1
  111. package/dist/services/update-comfyui.d.ts +0 -34
  112. package/dist/services/update-comfyui.d.ts.map +0 -1
  113. package/dist/services/view-image.d.ts +0 -17
  114. package/dist/services/view-image.d.ts.map +0 -1
  115. package/dist/services/workflow-autoload.d.ts +0 -41
  116. package/dist/services/workflow-autoload.d.ts.map +0 -1
  117. package/dist/services/workflow-composer.d.ts +0 -43
  118. package/dist/services/workflow-composer.d.ts.map +0 -1
  119. package/dist/services/workflow-converter.d.ts +0 -31
  120. package/dist/services/workflow-converter.d.ts.map +0 -1
  121. package/dist/services/workflow-deps.d.ts +0 -135
  122. package/dist/services/workflow-deps.d.ts.map +0 -1
  123. package/dist/services/workflow-dsl.d.ts +0 -4
  124. package/dist/services/workflow-dsl.d.ts.map +0 -1
  125. package/dist/services/workflow-executor.d.ts +0 -16
  126. package/dist/services/workflow-executor.d.ts.map +0 -1
  127. package/dist/services/workflow-sections.d.ts +0 -30
  128. package/dist/services/workflow-sections.d.ts.map +0 -1
  129. package/dist/services/workflow-settings-extractor.d.ts +0 -14
  130. package/dist/services/workflow-settings-extractor.d.ts.map +0 -1
  131. package/dist/services/workflow-validator.d.ts +0 -18
  132. package/dist/services/workflow-validator.d.ts.map +0 -1
  133. package/dist/services/workspace-env.d.ts +0 -68
  134. package/dist/services/workspace-env.d.ts.map +0 -1
  135. package/dist/tools/api-nodes.d.ts +0 -9
  136. package/dist/tools/api-nodes.d.ts.map +0 -1
  137. package/dist/tools/assets.d.ts +0 -3
  138. package/dist/tools/assets.d.ts.map +0 -1
  139. package/dist/tools/defaults.d.ts +0 -3
  140. package/dist/tools/defaults.d.ts.map +0 -1
  141. package/dist/tools/diagnostics.d.ts +0 -3
  142. package/dist/tools/diagnostics.d.ts.map +0 -1
  143. package/dist/tools/generate-conditioned.d.ts +0 -3
  144. package/dist/tools/generate-conditioned.d.ts.map +0 -1
  145. package/dist/tools/generate-image.d.ts +0 -3
  146. package/dist/tools/generate-image.d.ts.map +0 -1
  147. package/dist/tools/generation-tracker.d.ts +0 -3
  148. package/dist/tools/generation-tracker.d.ts.map +0 -1
  149. package/dist/tools/health-check.d.ts +0 -3
  150. package/dist/tools/health-check.d.ts.map +0 -1
  151. package/dist/tools/image-convert.d.ts +0 -3
  152. package/dist/tools/image-convert.d.ts.map +0 -1
  153. package/dist/tools/image-management.d.ts +0 -3
  154. package/dist/tools/image-management.d.ts.map +0 -1
  155. package/dist/tools/index.d.ts +0 -3
  156. package/dist/tools/index.d.ts.map +0 -1
  157. package/dist/tools/install-comfyui.d.ts +0 -3
  158. package/dist/tools/install-comfyui.d.ts.map +0 -1
  159. package/dist/tools/manager-config.d.ts +0 -3
  160. package/dist/tools/manager-config.d.ts.map +0 -1
  161. package/dist/tools/manifest.d.ts +0 -3
  162. package/dist/tools/manifest.d.ts.map +0 -1
  163. package/dist/tools/memory-management.d.ts +0 -3
  164. package/dist/tools/memory-management.d.ts.map +0 -1
  165. package/dist/tools/model-extras.d.ts +0 -3
  166. package/dist/tools/model-extras.d.ts.map +0 -1
  167. package/dist/tools/model-management.d.ts +0 -3
  168. package/dist/tools/model-management.d.ts.map +0 -1
  169. package/dist/tools/node-authoring.d.ts +0 -3
  170. package/dist/tools/node-authoring.d.ts.map +0 -1
  171. package/dist/tools/node-bisect.d.ts +0 -3
  172. package/dist/tools/node-bisect.d.ts.map +0 -1
  173. package/dist/tools/node-management.d.ts +0 -3
  174. package/dist/tools/node-management.d.ts.map +0 -1
  175. package/dist/tools/node-snapshots.d.ts +0 -3
  176. package/dist/tools/node-snapshots.d.ts.map +0 -1
  177. package/dist/tools/node-verify.d.ts +0 -3
  178. package/dist/tools/node-verify.d.ts.map +0 -1
  179. package/dist/tools/process-control.d.ts +0 -3
  180. package/dist/tools/process-control.d.ts.map +0 -1
  181. package/dist/tools/queue-management.d.ts +0 -3
  182. package/dist/tools/queue-management.d.ts.map +0 -1
  183. package/dist/tools/registry-search.d.ts +0 -3
  184. package/dist/tools/registry-search.d.ts.map +0 -1
  185. package/dist/tools/skill-generator.d.ts +0 -3
  186. package/dist/tools/skill-generator.d.ts.map +0 -1
  187. package/dist/tools/storage-upload.d.ts +0 -3
  188. package/dist/tools/storage-upload.d.ts.map +0 -1
  189. package/dist/tools/update-comfyui.d.ts +0 -3
  190. package/dist/tools/update-comfyui.d.ts.map +0 -1
  191. package/dist/tools/workflow-autoload.d.ts +0 -9
  192. package/dist/tools/workflow-autoload.d.ts.map +0 -1
  193. package/dist/tools/workflow-compose.d.ts +0 -3
  194. package/dist/tools/workflow-compose.d.ts.map +0 -1
  195. package/dist/tools/workflow-deps.d.ts +0 -3
  196. package/dist/tools/workflow-deps.d.ts.map +0 -1
  197. package/dist/tools/workflow-dsl.d.ts +0 -3
  198. package/dist/tools/workflow-dsl.d.ts.map +0 -1
  199. package/dist/tools/workflow-execute.d.ts +0 -3
  200. package/dist/tools/workflow-execute.d.ts.map +0 -1
  201. package/dist/tools/workflow-library.d.ts +0 -3
  202. package/dist/tools/workflow-library.d.ts.map +0 -1
  203. package/dist/tools/workflow-validate.d.ts +0 -3
  204. package/dist/tools/workflow-validate.d.ts.map +0 -1
  205. package/dist/tools/workflow-visualize.d.ts +0 -3
  206. package/dist/tools/workflow-visualize.d.ts.map +0 -1
  207. package/dist/tools/workspace-env.d.ts +0 -3
  208. package/dist/tools/workspace-env.d.ts.map +0 -1
  209. package/dist/transport/cli.d.ts +0 -15
  210. package/dist/transport/cli.d.ts.map +0 -1
  211. package/dist/transport/comfyui-url.d.ts +0 -12
  212. package/dist/transport/comfyui-url.d.ts.map +0 -1
  213. package/dist/transport/http.d.ts +0 -17
  214. package/dist/transport/http.d.ts.map +0 -1
  215. package/dist/utils/errors.d.ts +0 -33
  216. package/dist/utils/errors.d.ts.map +0 -1
  217. package/dist/utils/image.d.ts +0 -4
  218. package/dist/utils/image.d.ts.map +0 -1
  219. package/dist/utils/logger.d.ts +0 -7
  220. package/dist/utils/logger.d.ts.map +0 -1
  221. package/dist/utils/optional-dep.d.ts +0 -5
  222. package/dist/utils/optional-dep.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -8,6 +8,15 @@ All notable changes to this project are documented here. This project adheres to
8
8
 
9
9
  ### Fixed
10
10
 
11
+ - **TS2742 portability error on pnpm builds (e.g. Glama)** — `tsc` previously
12
+ failed to emit `dist/experimental/provider-registry.d.ts` under pnpm because
13
+ the inferred return type of `getRegistry()` referenced a transitive type from
14
+ `@ai-sdk/provider`, whose pnpm store path (`.pnpm/@ai-sdk+provider@…`) TS
15
+ considers non-portable. We're a CLI/executable, not a library, so declaration
16
+ emission was useless overhead — disabled `declaration` + `declarationMap` in
17
+ `tsconfig.json`. `dist/` now contains only `.js` + `.js.map`, builds pass
18
+ under both `npm` and `pnpm`.
19
+
11
20
  - **Docker build hang on rate-limited CI (e.g. Glama)** — `npm ci` in the
12
21
  Dockerfile no longer runs the `cloudflared` postinstall, which fetches a
13
22
  ~40 MB binary from GitHub releases over an `https.get()` call with no
package/README.md CHANGED
@@ -48,6 +48,12 @@ Claude will find (or download) a checkpoint, build a workflow, execute it, and r
48
48
 
49
49
  > **Note**: This runs as a standalone MCP server — no need to clone this repo. `npx` will download and run it automatically.
50
50
 
51
+ ### Scope: local, remote, or Comfy Cloud
52
+
53
+ `comfyui-mcp` is the community MCP for **local** and **remote** ComfyUI (Mac/Linux/Windows installs, RunPod, VPS, LAN, etc.) — that's the primary target.
54
+
55
+ For **Comfy Cloud** users, [Comfy-Org ships an official Comfy Cloud MCP](https://docs.comfy.org/development/cloud/mcp-server) (currently invite-only beta) which is cloud-exclusive and maintained by the Comfy team. `comfyui-mcp` *also* includes a community cloud-mode (set `COMFYUI_API_KEY` — see [Deployment modes](#deployment-modes)) so a single MCP can target all three deployment shapes from one config; pick whichever fits your workflow.
56
+
51
57
  ---
52
58
 
53
59
  ## Claude Code Plugin
@@ -661,6 +667,17 @@ Quick version: fork → branch (`feat/my-feature`) → make changes (ensure `npm
661
667
 
662
668
  ---
663
669
 
670
+ ## Maintainer
671
+
672
+ Built and maintained by [**@artokun**](https://github.com/artokun) — a regular contributor across the Comfy-Org ecosystem:
673
+
674
+ - **[Comfy-Org/ComfyUI_frontend](https://github.com/Comfy-Org/ComfyUI_frontend/pulls?q=is%3Apr+author%3Aartokun)** — 10 merged PRs, mostly on the **v2 graph renderer**: subgraph rendering, promoted-widget plumbing, viewport persistence, with backports across `cloud/1.41`, `cloud/1.42`, `core/1.41`, and `core/1.42`.
675
+ - **[Comfy-Org/ComfyUI](https://github.com/Comfy-Org/ComfyUI/pulls?q=is%3Apr+author%3Aartokun)** (core) — crash fixes in the Python backend's video/audio save path ([#12683](https://github.com/Comfy-Org/ComfyUI/pull/12683), [#12550](https://github.com/Comfy-Org/ComfyUI/pull/12550)).
676
+
677
+ **Comfy-Org folks** (or anyone hiring around the ComfyUI ecosystem): I'd genuinely love to chat — **[art.longbottom.jr@gmail.com](mailto:art.longbottom.jr@gmail.com)**.
678
+
679
+ ---
680
+
664
681
  ## License
665
682
 
666
683
  MIT — see [LICENSE](./LICENSE) for details.
@@ -0,0 +1,139 @@
1
+ # comfyui-mcp — Install Guide for AI Agents
2
+
3
+ This document tells an AI agent (Cline, Claude Code, Cursor, etc.) how to
4
+ install and configure **comfyui-mcp** in one shot. It is a focused subset of
5
+ the project [README](./README.md) — see that file for full documentation.
6
+
7
+ ## What you are installing
8
+
9
+ An MCP server that lets the user's AI assistant drive
10
+ [ComfyUI](https://github.com/comfyanonymous/ComfyUI): generate images, run and
11
+ author workflows, manage models and custom nodes, and control the server.
12
+ **86 MCP tools** across the categories shown in
13
+ [docs/tools/](https://comfyui-mcp.artokun.io/docs/tools/image-generation).
14
+
15
+ ## Prerequisites
16
+
17
+ - **Node.js ≥ 22.** Confirm with `node --version`; install via
18
+ [nodejs.org](https://nodejs.org/) or `nvm` if missing.
19
+ - The package is published to npm as **`comfyui-mcp`** and runs via `npx` — no
20
+ global install required.
21
+ - The server needs a ComfyUI to talk to. **Three options**, pick one with the
22
+ user (ask if unclear):
23
+
24
+ 1. **Local ComfyUI** — the user is running ComfyUI on the same machine. The
25
+ server auto-detects the install path and port (8188 → 8000 fallback). No
26
+ extra config needed.
27
+ 2. **Remote ComfyUI** — the user runs ComfyUI on a different host
28
+ (RunPod, VPS, LAN box). Pass `--comfyui-url <url>` or set
29
+ `COMFYUI_URL` env. When the host is non-loopback, local-FS auto-detection
30
+ is suppressed.
31
+ 3. **Comfy Cloud** — the user has a [cloud.comfy.org](https://cloud.comfy.org)
32
+ API key. Set `COMFYUI_API_KEY` env. The server routes HTTP primitives to
33
+ the cloud; local-only tools throw `CLOUD_UNSUPPORTED`.
34
+
35
+ ## Add to the MCP client config
36
+
37
+ ### Claude Code / Claude Desktop (`~/.claude/settings.json`)
38
+
39
+ **Local ComfyUI** (most common):
40
+
41
+ ```json
42
+ {
43
+ "mcpServers": {
44
+ "comfyui": {
45
+ "command": "npx",
46
+ "args": ["-y", "comfyui-mcp"]
47
+ }
48
+ }
49
+ }
50
+ ```
51
+
52
+ **Remote ComfyUI:**
53
+
54
+ ```json
55
+ {
56
+ "mcpServers": {
57
+ "comfyui": {
58
+ "command": "npx",
59
+ "args": ["-y", "comfyui-mcp", "--comfyui-url", "https://my-comfy.example.com"]
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ **Comfy Cloud:**
66
+
67
+ ```json
68
+ {
69
+ "mcpServers": {
70
+ "comfyui": {
71
+ "command": "npx",
72
+ "args": ["-y", "comfyui-mcp"],
73
+ "env": {
74
+ "COMFYUI_API_KEY": "<ask the user for their cloud.comfy.org key>"
75
+ }
76
+ }
77
+ }
78
+ }
79
+ ```
80
+
81
+ ### Cline / Cursor / generic MCP
82
+
83
+ Use the same `command` + `args` shape (Cline expects `command` + `args` in
84
+ its `cline_mcp_settings.json`; Cursor expects similar in its MCP settings
85
+ panel).
86
+
87
+ ## Optional environment variables
88
+
89
+ Set in the `env` block above. None are required for the local-default flow.
90
+
91
+ - `COMFYUI_HOST` / `COMFYUI_PORT` — override host/port (defaults: auto-detect)
92
+ - `COMFYUI_PATH` — explicit ComfyUI install path (auto-detected on Mac / Linux
93
+ / Windows when unset)
94
+ - `COMFYUI_DOWNLOAD_CACHE_DIR` — model download cache (default
95
+ `~/.comfyui-mcp/cache`)
96
+ - `COMFYUI_LRU_CACHE_SIZE_GB` — cap the cache; `0` disables eviction
97
+ - `CIVITAI_API_TOKEN`, `HUGGINGFACE_TOKEN`, `GITHUB_TOKEN` — for gated
98
+ downloads and higher API rate limits
99
+ - `REGISTRY_ACCESS_TOKEN` — Comfy Registry API key for `publish_custom_node`
100
+ - `COMFY_API_KEY` — comfy.org API key for hosted partner nodes (different
101
+ from `COMFYUI_API_KEY`, which is for Comfy Cloud)
102
+ - `COMFYUI_CLOUD_URL` — override the Comfy Cloud endpoint
103
+ (default `https://cloud.comfy.org`)
104
+
105
+ Full reference: [docs/configuration](https://comfyui-mcp.artokun.io/docs/configuration).
106
+
107
+ ## Verify
108
+
109
+ After updating the settings file, **restart the MCP client** (Claude Code: run
110
+ `/mcp` to reconnect; Cline: toggle the server). Then ask the assistant:
111
+
112
+ > What ComfyUI tools do you have?
113
+
114
+ It should list ~86 tools across generation, workflow execution/authoring,
115
+ models, custom nodes, etc. If the user wants a quick smoke test, ask:
116
+
117
+ > Generate a 1024×1024 image of a red apple on a wooden table.
118
+
119
+ That exercises the `generate_image` tool end-to-end (auto-selects a local
120
+ checkpoint or uses defaults; returns an `asset_id` you can `view_image` to
121
+ see).
122
+
123
+ ## Common issues
124
+
125
+ - **"ComfyUI not detected on ports 8188, 8000"** — ComfyUI isn't running. Tell
126
+ the user to start it (Desktop app or `python main.py`).
127
+ - **`CLOUD_UNSUPPORTED` errors** — `COMFYUI_API_KEY` is set, so the server is
128
+ in cloud mode and a local-only tool was called. Either unset the key (to
129
+ use a local install) or stick to cloud-compatible tools.
130
+ - **Empty model lists** — `extra_model_paths.yaml` is misconfigured. Run
131
+ `health_check` for a diagnostic.
132
+
133
+ ## License + repo
134
+
135
+ - **License:** [MIT](./LICENSE)
136
+ - **Repo:** https://github.com/artokun/comfyui-mcp
137
+ - **npm:** https://www.npmjs.com/package/comfyui-mcp
138
+ - **Docs:** https://comfyui-mcp.artokun.io/docs
139
+ - **Issues:** https://github.com/artokun/comfyui-mcp/issues
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comfyui-mcp",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "mcpName": "io.github.artokun/comfyui-mcp",
5
5
  "description": "MCP server for ComfyUI — workflow execution, visualization, composition, registry, and skill generation",
6
6
  "homepage": "https://comfyui-mcp.artokun.io/docs",
@@ -1,67 +0,0 @@
1
- import { Client } from "@stable-canvas/comfyui-client";
2
- import type { ObjectInfo, SystemStats, QueueStatus } from "./types.js";
3
- export declare function getClient(): Client;
4
- export declare function connectClient(): Promise<Client>;
5
- /**
6
- * Ensures WebSocket is connected, auto-reconnecting if stale.
7
- * Only needed before WebSocket-dependent operations (enqueue with progress tracking).
8
- */
9
- export declare function ensureConnected(): Promise<Client>;
10
- export declare function getSystemStats(): Promise<SystemStats>;
11
- export declare function getObjectInfo(): Promise<ObjectInfo>;
12
- export declare function getQueue(): Promise<QueueStatus>;
13
- export declare function interrupt(promptId?: string): Promise<void>;
14
- /**
15
- * Fire-and-forget: enqueue a prompt via HTTP POST (no WebSocket needed).
16
- * Returns prompt_id and queue position immediately.
17
- */
18
- export declare function enqueuePrompt(workflow: Record<string, unknown>, extraData?: Record<string, unknown>): Promise<{
19
- prompt_id: string;
20
- queue_remaining?: number;
21
- }>;
22
- /**
23
- * Remove a specific pending job from the queue by prompt_id.
24
- */
25
- export declare function deleteQueueItem(id: string): Promise<void>;
26
- /**
27
- * Clear all pending jobs from the queue (doesn't affect running job).
28
- */
29
- export declare function clearQueue(): Promise<void>;
30
- export declare function getSamplers(): Promise<string[]>;
31
- export declare function getSchedulers(): Promise<string[]>;
32
- export declare function getCheckpoints(): Promise<string[]>;
33
- export declare function getLoRAs(): Promise<string[]>;
34
- export declare function getVAEs(): Promise<string[]>;
35
- export declare function getUpscaleModels(): Promise<string[]>;
36
- export declare function resetClient(): void;
37
- export declare function getComfyUIPath(): string | undefined;
38
- export declare function getLogs(): Promise<string[]>;
39
- export interface HistoryEntry {
40
- prompt: Record<string, unknown>;
41
- outputs: Record<string, unknown>;
42
- status: {
43
- status_str: string;
44
- completed: boolean;
45
- messages: Array<[string, Record<string, unknown>]>;
46
- };
47
- meta?: Record<string, unknown>;
48
- }
49
- export declare function getHistory(promptId?: string): Promise<Record<string, HistoryEntry>>;
50
- /**
51
- * Fetch an image from ComfyUI's /view endpoint as a base64 string.
52
- * Works over HTTP — no local filesystem access needed.
53
- */
54
- export declare function fetchImage(filename: string, type?: "output" | "input" | "temp", subfolder?: string): Promise<{
55
- base64: string;
56
- mimeType: string;
57
- }>;
58
- /**
59
- * Upload an image to ComfyUI's input/ directory via HTTP multipart POST.
60
- * Works over HTTP — no local filesystem access needed.
61
- */
62
- export declare function uploadImageHttp(filename: string, data: Buffer, mimeType?: string): Promise<{
63
- name: string;
64
- subfolder: string;
65
- type: string;
66
- }>;
67
- //# sourceMappingURL=client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/comfyui/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAUvD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAmBvE,wBAAgB,SAAS,IAAI,MAAM,CAclC;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAYrD;AAED;;;GAGG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CA2BvD;AAED,wBAAsB,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAK3D;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,UAAU,CAAC,CAKzD;AAED,wBAAsB,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC,CAQrD;AAED,wBAAsB,SAAS,CAAC,QAAQ,CAAC,EAAE,MA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,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;KACpD,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,wBAAsB,UAAU,CAC9B,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAMvC;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,MAAM,EAChB,IAAI,GAAE,QAAQ,GAAG,OAAO,GAAG,MAAiB,EAC5C,SAAS,SAAK,GACb,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAa/C;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,QAAQ,SAAc,GACrB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAiB5D"}
@@ -1,37 +0,0 @@
1
- import type { HistoryEntry } from "./client.js";
2
- import type { ObjectInfo, QueueStatus, SystemStats } from "./types.js";
3
- export interface CloudJobStatus {
4
- status: "pending" | "in_progress" | "completed" | "failed";
5
- prompt_id?: string;
6
- error?: string;
7
- }
8
- export declare function enqueuePrompt(workflow: Record<string, unknown>, extraData?: Record<string, unknown>): Promise<{
9
- prompt_id: string;
10
- queue_remaining?: number;
11
- }>;
12
- export declare function getHistory(promptId?: string): Promise<Record<string, HistoryEntry>>;
13
- export declare function getSystemStats(): Promise<SystemStats>;
14
- export declare function getQueue(): Promise<QueueStatus>;
15
- export declare function interrupt(promptId?: string): Promise<void>;
16
- export declare function deleteQueueItem(_id: string): Promise<void>;
17
- export declare function clearQueue(): Promise<void>;
18
- export declare function getJobStatus(promptId: string): Promise<CloudJobStatus>;
19
- export declare function getObjectInfo(): Promise<ObjectInfo>;
20
- export declare function getSamplers(): Promise<string[]>;
21
- export declare function getSchedulers(): Promise<string[]>;
22
- export declare function getCheckpoints(): Promise<string[]>;
23
- export declare function getLoRAs(): Promise<string[]>;
24
- export declare function getVAEs(): Promise<string[]>;
25
- export declare function getUpscaleModels(): Promise<string[]>;
26
- export declare function getLogs(): Promise<string[]>;
27
- export declare function fetchImage(filename: string, type?: "output" | "input" | "temp", subfolder?: string): Promise<{
28
- base64: string;
29
- mimeType: string;
30
- }>;
31
- export declare function uploadImageHttp(filename: string, data: Buffer, mimeType?: string): Promise<{
32
- name: string;
33
- subfolder: string;
34
- type: string;
35
- }>;
36
- export declare function getComfyUIPath(): string | undefined;
37
- //# sourceMappingURL=cloud-client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cloud-client.d.ts","sourceRoot":"","sources":["../../src/comfyui/cloud-client.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA2CvE,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAa1D;AAED,wBAAsB,UAAU,CAC9B,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,MAA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I,EAAE,MAAM,EACZ,QAAQ,SAAc,GACrB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAa5D;AAED,wBAAgB,cAAc,IAAI,MAAM,GAAG,SAAS,CAEnD"}
@@ -1,9 +0,0 @@
1
- import type { Client } from "@stable-canvas/comfyui-client";
2
- import type { JobProgress } from "./types.js";
3
- export interface ExecutionCallbacks {
4
- onProgress?: (progress: JobProgress) => void;
5
- onComplete?: (promptId: string) => void;
6
- onError?: (promptId: string, error: string) => void;
7
- }
8
- export declare function attachExecutionListeners(client: Client, promptId: string, callbacks: ExecutionCallbacks): () => void;
9
- //# sourceMappingURL=events.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/comfyui/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7C,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrD;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,kBAAkB,GAC5B,MAAM,IAAI,CAwCZ"}
@@ -1,176 +0,0 @@
1
- export interface ComfyUINodeDef {
2
- input: {
3
- required?: Record<string, NodeInputSpec>;
4
- optional?: Record<string, NodeInputSpec>;
5
- hidden?: Record<string, NodeInputSpec>;
6
- };
7
- input_order?: {
8
- required?: string[];
9
- optional?: string[];
10
- };
11
- output: string[];
12
- output_is_list: boolean[];
13
- output_name: string[];
14
- name: string;
15
- display_name: string;
16
- description: string;
17
- category: string;
18
- output_node: boolean;
19
- python_module?: string;
20
- /**
21
- * Set to `true` by ComfyUI's /object_info for hosted partner/API nodes
22
- * (the server emits this from the node class's `API_NODE` attribute).
23
- * Authoritative marker for API nodes; the `category` typically also starts
24
- * with "api node/" (e.g. "api node/image/BFL").
25
- */
26
- api_node?: boolean;
27
- deprecated?: boolean;
28
- experimental?: boolean;
29
- }
30
- export type NodeInputSpec = [string | string[], Record<string, unknown>?];
31
- export type ObjectInfo = Record<string, ComfyUINodeDef>;
32
- export interface WorkflowNode {
33
- class_type: string;
34
- inputs: Record<string, unknown>;
35
- _meta?: {
36
- title?: string;
37
- };
38
- }
39
- export type WorkflowJSON = Record<string, WorkflowNode>;
40
- export interface QueueStatus {
41
- queue_running: QueueItem[];
42
- queue_pending: QueueItem[];
43
- }
44
- export type QueueItem = [number, string, Record<string, unknown>, unknown, unknown];
45
- export interface SystemStats {
46
- system: {
47
- os: string;
48
- python_version: string;
49
- embedded_python: boolean;
50
- argv?: string[];
51
- comfyui_version?: string;
52
- };
53
- devices: Array<{
54
- name: string;
55
- type: string;
56
- index: number;
57
- vram_total: number;
58
- vram_free: number;
59
- torch_vram_total: number;
60
- torch_vram_free: number;
61
- }>;
62
- }
63
- export interface JobResult {
64
- prompt_id: string;
65
- images: Array<{
66
- data: string;
67
- mime: string;
68
- }>;
69
- node_outputs: Record<string, unknown>;
70
- }
71
- export interface JobProgress {
72
- value: number;
73
- max: number;
74
- node?: string;
75
- prompt_id?: string;
76
- }
77
- export interface SubgraphLink {
78
- id: number;
79
- origin_id: number;
80
- origin_slot: number;
81
- target_id: number;
82
- target_slot: number;
83
- type: string;
84
- }
85
- export interface SubgraphInput {
86
- id: string;
87
- name: string;
88
- type: string;
89
- linkIds: number[];
90
- localized_name?: string;
91
- label?: string;
92
- pos?: [number, number];
93
- }
94
- export interface SubgraphOutput {
95
- id: string;
96
- name: string;
97
- type: string;
98
- linkIds: number[];
99
- localized_name?: string;
100
- label?: string;
101
- pos?: [number, number];
102
- }
103
- export interface SubgraphDefinition {
104
- id: string;
105
- version?: number;
106
- name: string;
107
- inputNode: {
108
- id: number;
109
- bounding?: number[];
110
- };
111
- outputNode: {
112
- id: number;
113
- bounding?: number[];
114
- };
115
- inputs: SubgraphInput[];
116
- outputs: SubgraphOutput[];
117
- widgets?: unknown[];
118
- nodes: UiNode[];
119
- links: SubgraphLink[];
120
- groups?: unknown[];
121
- state?: Record<string, unknown>;
122
- revision?: number;
123
- config?: Record<string, unknown>;
124
- extra?: Record<string, unknown>;
125
- }
126
- export interface UiNodeInput {
127
- name: string;
128
- type: string;
129
- link: number | null;
130
- widget?: {
131
- name: string;
132
- };
133
- slot_index?: number;
134
- }
135
- export interface UiNodeOutput {
136
- name: string;
137
- type: string;
138
- links: number[] | null;
139
- slot_index?: number;
140
- }
141
- export interface UiNode {
142
- id: number;
143
- type: string;
144
- pos: [number, number] | {
145
- 0: number;
146
- 1: number;
147
- };
148
- size?: [number, number] | {
149
- 0: number;
150
- 1: number;
151
- };
152
- flags?: Record<string, unknown>;
153
- order?: number;
154
- mode?: number;
155
- inputs?: UiNodeInput[];
156
- outputs?: UiNodeOutput[];
157
- properties?: Record<string, unknown>;
158
- widgets_values?: unknown[];
159
- title?: string;
160
- _meta?: {
161
- title?: string;
162
- };
163
- }
164
- export type UiLink = [number, number, number, number, number, string];
165
- export interface UiWorkflow {
166
- nodes: UiNode[];
167
- links: UiLink[];
168
- version?: number;
169
- extra?: Record<string, unknown>;
170
- config?: Record<string, unknown>;
171
- groups?: unknown[];
172
- definitions?: {
173
- subgraphs?: SubgraphDefinition[];
174
- };
175
- }
176
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/comfyui/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;I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,OAAO,CAAC,CAAC;IACrC,cAAc,CAAC,EAAE,OAAO,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5B;AAGD,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtE,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE;QACZ,SAAS,CAAC,EAAE,kBAAkB,EAAE,CAAC;KAClC,CAAC;CACH"}
package/dist/config.d.ts DELETED
@@ -1,48 +0,0 @@
1
- import { z } from "zod";
2
- declare const configSchema: z.ZodObject<{
3
- comfyuiHost: z.ZodDefault<z.ZodString>;
4
- comfyuiPort: z.ZodOptional<z.ZodNumber>;
5
- comfyuiSsl: z.ZodDefault<z.ZodBoolean>;
6
- comfyuiPath: z.ZodOptional<z.ZodString>;
7
- comfyuiApiKey: z.ZodOptional<z.ZodString>;
8
- comfyuiCloudUrl: z.ZodDefault<z.ZodString>;
9
- huggingfaceToken: z.ZodOptional<z.ZodString>;
10
- githubToken: z.ZodOptional<z.ZodString>;
11
- civitaiApiToken: z.ZodOptional<z.ZodString>;
12
- comfyApiKey: z.ZodOptional<z.ZodString>;
13
- }, "strip", z.ZodTypeAny, {
14
- comfyuiHost: string;
15
- comfyuiSsl: boolean;
16
- comfyuiCloudUrl: string;
17
- comfyuiPort?: number | undefined;
18
- comfyuiPath?: string | undefined;
19
- comfyuiApiKey?: string | undefined;
20
- huggingfaceToken?: string | undefined;
21
- githubToken?: string | undefined;
22
- civitaiApiToken?: string | undefined;
23
- comfyApiKey?: string | undefined;
24
- }, {
25
- comfyuiHost?: string | undefined;
26
- comfyuiPort?: number | undefined;
27
- comfyuiSsl?: boolean | undefined;
28
- comfyuiPath?: string | undefined;
29
- comfyuiApiKey?: string | undefined;
30
- comfyuiCloudUrl?: string | undefined;
31
- huggingfaceToken?: string | undefined;
32
- githubToken?: string | undefined;
33
- civitaiApiToken?: string | undefined;
34
- comfyApiKey?: string | undefined;
35
- }>;
36
- export type Config = z.infer<typeof configSchema> & {
37
- resolvedPort: number;
38
- };
39
- export declare const config: Config;
40
- export declare function isCloudMode(): boolean;
41
- export declare function isRemoteMode(): boolean;
42
- export declare function isLocalMode(): boolean;
43
- export declare function getCloudUrl(): string;
44
- export declare function getApiKey(): string;
45
- export declare function getComfyUIApiHost(): string;
46
- export declare function getComfyUIProtocol(): "http" | "https";
47
- export {};
48
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoMxB,QAAA,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWhB,CAAC;AAEH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAyC7E,eAAO,MAAM,MAAM,EAAE,MAA0C,CAAC;AAahE,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED,wBAAgB,SAAS,IAAI,MAAM,CAKlC;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,OAAO,CAErD"}
@@ -1,30 +0,0 @@
1
- export interface AgentPocOptions {
2
- port?: number;
3
- host?: string;
4
- /** Open a cloudflared quick tunnel and log the public URL. */
5
- tunnel?: boolean;
6
- /** Bearer token required on /api/chat. Auto-generated if omitted. */
7
- token?: string;
8
- /** Max accepted request body size in bytes for /api/chat (default 1 MiB). */
9
- maxBodyBytes?: number;
10
- }
11
- export interface AgentPocHandle {
12
- /** Local URL the chat server is listening on. */
13
- localUrl: string;
14
- /** Public tunnel URL, if a tunnel was opened. */
15
- publicUrl: string | null;
16
- /** Bearer token clients must send as `Authorization: Bearer <token>`. */
17
- token: string;
18
- stop(): Promise<void>;
19
- }
20
- /**
21
- * Start the experimental agent POC HTTP server (and optional tunnel).
22
- * Returns a handle (incl. the bearer token). Callers gate this behind the env flag.
23
- */
24
- export declare function startAgentPoc(options?: AgentPocOptions): Promise<AgentPocHandle>;
25
- /**
26
- * Gated bootstrap. Only starts the POC when COMFYUI_MCP_AGENT_POC is truthy.
27
- * Safe to call unconditionally from a side entry; a no-op otherwise.
28
- */
29
- export declare function maybeStartAgentPoc(): Promise<AgentPocHandle | null>;
30
- //# sourceMappingURL=agent-poc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-poc.d.ts","sourceRoot":"","sources":["../../src/experimental/agent-poc.ts"],"names":[],"mappings":"AA0BA,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAiGD;;;GAGG;AACH,wBAAsB,aAAa,CACjC,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,cAAc,CAAC,CA2DzB;AAoED;;;GAGG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAOzE"}
@@ -1,21 +0,0 @@
1
- import type { LanguageModel, ToolSet } from "ai";
2
- type AiModule = typeof import("ai");
3
- export declare function buildTools(toolFn: AiModule["tool"]): ToolSet;
4
- export interface ChatHandlerOptions {
5
- /** Override the model (mainly for tests). Defaults to the provider registry. */
6
- model?: LanguageModel;
7
- /** Optional `provider:model` id forwarded to the registry. */
8
- modelId?: string;
9
- /** System prompt for the agent. */
10
- system?: string;
11
- /** Override the tool set (mainly for tests). Defaults to the POC tools. */
12
- tools?: ToolSet;
13
- }
14
- /**
15
- * Handle a chat request. Accepts a Fetch-style `Request` whose JSON body is
16
- * `{ messages: UIMessage[], model?: string }` and returns a streaming
17
- * `Response` (UI message stream protocol).
18
- */
19
- export declare function handleChatRequest(req: Request, options?: ChatHandlerOptions): Promise<Response>;
20
- export {};
21
- //# sourceMappingURL=chat-handler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat-handler.d.ts","sourceRoot":"","sources":["../../src/experimental/chat-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,OAAO,EAER,MAAM,IAAI,CAAC;AAqBZ,KAAK,QAAQ,GAAG,cAAc,IAAI,CAAC,CAAC;AASpC,wBAAgB,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,OAAO,CAwB5D;AAED,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAKD;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,OAAO,EACZ,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,QAAQ,CAAC,CAqBnB"}
@@ -1,4 +0,0 @@
1
- import type { LanguageModel } from "ai";
2
- export declare function getRegistry(): Promise<import("ai").ProviderRegistryProvider<Record<string, import("@ai-sdk/provider").ProviderV3>, string>>;
3
- export declare function resolveModel(id?: string): Promise<LanguageModel>;
4
- //# sourceMappingURL=provider-registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"provider-registry.d.ts","sourceRoot":"","sources":["../../src/experimental/provider-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,IAAI,CAAC;AAuBxC,wBAAsB,WAAW,kHA6BhC;AAkBD,wBAAsB,YAAY,CAAC,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAStE"}
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=run.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../src/experimental/run.ts"],"names":[],"mappings":""}