@devries-cameron20 / t3code-1 / commits / 93cd25a99b
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(acp-registry): executables named like ..agent count as inside their install folder (#35840)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Julius Marminge committed Nov 14, 2026 at 20:55 UTC 93cd25a99b29f608787b9ad1b26c95ef5c1d67c1
2 files changed +35 -1
packages/provider-acp-registry/src/server/AcpRegistrySupport.test.ts
+34
@@ -709,6 +709,40 @@ describe("AcpRegistrySupport", () => {
709 );
710 });
711
712 + it.effect("installs a contained binary whose name starts with two dots", () => {
713 + const agent = makeAgent({
714 + binary: { "linux-x86_64": { archive: archiveUrl, cmd: "..example-agent" } },
715 + });
716 + return Effect.gen(function* () {
717 + const fileSystem = yield* FileSystem.FileSystem;
718 + const cacheDir = yield* fileSystem.makeTempDirectoryScoped({
719 + prefix: "t3-acp-registry-dot-name-",
720 + });
721 + const resolver = yield* AcpRegistrySupport.makeAcpRegistryCatalog({
722 + cacheDir,
723 + toolsDir: `${cacheDir}/tools`,
724 + registryUrl,
725 + });
726 + const resolved = yield* resolver.resolve(settings(), "/workspace");
727 +
728 + expect(resolved.spawn.command).toContain(
729 + "/tools/example-agent/1.2.3/linux-x86_64/..example-agent",
730 + );
731 + }).pipe(
732 + Effect.scoped,
733 + Effect.provide(
734 + layerResolver((request) =>
735 + Effect.succeed(
736 + HttpClientResponse.fromWeb(
737 + request,
738 + new Response(request.url === registryUrl ? makeRegistry(agent) : "#!/bin/sh\n"),
739 + ),
740 + ),
741 + ),
742 + ),
743 + );
744 + });
745 +
746 it.effect("keeps a prepared binary ready after the registry advances its version", () => {
747 const makeBinaryAgent = (version: string) => ({
748 ...makeAgent({
packages/provider-acp-registry/src/server/AcpRegistrySupport.ts
+1 -1
@@ -1361,7 +1361,7 @@ export const makeAcpRegistryCatalog = Effect.fn("AcpRegistryCatalog.make")(funct
1361 const rootRealPath = yield* fileSystem.realPath(root);
1362 const executableRealPath = yield* fileSystem.realPath(executablePath);
1363 const relative = path.relative(rootRealPath, executableRealPath);
1364 - if (relative.startsWith("..") || path.isAbsolute(relative)) {
1364 + if (relative === ".." || relative.startsWith(`..${path.sep}`) || path.isAbsolute(relative)) {
1365 return yield* new AcpRegistryError({
1366 reason: "archive_invalid",
1367 detail: "ACP Registry archive command resolves outside its installation directory.",