@voiceclaw/voiceclaw-plugin 1.1.9 → 1.2.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/dist/src/channel.d.ts +9 -1
- package/dist/src/channel.js +22 -3
- package/package.json +1 -1
package/dist/src/channel.d.ts
CHANGED
|
@@ -53,7 +53,15 @@ export declare const voiceClawPlugin: {
|
|
|
53
53
|
applyAccountConfig: ({ cfg, accountId, input }: any) => any;
|
|
54
54
|
};
|
|
55
55
|
onboarding: {
|
|
56
|
-
|
|
56
|
+
channel: any;
|
|
57
|
+
getStatus: (ctx: any) => Promise<{
|
|
58
|
+
channel: any;
|
|
59
|
+
configured: boolean;
|
|
60
|
+
statusLines: string[];
|
|
61
|
+
selectionHint: string;
|
|
62
|
+
quickstartScore: number;
|
|
63
|
+
}>;
|
|
64
|
+
configure: (ctx: any) => Promise<{
|
|
57
65
|
cfg: any;
|
|
58
66
|
accountId: string;
|
|
59
67
|
}>;
|
package/dist/src/channel.js
CHANGED
|
@@ -160,8 +160,26 @@ export const voiceClawPlugin = {
|
|
|
160
160
|
};
|
|
161
161
|
},
|
|
162
162
|
},
|
|
163
|
-
// ── Onboarding (
|
|
163
|
+
// ── Onboarding adapter (ChannelOnboardingAdapter shape) ──────
|
|
164
164
|
onboarding: {
|
|
165
|
+
channel: 'voiceclaw',
|
|
166
|
+
getStatus: async (ctx) => {
|
|
167
|
+
const cfg = ctx.cfg;
|
|
168
|
+
const accountIds = resolveAccountIds(cfg);
|
|
169
|
+
const hasAnyAccount = accountIds.length > 0;
|
|
170
|
+
const configured = hasAnyAccount && accountIds.some((id) => {
|
|
171
|
+
const account = resolveVoiceClawAccount(cfg, id);
|
|
172
|
+
return account && (loadSavedToken(id) !== null || Boolean(account.pairingCode));
|
|
173
|
+
});
|
|
174
|
+
const statusLabel = configured ? 'configured' : 'not configured';
|
|
175
|
+
return {
|
|
176
|
+
channel: 'voiceclaw',
|
|
177
|
+
configured,
|
|
178
|
+
statusLines: [`VoiceClaw: ${statusLabel}`],
|
|
179
|
+
selectionHint: configured ? 'configured' : 'not configured',
|
|
180
|
+
quickstartScore: 0,
|
|
181
|
+
};
|
|
182
|
+
},
|
|
165
183
|
configure: async (ctx) => {
|
|
166
184
|
let pairingCode = ctx.options?.token;
|
|
167
185
|
if (!pairingCode && ctx.prompter) {
|
|
@@ -173,9 +191,10 @@ export const voiceClawPlugin = {
|
|
|
173
191
|
});
|
|
174
192
|
}
|
|
175
193
|
if (!pairingCode || pairingCode.trim() === '') {
|
|
176
|
-
|
|
194
|
+
// Return a no-op result instead of 'skip' since configure must return { cfg, accountId }
|
|
195
|
+
return { cfg: ctx.cfg, accountId: 'default' };
|
|
177
196
|
}
|
|
178
|
-
const cfg = { ...ctx.
|
|
197
|
+
const cfg = { ...ctx.cfg };
|
|
179
198
|
if (!cfg.channels)
|
|
180
199
|
cfg.channels = {};
|
|
181
200
|
if (!cfg.channels.voiceclaw)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceclaw/voiceclaw-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "OpenClaw channel plugin for VoiceClaw — relay messages between your AI agent and the VoiceClaw iOS/macOS app via Siri",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|