@manny-est/node-red-flowpilot 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/CHANGELOG.md +62 -0
- package/PROJECT-OVERVIEW.md +42 -7
- package/README.md +19 -0
- package/USER-GUIDE.md +45 -1
- package/flowpilot-core.css +1189 -0
- package/flowpilot-core.js +6416 -0
- package/flowpilot.html +9 -5679
- package/flowpilot.js +292 -37
- package/lib/build-system-prompt.js +32 -0
- package/lib/default-system-prompt.js +0 -2
- package/lib/generation-system-prompt.js +17 -2
- package/lib/modify-system-prompt.js +16 -6
- package/lib/persona-prompt.js +74 -0
- package/lib/popout/view.html +33 -0
- package/lib/provider-openai-compatible.js +13 -10
- package/lib/storage.js +48 -4
- package/package.json +4 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to FlowPilot are documented here.
|
|
4
|
+
|
|
5
|
+
## [0.4.0] - 2026-06-27
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Personality slider in Settings → Behavior (1-10): 1 is a plain Node-RED engineer, 10 is a comically over-the-top airline captain who happens to be a Node-RED expert. Default (3) matches the original "subtle co-pilot" voice. Applies to Chat replies AND the natural-language "explanation" field of Generate/Document/Modify (e.g. announcing a flow it just built) — never to node names, ids, or any structural JSON. Explanations, troubleshooting, diffs, and errors always stay plain and accurate regardless of intensity. Generated fresh per request from the slider value via `lib/persona-prompt.js`, rather than being baked into the persisted system prompt.
|
|
9
|
+
- Copy button on every code block shown in chat (Preview JSON/debug, or any code the model pastes inline) — previously only the Generate/Document/Modify review panel's JSON tab had one.
|
|
10
|
+
- `/compact` and `/expand` slash commands — hide/restore labels on the selected node(s), instant and deterministic (no AI round-trip). Invokes Node-RED's own native `core:hide-selected-node-labels`/`core:show-selected-node-labels` actions directly, so group-member expansion, no-op skipping, and one-Ctrl+Z batching across the whole selection are handled by Node-RED itself, not reimplemented.
|
|
11
|
+
- `/build` — describe a goal in plain language and FlowPilot plans it, proposes a first flow, then walks an interactive build → deploy → attach debug output → review → fix loop with you, bounded by a configurable iteration cap (Settings → Behavior, default 5). Every proposal and fix still goes through the same diff-review-then-Apply flow as Modify — nothing auto-applies, and the AI never deploys for you.
|
|
12
|
+
- A detached pop-out window (new header icon) mirrors the full cockpit — chat, action bar, status strip, slash commands, mode switching — in its own browser window, useful on multi-monitor setups. Sending, Clear Chat, and Apply for Generate/Document/Modify/Build review panels all work from the pop-out; it closes automatically if the main editor window does.
|
|
13
|
+
- Group awareness: FlowPilot now sees which group a selected node belongs to, and Generate/Build/Modify can create, extend, rename, and ungroup visual groups (a real bordered container, not just a label) — not just individual nodes.
|
|
14
|
+
- `/disable` and `/enable` slash commands — disable/re-enable the selected node(s) (skipped on Deploy without removing them), instant and deterministic (no AI round-trip), same mechanism as `/compact`/`/expand`.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Removed the static "Personality:" paragraph from the default system prompt — superseded by the slider above. Existing users with that exact paragraph already saved in a customized system prompt get it surgically stripped on next load/save; any other customization they made is preserved.
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- Setting the Personality slider to 10 still felt mild — the prompt's own closing line ("a little goes a long way even at high intensity") undercut the "go all out" instruction for max intensity. The restraint instruction now scales with intensity: low/mid stays subtle, 8-10 explicitly says to lean all the way in on every qualifying moment instead of holding back.
|
|
21
|
+
- The Personality slider's thumb didn't reach the true ends of the track — a generic `.fp-form input` rule applied an 8px padding + border to every input including the new range slider, insetting the native track from both edges. Range inputs now get zero padding/border.
|
|
22
|
+
- Markdown tables in chat replies rendered as raw, broken-looking `| a | b |` text — `renderMarkdown()` never had table support at all. Added GFM-style pipe table rendering.
|
|
23
|
+
- Fenced code blocks indented under a list item (e.g. "1. Try this:\n ```bash\n ...\n ```", which models produce constantly) failed to render as code at all — the fence-detection regex required zero leading whitespace, so the whole block fell through as plain paragraph text with the literal ` ``` ` markers visible. Fence detection now tolerates leading whitespace.
|
|
24
|
+
- The Debug log list showed newest-first, so finding a just-arrived message in a long buffer meant scrolling up past everything else. Now oldest-first/newest-last, matching the chat panel's natural scroll-to-bottom behavior.
|
|
25
|
+
- A stopped, errored, or empty-response turn could leave a dangling, unanswered entry in conversation history (pushed before the request, never rolled back on failure), corrupting the shape of every later request in that conversation.
|
|
26
|
+
- The model's JSON envelope could fail to parse, or get confused with an unrelated JSON-looking snippet embedded in its own prose (e.g. inline code like `{{payload}}`, or an illustrative logging example), when something brace-shaped appeared before the real envelope. Candidates are now matched with string-aware brace matching and must look like a recognized envelope shape before being accepted.
|
|
27
|
+
- The `/build` loop could judge a step "done" against only the first of several debug messages fired by one trigger (e.g. after a flow got accidentally forked), missing the full picture. It now waits briefly for all messages from one trigger before reviewing them together, and explicitly checks off each goal requirement instead of trusting a "looks plausible" read.
|
|
28
|
+
- The pop-out window's Settings request 404'd, because every internal URL was relative — correct from the main editor's route, but one level too deep from the pop-out's own nested route.
|
|
29
|
+
- Selecting a GROUP itself (its border/background, not a member node) showed "1 node selected" instead of expanding to its actual members, and the group's internal wiring wasn't included as context either.
|
|
30
|
+
- "Ungroup" could report success while changing nothing (the model was targeting a non-real `group` property instead of actual membership); separately, a model correctly using the documented group-creation field could have its result silently dropped before ever reaching the apply step. Both fixed.
|
|
31
|
+
- Fully ungrouping (reconciling a group down to zero members) emptied the group's membership but left a small, empty group container behind on the canvas instead of removing it — now matches what Node-RED's own "Ungroup Selection" does.
|
|
32
|
+
- Modify's node-insertion step could, on a partial failure (e.g. 2 of 3 new nodes succeed, the 3rd doesn't), leave the successful ones on the canvas with no undo entry and no message acknowledging anything had landed — now always covers whatever succeeded with one undo step, and reports a partial result honestly instead of staying silent about it.
|
|
33
|
+
|
|
34
|
+
## [0.3.0] - 2026-06-23
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
- `/feedback` slash command — links to the repo and issue tracker, with a note on what makes a good bug report.
|
|
38
|
+
- Temperature setting now has an explanatory hint (closes #3).
|
|
39
|
+
- Request timeout is now configurable in Settings → Behavior, instead of a hardcoded 180000ms (closes #2).
|
|
40
|
+
- "Preview JSON" / "Preview debug" links — show the exact node JSON or debug payload a request will send, for diagnosing "did the AI actually get this" confusion.
|
|
41
|
+
- Inline feedback on the Save settings button ("Settings saved." / "No changes to save." / validation errors).
|
|
42
|
+
- Declared Node-RED 5.x as tested/supported (previously only the `>=4.0.0` floor was documented).
|
|
43
|
+
- Redaction opt-out toggle in Settings → Context & Safety (redaction is on by default; disabling it requires checking a box and typing "disable redaction" to confirm). Intended for local/private AI setups. Node-RED's own credentials field is still always dropped either way. The secrets-warning badge in the status strip turns red with a stronger tooltip while redaction is off.
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
- The "Provider settings... stored locally..." banner now only shows inside the Providers section, not across the whole Settings panel.
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
- Debug messages attached as context were truncated to 500 characters at capture time — before being attached — which could cut a value mid-JSON and make it look like the AI ignored the attached data. Raised to 20,000 characters for what's actually sent (the debug-log list preview stays short).
|
|
50
|
+
- The streaming "Cruising…" indicator never visibly appeared during streaming Chat/Generate/Document/Modify — it was converted into an empty bubble in the same tick it was created, before the request even went out (closes #4).
|
|
51
|
+
- Generate would sometimes produce nodes with no `"wires"` connecting them, landing disconnected on the canvas. Added a worked example to the generation prompt (smaller/local models follow concrete examples more reliably than prose rules) and a visible warning in the review panel when a generated flow has zero connections.
|
|
52
|
+
- When redaction was off, FlowPilot's chat replies implied it could "re-enable redaction" itself if asked — it has no such ability (no tool/function gives it write access to settings). Clarified the context note so it correctly tells the user to use the Settings panel instead of offering to do it for them.
|
|
53
|
+
|
|
54
|
+
## [0.2.2] - 2026-06-15
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
- Raw `fetch()` calls (chat/generate/document/modify streaming) were missing the `Authorization` header that jQuery's `$.ajax` gets automatically from the Node-RED editor, causing 401s on instances with `adminAuth` enabled.
|
|
58
|
+
- Dark themes: the prompt box and settings inputs used a non-existent CSS variable (`--red-ui-form-input-text-color`) and always fell back to a hardcoded dark color, making text unreadable against a dark background.
|
|
59
|
+
|
|
60
|
+
## [0.2.1] - 2026-06-15
|
|
61
|
+
|
|
62
|
+
Initial public release — published to npm and listed on the Node-RED Flow Library.
|
package/PROJECT-OVERVIEW.md
CHANGED
|
@@ -45,10 +45,27 @@ top of a stable foundation, with a working, reviewable build at every step:
|
|
|
45
45
|
information *before* answering or proposing a change — an
|
|
46
46
|
"explore-then-propose" loop, bounded by a step count and token ceiling,
|
|
47
47
|
with a visible cost summary and a Stop button.
|
|
48
|
+
- **Phase 8 — Issue fixes and NR5 support.** Closed early user-reported
|
|
49
|
+
issues (a stuck "streaming" indicator, missing wiring on some generated
|
|
50
|
+
flows, an unconfigurable request timeout, an unexplained temperature
|
|
51
|
+
setting), declared and verified Node-RED 5.x support, added "Preview
|
|
52
|
+
JSON/debug" links so users can see exactly what a request will send, and
|
|
53
|
+
an opt-out redaction toggle for local/private AI setups.
|
|
54
|
+
- **Phase 8.5 — Personality, an agentic build loop, a pop-out window, and
|
|
55
|
+
group handling.** A captain-personality slider (separate from technical
|
|
56
|
+
accuracy, which never changes), deterministic `/compact`/`/expand` label
|
|
57
|
+
commands, and a `/build` command that closes FlowPilot's biggest
|
|
58
|
+
remaining gap: a *visible, user-gated* build → deploy → attach debug
|
|
59
|
+
output → review → fix loop, instead of generating a flow and never
|
|
60
|
+
finding out if it works. A detached pop-out window mirrors the full
|
|
61
|
+
cockpit in its own browser window for multi-monitor setups. FlowPilot can
|
|
62
|
+
now also see and manage visual groups (create, extend, rename, ungroup),
|
|
63
|
+
not just individual nodes.
|
|
48
64
|
|
|
49
65
|
Throughout, every phase preserved the same core guarantees: nothing is sent
|
|
50
66
|
without the user's selection or request, every proposed change is a
|
|
51
|
-
reviewable diff, and every applied change is a normal Node-RED undo step
|
|
67
|
+
reviewable diff, and every applied change is a normal Node-RED undo step —
|
|
68
|
+
including every step of the `/build` loop and every group mutation.
|
|
52
69
|
|
|
53
70
|
## Current feature set
|
|
54
71
|
|
|
@@ -81,18 +98,36 @@ reviewable diff, and every applied change is a normal Node-RED undo step.
|
|
|
81
98
|
typing a model name blind.
|
|
82
99
|
- **`/demo`** — a guided first request that walks through Generate end to
|
|
83
100
|
end.
|
|
101
|
+
- **`/compact` / `/expand`** — instantly hide/restore the selected node(s)'
|
|
102
|
+
labels, no AI round-trip.
|
|
103
|
+
- **`/build`** — a visible, user-gated build → deploy → attach debug output
|
|
104
|
+
→ review → fix loop for "make this actually work," bounded by a
|
|
105
|
+
configurable iteration cap.
|
|
106
|
+
- **Group handling** — context includes a selected node's group membership;
|
|
107
|
+
Generate/Build/Modify can create, extend, rename, and ungroup visual
|
|
108
|
+
groups.
|
|
109
|
+
- **Personality slider** — adjustable captain-voice intensity (1-10) for
|
|
110
|
+
conversational framing; technical content always stays plain.
|
|
111
|
+
- **Pop-out window** — the full cockpit (chat, action bar, status strip,
|
|
112
|
+
slash commands) in a separate browser window.
|
|
84
113
|
|
|
85
114
|
## Architecture at a glance
|
|
86
115
|
|
|
87
|
-
- **`flowpilot.html`** — the editor-side plugin:
|
|
88
|
-
|
|
89
|
-
|
|
116
|
+
- **`flowpilot.html`** — the editor-side plugin entry point: registers the
|
|
117
|
+
sidebar panel and loads the shared client module below.
|
|
118
|
+
- **`flowpilot-core.js`** — the shared client logic (chat/generate/modify/
|
|
119
|
+
document/build, selection/context handling, settings UI, diff review and
|
|
120
|
+
apply, group mutations) — used by both the sidebar and the pop-out window,
|
|
121
|
+
so they stay in sync by construction rather than by copy-pasted code.
|
|
122
|
+
Served via a dedicated static route alongside the pop-out's own minimal
|
|
123
|
+
page (`lib/popout/view.html`), which loads this same module and relays
|
|
124
|
+
state to/from the main editor window over `postMessage`.
|
|
90
125
|
- **`flowpilot.js`** — the Node-RED runtime plugin: HTTP routes
|
|
91
126
|
(`/flowpilot/*`), provider calls, response parsing/validation, and audit
|
|
92
127
|
logging.
|
|
93
|
-
- **`lib/`** — system prompts (default/generation/document/modify
|
|
94
|
-
OpenAI-compatible provider adapter, and on-disk storage
|
|
95
|
-
transcripts, audit log).
|
|
128
|
+
- **`lib/`** — system prompts (default/generation/document/modify/build/
|
|
129
|
+
persona), the OpenAI-compatible provider adapter, and on-disk storage
|
|
130
|
+
(settings, transcripts, audit log).
|
|
96
131
|
- **Storage** — FlowPilot keeps its own settings, audit log, and
|
|
97
132
|
per-conversation transcripts under `<node-red-userDir>/flowpilot/`,
|
|
98
133
|
separate from the plugin code itself.
|
package/README.md
CHANGED
|
@@ -73,6 +73,25 @@ See the [User Guide](USER-GUIDE.md#privacy-and-safety) for the full details.
|
|
|
73
73
|
- **Clarifying questions** — if an instruction is too vague to act on
|
|
74
74
|
safely, FlowPilot asks ONE question instead of guessing.
|
|
75
75
|
- **Streaming replies** — optional SSE streaming for chat responses.
|
|
76
|
+
- **`/build`** — describe a goal and FlowPilot plans it, proposes a first
|
|
77
|
+
flow, then walks an interactive build → deploy → debug → review → fix loop
|
|
78
|
+
with you, bounded by a configurable iteration cap. Every step still goes
|
|
79
|
+
through the same diff-review-then-apply flow as Modify.
|
|
80
|
+
- **Group handling** — FlowPilot sees which group a selected node belongs to,
|
|
81
|
+
and Generate/Build/Modify can create, extend, rename, and ungroup visual
|
|
82
|
+
groups, not just individual nodes.
|
|
83
|
+
- **Pop-out window** — the full chat/action-bar/status-strip cockpit in a
|
|
84
|
+
separate browser window, handy for multi-monitor setups.
|
|
85
|
+
- **Personality slider** — an adjustable captain-voice intensity (1-10) for
|
|
86
|
+
conversational framing; technical content (explanations, diffs, errors)
|
|
87
|
+
always stays plain regardless of setting.
|
|
88
|
+
- **`/compact` / `/expand` / `/disable` / `/enable`** — instant, deterministic
|
|
89
|
+
slash commands for label visibility and enabling/disabling the selected
|
|
90
|
+
node(s); no AI round-trip.
|
|
91
|
+
|
|
92
|
+
## Requirements
|
|
93
|
+
|
|
94
|
+
Node-RED 4.x and 5.x, tested. Node.js 16+.
|
|
76
95
|
|
|
77
96
|
## Install in a local Node-RED user directory
|
|
78
97
|
|
package/USER-GUIDE.md
CHANGED
|
@@ -144,6 +144,15 @@ canvas, FlowPilot sees their configuration and wiring (sanitized — see
|
|
|
144
144
|
Chat remembers recent exchanges (configurable under **Behavior → Remember
|
|
145
145
|
last N exchanges**) so you can have a back-and-forth conversation.
|
|
146
146
|
|
|
147
|
+
### Personality
|
|
148
|
+
|
|
149
|
+
**Settings → Behavior → Personality** is a 1-10 slider controlling how much
|
|
150
|
+
of a subtle airline-captain voice FlowPilot's conversational replies carry —
|
|
151
|
+
1 is a plain Node-RED engineer, 10 leans all the way into the bit. It only
|
|
152
|
+
affects framing language (greetings, transitions, "what can you do?").
|
|
153
|
+
Explanations, diffs, troubleshooting, and errors always stay plain and
|
|
154
|
+
accurate regardless of the setting.
|
|
155
|
+
|
|
147
156
|
### Query intents: Explain, Troubleshoot, Review, Suggest
|
|
148
157
|
|
|
149
158
|
One-click buttons that pre-fill the prompt box with a ready-to-edit
|
|
@@ -191,6 +200,27 @@ change is a single native Node-RED undo step (Ctrl+Z).
|
|
|
191
200
|
|
|
192
201
|

|
|
193
202
|
|
|
203
|
+
### Group handling
|
|
204
|
+
|
|
205
|
+
FlowPilot can see which visual group a selected node belongs to, and
|
|
206
|
+
Generate/Build/Modify can create, extend, rename, and ungroup visual groups
|
|
207
|
+
(the same bordered containers as the editor's own "Group selection") — not
|
|
208
|
+
just individual nodes. Select grouped nodes and describe the grouping you
|
|
209
|
+
want, or mention an existing group by name in a Modify instruction; review
|
|
210
|
+
and apply like any other change.
|
|
211
|
+
|
|
212
|
+
### Build (the agentic loop)
|
|
213
|
+
|
|
214
|
+
Describe a goal (e.g. "fetch the weather every hour and log it to a file")
|
|
215
|
+
and arm **Build**, or type `/build <goal>` directly. FlowPilot plans the
|
|
216
|
+
work, proposes a first flow, and once you apply and deploy it, walks an
|
|
217
|
+
interactive loop with you: attach the resulting Debug output, FlowPilot
|
|
218
|
+
reviews it against the goal, and either confirms it's working or proposes a
|
|
219
|
+
fix — repeating until it works or a configurable attempt limit is reached
|
|
220
|
+
(**Settings → Behavior → Build loop iteration cap**). Every proposal and fix
|
|
221
|
+
still goes through the same review-then-apply flow as Modify — FlowPilot
|
|
222
|
+
never deploys for you.
|
|
223
|
+
|
|
194
224
|
### Document
|
|
195
225
|
|
|
196
226
|
Select node(s), arm **Document**, and (optionally) add notes about what you
|
|
@@ -211,6 +241,16 @@ summarizing the selection, which you review and place like any other change.
|
|
|
211
241
|
|
|
212
242
|

|
|
213
243
|
|
|
244
|
+
### Pop-out window
|
|
245
|
+
|
|
246
|
+
Click the pop-out icon in the sidebar header to open FlowPilot's full
|
|
247
|
+
cockpit — chat, action bar, status strip, slash commands — in its own
|
|
248
|
+
browser window. Handy for multi-monitor setups: keep the conversation and
|
|
249
|
+
diffs visible on one screen while the canvas fills another. Sending, Clear
|
|
250
|
+
Chat, mode switching, and Apply for Generate/Document/Modify/Build review
|
|
251
|
+
panels all work from the pop-out; it closes automatically if the main editor
|
|
252
|
+
window does.
|
|
253
|
+
|
|
214
254
|
### Debug context attachment
|
|
215
255
|
|
|
216
256
|
Click the **bug icon** to view recent messages from Node-RED's Debug sidebar.
|
|
@@ -266,12 +306,16 @@ Behavior → Stream chat replies**.
|
|
|
266
306
|
Type these directly into the prompt box:
|
|
267
307
|
|
|
268
308
|
- `/help` — show the full command/feature briefing
|
|
269
|
-
- `/generate`, `/document`, `/modify` — arm that Execute mode
|
|
309
|
+
- `/generate`, `/document`, `/modify`, `/build` — arm that Execute mode
|
|
270
310
|
- `/query` (or `/chat`) — back to Query mode
|
|
271
311
|
- `/clear` — start a fresh conversation (clears chat and memory)
|
|
272
312
|
- `/history` — open the Flight log
|
|
273
313
|
- `/settings` — open Settings
|
|
274
314
|
- `/demo` — load a sample Generate request into the prompt box
|
|
315
|
+
- `/compact` / `/expand` — hide/restore labels on the selected node(s),
|
|
316
|
+
instant and deterministic, no AI round-trip
|
|
317
|
+
- `/disable` / `/enable` — disable/re-enable the selected node(s) (skipped on
|
|
318
|
+
Deploy without removing them), instant and deterministic, no AI round-trip
|
|
275
319
|
|
|
276
320
|

|
|
277
321
|
|