| ... | @@ -923,6 +923,18 @@ it.effect("discovers editors through the service API", () => | ... | @@ -923,6 +923,18 @@ it.effect("discovers editors through the service API", () => |
| 923 | ); | 923 | ); |
| 924 | | 924 | |
| 925 | for (const { platform, installPath, editor, args } of [ | 925 | for (const { platform, installPath, editor, args } of [ |
| | 926 | { |
| | 927 | platform: "darwin", |
| | 928 | installPath: "Applications/Antigravity IDE.app/Contents/Resources/app/bin/antigravity-ide", |
| | 929 | editor: "antigravity", |
| | 930 | args: ["--goto", "/workspace with spaces/file.ts:12:4"], |
| | 931 | }, |
| | 932 | { |
| | 933 | platform: "linux", |
| | 934 | installPath: ".local/bin/antigravity-ide", |
| | 935 | editor: "antigravity", |
| | 936 | args: ["--goto", "/workspace with spaces/file.ts:12:4"], |
| | 937 | }, |
| 926 | { | 938 | { |
| 927 | platform: "darwin", | 939 | platform: "darwin", |
| 928 | installPath: "Applications/Cursor.app/Contents/Resources/app/bin/code", | 940 | installPath: "Applications/Cursor.app/Contents/Resources/app/bin/code", |
| ... | @@ -1028,6 +1040,45 @@ for (const { platform, installPath, editor, args } of [ | ... | @@ -1028,6 +1040,45 @@ for (const { platform, installPath, editor, args } of [ |
| 1028 | ); | 1040 | ); |
| 1029 | } | 1041 | } |
| 1030 | | 1042 | |
| | 1043 | // `agy` is the standalone Antigravity CLI, which installs to ~/.local/bin on |
| | 1044 | // macOS and Linux and to its own bin folder on Windows. It is not the IDE. |
| | 1045 | for (const { platform, installPath, onPath } of [ |
| | 1046 | { platform: "darwin", installPath: ".local/bin/agy", onPath: true }, |
| | 1047 | { platform: "linux", installPath: ".local/bin/agy", onPath: false }, |
| | 1048 | { platform: "win32", installPath: "agy/bin/agy.cmd", onPath: true }, |
| | 1049 | ] as const) { |
| | 1050 | it.effect.skipIf(windowsHost && platform !== "win32")( |
| | 1051 | `does not report the agy CLI as the Antigravity IDE on ${platform}`, |
| | 1052 | () => |
| | 1053 | Effect.gen(function* () { |
| | 1054 | const fs = yield* FileSystem.FileSystem; |
| | 1055 | const path = yield* Path.Path; |
| | 1056 | const home = yield* fs.makeTempDirectoryScoped({ prefix: "t3-agy-cli-" }); |
| | 1057 | const executable = path.join(home, installPath); |
| | 1058 | yield* fs.makeDirectory(path.dirname(executable), { recursive: true }); |
| | 1059 | yield* fs.writeFileString(executable, "#!/bin/sh\n"); |
| | 1060 | yield* fs.chmod(executable, 0o755); |
| | 1061 | const editors = yield* Effect.gen(function* () { |
| | 1062 | const launcher = yield* ExternalLauncher.ExternalLauncher; |
| | 1063 | return yield* launcher.resolveAvailableEditors(); |
| | 1064 | }).pipe( |
| | 1065 | Effect.provide( |
| | 1066 | testLayer({ |
| | 1067 | platform, |
| | 1068 | env: { |
| | 1069 | HOME: home, |
| | 1070 | LOCALAPPDATA: home, |
| | 1071 | PATH: onPath ? path.dirname(executable) : path.join(home, "empty"), |
| | 1072 | PATHEXT: ".COM;.EXE;.BAT;.CMD", |
| | 1073 | }, |
| | 1074 | }), |
| | 1075 | ), |
| | 1076 | ); |
| | 1077 | assert.notInclude(editors, "antigravity"); |
| | 1078 | }).pipe(Effect.scoped, Effect.provide(NodeServices.layer)), |
| | 1079 | ); |
| | 1080 | } |
| | 1081 | |
| 1031 | it.effect.skipIf(windowsHost)("ignores unusable app bundles and keeps PATH launchers first", () => | 1082 | it.effect.skipIf(windowsHost)("ignores unusable app bundles and keeps PATH launchers first", () => |
| 1032 | Effect.gen(function* () { | 1083 | Effect.gen(function* () { |
| 1033 | const fs = yield* FileSystem.FileSystem; | 1084 | const fs = yield* FileSystem.FileSystem; |