@gitroll/tacitt-cli 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/{agent-setup-BZbgLgHg.mjs → agent-setup-Dv_mQ38P.mjs} +1 -1
  2. package/dist/agent-setup-worker.mjs +4 -4
  3. package/dist/cli.mjs +4 -4
  4. package/dist/codex-title-worker.mjs +1 -1
  5. package/dist/configured-preview-worker.mjs +4 -4
  6. package/dist/configured-session-worker.mjs +4 -4
  7. package/dist/{heap-NDnGBXH6.mjs → heap-DY5n4EVC.mjs} +4 -3
  8. package/dist/inspection-worker.mjs +3 -3
  9. package/dist/{job-BO0a67HQ.mjs → job-BxUVFocm.mjs} +2 -2
  10. package/dist/{model-CmHypB0p.mjs → model-C1VzgKLi.mjs} +1 -1
  11. package/dist/operation-executor.mjs +2 -2
  12. package/dist/preview-worker.mjs +1 -1
  13. package/dist/{query-BZvNsP1u.mjs → query-Cm5lumS4.mjs} +136 -41
  14. package/dist/{run-DvRM-NR8.mjs → run-hQ_W2p_Y.mjs} +2 -2
  15. package/dist/{src-C1SjCDx0.mjs → src--Ln5GHdz.mjs} +23 -6
  16. package/dist/{src-CQeUBG2Y.mjs → src-BMSLVcgs.mjs} +1 -1
  17. package/dist/{src-xidy0yF7.mjs → src-CGFwLUd6.mjs} +3 -3
  18. package/dist/store-database-worker.mjs +1 -1
  19. package/dist/web/assets/index-CXm08nyc.js +69 -0
  20. package/dist/web/index.html +1 -1
  21. package/package.json +1 -1
  22. package/skills/tacitt/SKILL.md +2 -2
  23. package/skills/tacitt/references/commands.md +12 -12
  24. package/skills/tacitt/references/journey.md +2 -2
  25. package/skills/tacitt/references/send.md +1 -1
  26. package/skills/tacitt/scripts/INDEX.md +36 -36
  27. package/skills/tacitt/scripts/journey-scan-timing.mjs +5 -4
  28. package/skills/tacitt/scripts/journey-state.d.mts +9 -0
  29. package/skills/tacitt/scripts/journey-state.mjs +19 -2
  30. package/skills/tacitt/scripts/journey.d.mts +4 -0
  31. package/skills/tacitt/scripts/journey.mjs +4 -2
  32. package/skills/tacitt/scripts/review.mjs +6 -6
  33. package/dist/web/assets/index-D0j-mvf1.js +0 -69
@@ -1,5 +1,5 @@
1
1
  import "./locate-JYtFmKu-.mjs";
2
- import "./src-C1SjCDx0.mjs";
2
+ import "./src--Ln5GHdz.mjs";
3
3
  import { z } from "zod";
4
4
  import { Worker } from "node:worker_threads";
5
5
  //#region apps/cli/src/agent-setup/index.ts
@@ -1,8 +1,8 @@
1
- import { J as listAgentSetup } from "./src-CQeUBG2Y.mjs";
1
+ import { J as listAgentSetup } from "./src-BMSLVcgs.mjs";
2
2
  import { Dn as createStaticProcessor, dn as workspaceSchema, ln as sessionSchema } from "./locate-JYtFmKu-.mjs";
3
- import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-xidy0yF7.mjs";
4
- import { at as maximumAgentSetupSessions, ci as effectiveTreatmentSchema } from "./src-C1SjCDx0.mjs";
5
- import "./agent-setup-BZbgLgHg.mjs";
3
+ import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-CGFwLUd6.mjs";
4
+ import { at as maximumAgentSetupSessions, ui as effectiveTreatmentSchema } from "./src--Ln5GHdz.mjs";
5
+ import "./agent-setup-Dv_mQ38P.mjs";
6
6
  import { z } from "zod";
7
7
  import { parentPort, workerData } from "node:worker_threads";
8
8
  //#region apps/cli/src/agent-setup/worker.ts
package/dist/cli.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { _ as readStateDump, a as readAgentPresence, b as traceStartup, d as helpText, f as parseOptions, g as startupFailure, h as permissionDiagnostic, i as invoke, l as awaitingPassport, m as longCommands, n as readOperation, o as createRuntime, p as businessCommands, r as waitOperation, s as executorEventSchema, t as cancelOperation, u as createRenderActivity, v as createExecutionPort, y as startHost$1 } from "./query-BZvNsP1u.mjs";
3
- import { nt as makePrivateDirectory, rt as openPrivateFile } from "./src-CQeUBG2Y.mjs";
2
+ import { _ as readStateDump, a as readAgentPresence, b as traceStartup, d as helpText, f as parseOptions, g as startupFailure, h as permissionDiagnostic, i as invoke, l as awaitingPassport, m as longCommands, n as readOperation, o as createRuntime, p as businessCommands, r as waitOperation, s as executorEventSchema, t as cancelOperation, u as createRenderActivity, v as createExecutionPort, y as startHost$1 } from "./query-Cm5lumS4.mjs";
3
+ import { nt as makePrivateDirectory, rt as openPrivateFile } from "./src-BMSLVcgs.mjs";
4
4
  import { $t as safeField, Qt as safeCode, Xt as ApplicationError } from "./locate-JYtFmKu-.mjs";
5
- import { Zn as reviewTransportBytes, et as readWorkspaceOutcomes, ii as stateSchema, st as resolveFailureLocation } from "./src-C1SjCDx0.mjs";
6
- import { _t as isCoordinationBusy } from "./heap-NDnGBXH6.mjs";
5
+ import { Zn as reviewTransportBytes, et as readWorkspaceOutcomes, oi as stateSchema, st as resolveFailureLocation } from "./src--Ln5GHdz.mjs";
6
+ import { _t as isCoordinationBusy } from "./heap-DY5n4EVC.mjs";
7
7
  import { constants, createReadStream, write } from "node:fs";
8
8
  import { z } from "zod";
9
9
  import { lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, writeFile } from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import { i as errorCode } from "./model-CmHypB0p.mjs";
1
+ import { i as errorCode } from "./model-C1VzgKLi.mjs";
2
2
  import { a as titleHintLimits, i as encodeTitleError, o as titleInputSchema, t as assertTitleHeap } from "./heap-1FYhGds4.mjs";
3
3
  import { stat } from "node:fs/promises";
4
4
  import { isAbsolute, join } from "node:path";
@@ -1,8 +1,8 @@
1
- import { Y as createConfiguredPreviewStream } from "./src-CQeUBG2Y.mjs";
1
+ import { Y as createConfiguredPreviewStream } from "./src-BMSLVcgs.mjs";
2
2
  import { Dn as createStaticProcessor, dn as workspaceSchema, ln as sessionSchema } from "./locate-JYtFmKu-.mjs";
3
- import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-xidy0yF7.mjs";
4
- import { ci as effectiveTreatmentSchema } from "./src-C1SjCDx0.mjs";
5
- import { a as classifyRecord, n as assertPreviewHeap, t as runPreview } from "./run-DvRM-NR8.mjs";
3
+ import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-CGFwLUd6.mjs";
4
+ import { ui as effectiveTreatmentSchema } from "./src--Ln5GHdz.mjs";
5
+ import { a as classifyRecord, n as assertPreviewHeap, t as runPreview } from "./run-hQ_W2p_Y.mjs";
6
6
  import { z } from "zod";
7
7
  import { parentPort, workerData } from "node:worker_threads";
8
8
  //#region apps/cli/src/preview/run.ts
@@ -1,8 +1,8 @@
1
- import { et as safeError, h as captureConfiguredSessionJob, j as runConfiguredSessionJob, u as runConfiguredScanJob, z as gitSeedsProvider } from "./src-CQeUBG2Y.mjs";
1
+ import { et as safeError, h as captureConfiguredSessionJob, j as runConfiguredSessionJob, u as runConfiguredScanJob, z as gitSeedsProvider } from "./src-BMSLVcgs.mjs";
2
2
  import { Dn as createStaticProcessor, Qt as safeCode } from "./locate-JYtFmKu-.mjs";
3
- import { l as createNativeAdapters } from "./src-xidy0yF7.mjs";
4
- import "./src-C1SjCDx0.mjs";
5
- import { d as runJourneyBaseJob, i as runJourneyOutputVerifyJob, n as runJourneyOutputJob, r as runJourneyOutputShardJob } from "./job-BO0a67HQ.mjs";
3
+ import { l as createNativeAdapters } from "./src-CGFwLUd6.mjs";
4
+ import "./src--Ln5GHdz.mjs";
5
+ import { d as runJourneyBaseJob, i as runJourneyOutputVerifyJob, n as runJourneyOutputJob, r as runJourneyOutputShardJob } from "./job-BxUVFocm.mjs";
6
6
  import { parentPort } from "node:worker_threads";
7
7
  //#region apps/cli/src/configured-session-worker.ts
8
8
  const port = parentPort;
@@ -1,6 +1,6 @@
1
- import { S as readPrivateReviewPayload, at as windowsOwnerOnly, it as restrictToOwner, rt as openPrivateFile, tt as exclusiveLock, x as writePrivateReviewPayload } from "./src-CQeUBG2Y.mjs";
1
+ import { S as readPrivateReviewPayload, at as windowsOwnerOnly, it as restrictToOwner, rt as openPrivateFile, tt as exclusiveLock, x as writePrivateReviewPayload } from "./src-BMSLVcgs.mjs";
2
2
  import { At as journeyTermSchema, It as termTypeSchema, Mt as reviewTermsResultSchema, Xt as ApplicationError, _ as semanticFindingSchema, b as validateBReview, c as textDigest, d as reviewAlignmentAudit, dt as nativeJourneySchema, er as isStaticCategory, ft as journeyGuidanceSchema, g as validateReviewAlignment, gt as journeyWorkSuggestionSchema, ht as journeyDescribeSchema, i as reviewBatchSchema, it as journeyDigestSchema, jt as reviewTermsInputSchema, kt as privacyTermSchema, l as validateReview, m as reviewAlignmentSchema, nn as reviewFamilies, o as reviewDigest, ot as journeyIdSchema, r as reviewBatchChunks, s as reviewSubmitSchema, sn as fileIdentitySchema, tn as familySelected, tr as staticCategories, u as findingReferenceKey, v as bContextEvidence, wn as createDetectionSummary } from "./locate-JYtFmKu-.mjs";
3
- import { $n as mergeBRepair, $t as journeyResourceSchema, At as validateAttemptAppend, B as validateInspectionBatch, Bt as newJourneyWork, Et as obsoleteJourney, Fn as confirmedHideGroupIds, Ft as applyClassificationProposal, G as validateInspectionFence, Gn as workPrivacyDecisions, Gr as withReadingProgress, Gt as hideFinishSchema, Hn as syncTermGroups, Hr as isReadingComplete, Ht as journeyContextQuerySchema, In as confirmedHideKey, It as classificationCommitSchema, J as validateInspectionQuery, Jn as reviewCandidateResourceSchema, Jt as journeySearchSaveSchema, K as validateInspectionHead, Kr as mergePrivacyTerms, Kt as hidePublishSchema, Mn as bMaskedHits, Nt as journeyBatchReadSchema, Pr as journeySendSchema, Pt as journeyReviewStorageQuerySchema, Qn as bReviewDigest, Qt as journeyResourceQuerySchema, Rn as confirmedHideTerms, Un as retireWorkDescription, Ur as isSelectedWork, Ut as journeyContextSchema, V as validateInspectionBatches, Vn as maskedHitsStale, W as validateInspectionClaim, Wn as workDecisionDigest, Wr as selectedWorks, Wt as hideBeginSchema, X as validateDetectionSummary, Xn as reviewRepairResourceSchema, Xt as journeyPolicyRespondSchema, Y as validateInspectionContribution, Yt as searchScopeDigest, Z as inspectionInputs, Zt as projectPreparationProgress, _ as projectJourneyInventory, _n as journeyCommitResultSchema, _r as preparationSettlementSchema, an as reviewAttemptsResultSchema, ar as scanGitSeedsId, b as bReviewScope, c as reconstructBFields, cn as sessionReconciliationResourceSchema, en as journeyIsolateSchema, fn as sessionReviewQuerySchema, fr as journeyInventoryReadSchema, gn as sessionUsefulnessResourceSchema, gr as preparationBeginSchema, h as semanticGroupKey, hn as sessionUsefulnessInputSchema, ht as candidateSortAvailable, ii as stateSchema, in as reviewAttemptsQuerySchema, ir as scanSessionResourceSchema, jt as journeyGuidance, kr as staticSessionId, kt as attemptBudgetCodePoints, l as reviseGroupMembership, lr as validateScanExclusion, m as hideScopeDigest, mn as sessionReviewStatusSchema, mr as journeyPreparationProgressSchema, nn as sortingApplySchema, nr as scanCanonicalResourceSchema, o as bRereadDigest, pn as sessionReviewResourceSchema, pr as journeyInventorySchema, pt as manualUploadSchema, q as validateInspectionInputs, qt as journeySearchResultSchema, rn as reviewAttemptResourceSchema, s as reconcileBSession, sn as sessionReconcileResultSchema, t as scanBatchContextDigest, tn as journeyPlaceSchema, tr as scanAliasResourceSchema, u as resolveGroupSplit, un as sessionRereadResourceSchema, ut as manualUploadBindingSchema, v as preparationScope, vn as journeyCommitSchema, vr as preparationStartSchema, wn as settleConfirmedHides, wt as settleCorrections, xn as confirmedHideDeltaSchema, xr as applyCardAnswers, yn as journeyEventSchema, yr as validatePreparationFacts, zn as dictionaryHides } from "./src-C1SjCDx0.mjs";
3
+ import { $n as mergeBRepair, $t as journeyResourceSchema, At as validateAttemptAppend, B as validateInspectionBatch, Bt as newJourneyWork, Et as obsoleteJourney, Fn as confirmedHideGroupIds, Ft as applyClassificationProposal, G as validateInspectionFence, Gn as workPrivacyDecisions, Gr as isSkippedWork, Gt as hideFinishSchema, Hn as syncTermGroups, Ht as journeyContextQuerySchema, In as confirmedHideKey, It as classificationCommitSchema, J as validateInspectionQuery, Jn as reviewCandidateResourceSchema, Jr as mergePrivacyTerms, Jt as journeySearchSaveSchema, K as validateInspectionHead, Kr as selectedWorks, Kt as hidePublishSchema, Mn as bMaskedHits, Nt as journeyBatchReadSchema, Pr as journeySendSchema, Pt as journeyReviewStorageQuerySchema, Qn as bReviewDigest, Qt as journeyResourceQuerySchema, Rn as confirmedHideTerms, Un as retireWorkDescription, Ur as isReadingComplete, Ut as journeyContextSchema, V as validateInspectionBatches, Vn as maskedHitsStale, W as validateInspectionClaim, Wn as workDecisionDigest, Wr as isSelectedWork, Wt as hideBeginSchema, X as validateDetectionSummary, Xn as reviewRepairResourceSchema, Xt as journeyPolicyRespondSchema, Y as validateInspectionContribution, Yt as searchScopeDigest, Z as inspectionInputs, Zt as projectPreparationProgress, _ as projectJourneyInventory, _n as journeyCommitResultSchema, _r as preparationSettlementSchema, an as reviewAttemptsResultSchema, ar as scanGitSeedsId, b as bReviewScope, c as reconstructBFields, cn as sessionReconciliationResourceSchema, en as journeyIsolateSchema, fn as sessionReviewQuerySchema, fr as journeyInventoryReadSchema, gn as sessionUsefulnessResourceSchema, gr as preparationBeginSchema, h as semanticGroupKey, hn as sessionUsefulnessInputSchema, ht as candidateSortAvailable, in as reviewAttemptsQuerySchema, ir as scanSessionResourceSchema, jt as journeyGuidance, kr as staticSessionId, kt as attemptBudgetCodePoints, l as reviseGroupMembership, lr as validateScanExclusion, m as hideScopeDigest, mn as sessionReviewStatusSchema, mr as journeyPreparationProgressSchema, nn as sortingApplySchema, nr as scanCanonicalResourceSchema, o as bRereadDigest, oi as stateSchema, pn as sessionReviewResourceSchema, pr as journeyInventorySchema, pt as manualUploadSchema, q as validateInspectionInputs, qr as withReadingProgress, qt as journeySearchResultSchema, rn as reviewAttemptResourceSchema, s as reconcileBSession, sn as sessionReconcileResultSchema, t as scanBatchContextDigest, tn as journeyPlaceSchema, tr as scanAliasResourceSchema, u as resolveGroupSplit, un as sessionRereadResourceSchema, ut as manualUploadBindingSchema, v as preparationScope, vn as journeyCommitSchema, vr as preparationStartSchema, wn as settleConfirmedHides, wt as settleCorrections, xn as confirmedHideDeltaSchema, xr as applyCardAnswers, yn as journeyEventSchema, yr as validatePreparationFacts, zn as dictionaryHides } from "./src--Ln5GHdz.mjs";
4
4
  import { constants } from "node:fs";
5
5
  import { z } from "zod";
6
6
  import { copyFile, link, lstat, mkdir, mkdtemp, open, readFile, realpath, rm, unlink } from "node:fs/promises";
@@ -4820,12 +4820,13 @@ function commitJourneySend(db, input) {
4820
4820
  ...input.state,
4821
4821
  revision
4822
4822
  });
4823
+ const skipped = (workId) => current.journey.works.some((work) => work.id === workId && isSkippedWork(work));
4823
4824
  const finished = send.status === "completed" && send.omitted.every((work) => [
4824
4825
  "drop",
4825
4826
  "empty",
4826
4827
  "sent",
4827
4828
  "skipped"
4828
- ].includes(work.reason));
4829
+ ].includes(work.reason) || work.reason === "not-ready" && skipped(work.workId));
4829
4830
  const journey = {
4830
4831
  ...current.journey,
4831
4832
  phase: current.journey.phase === "paused" || prior?.status === "completed" ? current.journey.phase : finished ? "completed" : [
@@ -1,7 +1,7 @@
1
- import { X as createInspectionProcessor } from "./src-CQeUBG2Y.mjs";
1
+ import { X as createInspectionProcessor } from "./src-BMSLVcgs.mjs";
2
2
  import { Dn as createStaticProcessor } from "./locate-JYtFmKu-.mjs";
3
- import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-xidy0yF7.mjs";
4
- import { H as validateInspectionRequest } from "./src-C1SjCDx0.mjs";
3
+ import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-CGFwLUd6.mjs";
4
+ import { H as validateInspectionRequest } from "./src--Ln5GHdz.mjs";
5
5
  import "./messages-D3m3bhva.mjs";
6
6
  import { z } from "zod";
7
7
  import { parentPort, workerData } from "node:worker_threads";
@@ -1,6 +1,6 @@
1
- import { A as renderJobDigest, D as prepareCollectionProduction, V as writeLogicalJourneyOutput, W as readConfiguredOutputInfo, at as windowsOwnerOnly, b as writeLogicalJourneyBase, d as verifyOutputShard, f as writeOutputShard, nt as makePrivateDirectory, w as readConfiguredSearchFields, z as gitSeedsProvider } from "./src-CQeUBG2Y.mjs";
1
+ import { A as renderJobDigest, D as prepareCollectionProduction, V as writeLogicalJourneyOutput, W as readConfiguredOutputInfo, at as windowsOwnerOnly, b as writeLogicalJourneyBase, d as verifyOutputShard, f as writeOutputShard, nt as makePrivateDirectory, w as readConfiguredSearchFields, z as gitSeedsProvider } from "./src-BMSLVcgs.mjs";
2
2
  import { Xt as ApplicationError, nn as reviewFamilies, zt as filterInventoryByPeriod } from "./locate-JYtFmKu-.mjs";
3
- import { Ar as staticSessionResourceSchema, Cn as renderedHideValue, Dn as hideKeyId, En as addHideIndexTokens, di as selectFrozenConfiguration, kn as packHideIndex, li as defaultScopedSettings, ui as freezeConfiguration } from "./src-C1SjCDx0.mjs";
3
+ import { Ar as staticSessionResourceSchema, Cn as renderedHideValue, Dn as hideKeyId, En as addHideIndexTokens, di as defaultScopedSettings, fi as freezeConfiguration, kn as packHideIndex, pi as selectFrozenConfiguration } from "./src--Ln5GHdz.mjs";
4
4
  import { constants } from "node:fs";
5
5
  import { z } from "zod";
6
6
  import { copyFile, link, lstat, mkdir, mkdtemp, open, readFile, realpath, rename, rm, unlink, writeFile } from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import "./src-C1SjCDx0.mjs";
1
+ import "./src--Ln5GHdz.mjs";
2
2
  //#region packages/harnesses/src/discovery/model.ts
3
3
  const discoveryBounds = {
4
4
  entries: 1e5,
@@ -1,6 +1,6 @@
1
- import { c as executorRequestSchema, f as parseOptions, g as startupFailure, i as invoke, m as longCommands, n as readOperation, o as createRuntime, r as waitOperation } from "./query-BZvNsP1u.mjs";
1
+ import { c as executorRequestSchema, f as parseOptions, g as startupFailure, i as invoke, m as longCommands, n as readOperation, o as createRuntime, r as waitOperation } from "./query-Cm5lumS4.mjs";
2
2
  import { $t as safeField, Qt as safeCode, Xt as ApplicationError } from "./locate-JYtFmKu-.mjs";
3
- import "./src-C1SjCDx0.mjs";
3
+ import "./src--Ln5GHdz.mjs";
4
4
  import { z } from "zod";
5
5
  import { setTimeout } from "node:timers/promises";
6
6
  //#region apps/cli/src/operation/executor.ts
@@ -1,4 +1,4 @@
1
- import { n as assertPreviewHeap, o as previewInputSchema, t as runPreview } from "./run-DvRM-NR8.mjs";
1
+ import { n as assertPreviewHeap, o as previewInputSchema, t as runPreview } from "./run-hQ_W2p_Y.mjs";
2
2
  import { parentPort, workerData } from "node:worker_threads";
3
3
  //#region packages/harnesses/src/preview/worker/index.ts
4
4
  function notify(message) {
@@ -1,10 +1,10 @@
1
- import { $ as createCleanup, B as parallelismLimits, C as readOriginalSearchFields, E as checkReusableBundle, F as SessionWorkerError, G as processJourneyMetadataFields, H as privateJourneyDirectory, I as sessionWorkerFailure, K as staticMaskCategory, L as privateCollectionDirectory, M as readCollectionIndex, N as parseCollectionWorkspaceSummary, O as captureLogicalJourneySources, P as createSharedSessionPool, Q as removeNamedTemporarySpools, R as defaultParallelism, T as createCollectionArtifacts, U as readLogicalJourneyFinalMasks, W as readConfiguredOutputInfo, Z as createTemporary, _ as processJourneyMetadata, a as scanReviewFields, at as windowsOwnerOnly, c as readSessionScanRecords, g as readCapturedOriginalRows, i as buildWorkScanBatches, it as restrictToOwner, j as runConfiguredSessionJob, k as capturedJourneyScope, l as scanPreparedSession, m as openConfiguredUpload, n as verifyPreparedSessionSources, nt as makePrivateDirectory, o as createWorkPieces, ot as isWindowsAclFailure, p as configuredSessionUploads, q as readWorkspacePair, r as prepareSessionScans, rt as openPrivateFile, s as readSessionScanFields, st as windowsAclCodes, t as preparedScanConfiguration, v as readStaticSessionMasks, w as readConfiguredSearchFields, y as staticSessionJobs, z as gitSeedsProvider } from "./src-CQeUBG2Y.mjs";
1
+ import { $ as createCleanup, B as parallelismLimits, C as readOriginalSearchFields, E as checkReusableBundle, F as SessionWorkerError, G as processJourneyMetadataFields, H as privateJourneyDirectory, I as sessionWorkerFailure, K as staticMaskCategory, L as privateCollectionDirectory, M as readCollectionIndex, N as parseCollectionWorkspaceSummary, O as captureLogicalJourneySources, P as createSharedSessionPool, Q as removeNamedTemporarySpools, R as defaultParallelism, T as createCollectionArtifacts, U as readLogicalJourneyFinalMasks, W as readConfiguredOutputInfo, Z as createTemporary, _ as processJourneyMetadata, a as scanReviewFields, at as windowsOwnerOnly, c as readSessionScanRecords, g as readCapturedOriginalRows, i as buildWorkScanBatches, it as restrictToOwner, j as runConfiguredSessionJob, k as capturedJourneyScope, l as scanPreparedSession, m as openConfiguredUpload, n as verifyPreparedSessionSources, nt as makePrivateDirectory, o as createWorkPieces, ot as isWindowsAclFailure, p as configuredSessionUploads, q as readWorkspacePair, r as prepareSessionScans, rt as openPrivateFile, s as readSessionScanFields, st as windowsAclCodes, t as preparedScanConfiguration, v as readStaticSessionMasks, w as readConfiguredSearchFields, y as staticSessionJobs, z as gitSeedsProvider } from "./src-BMSLVcgs.mjs";
2
2
  import { $t as safeField, Bt as sessionPeriodSchema, Dn as createStaticProcessor, F as bClassificationKey, Fn as entityDictionaryVersion, Ft as termTypeInfo, Gt as ownerProfileSchema, H as codePointLength, Ht as journeyProfileAddressActionSchema, K as utf16Offset, Kt as passportAddressSchema, N as bUnitFragments, Ot as privacyTermKey, Qt as safeCode, Sn as currentDetectorVersion, T as bLiteralTerms, Un as frameRecords, Ut as journeyProfileLinksActionSchema, V as bDigest, Wt as mergeOwnerProfile, Xt as ApplicationError, Zt as UnfinishedJourneyError, an as observeSource, ar as admitCustomTerm, b as validateBReview, c as textDigest, h as reviewFindingsDigest, ht as journeyDescribeSchema, ir as createEntityMatcher, jt as reviewTermsInputSchema, l as validateReview, n as compileBFindings, nn as reviewFamilies, or as admitGitName, qt as profileHasChoices, r as reviewBatchChunks, s as reviewSubmitSchema, t as locateTerms, tn as familySelected, z as bAnchorKey, zt as filterInventoryByPeriod } from "./locate-JYtFmKu-.mjs";
3
- import { a as mainTextChunks, c as previewInWorker, i as nearestSortingRepository, l as createNativeAdapters, n as createProjectEvidenceCollector, o as mainTextFields, r as sortingRepositoryId, s as textChunks, t as createHarnesses, u as createGitNameSeedProvider } from "./src-xidy0yF7.mjs";
4
- import { $ as settingsQuerySchema, $r as packageCommandSchema, A as deviceProfileScopeSchema, B as validateInspectionBatch, Bn as journeyConfirmedHides, Br as hasCompleteWorkDescription, Bt as newJourneyWork, C as rebindReviewSubmit, Cr as privacyDecisionDigest, Ct as sendStartSchema, D as createAccount, Dr as hasCurrentStaticReview, E as staticallyHiddenFindings, Er as nativeRespondSchema, Et as obsoleteJourney, Fn as confirmedHideGroupIds, Fr as sendArtifactSchema, Gr as withReadingProgress, Hr as isReadingComplete, Ht as journeyContextQuerySchema, Ir as sendReceiptSchema, Jn as reviewCandidateResourceSchema, Jr as journeyFindingsSchema, Kn as workCorrectionBinding, L as createApplication, Ln as confirmedHideKinds, Lr as sendReplaceResultSchema, Lt as classificationPartition, M as readAccountAvatarUrl, Mr as agentSourceSchema, Mt as applyClassification, N as storedCredentialSchema, Nn as bTermMatcher, Nr as agentSourcesSchema, O as accountProfileSchema, Or as staticReviewDigest, Pr as journeySendSchema, Pt as journeyReviewStorageQuerySchema, Q as settingsBatchSchema, Qn as bReviewDigest, Qr as commandSchema, Qt as journeyResourceQuerySchema, R as inspectionCancelSchema, Rr as sendResolutionSchema, Rt as classificationWorks, S as rebindReviewOverlay, Sn as readConfirmedHideChange, Sr as assertJourneyPrivacyReady, St as sendPrepareSchema, T as guardedFindingText, Tn as termHideAdditions, Tr as nativeGetSchema, Tt as currentJourneyAdapters, U as inspectionQuerySchema, Un as retireWorkDescription, Ur as isSelectedWork, Vn as maskedHitsStale, Vr as isClassifying, Vt as reviewCompileSchema, Wn as workDecisionDigest, Xn as reviewRepairResourceSchema, Xr as journeyRenderInputSchema, Xt as journeyPolicyRespondSchema, Yn as reviewRepairInputSchema, Yr as journeyPreviewSchema, Yt as searchScopeDigest, Zr as journeyRenderSchema, _t as maximumTermsFileBytes, a as bCrossSegmentReviewSchema, ar as scanGitSeedsId, b as bReviewScope, bn as confirmedHideAdditions, br as journeyClassificationSessionsSchema, bt as sendActionSchema, c as reconstructBFields, cr as scanExclusionResourceSchema, ct as validateFailureLocation, d as selectedValueMembers, dn as sessionReviewInputSchema, dr as journeyInventoryQuerySchema, dt as manualUploadChoiceSchema, ei as selectionBatchSchema, er as planBRepair, et as readWorkspaceOutcomes, f as splitSelectorValues, fn as sessionReviewQuerySchema, ft as manualUploadPrepareSchema, g as changeJourney, gt as emptyTermsRevision, hn as sessionUsefulnessInputSchema, hr as emptyPreparationFacts, i as validateBCrossSegmentReview, ii as stateSchema, ir as scanSessionResourceSchema, j as profileUrlMatchesIdentity, k as deviceAuthorizationSchema, ln as sessionRereadInputSchema, lt as manualUploadActionSchema, m as hideScopeDigest, mt as manualUploadStartSchema, n as scanBatchEquivalenceDigest, nt as appendSensitiveTerms, o as bRereadDigest, oi as recommendParallelism, on as sessionReconcileInputSchema, or as scanGitSeedsResource, ot as artifactFailureDetailSchema, p as activeJourneyTerms, pt as manualUploadSchema, qn as reviewCandidateInputSchema, qr as journeyFindingImpactSchema, qt as journeySearchResultSchema, r as locateTermEvidence, ri as producerVersion, rn as reviewAttemptResourceSchema, rr as scanPreparationDigest, s as reconcileBSession, sr as verifiedScanGitSeeds, st as resolveFailureLocation, t as scanBatchContextDigest, ti as selectionSchema, tn as journeyPlaceSchema, vt as normalizeSensitiveTerms, w as reviewBatchReuse, wr as nativeEventsSchema, x as rebindReviewAlignment, xt as sendChoiceSchema, y as isGenericPublicTerm, yt as replaceSensitiveTermsSchema, z as inspectionStartSchema, zr as sendSettingsSchema, zt as retireScanGeneration } from "./src-C1SjCDx0.mjs";
5
- import { $ as checkVersion, A as resourceSelectionQuerySchema, B as termReuseQuerySchema, C as loadAcceptedReview, D as aggregateUsefulness, E as loadPrivateResource, F as validateUnitCandidate, G as requireActiveBatch, H as batchHeader, I as reuseQuerySchema, J as validateDatabase, K as initializeAndClaim, L as batchQuery, M as evaluateUnitEvidence, N as sameCandidateRequest, O as sessionUsefulnessRecommendation, P as validateCandidateAttempt, Q as validateState, R as isPrivateResourceKind, S as validateSessionBindings, T as loadBatch, U as createJourneyPayloadFiles, V as privateReviewHash, W as validateBatchBody, X as readBundleDirectory, Y as withDatabase, Z as readStoredState, _ as loadReconciliation, _t as isCoordinationBusy, a as decodeError, at as hasResetMarker, b as validatePreparationSelection, c as dropsAnchor, ct as privatePath, d as parseDelivery, dt as stateDirectory, et as schemaVersion, f as validateCandidate, ft as syncDirectory, g as loadPreparedBodies, gt as errorCode$1, h as loadPreparation, ht as StoreError, i as createExecutor, it as finishReset, j as inspectionQuerySchema$1, k as sessionQuery, l as replySchema, lt as readResetMarker, m as loadStatus, mt as withFileCheckTimings, n as releaseInheritedHeapFlags, nt as createDatabaseFile, o as ProtocolError, ot as inspectStateFiles, p as classificationJourneyCommit, pt as withStateSnapshot, q as ownership, r as storeHeapLimits, rt as databaseName, s as allowedReplies, st as present, tt as beginReset, u as operations, ut as recheckPrivatePath, v as loadRereadBodies, vt as isSqliteCorruption, w as loadAuthenticatedReview, x as validateSessionReconciliation, y as loadSessionBodies, z as privateResourceHeader } from "./heap-NDnGBXH6.mjs";
6
- import { C as journeyDirectory, S as saveRemoteState, _ as staticBaseProduction, a as writeJourneyOutput, b as isRemoteImport, c as mergeHideIndexTokens, f as writeJourneyBase, g as staticBaseInputs, h as staticSessions, l as packRenderHideIndex, m as saveStaticSession, o as createHideIndexTokens, p as readStaticResult, s as hideIndexTexts, t as journeyOutputJob, u as journeyBaseJob, v as prepareSourcePlan, w as collectRemoteWorkers, x as readRemoteState, y as workApproval } from "./job-BO0a67HQ.mjs";
7
- import { t as createAgentSetupPort } from "./agent-setup-BZbgLgHg.mjs";
3
+ import { a as mainTextChunks, c as previewInWorker, i as nearestSortingRepository, l as createNativeAdapters, n as createProjectEvidenceCollector, o as mainTextFields, r as sortingRepositoryId, s as textChunks, t as createHarnesses, u as createGitNameSeedProvider } from "./src-CGFwLUd6.mjs";
4
+ import { $ as settingsQuerySchema, $r as journeyRenderSchema, A as deviceProfileScopeSchema, B as validateInspectionBatch, Bn as journeyConfirmedHides, Br as hasCompleteWorkDescription, Bt as newJourneyWork, C as rebindReviewSubmit, Cr as privacyDecisionDigest, Ct as sendStartSchema, D as createAccount, Dr as hasCurrentStaticReview, E as staticallyHiddenFindings, Er as nativeRespondSchema, Et as obsoleteJourney, Fn as confirmedHideGroupIds, Fr as sendArtifactSchema, Hr as isIncludedWork, Ht as journeyContextQuerySchema, Ir as sendReceiptSchema, Jn as reviewCandidateResourceSchema, Kn as workCorrectionBinding, L as createApplication, Ln as confirmedHideKinds, Lr as sendReplaceResultSchema, Lt as classificationPartition, M as readAccountAvatarUrl, Mr as agentSourceSchema, Mt as applyClassification, N as storedCredentialSchema, Nn as bTermMatcher, Nr as agentSourcesSchema, O as accountProfileSchema, Or as staticReviewDigest, Pr as journeySendSchema, Pt as journeyReviewStorageQuerySchema, Q as settingsBatchSchema, Qn as bReviewDigest, Qr as journeyRenderInputSchema, Qt as journeyResourceQuerySchema, R as inspectionCancelSchema, Rr as sendResolutionSchema, Rt as classificationWorks, S as rebindReviewOverlay, Sn as readConfirmedHideChange, Sr as assertJourneyPrivacyReady, St as sendPrepareSchema, T as guardedFindingText, Tn as termHideAdditions, Tr as nativeGetSchema, Tt as currentJourneyAdapters, U as inspectionQuerySchema, Un as retireWorkDescription, Ur as isReadingComplete, Vn as maskedHitsStale, Vr as isClassifying, Vt as reviewCompileSchema, Wn as workDecisionDigest, Wr as isSelectedWork, Xn as reviewRepairResourceSchema, Xr as journeyFindingsSchema, Xt as journeyPolicyRespondSchema, Yn as reviewRepairInputSchema, Yr as journeyFindingImpactSchema, Yt as searchScopeDigest, Zr as journeyPreviewSchema, _t as maximumTermsFileBytes, a as bCrossSegmentReviewSchema, ai as producerVersion, ar as scanGitSeedsId, b as bReviewScope, bn as confirmedHideAdditions, br as journeyClassificationSessionsSchema, bt as sendActionSchema, c as reconstructBFields, ci as recommendParallelism, cr as scanExclusionResourceSchema, ct as validateFailureLocation, d as selectedValueMembers, dn as sessionReviewInputSchema, dr as journeyInventoryQuerySchema, dt as manualUploadChoiceSchema, ei as commandSchema, er as planBRepair, et as readWorkspaceOutcomes, f as splitSelectorValues, fn as sessionReviewQuerySchema, ft as manualUploadPrepareSchema, g as changeJourney, gt as emptyTermsRevision, hn as sessionUsefulnessInputSchema, hr as emptyPreparationFacts, i as validateBCrossSegmentReview, ir as scanSessionResourceSchema, j as profileUrlMatchesIdentity, k as deviceAuthorizationSchema, ln as sessionRereadInputSchema, lt as manualUploadActionSchema, m as hideScopeDigest, mt as manualUploadStartSchema, n as scanBatchEquivalenceDigest, ni as selectionBatchSchema, nt as appendSensitiveTerms, o as bRereadDigest, oi as stateSchema, on as sessionReconcileInputSchema, or as scanGitSeedsResource, ot as artifactFailureDetailSchema, p as activeJourneyTerms, pt as manualUploadSchema, qn as reviewCandidateInputSchema, qr as withReadingProgress, qt as journeySearchResultSchema, r as locateTermEvidence, ri as selectionSchema, rn as reviewAttemptResourceSchema, rr as scanPreparationDigest, s as reconcileBSession, sr as verifiedScanGitSeeds, st as resolveFailureLocation, t as scanBatchContextDigest, ti as packageCommandSchema, tn as journeyPlaceSchema, vt as normalizeSensitiveTerms, w as reviewBatchReuse, wr as nativeEventsSchema, x as rebindReviewAlignment, xt as sendChoiceSchema, y as isGenericPublicTerm, yt as replaceSensitiveTermsSchema, z as inspectionStartSchema, zr as sendSettingsSchema, zt as retireScanGeneration } from "./src--Ln5GHdz.mjs";
5
+ import { $ as checkVersion, A as resourceSelectionQuerySchema, B as termReuseQuerySchema, C as loadAcceptedReview, D as aggregateUsefulness, E as loadPrivateResource, F as validateUnitCandidate, G as requireActiveBatch, H as batchHeader, I as reuseQuerySchema, J as validateDatabase, K as initializeAndClaim, L as batchQuery, M as evaluateUnitEvidence, N as sameCandidateRequest, O as sessionUsefulnessRecommendation, P as validateCandidateAttempt, Q as validateState, R as isPrivateResourceKind, S as validateSessionBindings, T as loadBatch, U as createJourneyPayloadFiles, V as privateReviewHash, W as validateBatchBody, X as readBundleDirectory, Y as withDatabase, Z as readStoredState, _ as loadReconciliation, _t as isCoordinationBusy, a as decodeError, at as hasResetMarker, b as validatePreparationSelection, c as dropsAnchor, ct as privatePath, d as parseDelivery, dt as stateDirectory, et as schemaVersion, f as validateCandidate, ft as syncDirectory, g as loadPreparedBodies, gt as errorCode$1, h as loadPreparation, ht as StoreError, i as createExecutor, it as finishReset, j as inspectionQuerySchema$1, k as sessionQuery, l as replySchema, lt as readResetMarker, m as loadStatus, mt as withFileCheckTimings, n as releaseInheritedHeapFlags, nt as createDatabaseFile, o as ProtocolError, ot as inspectStateFiles, p as classificationJourneyCommit, pt as withStateSnapshot, q as ownership, r as storeHeapLimits, rt as databaseName, s as allowedReplies, st as present, tt as beginReset, u as operations, ut as recheckPrivatePath, v as loadRereadBodies, vt as isSqliteCorruption, w as loadAuthenticatedReview, x as validateSessionReconciliation, y as loadSessionBodies, z as privateResourceHeader } from "./heap-DY5n4EVC.mjs";
6
+ import { C as journeyDirectory, S as saveRemoteState, _ as staticBaseProduction, a as writeJourneyOutput, b as isRemoteImport, c as mergeHideIndexTokens, f as writeJourneyBase, g as staticBaseInputs, h as staticSessions, l as packRenderHideIndex, m as saveStaticSession, o as createHideIndexTokens, p as readStaticResult, s as hideIndexTexts, t as journeyOutputJob, u as journeyBaseJob, v as prepareSourcePlan, w as collectRemoteWorkers, x as readRemoteState, y as workApproval } from "./job-BxUVFocm.mjs";
7
+ import { t as createAgentSetupPort } from "./agent-setup-Dv_mQ38P.mjs";
8
8
  import { t as workerMessageSchema } from "./messages-D3m3bhva.mjs";
9
9
  import { constants, write } from "node:fs";
10
10
  import { z } from "zod";
@@ -7737,26 +7737,61 @@ function createJourneyPreparation(options) {
7737
7737
  const frozen = state;
7738
7738
  const blockWork = (work, error) => changeJourney(storage, journeyId, "snapshot", (before) => {
7739
7739
  if (before.phase === "paused") throw new ApplicationError("OPERATION_CANCELED");
7740
+ if (before.phase === "sending" || before.phase === "completed") return before;
7740
7741
  return withReadingProgress({
7741
7742
  ...before,
7742
- works: before.works.map((item) => item.id === work.id && item.inputRevision === work.inputRevision ? {
7743
+ works: before.works.map((item) => item.id === work.id && item.inputRevision === work.inputRevision && !item.blockedCodes.includes("PRIVACY_CHANGE_PENDING") ? {
7743
7744
  ...item,
7744
7745
  status: "blocked",
7745
7746
  blockedCodes: blockedCodes(error, safeCode(error))
7746
7747
  } : item)
7747
7748
  });
7748
7749
  }, 100);
7749
- let submittedWorks = 0;
7750
- let works = [];
7751
- let submitted = Promise.withResolvers();
7752
- const submission = () => {
7753
- let done = false;
7754
- return () => {
7755
- if (done) return;
7756
- done = true;
7757
- if (++submittedWorks === works.length) submitted.resolve();
7758
- };
7750
+ const retryLimit = options.retryLimit ?? workRetryDelaysMs.length;
7751
+ const generation = (work) => `${work.id}:${work.inputRevision}`;
7752
+ let serialAdmission = Promise.resolve();
7753
+ const acquireRead = async () => {
7754
+ if (run.pool) return () => {};
7755
+ const previous = serialAdmission;
7756
+ const released = Promise.withResolvers();
7757
+ serialAdmission = released.promise;
7758
+ await previous;
7759
+ return () => released.resolve();
7760
+ };
7761
+ const releaseAdmission = /* @__PURE__ */ new Map();
7762
+ const retryWork = async (work, error, attempt) => {
7763
+ if (blockedCodes(error, safeCode(error)).includes("PRIVACY_CHANGE_PENDING") || work.blockedCodes.includes("PRIVACY_CHANGE_PENDING")) return false;
7764
+ const delay = workRetryDelaysMs[attempt];
7765
+ if (attempt >= retryLimit || delay === void 0) return false;
7766
+ const blocked = await blockWork(work, error);
7767
+ const target = blocked.works.find((item) => item.id === work.id);
7768
+ if (blocked.phase === "sending" || blocked.phase === "completed" || target?.blockedCodes.includes("PRIVACY_CHANGE_PENDING")) return false;
7769
+ releaseAdmission.get(work.id)?.();
7770
+ await (options.retryDelay ?? waitForWorkRetry)(delay, abort.signal);
7771
+ abort.signal.throwIfAborted();
7772
+ let resumed = false;
7773
+ await changeJourney(storage, journeyId, "snapshot", (before) => {
7774
+ resumed = false;
7775
+ const target = before.works.find((item) => item.id === work.id);
7776
+ if (before.phase === "sending" || before.phase === "completed" || before.phase === "paused" || !target || !isSelectedWork(target) || target.inputRevision !== work.inputRevision || target.status !== "blocked" || target.blockedCodes.includes("PRIVACY_CHANGE_PENDING")) return before;
7777
+ resumed = !before.pendingHideId;
7778
+ return withReadingProgress({
7779
+ ...before,
7780
+ privacy: {
7781
+ ...before.privacy,
7782
+ packageApproval: null
7783
+ },
7784
+ works: before.works.map((item) => item.id === work.id ? {
7785
+ ...item,
7786
+ status: resumed ? work.status : "pending",
7787
+ blockedCodes: []
7788
+ } : item)
7789
+ });
7790
+ }, 100);
7791
+ return resumed;
7759
7792
  };
7793
+ const readRetries = /* @__PURE__ */ new Map();
7794
+ const staticRetries = /* @__PURE__ */ new Map();
7760
7795
  /** A failed isolation leaves the Work blocked as before; cancellation and contention escape. */
7761
7796
  const isolateRoots = async (work, error) => {
7762
7797
  try {
@@ -7778,19 +7813,19 @@ function createJourneyPreparation(options) {
7778
7813
  /** Scan generations this run prepared, including those its own isolation started. */
7779
7814
  const prepared = /* @__PURE__ */ new Set();
7780
7815
  /** True when failing roots left the Work, which is then prepared again (ADR 0188). */
7781
- const prepareWorkOnce = async (planned, onSubmitted) => {
7816
+ const prepareWorkAttempt = async (planned, onSubmitted, releaseRead) => {
7782
7817
  abort.signal.throwIfAborted();
7783
7818
  const latest = await storage.current(journeyId) ?? frozen;
7784
7819
  abort.signal.throwIfAborted();
7785
7820
  if (latest.phase === "paused") throw new ApplicationError("OPERATION_CANCELED");
7786
7821
  let work = latest.works.find((item) => item.id === planned.id);
7787
- if (!work || !isSelectedWork(work)) return false;
7822
+ if (!work || !isSelectedWork(work) || latest.phase === "sending" || latest.phase === "completed") return false;
7788
7823
  if (![
7789
7824
  "pending",
7790
7825
  "reading",
7791
7826
  "review"
7792
7827
  ].includes(work.status)) return false;
7793
- prepared.add(`${work.id}:${work.inputRevision}`);
7828
+ prepared.add(generation(work));
7794
7829
  await prepareClassificationMetadata(storage, latest, work, options.processing, abort.signal);
7795
7830
  let failures = collectPreparationFailures(plan.approval.inventory, work.rootSessionIds, {
7796
7831
  journeyId,
@@ -7824,11 +7859,36 @@ function createJourneyPreparation(options) {
7824
7859
  if (await droppedMidScan(planned.id)) return false;
7825
7860
  throw error;
7826
7861
  }
7827
- if (work && await isolateRoots(work, error)) return true;
7862
+ onSubmitted();
7863
+ releaseRead();
7864
+ const attempt = work ? readRetries.get(generation(work)) ?? 0 : 0;
7865
+ if (work && await retryWork(work, error, attempt)) {
7866
+ readRetries.set(generation(work), attempt + 1);
7867
+ return prepareWorkOnce(planned, onSubmitted);
7868
+ }
7869
+ const now = await storage.current(journeyId);
7870
+ if (now?.phase === "sending" || now?.phase === "completed") return false;
7871
+ if (blockedCodes(error, code).includes("PRIVACY_CHANGE_PENDING")) {
7872
+ if (work) await blockWork(work, error);
7873
+ return false;
7874
+ }
7875
+ if (attempt < retryLimit) return false;
7876
+ if (work && await isolateRoots(work, error)) {
7877
+ readRetries.delete(generation(work));
7878
+ return true;
7879
+ }
7828
7880
  if (work) await blockWork(work, error);
7829
7881
  }
7830
7882
  return false;
7831
7883
  };
7884
+ const prepareWorkOnce = async (planned, onSubmitted) => {
7885
+ const releaseRead = await acquireRead();
7886
+ try {
7887
+ return await prepareWorkAttempt(planned, onSubmitted, releaseRead);
7888
+ } finally {
7889
+ releaseRead();
7890
+ }
7891
+ };
7832
7892
  const prepareWork = async (planned, onSubmitted) => {
7833
7893
  for (let attempt = 0; attempt < planned.rootSessionIds.length; attempt++) if (!await prepareWorkOnce(planned, onSubmitted)) return;
7834
7894
  };
@@ -7840,7 +7900,8 @@ function createJourneyPreparation(options) {
7840
7900
  abort.signal.throwIfAborted();
7841
7901
  if (!latest?.consent || latest.phase === "paused" || latest.scope.status !== "confirmed") throw new ApplicationError("OPERATION_CANCELED");
7842
7902
  const work = latest.works.find((item) => item.id === planned.id);
7843
- if (!work || !isSelectedWork(work)) return;
7903
+ if (!work || !isSelectedWork(work) || latest.phase === "sending" || latest.phase === "completed") return;
7904
+ const attempt = staticRetries.get(generation(work)) ?? 0;
7844
7905
  try {
7845
7906
  await inBackgroundStoreLane(() => prepareStaticWork({
7846
7907
  storage,
@@ -7858,38 +7919,63 @@ function createJourneyPreparation(options) {
7858
7919
  if (code === "OPERATION_CANCELED" && await droppedMidScan(work.id)) return;
7859
7920
  if (code === "COORDINATION_BUSY" || code === "OPERATION_CANCELED") throw error;
7860
7921
  options.onFailure(error);
7861
- await blockWork(work, error);
7922
+ if (await retryWork(work, error, attempt)) {
7923
+ staticRetries.set(generation(work), attempt + 1);
7924
+ return staticWork(planned, passSubmitted);
7925
+ }
7926
+ const now = await storage.current(journeyId);
7927
+ if (now?.phase !== "sending" && now?.phase !== "completed" && (attempt >= retryLimit || blockedCodes(error, safeCode(error)).includes("PRIVACY_CHANGE_PENDING"))) await blockWork(work, error);
7862
7928
  }
7863
7929
  };
7864
- let next = 0;
7865
7930
  let fatal;
7866
7931
  const stop = (error) => {
7867
7932
  fatal ??= { error };
7868
7933
  abort.abort(error);
7869
7934
  };
7870
7935
  const statics = [];
7871
- const pass = async (batch) => {
7872
- works = batch;
7873
- next = 0;
7874
- submittedWorks = 0;
7875
- submitted = Promise.withResolvers();
7936
+ const reads = [];
7937
+ const pass = async (works) => {
7938
+ let submittedWorks = 0;
7939
+ const submitted = Promise.withResolvers();
7940
+ const submission = () => {
7941
+ let done = false;
7942
+ return () => {
7943
+ if (done) return;
7944
+ done = true;
7945
+ if (++submittedWorks === works.length) submitted.resolve();
7946
+ };
7947
+ };
7876
7948
  if (!works.length) submitted.resolve();
7877
7949
  const passSubmitted = submitted.promise;
7878
- await Promise.all(Array.from({ length: run.pool ? works.length : Math.min(1, works.length) }, async () => {
7879
- for (let work = works[next++]; work && !fatal; work = works[next++]) {
7880
- const planned = work;
7881
- const onSubmitted = submission();
7950
+ let admission = Promise.resolve();
7951
+ const admissions = [];
7952
+ for (const planned of works) {
7953
+ const previous = admission;
7954
+ const released = Promise.withResolvers();
7955
+ admission = released.promise;
7956
+ admissions.push(admission);
7957
+ releaseAdmission.set(planned.id, () => released.resolve());
7958
+ const onSubmitted = submission();
7959
+ const read = async () => {
7960
+ if (!run.pool) await previous;
7961
+ if (fatal) {
7962
+ onSubmitted();
7963
+ released.resolve();
7964
+ return;
7965
+ }
7882
7966
  try {
7883
7967
  await retryContention(() => prepareWork(planned, onSubmitted), (error) => options.onFailure(error), abort.signal);
7884
7968
  } catch (error) {
7885
7969
  stop(error);
7886
7970
  } finally {
7887
7971
  onSubmitted();
7972
+ released.resolve();
7888
7973
  }
7889
7974
  statics.push(retryContention(() => staticWork(planned, passSubmitted), (error) => options.onFailure(error), abort.signal).catch(stop));
7890
- }
7891
- }));
7892
- while (submittedWorks < works.length) submission()();
7975
+ };
7976
+ reads.push(read());
7977
+ }
7978
+ await Promise.all(admissions);
7893
7979
  };
7894
7980
  /** Selected Works this run has not prepared yet, waiting while grouping continues (E2). */
7895
7981
  const later = async () => {
@@ -7906,11 +7992,15 @@ function createJourneyPreparation(options) {
7906
7992
  await setTimeout$1(laterWorksPollMs, void 0, { signal: abort.signal }).catch(() => abort.signal.throwIfAborted());
7907
7993
  }
7908
7994
  };
7909
- for (let batch = scanWorks; batch.length && !fatal; batch = await later()) {
7910
- if (!run.workers && !run.pool) run = await runWorkers(options.workers);
7911
- await pass(batch);
7995
+ try {
7996
+ for (let batch = scanWorks; batch.length && !fatal; batch = await later()) {
7997
+ if (!run.workers && !run.pool) run = await runWorkers(options.workers);
7998
+ await pass(batch);
7999
+ }
8000
+ } finally {
8001
+ await Promise.all(reads);
8002
+ await Promise.all(statics);
7912
8003
  }
7913
- await Promise.all(statics);
7914
8004
  if (scanWorks.length) options.onTiming?.(journeyId, {
7915
8005
  scope: "preparation",
7916
8006
  phases: { "journey-prepare": Math.round(performance$1.now() - startedAt) },
@@ -7936,6 +8026,11 @@ function createJourneyPreparation(options) {
7936
8026
  }
7937
8027
  };
7938
8028
  }
8029
+ /** Ray, 2026-11-05: two automatic retries per Work, after two then five seconds. */
8030
+ const workRetryDelaysMs = [2e3, 5e3];
8031
+ async function waitForWorkRetry(milliseconds, signal) {
8032
+ await setTimeout$1(milliseconds, void 0, { signal }).catch(() => signal.throwIfAborted());
8033
+ }
7939
8034
  /** How often a run waiting for grouping to publish more Works checks the journey (E2). */
7940
8035
  const laterWorksPollMs = 2e3;
7941
8036
  /**
@@ -8716,7 +8811,7 @@ function createJourneyRenderer(options) {
8716
8811
  return {
8717
8812
  ...current,
8718
8813
  works,
8719
- phase: current.phase === "paused" ? "paused" : current.readingComplete && works.every((item) => !isSelectedWork(item) || item.status === "ready") ? "ready" : current.phase
8814
+ phase: current.phase === "paused" ? "paused" : current.readingComplete && works.every((item) => !isIncludedWork(item) || item.status === "ready") ? "ready" : current.phase
8720
8815
  };
8721
8816
  });
8722
8817
  }
@@ -1,7 +1,7 @@
1
1
  import { ln as sessionSchema } from "./locate-JYtFmKu-.mjs";
2
2
  import { t as createZstdFrameCheck$1 } from "./frame-DGun31Uc.mjs";
3
- import "./src-C1SjCDx0.mjs";
4
- import { a as isRecord } from "./model-CmHypB0p.mjs";
3
+ import "./src--Ln5GHdz.mjs";
4
+ import { a as isRecord } from "./model-C1VzgKLi.mjs";
5
5
  import { constants } from "node:fs";
6
6
  import { z } from "zod";
7
7
  import { lstat, open, stat } from "node:fs/promises";
@@ -1353,6 +1353,19 @@ function isSelectedWork(work) {
1353
1353
  function isClassifying(state) {
1354
1354
  return state.works.some((work) => work.placement === "classifying");
1355
1355
  }
1356
+ /**
1357
+ * A Work whose read failed: it is skipped for this Send without a decision (ADR 0236). It holds no
1358
+ * reading, card, packaging or Send gate and is never sent; Retry or a move out of Drop reads it
1359
+ * again. A pending Hide also blocks the Works it changes, but those wait for its recovery and are
1360
+ * not skipped. The Skill helpers mirror this rule in `journey-state.mjs`.
1361
+ */
1362
+ function isSkippedWork(work) {
1363
+ return work.status === "blocked" && !work.blockedCodes.includes("PRIVACY_CHANGE_PENDING");
1364
+ }
1365
+ /** A selected Work that is not skipped (ADR 0236). */
1366
+ function isIncludedWork(work) {
1367
+ return isSelectedWork(work) && !isSkippedWork(work);
1368
+ }
1356
1369
  function selectedWorks(state) {
1357
1370
  return state.works.filter(isSelectedWork);
1358
1371
  }
@@ -1368,9 +1381,9 @@ function hasCertifiedNoBatchReview(work, snapshotId) {
1368
1381
  const roots = proofs.flatMap((proof) => proof.rootSessionIds);
1369
1382
  return roots.length === work.rootSessionIds.length && new Set(roots).size === roots.length && work.rootSessionIds.every((id) => roots.includes(id));
1370
1383
  }
1371
- /** Reading completes over selected Works once the person has confirmed the scan scope. */
1384
+ /** Reading completes over included Works once the person has confirmed the scan scope. */
1372
1385
  function isReadingComplete(state) {
1373
- return state.scope.status === "confirmed" && state.works.length > 0 && !isClassifying(state) && selectedWorks(state).every((work) => work.status !== "pending" && work.status !== "blocked" && (work.totalBatches > 0 || hasCertifiedNoBatchReview(work, state.snapshotId)) && work.completedBatches === work.totalBatches);
1386
+ return state.scope.status === "confirmed" && state.works.length > 0 && !isClassifying(state) && state.works.filter(isIncludedWork).every((work) => work.status !== "pending" && work.status !== "blocked" && (work.totalBatches > 0 || hasCertifiedNoBatchReview(work, state.snapshotId)) && work.completedBatches === work.totalBatches);
1374
1387
  }
1375
1388
  /** Recompute completion after a selection or reading change without leaving a paused/send phase. */
1376
1389
  function withReadingProgress(state) {
@@ -2092,11 +2105,11 @@ function privacyDecisionDigest(state) {
2092
2105
  return digest;
2093
2106
  }
2094
2107
  function assertJourneyScanned(state) {
2095
- if (!state.consent || state.scope.status !== "confirmed" || !state.readingComplete || state.works.some((work) => work.access !== "drop" && work.rootSessionIds.length > 0 && (!work.classificationMetadata || work.totalBatches === 0 && !hasCertifiedNoBatchReview(work, state.snapshotId) || work.completedBatches !== work.totalBatches || work.status === "blocked"))) throw new ApplicationError("SCOPE_NOT_READY");
2108
+ if (!state.consent || state.scope.status !== "confirmed" || !state.readingComplete || state.works.some((work) => isIncludedWork(work) && (!work.classificationMetadata || work.totalBatches === 0 && !hasCertifiedNoBatchReview(work, state.snapshotId) || work.completedBatches !== work.totalBatches || work.status === "blocked"))) throw new ApplicationError("SCOPE_NOT_READY");
2096
2109
  }
2097
2110
  /** Track B (ADR 0172): preview and packaging need every selected Work's static base. */
2098
2111
  function assertJourneyStaticReady(state) {
2099
- if (state.works.some((work) => work.access !== "drop" && work.rootSessionIds.length > 0 && !hasCurrentStaticReview(state, work))) throw new ApplicationError("SCOPE_NOT_READY");
2112
+ if (state.works.some((work) => work.access !== "drop" && work.rootSessionIds.length > 0 && !isSkippedWork(work) && !hasCurrentStaticReview(state, work))) throw new ApplicationError("SCOPE_NOT_READY");
2100
2113
  }
2101
2114
  /** Cards need only Track A, AI review and metadata; this final gate also needs Track B. */
2102
2115
  function assertJourneyPrivacyReady(state, packaging = false) {
@@ -5445,9 +5458,13 @@ function respondToJourney(state, action, source, now, decision, preferenceScope)
5445
5458
  if (!state.works.some((work) => work.id === workId)) throw new ApplicationError("UNKNOWN_WORKSPACE");
5446
5459
  if (action.kind === "work-type") return setWorkType(state, workId, action.type, decision);
5447
5460
  if (action.kind === "retry-work") {
5448
- if (state.works.find((item) => item.id === workId)?.status !== "blocked") throw new ApplicationError("INVALID_TRANSITION");
5461
+ if (state.works.find((item) => item.id === workId)?.status !== "blocked" || state.phase === "sending" || state.phase === "completed") throw new ApplicationError("INVALID_TRANSITION");
5449
5462
  return withReadingProgress({
5450
5463
  ...state,
5464
+ privacy: {
5465
+ ...state.privacy,
5466
+ packageApproval: null
5467
+ },
5451
5468
  works: state.works.map((item) => item.id !== workId ? item : {
5452
5469
  ...item,
5453
5470
  revision: item.revision + 1,
@@ -13278,4 +13295,4 @@ function equivalenceDuplicates(batch) {
13278
13295
  return bindings.sort();
13279
13296
  }
13280
13297
  //#endregion
13281
- export { settingsQuerySchema as $, mergeBRepair as $n, packageCommandSchema as $r, journeyResourceSchema as $t, deviceProfileScopeSchema as A, bContainment as An, staticSessionResourceSchema as Ar, validateAttemptAppend as At, validateInspectionBatch as B, journeyConfirmedHides as Bn, hasCompleteWorkDescription as Br, newJourneyWork as Bt, rebindReviewSubmit as C, renderedHideValue as Cn, privacyDecisionDigest as Cr, sendStartSchema as Ct, createAccount as D, hideKeyId as Dn, hasCurrentStaticReview as Dr, metadataProcessingVersion as Dt, staticallyHiddenFindings as E, addHideIndexTokens as En, nativeRespondSchema as Er, obsoleteJourney as Et, withSourceEvidence as F, confirmedHideGroupIds as Fn, sendArtifactSchema as Fr, applyClassificationProposal as Ft, validateInspectionFence as G, workPrivacyDecisions as Gn, withReadingProgress as Gr, hideFinishSchema as Gt, validateInspectionRequest as H, syncTermGroups as Hn, isReadingComplete as Hr, journeyContextQuerySchema as Ht, agentSetupKey as I, confirmedHideKey as In, sendReceiptSchema as Ir, classificationCommitSchema as It, validateInspectionQuery as J, reviewCandidateResourceSchema as Jn, journeyFindingsSchema as Jr, journeySearchSaveSchema as Jt, validateInspectionHead as K, workCorrectionBinding as Kn, mergePrivacyTerms as Kr, hidePublishSchema as Kt, createApplication as L, confirmedHideKinds as Ln, sendReplaceResultSchema as Lr, classificationPartition as Lt, readAccountAvatarUrl as M, bMaskedHits as Mn, agentSourceSchema as Mr, applyClassification as Mt, storedCredentialSchema as N, bTermMatcher as Nn, agentSourcesSchema as Nr, journeyBatchReadSchema as Nt, accountProfileSchema as O, maximumHideIndexTokens as On, staticReviewDigest as Or, nativeAdapterVersions as Ot, sourceIdentityEvidence as P, bWordBounded as Pn, journeySendSchema as Pr, journeyReviewStorageQuerySchema as Pt, settingsBatchSchema as Q, bReviewDigest as Qn, commandSchema as Qr, journeyResourceQuerySchema as Qt, inspectionCancelSchema as R, confirmedHideTerms as Rn, sendResolutionSchema as Rr, classificationWorks as Rt, rebindReviewOverlay as S, readConfirmedHideChange as Sn, assertJourneyPrivacyReady as Sr, sendPrepareSchema as St, guardedFindingText as T, termHideAdditions as Tn, nativeGetSchema as Tr, currentJourneyAdapters as Tt, inspectionQuerySchema as U, retireWorkDescription as Un, isSelectedWork as Ur, journeyContextSchema as Ut, validateInspectionBatches as V, maskedHitsStale as Vn, isClassifying as Vr, reviewCompileSchema as Vt, validateInspectionClaim as W, workDecisionDigest as Wn, selectedWorks as Wr, hideBeginSchema as Wt, validateDetectionSummary as X, reviewRepairResourceSchema as Xn, journeyRenderInputSchema as Xr, journeyPolicyRespondSchema as Xt, validateInspectionContribution as Y, reviewRepairInputSchema as Yn, journeyPreviewSchema as Yr, searchScopeDigest as Yt, inspectionInputs as Z, reviewTransportBytes as Zn, journeyRenderSchema as Zr, projectPreparationProgress as Zt, projectJourneyInventory as _, journeyCommitResultSchema as _n, preparationSettlementSchema as _r, maximumTermsFileBytes as _t, bCrossSegmentReviewSchema as a, sourceChangePolicy as ai, reviewAttemptsResultSchema as an, scanGitSeedsId as ar, maximumAgentSetupSessions as at, bReviewScope as b, confirmedHideAdditions as bn, journeyClassificationSessionsSchema as br, sendActionSchema as bt, reconstructBFields as c, effectiveTreatmentSchema as ci, sessionReconciliationResourceSchema as cn, scanExclusionResourceSchema as cr, validateFailureLocation as ct, selectedValueMembers as d, selectFrozenConfiguration as di, sessionReviewInputSchema as dn, journeyInventoryQuerySchema as dr, manualUploadChoiceSchema as dt, selectionBatchSchema as ei, journeyIsolateSchema as en, planBRepair as er, readWorkspaceOutcomes as et, splitSelectorValues as f, staticCatalogRef as fi, sessionReviewQuerySchema as fn, journeyInventoryReadSchema as fr, manualUploadPrepareSchema as ft, changeJourney as g, sessionUsefulnessResourceSchema as gn, preparationBeginSchema as gr, emptyTermsRevision as gt, semanticGroupKey as h, sessionUsefulnessInputSchema as hn, emptyPreparationFacts as hr, candidateSortAvailable as ht, validateBCrossSegmentReview as i, stateSchema as ii, reviewAttemptsQuerySchema as in, scanSessionResourceSchema as ir, defaultAgentSetupInclusion as it, profileUrlMatchesIdentity as j, bExceptionRanges as jn, agentSourcePathSegment as jr, journeyGuidance as jt, deviceAuthorizationSchema as k, packHideIndex as kn, staticSessionId as kr, attemptBudgetCodePoints as kt, reviseGroupMembership as l, defaultScopedSettings as li, sessionRereadInputSchema as ln, validateScanExclusion as lr, manualUploadActionSchema as lt, hideScopeDigest as m, sessionReviewStatusSchema as mn, journeyPreparationProgressSchema as mr, manualUploadStartSchema as mt, scanBatchEquivalenceDigest as n, gitMetadataBudgetBytes as ni, sortingApplySchema as nn, scanCanonicalResourceSchema as nr, appendSensitiveTerms as nt, bRereadDigest as o, recommendParallelism as oi, sessionReconcileInputSchema as on, scanGitSeedsResource as or, artifactFailureDetailSchema as ot, activeJourneyTerms as p, sessionReviewResourceSchema as pn, journeyInventorySchema as pr, manualUploadSchema as pt, validateInspectionInputs as q, reviewCandidateInputSchema as qn, journeyFindingImpactSchema as qr, journeySearchResultSchema as qt, locateTermEvidence as r, producerVersion as ri, reviewAttemptResourceSchema as rn, scanPreparationDigest as rr, classifyAgentSetup as rt, reconcileBSession as s, approvedTreatmentSchema as si, sessionReconcileResultSchema as sn, verifiedScanGitSeeds as sr, resolveFailureLocation as st, scanBatchContextDigest as t, selectionSchema as ti, journeyPlaceSchema as tn, scanAliasResourceSchema as tr, reviewInventory as tt, resolveGroupSplit as u, freezeConfiguration as ui, sessionRereadResourceSchema as un, resolveSourceSelection as ur, manualUploadBindingSchema as ut, preparationScope as v, journeyCommitSchema as vn, preparationStartSchema as vr, normalizeSensitiveTerms as vt, reviewBatchReuse as w, settleConfirmedHides as wn, nativeEventsSchema as wr, settleCorrections as wt, rebindReviewAlignment as x, confirmedHideDeltaSchema as xn, applyCardAnswers as xr, sendChoiceSchema as xt, isGenericPublicTerm as y, journeyEventSchema as yn, validatePreparationFacts as yr, replaceSensitiveTermsSchema as yt, inspectionStartSchema as z, dictionaryHides as zn, sendSettingsSchema as zr, retireScanGeneration as zt };
13298
+ export { settingsQuerySchema as $, mergeBRepair as $n, journeyRenderSchema as $r, journeyResourceSchema as $t, deviceProfileScopeSchema as A, bContainment as An, staticSessionResourceSchema as Ar, validateAttemptAppend as At, validateInspectionBatch as B, journeyConfirmedHides as Bn, hasCompleteWorkDescription as Br, newJourneyWork as Bt, rebindReviewSubmit as C, renderedHideValue as Cn, privacyDecisionDigest as Cr, sendStartSchema as Ct, createAccount as D, hideKeyId as Dn, hasCurrentStaticReview as Dr, metadataProcessingVersion as Dt, staticallyHiddenFindings as E, addHideIndexTokens as En, nativeRespondSchema as Er, obsoleteJourney as Et, withSourceEvidence as F, confirmedHideGroupIds as Fn, sendArtifactSchema as Fr, applyClassificationProposal as Ft, validateInspectionFence as G, workPrivacyDecisions as Gn, isSkippedWork as Gr, hideFinishSchema as Gt, validateInspectionRequest as H, syncTermGroups as Hn, isIncludedWork as Hr, journeyContextQuerySchema as Ht, agentSetupKey as I, confirmedHideKey as In, sendReceiptSchema as Ir, classificationCommitSchema as It, validateInspectionQuery as J, reviewCandidateResourceSchema as Jn, mergePrivacyTerms as Jr, journeySearchSaveSchema as Jt, validateInspectionHead as K, workCorrectionBinding as Kn, selectedWorks as Kr, hidePublishSchema as Kt, createApplication as L, confirmedHideKinds as Ln, sendReplaceResultSchema as Lr, classificationPartition as Lt, readAccountAvatarUrl as M, bMaskedHits as Mn, agentSourceSchema as Mr, applyClassification as Mt, storedCredentialSchema as N, bTermMatcher as Nn, agentSourcesSchema as Nr, journeyBatchReadSchema as Nt, accountProfileSchema as O, maximumHideIndexTokens as On, staticReviewDigest as Or, nativeAdapterVersions as Ot, sourceIdentityEvidence as P, bWordBounded as Pn, journeySendSchema as Pr, journeyReviewStorageQuerySchema as Pt, settingsBatchSchema as Q, bReviewDigest as Qn, journeyRenderInputSchema as Qr, journeyResourceQuerySchema as Qt, inspectionCancelSchema as R, confirmedHideTerms as Rn, sendResolutionSchema as Rr, classificationWorks as Rt, rebindReviewOverlay as S, readConfirmedHideChange as Sn, assertJourneyPrivacyReady as Sr, sendPrepareSchema as St, guardedFindingText as T, termHideAdditions as Tn, nativeGetSchema as Tr, currentJourneyAdapters as Tt, inspectionQuerySchema as U, retireWorkDescription as Un, isReadingComplete as Ur, journeyContextSchema as Ut, validateInspectionBatches as V, maskedHitsStale as Vn, isClassifying as Vr, reviewCompileSchema as Vt, validateInspectionClaim as W, workDecisionDigest as Wn, isSelectedWork as Wr, hideBeginSchema as Wt, validateDetectionSummary as X, reviewRepairResourceSchema as Xn, journeyFindingsSchema as Xr, journeyPolicyRespondSchema as Xt, validateInspectionContribution as Y, reviewRepairInputSchema as Yn, journeyFindingImpactSchema as Yr, searchScopeDigest as Yt, inspectionInputs as Z, reviewTransportBytes as Zn, journeyPreviewSchema as Zr, projectPreparationProgress as Zt, projectJourneyInventory as _, journeyCommitResultSchema as _n, preparationSettlementSchema as _r, maximumTermsFileBytes as _t, bCrossSegmentReviewSchema as a, producerVersion as ai, reviewAttemptsResultSchema as an, scanGitSeedsId as ar, maximumAgentSetupSessions as at, bReviewScope as b, confirmedHideAdditions as bn, journeyClassificationSessionsSchema as br, sendActionSchema as bt, reconstructBFields as c, recommendParallelism as ci, sessionReconciliationResourceSchema as cn, scanExclusionResourceSchema as cr, validateFailureLocation as ct, selectedValueMembers as d, defaultScopedSettings as di, sessionReviewInputSchema as dn, journeyInventoryQuerySchema as dr, manualUploadChoiceSchema as dt, commandSchema as ei, journeyIsolateSchema as en, planBRepair as er, readWorkspaceOutcomes as et, splitSelectorValues as f, freezeConfiguration as fi, sessionReviewQuerySchema as fn, journeyInventoryReadSchema as fr, manualUploadPrepareSchema as ft, changeJourney as g, sessionUsefulnessResourceSchema as gn, preparationBeginSchema as gr, emptyTermsRevision as gt, semanticGroupKey as h, sessionUsefulnessInputSchema as hn, emptyPreparationFacts as hr, candidateSortAvailable as ht, validateBCrossSegmentReview as i, gitMetadataBudgetBytes as ii, reviewAttemptsQuerySchema as in, scanSessionResourceSchema as ir, defaultAgentSetupInclusion as it, profileUrlMatchesIdentity as j, bExceptionRanges as jn, agentSourcePathSegment as jr, journeyGuidance as jt, deviceAuthorizationSchema as k, packHideIndex as kn, staticSessionId as kr, attemptBudgetCodePoints as kt, reviseGroupMembership as l, approvedTreatmentSchema as li, sessionRereadInputSchema as ln, validateScanExclusion as lr, manualUploadActionSchema as lt, hideScopeDigest as m, staticCatalogRef as mi, sessionReviewStatusSchema as mn, journeyPreparationProgressSchema as mr, manualUploadStartSchema as mt, scanBatchEquivalenceDigest as n, selectionBatchSchema as ni, sortingApplySchema as nn, scanCanonicalResourceSchema as nr, appendSensitiveTerms as nt, bRereadDigest as o, stateSchema as oi, sessionReconcileInputSchema as on, scanGitSeedsResource as or, artifactFailureDetailSchema as ot, activeJourneyTerms as p, selectFrozenConfiguration as pi, sessionReviewResourceSchema as pn, journeyInventorySchema as pr, manualUploadSchema as pt, validateInspectionInputs as q, reviewCandidateInputSchema as qn, withReadingProgress as qr, journeySearchResultSchema as qt, locateTermEvidence as r, selectionSchema as ri, reviewAttemptResourceSchema as rn, scanPreparationDigest as rr, classifyAgentSetup as rt, reconcileBSession as s, sourceChangePolicy as si, sessionReconcileResultSchema as sn, verifiedScanGitSeeds as sr, resolveFailureLocation as st, scanBatchContextDigest as t, packageCommandSchema as ti, journeyPlaceSchema as tn, scanAliasResourceSchema as tr, reviewInventory as tt, resolveGroupSplit as u, effectiveTreatmentSchema as ui, sessionRereadResourceSchema as un, resolveSourceSelection as ur, manualUploadBindingSchema as ut, preparationScope as v, journeyCommitSchema as vn, preparationStartSchema as vr, normalizeSensitiveTerms as vt, reviewBatchReuse as w, settleConfirmedHides as wn, nativeEventsSchema as wr, settleCorrections as wt, rebindReviewAlignment as x, confirmedHideDeltaSchema as xn, applyCardAnswers as xr, sendChoiceSchema as xt, isGenericPublicTerm as y, journeyEventSchema as yn, validatePreparationFacts as yr, replaceSensitiveTermsSchema as yt, inspectionStartSchema as z, dictionaryHides as zn, sendSettingsSchema as zr, retireScanGeneration as zt };
@@ -1,6 +1,6 @@
1
1
  import { $n as detectStatic, An as createReplacementKey, Bn as nativeItems, En as walkNativeFields, Fn as entityDictionaryVersion, Gn as validateProfile, H as codePointLength, Hn as transformRecords, In as nativeParserVersion, Jn as validatePlan, Ln as redactionImplementationVersion, Mn as projectNativeRecord, Nn as parseNativeRecord, Pn as cleanupImplementationVersion, Qn as resolveLimits, Qt as safeCode, Un as frameRecords, V as bDigest, Vn as nativeText, Wn as retainedMainTextNodes, Xn as defaultLimits, Xt as ApplicationError, Zn as recordPointerLimits, _n as reviewRoles, bn as createSessionPreparation, c as textDigest, dr as fail$1, fn as nativeSourceIdentitySchema, fr as isProcessingCode, gn as mainReviewRole, hn as projectNativeReviewInput, in as sourceKey, ir as createEntityMatcher, j as bDuplicateShift, jn as sessionNonce, k as bBindingCap, lr as defaultDetectionLimits, mn as processNativeRecord, nn as reviewFamilies, nr as jsonSpans, o as reviewDigest, on as sourceSnapshotId, pn as withMandatoryCustomTerms, qn as buildPlan, rr as agentContextLocation, tn as familySelected, ur as ProcessingError, vn as createSentenceContext, wn as createDetectionSummary, x as createBAnalysisUnits, xn as bindInspection, yn as renderNative, zn as nativeField } from "./locate-JYtFmKu-.mjs";
2
2
  import { t as createZstdFrameCheck } from "./frame-DGun31Uc.mjs";
3
- import { An as bContainment, Dt as metadataProcessingVersion, F as withSourceEvidence, I as agentSetupKey, Mr as agentSourceSchema, P as sourceIdentityEvidence, Pn as bWordBounded, ai as sourceChangePolicy, fi as staticCatalogRef, it as defaultAgentSetupInclusion, jn as bExceptionRanges, jr as agentSourcePathSegment, rt as classifyAgentSetup, si as approvedTreatmentSchema, ur as resolveSourceSelection } from "./src-C1SjCDx0.mjs";
3
+ import { An as bContainment, Dt as metadataProcessingVersion, F as withSourceEvidence, I as agentSetupKey, Mr as agentSourceSchema, P as sourceIdentityEvidence, Pn as bWordBounded, it as defaultAgentSetupInclusion, jn as bExceptionRanges, jr as agentSourcePathSegment, li as approvedTreatmentSchema, mi as staticCatalogRef, rt as classifyAgentSetup, si as sourceChangePolicy, ur as resolveSourceSelection } from "./src--Ln5GHdz.mjs";
4
4
  import { constants } from "node:fs";
5
5
  import { link, lstat, mkdir, open, readFile, readdir, realpath, rm, rmdir, stat, unlink } from "node:fs/promises";
6
6
  import { execFile, fork, spawn } from "node:child_process";
@@ -1,7 +1,7 @@
1
1
  import { Bn as nativeItems, En as walkNativeFields, Nn as parseNativeRecord, Rn as nativeBoolean, Vn as nativeText, Wn as retainedMainTextNodes, Xn as defaultLimits, an as observeSource, on as sourceSnapshotId, ur as ProcessingError, zn as nativeField } from "./locate-JYtFmKu-.mjs";
2
- import { Ot as nativeAdapterVersions, ni as gitMetadataBudgetBytes, tt as reviewInventory } from "./src-C1SjCDx0.mjs";
3
- import { a as isRecord, i as errorCode, n as checkDiscoveryAbort, o as unresolvedMetadata, r as discoveryBounds, t as DiscoveryWarnings } from "./model-CmHypB0p.mjs";
4
- import { c as previewLimits, d as checkOpenSource, f as checkSource, h as openSource, i as pageFits, l as previewSourceVersion, m as noSymlinks, p as fileSnapshot, r as previewHeapLimits, s as previewMessageSchema, u as createZstdFrameCheck } from "./run-DvRM-NR8.mjs";
2
+ import { Ot as nativeAdapterVersions, ii as gitMetadataBudgetBytes, tt as reviewInventory } from "./src--Ln5GHdz.mjs";
3
+ import { a as isRecord, i as errorCode, n as checkDiscoveryAbort, o as unresolvedMetadata, r as discoveryBounds, t as DiscoveryWarnings } from "./model-C1VzgKLi.mjs";
4
+ import { c as previewLimits, d as checkOpenSource, f as checkSource, h as openSource, i as pageFits, l as previewSourceVersion, m as noSymlinks, p as fileSnapshot, r as previewHeapLimits, s as previewMessageSchema, u as createZstdFrameCheck } from "./run-hQ_W2p_Y.mjs";
5
5
  import { a as titleHintLimits, n as titleHeapLimits, o as titleInputSchema, r as decodeTitleError, s as titleReplySchema } from "./heap-1FYhGds4.mjs";
6
6
  import { constants } from "node:fs";
7
7
  import { lstat, open, opendir, readFile, readdir, realpath, stat } from "node:fs/promises";
@@ -1,4 +1,4 @@
1
- import { i as createExecutor, t as assertStoreHeap } from "./heap-NDnGBXH6.mjs";
1
+ import { i as createExecutor, t as assertStoreHeap } from "./heap-DY5n4EVC.mjs";
2
2
  import { parentPort } from "node:worker_threads";
3
3
  //#region packages/local-host/src/store/worker/entry.ts
4
4
  if (!parentPort) throw new Error("STORE_WORKER_REQUIRED");