langflower 0.0.9 → 0.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.
Files changed (223) hide show
  1. package/README.md +96 -70
  2. package/docs/public/README.md +2 -2
  3. package/docs/public/configuration.md +4 -0
  4. package/docs/public/extending.md +18 -2
  5. package/docs/public/getting-started.md +7 -0
  6. package/docs/public/how-it-works.md +18 -11
  7. package/docs/public/product.md +35 -25
  8. package/package.json +2 -2
  9. package/ui-dist/chunk-QI4IYILJ.js +4 -0
  10. package/ui-dist/{chunk-7UMVYN3A.js → chunk-UG3GFV4Y.js} +1 -1
  11. package/ui-dist/index.html +2 -2
  12. package/ui-dist/main-ODIDCCNX.js +315 -0
  13. package/ui-dist/styles-2JMBAQC3.css +1 -0
  14. package/vendor/common-nodes/dist/ai/features/llm-loop/llm-loop-reducer.js +0 -12
  15. package/vendor/common-nodes/dist/ai/features/llm-loop/llm-loop-types.d.ts +2 -7
  16. package/vendor/common-nodes/dist/ai/features/llm-loop/llm-loop-types.js +1 -1
  17. package/vendor/common-nodes/dist/ai/features/llm-loop/run-agent-loop.d.ts +0 -3
  18. package/vendor/common-nodes/dist/ai/features/llm-loop/run-agent-loop.js +22 -36
  19. package/vendor/common-nodes/dist/ai/features/llm-loop/run-llm-loop.d.ts +1 -7
  20. package/vendor/common-nodes/dist/ai/features/llm-loop/run-llm-loop.js +12 -35
  21. package/vendor/common-nodes/dist/ai/features/llm-session/llm-session-shell.d.ts +5 -12
  22. package/vendor/common-nodes/dist/ai/features/llm-session/llm-session-shell.js +48 -21
  23. package/vendor/common-nodes/dist/ai/features/llm-session/run-session-machine.d.ts +11 -0
  24. package/vendor/common-nodes/dist/ai/features/llm-session/run-session-machine.js +2 -2
  25. package/vendor/common-nodes/dist/ai/features/path-choice/run-reactive-path-choice-loop.d.ts +0 -3
  26. package/vendor/common-nodes/dist/ai/features/path-choice/run-reactive-path-choice-loop.js +2 -15
  27. package/vendor/common-nodes/dist/ai/features/run-host-services.d.ts +10 -0
  28. package/vendor/common-nodes/dist/ai/features/sub-agent-protocol.d.ts +1 -0
  29. package/vendor/common-nodes/dist/ai/features/sub-agent-protocol.js +1 -0
  30. package/vendor/common-nodes/dist/ai/features/ui-schema/llm-recovery-ui-schema.d.ts +1 -1
  31. package/vendor/common-nodes/dist/ai/features/ui-schema/llm-recovery-ui-schema.js +1 -1
  32. package/vendor/common-nodes/dist/ai/features/wait-for-subagent-result.d.ts +1 -0
  33. package/vendor/common-nodes/dist/ai/features/wait-for-subagent-result.js +1 -0
  34. package/vendor/common-nodes/dist/ai/nodes/critique/node.d.ts +3 -3
  35. package/vendor/common-nodes/dist/ai/nodes/critique/node.js +10 -19
  36. package/vendor/common-nodes/dist/ai/nodes/fake-llm/node.d.ts +3 -3
  37. package/vendor/common-nodes/dist/ai/nodes/fake-llm/node.js +10 -11
  38. package/vendor/common-nodes/dist/ai/nodes/openai-llm/node.d.ts +3 -3
  39. package/vendor/common-nodes/dist/ai/nodes/openai-llm/node.js +7 -10
  40. package/vendor/common-nodes/dist/ai/nodes/review/node.d.ts +3 -3
  41. package/vendor/common-nodes/dist/ai/nodes/review/node.js +12 -19
  42. package/vendor/common-nodes/dist/ai/nodes/sub-agent/node.d.ts +5 -5
  43. package/vendor/common-nodes/dist/ai/nodes/sub-agent/node.js +251 -96
  44. package/vendor/common-nodes/dist/catalog.js +12 -0
  45. package/vendor/common-nodes/dist/crawl/crawl/node.js +11 -3
  46. package/vendor/common-nodes/dist/crawl/crawl-tools/node.js +5 -1
  47. package/vendor/common-nodes/dist/crawl/extract-links/node.js +7 -1
  48. package/vendor/common-nodes/dist/crawl/fetch-url/node.js +13 -4
  49. package/vendor/common-nodes/dist/crawl/save-page/node.js +11 -3
  50. package/vendor/common-nodes/dist/embeddings/create-embedding.d.ts +39 -0
  51. package/vendor/common-nodes/dist/embeddings/create-embedding.js +154 -0
  52. package/vendor/common-nodes/dist/embeddings/embed-provider/node.d.ts +53 -0
  53. package/vendor/common-nodes/dist/embeddings/embed-provider/node.js +126 -0
  54. package/vendor/common-nodes/dist/embeddings/embed-similarity/node.d.ts +20 -0
  55. package/vendor/common-nodes/dist/embeddings/embed-similarity/node.js +81 -0
  56. package/vendor/common-nodes/dist/embeddings/embed-text/node.d.ts +53 -0
  57. package/vendor/common-nodes/dist/embeddings/embed-text/node.js +91 -0
  58. package/vendor/common-nodes/dist/embeddings/from-embedding.d.ts +8 -0
  59. package/vendor/common-nodes/dist/embeddings/from-embedding.js +24 -0
  60. package/vendor/common-nodes/dist/embeddings/resolve-embedding-provider-model.d.ts +11 -0
  61. package/vendor/common-nodes/dist/embeddings/resolve-embedding-provider-model.js +8 -0
  62. package/vendor/common-nodes/dist/flow/checkpoint/node.js +7 -3
  63. package/vendor/common-nodes/dist/flow/delay/node.d.ts +2 -6
  64. package/vendor/common-nodes/dist/flow/delay/node.js +13 -9
  65. package/vendor/common-nodes/dist/flow/loop/node.js +7 -1
  66. package/vendor/common-nodes/dist/flow/merge/node.js +7 -1
  67. package/vendor/common-nodes/dist/flow/repeat/node.js +5 -1
  68. package/vendor/common-nodes/dist/flow/router/node.js +7 -1
  69. package/vendor/common-nodes/dist/hitl/chat-input/node.d.ts +2 -2
  70. package/vendor/common-nodes/dist/hitl/chat-input/node.js +8 -4
  71. package/vendor/common-nodes/dist/hitl/review-gate/node.js +11 -5
  72. package/vendor/common-nodes/dist/langflower-tools/node.js +5 -1
  73. package/vendor/common-nodes/dist/logic/assert/node.js +7 -1
  74. package/vendor/common-nodes/dist/logic/compare/node.js +7 -1
  75. package/vendor/common-nodes/dist/logic/gate/node.js +7 -1
  76. package/vendor/common-nodes/dist/logic/if/node.js +7 -1
  77. package/vendor/common-nodes/dist/logic/switch/node.js +7 -1
  78. package/vendor/common-nodes/dist/mcp/mcp-http/node.d.ts +4 -4
  79. package/vendor/common-nodes/dist/mcp/mcp-http/node.js +61 -60
  80. package/vendor/common-nodes/dist/mcp/mcp-stdio/node.d.ts +4 -4
  81. package/vendor/common-nodes/dist/mcp/mcp-stdio/node.js +58 -57
  82. package/vendor/common-nodes/dist/memory/memory-tools/node.js +5 -1
  83. package/vendor/common-nodes/dist/output/finish/node.js +13 -1
  84. package/vendor/common-nodes/dist/output/preview/node.js +9 -2
  85. package/vendor/common-nodes/dist/primitives/boolean/node.js +7 -1
  86. package/vendor/common-nodes/dist/primitives/number/node.js +7 -1
  87. package/vendor/common-nodes/dist/primitives/string/node.js +7 -1
  88. package/vendor/common-nodes/dist/primitives/string-multiline/node.d.ts +17 -0
  89. package/vendor/common-nodes/dist/primitives/string-multiline/node.js +31 -0
  90. package/vendor/common-nodes/dist/text/append-file/node.js +11 -3
  91. package/vendor/common-nodes/dist/text/concat/node.js +5 -1
  92. package/vendor/common-nodes/dist/text/read-file/node.js +9 -3
  93. package/vendor/common-nodes/dist/text/split-paced/node.d.ts +21 -0
  94. package/vendor/common-nodes/dist/text/split-paced/node.js +93 -0
  95. package/vendor/common-nodes/dist/text/write-file/node.js +11 -3
  96. package/vendor/common-nodes/dist/tools/collect-agent-tool-handles.d.ts +4 -4
  97. package/vendor/common-nodes/dist/tools/collect-agent-tool-handles.js +3 -11
  98. package/vendor/common-nodes/dist/tools/inventory-tool-round.d.ts +0 -10
  99. package/vendor/common-nodes/dist/tools/inventory-tool-round.js +0 -84
  100. package/vendor/common-nodes/dist/tools/tool-collection/node.d.ts +20 -0
  101. package/vendor/common-nodes/dist/tools/tool-collection/node.js +45 -0
  102. package/vendor/common-nodes/package.json +5 -5
  103. package/vendor/compiler/package.json +1 -1
  104. package/vendor/node-sdk/dist/node-factory/define-embed/embed-handle.d.ts +25 -0
  105. package/vendor/node-sdk/dist/node-factory/define-embed/embed-handle.js +25 -0
  106. package/vendor/node-sdk/dist/node-factory/define-llm-node/default-llm-ports.d.ts +3 -7
  107. package/vendor/node-sdk/dist/node-factory/define-llm-node/default-llm-ports.js +4 -44
  108. package/vendor/node-sdk/dist/node-factory/define-llm-node/define-llm-node.d.ts +3 -5
  109. package/vendor/node-sdk/dist/node-factory/define-llm-node/define-llm-node.js +3 -5
  110. package/vendor/node-sdk/dist/node-factory/define-llm-node/llm-inventory-wire.d.ts +1 -0
  111. package/vendor/node-sdk/dist/node-factory/define-llm-node/llm-inventory-wire.js +1 -0
  112. package/vendor/node-sdk/dist/node-factory/define-mcp/mcp-handle.d.ts +4 -4
  113. package/vendor/node-sdk/dist/node-factory/define-mcp/mcp-handle.js +2 -1
  114. package/vendor/node-sdk/dist/node-factory/define-node/define-node.d.ts +2 -0
  115. package/vendor/node-sdk/dist/node-factory/define-node/define-node.js +4 -1
  116. package/vendor/node-sdk/dist/node-factory/define-reactive-node/define-reactive-node.d.ts +3 -1
  117. package/vendor/node-sdk/dist/node-factory/define-reactive-node/define-reactive-node.js +2 -1
  118. package/vendor/node-sdk/dist/node-factory/define-reactive-node/io-helpers.d.ts +15 -0
  119. package/vendor/node-sdk/dist/node-factory/define-reactive-node/io-helpers.js +17 -1
  120. package/vendor/node-sdk/dist/node-factory/define-reactive-node/port-meta.d.ts +17 -4
  121. package/vendor/node-sdk/dist/node-factory/define-reactive-node/test/samples/delay-node.js +4 -2
  122. package/vendor/node-sdk/dist/node-factory/define-reactive-node/types.d.ts +6 -7
  123. package/vendor/node-sdk/dist/node-factory/define-reactive-node/ui-schema-inference.d.ts +1 -1
  124. package/vendor/node-sdk/dist/testing/create-node-harness.d.ts +30 -0
  125. package/vendor/node-sdk/dist/testing/create-node-harness.js +68 -0
  126. package/vendor/node-sdk/package.json +5 -5
  127. package/vendor/runtime/dist/port-feed-override.d.ts +13 -0
  128. package/vendor/runtime/dist/port-feed-override.js +21 -0
  129. package/vendor/runtime/dist/port-signal-from-response.d.ts +15 -0
  130. package/vendor/runtime/dist/port-signal-from-response.js +48 -0
  131. package/vendor/runtime/dist/runtime-runner.d.ts +8 -3
  132. package/vendor/runtime/dist/runtime-runner.js +102 -81
  133. package/vendor/runtime/dist/runtime.d.ts +3 -2
  134. package/vendor/runtime/dist/runtime.js +1 -1
  135. package/vendor/runtime/dist/testing/workflows/workflow-events.d.ts +2 -0
  136. package/vendor/runtime/dist/testing/workflows/workflow-events.js +7 -5
  137. package/vendor/runtime/dist/types.d.ts +26 -9
  138. package/vendor/runtime/dist/types.js +3 -0
  139. package/vendor/runtime/package.json +1 -1
  140. package/vendor/server/dist/bootstrap/project-bootstrap.service.d.ts +1 -1
  141. package/vendor/server/dist/bootstrap/seed-skeleton.d.ts +2 -2
  142. package/vendor/server/dist/bootstrap/seed-skeleton.js +17 -2
  143. package/vendor/server/dist/bridge/bind-embed-context.d.ts +7 -0
  144. package/vendor/server/dist/bridge/bind-embed-context.js +16 -0
  145. package/vendor/server/dist/bridge/build-execution-context.d.ts +2 -2
  146. package/vendor/server/dist/bridge/build-execution-context.js +8 -4
  147. package/vendor/server/dist/bridge/emit-bootstrap.js +4 -1
  148. package/vendor/server/dist/bridge/get-live-wired-tools.d.ts +3 -2
  149. package/vendor/server/dist/bridge/get-live-wired-tools.js +8 -5
  150. package/vendor/server/dist/bridge/settings-draft-controller.js +7 -3
  151. package/vendor/server/dist/bridge/wire-config-handlers.js +2 -0
  152. package/vendor/server/dist/bridge/wire-editor-handlers.js +14 -0
  153. package/vendor/server/dist/bridge/wire-runner-handlers.js +2 -2
  154. package/vendor/server/dist/bridge/wire-workflow-handlers.js +23 -9
  155. package/vendor/server/dist/checkpoint/run-checkpoint-session.js +3 -3
  156. package/vendor/server/dist/config/langflower-config.service.d.ts +2 -0
  157. package/vendor/server/dist/config/langflower-config.service.js +30 -0
  158. package/vendor/server/dist/session/build-session-bootstrap.js +1 -0
  159. package/vendor/server/dist/session/langflower-session.d.ts +3 -1
  160. package/vendor/server/dist/session/langflower-session.js +3 -1
  161. package/vendor/server/dist/session/reset-session-execution-feed.d.ts +6 -0
  162. package/vendor/server/dist/session/reset-session-execution-feed.js +8 -0
  163. package/vendor/server/dist/workflow/apply-editor-mutation.js +6 -0
  164. package/vendor/server/dist/workflow/workflow-persisted-inputs.js +8 -6
  165. package/vendor/server/skeleton/instructions.md +15 -3
  166. package/vendor/server/skeleton/nodes/hello-embed/README.md +185 -0
  167. package/vendor/server/skeleton/nodes/hello-embed/hello-embed.nodes.test.ts +181 -0
  168. package/vendor/server/skeleton/nodes/hello-embed/ingest.ts +126 -0
  169. package/vendor/server/skeleton/nodes/hello-embed/lib/chunk-markdown.test.ts +40 -0
  170. package/vendor/server/skeleton/nodes/hello-embed/lib/chunk-markdown.ts +123 -0
  171. package/vendor/server/skeleton/nodes/hello-embed/lib/ingest-search.test.ts +180 -0
  172. package/vendor/server/skeleton/nodes/hello-embed/lib/ingest.ts +128 -0
  173. package/vendor/server/skeleton/nodes/hello-embed/lib/paths.test.ts +20 -0
  174. package/vendor/server/skeleton/nodes/hello-embed/lib/paths.ts +70 -0
  175. package/vendor/server/skeleton/nodes/hello-embed/lib/schema.ts +21 -0
  176. package/vendor/server/skeleton/nodes/hello-embed/lib/search.ts +254 -0
  177. package/vendor/server/skeleton/nodes/hello-embed/lib/text-embedder.ts +14 -0
  178. package/vendor/server/skeleton/nodes/hello-embed/lib/vectors.ts +126 -0
  179. package/vendor/server/skeleton/nodes/hello-embed/lib/walk-markdown.test.ts +62 -0
  180. package/vendor/server/skeleton/nodes/hello-embed/lib/walk-markdown.ts +67 -0
  181. package/vendor/server/skeleton/nodes/hello-embed/package.json +11 -0
  182. package/vendor/server/skeleton/nodes/hello-embed/search-handle.ts +119 -0
  183. package/vendor/server/skeleton/nodes/hello-embed/search.ts +98 -0
  184. package/vendor/server/skeleton/nodes/hello-embed/tsconfig.json +14 -0
  185. package/vendor/server/skeleton/nodes/my-nodes/README.md +13 -3
  186. package/vendor/server/skeleton/nodes/my-nodes/package.json +1 -1
  187. package/vendor/server/skeleton/schemas/langflower-config.schema.json +4 -0
  188. package/vendor/server/skeleton/skills/langflower-helper/SKILL.md +125 -38
  189. package/vendor/server/skeleton/skills/langflower-helper/architecture.md +17 -6
  190. package/vendor/server/skeleton/skills/langflower-helper/layout.md +24 -17
  191. package/vendor/server/skeleton/skills/langflower-node-writer/SKILL.md +8 -1
  192. package/vendor/server/skeleton/skills/langflower-workflow-writer/SKILL.md +12 -8
  193. package/vendor/server/skeleton/workflows/kb-create.json +15 -43
  194. package/vendor/server/skeleton/workflows/kb-ingest.json +88 -0
  195. package/vendor/server/skeleton/workflows/kb-manual-search.json +105 -0
  196. package/vendor/server/skeleton/workflows/kb-navigate.json +8 -22
  197. package/vendor/server/skeleton/workflows/kb-rag.json +192 -0
  198. package/vendor/server/skeleton/workflows/kb-tool.json +111 -0
  199. package/vendor/server/skeleton/workflows/simple-coder.json +18 -46
  200. package/vendor/server/skeleton/workflows/starter.json +8 -22
  201. package/vendor/shared/dist/execution/derive-run-settle-outcome.js +2 -2
  202. package/vendor/shared/dist/execution/derive-run-settle-outcome.test.js +11 -8
  203. package/vendor/shared/dist/langflower-bus-config.d.ts +22 -6
  204. package/vendor/shared/dist/langflower-bus-config.js +23 -7
  205. package/vendor/shared/dist/langflower-config/merge-langflower-config-layers.test.js +8 -0
  206. package/vendor/shared/dist/langflower-config/settings-draft.d.ts +5 -0
  207. package/vendor/shared/dist/langflower-config/settings-draft.js +15 -7
  208. package/vendor/shared/dist/langflower-ws-waits.d.ts +3 -1
  209. package/vendor/shared/dist/langflower-ws-waits.js +2 -2
  210. package/vendor/shared/dist/langflower.d.ts +1 -1
  211. package/vendor/shared/dist/langflower.js +1 -1
  212. package/vendor/shared/dist/types/langflower-bootstrap.d.ts +6 -0
  213. package/vendor/shared/dist/types/langflower-config.d.ts +17 -0
  214. package/vendor/shared/dist/types/langflower-palette.d.ts +2 -1
  215. package/vendor/tools/dist/harness-types.d.ts +1 -1
  216. package/vendor/tools/dist/mcp/build-mcp-handle.d.ts +3 -21
  217. package/vendor/tools/dist/mcp/build-mcp-handle.js +2 -11
  218. package/vendor/tools/dist/mcp/create-system-mcp-handles.d.ts +9 -6
  219. package/vendor/tools/dist/mcp/create-system-mcp-handles.js +21 -17
  220. package/vendor/tools/package.json +1 -0
  221. package/ui-dist/chunk-MDGXX73Z.js +0 -4
  222. package/ui-dist/main-2JJGCNTD.js +0 -313
  223. package/ui-dist/styles-EOXODOI7.css +0 -1
@@ -54,11 +54,15 @@ On-demand only (not auto-injected). Use harness `read`:
54
54
 
55
55
  ### 1. Product
56
56
 
57
- - **Can:** Local, project-scoped coding agent. The **workflow graph** is the
58
- pipeline law (hard harness) — stages and edges are authored, not chosen
59
- ad hoc by the model each turn.
57
+ - **Can:** Local, folder-scoped **reactive node graph**. The LLM is a node,
58
+ not the product. The **workflow graph** is the pipeline law (hard harness)
59
+ — stages and edges are authored, not chosen ad hoc by the model each turn.
60
+ Extend with **MCP** and **skills**, plus **custom nodes** for graph
61
+ processing or custom tools via the same **ToolHandle** contract as built-ins.
60
62
  - **Cannot:** Require a cloud account. Let the model skip graph stages
61
- (QA/review/gates) by “deciding what’s next” outside the graph.
63
+ (QA/review/gates) by “deciding what’s next” outside the graph. Claim
64
+ serializable **chat sessions**, **image/video** asset management for
65
+ multimodal models, or a built-in **IDE / git UI**.
62
66
 
63
67
  ### 2. Project layout and bootstrap
64
68
 
@@ -67,11 +71,13 @@ templates in the skeleton are **already usable** once copied into the project
67
71
  do not say coding pipelines “don’t exist” or are unavailable.
68
72
 
69
73
  - **Can:** `langflower start [project-dir]` (default port **4010**) creates
70
- `.langflower/`, config, `instructions.md`, pack `nodes/my-nodes/`, skills
74
+ `.langflower/`, config, `instructions.md`, packs `nodes/my-nodes/` and
75
+ `nodes/hello-embed/`, skills
71
76
  `langflower-helper`, `langflower-node-writer`, and
72
77
  `langflower-workflow-writer`, and opens workflow **`starter`** first.
73
78
  - **Can:** Skeleton already ships coding and KB sample workflows
74
- (`simple-coder`, `advanced-coder`, `kb-create`, `kb-navigate`, …). With a
79
+ (`simple-coder`, `advanced-coder`, `kb-create`, `kb-navigate`,
80
+ `kb-ingest`, `kb-manual-search`, `kb-tool`, `kb-rag`, …). With a
75
81
  provider configured, they are seeded on first-run → load → composer **Start**.
76
82
  - **Can:** Second `langflower start` on an existing `.langflower/` **reuses**
77
83
  it as-is (no wipe).
@@ -88,10 +94,12 @@ do not say coding pipelines “don’t exist” or are unavailable.
88
94
  ### 3. Skeleton and samples
89
95
 
90
96
  - **Can:** First-run seed = config + **all** skeleton workflows (including
91
- `starter`, coding samples, `kb-create`, `kb-navigate`) + three skills +
92
- `my-nodes` + instructions.
97
+ `starter`, coding samples, `kb-create`, `kb-navigate`, `kb-ingest`,
98
+ `kb-manual-search`, `kb-tool`, `kb-rag`) + three skills + `my-nodes` +
99
+ `hello-embed` + instructions.
93
100
  - **Can:** Skeleton inventory includes `node-writer`, `agents-dialog`,
94
- `simple-coder`, `advanced-coder`, `kb-create`, `kb-navigate` (and other
101
+ `simple-coder`, `advanced-coder`, `kb-create`, `kb-navigate`,
102
+ `kb-ingest`, `kb-manual-search`, `kb-tool`, `kb-rag` (and other
95
103
  samples under `packages/server/skeleton/` / demo-project).
96
104
  - **Cannot:** Claim a Sample workflows **catalog UI** (browse / help /
97
105
  one-click copy) is shipped.
@@ -111,14 +119,49 @@ do not say coding pipelines “don’t exist” or are unavailable.
111
119
  - **Cannot:** Treat Settings as the selected-node inspector (ports/params).
112
120
  - **Cannot:** Reveal a saved API key in the UI.
113
121
 
122
+ ### 4b. Embeddings
123
+
124
+ - **Can:** Settings **Default embedding model** (`embedding: "providerId/modelId"`);
125
+ palette **Embeddings** — `common-embed-text`, `common-embed-similarity`,
126
+ `common-embed-provider`; custom packs wire **`embed`** (`EmbedHandle` from
127
+ `@langflower/node-sdk`); server binds embedding HTTP — packs never see
128
+ `apiKey`. Manual check: String → Embed text → Preview on **`preview`**.
129
+ Sample pack **`hello-embed`**: ingest project `.md` → sqlite (vectors + FTS5);
130
+ hybrid retrieve (cosine + keyword, RRF) packs **Question + full-chunk Context**
131
+ for `hello-embed-search` / `project_search`.
132
+ Workflows `kb-ingest` / `kb-manual-search` / `kb-tool` / `kb-rag`. Needs
133
+ the default embedding model (`langflower start` compiles the pack). Copy
134
+ the pack for a different corpus — see `nodes/hello-embed/README.md`.
135
+ - **Cannot:** Treat embeddings as a host catalog feature. Use **`EmbedHandle`**
136
+ (not `ToolHandle`) for batch float vectors. hello-embed sqlite lives under
137
+ `.langflower/.cache/hello-embed/`.
138
+
139
+ ### 4c. Primitives and paced split
140
+
141
+ - **Can:** Palette **Primitives** include String, **String (multiline)**
142
+ (`common-string-multiline`, textarea), Number, Boolean. **Text** includes
143
+ Concat, Read/Write/Append File, and **Split (paced)** (`common-split-paced`)
144
+ — one non-empty chunk per `trigger` (first ASAP; `finish` after the last;
145
+ CSV / logs line-by-line). Not the planned one-shot Split (`parts[]`).
146
+
114
147
  ### 5. Editor chrome
115
148
 
116
149
  - **Can:** Chat Input graphs start from the composer **Start** control. Plain
117
- **Run** stays disabled for those graphs.
150
+ **Run** stays disabled for those graphs. Prefill or last typed text lives on
151
+ the Chat Input node (`inputs.message`) and reappears after Stop.
118
152
  - **Can:** While running — Hard **Stop**, soft **Pause**, HITL and
119
- `permission.ask` in the composer.
153
+ `permission.ask` in the composer. Work log **clears** on successful
154
+ workflow load / create / copy (not rename).
155
+ - **Cannot:** Switch, rename, delete, copy, or create a workflow while a run
156
+ is active — Stop first. Same lock: inspector / canvas inline / palette
157
+ drag (`cursor-not-allowed`).
120
158
  - **Cannot:** Tell users to press plain **Run** to start a Chat Input graph.
121
159
  - **Cannot:** Claim the feed after reload must be **richer** than live.
160
+ - **Can:** Work log shows opted-in roles (`reasoning` / `draft` / `result` /
161
+ tools / `progress`) plus Finish **`done`** and Preview content as result
162
+ bubbles. Unmarked ports and `feed.role: 'none'` are omitted.
163
+ - **Cannot:** Claim unmarked plumbing (`prompt` / `value` wires) appears as
164
+ muted technical rows — use the inspector for those values.
122
165
  - **Cannot:** Claim `basic-coder` proves chat-dense mood for the full
123
166
  `coding-agent` pipeline.
124
167
 
@@ -130,18 +173,43 @@ do not say coding pipelines “don’t exist” or are unavailable.
130
173
  cleaned graph. Catalog list still shows the file (metadata-only).
131
174
  - **Cannot:** Silently rewrite disk on load. Invent port renames — only drop.
132
175
 
176
+ ### 5c. Multi input ports
177
+
178
+ Extra empty handles on a node are **one logical port** authored with `multi`
179
+ (`merge` / `combine` / `zip`). Wiring a slot **grows a trailing empty slot**
180
+ on that same port so you can connect another source. Leave the empty row
181
+ unwired — it is not a duplicate Helper, not a second node, and not a bug.
182
+
183
+ - **Can (starter Helper `feedback`):** `multi: 'merge'` — several sources can
184
+ kick a new agent turn. Example: Review Gate HITL **and** `common-review`
185
+ auto-review.
186
+ - **Can (starter Helper `tools`):** `multi: 'combine'` — several packs land on
187
+ one agent. Example: Langflower Tools **and** Writer Sub-Agent. Optional
188
+ **Tool collection** (`common-tool-collection`) can still merge wires first;
189
+ direct multi-wire still works.
190
+ - **Can (Router):** `common-router` uses the same extra-slot growth for
191
+ channels (`ch` / `ch@1` / …) so many edges stay readable.
192
+ - **Cannot:** Claim every port grows this way — `userPrompt` / `systemPrompt`
193
+ stay single. Claim the empty slot must be wired. Equate `merge` (each emit
194
+ is a turn) with `combine` (inventory array) with `zip` (lockstep, e.g.
195
+ Concat).
196
+
133
197
  ### 6. Coding workflows
134
198
 
135
- | Name | Fact |
136
- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
137
- | `starter` | Onboarding chat + this skill + Writer Sub-Agent (`langflower-workflow-writer` + `langflower-node-writer`) — default open after seed |
138
- | Skeleton stubs | `simple-coder`, `advanced-coder`, `kb-create`, `kb-navigate`, … seeded on first-run; with provider → Start |
139
- | `simple-coder` | Plan⇄HITL→Coder⇄HITL→Finish smoke spine + `common-memory-tools` on Plan/Coder/Researcher/Worker; Researcher Sub-Agent under Plan, Worker under Coder — **not** full multi-loop `coding-agent` |
140
- | `kb-create` | Memory / project wiki create: Orchestrator **indexes** the repo with `glob`/`read`, persists `history/work-queue.md`, then **serially** spawns Explorer → Composer **one unit at a time**; `common-memory-tools` writes `core/*` + `modules/*`; Review rejects non-empty Pending or thin overviews |
141
- | `kb-navigate` | Memory navigate: Navigator + Searcher + memory tree/grep/section tools; HITL Review Gate for follow-ups |
142
- | `basic-coder` | Basic coding harness (Plan⇄HITL→Coder⇄HITL→Finish) — not a toy, **not** full multi-loop `coding-agent` |
143
- | `coding-agent` | Clarify HITL → red team → plan gate → coder → QA → `common-review` → result HITL; **graph** orders stages |
144
- | Status | Use-case **Partial**; real-LLM Implementable bar open; Fake CI ≠ end-user proof — **not** “no templates” |
199
+ | Name | Fact |
200
+ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
201
+ | `starter` | Onboarding chat + this skill + Writer Sub-Agent (`langflower-workflow-writer` + `langflower-node-writer`) — default open after seed |
202
+ | Skeleton stubs | `simple-coder`, `advanced-coder`, `kb-create`, `kb-navigate`, `kb-ingest`, `kb-manual-search`, `kb-tool`, `kb-rag`, … seeded on first-run; with provider → Start |
203
+ | `simple-coder` | Plan⇄HITL→Coder⇄HITL→Finish smoke spine + `common-memory-tools` on Plan/Coder/Researcher/Worker; Researcher Sub-Agent under Plan, Worker under Coder — **not** full multi-loop `coding-agent` |
204
+ | `kb-create` | Memory / project wiki create: Orchestrator **indexes** the repo with `glob`/`read`, persists `history/work-queue.md`, then **serially** calls Explorer → Composer **one unit at a time**; `common-memory-tools` writes `core/*` + `modules/*`; Review rejects non-empty Pending or thin overviews |
205
+ | `kb-navigate` | Memory navigate: Navigator + Searcher + memory tree/grep/section tools; HITL Review Gate for follow-ups |
206
+ | `kb-ingest` | Sample **hello-embed** ingest (Settings embedding model; pack compiles on `langflower start`) |
207
+ | `kb-manual-search` | Sample hello-embed query → Preview / Finish |
208
+ | `kb-tool` | Sample hello-embed `project_search` ToolHandle → agent |
209
+ | `kb-rag` | Simplified RAG: hybrid retrieve packs Question + full chunks into the LLM; `project_search` + grep/read; Review feedback / Approve → Finish |
210
+ | `basic-coder` | Basic coding harness (Plan⇄HITL→Coder⇄HITL→Finish) — not a toy, **not** full multi-loop `coding-agent` |
211
+ | `coding-agent` | Clarify HITL → red team → plan gate → coder → QA → `common-review` → result HITL; **graph** orders stages |
212
+ | Status | Use-case **Partial**; real-LLM Implementable bar open; Fake CI ≠ end-user proof — **not** “no templates” |
145
213
 
146
214
  ### 7. Run lifecycle
147
215
 
@@ -161,8 +229,12 @@ These four are **not** the same thing.
161
229
  - **Can:** Harness builtins + `permission.ask` Allow/Deny for those builtins.
162
230
  Wired pack / MCP tools (including memory writes and **Langflower Tools**)
163
231
  do **not** ask — authoring the edge is consent. Write Allow does **not**
164
- grant bash. Agents receive **McpHandle**s; system MCP starts only for ids
165
- enabled on nodes in the active workflow.
232
+ grant bash. MCP **nodes** wire `tools` → agent `tools` (`ToolHandle[]`).
233
+ Optional **Tool collection** (`common-tool-collection`) can merge several
234
+ `tools` wires into one before the agent. Direct multi-wire into the agent
235
+ still works. System MCP from `langflower.jsonc` starts only for ids enabled
236
+ on nodes in the active workflow; those tools land on `EC.toolHandles`,
237
+ never as raw config.
166
238
  - **Can:** `compile_custom_nodes` exists only when **Langflower Tools**
167
239
  (`common-langflower-tools`) is wired into that agent’s `tools` port
168
240
  (starter Helper / Writer). Same intent as Custom → **Update**. Recompile
@@ -180,16 +252,21 @@ These four are **not** the same thing.
180
252
  ### 9. Sub-Agent and swarm
181
253
 
182
254
  Sub-Agent is an **explicit canvas node** for **control and observability**
183
- (own toolLog/response, visible spawn, `nodeId` filter) — not magic inside one
184
- LLM turn.
185
-
186
- - **Can:** First-class Sub-Agent node + spawn registration / `subagentResult`.
187
- Default swarm spawns are **serial**. Wiki/memory create (`kb-create`) uses
188
- **serial** scoped spawns driven by a persisted work queue — not parallel
255
+ (own toolLog/response, visible specialist) — not magic inside one LLM turn.
256
+
257
+ - **Can:** First-class Sub-Agent node. Wire Sub-Agent
258
+ `subagent-registration` → parent `tools` (one edge). The parent calls the
259
+ specialist tool (`Writer(subagent)` / `toolId` `Writer_subagent`) with a
260
+ `task`
261
+ (optional `skillId` from the Inspector Skills enum). That call closes the
262
+ parent work-log visit; the specialist streams as its own card. Default swarm
263
+ invokes are **serial**. Wiki/memory create (`kb-create`) uses **serial**
264
+ scoped specialist calls driven by a persisted work queue — not parallel
189
265
  whole-repo fan-out.
190
266
  - **Cannot / not yet:** Hide Sub-Agent work only inside a single LLM turn with
191
267
  no graph node (anti-pattern). Parallel fan-out as the **default**. Nested
192
- **workflow files** (far future).
268
+ **workflow files** (far future). Do not look for `spawn_subagent` or
269
+ registration / spawn / result ports — those wires are gone.
193
270
 
194
271
  ### 10. Other demos
195
272
 
@@ -201,8 +278,9 @@ LLM turn.
201
278
  `kb-create` (index with `glob` → `history/work-queue.md` → serial
202
279
  Explorer/Composer units into `core/*` + `modules/*`) and `kb-navigate`.
203
280
  Managed markdown under `.langflower/memory/` (also reachable with harness
204
- file tools). No vector KB / embedding as base
205
- ([ADR-033](../../../../../docs/ADR.md#adr-033--markdown-memory-tools-no-embedding-as-base)).
281
+ file tools). **Embeddings** catalog nodes + Settings default embedding model
282
+ are shipped for API checks and pack **`EmbedHandle`** wiring — separate from
283
+ vector KB ([ADR-033](../../../../../docs/ADR.md#adr-033--markdown-memory-tools-no-embedding-as-base)).
206
284
  Obsidian vault helpers are **not** shipped (TBD-007).
207
285
  - **skill-refining:** CLI eval + `skillPath` / harness `read`; no canvas
208
286
  `skill-refining.json` demo.
@@ -218,15 +296,18 @@ When the user asks to “create a project wiki”, “build a knowledge base”,
218
296
  → Orchestrator (`common-openai-llm` + builtins `glob`/`read`/`grep` + wired
219
297
  `common-memory-tools`) → Sub-Agents Explorer (read) + Composer (write) →
220
298
  `common-review` with readiness criteria → Finish. Persist a work queue in
221
- memory **before** deep survey; `spawn_subagent` **one unit at a time**.
299
+ memory **before** deep survey; call the Explorer / Composer specialist
300
+ tools **one unit at a time**.
222
301
  - **Cannot:** Recommend one LLM that “reads the whole repo once and dumps a
223
- wiki”. Claim vector/embedding KB as base. Claim Obsidian vault helpers as
224
- shipped.
302
+ wiki”. Claim Obsidian vault helpers as shipped. For semantic search over
303
+ markdown, point at **hello-embed** (`kb-ingest` / `kb-rag`) rather than
304
+ inventing catalog embedding-KB nodes.
225
305
 
226
306
  ### 11. Custom nodes
227
307
 
228
308
  - **Can:** **TypeScript** via `@langflower/node-sdk` — first-class language;
229
- `tsc` / IDE types act as compile-time validators. After file changes call
309
+ `tsc` / IDE types act as compile-time validators. **`langflower start`**
310
+ compiles packs under `.langflower/nodes/`. After file changes call
230
311
  **`compile_custom_nodes`** (no args) or Custom → **Update** — same
231
312
  composer. On starter you already have the tool (Langflower Tools wired).
232
313
  Stop is not required for already-placed custom types (hot-swap).
@@ -235,6 +316,10 @@ When the user asks to “create a project wiki”, “build a knowledge base”,
235
316
  auto-place or auto-wire them mid-run.
236
317
  Packs under `.langflower/nodes/<pack>/`; user runs `npm install` in the pack
237
318
  when adding author deps. See `instructions.md` and `nodes/my-nodes/README.md`.
319
+ Pack `tsconfig.json` gates compile (`tsc --noEmit`). `from './file.ts'`
320
+ requires `"allowImportingTsExtensions": true` next to `"noEmit": true`
321
+ (hello-embed); otherwise the pack does not compile. Extensionless imports
322
+ (`my-nodes`) do not need the flag.
238
323
  Nodes may **intentionally keep in-memory internal state across runs**
239
324
  (Stop / done / Start) until the user loads another workflow or shuts down
240
325
  Langflower — not the same as Checkpoint resume after process kill.
@@ -248,10 +333,12 @@ When the user asks to “create a project wiki”, “build a knowledge base”,
248
333
 
249
334
  When the user asks to add or change a custom node from this starter chat:
250
335
 
251
- 1. Spawn Writer (or edit `.langflower/nodes/<pack>/*.ts` yourself).
336
+ 1. Call Writer (or edit `.langflower/nodes/<pack>/*.ts` yourself).
252
337
  2. Call **`compile_custom_nodes`** (no args). Report `status` / `nodeTypes` /
253
338
  `errors` from the tool text. Pack failures also write
254
- `COMPILATION_ERRORS.md`.
339
+ `COMPILATION_ERRORS.md`. If tsc rejects `.ts` import paths, add
340
+ `allowImportingTsExtensions` next to `noEmit` in the pack `tsconfig.json`
341
+ (copy hello-embed), then compile again.
255
342
  3. **Already on the canvas** → live now, no Stop. **New type** → user places
256
343
  it from Custom and wires it; this tool does not drop nodes on the canvas.
257
344
  4. If a custom tools pack is already wired into this agent, you may call those
@@ -5,7 +5,8 @@ this file over inventing infrastructure.
5
5
 
6
6
  ## What it is
7
7
 
8
- - Local, **project-scoped** coding agent.
8
+ - Local, **folder-scoped reactive node graph**. The LLM is a node, not the
9
+ product.
9
10
  - The **workflow graph** is the pipeline law (hard harness): stages and edges
10
11
  are authored; the model does not freely skip QA/review/gates outside the
11
12
  graph.
@@ -76,7 +77,15 @@ Project product data for Langflower lives under **`.langflower/`**.
76
77
 
77
78
  - LLM / agent nodes use **skills** and harness tools as wired in the graph.
78
79
  - **Sub-Agent** is an **explicit canvas node** for control and observability
79
- (own toolLog/response, visible spawn) — not hidden work inside one LLM turn.
80
+ (own toolLog/response). Wire `subagent-registration` into the parent
81
+ `tools` — not hidden work inside one LLM turn. The announced tool is
82
+ `{name}(subagent)` (`toolId` slug `Name_subagent`). Calling that tool closes
83
+ the parent work-log visit; the specialist streams as its own card, and
84
+ the parent continues in a new visit below. Optional **Tool collection**
85
+ (`common-tool-collection`) can merge several `tools` wires; direct
86
+ multi-wire into the agent still works. Extra empty canvas slots on
87
+ `multi` ports (`feedback` merge, `tools` combine) and Router channels
88
+ (`ch` / `ch@1`) are intentional fan-in — not cloned ports.
80
89
  - **Graph order** stages the pipeline; the model does not invent the stage
81
90
  sequence outside the graph.
82
91
  - Project memory / wiki create is **queue-driven**: index with harness `glob`,
@@ -88,10 +97,12 @@ Project product data for Langflower lives under **`.langflower/`**.
88
97
 
89
98
  - Custom nodes use the same **`@langflower/node-sdk`** path as built-ins.
90
99
  - **TypeScript** is first-class; `tsc` / IDE types act as compile-time gates.
91
- After file changes call `compile_custom_nodes` (only if **Langflower
92
- Tools** is wired — starter Helper / Writer already are) or Custom →
93
- **Update**. Same composer: typecheck + bundle + hot-swap live custom
94
- instances + refresh the Custom palette.
100
+ `langflower start` compiles packs. After file changes call
101
+ `compile_custom_nodes` (only if **Langflower Tools** is wired — starter
102
+ Helper / Writer already are) or Custom → **Update**. Same composer:
103
+ typecheck + bundle + hot-swap live custom instances + refresh the Custom
104
+ palette. Pack `from './x.ts'` needs `allowImportingTsExtensions` +
105
+ `noEmit` in pack `tsconfig.json` or `tsc --noEmit` fails (hello-embed seed).
95
106
  Stop is not required for already-placed custom types.
96
107
  An already-wired custom tools pack can be invoked later in the same run
97
108
  after compile. Do not auto-place or auto-wire a new type mid-run.
@@ -7,7 +7,10 @@ Facts for UI chrome and on-disk paths. Prefer this file over guessing.
7
7
  - **Topbar** — workflow list (switch / create / rename as shipped), gear →
8
8
  **Settings**.
9
9
  - **Left palette** — built-in nodes; **Custom** packs; **Update** reloads
10
- custom packs after disk changes.
10
+ custom packs after disk changes. Collapse with `<<` on the Palette title
11
+ row; restore with floating `>>` at the canvas top-left. Visibility is
12
+ project `paletteVisible` (missing key = shown) and is allowed during a
13
+ run.
11
14
  - **Center** — canvas (nodes, edges, selection).
12
15
  - **Right aside** — mutually exclusive modes: **feed** | **inspector** |
13
16
  **Settings**. Opening Settings (gear or empty-provider onboarding) swaps out
@@ -17,21 +20,25 @@ Facts for UI chrome and on-disk paths. Prefer this file over guessing.
17
20
 
18
21
  ## Where can I…?
19
22
 
20
- | Goal | Where |
21
- | -------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
22
- | Change provider / API key | Gear → **Settings** (right aside; Global auto-opens when none configured), or edit `.langflower/langflower.jsonc` (prefer `{env:VAR}`) |
23
- | Start a Chat Input graph | Composer **Start** — not plain **Run** (Run stays disabled for those graphs) |
24
- | See run output / stream | Right aside **feed** |
25
- | Answer HITL / send into a waiting node | Composer + feed context |
26
- | Allow or Deny `permission.ask` | Composer permission controls |
27
- | Soft-pause last feed agent / continue | Composer **Pause** (per-node) / Send or Resume (soft pause ≠ Hard Stop) |
28
- | Hard-stop a run | Composer **Stop** |
29
- | Edit selected node params / ports | Select node → right aside **inspector** (not Settings) |
30
- | Add or reload custom nodes | Pack under `.langflower/nodes/<pack>/`. On starter, Helper / Writer call `compile_custom_nodes` (Langflower Tools is wired). Else Custom → **Update**. Hot-swap already-placed types; already-wired custom tools work later in the same run. New types: user places from Custom (no auto-place / auto-wire mid-run). |
31
- | Switch workflow | Topbar workflow list |
32
- | Open Settings without leaving canvas | Gear — Settings in right aside |
33
- | Find sample coding graphs | Skeleton / demo-project workflow files — **manual copy** into project, then load → Start. No Sample workflows catalog UI. |
34
- | Project instructions for agents | `.langflower/instructions.md` |
23
+ | Goal | Where |
24
+ | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
25
+ | Change provider / API key | Gear → **Settings** (right aside; Global auto-opens when none configured), or edit `.langflower/langflower.jsonc` (prefer `{env:VAR}`) |
26
+ | Start a Chat Input graph | Composer **Start** — not plain **Run**. Prefill lives on the node; Stop then Start reuses it. |
27
+ | See run output / stream | Right aside **feed** |
28
+ | Answer HITL / send into a waiting node | Composer + feed context |
29
+ | Allow or Deny `permission.ask` | Composer permission controls |
30
+ | Soft-pause last feed agent / continue | Composer **Pause** (per-node) / Send or Resume (soft pause ≠ Hard Stop) |
31
+ | Hard-stop a run | Composer **Stop** |
32
+ | Edit selected node params / ports | Select node → right aside **inspector** (not Settings). Read-only while a run is active — Stop first. |
33
+ | See what a built-in node does | Hover a palette row (popover) **or** select the node → inspector **description** (markdown). |
34
+ | Add a node from the palette | Drag from the left palette onto the canvas. Disabled while a run is active (`cursor-not-allowed`) — Stop first. |
35
+ | Hide / show the node palette | Palette title `<<` / canvas `>>`. Shared across tabs; stored as `paletteVisible` in project `langflower.jsonc`. Allowed during a run. |
36
+ | Add or reload custom nodes | Pack under `.langflower/nodes/<pack>/`. Server start compiles existing packs. After file changes: on starter, Helper / Writer call `compile_custom_nodes` (Langflower Tools is wired). Else Custom → **Update**. Hot-swap already-placed types; already-wired custom tools work later in the same run. New types: user places from Custom (no auto-place / auto-wire mid-run). |
37
+ | Switch workflow | Topbar workflow list. Load / New / Copy / rename / Delete are locked while a run is active — Stop first. |
38
+ | Open Settings without leaving canvas | Gear — Settings in right aside |
39
+ | Find sample coding graphs | Skeleton / demo-project workflow files — **manual copy** into project, then load → Start. No Sample workflows catalog UI. |
40
+ | Why extra empty ports on Helper / tools / Router | Those inputs are `multi`. Wiring one slot shows the next free slot. **Feedback** = several sources (HITL + auto-review). **Tools** = several packs. **Router** = extra channels (`ch` / `ch@1`). Leave the empty row unwired. |
41
+ | Project instructions for agents | `.langflower/instructions.md` |
35
42
 
36
43
  ## On-disk `.langflower/` map
37
44
 
@@ -40,7 +47,7 @@ Facts for UI chrome and on-disk paths. Prefer this file over guessing.
40
47
  | `langflower.jsonc` | Providers, secrets refs, project config |
41
48
  | `workflows/` | Saved workflow graphs |
42
49
  | `skills/` | Agent skills (`langflower-helper/`, `langflower-node-writer/`, `langflower-workflow-writer/`) |
43
- | `nodes/` | Custom node packs (e.g. `my-nodes/`) |
50
+ | `nodes/` | Custom node packs (`my-nodes/`, sample `hello-embed/`) |
44
51
  | `instructions.md` | Project-level agent instructions |
45
52
  | `runs/` | Run artifacts / checkpoints when created |
46
53
  | `logs/` | Server bridge diagnostic JSONL logs when the server runs |
@@ -20,6 +20,10 @@ You help the user write **custom nodes** for Langflower.
20
20
  starter, Writer has it because **Langflower Tools** is wired. Custom →
21
21
  **Update** is the same composer. Failures land in `COMPILATION_ERRORS.md`.
22
22
  Do **not** only remind the user to click Update.
23
+ - Pack `tsconfig.json` is the `tsc --noEmit` gate. `from './lib/x.ts'`
24
+ requires `"allowImportingTsExtensions": true` next to `"noEmit": true`
25
+ (copy `hello-embed/tsconfig.json`). Without it the pack does not compile.
26
+ Extensionless imports (`my-nodes`) do not need the flag.
23
27
  - Langflower does **not** auto-`npm install` pack dependencies.
24
28
  - Do **not** claim you can place a newly compiled type on the canvas or wire
25
29
  it mid-run. Already-placed types hot-swap; already-wired custom tools can
@@ -28,7 +32,8 @@ You help the user write **custom nodes** for Langflower.
28
32
  ## Contract (do not invent forks)
29
33
 
30
34
  - Default pack: `.langflower/nodes/my-nodes/` (one folder = one `package.json`).
31
- - Prefer **`defineNode`** for sync/Promise nodes. Use
35
+ - Prefer **`defineNode`** for sync/Promise nodes (`execute` stamps pending
36
+ on outputs). Use
32
37
  **`defineToolRegistrations`** for LLM-callable `ToolHandle` packs on a
33
38
  `tools` port. Use **`defineReactiveNode`** only when exclusive multi-output
34
39
  branches, streams, or advanced bind wiring are required.
@@ -64,3 +69,5 @@ You help the user write **custom nodes** for Langflower.
64
69
  - `.langflower/nodes/my-nodes/README.md`
65
70
  - Seed demos: `git-diff.ts` (`defineNode`), `git-diff-tool.ts`
66
71
  (`defineToolRegistrations`), `review-gate.ts` (`defineReactiveNode`)
72
+ - Multi-file + `.ts` imports: `.langflower/nodes/hello-embed/` (`tsconfig.json`
73
+ already has `allowImportingTsExtensions`)
@@ -2,7 +2,8 @@
2
2
  name: Langflower workflow writer
3
3
  description: >-
4
4
  Guides authors writing and editing `.langflower/workflows/*.json` graphs
5
- (catalog node types, real ports, Soft↔Hard loops, Sub-Agent L0 wiring).
5
+ (catalog node types, real ports, Soft↔Hard loops, Sub-Agent
6
+ `subagent-registration` wiring).
6
7
  ---
7
8
 
8
9
  # Langflower workflow writer
@@ -55,11 +56,13 @@ Schema: `.langflower/schemas/workflow.schema.json`. Samples:
55
56
  | Node type | Key ports |
56
57
  | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
57
58
  | `common-chat-input` | out `message` (no wireable in) |
58
- | `common-openai-llm` / `common-fake-llm` | in `userPrompt`, `systemPrompt`, `feedback`, `subagentRegistration`, `subagentResult`; out `response`, `subagent`, … |
59
+ | `common-openai-llm` / `common-fake-llm` | in `userPrompt`, `systemPrompt`, `feedback`, `tools`; out `response`, `toolLog`, … |
60
+ | `common-mcp-stdio` / `common-mcp-http` | out **`tools`** — wire into an agent `tools` port (not a separate `mcp` port) |
61
+ | `common-tool-collection` | in **`tools`** (multi combine) → out **`tools`** — optional hub; duplicate `toolId` last-wins. Direct pack → agent still OK |
59
62
  | `common-hitl-review-gate` | in `result`; out `response`, `feedback` |
60
63
  | `common-merge` | in/out **`value`** only (not `step` / `output`) |
61
- | `common-review` | in `task`, `result`, `systemPrompt`; out `response`, `feedback` |
62
- | `common-sub-agent` | out `registration`, `result`; in `task`, `systemPrompt` |
64
+ | `common-review` | in `task`, `result`, `systemPrompt`, `tools`; out `response`, `feedback` |
65
+ | `common-sub-agent` | out **`subagent-registration`** (one specialist handle) → parent `tools`; in `systemPrompt`, `tools` |
63
66
  | `common-finish` | in `value` |
64
67
  | `common-string` | in/out `value` |
65
68
  | `common-langflower-tools` | out **`tools`** only — wire into an agent `tools` port to opt in to **`compile_custom_nodes`** (unsafe; starter Helper / Writer already wired). Not ambient. Canvas add/remove node or edge tools are **not** shipped. |
@@ -75,13 +78,14 @@ Typical HITL revise loop:
75
78
  Do **not** feed Merge output into both gates and LLM feedback on every tick
76
79
  without a clear phase split.
77
80
 
78
- ## Sub-Agent L0 (registration + spawn)
81
+ ## Sub-Agent (one registration wire)
79
82
 
80
83
  Mirror `.langflower/workflows/kb-navigate.json`:
81
84
 
82
- - Sub-Agent `registration` → parent `subagentRegistration`
83
- - Parent `subagent` → Sub-Agent `task`
84
- - Sub-Agent `result` → parent `subagentResult`
85
+ - Sub-Agent `subagent-registration` → parent `tools`
86
+ - Parent calls the specialist tool (`task`, optional `skillId` enum)
87
+ - Do **not** draw `registration` / `subagent` / `task` / `result` /
88
+ `subagentResult` — those ports are gone
85
89
 
86
90
  ## Load repair (product fact)
87
91
 
@@ -60,7 +60,7 @@
60
60
  "maxFeedbackTurns": 8
61
61
  },
62
62
  "inputs": {
63
- "systemPrompt": "You are the Orchestrator for building a DETAILED project memory map (project wiki) under `.langflower/memory/`.\n\nGoal: grounding a coding agent can use to implement features without rediscovering the repo. A thin whole-repo skim is NOT enough.\n\n## Required memory layout (all under `.langflower/memory/`)\n\n1) `core/overview.md` — purpose, primary user, ships vs not, how to run\n2) `core/layout.md` — directory / package map with ownership\n3) `core/architecture.md` — runtime flow, boundaries, key ADRs / invariants\n4) `core/build-test.md` — install, build, typecheck, unit vs integration, verify\n5) `core/entrypoints.md` — CLI / server / UI / MCP paths and ports\n6) `core/conventions.md` — coding rules agents must follow\n7) `modules/<area>.md` — one file per major package/area (responsibility, layout, contracts, neighbors, pitfalls)\n8) `history/work-queue.md` — indexed work units (Pending / In progress / Done)\n9) `history/build-log.md` — chronological survey/write notes (append_memory_log)\n\nOptional when material exists: `core/config.md`, `core/workflows-skills.md`.\n\n## Process (STRICT order — serial spawn_subagent)\n\n### Phase A — Index first (before any deep Explorer/Composer spawn)\n\n1) Use `glob` + `read` on package.json workspaces, top-level dirs, README*, AGENTS.md, docs/** (or equivalents). List every workspace package / major area and each mandatory `core/*` topic.\n2) Persist `.langflower/memory/history/work-queue.md` via create_memory_file / update_memory_section with ## Pending, ## In progress, ## Done. Each Pending item: id, path(s) to survey, target memory file (`modules/<area>.md` or `core/<name>.md`), status.\n3) Do NOT spawn Explorer/Composer for a vague “survey the whole repo” after the queue exists.\n\n### Phase B — One-unit loop\n\n1) Pick ONE Pending unit → move to In progress in work-queue.md.\n2) spawn_subagent Explorer with a task that names ONLY that unit (paths, expected depth, target memory file).\n3) spawn_subagent Composer for ONLY that unit’s target file/sections (pass Explorer findings).\n4) Mark the unit Done; append_memory_log on history/build-log.md.\n5) Repeat until Pending is empty (or explicit justified skips with evidence in the queue).\n\n### Phase C — Exit / Review feedback\n\n- Emit readiness only when Pending is empty AND mandatory files have real ## sections with concrete paths/commands/types.\n- Module pages MUST cover every indexed package/area from the queue.\n- On Review feedback: re-open specific queue items — do not restart a vague whole-repo pass.\n- Cite evidence (paths + section headings) in the readiness report."
63
+ "systemPrompt": "You are the Orchestrator for building a DETAILED project memory map (project wiki) under `.langflower/memory/`.\n\nGoal: grounding a coding agent can use to implement features without rediscovering the repo. A thin whole-repo skim is NOT enough.\n\n## Required memory layout (all under `.langflower/memory/`)\n\n1) `core/overview.md` — purpose, primary user, ships vs not, how to run\n2) `core/layout.md` — directory / package map with ownership\n3) `core/architecture.md` — runtime flow, boundaries, key ADRs / invariants\n4) `core/build-test.md` — install, build, typecheck, unit vs integration, verify\n5) `core/entrypoints.md` — CLI / server / UI / MCP paths and ports\n6) `core/conventions.md` — coding rules agents must follow\n7) `modules/<area>.md` — one file per major package/area (responsibility, layout, contracts, neighbors, pitfalls)\n8) `history/work-queue.md` — indexed work units (Pending / In progress / Done)\n9) `history/build-log.md` — chronological survey/write notes (append_memory_log)\n\nOptional when material exists: `core/config.md`, `core/workflows-skills.md`.\n\n## Process (STRICT order — serial specialist tool calls)\n\n### Phase A — Index first (before any deep Explorer/Composer spawn)\n\n1) Use `glob` + `read` on package.json workspaces, top-level dirs, README*, AGENTS.md, docs/** (or equivalents). List every workspace package / major area and each mandatory `core/*` topic.\n2) Persist `.langflower/memory/history/work-queue.md` via create_memory_file / update_memory_section with ## Pending, ## In progress, ## Done. Each Pending item: id, path(s) to survey, target memory file (`modules/<area>.md` or `core/<name>.md`), status.\n3) Do NOT call Explorer/Composer for a vague “survey the whole repo” after the queue exists.\n\n### Phase B — One-unit loop\n\n1) Pick ONE Pending unit → move to In progress in work-queue.md.\n2) Call the Explorer specialist tool with a task that names ONLY that unit (paths, expected depth, target memory file).\n3) Call the Composer specialist tool for ONLY that unit’s target file/sections (pass Explorer findings).\n4) Mark the unit Done; append_memory_log on history/build-log.md.\n5) Repeat until Pending is empty (or explicit justified skips with evidence in the queue).\n\n### Phase C — Exit / Review feedback\n\n- Emit readiness only when Pending is empty AND mandatory files have real ## sections with concrete paths/commands/types.\n- Module pages MUST cover every indexed package/area from the queue.\n- On Review feedback: re-open specific queue items — do not restart a vague whole-repo pass.\n- Cite evidence (paths + section headings) in the readiness report."
64
64
  },
65
65
  "ui": {
66
66
  "position": {
@@ -212,48 +212,6 @@
212
212
  "toNodeId": "review",
213
213
  "toPort": ["tools", 0]
214
214
  },
215
- {
216
- "edgeId": "e-reg-explorer",
217
- "fromNodeId": "explorer",
218
- "fromPort": ["registration", 0],
219
- "toNodeId": "orchestrator",
220
- "toPort": ["subagentRegistration", 0]
221
- },
222
- {
223
- "edgeId": "e-reg-composer",
224
- "fromNodeId": "composer",
225
- "fromPort": ["registration", 0],
226
- "toNodeId": "orchestrator",
227
- "toPort": ["subagentRegistration", 1]
228
- },
229
- {
230
- "edgeId": "e-spawn-explorer",
231
- "fromNodeId": "orchestrator",
232
- "fromPort": ["subagent", 0],
233
- "toNodeId": "explorer",
234
- "toPort": ["task", 0]
235
- },
236
- {
237
- "edgeId": "e-spawn-composer",
238
- "fromNodeId": "orchestrator",
239
- "fromPort": ["subagent", 0],
240
- "toNodeId": "composer",
241
- "toPort": ["task", 0]
242
- },
243
- {
244
- "edgeId": "e-result-explorer",
245
- "fromNodeId": "explorer",
246
- "fromPort": ["result", 0],
247
- "toNodeId": "orchestrator",
248
- "toPort": ["subagentResult", 0]
249
- },
250
- {
251
- "edgeId": "e-result-composer",
252
- "fromNodeId": "composer",
253
- "fromPort": ["result", 0],
254
- "toNodeId": "orchestrator",
255
- "toPort": ["subagentResult", 1]
256
- },
257
215
  {
258
216
  "edgeId": "e-orch-review-result",
259
217
  "fromNodeId": "orchestrator",
@@ -281,6 +239,20 @@
281
239
  "fromPort": ["response", 0],
282
240
  "toNodeId": "done",
283
241
  "toPort": ["value", 0]
242
+ },
243
+ {
244
+ "edgeId": "e-tools-explorer",
245
+ "fromNodeId": "explorer",
246
+ "fromPort": ["subagent-registration", 0],
247
+ "toNodeId": "orchestrator",
248
+ "toPort": ["tools", 1]
249
+ },
250
+ {
251
+ "edgeId": "e-tools-composer",
252
+ "fromNodeId": "composer",
253
+ "fromPort": ["subagent-registration", 0],
254
+ "toNodeId": "orchestrator",
255
+ "toPort": ["tools", 2]
284
256
  }
285
257
  ]
286
258
  }