Initial release: generic CLI agent nodes for Nextcloud Node-RED
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
<script type="text/html" data-template-name="agent-config">
|
||||
<div class="form-row">
|
||||
<label for="node-input-cliPath"><i class="fa fa-terminal"></i> CLI Command</label>
|
||||
<input type="text" id="node-input-cliPath" placeholder="agent (or full path like /usr/local/bin/agent)">
|
||||
<span class="help-text">Command or full path to the CLI agent binary. Must be in PATH or absolute path.</span>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-workspaceDir"><i class="fa fa-folder"></i> Workspace Directory</label>
|
||||
<input type="text" id="node-input-workspaceDir" placeholder="/data/agent-workspace">
|
||||
<span class="help-text">Directory where the agent will operate. Should be accessible from Node-RED container.</span>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-apiEndpoint"><i class="fa fa-server"></i> API Endpoint</label>
|
||||
<input type="text" id="node-input-apiEndpoint" placeholder="http://localhost:3000">
|
||||
<span class="help-text">Agent REST API endpoint (if running in server mode).</span>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-apiKey"><i class="fa fa-key"></i> API Key</label>
|
||||
<input type="password" id="node-input-apiKey" placeholder="Optional API key for agent server">
|
||||
<span class="help-text">API key if agent server requires authentication.</span>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-defaultArgs"><i class="fa fa-list"></i> Default Arguments</label>
|
||||
<input type="text" id="node-input-defaultArgs" placeholder="--verbose --model default">
|
||||
<span class="help-text">Default arguments passed to the agent (space-separated).</span>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-maxConcurrent"><i class="fa fa-tasks"></i> Max Concurrent Processes</label>
|
||||
<input type="number" id="node-input-maxConcurrent" min="1" max="10" value="3" style="width: 80px;">
|
||||
<span class="help-text">Maximum number of concurrent agent processes.</span>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label for="node-input-autoStart"><i class="fa fa-play"></i> Auto-start Process</label>
|
||||
<input type="checkbox" id="node-input-autoStart" checked>
|
||||
<span class="help-text">Automatically start agent process when node receives input.</span>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/html" data-help-name="agent-config">
|
||||
<p>Configuration node for CLI agent integration.</p>
|
||||
<p>This node stores connection settings for a CLI agent. Other agent nodes reference this config.</p>
|
||||
<h3>Settings</h3>
|
||||
<ul>
|
||||
<li><b>CLI Command</b> - Command or full path to the agent binary. Default: <code>agent</code> (must be in PATH).</li>
|
||||
<li><b>Workspace Directory</b> - Directory where agent will read/write files. Should be a shared volume accessible from both Node-RED and agent.</li>
|
||||
<li><b>API Endpoint</b> - If running agent in server mode, the REST API endpoint.</li>
|
||||
<li><b>API Key</b> - Optional authentication key for agent server mode.</li>
|
||||
<li><b>Default Arguments</b> - Default arguments passed to the agent.</li>
|
||||
<li><b>Max Concurrent Processes</b> - Limit concurrent agent processes.</li>
|
||||
<li><b>Auto-start Process</b> - Start agent automatically on input.</li>
|
||||
</ul>
|
||||
<h3>Docker Setup</h3>
|
||||
<p>When running in Docker, ensure the workspace directory is mounted as a volume in both Node-RED and agent containers:</p>
|
||||
<pre><code>volumes:
|
||||
- agent-workspace:/data/agent-workspace</code></pre>
|
||||
</script>
|
||||
Reference in New Issue
Block a user