@lucascouts/claude-agent-tui 0.17.1 → 0.17.3
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/acp-agent.js +1 -1
- package/dist/billing/entrypoint-guard.js +7 -0
- package/dist/engine-pty.d.ts +4 -1
- package/dist/engine-pty.js +8 -1
- package/dist/permissions/elicitation-bridge.d.ts +3 -3
- package/dist/permissions/gate-wiring.d.ts +1 -1
- package/dist/permissions/request-permission.d.ts +3 -3
- package/package.json +5 -5
package/dist/acp-agent.js
CHANGED
|
@@ -2815,7 +2815,7 @@ export class ClaudeAcpAgent {
|
|
|
2815
2815
|
client: this.client,
|
|
2816
2816
|
// Story 065 (R1/R3): negotiated in initialize() from clientCapabilities.elicitation.form. When
|
|
2817
2817
|
// true the gate drives AskUserQuestion through a real ACP form elicitation; when false it keeps
|
|
2818
|
-
// the story-064 fail-closed deny-guard. this.client (
|
|
2818
|
+
// the story-064 fail-closed deny-guard. this.client (the AcpClient that ClientConnection backs) already satisfies the
|
|
2819
2819
|
// broadened client type (it has createElicitation).
|
|
2820
2820
|
clientSupportsElicitationForm: this.clientSupportsElicitationForm,
|
|
2821
2821
|
onWarn: (m) => this.logger.error(m),
|
|
@@ -35,6 +35,13 @@
|
|
|
35
35
|
//
|
|
36
36
|
// SOURCE: doc §10 "Auditoria de billing — entrypoint", reverse-engineered from `claude` binary
|
|
37
37
|
// 2.1.159. If the binary version changes, re-audit these two sets against the new binary.
|
|
38
|
+
//
|
|
39
|
+
// RE-AUDITED 2026-11-09 against `claude` 2.1.319 (`strings`, the entrypoint table and the SDK
|
|
40
|
+
// predicate): the SDK class is still exactly sdk-ts / sdk-py / sdk-cli, and cli, claude-vscode
|
|
41
|
+
// and local-agent still exist. Labels added since (mcp, bench, claude-desktop, remote*,
|
|
42
|
+
// ssh-remote, claude-coworker*, claude-in-slack/teams, claude-security) are in neither set, so
|
|
43
|
+
// they classify 'unknown' and stay blocked. vscode, jetbrains and firstParty no longer appear in
|
|
44
|
+
// the binary; they are kept, since no current label can match them. No set changed.
|
|
38
45
|
/**
|
|
39
46
|
* §10 SUBSCRIPTION set (OK) — client labels that bill on the Claude subscription.
|
|
40
47
|
* Source: doc §10, `claude` binary 2.1.159.
|
package/dist/engine-pty.d.ts
CHANGED
|
@@ -7,9 +7,12 @@ import type { IPty } from "node-pty";
|
|
|
7
7
|
* additionally makes the nested `claude` TUI refuse to start (anti-nesting guard).
|
|
8
8
|
*/
|
|
9
9
|
export declare const FORBIDDEN_BILLING_VARS: readonly ["CLAUDECODE", "CLAUDE_CODE_ENTRYPOINT", "CLAUDE_AGENT_SDK_VERSION", "CLAUDE_AGENT_SDK_CLIENT_APP"];
|
|
10
|
+
/** Opts the CLI into its task tools on every model; see {@link buildSanitizedEnv}. */
|
|
11
|
+
export declare const TODO_TOOLS_ENV = "CLAUDE_CODE_ENABLE_TODO_TOOLS";
|
|
10
12
|
/**
|
|
11
13
|
* Build the sanitized spawn env (§5/§10): spread the base env, set the three terminal vars
|
|
12
|
-
* (`TERM`/`COLORTERM`/`FORCE_COLOR`),
|
|
14
|
+
* (`TERM`/`COLORTERM`/`FORCE_COLOR`), delete the four {@link FORBIDDEN_BILLING_VARS}, and turn
|
|
15
|
+
* {@link TODO_TOOLS_ENV} on unless the base env already sets it.
|
|
13
16
|
*
|
|
14
17
|
* This is the SINGLE shared definition every spawn path reuses — this story's spawn and
|
|
15
18
|
* story 014's `--resume` — so the deletions never drift across two hand-copied blocks
|
package/dist/engine-pty.js
CHANGED
|
@@ -35,9 +35,12 @@ export const FORBIDDEN_BILLING_VARS = [
|
|
|
35
35
|
"CLAUDE_AGENT_SDK_VERSION",
|
|
36
36
|
"CLAUDE_AGENT_SDK_CLIENT_APP",
|
|
37
37
|
];
|
|
38
|
+
/** Opts the CLI into its task tools on every model; see {@link buildSanitizedEnv}. */
|
|
39
|
+
export const TODO_TOOLS_ENV = "CLAUDE_CODE_ENABLE_TODO_TOOLS";
|
|
38
40
|
/**
|
|
39
41
|
* Build the sanitized spawn env (§5/§10): spread the base env, set the three terminal vars
|
|
40
|
-
* (`TERM`/`COLORTERM`/`FORCE_COLOR`),
|
|
42
|
+
* (`TERM`/`COLORTERM`/`FORCE_COLOR`), delete the four {@link FORBIDDEN_BILLING_VARS}, and turn
|
|
43
|
+
* {@link TODO_TOOLS_ENV} on unless the base env already sets it.
|
|
41
44
|
*
|
|
42
45
|
* This is the SINGLE shared definition every spawn path reuses — this story's spawn and
|
|
43
46
|
* story 014's `--resume` — so the deletions never drift across two hand-copied blocks
|
|
@@ -53,6 +56,10 @@ export function buildSanitizedEnv(baseEnv = process.env) {
|
|
|
53
56
|
for (const key of FORBIDDEN_BILLING_VARS) {
|
|
54
57
|
delete env[key];
|
|
55
58
|
}
|
|
59
|
+
// The CLI enables its task tools only on legacy models unless this is set (upstream
|
|
60
|
+
// claude-agent-acp #1380), so on Opus 5.x the tui would translate no plan at all. Plus
|
|
61
|
+
// injects it the same way (plan-updates.ts); a value the operator already set wins.
|
|
62
|
+
env[TODO_TOOLS_ENV] ??= "1";
|
|
56
63
|
return env;
|
|
57
64
|
}
|
|
58
65
|
/**
|
|
@@ -23,9 +23,9 @@ export interface AskUserQuestionInput {
|
|
|
23
23
|
}>;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
* The minimal ACP client surface the bridge needs — structurally satisfied by the
|
|
27
|
-
* `
|
|
28
|
-
* the bridge with a fake client OFFLINE (no
|
|
26
|
+
* The minimal ACP client surface the bridge needs — structurally satisfied by the agent's
|
|
27
|
+
* `AcpClient` (`client.createElicitation(params)`). Injected so a unit test drives
|
|
28
|
+
* the bridge with a fake client OFFLINE (no ACP connection, no Zed).
|
|
29
29
|
*/
|
|
30
30
|
export interface ElicitationClient {
|
|
31
31
|
createElicitation(params: CreateElicitationRequest): Promise<CreateElicitationResponse>;
|
|
@@ -73,7 +73,7 @@ export interface GatePty extends PtyWriter {
|
|
|
73
73
|
export declare const DEFAULT_ELICITATION_TIMEOUT_MS = 300000;
|
|
74
74
|
/** Options for {@link setupSessionGate}. Timing knobs are injectable for offline tests. */
|
|
75
75
|
export interface SessionGateOptions {
|
|
76
|
-
/** The ACP client surface. `
|
|
76
|
+
/** The ACP client surface. The agent's `AcpClient` satisfies BOTH `requestPermission(params)`
|
|
77
77
|
* (the story-033 relay) AND `createElicitation(params)` (the story-065 elicitation
|
|
78
78
|
* bridge), so the field carries both capabilities. */
|
|
79
79
|
client: PermissionClient & ElicitationClient;
|
|
@@ -30,9 +30,9 @@ export interface RequestPermissionResult {
|
|
|
30
30
|
outcome: RequestPermissionOutcome;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* The minimal ACP client surface the bridge needs — structurally satisfied by the
|
|
34
|
-
* `
|
|
35
|
-
* with a fake client OFFLINE (no
|
|
33
|
+
* The minimal ACP client surface the bridge needs — structurally satisfied by the agent's
|
|
34
|
+
* `AcpClient` (`client.requestPermission(params)`). Injected so a unit test drives the bridge
|
|
35
|
+
* with a fake client OFFLINE (no ACP connection, no Zed).
|
|
36
36
|
*/
|
|
37
37
|
export interface PermissionClient {
|
|
38
38
|
requestPermission(params: RequestPermissionParams): Promise<RequestPermissionResult>;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.17.
|
|
6
|
+
"version": "0.17.3",
|
|
7
7
|
"description": "Runs the official Claude Code TUI over a PTY and exposes it via ACP, so Claude Code threads render natively in Zed's agent panel. Built for Anthropic's June 2026 billing split (since paused).",
|
|
8
8
|
"main": "dist/lib.js",
|
|
9
9
|
"types": "dist/lib.d.ts",
|
|
@@ -65,19 +65,19 @@
|
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"@agentclientprotocol/sdk": "2.4.0",
|
|
68
|
-
"@anthropic-ai/claude-agent-sdk": "0.3.
|
|
68
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.319",
|
|
69
69
|
"node-pty": "1.1.0",
|
|
70
70
|
"zod": "^4.0.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
-
"@anthropic-ai/sdk": "1.
|
|
73
|
+
"@anthropic-ai/sdk": "1.6.0",
|
|
74
74
|
"@eslint/js": "10.0.1",
|
|
75
75
|
"@types/node": "26.6.6",
|
|
76
76
|
"@typescript-eslint/eslint-plugin": "8.72.1",
|
|
77
77
|
"@typescript-eslint/parser": "8.72.1",
|
|
78
|
-
"eslint": "10.
|
|
78
|
+
"eslint": "10.14.0",
|
|
79
79
|
"eslint-config-prettier": "10.1.8",
|
|
80
|
-
"globals": "17.
|
|
80
|
+
"globals": "17.14.0",
|
|
81
81
|
"prettier": "3.9.10",
|
|
82
82
|
"ts-node": "10.9.2",
|
|
83
83
|
"typescript": "6.0.3"
|