mirror of
https://github.com/agentclientprotocol/claude-agent-acp.git
synced 2026-10-28 13:01:20 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5b836820b | ||
|
|
c3ffcfa98f | ||
|
|
4d232dafad | ||
|
|
4f0ffa2735 | ||
|
|
f069df5857 |
@@ -1,5 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## 0.16.2
|
||||
|
||||
- Update to @anthropic-ai/claude-agent-sdk@0.2.44
|
||||
- fix: Replace all non-alphanumeric characters for session loading in encodeProjectPath (#307)
|
||||
- don't include /login slash command in login command (#315)
|
||||
|
||||
## 0.16.1
|
||||
|
||||
- Update to @anthropic-ai/claude-agent-sdk@0.2.38
|
||||
|
||||
673
package-lock.json
generated
673
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
13
package.json
13
package.json
@@ -3,7 +3,7 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"version": "0.16.1",
|
||||
"version": "0.16.2",
|
||||
"description": "An ACP-compatible coding agent powered by the Claude Code SDK (TypeScript)",
|
||||
"main": "dist/lib.js",
|
||||
"types": "dist/lib.d.ts",
|
||||
@@ -61,17 +61,18 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@agentclientprotocol/sdk": "0.14.1",
|
||||
"@anthropic-ai/claude-agent-sdk": "0.2.38",
|
||||
"@anthropic-ai/claude-agent-sdk": "0.2.44",
|
||||
"@modelcontextprotocol/sdk": "1.26.0",
|
||||
"diff": "8.0.3",
|
||||
"minimatch": "10.1.2"
|
||||
"minimatch": "10.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@anthropic-ai/sdk": "0.74.0",
|
||||
"@eslint/js": "10.0.1",
|
||||
"@types/node": "25.2.3",
|
||||
"@typescript-eslint/eslint-plugin": "8.55.0",
|
||||
"@typescript-eslint/parser": "8.55.0",
|
||||
"eslint": "9.39.2",
|
||||
"@typescript-eslint/eslint-plugin": "8.56.0",
|
||||
"@typescript-eslint/parser": "8.56.0",
|
||||
"eslint": "10.0.0",
|
||||
"eslint-config-prettier": "10.1.8",
|
||||
"globals": "17.3.0",
|
||||
"prettier": "3.8.1",
|
||||
|
||||
@@ -218,7 +218,7 @@ export class ClaudeAcpAgent implements Agent {
|
||||
authMethod._meta = {
|
||||
"terminal-auth": {
|
||||
command: "node",
|
||||
args: [cliPath, "/login"],
|
||||
args: [cliPath],
|
||||
label: "Claude Code Login",
|
||||
},
|
||||
};
|
||||
@@ -756,10 +756,15 @@ export class ClaudeAcpAgent implements Agent {
|
||||
try {
|
||||
await this.sessions[params.sessionId].query.setPermissionMode(params.modeId);
|
||||
} catch (error) {
|
||||
const errorMessage =
|
||||
error instanceof Error && error.message ? error.message : "Invalid Mode";
|
||||
|
||||
throw new Error(errorMessage);
|
||||
if (error instanceof Error) {
|
||||
if (!error.message) {
|
||||
error.message = "Invalid Mode";
|
||||
}
|
||||
throw error;
|
||||
} else {
|
||||
// eslint-disable-next-line preserve-caught-error
|
||||
throw new Error("Invalid Mode");
|
||||
}
|
||||
}
|
||||
return {};
|
||||
default:
|
||||
|
||||
13
src/utils.ts
13
src/utils.ts
@@ -133,7 +133,6 @@ export function extractLinesWithByteLimit(
|
||||
|
||||
let linesSeen = 0;
|
||||
let index = 0;
|
||||
linesSeen = 0;
|
||||
|
||||
let contentLength = 0;
|
||||
let wasLimited = false;
|
||||
@@ -172,15 +171,7 @@ export function extractLinesWithByteLimit(
|
||||
|
||||
// Helper to encode a path like Claude does:
|
||||
// - Unix: "/Users/test" -> "-Users-test"
|
||||
// - Windows: "C:\Users\test" -> "C-Users-test"
|
||||
// - Windows: "C:\Users\test" -> "C--Users-test"
|
||||
export function encodeProjectPath(cwd: string): string {
|
||||
const windowsPathMatch = cwd.match(/^([A-Za-z]):[\\/]/);
|
||||
if (windowsPathMatch) {
|
||||
const driveLetter = windowsPathMatch[1];
|
||||
const rest = cwd.slice(2);
|
||||
return `${driveLetter}${rest.replace(/[\\/]/g, "-")}`;
|
||||
}
|
||||
|
||||
// Unix paths
|
||||
return cwd.replace(/\//g, "-");
|
||||
return cwd.replace(/[^a-zA-Z0-9]/g, "-");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user