polygram 0.12.0-rc.16 → 0.12.0-rc.18
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/claude-bin.js +8 -1
- package/lib/process/cli-process.js +16 -9
- package/package.json +1 -1
package/lib/claude-bin.js
CHANGED
|
@@ -7,7 +7,14 @@ const fs = require('fs');
|
|
|
7
7
|
// 0.12 Phase 4: moved from lib/process/tmux-process.js into the helper module
|
|
8
8
|
// that consumes it, so the constant survives TmuxProcess deletion. CliProcess
|
|
9
9
|
// + spike scripts + polygram boot all import from here now.
|
|
10
|
-
|
|
10
|
+
// 0.12.0-rc.18: bumped 2.1.142 → 2.1.158 (latest installed). The dev-channels
|
|
11
|
+
// inbound-message delivery has an intermittent channel-bind race (the bridge
|
|
12
|
+
// pushes user_msg before claude's channel subscription is active → message
|
|
13
|
+
// silently dropped → stuck turn; see docs/0.12.0-known-issues.md). Trying a
|
|
14
|
+
// newer claude to see if the research-preview channels reliability improved,
|
|
15
|
+
// before building polygram-side recovery. Re-validate the channel flow on each
|
|
16
|
+
// bump via tests/e2e-channels-real-claude.test.js.
|
|
17
|
+
const CLAUDE_CLI_PINNED_VERSION = '2.1.158';
|
|
11
18
|
|
|
12
19
|
/**
|
|
13
20
|
* Resolve + verify the pinned claude CLI binary.
|
|
@@ -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.18",
|
|
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": {
|