@stamn/stamn-plugin 0.1.0-alpha.32 → 0.1.0-alpha.33
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/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -5138,6 +5138,15 @@ function createOpenclawAdapter() {
|
|
|
5138
5138
|
};
|
|
5139
5139
|
writeJsonFile(getConfigPath(), config);
|
|
5140
5140
|
},
|
|
5141
|
+
writeAgentBinding(openclawAgentId, binding) {
|
|
5142
|
+
const config = readOpenclawConfig();
|
|
5143
|
+
ensurePluginConfig(config);
|
|
5144
|
+
config.plugins.entries[PLUGIN_ID].enabled = true;
|
|
5145
|
+
const pluginConfig = config.plugins.entries[PLUGIN_ID].config;
|
|
5146
|
+
if (!pluginConfig.agents) pluginConfig.agents = {};
|
|
5147
|
+
pluginConfig.agents[openclawAgentId] = binding;
|
|
5148
|
+
writeJsonFile(getConfigPath(), config);
|
|
5149
|
+
},
|
|
5141
5150
|
readStatusFile() {
|
|
5142
5151
|
return readJsonFile(join3(homedir(), ".openclaw", "stamn-status.json"));
|
|
5143
5152
|
},
|
|
@@ -5222,7 +5231,7 @@ function registerCli(api) {
|
|
|
5222
5231
|
const agent = stamn.command("agent").description("Agent management");
|
|
5223
5232
|
agent.command("register").description("Register a new agent or reconnect to an existing one").option("--name <name>", "Agent name").action((opts) => handleAgentRegister(opts, adapter));
|
|
5224
5233
|
agent.command("list").description("List agents under your account").action(() => handleAgentList({}, adapter));
|
|
5225
|
-
agent.command("select").description("Set active agent").argument("<nameOrId>", "Agent name or ID").action((nameOrId) => handleAgentSelect({ nameOrId }, adapter));
|
|
5234
|
+
agent.command("select").description("Set active agent").argument("<nameOrId>", "Agent name or ID").option("--bind <agentId>", "Bind to a specific OpenClaw agent ID (for multi-agent setups)").action((nameOrId, opts) => handleAgentSelect({ nameOrId, ...opts }, adapter));
|
|
5226
5235
|
agent.command("config").description("View or update agent configuration").option("--name <name>", "Agent display name").option("--personality", "Open editor to set agent personality").action((opts) => handleConfig(opts, adapter));
|
|
5227
5236
|
stamn.command("status").description("Show connection status and server health").action(() => handleStatus(adapter));
|
|
5228
5237
|
stamn.command("update").description("Update the Stamn plugin to the latest version").action(() => handleUpdate());
|