@voiceclaw/voiceclaw-plugin 1.0.3 → 1.0.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.
- package/dist/index.js +13 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -80,22 +80,27 @@ export default function register(api) {
|
|
|
80
80
|
listAccountIds: (cfg) => {
|
|
81
81
|
const accounts = cfg.channels?.voiceclaw?.accounts ?? {};
|
|
82
82
|
const ids = Object.keys(accounts);
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
const hasPluginEntry = cfg.plugins?.entries?.['voiceclaw-plugin'] !== undefined;
|
|
84
|
+
console.log(`[VoiceClaw Plugin] listAccountIds called. hasPluginEntry: ${hasPluginEntry}, explicit channels: ${ids.join(',')}`);
|
|
85
|
+
// If the plugin acts as enabled, ensure 'default' is in the list
|
|
86
|
+
if (hasPluginEntry && !ids.includes('default')) {
|
|
85
87
|
ids.push('default');
|
|
86
88
|
}
|
|
89
|
+
console.log(`[VoiceClaw Plugin] listAccountIds returning: ${ids.join(',')}`);
|
|
87
90
|
return ids;
|
|
88
91
|
},
|
|
89
92
|
resolveAccount: (cfg, accountId) => {
|
|
90
93
|
const accounts = cfg.channels?.voiceclaw?.accounts ?? {};
|
|
91
94
|
const id = accountId ?? 'default';
|
|
92
95
|
const account = accounts[id] ?? {};
|
|
96
|
+
let finalAccount = account;
|
|
93
97
|
// Merge with top-level plugin config if this is the default account
|
|
94
98
|
if (id === 'default') {
|
|
95
99
|
const topLevelConfig = cfg.plugins?.entries?.['voiceclaw-plugin']?.config ?? {};
|
|
96
|
-
|
|
100
|
+
finalAccount = { ...topLevelConfig, ...account };
|
|
97
101
|
}
|
|
98
|
-
|
|
102
|
+
console.log(`[VoiceClaw Plugin] resolveAccount for ${id} returning:`, finalAccount);
|
|
103
|
+
return finalAccount;
|
|
99
104
|
},
|
|
100
105
|
},
|
|
101
106
|
outbound: {
|
|
@@ -119,11 +124,12 @@ export default function register(api) {
|
|
|
119
124
|
},
|
|
120
125
|
gateway: {
|
|
121
126
|
start: async (ctx) => {
|
|
127
|
+
api.logger.info('VoiceClaw: gateway.start() called');
|
|
122
128
|
handleInbound = ctx.processInbound;
|
|
123
129
|
let accounts = ctx.config.channels?.voiceclaw?.accounts ?? {};
|
|
124
|
-
// Auto-inject default account if
|
|
125
|
-
const
|
|
126
|
-
if (
|
|
130
|
+
// Auto-inject default account if plugin entry exists and default isn't explicitly defined
|
|
131
|
+
const hasPluginEntry = ctx.config.plugins?.entries?.['voiceclaw-plugin'] !== undefined;
|
|
132
|
+
if (hasPluginEntry && !accounts['default']) {
|
|
127
133
|
accounts = { ...accounts, default: {} };
|
|
128
134
|
}
|
|
129
135
|
for (const [accountId, baseAccount] of Object.entries(accounts)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voiceclaw/voiceclaw-plugin",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.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",
|