@cortexkit/opencode-antigravity-auth 3.0.19 → 3.0.20
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/README.md +3 -1
- package/dist/cli.js +202 -118
- package/dist/cli.js.map +3 -3
- package/dist/cli.meta.json +18 -18
- package/dist/index.js +256 -172
- package/dist/index.js.map +3 -3
- package/dist/index.meta.json +18 -18
- package/dist/server.js +269 -185
- package/dist/server.js.map +3 -3
- package/dist/server.meta.json +1 -1
- package/dist/src/common-auth-embedded/claustrum/consumer.d.ts +10 -0
- package/dist/src/common-auth-embedded/claustrum/consumer.js +25 -0
- package/dist/src/common-auth-embedded/claustrum/custody.d.ts +6 -2
- package/dist/src/common-auth-embedded/claustrum/custody.js +20 -6
- package/dist/src/common-auth-embedded/claustrum/hub.d.ts +3 -1
- package/dist/src/common-auth-embedded/claustrum/hub.js +55 -5
- package/dist/src/common-auth-embedded/claustrum/roster.js +1 -1
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.d.ts +2 -1
- package/dist/src/common-auth-embedded/fs/refresh-file-lock.js +3 -1
- package/dist/src/common-auth-embedded/fs/with-lock.js +1 -1
- package/dist/src/common-auth-embedded/opencode2/index.d.ts +1 -1
- package/dist/src/common-auth-embedded/opencode2/install.d.ts +4 -3
- package/dist/src/common-auth-embedded/opencode2/install.js +144 -17
- package/dist/src/common-auth-embedded/opencode2/types.d.ts +52 -1
- package/dist/src/common-auth-embedded/source-output.json +48 -48
- package/dist/src/ga/tui/host-ga.d.ts.map +1 -1
- package/dist/src/ga/tui/host-ga.js +0 -1
- package/dist/src/ga/tui/host-ga.js.map +1 -1
- package/dist/src/plugin/__fixtures__/verified-store.js +2 -2
- package/dist/src/server.d.ts +4 -4
- package/dist/src/server.js +4 -4
- package/dist/src/tui/sidebar-frame.d.ts +3 -4
- package/dist/src/tui/sidebar-frame.d.ts.map +1 -1
- package/dist/src/tui/sidebar-frame.js +4 -8
- package/dist/src/tui/sidebar-frame.js.map +1 -1
- package/dist/src/tui.js +1 -1
- package/dist/tui-build-map.json +9 -9
- package/dist/tui-ga-build-map.json +9 -9
- package/dist/types/src/common-auth-embedded/claustrum/consumer.d.ts +10 -0
- package/dist/types/src/common-auth-embedded/claustrum/custody.d.ts +6 -2
- package/dist/types/src/common-auth-embedded/claustrum/hub.d.ts +3 -1
- package/dist/types/src/common-auth-embedded/fs/refresh-file-lock.d.ts +2 -1
- package/dist/types/src/common-auth-embedded/opencode2/index.d.ts +1 -1
- package/dist/types/src/common-auth-embedded/opencode2/install.d.ts +4 -3
- package/dist/types/src/common-auth-embedded/opencode2/types.d.ts +52 -1
- package/dist/types/src/server.d.ts +4 -4
- package/package.json +3 -3
- package/src/common-auth-embedded/claustrum/consumer.d.ts +10 -0
- package/src/common-auth-embedded/claustrum/consumer.js +25 -0
- package/src/common-auth-embedded/claustrum/custody.d.ts +6 -2
- package/src/common-auth-embedded/claustrum/custody.js +20 -6
- package/src/common-auth-embedded/claustrum/hub.d.ts +3 -1
- package/src/common-auth-embedded/claustrum/hub.js +55 -5
- package/src/common-auth-embedded/claustrum/roster.js +1 -1
- package/src/common-auth-embedded/fs/refresh-file-lock.d.ts +2 -1
- package/src/common-auth-embedded/fs/refresh-file-lock.js +3 -1
- package/src/common-auth-embedded/fs/with-lock.js +1 -1
- package/src/common-auth-embedded/opencode2/index.d.ts +1 -1
- package/src/common-auth-embedded/opencode2/install.d.ts +4 -3
- package/src/common-auth-embedded/opencode2/install.js +144 -17
- package/src/common-auth-embedded/opencode2/types.d.ts +52 -1
- package/src/common-auth-embedded/source-output.json +48 -48
- package/src/tui-compiled/tui/sidebar-frame.js +35 -72
- package/src/tui-compiled/tui.js +1 -1
- package/src/tui-ga-compiled/host-ga.js +0 -1
- package/src/tui-ga-compiled/shared/ced204104a639c9c-sidebar-frame.js +35 -72
- package/src/tui-ga-raw/host-ga.tsx +0 -1
- package/src/tui-ga-raw/shared/ced204104a639c9c-sidebar-frame.tsx +7 -29
- package/src/tui-raw/tui/sidebar-frame.tsx +7 -29
- package/src/tui-raw/tui.tsx +1 -1
- package/src/tui.tsx +1 -1
package/dist/index.js
CHANGED
|
@@ -7751,7 +7751,7 @@ async function rmEvictingDir(evictingPath) {
|
|
|
7751
7751
|
});
|
|
7752
7752
|
}
|
|
7753
7753
|
async function sleep(ms) {
|
|
7754
|
-
await new Promise((
|
|
7754
|
+
await new Promise((resolve26) => setTimeout(resolve26, ms));
|
|
7755
7755
|
}
|
|
7756
7756
|
async function acquireFencedFileLock(options) {
|
|
7757
7757
|
const lockPath = `${options.path}.${options.name}.lock`;
|
|
@@ -7867,8 +7867,8 @@ function buildLock(lockPath, evictingPath, ownerId, options, now) {
|
|
|
7867
7867
|
let released = false;
|
|
7868
7868
|
let lost = false;
|
|
7869
7869
|
let lostResolve = null;
|
|
7870
|
-
let lostPromise = new Promise((
|
|
7871
|
-
lostResolve =
|
|
7870
|
+
let lostPromise = new Promise((resolve26) => {
|
|
7871
|
+
lostResolve = resolve26;
|
|
7872
7872
|
});
|
|
7873
7873
|
const markLost = () => {
|
|
7874
7874
|
if (lost)
|
|
@@ -7878,9 +7878,9 @@ function buildLock(lockPath, evictingPath, ownerId, options, now) {
|
|
|
7878
7878
|
clearInterval(renewTimer);
|
|
7879
7879
|
renewTimer = null;
|
|
7880
7880
|
}
|
|
7881
|
-
const
|
|
7881
|
+
const resolve26 = lostResolve;
|
|
7882
7882
|
lostResolve = null;
|
|
7883
|
-
|
|
7883
|
+
resolve26?.();
|
|
7884
7884
|
};
|
|
7885
7885
|
const setupRenew = () => {
|
|
7886
7886
|
if (options.renew === false)
|
|
@@ -8503,7 +8503,7 @@ async function saveAccountStorageReplace(path5, incoming) {
|
|
|
8503
8503
|
return mutateAccountStorage(path5, () => incoming);
|
|
8504
8504
|
}
|
|
8505
8505
|
async function clearAccountStorage(path5) {
|
|
8506
|
-
const sleep5 = (ms) => new Promise((
|
|
8506
|
+
const sleep5 = (ms) => new Promise((resolve26) => setTimeout(resolve26, ms));
|
|
8507
8507
|
const lock = await acquireWithRetry(path5, sleep5);
|
|
8508
8508
|
try {
|
|
8509
8509
|
await assertLegacyAccountStorageWritable(path5);
|
|
@@ -8551,7 +8551,7 @@ var init_account_storage = __esm({
|
|
|
8551
8551
|
}
|
|
8552
8552
|
};
|
|
8553
8553
|
RETRY_DELAYS_MS = [100, 200, 400, 800, 1e3];
|
|
8554
|
-
DEFAULT_SLEEP = (ms) => new Promise((
|
|
8554
|
+
DEFAULT_SLEEP = (ms) => new Promise((resolve26) => setTimeout(resolve26, ms));
|
|
8555
8555
|
DEFAULT_BUILD_BACKUP_PATH = (path5, now) => `${path5}.corrupt-${now.toISOString().replace(/[:.]/g, "-")}`;
|
|
8556
8556
|
}
|
|
8557
8557
|
});
|
|
@@ -9753,8 +9753,8 @@ var init_account_manager = __esm({
|
|
|
9753
9753
|
await this.saveInFlight;
|
|
9754
9754
|
return;
|
|
9755
9755
|
}
|
|
9756
|
-
return new Promise((
|
|
9757
|
-
this.savePromiseResolvers.push({ resolve:
|
|
9756
|
+
return new Promise((resolve26, reject) => {
|
|
9757
|
+
this.savePromiseResolvers.push({ resolve: resolve26, reject });
|
|
9758
9758
|
});
|
|
9759
9759
|
}
|
|
9760
9760
|
async dispose() {
|
|
@@ -9797,8 +9797,8 @@ var init_account_manager = __esm({
|
|
|
9797
9797
|
reject(error);
|
|
9798
9798
|
throw error;
|
|
9799
9799
|
}
|
|
9800
|
-
for (const { resolve:
|
|
9801
|
-
|
|
9800
|
+
for (const { resolve: resolve26 } of resolvers)
|
|
9801
|
+
resolve26();
|
|
9802
9802
|
}
|
|
9803
9803
|
async executeSave() {
|
|
9804
9804
|
this.savePending = false;
|
|
@@ -9812,16 +9812,16 @@ var init_account_manager = __esm({
|
|
|
9812
9812
|
}
|
|
9813
9813
|
try {
|
|
9814
9814
|
await this.saveToDisk();
|
|
9815
|
-
for (const { resolve:
|
|
9816
|
-
|
|
9815
|
+
for (const { resolve: resolve26 } of resolvers) {
|
|
9816
|
+
resolve26();
|
|
9817
9817
|
}
|
|
9818
9818
|
} catch (error) {
|
|
9819
9819
|
if (isStorageLockContention(error)) {
|
|
9820
9820
|
this.onDiagnostic?.("Skipped account-state persist due to storage lock contention", {
|
|
9821
9821
|
error: String(error)
|
|
9822
9822
|
});
|
|
9823
|
-
for (const { resolve:
|
|
9824
|
-
|
|
9823
|
+
for (const { resolve: resolve26 } of resolvers) {
|
|
9824
|
+
resolve26();
|
|
9825
9825
|
}
|
|
9826
9826
|
return;
|
|
9827
9827
|
}
|
|
@@ -10310,7 +10310,7 @@ function getHttpsProxy(url) {
|
|
|
10310
10310
|
}
|
|
10311
10311
|
}
|
|
10312
10312
|
function waitForHead(socket, timeoutMs, onTimeout) {
|
|
10313
|
-
return new Promise((
|
|
10313
|
+
return new Promise((resolve26, reject) => {
|
|
10314
10314
|
let buffer = Buffer3.alloc(0);
|
|
10315
10315
|
const timeout = setTimeout(() => {
|
|
10316
10316
|
onTimeout();
|
|
@@ -10333,7 +10333,7 @@ function waitForHead(socket, timeoutMs, onTimeout) {
|
|
|
10333
10333
|
return;
|
|
10334
10334
|
const head = buffer.subarray(0, marker).toString("latin1");
|
|
10335
10335
|
const leftover = buffer.subarray(marker + 4);
|
|
10336
|
-
cleanup2(() =>
|
|
10336
|
+
cleanup2(() => resolve26({ head, leftover }));
|
|
10337
10337
|
};
|
|
10338
10338
|
socket.on("data", onData);
|
|
10339
10339
|
socket.once("error", onError);
|
|
@@ -10347,7 +10347,7 @@ async function connectViaProxy(proxyUrl, targetUrl, timeoutMs, signal, onDebug)
|
|
|
10347
10347
|
port: Number(proxyUrl.port || DEFAULT_PROXY_PORT),
|
|
10348
10348
|
signal: signal ?? void 0
|
|
10349
10349
|
});
|
|
10350
|
-
await new Promise((
|
|
10350
|
+
await new Promise((resolve26, reject) => {
|
|
10351
10351
|
const timeout = setTimeout(() => {
|
|
10352
10352
|
onDebug?.(`agy transport proxy connect timeout after ${timeoutMs}ms`);
|
|
10353
10353
|
proxySocket.destroy();
|
|
@@ -10356,7 +10356,7 @@ async function connectViaProxy(proxyUrl, targetUrl, timeoutMs, signal, onDebug)
|
|
|
10356
10356
|
const cleanup2 = () => clearTimeout(timeout);
|
|
10357
10357
|
proxySocket.once("connect", () => {
|
|
10358
10358
|
cleanup2();
|
|
10359
|
-
|
|
10359
|
+
resolve26();
|
|
10360
10360
|
});
|
|
10361
10361
|
proxySocket.once("error", (error) => {
|
|
10362
10362
|
cleanup2();
|
|
@@ -10381,7 +10381,7 @@ Host: ${targetHost}:${targetPort}\r
|
|
|
10381
10381
|
if (leftover.length > 0) {
|
|
10382
10382
|
proxySocket.unshift(leftover);
|
|
10383
10383
|
}
|
|
10384
|
-
return await new Promise((
|
|
10384
|
+
return await new Promise((resolve26, reject) => {
|
|
10385
10385
|
const tlsOptions = {
|
|
10386
10386
|
socket: proxySocket,
|
|
10387
10387
|
servername: targetHost,
|
|
@@ -10396,7 +10396,7 @@ Host: ${targetHost}:${targetPort}\r
|
|
|
10396
10396
|
const cleanup2 = () => clearTimeout(timeout);
|
|
10397
10397
|
tlsSocket.once("secureConnect", () => {
|
|
10398
10398
|
cleanup2();
|
|
10399
|
-
|
|
10399
|
+
resolve26(tlsSocket);
|
|
10400
10400
|
});
|
|
10401
10401
|
tlsSocket.once("error", (error) => {
|
|
10402
10402
|
cleanup2();
|
|
@@ -10405,7 +10405,7 @@ Host: ${targetHost}:${targetPort}\r
|
|
|
10405
10405
|
});
|
|
10406
10406
|
}
|
|
10407
10407
|
async function connectDirect(targetUrl, timeoutMs, signal, onDebug) {
|
|
10408
|
-
return await new Promise((
|
|
10408
|
+
return await new Promise((resolve26, reject) => {
|
|
10409
10409
|
const tlsOptions = {
|
|
10410
10410
|
host: targetUrl.hostname,
|
|
10411
10411
|
port: Number(targetUrl.port || DEFAULT_HTTPS_PORT),
|
|
@@ -10421,7 +10421,7 @@ async function connectDirect(targetUrl, timeoutMs, signal, onDebug) {
|
|
|
10421
10421
|
const cleanup2 = () => clearTimeout(timeout);
|
|
10422
10422
|
socket.once("secureConnect", () => {
|
|
10423
10423
|
cleanup2();
|
|
10424
|
-
|
|
10424
|
+
resolve26(socket);
|
|
10425
10425
|
});
|
|
10426
10426
|
socket.once("error", (error) => {
|
|
10427
10427
|
cleanup2();
|
|
@@ -12494,8 +12494,8 @@ async function acquireRefreshFileLockWithClock(options) {
|
|
|
12494
12494
|
let releaseConfirmed = false;
|
|
12495
12495
|
let loss;
|
|
12496
12496
|
let resolveLoss;
|
|
12497
|
-
const lostPromise = new Promise((
|
|
12498
|
-
resolveLoss =
|
|
12497
|
+
const lostPromise = new Promise((resolve26) => {
|
|
12498
|
+
resolveLoss = resolve26;
|
|
12499
12499
|
});
|
|
12500
12500
|
function notifyTimerStep(event) {
|
|
12501
12501
|
try {
|
|
@@ -12656,7 +12656,7 @@ async function acquireRefreshFileLockWithClock(options) {
|
|
|
12656
12656
|
}
|
|
12657
12657
|
}
|
|
12658
12658
|
async function backoff() {
|
|
12659
|
-
await new Promise((
|
|
12659
|
+
await new Promise((resolve26) => setTimeout(resolve26, Math.floor(Math.random() * 4)));
|
|
12660
12660
|
}
|
|
12661
12661
|
async function readLockState(notifyReady = true) {
|
|
12662
12662
|
if (notifyReady && options.onStep)
|
|
@@ -13094,7 +13094,7 @@ async function acquireRefreshFileLockWithClock(options) {
|
|
|
13094
13094
|
...typeof observed?.expiresAt === "number" ? { observedExpiresAt: observed.expiresAt } : {}
|
|
13095
13095
|
});
|
|
13096
13096
|
},
|
|
13097
|
-
release: async () => {
|
|
13097
|
+
release: async (signal) => {
|
|
13098
13098
|
if (windowsPrivateFiles && releaseConfirmed)
|
|
13099
13099
|
return;
|
|
13100
13100
|
released = true;
|
|
@@ -13135,6 +13135,8 @@ async function acquireRefreshFileLockWithClock(options) {
|
|
|
13135
13135
|
releaseConfirmed = removalConfirmed;
|
|
13136
13136
|
return;
|
|
13137
13137
|
}
|
|
13138
|
+
if (signal?.aborted)
|
|
13139
|
+
return;
|
|
13138
13140
|
await recoverStaleEvictionMarker();
|
|
13139
13141
|
} catch (error) {
|
|
13140
13142
|
if (windowsPrivateFiles)
|
|
@@ -13144,7 +13146,7 @@ async function acquireRefreshFileLockWithClock(options) {
|
|
|
13144
13146
|
const remainingMs = deadline - performance.now();
|
|
13145
13147
|
if (remainingMs <= 0)
|
|
13146
13148
|
break;
|
|
13147
|
-
await new Promise((
|
|
13149
|
+
await new Promise((resolve26) => setTimeout(resolve26, Math.min(delayMs, remainingMs)));
|
|
13148
13150
|
delayMs = Math.min(delayMs * 2, 50);
|
|
13149
13151
|
}
|
|
13150
13152
|
if (windowsPrivateFiles)
|
|
@@ -13187,7 +13189,7 @@ async function withLock(target, options, fn) {
|
|
|
13187
13189
|
options.signal?.throwIfAborted();
|
|
13188
13190
|
return await fn(lock);
|
|
13189
13191
|
} finally {
|
|
13190
|
-
await lock.release();
|
|
13192
|
+
await lock.release(options.signal);
|
|
13191
13193
|
}
|
|
13192
13194
|
}
|
|
13193
13195
|
const remaining = options.timeoutMs - (performance.now() - started);
|
|
@@ -13198,7 +13200,7 @@ async function withLock(target, options, fn) {
|
|
|
13198
13200
|
timeoutMs: options.timeoutMs
|
|
13199
13201
|
});
|
|
13200
13202
|
}
|
|
13201
|
-
await new Promise((
|
|
13203
|
+
await new Promise((resolve26) => setTimeout(resolve26, Math.min(25, Math.ceil(remaining))));
|
|
13202
13204
|
}
|
|
13203
13205
|
}
|
|
13204
13206
|
var LockContentionError, LockOwnershipError;
|
|
@@ -13317,7 +13319,7 @@ async function acquirePoolLock(spec, defaults, env3) {
|
|
|
13317
13319
|
});
|
|
13318
13320
|
}
|
|
13319
13321
|
const jitter = Math.floor(Math.random() * (options.retryMs + 1));
|
|
13320
|
-
await new Promise((
|
|
13322
|
+
await new Promise((resolve26) => setTimeout(resolve26, Math.min(options.retryMs + jitter, remaining)));
|
|
13321
13323
|
}
|
|
13322
13324
|
}
|
|
13323
13325
|
function definedOnly(spec) {
|
|
@@ -16588,11 +16590,11 @@ var init_quota_writer = __esm({
|
|
|
16588
16590
|
const left = deadline - performance.now();
|
|
16589
16591
|
if (left <= 0)
|
|
16590
16592
|
throw refusal2("pull", id, "lock-contention", `pool quota queue for ${id} is full (${POOL_QUOTA_QUEUE_LIMIT} readings) and the store locks stayed held`, true);
|
|
16591
|
-
await new Promise((
|
|
16593
|
+
await new Promise((resolve26) => {
|
|
16592
16594
|
const done = () => {
|
|
16593
16595
|
clearTimeout(timer);
|
|
16594
16596
|
this.wake.delete(done);
|
|
16595
|
-
|
|
16597
|
+
resolve26();
|
|
16596
16598
|
};
|
|
16597
16599
|
const timer = setTimeout(done, left);
|
|
16598
16600
|
this.wake.add(done);
|
|
@@ -19363,7 +19365,7 @@ async function select(terminal, items, options) {
|
|
|
19363
19365
|
writeLine("");
|
|
19364
19366
|
renderedLines = lines;
|
|
19365
19367
|
};
|
|
19366
|
-
return new Promise((
|
|
19368
|
+
return new Promise((resolve26) => {
|
|
19367
19369
|
const wasRaw = stdin.isRaw ?? false;
|
|
19368
19370
|
const cleanup2 = () => {
|
|
19369
19371
|
if (cleaned)
|
|
@@ -19383,7 +19385,7 @@ async function select(terminal, items, options) {
|
|
|
19383
19385
|
};
|
|
19384
19386
|
const finish = (value) => {
|
|
19385
19387
|
cleanup2();
|
|
19386
|
-
|
|
19388
|
+
resolve26(value);
|
|
19387
19389
|
};
|
|
19388
19390
|
const onSignal = () => finish(null);
|
|
19389
19391
|
const onKey = (data) => {
|
|
@@ -19423,7 +19425,7 @@ async function select(terminal, items, options) {
|
|
|
19423
19425
|
stdin.setRawMode(true);
|
|
19424
19426
|
} catch {
|
|
19425
19427
|
cleanup2();
|
|
19426
|
-
|
|
19428
|
+
resolve26(null);
|
|
19427
19429
|
return;
|
|
19428
19430
|
}
|
|
19429
19431
|
stdin.resume();
|
|
@@ -21469,10 +21471,10 @@ async function drainShutdown(pending, onTimeout) {
|
|
|
21469
21471
|
try {
|
|
21470
21472
|
await Promise.race([
|
|
21471
21473
|
drained,
|
|
21472
|
-
new Promise((
|
|
21474
|
+
new Promise((resolve26) => {
|
|
21473
21475
|
timer = setTimeout(() => {
|
|
21474
21476
|
expired = true;
|
|
21475
|
-
|
|
21477
|
+
resolve26();
|
|
21476
21478
|
}, 2e3);
|
|
21477
21479
|
})
|
|
21478
21480
|
]);
|
|
@@ -21546,15 +21548,27 @@ function credentialTypeOf(row, family) {
|
|
|
21546
21548
|
return notMine;
|
|
21547
21549
|
if (!row.categories.includes(family.category))
|
|
21548
21550
|
return notMine;
|
|
21549
|
-
if (row.credentialType !== "oauth" && row.credentialType !== "api_key")
|
|
21550
|
-
return notMine;
|
|
21551
21551
|
if ("classify" in family) {
|
|
21552
|
+
const metadata = rowFactsOf(row);
|
|
21553
|
+
let type;
|
|
21554
|
+
switch (metadata.authMethod) {
|
|
21555
|
+
case "apikey":
|
|
21556
|
+
type = "api_key";
|
|
21557
|
+
break;
|
|
21558
|
+
case "chatgpt":
|
|
21559
|
+
case "antigravity":
|
|
21560
|
+
case "oauth":
|
|
21561
|
+
type = "oauth";
|
|
21562
|
+
break;
|
|
21563
|
+
default:
|
|
21564
|
+
return { kind: "refused", code: "unknown-auth-method" };
|
|
21565
|
+
}
|
|
21552
21566
|
const facts = {
|
|
21553
21567
|
credentialId: row.id,
|
|
21554
|
-
credentialType:
|
|
21568
|
+
credentialType: type,
|
|
21555
21569
|
categories: row.categories,
|
|
21556
21570
|
refreshAdapter: row.refreshAdapter,
|
|
21557
|
-
...
|
|
21571
|
+
...metadata
|
|
21558
21572
|
};
|
|
21559
21573
|
if (facts.providerIds === void 0)
|
|
21560
21574
|
return { kind: "refused", code: "unmapped" };
|
|
@@ -21563,13 +21577,15 @@ function credentialTypeOf(row, family) {
|
|
|
21563
21577
|
if (result.kind === "not-mine")
|
|
21564
21578
|
return notMine;
|
|
21565
21579
|
if (result.kind === "mine" && typeof result.member === "string")
|
|
21566
|
-
return { kind: "mine", type
|
|
21580
|
+
return { kind: "mine", type, member: result.member };
|
|
21567
21581
|
if (result.kind === "refused" && typeof result.code === "string" && /^[a-z][a-z0-9-]{0,31}$/.test(result.code) && !result.code.includes("\n") && family.refusalCodes.includes(result.code))
|
|
21568
21582
|
return { kind: "refused", code: result.code };
|
|
21569
21583
|
} catch {
|
|
21570
21584
|
}
|
|
21571
21585
|
return { kind: "refused", code: "unclassified" };
|
|
21572
21586
|
}
|
|
21587
|
+
if (row.credentialType !== "oauth" && row.credentialType !== "api_key")
|
|
21588
|
+
return notMine;
|
|
21573
21589
|
if (row.credentialType === "oauth")
|
|
21574
21590
|
return row.refreshAdapter === family.refreshAdapter ? { kind: "mine", type: "oauth" } : notMine;
|
|
21575
21591
|
if (row.credentialType === "api_key" && family.apiKeys)
|
|
@@ -22716,7 +22732,7 @@ async function refreshVaultRoster(options) {
|
|
|
22716
22732
|
pendingDiscoveries.set(key, discovered);
|
|
22717
22733
|
throw error;
|
|
22718
22734
|
} finally {
|
|
22719
|
-
await lease.release();
|
|
22735
|
+
await lease.release(options.signal);
|
|
22720
22736
|
}
|
|
22721
22737
|
}
|
|
22722
22738
|
function resolveVaultPrimary(input2) {
|
|
@@ -23069,7 +23085,7 @@ var init_consumer = __esm({
|
|
|
23069
23085
|
this.#shutdown.signal,
|
|
23070
23086
|
...signal ? [signal] : []
|
|
23071
23087
|
]);
|
|
23072
|
-
return new Promise((
|
|
23088
|
+
return new Promise((resolve26, reject) => {
|
|
23073
23089
|
const cleanup2 = () => {
|
|
23074
23090
|
combined.signal.removeEventListener("abort", abort);
|
|
23075
23091
|
combined.dispose();
|
|
@@ -23084,7 +23100,7 @@ var init_consumer = __esm({
|
|
|
23084
23100
|
if (combined.signal.aborted)
|
|
23085
23101
|
reject(combined.signal.reason);
|
|
23086
23102
|
else
|
|
23087
|
-
|
|
23103
|
+
resolve26(value);
|
|
23088
23104
|
}, (error) => {
|
|
23089
23105
|
cleanup2();
|
|
23090
23106
|
reject(error);
|
|
@@ -23258,8 +23274,16 @@ var init_consumer = __esm({
|
|
|
23258
23274
|
this.#refreshing = void 0;
|
|
23259
23275
|
});
|
|
23260
23276
|
this.#track(this.#refreshing);
|
|
23277
|
+
this.#notifyDiscovery(this.#refreshing);
|
|
23261
23278
|
return this.#refreshing;
|
|
23262
23279
|
}
|
|
23280
|
+
#notifyDiscovery(promise) {
|
|
23281
|
+
try {
|
|
23282
|
+
this.#options.onDiscovery?.(promise);
|
|
23283
|
+
} catch (error) {
|
|
23284
|
+
this.#options.onError?.(error);
|
|
23285
|
+
}
|
|
23286
|
+
}
|
|
23263
23287
|
/**
|
|
23264
23288
|
* Poll in the background and open the vault and insula watches. Until the
|
|
23265
23289
|
* vault watch is accepted, and whenever it is unavailable, every tick lists
|
|
@@ -23489,6 +23513,13 @@ var init_consumer = __esm({
|
|
|
23489
23513
|
/** The hub's handle on this member's memory. */
|
|
23490
23514
|
#hubHooks() {
|
|
23491
23515
|
return {
|
|
23516
|
+
discovery: (promise) => {
|
|
23517
|
+
const hub = this.#hub;
|
|
23518
|
+
if (!hub || !this.#options.onDiscovery || this.#shutdown.signal.aborted)
|
|
23519
|
+
return;
|
|
23520
|
+
const discovery = this.#track(promise.then((outcome) => this.#hubOutcome(hub, outcome)));
|
|
23521
|
+
this.#notifyDiscovery(discovery);
|
|
23522
|
+
},
|
|
23492
23523
|
install: (roster) => {
|
|
23493
23524
|
if (this.#shutdown.signal.aborted)
|
|
23494
23525
|
return;
|
|
@@ -23523,6 +23554,9 @@ var init_consumer = __esm({
|
|
|
23523
23554
|
*/
|
|
23524
23555
|
async #hubRefresh(hub) {
|
|
23525
23556
|
const outcome = await hub.refresh();
|
|
23557
|
+
return this.#hubOutcome(hub, outcome);
|
|
23558
|
+
}
|
|
23559
|
+
#hubOutcome(hub, outcome) {
|
|
23526
23560
|
this.#assertOpen();
|
|
23527
23561
|
if (!outcome)
|
|
23528
23562
|
return void 0;
|
|
@@ -23677,6 +23711,8 @@ var init_consumer = __esm({
|
|
|
23677
23711
|
this.#assertOpen();
|
|
23678
23712
|
await declineVaultRoute(this.#options.rosterPath, routeId);
|
|
23679
23713
|
this.#roster = pendingVaultQuota(this.#options.rosterPath, await readVaultRoster(this.#options.rosterPath));
|
|
23714
|
+
if (this.#roster)
|
|
23715
|
+
this.#hub?.publishRoster(this.#roster);
|
|
23680
23716
|
if (this.#hub)
|
|
23681
23717
|
this.#hub.retainUnion();
|
|
23682
23718
|
else
|
|
@@ -23686,6 +23722,8 @@ var init_consumer = __esm({
|
|
|
23686
23722
|
this.#assertOpen();
|
|
23687
23723
|
await acceptVaultRoute(this.#options.rosterPath, routeId);
|
|
23688
23724
|
this.#roster = pendingVaultQuota(this.#options.rosterPath, await readVaultRoster(this.#options.rosterPath));
|
|
23725
|
+
if (this.#roster)
|
|
23726
|
+
this.#hub?.publishRoster(this.#roster);
|
|
23689
23727
|
}
|
|
23690
23728
|
/**
|
|
23691
23729
|
* Set the order vault accounts are tried in (`reorderVaultRoster`), then
|
|
@@ -23696,6 +23734,8 @@ var init_consumer = __esm({
|
|
|
23696
23734
|
this.#assertOpen();
|
|
23697
23735
|
const result = await reorderVaultRoster(this.#options.rosterPath, routeIds);
|
|
23698
23736
|
this.#roster = pendingVaultQuota(this.#options.rosterPath, await readVaultRoster(this.#options.rosterPath));
|
|
23737
|
+
if (this.#roster)
|
|
23738
|
+
this.#hub?.publishRoster(this.#roster);
|
|
23699
23739
|
return result;
|
|
23700
23740
|
}
|
|
23701
23741
|
/**
|
|
@@ -23773,7 +23813,7 @@ var init_consumer = __esm({
|
|
|
23773
23813
|
// ../core/dist/common-auth-embedded/claustrum/hub.js
|
|
23774
23814
|
import { createHash as createHash8 } from "node:crypto";
|
|
23775
23815
|
import { readdir, stat as stat6 } from "node:fs/promises";
|
|
23776
|
-
import { dirname as dirname10, join as join7 } from "node:path";
|
|
23816
|
+
import { dirname as dirname10, join as join7, resolve as resolve9 } from "node:path";
|
|
23777
23817
|
function canonicalJson3(value, path5 = /* @__PURE__ */ new Set()) {
|
|
23778
23818
|
if (value === null)
|
|
23779
23819
|
return "null";
|
|
@@ -23834,12 +23874,12 @@ function unreachableConnect2() {
|
|
|
23834
23874
|
return new ClaustrumUnreachableError();
|
|
23835
23875
|
}
|
|
23836
23876
|
function untilAborted(pending, signal) {
|
|
23837
|
-
return new Promise((
|
|
23877
|
+
return new Promise((resolve26, reject) => {
|
|
23838
23878
|
const abort = () => reject(signal.reason);
|
|
23839
23879
|
signal.addEventListener("abort", abort, { once: true });
|
|
23840
23880
|
pending.then((value) => {
|
|
23841
23881
|
signal.removeEventListener("abort", abort);
|
|
23842
|
-
|
|
23882
|
+
resolve26(value);
|
|
23843
23883
|
}, (error) => {
|
|
23844
23884
|
signal.removeEventListener("abort", abort);
|
|
23845
23885
|
reject(error);
|
|
@@ -23851,7 +23891,7 @@ function untilAborted(pending, signal) {
|
|
|
23851
23891
|
function enabledRows(roster) {
|
|
23852
23892
|
return JSON.stringify((roster?.rows ?? []).map((row) => [row.credentialId, row.enabled]));
|
|
23853
23893
|
}
|
|
23854
|
-
var FILE_ID, WINDOWS_DEVICE, FINGERPRINT, PENDING_EVERY_TICK, ClaustrumDiscoveryHub;
|
|
23894
|
+
var sharedRosters, FILE_ID, WINDOWS_DEVICE, FINGERPRINT, PENDING_EVERY_TICK, ClaustrumDiscoveryHub;
|
|
23855
23895
|
var init_hub = __esm({
|
|
23856
23896
|
"../core/dist/common-auth-embedded/claustrum/hub.js"() {
|
|
23857
23897
|
"use strict";
|
|
@@ -23865,6 +23905,7 @@ var init_hub = __esm({
|
|
|
23865
23905
|
init_roster();
|
|
23866
23906
|
init_shutdown();
|
|
23867
23907
|
init_watch();
|
|
23908
|
+
sharedRosters = /* @__PURE__ */ new Map();
|
|
23868
23909
|
FILE_ID = /^[a-z0-9][a-z0-9._-]{0,63}$/;
|
|
23869
23910
|
WINDOWS_DEVICE = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\.|$)/;
|
|
23870
23911
|
FINGERPRINT = /^[0-9a-f]{16}$/;
|
|
@@ -23971,9 +24012,11 @@ var init_hub = __esm({
|
|
|
23971
24012
|
watchMode: () => this.watchState(),
|
|
23972
24013
|
keptReceiptState: () => this.keptReceiptState(),
|
|
23973
24014
|
retainUnion: () => this.#retainUnion(),
|
|
24015
|
+
publishRoster: (roster) => this.#publishRoster(entry, roster),
|
|
23974
24016
|
forget: (credentialId) => this.#current?.custody?.forget(credentialId),
|
|
23975
24017
|
detach: () => {
|
|
23976
24018
|
entry.closed = true;
|
|
24019
|
+
entry.releaseRoster?.();
|
|
23977
24020
|
}
|
|
23978
24021
|
};
|
|
23979
24022
|
const consumerOptions = {
|
|
@@ -23986,14 +24029,51 @@ var init_hub = __esm({
|
|
|
23986
24029
|
},
|
|
23987
24030
|
...this.#options.mapAccount && { mapAccount: this.#options.mapAccount },
|
|
23988
24031
|
...options.onRoster && { onRoster: options.onRoster },
|
|
24032
|
+
...options.onDiscovery && { onDiscovery: options.onDiscovery },
|
|
23989
24033
|
...options.onError && { onError: options.onError },
|
|
23990
24034
|
logger: options.logger ?? this.#logger,
|
|
23991
24035
|
...this.#options.now && { now: this.#options.now }
|
|
23992
24036
|
};
|
|
23993
24037
|
const { consumer, hooks } = createHubMember(port, consumerOptions);
|
|
23994
24038
|
entry.hooks = hooks;
|
|
24039
|
+
const path5 = resolve9(entry.path);
|
|
24040
|
+
const subscribers = sharedRosters.get(path5) ?? /* @__PURE__ */ new Set();
|
|
24041
|
+
const install = (roster) => {
|
|
24042
|
+
if (entry.closed || this.#active !== true || !this.#current || !this.#live(this.#current) || !hooks.roster() || this.#collides(hooks, roster))
|
|
24043
|
+
return;
|
|
24044
|
+
entry.seen = JSON.stringify(decodedVaultRoster(roster));
|
|
24045
|
+
hooks.install(roster);
|
|
24046
|
+
if (roster.view !== this.#committed?.view)
|
|
24047
|
+
entry.pending ??= { failures: 0, wait: 0 };
|
|
24048
|
+
this.#retainUnion();
|
|
24049
|
+
};
|
|
24050
|
+
subscribers.add(install);
|
|
24051
|
+
entry.receiveRoster = install;
|
|
24052
|
+
sharedRosters.set(path5, subscribers);
|
|
24053
|
+
let subscribed = true;
|
|
24054
|
+
entry.releaseRoster = () => {
|
|
24055
|
+
if (!subscribed)
|
|
24056
|
+
return;
|
|
24057
|
+
subscribed = false;
|
|
24058
|
+
subscribers.delete(install);
|
|
24059
|
+
if (!subscribers.size)
|
|
24060
|
+
sharedRosters.delete(path5);
|
|
24061
|
+
};
|
|
23995
24062
|
return consumer;
|
|
23996
24063
|
}
|
|
24064
|
+
#publishRoster(entry, roster) {
|
|
24065
|
+
const generation = this.#current;
|
|
24066
|
+
if (entry.closed || !generation || !this.#live(generation))
|
|
24067
|
+
return;
|
|
24068
|
+
entry.seen = JSON.stringify(decodedVaultRoster(roster));
|
|
24069
|
+
entry.hooks?.install(roster);
|
|
24070
|
+
for (const install of sharedRosters.get(resolve9(entry.path)) ?? []) {
|
|
24071
|
+
if (!this.#live(generation))
|
|
24072
|
+
return;
|
|
24073
|
+
if (install !== entry.receiveRoster)
|
|
24074
|
+
install(roster);
|
|
24075
|
+
}
|
|
24076
|
+
}
|
|
23997
24077
|
// --- leases ---
|
|
23998
24078
|
#startGeneration() {
|
|
23999
24079
|
const generation = {
|
|
@@ -24289,6 +24369,8 @@ var init_hub = __esm({
|
|
|
24289
24369
|
}));
|
|
24290
24370
|
run.promise = promise;
|
|
24291
24371
|
this.#run = run;
|
|
24372
|
+
for (const entry of this.#open())
|
|
24373
|
+
entry.hooks?.discovery(promise);
|
|
24292
24374
|
return promise;
|
|
24293
24375
|
}
|
|
24294
24376
|
/**
|
|
@@ -24365,9 +24447,7 @@ var init_hub = __esm({
|
|
|
24365
24447
|
this.#markPending(entry);
|
|
24366
24448
|
continue;
|
|
24367
24449
|
}
|
|
24368
|
-
entry
|
|
24369
|
-
if (!entry.closed)
|
|
24370
|
-
hooks.install(roster);
|
|
24450
|
+
this.#publishRoster(entry, roster);
|
|
24371
24451
|
}
|
|
24372
24452
|
if (!this.#live(generation))
|
|
24373
24453
|
return void 0;
|
|
@@ -24522,7 +24602,7 @@ var init_hub = __esm({
|
|
|
24522
24602
|
}
|
|
24523
24603
|
const before = enabledRows(memory);
|
|
24524
24604
|
entry.seen = content;
|
|
24525
|
-
|
|
24605
|
+
this.#publishRoster(entry, file);
|
|
24526
24606
|
if (enabledRows(hooks.roster()) !== before)
|
|
24527
24607
|
this.#retainUnion();
|
|
24528
24608
|
}
|
|
@@ -24679,6 +24759,8 @@ var init_hub = __esm({
|
|
|
24679
24759
|
if (this.#shutdown.signal.aborted)
|
|
24680
24760
|
return;
|
|
24681
24761
|
this.#shutdown.abort(closed("Claustrum discovery hub is closed"));
|
|
24762
|
+
for (const entry of this.#members.values())
|
|
24763
|
+
entry.releaseRoster?.();
|
|
24682
24764
|
if (this.#timer)
|
|
24683
24765
|
(this.#options.clearTimeoutImpl ?? clearTimeout)(this.#timer);
|
|
24684
24766
|
this.#timer = void 0;
|
|
@@ -25013,7 +25095,7 @@ var init_lock = __esm({
|
|
|
25013
25095
|
import { createHash as createHash9 } from "node:crypto";
|
|
25014
25096
|
import { constants as constants2 } from "node:fs";
|
|
25015
25097
|
import { lstat as lstat5, mkdir as mkdir10, open as open7, unlink as unlink7 } from "node:fs/promises";
|
|
25016
|
-
import { dirname as dirname11, resolve as
|
|
25098
|
+
import { dirname as dirname11, resolve as resolve10 } from "node:path";
|
|
25017
25099
|
import { setTimeout as sleep2 } from "node:timers/promises";
|
|
25018
25100
|
function rootSpans(text2) {
|
|
25019
25101
|
let i = text2.indexOf("{") + 1;
|
|
@@ -25214,8 +25296,8 @@ function createPiSlot(options, onStep, hooks) {
|
|
|
25214
25296
|
if (!provider2 || !options.authPath || !options.stashPath || !placeholderKey || placeholderKey.startsWith("!") || placeholderKey.includes("$") || !Number.isFinite(timeout) || timeout < 0) {
|
|
25215
25297
|
throw new PiSlotError("invalid-options");
|
|
25216
25298
|
}
|
|
25217
|
-
const authPath =
|
|
25218
|
-
const stashPath =
|
|
25299
|
+
const authPath = resolve10(options.authPath);
|
|
25300
|
+
const stashPath = resolve10(options.stashPath);
|
|
25219
25301
|
if (authPath === stashPath || stashPath === `${authPath}.lock`) {
|
|
25220
25302
|
throw new PiSlotError("invalid-options");
|
|
25221
25303
|
}
|
|
@@ -25838,8 +25920,8 @@ function getDefaultTierId(allowedTiers) {
|
|
|
25838
25920
|
return allowedTiers[0]?.id;
|
|
25839
25921
|
}
|
|
25840
25922
|
function wait(ms) {
|
|
25841
|
-
return new Promise((
|
|
25842
|
-
setTimeout(
|
|
25923
|
+
return new Promise((resolve26) => {
|
|
25924
|
+
setTimeout(resolve26, ms);
|
|
25843
25925
|
});
|
|
25844
25926
|
}
|
|
25845
25927
|
function extractManagedProjectId(payload) {
|
|
@@ -28161,12 +28243,12 @@ var init_vault_provider_state = __esm({
|
|
|
28161
28243
|
function untilAborted2(pending, signal) {
|
|
28162
28244
|
if (!signal)
|
|
28163
28245
|
return pending;
|
|
28164
|
-
return new Promise((
|
|
28246
|
+
return new Promise((resolve26, reject) => {
|
|
28165
28247
|
const abort = () => reject(signal.reason);
|
|
28166
28248
|
signal.addEventListener("abort", abort, { once: true });
|
|
28167
28249
|
if (signal.aborted)
|
|
28168
28250
|
abort();
|
|
28169
|
-
pending.then(
|
|
28251
|
+
pending.then(resolve26, reject).finally(() => signal.removeEventListener("abort", abort));
|
|
28170
28252
|
});
|
|
28171
28253
|
}
|
|
28172
28254
|
async function resolveClaustrumConnectionPath(explicit) {
|
|
@@ -28640,7 +28722,7 @@ var init_capture_sink2 = __esm({
|
|
|
28640
28722
|
import { randomUUID as randomUUID13 } from "node:crypto";
|
|
28641
28723
|
import { lstat as lstat6, readFile as readFile8, rename as rename8, unlink as unlink8 } from "node:fs/promises";
|
|
28642
28724
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
28643
|
-
import { dirname as dirname13, join as join9, resolve as
|
|
28725
|
+
import { dirname as dirname13, join as join9, resolve as resolve11 } from "node:path";
|
|
28644
28726
|
function ioCode2(detail) {
|
|
28645
28727
|
if (detail?.reason === "io-error") {
|
|
28646
28728
|
if (detail.win32Code === 2 || detail.win32Code === 3)
|
|
@@ -28687,7 +28769,7 @@ async function privateOperation2(path5, stage, operation) {
|
|
|
28687
28769
|
}
|
|
28688
28770
|
}
|
|
28689
28771
|
async function verifySafeDirectory2(path5, options) {
|
|
28690
|
-
path5 =
|
|
28772
|
+
path5 = resolve11(path5);
|
|
28691
28773
|
options ??= safeParentOptionsForTest2;
|
|
28692
28774
|
await privateOperation2(path5, "safe-parent", async () => {
|
|
28693
28775
|
const result = await (await loadBackend2()).verifySafeParent(path5, options);
|
|
@@ -28702,7 +28784,7 @@ async function verifySafeDirectory2(path5, options) {
|
|
|
28702
28784
|
});
|
|
28703
28785
|
}
|
|
28704
28786
|
async function verifyPrivate2(path5, kind, migrate = false) {
|
|
28705
|
-
path5 =
|
|
28787
|
+
path5 = resolve11(path5);
|
|
28706
28788
|
if (kind === "directory")
|
|
28707
28789
|
return verifySafeDirectory2(path5);
|
|
28708
28790
|
await privateOperation2(path5, "verify", async () => {
|
|
@@ -28737,7 +28819,7 @@ async function verifyPrivate2(path5, kind, migrate = false) {
|
|
|
28737
28819
|
});
|
|
28738
28820
|
}
|
|
28739
28821
|
async function ensurePrivateDirectory2(path5, _migrate = false, options) {
|
|
28740
|
-
path5 =
|
|
28822
|
+
path5 = resolve11(path5);
|
|
28741
28823
|
await privateOperation2(path5, "directory", async () => {
|
|
28742
28824
|
const api = await loadBackend2();
|
|
28743
28825
|
try {
|
|
@@ -28768,7 +28850,7 @@ async function readPrivateText2(path5, migrate = false) {
|
|
|
28768
28850
|
async function readPrivateBuffer2(path5, migrate = false) {
|
|
28769
28851
|
if (!windowsPrivateFiles2)
|
|
28770
28852
|
return readFile8(path5);
|
|
28771
|
-
path5 =
|
|
28853
|
+
path5 = resolve11(path5);
|
|
28772
28854
|
if (migrate) {
|
|
28773
28855
|
await verifySafeDirectory2(dirname13(path5));
|
|
28774
28856
|
await verifyPrivate2(path5, "file", true);
|
|
@@ -28776,20 +28858,20 @@ async function readPrivateBuffer2(path5, migrate = false) {
|
|
|
28776
28858
|
return privateOperation2(path5, "read", async () => (await loadBackend2()).readOwnerOnly(path5));
|
|
28777
28859
|
}
|
|
28778
28860
|
async function createPrivateBytes2(path5, bytes) {
|
|
28779
|
-
await verifySafeDirectory2(dirname13(
|
|
28861
|
+
await verifySafeDirectory2(dirname13(resolve11(path5)));
|
|
28780
28862
|
await privateOperation2(path5, "create", async () => {
|
|
28781
|
-
await (await loadBackend2()).createPrivateFile(
|
|
28863
|
+
await (await loadBackend2()).createPrivateFile(resolve11(path5), bytes);
|
|
28782
28864
|
});
|
|
28783
28865
|
}
|
|
28784
28866
|
async function createPrivateDirectoryExclusive2(path5) {
|
|
28785
|
-
await verifySafeDirectory2(dirname13(
|
|
28867
|
+
await verifySafeDirectory2(dirname13(resolve11(path5)));
|
|
28786
28868
|
await privateOperation2(path5, "directory-create", async () => {
|
|
28787
|
-
await (await loadBackend2()).createOwnerOnly(
|
|
28869
|
+
await (await loadBackend2()).createOwnerOnly(resolve11(path5), { kind: "dir" });
|
|
28788
28870
|
});
|
|
28789
28871
|
}
|
|
28790
28872
|
async function replaceWindowsFile2(from, to, options = {}) {
|
|
28791
|
-
from =
|
|
28792
|
-
to =
|
|
28873
|
+
from = resolve11(from);
|
|
28874
|
+
to = resolve11(to);
|
|
28793
28875
|
const now = options.now ?? (() => performance.now());
|
|
28794
28876
|
const start = now();
|
|
28795
28877
|
const leaseDeadline = options.deadline ?? Infinity;
|
|
@@ -28832,7 +28914,7 @@ async function replaceWindowsFile2(from, to, options = {}) {
|
|
|
28832
28914
|
throw error;
|
|
28833
28915
|
}
|
|
28834
28916
|
async function writePrivateAtomic2(path5, bytes, options = {}) {
|
|
28835
|
-
path5 =
|
|
28917
|
+
path5 = resolve11(path5);
|
|
28836
28918
|
await ensurePrivateDirectory2(dirname13(path5));
|
|
28837
28919
|
try {
|
|
28838
28920
|
await verifyPrivate2(path5, "file", true);
|
|
@@ -28840,7 +28922,7 @@ async function writePrivateAtomic2(path5, bytes, options = {}) {
|
|
|
28840
28922
|
if (error.code !== "ENOENT")
|
|
28841
28923
|
throw error;
|
|
28842
28924
|
}
|
|
28843
|
-
const stage =
|
|
28925
|
+
const stage = resolve11(options.stagePath ?? `${path5}.${randomUUID13()}.tmp`);
|
|
28844
28926
|
if (dirname13(stage) !== dirname13(path5))
|
|
28845
28927
|
throw new PrivateFileError2(path5, "stage-directory", { code: "EXDEV" });
|
|
28846
28928
|
let created = false;
|
|
@@ -29006,7 +29088,7 @@ var init_redact2 = __esm({
|
|
|
29006
29088
|
// src/common-auth-embedded/logger/engine.js
|
|
29007
29089
|
import { appendFileSync as appendFileSync2, chmodSync as chmodSync2, existsSync as existsSync2, renameSync as renameSync2, statSync as statSync3 } from "node:fs";
|
|
29008
29090
|
import { open as open8 } from "node:fs/promises";
|
|
29009
|
-
import { dirname as dirname14, resolve as
|
|
29091
|
+
import { dirname as dirname14, resolve as resolve12 } from "node:path";
|
|
29010
29092
|
function chmodPrivate2(path5) {
|
|
29011
29093
|
try {
|
|
29012
29094
|
chmodSync2(path5, 384);
|
|
@@ -29057,7 +29139,7 @@ async function openWindowsFile2(sink, file) {
|
|
|
29057
29139
|
return sink.handle;
|
|
29058
29140
|
}
|
|
29059
29141
|
async function flushWindowsFile2(sink, file, text2) {
|
|
29060
|
-
file =
|
|
29142
|
+
file = resolve12(file);
|
|
29061
29143
|
try {
|
|
29062
29144
|
if (sink.file !== file)
|
|
29063
29145
|
await closeWindowsFile2(sink);
|
|
@@ -30116,11 +30198,11 @@ function createOpenCodeVaultCustody(options) {
|
|
|
30116
30198
|
].join("\n");
|
|
30117
30199
|
const waitForApproval = async () => {
|
|
30118
30200
|
while (!closed2) {
|
|
30119
|
-
await new Promise((
|
|
30201
|
+
await new Promise((resolve26) => {
|
|
30120
30202
|
const done = () => {
|
|
30121
30203
|
clearTimeout(timer);
|
|
30122
30204
|
cancelWait = void 0;
|
|
30123
|
-
|
|
30205
|
+
resolve26();
|
|
30124
30206
|
};
|
|
30125
30207
|
const timer = setTimeout(done, 2e3);
|
|
30126
30208
|
timer.unref?.();
|
|
@@ -30507,7 +30589,7 @@ import { randomUUID as randomUUID14 } from "node:crypto";
|
|
|
30507
30589
|
import { realpathSync, rmSync } from "node:fs";
|
|
30508
30590
|
import { chmod as chmod4, mkdir as mkdir12, readFile as readFile10, rename as rename9, rm as rm5, writeFile as writeFile3 } from "node:fs/promises";
|
|
30509
30591
|
import { homedir as homedir2 } from "node:os";
|
|
30510
|
-
import { join as join11, resolve as
|
|
30592
|
+
import { join as join11, resolve as resolve13 } from "node:path";
|
|
30511
30593
|
function processHeartbeatDir() {
|
|
30512
30594
|
const base = process.env.XDG_STATE_HOME || join11(homedir2(), ".local", "state");
|
|
30513
30595
|
return join11(base, "cortexkit", "antigravity-auth", "processes");
|
|
@@ -30520,7 +30602,7 @@ function processConfigFolderKey() {
|
|
|
30520
30602
|
try {
|
|
30521
30603
|
return realpathSync.native(folder);
|
|
30522
30604
|
} catch {
|
|
30523
|
-
return
|
|
30605
|
+
return resolve13(folder);
|
|
30524
30606
|
}
|
|
30525
30607
|
}
|
|
30526
30608
|
function processHasOlderGeneration() {
|
|
@@ -30966,7 +31048,7 @@ import {
|
|
|
30966
31048
|
stat as stat9,
|
|
30967
31049
|
unlink as unlink9
|
|
30968
31050
|
} from "node:fs/promises";
|
|
30969
|
-
import { basename as basename4, dirname as dirname15, join as join13, resolve as
|
|
31051
|
+
import { basename as basename4, dirname as dirname15, join as join13, resolve as resolve14 } from "node:path";
|
|
30970
31052
|
function refusalMessage(stateDir, errorClass2) {
|
|
30971
31053
|
if (errorClass2 === "ERR_PRIVATE_FILES_SECURITY")
|
|
30972
31054
|
return `antigravity-auth cannot start: ${stateDir} is not a folder only your user can access, or it is a link, so the plugin will not use it (${errorClass2}). Replace it with a plain folder of your own, then restart OpenCode.`;
|
|
@@ -31821,7 +31903,7 @@ async function isVaultShapedKeptState(files) {
|
|
|
31821
31903
|
async function removeMovedVaultStateLeftover(vaultDir, accountFile) {
|
|
31822
31904
|
const location = runtimeLayoutLocation();
|
|
31823
31905
|
const files = layoutFiles(location, accountFile);
|
|
31824
|
-
if (
|
|
31906
|
+
if (resolve14(vaultDir) !== resolve14(files.vault.next)) return;
|
|
31825
31907
|
const stateDir = location.stateHomeDir;
|
|
31826
31908
|
const marker = await readMarker(
|
|
31827
31909
|
join13(stateDir, RUNTIME_LAYOUT_MARKER_FILE),
|
|
@@ -32249,7 +32331,7 @@ import {
|
|
|
32249
32331
|
writeFileSync
|
|
32250
32332
|
} from "node:fs";
|
|
32251
32333
|
import { homedir as homedir4 } from "node:os";
|
|
32252
|
-
import { dirname as dirname16, join as join14, resolve as
|
|
32334
|
+
import { dirname as dirname16, join as join14, resolve as resolve15 } from "node:path";
|
|
32253
32335
|
async function ensureGitignore(configDir) {
|
|
32254
32336
|
const gitignorePath = join14(configDir, ".gitignore");
|
|
32255
32337
|
try {
|
|
@@ -32349,8 +32431,8 @@ function migrateLegacyWindowsConfig() {
|
|
|
32349
32431
|
}
|
|
32350
32432
|
}
|
|
32351
32433
|
function resolveWindowsAccountAnchor(newPath, legacyPath) {
|
|
32352
|
-
const standard =
|
|
32353
|
-
const legacy =
|
|
32434
|
+
const standard = resolve15(newPath);
|
|
32435
|
+
const legacy = resolve15(legacyPath);
|
|
32354
32436
|
if (standard.toLowerCase() === legacy.toLowerCase()) return newPath;
|
|
32355
32437
|
const standardPointer = existsSync3(accountStorePointerPath(standard));
|
|
32356
32438
|
const legacyPointer = existsSync3(accountStorePointerPath(legacy));
|
|
@@ -32372,7 +32454,7 @@ function getStoragePathWithMigration() {
|
|
|
32372
32454
|
"antigravity-accounts.json"
|
|
32373
32455
|
);
|
|
32374
32456
|
const anchored = resolveWindowsAccountAnchor(newPath, legacyPath);
|
|
32375
|
-
if (
|
|
32457
|
+
if (resolve15(anchored).toLowerCase() !== resolve15(newPath).toLowerCase() && !existsSync3(accountStorePointerPath(resolve15(anchored)))) {
|
|
32376
32458
|
log5.info("Using legacy Windows config path (migration failed)", {
|
|
32377
32459
|
legacyPath,
|
|
32378
32460
|
newPath
|
|
@@ -32389,7 +32471,7 @@ function accountFileForVault(configDir = getConfigDir()) {
|
|
|
32389
32471
|
const configured = join14(configDir, "antigravity-accounts.json");
|
|
32390
32472
|
if (process.platform !== "win32") return configured;
|
|
32391
32473
|
const legacyDir = getLegacyWindowsConfigDir();
|
|
32392
|
-
if (
|
|
32474
|
+
if (resolve15(configDir).toLowerCase() === resolve15(legacyDir).toLowerCase())
|
|
32393
32475
|
return configured;
|
|
32394
32476
|
const configuredVault = join14(configDir, "antigravity-auth-vault");
|
|
32395
32477
|
const legacyVault = join14(legacyDir, "antigravity-auth-vault");
|
|
@@ -32420,7 +32502,7 @@ function getStoragePath() {
|
|
|
32420
32502
|
}
|
|
32421
32503
|
async function assertLegacyPoolInUse(legacyPath) {
|
|
32422
32504
|
try {
|
|
32423
|
-
await assertLegacyAccountStorageWritable(
|
|
32505
|
+
await assertLegacyAccountStorageWritable(resolve15(legacyPath));
|
|
32424
32506
|
} catch (error) {
|
|
32425
32507
|
throw new LegacyAccountPoolRetiredError(legacyPath, { cause: error });
|
|
32426
32508
|
}
|
|
@@ -32438,7 +32520,7 @@ function refusalMessage2(admission) {
|
|
|
32438
32520
|
async function bindingOf(options) {
|
|
32439
32521
|
if (options.legacyPath === void 0) await prepareLocalAccountStore();
|
|
32440
32522
|
const now = options.now ?? (() => Date.now());
|
|
32441
|
-
const legacyPath =
|
|
32523
|
+
const legacyPath = resolve15(options.legacyPath ?? getStoragePath());
|
|
32442
32524
|
return {
|
|
32443
32525
|
legacyPath,
|
|
32444
32526
|
now,
|
|
@@ -32507,7 +32589,7 @@ async function openAccountStore(options) {
|
|
|
32507
32589
|
async function initializeFreshAccountStoreFor(modules, options = {}) {
|
|
32508
32590
|
if (options.legacyPath === void 0) await prepareLocalAccountStore();
|
|
32509
32591
|
return initializeFreshAccountStore(modules, {
|
|
32510
|
-
legacyPath:
|
|
32592
|
+
legacyPath: resolve15(options.legacyPath ?? getStoragePath()),
|
|
32511
32593
|
now: options.now ?? (() => Date.now())
|
|
32512
32594
|
});
|
|
32513
32595
|
}
|
|
@@ -32585,12 +32667,12 @@ var init_storage = __esm({
|
|
|
32585
32667
|
import { createHash as createHash12 } from "node:crypto";
|
|
32586
32668
|
import { existsSync as existsSync4, promises as fs2, readFileSync as readFileSync2, realpathSync as realpathSync2 } from "node:fs";
|
|
32587
32669
|
import { homedir as homedir5 } from "node:os";
|
|
32588
|
-
import { dirname as dirname17, join as join15, resolve as
|
|
32670
|
+
import { dirname as dirname17, join as join15, resolve as resolve16 } from "node:path";
|
|
32589
32671
|
function configDirIdentity(path5) {
|
|
32590
32672
|
try {
|
|
32591
32673
|
return realpathSync2.native(path5);
|
|
32592
32674
|
} catch {
|
|
32593
|
-
return
|
|
32675
|
+
return resolve16(path5);
|
|
32594
32676
|
}
|
|
32595
32677
|
}
|
|
32596
32678
|
function decisionKey(location) {
|
|
@@ -33043,13 +33125,13 @@ function closeDebugStream(state) {
|
|
|
33043
33125
|
state.logWriter = () => {
|
|
33044
33126
|
};
|
|
33045
33127
|
if (state.logFilePath) liveLogFilePaths.delete(state.logFilePath);
|
|
33046
|
-
return new Promise((
|
|
33047
|
-
current.once("close", () =>
|
|
33048
|
-
current.once("error", () =>
|
|
33128
|
+
return new Promise((resolve26) => {
|
|
33129
|
+
current.once("close", () => resolve26());
|
|
33130
|
+
current.once("error", () => resolve26());
|
|
33049
33131
|
try {
|
|
33050
33132
|
current.end();
|
|
33051
33133
|
} catch {
|
|
33052
|
-
|
|
33134
|
+
resolve26();
|
|
33053
33135
|
}
|
|
33054
33136
|
});
|
|
33055
33137
|
}
|
|
@@ -33314,13 +33396,13 @@ function closeDebugLog() {
|
|
|
33314
33396
|
if (!state || !current) return Promise.resolve();
|
|
33315
33397
|
state.logStream = null;
|
|
33316
33398
|
if (state.logFilePath) liveLogFilePaths.delete(state.logFilePath);
|
|
33317
|
-
return new Promise((
|
|
33318
|
-
current.once("close", () =>
|
|
33319
|
-
current.once("error", () =>
|
|
33399
|
+
return new Promise((resolve26) => {
|
|
33400
|
+
current.once("close", () => resolve26());
|
|
33401
|
+
current.once("error", () => resolve26());
|
|
33320
33402
|
try {
|
|
33321
33403
|
current.end();
|
|
33322
33404
|
} catch {
|
|
33323
|
-
|
|
33405
|
+
resolve26();
|
|
33324
33406
|
}
|
|
33325
33407
|
});
|
|
33326
33408
|
}
|
|
@@ -33531,13 +33613,13 @@ var init_logger4 = __esm({
|
|
|
33531
33613
|
// src/plugin/index.ts
|
|
33532
33614
|
init_dist();
|
|
33533
33615
|
import { createHash as createHash23, randomUUID as randomUUID21 } from "node:crypto";
|
|
33534
|
-
import { join as join38, resolve as
|
|
33616
|
+
import { join as join38, resolve as resolve25 } from "node:path";
|
|
33535
33617
|
|
|
33536
33618
|
// src/cli.ts
|
|
33537
33619
|
init_dist();
|
|
33538
33620
|
import { execFile } from "node:child_process";
|
|
33539
33621
|
import { realpathSync as realpathSync4 } from "node:fs";
|
|
33540
|
-
import { resolve as
|
|
33622
|
+
import { resolve as resolve20 } from "node:path";
|
|
33541
33623
|
import { createInterface } from "node:readline/promises";
|
|
33542
33624
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
33543
33625
|
import { promisify } from "node:util";
|
|
@@ -34188,7 +34270,7 @@ function drainSidebarWrites() {
|
|
|
34188
34270
|
return sidebarWriteChain;
|
|
34189
34271
|
}
|
|
34190
34272
|
async function sleep3(ms) {
|
|
34191
|
-
await new Promise((
|
|
34273
|
+
await new Promise((resolve26) => setTimeout(resolve26, ms));
|
|
34192
34274
|
}
|
|
34193
34275
|
async function acquireSidebarLockWithRetry(stateFile) {
|
|
34194
34276
|
const start = Date.now();
|
|
@@ -35040,14 +35122,14 @@ var LocalQuotaGrantStaleError = class extends Error {
|
|
|
35040
35122
|
name = "LocalQuotaGrantStaleError";
|
|
35041
35123
|
};
|
|
35042
35124
|
function untilQuotaAborted(pending, signal) {
|
|
35043
|
-
return new Promise((
|
|
35125
|
+
return new Promise((resolve26, reject) => {
|
|
35044
35126
|
const abort = () => reject(signal.reason);
|
|
35045
35127
|
if (signal.aborted) abort();
|
|
35046
35128
|
else signal.addEventListener("abort", abort, { once: true });
|
|
35047
35129
|
void pending.then(
|
|
35048
35130
|
(value) => {
|
|
35049
35131
|
signal.removeEventListener("abort", abort);
|
|
35050
|
-
|
|
35132
|
+
resolve26(value);
|
|
35051
35133
|
},
|
|
35052
35134
|
(error) => {
|
|
35053
35135
|
signal.removeEventListener("abort", abort);
|
|
@@ -35668,12 +35750,12 @@ async function startOAuthListener({
|
|
|
35668
35750
|
let resolveCallback;
|
|
35669
35751
|
let rejectCallback;
|
|
35670
35752
|
let timeoutHandle;
|
|
35671
|
-
const callbackPromise = new Promise((
|
|
35753
|
+
const callbackPromise = new Promise((resolve26, reject) => {
|
|
35672
35754
|
resolveCallback = (url) => {
|
|
35673
35755
|
if (settled) return;
|
|
35674
35756
|
settled = true;
|
|
35675
35757
|
if (timeoutHandle) clearTimeout(timeoutHandle);
|
|
35676
|
-
|
|
35758
|
+
resolve26(url);
|
|
35677
35759
|
};
|
|
35678
35760
|
rejectCallback = (error) => {
|
|
35679
35761
|
if (settled) return;
|
|
@@ -35832,7 +35914,7 @@ async function startOAuthListener({
|
|
|
35832
35914
|
});
|
|
35833
35915
|
});
|
|
35834
35916
|
const bindAddress = getBindAddress();
|
|
35835
|
-
await new Promise((
|
|
35917
|
+
await new Promise((resolve26, reject) => {
|
|
35836
35918
|
const handleError = (error) => {
|
|
35837
35919
|
server.off("error", handleError);
|
|
35838
35920
|
if (error.code === "EADDRINUSE") {
|
|
@@ -35848,7 +35930,7 @@ async function startOAuthListener({
|
|
|
35848
35930
|
server.once("error", handleError);
|
|
35849
35931
|
server.listen(port, bindAddress, () => {
|
|
35850
35932
|
server.off("error", handleError);
|
|
35851
|
-
|
|
35933
|
+
resolve26();
|
|
35852
35934
|
});
|
|
35853
35935
|
});
|
|
35854
35936
|
server.on("error", (error) => {
|
|
@@ -35856,7 +35938,7 @@ async function startOAuthListener({
|
|
|
35856
35938
|
});
|
|
35857
35939
|
return {
|
|
35858
35940
|
waitForCallback: () => callbackPromise,
|
|
35859
|
-
close: () => new Promise((
|
|
35941
|
+
close: () => new Promise((resolve26, reject) => {
|
|
35860
35942
|
server.close((error) => {
|
|
35861
35943
|
if (error && error.code !== "ERR_SERVER_NOT_RUNNING") {
|
|
35862
35944
|
reject(error);
|
|
@@ -35865,7 +35947,7 @@ async function startOAuthListener({
|
|
|
35865
35947
|
if (!settled) {
|
|
35866
35948
|
rejectCallback(new Error("OAuth listener closed before callback"));
|
|
35867
35949
|
}
|
|
35868
|
-
|
|
35950
|
+
resolve26();
|
|
35869
35951
|
});
|
|
35870
35952
|
})
|
|
35871
35953
|
};
|
|
@@ -35884,7 +35966,7 @@ init_runtime_paths();
|
|
|
35884
35966
|
// src/setup.ts
|
|
35885
35967
|
init_dist();
|
|
35886
35968
|
import { lstat as lstat9, readFile as readFile16 } from "node:fs/promises";
|
|
35887
|
-
import { join as join23, resolve as
|
|
35969
|
+
import { join as join23, resolve as resolve19 } from "node:path";
|
|
35888
35970
|
|
|
35889
35971
|
// src/auth-method-labels.ts
|
|
35890
35972
|
var OPENCODE2_POOL_AUTH_LABEL = "Google (antigravity-auth pool, browser)";
|
|
@@ -36056,7 +36138,7 @@ async function select2(terminal, items, options) {
|
|
|
36056
36138
|
writeLine("");
|
|
36057
36139
|
renderedLines = lines;
|
|
36058
36140
|
};
|
|
36059
|
-
return new Promise((
|
|
36141
|
+
return new Promise((resolve26) => {
|
|
36060
36142
|
const wasRaw = stdin.isRaw ?? false;
|
|
36061
36143
|
const cleanup2 = () => {
|
|
36062
36144
|
if (cleaned)
|
|
@@ -36076,7 +36158,7 @@ async function select2(terminal, items, options) {
|
|
|
36076
36158
|
};
|
|
36077
36159
|
const finish = (value) => {
|
|
36078
36160
|
cleanup2();
|
|
36079
|
-
|
|
36161
|
+
resolve26(value);
|
|
36080
36162
|
};
|
|
36081
36163
|
const onSignal = () => finish(null);
|
|
36082
36164
|
const onKey = (data) => {
|
|
@@ -36116,7 +36198,7 @@ async function select2(terminal, items, options) {
|
|
|
36116
36198
|
stdin.setRawMode(true);
|
|
36117
36199
|
} catch {
|
|
36118
36200
|
cleanup2();
|
|
36119
|
-
|
|
36201
|
+
resolve26(null);
|
|
36120
36202
|
return;
|
|
36121
36203
|
}
|
|
36122
36204
|
stdin.resume();
|
|
@@ -36130,12 +36212,12 @@ async function select2(terminal, items, options) {
|
|
|
36130
36212
|
import { createHash as createHash13, randomBytes as randomBytes5, randomUUID as randomUUID17 } from "node:crypto";
|
|
36131
36213
|
import { constants as fsConstants2 } from "node:fs";
|
|
36132
36214
|
import { chmod as chmod6, mkdir as mkdir15, open as open10, readFile as readFile14, realpath as realpath4, rename as rename12, stat as stat11, unlink as unlink10 } from "node:fs/promises";
|
|
36133
|
-
import { basename as basename5, dirname as dirname20, extname as extname2, isAbsolute as isAbsolute3, join as join19, resolve as
|
|
36215
|
+
import { basename as basename5, dirname as dirname20, extname as extname2, isAbsolute as isAbsolute3, join as join19, resolve as resolve18 } from "node:path";
|
|
36134
36216
|
import { ClaustrumCredentialError as ClaustrumCredentialError5, ClaustrumClient as ClaustrumWireClient2, writeEnrollmentTokenFile as writeEnrollmentTokenFile2 } from "@cortexkit/claustrum-client";
|
|
36135
36217
|
|
|
36136
36218
|
// src/common-auth-embedded/fs/file-read-cache.js
|
|
36137
36219
|
import { lstat as lstat7 } from "node:fs/promises";
|
|
36138
|
-
import { resolve as
|
|
36220
|
+
import { resolve as resolve17 } from "node:path";
|
|
36139
36221
|
async function identity2(path5) {
|
|
36140
36222
|
try {
|
|
36141
36223
|
const metadata = await lstat7(path5);
|
|
@@ -36152,7 +36234,7 @@ function sameIdentity2(left, right) {
|
|
|
36152
36234
|
var FileReadCache2 = class {
|
|
36153
36235
|
#entries = /* @__PURE__ */ new Map();
|
|
36154
36236
|
async read(paths, read, validateHit) {
|
|
36155
|
-
const resolvedPaths = paths.map((path5) =>
|
|
36237
|
+
const resolvedPaths = paths.map((path5) => resolve17(path5));
|
|
36156
36238
|
const key = JSON.stringify(resolvedPaths);
|
|
36157
36239
|
const probed = await Promise.all(resolvedPaths.map(identity2));
|
|
36158
36240
|
const identities = probed.every((entry) => entry !== void 0) ? probed : void 0;
|
|
@@ -36272,8 +36354,8 @@ async function acquireRefreshFileLockWithClock2(options) {
|
|
|
36272
36354
|
let releaseConfirmed = false;
|
|
36273
36355
|
let loss;
|
|
36274
36356
|
let resolveLoss;
|
|
36275
|
-
const lostPromise = new Promise((
|
|
36276
|
-
resolveLoss =
|
|
36357
|
+
const lostPromise = new Promise((resolve26) => {
|
|
36358
|
+
resolveLoss = resolve26;
|
|
36277
36359
|
});
|
|
36278
36360
|
function notifyTimerStep(event) {
|
|
36279
36361
|
try {
|
|
@@ -36434,7 +36516,7 @@ async function acquireRefreshFileLockWithClock2(options) {
|
|
|
36434
36516
|
}
|
|
36435
36517
|
}
|
|
36436
36518
|
async function backoff() {
|
|
36437
|
-
await new Promise((
|
|
36519
|
+
await new Promise((resolve26) => setTimeout(resolve26, Math.floor(Math.random() * 4)));
|
|
36438
36520
|
}
|
|
36439
36521
|
async function readLockState(notifyReady = true) {
|
|
36440
36522
|
if (notifyReady && options.onStep)
|
|
@@ -36872,7 +36954,7 @@ async function acquireRefreshFileLockWithClock2(options) {
|
|
|
36872
36954
|
...typeof observed?.expiresAt === "number" ? { observedExpiresAt: observed.expiresAt } : {}
|
|
36873
36955
|
});
|
|
36874
36956
|
},
|
|
36875
|
-
release: async () => {
|
|
36957
|
+
release: async (signal) => {
|
|
36876
36958
|
if (windowsPrivateFiles2 && releaseConfirmed)
|
|
36877
36959
|
return;
|
|
36878
36960
|
released = true;
|
|
@@ -36913,6 +36995,8 @@ async function acquireRefreshFileLockWithClock2(options) {
|
|
|
36913
36995
|
releaseConfirmed = removalConfirmed;
|
|
36914
36996
|
return;
|
|
36915
36997
|
}
|
|
36998
|
+
if (signal?.aborted)
|
|
36999
|
+
return;
|
|
36916
37000
|
await recoverStaleEvictionMarker();
|
|
36917
37001
|
} catch (error) {
|
|
36918
37002
|
if (windowsPrivateFiles2)
|
|
@@ -36922,7 +37006,7 @@ async function acquireRefreshFileLockWithClock2(options) {
|
|
|
36922
37006
|
const remainingMs = deadline - performance.now();
|
|
36923
37007
|
if (remainingMs <= 0)
|
|
36924
37008
|
break;
|
|
36925
|
-
await new Promise((
|
|
37009
|
+
await new Promise((resolve26) => setTimeout(resolve26, Math.min(delayMs, remainingMs)));
|
|
36926
37010
|
delayMs = Math.min(delayMs * 2, 50);
|
|
36927
37011
|
}
|
|
36928
37012
|
if (windowsPrivateFiles2)
|
|
@@ -36995,7 +37079,7 @@ function hostEnrollmentPaths2(input2) {
|
|
|
36995
37079
|
const override = input2.override?.trim();
|
|
36996
37080
|
if (override && !isAbsolute3(override) && !input2.cwd)
|
|
36997
37081
|
throw new ClaustrumConsumerError2("invalid-state", "A relative Claustrum enrollment override needs a base directory");
|
|
36998
|
-
const tokenPath = override ? isAbsolute3(override) ? override :
|
|
37082
|
+
const tokenPath = override ? isAbsolute3(override) ? override : resolve18(input2.cwd, override) : join19(input2.stateDir, `${input2.host}-enrollment.json`);
|
|
36999
37083
|
return getClaustrumEnrollmentPaths2(tokenPath);
|
|
37000
37084
|
}
|
|
37001
37085
|
function isRecord11(value) {
|
|
@@ -37623,7 +37707,7 @@ var ByteTail = class {
|
|
|
37623
37707
|
};
|
|
37624
37708
|
var defaultCommandRunner = {
|
|
37625
37709
|
run(file, args, options = {}) {
|
|
37626
|
-
return new Promise((
|
|
37710
|
+
return new Promise((resolve26) => {
|
|
37627
37711
|
const started = performance.now();
|
|
37628
37712
|
const timeoutMs = options.timeoutMs ?? 15e3;
|
|
37629
37713
|
const stderr = new ByteTail();
|
|
@@ -37641,7 +37725,7 @@ var defaultCommandRunner = {
|
|
|
37641
37725
|
stdio: ["ignore", "pipe", "pipe"]
|
|
37642
37726
|
});
|
|
37643
37727
|
} catch {
|
|
37644
|
-
|
|
37728
|
+
resolve26({
|
|
37645
37729
|
exitCode: 1,
|
|
37646
37730
|
stdout: "",
|
|
37647
37731
|
stderr: "",
|
|
@@ -37676,7 +37760,7 @@ var defaultCommandRunner = {
|
|
|
37676
37760
|
settled = true;
|
|
37677
37761
|
if (timer)
|
|
37678
37762
|
clearTimeout(timer);
|
|
37679
|
-
|
|
37763
|
+
resolve26({
|
|
37680
37764
|
exitCode: spawnError ? 1 : outputExceeded ? 1 : code2 ?? 1,
|
|
37681
37765
|
stdout: Buffer.concat(stdout, stdoutLength).toString("utf8"),
|
|
37682
37766
|
stderr: stderr.toString(),
|
|
@@ -39135,7 +39219,7 @@ async function writeNativeSlot(host, slot, context, expectedAuthority = "local")
|
|
|
39135
39219
|
beforeRename: async () => {
|
|
39136
39220
|
await assertSetupHostsStopped();
|
|
39137
39221
|
const claustrum = await loadCommonAuthClaustrum();
|
|
39138
|
-
const stateDir = host === "opencode" ? openCodeVaultDir(
|
|
39222
|
+
const stateDir = host === "opencode" ? openCodeVaultDir(resolve19(accountFileForVault())) : getPiAntigravityVaultDir();
|
|
39139
39223
|
if (await claustrum.enrollmentAuthority(
|
|
39140
39224
|
claustrum.hostEnrollmentPaths({ stateDir, host }),
|
|
39141
39225
|
`antigravity-auth-${host}`
|
|
@@ -39173,7 +39257,7 @@ async function createSetupPlugin(deps, migrateOpenCode, forceLogin = false) {
|
|
|
39173
39257
|
// `beforeSignIn`, which may move it after this plugin is built.
|
|
39174
39258
|
paths: {
|
|
39175
39259
|
get stateDir() {
|
|
39176
|
-
return openCodeVaultDir(
|
|
39260
|
+
return openCodeVaultDir(resolve19(accountFileForVault()));
|
|
39177
39261
|
},
|
|
39178
39262
|
host: "opencode"
|
|
39179
39263
|
}
|
|
@@ -39190,7 +39274,7 @@ async function createSetupPlugin(deps, migrateOpenCode, forceLogin = false) {
|
|
|
39190
39274
|
const assertLocal = async (host, context) => {
|
|
39191
39275
|
if (host === "opencode")
|
|
39192
39276
|
return assertLocalOpenCodeLogin(
|
|
39193
|
-
|
|
39277
|
+
resolve19(accountFileForVault()),
|
|
39194
39278
|
context.opencodeGeneration
|
|
39195
39279
|
);
|
|
39196
39280
|
if (await authority(host) !== "local")
|
|
@@ -39820,7 +39904,7 @@ async function runCliProcess(argv, deps) {
|
|
|
39820
39904
|
...deps,
|
|
39821
39905
|
prepareVaultFolder: deps.prepareVaultFolder ?? (async (options) => {
|
|
39822
39906
|
const folder = await prepareVaultFolder({
|
|
39823
|
-
accountFile:
|
|
39907
|
+
accountFile: resolve20(accountFileForVault()),
|
|
39824
39908
|
...options
|
|
39825
39909
|
});
|
|
39826
39910
|
if (folder.refusal) throw folder.refusal;
|
|
@@ -39866,11 +39950,11 @@ function createDefaultCliDependencies() {
|
|
|
39866
39950
|
);
|
|
39867
39951
|
if (host !== "pi")
|
|
39868
39952
|
await assertLocalOpenCodeLogin(
|
|
39869
|
-
|
|
39953
|
+
resolve20(accountFileForVault()),
|
|
39870
39954
|
context?.opencodeGeneration
|
|
39871
39955
|
);
|
|
39872
39956
|
const repository = host === "pi" ? void 0 : await prepareCliLoginStore(
|
|
39873
|
-
|
|
39957
|
+
resolve20(getStoragePath()),
|
|
39874
39958
|
context?.opencodeGeneration
|
|
39875
39959
|
);
|
|
39876
39960
|
try {
|
|
@@ -39886,7 +39970,7 @@ function createDefaultCliDependencies() {
|
|
|
39886
39970
|
}
|
|
39887
39971
|
if (host === "opencode") await assertSetupHostsStopped();
|
|
39888
39972
|
await assertLocalOpenCodeLogin(
|
|
39889
|
-
|
|
39973
|
+
resolve20(accountFileForVault()),
|
|
39890
39974
|
context?.opencodeGeneration
|
|
39891
39975
|
);
|
|
39892
39976
|
await persistCliStoreLogin(
|
|
@@ -39906,7 +39990,7 @@ function createDefaultCliDependencies() {
|
|
|
39906
39990
|
};
|
|
39907
39991
|
}
|
|
39908
39992
|
async function prepareCliLoginStore(legacyPath, generation) {
|
|
39909
|
-
await assertLocalOpenCodeLogin(
|
|
39993
|
+
await assertLocalOpenCodeLogin(resolve20(accountFileForVault()), generation);
|
|
39910
39994
|
const modules = await loadCommonAuthStoreModules();
|
|
39911
39995
|
const options = {
|
|
39912
39996
|
legacyPath,
|
|
@@ -40031,7 +40115,7 @@ async function readAccountStore(legacyPath) {
|
|
|
40031
40115
|
function createDefaultAccountStoreOperations() {
|
|
40032
40116
|
const offline = { processesStopped: true };
|
|
40033
40117
|
return {
|
|
40034
|
-
legacyPath: () =>
|
|
40118
|
+
legacyPath: () => resolve20(
|
|
40035
40119
|
decidedAccountStoreAnchor(runtimeLayoutLocation()) ? getStoragePath() : discoveredAccountFile()
|
|
40036
40120
|
),
|
|
40037
40121
|
migrate: async (legacyPath) => createAccountMigrationFactory(await loadCommonAuthStoreModules())({
|
|
@@ -40062,7 +40146,7 @@ function createDefaultAccountStoreOperations() {
|
|
|
40062
40146
|
};
|
|
40063
40147
|
}
|
|
40064
40148
|
function samePath(left, right) {
|
|
40065
|
-
return process.platform === "win32" ?
|
|
40149
|
+
return process.platform === "win32" ? resolve20(left).toLowerCase() === resolve20(right).toLowerCase() : resolve20(left) === resolve20(right);
|
|
40066
40150
|
}
|
|
40067
40151
|
function isCliEntry() {
|
|
40068
40152
|
if (import.meta.main !== void 0) return import.meta.main;
|
|
@@ -40552,14 +40636,14 @@ function isTuiConnected(sessionId) {
|
|
|
40552
40636
|
// src/rpc/rpc-dir.ts
|
|
40553
40637
|
import { createHash as createHash14 } from "node:crypto";
|
|
40554
40638
|
import { homedir as homedir10, tmpdir as tmpdir4 } from "node:os";
|
|
40555
|
-
import { isAbsolute as isAbsolute4, join as join27, resolve as
|
|
40639
|
+
import { isAbsolute as isAbsolute4, join as join27, resolve as resolve21 } from "node:path";
|
|
40556
40640
|
var RPC_DIR_ENV = "ANTIGRAVITY_AUTH_RPC_DIR";
|
|
40557
40641
|
function getRpcDir(projectDirectory) {
|
|
40558
40642
|
const override = process.env[RPC_DIR_ENV]?.trim();
|
|
40559
40643
|
if (override) {
|
|
40560
|
-
return isAbsolute4(override) ? override :
|
|
40644
|
+
return isAbsolute4(override) ? override : resolve21(projectDirectory, override);
|
|
40561
40645
|
}
|
|
40562
|
-
const projectHash = createHash14("sha256").update(
|
|
40646
|
+
const projectHash = createHash14("sha256").update(resolve21(projectDirectory)).digest("hex").slice(0, 16);
|
|
40563
40647
|
const stateHome = process.env.XDG_STATE_HOME ?? join27(homedir10(), ".local", "state");
|
|
40564
40648
|
return join27(stateHome, "cortexkit", "antigravity-auth", "rpc", projectHash);
|
|
40565
40649
|
}
|
|
@@ -40573,7 +40657,7 @@ function isSessionId(value) {
|
|
|
40573
40657
|
init_private_files2();
|
|
40574
40658
|
import { createHash as createHash15, randomUUID as randomUUID19 } from "node:crypto";
|
|
40575
40659
|
import { chmod as chmod7, mkdir as mkdir17, open as open12, readdir as readdir4, rename as rename14, rmdir as rmdir3, stat as stat14, unlink as unlink12 } from "node:fs/promises";
|
|
40576
|
-
import { join as join28, resolve as
|
|
40660
|
+
import { join as join28, resolve as resolve22 } from "node:path";
|
|
40577
40661
|
function isProbeablePid(pid) {
|
|
40578
40662
|
return typeof pid === "number" && Number.isSafeInteger(pid) && pid > 0;
|
|
40579
40663
|
}
|
|
@@ -40660,7 +40744,7 @@ async function sweepRpcState(root, activeDir, isManagedDir, log16) {
|
|
|
40660
40744
|
return;
|
|
40661
40745
|
throw error;
|
|
40662
40746
|
}
|
|
40663
|
-
const active2 =
|
|
40747
|
+
const active2 = resolve22(activeDir);
|
|
40664
40748
|
for (const projectDir of projectDirs) {
|
|
40665
40749
|
if (!projectDir.isDirectory() || !isManagedDir(projectDir.name)) {
|
|
40666
40750
|
continue;
|
|
@@ -40704,7 +40788,7 @@ async function sweepRpcState(root, activeDir, isManagedDir, log16) {
|
|
|
40704
40788
|
await unlink12(portFile).catch(() => {
|
|
40705
40789
|
});
|
|
40706
40790
|
}
|
|
40707
|
-
if (
|
|
40791
|
+
if (resolve22(dir) !== active2)
|
|
40708
40792
|
await rmdir3(dir).catch(() => {
|
|
40709
40793
|
});
|
|
40710
40794
|
}
|
|
@@ -40738,7 +40822,7 @@ var BodyTooLargeError = class extends Error {
|
|
|
40738
40822
|
}
|
|
40739
40823
|
};
|
|
40740
40824
|
function readBody(req) {
|
|
40741
|
-
return new Promise((
|
|
40825
|
+
return new Promise((resolve26, reject) => {
|
|
40742
40826
|
const tooLarge = (declaredOversize = false) => {
|
|
40743
40827
|
req.removeAllListeners("data");
|
|
40744
40828
|
req.on("data", () => {
|
|
@@ -40761,7 +40845,7 @@ function readBody(req) {
|
|
|
40761
40845
|
}
|
|
40762
40846
|
chunks.push(chunk);
|
|
40763
40847
|
});
|
|
40764
|
-
req.on("end", () =>
|
|
40848
|
+
req.on("end", () => resolve26(Buffer.concat(chunks).toString("utf8")));
|
|
40765
40849
|
req.on("error", reject);
|
|
40766
40850
|
});
|
|
40767
40851
|
}
|
|
@@ -40940,12 +41024,12 @@ async function startRpcServer(options) {
|
|
|
40940
41024
|
json(500, { error: "internal error" });
|
|
40941
41025
|
}
|
|
40942
41026
|
}
|
|
40943
|
-
const port = await new Promise((
|
|
41027
|
+
const port = await new Promise((resolve26, reject) => {
|
|
40944
41028
|
server.on("error", reject);
|
|
40945
41029
|
server.listen(0, "127.0.0.1", () => {
|
|
40946
41030
|
const addr = server.address();
|
|
40947
41031
|
if (addr && typeof addr === "object")
|
|
40948
|
-
|
|
41032
|
+
resolve26(addr.port);
|
|
40949
41033
|
else
|
|
40950
41034
|
reject(new Error("no port"));
|
|
40951
41035
|
});
|
|
@@ -40968,16 +41052,16 @@ async function startRpcServer(options) {
|
|
|
40968
41052
|
rpcPort: port
|
|
40969
41053
|
});
|
|
40970
41054
|
} catch (error) {
|
|
40971
|
-
await new Promise((
|
|
41055
|
+
await new Promise((resolve26) => server.close(() => resolve26()));
|
|
40972
41056
|
throw error;
|
|
40973
41057
|
}
|
|
40974
41058
|
return {
|
|
40975
41059
|
port,
|
|
40976
41060
|
token,
|
|
40977
41061
|
async stop() {
|
|
40978
|
-
await new Promise((
|
|
41062
|
+
await new Promise((resolve26) => {
|
|
40979
41063
|
server.closeAllConnections?.();
|
|
40980
|
-
server.close(() =>
|
|
41064
|
+
server.close(() => resolve26());
|
|
40981
41065
|
for (const socket of connections)
|
|
40982
41066
|
socket.destroy();
|
|
40983
41067
|
});
|
|
@@ -42351,7 +42435,7 @@ async function select3(items, options) {
|
|
|
42351
42435
|
}
|
|
42352
42436
|
renderedLines = linesWritten;
|
|
42353
42437
|
};
|
|
42354
|
-
return new Promise((
|
|
42438
|
+
return new Promise((resolve26) => {
|
|
42355
42439
|
const wasRaw = stdin.isRaw ?? false;
|
|
42356
42440
|
const cleanup2 = () => {
|
|
42357
42441
|
if (isCleanedUp) return;
|
|
@@ -42372,11 +42456,11 @@ async function select3(items, options) {
|
|
|
42372
42456
|
};
|
|
42373
42457
|
const onSignal = () => {
|
|
42374
42458
|
cleanup2();
|
|
42375
|
-
|
|
42459
|
+
resolve26(null);
|
|
42376
42460
|
};
|
|
42377
42461
|
const finishWithValue = (value) => {
|
|
42378
42462
|
cleanup2();
|
|
42379
|
-
|
|
42463
|
+
resolve26(value);
|
|
42380
42464
|
};
|
|
42381
42465
|
const findNextSelectable = (from, direction) => {
|
|
42382
42466
|
if (items.length === 0) return from;
|
|
@@ -42422,7 +42506,7 @@ async function select3(items, options) {
|
|
|
42422
42506
|
stdin.setRawMode(true);
|
|
42423
42507
|
} catch {
|
|
42424
42508
|
cleanup2();
|
|
42425
|
-
|
|
42509
|
+
resolve26(null);
|
|
42426
42510
|
return;
|
|
42427
42511
|
}
|
|
42428
42512
|
stdin.resume();
|
|
@@ -45188,7 +45272,7 @@ init_runtime_paths();
|
|
|
45188
45272
|
init_logger4();
|
|
45189
45273
|
import { existsSync as existsSync11, readFileSync as readFileSync11, realpathSync as realpathSync5 } from "node:fs";
|
|
45190
45274
|
import { homedir as homedir12 } from "node:os";
|
|
45191
|
-
import { basename as basename7, dirname as dirname25, join as join32, resolve as
|
|
45275
|
+
import { basename as basename7, dirname as dirname25, join as join32, resolve as resolve23 } from "node:path";
|
|
45192
45276
|
|
|
45193
45277
|
// src/plugin/config/schema.ts
|
|
45194
45278
|
import { z } from "zod";
|
|
@@ -45746,7 +45830,7 @@ function loadConfigWithLogger(directory, log16) {
|
|
|
45746
45830
|
return config;
|
|
45747
45831
|
}
|
|
45748
45832
|
function canonicalizeOwnedPath(path5) {
|
|
45749
|
-
const absolute =
|
|
45833
|
+
const absolute = resolve23(path5);
|
|
45750
45834
|
const missing = [];
|
|
45751
45835
|
let current = absolute;
|
|
45752
45836
|
for (; ; ) {
|
|
@@ -50684,10 +50768,10 @@ async function retainResponseLifetime(response, cancellation) {
|
|
|
50684
50768
|
cancellation.release();
|
|
50685
50769
|
throw error;
|
|
50686
50770
|
}
|
|
50687
|
-
let
|
|
50771
|
+
let resolve26 = () => {
|
|
50688
50772
|
};
|
|
50689
50773
|
const settled = new Promise((done) => {
|
|
50690
|
-
|
|
50774
|
+
resolve26 = done;
|
|
50691
50775
|
});
|
|
50692
50776
|
let stopping = false;
|
|
50693
50777
|
let finished = false;
|
|
@@ -50697,7 +50781,7 @@ async function retainResponseLifetime(response, cancellation) {
|
|
|
50697
50781
|
finished = true;
|
|
50698
50782
|
cancellation.signal.removeEventListener("abort", abort);
|
|
50699
50783
|
cancellation.release();
|
|
50700
|
-
|
|
50784
|
+
resolve26();
|
|
50701
50785
|
};
|
|
50702
50786
|
const abort = () => {
|
|
50703
50787
|
if (finished || stopping) return;
|
|
@@ -50766,8 +50850,8 @@ function createAfterHandoff(work, signals, onFailure) {
|
|
|
50766
50850
|
let running = false;
|
|
50767
50851
|
let resolveCompletion = () => {
|
|
50768
50852
|
};
|
|
50769
|
-
const completion = new Promise((
|
|
50770
|
-
resolveCompletion =
|
|
50853
|
+
const completion = new Promise((resolve26) => {
|
|
50854
|
+
resolveCompletion = resolve26;
|
|
50771
50855
|
});
|
|
50772
50856
|
const finish = () => {
|
|
50773
50857
|
if (finished) return;
|
|
@@ -50814,14 +50898,14 @@ function createAfterHandoff(work, signals, onFailure) {
|
|
|
50814
50898
|
};
|
|
50815
50899
|
}
|
|
50816
50900
|
function publishResponse(dispatch) {
|
|
50817
|
-
return new Promise((
|
|
50901
|
+
return new Promise((resolve26, reject) => {
|
|
50818
50902
|
let acknowledge;
|
|
50819
50903
|
void Promise.resolve().then(
|
|
50820
50904
|
() => dispatch((callback) => {
|
|
50821
50905
|
acknowledge = callback;
|
|
50822
50906
|
})
|
|
50823
50907
|
).then((response) => {
|
|
50824
|
-
|
|
50908
|
+
resolve26(response);
|
|
50825
50909
|
acknowledge?.();
|
|
50826
50910
|
}, reject);
|
|
50827
50911
|
});
|
|
@@ -52655,10 +52739,10 @@ function resolvePluginDependencies(overrides = {}) {
|
|
|
52655
52739
|
}
|
|
52656
52740
|
async function defaultSleep(ms, signal) {
|
|
52657
52741
|
if (ms <= 0) return;
|
|
52658
|
-
await new Promise((
|
|
52742
|
+
await new Promise((resolve26, reject) => {
|
|
52659
52743
|
const timer = setTimeout(() => {
|
|
52660
52744
|
signal?.removeEventListener("abort", onAbort);
|
|
52661
|
-
|
|
52745
|
+
resolve26();
|
|
52662
52746
|
}, ms);
|
|
52663
52747
|
timer.unref?.();
|
|
52664
52748
|
const onAbort = () => {
|
|
@@ -53244,7 +53328,7 @@ function throwIfAllKilled(input2) {
|
|
|
53244
53328
|
}
|
|
53245
53329
|
|
|
53246
53330
|
// src/plugin/session-context.ts
|
|
53247
|
-
import { resolve as
|
|
53331
|
+
import { resolve as resolve24 } from "node:path";
|
|
53248
53332
|
import { pathToFileURL } from "node:url";
|
|
53249
53333
|
var FALLBACK_SESSION_KEY = "__default__";
|
|
53250
53334
|
function extractOpenCodeSessionIdentity(headers) {
|
|
@@ -53258,7 +53342,7 @@ var AgySessionRegistry = class {
|
|
|
53258
53342
|
requestSessions;
|
|
53259
53343
|
parentSessionIds = /* @__PURE__ */ new Map();
|
|
53260
53344
|
constructor(directory, options = {}) {
|
|
53261
|
-
const workspaceUri = directory ? pathToFileURL(
|
|
53345
|
+
const workspaceUri = directory ? pathToFileURL(resolve24(directory)).href : "";
|
|
53262
53346
|
this.requestSessions = new AgyRequestSessionStore(workspaceUri, options);
|
|
53263
53347
|
}
|
|
53264
53348
|
getOrCreate(identity3) {
|
|
@@ -53406,7 +53490,7 @@ function formatWaitTime(ms) {
|
|
|
53406
53490
|
return remainingMinutes > 0 ? `${hours}h ${remainingMinutes}m` : `${hours}h`;
|
|
53407
53491
|
}
|
|
53408
53492
|
function sleep4(ms, signal) {
|
|
53409
|
-
return new Promise((
|
|
53493
|
+
return new Promise((resolve26, reject) => {
|
|
53410
53494
|
if (signal?.aborted) {
|
|
53411
53495
|
reject(
|
|
53412
53496
|
signal.reason instanceof Error ? signal.reason : new Error("Aborted")
|
|
@@ -53415,7 +53499,7 @@ function sleep4(ms, signal) {
|
|
|
53415
53499
|
}
|
|
53416
53500
|
const timeout = setTimeout(() => {
|
|
53417
53501
|
cleanup2();
|
|
53418
|
-
|
|
53502
|
+
resolve26();
|
|
53419
53503
|
}, ms);
|
|
53420
53504
|
const onAbort = () => {
|
|
53421
53505
|
cleanup2();
|
|
@@ -55903,8 +55987,8 @@ function createPluginLifecycle(options) {
|
|
|
55903
55987
|
};
|
|
55904
55988
|
let failDisposal = () => {
|
|
55905
55989
|
};
|
|
55906
|
-
disposal = new Promise((
|
|
55907
|
-
finishDisposal =
|
|
55990
|
+
disposal = new Promise((resolve26, reject) => {
|
|
55991
|
+
finishDisposal = resolve26;
|
|
55908
55992
|
failDisposal = reject;
|
|
55909
55993
|
});
|
|
55910
55994
|
void (async () => {
|
|
@@ -56103,7 +56187,7 @@ var createAntigravityPlugin = (providerId, options = {}) => async (input2) => {
|
|
|
56103
56187
|
await drainSidebarWrites();
|
|
56104
56188
|
}
|
|
56105
56189
|
});
|
|
56106
|
-
const accountFile =
|
|
56190
|
+
const accountFile = resolve25(accountFileForVault());
|
|
56107
56191
|
const vaultFolder = await prepareVaultFolder({ accountFile });
|
|
56108
56192
|
const unavailableMessage = vaultFolder.refusal?.message ?? VAULT_ACCOUNT_REMEDY;
|
|
56109
56193
|
let vaultQuotaPoller;
|