Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

feat(antigravity): orient Gemini workers with the hive protocol via `agy -i`

Gulum1cf305a13a91
diff --git a/src/main/hive.ts b/src/main/hive.ts
index dcfe7a14..4e2df877 100644
--- a/src/main/hive.ts
+++ b/src/main/hive.ts
@@ -26,7 +26,7 @@ import { spawnSync } from 'node:child_process';
import { randomBytes, createHash } from 'node:crypto';
import type { AgentUsageSample } from './usage';
import { COMMAND_GROUPS } from '../shared/claudeCommands';
-import { isHiveAwareProvider, type AgentProvider } from '../shared/agentProvider';
+import { isHiveAwareProvider, providerPreset, type AgentProvider } from '../shared/agentProvider';
// ─── Types ──────────────────────────────────────────────────────────────────
@@ -288,11 +288,17 @@ export class HiveManager {
};
// Non-Claude providers (e.g. Antigravity's `agy`) don't understand Claude
- // Code's flags or hook protocol. They still get a hive workspace + the
- // shared AGENT_* env above, but no telemetry/prompt/settings injection —
- // and direct hive mail to them bounces to the god (router). This is what
- // makes the floor runnable without Claude installed at all.
+ // Code's flags or hook protocol — no telemetry, no `--settings` hooks, and
+ // direct hive mail to them bounces to the god (router). But where the CLI
+ // takes an INITIAL prompt (agy's `-i`), we still orient the session with the
+ // same hive identity+protocol — the closest thing to `--append-system-prompt`
+ // these CLIs offer (it's the first turn, then the session continues). This is
+ // what makes a Gemini worker hive-aware without Claude installed at all.
if (!isHiveAwareProvider(meta.provider)) {
+ const flag = providerPreset(meta.provider ?? 'claude').initialPromptFlag;
+ if (flag) {
+ return { args: [flag, this.injectedPrompt(meta, dir, root, opts.semanticMemory ?? false)], env };
+ }
return { args: [], env };
}
diff --git a/src/shared/agentProvider.ts b/src/shared/agentProvider.ts
index 8af13d82..18eb107e 100644
--- a/src/shared/agentProvider.ts
+++ b/src/shared/agentProvider.ts
@@ -27,6 +27,11 @@ export interface AgentProviderPreset {
* + hook `--settings`). Other CLIs don't — they spawn with the shared AGENT_*
* env only, and direct hive mail to them bounces to the god. */
hiveAware: boolean;
+ /** For non-hive-aware CLIs that still take an INITIAL prompt to orient the
+ * session (Antigravity's `agy -i "<prompt>"`), the flag to pass it under. The
+ * hive identity+protocol rides in as the first turn — the closest thing to
+ * Claude's `--append-system-prompt` these CLIs offer. undefined = no way in. */
+ initialPromptFlag?: string;
}
export const AGENT_PROVIDER_PRESETS: AgentProviderPreset[] = [
@@ -46,7 +51,8 @@ export const AGENT_PROVIDER_PRESETS: AgentProviderPreset[] = [
supportsModel: true,
modelFlag: '--model',
autoFlag: '--dangerously-skip-permissions',
- hiveAware: false
+ hiveAware: false,
+ initialPromptFlag: '-i' // agy --prompt-interactive: orient the session, then continue
},
{
id: 'custom',