@manny-est/node-red-flowpilot 0.6.0-beta.1 → 0.6.1

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 CHANGED
@@ -2,34 +2,87 @@
2
2
 
3
3
  All notable changes to FlowPilot are documented here.
4
4
 
5
- ## [0.6.0-beta.1] - 2026-08-31
5
+ ## [0.6.1] - 2026-09-02
6
6
 
7
- Prerelease — published to the `beta` npm tag only. `latest` stays on `0.5.2`.
7
+ ### Fixed
8
+ - **Deterministic run summaries actually work now.** 0.6.0 shipped this
9
+ feature — the per-item ✓/✗ outcome from a Modify or Generate run,
10
+ built from what the WRITE tools actually reported instead of the
11
+ model's own retelling — but a control-flow bug in the message-
12
+ rendering path made it unreachable for every real run: the code path
13
+ that shows the deterministic summary as primary (with the model's
14
+ own explanation demoted underneath) never executed. Every response
15
+ fell through to showing the model's own prose at full weight
16
+ instead, exactly the narrative-accuracy gap this feature exists to
17
+ close. Found and fixed during this release's own go-live testing,
18
+ now live-verified against a real agentic write.
19
+ - **Installed-package awareness was silently non-functional — FlowPilot
20
+ now actually receives your palette.** The feature that keeps
21
+ Generate/Modify from proposing node types you don't have, and lets
22
+ FlowPilot correctly answer "is X installed?", called a Node-RED API
23
+ that doesn't exist on this version's plugin interface. The call was
24
+ a silent no-op on every single request: FlowPilot never had real
25
+ palette information to work with, so the model either said as much
26
+ or, in some cases, guessed. This wasn't a timing bug or a stale
27
+ cache — the underlying data source itself never worked. Now reads
28
+ the live node registry directly and is correct immediately, from
29
+ the very first request after a restart.
30
+
31
+ ## [0.6.0] - 2026-09-01
32
+
33
+ Promoted from `0.6.0-beta.1` to the stable `latest` npm tag.
8
34
 
9
35
  ### Added
10
- - **Agentic WRITE-tool loop for Modify** (behind the `enableAgentWrite`
11
- setting, default off): step-by-step tool calls against the live flow
12
- (`apply_step`, `remove_step`, `rename_node`, `group_nodes`), each
13
- write-gated by a per-step consent prompt (Proceed / Skip this step) before
14
- it touches the canvas. Multi-item requests are tracked and executed as
15
- separate, individually-verified steps rather than one all-or-nothing
16
- envelope; an injected mid-run failure (e.g. a referenced node no longer
17
- exists) fails only that item, with the rest completing normally.
36
+ - **Agentic WRITE-tool loop for Modify and Generate** (behind the
37
+ `enableAgentWrite` setting, default off): step-by-step tool calls
38
+ against the live flow (`apply_step`, `remove_step`, `rename_node`,
39
+ `group_nodes`), each write-gated by a per-step consent prompt (Proceed
40
+ / Skip this step) before it touches the canvas. Multi-item requests are
41
+ tracked and executed as separate, individually-verified steps rather
42
+ than one all-or-nothing envelope; an injected mid-run failure (e.g. a
43
+ referenced node no longer exists) fails only that item, with the rest
44
+ completing normally. Generate joined the same agentic runtime Modify
45
+ already used, closing the last place a mutation could land through the
46
+ older, less-verified classic JSON path while write-tool mode is on.
18
47
  - **`ask_user` clarifying-question tool**: an agent-strategy turn can pause
19
48
  mid-run to ask a single focused question (with optional quick-reply
20
49
  buttons) instead of guessing, and resumes exactly where it left off once
21
50
  answered.
51
+ - **Deterministic run summaries**: when a Modify or Generate run actually
52
+ applied WRITE-tool steps, the per-item outcome you see (✓ applied and
53
+ verified / ✗ failed, with why) now comes straight from what the tools
54
+ actually reported — not from the model's own retelling. The model's own
55
+ wrap-up explanation still shows, underneath, clearly secondary — useful
56
+ context, never the thing you have to trust to know what really
57
+ happened.
22
58
  - **Contract-exclusivity enforcement**: a server-side safety net
23
59
  (`enforceAgentContract`) strips any classic-style mutation fields
24
- (`changes`/`newNodes`/`newWires`/`removeNodes`/`newGroups`) that
60
+ (`changes`/`newNodes`/`newWires`/`removeNodes`/`newGroups`/`flow`) that
25
61
  accidentally appear on an agent-strategy turn with no tool calls, before
26
62
  they ever reach the client — the two mutation paths (classic envelope vs.
27
- agentic WRITE tools) stay mutually exclusive per turn.
63
+ agentic WRITE tools) stay mutually exclusive per turn, for every mode
64
+ that can run agentically.
28
65
  - **Run identity and honest interruption**: agent-strategy runs now carry a
29
66
  stable run/operation id so a duplicate tool-call delivery (a retry, or the
30
67
  model repeating itself) is applied at most once; a run that's stopped or
31
68
  hits its step/token ceiling reports an honest "interrupted after N steps"
32
- instead of silently truncating.
69
+ instead of silently truncating. That step-by-step record is also now
70
+ visible to the server (previously client-side only), the foundation for
71
+ the deterministic run summaries above.
72
+
73
+ ### Fixed
74
+ - **The FlowPilot sidebar's entire client script was loading twice on
75
+ every single editor page load** — a packaging issue present since the
76
+ plugin's first release, only now found and fixed. In practice this
77
+ meant a page reload silently lost the current conversation (a second,
78
+ redundant script execution would stomp the first one's restored state)
79
+ and, more subtly, any other one-time setup code in the client ran
80
+ twice per load. Reloading the Node-RED editor now correctly picks the
81
+ conversation back up where you left off.
82
+ - Anthropic (Claude) responses now get the exact same deterministic
83
+ run-summary and contract-exclusivity treatment as every other
84
+ provider — verified directly against Claude Sonnet, not just the
85
+ OpenAI-compatible path.
33
86
 
34
87
  ### Security
35
88
  - **API keys are now write-only over HTTP** (previously exposed on
@@ -60,6 +113,59 @@ Prerelease — published to the `beta` npm tag only. `latest` stays on `0.5.2`.
60
113
  `dev-docs/current/Phase10-Build-Progress.md` and
61
114
  `dev-docs/current/Phase10-Gate-Closeout-Final.md`.
62
115
 
116
+ ## [0.5.2] - 2026-08-04
117
+
118
+ This release continues the 0.5.x line. Phase 10's agentic Modify redesign
119
+ (WRITE-tool loop, per-call consent gates, `ask_user`) is developed
120
+ separately and is not included here — it ships under its own beta line
121
+ until it's ready to replace this one.
122
+
123
+ ### Added
124
+ - **Anthropic provider support**: FlowPilot can now talk directly to the
125
+ Anthropic API (Claude models) alongside any OpenAI-compatible endpoint.
126
+ A new Provider Type dropdown in Settings switches between them; message
127
+ format, tool-call translation, and streaming (SSE) are handled
128
+ transparently by a dedicated adapter. Leave Base URL blank to use
129
+ `api.anthropic.com`.
130
+ - **Reasoning model support**: FlowPilot detects reasoning models
131
+ (Nemotron, DeepSeek, QwQ, and any model returning `reasoning_content` or
132
+ `<think>` blocks) and shows a live collapsing "Thinking…" block during
133
+ streaming, or a pre-collapsed one on the agent-loop path.
134
+ - **Auto-preflight on model change**: switching models and sending a
135
+ message silently probes capabilities first — no more manual "Test
136
+ Provider" click after every model swap.
137
+ - **`/refresh` command**: re-renders the message panel from the in-memory
138
+ record store without losing conversation history — restores interactive
139
+ Apply buttons and review panels that went stale after a long session.
140
+ - **Build loop — consent gates for side-effecting steps, checkpoint
141
+ questions, context-aware start from a selection, and an explicit
142
+ done/fail confirmation** instead of silently stopping.
143
+ - **Modify — todo/plan checklist rendering**: multi-item Modify requests
144
+ now show a checklist that resolves as verification confirms each item
145
+ landed, instead of a single opaque pass/fail.
146
+ - **Config node support**: config nodes (MQTT brokers, TLS configs, etc.)
147
+ are now exposed in context and can be created/connected by Modify.
148
+ - **Server-side validator/repair layer**: malformed model output is
149
+ caught and, where possible, automatically repaired before it reaches
150
+ the canvas.
151
+
152
+ ### Fixed
153
+ - Redaction round-trip poisoning, token-credential redaction gaps, and
154
+ several redaction echo/false-positive fixes across Modify and the build
155
+ loop's review step.
156
+ - Group data corruption from a stray `changes` patch touching a group's
157
+ membership array directly; mixed-membership group create/extend
158
+ corruption.
159
+ - Invalid port wiring (wiring to/from a port index that doesn't exist)
160
+ now guarded instead of silently applied.
161
+ - New-node insertion collision avoidance tuned for faster, more reliable
162
+ separation on dense flows.
163
+ - Several build-loop review false positives (metadata-field echoes,
164
+ debug/function/mqtt node misclassification, stale in-progress status
165
+ read as a real error).
166
+ - Partial id-validation no longer discards an entire valid Modify batch
167
+ over one bad node id.
168
+
63
169
  ## [0.5.1] - 2026-07-24
64
170
 
65
171
  ### Added
package/README.md CHANGED
@@ -26,7 +26,9 @@ installation, the sidebar UI, and a chapter on every feature.
26
26
  - **User-initiated only** — FlowPilot never changes your flow without an
27
27
  explicit request.
28
28
  - **Complete visibility** — every proposed change is shown as a diff/review
29
- before anything is applied.
29
+ before it's applied; in the opt-in agentic mode (below), each step is
30
+ gated by its own Proceed/Skip prompt instead, so you're still in control
31
+ of what actually lands on the canvas.
30
32
  - **Undo first** — every change goes through Node-RED's native undo
31
33
  (Ctrl+Z), including multi-part changes (insertions + rewires + new nodes)
32
34
  as a single step.
@@ -73,6 +75,13 @@ See the [User Guide](USER-GUIDE.md#privacy-and-safety) for the full details.
73
75
  Document, with a clear notice when older messages are truncated.
74
76
  - **Clarifying questions** — if an instruction is too vague to act on
75
77
  safely, FlowPilot asks ONE question instead of guessing.
78
+ - **Agentic mode (opt-in, Settings)** — Generate and Modify can work
79
+ step by step instead of one big review-then-apply diff: each step
80
+ (insert, rewire, rename, remove, group) lands on the canvas as it's
81
+ proposed, gated by its own Proceed/Skip consent prompt for anything
82
+ beyond the safest node types. The summary you see when a run finishes
83
+ is built from what the tools actually reported happened, not just the
84
+ model's own retelling — if a step failed or was skipped, it says so.
76
85
  - **Streaming replies** — optional SSE streaming for chat responses.
77
86
  - **`/build`** — describe a goal and FlowPilot plans it, proposes a first
78
87
  flow, then walks an interactive build → deploy → debug → review → fix loop
@@ -108,6 +108,21 @@
108
108
  border-color: rgba(80, 130, 255, 0.35);
109
109
  }
110
110
 
111
+ /* Subordinate to the deterministic run summary above it (C1): same shape,
112
+ visibly de-emphasized so a model's free-text recap can't be mistaken for
113
+ the authoritative per-item outcome. */
114
+ .fp-secondary {
115
+ padding: 8px 14px;
116
+ background: transparent;
117
+ border-style: dashed;
118
+ font-size: 12px;
119
+ color: var(--red-ui-secondary-text-color, #888);
120
+ }
121
+
122
+ .fp-secondary .fp-label {
123
+ opacity: 0.7;
124
+ }
125
+
111
126
  /* Reasoning / thinking block — shown for models that emit reasoning_content
112
127
  (e.g. Nemotron, DeepSeek-R1). Sits above the assistant response bubble.
113
128
  Expanded while the model thinks; collapses automatically when content starts. */
@@ -0,0 +1,15 @@
1
+ // Node-RED's "nodes" registration entry needs its own .js file, separate
2
+ // from flowpilot.js — Node-RED derives an editor-template path for every
3
+ // declared "nodes" entry by replacing the .js extension with .html
4
+ // (@node-red/registry/lib/loader.js loadNodeConfig: `file.replace(/\.c?js$/,".html")`),
5
+ // with NO awareness of the "plugins" entry that already explicitly declares
6
+ // flowpilot.html. If this entry pointed at flowpilot.js directly, Node-RED
7
+ // would derive "flowpilot.html" as this node's own template, find the real
8
+ // file (same basename), and load its content a SECOND time — the plugin's
9
+ // entire client bundle (flowpilot/core.js and its inline init script)
10
+ // ends up in the editor page twice, executing every module-level
11
+ // side effect (including sessionStorage init) twice per page load.
12
+ // This shim's own basename ("flowpilot-node-entry") has no matching .html,
13
+ // so Node-RED's template lookup misses (ENOENT) and loads no content for
14
+ // it — exactly what a route-registration-only, no-editor-UI node needs.
15
+ module.exports = require("./flowpilot.js");