@voiceclaw/voiceclaw-plugin 1.1.4 → 1.1.5
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 +6 -0
- package/dist/src/channel.js +24 -0
- package/package.json +1 -1
package/dist/src/channel.d.ts
CHANGED
|
@@ -42,6 +42,12 @@ export declare const voiceClawPlugin: {
|
|
|
42
42
|
ok: boolean;
|
|
43
43
|
}>;
|
|
44
44
|
};
|
|
45
|
+
onboarding: {
|
|
46
|
+
configure: (ctx: any) => Promise<"skip" | {
|
|
47
|
+
cfg: any;
|
|
48
|
+
accountId: string;
|
|
49
|
+
}>;
|
|
50
|
+
};
|
|
45
51
|
gateway: {
|
|
46
52
|
startAccount: (ctx: any) => Promise<void>;
|
|
47
53
|
stopAccount: (ctx: any) => Promise<void>;
|
package/dist/src/channel.js
CHANGED
|
@@ -97,6 +97,30 @@ export const voiceClawPlugin = {
|
|
|
97
97
|
return { ok: true };
|
|
98
98
|
},
|
|
99
99
|
},
|
|
100
|
+
onboarding: {
|
|
101
|
+
configure: async (ctx) => {
|
|
102
|
+
// Support: openclaw channels add --channel voiceclaw --token <code>
|
|
103
|
+
let pairingCode = ctx.options?.token;
|
|
104
|
+
if (!pairingCode && ctx.prompter) {
|
|
105
|
+
pairingCode = await ctx.prompter.text({
|
|
106
|
+
message: 'Enter the 6-digit pairing code from the VoiceClaw app:',
|
|
107
|
+
validate: (v) => v.trim().length >= 4
|
|
108
|
+
? undefined
|
|
109
|
+
: 'Pairing code must be at least 4 characters',
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
if (!pairingCode || pairingCode.trim() === '') {
|
|
113
|
+
return 'skip';
|
|
114
|
+
}
|
|
115
|
+
const cfg = { ...ctx.config };
|
|
116
|
+
if (!cfg.channels)
|
|
117
|
+
cfg.channels = {};
|
|
118
|
+
if (!cfg.channels.voiceclaw)
|
|
119
|
+
cfg.channels.voiceclaw = {};
|
|
120
|
+
cfg.channels.voiceclaw.pairingCode = pairingCode.trim();
|
|
121
|
+
return { cfg, accountId: 'default' };
|
|
122
|
+
},
|
|
123
|
+
},
|
|
100
124
|
gateway: {
|
|
101
125
|
startAccount: async (ctx) => {
|
|
102
126
|
const account = ctx.account;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceclaw/voiceclaw-plugin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
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",
|