@voiceclaw/voiceclaw-plugin 1.1.2 → 1.1.4
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.js +11 -3
- package/package.json +1 -1
package/dist/src/channel.js
CHANGED
|
@@ -75,21 +75,25 @@ export const voiceClawPlugin = {
|
|
|
75
75
|
outbound: {
|
|
76
76
|
deliveryMode: 'direct',
|
|
77
77
|
sendText: async (params) => {
|
|
78
|
+
pluginLogger?.info(`VoiceClaw sendText called, keys: ${JSON.stringify(Object.keys(params))}`);
|
|
78
79
|
const ctx = params.context;
|
|
79
80
|
const account = ctx?.account;
|
|
80
|
-
const accountId = account?.accountId ?? 'default';
|
|
81
|
+
const accountId = account?.accountId ?? params.accountId ?? 'default';
|
|
82
|
+
const text = params.text ?? '';
|
|
83
|
+
pluginLogger?.info(`VoiceClaw sendText: accountId="${accountId}", text="${text.slice(0, 50)}..."`);
|
|
81
84
|
const client = clients.get(accountId);
|
|
82
85
|
if (!client || client.connectionState !== 'connected') {
|
|
83
|
-
pluginLogger?.warn(`VoiceClaw: No connection for "${accountId}", reply dropped`);
|
|
86
|
+
pluginLogger?.warn(`VoiceClaw: No connection for "${accountId}", reply dropped. clients: [${[...clients.keys()].join(',')}]`);
|
|
84
87
|
return { ok: false };
|
|
85
88
|
}
|
|
86
89
|
client.send({
|
|
87
90
|
type: 'agent_reply',
|
|
88
91
|
id: crypto.randomUUID(),
|
|
89
92
|
replyTo: '',
|
|
90
|
-
text
|
|
93
|
+
text,
|
|
91
94
|
ts: new Date().toISOString(),
|
|
92
95
|
});
|
|
96
|
+
pluginLogger?.info(`VoiceClaw: Reply sent to "${accountId}"`);
|
|
93
97
|
return { ok: true };
|
|
94
98
|
},
|
|
95
99
|
},
|
|
@@ -97,6 +101,10 @@ export const voiceClawPlugin = {
|
|
|
97
101
|
startAccount: async (ctx) => {
|
|
98
102
|
const account = ctx.account;
|
|
99
103
|
const logger = pluginLogger;
|
|
104
|
+
// Capture the inbound handler from OpenClaw
|
|
105
|
+
if (ctx.processInbound) {
|
|
106
|
+
handleInbound = ctx.processInbound;
|
|
107
|
+
}
|
|
100
108
|
logger.info(`VoiceClaw: Starting account "${account.accountId}"...`);
|
|
101
109
|
try {
|
|
102
110
|
const sessionToken = await resolveToken(account.accountId, account, logger);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceclaw/voiceclaw-plugin",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
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",
|