@brucewaynedecoy/make-docs 2.0.8 → 2.0.9
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/dist/{backup-BLN6XCAS.js → backup-EBZZZL74.js} +4 -4
- package/dist/{chunk-MUQ2KL22.js → chunk-2Z7KRD4H.js} +2 -2
- package/dist/{chunk-XGTKLLI3.js → chunk-5XKMSGMS.js} +428 -29
- package/dist/{chunk-XGTKLLI3.js.map → chunk-5XKMSGMS.js.map} +1 -1
- package/dist/{chunk-G5BT3GGK.js → chunk-ABKEBYCF.js} +3 -3
- package/dist/{chunk-I3BO4LEF.js → chunk-DZ3SA3JA.js} +18 -5
- package/dist/{chunk-I3BO4LEF.js.map → chunk-DZ3SA3JA.js.map} +1 -1
- package/dist/{chunk-ILII44MP.js → chunk-HZ4QLB7L.js} +3 -3
- package/dist/{chunk-4OMXLXXY.js → chunk-KKXJTVMH.js} +3 -3
- package/dist/{chunk-L7UI56GS.js → chunk-MESLJI5A.js} +2 -2
- package/dist/{chunk-ANZ4AJG7.js → chunk-USVCSYS5.js} +2 -2
- package/dist/{chunk-EZ7FEZTG.js → chunk-VCC4D5I3.js} +2 -2
- package/dist/{chunk-GMIVJ7MS.js → chunk-X6TAWRTO.js} +147 -127
- package/dist/chunk-X6TAWRTO.js.map +1 -0
- package/dist/index.js +41 -24
- package/dist/index.js.map +1 -1
- package/dist/{registry-7TE6OMSU.js → registry-XNCQALXP.js} +7 -7
- package/dist/{self-DIK2M5CA.js → self-LDLIIKFW.js} +7 -7
- package/dist/{server-IEI2UXRK.js → server-G2UO2NOT.js} +10 -10
- package/dist/{server-IEI2UXRK.js.map → server-G2UO2NOT.js.map} +1 -1
- package/dist/{setup-system-SPZE6PYP.js → setup-system-2MZMQ3MX.js} +7 -7
- package/dist/{skills-command-ZPQG23OM.js → skills-command-VE4GRWI2.js} +53 -17
- package/dist/skills-command-VE4GRWI2.js.map +1 -0
- package/dist/{uninstall-BMDNLD6L.js → uninstall-EJF6HCYI.js} +7 -7
- package/dist/virtual_make-docs-first-party-skills-CLTQEIKC.js +11 -0
- package/dist/virtual_make-docs-first-party-skills-CLTQEIKC.js.map +1 -0
- package/package.json +1 -1
- package/template/.make-docs/system/contracts/design-contract.md +1 -1
- package/template/.make-docs/system/contracts/output-contract.md +3 -2
- package/template/.make-docs/system/prompts/designs-to-plan-change.prompt.md +2 -2
- package/template/.make-docs/system/prompts/prd-change-to-work.prompt.md +2 -2
- package/template/.make-docs/system/references/execution-workflow.md +5 -5
- package/template/.make-docs/system/references/lifecycle.md +3 -0
- package/template/.make-docs/system/references/planning-workflow.md +8 -8
- package/template/.make-docs/system/references/prd-change-management.md +2 -2
- package/template/.make-docs/system/references/wave-model.md +126 -14
- package/template/.make-docs/system/templates/plan-overview.md +17 -2
- package/template/.make-docs/system/templates/plan-prd-change.md +21 -6
- package/template/.make-docs/system/templates/plan-prd-decompose.md +17 -2
- package/template/.make-docs/system/templates/plan-prd.md +17 -2
- package/template/.make-docs/system/templates/work-index.md +15 -0
- package/template/.make-docs/system/templates/work-phase.md +3 -0
- package/template/docs/plans/AGENTS.md +1 -1
- package/template/docs/plans/CLAUDE.md +1 -1
- package/template/docs/work/AGENTS.md +1 -0
- package/template/docs/work/CLAUDE.md +1 -0
- package/dist/chunk-GMIVJ7MS.js.map +0 -1
- package/dist/skills-command-ZPQG23OM.js.map +0 -1
- package/dist/virtual_make-docs-first-party-skills-BGO3TGHN.js +0 -11
- package/dist/virtual_make-docs-first-party-skills-BGO3TGHN.js.map +0 -1
- /package/dist/{backup-BLN6XCAS.js.map → backup-EBZZZL74.js.map} +0 -0
- /package/dist/{chunk-MUQ2KL22.js.map → chunk-2Z7KRD4H.js.map} +0 -0
- /package/dist/{chunk-G5BT3GGK.js.map → chunk-ABKEBYCF.js.map} +0 -0
- /package/dist/{chunk-ILII44MP.js.map → chunk-HZ4QLB7L.js.map} +0 -0
- /package/dist/{chunk-4OMXLXXY.js.map → chunk-KKXJTVMH.js.map} +0 -0
- /package/dist/{chunk-L7UI56GS.js.map → chunk-MESLJI5A.js.map} +0 -0
- /package/dist/{chunk-ANZ4AJG7.js.map → chunk-USVCSYS5.js.map} +0 -0
- /package/dist/{chunk-EZ7FEZTG.js.map → chunk-VCC4D5I3.js.map} +0 -0
- /package/dist/{registry-7TE6OMSU.js.map → registry-XNCQALXP.js.map} +0 -0
- /package/dist/{self-DIK2M5CA.js.map → self-LDLIIKFW.js.map} +0 -0
- /package/dist/{setup-system-SPZE6PYP.js.map → setup-system-2MZMQ3MX.js.map} +0 -0
- /package/dist/{uninstall-BMDNLD6L.js.map → uninstall-EJF6HCYI.js.map} +0 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
isRedactedMcpNativeValue,
|
|
7
7
|
redactMcpNativeValue,
|
|
8
8
|
validateHarnessMethodSelection
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-2Z7KRD4H.js";
|
|
10
10
|
import {
|
|
11
11
|
CURRENT_STORE_SCHEMA_VERSION,
|
|
12
12
|
GLOBAL_CONFIG_FILE,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
resolveStoreRoot,
|
|
33
33
|
validateInstallationStoreRoot,
|
|
34
34
|
withInstallationDatabase
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-X6TAWRTO.js";
|
|
36
36
|
|
|
37
37
|
// src/operations/types.ts
|
|
38
38
|
var OperationError = class extends Error {
|
|
@@ -1651,4 +1651,4 @@ export {
|
|
|
1651
1651
|
completeHarnessSystemOperation,
|
|
1652
1652
|
failHarnessSystemOperation
|
|
1653
1653
|
};
|
|
1654
|
-
//# sourceMappingURL=chunk-
|
|
1654
|
+
//# sourceMappingURL=chunk-HZ4QLB7L.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
createAuditReport
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-USVCSYS5.js";
|
|
5
5
|
import {
|
|
6
6
|
MANIFEST_RELATIVE_PATH,
|
|
7
7
|
acquireInstallationLock,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
relativePathToTarget,
|
|
21
21
|
releaseInstallationLock,
|
|
22
22
|
validateAndMigrateManifest
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-X6TAWRTO.js";
|
|
24
24
|
|
|
25
25
|
// src/store/legacy-installation.ts
|
|
26
26
|
import { createHash } from "crypto";
|
|
@@ -876,4 +876,4 @@ export {
|
|
|
876
876
|
scopeCompatibilityToInstallPlan,
|
|
877
877
|
formatCompatibilityClassification
|
|
878
878
|
};
|
|
879
|
-
//# sourceMappingURL=chunk-
|
|
879
|
+
//# sourceMappingURL=chunk-KKXJTVMH.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
CAPABILITIES,
|
|
4
4
|
HARNESSES,
|
|
5
5
|
cloneSelections
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-X6TAWRTO.js";
|
|
7
7
|
|
|
8
8
|
// src/setup-state.ts
|
|
9
9
|
var COMPLETE_PROJECT_CAPABILITIES = CAPABILITIES;
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
resolveUnifiedSetupState,
|
|
37
37
|
describeHarnessSupport
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-MESLJI5A.js.map
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
readTextFile,
|
|
28
28
|
relativePathToTarget,
|
|
29
29
|
resolveInstallProfile
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-X6TAWRTO.js";
|
|
31
31
|
|
|
32
32
|
// src/backup-paths.ts
|
|
33
33
|
import path from "path";
|
|
@@ -1301,4 +1301,4 @@ export {
|
|
|
1301
1301
|
isWithinRoot,
|
|
1302
1302
|
createAuditReport
|
|
1303
1303
|
};
|
|
1304
|
-
//# sourceMappingURL=chunk-
|
|
1304
|
+
//# sourceMappingURL=chunk-USVCSYS5.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
preparePlannedFileChange,
|
|
5
5
|
recordPlannedFileChange,
|
|
6
6
|
relativePathToTarget
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-X6TAWRTO.js";
|
|
8
8
|
|
|
9
9
|
// src/installation-files.ts
|
|
10
10
|
import { lstatSync, readdirSync, rmdirSync, unlinkSync } from "fs";
|
|
@@ -201,4 +201,4 @@ export {
|
|
|
201
201
|
assertLifecyclePlanSnapshotCurrent,
|
|
202
202
|
createLifecycleMutationReceipt
|
|
203
203
|
};
|
|
204
|
-
//# sourceMappingURL=chunk-
|
|
204
|
+
//# sourceMappingURL=chunk-VCC4D5I3.js.map
|
|
@@ -7056,6 +7056,12 @@ function systemCode(error) {
|
|
|
7056
7056
|
const code = error?.code;
|
|
7057
7057
|
return typeof code === "string" ? code : void 0;
|
|
7058
7058
|
}
|
|
7059
|
+
function isTransientWindowsAccessError(code) {
|
|
7060
|
+
return platform.kind === "win32" && (/* @__PURE__ */ new Set(["EPERM", "EACCES", "EBUSY"])).has(code ?? "");
|
|
7061
|
+
}
|
|
7062
|
+
function isTransientWindowsStoreIssue(error) {
|
|
7063
|
+
return error instanceof StoreUnavailableError && !(/* @__PURE__ */ new Set(["unsafe-path", "owner-unverified", "contention-timeout"])).has(error.issue.code) && isTransientWindowsAccessError(error.issue.systemCode);
|
|
7064
|
+
}
|
|
7059
7065
|
function readStoreEntry(file, operation) {
|
|
7060
7066
|
try {
|
|
7061
7067
|
return lstatSync2(file, { throwIfNoEntry: false }) ?? null;
|
|
@@ -7316,7 +7322,7 @@ function waitForStoreAccessToDrain(storeRoot, timeoutMs = STORE_OWNER_WAIT_MS) {
|
|
|
7316
7322
|
result = recoverDeadStoreAccessSessions(storeRoot);
|
|
7317
7323
|
} catch (error) {
|
|
7318
7324
|
const code = error instanceof StoreUnavailableError ? error.issue.systemCode : systemCode(error);
|
|
7319
|
-
if (
|
|
7325
|
+
if (isTransientWindowsAccessError(code) && Date.now() < deadline) {
|
|
7320
7326
|
pause(attempt++, deadline);
|
|
7321
7327
|
continue;
|
|
7322
7328
|
}
|
|
@@ -7360,157 +7366,171 @@ function acquireStoreAccess(storeRoot, preparing = false, timeoutMs = STORE_OWNE
|
|
|
7360
7366
|
const deadline = started + timeoutMs;
|
|
7361
7367
|
let attempt = 0;
|
|
7362
7368
|
while (true) {
|
|
7363
|
-
for (const suffix of ["store.db", "store.db-wal", "store.db-shm", STORE_ACCESS_PATH, "removal.lock", "installation-bootstrap.lock", "installation-lease-recovery.lock"]) {
|
|
7364
|
-
assertSafeStoreEntry(path3.join(storeRoot, suffix), "open Store session");
|
|
7365
|
-
}
|
|
7366
7369
|
try {
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
throw new StoreUnavailableError(makeStoreIssue("io-error", storeRoot, "create", error));
|
|
7370
|
-
}
|
|
7371
|
-
const blocker = exclusiveBlocker(storeRoot, preparing);
|
|
7372
|
-
if (blocker) {
|
|
7373
|
-
if (blocker.pid === process.pid && blocker.hostname === platform.hostname) {
|
|
7374
|
-
throw new StoreUnavailableError({ code: "contention-timeout", path: blocker.file, operation: "open a Store session", retryable: false, attempts: attempt + 1, waitedMs: Date.now() - started, cause: "This process already owns the exclusive Store lock." });
|
|
7370
|
+
for (const suffix of ["store.db", "store.db-wal", "store.db-shm", STORE_ACCESS_PATH, "removal.lock", "installation-bootstrap.lock", "installation-lease-recovery.lock"]) {
|
|
7371
|
+
assertSafeStoreEntry(path3.join(storeRoot, suffix), "open Store session");
|
|
7375
7372
|
}
|
|
7376
|
-
|
|
7377
|
-
|
|
7373
|
+
try {
|
|
7374
|
+
mkdirSync(storeRoot, { recursive: true, mode: 448 });
|
|
7375
|
+
} catch (error) {
|
|
7376
|
+
throw new StoreUnavailableError(makeStoreIssue("io-error", storeRoot, "create", error));
|
|
7378
7377
|
}
|
|
7379
|
-
|
|
7380
|
-
|
|
7378
|
+
const blocker = exclusiveBlocker(storeRoot, preparing);
|
|
7379
|
+
if (blocker) {
|
|
7380
|
+
if (blocker.pid === process.pid && blocker.hostname === platform.hostname) {
|
|
7381
|
+
throw new StoreUnavailableError({ code: "contention-timeout", path: blocker.file, operation: "open a Store session", retryable: false, attempts: attempt + 1, waitedMs: Date.now() - started, cause: "This process already owns the exclusive Store lock." });
|
|
7382
|
+
}
|
|
7383
|
+
if (ownerState(blocker) !== "alive") {
|
|
7384
|
+
throw new StoreUnavailableError(makeStoreIssue("owner-unverified", blocker.file, "wait for Store maintenance", new Error("A stopped maintenance owner requires lease recovery.")));
|
|
7385
|
+
}
|
|
7386
|
+
if (Date.now() >= deadline) {
|
|
7387
|
+
throw new StoreUnavailableError({ code: "contention-timeout", path: blocker.file, operation: "wait for Store maintenance", retryable: true, attempts: attempt + 1, waitedMs: Date.now() - started, cause: `Process ${blocker.pid} is still active.` });
|
|
7388
|
+
}
|
|
7389
|
+
pause(attempt++, deadline);
|
|
7390
|
+
continue;
|
|
7381
7391
|
}
|
|
7382
|
-
|
|
7383
|
-
|
|
7384
|
-
|
|
7385
|
-
|
|
7386
|
-
|
|
7387
|
-
|
|
7388
|
-
|
|
7389
|
-
|
|
7390
|
-
|
|
7391
|
-
|
|
7392
|
+
const directory = path3.join(storeRoot, STORE_ACCESS_PATH);
|
|
7393
|
+
const existing = readStoreEntry(directory, "open Store session");
|
|
7394
|
+
if (existing?.isFile()) {
|
|
7395
|
+
const legacy = readOwnerLease(directory, "open legacy Store session");
|
|
7396
|
+
if (!legacy) continue;
|
|
7397
|
+
if (ownerState(legacy) === "dead") {
|
|
7398
|
+
unlinkLeaseIfUnchanged(legacy);
|
|
7399
|
+
continue;
|
|
7400
|
+
}
|
|
7401
|
+
if (Date.now() >= deadline) {
|
|
7402
|
+
throw new StoreUnavailableError({ code: "contention-timeout", path: directory, operation: "wait for legacy Store session", retryable: true, attempts: attempt + 1, waitedMs: Date.now() - started, cause: `Process ${legacy.pid} is still active.` });
|
|
7403
|
+
}
|
|
7404
|
+
pause(attempt++, deadline);
|
|
7392
7405
|
continue;
|
|
7393
7406
|
}
|
|
7394
|
-
if (
|
|
7395
|
-
throw new StoreUnavailableError(
|
|
7407
|
+
if (existing && !existing.isDirectory()) {
|
|
7408
|
+
throw new StoreUnavailableError(makeStoreIssue("unsafe-path", directory, "open Store session", new Error("The Store access path is not a directory.")));
|
|
7409
|
+
}
|
|
7410
|
+
if (existing?.isDirectory()) {
|
|
7411
|
+
try {
|
|
7412
|
+
recoverDeadStoreAccessSessions(storeRoot);
|
|
7413
|
+
} catch (error) {
|
|
7414
|
+
const code = error instanceof StoreUnavailableError ? error.issue.systemCode : systemCode(error);
|
|
7415
|
+
if (isTransientWindowsAccessError(code) && Date.now() < deadline) {
|
|
7416
|
+
pause(attempt++, deadline);
|
|
7417
|
+
continue;
|
|
7418
|
+
}
|
|
7419
|
+
throw error;
|
|
7420
|
+
}
|
|
7396
7421
|
}
|
|
7397
|
-
pause(attempt++, deadline);
|
|
7398
|
-
continue;
|
|
7399
|
-
}
|
|
7400
|
-
if (existing && !existing.isDirectory()) {
|
|
7401
|
-
throw new StoreUnavailableError(makeStoreIssue("unsafe-path", directory, "open Store session", new Error("The Store access path is not a directory.")));
|
|
7402
|
-
}
|
|
7403
|
-
if (existing?.isDirectory()) {
|
|
7404
7422
|
try {
|
|
7405
|
-
|
|
7423
|
+
mkdirSync(directory, { mode: 448 });
|
|
7406
7424
|
} catch (error) {
|
|
7407
|
-
|
|
7408
|
-
if (platform.kind === "win32" && (/* @__PURE__ */ new Set(["EPERM", "EACCES", "EBUSY"])).has(code ?? "") && Date.now() < deadline) {
|
|
7425
|
+
if (isTransientWindowsAccessError(systemCode(error)) && Date.now() < deadline) {
|
|
7409
7426
|
pause(attempt++, deadline);
|
|
7410
7427
|
continue;
|
|
7411
7428
|
}
|
|
7412
|
-
throw error;
|
|
7429
|
+
if (systemCode(error) !== "EEXIST") throw new StoreUnavailableError(makeStoreIssue("io-error", directory, "create session directory", error));
|
|
7413
7430
|
}
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
if (
|
|
7431
|
+
let directoryFd = null;
|
|
7432
|
+
try {
|
|
7433
|
+
directoryFd = openSync2(directory, constants2.O_RDONLY | constants2.O_DIRECTORY | constants2.O_NOFOLLOW);
|
|
7434
|
+
const opened = fstatSync2(directoryFd);
|
|
7435
|
+
const named = readStoreEntry(directory, "verify session directory");
|
|
7436
|
+
if (!named) {
|
|
7437
|
+
if (Date.now() < deadline) {
|
|
7438
|
+
pause(attempt++, deadline);
|
|
7439
|
+
continue;
|
|
7440
|
+
}
|
|
7441
|
+
throw Object.assign(new Error("The Store session directory disappeared."), { code: "ENOENT" });
|
|
7442
|
+
}
|
|
7443
|
+
if (named.isSymbolicLink() || !named.isDirectory()) {
|
|
7444
|
+
throw new StoreUnavailableError(makeStoreIssue("unsafe-path", directory, "verify session directory", new Error("The Store session path is not a safe directory.")));
|
|
7445
|
+
}
|
|
7446
|
+
if (!platform.sameFileObject(opened, named, "directory")) {
|
|
7447
|
+
if (Date.now() < deadline) {
|
|
7448
|
+
pause(attempt++, deadline);
|
|
7449
|
+
continue;
|
|
7450
|
+
}
|
|
7451
|
+
throw new StoreUnavailableError(makeStoreIssue("owner-unverified", directory, "verify session directory", new Error("The Store session directory changed during admission.")));
|
|
7452
|
+
}
|
|
7453
|
+
platform.applyPrivateMode(directoryFd, 448);
|
|
7454
|
+
} catch (error) {
|
|
7455
|
+
if (error instanceof StoreUnavailableError) throw error;
|
|
7456
|
+
const code = systemCode(error);
|
|
7457
|
+
if ((code === "ENOENT" || isTransientWindowsAccessError(code)) && Date.now() < deadline) {
|
|
7427
7458
|
pause(attempt++, deadline);
|
|
7428
7459
|
continue;
|
|
7429
7460
|
}
|
|
7430
|
-
throw
|
|
7431
|
-
}
|
|
7432
|
-
|
|
7433
|
-
throw new StoreUnavailableError(makeStoreIssue("unsafe-path", directory, "verify session directory", new Error("The Store session path is not a safe directory.")));
|
|
7461
|
+
throw new StoreUnavailableError(makeStoreIssue(code === "ELOOP" ? "unsafe-path" : "io-error", directory, "secure session directory", error));
|
|
7462
|
+
} finally {
|
|
7463
|
+
if (directoryFd !== null) closeSync2(directoryFd);
|
|
7434
7464
|
}
|
|
7435
|
-
|
|
7436
|
-
|
|
7465
|
+
const token = randomUUID();
|
|
7466
|
+
const file = path3.join(directory, `${token}.json`);
|
|
7467
|
+
const pendingFile = path3.join(directory, storeSessionPendingName(process.pid, platform.hostname, token));
|
|
7468
|
+
let fd = null;
|
|
7469
|
+
let leaseStat = null;
|
|
7470
|
+
let createdStat = null;
|
|
7471
|
+
try {
|
|
7472
|
+
fd = openSync2(pendingFile, constants2.O_CREAT | constants2.O_EXCL | constants2.O_WRONLY, 384);
|
|
7473
|
+
createdStat = fstatSync2(fd);
|
|
7474
|
+
platform.applyPrivateMode(fd, 384);
|
|
7475
|
+
writeFileSync(fd, JSON.stringify({ version: STORE_SESSION_VERSION, token, pid: process.pid, hostname: platform.hostname, startedAt: (/* @__PURE__ */ new Date()).toISOString() }));
|
|
7476
|
+
fsyncSync2(fd);
|
|
7477
|
+
leaseStat = fstatSync2(fd);
|
|
7478
|
+
platform.atomicReplace(pendingFile, file);
|
|
7479
|
+
const lateBlocker = exclusiveBlocker(storeRoot, preparing);
|
|
7480
|
+
if (lateBlocker) {
|
|
7481
|
+
closeSync2(fd);
|
|
7482
|
+
fd = null;
|
|
7483
|
+
removeOwnedSession(file, token, leaseStat, "cancel Store session");
|
|
7484
|
+
cleanupAccessDirectory(directory);
|
|
7485
|
+
if (lateBlocker.pid === process.pid && lateBlocker.hostname === platform.hostname) {
|
|
7486
|
+
throw new StoreUnavailableError({ code: "contention-timeout", path: lateBlocker.file, operation: "open a Store session", retryable: false, attempts: attempt + 1, waitedMs: Date.now() - started, cause: "This process already owns the exclusive Store lock." });
|
|
7487
|
+
}
|
|
7488
|
+
if (ownerState(lateBlocker) !== "alive") {
|
|
7489
|
+
throw new StoreUnavailableError(makeStoreIssue("owner-unverified", lateBlocker.file, "wait for Store maintenance", new Error("A stopped maintenance owner requires lease recovery.")));
|
|
7490
|
+
}
|
|
7491
|
+
if (Date.now() >= deadline) {
|
|
7492
|
+
throw new StoreUnavailableError({ code: "contention-timeout", path: lateBlocker.file, operation: "wait for Store maintenance", retryable: true, attempts: attempt + 1, waitedMs: Date.now() - started, cause: `Process ${lateBlocker.pid} is still active.` });
|
|
7493
|
+
}
|
|
7437
7494
|
pause(attempt++, deadline);
|
|
7438
7495
|
continue;
|
|
7439
7496
|
}
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
|
|
7446
|
-
|
|
7447
|
-
|
|
7448
|
-
|
|
7449
|
-
|
|
7450
|
-
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
platform.applyPrivateMode(fd, 384);
|
|
7462
|
-
writeFileSync(fd, JSON.stringify({ version: STORE_SESSION_VERSION, token, pid: process.pid, hostname: platform.hostname, startedAt: (/* @__PURE__ */ new Date()).toISOString() }));
|
|
7463
|
-
fsyncSync2(fd);
|
|
7464
|
-
leaseStat = fstatSync2(fd);
|
|
7465
|
-
platform.atomicReplace(pendingFile, file);
|
|
7466
|
-
const lateBlocker = exclusiveBlocker(storeRoot, preparing);
|
|
7467
|
-
if (lateBlocker) {
|
|
7468
|
-
closeSync2(fd);
|
|
7469
|
-
fd = null;
|
|
7470
|
-
removeOwnedSession(file, token, leaseStat, "cancel Store session");
|
|
7497
|
+
let released = false;
|
|
7498
|
+
const lease = { count: 1, release: () => {
|
|
7499
|
+
} };
|
|
7500
|
+
const release = () => {
|
|
7501
|
+
if (released || --lease.count > 0) return;
|
|
7502
|
+
released = true;
|
|
7503
|
+
accessLeases.delete(storeRoot);
|
|
7504
|
+
try {
|
|
7505
|
+
removeOwnedSession(file, token, leaseStat, "release Store session");
|
|
7506
|
+
cleanupAccessDirectory(directory);
|
|
7507
|
+
} finally {
|
|
7508
|
+
if (fd !== null) closeSync2(fd);
|
|
7509
|
+
}
|
|
7510
|
+
};
|
|
7511
|
+
lease.release = release;
|
|
7512
|
+
accessLeases.set(storeRoot, lease);
|
|
7513
|
+
return release;
|
|
7514
|
+
} catch (error) {
|
|
7515
|
+
if (fd !== null) closeSync2(fd);
|
|
7516
|
+
removeOwnedSession(file, token, leaseStat, "clean failed Store session");
|
|
7517
|
+
removePendingSession(pendingFile, leaseStat ?? createdStat);
|
|
7471
7518
|
cleanupAccessDirectory(directory);
|
|
7472
|
-
if (
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
if (
|
|
7476
|
-
|
|
7477
|
-
|
|
7478
|
-
if (Date.now() >= deadline) {
|
|
7479
|
-
throw new StoreUnavailableError({ code: "contention-timeout", path: lateBlocker.file, operation: "wait for Store maintenance", retryable: true, attempts: attempt + 1, waitedMs: Date.now() - started, cause: `Process ${lateBlocker.pid} is still active.` });
|
|
7519
|
+
if (error instanceof StoreUnavailableError) throw error;
|
|
7520
|
+
const code = systemCode(error);
|
|
7521
|
+
const retryableSessionOpenError = (/* @__PURE__ */ new Set(["ENOENT", "EEXIST", "ENOTEMPTY"])).has(code ?? "") || platform.kind === "darwin" && code === "EINVAL" || isTransientWindowsAccessError(code);
|
|
7522
|
+
if (retryableSessionOpenError && Date.now() < deadline) {
|
|
7523
|
+
pause(attempt++, deadline);
|
|
7524
|
+
continue;
|
|
7480
7525
|
}
|
|
7481
|
-
|
|
7482
|
-
continue;
|
|
7526
|
+
throw new StoreUnavailableError(makeStoreIssue("io-error", file, "open Store session", error, { attempts: attempt + 1, waitedMs: Date.now() - started }));
|
|
7483
7527
|
}
|
|
7484
|
-
let released = false;
|
|
7485
|
-
const lease = { count: 1, release: () => {
|
|
7486
|
-
} };
|
|
7487
|
-
const release = () => {
|
|
7488
|
-
if (released || --lease.count > 0) return;
|
|
7489
|
-
released = true;
|
|
7490
|
-
accessLeases.delete(storeRoot);
|
|
7491
|
-
try {
|
|
7492
|
-
removeOwnedSession(file, token, leaseStat, "release Store session");
|
|
7493
|
-
cleanupAccessDirectory(directory);
|
|
7494
|
-
} finally {
|
|
7495
|
-
if (fd !== null) closeSync2(fd);
|
|
7496
|
-
}
|
|
7497
|
-
};
|
|
7498
|
-
lease.release = release;
|
|
7499
|
-
accessLeases.set(storeRoot, lease);
|
|
7500
|
-
return release;
|
|
7501
7528
|
} catch (error) {
|
|
7502
|
-
if (
|
|
7503
|
-
removeOwnedSession(file, token, leaseStat, "clean failed Store session");
|
|
7504
|
-
removePendingSession(pendingFile, leaseStat);
|
|
7505
|
-
cleanupAccessDirectory(directory);
|
|
7506
|
-
if (error instanceof StoreUnavailableError) throw error;
|
|
7507
|
-
const code = systemCode(error);
|
|
7508
|
-
const retryableSessionOpenError = (/* @__PURE__ */ new Set(["ENOENT", "EEXIST", "ENOTEMPTY"])).has(code ?? "") || platform.kind === "darwin" && code === "EINVAL";
|
|
7509
|
-
if (retryableSessionOpenError && Date.now() < deadline) {
|
|
7529
|
+
if (isTransientWindowsStoreIssue(error) && Date.now() < deadline) {
|
|
7510
7530
|
pause(attempt++, deadline);
|
|
7511
7531
|
continue;
|
|
7512
7532
|
}
|
|
7513
|
-
throw
|
|
7533
|
+
throw error;
|
|
7514
7534
|
}
|
|
7515
7535
|
}
|
|
7516
7536
|
}
|
|
@@ -13182,7 +13202,7 @@ function validateEmbeddedSkillBundle(candidate) {
|
|
|
13182
13202
|
}
|
|
13183
13203
|
async function loadEmbeddedSkillBundle() {
|
|
13184
13204
|
try {
|
|
13185
|
-
const { bundle, sourceTestAdapter } = await import("./virtual_make-docs-first-party-skills-
|
|
13205
|
+
const { bundle, sourceTestAdapter } = await import("./virtual_make-docs-first-party-skills-CLTQEIKC.js");
|
|
13186
13206
|
validateEmbeddedSkillBundle(bundle);
|
|
13187
13207
|
const [registryBytes, packageBytes] = await Promise.all([
|
|
13188
13208
|
readFile(path11.join(PACKAGE_ROOT, "skill-registry.json")),
|
|
@@ -14202,4 +14222,4 @@ export {
|
|
|
14202
14222
|
getRecommendedSkillChoices,
|
|
14203
14223
|
applySkillRegistrySelectionMetadata
|
|
14204
14224
|
};
|
|
14205
|
-
//# sourceMappingURL=chunk-
|
|
14225
|
+
//# sourceMappingURL=chunk-X6TAWRTO.js.map
|