@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
@@ -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
  {