@andreswagner/node-red-contrib-wxo-agent 0.1.4
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/LICENSE +178 -0
- package/README.md +388 -0
- package/WxO.svg +31 -0
- package/nodes/lib/token-manager.js +119 -0
- package/nodes/lib/wxo-client.js +166 -0
- package/nodes/wxo-agent/icons/WxO.svg +31 -0
- package/nodes/wxo-agent/icons/watsonxOrchestrate.svg +1 -0
- package/nodes/wxo-agent/icons/wxo-icon.svg +5 -0
- package/nodes/wxo-agent/wxo-agent.html +157 -0
- package/nodes/wxo-agent/wxo-agent.js +188 -0
- package/nodes/wxo-credentials/wxo-credentials.html +47 -0
- package/nodes/wxo-credentials/wxo-credentials.js +20 -0
- package/package.json +41 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script type="text/javascript">
|
|
2
|
+
RED.nodes.registerType('wxo-credentials', {
|
|
3
|
+
category: 'config',
|
|
4
|
+
defaults: {
|
|
5
|
+
name: { value: '' },
|
|
6
|
+
url: { value: '', required: true }
|
|
7
|
+
},
|
|
8
|
+
credentials: {
|
|
9
|
+
apikey: { type: 'password' }
|
|
10
|
+
},
|
|
11
|
+
label: function() {
|
|
12
|
+
return this.name || 'WxO Credentials';
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<script type="text/html" data-template-name="wxo-credentials">
|
|
18
|
+
<div class="form-row">
|
|
19
|
+
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
20
|
+
<input type="text" id="node-config-input-name" placeholder="My WxO Credentials">
|
|
21
|
+
</div>
|
|
22
|
+
<div class="form-row">
|
|
23
|
+
<label for="node-config-input-url"><i class="fa fa-globe"></i> API URL</label>
|
|
24
|
+
<input type="text" id="node-config-input-url" placeholder="https://api.us-south.watson-orchestrate.cloud.ibm.com/instances/...">
|
|
25
|
+
</div>
|
|
26
|
+
<div class="form-row">
|
|
27
|
+
<label for="node-config-input-apikey"><i class="fa fa-key"></i> API Key</label>
|
|
28
|
+
<input type="password" id="node-config-input-apikey">
|
|
29
|
+
</div>
|
|
30
|
+
<div class="form-tips">
|
|
31
|
+
<p>Paste your IBM Cloud service credentials. You can find these in your Watson Orchestrate instance.</p>
|
|
32
|
+
</div>
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<script type="text/html" data-help-name="wxo-credentials">
|
|
36
|
+
<p>Configuration node for IBM watsonx Orchestrate credentials.</p>
|
|
37
|
+
<h3>Properties</h3>
|
|
38
|
+
<dl class="message-properties">
|
|
39
|
+
<dt>Name</dt>
|
|
40
|
+
<dd>Optional name for this credential configuration</dd>
|
|
41
|
+
<dt>API URL</dt>
|
|
42
|
+
<dd>The base URL for your Watson Orchestrate instance</dd>
|
|
43
|
+
<dt>API Key</dt>
|
|
44
|
+
<dd>Your IBM Cloud API key for authentication</dd>
|
|
45
|
+
</dl>
|
|
46
|
+
</script>
|
|
47
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watson Orchestrate Credentials Config Node
|
|
3
|
+
* Stores API credentials for WxO authentication
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
module.exports = function(RED) {
|
|
7
|
+
function WxOCredentialsNode(config) {
|
|
8
|
+
RED.nodes.createNode(this, config);
|
|
9
|
+
this.name = config.name;
|
|
10
|
+
this.url = config.url;
|
|
11
|
+
// API key stored in this.credentials.apikey
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
RED.nodes.registerType('wxo-credentials', WxOCredentialsNode, {
|
|
15
|
+
credentials: {
|
|
16
|
+
apikey: { type: 'password' }
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@andreswagner/node-red-contrib-wxo-agent",
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "Node-RED node for invoking IBM watsonx Orchestrate agents",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"node-red",
|
|
7
|
+
"node-red-contrib",
|
|
8
|
+
"watsonx",
|
|
9
|
+
"orchestrate",
|
|
10
|
+
"ibm",
|
|
11
|
+
"ai",
|
|
12
|
+
"agent"
|
|
13
|
+
],
|
|
14
|
+
"author": "Andres Wagner <andres.wagner@gmail.com>",
|
|
15
|
+
"license": "Apache-2.0",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/andreswagner/spec_kit_nodered_test.git"
|
|
19
|
+
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=18.0.0"
|
|
22
|
+
},
|
|
23
|
+
"node-red": {
|
|
24
|
+
"version": ">=3.0.0",
|
|
25
|
+
"nodes": {
|
|
26
|
+
"wxo-agent": "nodes/wxo-agent/wxo-agent.js",
|
|
27
|
+
"wxo-credentials": "nodes/wxo-credentials/wxo-credentials.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"mocha": "^10.2.0",
|
|
32
|
+
"node-red": "^3.1.0",
|
|
33
|
+
"node-red-node-test-helper": "^0.3.3"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"test": "mocha \"tests/**/*.test.js\"",
|
|
37
|
+
"verify-npm": "node scripts/verify-npm-package.js",
|
|
38
|
+
"verify-library": "node scripts/verify-nodered-library.js",
|
|
39
|
+
"setup-metadata": "node scripts/setup-package-metadata.js"
|
|
40
|
+
}
|
|
41
|
+
}
|