Compare commits

...

1 Commits

Author SHA1 Message Date
Ben Brandt
8df7f10058 Use better file path resolution for experimental auth support (#156) 2025-11-14 12:21:49 +01:00
4 changed files with 11 additions and 8 deletions

View File

@@ -1,5 +1,9 @@
# Changelog
## 0.10.3
- Fix for experimental terminal auth support
## 0.10.2
- Fix incorrect stop reason for tool call refusals

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@zed-industries/claude-code-acp",
"version": "0.10.2",
"version": "0.10.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@zed-industries/claude-code-acp",
"version": "0.10.2",
"version": "0.10.3",
"license": "Apache-2.0",
"dependencies": {
"@agentclientprotocol/sdk": "0.5.1",

View File

@@ -3,7 +3,7 @@
"publishConfig": {
"access": "public"
},
"version": "0.10.2",
"version": "0.10.3",
"description": "An ACP-compatible coding agent powered by the Claude Code SDK (TypeScript)",
"main": "dist/lib.js",
"bin": {

View File

@@ -53,6 +53,7 @@ import {
import { ContentBlockParam } from "@anthropic-ai/sdk/resources";
import { BetaContentBlock, BetaRawContentBlockDelta } from "@anthropic-ai/sdk/resources/beta.mjs";
import packageJson from "../package.json" with { type: "json" };
import { fileURLToPath } from "node:url";
type Session = {
query: Query;
@@ -126,14 +127,12 @@ export class ClaudeAcpAgent implements Agent {
// If client supports terminal-auth capability, use that instead.
if (request.clientCapabilities?._meta?.["terminal-auth"] === true) {
const cliPath = import.meta
.resolve("@anthropic-ai/claude-agent-sdk/cli.js")
.replace("file://", "");
const cliPath = fileURLToPath(import.meta.resolve("@anthropic-ai/claude-agent-sdk/cli.js"));
authMethod._meta = {
"terminal-auth": {
command: "node",
args: [cliPath, "/login"],
command: cliPath,
args: ["/login"],
label: "Claude Code Login",
},
};