@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.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +45 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -142,7 +142,7 @@ declare function getContextWindow(model: string | null): number;
|
|
|
142
142
|
*/
|
|
143
143
|
declare function tryGetContextWindow(model: string | null): number | undefined;
|
|
144
144
|
|
|
145
|
-
type AgentId = 'claude' | 'codex' | 'copilot' | 'coderabbit' | 'cursor' | 'aider' | 'gemini' | 'kimi' | 'opencode';
|
|
145
|
+
type AgentId = 'claude' | 'codex' | 'copilot' | 'coderabbit' | 'cursor' | 'aider' | 'gemini' | 'kimi' | 'opencode' | 'antigravity';
|
|
146
146
|
type AgentAuthKind = 'oauth_token' | 'api_key' | 'setup_token';
|
|
147
147
|
interface AgentAuth {
|
|
148
148
|
kind: AgentAuthKind;
|
|
@@ -266,7 +266,7 @@ declare const MANAGED_AGENT_ENV = "CODEAM_MANAGED_AGENT_ID";
|
|
|
266
266
|
* endpoints and the mobile/web surfaces speak. The internal `AgentId`
|
|
267
267
|
* (`'claude' | 'codex' | …`) is what the runtimes / provisioning key on.
|
|
268
268
|
*/
|
|
269
|
-
type LinkedAgentId = 'claude_code' | 'codex' | 'cursor' | 'aider' | 'coderabbit' | 'gemini' | 'kimi' | 'openrouter' | 'opencode' | typeof HOUSE_AGENT_ID | ManagedProviderId;
|
|
269
|
+
type LinkedAgentId = 'claude_code' | 'codex' | 'cursor' | 'aider' | 'coderabbit' | 'gemini' | 'kimi' | 'openrouter' | 'opencode' | 'antigravity' | typeof HOUSE_AGENT_ID | ManagedProviderId;
|
|
270
270
|
declare const LINKED_AGENT_IDS: readonly LinkedAgentId[];
|
|
271
271
|
declare function isLinkedAgentId(value: string): value is LinkedAgentId;
|
|
272
272
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -142,7 +142,7 @@ declare function getContextWindow(model: string | null): number;
|
|
|
142
142
|
*/
|
|
143
143
|
declare function tryGetContextWindow(model: string | null): number | undefined;
|
|
144
144
|
|
|
145
|
-
type AgentId = 'claude' | 'codex' | 'copilot' | 'coderabbit' | 'cursor' | 'aider' | 'gemini' | 'kimi' | 'opencode';
|
|
145
|
+
type AgentId = 'claude' | 'codex' | 'copilot' | 'coderabbit' | 'cursor' | 'aider' | 'gemini' | 'kimi' | 'opencode' | 'antigravity';
|
|
146
146
|
type AgentAuthKind = 'oauth_token' | 'api_key' | 'setup_token';
|
|
147
147
|
interface AgentAuth {
|
|
148
148
|
kind: AgentAuthKind;
|
|
@@ -266,7 +266,7 @@ declare const MANAGED_AGENT_ENV = "CODEAM_MANAGED_AGENT_ID";
|
|
|
266
266
|
* endpoints and the mobile/web surfaces speak. The internal `AgentId`
|
|
267
267
|
* (`'claude' | 'codex' | …`) is what the runtimes / provisioning key on.
|
|
268
268
|
*/
|
|
269
|
-
type LinkedAgentId = 'claude_code' | 'codex' | 'cursor' | 'aider' | 'coderabbit' | 'gemini' | 'kimi' | 'openrouter' | 'opencode' | typeof HOUSE_AGENT_ID | ManagedProviderId;
|
|
269
|
+
type LinkedAgentId = 'claude_code' | 'codex' | 'cursor' | 'aider' | 'coderabbit' | 'gemini' | 'kimi' | 'openrouter' | 'opencode' | 'antigravity' | typeof HOUSE_AGENT_ID | ManagedProviderId;
|
|
270
270
|
declare const LINKED_AGENT_IDS: readonly LinkedAgentId[];
|
|
271
271
|
declare function isLinkedAgentId(value: string): value is LinkedAgentId;
|
|
272
272
|
/**
|
package/dist/index.js
CHANGED
|
@@ -460,13 +460,11 @@ var AGENT_REGISTRY = {
|
|
|
460
460
|
// newest that same day. Three months of sending people through a bricked
|
|
461
461
|
// door — each one landing on `isGeminiIneligibleTier` at first use.
|
|
462
462
|
//
|
|
463
|
-
//
|
|
464
|
-
//
|
|
465
|
-
//
|
|
466
|
-
//
|
|
467
|
-
//
|
|
468
|
-
// path is ACP, so adopting it would mean shipping that risk. Revisit only
|
|
469
|
-
// when #31 ships an official mode.
|
|
463
|
+
// Antigravity CLI is its own agent now (`antigravity` below): official ACP
|
|
464
|
+
// (`agy acp`) shipped in agy 1.5.0 (2026-11-04), closing
|
|
465
|
+
// google-antigravity/antigravity-cli#31 — the reason we held off (only
|
|
466
|
+
// third-party adapters existed, which Google's FAQ called a ToS risk) is
|
|
467
|
+
// gone. Consumer-Google users belong there; Gemini CLI stays api_key only.
|
|
470
468
|
//
|
|
471
469
|
// Existing OAuth rows are NOT migrated: `supportedAuthMethods` gates the
|
|
472
470
|
// LINK call only, so the 46 stay readable and simply keep failing at the
|
|
@@ -504,6 +502,21 @@ var AGENT_REGISTRY = {
|
|
|
504
502
|
preferredAuthKind: "api_key",
|
|
505
503
|
// Native ACP server: `opencode acp` (stdio JSON-RPC).
|
|
506
504
|
acp: true
|
|
505
|
+
},
|
|
506
|
+
antigravity: {
|
|
507
|
+
id: "antigravity",
|
|
508
|
+
displayName: "Antigravity CLI",
|
|
509
|
+
binaryName: "agy",
|
|
510
|
+
enabled: true,
|
|
511
|
+
// Google's successor to Gemini CLI for consumer accounts (AI Pro / Ultra /
|
|
512
|
+
// free). `oauth_token` is the backend-minted blob (Antigravity's own OAuth
|
|
513
|
+
// client, redirect flow like Gemini's) written to
|
|
514
|
+
// ~/.gemini/antigravity-cli/antigravity-oauth-token; `api_key` is a Gemini
|
|
515
|
+
// API key (GEMINI_API_KEY + settings.json `modelProvider: "gemini"`).
|
|
516
|
+
supportedAuthKinds: ["oauth_token", "api_key"],
|
|
517
|
+
preferredAuthKind: "oauth_token",
|
|
518
|
+
// Native ACP server: `agy acp` (official since agy 1.5.0, 2026-11-04).
|
|
519
|
+
acp: true
|
|
507
520
|
}
|
|
508
521
|
};
|
|
509
522
|
function getEnabledAgents() {
|
|
@@ -553,6 +566,7 @@ var LINKED_AGENT_IDS = [
|
|
|
553
566
|
"kimi",
|
|
554
567
|
"openrouter",
|
|
555
568
|
"opencode",
|
|
569
|
+
"antigravity",
|
|
556
570
|
HOUSE_AGENT_ID,
|
|
557
571
|
...MANAGED_PROVIDER_IDS
|
|
558
572
|
];
|
|
@@ -575,6 +589,9 @@ var PUBLIC_TO_INTERNAL = {
|
|
|
575
589
|
// opencode is a real, distinct agent (its own binary + ACP server) — it does
|
|
576
590
|
// NOT map onto another runtime. Public id === internal id.
|
|
577
591
|
opencode: "opencode",
|
|
592
|
+
// Antigravity CLI (`agy`) is its own binary + native ACP server — public id
|
|
593
|
+
// === internal id, like opencode.
|
|
594
|
+
antigravity: "antigravity",
|
|
578
595
|
// OpenRouter runs Claude Code under the hood, pointed at OpenRouter's hosted
|
|
579
596
|
// "Anthropic Skin" (https://openrouter.ai/api — native Anthropic Messages
|
|
580
597
|
// protocol) with the user's vaulted `sk-or-…` key as ANTHROPIC_AUTH_TOKEN,
|
|
@@ -601,7 +618,8 @@ var INTERNAL_TO_PUBLIC = {
|
|
|
601
618
|
coderabbit: "coderabbit",
|
|
602
619
|
gemini: "gemini",
|
|
603
620
|
kimi: "kimi",
|
|
604
|
-
opencode: "opencode"
|
|
621
|
+
opencode: "opencode",
|
|
622
|
+
antigravity: "antigravity"
|
|
605
623
|
};
|
|
606
624
|
function isPublicToInternalKey(v) {
|
|
607
625
|
return Object.prototype.hasOwnProperty.call(PUBLIC_TO_INTERNAL, v);
|
|
@@ -681,6 +699,14 @@ if ! command -v opencode >/dev/null 2>&1; then
|
|
|
681
699
|
echo 'export PATH="$HOME/.opencode/bin:$PATH"' >> ~/.bashrc
|
|
682
700
|
export PATH="$HOME/.opencode/bin:$PATH"
|
|
683
701
|
fi`;
|
|
702
|
+
var ANTIGRAVITY = `
|
|
703
|
+
if ! command -v agy >/dev/null 2>&1; then
|
|
704
|
+
curl -fsSL https://antigravity.google/cli/install.sh | bash \\
|
|
705
|
+
|| { echo '[codeam:step] antigravity_install_retry' >&2; sleep 2; curl -fsSL https://antigravity.google/cli/install.sh | bash; } \\
|
|
706
|
+
|| { echo '[ERROR] Antigravity CLI install failed (antigravity.google/cli/install.sh)' >&2; exit 1; }
|
|
707
|
+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
|
708
|
+
export PATH="$HOME/.local/bin:$PATH"
|
|
709
|
+
fi`;
|
|
684
710
|
var AIDER = `
|
|
685
711
|
if ! command -v aider >/dev/null 2>&1; then
|
|
686
712
|
pip install --no-cache-dir --break-system-packages aider-chat \\
|
|
@@ -694,6 +720,7 @@ var INSTALL_SNIPPETS = Object.freeze({
|
|
|
694
720
|
kimi: KIMI,
|
|
695
721
|
cursor: CURSOR,
|
|
696
722
|
opencode: OPENCODE,
|
|
723
|
+
antigravity: ANTIGRAVITY,
|
|
697
724
|
aider: AIDER,
|
|
698
725
|
coderabbit: CODERABBIT
|
|
699
726
|
});
|
|
@@ -3400,8 +3427,10 @@ function pointPickerScript(opts) {
|
|
|
3400
3427
|
|
|
3401
3428
|
// Inside a React Native WebView the document is TOP-LEVEL (window.parent ===
|
|
3402
3429
|
// window), so the only way out is the bridge RN injects. It carries STRINGS.
|
|
3430
|
+
// Any mode may answer through it: the host app owns the WebView, there is no
|
|
3431
|
+
// third party to keep out \u2014 only the control API (the door below) needs
|
|
3432
|
+
// \`globalName\`, because a global turns the picker on with nobody's permission.
|
|
3403
3433
|
function rnBridge() {
|
|
3404
|
-
if (!GLOBAL) return null;
|
|
3405
3434
|
var rn = W.ReactNativeWebView;
|
|
3406
3435
|
return rn && typeof rn.postMessage === 'function' ? rn : null;
|
|
3407
3436
|
}
|
|
@@ -3412,13 +3441,17 @@ function pointPickerScript(opts) {
|
|
|
3412
3441
|
msg[FIELD] = CH;
|
|
3413
3442
|
msg.type = type;
|
|
3414
3443
|
if (extra) for (var k in extra) msg[k] = extra[k];
|
|
3444
|
+
// A parent window first (the feed framing the app; a host that installed
|
|
3445
|
+
// one); only a top-level document falls back to the React Native bridge
|
|
3446
|
+
// (2026-11-01: Remix's phone app got no \`on\` and no \`pick\` here).
|
|
3447
|
+
if (W.parent !== W) {
|
|
3448
|
+
try { W.parent.postMessage(msg, driver); } catch (e) {}
|
|
3449
|
+
return;
|
|
3450
|
+
}
|
|
3415
3451
|
var rn = rnBridge();
|
|
3416
3452
|
if (rn) {
|
|
3417
3453
|
try { rn.postMessage(JSON.stringify(msg)); } catch (e) {}
|
|
3418
|
-
return;
|
|
3419
3454
|
}
|
|
3420
|
-
if (W.parent === W) return;
|
|
3421
|
-
try { W.parent.postMessage(msg, driver); } catch (e) {}
|
|
3422
3455
|
}
|
|
3423
3456
|
|
|
3424
3457
|
function clip(s, max) { return s.length > max ? s.slice(0, max - 1) + '\\u2026' : s; }
|