@cortexkit/opencode-antigravity-auth 3.1.9 → 3.1.10

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.
Files changed (37) hide show
  1. package/README.md +4 -0
  2. package/dist/cli.js +145 -102
  3. package/dist/cli.js.map +3 -3
  4. package/dist/cli.meta.json +19 -14
  5. package/dist/index.js +320 -230
  6. package/dist/index.js.map +3 -3
  7. package/dist/index.meta.json +22 -17
  8. package/dist/server.js +306 -216
  9. package/dist/server.js.map +3 -3
  10. package/dist/server.meta.json +1 -1
  11. package/dist/src/common-auth-embedded/claustrum/custody.d.ts +16 -5
  12. package/dist/src/common-auth-embedded/claustrum/custody.js +31 -14
  13. package/dist/src/common-auth-embedded/routing-accessor/index.d.ts +6 -1
  14. package/dist/src/common-auth-embedded/setup/process-fence.js +20 -3
  15. package/dist/src/common-auth-embedded/source-output.json +20 -20
  16. package/dist/src/plugin/__fixtures__/release-model-ids.d.ts.map +1 -1
  17. package/dist/src/plugin/__fixtures__/release-model-ids.js +1 -0
  18. package/dist/src/plugin/__fixtures__/release-model-ids.js.map +1 -1
  19. package/dist/src/plugin/__fixtures__/verified-store.js +2 -2
  20. package/dist/src/plugin/config/models.d.ts +1 -1
  21. package/dist/src/plugin/config/models.d.ts.map +1 -1
  22. package/dist/src/plugin/config/models.js +10 -5
  23. package/dist/src/plugin/config/models.js.map +1 -1
  24. package/dist/src/plugin/request.js +7 -7
  25. package/dist/src/plugin/request.js.map +1 -1
  26. package/dist/tui-build-map.json +1 -1
  27. package/dist/tui-ga-build-map.json +1 -1
  28. package/dist/types/src/common-auth-embedded/claustrum/custody.d.ts +16 -5
  29. package/dist/types/src/common-auth-embedded/routing-accessor/index.d.ts +6 -1
  30. package/dist/types/src/plugin/config/models.d.ts +1 -1
  31. package/dist/types/src/plugin/config/models.d.ts.map +1 -1
  32. package/package.json +2 -2
  33. package/src/common-auth-embedded/claustrum/custody.d.ts +16 -5
  34. package/src/common-auth-embedded/claustrum/custody.js +31 -14
  35. package/src/common-auth-embedded/routing-accessor/index.d.ts +6 -1
  36. package/src/common-auth-embedded/setup/process-fence.js +20 -3
  37. package/src/common-auth-embedded/source-output.json +20 -20
@@ -1,13 +1,20 @@
1
- import { type ClaustrumClient, type ClaustrumReporterSource, type EnrollmentTokenFile } from '@cortexkit/claustrum-client';
1
+ import { type ClaustrumClient, type ClaustrumReporterSource, type EnrollmentTokenFile, type ScopedInventoryRow } from '@cortexkit/claustrum-client';
2
2
  import { type ClaustrumLogger } from './errors.js';
3
3
  import type { InsulaUsageTransport } from './insula.js';
4
4
  import { type ClaustrumUsageReading, type ClaustrumUsageReportState, type ScopedUsageSource } from './usage.js';
5
5
  import { type ScopedWatchSource, type WatchMode } from './watch.js';
6
+ type ScopedRow = Omit<ScopedInventoryRow, 'authMethod'> & {
7
+ readonly authMethod?: string;
8
+ };
9
+ type ScopedInventory = Omit<Awaited<ReturnType<ClaustrumClient['listScoped']>>, 'rows'> & {
10
+ readonly rows: readonly ScopedRow[];
11
+ };
6
12
  /**
7
13
  * claustrum-client adds watchScoped in 0.12.0 and reportUsageScoped in 0.14.0.
8
14
  * Older clients keep polling and simply do not send reply quota readings.
9
15
  */
10
- export type ClaustrumScopedClient = Pick<ClaustrumClient, 'listScoped' | 'getScoped' | 'reportAuthFailureScoped' | 'close'> & {
16
+ export type ClaustrumScopedClient = Pick<ClaustrumClient, 'getScoped' | 'reportAuthFailureScoped' | 'close'> & {
17
+ listScoped(enrollmentToken?: string): Promise<ScopedInventory>;
11
18
  insula?: InsulaUsageTransport;
12
19
  } & ScopedWatchSource & ScopedUsageSource;
13
20
  /** The two credential types a plugin's family can hold; routing differs by type. */
@@ -16,7 +23,8 @@ export type VaultCredentialType = 'oauth' | 'api_key';
16
23
  * Which vault rows belong to this plugin. `refreshAdapter` classifies an OAuth
17
24
  * row by the protocol it speaks; `category` is the grant that authorizes this
18
25
  * consumer to read it. Static API keys carry no refresh adapter, so they are
19
- * admitted only when `apiKeys` is set and only by category.
26
+ * admitted only when `apiKeys` is set. If a row declares an auth method, it
27
+ * must agree with the credential type.
20
28
  */
21
29
  export interface ClaustrumFamily {
22
30
  refreshAdapter: string;
@@ -111,8 +119,10 @@ export interface VaultInventory {
111
119
  readonly credentials: readonly VaultCredential[];
112
120
  readonly skipped: readonly SkippedVaultRecord[];
113
121
  /**
114
- * Classifying families only: declared policy codes or the fixed library codes
115
- * `unknown-auth-method`, `unmapped` and `unclassified`, never classifier errors.
122
+ * Refused rows and their codes, never classifier errors. Category families
123
+ * omit this field if no rows were refused and use only `unknown-auth-method`.
124
+ * Classifying families can also use declared policy codes, `unmapped` and
125
+ * `unclassified`.
116
126
  */
117
127
  readonly refused?: readonly {
118
128
  credentialId?: string;
@@ -364,3 +374,4 @@ export declare class ClaustrumScopedCustody {
364
374
  /** Stop accepting work; give token reads and reply reports one shared 2 s drain. */
365
375
  dispose(onTimeout?: (pendingOperations: number) => void): Promise<void>;
366
376
  }
377
+ export {};
@@ -145,22 +145,38 @@ function credentialTypeOf(row, family) {
145
145
  }
146
146
  return { kind: 'refused', code: 'unclassified' };
147
147
  }
148
- if (row.credentialType !== 'oauth' && row.credentialType !== 'api_key')
148
+ const type = row.credentialType;
149
+ if (type === 'oauth') {
150
+ if (row.refreshAdapter !== family.refreshAdapter)
151
+ return notMine;
152
+ }
153
+ else if (type === 'api_key') {
154
+ if (!family.apiKeys || row.refreshAdapter !== undefined)
155
+ return notMine;
156
+ }
157
+ else {
149
158
  return notMine;
150
- if (row.credentialType === 'oauth')
151
- return row.refreshAdapter === family.refreshAdapter
152
- ? { kind: 'mine', type: 'oauth' }
153
- : notMine;
154
- if (row.credentialType === 'api_key' && family.apiKeys)
155
- return row.refreshAdapter === undefined
156
- ? { kind: 'mine', type: 'api_key' }
157
- : notMine;
158
- return notMine;
159
+ }
160
+ const { authMethod } = rowFactsOf(row, { includeProviderIds: false });
161
+ // Older vaults omit the method. If present, it must match the serving type.
162
+ if (authMethod !== undefined) {
163
+ const matchesType = type === 'oauth'
164
+ ? authMethod === 'chatgpt' ||
165
+ authMethod === 'antigravity' ||
166
+ authMethod === 'oauth'
167
+ : authMethod === 'apikey';
168
+ if (!matchesType)
169
+ return { kind: 'refused', code: 'unknown-auth-method' };
170
+ }
171
+ return { kind: 'mine', type };
159
172
  }
160
173
  /** Structural access keeps the public facts independent of client declarations. */
161
- function rowFactsOf(row) {
174
+ function rowFactsOf(row, { includeProviderIds = true } = {}) {
162
175
  const metadata = row;
163
- return { providerIds: metadata.providerIds, authMethod: metadata.authMethod };
176
+ return {
177
+ providerIds: includeProviderIds ? metadata.providerIds : undefined,
178
+ authMethod: metadata.authMethod,
179
+ };
164
180
  }
165
181
  /**
166
182
  * The grants named in the vault's list reply, or undefined when it names none.
@@ -513,14 +529,15 @@ export class ClaustrumScopedCustody {
513
529
  for (const record of skipped)
514
530
  this.#logger.warn('skipped malformed vault record', record);
515
531
  const grantReach = grantReachOf(inventory);
532
+ const classifying = 'classify' in this.#family;
516
533
  return {
517
534
  view: inventory.view,
518
535
  credentials: Object.freeze(credentials),
519
536
  skipped: Object.freeze(skipped),
520
- ...('classify' in this.#family && {
537
+ ...((classifying || refused.length > 0) && {
521
538
  refused: Object.freeze(refused),
522
- notMine,
523
539
  }),
540
+ ...(classifying && { notMine }),
524
541
  ...(grantReach && { grantReach }),
525
542
  };
526
543
  }
@@ -37,7 +37,12 @@ export type AskRoutingInput<Candidate extends RoutingCandidate = RoutingCandidat
37
37
  sessionId: string;
38
38
  provider: string;
39
39
  modelId: string;
40
- /** Only routes eligible under the vault and the user's configured rules. */
40
+ /**
41
+ * The routable set: routes the vault allows, minus any the user's own rules
42
+ * exclude. It is not the account the plugin's local selection would choose,
43
+ * so it can include routes that selection would skip for model or quota
44
+ * reasons; routing picks among them.
45
+ */
41
46
  candidates: readonly Candidate[];
42
47
  /** Defaults to 1500 ms, above routing's normal tail; clamped to 1–2000 ms. */
43
48
  deadlineMs?: number;
@@ -1,7 +1,9 @@
1
1
  import { statSync } from 'node:fs';
2
2
  import { win32 } from 'node:path';
3
+ import { createLogger } from '../logger/index.js';
3
4
  import { defaultCommandRunner } from './command-runner.js';
4
5
  const WINDOWS_CIM_TIMEOUT_MS = 45_000;
6
+ const log = createLogger('setup-process-fence');
5
7
  // Native Windows PowerShell 5.1 on ARM took 22–44 s per process query, with
6
8
  // one cold CIM timeout at 45.8 s; pwsh took less than a second. See
7
9
  // .cortexkit/internal-docs/investigations/windows-arm-process-fence/report.md.
@@ -207,7 +209,7 @@ export async function listSetupProcesses(runner = defaultCommandRunner, options
207
209
  options.onStep?.({ ...inspection });
208
210
  }
209
211
  };
210
- const inspectCim = (args) => {
212
+ const inspectCim = async (args) => {
211
213
  const pwsh = win32.resolve(windowsEnv(env, 'ProgramFiles') ?? 'C:\\Program Files', 'PowerShell', '7', 'pwsh.exe');
212
214
  const program = (options.isFile ?? isFile)(pwsh) ? 'pwsh' : 'powershell';
213
215
  const arm64 = (windowsEnv(env, 'PROCESSOR_ARCHITEW6432') ??
@@ -215,9 +217,24 @@ export async function listSetupProcesses(runner = defaultCommandRunner, options
215
217
  const slow = program === 'powershell' && arm64;
216
218
  if (slow)
217
219
  options.onProgress?.('Checking that OpenCode and Pi are not running. Without PowerShell 7 this can take up to a minute on Windows ARM; installing PowerShell 7 makes it fast.');
218
- return inspect('CIM', program === 'pwsh'
220
+ const file = program === 'pwsh'
219
221
  ? pwsh
220
- : win32.resolve(system32, 'WindowsPowerShell', 'v1.0', 'powershell.exe'), args, slow ? WINDOWS_ARM_POWERSHELL_TIMEOUT_MS : WINDOWS_CIM_TIMEOUT_MS, program);
222
+ : win32.resolve(system32, 'WindowsPowerShell', 'v1.0', 'powershell.exe');
223
+ const timeoutMs = slow
224
+ ? WINDOWS_ARM_POWERSHELL_TIMEOUT_MS
225
+ : WINDOWS_CIM_TIMEOUT_MS;
226
+ const started = performance.now();
227
+ const result = await inspect('CIM', file, args, timeoutMs, program);
228
+ const remaining = Math.floor(timeoutMs - (performance.now() - started));
229
+ if ((result.exitCode === 3221225477 || result.exitCode === -1073741819) &&
230
+ !result.timedOut &&
231
+ !result.signal &&
232
+ !result.spawnError &&
233
+ remaining > 0) {
234
+ log.warn('Windows process query crashed with an access violation; retrying once');
235
+ return inspect('CIM', file, args, remaining, program);
236
+ }
237
+ return result;
221
238
  };
222
239
  try {
223
240
  if (windows && options.hostImagesOnly) {
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "package": "@cortexkit/common-auth",
4
- "version": "0.55.0",
4
+ "version": "0.55.1",
5
5
  "artifactStatus": "published",
6
- "archiveBytes": 502568,
6
+ "archiveBytes": 503150,
7
7
  "publicRoots": {
8
8
  "./rpc": {
9
9
  "types": "./dist/rpc/index.d.ts",
@@ -74,16 +74,16 @@
74
74
  "import": "./src/quota-sidebar/index.tsx"
75
75
  }
76
76
  },
77
- "input": "tools/common-auth-build/inputs/cortexkit-common-auth-0.55.0.tgz",
78
- "tarballSha256": "b629e10e9a39c5b1e6dc7576c2d5814a23a5bbb2dad8d6c1ccddb759c14d200c",
79
- "sri": "sha512-EScwmEDdxSdW/z+6n1v630bsTdAUSQYBuG4l16yziRqptG4MhjCAoH6aNelSy/I3hIJ2j6bV3IcqteoGWBLpSg==",
80
- "shasum": "8a5d3a07ec72662120305388d051c0bdcee416f4",
77
+ "input": "tools/common-auth-build/inputs/cortexkit-common-auth-0.55.1.tgz",
78
+ "tarballSha256": "80a78298cecc98c5b3b7eb3534e2eb77353d582d997962efe9df27a79ef12589",
79
+ "sri": "sha512-koCwml7Kbf2u6fIIaNmHbDOp2B15hGQ/9kZUB3VSYlBtvyp9ldDUJU1yVGUmin5gzwTzAF9c7g/OWPlWNqgMPw==",
80
+ "shasum": "703dd80358754aa4c3d1b9d6a0d3b9d150860daa",
81
81
  "canonicalFiles": 257,
82
- "canonicalBytes": 1522655,
82
+ "canonicalBytes": 1524660,
83
83
  "generator": {
84
84
  "path": "packages/opencode/scripts/embed-common-auth.ts",
85
85
  "version": 4,
86
- "sha256": "d4f9c099ec2dd6a53cd0b7a35e5571be94e24176c7e01347e4ea20b92eed13fd"
86
+ "sha256": "53208174ea6d4a497b8ea378bcb8712971742272d2fd766ea4617866dea60f4b"
87
87
  },
88
88
  "files": [
89
89
  {
@@ -281,17 +281,17 @@
281
281
  {
282
282
  "source": "package/dist/claustrum/custody.d.ts",
283
283
  "output": "claustrum/custody.d.ts",
284
- "bytes": 18127,
285
- "sourceSha256": "8c4cb2f52551ae36a32c4e68201767df0d19ba396302ed6c2d723d0e066166f6",
286
- "outputSha256": "8c4cb2f52551ae36a32c4e68201767df0d19ba396302ed6c2d723d0e066166f6",
284
+ "bytes": 18601,
285
+ "sourceSha256": "9c34f311ef87563256138b5aa070216d9dd027c6ddf4110aba630ba14157bc16",
286
+ "outputSha256": "9c34f311ef87563256138b5aa070216d9dd027c6ddf4110aba630ba14157bc16",
287
287
  "transform": "verbatim"
288
288
  },
289
289
  {
290
290
  "source": "package/dist/claustrum/custody.js",
291
291
  "output": "claustrum/custody.js",
292
- "bytes": 43686,
293
- "sourceSha256": "174adfdaa909149453a34666fdf656aff90c7357e0000338c5a0a2a29d7c1e90",
294
- "outputSha256": "174adfdaa909149453a34666fdf656aff90c7357e0000338c5a0a2a29d7c1e90",
292
+ "bytes": 44266,
293
+ "sourceSha256": "72d08a16f7fb27c26813501b0e89cddfdf640b9aeac8b89e9c7f9c92663db59c",
294
+ "outputSha256": "72d08a16f7fb27c26813501b0e89cddfdf640b9aeac8b89e9c7f9c92663db59c",
295
295
  "transform": "verbatim"
296
296
  },
297
297
  {
@@ -1697,9 +1697,9 @@
1697
1697
  {
1698
1698
  "source": "package/dist/setup/process-fence.js",
1699
1699
  "output": "setup/process-fence.js",
1700
- "bytes": 15880,
1701
- "sourceSha256": "1d7ee431c9b63aec37e1868df53f0f9c776ccd45d7935282493d1f1d3d6c6127",
1702
- "outputSha256": "1d7ee431c9b63aec37e1868df53f0f9c776ccd45d7935282493d1f1d3d6c6127",
1700
+ "bytes": 16615,
1701
+ "sourceSha256": "008c119bd1cbac550370933093c89c0c8020010239b71d9407dacbb8d6125cd7",
1702
+ "outputSha256": "008c119bd1cbac550370933093c89c0c8020010239b71d9407dacbb8d6125cd7",
1703
1703
  "transform": "verbatim"
1704
1704
  },
1705
1705
  {
@@ -2129,9 +2129,9 @@
2129
2129
  {
2130
2130
  "source": "package/dist/routing-accessor/index.d.ts",
2131
2131
  "output": "routing-accessor/index.d.ts",
2132
- "bytes": 10161,
2133
- "sourceSha256": "9a53d387aea7a3423225372bd8a61000838e1c7bb5818c93a32455f2037c315f",
2134
- "outputSha256": "9a53d387aea7a3423225372bd8a61000838e1c7bb5818c93a32455f2037c315f",
2132
+ "bytes": 10377,
2133
+ "sourceSha256": "9273612fe071bfdf502d38cc07f5eeca8ecc60d082fa5f578788c7e856a1b15e",
2134
+ "outputSha256": "9273612fe071bfdf502d38cc07f5eeca8ecc60d082fa5f578788c7e856a1b15e",
2135
2135
  "transform": "verbatim"
2136
2136
  },
2137
2137
  {
@@ -1 +1 @@
1
- {"version":3,"file":"release-model-ids.d.ts","sourceRoot":"","sources":["../../../../src/plugin/__fixtures__/release-model-ids.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,iBAAiB,UAS7B,CAAA"}
1
+ {"version":3,"file":"release-model-ids.d.ts","sourceRoot":"","sources":["../../../../src/plugin/__fixtures__/release-model-ids.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,iBAAiB,UAU7B,CAAA"}
@@ -7,6 +7,7 @@ export const RELEASE_MODEL_IDS = [
7
7
  'antigravity-gemini-4-argon',
8
8
  'antigravity-gemini-4-carbon',
9
9
  'antigravity-gemini-4-hydrogen',
10
+ 'antigravity-gemini-4-neon',
10
11
  'antigravity-gpt-oss-120b-medium',
11
12
  ];
12
13
  //# sourceMappingURL=release-model-ids.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"release-model-ids.js","sourceRoot":"","sources":["../../../../src/plugin/__fixtures__/release-model-ids.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,6BAA6B;IAC7B,+BAA+B;IAC/B,oCAAoC;IACpC,8BAA8B;IAC9B,4BAA4B;IAC5B,6BAA6B;IAC7B,+BAA+B;IAC/B,iCAAiC;CAClC,CAAA"}
1
+ {"version":3,"file":"release-model-ids.js","sourceRoot":"","sources":["../../../../src/plugin/__fixtures__/release-model-ids.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,6BAA6B;IAC7B,+BAA+B;IAC/B,oCAAoC;IACpC,8BAA8B;IAC9B,4BAA4B;IAC5B,6BAA6B;IAC7B,+BAA+B;IAC/B,2BAA2B;IAC3B,iCAAiC;CAClC,CAAA"}
@@ -4,8 +4,8 @@ import { dirname, join } from 'node:path';
4
4
  import { loadCommonAuthStoreModules } from '@cortexkit/antigravity-auth-core';
5
5
  const PIN = {
6
6
  package: '@cortexkit/common-auth',
7
- version: '0.55.0',
8
- tarballSha256: 'b629e10e9a39c5b1e6dc7576c2d5814a23a5bbb2dad8d6c1ccddb759c14d200c',
7
+ version: '0.55.1',
8
+ tarballSha256: '80a78298cecc98c5b3b7eb3534e2eb77353d582d997962efe9df27a79ef12589',
9
9
  };
10
10
  async function filesBelow(root, dir) {
11
11
  const out = [];
@@ -3,7 +3,7 @@ export type { ModelLimit, ModelModalities, ModelModality, ModelThinkingConfig, M
3
3
  export { getAntigravityOpencodeModelIds, getPublicModelDefinitions, OPENCODE_MODEL_DEFINITIONS, } from '../model-registry.js';
4
4
  /**
5
5
  * The model catalog as OpenCode 1 offers it: the shared registry, except that
6
- * Hydrogen has no xhigh. OpenCode 1's bundled @ai-sdk/google accepts only
6
+ * Hydrogen and Neon have no xhigh. OpenCode 1's bundled @ai-sdk/google accepts only
7
7
  * minimal/low/medium/high for thinkingLevel, so an xhigh choice would never
8
8
  * reach the plugin and would silently run as high. Both the plugin's config
9
9
  * hook and the CLI's config writer use this list.
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../src/plugin/config/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,mBAAmB,CAAA;AAE1B,YAAY,EACV,UAAU,EACV,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAA;AAE1B;;;;;;GAMG;AACH,wBAAgB,4BAA4B,IAAI,wBAAwB,CASvE"}
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../src/plugin/config/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,mBAAmB,CAAA;AAE1B,YAAY,EACV,UAAU,EACV,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,YAAY,EACZ,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAA;AAE1B;;;;;;GAMG;AACH,wBAAgB,4BAA4B,IAAI,wBAAwB,CAavE"}
@@ -2,18 +2,23 @@ import { OPENCODE_MODEL_DEFINITIONS, } from '../model-registry';
2
2
  export { getAntigravityOpencodeModelIds, getPublicModelDefinitions, OPENCODE_MODEL_DEFINITIONS, } from '../model-registry';
3
3
  /**
4
4
  * The model catalog as OpenCode 1 offers it: the shared registry, except that
5
- * Hydrogen has no xhigh. OpenCode 1's bundled @ai-sdk/google accepts only
5
+ * Hydrogen and Neon have no xhigh. OpenCode 1's bundled @ai-sdk/google accepts only
6
6
  * minimal/low/medium/high for thinkingLevel, so an xhigh choice would never
7
7
  * reach the plugin and would silently run as high. Both the plugin's config
8
8
  * hook and the CLI's config writer use this list.
9
9
  */
10
10
  export function getOpencode1ModelDefinitions() {
11
11
  const models = { ...OPENCODE_MODEL_DEFINITIONS };
12
- const hydrogen = models['antigravity-gemini-4-hydrogen'];
13
- if (hydrogen) {
14
- const variants = { ...hydrogen.variants };
12
+ for (const id of [
13
+ 'antigravity-gemini-4-hydrogen',
14
+ 'antigravity-gemini-4-neon',
15
+ ]) {
16
+ const model = models[id];
17
+ if (!model)
18
+ continue;
19
+ const variants = { ...model.variants };
15
20
  delete variants.xhigh;
16
- models[hydrogen.id] = { ...hydrogen, variants };
21
+ models[id] = { ...model, variants };
17
22
  }
18
23
  return models;
19
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/plugin/config/models.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,GAE3B,MAAM,mBAAmB,CAAA;AAY1B,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAA;AAE1B;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B;IAC1C,MAAM,MAAM,GAAG,EAAE,GAAG,0BAA0B,EAAE,CAAA;IAChD,MAAM,QAAQ,GAAG,MAAM,CAAC,+BAA+B,CAAC,CAAA;IACxD,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,QAAQ,GAAG,EAAE,GAAG,QAAQ,CAAC,QAAQ,EAAE,CAAA;QACzC,OAAO,QAAQ,CAAC,KAAK,CAAA;QACrB,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,QAAQ,EAAE,QAAQ,EAAE,CAAA;IACjD,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC"}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/plugin/config/models.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,GAE3B,MAAM,mBAAmB,CAAA;AAY1B,OAAO,EACL,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAA;AAE1B;;;;;;GAMG;AACH,MAAM,UAAU,4BAA4B;IAC1C,MAAM,MAAM,GAAG,EAAE,GAAG,0BAA0B,EAAE,CAAA;IAChD,KAAK,MAAM,EAAE,IAAI;QACf,+BAA+B;QAC/B,2BAA2B;KAC5B,EAAE,CAAC;QACF,MAAM,KAAK,GAAG,MAAM,CAAC,EAAE,CAAC,CAAA;QACxB,IAAI,CAAC,KAAK;YAAE,SAAQ;QACpB,MAAM,QAAQ,GAAG,EAAE,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAA;QACtC,OAAO,QAAQ,CAAC,KAAK,CAAA;QACrB,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,CAAA;IACrC,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import crypto from 'node:crypto';
2
- import { applyAgyNativeGenerationConfig, getAgyNativeModel, isGeminiArgonModel, isGeminiCarbonModel, isGeminiHydrogenModel, isRetiredAgyModel, markUpstreamFailure, maskSensitiveIdentifier, redactCredentialError, redactCredentialResponse, redactCredentialText, redactProjectIdText, rewriteSystemInstruction, } from '@cortexkit/antigravity-auth-core';
2
+ import { applyAgyNativeGenerationConfig, getAgyNativeModel, isGeminiArgonModel, isGeminiCarbonModel, isRetiredAgyModel, markUpstreamFailure, maskSensitiveIdentifier, redactCredentialError, redactCredentialResponse, redactCredentialText, redactProjectIdText, rewriteSystemInstruction, supportsGeminiXHigh, } from '@cortexkit/antigravity-auth-core';
3
3
  import { ANTIGRAVITY_DEFAULT_PROJECT_ID, ANTIGRAVITY_ENDPOINT, CLAUDE_DESCRIPTION_PROMPT, CLAUDE_TOOL_SYSTEM_INSTRUCTION, EMPTY_SCHEMA_PLACEHOLDER_DESCRIPTION, EMPTY_SCHEMA_PLACEHOLDER_NAME, getRandomizedHeaders, SKIP_THOUGHT_SIGNATURE, } from '../constants';
4
4
  import { buildAgyAgentRequestMetadata, createAgyRequestSessionContext, orderAgyRequestPayloadInPlace, } from './agy-request-metadata';
5
5
  import { cacheSignature, getCachedSignature, } from './cache';
@@ -1103,12 +1103,12 @@ function prepareAntigravityRequestIn(wire, input, init, accessToken, projectId,
1103
1103
  }
1104
1104
  const [, rawModel = '', rawAction = ''] = match;
1105
1105
  const requestedModel = rawModel;
1106
- // Apply the selected Gemini 4 Hydrogen effort before shaping either body format.
1107
- const hydrogenTier = isGeminiHydrogenModel(rawModel)
1106
+ // Apply the selected Hydrogen or Neon effort before shaping either body format.
1107
+ const geminiTier = supportsGeminiXHigh(rawModel)
1108
1108
  ? options?.variant?.thinkingLevel
1109
1109
  : undefined;
1110
- const resolved = resolveAntigravityModel(hydrogenTier
1111
- ? `${rawModel.replace(/-(low|medium|high|xhigh)$/i, '')}-${hydrogenTier}`
1110
+ const resolved = resolveAntigravityModel(geminiTier
1111
+ ? `${rawModel.replace(/-(low|medium|high|xhigh)$/i, '')}-${geminiTier}`
1112
1112
  : rawModel);
1113
1113
  let effectiveModel = resolved.actualModel;
1114
1114
  const streaming = rawAction === STREAM_ACTION;
@@ -1281,13 +1281,13 @@ function prepareAntigravityRequestIn(wire, input, init, accessToken, projectId,
1281
1281
  (isGemini3 ||
1282
1282
  isGeminiArgonModel(effectiveModel) ||
1283
1283
  isGeminiCarbonModel(effectiveModel) ||
1284
- isGeminiHydrogenModel(effectiveModel) ||
1284
+ supportsGeminiXHigh(effectiveModel) ||
1285
1285
  getAgyNativeModel(effectiveModel)?.supportsAdaptiveThinking)) {
1286
1286
  // Host effort variants select the corresponding native wire route.
1287
1287
  const variantModelBase = rawModel
1288
1288
  .replace(/-preview-customtools$/i, '')
1289
1289
  .replace(/-preview$/i, '')
1290
- .replace(isGeminiHydrogenModel(effectiveModel)
1290
+ .replace(supportsGeminiXHigh(effectiveModel)
1291
1291
  ? /-(low|medium|high|xhigh)$/i
1292
1292
  : /-(minimal|low|medium|high)$/i, '');
1293
1293
  const variantResolved = resolveAntigravityModel(`${variantModelBase}-${variantConfig.thinkingLevel}`);