@antmanler/claude-code-acp 0.12.6
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/LICENSE +222 -0
- package/README.md +53 -0
- package/dist/acp-agent.js +908 -0
- package/dist/index.js +20 -0
- package/dist/lib.js +6 -0
- package/dist/mcp-server.js +731 -0
- package/dist/settings.js +422 -0
- package/dist/tests/acp-agent.test.js +753 -0
- package/dist/tests/extract-lines.test.js +79 -0
- package/dist/tests/replace-and-calculate-location.test.js +266 -0
- package/dist/tests/settings.test.js +462 -0
- package/dist/tools.js +555 -0
- package/dist/utils.js +150 -0
- package/package.json +73 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Load managed settings and apply environment variables
|
|
3
|
+
import { loadManagedSettings, applyEnvironmentSettings } from "./utils.js";
|
|
4
|
+
const managedSettings = loadManagedSettings();
|
|
5
|
+
if (managedSettings) {
|
|
6
|
+
applyEnvironmentSettings(managedSettings);
|
|
7
|
+
}
|
|
8
|
+
// stdout is used to send messages to the client
|
|
9
|
+
// we redirect everything else to stderr to make sure it doesn't interfere with ACP
|
|
10
|
+
console.log = console.error;
|
|
11
|
+
console.info = console.error;
|
|
12
|
+
console.warn = console.error;
|
|
13
|
+
console.debug = console.error;
|
|
14
|
+
process.on("unhandledRejection", (reason, promise) => {
|
|
15
|
+
console.error("Unhandled Rejection at:", promise, "reason:", reason);
|
|
16
|
+
});
|
|
17
|
+
import { runAcp } from "./acp-agent.js";
|
|
18
|
+
runAcp();
|
|
19
|
+
// Keep process alive
|
|
20
|
+
process.stdin.resume();
|
package/dist/lib.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Export the main agent class and utilities for library usage
|
|
2
|
+
export { ClaudeAcpAgent, runAcp, toAcpNotifications, streamEventToAcpNotifications, } from "./acp-agent.js";
|
|
3
|
+
export { loadManagedSettings, applyEnvironmentSettings, nodeToWebReadable, nodeToWebWritable, Pushable, unreachable, } from "./utils.js";
|
|
4
|
+
export { createMcpServer } from "./mcp-server.js";
|
|
5
|
+
export { toolInfoFromToolUse, planEntries, toolUpdateFromToolResult, createPreToolUseHook, acpToolNames as toolNames, } from "./tools.js";
|
|
6
|
+
export { SettingsManager, } from "./settings.js";
|