a4phone 1.1.3 → 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/package.json +1 -1
- package/src/permission.mjs +5 -0
package/package.json
CHANGED
package/src/permission.mjs
CHANGED
|
@@ -31,6 +31,11 @@ export async function handlePermissionRequest(input, agentName) {
|
|
|
31
31
|
const config = loadConfig();
|
|
32
32
|
if (!config.topic) return null;
|
|
33
33
|
|
|
34
|
+
// AskUserQuestion 的交互由 asku 处理器负责,此处直接放行,避免冗余的原始 JSON 推送
|
|
35
|
+
if (input.tool_name === 'AskUserQuestion') {
|
|
36
|
+
return { hookSpecificOutput: { hookEventName: 'PermissionRequest', decision: { behavior: 'allow' } } };
|
|
37
|
+
}
|
|
38
|
+
|
|
34
39
|
const tool_name = input.tool_name || 'Unknown';
|
|
35
40
|
const message = formatMessage(tool_name, input.tool_input);
|
|
36
41
|
const requestId = crypto.randomUUID();
|