@indigoai-us/hq-cli 5.345.107 → 5.345.108
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/CHANGELOG.md +9 -0
- package/dist/command-catalog.generated.d.ts +40 -1
- package/dist/command-catalog.generated.js +48 -1
- package/dist/commands/capacity.d.ts +1 -1
- package/dist/commands/capacity.js +74 -11
- package/dist/commands/core-checkpoint-stop-gate-native.js +17 -5
- package/dist/commands/lanes.js +72 -12
- package/dist/hq-cloud-sync-runner/bin/sync-runner.js +612 -460
- package/dist/hq-cloud-sync-runner/package.json +1 -1
- package/dist/lib/capacity/ledger.d.ts +1 -0
- package/dist/lib/capacity/ledger.js +10 -0
- package/dist/lib/capacity/route.d.ts +146 -0
- package/dist/lib/capacity/route.js +452 -0
- package/dist/lib/flag-registry-worker-source.generated.d.ts +1 -1
- package/dist/lib/flag-registry-worker-source.generated.js +1 -1
- package/dist/lib/lanes/store.js +4 -4
- package/dist/lib/lanes/types.d.ts +20 -4
- package/dist/lib/lanes/types.js +1 -1
- package/package.json +2 -2
|
@@ -772,7 +772,7 @@ var sleep3;
|
|
|
772
772
|
var init_sleep = __esm({
|
|
773
773
|
"node_modules/.pnpm/@smithy+core@3.33.3/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/sleep.js"() {
|
|
774
774
|
sleep3 = (seconds) => {
|
|
775
|
-
return new Promise((
|
|
775
|
+
return new Promise((resolve33) => setTimeout(resolve33, seconds * 1e3));
|
|
776
776
|
};
|
|
777
777
|
}
|
|
778
778
|
});
|
|
@@ -937,8 +937,8 @@ var init_createWaiter = __esm({
|
|
|
937
937
|
init_waiter();
|
|
938
938
|
abortTimeout = (abortSignal) => {
|
|
939
939
|
let onAbort;
|
|
940
|
-
const promise2 = new Promise((
|
|
941
|
-
onAbort = () =>
|
|
940
|
+
const promise2 = new Promise((resolve33) => {
|
|
941
|
+
onAbort = () => resolve33({ state: WaiterState.ABORTED });
|
|
942
942
|
if (typeof abortSignal.addEventListener === "function") {
|
|
943
943
|
abortSignal.addEventListener("abort", onAbort);
|
|
944
944
|
} else {
|
|
@@ -4385,7 +4385,7 @@ var init_getInstanceMetadataRegion = __esm({
|
|
|
4385
4385
|
};
|
|
4386
4386
|
imdsRequest = async (options) => {
|
|
4387
4387
|
const { request: request5 } = await import("node:http");
|
|
4388
|
-
return new Promise((
|
|
4388
|
+
return new Promise((resolve33, reject) => {
|
|
4389
4389
|
const req = request5({
|
|
4390
4390
|
hostname: options.hostname,
|
|
4391
4391
|
port: options.port,
|
|
@@ -4413,7 +4413,7 @@ var init_getInstanceMetadataRegion = __esm({
|
|
|
4413
4413
|
const chunks = [];
|
|
4414
4414
|
res.on("data", (chunk) => chunks.push(chunk));
|
|
4415
4415
|
res.on("end", () => {
|
|
4416
|
-
|
|
4416
|
+
resolve33(Buffer.concat(chunks));
|
|
4417
4417
|
req.destroy();
|
|
4418
4418
|
});
|
|
4419
4419
|
});
|
|
@@ -6459,7 +6459,7 @@ var init_headStream = __esm({
|
|
|
6459
6459
|
if (isReadableStream(stream)) {
|
|
6460
6460
|
return headStream(stream, bytes);
|
|
6461
6461
|
}
|
|
6462
|
-
return new Promise((
|
|
6462
|
+
return new Promise((resolve33, reject) => {
|
|
6463
6463
|
const collector = new Collector();
|
|
6464
6464
|
collector.limit = bytes;
|
|
6465
6465
|
stream.pipe(collector);
|
|
@@ -6470,7 +6470,7 @@ var init_headStream = __esm({
|
|
|
6470
6470
|
collector.on("error", reject);
|
|
6471
6471
|
collector.on("finish", function() {
|
|
6472
6472
|
const bytes2 = concatBytes(this.buffers);
|
|
6473
|
-
|
|
6473
|
+
resolve33(bytes2);
|
|
6474
6474
|
});
|
|
6475
6475
|
});
|
|
6476
6476
|
};
|
|
@@ -6622,7 +6622,7 @@ var init_stream_collector = __esm({
|
|
|
6622
6622
|
if (isReadableStream(stream)) {
|
|
6623
6623
|
return collectReadableStream(stream);
|
|
6624
6624
|
}
|
|
6625
|
-
return new Promise((
|
|
6625
|
+
return new Promise((resolve33, reject) => {
|
|
6626
6626
|
const collector = new Collector2();
|
|
6627
6627
|
const nodeStream = stream;
|
|
6628
6628
|
nodeStream.pipe(collector);
|
|
@@ -6633,7 +6633,7 @@ var init_stream_collector = __esm({
|
|
|
6633
6633
|
collector.on("error", reject);
|
|
6634
6634
|
collector.on("finish", function() {
|
|
6635
6635
|
const bytes = concatBytes(this.bufferedBytes);
|
|
6636
|
-
|
|
6636
|
+
resolve33(bytes);
|
|
6637
6637
|
});
|
|
6638
6638
|
});
|
|
6639
6639
|
};
|
|
@@ -7602,7 +7602,7 @@ async function* readableToIterable(readStream) {
|
|
|
7602
7602
|
streamEnded = true;
|
|
7603
7603
|
});
|
|
7604
7604
|
while (!generationEnded) {
|
|
7605
|
-
const value = await new Promise((
|
|
7605
|
+
const value = await new Promise((resolve33) => setTimeout(() => resolve33(records.shift()), 0));
|
|
7606
7606
|
if (value) {
|
|
7607
7607
|
yield value;
|
|
7608
7608
|
}
|
|
@@ -9371,7 +9371,7 @@ var init_retryMiddleware = __esm({
|
|
|
9371
9371
|
init_constants5();
|
|
9372
9372
|
init_parseRetryAfterHeader();
|
|
9373
9373
|
init_util();
|
|
9374
|
-
cooldown = (ms) => new Promise((
|
|
9374
|
+
cooldown = (ms) => new Promise((resolve33) => setTimeout(resolve33, ms));
|
|
9375
9375
|
isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined";
|
|
9376
9376
|
getRetryErrorInfo = (error64, logger4) => {
|
|
9377
9377
|
const errorInfo = {
|
|
@@ -10509,12 +10509,12 @@ import { normalize, sep as sep3 } from "node:path";
|
|
|
10509
10509
|
var getNodeModulesParentDirs;
|
|
10510
10510
|
var init_getNodeModulesParentDirs = __esm({
|
|
10511
10511
|
"node_modules/.pnpm/@aws-sdk+core@3.974.12/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-node/getNodeModulesParentDirs.js"() {
|
|
10512
|
-
getNodeModulesParentDirs = (
|
|
10512
|
+
getNodeModulesParentDirs = (dirname38) => {
|
|
10513
10513
|
const cwd = process.cwd();
|
|
10514
|
-
if (!
|
|
10514
|
+
if (!dirname38) {
|
|
10515
10515
|
return [cwd];
|
|
10516
10516
|
}
|
|
10517
|
-
const normalizedPath = normalize(
|
|
10517
|
+
const normalizedPath = normalize(dirname38);
|
|
10518
10518
|
const parts = normalizedPath.split(sep3);
|
|
10519
10519
|
const nodeModulesIndex = parts.indexOf("node_modules");
|
|
10520
10520
|
const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(sep3) : normalizedPath;
|
|
@@ -10589,8 +10589,8 @@ var init_getTypeScriptUserAgentPair = __esm({
|
|
|
10589
10589
|
tscVersion = null;
|
|
10590
10590
|
return void 0;
|
|
10591
10591
|
}
|
|
10592
|
-
const
|
|
10593
|
-
const nodeModulesParentDirs = getNodeModulesParentDirs(
|
|
10592
|
+
const dirname38 = typeof __dirname !== "undefined" ? __dirname : void 0;
|
|
10593
|
+
const nodeModulesParentDirs = getNodeModulesParentDirs(dirname38);
|
|
10594
10594
|
let versionFromApp;
|
|
10595
10595
|
for (const nodeModulesParentDir of nodeModulesParentDirs) {
|
|
10596
10596
|
try {
|
|
@@ -12534,7 +12534,7 @@ var sleep4;
|
|
|
12534
12534
|
var init_sleep2 = __esm({
|
|
12535
12535
|
"node_modules/.pnpm/@smithy+core@3.35.1/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/sleep.js"() {
|
|
12536
12536
|
sleep4 = (seconds) => {
|
|
12537
|
-
return new Promise((
|
|
12537
|
+
return new Promise((resolve33) => setTimeout(resolve33, seconds * 1e3));
|
|
12538
12538
|
};
|
|
12539
12539
|
}
|
|
12540
12540
|
});
|
|
@@ -12699,8 +12699,8 @@ var init_createWaiter2 = __esm({
|
|
|
12699
12699
|
init_waiter2();
|
|
12700
12700
|
abortTimeout2 = (abortSignal) => {
|
|
12701
12701
|
let onAbort;
|
|
12702
|
-
const promise2 = new Promise((
|
|
12703
|
-
onAbort = () =>
|
|
12702
|
+
const promise2 = new Promise((resolve33) => {
|
|
12703
|
+
onAbort = () => resolve33({ state: WaiterState2.ABORTED });
|
|
12704
12704
|
if (typeof abortSignal.addEventListener === "function") {
|
|
12705
12705
|
abortSignal.addEventListener("abort", onAbort);
|
|
12706
12706
|
} else {
|
|
@@ -16195,7 +16195,7 @@ var init_getInstanceMetadataRegion2 = __esm({
|
|
|
16195
16195
|
};
|
|
16196
16196
|
imdsRequest2 = async (options) => {
|
|
16197
16197
|
const { request: request5 } = await import("node:http");
|
|
16198
|
-
return new Promise((
|
|
16198
|
+
return new Promise((resolve33, reject) => {
|
|
16199
16199
|
const req = request5({
|
|
16200
16200
|
hostname: options.hostname,
|
|
16201
16201
|
port: options.port,
|
|
@@ -16223,7 +16223,7 @@ var init_getInstanceMetadataRegion2 = __esm({
|
|
|
16223
16223
|
const chunks = [];
|
|
16224
16224
|
res.on("data", (chunk) => chunks.push(chunk));
|
|
16225
16225
|
res.on("end", () => {
|
|
16226
|
-
|
|
16226
|
+
resolve33(Buffer.concat(chunks));
|
|
16227
16227
|
req.destroy();
|
|
16228
16228
|
});
|
|
16229
16229
|
});
|
|
@@ -18455,7 +18455,7 @@ var init_headStream2 = __esm({
|
|
|
18455
18455
|
if (isReadableStream2(stream)) {
|
|
18456
18456
|
return headStream3(stream, bytes);
|
|
18457
18457
|
}
|
|
18458
|
-
return new Promise((
|
|
18458
|
+
return new Promise((resolve33, reject) => {
|
|
18459
18459
|
const collector = new Collector3();
|
|
18460
18460
|
collector.limit = bytes;
|
|
18461
18461
|
stream.pipe(collector);
|
|
@@ -18466,7 +18466,7 @@ var init_headStream2 = __esm({
|
|
|
18466
18466
|
collector.on("error", reject);
|
|
18467
18467
|
collector.on("finish", function() {
|
|
18468
18468
|
const bytes2 = concatBytes2(this.buffers);
|
|
18469
|
-
|
|
18469
|
+
resolve33(bytes2);
|
|
18470
18470
|
});
|
|
18471
18471
|
});
|
|
18472
18472
|
};
|
|
@@ -18618,7 +18618,7 @@ var init_stream_collector2 = __esm({
|
|
|
18618
18618
|
if (isReadableStream2(stream)) {
|
|
18619
18619
|
return collectReadableStream2(stream);
|
|
18620
18620
|
}
|
|
18621
|
-
return new Promise((
|
|
18621
|
+
return new Promise((resolve33, reject) => {
|
|
18622
18622
|
const collector = new Collector4();
|
|
18623
18623
|
const nodeStream = stream;
|
|
18624
18624
|
nodeStream.pipe(collector);
|
|
@@ -18629,7 +18629,7 @@ var init_stream_collector2 = __esm({
|
|
|
18629
18629
|
collector.on("error", reject);
|
|
18630
18630
|
collector.on("finish", function() {
|
|
18631
18631
|
const bytes = concatBytes2(this.bufferedBytes);
|
|
18632
|
-
|
|
18632
|
+
resolve33(bytes);
|
|
18633
18633
|
});
|
|
18634
18634
|
});
|
|
18635
18635
|
};
|
|
@@ -18956,7 +18956,7 @@ var fileStreamHasher, isReadStream;
|
|
|
18956
18956
|
var init_fileStreamHasher = __esm({
|
|
18957
18957
|
"node_modules/.pnpm/@smithy+core@3.35.1/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/fileStreamHasher.js"() {
|
|
18958
18958
|
init_HashCalculator();
|
|
18959
|
-
fileStreamHasher = (hashCtor, fileStream) => new Promise((
|
|
18959
|
+
fileStreamHasher = (hashCtor, fileStream) => new Promise((resolve33, reject) => {
|
|
18960
18960
|
if (!isReadStream(fileStream)) {
|
|
18961
18961
|
reject(new Error("Unable to calculate hash for non-file streams."));
|
|
18962
18962
|
return;
|
|
@@ -18974,7 +18974,7 @@ var init_fileStreamHasher = __esm({
|
|
|
18974
18974
|
});
|
|
18975
18975
|
hashCalculator.on("error", reject);
|
|
18976
18976
|
hashCalculator.on("finish", function() {
|
|
18977
|
-
hash3.digest().then(
|
|
18977
|
+
hash3.digest().then(resolve33).catch(reject);
|
|
18978
18978
|
});
|
|
18979
18979
|
});
|
|
18980
18980
|
isReadStream = (stream) => typeof stream.path === "string";
|
|
@@ -18993,14 +18993,14 @@ var init_readableStreamHasher = __esm({
|
|
|
18993
18993
|
const hash3 = new hashCtor();
|
|
18994
18994
|
const hashCalculator = new HashCalculator(hash3);
|
|
18995
18995
|
readableStream.pipe(hashCalculator);
|
|
18996
|
-
return new Promise((
|
|
18996
|
+
return new Promise((resolve33, reject) => {
|
|
18997
18997
|
readableStream.on("error", (err) => {
|
|
18998
18998
|
hashCalculator.end();
|
|
18999
18999
|
reject(err);
|
|
19000
19000
|
});
|
|
19001
19001
|
hashCalculator.on("error", reject);
|
|
19002
19002
|
hashCalculator.on("finish", () => {
|
|
19003
|
-
hash3.digest().then(
|
|
19003
|
+
hash3.digest().then(resolve33).catch(reject);
|
|
19004
19004
|
});
|
|
19005
19005
|
});
|
|
19006
19006
|
};
|
|
@@ -20245,7 +20245,7 @@ async function* readableToIterable2(readStream) {
|
|
|
20245
20245
|
streamEnded = true;
|
|
20246
20246
|
});
|
|
20247
20247
|
while (!generationEnded) {
|
|
20248
|
-
const value = await new Promise((
|
|
20248
|
+
const value = await new Promise((resolve33) => setTimeout(() => resolve33(records.shift()), 0));
|
|
20249
20249
|
if (value) {
|
|
20250
20250
|
yield value;
|
|
20251
20251
|
}
|
|
@@ -22071,7 +22071,7 @@ var init_retryMiddleware2 = __esm({
|
|
|
22071
22071
|
init_constants11();
|
|
22072
22072
|
init_parseRetryAfterHeader2();
|
|
22073
22073
|
init_util2();
|
|
22074
|
-
cooldown2 = (ms) => new Promise((
|
|
22074
|
+
cooldown2 = (ms) => new Promise((resolve33) => setTimeout(resolve33, ms));
|
|
22075
22075
|
isRetryStrategyV22 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined";
|
|
22076
22076
|
getRetryErrorInfo2 = (error64, logger4) => {
|
|
22077
22077
|
const errorInfo = {
|
|
@@ -22169,7 +22169,7 @@ var init_DefaultRateLimiter = __esm({
|
|
|
22169
22169
|
this.refillTokenBucket();
|
|
22170
22170
|
while (amount > this.availableTokens) {
|
|
22171
22171
|
const delay = (amount - this.availableTokens) / this.fillRate * 1e3;
|
|
22172
|
-
await new Promise((
|
|
22172
|
+
await new Promise((resolve33) => _DefaultRateLimiter.setTimeoutFn(resolve33, delay));
|
|
22173
22173
|
this.refillTokenBucket();
|
|
22174
22174
|
}
|
|
22175
22175
|
this.availableTokens = this.availableTokens - amount;
|
|
@@ -22607,7 +22607,7 @@ var init_StandardRetryStrategy2 = __esm({
|
|
|
22607
22607
|
const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);
|
|
22608
22608
|
const delay = Math.max(delayFromResponse || 0, delayFromDecider);
|
|
22609
22609
|
totalDelay += delay;
|
|
22610
|
-
await new Promise((
|
|
22610
|
+
await new Promise((resolve33) => setTimeout(resolve33, delay));
|
|
22611
22611
|
continue;
|
|
22612
22612
|
}
|
|
22613
22613
|
if (!err.$metadata) {
|
|
@@ -24718,11 +24718,11 @@ function __metadata(metadataKey, metadataValue) {
|
|
|
24718
24718
|
}
|
|
24719
24719
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
24720
24720
|
function adopt(value) {
|
|
24721
|
-
return value instanceof P ? value : new P(function(
|
|
24722
|
-
|
|
24721
|
+
return value instanceof P ? value : new P(function(resolve33) {
|
|
24722
|
+
resolve33(value);
|
|
24723
24723
|
});
|
|
24724
24724
|
}
|
|
24725
|
-
return new (P || (P = Promise))(function(
|
|
24725
|
+
return new (P || (P = Promise))(function(resolve33, reject) {
|
|
24726
24726
|
function fulfilled(value) {
|
|
24727
24727
|
try {
|
|
24728
24728
|
step(generator.next(value));
|
|
@@ -24738,7 +24738,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
24738
24738
|
}
|
|
24739
24739
|
}
|
|
24740
24740
|
function step(result) {
|
|
24741
|
-
result.done ?
|
|
24741
|
+
result.done ? resolve33(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
24742
24742
|
}
|
|
24743
24743
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24744
24744
|
});
|
|
@@ -24929,14 +24929,14 @@ function __asyncValues(o3) {
|
|
|
24929
24929
|
}, i6);
|
|
24930
24930
|
function verb(n3) {
|
|
24931
24931
|
i6[n3] = o3[n3] && function(v) {
|
|
24932
|
-
return new Promise(function(
|
|
24933
|
-
v = o3[n3](v), settle(
|
|
24932
|
+
return new Promise(function(resolve33, reject) {
|
|
24933
|
+
v = o3[n3](v), settle(resolve33, reject, v.done, v.value);
|
|
24934
24934
|
});
|
|
24935
24935
|
};
|
|
24936
24936
|
}
|
|
24937
|
-
function settle(
|
|
24937
|
+
function settle(resolve33, reject, d5, v) {
|
|
24938
24938
|
Promise.resolve(v).then(function(v2) {
|
|
24939
|
-
|
|
24939
|
+
resolve33({ value: v2, done: d5 });
|
|
24940
24940
|
}, reject);
|
|
24941
24941
|
}
|
|
24942
24942
|
}
|
|
@@ -33270,7 +33270,7 @@ var sleep5;
|
|
|
33270
33270
|
var init_sleep3 = __esm({
|
|
33271
33271
|
"node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/client/util-waiter/utils/sleep.js"() {
|
|
33272
33272
|
sleep5 = (seconds) => {
|
|
33273
|
-
return new Promise((
|
|
33273
|
+
return new Promise((resolve33) => setTimeout(resolve33, seconds * 1e3));
|
|
33274
33274
|
};
|
|
33275
33275
|
}
|
|
33276
33276
|
});
|
|
@@ -33435,8 +33435,8 @@ var init_createWaiter3 = __esm({
|
|
|
33435
33435
|
init_waiter3();
|
|
33436
33436
|
abortTimeout3 = (abortSignal) => {
|
|
33437
33437
|
let onAbort;
|
|
33438
|
-
const promise2 = new Promise((
|
|
33439
|
-
onAbort = () =>
|
|
33438
|
+
const promise2 = new Promise((resolve33) => {
|
|
33439
|
+
onAbort = () => resolve33({ state: WaiterState3.ABORTED });
|
|
33440
33440
|
if (typeof abortSignal.addEventListener === "function") {
|
|
33441
33441
|
abortSignal.addEventListener("abort", onAbort);
|
|
33442
33442
|
} else {
|
|
@@ -35494,7 +35494,7 @@ var init_resolveDefaultsModeConfig3 = __esm({
|
|
|
35494
35494
|
};
|
|
35495
35495
|
imdsHttpGet = async ({ hostname: hostname3, path: path68 }) => {
|
|
35496
35496
|
const { request: request5 } = await import("node:http");
|
|
35497
|
-
return new Promise((
|
|
35497
|
+
return new Promise((resolve33, reject) => {
|
|
35498
35498
|
const req = request5({
|
|
35499
35499
|
method: "GET",
|
|
35500
35500
|
hostname: hostname3.replace(/^\[(.+)]$/, "$1"),
|
|
@@ -35520,7 +35520,7 @@ var init_resolveDefaultsModeConfig3 = __esm({
|
|
|
35520
35520
|
const chunks = [];
|
|
35521
35521
|
res.on("data", (chunk) => chunks.push(chunk));
|
|
35522
35522
|
res.on("end", () => {
|
|
35523
|
-
|
|
35523
|
+
resolve33(Buffer.concat(chunks));
|
|
35524
35524
|
req.destroy();
|
|
35525
35525
|
});
|
|
35526
35526
|
});
|
|
@@ -37536,7 +37536,7 @@ var init_headStream3 = __esm({
|
|
|
37536
37536
|
if (isReadableStream3(stream)) {
|
|
37537
37537
|
return headStream5(stream, bytes);
|
|
37538
37538
|
}
|
|
37539
|
-
return new Promise((
|
|
37539
|
+
return new Promise((resolve33, reject) => {
|
|
37540
37540
|
const collector = new Collector5();
|
|
37541
37541
|
collector.limit = bytes;
|
|
37542
37542
|
stream.pipe(collector);
|
|
@@ -37547,7 +37547,7 @@ var init_headStream3 = __esm({
|
|
|
37547
37547
|
collector.on("error", reject);
|
|
37548
37548
|
collector.on("finish", function() {
|
|
37549
37549
|
const bytes2 = new Uint8Array(Buffer.concat(this.buffers));
|
|
37550
|
-
|
|
37550
|
+
resolve33(bytes2);
|
|
37551
37551
|
});
|
|
37552
37552
|
});
|
|
37553
37553
|
};
|
|
@@ -37655,7 +37655,7 @@ async function collectStream(stream) {
|
|
|
37655
37655
|
return collected;
|
|
37656
37656
|
}
|
|
37657
37657
|
function readToBase64(blob) {
|
|
37658
|
-
return new Promise((
|
|
37658
|
+
return new Promise((resolve33, reject) => {
|
|
37659
37659
|
const reader = new FileReader();
|
|
37660
37660
|
reader.onloadend = () => {
|
|
37661
37661
|
if (reader.readyState !== 2) {
|
|
@@ -37664,7 +37664,7 @@ function readToBase64(blob) {
|
|
|
37664
37664
|
const result = reader.result ?? "";
|
|
37665
37665
|
const commaIndex = result.indexOf(",");
|
|
37666
37666
|
const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;
|
|
37667
|
-
|
|
37667
|
+
resolve33(result.substring(dataOffset));
|
|
37668
37668
|
};
|
|
37669
37669
|
reader.onabort = () => reject(new Error("Read aborted"));
|
|
37670
37670
|
reader.onerror = () => reject(reader.error);
|
|
@@ -37789,7 +37789,7 @@ var init_stream_collector3 = __esm({
|
|
|
37789
37789
|
if (isReadableStreamInstance(stream)) {
|
|
37790
37790
|
return collectReadableStream3(stream);
|
|
37791
37791
|
}
|
|
37792
|
-
return new Promise((
|
|
37792
|
+
return new Promise((resolve33, reject) => {
|
|
37793
37793
|
const collector = new Collector6();
|
|
37794
37794
|
stream.pipe(collector);
|
|
37795
37795
|
stream.on("error", (err) => {
|
|
@@ -37799,7 +37799,7 @@ var init_stream_collector3 = __esm({
|
|
|
37799
37799
|
collector.on("error", reject);
|
|
37800
37800
|
collector.on("finish", function() {
|
|
37801
37801
|
const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));
|
|
37802
|
-
|
|
37802
|
+
resolve33(bytes);
|
|
37803
37803
|
});
|
|
37804
37804
|
});
|
|
37805
37805
|
};
|
|
@@ -38761,7 +38761,7 @@ async function* readableToIterable3(readStream) {
|
|
|
38761
38761
|
streamEnded = true;
|
|
38762
38762
|
});
|
|
38763
38763
|
while (!generationEnded) {
|
|
38764
|
-
const value = await new Promise((
|
|
38764
|
+
const value = await new Promise((resolve33) => setTimeout(() => resolve33(records.shift()), 0));
|
|
38765
38765
|
if (value) {
|
|
38766
38766
|
yield value;
|
|
38767
38767
|
}
|
|
@@ -42569,7 +42569,7 @@ var init_retryMiddleware3 = __esm({
|
|
|
42569
42569
|
init_constants17();
|
|
42570
42570
|
init_parseRetryAfterHeader3();
|
|
42571
42571
|
init_util4();
|
|
42572
|
-
cooldown3 = (ms) => new Promise((
|
|
42572
|
+
cooldown3 = (ms) => new Promise((resolve33) => setTimeout(resolve33, ms));
|
|
42573
42573
|
isRetryStrategyV23 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined";
|
|
42574
42574
|
getRetryErrorInfo3 = (error64, logger4) => {
|
|
42575
42575
|
const errorInfo = {
|
|
@@ -42667,7 +42667,7 @@ var init_DefaultRateLimiter2 = __esm({
|
|
|
42667
42667
|
this.refillTokenBucket();
|
|
42668
42668
|
while (amount > this.availableTokens) {
|
|
42669
42669
|
const delay = (amount - this.availableTokens) / this.fillRate * 1e3;
|
|
42670
|
-
await new Promise((
|
|
42670
|
+
await new Promise((resolve33) => _DefaultRateLimiter.setTimeoutFn(resolve33, delay));
|
|
42671
42671
|
this.refillTokenBucket();
|
|
42672
42672
|
}
|
|
42673
42673
|
this.availableTokens = this.availableTokens - amount;
|
|
@@ -43099,7 +43099,7 @@ var init_StandardRetryStrategy4 = __esm({
|
|
|
43099
43099
|
const delayFromResponse = getDelayFromRetryAfterHeader2(err.$response);
|
|
43100
43100
|
const delay = Math.max(delayFromResponse || 0, delayFromDecider);
|
|
43101
43101
|
totalDelay += delay;
|
|
43102
|
-
await new Promise((
|
|
43102
|
+
await new Promise((resolve33) => setTimeout(resolve33, delay));
|
|
43103
43103
|
continue;
|
|
43104
43104
|
}
|
|
43105
43105
|
if (!err.$metadata) {
|
|
@@ -52660,7 +52660,7 @@ var require_dist_cjs14 = __commonJS({
|
|
|
52660
52660
|
var DEFAULT_MAX_RETRIES = 0;
|
|
52661
52661
|
var providerConfigFromInit = ({ maxRetries = DEFAULT_MAX_RETRIES, timeout = DEFAULT_TIMEOUT }) => ({ maxRetries, timeout });
|
|
52662
52662
|
function httpRequest(options) {
|
|
52663
|
-
return new Promise((
|
|
52663
|
+
return new Promise((resolve33, reject) => {
|
|
52664
52664
|
const req = node_http.request({
|
|
52665
52665
|
method: "GET",
|
|
52666
52666
|
...options,
|
|
@@ -52685,7 +52685,7 @@ var require_dist_cjs14 = __commonJS({
|
|
|
52685
52685
|
chunks.push(chunk);
|
|
52686
52686
|
});
|
|
52687
52687
|
res.on("end", () => {
|
|
52688
|
-
|
|
52688
|
+
resolve33(Buffer.concat(chunks));
|
|
52689
52689
|
req.destroy();
|
|
52690
52690
|
});
|
|
52691
52691
|
});
|
|
@@ -53129,21 +53129,21 @@ var require_dist_cjs15 = __commonJS({
|
|
|
53129
53129
|
let sendBody = true;
|
|
53130
53130
|
if (!externalAgent && expect === "100-continue") {
|
|
53131
53131
|
sendBody = await Promise.race([
|
|
53132
|
-
new Promise((
|
|
53133
|
-
timeoutId = Number(timing.setTimeout(() =>
|
|
53132
|
+
new Promise((resolve33) => {
|
|
53133
|
+
timeoutId = Number(timing.setTimeout(() => resolve33(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
|
|
53134
53134
|
}),
|
|
53135
|
-
new Promise((
|
|
53135
|
+
new Promise((resolve33) => {
|
|
53136
53136
|
httpRequest.on("continue", () => {
|
|
53137
53137
|
timing.clearTimeout(timeoutId);
|
|
53138
|
-
|
|
53138
|
+
resolve33(true);
|
|
53139
53139
|
});
|
|
53140
53140
|
httpRequest.on("response", () => {
|
|
53141
53141
|
timing.clearTimeout(timeoutId);
|
|
53142
|
-
|
|
53142
|
+
resolve33(false);
|
|
53143
53143
|
});
|
|
53144
53144
|
httpRequest.on("error", () => {
|
|
53145
53145
|
timing.clearTimeout(timeoutId);
|
|
53146
|
-
|
|
53146
|
+
resolve33(false);
|
|
53147
53147
|
});
|
|
53148
53148
|
})
|
|
53149
53149
|
]);
|
|
@@ -53219,13 +53219,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
53219
53219
|
return socketWarningTimestamp;
|
|
53220
53220
|
}
|
|
53221
53221
|
constructor(options) {
|
|
53222
|
-
this.configProvider = new Promise((
|
|
53222
|
+
this.configProvider = new Promise((resolve33, reject) => {
|
|
53223
53223
|
if (typeof options === "function") {
|
|
53224
53224
|
options().then((_options) => {
|
|
53225
|
-
|
|
53225
|
+
resolve33(this.resolveDefaultConfig(_options));
|
|
53226
53226
|
}).catch(reject);
|
|
53227
53227
|
} else {
|
|
53228
|
-
|
|
53228
|
+
resolve33(this.resolveDefaultConfig(options));
|
|
53229
53229
|
}
|
|
53230
53230
|
});
|
|
53231
53231
|
}
|
|
@@ -53257,7 +53257,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
53257
53257
|
timing.clearTimeout(socketTimeoutId);
|
|
53258
53258
|
timing.clearTimeout(keepAliveTimeoutId);
|
|
53259
53259
|
};
|
|
53260
|
-
const
|
|
53260
|
+
const resolve33 = async (arg) => {
|
|
53261
53261
|
await writeRequestBodyPromise;
|
|
53262
53262
|
clearTimeouts();
|
|
53263
53263
|
_resolve(arg);
|
|
@@ -53321,7 +53321,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
53321
53321
|
headers: getTransformedHeaders(res.headers),
|
|
53322
53322
|
body: res
|
|
53323
53323
|
});
|
|
53324
|
-
|
|
53324
|
+
resolve33({ response: httpResponse });
|
|
53325
53325
|
});
|
|
53326
53326
|
req.on("error", (err) => {
|
|
53327
53327
|
if (NODEJS_TIMEOUT_ERROR_CODES4.includes(err.code)) {
|
|
@@ -53649,13 +53649,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
53649
53649
|
return new _NodeHttp2Handler(instanceOrOptions);
|
|
53650
53650
|
}
|
|
53651
53651
|
constructor(options) {
|
|
53652
|
-
this.configProvider = new Promise((
|
|
53652
|
+
this.configProvider = new Promise((resolve33, reject) => {
|
|
53653
53653
|
if (typeof options === "function") {
|
|
53654
53654
|
options().then((opts) => {
|
|
53655
|
-
|
|
53655
|
+
resolve33(opts || {});
|
|
53656
53656
|
}).catch(reject);
|
|
53657
53657
|
} else {
|
|
53658
|
-
|
|
53658
|
+
resolve33(options || {});
|
|
53659
53659
|
}
|
|
53660
53660
|
});
|
|
53661
53661
|
}
|
|
@@ -53680,7 +53680,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
53680
53680
|
return new Promise((_resolve, _reject) => {
|
|
53681
53681
|
let fulfilled = false;
|
|
53682
53682
|
let writeRequestBodyPromise = void 0;
|
|
53683
|
-
const
|
|
53683
|
+
const resolve33 = async (arg) => {
|
|
53684
53684
|
await writeRequestBodyPromise;
|
|
53685
53685
|
_resolve(arg);
|
|
53686
53686
|
};
|
|
@@ -53765,7 +53765,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
53765
53765
|
body: clientHttp2Stream
|
|
53766
53766
|
});
|
|
53767
53767
|
fulfilled = true;
|
|
53768
|
-
|
|
53768
|
+
resolve33({ response: httpResponse });
|
|
53769
53769
|
if (useIsolatedSession) {
|
|
53770
53770
|
session.close();
|
|
53771
53771
|
clientHttp2Stream.on("end", () => {
|
|
@@ -53897,7 +53897,7 @@ var require_dist_cjs16 = __commonJS({
|
|
|
53897
53897
|
try {
|
|
53898
53898
|
return await toRetry();
|
|
53899
53899
|
} catch (e5) {
|
|
53900
|
-
await new Promise((
|
|
53900
|
+
await new Promise((resolve33) => setTimeout(resolve33, delayMs));
|
|
53901
53901
|
}
|
|
53902
53902
|
}
|
|
53903
53903
|
return await toRetry();
|
|
@@ -60104,7 +60104,7 @@ var require_dist_cjs20 = __commonJS({
|
|
|
60104
60104
|
try {
|
|
60105
60105
|
return await toRetry();
|
|
60106
60106
|
} catch (e5) {
|
|
60107
|
-
await new Promise((
|
|
60107
|
+
await new Promise((resolve33) => setTimeout(resolve33, delayMs));
|
|
60108
60108
|
}
|
|
60109
60109
|
}
|
|
60110
60110
|
return await toRetry();
|
|
@@ -62486,7 +62486,7 @@ var require_dist_cjs23 = __commonJS({
|
|
|
62486
62486
|
var { createHash: createHash40, createPrivateKey: createPrivateKey2, createPublicKey, sign: sign3 } = __require("node:crypto");
|
|
62487
62487
|
var { promises: promises6 } = __require("node:fs");
|
|
62488
62488
|
var { homedir: homedir20 } = __require("node:os");
|
|
62489
|
-
var { dirname:
|
|
62489
|
+
var { dirname: dirname38, join: join68 } = __require("node:path");
|
|
62490
62490
|
var LoginCredentialsFetcher = class _LoginCredentialsFetcher {
|
|
62491
62491
|
profileData;
|
|
62492
62492
|
init;
|
|
@@ -62642,7 +62642,7 @@ var require_dist_cjs23 = __commonJS({
|
|
|
62642
62642
|
}
|
|
62643
62643
|
async saveToken(token) {
|
|
62644
62644
|
const tokenFilePath = this.getTokenFilePath();
|
|
62645
|
-
const directory =
|
|
62645
|
+
const directory = dirname38(tokenFilePath);
|
|
62646
62646
|
try {
|
|
62647
62647
|
await promises6.mkdir(directory, { recursive: true });
|
|
62648
62648
|
} catch (error64) {
|
|
@@ -64103,7 +64103,7 @@ var fileStreamHasher2, isReadStream2;
|
|
|
64103
64103
|
var init_fileStreamHasher2 = __esm({
|
|
64104
64104
|
"node_modules/.pnpm/@smithy+core@3.24.3/node_modules/@smithy/core/dist-es/submodules/checksum/hash-stream-node/fileStreamHasher.js"() {
|
|
64105
64105
|
init_HashCalculator2();
|
|
64106
|
-
fileStreamHasher2 = (hashCtor, fileStream) => new Promise((
|
|
64106
|
+
fileStreamHasher2 = (hashCtor, fileStream) => new Promise((resolve33, reject) => {
|
|
64107
64107
|
if (!isReadStream2(fileStream)) {
|
|
64108
64108
|
reject(new Error("Unable to calculate hash for non-file streams."));
|
|
64109
64109
|
return;
|
|
@@ -64121,7 +64121,7 @@ var init_fileStreamHasher2 = __esm({
|
|
|
64121
64121
|
});
|
|
64122
64122
|
hashCalculator.on("error", reject);
|
|
64123
64123
|
hashCalculator.on("finish", function() {
|
|
64124
|
-
hash3.digest().then(
|
|
64124
|
+
hash3.digest().then(resolve33).catch(reject);
|
|
64125
64125
|
});
|
|
64126
64126
|
});
|
|
64127
64127
|
isReadStream2 = (stream) => typeof stream.path === "string";
|
|
@@ -64140,14 +64140,14 @@ var init_readableStreamHasher2 = __esm({
|
|
|
64140
64140
|
const hash3 = new hashCtor();
|
|
64141
64141
|
const hashCalculator = new HashCalculator2(hash3);
|
|
64142
64142
|
readableStream.pipe(hashCalculator);
|
|
64143
|
-
return new Promise((
|
|
64143
|
+
return new Promise((resolve33, reject) => {
|
|
64144
64144
|
readableStream.on("error", (err) => {
|
|
64145
64145
|
hashCalculator.end();
|
|
64146
64146
|
reject(err);
|
|
64147
64147
|
});
|
|
64148
64148
|
hashCalculator.on("error", reject);
|
|
64149
64149
|
hashCalculator.on("finish", () => {
|
|
64150
|
-
hash3.digest().then(
|
|
64150
|
+
hash3.digest().then(resolve33).catch(reject);
|
|
64151
64151
|
});
|
|
64152
64152
|
});
|
|
64153
64153
|
};
|
|
@@ -64496,21 +64496,21 @@ var require_dist_cjs33 = __commonJS({
|
|
|
64496
64496
|
let sendBody = true;
|
|
64497
64497
|
if (!externalAgent && expect === "100-continue") {
|
|
64498
64498
|
sendBody = await Promise.race([
|
|
64499
|
-
new Promise((
|
|
64500
|
-
timeoutId = Number(timing.setTimeout(() =>
|
|
64499
|
+
new Promise((resolve33) => {
|
|
64500
|
+
timeoutId = Number(timing.setTimeout(() => resolve33(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));
|
|
64501
64501
|
}),
|
|
64502
|
-
new Promise((
|
|
64502
|
+
new Promise((resolve33) => {
|
|
64503
64503
|
httpRequest.on("continue", () => {
|
|
64504
64504
|
timing.clearTimeout(timeoutId);
|
|
64505
|
-
|
|
64505
|
+
resolve33(true);
|
|
64506
64506
|
});
|
|
64507
64507
|
httpRequest.on("response", () => {
|
|
64508
64508
|
timing.clearTimeout(timeoutId);
|
|
64509
|
-
|
|
64509
|
+
resolve33(false);
|
|
64510
64510
|
});
|
|
64511
64511
|
httpRequest.on("error", () => {
|
|
64512
64512
|
timing.clearTimeout(timeoutId);
|
|
64513
|
-
|
|
64513
|
+
resolve33(false);
|
|
64514
64514
|
});
|
|
64515
64515
|
})
|
|
64516
64516
|
]);
|
|
@@ -64584,13 +64584,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
64584
64584
|
return socketWarningTimestamp;
|
|
64585
64585
|
}
|
|
64586
64586
|
constructor(options) {
|
|
64587
|
-
this.configProvider = new Promise((
|
|
64587
|
+
this.configProvider = new Promise((resolve33, reject) => {
|
|
64588
64588
|
if (typeof options === "function") {
|
|
64589
64589
|
options().then((_options) => {
|
|
64590
|
-
|
|
64590
|
+
resolve33(this.resolveDefaultConfig(_options));
|
|
64591
64591
|
}).catch(reject);
|
|
64592
64592
|
} else {
|
|
64593
|
-
|
|
64593
|
+
resolve33(this.resolveDefaultConfig(options));
|
|
64594
64594
|
}
|
|
64595
64595
|
});
|
|
64596
64596
|
}
|
|
@@ -64621,7 +64621,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
64621
64621
|
timing.clearTimeout(socketTimeoutId);
|
|
64622
64622
|
timing.clearTimeout(keepAliveTimeoutId);
|
|
64623
64623
|
};
|
|
64624
|
-
const
|
|
64624
|
+
const resolve33 = async (arg) => {
|
|
64625
64625
|
await writeRequestBodyPromise;
|
|
64626
64626
|
clearTimeouts();
|
|
64627
64627
|
_resolve(arg);
|
|
@@ -64685,7 +64685,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
64685
64685
|
headers: getTransformedHeaders(res.headers),
|
|
64686
64686
|
body: res
|
|
64687
64687
|
});
|
|
64688
|
-
|
|
64688
|
+
resolve33({ response: httpResponse });
|
|
64689
64689
|
});
|
|
64690
64690
|
req.on("error", (err) => {
|
|
64691
64691
|
if (NODEJS_TIMEOUT_ERROR_CODES4.includes(err.code)) {
|
|
@@ -65005,13 +65005,13 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
65005
65005
|
return new _NodeHttp2Handler(instanceOrOptions);
|
|
65006
65006
|
}
|
|
65007
65007
|
constructor(options) {
|
|
65008
|
-
this.configProvider = new Promise((
|
|
65008
|
+
this.configProvider = new Promise((resolve33, reject) => {
|
|
65009
65009
|
if (typeof options === "function") {
|
|
65010
65010
|
options().then((opts) => {
|
|
65011
|
-
|
|
65011
|
+
resolve33(opts || {});
|
|
65012
65012
|
}).catch(reject);
|
|
65013
65013
|
} else {
|
|
65014
|
-
|
|
65014
|
+
resolve33(options || {});
|
|
65015
65015
|
}
|
|
65016
65016
|
});
|
|
65017
65017
|
}
|
|
@@ -65036,7 +65036,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
65036
65036
|
return new Promise((_resolve, _reject) => {
|
|
65037
65037
|
let fulfilled = false;
|
|
65038
65038
|
let writeRequestBodyPromise = void 0;
|
|
65039
|
-
const
|
|
65039
|
+
const resolve33 = async (arg) => {
|
|
65040
65040
|
await writeRequestBodyPromise;
|
|
65041
65041
|
_resolve(arg);
|
|
65042
65042
|
};
|
|
@@ -65121,7 +65121,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
65121
65121
|
body: clientHttp2Stream
|
|
65122
65122
|
});
|
|
65123
65123
|
fulfilled = true;
|
|
65124
|
-
|
|
65124
|
+
resolve33({ response: httpResponse });
|
|
65125
65125
|
if (useIsolatedSession) {
|
|
65126
65126
|
session.close();
|
|
65127
65127
|
}
|
|
@@ -65163,7 +65163,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
65163
65163
|
if (isReadableStreamInstance2(stream)) {
|
|
65164
65164
|
return collectReadableStream4(stream);
|
|
65165
65165
|
}
|
|
65166
|
-
return new Promise((
|
|
65166
|
+
return new Promise((resolve33, reject) => {
|
|
65167
65167
|
const collector = new Collector7();
|
|
65168
65168
|
stream.pipe(collector);
|
|
65169
65169
|
stream.on("error", (err) => {
|
|
@@ -65173,7 +65173,7 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|
|
65173
65173
|
collector.on("error", reject);
|
|
65174
65174
|
collector.on("finish", function() {
|
|
65175
65175
|
const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));
|
|
65176
|
-
|
|
65176
|
+
resolve33(bytes);
|
|
65177
65177
|
});
|
|
65178
65178
|
});
|
|
65179
65179
|
};
|
|
@@ -79366,12 +79366,12 @@ var require_dist_cjs42 = __commonJS({
|
|
|
79366
79366
|
}
|
|
79367
79367
|
});
|
|
79368
79368
|
|
|
79369
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
79369
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner.js
|
|
79370
79370
|
import * as os22 from "os";
|
|
79371
79371
|
import * as path67 from "path";
|
|
79372
79372
|
import * as fs68 from "fs";
|
|
79373
79373
|
|
|
79374
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
79374
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/local-path-codec.js
|
|
79375
79375
|
import * as path from "path";
|
|
79376
79376
|
var WIN32_RESERVED_CHARS = /[<>:"/\\|?*]/;
|
|
79377
79377
|
var WIN32_DEVICE_NAME = /^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i;
|
|
@@ -79429,12 +79429,12 @@ function canonicalVaultKeySpelling(key) {
|
|
|
79429
79429
|
return segments.join("/");
|
|
79430
79430
|
}
|
|
79431
79431
|
|
|
79432
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
79432
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner.js
|
|
79433
79433
|
import { randomUUID as randomUUID14 } from "node:crypto";
|
|
79434
79434
|
import { monitorEventLoopDelay as monitorEventLoopDelay2, performance as performance4 } from "node:perf_hooks";
|
|
79435
79435
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
79436
79436
|
|
|
79437
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
79437
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cloud-placeholder.js
|
|
79438
79438
|
import * as fs from "fs";
|
|
79439
79439
|
import * as path2 from "path";
|
|
79440
79440
|
var CLOUD_PLACEHOLDER_SUFFIX = ".hqcloud";
|
|
@@ -79629,7 +79629,7 @@ function writeCloudPlaceholder(placeholderPath, placeholder) {
|
|
|
79629
79629
|
}
|
|
79630
79630
|
}
|
|
79631
79631
|
|
|
79632
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
79632
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/best-effort-error.js
|
|
79633
79633
|
var EXPECTED_ABSENCE_CODES = /* @__PURE__ */ new Set([
|
|
79634
79634
|
"ENOENT",
|
|
79635
79635
|
"NoSuchKey",
|
|
@@ -79671,7 +79671,7 @@ function noteSwallowedError(log, event, error64, options = {}) {
|
|
|
79671
79671
|
`);
|
|
79672
79672
|
}
|
|
79673
79673
|
|
|
79674
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
79674
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/client-info.js
|
|
79675
79675
|
var HEADER_CLIENT_NAME = "x-hq-client-name";
|
|
79676
79676
|
var HEADER_CLIENT_VERSION = "x-hq-client-version";
|
|
79677
79677
|
var HEADER_HQ_CORE_VERSION = "x-hq-core-version";
|
|
@@ -79694,7 +79694,7 @@ function buildClientHeaders(info) {
|
|
|
79694
79694
|
return headers;
|
|
79695
79695
|
}
|
|
79696
79696
|
|
|
79697
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
79697
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/telemetry-events.js
|
|
79698
79698
|
var MAX_EVENTS_PER_BATCH = 50;
|
|
79699
79699
|
var DEFAULT_TIMEOUT_MS = 1500;
|
|
79700
79700
|
var MAX_PROPERTIES = 40;
|
|
@@ -79833,7 +79833,7 @@ function describeError(err) {
|
|
|
79833
79833
|
return err instanceof Error ? err.name : typeof err;
|
|
79834
79834
|
}
|
|
79835
79835
|
|
|
79836
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
79836
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/net-errors.js
|
|
79837
79837
|
var TRANSIENT_NETWORK_EXIT = 75;
|
|
79838
79838
|
var TRANSIENT_CODES = /* @__PURE__ */ new Set([
|
|
79839
79839
|
"ECONNREFUSED",
|
|
@@ -79916,12 +79916,12 @@ function isRemoteObjectGoneError(err) {
|
|
|
79916
79916
|
return /\bhttp=404\b/.test(err.message);
|
|
79917
79917
|
}
|
|
79918
79918
|
|
|
79919
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
79919
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/http-keepalive.js
|
|
79920
79920
|
import * as http from "node:http";
|
|
79921
79921
|
import * as https from "node:https";
|
|
79922
79922
|
import { Readable } from "node:stream";
|
|
79923
79923
|
|
|
79924
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
79924
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/realtime-telemetry.js
|
|
79925
79925
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
79926
79926
|
import { monitorEventLoopDelay } from "node:perf_hooks";
|
|
79927
79927
|
var REALTIME_TELEMETRY_EVENT = "sync.realtime.timing";
|
|
@@ -80111,7 +80111,7 @@ function writeRealtimeTelemetryToStderr(record2) {
|
|
|
80111
80111
|
`);
|
|
80112
80112
|
}
|
|
80113
80113
|
|
|
80114
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
80114
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/http-keepalive.js
|
|
80115
80115
|
var HTTP_AGENT = new http.Agent({ keepAlive: true, maxSockets: 8 });
|
|
80116
80116
|
var HTTPS_AGENT = new https.Agent({ keepAlive: true, maxSockets: 8 });
|
|
80117
80117
|
function getKeepAliveAgent(secure) {
|
|
@@ -80144,7 +80144,7 @@ function requestWithKeepAlive(url2, init) {
|
|
|
80144
80144
|
if (body !== void 0 && headers["content-length"] === void 0) {
|
|
80145
80145
|
headers["content-length"] = String(typeof body === "string" ? Buffer.byteLength(body) : body.byteLength);
|
|
80146
80146
|
}
|
|
80147
|
-
return new Promise((
|
|
80147
|
+
return new Promise((resolve33, reject) => {
|
|
80148
80148
|
const request5 = requestFn(target, {
|
|
80149
80149
|
method: init.method ?? "GET",
|
|
80150
80150
|
headers,
|
|
@@ -80163,7 +80163,7 @@ function requestWithKeepAlive(url2, init) {
|
|
|
80163
80163
|
const discardBody = status === 204 || status === 205 || status === 304 || init.method === "HEAD" || (init.method === "PUT" || init.method === "DELETE") && status >= 200 && status < 300;
|
|
80164
80164
|
if (discardBody)
|
|
80165
80165
|
response.resume();
|
|
80166
|
-
|
|
80166
|
+
resolve33(new Response(discardBody ? null : Readable.toWeb(response), { status, statusText: response.statusMessage, headers: responseHeaders }));
|
|
80167
80167
|
});
|
|
80168
80168
|
measureSocketSetup(request5, secure);
|
|
80169
80169
|
request5.once("error", reject);
|
|
@@ -99037,7 +99037,8 @@ function date4(params) {
|
|
|
99037
99037
|
return _coercedDate(ZodDate, params);
|
|
99038
99038
|
}
|
|
99039
99039
|
|
|
99040
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
99040
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cognito-auth.js
|
|
99041
|
+
import { spawnSync } from "child_process";
|
|
99041
99042
|
import * as crypto2 from "crypto";
|
|
99042
99043
|
import * as fs7 from "fs";
|
|
99043
99044
|
import * as http2 from "http";
|
|
@@ -99477,14 +99478,14 @@ var baseOpen = async (options) => {
|
|
|
99477
99478
|
}
|
|
99478
99479
|
const subprocess = childProcess.spawn(command5, cliArguments, childProcessOptions);
|
|
99479
99480
|
if (options.wait) {
|
|
99480
|
-
return new Promise((
|
|
99481
|
+
return new Promise((resolve33, reject) => {
|
|
99481
99482
|
subprocess.once("error", reject);
|
|
99482
99483
|
subprocess.once("close", (exitCode) => {
|
|
99483
99484
|
if (!options.allowNonzeroExitCode && exitCode > 0) {
|
|
99484
99485
|
reject(new Error(`Exited with code ${exitCode}`));
|
|
99485
99486
|
return;
|
|
99486
99487
|
}
|
|
99487
|
-
|
|
99488
|
+
resolve33(subprocess);
|
|
99488
99489
|
});
|
|
99489
99490
|
});
|
|
99490
99491
|
}
|
|
@@ -99558,7 +99559,7 @@ defineLazyProperty(apps, "browser", () => "browser");
|
|
|
99558
99559
|
defineLazyProperty(apps, "browserPrivate", () => "browserPrivate");
|
|
99559
99560
|
var open_default = open2;
|
|
99560
99561
|
|
|
99561
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
99562
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cognito-auth.js
|
|
99562
99563
|
var CognitoAuthError = class extends Error {
|
|
99563
99564
|
constructor(message) {
|
|
99564
99565
|
super(message);
|
|
@@ -99711,6 +99712,20 @@ function tokensCarryMachineIdentity(tokens) {
|
|
|
99711
99712
|
const entityType = idClaims?.["custom:entityType"];
|
|
99712
99713
|
return typeof entityType === "string" && entityType.trim().length > 0 || idClaims !== null && hasCompanyMarkers(idClaims) || accessClaims !== null && hasCompanyMarkers(accessClaims);
|
|
99713
99714
|
}
|
|
99715
|
+
function loadPersonTokensFromKeychain() {
|
|
99716
|
+
const raw = readKeychainTokenJson();
|
|
99717
|
+
if (!raw)
|
|
99718
|
+
return null;
|
|
99719
|
+
try {
|
|
99720
|
+
const tokens = JSON.parse(raw);
|
|
99721
|
+
if (!tokens || typeof tokens.accessToken !== "string" || tokens.accessToken.length === 0 || typeof tokens.idToken !== "string" || tokens.idToken.length === 0 || tokenIsInvalidated(tokens.accessToken, "person") || tokensCarryMachineIdentity(tokens)) {
|
|
99722
|
+
return null;
|
|
99723
|
+
}
|
|
99724
|
+
return tokens;
|
|
99725
|
+
} catch {
|
|
99726
|
+
return null;
|
|
99727
|
+
}
|
|
99728
|
+
}
|
|
99714
99729
|
function loadCachedTokensFrom(kind) {
|
|
99715
99730
|
const file2 = cacheFileFor(kind);
|
|
99716
99731
|
const memory = () => {
|
|
@@ -99719,16 +99734,22 @@ function loadCachedTokensFrom(kind) {
|
|
|
99719
99734
|
};
|
|
99720
99735
|
if (!fs7.existsSync(file2))
|
|
99721
99736
|
return memory();
|
|
99737
|
+
let fromFile = null;
|
|
99738
|
+
let unreadable = false;
|
|
99722
99739
|
try {
|
|
99723
99740
|
const raw = fs7.readFileSync(file2, "utf-8");
|
|
99724
99741
|
const tokens = JSON.parse(raw);
|
|
99725
|
-
if (
|
|
99726
|
-
|
|
99742
|
+
if (tokens.accessToken && !tokenIsInvalidated(tokens.accessToken, kind)) {
|
|
99743
|
+
fromFile = tokens;
|
|
99727
99744
|
}
|
|
99728
|
-
return tokens;
|
|
99729
99745
|
} catch {
|
|
99730
|
-
|
|
99746
|
+
unreadable = true;
|
|
99747
|
+
}
|
|
99748
|
+
const fromKeychain = kind === "person" ? loadPersonTokensFromKeychain() : null;
|
|
99749
|
+
if (unreadable) {
|
|
99750
|
+
return pickNewerSession(fromKeychain, memory());
|
|
99731
99751
|
}
|
|
99752
|
+
return pickNewerSession(fromKeychain, fromFile);
|
|
99732
99753
|
}
|
|
99733
99754
|
function loadCachedTokens() {
|
|
99734
99755
|
if (companyMachineRequired())
|
|
@@ -100126,7 +100147,7 @@ function isCognitoThrottle(status, type2) {
|
|
|
100126
100147
|
return status === 429;
|
|
100127
100148
|
}
|
|
100128
100149
|
function sleep(ms) {
|
|
100129
|
-
return new Promise((
|
|
100150
|
+
return new Promise((resolve33) => setTimeout(resolve33, ms));
|
|
100130
100151
|
}
|
|
100131
100152
|
function backoffDelayMs(attempt, opts) {
|
|
100132
100153
|
const ceiling = Math.min(opts.maxDelayMs, opts.baseDelayMs * 2 ** attempt);
|
|
@@ -100428,7 +100449,7 @@ async function browserLogin(config2) {
|
|
|
100428
100449
|
saveCachedTokens(tokens);
|
|
100429
100450
|
return tokens;
|
|
100430
100451
|
function waitForAuthCode(port2, expectedState) {
|
|
100431
|
-
return new Promise((
|
|
100452
|
+
return new Promise((resolve33, reject) => {
|
|
100432
100453
|
const server = http2.createServer((req, res) => {
|
|
100433
100454
|
const url2 = new URL(req.url ?? "/", `http://localhost:${port2}`);
|
|
100434
100455
|
if (url2.pathname !== "/callback") {
|
|
@@ -100467,7 +100488,7 @@ async function browserLogin(config2) {
|
|
|
100467
100488
|
<script>setTimeout(()=>window.close(),1500)</script>
|
|
100468
100489
|
</body></html>`);
|
|
100469
100490
|
cleanup();
|
|
100470
|
-
|
|
100491
|
+
resolve33(code2);
|
|
100471
100492
|
});
|
|
100472
100493
|
server.on("error", (err) => {
|
|
100473
100494
|
cleanup();
|
|
@@ -100664,8 +100685,139 @@ async function getValidAccessToken(config2, options = {}) {
|
|
|
100664
100685
|
function escapeHtml(s2) {
|
|
100665
100686
|
return s2.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
100666
100687
|
}
|
|
100688
|
+
var KEYCHAIN_SERVICE = "ai.indigo.hq.cognito-tokens";
|
|
100689
|
+
var KEYCHAIN_ACCOUNT = "person";
|
|
100690
|
+
var KEYCHAIN_READ_TIMEOUT_MS = 3e3;
|
|
100691
|
+
var KEYCHAIN_FIRST_READ_TIMEOUT_MS = 6e4;
|
|
100692
|
+
var SECURITY_ITEM_NOT_FOUND = 44;
|
|
100693
|
+
var READ_CACHE_MS = 3e4;
|
|
100694
|
+
var KEYCHAIN_FIRST_READ_NOTE = "macOS will ask once whether HQ can read your sign-in from the Keychain. Choose Always Allow.";
|
|
100695
|
+
var defaultRunner = (args, timeoutMs) => {
|
|
100696
|
+
try {
|
|
100697
|
+
const result = spawnSync("/usr/bin/security", args, {
|
|
100698
|
+
encoding: "utf8",
|
|
100699
|
+
timeout: timeoutMs,
|
|
100700
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
100701
|
+
});
|
|
100702
|
+
const timedOut = result.error?.code === "ETIMEDOUT";
|
|
100703
|
+
return { status: result.status, stdout: typeof result.stdout === "string" ? result.stdout : "", timedOut };
|
|
100704
|
+
} catch {
|
|
100705
|
+
return { status: null, stdout: "", timedOut: false };
|
|
100706
|
+
}
|
|
100707
|
+
};
|
|
100708
|
+
var testOverrides = null;
|
|
100709
|
+
function resolve2(opts) {
|
|
100710
|
+
return { ...testOverrides ?? {}, ...opts };
|
|
100711
|
+
}
|
|
100712
|
+
function keychainTokenReadEnabled(opts = {}) {
|
|
100713
|
+
const o3 = resolve2(opts);
|
|
100714
|
+
const platform5 = o3.platform ?? process.platform;
|
|
100715
|
+
const env4 = o3.env ?? process.env;
|
|
100716
|
+
if (platform5 !== "darwin")
|
|
100717
|
+
return false;
|
|
100718
|
+
const flag = env4.HQ_TOKEN_KEYCHAIN?.trim().toLowerCase();
|
|
100719
|
+
if (flag === "0" || flag === "false" || flag === "off")
|
|
100720
|
+
return false;
|
|
100721
|
+
if (env4.HQ_STATE_DIR?.trim())
|
|
100722
|
+
return false;
|
|
100723
|
+
return true;
|
|
100724
|
+
}
|
|
100725
|
+
function keychainAccessStateFile(home = os2.homedir()) {
|
|
100726
|
+
return path4.join(home, ".hq", "keychain-access.json");
|
|
100727
|
+
}
|
|
100728
|
+
function readKeychainAccessState(home = os2.homedir()) {
|
|
100729
|
+
try {
|
|
100730
|
+
const parsed = JSON.parse(fs7.readFileSync(keychainAccessStateFile(home), "utf8"));
|
|
100731
|
+
return parsed && typeof parsed === "object" ? parsed : {};
|
|
100732
|
+
} catch {
|
|
100733
|
+
return {};
|
|
100734
|
+
}
|
|
100735
|
+
}
|
|
100736
|
+
function writeKeychainAccessState(home, state4) {
|
|
100737
|
+
try {
|
|
100738
|
+
const file2 = keychainAccessStateFile(home);
|
|
100739
|
+
fs7.mkdirSync(path4.dirname(file2), { recursive: true, mode: 448 });
|
|
100740
|
+
const tmp = `${file2}.tmp.${process.pid}`;
|
|
100741
|
+
fs7.writeFileSync(tmp, `${JSON.stringify(state4, null, 2)}
|
|
100742
|
+
`, { mode: 384 });
|
|
100743
|
+
fs7.renameSync(tmp, file2);
|
|
100744
|
+
} catch {
|
|
100745
|
+
}
|
|
100746
|
+
}
|
|
100747
|
+
function decodeSecurityOutput(stdout) {
|
|
100748
|
+
const trimmed = stdout.replace(/\r?\n$/, "");
|
|
100749
|
+
if (!trimmed.startsWith("{") && /^(?:[0-9a-fA-F]{2})+$/.test(trimmed)) {
|
|
100750
|
+
return Buffer.from(trimmed, "hex").toString("utf8");
|
|
100751
|
+
}
|
|
100752
|
+
return trimmed;
|
|
100753
|
+
}
|
|
100754
|
+
var readCache = null;
|
|
100755
|
+
function readKeychainTokenJsonDetailed(opts = {}) {
|
|
100756
|
+
const o3 = resolve2(opts);
|
|
100757
|
+
if (!keychainTokenReadEnabled(o3))
|
|
100758
|
+
return { json: null, outcome: "disabled" };
|
|
100759
|
+
const home = o3.home ?? os2.homedir();
|
|
100760
|
+
if (!o3.retry && readCache && readCache.home === home && Date.now() - readCache.at < READ_CACHE_MS) {
|
|
100761
|
+
return { json: readCache.json, outcome: readCache.outcome };
|
|
100762
|
+
}
|
|
100763
|
+
const remember = (json3, outcome) => {
|
|
100764
|
+
readCache = { at: Date.now(), home, json: json3, outcome };
|
|
100765
|
+
return { json: json3, outcome };
|
|
100766
|
+
};
|
|
100767
|
+
let state4 = readKeychainAccessState(home);
|
|
100768
|
+
if (o3.retry && state4.deniedAt) {
|
|
100769
|
+
const { deniedAt: _cleared, ...rest } = state4;
|
|
100770
|
+
state4 = rest;
|
|
100771
|
+
writeKeychainAccessState(home, state4);
|
|
100772
|
+
}
|
|
100773
|
+
if (state4.deniedAt)
|
|
100774
|
+
return remember(null, "skipped-denied");
|
|
100775
|
+
if (!state4.allowedAt) {
|
|
100776
|
+
const interactive = o3.interactive ?? Boolean(process.stderr.isTTY);
|
|
100777
|
+
if (!interactive)
|
|
100778
|
+
return remember(null, "skipped-not-interactive");
|
|
100779
|
+
if (!state4.noteShownAt) {
|
|
100780
|
+
(o3.notify ?? ((line) => process.stderr.write(`${line}
|
|
100781
|
+
`)))(KEYCHAIN_FIRST_READ_NOTE);
|
|
100782
|
+
state4 = { ...state4, noteShownAt: (/* @__PURE__ */ new Date()).toISOString() };
|
|
100783
|
+
writeKeychainAccessState(home, state4);
|
|
100784
|
+
}
|
|
100785
|
+
}
|
|
100786
|
+
const run = o3.runSecurity ?? defaultRunner;
|
|
100787
|
+
const result = run(["find-generic-password", "-s", KEYCHAIN_SERVICE, "-a", KEYCHAIN_ACCOUNT, "-w"], state4.allowedAt ? KEYCHAIN_READ_TIMEOUT_MS : KEYCHAIN_FIRST_READ_TIMEOUT_MS);
|
|
100788
|
+
if (result.status === 0 && !result.timedOut) {
|
|
100789
|
+
if (!state4.allowedAt)
|
|
100790
|
+
writeKeychainAccessState(home, { ...state4, allowedAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
100791
|
+
return remember(decodeSecurityOutput(result.stdout), "hit");
|
|
100792
|
+
}
|
|
100793
|
+
if (result.status === SECURITY_ITEM_NOT_FOUND && !result.timedOut)
|
|
100794
|
+
return remember(null, "miss");
|
|
100795
|
+
writeKeychainAccessState(home, { ...state4, deniedAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
100796
|
+
return remember(null, "denied");
|
|
100797
|
+
}
|
|
100798
|
+
function readKeychainTokenJson(opts = {}) {
|
|
100799
|
+
return readKeychainTokenJsonDetailed(opts).json;
|
|
100800
|
+
}
|
|
100801
|
+
function expiresAtMs(tokens) {
|
|
100802
|
+
const value = tokens.expiresAt;
|
|
100803
|
+
if (typeof value === "number" && Number.isFinite(value))
|
|
100804
|
+
return value;
|
|
100805
|
+
if (typeof value === "string") {
|
|
100806
|
+
const parsed = Date.parse(value);
|
|
100807
|
+
if (Number.isFinite(parsed))
|
|
100808
|
+
return parsed;
|
|
100809
|
+
}
|
|
100810
|
+
return Number.NEGATIVE_INFINITY;
|
|
100811
|
+
}
|
|
100812
|
+
function pickNewerSession(fromKeychain, other) {
|
|
100813
|
+
if (!fromKeychain)
|
|
100814
|
+
return other;
|
|
100815
|
+
if (!other)
|
|
100816
|
+
return fromKeychain;
|
|
100817
|
+
return expiresAtMs(other) > expiresAtMs(fromKeychain) ? other : fromKeychain;
|
|
100818
|
+
}
|
|
100667
100819
|
|
|
100668
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
100820
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/credential-scope-error.js
|
|
100669
100821
|
var POLICY_WRITE_SCOPE_TRUNCATED = "POLICY_WRITE_SCOPE_TRUNCATED";
|
|
100670
100822
|
var VaultCredentialScopeError = class extends Error {
|
|
100671
100823
|
droppedWriteGrantPrefixes;
|
|
@@ -100707,7 +100859,7 @@ function assertCredentialScopeUsable(diagnostic) {
|
|
|
100707
100859
|
}
|
|
100708
100860
|
}
|
|
100709
100861
|
|
|
100710
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
100862
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/plan-limit.js
|
|
100711
100863
|
var PLAN_LIMIT_REACHED_ERROR = "plan_limit_reached";
|
|
100712
100864
|
var PLAN_LIMIT_CODES = /* @__PURE__ */ new Set([
|
|
100713
100865
|
"PLAN_LIMIT_EXCEEDED",
|
|
@@ -100805,7 +100957,7 @@ function formatPlanLimitNotice(event) {
|
|
|
100805
100957
|
return ` ! ${files} paused by your plan limit.${reason} Upgrade: ${event.upgradeUrl}`;
|
|
100806
100958
|
}
|
|
100807
100959
|
|
|
100808
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
100960
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/vault-client.js
|
|
100809
100961
|
var DEFAULT_GLOBAL_FETCH = globalThis.fetch;
|
|
100810
100962
|
var VaultClientError = class extends Error {
|
|
100811
100963
|
statusCode;
|
|
@@ -100912,7 +101064,7 @@ function isTransient(status) {
|
|
|
100912
101064
|
return status === 429 || status >= 500;
|
|
100913
101065
|
}
|
|
100914
101066
|
async function sleep2(ms) {
|
|
100915
|
-
return new Promise((
|
|
101067
|
+
return new Promise((resolve33) => setTimeout(resolve33, ms));
|
|
100916
101068
|
}
|
|
100917
101069
|
var membershipRoleSchema = external_exports.enum(["owner", "admin", "member", "guest"]);
|
|
100918
101070
|
var membershipStatusSchema = external_exports.enum(["pending", "active", "revoked"]);
|
|
@@ -101753,7 +101905,7 @@ function parseVaultErrorBody(body) {
|
|
|
101753
101905
|
}
|
|
101754
101906
|
}
|
|
101755
101907
|
|
|
101756
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
101908
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/context.js
|
|
101757
101909
|
var REFRESH_THRESHOLD_MS = 2 * 60 * 1e3;
|
|
101758
101910
|
var DEFAULT_SESSION_DURATION_SECONDS = 900;
|
|
101759
101911
|
var PRESIGN_NO_VEND_EXPIRES_AT = "9999-12-31T23:59:59.000Z";
|
|
@@ -101864,8 +102016,8 @@ async function sleepMs(ms) {
|
|
|
101864
102016
|
await entityFetchSleepForTest(ms);
|
|
101865
102017
|
return;
|
|
101866
102018
|
}
|
|
101867
|
-
await new Promise((
|
|
101868
|
-
setTimeout(
|
|
102019
|
+
await new Promise((resolve33) => {
|
|
102020
|
+
setTimeout(resolve33, ms);
|
|
101869
102021
|
});
|
|
101870
102022
|
}
|
|
101871
102023
|
function parseRetryAfterMs(header) {
|
|
@@ -101976,12 +102128,12 @@ async function vendSelfCredentials(personUid, config2) {
|
|
|
101976
102128
|
return postVend(route, { personUid }, config2);
|
|
101977
102129
|
}
|
|
101978
102130
|
|
|
101979
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
102131
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/s3.js
|
|
101980
102132
|
import * as fs10 from "fs";
|
|
101981
102133
|
import * as path8 from "path";
|
|
101982
102134
|
import * as crypto4 from "crypto";
|
|
101983
102135
|
|
|
101984
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
102136
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/local-replacement.js
|
|
101985
102137
|
import * as crypto3 from "crypto";
|
|
101986
102138
|
import * as fs8 from "fs";
|
|
101987
102139
|
import * as os3 from "os";
|
|
@@ -102037,11 +102189,11 @@ function shouldRecordLocalDeleteIntent(localPath, absent) {
|
|
|
102037
102189
|
return absent && !isLocalPathBeingReplaced(localPath);
|
|
102038
102190
|
}
|
|
102039
102191
|
|
|
102040
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
102192
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/s3.js
|
|
102041
102193
|
import { Readable as Readable19, Transform as Transform3 } from "stream";
|
|
102042
102194
|
import { pipeline } from "stream/promises";
|
|
102043
102195
|
|
|
102044
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
102196
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/ontology-entity-meta.js
|
|
102045
102197
|
var ONTOLOGY_ENTITY_KEY = /^ontology\/entities\/[a-z][a-z0-9-]*\/[^/]+\.md$/;
|
|
102046
102198
|
var ENTITY_LAST_UPDATED_META_KEY = "hq-entity-last-updated";
|
|
102047
102199
|
function ontologyVaultKey(relPath) {
|
|
@@ -102073,13 +102225,13 @@ function buildEntityMetadata(key, body) {
|
|
|
102073
102225
|
return stamp === null ? {} : { [ENTITY_LAST_UPDATED_META_KEY]: stamp };
|
|
102074
102226
|
}
|
|
102075
102227
|
|
|
102076
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
102228
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/object-io.js
|
|
102077
102229
|
var import_client_s3 = __toESM(require_dist_cjs36(), 1);
|
|
102078
102230
|
import * as http3 from "node:http";
|
|
102079
102231
|
import * as https2 from "node:https";
|
|
102080
102232
|
import { Transform as Transform2 } from "node:stream";
|
|
102081
102233
|
|
|
102082
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
102234
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/s3-content-checksum.js
|
|
102083
102235
|
import { createHash as createHash11 } from "node:crypto";
|
|
102084
102236
|
var CHECKSUM_HEADER_NAMES = [
|
|
102085
102237
|
"content-md5",
|
|
@@ -102150,7 +102302,7 @@ function headersForObjectLockPut(url2, headers, body) {
|
|
|
102150
102302
|
return out;
|
|
102151
102303
|
}
|
|
102152
102304
|
|
|
102153
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
102305
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bandwidth.js
|
|
102154
102306
|
import { Transform } from "node:stream";
|
|
102155
102307
|
var MAX_BYTES_PER_SEC_ENV = "HQ_SYNC_MAX_BYTES_PER_SEC";
|
|
102156
102308
|
var MAX_CONCURRENCY_ENV = "HQ_SYNC_MAX_CONCURRENCY";
|
|
@@ -102225,7 +102377,7 @@ var ThroughputEstimator = class {
|
|
|
102225
102377
|
return max;
|
|
102226
102378
|
}
|
|
102227
102379
|
};
|
|
102228
|
-
var realSleep = (ms) => new Promise((
|
|
102380
|
+
var realSleep = (ms) => new Promise((resolve33) => setTimeout(resolve33, ms));
|
|
102229
102381
|
var TokenBucket = class {
|
|
102230
102382
|
rateBps;
|
|
102231
102383
|
tokens = 0;
|
|
@@ -102427,24 +102579,24 @@ var BandwidthGovernor = class {
|
|
|
102427
102579
|
admitWaitingChoreTransfers() {
|
|
102428
102580
|
const limit = this.choreTransferLimit();
|
|
102429
102581
|
while (this.activeChoreTransfers < limit && this.choreTransferWaiters.length > 0) {
|
|
102430
|
-
const
|
|
102431
|
-
if (!
|
|
102582
|
+
const resolve33 = this.choreTransferWaiters.shift();
|
|
102583
|
+
if (!resolve33)
|
|
102432
102584
|
return;
|
|
102433
102585
|
this.activeChoreTransfers++;
|
|
102434
|
-
|
|
102586
|
+
resolve33(this.makeChoreTransferRelease());
|
|
102435
102587
|
}
|
|
102436
102588
|
}
|
|
102437
102589
|
acquireChoreTransfer() {
|
|
102438
|
-
return new Promise((
|
|
102590
|
+
return new Promise((resolve33) => {
|
|
102439
102591
|
if (this.choreTransferWaiters.length === 0 && this.activeChoreTransfers < this.choreTransferLimit()) {
|
|
102440
102592
|
this.activeChoreTransfers++;
|
|
102441
|
-
|
|
102593
|
+
resolve33(this.makeChoreTransferRelease());
|
|
102442
102594
|
return;
|
|
102443
102595
|
}
|
|
102444
102596
|
const queuedAt = this.now();
|
|
102445
102597
|
this.choreTransferWaiters.push((release4) => {
|
|
102446
102598
|
this.governorWaitMs += Math.max(0, this.now() - queuedAt);
|
|
102447
|
-
|
|
102599
|
+
resolve33(release4);
|
|
102448
102600
|
});
|
|
102449
102601
|
});
|
|
102450
102602
|
}
|
|
@@ -102551,7 +102703,7 @@ function getBandwidthGovernor() {
|
|
|
102551
102703
|
return singleton;
|
|
102552
102704
|
}
|
|
102553
102705
|
|
|
102554
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
102706
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/object-io.js
|
|
102555
102707
|
var OBJECT_IO_REQUEST_TIMEOUT_MS = 6e4;
|
|
102556
102708
|
var OBJECT_IO_REQUEST_TIMEOUT_PER_MIB_MS = 8e3;
|
|
102557
102709
|
var OBJECT_IO_BODY_IDLE_TIMEOUT_MS = 15e3;
|
|
@@ -102973,7 +103125,7 @@ function checkedNodeBody(message, expected) {
|
|
|
102973
103125
|
}
|
|
102974
103126
|
function nodePresignedGet(url2, headers) {
|
|
102975
103127
|
const target = new URL(url2);
|
|
102976
|
-
return new Promise((
|
|
103128
|
+
return new Promise((resolve33, reject) => {
|
|
102977
103129
|
const handleResponse = (message) => {
|
|
102978
103130
|
const responseHeaders = headersFromNode(message.headers);
|
|
102979
103131
|
let expected;
|
|
@@ -102985,7 +103137,7 @@ function nodePresignedGet(url2, headers) {
|
|
|
102985
103137
|
return;
|
|
102986
103138
|
}
|
|
102987
103139
|
const body = checkedNodeBody(message, expected);
|
|
102988
|
-
|
|
103140
|
+
resolve33({
|
|
102989
103141
|
status: message.statusCode ?? 0,
|
|
102990
103142
|
headers: responseHeaders,
|
|
102991
103143
|
body,
|
|
@@ -103382,8 +103534,8 @@ var PresignObjectIO = class {
|
|
|
103382
103534
|
return { state: "unknown", reason: "rate-limited" };
|
|
103383
103535
|
const timeoutMs = filesAdmissionTimeoutMsForTest ?? FILES_ADMISSION_TIMEOUT_MS;
|
|
103384
103536
|
let timer;
|
|
103385
|
-
const timedOut = new Promise((
|
|
103386
|
-
timer = setTimeout(() =>
|
|
103537
|
+
const timedOut = new Promise((resolve33) => {
|
|
103538
|
+
timer = setTimeout(() => resolve33({ state: "unknown", reason: "timeout" }), timeoutMs);
|
|
103387
103539
|
timer.unref?.();
|
|
103388
103540
|
});
|
|
103389
103541
|
const asked = (async () => {
|
|
@@ -103446,9 +103598,9 @@ var PresignObjectIO = class {
|
|
|
103446
103598
|
}
|
|
103447
103599
|
const refusal3 = op4 === "put" ? planLimitRefusalFromError(err) : null;
|
|
103448
103600
|
if (refusal3) {
|
|
103449
|
-
const
|
|
103601
|
+
const expiresAtMs2 = Date.now() + PRIME_REFUSAL_TTL_MS;
|
|
103450
103602
|
for (const k5 of chunk) {
|
|
103451
|
-
this.putRefusalCache.set(k5.key, { refusal: refusal3, expiresAtMs });
|
|
103603
|
+
this.putRefusalCache.set(k5.key, { refusal: refusal3, expiresAtMs: expiresAtMs2 });
|
|
103452
103604
|
}
|
|
103453
103605
|
}
|
|
103454
103606
|
continue;
|
|
@@ -103811,7 +103963,7 @@ function isTransientStatus(status) {
|
|
|
103811
103963
|
return status === 500 || status === 502 || status === 503 || status === 504;
|
|
103812
103964
|
}
|
|
103813
103965
|
function sleep6(ms) {
|
|
103814
|
-
return new Promise((
|
|
103966
|
+
return new Promise((resolve33) => setTimeout(resolve33, ms));
|
|
103815
103967
|
}
|
|
103816
103968
|
function isExpiredPresignDetail(detail) {
|
|
103817
103969
|
if (!detail)
|
|
@@ -103936,9 +104088,9 @@ function presignObjectIOFactory(vault, refresherFor, forceRefresherFor) {
|
|
|
103936
104088
|
const existing = byPerson.get(ctx.uid);
|
|
103937
104089
|
if (existing)
|
|
103938
104090
|
return existing;
|
|
103939
|
-
const
|
|
104091
|
+
const resolve33 = refresherFor?.(ctx.uid);
|
|
103940
104092
|
const force = forceRefresherFor?.(ctx.uid);
|
|
103941
|
-
const io2 = new S3SdkObjectIO(ctx,
|
|
104093
|
+
const io2 = new S3SdkObjectIO(ctx, resolve33 && force ? { resolve: resolve33, force } : resolve33);
|
|
103942
104094
|
byPerson.set(ctx.uid, io2);
|
|
103943
104095
|
return io2;
|
|
103944
104096
|
}
|
|
@@ -103951,12 +104103,12 @@ function presignObjectIOFactory(vault, refresherFor, forceRefresherFor) {
|
|
|
103951
104103
|
};
|
|
103952
104104
|
}
|
|
103953
104105
|
|
|
103954
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
104106
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/posix-key.js
|
|
103955
104107
|
function toPosixKey(key) {
|
|
103956
104108
|
return key.split("\\").join("/");
|
|
103957
104109
|
}
|
|
103958
104110
|
|
|
103959
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
104111
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/file-mode-portability.js
|
|
103960
104112
|
var WIN32_SYNTHETIC_MODES = /* @__PURE__ */ new Set([438, 292]);
|
|
103961
104113
|
function portableModeStamp(mode, platform5 = process.platform) {
|
|
103962
104114
|
if (platform5 === "win32")
|
|
@@ -103967,7 +104119,7 @@ function isPortableModeSignal(mode) {
|
|
|
103967
104119
|
return !WIN32_SYNTHETIC_MODES.has(mode & 511);
|
|
103968
104120
|
}
|
|
103969
104121
|
|
|
103970
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
104122
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/script-eol.js
|
|
103971
104123
|
import * as path6 from "path";
|
|
103972
104124
|
var SCRIPT_EXTENSIONS = /* @__PURE__ */ new Set([".sh", ".bash", ".zsh"]);
|
|
103973
104125
|
var SHEBANG = Buffer.from("#!");
|
|
@@ -103998,7 +104150,7 @@ function normalizeScriptLineEndings(body) {
|
|
|
103998
104150
|
return changed ? out.subarray(0, n3) : null;
|
|
103999
104151
|
}
|
|
104000
104152
|
|
|
104001
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
104153
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/symlink-target-policy.js
|
|
104002
104154
|
import path7 from "node:path";
|
|
104003
104155
|
import fs9 from "node:fs";
|
|
104004
104156
|
function personalSymlinkTargetLinkPath(relativePath) {
|
|
@@ -104221,11 +104373,11 @@ function redactShape(target, classification) {
|
|
|
104221
104373
|
return parents > 0 ? `relative-parent-${Math.min(parents, 8)}` : "relative-path";
|
|
104222
104374
|
}
|
|
104223
104375
|
|
|
104224
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
104376
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/s3.js
|
|
104225
104377
|
var DOWNLOAD_STREAM_MAX_RETRIES = 3;
|
|
104226
104378
|
var DOWNLOAD_STREAM_BASE_DELAY_MS = 400;
|
|
104227
104379
|
function sleepMs2(ms) {
|
|
104228
|
-
return new Promise((
|
|
104380
|
+
return new Promise((resolve33) => setTimeout(resolve33, ms));
|
|
104229
104381
|
}
|
|
104230
104382
|
function isRetryableDownloadStreamError(err) {
|
|
104231
104383
|
if (isTransientNetworkError(err))
|
|
@@ -105034,8 +105186,8 @@ async function downloadFile(ctx, key, localPath, options = {}) {
|
|
|
105034
105186
|
const previous = downloadStageLocks.get(stageLock) ?? Promise.resolve();
|
|
105035
105187
|
let releaseLock = () => {
|
|
105036
105188
|
};
|
|
105037
|
-
const held = new Promise((
|
|
105038
|
-
releaseLock =
|
|
105189
|
+
const held = new Promise((resolve33) => {
|
|
105190
|
+
releaseLock = resolve33;
|
|
105039
105191
|
});
|
|
105040
105192
|
const chained = previous.then(() => held);
|
|
105041
105193
|
downloadStageLocks.set(stageLock, chained);
|
|
@@ -105398,13 +105550,13 @@ function getMimeType(filePath) {
|
|
|
105398
105550
|
return mimeTypes[ext] || "application/octet-stream";
|
|
105399
105551
|
}
|
|
105400
105552
|
|
|
105401
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
105553
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/realtime-rollout.js
|
|
105402
105554
|
var DEFAULT_REALTIME_AUTHORIZATION_TIMEOUT_MS = 15e3;
|
|
105403
105555
|
|
|
105404
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
105556
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/candidate-uploader.js
|
|
105405
105557
|
var MAX_SMALL_CANDIDATE_BYTES = 8 * 1024 * 1024;
|
|
105406
105558
|
|
|
105407
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
105559
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/fsync-compat.js
|
|
105408
105560
|
import * as fs11 from "node:fs";
|
|
105409
105561
|
var UNSUPPORTED_DIRECTORY_FSYNC_CODES = /* @__PURE__ */ new Set(["EINVAL", "ENOTSUP", "EOPNOTSUPP", "EPERM"]);
|
|
105410
105562
|
var loggedSkips = /* @__PURE__ */ new Set();
|
|
@@ -105428,7 +105580,7 @@ function fsyncWithCompatibility(fd, options) {
|
|
|
105428
105580
|
}
|
|
105429
105581
|
}
|
|
105430
105582
|
|
|
105431
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
105583
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/multipart-uploader.js
|
|
105432
105584
|
var DEFAULT_GLOBAL_FETCH3 = globalThis.fetch;
|
|
105433
105585
|
var MULTIPART_PART_SIZE_BYTES = 8 * 1024 * 1024;
|
|
105434
105586
|
var MAX_MULTIPART_BYTES_IN_FLIGHT = 64 * 1024 * 1024;
|
|
@@ -105447,7 +105599,7 @@ var MultipartByteBudget = class {
|
|
|
105447
105599
|
throw new Error("realtime multipart: invalid byte-budget reservation");
|
|
105448
105600
|
}
|
|
105449
105601
|
if (this.usedBytes + bytes > this.maximumBytes) {
|
|
105450
|
-
await new Promise((
|
|
105602
|
+
await new Promise((resolve33) => this.waiters.push({ bytes, resolve: resolve33 }));
|
|
105451
105603
|
} else {
|
|
105452
105604
|
this.usedBytes += bytes;
|
|
105453
105605
|
}
|
|
@@ -105478,7 +105630,7 @@ var MultipartByteBudget = class {
|
|
|
105478
105630
|
};
|
|
105479
105631
|
var processByteBudget = new MultipartByteBudget();
|
|
105480
105632
|
|
|
105481
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
105633
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/journal.js
|
|
105482
105634
|
import * as fs20 from "fs";
|
|
105483
105635
|
import * as os5 from "os";
|
|
105484
105636
|
import * as path16 from "path";
|
|
@@ -105486,7 +105638,7 @@ import * as crypto10 from "crypto";
|
|
|
105486
105638
|
import { spawn } from "node:child_process";
|
|
105487
105639
|
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
105488
105640
|
|
|
105489
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
105641
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/journal-decode-window.js
|
|
105490
105642
|
var JOURNAL_DECODE_WINDOW = 1e4;
|
|
105491
105643
|
var rowsInFlight = 0;
|
|
105492
105644
|
var peakRowsInFlight = 0;
|
|
@@ -105545,7 +105697,7 @@ function journalFingerprintMatchesStat(fingerprint, lstat3) {
|
|
|
105545
105697
|
return lstat3.size === fingerprint.size && lstat3.mtimeMs === fingerprint.mtimeMs && lstat3.ctimeMs === fingerprint.ctimeMs;
|
|
105546
105698
|
}
|
|
105547
105699
|
|
|
105548
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
105700
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/journal-row-store.js
|
|
105549
105701
|
var HASH_BYTES = 32;
|
|
105550
105702
|
var ETAG_BYTES = 16;
|
|
105551
105703
|
var INITIAL_ROW_CAPACITY = 16;
|
|
@@ -107055,7 +107207,7 @@ function readOptionalBoolean(entry, key, flags, presentBit, valueBit) {
|
|
|
107055
107207
|
entry[key] = Boolean(flags & valueBit);
|
|
107056
107208
|
}
|
|
107057
107209
|
|
|
107058
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
107210
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/journal-record-proxy.js
|
|
107059
107211
|
var rowsByRecordProxy = /* @__PURE__ */ new WeakMap();
|
|
107060
107212
|
function journalRecordRows(files) {
|
|
107061
107213
|
return rowsByRecordProxy.get(files);
|
|
@@ -107121,13 +107273,13 @@ function createJournalRecordProxy(store) {
|
|
|
107121
107273
|
return proxy;
|
|
107122
107274
|
}
|
|
107123
107275
|
|
|
107124
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
107276
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-decoder.js
|
|
107125
107277
|
import { StringDecoder } from "node:string_decoder";
|
|
107126
107278
|
|
|
107127
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
107279
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-v4.js
|
|
107128
107280
|
import * as crypto6 from "node:crypto";
|
|
107129
107281
|
|
|
107130
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
107282
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-rows.js
|
|
107131
107283
|
var packedJournalRows = /* @__PURE__ */ new WeakMap();
|
|
107132
107284
|
var sharedAreaJournalRowStores = /* @__PURE__ */ new Map();
|
|
107133
107285
|
function areaJournalRowsCacheKey(rootDir, slug) {
|
|
@@ -107150,7 +107302,7 @@ function forgetSharedAreaJournalRows(cacheKey) {
|
|
|
107150
107302
|
sharedAreaJournalRowStores.delete(cacheKey);
|
|
107151
107303
|
}
|
|
107152
107304
|
|
|
107153
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
107305
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/state-store.js
|
|
107154
107306
|
import * as crypto5 from "node:crypto";
|
|
107155
107307
|
import * as fs12 from "node:fs";
|
|
107156
107308
|
import * as path9 from "node:path";
|
|
@@ -107221,8 +107373,8 @@ async function sleepAsyncMs(ms) {
|
|
|
107221
107373
|
}
|
|
107222
107374
|
if (ms <= 0)
|
|
107223
107375
|
return;
|
|
107224
|
-
await new Promise((
|
|
107225
|
-
setTimeout(
|
|
107376
|
+
await new Promise((resolve33) => {
|
|
107377
|
+
setTimeout(resolve33, ms);
|
|
107226
107378
|
});
|
|
107227
107379
|
}
|
|
107228
107380
|
function compactionRetryPressure(walBytes, maxWalBytes, recordCount, maxRecords) {
|
|
@@ -107619,8 +107771,8 @@ var StateStore = class _StateStore {
|
|
|
107619
107771
|
while (attempts < ASYNC_COMPACTION_MAX_STALE_ATTEMPTS) {
|
|
107620
107772
|
let resolveStaged;
|
|
107621
107773
|
let rejectStaged;
|
|
107622
|
-
const stagedReady = new Promise((
|
|
107623
|
-
resolveStaged =
|
|
107774
|
+
const stagedReady = new Promise((resolve34, reject2) => {
|
|
107775
|
+
resolveStaged = resolve34;
|
|
107624
107776
|
rejectStaged = reject2;
|
|
107625
107777
|
});
|
|
107626
107778
|
let publish;
|
|
@@ -107660,9 +107812,9 @@ var StateStore = class _StateStore {
|
|
|
107660
107812
|
if (plan === null)
|
|
107661
107813
|
return false;
|
|
107662
107814
|
const reservedPublish = publish;
|
|
107663
|
-
const
|
|
107815
|
+
const resolve33 = resolveStaged;
|
|
107664
107816
|
const reject = rejectStaged;
|
|
107665
|
-
if (reservedPublish === void 0 ||
|
|
107817
|
+
if (reservedPublish === void 0 || resolve33 === void 0 || reject === void 0)
|
|
107666
107818
|
return false;
|
|
107667
107819
|
attempts += 1;
|
|
107668
107820
|
try {
|
|
@@ -107673,7 +107825,7 @@ var StateStore = class _StateStore {
|
|
|
107673
107825
|
discardStagedGeneration(staged);
|
|
107674
107826
|
throw error64;
|
|
107675
107827
|
}
|
|
107676
|
-
|
|
107828
|
+
resolve33(staged);
|
|
107677
107829
|
} catch (error64) {
|
|
107678
107830
|
reject(error64);
|
|
107679
107831
|
await reservedPublish.catch(() => void 0);
|
|
@@ -108360,7 +108512,7 @@ async function writeDurableTemporaryAsync(dir, label, bytes) {
|
|
|
108360
108512
|
throw new Error("state-store: async durable write made no progress");
|
|
108361
108513
|
offset += bytesWritten;
|
|
108362
108514
|
}
|
|
108363
|
-
await new Promise((
|
|
108515
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
108364
108516
|
}
|
|
108365
108517
|
await handle.datasync();
|
|
108366
108518
|
await handle.close();
|
|
@@ -109420,8 +109572,8 @@ async function withInProcessAsyncScopeLock(dir, action, priority = false) {
|
|
|
109420
109572
|
queue = { active: false, priority: [], ordinary: [] };
|
|
109421
109573
|
inProcessAsyncScopeLocks.set(key, queue);
|
|
109422
109574
|
}
|
|
109423
|
-
const result = new Promise((
|
|
109424
|
-
const entry = { action, resolve:
|
|
109575
|
+
const result = new Promise((resolve33, reject) => {
|
|
109576
|
+
const entry = { action, resolve: resolve33, reject };
|
|
109425
109577
|
(priority ? queue.priority : queue.ordinary).push(entry);
|
|
109426
109578
|
});
|
|
109427
109579
|
runNextInProcessAsyncScopeLock(key, queue);
|
|
@@ -109450,12 +109602,12 @@ function runNextInProcessAsyncScopeLock(key, queue) {
|
|
|
109450
109602
|
})();
|
|
109451
109603
|
}
|
|
109452
109604
|
function openExclusiveAsync(lockPath) {
|
|
109453
|
-
return new Promise((
|
|
109605
|
+
return new Promise((resolve33, reject) => {
|
|
109454
109606
|
fs12.open(lockPath, "wx", (error64, fd) => {
|
|
109455
109607
|
if (error64)
|
|
109456
109608
|
reject(error64);
|
|
109457
109609
|
else
|
|
109458
|
-
|
|
109610
|
+
resolve33(fd);
|
|
109459
109611
|
});
|
|
109460
109612
|
});
|
|
109461
109613
|
}
|
|
@@ -109509,7 +109661,7 @@ async function withScopeLockAsyncUnlocked(dir, action, deadline) {
|
|
|
109509
109661
|
if (Date.now() >= deadline) {
|
|
109510
109662
|
throw new StateStoreLockError(`timed out acquiring ${lockPath}`);
|
|
109511
109663
|
}
|
|
109512
|
-
await new Promise((
|
|
109664
|
+
await new Promise((resolve33) => setTimeout(resolve33, LOCK_RETRY_MS));
|
|
109513
109665
|
}
|
|
109514
109666
|
}
|
|
109515
109667
|
inProcessAsyncScopeLockHolders.add(key);
|
|
@@ -109918,7 +110070,7 @@ function crc32c(bytes) {
|
|
|
109918
110070
|
return (crc ^ 4294967295) >>> 0;
|
|
109919
110071
|
}
|
|
109920
110072
|
|
|
109921
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
110073
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-v4.js
|
|
109922
110074
|
var JOURNAL_SNAPSHOT_V4_MAGIC = SNAPSHOT_V4_MAGIC;
|
|
109923
110075
|
var SNAPSHOT_FIXED_HEADER_BYTES2 = 52;
|
|
109924
110076
|
var SECTION_ALIGNMENT_BYTES = 8;
|
|
@@ -110037,7 +110189,7 @@ async function* sortedJournalPathsAsync(paths) {
|
|
|
110037
110189
|
runs.push(paths.slice(start, start + JOURNAL_PATH_SORT_CHUNK_SIZE).sort());
|
|
110038
110190
|
if (runs.length % JOURNAL_PATH_SORT_YIELD_EVERY === 0 || start + JOURNAL_PATH_SORT_CHUNK_SIZE < paths.length) {
|
|
110039
110191
|
asyncSnapshotSortYieldHookForTest?.();
|
|
110040
|
-
await new Promise((
|
|
110192
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
110041
110193
|
}
|
|
110042
110194
|
}
|
|
110043
110195
|
const heap = [];
|
|
@@ -110088,7 +110240,7 @@ async function* sortedJournalPathsAsync(paths) {
|
|
|
110088
110240
|
emitted += 1;
|
|
110089
110241
|
if (emitted % JOURNAL_PATH_SORT_YIELD_EVERY === 0) {
|
|
110090
110242
|
asyncSnapshotSortYieldHookForTest?.();
|
|
110091
|
-
await new Promise((
|
|
110243
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
110092
110244
|
}
|
|
110093
110245
|
}
|
|
110094
110246
|
}
|
|
@@ -110112,7 +110264,7 @@ async function rowsForJournalAsync(journal) {
|
|
|
110112
110264
|
processed += 1;
|
|
110113
110265
|
if (processed % 2048 === 0) {
|
|
110114
110266
|
asyncSnapshotEncodeYieldHookForTest?.();
|
|
110115
|
-
await new Promise((
|
|
110267
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
110116
110268
|
}
|
|
110117
110269
|
}
|
|
110118
110270
|
return rows;
|
|
@@ -110419,7 +110571,7 @@ async function validateAndQuarantinePayloadAsync(payload2, onQuarantined) {
|
|
|
110419
110571
|
index += 1;
|
|
110420
110572
|
if (index % 2048 === 0) {
|
|
110421
110573
|
asyncSnapshotEncodeYieldHookForTest?.();
|
|
110422
|
-
await new Promise((
|
|
110574
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
110423
110575
|
}
|
|
110424
110576
|
}
|
|
110425
110577
|
if (droppedCount > 0) {
|
|
@@ -110450,7 +110602,7 @@ function assertLittleEndian() {
|
|
|
110450
110602
|
throw new Error("HQSNAP4 requires a little-endian host");
|
|
110451
110603
|
}
|
|
110452
110604
|
|
|
110453
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
110605
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/journal-snapshot-decoder.js
|
|
110454
110606
|
function decodeJournalSnapshot(chunks, magic) {
|
|
110455
110607
|
if (magic.equals(SNAPSHOT_V3_MAGIC))
|
|
110456
110608
|
return decodeV3JournalSnapshot(chunks);
|
|
@@ -110802,7 +110954,7 @@ function isPunctuation(value) {
|
|
|
110802
110954
|
return value === "{" || value === "}" || value === "[" || value === "]" || value === ":" || value === ",";
|
|
110803
110955
|
}
|
|
110804
110956
|
|
|
110805
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
110957
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/path-ancestors.js
|
|
110806
110958
|
function isUnderAnyRoot(key, roots) {
|
|
110807
110959
|
if (roots.has(key))
|
|
110808
110960
|
return true;
|
|
@@ -110815,7 +110967,7 @@ function isUnderAnyRoot(key, roots) {
|
|
|
110815
110967
|
return false;
|
|
110816
110968
|
}
|
|
110817
110969
|
|
|
110818
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
110970
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/journal-ledger-stream.js
|
|
110819
110971
|
import * as fs13 from "node:fs";
|
|
110820
110972
|
import { StringDecoder as StringDecoder2 } from "node:string_decoder";
|
|
110821
110973
|
var CHUNK_BYTES = 1 << 18;
|
|
@@ -110929,26 +111081,26 @@ function streamJournalLedgerRows(filePath, onRow) {
|
|
|
110929
111081
|
}
|
|
110930
111082
|
}
|
|
110931
111083
|
|
|
110932
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
111084
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/area-resolver.js
|
|
110933
111085
|
import * as fs17 from "fs";
|
|
110934
111086
|
import * as path13 from "path";
|
|
110935
111087
|
|
|
110936
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
111088
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/personal-vault.js
|
|
110937
111089
|
import * as fs16 from "fs";
|
|
110938
111090
|
import * as path12 from "path";
|
|
110939
111091
|
|
|
110940
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
111092
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/ignore.js
|
|
110941
111093
|
var import_ignore = __toESM(require_ignore(), 1);
|
|
110942
111094
|
import * as fs14 from "fs";
|
|
110943
111095
|
import * as path10 from "path";
|
|
110944
111096
|
|
|
110945
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
111097
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/restore-staging.js
|
|
110946
111098
|
var RESTORE_STAGING_SUFFIX = /\.hq-restore-(?:\d+(?:-\d+)?|probe-\d+-[0-9a-z]+)$/i;
|
|
110947
111099
|
function isRestoreStagingPath(relativePath) {
|
|
110948
111100
|
return relativePath.split(/[\\/]/).some((segment) => RESTORE_STAGING_SUFFIX.test(segment));
|
|
110949
111101
|
}
|
|
110950
111102
|
|
|
110951
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
111103
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/ignore.js
|
|
110952
111104
|
function logSwallowed(line) {
|
|
110953
111105
|
process.stderr.write(line);
|
|
110954
111106
|
}
|
|
@@ -111462,7 +111614,7 @@ function isWithinSizeLimit(filePath, maxBytes = 50 * 1024 * 1024) {
|
|
|
111462
111614
|
}
|
|
111463
111615
|
}
|
|
111464
111616
|
|
|
111465
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
111617
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/personal-vault-exclusions.js
|
|
111466
111618
|
import * as path11 from "path";
|
|
111467
111619
|
import * as fs15 from "fs";
|
|
111468
111620
|
function hasSegment(relPath, segment) {
|
|
@@ -111759,7 +111911,7 @@ function wrapFilterWithPersonalVaultDefaults(underlying, syncRoot, onExcluded, o
|
|
|
111759
111911
|
};
|
|
111760
111912
|
}
|
|
111761
111913
|
|
|
111762
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
111914
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/personal-vault.js
|
|
111763
111915
|
function logSwallowed2(line) {
|
|
111764
111916
|
process.stderr.write(line);
|
|
111765
111917
|
}
|
|
@@ -112098,7 +112250,7 @@ function purgeExcludedPersonalVaultJournalEntries(journal, hqRoot, syncRoot, sho
|
|
|
112098
112250
|
return { removed, byReason };
|
|
112099
112251
|
}
|
|
112100
112252
|
|
|
112101
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
112253
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/area-resolver.js
|
|
112102
112254
|
var AREA_LAYOUT_FORMAT = 1;
|
|
112103
112255
|
var AREA_ROUTER_VERSION = 1;
|
|
112104
112256
|
function canonicalizeVaultPath(value) {
|
|
@@ -112407,12 +112559,12 @@ function compareText(left, right) {
|
|
|
112407
112559
|
return left < right ? -1 : left > right ? 1 : 0;
|
|
112408
112560
|
}
|
|
112409
112561
|
|
|
112410
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
112562
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/area-ledger-migration.js
|
|
112411
112563
|
import * as crypto9 from "node:crypto";
|
|
112412
112564
|
import * as fs19 from "node:fs";
|
|
112413
112565
|
import * as path15 from "node:path";
|
|
112414
112566
|
|
|
112415
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
112567
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/operation-lock.js
|
|
112416
112568
|
import * as crypto7 from "crypto";
|
|
112417
112569
|
import * as fs18 from "fs";
|
|
112418
112570
|
import * as os4 from "os";
|
|
@@ -112470,7 +112622,7 @@ function sleepSync(ms) {
|
|
|
112470
112622
|
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
112471
112623
|
}
|
|
112472
112624
|
function sleepAsync(ms) {
|
|
112473
|
-
return new Promise((
|
|
112625
|
+
return new Promise((resolve33) => setTimeout(resolve33, Math.max(0, ms)));
|
|
112474
112626
|
}
|
|
112475
112627
|
function stateDir() {
|
|
112476
112628
|
return process.env.HQ_STATE_DIR || path14.join(os4.homedir(), ".hq");
|
|
@@ -113042,7 +113194,7 @@ function withOperationLockSync(hqRoot, command5, fn, opts = {}) {
|
|
|
113042
113194
|
}
|
|
113043
113195
|
}
|
|
113044
113196
|
|
|
113045
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
113197
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/area-ledger.js
|
|
113046
113198
|
import * as crypto8 from "node:crypto";
|
|
113047
113199
|
var DIRECT_DELTA = 1;
|
|
113048
113200
|
var PREPARED_TRANSACTION = 2;
|
|
@@ -114467,7 +114619,7 @@ function cloneMetadata(metadata) {
|
|
|
114467
114619
|
return result;
|
|
114468
114620
|
}
|
|
114469
114621
|
|
|
114470
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
114622
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/area-ledger-migration.js
|
|
114471
114623
|
function logSwallowed3(line) {
|
|
114472
114624
|
process.stderr.write(line);
|
|
114473
114625
|
}
|
|
@@ -115227,7 +115379,7 @@ function canonicalJsonOrUndefined(value) {
|
|
|
115227
115379
|
return value === void 0 ? void 0 : canonicalJson2(value);
|
|
115228
115380
|
}
|
|
115229
115381
|
|
|
115230
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
115382
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/per-area-maintenance.js
|
|
115231
115383
|
var AREA_MAINTENANCE_CURSOR_FORMAT = 1;
|
|
115232
115384
|
var CURSOR_SET = 1;
|
|
115233
115385
|
var AreaMaintenanceCursorStore = class _AreaMaintenanceCursorStore {
|
|
@@ -115329,7 +115481,7 @@ function sameAreas(left, right) {
|
|
|
115329
115481
|
return left.length === right.length && left.every((areaId, index) => areaId === right[index]);
|
|
115330
115482
|
}
|
|
115331
115483
|
|
|
115332
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
115484
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/journal.js
|
|
115333
115485
|
var TOMBSTONE_TTL_MS = 30 * 24 * 60 * 60 * 1e3;
|
|
115334
115486
|
var JOURNAL_VERSION_CURRENT = "2";
|
|
115335
115487
|
var MAX_PULLS_PER_COMPANY = 50;
|
|
@@ -116020,9 +116172,9 @@ async function runAreaJournalMirrorRecoveryChild(slug) {
|
|
|
116020
116172
|
child.stderr.setEncoding("utf8").on("data", (chunk) => {
|
|
116021
116173
|
stderr += chunk;
|
|
116022
116174
|
});
|
|
116023
|
-
const exit = await new Promise((
|
|
116175
|
+
const exit = await new Promise((resolve33, reject) => {
|
|
116024
116176
|
child.once("error", reject);
|
|
116025
|
-
child.once("close", (code, signal) =>
|
|
116177
|
+
child.once("close", (code, signal) => resolve33({ code, signal }));
|
|
116026
116178
|
});
|
|
116027
116179
|
if (exit.code !== 0) {
|
|
116028
116180
|
throw new Error(`journal: area-ledger recovery child failed (${String(exit.code)} / ${String(exit.signal)}): ${stderr.trim()}`);
|
|
@@ -116545,7 +116697,7 @@ function openJournalStoreSession(slug) {
|
|
|
116545
116697
|
return new JournalStore(slug, openJournalStore(slug, initial));
|
|
116546
116698
|
}
|
|
116547
116699
|
async function openJournalStoreSessionAsync(slug) {
|
|
116548
|
-
await new Promise((
|
|
116700
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
116549
116701
|
const areaMigration = openAreaMigrationIfAuthoritative(slug);
|
|
116550
116702
|
if (areaMigration)
|
|
116551
116703
|
return new JournalStore(slug, void 0, areaMigration);
|
|
@@ -117291,13 +117443,13 @@ function gcTombstones(journal, now = Date.now()) {
|
|
|
117291
117443
|
return removed;
|
|
117292
117444
|
}
|
|
117293
117445
|
|
|
117294
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
117446
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync-progress.js
|
|
117295
117447
|
import { randomUUID as randomUUID3 } from "node:crypto";
|
|
117296
117448
|
import * as fs22 from "fs";
|
|
117297
117449
|
import * as os7 from "os";
|
|
117298
117450
|
import * as path18 from "path";
|
|
117299
117451
|
|
|
117300
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
117452
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/conflict-notices.js
|
|
117301
117453
|
import { createHash as createHash18 } from "node:crypto";
|
|
117302
117454
|
import * as fs21 from "node:fs";
|
|
117303
117455
|
import * as os6 from "node:os";
|
|
@@ -117446,7 +117598,7 @@ function readPendingConflictNotices() {
|
|
|
117446
117598
|
return readNotices().filter((notice) => !acknowledged.has(notice.id)).slice(-MAX_PENDING_CONFLICT_NOTICES);
|
|
117447
117599
|
}
|
|
117448
117600
|
|
|
117449
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
117601
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync-progress.js
|
|
117450
117602
|
function logSwallowed5(line) {
|
|
117451
117603
|
process.stderr.write(line);
|
|
117452
117604
|
}
|
|
@@ -117731,7 +117883,7 @@ function createPassSummaryRecorder() {
|
|
|
117731
117883
|
};
|
|
117732
117884
|
}
|
|
117733
117885
|
|
|
117734
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
117886
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/prefix-coalesce.js
|
|
117735
117887
|
var SCOPE_PREFIX_MARKER = "\0hq-scope:";
|
|
117736
117888
|
var SCOPE_PREFIX_MARKER_PREFIX = `${SCOPE_PREFIX_MARKER}prefix`;
|
|
117737
117889
|
var SCOPE_PREFIX_MARKER_EXACT = `${SCOPE_PREFIX_MARKER}exact`;
|
|
@@ -117931,7 +118083,7 @@ function grantPathToScopePrefix(grantPath, slug) {
|
|
|
117931
118083
|
return pathToScopePrefix(p3);
|
|
117932
118084
|
}
|
|
117933
118085
|
|
|
117934
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
118086
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/scope-shrink.js
|
|
117935
118087
|
import * as fs23 from "fs";
|
|
117936
118088
|
import * as path19 from "path";
|
|
117937
118089
|
function buildScopeShrinkPlan(input2) {
|
|
@@ -118125,7 +118277,7 @@ function applyScopeShrink(input2) {
|
|
|
118125
118277
|
};
|
|
118126
118278
|
}
|
|
118127
118279
|
|
|
118128
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
118280
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/remote-pull.js
|
|
118129
118281
|
var VEND_PATH_CAP = 10;
|
|
118130
118282
|
var POST_FILTER_THRESHOLD = 50;
|
|
118131
118283
|
var VEND_FANOUT_CONCURRENCY = 5;
|
|
@@ -118163,7 +118315,7 @@ function createConcurrencyLimiter(concurrency) {
|
|
|
118163
118315
|
const waiters = [];
|
|
118164
118316
|
return async function runLimited(fn) {
|
|
118165
118317
|
if (active >= limit) {
|
|
118166
|
-
await new Promise((
|
|
118318
|
+
await new Promise((resolve33) => waiters.push(resolve33));
|
|
118167
118319
|
}
|
|
118168
118320
|
active += 1;
|
|
118169
118321
|
try {
|
|
@@ -118212,7 +118364,7 @@ function dedupByKey(files) {
|
|
|
118212
118364
|
return out;
|
|
118213
118365
|
}
|
|
118214
118366
|
|
|
118215
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
118367
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/pull-scope.js
|
|
118216
118368
|
import * as fs24 from "fs";
|
|
118217
118369
|
import * as path20 from "path";
|
|
118218
118370
|
var SESSIONS_SCOPE_PREFIX = "sessions/";
|
|
@@ -118281,7 +118433,7 @@ function readPinnedPrefixes(hqRoot, slug) {
|
|
|
118281
118433
|
return [];
|
|
118282
118434
|
}
|
|
118283
118435
|
|
|
118284
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
118436
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/plan-limit-pause.js
|
|
118285
118437
|
import * as fs25 from "fs";
|
|
118286
118438
|
import * as path21 from "path";
|
|
118287
118439
|
var PLAN_LIMIT_PAUSE_RETRY_MS = 60 * 60 * 1e3;
|
|
@@ -118447,13 +118599,13 @@ var PlanLimitPauseStore = class _PlanLimitPauseStore {
|
|
|
118447
118599
|
}
|
|
118448
118600
|
};
|
|
118449
118601
|
|
|
118450
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
118602
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/telemetry.js
|
|
118451
118603
|
import { createHash as createHash19 } from "node:crypto";
|
|
118452
118604
|
import { promises as fs28 } from "node:fs";
|
|
118453
118605
|
import * as os8 from "node:os";
|
|
118454
118606
|
import * as path24 from "node:path";
|
|
118455
118607
|
|
|
118456
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
118608
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/company-resolver.js
|
|
118457
118609
|
import { promises as fs26 } from "node:fs";
|
|
118458
118610
|
import * as path22 from "node:path";
|
|
118459
118611
|
|
|
@@ -121081,7 +121233,7 @@ var jsYaml = {
|
|
|
121081
121233
|
safeDump
|
|
121082
121234
|
};
|
|
121083
121235
|
|
|
121084
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
121236
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/company-resolver.js
|
|
121085
121237
|
function logSwallowed6(line) {
|
|
121086
121238
|
process.stderr.write(line);
|
|
121087
121239
|
}
|
|
@@ -121292,7 +121444,7 @@ function resolveCompanyForCwd(cwd, map9) {
|
|
|
121292
121444
|
return collapsed !== c5 ? match(collapsed) : void 0;
|
|
121293
121445
|
}
|
|
121294
121446
|
|
|
121295
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
121447
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/usage-company-fallback.js
|
|
121296
121448
|
import { promises as fs27 } from "node:fs";
|
|
121297
121449
|
import * as path23 from "node:path";
|
|
121298
121450
|
var TRUSTED_META_SOURCES = /* @__PURE__ */ new Set(["session"]);
|
|
@@ -121739,7 +121891,7 @@ function createUsageCompanyFallback(options) {
|
|
|
121739
121891
|
};
|
|
121740
121892
|
}
|
|
121741
121893
|
|
|
121742
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
121894
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/telemetry.js
|
|
121743
121895
|
function emptyCursor() {
|
|
121744
121896
|
return { version: "1", files: {} };
|
|
121745
121897
|
}
|
|
@@ -122621,7 +122773,7 @@ async function collectAndSendTelemetry(opts) {
|
|
|
122621
122773
|
};
|
|
122622
122774
|
}
|
|
122623
122775
|
|
|
122624
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
122776
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/skill-telemetry.js
|
|
122625
122777
|
import { createHash as createHash20 } from "node:crypto";
|
|
122626
122778
|
import { promises as fs29 } from "node:fs";
|
|
122627
122779
|
import * as os9 from "node:os";
|
|
@@ -123415,12 +123567,12 @@ async function collectAndSendSkillTelemetry(opts) {
|
|
|
123415
123567
|
};
|
|
123416
123568
|
}
|
|
123417
123569
|
|
|
123418
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
123570
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cli/share.js
|
|
123419
123571
|
import * as fs39 from "fs";
|
|
123420
123572
|
import * as os13 from "os";
|
|
123421
123573
|
import * as path36 from "path";
|
|
123422
123574
|
|
|
123423
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
123575
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/symlink-target-refusal-flag.js
|
|
123424
123576
|
init_dist();
|
|
123425
123577
|
var SYMLINK_TARGET_REFUSAL_FLAG = "sync.symlink-target-refusal";
|
|
123426
123578
|
var FLAG_READ_TIMEOUT_MS = 2e3;
|
|
@@ -123469,7 +123621,7 @@ async function resolveSymlinkTargetRefusalFlag(input2) {
|
|
|
123469
123621
|
}
|
|
123470
123622
|
}
|
|
123471
123623
|
|
|
123472
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
123624
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/company-vault-transport.js
|
|
123473
123625
|
function selectObjectIOFactory(client, refresherFor, forceRefresherFor) {
|
|
123474
123626
|
if (typeof client.presign === "function" && typeof client.listFiles === "function") {
|
|
123475
123627
|
return presignObjectIOFactory(client, refresherFor, forceRefresherFor);
|
|
@@ -123487,7 +123639,7 @@ function ensureCompanyVaultTransport(vaultConfig, deps = {}) {
|
|
|
123487
123639
|
vaultConfig.companyVaultUsesPresign = objectIOFactory !== null;
|
|
123488
123640
|
}
|
|
123489
123641
|
|
|
123490
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
123642
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync-decision-log.js
|
|
123491
123643
|
import * as fs30 from "node:fs";
|
|
123492
123644
|
import * as path26 from "node:path";
|
|
123493
123645
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
@@ -123532,10 +123684,10 @@ function appendSyncDecision(input2, options = {}) {
|
|
|
123532
123684
|
}
|
|
123533
123685
|
}
|
|
123534
123686
|
|
|
123535
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
123687
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cli/share.js
|
|
123536
123688
|
import * as crypto14 from "crypto";
|
|
123537
123689
|
|
|
123538
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
123690
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/private-folder-transport.js
|
|
123539
123691
|
import * as fs31 from "fs";
|
|
123540
123692
|
import * as path27 from "path";
|
|
123541
123693
|
var CONTENT_SHA256_RE2 = /^[a-f0-9]{64}$/;
|
|
@@ -123627,16 +123779,16 @@ async function primePrivateFolderUpload(input2) {
|
|
|
123627
123779
|
}]);
|
|
123628
123780
|
}
|
|
123629
123781
|
|
|
123630
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
123782
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/secret-path-policy.js
|
|
123631
123783
|
init_dist();
|
|
123632
123784
|
|
|
123633
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
123785
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/flag-company-uid.js
|
|
123634
123786
|
var FLAG_COMPANY_UID_PATTERN = /^cmp_[A-Za-z0-9]{3,128}$/;
|
|
123635
123787
|
function flagCompanyUid(uid) {
|
|
123636
123788
|
return FLAG_COMPANY_UID_PATTERN.test(uid) ? uid : void 0;
|
|
123637
123789
|
}
|
|
123638
123790
|
|
|
123639
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
123791
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/secret-path-policy.js
|
|
123640
123792
|
var SKIP_SECRET_PATHS_FLAG = "sync.skip-secret-paths";
|
|
123641
123793
|
var FLAG_REFRESH_INTERVAL_MS = 5 * 6e4;
|
|
123642
123794
|
var FLAG_REQUEST_TIMEOUT_MS = 2e3;
|
|
@@ -123748,7 +123900,7 @@ function isSkipSecretPathsEnabled(config2, companyUid, failClosed = false) {
|
|
|
123748
123900
|
return defaultSkipSecretPathsGate(config2, companyUid, failClosed);
|
|
123749
123901
|
}
|
|
123750
123902
|
|
|
123751
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
123903
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/full-pass-caps.js
|
|
123752
123904
|
var FULL_PASS_CPU_CAP_FLAG = "sync.full-pass.cpu-cap-pct";
|
|
123753
123905
|
var FULL_PASS_HEAP_CAP_FLAG = "sync.full-pass.heap-cap-mb";
|
|
123754
123906
|
var FULL_PASS_DURABLE_PROGRESS_FLAG = "sync.full-pass-durable-progress";
|
|
@@ -123787,8 +123939,8 @@ function isFullPassDurableProgressEnabled() {
|
|
|
123787
123939
|
return activeController?.durableProgressEnabled ?? handoffDurableProgressEnabled;
|
|
123788
123940
|
}
|
|
123789
123941
|
function fullPassCapSleep(ms) {
|
|
123790
|
-
return new Promise((
|
|
123791
|
-
setTimeout(
|
|
123942
|
+
return new Promise((resolve33) => {
|
|
123943
|
+
setTimeout(resolve33, ms);
|
|
123792
123944
|
});
|
|
123793
123945
|
}
|
|
123794
123946
|
function platformCapDefaults(platform5) {
|
|
@@ -124325,7 +124477,7 @@ var FullPassCapController = class {
|
|
|
124325
124477
|
}
|
|
124326
124478
|
};
|
|
124327
124479
|
|
|
124328
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
124480
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cli/conflict.js
|
|
124329
124481
|
import * as readline from "readline";
|
|
124330
124482
|
function parseFrontmatterVersion(body) {
|
|
124331
124483
|
if (!body || body.length === 0)
|
|
@@ -124421,10 +124573,10 @@ async function promptConflict(conflict) {
|
|
|
124421
124573
|
console.error(` Remote modified: ${conflict.remoteModified.toISOString()}`);
|
|
124422
124574
|
}
|
|
124423
124575
|
const options = conflict.direction === "push" ? "[o]verwrite remote / [k]eep remote / [p]ublish local (fenced) / [d]iff / [a]bort" : "[o]verwrite local / [k]eep local / [d]iff / [s]kip";
|
|
124424
|
-
const answer = await new Promise((
|
|
124576
|
+
const answer = await new Promise((resolve33) => {
|
|
124425
124577
|
rl.question(` ${options}: `, (ans) => {
|
|
124426
124578
|
rl.close();
|
|
124427
|
-
|
|
124579
|
+
resolve33(ans.trim().toLowerCase());
|
|
124428
124580
|
});
|
|
124429
124581
|
});
|
|
124430
124582
|
switch (answer) {
|
|
@@ -124453,7 +124605,7 @@ async function promptConflict(conflict) {
|
|
|
124453
124605
|
}
|
|
124454
124606
|
}
|
|
124455
124607
|
|
|
124456
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
124608
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cli/tombstones.js
|
|
124457
124609
|
import * as crypto11 from "node:crypto";
|
|
124458
124610
|
import * as fs32 from "node:fs";
|
|
124459
124611
|
import * as os10 from "node:os";
|
|
@@ -124838,14 +124990,14 @@ async function fetchTombstonePage(url2, token) {
|
|
|
124838
124990
|
clearTimeout(timer);
|
|
124839
124991
|
}
|
|
124840
124992
|
if (waitMs > 0) {
|
|
124841
|
-
await new Promise((
|
|
124993
|
+
await new Promise((resolve33) => setTimeout(resolve33, waitMs));
|
|
124842
124994
|
waitedMs += waitMs;
|
|
124843
124995
|
}
|
|
124844
124996
|
}
|
|
124845
124997
|
throw new TombstoneFetchError(`FILE_TOMBSTONE fetch failed after ${attemptsMade} attempts; refusing to sync without delete suppression`, attemptsMade, lastError);
|
|
124846
124998
|
}
|
|
124847
124999
|
|
|
124848
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
125000
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync-core.js
|
|
124849
125001
|
import { execSync } from "child_process";
|
|
124850
125002
|
import * as fs33 from "fs";
|
|
124851
125003
|
import * as os11 from "os";
|
|
@@ -124936,12 +125088,12 @@ var TransferSemaphore = class {
|
|
|
124936
125088
|
this.available = Math.max(1, Math.trunc(capacity));
|
|
124937
125089
|
}
|
|
124938
125090
|
async withPermit(fn) {
|
|
124939
|
-
await new Promise((
|
|
125091
|
+
await new Promise((resolve33) => {
|
|
124940
125092
|
if (this.available > 0) {
|
|
124941
125093
|
this.available -= 1;
|
|
124942
|
-
|
|
125094
|
+
resolve33();
|
|
124943
125095
|
} else {
|
|
124944
|
-
this.waiters.push(
|
|
125096
|
+
this.waiters.push(resolve33);
|
|
124945
125097
|
}
|
|
124946
125098
|
});
|
|
124947
125099
|
try {
|
|
@@ -124992,11 +125144,11 @@ function hasRemoteChanged(remote, entry) {
|
|
|
124992
125144
|
return remote.lastModified.getTime() > syncedAt;
|
|
124993
125145
|
}
|
|
124994
125146
|
|
|
124995
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
125147
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/conflict-file.js
|
|
124996
125148
|
import * as crypto12 from "crypto";
|
|
124997
125149
|
import * as path31 from "path";
|
|
124998
125150
|
|
|
124999
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
125151
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/machine-id.js
|
|
125000
125152
|
import { createHash as createHash22, randomUUID as randomUUID6 } from "node:crypto";
|
|
125001
125153
|
import * as fs34 from "node:fs";
|
|
125002
125154
|
import * as os12 from "node:os";
|
|
@@ -125105,7 +125257,7 @@ function readShortMachineId(hqRoot) {
|
|
|
125105
125257
|
return createHash22("sha1").update(full).digest("hex").slice(0, 6);
|
|
125106
125258
|
}
|
|
125107
125259
|
|
|
125108
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
125260
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/conflict-file.js
|
|
125109
125261
|
var CONFLICT_BACKUPS_DIR = ".hq/conflict-backups";
|
|
125110
125262
|
var CONFLICT_PROBE_DIR = ".hq/tmp";
|
|
125111
125263
|
function safeTimestamp(detectedAt) {
|
|
@@ -125123,7 +125275,7 @@ function buildConflictId(originalRelative, detectedAt) {
|
|
|
125123
125275
|
return `${safePath}-${safeTimestamp(detectedAt)}`;
|
|
125124
125276
|
}
|
|
125125
125277
|
|
|
125126
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
125278
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/conflict-index.js
|
|
125127
125279
|
import * as crypto13 from "crypto";
|
|
125128
125280
|
import * as fs35 from "fs";
|
|
125129
125281
|
import * as path32 from "path";
|
|
@@ -125277,7 +125429,7 @@ function pruneConflictIndex(hqRoot) {
|
|
|
125277
125429
|
return result;
|
|
125278
125430
|
}
|
|
125279
125431
|
|
|
125280
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
125432
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/same-path-upload-lock.js
|
|
125281
125433
|
var SAME_PATH_UPLOAD_WAIT_MS = 6e4;
|
|
125282
125434
|
var SAME_PATH_LANDED_KEY_CAP = 4096;
|
|
125283
125435
|
var SAME_PATH_LANDED_PER_KEY_CAP = 8;
|
|
@@ -125380,16 +125532,16 @@ var SamePathUploadHold = class {
|
|
|
125380
125532
|
}
|
|
125381
125533
|
const waitMs = waitMsForTest ?? SAME_PATH_UPLOAD_WAIT_MS;
|
|
125382
125534
|
const ownSlot = slot;
|
|
125383
|
-
const granted = await new Promise((
|
|
125535
|
+
const granted = await new Promise((resolve33) => {
|
|
125384
125536
|
const waiter = (ok) => {
|
|
125385
125537
|
clearTimeout(timer);
|
|
125386
|
-
|
|
125538
|
+
resolve33(ok);
|
|
125387
125539
|
};
|
|
125388
125540
|
const timer = setTimeout(() => {
|
|
125389
125541
|
const index = ownSlot.waiters.indexOf(waiter);
|
|
125390
125542
|
if (index >= 0)
|
|
125391
125543
|
ownSlot.waiters.splice(index, 1);
|
|
125392
|
-
|
|
125544
|
+
resolve33(false);
|
|
125393
125545
|
}, waitMs);
|
|
125394
125546
|
timer.unref?.();
|
|
125395
125547
|
ownSlot.waiters.push(waiter);
|
|
@@ -125467,7 +125619,7 @@ var SamePathUploadSupersededError = class extends Error {
|
|
|
125467
125619
|
}
|
|
125468
125620
|
};
|
|
125469
125621
|
|
|
125470
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
125622
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/cloud-authoritative.js
|
|
125471
125623
|
var CLOUD_AUTHORITATIVE_PATTERNS = [
|
|
125472
125624
|
/^company-brief\.md$/,
|
|
125473
125625
|
/^board\.json$/,
|
|
@@ -125502,7 +125654,7 @@ function isLocallyIneligibleForPush(relPath, options = {}) {
|
|
|
125502
125654
|
return isCloudAuthoritative(relPath);
|
|
125503
125655
|
}
|
|
125504
125656
|
|
|
125505
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
125657
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/ontology-entity-push.js
|
|
125506
125658
|
init_dist();
|
|
125507
125659
|
import { createHash as createHash23 } from "node:crypto";
|
|
125508
125660
|
var ONTOLOGY_ENTITY_PUSH_FLAG = "checkpoint.ontology";
|
|
@@ -125583,7 +125735,7 @@ ${caller}`;
|
|
|
125583
125735
|
return failed ? false : value;
|
|
125584
125736
|
}
|
|
125585
125737
|
|
|
125586
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
125738
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/ontology-outbox.js
|
|
125587
125739
|
import fs36 from "node:fs";
|
|
125588
125740
|
import path33 from "node:path";
|
|
125589
125741
|
var ONTOLOGY_OUTBOX_SCHEMA = "hq-ontology-outbox.v1";
|
|
@@ -125649,7 +125801,7 @@ function entityIsFreshForCreate(body, nowMs) {
|
|
|
125649
125801
|
return age >= -ENTITY_CREATE_FUTURE_SKEW_MS && age <= ENTITY_CREATE_WINDOW_MS;
|
|
125650
125802
|
}
|
|
125651
125803
|
|
|
125652
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
125804
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/skill-register-landed-bytes.js
|
|
125653
125805
|
init_dist();
|
|
125654
125806
|
import { createHash as createHash24 } from "node:crypto";
|
|
125655
125807
|
var SKILL_REGISTER_LANDED_BYTES_FLAG = "sync.skill-register-landed-bytes";
|
|
@@ -125723,7 +125875,7 @@ ${caller}`;
|
|
|
125723
125875
|
return failed ? false : value;
|
|
125724
125876
|
}
|
|
125725
125877
|
|
|
125726
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
125878
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/personal-connector-settings-sync.js
|
|
125727
125879
|
init_dist();
|
|
125728
125880
|
import { createHash as createHash25 } from "node:crypto";
|
|
125729
125881
|
var PERSONAL_CONNECTOR_SETTINGS_SYNC_FLAG = "personal.connector-settings-sync";
|
|
@@ -125786,7 +125938,7 @@ ${caller}`;
|
|
|
125786
125938
|
return failed ? false : value;
|
|
125787
125939
|
}
|
|
125788
125940
|
|
|
125789
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
125941
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/describe-error.js
|
|
125790
125942
|
import * as path34 from "node:path";
|
|
125791
125943
|
var MAX_DIAGNOSTIC_LENGTH = 1024;
|
|
125792
125944
|
function sanitizeDiagnostic(value) {
|
|
@@ -125919,7 +126071,7 @@ function pushFailureTelemetryLabel(value) {
|
|
|
125919
126071
|
return safe.slice(0, 128) || "unknown";
|
|
125920
126072
|
}
|
|
125921
126073
|
|
|
125922
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
126074
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/readlink-safe.js
|
|
125923
126075
|
import * as fs37 from "fs";
|
|
125924
126076
|
function readlinkOrNull(linkPath, readlink = (path68) => fs37.readlinkSync(path68, "utf8")) {
|
|
125925
126077
|
try {
|
|
@@ -125932,14 +126084,14 @@ function readlinkOrNull(linkPath, readlink = (path68) => fs37.readlinkSync(path6
|
|
|
125932
126084
|
}
|
|
125933
126085
|
}
|
|
125934
126086
|
|
|
125935
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
126087
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/reconcile-cursor.js
|
|
125936
126088
|
function checkpointReconcileApply(checkpoint, paths) {
|
|
125937
126089
|
if (!checkpoint)
|
|
125938
126090
|
return;
|
|
125939
126091
|
checkpoint.store.checkpointApply(checkpoint.cursor, [...new Set(paths)].map((path68) => ({ path: path68, durable: true })));
|
|
125940
126092
|
}
|
|
125941
126093
|
|
|
125942
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
126094
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/mass-delete-guards.js
|
|
125943
126095
|
init_dist();
|
|
125944
126096
|
import { createHash as createHash26 } from "node:crypto";
|
|
125945
126097
|
var MASS_DELETE_GUARDS_FLAG = "sync.delete-absolute-volume-and-release-root-guards";
|
|
@@ -126084,7 +126236,7 @@ function warnFlagReadFailure(write) {
|
|
|
126084
126236
|
`)))(line);
|
|
126085
126237
|
}
|
|
126086
126238
|
|
|
126087
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
126239
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cli/case-alias.js
|
|
126088
126240
|
import * as fs38 from "fs";
|
|
126089
126241
|
import * as path35 from "path";
|
|
126090
126242
|
function foldVaultKey(key) {
|
|
@@ -126232,7 +126384,7 @@ function directoryFoldsCase(dir) {
|
|
|
126232
126384
|
return false;
|
|
126233
126385
|
}
|
|
126234
126386
|
|
|
126235
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
126387
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cli/share.js
|
|
126236
126388
|
async function remoteContentDiffers(ctx, relativePath, localHash, hqRoot, symlinkOptions) {
|
|
126237
126389
|
const probeKey = crypto14.createHash("sha256").update(relativePath).digest("hex").slice(0, 16);
|
|
126238
126390
|
const probePath = path36.join(os13.tmpdir(), `hq-conflict-probe-${readShortMachineId(hqRoot)}-${probeKey}.tmp`);
|
|
@@ -126371,7 +126523,7 @@ async function yieldToCooperativeCheckpoint(work, cooperativeCheckpoint, force =
|
|
|
126371
126523
|
const completed = resumedAt > 0 ? resumedAt : work.rowsSinceYield;
|
|
126372
126524
|
work.rowsSinceYield = 0;
|
|
126373
126525
|
work.lastYieldAt = now;
|
|
126374
|
-
await new Promise((
|
|
126526
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
126375
126527
|
if (!cooperativeCheckpoint)
|
|
126376
126528
|
return;
|
|
126377
126529
|
if (await cooperativeCheckpoint() === true) {
|
|
@@ -128773,7 +128925,7 @@ async function executeUploads(run, pushPlan, counters, conflictPaths) {
|
|
|
128773
128925
|
const resumedAt = admittedSinceCooperativeCheckpoint + skippedSinceCooperativeCheckpoint;
|
|
128774
128926
|
admittedSinceCooperativeCheckpoint = 0;
|
|
128775
128927
|
skippedSinceCooperativeCheckpoint = 0;
|
|
128776
|
-
await new Promise((
|
|
128928
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
128777
128929
|
if (await run.options.cooperativeCheckpoint() === true) {
|
|
128778
128930
|
process.stderr.write(`${JSON.stringify({
|
|
128779
128931
|
type: "cooperative-handoff",
|
|
@@ -130403,11 +130555,11 @@ function computeDecommissionPlan(journal, prefixes, policy, alreadyPlanned, skip
|
|
|
130403
130555
|
return out;
|
|
130404
130556
|
}
|
|
130405
130557
|
|
|
130406
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
130558
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cli/sync.js
|
|
130407
130559
|
import * as fs47 from "fs";
|
|
130408
130560
|
import * as path44 from "path";
|
|
130409
130561
|
|
|
130410
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
130562
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/remote-file-spool.js
|
|
130411
130563
|
import * as fs40 from "node:fs";
|
|
130412
130564
|
import * as os14 from "node:os";
|
|
130413
130565
|
import * as path37 from "node:path";
|
|
@@ -130486,12 +130638,12 @@ function* readRows(filename) {
|
|
|
130486
130638
|
}
|
|
130487
130639
|
}
|
|
130488
130640
|
|
|
130489
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
130641
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/hq-root-recovery.js
|
|
130490
130642
|
import * as fs42 from "fs";
|
|
130491
130643
|
import * as os15 from "os";
|
|
130492
130644
|
import * as path39 from "path";
|
|
130493
130645
|
|
|
130494
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
130646
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/backup-prune.js
|
|
130495
130647
|
import * as crypto15 from "crypto";
|
|
130496
130648
|
import * as fs41 from "fs";
|
|
130497
130649
|
import * as path38 from "path";
|
|
@@ -130677,7 +130829,7 @@ function inventoryManagedSnapshots(backupRoot, canonicalRoot3, isCopyingOwnerLiv
|
|
|
130677
130829
|
return { entries: entries3, ...plan, unmanaged: [...unmanaged, ...plan.unmanaged] };
|
|
130678
130830
|
}
|
|
130679
130831
|
|
|
130680
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
130832
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/hq-root-recovery.js
|
|
130681
130833
|
var HQ_LAYOUT_DIRS = ["repos", "repos/public", "repos/private"];
|
|
130682
130834
|
function gitSidecarDir(hqRoot, homeDir = os15.homedir()) {
|
|
130683
130835
|
return path39.join(homeDir, ".hq", "hq-root-git", canonicalRootHash(path39.resolve(hqRoot)));
|
|
@@ -130864,10 +131016,10 @@ function recoverHqRootLocalState(hqRoot, opts = {}) {
|
|
|
130864
131016
|
};
|
|
130865
131017
|
}
|
|
130866
131018
|
|
|
130867
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
131019
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cli/doctor.js
|
|
130868
131020
|
var SKILLS_KEY_PREFIX = ".claude/skills/";
|
|
130869
131021
|
|
|
130870
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
131022
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/content-hash.js
|
|
130871
131023
|
var SHA256_CONTENT_HASH = /^sha256:([a-f0-9]{64})$/;
|
|
130872
131024
|
function rawSha256FromContentHash(contentHash) {
|
|
130873
131025
|
if (contentHash === void 0)
|
|
@@ -130878,7 +131030,7 @@ function contentHashMatchesRawSha256(contentHash, rawHash) {
|
|
|
130878
131030
|
return rawSha256FromContentHash(contentHash) === rawHash;
|
|
130879
131031
|
}
|
|
130880
131032
|
|
|
130881
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
131033
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/kms10-etag-safe-pull.js
|
|
130882
131034
|
import { createHash as createHash29 } from "node:crypto";
|
|
130883
131035
|
var KMS10_COPY_MARKER_META_KEY = "hq-kms10-reencrypt-current";
|
|
130884
131036
|
var KMS10_COPY_ORIGINAL_KEY_HASH_META_KEY = "hq-kms10-original-key-sha256";
|
|
@@ -130903,7 +131055,7 @@ function isKms10CopyOfJournalBase(listed, head, journalHash, journalEtag, expect
|
|
|
130903
131055
|
return normalizeEtag(head.metadata?.["hq-kms10-original-etag"] ?? "") === normalizeEtag(journalEtag);
|
|
130904
131056
|
}
|
|
130905
131057
|
|
|
130906
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
131058
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/targeted-upsert-exact-list.js
|
|
130907
131059
|
init_dist();
|
|
130908
131060
|
import { createHash as createHash30 } from "node:crypto";
|
|
130909
131061
|
function logSwallowed8(line) {
|
|
@@ -131020,7 +131172,7 @@ function isTargetedUpsertExactListEnabled(config2, companyUid) {
|
|
|
131020
131172
|
return defaultTargetedUpsertExactListGate(config2, companyUid);
|
|
131021
131173
|
}
|
|
131022
131174
|
|
|
131023
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
131175
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/targeted-pull-prefixes.js
|
|
131024
131176
|
var TARGETED_PULL_PREFIX_GROUP_MIN_PATHS = 16;
|
|
131025
131177
|
function coalesceDenseTargetedPullPaths(paths) {
|
|
131026
131178
|
const normalized = paths.map((path68) => path68.replace(/\\/g, "/"));
|
|
@@ -131058,13 +131210,13 @@ function coalesceDenseTargetedPullPaths(paths) {
|
|
|
131058
131210
|
return result;
|
|
131059
131211
|
}
|
|
131060
131212
|
|
|
131061
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
131062
|
-
import { spawnSync as
|
|
131213
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cli/reindex.js
|
|
131214
|
+
import { spawnSync as spawnSync3 } from "child_process";
|
|
131063
131215
|
import * as fs46 from "fs";
|
|
131064
131216
|
import * as path43 from "path";
|
|
131065
131217
|
|
|
131066
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
131067
|
-
import { spawnSync } from "child_process";
|
|
131218
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cli/reindex-knowledge.js
|
|
131219
|
+
import { spawnSync as spawnSync2 } from "child_process";
|
|
131068
131220
|
import * as fs43 from "fs";
|
|
131069
131221
|
import * as path40 from "path";
|
|
131070
131222
|
function warn2(msg) {
|
|
@@ -131105,7 +131257,7 @@ function isUnder(child, parent) {
|
|
|
131105
131257
|
}
|
|
131106
131258
|
function gitToplevel(dir) {
|
|
131107
131259
|
try {
|
|
131108
|
-
const res =
|
|
131260
|
+
const res = spawnSync2("git", ["-C", dir, "rev-parse", "--show-toplevel"], {
|
|
131109
131261
|
encoding: "utf8",
|
|
131110
131262
|
stdio: ["ignore", "pipe", "pipe"],
|
|
131111
131263
|
timeout: 15e3
|
|
@@ -131172,14 +131324,14 @@ function classifyLink(root5, linkPath, rootTop) {
|
|
|
131172
131324
|
}
|
|
131173
131325
|
function pullLegacyRepo(root5, repoTop) {
|
|
131174
131326
|
try {
|
|
131175
|
-
const remotes =
|
|
131327
|
+
const remotes = spawnSync2("git", ["-C", repoTop, "remote"], {
|
|
131176
131328
|
encoding: "utf8",
|
|
131177
131329
|
stdio: ["ignore", "pipe", "pipe"],
|
|
131178
131330
|
timeout: 15e3
|
|
131179
131331
|
});
|
|
131180
131332
|
if (remotes.status !== 0 || !remotes.stdout.trim())
|
|
131181
131333
|
return;
|
|
131182
|
-
const res =
|
|
131334
|
+
const res = spawnSync2("git", ["-C", repoTop, "pull", "--ff-only", "--quiet"], {
|
|
131183
131335
|
encoding: "utf8",
|
|
131184
131336
|
stdio: ["ignore", "pipe", "pipe"],
|
|
131185
131337
|
timeout: 6e4
|
|
@@ -131202,7 +131354,7 @@ function copyExclusions(root5, link) {
|
|
|
131202
131354
|
}
|
|
131203
131355
|
if (link.repoTop) {
|
|
131204
131356
|
try {
|
|
131205
|
-
const res =
|
|
131357
|
+
const res = spawnSync2("git", ["-C", link.repoTop, "ls-files", "--others", "--ignored", "--exclude-standard", "-z"], { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"], timeout: 3e4 });
|
|
131206
131358
|
if (res.status === 0) {
|
|
131207
131359
|
const ignored = res.stdout.split("\0").filter(Boolean).map((rel) => path40.join(link.repoTop, rel)).filter((abs) => isUnder(abs, link.target));
|
|
131208
131360
|
if (ignored.length > 0) {
|
|
@@ -131326,7 +131478,7 @@ function materializeLegacyKnowledgeRepos(root5) {
|
|
|
131326
131478
|
}
|
|
131327
131479
|
}
|
|
131328
131480
|
|
|
131329
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
131481
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/session-log-capture.js
|
|
131330
131482
|
import * as crypto16 from "node:crypto";
|
|
131331
131483
|
import * as fs44 from "node:fs";
|
|
131332
131484
|
import * as os16 from "node:os";
|
|
@@ -132256,7 +132408,7 @@ function captureSessionLogs(root5, options = {}) {
|
|
|
132256
132408
|
}
|
|
132257
132409
|
}
|
|
132258
132410
|
|
|
132259
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
132411
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/session-log-retention.js
|
|
132260
132412
|
import * as crypto17 from "node:crypto";
|
|
132261
132413
|
import * as fs45 from "node:fs";
|
|
132262
132414
|
import * as os17 from "node:os";
|
|
@@ -132517,7 +132669,7 @@ function pruneSyncedSessionLogs(root5) {
|
|
|
132517
132669
|
}
|
|
132518
132670
|
}
|
|
132519
132671
|
|
|
132520
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
132672
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cli/reindex.js
|
|
132521
132673
|
function isDir2(p3) {
|
|
132522
132674
|
try {
|
|
132523
132675
|
return fs46.statSync(p3).isDirectory();
|
|
@@ -133006,7 +133158,7 @@ function reindex(opts = {}) {
|
|
|
133006
133158
|
copySessionLogs(root5, opts.sessionLogMinIntervalMs, opts.sessionLogQuietForMs, opts.sessionLogMaxStalenessMs);
|
|
133007
133159
|
const genScript = path43.join(root5, "core", "scripts", "generate-workers-registry.sh");
|
|
133008
133160
|
if (isExecutable(genScript)) {
|
|
133009
|
-
|
|
133161
|
+
spawnSync3("bash", [genScript], { stdio: ["ignore", 2, 2] });
|
|
133010
133162
|
}
|
|
133011
133163
|
if (skippedNonSymlink > 0 || skippedPointsElsewhere > 0) {
|
|
133012
133164
|
const parts = [];
|
|
@@ -133041,14 +133193,14 @@ function emitReindexTelemetry(opts, result, lockResult) {
|
|
|
133041
133193
|
}, { claims: opts.telemetryClaims });
|
|
133042
133194
|
}
|
|
133043
133195
|
|
|
133044
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
133196
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cli/sync.js
|
|
133045
133197
|
async function yieldToCooperativeCheckpoint2(work, cooperativeCheckpoint, force, resumedAt) {
|
|
133046
133198
|
work.rowsSinceYield += 1;
|
|
133047
133199
|
if (!force && work.rowsSinceYield < cooperativeUnitSize()) {
|
|
133048
133200
|
return false;
|
|
133049
133201
|
}
|
|
133050
133202
|
work.rowsSinceYield = 0;
|
|
133051
|
-
await new Promise((
|
|
133203
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
133052
133204
|
if (!cooperativeCheckpoint)
|
|
133053
133205
|
return false;
|
|
133054
133206
|
const handedOff = await cooperativeCheckpoint() === true;
|
|
@@ -133155,8 +133307,8 @@ async function awaitListPageWithCooperativeYield(work, cooperativeCheckpoint, re
|
|
|
133155
133307
|
let timer;
|
|
133156
133308
|
const raced = await Promise.race([
|
|
133157
133309
|
outcome,
|
|
133158
|
-
new Promise((
|
|
133159
|
-
timer = setTimeout(() =>
|
|
133310
|
+
new Promise((resolve33) => {
|
|
133311
|
+
timer = setTimeout(() => resolve33({ kind: "tick" }), yieldMs);
|
|
133160
133312
|
timer.unref?.();
|
|
133161
133313
|
})
|
|
133162
133314
|
]);
|
|
@@ -135083,7 +135235,7 @@ async function executeJournalTombstoneDeletes(run, plan, counters) {
|
|
|
135083
135235
|
let tombstoneRows = 0;
|
|
135084
135236
|
for (const tombstone of plan.tombstones) {
|
|
135085
135237
|
if (++tombstoneRows % cooperativeUnitSize() === 0) {
|
|
135086
|
-
await new Promise((
|
|
135238
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
135087
135239
|
}
|
|
135088
135240
|
const { key, localPath, localSnapshot } = tombstone;
|
|
135089
135241
|
if (tombstone.journalOnly || plan.caseAliasedKeys?.has(toPosixKey(key))) {
|
|
@@ -135945,7 +136097,7 @@ async function computePullPlan(remoteFiles, journal, companyRoot, shouldSync, pe
|
|
|
135945
136097
|
let tombstoneScanRows = 0;
|
|
135946
136098
|
for (const key of unseenJournalKeys) {
|
|
135947
136099
|
if (++tombstoneScanRows % cooperativeUnitSize() === 0) {
|
|
135948
|
-
await new Promise((
|
|
136100
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
135949
136101
|
}
|
|
135950
136102
|
const posixKey = toPosixKey(key);
|
|
135951
136103
|
if (!prefixMatcher.coversPath(posixKey))
|
|
@@ -136151,7 +136303,7 @@ function defaultConsoleLogger2(event) {
|
|
|
136151
136303
|
}
|
|
136152
136304
|
}
|
|
136153
136305
|
|
|
136154
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
136306
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cli/rescue-core.js
|
|
136155
136307
|
import { createRequire } from "node:module";
|
|
136156
136308
|
var MAX_CLONE_BATCH_PATH_BYTES = 64 * 1024;
|
|
136157
136309
|
var require2 = createRequire(import.meta.url);
|
|
@@ -136159,7 +136311,7 @@ var SNAPSHOT_CLONE_METADATA_ALLOWANCE_BYTES = 64 * 1024 ** 2;
|
|
|
136159
136311
|
var CLOUD_UPDATE_OVERLAY_FREE_SPACE_FLOOR_BYTES = 16 * 1024 ** 2;
|
|
136160
136312
|
var PRESERVED_FILE_COMPARE_CHUNK_BYTES = 64 * 1024;
|
|
136161
136313
|
|
|
136162
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
136314
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/schemas/source-channels.js
|
|
136163
136315
|
var SOURCE_CHANNELS = Object.freeze([
|
|
136164
136316
|
"meeting",
|
|
136165
136317
|
"email",
|
|
@@ -136168,7 +136320,7 @@ var SOURCE_CHANNELS = Object.freeze([
|
|
|
136168
136320
|
"notion"
|
|
136169
136321
|
]);
|
|
136170
136322
|
|
|
136171
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
136323
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/schemas/signal-types.js
|
|
136172
136324
|
var SIGNAL_TYPES = Object.freeze([
|
|
136173
136325
|
"action_item",
|
|
136174
136326
|
"commitment",
|
|
@@ -136178,7 +136330,7 @@ var SIGNAL_TYPES = Object.freeze([
|
|
|
136178
136330
|
"summary"
|
|
136179
136331
|
]);
|
|
136180
136332
|
|
|
136181
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
136333
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/push-event.js
|
|
136182
136334
|
var CONTENT_HASH_PATTERN = /^sha256:[0-9a-f]{64}$/;
|
|
136183
136335
|
var ISO8601_DATETIME_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;
|
|
136184
136336
|
function nativeSeparatorsToPosix(relativePath, sep25) {
|
|
@@ -136273,7 +136425,7 @@ function decodePushEvent(input2) {
|
|
|
136273
136425
|
return parsed.data;
|
|
136274
136426
|
}
|
|
136275
136427
|
|
|
136276
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
136428
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-watch-routes.js
|
|
136277
136429
|
import * as path45 from "path";
|
|
136278
136430
|
function routeChangeToTarget(relPath, kind) {
|
|
136279
136431
|
const norm = relPath.split(path45.sep).join("/").replace(/^\.\//, "");
|
|
@@ -136442,7 +136594,7 @@ function carriedFlags(baseArgv) {
|
|
|
136442
136594
|
return carried;
|
|
136443
136595
|
}
|
|
136444
136596
|
|
|
136445
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
136597
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/push-transport.js
|
|
136446
136598
|
var moduleLoadFetch = globalThis.fetch;
|
|
136447
136599
|
var moduleLoadAbortController = globalThis.AbortController;
|
|
136448
136600
|
var successOutcomes = /* @__PURE__ */ new WeakMap();
|
|
@@ -136664,7 +136816,7 @@ var HttpPushTransport = class {
|
|
|
136664
136816
|
}
|
|
136665
136817
|
};
|
|
136666
136818
|
|
|
136667
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
136819
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/feature-flags.js
|
|
136668
136820
|
var PARALLEL_COORDINATOR_ENV_VAR = "HQ_SYNC_PARALLEL_COORDINATOR";
|
|
136669
136821
|
var AREA_STORAGE_ENV_VAR = "HQ_SYNC_AREA_STORAGE";
|
|
136670
136822
|
function parseFeatureSwitch(value) {
|
|
@@ -136733,7 +136885,7 @@ function isEventSyncLocallyDisabled(value) {
|
|
|
136733
136885
|
}
|
|
136734
136886
|
}
|
|
136735
136887
|
|
|
136736
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
136888
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/metrics.js
|
|
136737
136889
|
var import_client_cloudwatch = __toESM(require_dist_cjs40(), 1);
|
|
136738
136890
|
var SYNC_METRIC_NAMESPACE = "HQPro/Sync";
|
|
136739
136891
|
var SYNC_LATENCY_METRIC_NAME = "hq-cloud.sync.p95_latency_seconds";
|
|
@@ -136801,7 +136953,7 @@ async function publishSyncLatencyMetric(metric, opts = {}) {
|
|
|
136801
136953
|
}
|
|
136802
136954
|
}
|
|
136803
136955
|
|
|
136804
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
136956
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/push-receiver.js
|
|
136805
136957
|
var DEFAULT_RECEIVER_DISPOSE_DRAIN_MS = 5e3;
|
|
136806
136958
|
var RECEIVER_SHUTDOWN_RELEASE_BUDGET_MS = 1500;
|
|
136807
136959
|
var DEFAULT_WAIT_TIME_SECONDS = 20;
|
|
@@ -137180,8 +137332,8 @@ var SqsPushReceiver = class {
|
|
|
137180
137332
|
if (this.inFlightDrains.size > 0) {
|
|
137181
137333
|
const releaseBudgetMs = Math.min(RECEIVER_SHUTDOWN_RELEASE_BUDGET_MS, this.disposeDrainMs / 2);
|
|
137182
137334
|
const drainBudgetMs = Math.max(0, this.disposeDrainMs - releaseBudgetMs);
|
|
137183
|
-
const drainDeadline = new Promise((
|
|
137184
|
-
const t = setTimeout(
|
|
137335
|
+
const drainDeadline = new Promise((resolve33) => {
|
|
137336
|
+
const t = setTimeout(resolve33, drainBudgetMs);
|
|
137185
137337
|
t.unref?.();
|
|
137186
137338
|
});
|
|
137187
137339
|
await Promise.race([
|
|
@@ -137346,8 +137498,8 @@ var SqsPushReceiver = class {
|
|
|
137346
137498
|
*/
|
|
137347
137499
|
startDrain(initial, signal) {
|
|
137348
137500
|
let resolveIntake = () => void 0;
|
|
137349
|
-
const intakeComplete = new Promise((
|
|
137350
|
-
resolveIntake =
|
|
137501
|
+
const intakeComplete = new Promise((resolve33) => {
|
|
137502
|
+
resolveIntake = resolve33;
|
|
137351
137503
|
});
|
|
137352
137504
|
const drain = this.handleReceivedMessages(initial, signal, resolveIntake).catch((err) => {
|
|
137353
137505
|
this.logger.error({
|
|
@@ -137366,8 +137518,8 @@ var SqsPushReceiver = class {
|
|
|
137366
137518
|
async waitForDrainSlot(signal) {
|
|
137367
137519
|
while (!signal.aborted && this.inFlightDrains.size >= this.maxInFlightDrains) {
|
|
137368
137520
|
let onAbort;
|
|
137369
|
-
const abortWait = new Promise((
|
|
137370
|
-
onAbort =
|
|
137521
|
+
const abortWait = new Promise((resolve33) => {
|
|
137522
|
+
onAbort = resolve33;
|
|
137371
137523
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
137372
137524
|
});
|
|
137373
137525
|
await Promise.race([
|
|
@@ -138199,11 +138351,11 @@ var SqsPushReceiver = class {
|
|
|
138199
138351
|
let timedOut = false;
|
|
138200
138352
|
const result = await Promise.race([
|
|
138201
138353
|
p3.then(() => "settled"),
|
|
138202
|
-
new Promise((
|
|
138354
|
+
new Promise((resolve33) => {
|
|
138203
138355
|
timeout = setTimeout(() => {
|
|
138204
138356
|
timedOut = true;
|
|
138205
138357
|
controller.abort(new Error("receiver drain exceeded its time limit"));
|
|
138206
|
-
|
|
138358
|
+
resolve33("timed-out");
|
|
138207
138359
|
}, this.drainTimeoutMs);
|
|
138208
138360
|
timeout.unref?.();
|
|
138209
138361
|
})
|
|
@@ -138318,26 +138470,26 @@ function realtimeAdmissionHolder(error64) {
|
|
|
138318
138470
|
};
|
|
138319
138471
|
}
|
|
138320
138472
|
function defaultSleep(ms, signal) {
|
|
138321
|
-
return new Promise((
|
|
138473
|
+
return new Promise((resolve33) => {
|
|
138322
138474
|
if (signal.aborted)
|
|
138323
|
-
return
|
|
138475
|
+
return resolve33();
|
|
138324
138476
|
const t = setTimeout(() => {
|
|
138325
138477
|
signal.removeEventListener("abort", onAbort);
|
|
138326
|
-
|
|
138478
|
+
resolve33();
|
|
138327
138479
|
}, ms);
|
|
138328
138480
|
t.unref?.();
|
|
138329
138481
|
const onAbort = () => {
|
|
138330
138482
|
clearTimeout(t);
|
|
138331
|
-
|
|
138483
|
+
resolve33();
|
|
138332
138484
|
};
|
|
138333
138485
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
138334
138486
|
});
|
|
138335
138487
|
}
|
|
138336
138488
|
|
|
138337
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
138489
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/logger.js
|
|
138338
138490
|
var import_pino = __toESM(require_pino(), 1);
|
|
138339
138491
|
|
|
138340
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
138492
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/path-leases.js
|
|
138341
138493
|
function assertCanonicalPath(path68) {
|
|
138342
138494
|
if (path68.length === 0 || path68.startsWith("/") || path68.endsWith("/") || path68.includes("\\") || path68.split("/").some((part) => part.length === 0 || part === "." || part === "..")) {
|
|
138343
138495
|
throw new Error(`path lease requires a canonical relative path: ${path68}`);
|
|
@@ -138400,7 +138552,7 @@ var PathLease = class {
|
|
|
138400
138552
|
}
|
|
138401
138553
|
};
|
|
138402
138554
|
|
|
138403
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
138555
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/parallel-sync-coordinator.js
|
|
138404
138556
|
var MAX_REALTIME_PULL_YIELDS = 3;
|
|
138405
138557
|
var MAX_REALTIME_PULL_YIELD_MS = 6e4;
|
|
138406
138558
|
var REALTIME_PULL_YIELD_STATE_TTL_MS = 10 * 6e4;
|
|
@@ -138452,14 +138604,14 @@ var DefaultParallelSyncCoordinator = class {
|
|
|
138452
138604
|
submit(work) {
|
|
138453
138605
|
if (this.stopping)
|
|
138454
138606
|
return Promise.resolve(this.retryableOutcome(this.pathsFor(work), "coordinator is shutting down"));
|
|
138455
|
-
return new Promise((
|
|
138607
|
+
return new Promise((resolve33) => {
|
|
138456
138608
|
let submission;
|
|
138457
138609
|
try {
|
|
138458
|
-
submission = this.createSubmission(work,
|
|
138610
|
+
submission = this.createSubmission(work, resolve33);
|
|
138459
138611
|
} catch (error64) {
|
|
138460
138612
|
const message = error64 instanceof Error ? error64.message : String(error64);
|
|
138461
138613
|
const paths = error64 instanceof SubmissionValidationError ? error64.paths : [];
|
|
138462
|
-
|
|
138614
|
+
resolve33({
|
|
138463
138615
|
paths: paths.map((path68) => ({ path: path68, epoch: 0, status: "refused", reason: message })),
|
|
138464
138616
|
error: message
|
|
138465
138617
|
});
|
|
@@ -138468,11 +138620,11 @@ var DefaultParallelSyncCoordinator = class {
|
|
|
138468
138620
|
this.touchPullYieldStates(submission);
|
|
138469
138621
|
this.expireInactivePullYieldStates();
|
|
138470
138622
|
if (work.class === "chore" && work.cursor?.phase !== void 0 && work.cursor.phase !== "apply" && submission.paths.length > 0) {
|
|
138471
|
-
|
|
138623
|
+
resolve33(this.refusedOutcome(submission.paths, "non-apply chore cannot dispatch mutation paths"));
|
|
138472
138624
|
return;
|
|
138473
138625
|
}
|
|
138474
138626
|
if (this.hasInternallyConflictingPaths(submission.paths)) {
|
|
138475
|
-
|
|
138627
|
+
resolve33(this.refusedOutcome(submission.paths, "submission contains internally conflicting paths"));
|
|
138476
138628
|
return;
|
|
138477
138629
|
}
|
|
138478
138630
|
this.registerEpochs(submission);
|
|
@@ -138538,14 +138690,14 @@ var DefaultParallelSyncCoordinator = class {
|
|
|
138538
138690
|
]).then(() => void 0);
|
|
138539
138691
|
return this.shutdownPromise;
|
|
138540
138692
|
}
|
|
138541
|
-
createSubmission(work,
|
|
138693
|
+
createSubmission(work, resolve33) {
|
|
138542
138694
|
const paths = this.pathsFor(work);
|
|
138543
138695
|
return {
|
|
138544
138696
|
id: `sync-${this.nextId++}`,
|
|
138545
138697
|
work,
|
|
138546
138698
|
paths,
|
|
138547
138699
|
results: /* @__PURE__ */ new Map(),
|
|
138548
|
-
resolve:
|
|
138700
|
+
resolve: resolve33,
|
|
138549
138701
|
controller: new AbortController(),
|
|
138550
138702
|
supersededPaths: /* @__PURE__ */ new Set(),
|
|
138551
138703
|
yieldedToPush: false,
|
|
@@ -138907,7 +139059,7 @@ var DefaultParallelSyncCoordinator = class {
|
|
|
138907
139059
|
}
|
|
138908
139060
|
};
|
|
138909
139061
|
|
|
138910
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
139062
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/sync-work.js
|
|
138911
139063
|
var InlineSyncWorkerAdapter = class {
|
|
138912
139064
|
handler;
|
|
138913
139065
|
constructor(handler) {
|
|
@@ -138918,7 +139070,7 @@ var InlineSyncWorkerAdapter = class {
|
|
|
138918
139070
|
}
|
|
138919
139071
|
};
|
|
138920
139072
|
|
|
138921
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
139073
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/watcher.js
|
|
138922
139074
|
import * as fs50 from "fs";
|
|
138923
139075
|
import { createHash as createHash33 } from "node:crypto";
|
|
138924
139076
|
import { readFile as readFile8, stat as stat4 } from "node:fs/promises";
|
|
@@ -139653,9 +139805,9 @@ var NodeFsHandler = class {
|
|
|
139653
139805
|
if (this.fsw.closed) {
|
|
139654
139806
|
return;
|
|
139655
139807
|
}
|
|
139656
|
-
const
|
|
139808
|
+
const dirname38 = sysPath.dirname(file2);
|
|
139657
139809
|
const basename20 = sysPath.basename(file2);
|
|
139658
|
-
const parent = this.fsw._getWatchedDir(
|
|
139810
|
+
const parent = this.fsw._getWatchedDir(dirname38);
|
|
139659
139811
|
let prevStats = stats;
|
|
139660
139812
|
if (parent.has(basename20))
|
|
139661
139813
|
return;
|
|
@@ -139682,7 +139834,7 @@ var NodeFsHandler = class {
|
|
|
139682
139834
|
prevStats = newStats2;
|
|
139683
139835
|
}
|
|
139684
139836
|
} catch (error64) {
|
|
139685
|
-
this.fsw._remove(
|
|
139837
|
+
this.fsw._remove(dirname38, basename20);
|
|
139686
139838
|
}
|
|
139687
139839
|
} else if (parent.has(basename20)) {
|
|
139688
139840
|
const at = newStats.atimeMs;
|
|
@@ -139778,7 +139930,7 @@ var NodeFsHandler = class {
|
|
|
139778
139930
|
this._addToNodeFs(path68, initialAdd, wh, depth + 1);
|
|
139779
139931
|
}
|
|
139780
139932
|
}).on(EV.ERROR, this._boundHandleError);
|
|
139781
|
-
return new Promise((
|
|
139933
|
+
return new Promise((resolve33, reject) => {
|
|
139782
139934
|
if (!stream)
|
|
139783
139935
|
return reject();
|
|
139784
139936
|
stream.once(STR_END, () => {
|
|
@@ -139787,7 +139939,7 @@ var NodeFsHandler = class {
|
|
|
139787
139939
|
return;
|
|
139788
139940
|
}
|
|
139789
139941
|
const wasThrottled = throttler ? throttler.clear() : false;
|
|
139790
|
-
|
|
139942
|
+
resolve33(void 0);
|
|
139791
139943
|
previous.getChildren().filter((item) => {
|
|
139792
139944
|
return item !== directory && !current.has(item);
|
|
139793
139945
|
}).forEach((item) => {
|
|
@@ -140614,7 +140766,7 @@ function watch(paths, options = {}) {
|
|
|
140614
140766
|
return watcher;
|
|
140615
140767
|
}
|
|
140616
140768
|
|
|
140617
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
140769
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/watch-roots.js
|
|
140618
140770
|
import * as fs48 from "fs";
|
|
140619
140771
|
import * as path46 from "path";
|
|
140620
140772
|
function defaultListChildDirs(dir, onSymlinkEntry) {
|
|
@@ -140688,7 +140840,7 @@ function isCoveredByRecursiveRoot(absolutePath, recursiveRoots) {
|
|
|
140688
140840
|
}
|
|
140689
140841
|
}
|
|
140690
140842
|
|
|
140691
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
140843
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/watch-coverage.js
|
|
140692
140844
|
import * as fs49 from "fs";
|
|
140693
140845
|
function directoryIdentityAt(absolutePath) {
|
|
140694
140846
|
try {
|
|
@@ -140725,7 +140877,7 @@ function probeScopedWatchCoverage(input2) {
|
|
|
140725
140877
|
return { ok: true };
|
|
140726
140878
|
}
|
|
140727
140879
|
|
|
140728
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
140880
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/watcher.js
|
|
140729
140881
|
var DEBOUNCE_MS = 2e3;
|
|
140730
140882
|
var DEFAULT_EVENT_DEBOUNCE_MS = 6e4;
|
|
140731
140883
|
var DEFAULT_EVENT_MAX_WAIT_MS = 12e4;
|
|
@@ -141115,7 +141267,7 @@ function startScopedRecursiveWatch(hqRoot, shouldEmit, onEvent, onError, onDirec
|
|
|
141115
141267
|
if (workSinceYield < 128)
|
|
141116
141268
|
return closed;
|
|
141117
141269
|
workSinceYield = 0;
|
|
141118
|
-
await new Promise((
|
|
141270
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
141119
141271
|
return closed;
|
|
141120
141272
|
};
|
|
141121
141273
|
while (pending.length > 0 && !closed) {
|
|
@@ -142039,11 +142191,11 @@ var TreeWatcher = class {
|
|
|
142039
142191
|
return capture;
|
|
142040
142192
|
}
|
|
142041
142193
|
enqueueDeleteSnapshotCaptureBatch(absolutePath, capture, schedule = true) {
|
|
142042
|
-
const promise2 = new Promise((
|
|
142194
|
+
const promise2 = new Promise((resolve33, reject) => {
|
|
142043
142195
|
this.pendingDeleteSnapshotCaptureBatch.push({
|
|
142044
142196
|
absolutePath,
|
|
142045
142197
|
capture,
|
|
142046
|
-
resolve:
|
|
142198
|
+
resolve: resolve33,
|
|
142047
142199
|
reject
|
|
142048
142200
|
});
|
|
142049
142201
|
});
|
|
@@ -142401,7 +142553,7 @@ var TreeWatcher = class {
|
|
|
142401
142553
|
if (this.pendingDeleteSnapshotCaptureBatch.length > 0) {
|
|
142402
142554
|
this.scheduleDeleteSnapshotCaptureBatch();
|
|
142403
142555
|
}
|
|
142404
|
-
await new Promise((
|
|
142556
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
142405
142557
|
return !cancelled();
|
|
142406
142558
|
};
|
|
142407
142559
|
const record2 = async (absolutePath, kind, relativePath) => {
|
|
@@ -142724,17 +142876,17 @@ var DurablePublishedContentHashes = class {
|
|
|
142724
142876
|
if (this.closed)
|
|
142725
142877
|
return Promise.resolve(false);
|
|
142726
142878
|
this.supersedeBatchRetries(mutation.relativePath);
|
|
142727
|
-
let
|
|
142879
|
+
let resolve33;
|
|
142728
142880
|
let reject;
|
|
142729
142881
|
const result = new Promise((resolveResult, rejectResult) => {
|
|
142730
|
-
|
|
142882
|
+
resolve33 = resolveResult;
|
|
142731
142883
|
reject = rejectResult;
|
|
142732
142884
|
});
|
|
142733
142885
|
this.pending.push({
|
|
142734
142886
|
mutation,
|
|
142735
142887
|
sequence: ++this.nextSequence,
|
|
142736
142888
|
shouldPersist,
|
|
142737
|
-
resolve:
|
|
142889
|
+
resolve: resolve33,
|
|
142738
142890
|
reject,
|
|
142739
142891
|
settled: false
|
|
142740
142892
|
});
|
|
@@ -143668,8 +143820,8 @@ var PushEventEmitter = class _PushEventEmitter {
|
|
|
143668
143820
|
}
|
|
143669
143821
|
async waitForPublishDrain() {
|
|
143670
143822
|
let timeout;
|
|
143671
|
-
const deadline = new Promise((
|
|
143672
|
-
timeout = this.clock.setTimeout(() =>
|
|
143823
|
+
const deadline = new Promise((resolve33) => {
|
|
143824
|
+
timeout = this.clock.setTimeout(() => resolve33(false), PUSH_EVENT_EMITTER_DISPOSE_DRAIN_MS);
|
|
143673
143825
|
});
|
|
143674
143826
|
const drained = await Promise.race([
|
|
143675
143827
|
this.publishTail.then(() => true, () => true),
|
|
@@ -143718,11 +143870,11 @@ var PushEventEmitter = class _PushEventEmitter {
|
|
|
143718
143870
|
}
|
|
143719
143871
|
};
|
|
143720
143872
|
|
|
143721
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
143873
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/manifest/build-manifest.js
|
|
143722
143874
|
import * as fs52 from "node:fs";
|
|
143723
143875
|
import * as path50 from "node:path";
|
|
143724
143876
|
|
|
143725
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
143877
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/company-slug.js
|
|
143726
143878
|
import * as path48 from "node:path";
|
|
143727
143879
|
var UNSAFE_SLUG_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
143728
143880
|
function isSafeCompanySlug(companiesDir, slug) {
|
|
@@ -143739,7 +143891,7 @@ function isSafeCompanySlug(companiesDir, slug) {
|
|
|
143739
143891
|
return path48.dirname(companyDir) === resolvedCompaniesDir;
|
|
143740
143892
|
}
|
|
143741
143893
|
|
|
143742
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
143894
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/manifest/contract.js
|
|
143743
143895
|
var SYNC_MANIFEST_CONTRACT_VERSION = 1;
|
|
143744
143896
|
var SYNC_MANIFEST_SCOPE_KINDS = ["personal", "company"];
|
|
143745
143897
|
var SYNC_MANIFEST_SOURCES = ["desktop", "cli"];
|
|
@@ -143908,7 +144060,7 @@ var SYNC_MANIFEST_CONTRACT_DESCRIPTOR = {
|
|
|
143908
144060
|
}
|
|
143909
144061
|
};
|
|
143910
144062
|
|
|
143911
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
144063
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/manifest/snapshot-store.js
|
|
143912
144064
|
import * as crypto18 from "node:crypto";
|
|
143913
144065
|
import * as fs51 from "node:fs";
|
|
143914
144066
|
import * as path49 from "node:path";
|
|
@@ -144083,7 +144235,7 @@ function writeSnapshotIncrementally(tmp, snapshot) {
|
|
|
144083
144235
|
}
|
|
144084
144236
|
var SNAPSHOT_WRITE_BATCH_CHARS = 256 * 1024;
|
|
144085
144237
|
|
|
144086
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
144238
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/manifest/build-manifest.js
|
|
144087
144239
|
function logSwallowed11(line) {
|
|
144088
144240
|
process.stderr.write(line);
|
|
144089
144241
|
}
|
|
@@ -144165,7 +144317,7 @@ function compileIgnoreRules(hqRoot, scopeKind) {
|
|
|
144165
144317
|
return bounded;
|
|
144166
144318
|
}
|
|
144167
144319
|
function yieldToEventLoop() {
|
|
144168
|
-
return new Promise((
|
|
144320
|
+
return new Promise((resolve33) => setTimeout(resolve33, 0));
|
|
144169
144321
|
}
|
|
144170
144322
|
function recordWalkedFile(outcome, collidedKeys, absPath, relative19) {
|
|
144171
144323
|
const manifestPath = toManifestPath(relative19);
|
|
@@ -144692,7 +144844,7 @@ function buildChunk(input2, firstChunkRemovedPaths, chunkIndex, chunkCount, entr
|
|
|
144692
144844
|
return upload;
|
|
144693
144845
|
}
|
|
144694
144846
|
|
|
144695
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
144847
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/manifest/upload-manifest.js
|
|
144696
144848
|
var MANIFEST_UPLOAD_DISABLED_ENV = "HQ_SYNC_MANIFEST_DISABLED";
|
|
144697
144849
|
var DEFAULT_MANIFEST_UPLOAD_MIN_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
144698
144850
|
var DEFAULT_MANIFEST_UPLOAD_WALL_MS = 6e4;
|
|
@@ -144828,14 +144980,14 @@ async function raceTransportCall(call, signal, deadlineMs) {
|
|
|
144828
144980
|
try {
|
|
144829
144981
|
return await Promise.race([
|
|
144830
144982
|
settled,
|
|
144831
|
-
new Promise((
|
|
144832
|
-
timer = setTimeout(() =>
|
|
144983
|
+
new Promise((resolve33) => {
|
|
144984
|
+
timer = setTimeout(() => resolve33({ kind: "deadline" }), remainingMs2);
|
|
144833
144985
|
timer.unref?.();
|
|
144834
144986
|
}),
|
|
144835
|
-
new Promise((
|
|
144987
|
+
new Promise((resolve33) => {
|
|
144836
144988
|
if (!signal)
|
|
144837
144989
|
return;
|
|
144838
|
-
onAbort = () =>
|
|
144990
|
+
onAbort = () => resolve33({ kind: "aborted" });
|
|
144839
144991
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
144840
144992
|
})
|
|
144841
144993
|
]);
|
|
@@ -145222,7 +145374,7 @@ async function runUploadPassBody(options, scopeKey, persisted) {
|
|
|
145222
145374
|
};
|
|
145223
145375
|
}
|
|
145224
145376
|
|
|
145225
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
145377
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/watcher-catchup-skip-store.js
|
|
145226
145378
|
import * as fs53 from "node:fs";
|
|
145227
145379
|
import * as path51 from "node:path";
|
|
145228
145380
|
import { createHash as createHash35, randomUUID as randomUUID7 } from "node:crypto";
|
|
@@ -145468,7 +145620,7 @@ function validUnresolvedCompanyRecord(value) {
|
|
|
145468
145620
|
return typeof record2.company === "string" && record2.company.length > 0 && record2.reason === "unresolved-company" && typeof record2.recordedAt === "number" && Number.isFinite(record2.recordedAt);
|
|
145469
145621
|
}
|
|
145470
145622
|
|
|
145471
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
145623
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/version.js
|
|
145472
145624
|
import { readFileSync as readFileSync31 } from "node:fs";
|
|
145473
145625
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
145474
145626
|
import path52 from "node:path";
|
|
@@ -145476,7 +145628,7 @@ var here = path52.dirname(fileURLToPath3(import.meta.url));
|
|
|
145476
145628
|
var pkg = JSON.parse(readFileSync31(path52.resolve(here, "..", "package.json"), "utf-8"));
|
|
145477
145629
|
var HQ_CLOUD_VERSION = pkg.version;
|
|
145478
145630
|
|
|
145479
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
145631
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/outcome-telemetry.js
|
|
145480
145632
|
import { promises as fs54 } from "node:fs";
|
|
145481
145633
|
import * as os18 from "node:os";
|
|
145482
145634
|
import * as path53 from "node:path";
|
|
@@ -145619,10 +145771,10 @@ async function resolveStoryDoneStateFlags(scopes, reader, log) {
|
|
|
145619
145771
|
settled += 1;
|
|
145620
145772
|
}
|
|
145621
145773
|
}));
|
|
145622
|
-
const deadline = new Promise((
|
|
145774
|
+
const deadline = new Promise((resolve33) => {
|
|
145623
145775
|
timer = setTimeout(() => {
|
|
145624
145776
|
deadlineReached = true;
|
|
145625
|
-
|
|
145777
|
+
resolve33();
|
|
145626
145778
|
}, STORY_DONE_STATE_FLAG_PHASE_TIMEOUT_MS);
|
|
145627
145779
|
});
|
|
145628
145780
|
await Promise.race([reads, deadline]);
|
|
@@ -145855,7 +146007,7 @@ async function collectAndSendOutcomeTelemetry(opts) {
|
|
|
145855
146007
|
return { enabled: true, optInSource, filesScanned, eventsSent, batchesSent };
|
|
145856
146008
|
}
|
|
145857
146009
|
|
|
145858
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
146010
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/qmd-reindex.js
|
|
145859
146011
|
import * as fs55 from "fs";
|
|
145860
146012
|
import * as path54 from "path";
|
|
145861
146013
|
import { spawn as spawn2 } from "child_process";
|
|
@@ -145917,9 +146069,9 @@ function resolveQmdLaunch(command5, args, options = {}) {
|
|
|
145917
146069
|
function createQmdExec(options = {}) {
|
|
145918
146070
|
const command5 = options.command ?? "qmd";
|
|
145919
146071
|
const sigintGraceMs = options.sigintGraceMs ?? DEFAULT_QMD_SIGINT_GRACE_MS;
|
|
145920
|
-
return (args, execOptions = {}) => new Promise((
|
|
146072
|
+
return (args, execOptions = {}) => new Promise((resolve33) => {
|
|
145921
146073
|
if (execOptions.signal?.aborted) {
|
|
145922
|
-
|
|
146074
|
+
resolve33({ status: null, stdout: "", stderr: "", timedOut: false });
|
|
145923
146075
|
return;
|
|
145924
146076
|
}
|
|
145925
146077
|
const launch = options.backgroundQos === void 0 ? resolveQmdLaunch(command5, args) : options.backgroundQos && fs55.existsSync(DARWIN_TASKPOLICY) ? { file: DARWIN_TASKPOLICY, args: ["-b", command5, ...args] } : { file: command5, args };
|
|
@@ -145931,7 +146083,7 @@ function createQmdExec(options = {}) {
|
|
|
145931
146083
|
windowsHide: true
|
|
145932
146084
|
});
|
|
145933
146085
|
} catch (err) {
|
|
145934
|
-
|
|
146086
|
+
resolve33({
|
|
145935
146087
|
status: null,
|
|
145936
146088
|
stdout: "",
|
|
145937
146089
|
stderr: err instanceof Error ? err.message : String(err),
|
|
@@ -146001,7 +146153,7 @@ function createQmdExec(options = {}) {
|
|
|
146001
146153
|
if (escalationTimer !== void 0)
|
|
146002
146154
|
clearTimeout(escalationTimer);
|
|
146003
146155
|
signal?.removeEventListener("abort", onAbort);
|
|
146004
|
-
|
|
146156
|
+
resolve33({ status, stdout, stderr, timedOut });
|
|
146005
146157
|
});
|
|
146006
146158
|
});
|
|
146007
146159
|
}
|
|
@@ -146505,7 +146657,7 @@ function defaultHasIndexableProjectContent(projectsDir) {
|
|
|
146505
146657
|
return false;
|
|
146506
146658
|
}
|
|
146507
146659
|
|
|
146508
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
146660
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/qmd-runner-admission.js
|
|
146509
146661
|
import fs56 from "node:fs";
|
|
146510
146662
|
import path55 from "node:path";
|
|
146511
146663
|
import { randomUUID as randomUUID8 } from "node:crypto";
|
|
@@ -146609,7 +146761,7 @@ nonce=${nonce}
|
|
|
146609
146761
|
};
|
|
146610
146762
|
}
|
|
146611
146763
|
|
|
146612
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
146764
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/cli/reindex-async.js
|
|
146613
146765
|
import { Worker } from "node:worker_threads";
|
|
146614
146766
|
function reindexAsync(options) {
|
|
146615
146767
|
if (import.meta.url.endsWith(".ts"))
|
|
@@ -146636,7 +146788,7 @@ function reindexAsync(options) {
|
|
|
146636
146788
|
...options.telemetryCompanyUid ? { telemetryCompanyUid: options.telemetryCompanyUid } : {},
|
|
146637
146789
|
...options.changedCount !== void 0 ? { changedCount: options.changedCount } : {}
|
|
146638
146790
|
};
|
|
146639
|
-
return new Promise((
|
|
146791
|
+
return new Promise((resolve33, reject) => {
|
|
146640
146792
|
const worker = new Worker(workerSource, {
|
|
146641
146793
|
eval: true,
|
|
146642
146794
|
workerData: {
|
|
@@ -146660,7 +146812,7 @@ function reindexAsync(options) {
|
|
|
146660
146812
|
if (code !== 0) {
|
|
146661
146813
|
reject(new Error(`reindex worker exited with code ${code}`));
|
|
146662
146814
|
} else if (result) {
|
|
146663
|
-
|
|
146815
|
+
resolve33(result);
|
|
146664
146816
|
} else {
|
|
146665
146817
|
reject(new Error("reindex worker exited without a result"));
|
|
146666
146818
|
}
|
|
@@ -146668,7 +146820,7 @@ function reindexAsync(options) {
|
|
|
146668
146820
|
});
|
|
146669
146821
|
}
|
|
146670
146822
|
|
|
146671
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
146823
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/agent-codex-instructions.js
|
|
146672
146824
|
import * as crypto19 from "crypto";
|
|
146673
146825
|
import * as fs57 from "fs";
|
|
146674
146826
|
import * as os19 from "os";
|
|
@@ -146828,7 +146980,7 @@ function materializeCodexAgents(opts) {
|
|
|
146828
146980
|
}
|
|
146829
146981
|
}
|
|
146830
146982
|
|
|
146831
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
146983
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-post-sync-flags.js
|
|
146832
146984
|
var POST_SYNC_FLAG_KEYS = {
|
|
146833
146985
|
qmdReindex: "sync.qmd-reindex",
|
|
146834
146986
|
conflictPrune: "sync.conflict-prune",
|
|
@@ -146848,12 +147000,12 @@ function createPostSyncFlagEvaluator(options = {}) {
|
|
|
146848
147000
|
};
|
|
146849
147001
|
}
|
|
146850
147002
|
|
|
146851
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
147003
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-manifest.js
|
|
146852
147004
|
import { createHash as createHash36, randomUUID as randomUUID9 } from "node:crypto";
|
|
146853
147005
|
import * as fs59 from "node:fs/promises";
|
|
146854
147006
|
import * as path58 from "node:path";
|
|
146855
147007
|
|
|
146856
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
147008
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-installation-id.js
|
|
146857
147009
|
import * as fs58 from "node:fs";
|
|
146858
147010
|
import * as os20 from "node:os";
|
|
146859
147011
|
import * as path57 from "node:path";
|
|
@@ -146903,7 +147055,7 @@ function readDesktopInstallationId(options) {
|
|
|
146903
147055
|
return void 0;
|
|
146904
147056
|
}
|
|
146905
147057
|
|
|
146906
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
147058
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-manifest.js
|
|
146907
147059
|
var RUNNER_MANIFEST_WALK_WALL_MS = 9e4;
|
|
146908
147060
|
var RUNNER_MANIFEST_PHASE_WALL_MS = 24e4;
|
|
146909
147061
|
var RUNNER_MANIFEST_REPAIR_POLL_SPACING_MS = 60 * 60 * 1e3;
|
|
@@ -147181,8 +147333,8 @@ async function withPhaseDeadline(pass4, deadlineMs) {
|
|
|
147181
147333
|
try {
|
|
147182
147334
|
return await Promise.race([
|
|
147183
147335
|
pass4,
|
|
147184
|
-
new Promise((
|
|
147185
|
-
timer = setTimeout(() =>
|
|
147336
|
+
new Promise((resolve33) => {
|
|
147337
|
+
timer = setTimeout(() => resolve33(PHASE_TIMED_OUT), Math.max(0, deadlineMs - Date.now()));
|
|
147186
147338
|
timer.unref?.();
|
|
147187
147339
|
})
|
|
147188
147340
|
]);
|
|
@@ -147514,14 +147666,14 @@ async function runPostSyncManifestUploads(options) {
|
|
|
147514
147666
|
return emitted;
|
|
147515
147667
|
}
|
|
147516
147668
|
|
|
147517
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
147669
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/lib/exit-codes.js
|
|
147518
147670
|
var PARTIAL_SYNC_EXIT = 2;
|
|
147519
147671
|
var UNRESOLVED_COMPANY_EXIT = 19;
|
|
147520
147672
|
var WATCH_RUNNER_ALREADY_OWNED_EXIT = 20;
|
|
147521
147673
|
var WATCH_OWNER_LEASE_LOST_EXIT = 21;
|
|
147522
147674
|
var PREFLIGHT_HALT_EXIT = 22;
|
|
147523
147675
|
|
|
147524
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
147676
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-audit.js
|
|
147525
147677
|
import * as crypto20 from "node:crypto";
|
|
147526
147678
|
import * as fs60 from "node:fs";
|
|
147527
147679
|
import * as path59 from "node:path";
|
|
@@ -147570,8 +147722,8 @@ function hashNormalizedKey(key) {
|
|
|
147570
147722
|
return crypto20.createHash("sha256").update(normalized, "utf8").digest("hex");
|
|
147571
147723
|
}
|
|
147572
147724
|
|
|
147573
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
147574
|
-
import { spawnSync as
|
|
147725
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/watch-owner-lease.js
|
|
147726
|
+
import { spawnSync as spawnSync4 } from "node:child_process";
|
|
147575
147727
|
import { randomUUID as randomUUID10 } from "node:crypto";
|
|
147576
147728
|
import * as fs61 from "node:fs";
|
|
147577
147729
|
import * as path60 from "node:path";
|
|
@@ -147620,7 +147772,7 @@ function processCommandLine(pid) {
|
|
|
147620
147772
|
}
|
|
147621
147773
|
}
|
|
147622
147774
|
if (process.platform === "win32") {
|
|
147623
|
-
const result2 =
|
|
147775
|
+
const result2 = spawnSync4("powershell.exe", [
|
|
147624
147776
|
"-NoProfile",
|
|
147625
147777
|
"-NonInteractive",
|
|
147626
147778
|
"-Command",
|
|
@@ -147643,7 +147795,7 @@ function processCommandLine(pid) {
|
|
|
147643
147795
|
`);
|
|
147644
147796
|
return null;
|
|
147645
147797
|
}
|
|
147646
|
-
const result =
|
|
147798
|
+
const result = spawnSync4("ps", ["-eww", "-o", "pid=,args="], {
|
|
147647
147799
|
encoding: "utf8",
|
|
147648
147800
|
timeout: 3e3,
|
|
147649
147801
|
maxBuffer: 16 * 1024 * 1024
|
|
@@ -147711,7 +147863,7 @@ async function renameStatusWithRetry(rename2, from, to) {
|
|
|
147711
147863
|
const delayMs = STATUS_RENAME_RETRY_DELAYS_MS[attempt];
|
|
147712
147864
|
if (delayMs === void 0 || !isTransientStatusRenameError(error64))
|
|
147713
147865
|
throw error64;
|
|
147714
|
-
await new Promise((
|
|
147866
|
+
await new Promise((resolve33) => setTimeout(resolve33, delayMs));
|
|
147715
147867
|
}
|
|
147716
147868
|
}
|
|
147717
147869
|
}
|
|
@@ -147881,8 +148033,8 @@ function acquireWatchOwnerLease(hqRoot, owner = "unknown", options = {}) {
|
|
|
147881
148033
|
let heartbeatEnabled = true;
|
|
147882
148034
|
let heartbeatTask = Promise.resolve();
|
|
147883
148035
|
let resolveLost;
|
|
147884
|
-
const lost = new Promise((
|
|
147885
|
-
resolveLost =
|
|
148036
|
+
const lost = new Promise((resolve33) => {
|
|
148037
|
+
resolveLost = resolve33;
|
|
147886
148038
|
});
|
|
147887
148039
|
const timer = setInterval(() => {
|
|
147888
148040
|
if (released || !heartbeatEnabled)
|
|
@@ -147941,7 +148093,7 @@ function acquireWatchOwnerLease(hqRoot, owner = "unknown", options = {}) {
|
|
|
147941
148093
|
};
|
|
147942
148094
|
}
|
|
147943
148095
|
|
|
147944
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
148096
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/watch-parent.js
|
|
147945
148097
|
var WATCH_PARENT_CHECK_INTERVAL_MS = 1e3;
|
|
147946
148098
|
function processExists(pid) {
|
|
147947
148099
|
try {
|
|
@@ -147992,7 +148144,7 @@ function startWatchParentExitMonitor(options) {
|
|
|
147992
148144
|
};
|
|
147993
148145
|
}
|
|
147994
148146
|
|
|
147995
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
148147
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-events.js
|
|
147996
148148
|
var ERROR_TYPES = /* @__PURE__ */ new Set([
|
|
147997
148149
|
"error",
|
|
147998
148150
|
"auth-error"
|
|
@@ -148038,7 +148190,7 @@ function emitUncaughtRunnerError(err, streams) {
|
|
|
148038
148190
|
}
|
|
148039
148191
|
}
|
|
148040
148192
|
|
|
148041
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
148193
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-stdout.js
|
|
148042
148194
|
import { format as format4 } from "node:util";
|
|
148043
148195
|
function redirectRunnerConsoleToStderr(runnerConsole, stderr) {
|
|
148044
148196
|
const writeDiagnostic = (...args) => {
|
|
@@ -148054,7 +148206,7 @@ function runWithRunnerConsoleStderr(startRunner, runnerConsole = console, stderr
|
|
|
148054
148206
|
return startRunner();
|
|
148055
148207
|
}
|
|
148056
148208
|
|
|
148057
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
148209
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-planning.js
|
|
148058
148210
|
function verifiedMemberCompanyUids(options) {
|
|
148059
148211
|
if (!options.companies)
|
|
148060
148212
|
return void 0;
|
|
@@ -148219,7 +148371,7 @@ function emitFanoutPlan(emit, plan) {
|
|
|
148219
148371
|
emit({ type: "fanout-plan", companies: plan });
|
|
148220
148372
|
}
|
|
148221
148373
|
|
|
148222
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
148374
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/active-company.js
|
|
148223
148375
|
import { randomUUID as randomUUID11 } from "node:crypto";
|
|
148224
148376
|
import * as fs62 from "node:fs";
|
|
148225
148377
|
import * as path61 from "node:path";
|
|
@@ -148311,7 +148463,7 @@ function seedActiveCompany(options) {
|
|
|
148311
148463
|
return { written: true, activeCompany };
|
|
148312
148464
|
}
|
|
148313
148465
|
|
|
148314
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
148466
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/manifest-reconcile.js
|
|
148315
148467
|
import { randomUUID as randomUUID12 } from "node:crypto";
|
|
148316
148468
|
import * as fs63 from "node:fs";
|
|
148317
148469
|
import * as path62 from "node:path";
|
|
@@ -148525,17 +148677,17 @@ async function reconcileCompanyManifest(options) {
|
|
|
148525
148677
|
return reconcileManifest(options.hqRoot, resolvedTargets);
|
|
148526
148678
|
}
|
|
148527
148679
|
|
|
148528
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
148680
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-company.js
|
|
148529
148681
|
import * as fs64 from "fs";
|
|
148530
148682
|
import * as path63 from "path";
|
|
148531
148683
|
import { createHash as createHash38, randomUUID as randomUUID13 } from "node:crypto";
|
|
148532
148684
|
|
|
148533
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
148685
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/scope-inventory-client.js
|
|
148534
148686
|
function allowsLegacyNetwork(decision) {
|
|
148535
148687
|
return decision.network === "allow-legacy";
|
|
148536
148688
|
}
|
|
148537
148689
|
|
|
148538
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
148690
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-rollup.js
|
|
148539
148691
|
function createCompanyState(company) {
|
|
148540
148692
|
return {
|
|
148541
148693
|
company,
|
|
@@ -148597,7 +148749,7 @@ function rollupAllComplete(plan, stateByCompany) {
|
|
|
148597
148749
|
};
|
|
148598
148750
|
}
|
|
148599
148751
|
|
|
148600
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
148752
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-company.js
|
|
148601
148753
|
var PRUNED_SAMPLE_PATHS = 5;
|
|
148602
148754
|
function journalErrorClass(error64) {
|
|
148603
148755
|
if (error64 instanceof JournalIncompleteUpsertError)
|
|
@@ -149547,7 +149699,7 @@ function normalizePullChangedPaths(target, changedPaths) {
|
|
|
149547
149699
|
});
|
|
149548
149700
|
}
|
|
149549
149701
|
|
|
149550
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
149702
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-telemetry.js
|
|
149551
149703
|
async function emitTelemetry(options) {
|
|
149552
149704
|
const telemetryFn = options.collectTelemetry ?? options.defaultCollectTelemetry;
|
|
149553
149705
|
await telemetryFn().catch((err) => {
|
|
@@ -149558,7 +149710,7 @@ async function emitTelemetry(options) {
|
|
|
149558
149710
|
});
|
|
149559
149711
|
}
|
|
149560
149712
|
|
|
149561
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
149713
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-watch-loop.js
|
|
149562
149714
|
import * as os21 from "os";
|
|
149563
149715
|
import * as path66 from "path";
|
|
149564
149716
|
import * as fs67 from "fs";
|
|
@@ -149566,7 +149718,7 @@ import { createHash as createHash39 } from "node:crypto";
|
|
|
149566
149718
|
import * as v8 from "node:v8";
|
|
149567
149719
|
import { performance as performance3 } from "node:perf_hooks";
|
|
149568
149720
|
|
|
149569
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
149721
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/push-failure-backoff.js
|
|
149570
149722
|
var PUSH_FAILURE_BACKOFF_BASE_MS = 5e3;
|
|
149571
149723
|
var PUSH_FAILURE_BACKOFF_CAP_MS = 5 * 6e4;
|
|
149572
149724
|
var RoutePushFailureBackoff = class {
|
|
@@ -149593,12 +149745,12 @@ var systemPushRetryScheduler = {
|
|
|
149593
149745
|
clearTimeout: (handle) => clearTimeout(handle)
|
|
149594
149746
|
};
|
|
149595
149747
|
|
|
149596
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
149748
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/event-sync.js
|
|
149597
149749
|
var import_client_sqs = __toESM(require_dist_cjs42(), 1);
|
|
149598
149750
|
import { readFileSync as readFileSync38 } from "node:fs";
|
|
149599
149751
|
import { join as join65 } from "node:path";
|
|
149600
149752
|
|
|
149601
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
149753
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/inbound-event-admission.js
|
|
149602
149754
|
import * as fs65 from "node:fs";
|
|
149603
149755
|
import * as path64 from "node:path";
|
|
149604
149756
|
function logSwallowed13(line) {
|
|
@@ -149662,7 +149814,7 @@ function isInboundEventPlaceable(hqRoot, event) {
|
|
|
149662
149814
|
}
|
|
149663
149815
|
}
|
|
149664
149816
|
|
|
149665
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
149817
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/unchanged-push-events.js
|
|
149666
149818
|
import fs66 from "node:fs";
|
|
149667
149819
|
import path65 from "node:path";
|
|
149668
149820
|
function journalCoordinatesForPushEvent(relativePath) {
|
|
@@ -149704,7 +149856,7 @@ function unchangedPushEventPaths(events, hqRoot, lookup) {
|
|
|
149704
149856
|
return unchanged;
|
|
149705
149857
|
}
|
|
149706
149858
|
|
|
149707
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
149859
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/event-sync.js
|
|
149708
149860
|
function resolveEventSync(override) {
|
|
149709
149861
|
return !isEventSyncLocallyDisabled(override);
|
|
149710
149862
|
}
|
|
@@ -149886,14 +150038,14 @@ function createRefreshingSqsClient(opts) {
|
|
|
149886
150038
|
const now = opts.now ?? (() => Date.now());
|
|
149887
150039
|
const buildSqs = opts.buildSqs ?? defaultBuildSqs;
|
|
149888
150040
|
let inner = buildSqs(opts.initial);
|
|
149889
|
-
let
|
|
150041
|
+
let expiresAtMs2 = Date.parse(opts.initial.credentials.expiration);
|
|
149890
150042
|
let refreshing = null;
|
|
149891
150043
|
const refresh = () => {
|
|
149892
150044
|
refreshing ??= (async () => {
|
|
149893
150045
|
try {
|
|
149894
150046
|
const resp = await opts.subscribe();
|
|
149895
150047
|
inner = buildSqs(resp);
|
|
149896
|
-
|
|
150048
|
+
expiresAtMs2 = Date.parse(resp.credentials.expiration);
|
|
149897
150049
|
} catch (error64) {
|
|
149898
150050
|
if (isRealtimeUnavailableError(error64))
|
|
149899
150051
|
opts.onRealtimeUnavailable?.(error64);
|
|
@@ -149907,7 +150059,7 @@ function createRefreshingSqsClient(opts) {
|
|
|
149907
150059
|
return refreshing;
|
|
149908
150060
|
};
|
|
149909
150061
|
const ensureFresh = async () => {
|
|
149910
|
-
if (Number.isFinite(
|
|
150062
|
+
if (Number.isFinite(expiresAtMs2) && now() >= expiresAtMs2 - REFRESH_SKEW_MS) {
|
|
149911
150063
|
await refresh();
|
|
149912
150064
|
}
|
|
149913
150065
|
};
|
|
@@ -150416,7 +150568,7 @@ async function startEventSync(opts) {
|
|
|
150416
150568
|
};
|
|
150417
150569
|
}
|
|
150418
150570
|
|
|
150419
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
150571
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/area-ledger-auto-migration.js
|
|
150420
150572
|
var AREA_AUTO_MIGRATION_STARTED_EVENT = "area_migration_started";
|
|
150421
150573
|
var AREA_AUTO_MIGRATION_COMPLETED_EVENT = "area_migration_completed";
|
|
150422
150574
|
var AREA_AUTO_MIGRATION_SOURCE = "sync-runner";
|
|
@@ -150569,7 +150721,7 @@ function describe3(error64) {
|
|
|
150569
150721
|
return error64 instanceof Error ? error64.message : String(error64);
|
|
150570
150722
|
}
|
|
150571
150723
|
|
|
150572
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
150724
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-heap-telemetry.js
|
|
150573
150725
|
import * as perfHooks from "node:perf_hooks";
|
|
150574
150726
|
var CENSUS_TOKEN = /^[A-Za-z][A-Za-z0-9_]{0,48}$/;
|
|
150575
150727
|
var HeapCensus = class {
|
|
@@ -151556,7 +151708,7 @@ function nodeHeapReaders(v82) {
|
|
|
151556
151708
|
};
|
|
151557
151709
|
}
|
|
151558
151710
|
|
|
151559
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
151711
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/sync/idle-full-reconcile.js
|
|
151560
151712
|
var MAX_UNOBSERVED_TICK_GAP_MS = 6e4;
|
|
151561
151713
|
var MAX_CLOCK_DRIFT_MS = 5e3;
|
|
151562
151714
|
var FullPassContinuity = class {
|
|
@@ -151611,7 +151763,7 @@ function canSkipScheduledFullReconcile(proof) {
|
|
|
151611
151763
|
return true;
|
|
151612
151764
|
}
|
|
151613
151765
|
|
|
151614
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
151766
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-watch-loop.js
|
|
151615
151767
|
var FULL_RECONCILE_EVERY_TICKS = 10;
|
|
151616
151768
|
var warnedUnresolvedReceiverCompanies = /* @__PURE__ */ new Set();
|
|
151617
151769
|
var EVENT_SYNC_STARTUP_SHUTDOWN_WAIT_MS = 5e3;
|
|
@@ -151663,7 +151815,7 @@ var WATCHER_WARMUP_YIELD_EVERY = 128;
|
|
|
151663
151815
|
function shouldYieldWatcherWarmup(examinedPaths) {
|
|
151664
151816
|
return examinedPaths > 0 && examinedPaths % WATCHER_WARMUP_YIELD_EVERY === 0;
|
|
151665
151817
|
}
|
|
151666
|
-
function yieldWatcherWarmupIfNeeded(examinedPaths, yieldNow = () => new Promise((
|
|
151818
|
+
function yieldWatcherWarmupIfNeeded(examinedPaths, yieldNow = () => new Promise((resolve33) => setImmediate(resolve33))) {
|
|
151667
151819
|
return shouldYieldWatcherWarmup(examinedPaths) ? yieldNow() : void 0;
|
|
151668
151820
|
}
|
|
151669
151821
|
function shouldSkipPersonalWarmupScopeCheck(pushFiltersApplied, routeKind) {
|
|
@@ -151969,11 +152121,11 @@ var CooperativePassScheduler = class {
|
|
|
151969
152121
|
return this.startFastRealtime(directEntry);
|
|
151970
152122
|
}
|
|
151971
152123
|
if (workClass === "realtime" && this._handoffActive && directEntry.allowConcurrentHandoff && this.canAdmitRealtimeOccupant(directEntry) && !(directEntry.lane === "fast" && this.consecutiveFastAdmissions > 0 && this.pending.some((pending) => pending.workClass === "realtime" && pending.lane === "slow" && pending.transferDirection === directEntry.transferDirection)) && !this.pullMustYieldForWaitingPush(directEntry)) {
|
|
151972
|
-
return new Promise((
|
|
152124
|
+
return new Promise((resolve33, reject) => {
|
|
151973
152125
|
const entry = {
|
|
151974
152126
|
...directEntry,
|
|
151975
152127
|
enqueuedAt: this.now(),
|
|
151976
|
-
resolve:
|
|
152128
|
+
resolve: resolve33,
|
|
151977
152129
|
reject,
|
|
151978
152130
|
occupancyArrival: true
|
|
151979
152131
|
};
|
|
@@ -151983,11 +152135,11 @@ var CooperativePassScheduler = class {
|
|
|
151983
152135
|
if (!this._handoffActive && this.active === null && this.activeFastRealtime === null && this.pending.length === 0) {
|
|
151984
152136
|
return this.start(directEntry);
|
|
151985
152137
|
}
|
|
151986
|
-
return new Promise((
|
|
152138
|
+
return new Promise((resolve33, reject) => {
|
|
151987
152139
|
const entry = {
|
|
151988
152140
|
...directEntry,
|
|
151989
152141
|
enqueuedAt: this.now(),
|
|
151990
|
-
resolve:
|
|
152142
|
+
resolve: resolve33,
|
|
151991
152143
|
reject
|
|
151992
152144
|
};
|
|
151993
152145
|
if (workClass === "realtime" && this.choreHoldsSlot) {
|
|
@@ -152355,12 +152507,12 @@ var CooperativePassScheduler = class {
|
|
|
152355
152507
|
this.networkTransferClosing = false;
|
|
152356
152508
|
this.networkTransferCount = 1;
|
|
152357
152509
|
this.networkTransferCompletionCount = 1;
|
|
152358
|
-
const applyReleased = new Promise((
|
|
152359
|
-
this.resolveNetworkTransferApplyRelease =
|
|
152510
|
+
const applyReleased = new Promise((resolve33) => {
|
|
152511
|
+
this.resolveNetworkTransferApplyRelease = resolve33;
|
|
152360
152512
|
});
|
|
152361
152513
|
this.networkTransferApplyRelease = applyReleased;
|
|
152362
|
-
const released = new Promise((
|
|
152363
|
-
this.resolveNetworkTransferRelease =
|
|
152514
|
+
const released = new Promise((resolve33) => {
|
|
152515
|
+
this.resolveNetworkTransferRelease = resolve33;
|
|
152364
152516
|
});
|
|
152365
152517
|
this.networkTransferRelease = released;
|
|
152366
152518
|
this.handoffDeferredAt = this.now();
|
|
@@ -152484,38 +152636,38 @@ var CooperativePassScheduler = class {
|
|
|
152484
152636
|
this.networkTransferCompletionCount -= 1;
|
|
152485
152637
|
if (this.networkTransferCompletionCount > 0)
|
|
152486
152638
|
return;
|
|
152487
|
-
const
|
|
152639
|
+
const resolve33 = this.resolveNetworkTransferApplyRelease;
|
|
152488
152640
|
this.resolveNetworkTransferApplyRelease = null;
|
|
152489
152641
|
this.networkTransferApplyRelease = null;
|
|
152490
|
-
|
|
152642
|
+
resolve33?.();
|
|
152491
152643
|
}
|
|
152492
152644
|
waitNetworkTransferChange(seenEpoch) {
|
|
152493
152645
|
if (this.networkTransferEpoch !== seenEpoch)
|
|
152494
152646
|
return Promise.resolve();
|
|
152495
|
-
return new Promise((
|
|
152496
|
-
this.networkTransferWaiters.push(
|
|
152647
|
+
return new Promise((resolve33) => {
|
|
152648
|
+
this.networkTransferWaiters.push(resolve33);
|
|
152497
152649
|
});
|
|
152498
152650
|
}
|
|
152499
152651
|
notifyNetworkTransferChange() {
|
|
152500
152652
|
this.networkTransferEpoch += 1;
|
|
152501
152653
|
const waiters = this.networkTransferWaiters;
|
|
152502
152654
|
this.networkTransferWaiters = [];
|
|
152503
|
-
for (const
|
|
152504
|
-
|
|
152655
|
+
for (const resolve33 of waiters)
|
|
152656
|
+
resolve33();
|
|
152505
152657
|
}
|
|
152506
152658
|
waitOccupantChange(seenEpoch) {
|
|
152507
152659
|
if (this.occupantEpoch !== seenEpoch)
|
|
152508
152660
|
return Promise.resolve();
|
|
152509
|
-
return new Promise((
|
|
152510
|
-
this.occupantWaiters.push(
|
|
152661
|
+
return new Promise((resolve33) => {
|
|
152662
|
+
this.occupantWaiters.push(resolve33);
|
|
152511
152663
|
});
|
|
152512
152664
|
}
|
|
152513
152665
|
notifyOccupantChange() {
|
|
152514
152666
|
this.occupantEpoch += 1;
|
|
152515
152667
|
const waiters = this.occupantWaiters;
|
|
152516
152668
|
this.occupantWaiters = [];
|
|
152517
|
-
for (const
|
|
152518
|
-
|
|
152669
|
+
for (const resolve33 of waiters)
|
|
152670
|
+
resolve33();
|
|
152519
152671
|
}
|
|
152520
152672
|
/** Run one realtime execute without aborting it and without taking the chore slot. */
|
|
152521
152673
|
startRealtimeOccupant(entry) {
|
|
@@ -153146,7 +153298,7 @@ async function runOneShotWithOperationLock(argv, parsed, deps, runtime) {
|
|
|
153146
153298
|
}
|
|
153147
153299
|
}
|
|
153148
153300
|
async function runWatchLoop(argv, parsed, deps, runtime) {
|
|
153149
|
-
const sleep7 = deps.sleep ?? ((ms) => new Promise((
|
|
153301
|
+
const sleep7 = deps.sleep ?? ((ms) => new Promise((resolve33) => setTimeout(resolve33, ms)));
|
|
153150
153302
|
const stdout = deps.stdout ?? process.stdout;
|
|
153151
153303
|
const idleHeartbeatIntervalMs = deps.idleHeartbeatIntervalMs ?? WATCH_IDLE_HEARTBEAT_INTERVAL_MS;
|
|
153152
153304
|
const writeMaintenanceProgress = () => {
|
|
@@ -153239,11 +153391,11 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
|
|
|
153239
153391
|
return work.then(() => void 0);
|
|
153240
153392
|
}
|
|
153241
153393
|
let timeout;
|
|
153242
|
-
const deadline = new Promise((
|
|
153394
|
+
const deadline = new Promise((resolve33) => {
|
|
153243
153395
|
timeout = setTimeout(() => {
|
|
153244
153396
|
process.stderr.write(`${abandonMessage}
|
|
153245
153397
|
`);
|
|
153246
|
-
|
|
153398
|
+
resolve33();
|
|
153247
153399
|
}, Math.max(0, deadlineMs - Date.now()));
|
|
153248
153400
|
});
|
|
153249
153401
|
return Promise.race([work.then(() => void 0), deadline]).finally(() => {
|
|
@@ -153320,11 +153472,11 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
|
|
|
153320
153472
|
actualHash = `sha256:${hashSymlinkTarget(await fs67.promises.readlink(absolutePath))}`;
|
|
153321
153473
|
} else if (stat5.isFile()) {
|
|
153322
153474
|
const digest3 = createHash39("sha256");
|
|
153323
|
-
await new Promise((
|
|
153475
|
+
await new Promise((resolve33, reject) => {
|
|
153324
153476
|
const input2 = fs67.createReadStream(absolutePath);
|
|
153325
153477
|
input2.on("data", (chunk) => digest3.update(chunk));
|
|
153326
153478
|
input2.once("error", reject);
|
|
153327
|
-
input2.once("end",
|
|
153479
|
+
input2.once("end", resolve33);
|
|
153328
153480
|
});
|
|
153329
153481
|
actualHash = `sha256:${digest3.digest("hex")}`;
|
|
153330
153482
|
} else {
|
|
@@ -153384,15 +153536,15 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
|
|
|
153384
153536
|
operationLockUsers -= 1;
|
|
153385
153537
|
if (operationLockUsers !== 0)
|
|
153386
153538
|
return;
|
|
153387
|
-
const
|
|
153539
|
+
const resolve33 = resolveNoOperationLockUsers;
|
|
153388
153540
|
resolveNoOperationLockUsers = null;
|
|
153389
|
-
|
|
153541
|
+
resolve33?.();
|
|
153390
153542
|
};
|
|
153391
153543
|
const waitForOperationLockUsers = () => {
|
|
153392
153544
|
if (operationLockUsers === 0)
|
|
153393
153545
|
return null;
|
|
153394
|
-
return new Promise((
|
|
153395
|
-
resolveNoOperationLockUsers =
|
|
153546
|
+
return new Promise((resolve33) => {
|
|
153547
|
+
resolveNoOperationLockUsers = resolve33;
|
|
153396
153548
|
});
|
|
153397
153549
|
};
|
|
153398
153550
|
const flagSource = createHqFlagsCapSource({
|
|
@@ -153672,8 +153824,8 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
|
|
|
153672
153824
|
};
|
|
153673
153825
|
let stopped = false;
|
|
153674
153826
|
let resolveStopped = null;
|
|
153675
|
-
const stoppedSignal = new Promise((
|
|
153676
|
-
resolveStopped =
|
|
153827
|
+
const stoppedSignal = new Promise((resolve33) => {
|
|
153828
|
+
resolveStopped = resolve33;
|
|
153677
153829
|
});
|
|
153678
153830
|
let interruptGeneration = 0;
|
|
153679
153831
|
let observedInterruptGeneration = 0;
|
|
@@ -153682,9 +153834,9 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
|
|
|
153682
153834
|
if (stopped)
|
|
153683
153835
|
return;
|
|
153684
153836
|
interruptGeneration += 1;
|
|
153685
|
-
const
|
|
153837
|
+
const resolve33 = resolveInterruptWait;
|
|
153686
153838
|
resolveInterruptWait = null;
|
|
153687
|
-
|
|
153839
|
+
resolve33?.();
|
|
153688
153840
|
};
|
|
153689
153841
|
let reportWatcherLiveness = () => void 0;
|
|
153690
153842
|
const waitForNextPass = async (delayMs) => {
|
|
@@ -153700,11 +153852,11 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
|
|
|
153700
153852
|
try {
|
|
153701
153853
|
await Promise.race([
|
|
153702
153854
|
sleep7(delayMs),
|
|
153703
|
-
new Promise((
|
|
153704
|
-
resolveInterruptWait =
|
|
153855
|
+
new Promise((resolve33) => {
|
|
153856
|
+
resolveInterruptWait = resolve33;
|
|
153705
153857
|
if (interruptGeneration !== observedInterruptGeneration) {
|
|
153706
153858
|
resolveInterruptWait = null;
|
|
153707
|
-
|
|
153859
|
+
resolve33();
|
|
153708
153860
|
}
|
|
153709
153861
|
}),
|
|
153710
153862
|
stoppedSignal
|
|
@@ -154815,7 +154967,7 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
|
|
|
154815
154967
|
persistedKeys.add(key);
|
|
154816
154968
|
}
|
|
154817
154969
|
if (offset + maxDeltaRows < changedEntries.length) {
|
|
154818
|
-
await new Promise((
|
|
154970
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
154819
154971
|
}
|
|
154820
154972
|
}
|
|
154821
154973
|
for (const [index, values] of snapshots) {
|
|
@@ -154868,7 +155020,7 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
|
|
|
154868
155020
|
if (rowsSinceYield < 128)
|
|
154869
155021
|
return;
|
|
154870
155022
|
rowsSinceYield = 0;
|
|
154871
|
-
await new Promise((
|
|
155023
|
+
await new Promise((resolve33) => setImmediate(resolve33));
|
|
154872
155024
|
};
|
|
154873
155025
|
for (const slug of journalSlugs) {
|
|
154874
155026
|
if (slug === "personal" && vaultJournalPresent)
|
|
@@ -156689,7 +156841,7 @@ async function runWatchLoop(argv, parsed, deps, runtime) {
|
|
|
156689
156841
|
}
|
|
156690
156842
|
}
|
|
156691
156843
|
|
|
156692
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
156844
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner-auth-wait.js
|
|
156693
156845
|
var AUTH_WAIT_INITIAL_RECHECK_MS = 6e4;
|
|
156694
156846
|
var AUTH_WAIT_STEADY_RECHECK_MS = 5 * 6e4;
|
|
156695
156847
|
var AUTH_WAIT_LIVENESS_INTERVAL_MS = 30 * 6e4;
|
|
@@ -156762,7 +156914,7 @@ async function waitForValidAuth(opts) {
|
|
|
156762
156914
|
return "stopped";
|
|
156763
156915
|
}
|
|
156764
156916
|
|
|
156765
|
-
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.
|
|
156917
|
+
// node_modules/.pnpm/@indigoai-us+hq-cloud@6.18.67/node_modules/@indigoai-us/hq-cloud/dist/bin/sync-runner.js
|
|
156766
156918
|
var SESSION_LOG_CAPTURE_QUIET_FOR_MS = 10 * 6e4;
|
|
156767
156919
|
var SESSION_LOG_CAPTURE_MAX_STALENESS_MS = 60 * 6e4;
|
|
156768
156920
|
var DEFAULT_COGNITO = {
|
|
@@ -156788,8 +156940,8 @@ function resolveTelemetryTimeoutMs(override) {
|
|
|
156788
156940
|
}
|
|
156789
156941
|
async function awaitTelemetryWithTimeout(telemetry, timeoutMs, onTimeout) {
|
|
156790
156942
|
let timeout;
|
|
156791
|
-
const timeoutPromise = new Promise((
|
|
156792
|
-
timeout = setTimeout(() =>
|
|
156943
|
+
const timeoutPromise = new Promise((resolve33) => {
|
|
156944
|
+
timeout = setTimeout(() => resolve33("timeout"), timeoutMs);
|
|
156793
156945
|
timeout.unref?.();
|
|
156794
156946
|
});
|
|
156795
156947
|
const result = await Promise.race([
|
|
@@ -156872,7 +157024,7 @@ async function listMembershipsWithRetry(client) {
|
|
|
156872
157024
|
for (let attempt = 0; attempt < 3; attempt++) {
|
|
156873
157025
|
if (attempt > 0) {
|
|
156874
157026
|
const delayMs = MEMBERSHIPS_RETRY_BACKOFFS_MS[attempt - 1] ?? 100;
|
|
156875
|
-
await new Promise((
|
|
157027
|
+
await new Promise((resolve33) => setTimeout(resolve33, delayMs));
|
|
156876
157028
|
}
|
|
156877
157029
|
try {
|
|
156878
157030
|
return await client.listMyMemberships();
|
|
@@ -158418,7 +158570,7 @@ async function runRunnerWithLoop(argv, deps = {}) {
|
|
|
158418
158570
|
...runtime,
|
|
158419
158571
|
runPassWithOperationLockAlreadyHeld: (passArgv, checkpoint, onJournalsReady, onAppliedUpserts, transferPriority, qmdSignal, qmdHeartbeat, qmdHeartbeatIntervalMs, onAppliedDeletes) => runPassWithOperationLockAlreadyHeld(passArgv, WATCH_FANOUT_HEARTBEAT_INTERVAL_MS, checkpoint, onJournalsReady, onAppliedUpserts, transferPriority, true, qmdSignal, qmdHeartbeat, qmdHeartbeatIntervalMs, onAppliedDeletes)
|
|
158420
158572
|
};
|
|
158421
|
-
const sleep7 = deps.sleep ?? ((ms) => new Promise((
|
|
158573
|
+
const sleep7 = deps.sleep ?? ((ms) => new Promise((resolve33) => setTimeout(resolve33, ms)));
|
|
158422
158574
|
const getAccessToken = deps.getAccessToken ?? runtime.defaultGetAccessToken;
|
|
158423
158575
|
const authWaitLog = deps.authWaitLog ?? ((line) => {
|
|
158424
158576
|
process.stderr.write(`${line}
|
|
@@ -158445,8 +158597,8 @@ async function runRunnerWithLoop(argv, deps = {}) {
|
|
|
158445
158597
|
let finalStatusWritten = false;
|
|
158446
158598
|
let innerShutdown = null;
|
|
158447
158599
|
let resolveStoppedWait = null;
|
|
158448
|
-
const stoppedSignal = new Promise((
|
|
158449
|
-
resolveStoppedWait =
|
|
158600
|
+
const stoppedSignal = new Promise((resolve33) => {
|
|
158601
|
+
resolveStoppedWait = resolve33;
|
|
158450
158602
|
});
|
|
158451
158603
|
const markStopped = () => {
|
|
158452
158604
|
stopped = true;
|