@stagewhisper/stagewhisper 0.42.0 → 0.44.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.42.0",
5
+ "version": "0.44.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.42.0",
3
+ "version": "0.44.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
@@ -114,10 +114,18 @@ export default definePluginEntry({
114
114
 
115
115
  sw.command("reasoning-check")
116
116
  .description("Test reasoning capability against the local OpenResponses endpoint")
117
- .option("--model <model>", "Model to use", "openai-codex/gpt-5.4")
117
+ .option("--model <model>", "Model to use (omit to use your configured default)", "openclaw/default")
118
118
  .action(async (opts: { model: string }) => {
119
119
  const { callOpenResponses } = await import("./src/openresponses.js");
120
- console.log(`Testing reasoning with model: ${opts.model}`);
120
+ const modelLabel = opts.model === "openclaw/default" ? "default (configured)" : opts.model;
121
+
122
+ const cfg = api.config as Record<string, unknown>;
123
+ const gw = (cfg?.gateway as Record<string, unknown>) ?? {};
124
+ const auth = (gw?.auth as Record<string, unknown>) ?? {};
125
+ const port = Number(gw?.port) || 18789;
126
+ const hasToken = typeof auth?.token === "string" && auth.token.length > 0;
127
+ console.log(`Gateway: 127.0.0.1:${port}, auth token: ${hasToken ? "present" : "MISSING"}`);
128
+ console.log(`Testing reasoning with model: ${modelLabel}`);
121
129
  console.log("Sending test request to local /v1/responses ...");
122
130
 
123
131
  const start = Date.now();
@@ -5,25 +5,17 @@ type GatewayConfig = { url: string; apiKey: string | null };
5
5
  function resolveGatewayConfig(api: OpenClawPluginApi): GatewayConfig {
6
6
  const cfg = api.config as Record<string, unknown>;
7
7
  const gw = (cfg?.gateway as Record<string, unknown>) ?? {};
8
- const url = String(gw?.url ?? "http://127.0.0.1:18789").replace(/\/+$/, "");
9
- const rawKey = typeof gw?.apiKey === "string" ? gw.apiKey : null;
8
+ const auth = (gw?.auth as Record<string, unknown>) ?? {};
10
9
 
11
- let apiKey: string | null = null;
12
- if (rawKey) {
13
- try {
14
- const parsed = new URL(url);
15
- const safe =
16
- parsed.hostname === "localhost" ||
17
- parsed.hostname === "127.0.0.1" ||
18
- parsed.hostname === "::1" ||
19
- parsed.protocol === "https:";
20
- apiKey = safe ? rawKey : null;
21
- } catch {
22
- apiKey = null;
23
- }
24
- }
10
+ const port = Number(gw?.port) || 18789;
11
+ const explicitUrl = typeof gw?.url === "string" ? gw.url : null;
12
+ const url = (explicitUrl ?? `http://127.0.0.1:${port}`).replace(/\/+$/, "");
13
+
14
+ const token =
15
+ (typeof auth?.token === "string" ? auth.token : null) ??
16
+ (typeof process !== "undefined" ? process.env.OPENCLAW_GATEWAY_TOKEN ?? null : null);
25
17
 
26
- return { url, apiKey };
18
+ return { url, apiKey: token };
27
19
  }
28
20
 
29
21
  export async function callOpenResponses(
package/src/reasoning.ts CHANGED
@@ -16,7 +16,7 @@ export async function probeOpenResponses(
16
16
  api: OpenClawPluginApi,
17
17
  ): Promise<ProbeResult> {
18
18
  const body: OpenResponsesCreateResponseRequestBody = {
19
- model: "default",
19
+ model: "openclaw/default",
20
20
  input: "Reply with exactly: OK",
21
21
  max_output_tokens: 16,
22
22
  temperature: 0,
@@ -103,7 +103,7 @@ export async function executeReasoningJob(
103
103
  };
104
104
  }
105
105
 
106
- const model = job.model ?? displayModel ?? "default";
106
+ const model = job.model ?? displayModel ?? "openclaw/default";
107
107
  const correlationId = job.correlation_id;
108
108
 
109
109
  const requestBody: OpenResponsesCreateResponseRequestBody = {