langflower 0.2.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -29
- package/dist/{chunk-KOS7BXAM.js → chunk-32BC3YXC.js} +1 -1
- package/dist/{chunk-26UB55E5.js → chunk-5B3555QF.js} +2 -0
- package/dist/{chunk-X3FU465E.js → chunk-P3QJHZO7.js} +1 -1
- package/dist/{chunk-3Z7Q6SQ5.js → chunk-VVJLF47H.js} +93 -10
- package/dist/index.js +5743 -2626
- package/docs/{public → assets/public}/README.md +8 -1
- package/docs/{public → assets/public}/configuration.md +7 -0
- package/docs/{public → assets/public}/extending.md +9 -2
- package/docs/{public → assets/public}/getting-started.md +11 -4
- package/docs/{public → assets/public}/how-it-works.md +7 -0
- package/docs/{public → assets/public}/launcher.md +11 -2
- package/docs/{public → assets/public}/product.md +17 -3
- package/docs/{public → assets/public}/using-the-editor.md +7 -0
- package/docs/{public → assets/public}/workflows.md +7 -0
- package/package.json +2 -2
- package/ui-dist/assets/langflower-mark.svg +33 -0
- package/ui-dist/{chunk-IASSR2ON.js → chunk-33CXNPF2.js} +1 -1
- package/ui-dist/chunk-SNO65Y6K.js +4 -0
- package/ui-dist/index.html +2 -2
- package/ui-dist/main-GN43PQD5.js +323 -0
- package/ui-dist/styles-DMRPMU4V.css +1 -0
- package/vendor/node-sdk/dist/node-factory/define-llm-node/default-llm-ports.d.ts +11 -1
- package/vendor/node-sdk/dist/node-factory/define-llm-node/define-llm-node.d.ts +3 -1
- package/vendor/node-sdk/dist/node-factory/define-llm-node/define-llm-node.js +1 -0
- package/vendor/node-sdk/dist/node-factory/define-llm-node/steer-control.d.ts +5 -2
- package/vendor/node-sdk/dist/node-factory/define-llm-node/steer-control.js +3 -2
- package/vendor/node-sdk/dist/node-factory/define-node/define-node.d.ts +2 -1
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/capabilities.d.ts +32 -1
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/define-reactive-node.d.ts +3 -1
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/define-reactive-node.js +4 -1
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/hitl-config.d.ts +14 -0
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/hitl-config.js +24 -1
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/io-helpers.d.ts +13 -4
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/port-meta.d.ts +12 -2
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/types.d.ts +8 -0
- package/vendor/node-sdk/dist/node-factory/define-reactive-node/ui-schema-inference.d.ts +18 -0
- package/vendor/node-sdk/dist/node-state.d.ts +28 -0
- package/vendor/node-sdk/dist/node-state.js +1 -0
- package/vendor/node-sdk/package.json +1 -1
- package/vendor/runtime/dist/feed-log-fold.d.ts +26 -0
- package/vendor/runtime/dist/feed-log-fold.js +113 -0
- package/vendor/runtime/dist/runtime-editor.d.ts +6 -0
- package/vendor/runtime/dist/runtime-editor.js +95 -2
- package/vendor/runtime/dist/runtime-runner.d.ts +28 -3
- package/vendor/runtime/dist/runtime-runner.js +101 -9
- package/vendor/runtime/dist/runtime.d.ts +5 -1
- package/vendor/runtime/dist/runtime.js +2 -0
- package/vendor/runtime/dist/types.d.ts +91 -5
- package/vendor/runtime/dist/wire-type.d.ts +12 -0
- package/vendor/runtime/dist/wire-type.js +18 -0
- package/vendor/server/skeleton/instructions.md +3 -1
- package/vendor/server/skeleton/nodes/hello-embed/README.md +1 -1
- package/vendor/server/skeleton/nodes/hello-embed/package.json +1 -1
- package/vendor/server/skeleton/nodes/my-nodes/README.md +12 -0
- package/vendor/server/skeleton/nodes/my-nodes/package.json +1 -1
- package/vendor/server/skeleton/nodes/my-nodes/review-gate.ts +5 -0
- package/vendor/server/skeleton/skills/langflower-helper/SKILL.md +196 -57
- package/vendor/server/skeleton/skills/langflower-helper/architecture.md +50 -8
- package/vendor/server/skeleton/skills/langflower-helper/layout.md +33 -13
- package/vendor/server/skeleton/skills/langflower-node-writer/SKILL.md +25 -4
- package/vendor/server/skeleton/skills/langflower-workflow-writer/SKILL.md +21 -2
- package/vendor/server/skeleton/workflows/agents-dialog.json +1 -1
- package/vendor/server/skeleton/workflows/kb-rag.json +1 -1
- package/vendor/server/skeleton/workflows/starter.json +3 -3
- package/ui-dist/chunk-HEF6F5HN.js +0 -4
- package/ui-dist/main-66PVIOBC.js +0 -323
- package/ui-dist/styles-Y56BLXVS.css +0 -1
|
@@ -19,8 +19,9 @@ provider. They are past bootstrap; do not lead with CLI start or provider setup.
|
|
|
19
19
|
only path.
|
|
20
20
|
- Answer **only** from allowed fact sources: the **Companion docs** (via
|
|
21
21
|
`read` when relevant) and the **Knowledge base** below. If a fact is
|
|
22
|
-
missing, say **not in my facts** (or point at
|
|
23
|
-
|
|
22
|
+
missing, say **not in my facts** (or point at
|
|
23
|
+
`docs/product/use-cases/README.md` when the folder is the Langflower
|
|
24
|
+
repo) — do not invent.
|
|
24
25
|
- User asks **where** something is in the UI or project → `read`
|
|
25
26
|
`.langflower/skills/langflower-helper/layout.md` first, then answer from
|
|
26
27
|
that file.
|
|
@@ -28,15 +29,34 @@ provider. They are past bootstrap; do not lead with CLI start or provider setup.
|
|
|
28
29
|
`read` `.langflower/skills/langflower-helper/architecture.md` first, then
|
|
29
30
|
answer from that file.
|
|
30
31
|
|
|
32
|
+
## Tool results before claims
|
|
33
|
+
|
|
34
|
+
A message with no tool call ends your turn. The user sees that text as finished
|
|
35
|
+
work. Describing a call does not run it.
|
|
36
|
+
|
|
37
|
+
- Look up files, layout on disk, or “what is in this project” with `read` /
|
|
38
|
+
`glob` / `grep`, then answer from the result. The knowledge base below is
|
|
39
|
+
Langflower product fact, not a survey of the open folder.
|
|
40
|
+
- Write, edit, or compile only by calling the tool. Report the outcome only
|
|
41
|
+
after the tool result is in this turn.
|
|
42
|
+
- On starter, workflow JSON and custom-node packs go to `Writer(subagent)`.
|
|
43
|
+
Pack edits are followed by `compile_custom_nodes` (no args).
|
|
44
|
+
- Say a file was written, Writer finished, or compile succeeded only when that
|
|
45
|
+
tool result is already in this turn. Otherwise call the tool. Do not send a
|
|
46
|
+
plan or a done-summary in place of the call.
|
|
47
|
+
|
|
31
48
|
## First turn
|
|
32
49
|
|
|
33
|
-
|
|
34
|
-
running and a provider configured, then offer help
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
Bootstrap and provider facts stay in the Knowledge base for when they ask.
|
|
50
|
+
If the user message is only a greeting or empty, acknowledge they already got
|
|
51
|
+
Langflower running and a provider configured, then offer help. Do **not** open
|
|
52
|
+
with “run `langflower start`” or “configure OpenAI / providers”. Bootstrap and
|
|
53
|
+
provider facts stay in the Knowledge base for when they ask.
|
|
38
54
|
|
|
39
|
-
|
|
55
|
+
If the user already asked a question or for a change, answer that. Do not
|
|
56
|
+
replace it with the canned opening. A project overview or “what is done” needs
|
|
57
|
+
`read` / `glob` / `grep` of the folder first.
|
|
58
|
+
|
|
59
|
+
Example opening (greeting only):
|
|
40
60
|
|
|
41
61
|
> Glad you got Langflower running and a provider configured. I can explain what
|
|
42
62
|
> Langflower can do, help you set up workflows and custom nodes, and compile
|
|
@@ -50,6 +70,15 @@ On-demand only (not auto-injected). Use harness `read`:
|
|
|
50
70
|
- `.langflower/skills/langflower-helper/architecture.md` — trust / server-first /
|
|
51
71
|
WS bus summary
|
|
52
72
|
|
|
73
|
+
Langflower repository docs (not copied into a user project):
|
|
74
|
+
|
|
75
|
+
- `docs/product/features/README.md` and `docs/product/use-cases/README.md`
|
|
76
|
+
- `docs/reference/SESSIONS.md` (other mechanics sit beside it)
|
|
77
|
+
- `docs/adr/README.md`
|
|
78
|
+
- `docs/bugs/README.md`
|
|
79
|
+
- `docs/_work/TODO/README.md` — planning notes
|
|
80
|
+
- `docs/_archive/DONE/README.md` — frozen history
|
|
81
|
+
|
|
53
82
|
## Knowledge base
|
|
54
83
|
|
|
55
84
|
### 1. Product
|
|
@@ -59,10 +88,53 @@ On-demand only (not auto-injected). Use harness `read`:
|
|
|
59
88
|
— stages and edges are authored, not chosen ad hoc by the model each turn.
|
|
60
89
|
Extend with **MCP** and **skills**, plus **custom nodes** for graph
|
|
61
90
|
processing or custom tools via the same **ToolHandle** contract as built-ins.
|
|
91
|
+
- **Can:** Create, continue, and resume a **workflow session** (topbar tabs,
|
|
92
|
+
label `YYYY-MM-DD #N`). The workflow is the parent: sessions are stored
|
|
93
|
+
and listed under that workflow. The canvas shows that session’s graph
|
|
94
|
+
snapshot while the tab is open; the workflow file stays the home. A red
|
|
95
|
+
dot on a session tab means that session’s graph differs from the saved
|
|
96
|
+
workflow. The editor does not copy one graph onto the other. On disk that tab is
|
|
97
|
+
`.langflower/sessions/<workflowId>/<label>.json` (`schemaVersion: 1`)
|
|
98
|
+
plus `<label>.feed.jsonl`. The filename is the tab. `sessionId` is the
|
|
99
|
+
UUID inside the JSON, not the filename. The JSON holds the graph,
|
|
100
|
+
head `nodeStates` (`nodeId` → JSON), and points. A point stores
|
|
101
|
+
`runOffset` and `feedOffset` into the feed file, not a copy of the feed.
|
|
102
|
+
The feed log is one JSON value per line: a run marker, then folded port
|
|
103
|
+
frames. The restored work log is the slice after the last marker. The
|
|
104
|
+
JSON is rewritten when the graph, node state, points, or identity
|
|
105
|
+
change. Closed frames are appended. An open streaming frame stays in
|
|
106
|
+
memory until it closes. Finish does not flush. A Run with no tab opens
|
|
107
|
+
a session from the graph on screen. Restart opens the newest session
|
|
108
|
+
for that workflow. A Run continues the session head. **Continue from…**
|
|
109
|
+
rewinds to a point (truncates the feed to that offset and drops later
|
|
110
|
+
points) and keeps files already staged for that session. **+ New session** is still explicit and copies the saved
|
|
111
|
+
workflow file. The workflow file is the tab to the left of the session
|
|
112
|
+
tabs; double-click or the actions menu renames that file, not a session
|
|
113
|
+
tab. × deletes any listed session after confirmation, including one that
|
|
114
|
+
is not open and a corrupt file that cannot be selected. Save appears only
|
|
115
|
+
while the workflow file is dirty and no session
|
|
116
|
+
is open. While a session gate is open and the run is idle,
|
|
117
|
+
**Reset** empties the feed file, clears points, deletes that session's
|
|
118
|
+
uploads directory, and keeps the tab and graph. **Reset session on input** is a node parameter on OpenAI, Fake,
|
|
119
|
+
Review, and Critique (default off). Switch workflows and sessions
|
|
120
|
+
during HITL or steering: the parked run stops first, and the session
|
|
121
|
+
head is already flushed.
|
|
122
|
+
- **Can:** Attach `image/png`, `image/jpeg`, `image/gif`, `image/webp`,
|
|
123
|
+
`audio/wav`, `audio/mpeg`, `audio/mp3`, or `application/pdf` on Chat
|
|
124
|
+
Input, Chat Loop, Review Gate Request changes, Steer, and an
|
|
125
|
+
`ask_user` reply, from the picker, a paste (a screenshot
|
|
126
|
+
on the clipboard), or a drop. A staged image shows a thumbnail and a
|
|
127
|
+
full-size preview. The browser checks `file.type` and rejects
|
|
128
|
+
an empty MIME. `read` of `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`,
|
|
129
|
+
`.wav`, `.mp3`, and `.pdf` stages those bytes for Chat Completions.
|
|
130
|
+
History stores `fileId`, not base64. Video and every other type stay out.
|
|
62
131
|
- **Cannot:** Require a cloud account. Let the model skip graph stages
|
|
63
|
-
(QA/review/gates) by “deciding what’s next” outside the graph.
|
|
64
|
-
|
|
65
|
-
|
|
132
|
+
(QA/review/gates) by “deciding what’s next” outside the graph. Rename a
|
|
133
|
+
session tab. Switch workflows or sessions while the graph is executing.
|
|
134
|
+
Migrate old
|
|
135
|
+
`.langflower/runs/**/checkpoint.json` files. Claim an **asset gallery**,
|
|
136
|
+
**video**, or a file type outside the list above.
|
|
137
|
+
Claim a built-in **IDE / git UI**.
|
|
66
138
|
|
|
67
139
|
### 2. Project layout and bootstrap
|
|
68
140
|
|
|
@@ -78,7 +150,7 @@ do not say coding pipelines “don’t exist” or are unavailable.
|
|
|
78
150
|
macOS zip contains `Langflower.app`. Closing the launcher stops
|
|
79
151
|
instances **it** started. Closing a browser tab does
|
|
80
152
|
not. The **?** control opens the user manual on GitHub
|
|
81
|
-
(`docs/public/launcher.md`).
|
|
153
|
+
(`docs/assets/public/launcher.md`).
|
|
82
154
|
- **Cannot:** Claim the launcher embeds the canvas, or that it is a
|
|
83
155
|
Tauri / Electron / WebView app. (Tauri was tried for the thin window
|
|
84
156
|
and rejected; the shipped launcher is Slint.)
|
|
@@ -95,9 +167,11 @@ do not say coding pipelines “don’t exist” or are unavailable.
|
|
|
95
167
|
it as-is (no wipe).
|
|
96
168
|
- **Can:** Configure providers via **Settings** (Global opens on first connect
|
|
97
169
|
when none are configured) or `.langflower/langflower.jsonc` (prefer
|
|
98
|
-
`{env:VAR}`). Bootstrap never invents API keys. Simple nodes
|
|
99
|
-
without a provider
|
|
100
|
-
|
|
170
|
+
`{env:VAR}`). Bootstrap never invents API keys. Simple nodes and Fake LLM
|
|
171
|
+
work without a provider. Fake LLM imitates a model for tests and showcase
|
|
172
|
+
when a real completion is expensive and not deterministic. A real
|
|
173
|
+
OpenAI-compatible provider is required for live model runs and seeded
|
|
174
|
+
coding samples.
|
|
101
175
|
- **Cannot:** Claim bootstrap invents secrets, or that a polished
|
|
102
176
|
**named-path** empty-provider fail-closed error on run is already shipped —
|
|
103
177
|
tell users to add a provider in Settings or `langflower.jsonc`; prefer fail
|
|
@@ -124,7 +198,8 @@ do not say coding pipelines “don’t exist” or are unavailable.
|
|
|
124
198
|
- **Can:** Gear opens **Settings** in the **right aside**, swapping feed /
|
|
125
199
|
inspector; canvas stays. Open/close/scope are server-driven. Project and
|
|
126
200
|
Global scopes; merge **project > global**; Save applies without a full app
|
|
127
|
-
reload. Keys are write-only; prefer `{env:VAR}`.
|
|
201
|
+
reload. Keys are write-only; prefer `{env:VAR}`. The panel is
|
|
202
|
+
**Ready**.
|
|
128
203
|
- **Can:** With no providers configured, connect opens **Global Settings** with
|
|
129
204
|
onboarding copy (add OpenAI-compatible provider; Fake LLM / simple nodes
|
|
130
205
|
still work).
|
|
@@ -212,8 +287,9 @@ unwired — it is not a duplicate Helper, not a second node, and not a bug.
|
|
|
212
287
|
one agent. Example: Langflower Tools **and** Writer Sub-Agent. Optional
|
|
213
288
|
**Tool collection** (`common-tool-collection`) can still merge wires first;
|
|
214
289
|
direct multi-wire still works.
|
|
215
|
-
- **Can (Router):** `common-router`
|
|
216
|
-
|
|
290
|
+
- **Can (Router):** `common-router` channels are independent identity
|
|
291
|
+
passthrough (`ch` / `ch@1` / …). Extra slots grow as edges are added so
|
|
292
|
+
many wires stay short. The hub is **Available**.
|
|
217
293
|
- **Cannot:** Claim every port grows this way — `userPrompt` / `systemPrompt`
|
|
218
294
|
stay single. Claim the empty slot must be wired. Equate `merge` (each emit
|
|
219
295
|
is a turn) with `combine` (inventory array) with `zip` (lockstep, e.g.
|
|
@@ -221,31 +297,31 @@ unwired — it is not a duplicate Helper, not a second node, and not a bug.
|
|
|
221
297
|
|
|
222
298
|
### 6. Coding workflows
|
|
223
299
|
|
|
224
|
-
| Name | Fact
|
|
225
|
-
| ------------------ |
|
|
226
|
-
| `starter` | Onboarding chat + this skill + Writer Sub-Agent (`langflower-workflow-writer` + `langflower-node-writer`) — default open after seed
|
|
227
|
-
| 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
|
|
228
|
-
| `simple-coder` | Plan (`spec-architect`) ⇄ 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`
|
|
229
|
-
| `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
|
|
230
|
-
| `kb-navigate` | Memory navigate: Navigator + Searcher + memory tree/grep/section tools; HITL Review Gate for follow-ups
|
|
231
|
-
| `kb-ingest` | Sample **hello-embed** ingest (Settings embedding model; pack compiles on `langflower start`)
|
|
232
|
-
| `kb-manual-search` | Sample hello-embed query → Preview / Finish
|
|
233
|
-
| `kb-tool` | Sample hello-embed `project_search` ToolHandle → agent
|
|
234
|
-
| `kb-rag` | Simplified RAG: hybrid retrieve packs Question + full chunks into the LLM; `project_search` + grep/read; Review feedback / Approve → Finish
|
|
235
|
-
| `basic-coder` | Basic coding harness (Plan⇄HITL→Coder⇄HITL→Finish) — not a toy, **not** full multi-loop `coding-agent`
|
|
236
|
-
| `coding-agent` | Clarify HITL → red team → plan gate → coder → QA → `common-review` → result HITL; **graph** orders stages
|
|
237
|
-
| Status |
|
|
300
|
+
| Name | Fact |
|
|
301
|
+
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
302
|
+
| `starter` | Onboarding chat + this skill + Writer Sub-Agent (`langflower-workflow-writer` + `langflower-node-writer`) — default open after seed |
|
|
303
|
+
| 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 |
|
|
304
|
+
| `simple-coder` | Plan (`spec-architect`) ⇄ 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` |
|
|
305
|
+
| `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 |
|
|
306
|
+
| `kb-navigate` | Memory navigate: Navigator + Searcher + memory tree/grep/section tools; HITL Review Gate for follow-ups |
|
|
307
|
+
| `kb-ingest` | Sample **hello-embed** ingest (Settings embedding model; pack compiles on `langflower start`) |
|
|
308
|
+
| `kb-manual-search` | Sample hello-embed query → Preview / Finish |
|
|
309
|
+
| `kb-tool` | Sample hello-embed `project_search` ToolHandle → agent |
|
|
310
|
+
| `kb-rag` | Simplified RAG: hybrid retrieve packs Question + full chunks into the LLM; `project_search` + grep/read; Review feedback / Approve → Finish |
|
|
311
|
+
| `basic-coder` | Basic coding harness (Plan⇄HITL→Coder⇄HITL→Finish) — not a toy, **not** full multi-loop `coding-agent` |
|
|
312
|
+
| `coding-agent` | Clarify HITL → red team → plan gate → coder → QA → `common-review` → result HITL; **graph** orders stages |
|
|
313
|
+
| Status | **coding-agent** and MCP nodes are **Available**. Run interruption, the seed, close-tab, and session Continue are **Ready**. The eval pack runner and skill-pack scoring are **Available**. The sample graph and agent instructions are the user's configuration, not a universal result. Not every use case is Available or Ready |
|
|
238
314
|
|
|
239
315
|
### 7. Run lifecycle
|
|
240
316
|
|
|
241
|
-
| Mechanism | Meaning
|
|
242
|
-
| --------------------- |
|
|
243
|
-
| Hard Stop | Cancel; does **not** by itself create checkpoint Continue
|
|
244
|
-
| Soft Pause | Per-node Steer pause of the last feed agent; siblings keep working; Send (typed text) or Continue (no text, `{ kind: 'resume' }`) continues that node
|
|
245
|
-
| Provider recovery | Idle: default **autokick** (abort, exponential backoff, full-store replay + kick). Dead-loop: abort + short `retryBaseDelayMs` wait (not idle backoff) + kick.
|
|
246
|
-
| Browser close |
|
|
247
|
-
| Process kill / reboot | **Not** detachable resume
|
|
248
|
-
| Checkpoint Continue | Needs explicit boundary (`common-checkpoint` / `createCheckpoint`)
|
|
317
|
+
| Mechanism | Meaning |
|
|
318
|
+
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
319
|
+
| Hard Stop | Cancel; does **not** by itself create checkpoint Continue |
|
|
320
|
+
| Soft Pause | Per-node Steer pause of the last feed agent; siblings keep working; Send (typed text) or Continue (no text, `{ kind: 'resume' }`) continues that node |
|
|
321
|
+
| Provider recovery | Confirmed live 2026-10-17. Idle: default **autokick** (abort, exponential backoff, full-store replay + kick). Dead-loop: abort + short `retryBaseDelayMs` wait (not idle backoff) + kick. 5xx: autokick after the short transient budget; Steer opens when that budget is exhausted, not on every 5xx. `'retry'` banner stays in the feed; it does not open Steer. Pause → Steer → continue is confirmed, including several tabs of one run (drafts stay on the tab). Auth/config stay fatal |
|
|
322
|
+
| Browser close | Confirmed: if `langflower start` stays up, a long run continues after the browser tab closes; reopen live or settled. An open launcher window reminds you that work is in progress; it is not a progress panel. Closing the launcher stops processes that window started |
|
|
323
|
+
| Process kill / reboot | **Not** detachable resume of the live run. Restart opens the newest workflow session; a Run continues its head |
|
|
324
|
+
| Checkpoint Continue | Confirmed live 2026-10-17. Needs an open workflow session **and** an explicit boundary (`common-checkpoint` / `createCheckpoint`). That writes a **point** (`runOffset` / `feedOffset` into `<label>.feed.jsonl`, not a copied feed). **Continue from…** rewinds to a point and drops later events. A Run continues the head. A Run with no tab opens a session before the graph starts. Continue does not create a session. **No** every-node auto Continue. Old checkpoint files are not read |
|
|
249
325
|
|
|
250
326
|
These four are **not** the same thing.
|
|
251
327
|
|
|
@@ -286,6 +362,11 @@ These four are **not** the same thing.
|
|
|
286
362
|
`allow`) sets per-agent `toolPermissions` (cannot loosen past floor). Presets
|
|
287
363
|
materialize that table — no hidden role overlay. Schemas under
|
|
288
364
|
`.langflower/schemas/`.
|
|
365
|
+
- **Can:** Each LLM node's Inspector **Session context** group toggles what
|
|
366
|
+
a new session starts with: root `AGENTS.md`, root `README.md`, environment
|
|
367
|
+
(OS, work dir, date; on by default), Langflower harness note (on by
|
|
368
|
+
default) and a skill list (id, name, description, path). Skills load from
|
|
369
|
+
`.langflower/skills/` and `.agents/skills/` (`.langflower` wins on a clash).
|
|
289
370
|
- **Cannot:** Prior-run Allows carry into a new run. Mid-run “permission tier
|
|
290
371
|
unlock” as the product model (use graph stages / tool profiles). All
|
|
291
372
|
`mcp.servers` always start. Agent sees raw MCP config instead of handles.
|
|
@@ -301,21 +382,29 @@ Sub-Agent is an **explicit canvas node** for **control and observability**
|
|
|
301
382
|
specialist tool (`Writer(subagent)` / `toolId` `Writer_subagent`) with a
|
|
302
383
|
`task`
|
|
303
384
|
(optional `skillId` from the Inspector Skills enum). That call closes the
|
|
304
|
-
parent work-log visit; the specialist streams as its own card.
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
385
|
+
parent work-log visit; the specialist streams as its own card. That
|
|
386
|
+
pass is the **handover** pattern and it is Available. **Fan-out and
|
|
387
|
+
fan-in** on nodes already on the canvas are Available (a drawn split
|
|
388
|
+
and a merge back, including static fan-out and Loop map-collect). Default
|
|
389
|
+
Sub-Agent invokes stay **serial**. Wiki/memory create (`kb-create`) uses
|
|
390
|
+
**serial** scoped specialist calls driven by a persisted work queue.
|
|
391
|
+
- **Cannot:** **Dynamic swarm topology** is not a current promise. The run
|
|
392
|
+
does not add, remove, or rewire specialists that are not already nodes —
|
|
393
|
+
draw them before Start. Do not file that as a missing capability. Hide
|
|
394
|
+
Sub-Agent work only inside a single LLM turn with no graph node
|
|
395
|
+
(anti-pattern). Nested **workflow files** are not a current promise. Do
|
|
396
|
+
not look for `spawn_subagent` or registration / spawn / result ports —
|
|
397
|
+
those wires are gone.
|
|
312
398
|
|
|
313
399
|
### 10. Other demos
|
|
314
400
|
|
|
315
401
|
- **article-writing:** Outline + draft are **one** LLM node; research/crawl not
|
|
316
402
|
required for that demo.
|
|
317
|
-
- **research-fanout:**
|
|
318
|
-
|
|
403
|
+
- **research-fanout:** Static Docs / Risks / Alternatives are separate nodes
|
|
404
|
+
and start together. `common-loop` is **serial** (one body, one item).
|
|
405
|
+
After a completed list, `rerunItems` re-runs matching entries and keeps
|
|
406
|
+
the other results. Pass the axis string. Review prose is not parsed. The
|
|
407
|
+
demo feedback edge still revises the synthesizer.
|
|
319
408
|
- **project memory / wiki:** `common-memory-tools` + skeleton sample
|
|
320
409
|
`kb-create` (index with `glob` → `history/work-queue.md` → serial
|
|
321
410
|
Explorer/Composer units into `core/*` + `modules/*`) and `kb-navigate`.
|
|
@@ -325,7 +414,7 @@ Sub-Agent is an **explicit canvas node** for **control and observability**
|
|
|
325
414
|
output, `feed.role: result`). There is no separate Plan mode. **Embeddings**
|
|
326
415
|
catalog nodes + Settings default embedding model
|
|
327
416
|
are shipped for API checks and pack **`EmbedHandle`** wiring — separate from
|
|
328
|
-
vector KB (
|
|
417
|
+
vector KB (ADR-033, `docs/adr/033-markdown-memory-tools-no-embedding-as-base.md`).
|
|
329
418
|
Obsidian vault helpers are **not** shipped (TBD-007).
|
|
330
419
|
- **skill-refining:** CLI eval + `skillPath` / harness `read`; no canvas
|
|
331
420
|
`skill-refining.json` demo.
|
|
@@ -379,24 +468,38 @@ When the user asks to “create a project wiki”, “build a knowledge base”,
|
|
|
379
468
|
`review-gate` uses a boolean **pulse** on `ok`. If the next stage needs
|
|
380
469
|
the original payload, `ok` **passthroughs `trigger`** (`inferTypeFrom`)
|
|
381
470
|
— not `boolean` `true`. A formatter rewrite may be a side effect that
|
|
382
|
-
does **not** fail the gate.
|
|
471
|
+
does **not** fail the gate. `fail` wired back to an agent is
|
|
472
|
+
**failures only**: failing test names, assertion diffs, formatter
|
|
473
|
+
errors. Do not paste raw test or formatter output. Passing suites
|
|
474
|
+
and progress bloat the next turn. A green formatter emits nothing
|
|
475
|
+
on `fail`.
|
|
383
476
|
Nodes may **intentionally keep in-memory internal state across runs**
|
|
384
477
|
(Stop / done / Start) until the user loads another workflow or shuts down
|
|
385
|
-
Langflower
|
|
478
|
+
Langflower. That memory still survives `done` until the node is
|
|
479
|
+
rematerialized. It does not survive a process restart unless `bind`
|
|
480
|
+
returns a **state hook** (see §11b). OpenAI, Fake, Review, and Critique
|
|
481
|
+
persist `{ history }` that way on a workflow session.
|
|
386
482
|
- **Cannot:** Plain JS as the authoring path, Go, Python, or other languages.
|
|
387
483
|
Wrap OpenCode/CLI `.mjs` by spawning `node` on a sidecar file (not
|
|
388
484
|
TypeScript authoring; pack is not portable — port into pack `.ts` and
|
|
389
485
|
compile). Server auto-install. Sandboxed arbitrary user-node execution as shipped.
|
|
390
486
|
Ambient compile without Langflower Tools wired. Canvas add/remove node or
|
|
391
487
|
edge tools (not shipped). Claim that every node always resets on Stop, or
|
|
392
|
-
that in-memory node state survives process restart without
|
|
488
|
+
that in-memory node state survives process restart without a workflow
|
|
489
|
+
session and a state hook. Claim `persist$` is a delta, or that the hook
|
|
490
|
+
lives on `ExecutionContext`. Claim **Reset session on input** is the
|
|
491
|
+
state hook (it is a panel parameter on those four built-ins). Claim a
|
|
492
|
+
reset button. Claim session-tab rename, switching
|
|
493
|
+
workflows or sessions while the graph is executing, or migration of old
|
|
494
|
+
checkpoint files.
|
|
393
495
|
`defineNode` for exclusive `ok` / `fail`. Boolean `true` on a gate `ok`
|
|
394
496
|
that should continue the graph. Shell Cap on public `ExecutionContext`
|
|
395
497
|
(seed demos use `child_process`). Hanging `start` / `dev` / watch tools.
|
|
396
498
|
|
|
397
499
|
### 11a. Recipe — write / reload a custom node
|
|
398
500
|
|
|
399
|
-
When the user asks to add or change a custom node from this starter chat
|
|
501
|
+
When the user asks to add or change a custom node from this starter chat,
|
|
502
|
+
these steps are tool calls. A checklist in your reply does not replace them.
|
|
400
503
|
|
|
401
504
|
1. Call Writer (or edit `.langflower/nodes/<pack>/*.ts` yourself). When
|
|
402
505
|
converting OpenCode / CLI `.mjs` tools, **port the logic into pack `.ts`**
|
|
@@ -415,8 +518,44 @@ When the user asks to add or change a custom node from this starter chat:
|
|
|
415
518
|
|
|
416
519
|
Do **not** treat Custom → Update as the only reload path on starter.
|
|
417
520
|
|
|
521
|
+
### 11b. Recipe — persist node state across a restart
|
|
522
|
+
|
|
523
|
+
Return optional `state` from `defineReactiveNode` `bind`
|
|
524
|
+
(`@langflower/node-sdk`). It is not on `ExecutionContext`.
|
|
525
|
+
|
|
526
|
+
1. `persist$` emits the **full** JSON value after each committed unit of
|
|
527
|
+
work (`NodeStateJson`: null, boolean, number, string, array, or plain
|
|
528
|
+
object). Not a delta. Not a class or function.
|
|
529
|
+
2. `restore(state | null)` runs before wiring. `null` starts fresh and
|
|
530
|
+
returns `{ ok: true }`. A bad payload returns `{ ok: false, message }`
|
|
531
|
+
— that node starts fresh and the run is not aborted.
|
|
532
|
+
3. With a workflow session bound, that JSON is stored under the node id in
|
|
533
|
+
session `nodeStates` and copied onto each point. A later Run or Continue
|
|
534
|
+
calls `restore` with it. No session bound means nothing is written.
|
|
535
|
+
|
|
536
|
+
In-memory closures still survive Stop / done on the same loaded graph.
|
|
537
|
+
They die on rematerialize or process exit if there is no hook.
|
|
538
|
+
|
|
418
539
|
### 12. Status vocabulary
|
|
419
540
|
|
|
420
|
-
-
|
|
421
|
-
-
|
|
541
|
+
- **Available** means the scenario's capabilities are in the product and a live OpenAI-compatible run covered them. The user assembles the graph, prompts, and layout. `Missing parts: None` plus user configuration is not a gap.
|
|
542
|
+
- **Ready** means the scenario needs no extra configuration. The seed, Settings, Stop / Pause, the work log, close-tab, and session Continue are Ready.
|
|
543
|
+
- Say **Partial** only for a TODO-able capability. None are queued. A custom `ok` / `fail` review gate written with `defineReactiveNode` runs format, typecheck, and test and returns failure text on `feedback`; that is the plan-refine QA gate. An empty provider already fails on the OpenAI node port and the message tells the operator to open Settings and set up an OpenAI-compatible provider. Handover, fan-out, fan-in, independent Router channels, agent-swarm on a graph drawn before Start, Loop `rerunItems` (pass the axis string; the demo feedback edge still revises the synthesizer), and plan-refine QA are Available. Settings and bootstrap are Ready.
|
|
544
|
+
- Do **not** file: dynamic swarm topology, nested workflow files, TBD entries, encrypted secrets, a universal knowledge base (memory tools + `hello-embed`), a node error killing the graph (`error$` stays alive; retry is in the node that failed), or browser E2E of the canvas. The canvas is a projection of the server snapshot.
|
|
422
545
|
- Missing from this KB → **not in my facts** — do not invent.
|
|
546
|
+
|
|
547
|
+
## Before you send a final answer
|
|
548
|
+
|
|
549
|
+
A message with no tool call ends your turn. The user sees that text as finished
|
|
550
|
+
work. Describing a call does not run it.
|
|
551
|
+
|
|
552
|
+
- Look up files, layout on disk, or “what is in this project” with `read` /
|
|
553
|
+
`glob` / `grep`, then answer from the result. The knowledge base above is
|
|
554
|
+
Langflower product fact, not a survey of the open folder.
|
|
555
|
+
- Write, edit, or compile only by calling the tool. Report the outcome only
|
|
556
|
+
after the tool result is in this turn.
|
|
557
|
+
- On starter, workflow JSON and custom-node packs go to `Writer(subagent)`.
|
|
558
|
+
Pack edits are followed by `compile_custom_nodes` (no args).
|
|
559
|
+
- Say a file was written, Writer finished, or compile succeeded only when that
|
|
560
|
+
tool result is already in this turn. Otherwise call the tool. Do not send a
|
|
561
|
+
plan or a done-summary in place of the call.
|
|
@@ -44,9 +44,11 @@ Project product data for Langflower lives under **`.langflower/`**.
|
|
|
44
44
|
- **Closing or reopening a browser tab does not stop a running workflow** while
|
|
45
45
|
`langflower start` / the server process stays up. Reconnect → fresh snapshots
|
|
46
46
|
- continued facts.
|
|
47
|
-
- Soft **Pause**, Hard **Stop**, and
|
|
48
|
-
controls — do **not** equate “tab closed” with Stop.
|
|
49
|
-
|
|
47
|
+
- Soft **Pause**, Hard **Stop**, and discarding a session point are
|
|
48
|
+
**explicit** controls — do **not** equate “tab closed” with Stop. A
|
|
49
|
+
workflow session (topbar tab) can continue after process kill. That is
|
|
50
|
+
not the same as closing the browser while the process stays up (see
|
|
51
|
+
Knowledge base §7).
|
|
50
52
|
|
|
51
53
|
## Execution model
|
|
52
54
|
|
|
@@ -56,8 +58,38 @@ Project product data for Langflower lives under **`.langflower/`**.
|
|
|
56
58
|
- Canvas node instances stay alive across **Stop / done / Start** while the
|
|
57
59
|
same workflow is loaded. Authors may **intentionally** keep in-memory
|
|
58
60
|
internal state across runs until the user **loads another workflow** or
|
|
59
|
-
**shuts down Langflower**.
|
|
60
|
-
process restart.
|
|
61
|
+
**shuts down Langflower**. In-memory closures still survive `done` until
|
|
62
|
+
the node is rematerialized. They do not survive a process restart.
|
|
63
|
+
- A **workflow session** is a durable tab of one workflow, not the process
|
|
64
|
+
`LangflowerSession`. The workflow is the parent: tabs are stored and
|
|
65
|
+
listed under that workflow. While the tab is open the canvas shows the
|
|
66
|
+
session graph snapshot; the workflow file stays the home. On disk the tab is
|
|
67
|
+
`.langflower/sessions/<workflowId>/<label>.json` (`schemaVersion: 1`)
|
|
68
|
+
plus `<label>.feed.jsonl`. The filename is the tab (`YYYY-MM-DD #N`).
|
|
69
|
+
`sessionId` is the UUID inside the JSON. The JSON holds the graph,
|
|
70
|
+
head `nodeStates`, and points (`runOffset` / `feedOffset`, not a copied
|
|
71
|
+
feed). The feed log is one JSON value per line; the restored work log
|
|
72
|
+
is the slice after the last run marker. The JSON is rewritten when the
|
|
73
|
+
graph, node state, points, or identity change. Closed frames are
|
|
74
|
+
appended after a short debounce. An open streaming frame stays in
|
|
75
|
+
memory until it closes. Finish does not flush. Restart binds the newest
|
|
76
|
+
session before the first feed. A Run with no tab writes one from the
|
|
77
|
+
graph on screen. A Run continues the head. **Continue from…** rewinds
|
|
78
|
+
to a point (truncates the feed to that offset and drops later points).
|
|
79
|
+
**Reset** empties the feed and clears points; the tab and graph stay.
|
|
80
|
+
OpenAI, Fake, Review, and Critique persist `{ history }` through the
|
|
81
|
+
state hook (`persist$` + `restore` on the bind result, stored under the
|
|
82
|
+
node id in `nodeStates`). Repeat persists `{ nextIndex, done, count }`
|
|
83
|
+
after each slot that has already left the node. Sub-Agent has no hook:
|
|
84
|
+
its result is a tool call on the parent agent's transcript. A custom
|
|
85
|
+
node uses the same hook: emit the full JSON value, accept `null` or
|
|
86
|
+
that JSON in `restore`. No session bound means nothing is written.
|
|
87
|
+
**Reset session on input** is a node parameter (default off), not the
|
|
88
|
+
hook. Tabs cannot be renamed. Any listed tab can be deleted, including one
|
|
89
|
+
that is not open and a corrupt file.
|
|
90
|
+
Switching workflows or sessions is refused while the graph is executing,
|
|
91
|
+
and allowed during HITL or steering after the parked run stops. Old
|
|
92
|
+
`.langflower/runs/**/checkpoint.json` files are not migrated.
|
|
61
93
|
- **HITL loops** (Review Gate, feedback ports, composer Start/Send) are normal
|
|
62
94
|
**internal waiting state of nodes**, not a separate product “interrupt the
|
|
63
95
|
engine” mechanism.
|
|
@@ -133,8 +165,18 @@ Project product data for Langflower lives under **`.langflower/`**.
|
|
|
133
165
|
|
|
134
166
|
## Honesty boundary
|
|
135
167
|
|
|
136
|
-
-
|
|
137
|
-
|
|
138
|
-
|
|
168
|
+
- Not every use case is Available or Ready. Sample-prompt quality is the user's
|
|
169
|
+
graph, not a missing capability.
|
|
170
|
+
- With an OpenAI-compatible provider, daily use replaces an OpenCode-style
|
|
171
|
+
harness for a multi-stage coding graph and for a chat loop whose result
|
|
172
|
+
cannot be approved up front. Confirmed mechanisms: tool calls, HITL,
|
|
173
|
+
custom `ok` / `fail` gates, a work log that shows reasoning and tool
|
|
174
|
+
calls, closing the browser tab on a long run, and resume from a session
|
|
175
|
+
point. An open launcher window reminds you that work is in progress.
|
|
139
176
|
- If a detail is not here and not in the helper Knowledge base → **not in my
|
|
140
177
|
facts**.
|
|
178
|
+
- Langflower repository docs (not copied into a user project):
|
|
179
|
+
`docs/product/features/README.md`, `docs/product/use-cases/README.md`,
|
|
180
|
+
`docs/reference/SESSIONS.md`, `docs/adr/README.md`, `docs/bugs/README.md`.
|
|
181
|
+
Planning notes are `docs/_work/TODO/README.md`. Frozen history is
|
|
182
|
+
`docs/_archive/DONE/README.md`.
|
|
@@ -4,8 +4,18 @@ Facts for UI chrome and on-disk paths. Prefer this file over guessing.
|
|
|
4
4
|
|
|
5
5
|
## Editor chrome map
|
|
6
6
|
|
|
7
|
-
- **Topbar** —
|
|
8
|
-
**
|
|
7
|
+
- **Topbar** — product mark, then the project folder name (browser
|
|
8
|
+
tab title `<folder> — Langflower`), workflow list, then the **workflow
|
|
9
|
+
file tab** (double-click or the actions menu to rename; a dot when that
|
|
10
|
+
file is dirty; **Save** only while it is dirty and no session is open).
|
|
11
|
+
The actions menu sits next to the workflow list and is hidden while a
|
|
12
|
+
session is open. Then scrollable **session tabs** (`YYYY-MM-DD #N`, name
|
|
13
|
+
order) with **+** (New session) stuck to the last tab. Session tabs
|
|
14
|
+
cannot be renamed. A red dot on a session tab means that session’s graph
|
|
15
|
+
differs from the saved workflow; hover says so. The editor does not copy
|
|
16
|
+
one graph onto the other. × deletes any listed tab after confirmation, including
|
|
17
|
+
one that is not open and a corrupt file. Connection is a dot (the word only while connecting or
|
|
18
|
+
disconnected). Theme toggle and gear → **Settings**.
|
|
9
19
|
- **Left palette** — built-in nodes; **Custom** packs; **Update** reloads
|
|
10
20
|
custom packs after disk changes. Collapse with `<<` on the Palette title
|
|
11
21
|
row; restore with floating `>>` at the canvas top-left. Visibility is
|
|
@@ -38,7 +48,9 @@ Facts for UI chrome and on-disk paths. Prefer this file over guessing.
|
|
|
38
48
|
| 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. |
|
|
39
49
|
| Hide / show the node palette | Palette title `<<` / canvas `>>`. Shared across tabs; stored as `paletteVisible` in project `langflower.jsonc`. Allowed during a run. |
|
|
40
50
|
| Add or reload custom nodes | Pack under `.langflower/nodes/<pack>/`. Server start loads cached packs when fingerprints match, else compiles. After file changes: on starter, Helper / Writer call `compile_custom_nodes` (Langflower Tools is wired). Else Custom → **Update** (always rebuilds). 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). |
|
|
41
|
-
| Switch workflow | Topbar workflow list. Load / New / Copy / rename / Delete
|
|
51
|
+
| Switch workflow | Topbar workflow list. Load / New / Copy / rename / Delete stay locked while the graph is executing. HITL and steering leave them usable; the parked run stops first. |
|
|
52
|
+
| Continue a conversation after Stop or restart | Restart opens the newest session. A Run with no tab opens one. **+ New session** is still explicit. A Run continues the head. **Continue from…** lists that session’s points and rewinds. Switching tabs is refused while the graph is executing. HITL and steering allow a switch after the parked run stops. |
|
|
53
|
+
| Drop a poisoned agent transcript on the next run | Select the agent → inspector **Reset session on input** (OpenAI, Fake, Review, Critique; default off), then start a new run. No reset button. The work log stays. |
|
|
42
54
|
| Open Settings without leaving canvas | Gear — Settings in right aside |
|
|
43
55
|
| Find sample coding graphs | Skeleton / demo-project workflow files — **manual copy** into project, then load → Start. No Sample workflows catalog UI. |
|
|
44
56
|
| 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. |
|
|
@@ -46,16 +58,16 @@ Facts for UI chrome and on-disk paths. Prefer this file over guessing.
|
|
|
46
58
|
|
|
47
59
|
## On-disk `.langflower/` map
|
|
48
60
|
|
|
49
|
-
| Path | Role
|
|
50
|
-
| ------------------ |
|
|
51
|
-
| `langflower.jsonc` | Providers, secrets refs, project config
|
|
52
|
-
| `workflows/` | Saved workflow graphs
|
|
53
|
-
| `skills/` | Agent skills (`langflower-helper/`, `langflower-node-writer/`, `langflower-workflow-writer/`, `spec-architect/`)
|
|
54
|
-
| `nodes/` | Custom node packs — one folder / `package.json` each (`my-nodes/`, sample `hello-embed/`, extra sibling packs; no jsonc registration)
|
|
55
|
-
| `instructions.md` | Project-level agent instructions
|
|
56
|
-
| `
|
|
57
|
-
| `logs/` | Server bridge diagnostic JSONL logs when the server runs
|
|
58
|
-
| `.gitignore` | Seeded ignore rules: compiled node cache (`.cache/`), `logs/`, pack `node_modules/`
|
|
61
|
+
| Path | Role |
|
|
62
|
+
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
63
|
+
| `langflower.jsonc` | Providers, secrets refs, project config |
|
|
64
|
+
| `workflows/` | Saved workflow graphs |
|
|
65
|
+
| `skills/` | Agent skills (`langflower-helper/`, `langflower-node-writer/`, `langflower-workflow-writer/`, `spec-architect/`) |
|
|
66
|
+
| `nodes/` | Custom node packs — one folder / `package.json` each (`my-nodes/`, sample `hello-embed/`, extra sibling packs; no jsonc registration) |
|
|
67
|
+
| `instructions.md` | Project-level agent instructions |
|
|
68
|
+
| `sessions/` | Workflow sessions named like the tab (`<workflowId>/<label>.json`, `schemaVersion: 1`, plus `<label>.feed.jsonl`). JSON: graph, `nodeStates`, point byte offsets. JSONL: the feed (last run is the slice after the last marker). Not read from `runs/` |
|
|
69
|
+
| `logs/` | Server bridge diagnostic JSONL logs when the server runs |
|
|
70
|
+
| `.gitignore` | Seeded ignore rules: compiled node cache (`.cache/`), `logs/`, pack `node_modules/` |
|
|
59
71
|
|
|
60
72
|
## Out of chrome
|
|
61
73
|
|
|
@@ -63,3 +75,11 @@ Facts for UI chrome and on-disk paths. Prefer this file over guessing.
|
|
|
63
75
|
bootstrap does not rewrite them.
|
|
64
76
|
- Closing the browser tab is not “where is Stop” — see companion
|
|
65
77
|
`architecture.md` (server-first runs) and Knowledge base §7.
|
|
78
|
+
|
|
79
|
+
## Langflower repository docs
|
|
80
|
+
|
|
81
|
+
When the open folder is the Langflower repo, live docs are
|
|
82
|
+
`docs/product/features/README.md`, `docs/product/use-cases/README.md`,
|
|
83
|
+
`docs/reference/SESSIONS.md`, `docs/adr/README.md`, and
|
|
84
|
+
`docs/bugs/README.md`. Planning notes are `docs/_work/TODO/README.md`.
|
|
85
|
+
Frozen history is `docs/_archive/DONE/README.md`.
|
|
@@ -148,8 +148,13 @@ the node — copying the custom-node pack does not break it. Host `git` via
|
|
|
148
148
|
`configureOutput('ok', ok$, { inferTypeFrom: trigger })`. Do **not**
|
|
149
149
|
emit `boolean` `true` on that wire (it breaks typing and the
|
|
150
150
|
continue-the-graph edge).
|
|
151
|
-
- `fail` is a **string**
|
|
152
|
-
|
|
151
|
+
- `fail` is a **string** wired to Preview or an agent `feedback` port.
|
|
152
|
+
Filter test and formatter output to **failures** before that string
|
|
153
|
+
is emitted: failing test names, assertion diffs, and formatter error
|
|
154
|
+
lines. Drop passing suites, progress, and full file dumps. A length
|
|
155
|
+
cap on the raw log is not a filter — the kept text still bloats the
|
|
156
|
+
next agent turn. A green formatter or a passing test emits nothing
|
|
157
|
+
on `fail`.
|
|
153
158
|
- A rewrite step (formatter) may run as a **side effect** and must not
|
|
154
159
|
fail the gate if the product intent is “format then typecheck/test”.
|
|
155
160
|
Typecheck / tests may fail the gate and skip later steps.
|
|
@@ -167,11 +172,14 @@ Vitest config **includes** that glob; do not assume it.
|
|
|
167
172
|
|
|
168
173
|
1. Pick a stable `type` string (pack-unique) and `displayName`.
|
|
169
174
|
2. Declare `inputs` / `outputs` with `wireType`s; keep `uiSchema` honest
|
|
175
|
+
(long settings lists: add `group: { label, collapsed: true, order }` per item so
|
|
176
|
+
the Inspector folds them into an accordion section; unmarked = General,
|
|
177
|
+
always first)
|
|
170
178
|
(`defineToolRegistrations` owns a `tools` output — no custom inputs).
|
|
171
179
|
3. Implement `execute` (`defineNode`), `tools` handlers
|
|
172
180
|
(`defineToolRegistrations`), or `bind` (`defineReactiveNode`).
|
|
173
|
-
4.
|
|
174
|
-
|
|
181
|
+
4. Write the full file under `.langflower/nodes/<pack>/` with `write` or
|
|
182
|
+
`edit`. A chat paste is not a saved node.
|
|
175
183
|
5. Call **`compile_custom_nodes`**. If the snapshot lists errors, `read`
|
|
176
184
|
that pack’s `COMPILATION_ERRORS.md`, fix, and compile again. Tell the
|
|
177
185
|
user to place **new** types from Custom; already-placed types are live.
|
|
@@ -184,3 +192,16 @@ Vitest config **includes** that glob; do not assume it.
|
|
|
184
192
|
(`defineToolRegistrations`), `review-gate.ts` (`defineReactiveNode`)
|
|
185
193
|
- Multi-file + `.ts` imports: `.langflower/nodes/hello-embed/` (`tsconfig.json`
|
|
186
194
|
already has `allowImportingTsExtensions`)
|
|
195
|
+
|
|
196
|
+
## Before you send a final answer
|
|
197
|
+
|
|
198
|
+
A message with no tool call is the final result Helper will treat as done.
|
|
199
|
+
Plain text does not write or compile files.
|
|
200
|
+
|
|
201
|
+
- Create and edit files with `write`, `edit`, or `create` under
|
|
202
|
+
`.langflower/nodes/`. A chat paste is not a saved node.
|
|
203
|
+
- After writing or editing those files, call `compile_custom_nodes` with no
|
|
204
|
+
arguments. Quote status and `COMPILATION_ERRORS.md` from the tool result.
|
|
205
|
+
- The closing summary lists only paths and compile status that appear in tool
|
|
206
|
+
results from this task, plus open risks. If the file is not written yet, call
|
|
207
|
+
the tool instead of summarizing.
|