@stagewhisper/stagewhisper 0.29.0 → 0.31.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.
- package/openclaw.plugin.json +2 -1
- package/package.json +3 -1
- package/plugin-main.ts +44 -9
- package/setup-entry.ts +4 -0
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stagewhisper/stagewhisper",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenClaw channel plugin that connects StageWhisper live calls to your AI assistant",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
|
8
8
|
"index.ts",
|
|
9
9
|
"plugin-main.ts",
|
|
10
|
+
"setup-entry.ts",
|
|
10
11
|
"api.ts",
|
|
11
12
|
"src",
|
|
12
13
|
"openclaw.plugin.json",
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
"extensions": [
|
|
22
23
|
"./index.ts"
|
|
23
24
|
],
|
|
25
|
+
"setupEntry": "./setup-entry.ts",
|
|
24
26
|
"channel": {
|
|
25
27
|
"id": "stagewhisper",
|
|
26
28
|
"label": "StageWhisper",
|
package/plugin-main.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineChannelPluginEntry } from "openclaw/plugin-sdk/core";
|
|
2
2
|
import { stagewhisperPlugin } from "./src/channel.js";
|
|
3
3
|
import { setRuntime } from "./src/runtime.js";
|
|
4
4
|
import { createRelayService } from "./src/service.js";
|
|
5
5
|
|
|
6
|
-
export default
|
|
6
|
+
export default defineChannelPluginEntry({
|
|
7
7
|
id: "stagewhisper",
|
|
8
8
|
name: "StageWhisper",
|
|
9
9
|
description: "Turn live call moments into assistant tasks via StageWhisper",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
plugin: stagewhisperPlugin,
|
|
11
|
+
setRuntime,
|
|
12
|
+
registerFull(api) {
|
|
13
13
|
const service = createRelayService(api);
|
|
14
14
|
|
|
15
15
|
api.registerCli(
|
|
@@ -58,6 +58,13 @@ export default definePluginEntry({
|
|
|
58
58
|
plugins["entries"] = entries;
|
|
59
59
|
(cfg as Record<string, unknown>)["plugins"] = plugins;
|
|
60
60
|
|
|
61
|
+
const channels = ((cfg as Record<string, unknown>)["channels"] as Record<string, unknown>) ?? {};
|
|
62
|
+
channels["stagewhisper"] = {
|
|
63
|
+
integrationId: result.integration_id,
|
|
64
|
+
apiBaseUrl: opts.apiUrl,
|
|
65
|
+
};
|
|
66
|
+
(cfg as Record<string, unknown>)["channels"] = channels;
|
|
67
|
+
|
|
61
68
|
await api.runtime.config.writeConfigFile(cfg);
|
|
62
69
|
|
|
63
70
|
console.log(
|
|
@@ -73,6 +80,37 @@ export default definePluginEntry({
|
|
|
73
80
|
},
|
|
74
81
|
);
|
|
75
82
|
|
|
83
|
+
sw.command("unpair")
|
|
84
|
+
.description(
|
|
85
|
+
"Remove StageWhisper pairing (run before `openclaw plugins uninstall`)",
|
|
86
|
+
)
|
|
87
|
+
.action(async () => {
|
|
88
|
+
try {
|
|
89
|
+
const cfg = await api.runtime.config.loadConfig();
|
|
90
|
+
const plugins = (cfg as Record<string, unknown>)["plugins"] as Record<string, unknown> ?? {};
|
|
91
|
+
const entries = plugins["entries"] as Record<string, Record<string, unknown>> ?? {};
|
|
92
|
+
const swEntry = entries["stagewhisper"];
|
|
93
|
+
if (swEntry) {
|
|
94
|
+
delete swEntry["config"];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const channels = (cfg as Record<string, unknown>)["channels"] as Record<string, unknown> | undefined;
|
|
98
|
+
if (channels?.["stagewhisper"]) {
|
|
99
|
+
delete channels["stagewhisper"];
|
|
100
|
+
if (Object.keys(channels).length === 0) {
|
|
101
|
+
delete (cfg as Record<string, unknown>)["channels"];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
await api.runtime.config.writeConfigFile(cfg);
|
|
106
|
+
console.log("\n✓ StageWhisper unpaired. You can now safely run:");
|
|
107
|
+
console.log(" openclaw plugins uninstall stagewhisper\n");
|
|
108
|
+
} catch (err) {
|
|
109
|
+
console.error(`\n✗ Unpair failed: ${err}\n`);
|
|
110
|
+
process.exit(1);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
76
114
|
sw.command("status")
|
|
77
115
|
.description("Show StageWhisper relay connection status")
|
|
78
116
|
.action(async () => {
|
|
@@ -84,7 +122,7 @@ export default definePluginEntry({
|
|
|
84
122
|
if (!configured) {
|
|
85
123
|
console.log("\nStageWhisper: not paired\n");
|
|
86
124
|
console.log(
|
|
87
|
-
" Run: openclaw stagewhisper pair --code <CODE
|
|
125
|
+
" Run: openclaw stagewhisper pair --code <CODE>\n",
|
|
88
126
|
);
|
|
89
127
|
console.log(
|
|
90
128
|
" Get the pairing code from StageWhisper desktop: Settings → Assistant → Generate Pairing Code\n",
|
|
@@ -117,9 +155,6 @@ export default definePluginEntry({
|
|
|
117
155
|
{ commands: ["stagewhisper"] },
|
|
118
156
|
);
|
|
119
157
|
|
|
120
|
-
if (api.registrationMode !== "full") return;
|
|
121
|
-
|
|
122
|
-
setRuntime(api.runtime);
|
|
123
158
|
api.registerService(service);
|
|
124
159
|
},
|
|
125
160
|
});
|
package/setup-entry.ts
ADDED