@codeam/shared 2.76.43 → 2.76.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -326,13 +326,11 @@ var AGENT_REGISTRY = {
326
326
  // newest that same day. Three months of sending people through a bricked
327
327
  // door — each one landing on `isGeminiIneligibleTier` at first use.
328
328
  //
329
- // ⚠️ Antigravity CLI is NOT a drop-in replacement for us: no official ACP
330
- // mode (google-antigravity/antigravity-cli#31 open, 192 comments, zero
331
- // `acp` hits in the repo as of 2026-09-15), and every third-party ACP
332
- // adapter warns that driving `agy` that way matches what Google's FAQ calls
333
- // a ToS violation — risking the USER's Google account. Our whole Gemini
334
- // path is ACP, so adopting it would mean shipping that risk. Revisit only
335
- // when #31 ships an official mode.
329
+ // Antigravity CLI is its own agent now (`antigravity` below): official ACP
330
+ // (`agy acp`) shipped in agy 1.5.0 (2026-11-04), closing
331
+ // google-antigravity/antigravity-cli#31 — the reason we held off (only
332
+ // third-party adapters existed, which Google's FAQ called a ToS risk) is
333
+ // gone. Consumer-Google users belong there; Gemini CLI stays api_key only.
336
334
  //
337
335
  // Existing OAuth rows are NOT migrated: `supportedAuthMethods` gates the
338
336
  // LINK call only, so the 46 stay readable and simply keep failing at the
@@ -370,6 +368,21 @@ var AGENT_REGISTRY = {
370
368
  preferredAuthKind: "api_key",
371
369
  // Native ACP server: `opencode acp` (stdio JSON-RPC).
372
370
  acp: true
371
+ },
372
+ antigravity: {
373
+ id: "antigravity",
374
+ displayName: "Antigravity CLI",
375
+ binaryName: "agy",
376
+ enabled: true,
377
+ // Google's successor to Gemini CLI for consumer accounts (AI Pro / Ultra /
378
+ // free). `oauth_token` is the backend-minted blob (Antigravity's own OAuth
379
+ // client, redirect flow like Gemini's) written to
380
+ // ~/.gemini/antigravity-cli/antigravity-oauth-token; `api_key` is a Gemini
381
+ // API key (GEMINI_API_KEY + settings.json `modelProvider: "gemini"`).
382
+ supportedAuthKinds: ["oauth_token", "api_key"],
383
+ preferredAuthKind: "oauth_token",
384
+ // Native ACP server: `agy acp` (official since agy 1.5.0, 2026-11-04).
385
+ acp: true
373
386
  }
374
387
  };
375
388
  function getEnabledAgents() {
@@ -419,6 +432,7 @@ var LINKED_AGENT_IDS = [
419
432
  "kimi",
420
433
  "openrouter",
421
434
  "opencode",
435
+ "antigravity",
422
436
  HOUSE_AGENT_ID,
423
437
  ...MANAGED_PROVIDER_IDS
424
438
  ];
@@ -441,6 +455,9 @@ var PUBLIC_TO_INTERNAL = {
441
455
  // opencode is a real, distinct agent (its own binary + ACP server) — it does
442
456
  // NOT map onto another runtime. Public id === internal id.
443
457
  opencode: "opencode",
458
+ // Antigravity CLI (`agy`) is its own binary + native ACP server — public id
459
+ // === internal id, like opencode.
460
+ antigravity: "antigravity",
444
461
  // OpenRouter runs Claude Code under the hood, pointed at OpenRouter's hosted
445
462
  // "Anthropic Skin" (https://openrouter.ai/api — native Anthropic Messages
446
463
  // protocol) with the user's vaulted `sk-or-…` key as ANTHROPIC_AUTH_TOKEN,
@@ -467,7 +484,8 @@ var INTERNAL_TO_PUBLIC = {
467
484
  coderabbit: "coderabbit",
468
485
  gemini: "gemini",
469
486
  kimi: "kimi",
470
- opencode: "opencode"
487
+ opencode: "opencode",
488
+ antigravity: "antigravity"
471
489
  };
472
490
  function isPublicToInternalKey(v) {
473
491
  return Object.prototype.hasOwnProperty.call(PUBLIC_TO_INTERNAL, v);
@@ -547,6 +565,14 @@ if ! command -v opencode >/dev/null 2>&1; then
547
565
  echo 'export PATH="$HOME/.opencode/bin:$PATH"' >> ~/.bashrc
548
566
  export PATH="$HOME/.opencode/bin:$PATH"
549
567
  fi`;
568
+ var ANTIGRAVITY = `
569
+ if ! command -v agy >/dev/null 2>&1; then
570
+ curl -fsSL https://antigravity.google/cli/install.sh | bash \\
571
+ || { echo '[codeam:step] antigravity_install_retry' >&2; sleep 2; curl -fsSL https://antigravity.google/cli/install.sh | bash; } \\
572
+ || { echo '[ERROR] Antigravity CLI install failed (antigravity.google/cli/install.sh)' >&2; exit 1; }
573
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
574
+ export PATH="$HOME/.local/bin:$PATH"
575
+ fi`;
550
576
  var AIDER = `
551
577
  if ! command -v aider >/dev/null 2>&1; then
552
578
  pip install --no-cache-dir --break-system-packages aider-chat \\
@@ -560,6 +586,7 @@ var INSTALL_SNIPPETS = Object.freeze({
560
586
  kimi: KIMI,
561
587
  cursor: CURSOR,
562
588
  opencode: OPENCODE,
589
+ antigravity: ANTIGRAVITY,
563
590
  aider: AIDER,
564
591
  coderabbit: CODERABBIT
565
592
  });
@@ -3266,8 +3293,10 @@ function pointPickerScript(opts) {
3266
3293
 
3267
3294
  // Inside a React Native WebView the document is TOP-LEVEL (window.parent ===
3268
3295
  // window), so the only way out is the bridge RN injects. It carries STRINGS.
3296
+ // Any mode may answer through it: the host app owns the WebView, there is no
3297
+ // third party to keep out \u2014 only the control API (the door below) needs
3298
+ // \`globalName\`, because a global turns the picker on with nobody's permission.
3269
3299
  function rnBridge() {
3270
- if (!GLOBAL) return null;
3271
3300
  var rn = W.ReactNativeWebView;
3272
3301
  return rn && typeof rn.postMessage === 'function' ? rn : null;
3273
3302
  }
@@ -3278,13 +3307,17 @@ function pointPickerScript(opts) {
3278
3307
  msg[FIELD] = CH;
3279
3308
  msg.type = type;
3280
3309
  if (extra) for (var k in extra) msg[k] = extra[k];
3310
+ // A parent window first (the feed framing the app; a host that installed
3311
+ // one); only a top-level document falls back to the React Native bridge
3312
+ // (2026-11-01: Remix's phone app got no \`on\` and no \`pick\` here).
3313
+ if (W.parent !== W) {
3314
+ try { W.parent.postMessage(msg, driver); } catch (e) {}
3315
+ return;
3316
+ }
3281
3317
  var rn = rnBridge();
3282
3318
  if (rn) {
3283
3319
  try { rn.postMessage(JSON.stringify(msg)); } catch (e) {}
3284
- return;
3285
3320
  }
3286
- if (W.parent === W) return;
3287
- try { W.parent.postMessage(msg, driver); } catch (e) {}
3288
3321
  }
3289
3322
 
3290
3323
  function clip(s, max) { return s.length > max ? s.slice(0, max - 1) + '\\u2026' : s; }