@cortexkit/antigravity-auth-core 3.0.37 → 3.0.39

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 (28) hide show
  1. package/dist/antigravity-command-menu.d.ts +2 -1
  2. package/dist/antigravity-command-menu.d.ts.map +1 -1
  3. package/dist/antigravity-command-menu.js +3 -2
  4. package/dist/antigravity-command-menu.js.map +1 -1
  5. package/dist/common-auth-embedded/claustrum/availability.d.ts +7 -1
  6. package/dist/common-auth-embedded/claustrum/availability.js +9 -1
  7. package/dist/common-auth-embedded/claustrum/custody.d.ts +11 -2
  8. package/dist/common-auth-embedded/claustrum/custody.js +89 -31
  9. package/dist/common-auth-embedded/claustrum/enrollment.d.ts +4 -0
  10. package/dist/common-auth-embedded/claustrum/enrollment.js +33 -2
  11. package/dist/common-auth-embedded/claustrum/host.js +11 -7
  12. package/dist/common-auth-embedded/claustrum/index.d.ts +1 -1
  13. package/dist/common-auth-embedded/claustrum/index.js +1 -1
  14. package/dist/common-auth-embedded/fs/lock-record.js +55 -0
  15. package/dist/common-auth-embedded/fs/refresh-file-lock.js +148 -92
  16. package/dist/common-auth-embedded/fs/with-lock.js +19 -13
  17. package/dist/common-auth-embedded/source-output.json +48 -40
  18. package/dist/model-registry.d.ts +3 -0
  19. package/dist/model-registry.d.ts.map +1 -1
  20. package/dist/model-registry.js +59 -0
  21. package/dist/model-registry.js.map +1 -1
  22. package/dist/transform/agy-generation.d.ts.map +1 -1
  23. package/dist/transform/agy-generation.js +7 -4
  24. package/dist/transform/agy-generation.js.map +1 -1
  25. package/dist/transform/model-resolver.d.ts.map +1 -1
  26. package/dist/transform/model-resolver.js +8 -3
  27. package/dist/transform/model-resolver.js.map +1 -1
  28. package/package.json +2 -2
@@ -1,6 +1,7 @@
1
1
  import { randomUUID } from 'node:crypto';
2
2
  import { link, lstat, mkdir, open, readFile, rename, rm, stat, } from 'node:fs/promises';
3
3
  import { dirname, join } from 'node:path';
4
+ import { DisappearedLockRecordError, isWindowsAccessDeniedCreate, isWindowsAccessDeniedRead, readLockRecord, } from './lock-record.js';
4
5
  import { createPrivateBytes, createPrivateDirectoryExclusive, ensurePrivateDirectory, isWindowsSharingViolation, PrivateFileError, privateOperation, readPrivateText, verifyPrivate, windowsPrivateFiles, writePrivateAtomic, } from './private-files.js';
5
6
  import { LockOwnershipError, lockPathFor } from './with-lock.js';
6
7
  let leaseCreationTestHooks;
@@ -192,17 +193,22 @@ export async function acquireRefreshFileLockWithClock(options) {
192
193
  const evictOwnerId = randomUUID();
193
194
  const EVICT_TTL = 5_000;
194
195
  const MAX_STEAL_ATTEMPTS = 8;
196
+ function isChangingLockCreate(error) {
197
+ return (windowsPrivateFiles &&
198
+ (isWindowsAccessDeniedCreate(error, [lockPath], 'create') ||
199
+ isWindowsAccessDeniedCreate(error, [evictPath], 'directory-create')));
200
+ }
195
201
  async function readOwner() {
196
202
  if (windowsPrivateFiles) {
197
203
  try {
198
- return JSON.parse(await readPrivateText(lockPath, true));
204
+ return JSON.parse(await readLockRecord(lockPath, () => readPrivateText(lockPath, true)));
199
205
  }
200
206
  catch (error) {
201
207
  if (error.code !== 'EISDIR' &&
202
208
  error.reason !== 'wrong-kind')
203
209
  throw error;
204
- await verifyPrivate(lockPath, 'directory', true);
205
- return JSON.parse(await readPrivateText(legacyOwnerPath, true));
210
+ await readLockRecord(lockPath, () => verifyPrivate(lockPath, 'directory', true));
211
+ return JSON.parse(await readLockRecord(legacyOwnerPath, () => readPrivateText(legacyOwnerPath, true)));
206
212
  }
207
213
  }
208
214
  try {
@@ -280,8 +286,8 @@ export async function acquireRefreshFileLockWithClock(options) {
280
286
  await options.onStep('lease-contention-read-ready');
281
287
  try {
282
288
  if (code === 'EISDIR') {
283
- await verifyPrivate(lockPath, 'directory', true);
284
- await readPrivateText(legacyOwnerPath, true);
289
+ await readLockRecord(lockPath, () => verifyPrivate(lockPath, 'directory', true));
290
+ await readLockRecord(legacyOwnerPath, () => readPrivateText(legacyOwnerPath, true));
285
291
  }
286
292
  else
287
293
  await readOwner();
@@ -337,6 +343,10 @@ export async function acquireRefreshFileLockWithClock(options) {
337
343
  owner = await readOwner();
338
344
  }
339
345
  catch (error) {
346
+ // A delete-pending owner that disappeared is a create opportunity,
347
+ // never an ownerless legacy directory eligible for stale eviction.
348
+ if (error instanceof DisappearedLockRecordError)
349
+ return { status: 'missing' };
340
350
  if (windowsPrivateFiles &&
341
351
  error.code !== 'ENOENT')
342
352
  throw error;
@@ -395,7 +405,7 @@ export async function acquireRefreshFileLockWithClock(options) {
395
405
  // Fail-closed: any read error means we do NOT own the marker.
396
406
  async function ownsEvictionMarker() {
397
407
  try {
398
- const owner = JSON.parse(await readPrivateText(evictOwnerPath, windowsPrivateFiles));
408
+ const owner = JSON.parse(await readLockRecord(evictOwnerPath, () => readPrivateText(evictOwnerPath, windowsPrivateFiles)));
399
409
  return owner?.ownerId === evictOwnerId;
400
410
  }
401
411
  catch (error) {
@@ -581,7 +591,7 @@ export async function acquireRefreshFileLockWithClock(options) {
581
591
  }
582
592
  if (windowsPrivateFiles) {
583
593
  try {
584
- await verifyPrivate(evictPath, 'directory', true);
594
+ await readLockRecord(evictPath, () => verifyPrivate(evictPath, 'directory', true));
585
595
  }
586
596
  catch (error) {
587
597
  // The marker's holder can remove it between the stat above and this
@@ -654,8 +664,8 @@ export async function acquireRefreshFileLockWithClock(options) {
654
664
  if (error.code === 'EEXIST') {
655
665
  if (windowsPrivateFiles) {
656
666
  try {
657
- await verifyPrivate(evictPath, 'directory', true);
658
- await readPrivateText(evictOwnerPath, true);
667
+ await readLockRecord(evictPath, () => verifyPrivate(evictPath, 'directory', true));
668
+ await readLockRecord(evictOwnerPath, () => readPrivateText(evictOwnerPath, true));
659
669
  }
660
670
  catch (ownerError) {
661
671
  // A marker removed by its holder after the failed create is free:
@@ -681,10 +691,16 @@ export async function acquireRefreshFileLockWithClock(options) {
681
691
  await releaseEvictionMarker(deadline);
682
692
  }
683
693
  catch (error) {
684
- // Cleanup sharing failures must not replace the lock's original
685
- // sharing refusal when both removals exhaust the same deadline.
686
- if (isRetryableRemoval(actionError, lockPath) &&
687
- isRetryableRemoval(error, evictPath))
694
+ // Cleanup IO failures must not replace the original lock refusal when
695
+ // both operations use the same deadline.
696
+ if ((isRetryableRemoval(actionError, lockPath) ||
697
+ isWindowsAccessDeniedRead(actionError, [
698
+ lockPath,
699
+ legacyOwnerPath,
700
+ evictOwnerPath,
701
+ ])) &&
702
+ (isRetryableRemoval(error, evictPath) ||
703
+ isWindowsAccessDeniedRead(error, [evictOwnerPath])))
688
704
  throw actionError;
689
705
  throw error;
690
706
  }
@@ -705,7 +721,8 @@ export async function acquireRefreshFileLockWithClock(options) {
705
721
  owner = await readOwner();
706
722
  }
707
723
  catch (error) {
708
- if (windowsPrivateFiles)
724
+ if (windowsPrivateFiles &&
725
+ !(error instanceof DisappearedLockRecordError))
709
726
  throw error;
710
727
  return;
711
728
  }
@@ -789,7 +806,9 @@ export async function acquireRefreshFileLockWithClock(options) {
789
806
  }
790
807
  }
791
808
  catch (error) {
792
- if (windowsPrivateFiles && error instanceof PrivateFileError) {
809
+ if (windowsPrivateFiles &&
810
+ error instanceof PrivateFileError &&
811
+ !isChangingLockCreate(error)) {
793
812
  terminalIOError = error;
794
813
  recordLoss('renewal-failed');
795
814
  shouldReschedule = false;
@@ -844,90 +863,112 @@ export async function acquireRefreshFileLockWithClock(options) {
844
863
  }
845
864
  return null;
846
865
  }
847
- let acquired = await tryAcquire();
866
+ let acquired = false;
867
+ let changingCreateError;
868
+ try {
869
+ acquired = await tryAcquire();
870
+ }
871
+ catch (error) {
872
+ if (!isChangingLockCreate(error))
873
+ throw error;
874
+ changingCreateError = error;
875
+ }
848
876
  if (!acquired) {
849
877
  for (let attempt = 0; attempt < MAX_STEAL_ATTEMPTS; attempt++) {
850
- acquired = await tryAcquire();
851
- if (acquired)
852
- break;
853
- const observed = await readLockState();
854
- if (observed.status === 'live')
855
- return contended();
856
- // Absence is a create opportunity, never evidence of an expired lease.
857
- if (observed.status === 'missing')
858
- continue;
859
- if (options.onStep)
860
- await options.onStep('stale-lock-observed');
861
878
  try {
862
- if (!(await tryAcquireEvictionMarker())) {
863
- await backoff();
864
- continue;
865
- }
866
- }
867
- catch (evictError) {
868
- const code = evictError.code;
869
- if (code !== 'EEXIST')
870
- throw evictError;
871
- const recovered = await recoverStaleEvictionMarker();
872
- if (recovered === 'fresh')
873
- return null;
874
- await backoff();
875
- continue;
876
- }
877
- try {
878
- const confirmed = await readLockState();
879
- if (confirmed.status === 'live')
879
+ acquired = await tryAcquire();
880
+ if (acquired)
881
+ break;
882
+ const observed = await readLockState();
883
+ if (observed.status === 'live')
880
884
  return contended();
881
- if (!sameStaleLock(observed.identity, confirmed))
885
+ // Absence is a create opportunity, never evidence of an expired lease.
886
+ if (observed.status === 'missing')
882
887
  continue;
883
- // Verify marker ownership before removing a lock found not live.
884
- if (!(await ownsEvictionMarker()))
885
- return null;
886
888
  if (options.onStep)
887
- await options.onStep('stale-lock-confirmed');
888
- // The onStep callback can pause while another contender renames
889
- // our marker, so verify ownership again after the callback.
890
- if (!(await ownsEvictionMarker()))
891
- return null;
892
- // Do not await a callback between this ownership check and the lock read.
893
- const current = await readLockState(false);
894
- if (!sameStaleLock(observed.identity, current))
889
+ await options.onStep('stale-lock-observed');
890
+ try {
891
+ if (!(await tryAcquireEvictionMarker())) {
892
+ await backoff();
893
+ continue;
894
+ }
895
+ }
896
+ catch (evictError) {
897
+ const code = evictError.code;
898
+ if (code !== 'EEXIST')
899
+ throw evictError;
900
+ const recovered = await recoverStaleEvictionMarker();
901
+ if (recovered === 'fresh')
902
+ return null;
903
+ await backoff();
895
904
  continue;
896
- // The final read and removal are not atomic. While this stale file
897
- // exists, wx cannot create a successor; the marker excludes other
898
- // evictors and release/renewal. An expired holder cannot renew: renewal
899
- // rechecks expiry and marker ownership immediately before publishing.
900
- // With the marker still owned, cooperating users cannot replace it in
901
- // this window. Arbitrary suspension across marker expiry or filesystem
902
- // changes still need a kernel lock for an atomic guarantee.
903
- await removeLeaseObject(lockPath);
904
- // Fence check 3: re-verify ownership after removing the stale lock.
905
- if (!(await ownsEvictionMarker()))
906
- return null;
907
- if (options.onStep)
908
- await options.onStep('stale-lock-removed');
909
- acquired = await tryAcquire();
910
- if (!acquired)
911
- return null;
912
- if (options.onStep)
913
- await options.onStep('stale-lock-recreated');
914
- // Fence check 4: re-verify ownership after acquiring the lock. If the
915
- // marker was stolen between tryAcquire and this check, release the
916
- // just-acquired lock and return null (fail-closed).
917
- if (!(await ownsEvictionMarker())) {
918
- await relinquishLockAfterMarkerLoss();
919
- acquired = false;
920
- return null;
921
905
  }
922
- break;
906
+ try {
907
+ const confirmed = await readLockState();
908
+ if (confirmed.status === 'live')
909
+ return contended();
910
+ if (!sameStaleLock(observed.identity, confirmed))
911
+ continue;
912
+ // Verify marker ownership before removing a lock found not live.
913
+ if (!(await ownsEvictionMarker()))
914
+ return null;
915
+ if (options.onStep)
916
+ await options.onStep('stale-lock-confirmed');
917
+ // The onStep callback can pause while another contender renames
918
+ // our marker, so verify ownership again after the callback.
919
+ if (!(await ownsEvictionMarker()))
920
+ return null;
921
+ // Do not await a callback between this ownership check and the lock read.
922
+ const current = await readLockState(false);
923
+ if (!sameStaleLock(observed.identity, current))
924
+ continue;
925
+ // The final read and removal are not atomic. While this stale file
926
+ // exists, exclusive creation cannot publish a successor; the marker
927
+ // excludes other evictors and release/renewal. An expired holder cannot
928
+ // renew: renewal rechecks expiry and marker ownership before publishing.
929
+ // With the marker still owned, cooperating users cannot replace it in
930
+ // this window. Arbitrary suspension across marker expiry or filesystem
931
+ // changes still need a kernel lock for an atomic guarantee.
932
+ await removeLeaseObject(lockPath);
933
+ // Fence check 3: re-verify ownership after removing the stale lock.
934
+ if (!(await ownsEvictionMarker()))
935
+ return null;
936
+ if (options.onStep)
937
+ await options.onStep('stale-lock-removed');
938
+ acquired = await tryAcquire();
939
+ if (!acquired)
940
+ return null;
941
+ if (options.onStep)
942
+ await options.onStep('stale-lock-recreated');
943
+ // Fence check 4: re-verify ownership after acquiring the lock. If the
944
+ // marker was stolen between tryAcquire and this check, release the
945
+ // just-acquired lock and return null (fail-closed).
946
+ if (!(await ownsEvictionMarker())) {
947
+ await relinquishLockAfterMarkerLoss();
948
+ acquired = false;
949
+ return null;
950
+ }
951
+ break;
952
+ }
953
+ finally {
954
+ await releaseEvictionMarker();
955
+ }
923
956
  }
924
- finally {
925
- await releaseEvictionMarker();
957
+ catch (error) {
958
+ if (!isChangingLockCreate(error))
959
+ throw error;
960
+ // A refused create is busy, not stale. Retry exclusive creation before
961
+ // any owner read or eviction, retaining the first persistent refusal.
962
+ changingCreateError ??= error;
963
+ await backoff();
926
964
  }
927
965
  }
928
966
  }
929
- if (!acquired)
967
+ if (!acquired) {
968
+ if (changingCreateError)
969
+ throw changingCreateError;
930
970
  return null;
971
+ }
931
972
  scheduleRenewal();
932
973
  return {
933
974
  ownerId,
@@ -977,6 +1018,7 @@ export async function acquireRefreshFileLockWithClock(options) {
977
1018
  const deadline = performance.now() + EVICT_TTL + 1_000;
978
1019
  let delayMs = 5;
979
1020
  let removalError;
1021
+ let changingRecordError;
980
1022
  for (;;) {
981
1023
  try {
982
1024
  let removalConfirmed = false;
@@ -1004,6 +1046,7 @@ export async function acquireRefreshFileLockWithClock(options) {
1004
1046
  await removeLeaseObject(lockPath);
1005
1047
  removalConfirmed = true;
1006
1048
  }, deadline);
1049
+ changingRecordError = undefined;
1007
1050
  if (markerAcquired) {
1008
1051
  if (windowsPrivateFiles && !removalConfirmed)
1009
1052
  throw new PrivateFileError(lockPath, 'release-not-confirmed', {
@@ -1017,15 +1060,27 @@ export async function acquireRefreshFileLockWithClock(options) {
1017
1060
  await recoverStaleEvictionMarker(deadline);
1018
1061
  }
1019
1062
  catch (error) {
1020
- if (!isRetryableRemoval(error, lockPath)) {
1063
+ const changingRecord = windowsPrivateFiles &&
1064
+ (isChangingLockCreate(error) ||
1065
+ isWindowsAccessDeniedRead(error, [
1066
+ lockPath,
1067
+ legacyOwnerPath,
1068
+ evictPath,
1069
+ evictOwnerPath,
1070
+ ]));
1071
+ if (!isRetryableRemoval(error, lockPath) && !changingRecord) {
1021
1072
  if (windowsPrivateFiles)
1022
1073
  throw error;
1023
1074
  return;
1024
1075
  }
1025
- // Like rename, a fenced delete can be refused by a reader's Windows
1026
- // handle without invalidating ownership. Drop the marker, back off,
1027
- // and re-confirm the owner under a new marker before trying again.
1028
- removalError ??= error;
1076
+ // Neither a refused delete nor an ambiguous record read or create
1077
+ // establishes loss or expiry. Back off under the release deadline and
1078
+ // re-confirm ownership before any removal; keep the original error
1079
+ // if the refusal persists.
1080
+ if (changingRecord)
1081
+ changingRecordError ??= error;
1082
+ else
1083
+ removalError ??= error;
1029
1084
  }
1030
1085
  const remainingMs = deadline - performance.now();
1031
1086
  if (remainingMs <= 0)
@@ -1038,7 +1093,8 @@ export async function acquireRefreshFileLockWithClock(options) {
1038
1093
  // Do not delete by pathname without the marker: bounded retries leave the
1039
1094
  // lease to expire rather than risking removal of a successor's lock.
1040
1095
  if (windowsPrivateFiles)
1041
- throw (removalError ??
1096
+ throw (changingRecordError ??
1097
+ removalError ??
1042
1098
  new PrivateFileError(lockPath, 'release-not-confirmed', {
1043
1099
  code: 'ETIMEDOUT',
1044
1100
  }));
@@ -1,5 +1,6 @@
1
1
  import { join, resolve } from 'node:path';
2
- import { isWindowsSharingViolation, } from './private-files.js';
2
+ import { isWindowsAccessDeniedCreate, isWindowsAccessDeniedRead, } from './lock-record.js';
3
+ import { isWindowsSharingViolation, windowsPrivateFiles, } from './private-files.js';
3
4
  import { acquireRefreshFileLock } from './refresh-file-lock.js';
4
5
  export function lockPathFor(target, name) {
5
6
  return `${target}.${name}.lock`;
@@ -20,19 +21,23 @@ export class LockOwnershipError extends Error {
20
21
  this.details = details;
21
22
  }
22
23
  }
23
- function isChangingLockRead(error, target, name) {
24
- if (!isWindowsSharingViolation(error) ||
25
- (error.stage !== 'read' && error.stage !== 'verify'))
26
- return false;
24
+ function isChangingLockRecord(error, target, name) {
27
25
  const path = resolve(lockPathFor(target, name));
28
- return error.path === path || error.path === join(path, 'owner.json');
26
+ const paths = [path, join(path, 'owner.json')];
27
+ return (((isWindowsSharingViolation(error) ||
28
+ isWindowsAccessDeniedRead(error, paths)) &&
29
+ (error.stage === 'read' || error.stage === 'verify') &&
30
+ paths.includes(error.path)) ||
31
+ (windowsPrivateFiles &&
32
+ (isWindowsAccessDeniedCreate(error, [path], 'create') ||
33
+ isWindowsAccessDeniedCreate(error, [`${path}.evicting`], 'directory-create'))));
29
34
  }
30
35
  export async function withLock(target, options, fn) {
31
36
  const started = performance.now();
37
+ let changingRecordError;
32
38
  for (;;) {
33
39
  options.signal?.throwIfAborted();
34
40
  let lock;
35
- let changingReadError;
36
41
  try {
37
42
  lock = await acquireRefreshFileLock({
38
43
  path: target,
@@ -44,14 +49,15 @@ export async function withLock(target, options, fn) {
44
49
  ? { onRenewalTimer: options.onRenewalTimer }
45
50
  : {}),
46
51
  });
52
+ changingRecordError = undefined;
47
53
  }
48
54
  catch (error) {
49
- if (!isChangingLockRead(error, target, options.name))
55
+ if (!isChangingLockRecord(error, target, options.name))
50
56
  throw error;
51
- // Sharing violations (32) and delete-pending opens (303) do not reveal
52
- // ownership or expiry. Retry exclusive creation, never infer a stale lock.
57
+ // Ambiguous reads or creates reveal neither ownership nor expiry. Retry
58
+ // exclusive creation within the same deadline, never infer staleness from IO.
53
59
  lock = null;
54
- changingReadError = error;
60
+ changingRecordError ??= error;
55
61
  }
56
62
  if (lock) {
57
63
  try {
@@ -65,8 +71,8 @@ export async function withLock(target, options, fn) {
65
71
  const remaining = options.timeoutMs - (performance.now() - started);
66
72
  if (remaining <= 0) {
67
73
  // Keep persistent native IO failures distinguishable from a live holder.
68
- if (changingReadError)
69
- throw changingReadError;
74
+ if (changingRecordError)
75
+ throw changingRecordError;
70
76
  throw new LockContentionError({
71
77
  target,
72
78
  name: options.name,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema": 1,
3
3
  "package": "@cortexkit/common-auth",
4
- "version": "0.42.0",
4
+ "version": "0.43.0",
5
5
  "artifactStatus": "published",
6
6
  "publicRoots": {
7
7
  "./store": {
@@ -37,15 +37,15 @@
37
37
  "import": "./dist/pi-slot/index.js"
38
38
  }
39
39
  },
40
- "input": "tools/common-auth-build/inputs/cortexkit-common-auth-0.42.0.tgz",
41
- "tarballSha256": "c3f1c832fe8391529be331c1e2f5577b60eaa7a1c848e97f6668aca06118af04",
42
- "sri": "sha512-LAZ67qRdJA+9SmglIyDRtEd2Wz+6X2dDRTC+qXt6HryQzir87LIiY+sWWllWT707agUA9rxOocCCP6e+mwoZyA==",
43
- "canonicalFiles": 153,
44
- "canonicalBytes": 1040884,
40
+ "input": "tools/common-auth-build/inputs/cortexkit-common-auth-0.43.0.tgz",
41
+ "tarballSha256": "f2c384c880b08859ac3f0cca3575cedfcdcd47e6e96dd8f72dc78af1fe6a7620",
42
+ "sri": "sha512-J0vA1VHliTdDhBghn/G5oR6oRcm5sA0ScL/6ghwqMEsQjlSZ5K8q40vYVbW15gZcw69hcmVuA6Gbq1/26yKR4A==",
43
+ "canonicalFiles": 154,
44
+ "canonicalBytes": 1052730,
45
45
  "generator": {
46
46
  "path": "packages/opencode/scripts/embed-common-auth.ts",
47
47
  "version": 4,
48
- "sha256": "225a77c54d91e241bbece24dc289ce479330d00c20304ff8508ceb59975728c4"
48
+ "sha256": "aeda85685b8cd9c84862f722acdd650e0526db6cd56c539ef3c17f19fd0bf5c6"
49
49
  },
50
50
  "files": [
51
51
  {
@@ -211,17 +211,17 @@
211
211
  {
212
212
  "source": "package/dist/claustrum/availability.d.ts",
213
213
  "output": "claustrum/availability.d.ts",
214
- "bytes": 3406,
215
- "sourceSha256": "a77a53ae0220230273b124b7793e2d8842ab3841bfab1d987309411752f7b80a",
216
- "outputSha256": "a77a53ae0220230273b124b7793e2d8842ab3841bfab1d987309411752f7b80a",
214
+ "bytes": 3781,
215
+ "sourceSha256": "3f87160823d131bf6e60e0bfd2398f10f3799ce45912c5480b327b59892b7157",
216
+ "outputSha256": "3f87160823d131bf6e60e0bfd2398f10f3799ce45912c5480b327b59892b7157",
217
217
  "transform": "verbatim"
218
218
  },
219
219
  {
220
220
  "source": "package/dist/claustrum/availability.js",
221
221
  "output": "claustrum/availability.js",
222
- "bytes": 4219,
223
- "sourceSha256": "07fe16b372bb3dbf5870725b4ea8e2b4c3e50e5d7394fa365de789f72ff01b04",
224
- "outputSha256": "07fe16b372bb3dbf5870725b4ea8e2b4c3e50e5d7394fa365de789f72ff01b04",
222
+ "bytes": 4615,
223
+ "sourceSha256": "11eaa35ab38ab433f249b4b11b9e284fac5ab7e785c965fe070aef8cde593089",
224
+ "outputSha256": "11eaa35ab38ab433f249b4b11b9e284fac5ab7e785c965fe070aef8cde593089",
225
225
  "transform": "verbatim"
226
226
  },
227
227
  {
@@ -243,33 +243,33 @@
243
243
  {
244
244
  "source": "package/dist/claustrum/custody.d.ts",
245
245
  "output": "claustrum/custody.d.ts",
246
- "bytes": 17299,
247
- "sourceSha256": "70c5f7f40cde58a614c79b280c2129f9a228238342f69eac42237b8621ecfa59",
248
- "outputSha256": "70c5f7f40cde58a614c79b280c2129f9a228238342f69eac42237b8621ecfa59",
246
+ "bytes": 17862,
247
+ "sourceSha256": "ea33c127942652259ddf467d377da872cabfab1407339cc774c0e79ca5f83742",
248
+ "outputSha256": "ea33c127942652259ddf467d377da872cabfab1407339cc774c0e79ca5f83742",
249
249
  "transform": "verbatim"
250
250
  },
251
251
  {
252
252
  "source": "package/dist/claustrum/custody.js",
253
253
  "output": "claustrum/custody.js",
254
- "bytes": 34857,
255
- "sourceSha256": "cadbce8e39cb51c9c6756c01d0d8ebe9a328cf4f3bb70e081ffe26c4773bc5f1",
256
- "outputSha256": "cadbce8e39cb51c9c6756c01d0d8ebe9a328cf4f3bb70e081ffe26c4773bc5f1",
254
+ "bytes": 37468,
255
+ "sourceSha256": "e73ca575f9a97a20723e3371ff63be99a8cfea95bbe54ab694c298bebc30e853",
256
+ "outputSha256": "e73ca575f9a97a20723e3371ff63be99a8cfea95bbe54ab694c298bebc30e853",
257
257
  "transform": "verbatim"
258
258
  },
259
259
  {
260
260
  "source": "package/dist/claustrum/enrollment.d.ts",
261
261
  "output": "claustrum/enrollment.d.ts",
262
- "bytes": 8761,
263
- "sourceSha256": "4ebace01478b70ccabca0964128a47ea93c553d4ad1c307c29946a6952023dbe",
264
- "outputSha256": "4ebace01478b70ccabca0964128a47ea93c553d4ad1c307c29946a6952023dbe",
262
+ "bytes": 8990,
263
+ "sourceSha256": "395691b7c46020b5ab8850e1effdab1ce378312cf9f71b9b2ab613d4331a1669",
264
+ "outputSha256": "395691b7c46020b5ab8850e1effdab1ce378312cf9f71b9b2ab613d4331a1669",
265
265
  "transform": "verbatim"
266
266
  },
267
267
  {
268
268
  "source": "package/dist/claustrum/enrollment.js",
269
269
  "output": "claustrum/enrollment.js",
270
- "bytes": 37156,
271
- "sourceSha256": "b5bd0f39bc78277cc36a15dd30bad763f114d7ed099466671752dbeecd1cd873",
272
- "outputSha256": "b5bd0f39bc78277cc36a15dd30bad763f114d7ed099466671752dbeecd1cd873",
270
+ "bytes": 38799,
271
+ "sourceSha256": "3cb9bf3fae4b90b64b743a618b142047cad3a99b81b52932d0f9afc8540adad7",
272
+ "outputSha256": "3cb9bf3fae4b90b64b743a618b142047cad3a99b81b52932d0f9afc8540adad7",
273
273
  "transform": "verbatim"
274
274
  },
275
275
  {
@@ -315,9 +315,9 @@
315
315
  {
316
316
  "source": "package/dist/claustrum/host.js",
317
317
  "output": "claustrum/host.js",
318
- "bytes": 4403,
319
- "sourceSha256": "7baae6af599ee02066c6ff3c238bcade9f701846505ec4d497e78e429bb7eea2",
320
- "outputSha256": "7baae6af599ee02066c6ff3c238bcade9f701846505ec4d497e78e429bb7eea2",
318
+ "bytes": 4610,
319
+ "sourceSha256": "c2eba15f35b996993ba7f0ec849ce84312d5f08e9b15e8f6458c6d8a0e03ae7b",
320
+ "outputSha256": "c2eba15f35b996993ba7f0ec849ce84312d5f08e9b15e8f6458c6d8a0e03ae7b",
321
321
  "transform": "verbatim"
322
322
  },
323
323
  {
@@ -339,17 +339,17 @@
339
339
  {
340
340
  "source": "package/dist/claustrum/index.d.ts",
341
341
  "output": "claustrum/index.d.ts",
342
- "bytes": 4937,
343
- "sourceSha256": "9270d05fd212b2e4b38afe6fc1021b0763ced055921de03943fec1992c871aa3",
344
- "outputSha256": "9270d05fd212b2e4b38afe6fc1021b0763ced055921de03943fec1992c871aa3",
342
+ "bytes": 4965,
343
+ "sourceSha256": "6b95f03d2135a664e8960d3ba5d3fc294e4dea0cb7ca32ac183c3a3312f88a5d",
344
+ "outputSha256": "6b95f03d2135a664e8960d3ba5d3fc294e4dea0cb7ca32ac183c3a3312f88a5d",
345
345
  "transform": "verbatim"
346
346
  },
347
347
  {
348
348
  "source": "package/dist/claustrum/index.js",
349
349
  "output": "claustrum/index.js",
350
- "bytes": 4062,
351
- "sourceSha256": "72f0f4bd7c17b82aa7abc3f196e1499d5a3d51173a456fbd7c3b72425ffaba48",
352
- "outputSha256": "72f0f4bd7c17b82aa7abc3f196e1499d5a3d51173a456fbd7c3b72425ffaba48",
350
+ "bytes": 4090,
351
+ "sourceSha256": "57a6e23ad884e39989da2ffd8eadb1b62f744402a9d6c33bb68b25d6c329e4f0",
352
+ "outputSha256": "57a6e23ad884e39989da2ffd8eadb1b62f744402a9d6c33bb68b25d6c329e4f0",
353
353
  "transform": "verbatim"
354
354
  },
355
355
  {
@@ -608,6 +608,14 @@
608
608
  "outputSha256": "cd60090325fa8c4c17dddfc216a4ed326f2a6e48525e724a4dd260bf88041231",
609
609
  "transform": "verbatim"
610
610
  },
611
+ {
612
+ "source": "package/dist/fs/lock-record.js",
613
+ "output": "fs/lock-record.js",
614
+ "bytes": 2253,
615
+ "sourceSha256": "18468ed6c58d8a989164b566c3653dbeea0d46b3031b49bc8f23bc4028ae5ff3",
616
+ "outputSha256": "18468ed6c58d8a989164b566c3653dbeea0d46b3031b49bc8f23bc4028ae5ff3",
617
+ "transform": "verbatim"
618
+ },
611
619
  {
612
620
  "source": "package/dist/fs/private-files.d.ts",
613
621
  "output": "fs/private-files.d.ts",
@@ -635,9 +643,9 @@
635
643
  {
636
644
  "source": "package/dist/fs/refresh-file-lock.js",
637
645
  "output": "fs/refresh-file-lock.js",
638
- "bytes": 43780,
639
- "sourceSha256": "fa0200d4f4a759a8d4380aa2535cf07d98898650cc919031b0742d241662d96f",
640
- "outputSha256": "fa0200d4f4a759a8d4380aa2535cf07d98898650cc919031b0742d241662d96f",
646
+ "bytes": 46870,
647
+ "sourceSha256": "fb2d2c236e468a1c38b28d2d628f5b01e246e6d34165d844b1ba8faf2f692b37",
648
+ "outputSha256": "fb2d2c236e468a1c38b28d2d628f5b01e246e6d34165d844b1ba8faf2f692b37",
641
649
  "transform": "verbatim"
642
650
  },
643
651
  {
@@ -651,9 +659,9 @@
651
659
  {
652
660
  "source": "package/dist/fs/with-lock.js",
653
661
  "output": "fs/with-lock.js",
654
- "bytes": 2855,
655
- "sourceSha256": "25f4789fc118e10a72f7e687f083eb1212eca06d4fe2c7bfe6f0d773f2abf351",
656
- "outputSha256": "25f4789fc118e10a72f7e687f083eb1212eca06d4fe2c7bfe6f0d773f2abf351",
662
+ "bytes": 3278,
663
+ "sourceSha256": "3036b3e1cf9d80d33feebced3bdc14bbfd841ce69a8e784957be984d3c94a461",
664
+ "outputSha256": "3036b3e1cf9d80d33feebced3bdc14bbfd841ce69a8e784957be984d3c94a461",
657
665
  "transform": "verbatim"
658
666
  },
659
667
  {
@@ -64,5 +64,8 @@ export declare function getGemini38FlashAntigravityModel(tier?: ThinkingTier): s
64
64
  export declare function getQuotaGroupForModel(modelId: string, hasArgonPool?: boolean): ModelQuotaGroup | undefined;
65
65
  /** Recognize Argon selectors so family-specific wire and quota policy is consistent. */
66
66
  export declare function isGeminiArgonModel(model: string): boolean;
67
+ /** Recognize Carbon selectors without assigning an unobserved quota pool. */
68
+ export declare function isGeminiCarbonModel(model: string): boolean;
69
+ export declare function getGeminiCarbonAntigravityModel(tier?: ThinkingTier): string;
67
70
  export declare function getGeminiArgonAntigravityModel(tier?: ThinkingTier): string;
68
71
  //# sourceMappingURL=model-registry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-registry.d.ts","sourceRoot":"","sources":["../src/model-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAA;AAEtE,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,YAAY;IAC3B,aAAa,CAAC,EAAE,kBAAkB,CAAA;IAClC,cAAc,CAAC,EAAE,mBAAmB,CAAA;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAA;AACpD,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,YAAY,GAAG,cAAc,CAAA;AAEtE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,EAAE,CAAA;IACtB,MAAM,EAAE,aAAa,EAAE,CAAA;CACxB;AAED,MAAM,WAAW,uBAAwB,SAAQ,aAAa;IAC5D,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,SAAS,EAAE,OAAO,CAAA;IAClB,WAAW,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,OAAO,CAA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