Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (codex): publish the antigravity command alias so its card finds the agy runtime

[._.]/ Adam Eivy9fda36e39cc7
diff --git a/server/services/providerRuntimeInstaller.js b/server/services/providerRuntimeInstaller.js
index 0012e1e374..9c8105f9ad 100644
--- a/server/services/providerRuntimeInstaller.js
+++ b/server/services/providerRuntimeInstaller.js
@@ -123,6 +123,10 @@ const RUNTIME_ROWS = [
{
vendor: 'antigravity',
label: 'Antigravity CLI',
+ // `agy` is the canonical binary, but `isAntigravityCommand` also accepts a
+ // provider configured as `antigravity` — publish that spelling too so such a
+ // card still finds its runtime. Pinned by the alias test.
+ aliases: ['antigravity'],
// Antigravity ships a single compiled binary, not an npm package.
install: { kind: 'script', url: 'https://antigravity.google/cli/install.sh' },
docsUrl: 'https://antigravity.google/docs/cli/install',
@@ -148,12 +152,18 @@ const vendorCommand = (vendorId) => {
* card looks its runtime up straight from its `command` with no second mapping.
*/
export const PROVIDER_RUNTIMES = Object.freeze(RUNTIME_ROWS.map((row) => Object.freeze({
+ aliases: [],
...row,
id: vendorCommand(row.vendor),
command: vendorCommand(row.vendor),
})));
-const RUNTIMES_BY_ID = new Map(PROVIDER_RUNTIMES.map((runtime) => [runtime.id, runtime]));
+// Keyed by the canonical id AND by every accepted alias spelling of the same
+// binary, so a provider configured as `antigravity` resolves the `agy` row.
+const RUNTIMES_BY_ID = new Map(PROVIDER_RUNTIMES.flatMap((runtime) => [
+ [runtime.id, runtime],
+ ...runtime.aliases.map((alias) => [alias, runtime]),
+]));
// id → { at, status }
const statusCache = new Map();
@@ -215,14 +225,21 @@ async function probeRuntimeStatus(runtime, findCommand, probeCommand) {
export async function getProviderRuntimeStatus(id, { findCommand, probeCommand, fresh = false } = {}) {
const runtime = getProviderRuntime(id);
if (!runtime) return null;
- const cached = statusCache.get(id);
+ // Keyed by the canonical id, so an alias spelling shares the same entry
+ // instead of probing the same binary twice.
+ const cached = statusCache.get(runtime.id);
if (!fresh && cached && Date.now() - cached.at < STATUS_TTL_MS) return cached.status;
const status = await probeRuntimeStatus(runtime, findCommand || findCommandOnPath, probeCommand || commandExists);
- statusCache.set(id, { at: Date.now(), status });
+ statusCache.set(runtime.id, { at: Date.now(), status });
return status;
}
-/** Every runtime's status, keyed by id — one round trip for the Providers page. */
+/**
+ * Every runtime's status, keyed by id — one round trip for the Providers page.
+ * An aliased runtime appears under every accepted spelling of its command,
+ * sharing one status object: the page looks a card's runtime up by the command
+ * the provider is configured with, which may be an alias.
+ */
export async function getProviderRuntimeStatuses(deps = {}) {
// One PATH scan per distinct binary for the whole batch: five rows resolve
// `npm` and two resolve `curl`, and the resolver hits the filesystem.
@@ -230,7 +247,11 @@ export async function getProviderRuntimeStatuses(deps = {}) {
const statuses = await Promise.all(
PROVIDER_RUNTIMES.map((runtime) => getProviderRuntimeStatus(runtime.id, { ...deps, findCommand })),
);
- return Object.fromEntries(statuses.map((status) => [status.id, status]));
+ const byId = new Map(statuses.map((status) => [status.id, status]));
+ return Object.fromEntries(PROVIDER_RUNTIMES.flatMap((runtime) => {
+ const status = byId.get(runtime.id);
+ return [[runtime.id, status], ...runtime.aliases.map((alias) => [alias, status])];
+ }));
}
function memoizePerBatch(findCommand) {
diff --git a/server/services/providerRuntimeInstaller.test.js b/server/services/providerRuntimeInstaller.test.js
index 93223499d9..94b9a90b56 100644
--- a/server/services/providerRuntimeInstaller.test.js
+++ b/server/services/providerRuntimeInstaller.test.js
@@ -92,7 +92,8 @@ describe('provider runtime installer', () => {
const findCommand = vi.fn(async () => null);
const statuses = await getProviderRuntimeStatuses({ findCommand, probeCommand: async () => false });
- expect(Object.keys(statuses).sort()).toEqual(PROVIDER_RUNTIMES.map((runtime) => runtime.id).sort());
+ const published = PROVIDER_RUNTIMES.flatMap((runtime) => [runtime.id, ...runtime.aliases]);
+ expect(Object.keys(statuses).sort()).toEqual(published.sort());
expect(statuses.agy.installed).toBe(false);
// Five rows install through npm and two through curl — one PATH scan each.
expect(findCommand.mock.calls.filter(([command]) => command === 'npm')).toHaveLength(1);
@@ -152,6 +153,26 @@ describe('provider runtime installer', () => {
}));
});
+ // A provider may be configured with any command spelling its vendor accepts
+ // (`antigravity` as well as `agy`), and the card looks its runtime up by that
+ // command — so every alias the vendor matches must resolve the same row.
+ it('resolves an aliased command to its canonical runtime', async () => {
+ expect(PROVIDER_RUNTIMES.find((runtime) => runtime.id === 'agy').aliases).toContain('antigravity');
+ for (const runtime of PROVIDER_RUNTIMES) {
+ const vendor = PROVIDER_VENDORS.find((row) => row.inferredCommand === runtime.command);
+ for (const alias of runtime.aliases) {
+ expect(vendor.matchCommand(alias)).toBe(true);
+ expect(getProviderRuntime(alias)).toBe(runtime);
+ }
+ }
+
+ const statuses = await getProviderRuntimeStatuses({ findCommand: async () => null, probeCommand: async () => false });
+ // Same object under both spellings, and its id stays canonical so the
+ // install POST names the runtime the table knows.
+ expect(statuses.antigravity).toBe(statuses.agy);
+ expect(statuses.antigravity.id).toBe('agy');
+ });
+
// #3618's rule: a vendor is one row. A new coding-agent CLI must not land in
// the runner allowlist and argv builders while silently having no way to be
// installed from the Providers page.