comfy-ts 2.18.1 → 2.20.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.
Files changed (65) hide show
  1. package/README.md +147 -97
  2. package/claude-code/.claude-plugin/plugin.json +9 -0
  3. package/claude-code/skills/convert/SKILL.md +25 -0
  4. package/claude-code/skills/guide/SKILL.md +21 -0
  5. package/claude-code/skills/run/SKILL.md +12 -0
  6. package/claude-code/skills/setup/SKILL.md +15 -0
  7. package/claude-code/skills/workflow/SKILL.md +19 -0
  8. package/dist/{ServeApp-qXcQfdgT.js → ServeApp-B469W26E.js} +5 -5
  9. package/dist/{ServeApp-qXcQfdgT.js.map → ServeApp-B469W26E.js.map} +1 -1
  10. package/dist/cli.js +228 -11
  11. package/dist/cli.js.map +1 -1
  12. package/dist/{state-C067Kbew.js → exampleAssets-j1f26nGc.js} +177 -56
  13. package/dist/{state-C067Kbew.js.map → exampleAssets-j1f26nGc.js.map} +1 -1
  14. package/dist/{findDefinedWorkflow-0lG-VTEd.js → findDefinedWorkflow-B90-xFxX.js} +2 -2
  15. package/dist/{findDefinedWorkflow-0lG-VTEd.js.map → findDefinedWorkflow-B90-xFxX.js.map} +1 -1
  16. package/dist/index.cjs +92 -10
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +12 -2
  19. package/dist/index.d.ts +12 -2
  20. package/dist/index.js +92 -10
  21. package/dist/index.js.map +1 -1
  22. package/dist/{run-run-Zr699h2S.js → run-run-QEoh7Wbh.js} +5 -6
  23. package/dist/{run-run-Zr699h2S.js.map → run-run-QEoh7Wbh.js.map} +1 -1
  24. package/dist/{run-serve-DaXzoVTS.js → run-serve-CsEYPGm9.js} +4 -4
  25. package/dist/{run-serve-DaXzoVTS.js.map → run-serve-CsEYPGm9.js.map} +1 -1
  26. package/dist/{run-tui-CeM1GOJP.js → run-tui-YxiSoNvK.js} +9 -15
  27. package/dist/run-tui-YxiSoNvK.js.map +1 -0
  28. package/dist/{schemaDrift-CbsABBuk.js → schemaDrift-DaWsE-mt.js} +15 -15
  29. package/dist/{schemaDrift-CbsABBuk.js.map → schemaDrift-DaWsE-mt.js.map} +1 -1
  30. package/dist/web.d.ts +30 -20
  31. package/dist/web.js +83 -6
  32. package/dist/web.js.map +1 -1
  33. package/examples/README.md +17 -11
  34. package/examples/rvion/01-txt2img.cflow.ts +1 -1
  35. package/examples/rvion/02-img2img-upload.cflow.ts +1 -1
  36. package/examples/rvion/03-export-workflow-json.cflow.ts +1 -1
  37. package/examples/rvion/04-krea2-turbo-t2i.cflow.ts +1 -1
  38. package/examples/rvion/06-qwen-image-edit.cflow.ts +1 -1
  39. package/examples/rvion/07-local-llm-text-gen.cflow.ts +1 -1
  40. package/examples/rvion/08-qwen-image-21-t2i.cflow.ts +1 -1
  41. package/examples/rvion/09-qwen-image-21-edit.cflow.ts +1 -1
  42. package/examples/rvion/10-anima-t2i.cflow.ts +1 -1
  43. package/examples/rvion/11-yue2-t2a.cflow.ts +1 -1
  44. package/examples/rvion/12-stable-audio-3-t2a.cflow.ts +1 -1
  45. package/examples/rvion/13-ace-step-15-xl-t2a.cflow.ts +1 -1
  46. package/examples/rvion/14-video-soundtrack.cflow.ts +1 -1
  47. package/examples/rvion/15-tts-voice-clone.cflow.ts +1 -1
  48. package/examples/rvion/16-tts-voice-design.cflow.ts +1 -1
  49. package/guide-for-agents.md +8 -5
  50. package/package.json +8 -7
  51. package/src/cli/comfy-ts-cli.ts +12 -2
  52. package/src/cli/gen.ts +6 -1
  53. package/src/cli/serve/ServeApp.ts +4 -4
  54. package/src/cli/serve/web/api.ts +1 -1
  55. package/src/cli/skill.ts +207 -0
  56. package/src/cli/tui/components/Header.tsx +1 -4
  57. package/src/cli/tui/components/HostPanel.tsx +1 -4
  58. package/src/cli/tui/state/HostSt.ts +2 -2
  59. package/src/exampleAssets.ts +10 -4
  60. package/src/host/ComfyHost.ts +35 -5
  61. package/src/host/hostFile.ts +57 -0
  62. package/src/state.ts +15 -9
  63. package/dist/exampleAssets-BfWzygoM.js +0 -38
  64. package/dist/exampleAssets-BfWzygoM.js.map +0 -1
  65. package/dist/run-tui-CeM1GOJP.js.map +0 -1
@@ -2,6 +2,19 @@ import { basename, isAbsolute, join, resolve } from "pathe";
2
2
  import { type } from "arktype";
3
3
  import { imageMeta } from "image-meta";
4
4
  import { action, makeObservable, observable, runInAction } from "mobx";
5
+ //#region src/utils/extractErrorMessage.ts
6
+ /** Extracts an error message from an exception stuff. */
7
+ const extractErrorMessage = (error) => {
8
+ if (error instanceof Error) return error.message;
9
+ if (error === null) return "null";
10
+ if (typeof error === "string") return error;
11
+ if (typeof error === "object") {
12
+ if ("message" in error && typeof error.message === "string") return error.message;
13
+ return JSON.stringify(error);
14
+ }
15
+ return String(error);
16
+ };
17
+ //#endregion
5
18
  //#region src/utils/sha1.ts
6
19
  function sha1Hex(data) {
7
20
  const ml = data.length;
@@ -155,19 +168,6 @@ function isRecord(v) {
155
168
  return typeof v === "object" && v !== null && !Array.isArray(v);
156
169
  }
157
170
  //#endregion
158
- //#region src/utils/extractErrorMessage.ts
159
- /** Extracts an error message from an exception stuff. */
160
- const extractErrorMessage = (error) => {
161
- if (error instanceof Error) return error.message;
162
- if (error === null) return "null";
163
- if (typeof error === "string") return error;
164
- if (typeof error === "object") {
165
- if ("message" in error && typeof error.message === "string") return error.message;
166
- return JSON.stringify(error);
167
- }
168
- return String(error);
169
- };
170
- //#endregion
171
171
  //#region src/utils/hashArrayBuffer.ts
172
172
  const hashArrayBuffer = (buffer) => {
173
173
  return sha1Hex(buffer);
@@ -2172,6 +2172,6 @@ function summarizeDrift(d) {
2172
2172
  return parts.join(", ");
2173
2173
  }
2174
2174
  //#endregion
2175
- export { DEFAULT_MEDIA_EXTENSIONS as $, reloadLoraInfoCache as A, lmFileSize as B, getLoraTriggers as C, readLoraMirror as D, lorasMissingFromMirror as E, fetchLoraList as F, lmTags as G, lmModelName as H, fetchLoraPreviewBytes as I, loraKey as J, lmTrainedWords as K, lmBaseModel as L, fetchLoraCivitai as M, fetchLoraDescription as N, recordCivitaiMiss as O, fetchLoraExampleImages as P, stripAnsi as Q, lmCivitai as R, getLoraTriggerWords as S, loraMirrorEntries as T, lmNotes as U, lmFolder as V, lmSha256 as W, ansi as X, loraPreviewMapFrom as Y, colorsAvailable as Z, buildLoraMirror as _, DefinedWorkflow as a, extractErrorMessage as at, getLoraInfo as b, isLoraLanes as c, getComfyStorage as ct, isLoraStrength as d, logError as dt, MEDIA_KINDS as et, clearLoraKeywordOverride as f, logInfo as ft, setLoraKeyword as g, loraKeywordFromMirror as h, sha1HexOfString as ht, summarizeDrift as i, hashArrayBuffer as it, writeLoraMirror as j, refreshLoraInfoCacheIfChanged as k, isLorasInput as l, resolveComfyStorage as lt, isLoraKeywordFromMirror as m, statelessRegex as mt, diffSchemas as n, isVideoFilename as nt, LorasVar as o, isRecord as ot, getLoraKeyword as p, logSuccess as pt, loraBasename as q, driftChanged as r, mediaMime as rt, PromptVar as s, bang as st, MODEL_LISTS as t, extensionOf as tt, isPromptInput as u, isQuiet as ut, getLoraAddedAt as v, loraMatchesFilter as w, getLoraPreviewUrl as x, getLoraDisplayName as y, lmFilePath as z };
2175
+ export { DEFAULT_MEDIA_EXTENSIONS as $, reloadLoraInfoCache as A, lmFileSize as B, getLoraTriggers as C, readLoraMirror as D, lorasMissingFromMirror as E, fetchLoraList as F, lmTags as G, lmModelName as H, fetchLoraPreviewBytes as I, loraKey as J, lmTrainedWords as K, lmBaseModel as L, fetchLoraCivitai as M, fetchLoraDescription as N, recordCivitaiMiss as O, fetchLoraExampleImages as P, stripAnsi as Q, lmCivitai as R, getLoraTriggerWords as S, loraMirrorEntries as T, lmNotes as U, lmFolder as V, lmSha256 as W, ansi as X, loraPreviewMapFrom as Y, colorsAvailable as Z, buildLoraMirror as _, DefinedWorkflow as a, isRecord as at, getLoraInfo as b, isLoraLanes as c, resolveComfyStorage as ct, isLoraStrength as d, logInfo as dt, MEDIA_KINDS as et, clearLoraKeywordOverride as f, logSuccess as ft, setLoraKeyword as g, loraKeywordFromMirror as h, extractErrorMessage as ht, summarizeDrift as i, hashArrayBuffer as it, writeLoraMirror as j, refreshLoraInfoCacheIfChanged as k, isLorasInput as l, isQuiet as lt, isLoraKeywordFromMirror as m, sha1HexOfString as mt, diffSchemas as n, isVideoFilename as nt, LorasVar as o, bang as ot, getLoraKeyword as p, statelessRegex as pt, loraBasename as q, driftChanged as r, mediaMime as rt, PromptVar as s, getComfyStorage as st, MODEL_LISTS as t, extensionOf as tt, isPromptInput as u, logError as ut, getLoraAddedAt as v, loraMatchesFilter as w, getLoraPreviewUrl as x, getLoraDisplayName as y, lmFilePath as z };
2176
2176
 
2177
- //# sourceMappingURL=schemaDrift-CbsABBuk.js.map
2177
+ //# sourceMappingURL=schemaDrift-DaWsE-mt.js.map