Initial release: generic CLI agent nodes for Nextcloud Node-RED

This commit is contained in:
n3wk
2026-08-24 19:06:08 +02:00
commit b9249dd9ca
16 changed files with 1437 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
'use strict';
module.exports = function (RED) {
function AgentConfigNode(n) {
RED.nodes.createNode(this, n);
this.cliPath = n.cliPath || 'agent';
this.workspaceDir = n.workspaceDir || '/data/agent-workspace';
this.apiEndpoint = (n.apiEndpoint || 'http://localhost:3000').replace(/\/$/, '');
this.apiKey = this.credentials.apiKey || '';
this.autoStart = n.autoStart !== false;
this.defaultArgs = n.defaultArgs || '';
this.maxConcurrent = parseInt(n.maxConcurrent) || 3;
}
RED.nodes.registerType('agent-config', AgentConfigNode, {
credentials: {
apiKey: { type: 'password' }
}
});
};