@manny-est/node-red-flowpilot 0.3.0 → 0.4.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.
@@ -0,0 +1,33 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title>FlowPilot</title>
6
+ <link rel="stylesheet" href="/red/style.min.css">
7
+ <link rel="stylesheet" href="/vendor/font-awesome/css/font-awesome.min.css">
8
+ <link rel="stylesheet" href="/flowpilot/core.css">
9
+ <style>
10
+ /* Minimal page chrome — the real layout lives in flowpilot-core.css's
11
+ #fp-root rules, same as the sidebar. This pop-out has no settings/
12
+ history panels in v1, so #fp-root just needs to fill the window. */
13
+ html, body { height: 100%; margin: 0; }
14
+ #fp-popout-root { height: 100%; }
15
+ </style>
16
+ </head>
17
+ <body class="red-ui-editor">
18
+ <div id="fp-popout-root"></div>
19
+ <script src="/vendor/vendor.js"></script>
20
+ <script src="/red/red.min.js"></script>
21
+ <script src="/flowpilot/core.js"></script>
22
+ <script type="text/javascript">
23
+ // This window never connects to the runtime or loads a live flow
24
+ // (RED.nodes/RED.view here are inert, disconnected shells, exactly like
25
+ // Node-RED's own debug pop-out) — every canvas-touching action is
26
+ // proxied back to the main window via postMessage. See
27
+ // flowpilot-core.js's initPopout() for the actual logic (including
28
+ // applying the user's dark/light theme preference, the same way
29
+ // Node-RED's own debug pop-out's debug.js does).
30
+ FlowPilotCore.initPopout();
31
+ </script>
32
+ </body>
33
+ </html>
package/lib/storage.js CHANGED
@@ -50,6 +50,14 @@ function createStorage(userDir) {
50
50
  // than cloud providers; users on that hardware raise this in Behavior
51
51
  // settings rather than living with a hardcoded ceiling.
52
52
  requestTimeoutMs: 180000,
53
+ // Max build->deploy->test->fix cycles the /build agentic loop will run
54
+ // before stopping with an honest "couldn't fully verify" instead of
55
+ // proposing another fix. Bounds against a non-converging loop burning
56
+ // tokens forever; user-configurable since "reasonable" varies by
57
+ // provider speed/cost. Unrelated to the read-only tool-calling loop's
58
+ // own hardcoded AGENT_LOOP_MAX_STEPS (a different bound, for a
59
+ // different loop).
60
+ agentLoopMaxIterations: 5,
53
61
  // Lets the user silence the recurring secrets/size reminder bar after
54
62
  // typing an explicit acknowledgement in settings.
55
63
  suppressContextWarnings: false,
@@ -59,6 +67,12 @@ function createStorage(userDir) {
59
67
  // dedicated Node-RED credentials field is dropped by the frontend
60
68
  // regardless of this setting, via a different, always-on mechanism.
61
69
  redactionEnabled: true,
70
+ // Chat-only persona slider, 1-10: 1 is a plain Node-RED engineer, 10 is
71
+ // a comically over-the-top airline captain who happens to be a Node-RED
72
+ // expert. 3 matches the original "subtle co-pilot" voice this replaced.
73
+ // See lib/persona-prompt.js — generated fresh per request, never baked
74
+ // into the persisted systemPrompt below.
75
+ personaIntensity: 3,
62
76
  // User-defined intent buttons: array of { label, text }.
63
77
  customIntents: [],
64
78
  systemPrompt: require("./default-system-prompt")
@@ -71,6 +85,15 @@ function createStorage(userDir) {
71
85
  // unique to it) and swap in the current default instead. Applied both when
72
86
  // reading settings AND when saving them, so a browser tab that still has
73
87
  // the stale text loaded in the System Prompt textarea can't re-persist it.
88
+ // The old default also baked a static "Personality:" paragraph into the
89
+ // persisted systemPrompt; that's now generated fresh every request from
90
+ // personaIntensity (lib/persona-prompt.js) instead, scaled by a slider, so
91
+ // a leftover copy from before this change is redundant rather than wrong.
92
+ // Unlike the READ-ONLY case above, only this one paragraph is stale — the
93
+ // rest of any customization the user made should survive — so this is a
94
+ // surgical removal (exact match) rather than swapping the whole prompt.
95
+ const STALE_PERSONALITY_PARAGRAPH = "Personality: you have a subtle co-pilot voice, used ONLY for greetings, \"what can you do?\"-style capability questions, and brief transition moments — e.g. \"You pick the destination, I help you get there,\" or a light \"wheels up\" / \"touchdown\" nod when handing off to a review or confirming a change landed. For everything else — explanations, troubleshooting, diffs, technical detail, errors — stay plain and direct; never let the persona obscure, delay, or replace a real answer. A little goes a long way: do not repeat aviation phrasing in every reply.\n\n";
96
+
74
97
  function fixStaleSystemPrompt(systemPrompt) {
75
98
  if (typeof systemPrompt !== "string" || !systemPrompt.trim()) {
76
99
  return defaultSettings.systemPrompt;
@@ -78,6 +101,9 @@ function createStorage(userDir) {
78
101
  if (systemPrompt.indexOf("operating in READ-ONLY mode") !== -1) {
79
102
  return defaultSettings.systemPrompt;
80
103
  }
104
+ if (systemPrompt.indexOf(STALE_PERSONALITY_PARAGRAPH) !== -1) {
105
+ return systemPrompt.split(STALE_PERSONALITY_PARAGRAPH).join("");
106
+ }
81
107
  return systemPrompt;
82
108
  }
83
109
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manny-est/node-red-flowpilot",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "FlowPilot for Node-RED - an AI-powered development assistant sidebar",
5
5
  "main": "flowpilot.js",
6
6
  "keywords": [
@@ -38,6 +38,8 @@
38
38
  "files": [
39
39
  "flowpilot.js",
40
40
  "flowpilot.html",
41
+ "flowpilot-core.js",
42
+ "flowpilot-core.css",
41
43
  "lib",
42
44
  "icons",
43
45
  "examples",