node-red-contrib-vectorprime 0.1.7 → 0.1.9
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/package.json +1 -1
- package/vectorprime.html +158 -59
package/package.json
CHANGED
package/vectorprime.html
CHANGED
|
@@ -27,28 +27,6 @@
|
|
|
27
27
|
</div>
|
|
28
28
|
</script>
|
|
29
29
|
|
|
30
|
-
<!-- ✅ Help text for the config node -->
|
|
31
|
-
<script type="text/html" data-help-name="vectorprime-config">
|
|
32
|
-
<p><b>VectorPrime Config</b></p>
|
|
33
|
-
|
|
34
|
-
<p>
|
|
35
|
-
Stores your VectorPrime API connection details securely using Node-RED credentials.
|
|
36
|
-
This keeps your API key <b>out of flow exports</b>.
|
|
37
|
-
</p>
|
|
38
|
-
|
|
39
|
-
<h3>Quick setup</h3>
|
|
40
|
-
<ol>
|
|
41
|
-
<li>Leave Base URL as default (or set your own hosted backend).</li>
|
|
42
|
-
<li>Click <b>Get Free Key</b> to generate a starter key instantly.</li>
|
|
43
|
-
<li>Use this config in one or more VectorPrime nodes.</li>
|
|
44
|
-
</ol>
|
|
45
|
-
|
|
46
|
-
<p>
|
|
47
|
-
<b>Default Base URL:</b><br/>
|
|
48
|
-
<code>https://vectorprime-kernel-backend.onrender.com</code>
|
|
49
|
-
</p>
|
|
50
|
-
</script>
|
|
51
|
-
|
|
52
30
|
<script type="text/javascript">
|
|
53
31
|
(function () {
|
|
54
32
|
function normalizeBaseUrl(url) {
|
|
@@ -126,6 +104,32 @@
|
|
|
126
104
|
})();
|
|
127
105
|
</script>
|
|
128
106
|
|
|
107
|
+
<!-- ✅ HELP TAB: vectorprime-config -->
|
|
108
|
+
<script type="text/html" data-help-name="vectorprime-config">
|
|
109
|
+
<p><b>VectorPrime Config</b> stores your Base URL and API key securely.</p>
|
|
110
|
+
|
|
111
|
+
<h3>Quick Setup</h3>
|
|
112
|
+
<ol>
|
|
113
|
+
<li>Set <b>Base URL</b> (default is already correct)</li>
|
|
114
|
+
<li>Click <b>Get Free Key</b></li>
|
|
115
|
+
<li>Click <b>Done</b></li>
|
|
116
|
+
</ol>
|
|
117
|
+
|
|
118
|
+
<p>
|
|
119
|
+
✅ Your key is stored in Node-RED <b>credentials</b>, so it is <b>not exported with flows</b>.
|
|
120
|
+
</p>
|
|
121
|
+
|
|
122
|
+
<h3>Recommended Base URL</h3>
|
|
123
|
+
<pre>https://vectorprime-kernel-backend.onrender.com</pre>
|
|
124
|
+
|
|
125
|
+
<h3>Tip</h3>
|
|
126
|
+
<p>
|
|
127
|
+
You can also paste your own paid key here if you want higher limits.
|
|
128
|
+
</p>
|
|
129
|
+
</script>
|
|
130
|
+
|
|
131
|
+
<hr />
|
|
132
|
+
|
|
129
133
|
<script type="text/html" data-template-name="vectorprime-rank">
|
|
130
134
|
<div class="form-row">
|
|
131
135
|
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
@@ -144,48 +148,14 @@
|
|
|
144
148
|
|
|
145
149
|
<div class="form-row">
|
|
146
150
|
<div style="font-size:12px; color:#666;">
|
|
147
|
-
✅ Sends <code>msg.payload</code> to VectorPrime and returns ranked
|
|
151
|
+
✅ Sends <code>msg.payload</code> to VectorPrime and returns the ranked result in <code>msg.payload</code>.
|
|
148
152
|
</div>
|
|
149
153
|
</div>
|
|
150
154
|
</script>
|
|
151
155
|
|
|
152
|
-
<!-- ✅ Help text for the rank node (THIS controls the palette hover tooltip content) -->
|
|
153
|
-
<script type="text/html" data-help-name="vectorprime-rank">
|
|
154
|
-
<p><b>Rank Decision (VectorPrime)</b></p>
|
|
155
|
-
|
|
156
|
-
<p>
|
|
157
|
-
Instantly rank tasks, events, or choices by <b>priority + urgency</b> using the VectorPrime Decision Kernel.
|
|
158
|
-
Perfect for building flows that automatically pick the <b>best next action</b>.
|
|
159
|
-
</p>
|
|
160
|
-
|
|
161
|
-
<h3>Best use cases</h3>
|
|
162
|
-
<ul>
|
|
163
|
-
<li><b>Incident response:</b> Rank alerts and decide what to fix first</li>
|
|
164
|
-
<li><b>Ops & automation:</b> Choose the next job to run when resources are limited</li>
|
|
165
|
-
<li><b>AI agents:</b> Pick the best tool/action based on outcome + risk</li>
|
|
166
|
-
<li><b>Queues & tickets:</b> Prioritize support tickets, backlog items, escalations</li>
|
|
167
|
-
<li><b>Workflow routing:</b> Route messages/events to the right handler by importance</li>
|
|
168
|
-
</ul>
|
|
169
|
-
|
|
170
|
-
<h3>Input</h3>
|
|
171
|
-
<p>
|
|
172
|
-
Expects <code>msg.payload</code> to be your decision set / tasks object (JSON).
|
|
173
|
-
</p>
|
|
174
|
-
|
|
175
|
-
<h3>Output</h3>
|
|
176
|
-
<p>
|
|
177
|
-
Returns the VectorPrime response in <code>msg.payload</code>, including ranked results.
|
|
178
|
-
</p>
|
|
179
|
-
|
|
180
|
-
<h3>Tip</h3>
|
|
181
|
-
<p>
|
|
182
|
-
If you hit a free-tier limit, the response may include an upgrade URL so your flow can continue.
|
|
183
|
-
</p>
|
|
184
|
-
</script>
|
|
185
|
-
|
|
186
156
|
<script type="text/javascript">
|
|
187
157
|
RED.nodes.registerType("vectorprime-rank", {
|
|
188
|
-
category: "network",
|
|
158
|
+
category: "network",
|
|
189
159
|
color: "#2563EB",
|
|
190
160
|
defaults: {
|
|
191
161
|
name: { value: "" },
|
|
@@ -196,11 +166,140 @@
|
|
|
196
166
|
outputs: 1,
|
|
197
167
|
icon: "font-awesome/fa-bolt",
|
|
198
168
|
|
|
199
|
-
// ✅ This
|
|
169
|
+
// ✅ This is the name users see in the palette
|
|
200
170
|
paletteLabel: "Rank Decision (VectorPrime)",
|
|
201
171
|
|
|
172
|
+
// ✅ This is the short description used in the tooltip card
|
|
173
|
+
description: "Automatically ranks tasks, alerts, or choices in msg.payload so your flow can pick the best next action.",
|
|
174
|
+
|
|
202
175
|
label: function () {
|
|
203
176
|
return this.name || "Rank Decision (VectorPrime)";
|
|
204
177
|
}
|
|
205
178
|
});
|
|
179
|
+
</script>
|
|
180
|
+
|
|
181
|
+
<!-- ✅ HELP TAB: vectorprime-rank -->
|
|
182
|
+
<script type="text/html" data-help-name="vectorprime-rank">
|
|
183
|
+
<p>
|
|
184
|
+
<b>Rank Decision (VectorPrime)</b> sorts your options and returns the best next action.
|
|
185
|
+
Use it anywhere you need <b>priority scoring</b> or <b>decision ranking</b> inside a flow.
|
|
186
|
+
</p>
|
|
187
|
+
|
|
188
|
+
<h3>What it does</h3>
|
|
189
|
+
<ul>
|
|
190
|
+
<li>Reads input from <code>msg.payload</code></li>
|
|
191
|
+
<li>Calls VectorPrime Rank API</li>
|
|
192
|
+
<li>Returns the ranked decision in <code>msg.payload</code></li>
|
|
193
|
+
</ul>
|
|
194
|
+
|
|
195
|
+
<h3>Best use cases</h3>
|
|
196
|
+
<ul>
|
|
197
|
+
<li><b>Incident response:</b> rank alerts by urgency</li>
|
|
198
|
+
<li><b>Task automation:</b> choose the best next action automatically</li>
|
|
199
|
+
<li><b>Ops + IoT:</b> prioritize device events and maintenance actions</li>
|
|
200
|
+
<li><b>Workflows:</b> sort leads, tickets, jobs, or notifications</li>
|
|
201
|
+
</ul>
|
|
202
|
+
|
|
203
|
+
<h3>Input format (example)</h3>
|
|
204
|
+
<p>Send a list of options to rank inside <code>msg.payload</code>:</p>
|
|
205
|
+
|
|
206
|
+
<pre><code>{
|
|
207
|
+
"items": [
|
|
208
|
+
{ "id": "fix-prod-bug", "label": "Fix production bug", "urgency": 10, "impact": 10 },
|
|
209
|
+
{ "id": "ship-feature", "label": "Ship new feature", "urgency": 7, "impact": 8 },
|
|
210
|
+
{ "id": "refactor", "label": "Refactor module", "urgency": 3, "impact": 5 }
|
|
211
|
+
]
|
|
212
|
+
}</code></pre>
|
|
213
|
+
|
|
214
|
+
<h3>Output</h3>
|
|
215
|
+
<p>
|
|
216
|
+
The response is returned in <code>msg.payload</code> (ranked order + decision result).
|
|
217
|
+
If your free tier limit is reached, the node may return an <b>upgrade URL</b>.
|
|
218
|
+
</p>
|
|
219
|
+
|
|
220
|
+
<h3>1-Click Example Flow (Import This)</h3>
|
|
221
|
+
<p>
|
|
222
|
+
Copy the JSON below, then go to:
|
|
223
|
+
<br/>
|
|
224
|
+
<b>Node-RED Menu → Import → Clipboard → Paste → Import</b>
|
|
225
|
+
</p>
|
|
226
|
+
|
|
227
|
+
<pre><code>[
|
|
228
|
+
{
|
|
229
|
+
"id": "a111111111111111",
|
|
230
|
+
"type": "tab",
|
|
231
|
+
"label": "VectorPrime 1-Click Demo",
|
|
232
|
+
"disabled": false,
|
|
233
|
+
"info": ""
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"id": "b111111111111111",
|
|
237
|
+
"type": "inject",
|
|
238
|
+
"z": "a111111111111111",
|
|
239
|
+
"name": "Run VectorPrime Rank (1-click)",
|
|
240
|
+
"props": [
|
|
241
|
+
{
|
|
242
|
+
"p": "payload"
|
|
243
|
+
}
|
|
244
|
+
],
|
|
245
|
+
"payload": "{\"items\":[{\"id\":\"fix-prod-bug\",\"label\":\"Fix production bug\",\"urgency\":10,\"impact\":10},{\"id\":\"ship-feature\",\"label\":\"Ship new feature\",\"urgency\":7,\"impact\":8},{\"id\":\"refactor\",\"label\":\"Refactor module\",\"urgency\":3,\"impact\":5}]}",
|
|
246
|
+
"payloadType": "json",
|
|
247
|
+
"repeat": "",
|
|
248
|
+
"crontab": "",
|
|
249
|
+
"once": false,
|
|
250
|
+
"onceDelay": 0.1,
|
|
251
|
+
"topic": "",
|
|
252
|
+
"x": 220,
|
|
253
|
+
"y": 160,
|
|
254
|
+
"wires": [
|
|
255
|
+
[
|
|
256
|
+
"c111111111111111"
|
|
257
|
+
]
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"id": "c111111111111111",
|
|
262
|
+
"type": "vectorprime-rank",
|
|
263
|
+
"z": "a111111111111111",
|
|
264
|
+
"name": "VectorPrime Rank",
|
|
265
|
+
"config": "d111111111111111",
|
|
266
|
+
"endpoint": "/v1/kernel/rank",
|
|
267
|
+
"x": 460,
|
|
268
|
+
"y": 160,
|
|
269
|
+
"wires": [
|
|
270
|
+
[
|
|
271
|
+
"e111111111111111"
|
|
272
|
+
]
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"id": "e111111111111111",
|
|
277
|
+
"type": "debug",
|
|
278
|
+
"z": "a111111111111111",
|
|
279
|
+
"name": "VectorPrime Output",
|
|
280
|
+
"active": true,
|
|
281
|
+
"tosidebar": true,
|
|
282
|
+
"console": false,
|
|
283
|
+
"tostatus": false,
|
|
284
|
+
"complete": "payload",
|
|
285
|
+
"targetType": "msg",
|
|
286
|
+
"statusVal": "",
|
|
287
|
+
"statusType": "auto",
|
|
288
|
+
"x": 700,
|
|
289
|
+
"y": 160,
|
|
290
|
+
"wires": []
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"id": "d111111111111111",
|
|
294
|
+
"type": "vectorprime-config",
|
|
295
|
+
"name": "VectorPrime Config",
|
|
296
|
+
"baseUrl": "https://vectorprime-kernel-backend.onrender.com"
|
|
297
|
+
}
|
|
298
|
+
]</code></pre>
|
|
299
|
+
|
|
300
|
+
<h3>Advanced tip: override Authorization</h3>
|
|
301
|
+
<p>
|
|
302
|
+
If you set <code>msg.headers.Authorization</code> before this node runs, it will use your header instead
|
|
303
|
+
of the stored key.
|
|
304
|
+
</p>
|
|
206
305
|
</script>
|