@voiceclaw/voiceclaw-plugin 1.1.4 → 1.1.6

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.
@@ -42,20 +42,16 @@ 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>;
48
54
  };
49
- status: {
50
- getStatus: (ctx: any) => Promise<{
51
- ok: boolean;
52
- label: string;
53
- detail: {
54
- accountId: string;
55
- connected: string;
56
- };
57
- }>;
58
- };
59
55
  };
60
56
  export declare function setLogger(logger: Logger): void;
61
57
  export declare function setInboundHandler(handler: (text: string, accountId: string) => Promise<void>): void;
@@ -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;
@@ -147,20 +171,6 @@ export const voiceClawPlugin = {
147
171
  }
148
172
  },
149
173
  },
150
- status: {
151
- getStatus: async (ctx) => {
152
- const account = ctx.account;
153
- const client = clients.get(account.accountId);
154
- return {
155
- ok: client?.connectionState === 'connected',
156
- label: `VoiceClaw (${account.accountId})`,
157
- detail: {
158
- accountId: account.accountId,
159
- connected: client?.connectionState ?? 'not started',
160
- },
161
- };
162
- },
163
- },
164
174
  };
165
175
  // ── Plugin entry point (object form) ───────────────────────────
166
176
  export function setLogger(logger) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voiceclaw/voiceclaw-plugin",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
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",