@stagewhisper/stagewhisper 0.18.0 → 0.19.0

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.
@@ -2,7 +2,7 @@
2
2
  "id": "stagewhisper",
3
3
  "name": "StageWhisper",
4
4
  "description": "Turn live call moments into assistant tasks via StageWhisper",
5
- "version": "0.18.0",
5
+ "version": "0.19.0",
6
6
  "channels": [
7
7
  "stagewhisper"
8
8
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stagewhisper/stagewhisper",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "type": "module",
5
5
  "description": "OpenClaw channel plugin that connects StageWhisper live calls to your AI assistant",
6
6
  "license": "MIT",
package/plugin-main.ts CHANGED
@@ -42,25 +42,28 @@ export default definePluginEntry({
42
42
  opts.label ?? "OpenClaw",
43
43
  );
44
44
 
45
+ const cfg = await api.runtime.config.loadConfig();
46
+ const plugins = (cfg as Record<string, unknown>)["plugins"] as Record<string, unknown> ?? {};
47
+ const entries = plugins["entries"] as Record<string, Record<string, unknown>> ?? {};
48
+ const swEntry = entries["stagewhisper"] ?? {};
49
+ const swConfig = (swEntry["config"] as Record<string, unknown>) ?? {};
50
+
51
+ swConfig["apiBaseUrl"] = opts.apiUrl;
52
+ swConfig["integrationId"] = result.integration_id;
53
+ swConfig["relayToken"] = result.relay_token;
54
+ swConfig["label"] = result.label;
55
+ swEntry["config"] = swConfig;
56
+ entries["stagewhisper"] = swEntry;
57
+ plugins["entries"] = entries;
58
+ (cfg as Record<string, unknown>)["plugins"] = plugins;
59
+
60
+ await api.runtime.config.writeConfigFile(cfg);
61
+
45
62
  console.log(
46
- `\n✓ Paired with StageWhisper (${result.label})\n`,
47
- );
48
- console.log(" Apply the config:\n");
49
- console.log(
50
- ` openclaw config set plugins.entries.stagewhisper.config.apiBaseUrl ${JSON.stringify(opts.apiUrl)}`,
51
- );
52
- console.log(
53
- ` openclaw config set plugins.entries.stagewhisper.config.integrationId ${JSON.stringify(result.integration_id)}`,
54
- );
55
- console.log(
56
- ` openclaw config set plugins.entries.stagewhisper.config.relayToken ${JSON.stringify(result.relay_token)}`,
57
- );
58
- console.log(
59
- ` openclaw config set plugins.entries.stagewhisper.config.label ${JSON.stringify(result.label)}`,
60
- );
61
- console.log(
62
- "\n Then restart OpenClaw to activate the relay:\n",
63
+ `\n✓ Paired with StageWhisper (${result.label})`,
63
64
  );
65
+ console.log(" Config saved automatically.\n");
66
+ console.log(" Restart the gateway to activate the relay:\n");
64
67
  console.log(" openclaw gateway restart\n");
65
68
  } catch (err) {
66
69
  console.error(`\n✗ Pairing failed: ${err}\n`);