Add single-file executable using bun#332
Conversation
|
Demo release available at https://github.com/SteffenDE/claude-code-acp/releases/tag/v0.18.0-test3. |
|
@benbrandt as we discussed in the past, this is the PR for precompiled claude-code-acp so we don't need to depend on npx/bunx :) |
benbrandt
left a comment
There was a problem hiding this comment.
Overall seems good! a few questiosn
fcfc8bd to
63175ae
Compare
benbrandt
left a comment
There was a problem hiding this comment.
thanks! two more questions, otherwise we can just go with it
|
This change appears to cause an issue where external tools cannot be correctly located. |
This comment was marked as outdated.
This comment was marked as outdated.
|
@lixiaoyan so perhaps they fixed the issue for cli.js but not for Perhaps a fix is to set |
|
I've confirmed that after switching the agent invocation method in Zed to |
|
Apparently the SDK ships with this: When using the SDK (as a node module), it does this: But now, because of the single-file Bun, the It seems the SDK code accounts for I think redoing the native embedding for our Bun executable will be a lot of work, so the best option is to indeed:
However, we would need to do this for every executable they add. For example, there are also some tree-sitter and wasm files at the root of the SDK. I asked Claude to check how they are required in the SDK and it returned with this: So all of those will likely fail to load from our executable, if they are used at any moment (it is hard to say when). Which means are our two remaining options are:
|
|
Thanks all. I'll remove the binary distribution from the registry for now while we figure this out |
|
Hrm that's a bummer. I agree that we should probably drop the single file executables, as working around those issues would probably only create more headaches in the future. |
This adds a single-file executable using bun. The trick is to use a separate flag for ACP
--acpand spawn the regularcli.jsbundled by the Agent SDK if no flags are passed. This was, we can pass ourselves as pathToClaudeCodeExecutable.