polygram 0.12.0-rc.16 → 0.12.0-rc.17
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/lib/process/cli-process.js +16 -9
- package/package.json +1 -1
|
@@ -1871,15 +1871,22 @@ class CliProcess extends Process {
|
|
|
1871
1871
|
{
|
|
1872
1872
|
const requestId = ev.toolUseId || `hook-notification-${Date.now()}`;
|
|
1873
1873
|
const toolName = ev.toolName;
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1874
|
+
// Finding #11 fix: pass the STRUCTURED tool_input through. makeCanUseTool
|
|
1875
|
+
// matches gated patterns via matchesAnyPattern, which reads
|
|
1876
|
+
// input.command (Bash) / input.url (WebFetch) — a formatted STRING
|
|
1877
|
+
// makes those undefined so a gated `Bash(rm *)` never matches and the
|
|
1878
|
+
// tool is allowed with NO approval card (silent gating bypass). The
|
|
1879
|
+
// hook Notification payload carries structured tool_input, so forward
|
|
1880
|
+
// it as-is; the approval card (approvalCardText) renders a structured
|
|
1881
|
+
// object fine — same shape the SDK canUseTool path already uses. Fall
|
|
1882
|
+
// back to the formatted-string preview only if claude sent no
|
|
1883
|
+
// structured tool_input (degenerate — tool needs perm but no input).
|
|
1884
|
+
const toolInput = (ev.toolInput && typeof ev.toolInput === 'object')
|
|
1885
|
+
? ev.toolInput
|
|
1886
|
+
: this._formatToolInputForApproval(
|
|
1887
|
+
ev.prompt || null,
|
|
1888
|
+
typeof ev.toolInput === 'string' ? ev.toolInput : JSON.stringify(ev.toolInput || {}),
|
|
1889
|
+
);
|
|
1883
1890
|
this.emit('approval-required', {
|
|
1884
1891
|
id: requestId,
|
|
1885
1892
|
toolName,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polygram",
|
|
3
|
-
"version": "0.12.0-rc.
|
|
3
|
+
"version": "0.12.0-rc.17",
|
|
4
4
|
"description": "Telegram daemon for Claude Code that preserves the OpenClaw per-chat session model. Migration path for OpenClaw users moving to Claude Code.",
|
|
5
5
|
"main": "lib/ipc/client.js",
|
|
6
6
|
"bin": {
|