@cortexkit/opencode-antigravity-auth 3.0.36 → 3.0.37

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 (47) hide show
  1. package/dist/cli.js +6 -1
  2. package/dist/cli.js.map +2 -2
  3. package/dist/cli.meta.json +11 -11
  4. package/dist/index.js +12 -7
  5. package/dist/index.js.map +2 -2
  6. package/dist/index.meta.json +29 -13
  7. package/dist/server.js +15 -10
  8. package/dist/server.js.map +2 -2
  9. package/dist/server.meta.json +1 -1
  10. package/dist/src/common-auth-embedded/claustrum/availability.d.ts +1 -0
  11. package/dist/src/common-auth-embedded/claustrum/availability.js +2 -0
  12. package/dist/src/common-auth-embedded/claustrum/index.d.ts +1 -1
  13. package/dist/src/common-auth-embedded/claustrum/index.js +1 -1
  14. package/dist/src/common-auth-embedded/routing-accessor/cache-policy.d.ts +51 -0
  15. package/dist/src/common-auth-embedded/routing-accessor/cache-policy.js +186 -0
  16. package/dist/src/common-auth-embedded/routing-accessor/index.d.ts +2 -1
  17. package/dist/src/common-auth-embedded/routing-accessor/index.js +1 -0
  18. package/dist/src/common-auth-embedded/source-output.json +41 -25
  19. package/dist/src/ga/server/auth.js +1 -1
  20. package/dist/src/ga/server/auth.js.map +1 -1
  21. package/dist/src/ga/server/index.js +1 -1
  22. package/dist/src/ga/server/index.js.map +1 -1
  23. package/dist/src/plugin/__fixtures__/verified-store.js +2 -2
  24. package/dist/src/plugin/ga-location-services.d.ts.map +1 -1
  25. package/dist/src/plugin/ga-location-services.js +2 -2
  26. package/dist/src/plugin/ga-location-services.js.map +1 -1
  27. package/dist/src/plugin/vault-custody.js +6 -6
  28. package/dist/src/plugin/vault-custody.js.map +1 -1
  29. package/dist/src/setup.js +1 -1
  30. package/dist/src/setup.js.map +1 -1
  31. package/dist/tui-build-map.json +1 -1
  32. package/dist/tui-ga-build-map.json +1 -1
  33. package/dist/types/src/common-auth-embedded/claustrum/availability.d.ts +1 -0
  34. package/dist/types/src/common-auth-embedded/claustrum/index.d.ts +1 -1
  35. package/dist/types/src/common-auth-embedded/routing-accessor/cache-policy.d.ts +51 -0
  36. package/dist/types/src/common-auth-embedded/routing-accessor/index.d.ts +2 -1
  37. package/dist/types/src/plugin/ga-location-services.d.ts.map +1 -1
  38. package/package.json +4 -4
  39. package/src/common-auth-embedded/claustrum/availability.d.ts +1 -0
  40. package/src/common-auth-embedded/claustrum/availability.js +2 -0
  41. package/src/common-auth-embedded/claustrum/index.d.ts +1 -1
  42. package/src/common-auth-embedded/claustrum/index.js +1 -1
  43. package/src/common-auth-embedded/routing-accessor/cache-policy.d.ts +51 -0
  44. package/src/common-auth-embedded/routing-accessor/cache-policy.js +186 -0
  45. package/src/common-auth-embedded/routing-accessor/index.d.ts +2 -1
  46. package/src/common-auth-embedded/routing-accessor/index.js +1 -0
  47. package/src/common-auth-embedded/source-output.json +41 -25
@@ -1596,7 +1596,7 @@
1596
1596
  "format": "esm"
1597
1597
  },
1598
1598
  "../core/dist/common-auth-embedded/claustrum/availability.js": {
1599
- "bytes": 4107,
1599
+ "bytes": 4219,
1600
1600
  "imports": [
1601
1601
  {
1602
1602
  "path": "@cortexkit/claustrum-client",
@@ -2243,7 +2243,7 @@
2243
2243
  "format": "esm"
2244
2244
  },
2245
2245
  "../core/dist/common-auth-embedded/claustrum/index.js": {
2246
- "bytes": 4048,
2246
+ "bytes": 4062,
2247
2247
  "imports": [
2248
2248
  {
2249
2249
  "path": "@cortexkit/claustrum-client",
@@ -3061,7 +3061,7 @@
3061
3061
  "format": "esm"
3062
3062
  },
3063
3063
  "src/plugin/vault-custody.ts": {
3064
- "bytes": 44009,
3064
+ "bytes": 43899,
3065
3065
  "imports": [
3066
3066
  {
3067
3067
  "path": "node:fs/promises",
@@ -3893,7 +3893,7 @@
3893
3893
  "format": "esm"
3894
3894
  },
3895
3895
  "src/common-auth-embedded/claustrum/availability.js": {
3896
- "bytes": 4107,
3896
+ "bytes": 4219,
3897
3897
  "imports": [
3898
3898
  {
3899
3899
  "path": "@cortexkit/claustrum-client",
@@ -4348,7 +4348,7 @@
4348
4348
  "format": "esm"
4349
4349
  },
4350
4350
  "src/setup.ts": {
4351
- "bytes": 19893,
4351
+ "bytes": 19870,
4352
4352
  "imports": [
4353
4353
  {
4354
4354
  "path": "node:fs/promises",
@@ -6038,13 +6038,29 @@
6038
6038
  "imports": [],
6039
6039
  "format": "esm"
6040
6040
  },
6041
+ "src/common-auth-embedded/routing-accessor/cache-policy.js": {
6042
+ "bytes": 6700,
6043
+ "imports": [
6044
+ {
6045
+ "path": "src/common-auth-embedded/routing-accessor/handle.js",
6046
+ "kind": "import-statement",
6047
+ "original": "./handle.js"
6048
+ }
6049
+ ],
6050
+ "format": "esm"
6051
+ },
6041
6052
  "src/common-auth-embedded/routing-accessor/index.js": {
6042
- "bytes": 8290,
6053
+ "bytes": 8406,
6043
6054
  "imports": [
6044
6055
  {
6045
6056
  "path": "src/common-auth-embedded/routing-accessor/handle.js",
6046
6057
  "kind": "import-statement",
6047
6058
  "original": "./handle.js"
6059
+ },
6060
+ {
6061
+ "path": "src/common-auth-embedded/routing-accessor/cache-policy.js",
6062
+ "kind": "import-statement",
6063
+ "original": "./cache-policy.js"
6048
6064
  }
6049
6065
  ],
6050
6066
  "format": "esm"
@@ -6663,7 +6679,7 @@
6663
6679
  "imports": [],
6664
6680
  "exports": [],
6665
6681
  "inputs": {},
6666
- "bytes": 4870939
6682
+ "bytes": 4871181
6667
6683
  },
6668
6684
  "dist/index.js": {
6669
6685
  "imports": [
@@ -8103,7 +8119,7 @@
8103
8119
  "bytesInOutput": 352
8104
8120
  },
8105
8121
  "../core/dist/common-auth-embedded/claustrum/availability.js": {
8106
- "bytesInOutput": 3685
8122
+ "bytesInOutput": 3801
8107
8123
  },
8108
8124
  "../core/dist/common-auth-embedded/claustrum/host.js": {
8109
8125
  "bytesInOutput": 3651
@@ -8181,7 +8197,7 @@
8181
8197
  "bytesInOutput": 39009
8182
8198
  },
8183
8199
  "../core/dist/common-auth-embedded/claustrum/index.js": {
8184
- "bytesInOutput": 4880
8200
+ "bytesInOutput": 4916
8185
8201
  },
8186
8202
  "../core/dist/common-auth-embedded/pi-slot/lock.js": {
8187
8203
  "bytesInOutput": 5133
@@ -8280,7 +8296,7 @@
8280
8296
  "bytesInOutput": 2028
8281
8297
  },
8282
8298
  "src/plugin/vault-custody.ts": {
8283
- "bytesInOutput": 24974
8299
+ "bytesInOutput": 24864
8284
8300
  },
8285
8301
  "src/process-heartbeat.ts": {
8286
8302
  "bytesInOutput": 8730
@@ -8358,7 +8374,7 @@
8358
8374
  "bytesInOutput": 8446
8359
8375
  },
8360
8376
  "src/setup.ts": {
8361
- "bytesInOutput": 15276
8377
+ "bytesInOutput": 15253
8362
8378
  },
8363
8379
  "src/auth-method-labels.ts": {
8364
8380
  "bytesInOutput": 218
@@ -8400,7 +8416,7 @@
8400
8416
  "bytesInOutput": 315
8401
8417
  },
8402
8418
  "src/common-auth-embedded/claustrum/availability.js": {
8403
- "bytesInOutput": 2560
8419
+ "bytesInOutput": 2668
8404
8420
  },
8405
8421
  "src/common-auth-embedded/setup/command-error.js": {
8406
8422
  "bytesInOutput": 1749
@@ -8709,7 +8725,7 @@
8709
8725
  "bytesInOutput": 0
8710
8726
  }
8711
8727
  },
8712
- "bytes": 2205156
8728
+ "bytes": 2205283
8713
8729
  }
8714
8730
  }
8715
8731
  }
package/dist/server.js CHANGED
@@ -19494,6 +19494,8 @@ var init_availability = __esm({
19494
19494
  unavailable: "unreachable",
19495
19495
  timeout: "unreachable",
19496
19496
  route_closed: "unreachable",
19497
+ // The daemon refused before forwarding, so the vault never saw the request.
19498
+ route_busy: "unreachable",
19497
19499
  daemon_draining: "unreachable",
19498
19500
  connection_closed: "unreachable",
19499
19501
  connection_dropped: "unreachable",
@@ -25659,6 +25661,7 @@ __export(claustrum_exports, {
25659
25661
  enrollmentAuthority: () => enrollmentAuthority,
25660
25662
  enrollmentName: () => enrollmentName,
25661
25663
  getClaustrumEnrollmentPaths: () => getClaustrumEnrollmentPaths,
25664
+ hasVaultHost: () => hasVaultHost,
25662
25665
  hostEnrollmentPaths: () => hostEnrollmentPaths,
25663
25666
  isCustodyPlaceholder: () => isCustodyPlaceholder,
25664
25667
  isCustodyPlaceholderValue: () => isCustodyPlaceholderValue,
@@ -30873,7 +30876,7 @@ function createOpenCodeVaultCustody(options) {
30873
30876
  const readEnrollment = async () => {
30874
30877
  if (layoutRefusal !== void 0) return unsettled;
30875
30878
  const claustrum = await loadClaustrum();
30876
- if (process.env.CORTEXKIT_VAULT_HOST === "thalamus")
30879
+ if (claustrum.hasVaultHost())
30877
30880
  return {
30878
30881
  state: "unavailable",
30879
30882
  code: "host",
@@ -30901,7 +30904,7 @@ function createOpenCodeVaultCustody(options) {
30901
30904
  const readEnrollmentSnapshot = async () => {
30902
30905
  if (layoutRefusal !== void 0)
30903
30906
  return { authority: "unreadable", status: unsettled };
30904
- if (process.env.CORTEXKIT_VAULT_HOST === "thalamus")
30907
+ if ((await loadClaustrum()).hasVaultHost())
30905
30908
  return { authority: "host", status: await readEnrollment() };
30906
30909
  const enrollment = await enrollmentPaths();
30907
30910
  const identity3 = await enrollmentFilesIdentity(enrollment);
@@ -31148,7 +31151,7 @@ function createOpenCodeVaultCustody(options) {
31148
31151
  },
31149
31152
  async requestAccess() {
31150
31153
  const claustrum = await loadClaustrum();
31151
- if (process.env.CORTEXKIT_VAULT_HOST === "thalamus")
31154
+ if (claustrum.hasVaultHost())
31152
31155
  throw new OpenCodeVaultCustodyError(
31153
31156
  claustrum.VAULT_HOST_CONNECT_REFUSAL
31154
31157
  );
@@ -31156,7 +31159,7 @@ function createOpenCodeVaultCustody(options) {
31156
31159
  },
31157
31160
  async useVault() {
31158
31161
  refuseUnsettled();
31159
- if (process.env.CORTEXKIT_VAULT_HOST === "thalamus") return;
31162
+ if ((await loadClaustrum()).hasVaultHost()) return;
31160
31163
  const enrollment = await readEnrollment();
31161
31164
  if (enrollment.state !== "approved")
31162
31165
  throw new OpenCodeVaultCustodyError(
@@ -31168,7 +31171,7 @@ function createOpenCodeVaultCustody(options) {
31168
31171
  async useLocal() {
31169
31172
  refuseUnsettled();
31170
31173
  const claustrum = await loadClaustrum();
31171
- if (process.env.CORTEXKIT_VAULT_HOST === "thalamus")
31174
+ if (claustrum.hasVaultHost())
31172
31175
  throw new OpenCodeVaultCustodyError(
31173
31176
  claustrum.VAULT_HOST_CONNECT_REFUSAL
31174
31177
  );
@@ -31203,7 +31206,7 @@ function createOpenCodeVaultCustody(options) {
31203
31206
  if (layoutRefusal !== void 0)
31204
31207
  return { lines: [`Vault: ${layoutRefusal}`], actions: [] };
31205
31208
  const claustrum = await loadClaustrum();
31206
- if (process.env.CORTEXKIT_VAULT_HOST === "thalamus")
31209
+ if (claustrum.hasVaultHost())
31207
31210
  return { lines: [claustrum.VAULT_HOST_STATUS], actions: [] };
31208
31211
  const status = await custody.status();
31209
31212
  const lines = statusLines(status);
@@ -50603,7 +50606,7 @@ function createGaLocationServicesFactory(bindings) {
50603
50606
  local: {
50604
50607
  ...localLogin,
50605
50608
  async assertAdmission() {
50606
- if (process.env.CORTEXKIT_VAULT_HOST === "thalamus")
50609
+ if ((await loadCommonAuthClaustrum()).hasVaultHost())
50607
50610
  throw new Error("Vault authority excludes local sign-in.");
50608
50611
  await localLogin.assertAdmission();
50609
50612
  }
@@ -52422,7 +52425,7 @@ async function registerGaAuthMethods(context, authority = readAuthority, input2
52422
52425
  local: {
52423
52426
  ...local,
52424
52427
  assertAdmission: async () => {
52425
- if (process.env.CORTEXKIT_VAULT_HOST === "thalamus")
52428
+ if ((await loadCommonAuthClaustrum()).hasVaultHost())
52426
52429
  throw new Error("Vault authority excludes local sign-in.");
52427
52430
  await local.assertAdmission();
52428
52431
  }
@@ -53195,7 +53198,7 @@ function createGaRpcActivation(options) {
53195
53198
  const cursor = last ? last.cursor : Math.max(acknowledged, queue2.evictedThrough);
53196
53199
  const claustrum = await loadCommonAuthClaustrum();
53197
53200
  const output2 = {
53198
- ...process.env.CORTEXKIT_VAULT_HOST === "thalamus" ? { vaultHostStatus: claustrum.VAULT_HOST_STATUS } : {},
53201
+ ...claustrum.hasVaultHost() ? { vaultHostStatus: claustrum.VAULT_HOST_STATUS } : {},
53199
53202
  version: ANTIGRAVITY_RPC_VERSION,
53200
53203
  kind: "snapshot",
53201
53204
  generation,
@@ -54881,6 +54884,8 @@ var VAULT_FAILURE_CLASSES2 = Object.freeze({
54881
54884
  unavailable: "unreachable",
54882
54885
  timeout: "unreachable",
54883
54886
  route_closed: "unreachable",
54887
+ // The daemon refused before forwarding, so the vault never saw the request.
54888
+ route_busy: "unreachable",
54884
54889
  daemon_draining: "unreachable",
54885
54890
  connection_closed: "unreachable",
54886
54891
  connection_dropped: "unreachable",
@@ -57417,7 +57422,7 @@ Setup has not completed the OpenCode 2 native Google connection.
57417
57422
  }
57418
57423
  async function runPluginSetup(argv, deps, migrateOpenCode, io = {}) {
57419
57424
  const claustrum = await loadCommonAuthClaustrum();
57420
- if (process.env.CORTEXKIT_VAULT_HOST === "thalamus")
57425
+ if (claustrum.hasVaultHost())
57421
57426
  throw new Error(claustrum.VAULT_HOST_CONNECT_REFUSAL);
57422
57427
  const plugin2 = await createSetupPlugin(
57423
57428
  deps,