The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 14:45 UTC
fix(acp-registry): a uv-installed agent launches its managed command, not a same-named one on PATH (#33836)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Ibrahim Elkamali committed
Nov 14, 2026 at 19:54 UTC
ff75365c7d0fd1df24649ac75719893bb8c33f31
2 files changed
+40
-2
packages/provider-acp-registry/src/server/AcpRegistrySupport.test.ts
+38
@@ -512,6 +512,44 @@ describe("AcpRegistrySupport", () => {
512
);
513
});
514
515
+ it.effect("launches the managed uv command over a PATH command named after the agent", () => {
516
+ const agent = makeAgent({
517
+ uvx: { package: "fast-agent-acp==0.10.1", args: ["--acp"] },
518
+ });
519
+ return Effect.gen(function* () {
520
+ const fileSystem = yield* FileSystem.FileSystem;
521
+ const path = yield* Path.Path;
522
+ const cacheDir = yield* fileSystem.makeTempDirectoryScoped({
523
+ prefix: "t3-acp-registry-uv-path-collision-",
524
+ });
525
+ const toolchain = yield* makeFakeUvToolchain(cacheDir);
526
+ const userBin = path.join(cacheDir, "user-bin");
527
+ const userCommand = path.join(userBin, "example-agent");
528
+ yield* fileSystem.makeDirectory(userBin, { recursive: true });
529
+ yield* fileSystem.writeFileString(userCommand, "#!/bin/sh\n");
530
+ yield* fileSystem.chmod(userCommand, 0o755);
531
+ const resolver = yield* AcpRegistrySupport.makeAcpRegistryCatalog({
532
+ cacheDir,
533
+ toolsDir: `${cacheDir}/tools`,
534
+ registryUrl,
535
+ });
536
+
537
+ const resolved = yield* resolver.resolve(settings(), "/workspace", {
538
+ ...toolchain.environment,
539
+ PATH: `${userBin}:${toolchain.environment.PATH}`,
540
+ });
541
+
542
+ expect(resolved.spawn.command).toBe(toolchain.executablePath);
543
+ }).pipe(
544
+ Effect.scoped,
545
+ Effect.provide(
546
+ layerResolver((request) =>
547
+ Effect.succeed(HttpClientResponse.fromWeb(request, new Response(makeRegistry(agent)))),
548
+ ),
549
+ ),
550
+ );
551
+ });
552
+
553
it.effect("honors an exact Windows PATH override when launching a global package", () => {
554
const agent = makeAgent({
555
uvx: { package: "fast-agent-acp==0.10.1", args: ["--acp"] },
packages/provider-acp-registry/src/server/AcpRegistrySupport.ts
+2
-2
@@ -1202,9 +1202,9 @@ export const makeAcpRegistryCatalog = Effect.fn("AcpRegistryCatalog.make")(funct
1202
timeout: PACKAGE_QUERY_TIMEOUT,
1203
truncatedOutputReason: "install_failed",
1204
}).pipe(Effect.flatMap((output) => parsePackageManagerPath(managerPath, output)));
1205
- const commandEnvironment = withPreferredPath(environment, binDirectory, platform);
1205
+ const managedBinEnvironment = { ...environment, PATH: binDirectory };
1206
const executablePath = packageCommandCandidates(agent, packageIdentity.name)
1207
- .map((candidate) => resolveExecutable(candidate, platform, commandEnvironment))
1207
+ .map((candidate) => resolveExecutable(candidate, platform, managedBinEnvironment))
1208
.find((candidate): candidate is string => candidate !== undefined);
1209
return executablePath === undefined
1210
? Option.none<AcpRegistryPackageInstallReceipt>()