@gitroll/tacitt-cli 0.6.14 → 0.6.15

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 (37) hide show
  1. package/dist/{agent-setup-CEPQfjBv.mjs → agent-setup-Bv73EZ2b.mjs} +2 -2
  2. package/dist/agent-setup-worker.mjs +5 -5
  3. package/dist/cli.mjs +10 -10
  4. package/dist/codex-title-worker.mjs +1 -1
  5. package/dist/configured-preview-worker.mjs +5 -5
  6. package/dist/configured-session-worker.mjs +5 -5
  7. package/dist/{frame-CRm99088.mjs → frame-0v_mLdvG.mjs} +1 -1
  8. package/dist/{heap-Bh9tySJp.mjs → heap-aWke8lrK.mjs} +3 -3
  9. package/dist/inspection-worker.mjs +4 -4
  10. package/dist/{job-CsWKWcM4.mjs → job-ILnqW1ge.mjs} +4 -4
  11. package/dist/{locate-CP2t26j2.mjs → locate-LpCex6Xj.mjs} +5 -94
  12. package/dist/{model-ChHuVKoB.mjs → model-BEWsfkIU.mjs} +1 -1
  13. package/dist/operation-executor.mjs +3 -3
  14. package/dist/preview-worker.mjs +1 -1
  15. package/dist/privacy-validator.mjs +1 -1
  16. package/dist/{query-D28k3XOr.mjs → query-BX8QwaBi.mjs} +93 -9
  17. package/dist/{run-CiJmV__5.mjs → run-P_uZgSYa.mjs} +4 -4
  18. package/dist/{src-B3il9x5F.mjs → src-CHy3-siB.mjs} +59 -26
  19. package/dist/{src-CWMrGXJK.mjs → src-ikYI-1c5.mjs} +4 -4
  20. package/dist/{src-CmvEJj46.mjs → src-sERffIem.mjs} +8 -31
  21. package/dist/store-database-worker.mjs +1 -1
  22. package/package.json +1 -1
  23. package/skills/tacitt/SKILL.md +1 -1
  24. package/skills/tacitt/references/bootstrap.md +1 -1
  25. package/skills/tacitt/references/classification.md +2 -0
  26. package/skills/tacitt/references/commands.md +5 -4
  27. package/skills/tacitt/references/journey.md +2 -2
  28. package/skills/tacitt/references/parallel-review.md +3 -3
  29. package/skills/tacitt/scripts/INDEX.md +4 -4
  30. package/skills/tacitt/scripts/journey-classification-progress.mjs +6 -0
  31. package/skills/tacitt/scripts/journey-classification-tasks.mjs +9 -1
  32. package/skills/tacitt/scripts/journey-classification-validation.d.mts +14 -1
  33. package/skills/tacitt/scripts/journey-classification-validation.mjs +45 -0
  34. package/skills/tacitt/scripts/journey-consolidation-submit.mjs +22 -5
  35. package/skills/tacitt/scripts/journey-scan-timing.mjs +1 -1
  36. package/skills/tacitt/scripts/journey.mjs +15 -7
  37. package/skills/tacitt/scripts/review.mjs +2 -2
@@ -1,5 +1,5 @@
1
- import "./locate-CP2t26j2.mjs";
2
- import "./src-B3il9x5F.mjs";
1
+ import "./locate-LpCex6Xj.mjs";
2
+ import "./src-CHy3-siB.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 { Q as listAgentSetup } from "./src-CmvEJj46.mjs";
2
- import { In as createStaticProcessor, bn as workspaceSchema, vn as sessionSchema } from "./locate-CP2t26j2.mjs";
3
- import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-CWMrGXJK.mjs";
4
- import { Li as effectiveTreatmentSchema, ct as maximumAgentSetupSessions } from "./src-B3il9x5F.mjs";
5
- import "./agent-setup-CEPQfjBv.mjs";
1
+ import { Q as listAgentSetup } from "./src-sERffIem.mjs";
2
+ import { In as createStaticProcessor, bn as workspaceSchema, vn as sessionSchema } from "./locate-LpCex6Xj.mjs";
3
+ import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-ikYI-1c5.mjs";
4
+ import { Ri as effectiveTreatmentSchema, ct as maximumAgentSetupSessions } from "./src-CHy3-siB.mjs";
5
+ import "./agent-setup-Bv73EZ2b.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,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { _ as permissionDiagnostic, a as readAgentPresence, d as packageIdentity, f as createRenderActivity, g as longCommands, h as businessCommands, i as invoke, l as serveDetached, m as parseOptions, n as readOperation, o as createRuntime, p as helpText, r as waitOperation, s as executorEventSchema, t as cancelOperation, u as guardDetachedStartup, v as startupFailure, y as traceStartup } from "./query-D28k3XOr.mjs";
3
- import { ct as openPrivateFile, st as makePrivateDirectory } from "./src-CmvEJj46.mjs";
4
- import { B as inBackgroundStatusPoll, F as startHost, N as readStateDump, P as createExecutionPort } from "./job-CsWKWcM4.mjs";
5
- import { an as ApplicationError, cn as safeField, sn as safeCode } from "./locate-CP2t26j2.mjs";
6
- import { Fr as hostDrives, Ni as stateSchema, Nr as awaitingPassport, rt as readWorkspaceOutcomes, ut as resolveFailureLocation, yn as reviewTransportBytes } from "./src-B3il9x5F.mjs";
7
- import { vt as isCoordinationBusy } from "./heap-Bh9tySJp.mjs";
2
+ import { _ as permissionDiagnostic, a as readAgentPresence, d as packageIdentity, f as createRenderActivity, g as longCommands, h as businessCommands, i as invoke, l as serveDetached, m as parseOptions, n as readOperation, o as createRuntime, p as helpText, r as waitOperation, s as executorEventSchema, t as cancelOperation, u as guardDetachedStartup, v as startupFailure, y as traceStartup } from "./query-BX8QwaBi.mjs";
3
+ import { ct as openPrivateFile, st as makePrivateDirectory } from "./src-sERffIem.mjs";
4
+ import { B as inBackgroundStatusPoll, F as startHost, N as readStateDump, P as createExecutionPort } from "./job-ILnqW1ge.mjs";
5
+ import { an as ApplicationError, cn as safeField, sn as safeCode } from "./locate-LpCex6Xj.mjs";
6
+ import { Ir as hostDrives, Pi as stateSchema, Pr as awaitingPassport, rt as readWorkspaceOutcomes, ut as resolveFailureLocation, yn as reviewTransportBytes } from "./src-CHy3-siB.mjs";
7
+ import { vt as isCoordinationBusy } from "./heap-aWke8lrK.mjs";
8
8
  import { constants, createReadStream, write } from "node:fs";
9
9
  import { z } from "zod";
10
10
  import { lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, writeFile } from "node:fs/promises";
@@ -804,11 +804,11 @@ function configureText(agent, source) {
804
804
  const field = agent === "claude" ? "CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS" : Object.hasOwn(section, "max_concurrent_threads_per_session") || !Object.hasOwn(section, "max_threads") ? "max_concurrent_threads_per_session" : "max_threads";
805
805
  const current = section[field];
806
806
  const count = current === void 0 ? void 0 : agent === "claude" ? z.string().regex(/^\d+$/).transform(Number).pipe(z.number().int().positive().safe()).parse(current) : z.number().int().positive().safe().parse(current);
807
- if (count !== void 0 && count >= 24) return {
807
+ if (count !== void 0 && count >= 48) return {
808
808
  text: source,
809
809
  count
810
810
  };
811
- const target = agent === "claude" ? String(24) : 24;
811
+ const target = agent === "claude" ? String(48) : 48;
812
812
  const updated = {
813
813
  ...data,
814
814
  [key]: {
@@ -824,7 +824,7 @@ function configureText(agent, source) {
824
824
  if (object.parse(check[key])[field] !== target) throw new Error("CONFIG_READBACK_FAILED");
825
825
  return {
826
826
  text,
827
- count: 24
827
+ count: 48
828
828
  };
829
829
  } catch (cause) {
830
830
  throw new Error("AGENT_CONFIG_INVALID", { cause });
@@ -841,7 +841,7 @@ async function askAgentConfiguration(clients, scope) {
841
841
  terminal: true
842
842
  });
843
843
  try {
844
- process.stderr.write(`Tacitt CLI uses up to 24 analysis subagents for faster review.\nRaise the concurrent subagent limit to 24 for ${names}? Higher limits can increase concurrent usage.
844
+ process.stderr.write(`Tacitt CLI uses up to 48 analysis subagents for faster review.\nRaise the concurrent subagent limit to 48 for ${names}? Higher limits can increase concurrent usage.
845
845
  ` + (scope === "user" ? "This changes your client settings across projects.\n" : "This changes client settings for this project.\n") + "Save your work and fully restart the affected App or CLI afterward. We will not close it for you.\nAllow this change? [y/N] ");
846
846
  return await new Promise((resolve) => {
847
847
  terminal.once("line", (line) => resolve(/^y(?:es)?$/i.test(line.trim())));
@@ -1,4 +1,4 @@
1
- import { i as errorCode } from "./model-ChHuVKoB.mjs";
1
+ import { i as errorCode } from "./model-BEWsfkIU.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 { $ as createConfiguredPreviewStream } from "./src-CmvEJj46.mjs";
2
- import { In as createStaticProcessor, bn as workspaceSchema, vn as sessionSchema } from "./locate-CP2t26j2.mjs";
3
- import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-CWMrGXJK.mjs";
4
- import { Li as effectiveTreatmentSchema } from "./src-B3il9x5F.mjs";
5
- import { a as classifyRecord, n as assertPreviewHeap, t as runPreview } from "./run-CiJmV__5.mjs";
1
+ import { $ as createConfiguredPreviewStream } from "./src-sERffIem.mjs";
2
+ import { In as createStaticProcessor, bn as workspaceSchema, vn as sessionSchema } from "./locate-LpCex6Xj.mjs";
3
+ import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-ikYI-1c5.mjs";
4
+ import { Ri as effectiveTreatmentSchema } from "./src-CHy3-siB.mjs";
5
+ import { a as classifyRecord, n as assertPreviewHeap, t as runPreview } from "./run-P_uZgSYa.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 { N as runConfiguredSessionJob, V as gitSeedsProvider, _ as captureConfiguredSessionJob, at as safeError, f as runConfiguredScanJob } from "./src-CmvEJj46.mjs";
2
- import { d as runJourneyBaseJob, i as runJourneyOutputVerifyJob, n as runJourneyOutputJob, r as runJourneyOutputShardJob } from "./job-CsWKWcM4.mjs";
3
- import { Cr as processingSite, In as createStaticProcessor, sn as safeCode } from "./locate-CP2t26j2.mjs";
4
- import { l as createNativeAdapters } from "./src-CWMrGXJK.mjs";
5
- import "./src-B3il9x5F.mjs";
1
+ import { N as runConfiguredSessionJob, V as gitSeedsProvider, _ as captureConfiguredSessionJob, at as safeError, f as runConfiguredScanJob } from "./src-sERffIem.mjs";
2
+ import { d as runJourneyBaseJob, i as runJourneyOutputVerifyJob, n as runJourneyOutputJob, r as runJourneyOutputShardJob } from "./job-ILnqW1ge.mjs";
3
+ import { Cr as processingSite, In as createStaticProcessor, sn as safeCode } from "./locate-LpCex6Xj.mjs";
4
+ import { l as createNativeAdapters } from "./src-ikYI-1c5.mjs";
5
+ import "./src-CHy3-siB.mjs";
6
6
  import { parentPort } from "node:worker_threads";
7
7
  //#region packages/artifact/src/configured/parallel/spool-claim.ts
8
8
  /** A worker may create a named file only after the host has recorded its cleanup ownership. */
@@ -1,4 +1,4 @@
1
- import { yr as ProcessingError } from "./locate-CP2t26j2.mjs";
1
+ import { yr as ProcessingError } from "./locate-LpCex6Xj.mjs";
2
2
  //#region packages/processing/src/compression/frame.ts
3
3
  function createZstdFrameCheck(fail = () => {
4
4
  throw new ProcessingError("PROCESSING_INVALID_RECORD");
@@ -1,6 +1,6 @@
1
- import { C as writePrivateReviewPayload, ct as openPrivateFile, lt as restrictToOwner, ot as exclusiveLock, ut as windowsOwnerOnly, w as readPrivateReviewPayload } from "./src-CmvEJj46.mjs";
2
- import { Bt as reviewTermsResultSchema, C as validateBReview, Ft as privacyTermSchema, It as emptyReviewCorrectionResultSchema, Lt as emptyReviewCorrectionSchema, M as semanticFindingSchema, Nn as createDetectionSummary, Rt as journeyTermSchema, St as journeyWorkSuggestionSchema, Wt as termTypeSchema, an as ApplicationError, b as validateReviewAlignment, c as reviewBatchSchema, d as reviewSubmitSchema, dn as reviewFamilies, dt as journeyIdSchema, f as textDigest, gn as fileIdentitySchema, gt as nativeJourneySchema, h as reviewAlignmentAudit, lr as isStaticCategory, lt as journeyDigestSchema, m as findingReferenceKey, p as validateReview, s as reviewBatchChunks, u as reviewDigest, un as familySelected, ur as staticCategories, v as reviewAlignmentSchema, vt as journeyGuidanceSchema, x as bContextEvidence, xt as journeyDescribeSchema, zt as reviewTermsInputSchema } from "./locate-CP2t26j2.mjs";
3
- import { $ as validateDetectionSummary, $t as journeyPlaceSchema, At as validateAttemptAppend, Bn as journeySearchResultSchema, Bt as newJourneyWork, Ci as bMaskedHits, Cn as scanAliasResourceSchema, Cr as assertJourneyPrivacyReady, Dn as scanGitSeedsId, En as scanSessionResourceSchema, Fn as journeyInventoryReadSchema, Ft as classificationCommitSchema, Gn as journeyEventSchema, Gt as hideFinishSchema, Hn as searchScopeDigest, Ht as journeyContextQuerySchema, In as journeyInventorySchema, J as validateInspectionFence, Jt as sendOutputQuerySchema, Kr as staticSessionId, Kt as hidePublishSchema, Ln as journeyPreparationProgressSchema, Lr as obsoleteJourney, Mt as journeyBatchReadSchema, Ni as stateSchema, Nn as projectPreparationProgress, Nt as journeyReviewStorageQuerySchema, Ot as settleCorrections, Pt as applyClassificationProposal, Q as validateInspectionContribution, Qt as journeyIsolateSchema, Rr as sendOwesPassport, Sr as applyCardAnswers, Tr as reconcileReaderKeeps, U as validateInspectionBatch, Un as journeyCommitResultSchema, Ur as mergePrivacyTerms, Ut as journeyContextSchema, Vn as journeySearchSaveSchema, W as validateInspectionBatches, Wn as journeyCommitSchema, Wt as hideBeginSchema, X as validateInspectionInputs, Xn as settleConfirmedHides, Xt as journeyResourceQuerySchema, Y as validateInspectionHead, Yt as sendOutputSchema, Z as validateInspectionQuery, Zr as journeySendSchema, Zt as journeyResourceSchema, _i as dictionaryHides, an as sessionReconcileResultSchema, bi as syncTermGroups, bn as bReviewDigest, c as reconstructBFields, ci as isSelectedWork, cn as sessionRereadResourceSchema, cr as preparationPermissionSchema, d as resolveGroupSplit, dn as sessionReviewResourceSchema, dr as preparationStateSchema, en as sortingApplySchema, et as inspectionInputs, fi as withReadingProgress, fn as sessionReviewStatusSchema, fr as preparationUpdateSchema, g as semanticGroupKey, gi as confirmedHideTerms, gn as reviewCandidateResourceSchema, gt as manualUploadSchema, h as hideScopeDigest, ii as hasCompleteWorkDescription, ir as workPrivacyDecisions, jn as validateScanExclusion, jt as journeyGuidance, kt as attemptBudgetCodePoints, l as chooseCheapPlacement, li as isSkippedWork, lr as preparationSettlementSchema, mi as confirmedHideKey, mn as sessionUsefulnessResourceSchema, ni as sendSessionUploadSchema, nn as reviewAttemptsQuerySchema, nr as retireWorkDescription, o as bRereadDigest, on as sessionReconciliationResourceSchema, pi as confirmedHideGroupIds, pn as sessionUsefulnessInputSchema, pr as validatePreparationFacts, pt as manualUploadBindingSchema, q as validateInspectionClaim, qn as confirmedHideDeltaSchema, qt as journeyPolicyRespondSchema, rn as reviewAttemptsResultSchema, rr as workDecisionDigest, s as reconcileBSession, si as isReadingComplete, sr as preparationBeginSchema, t as scanBatchContextDigest, tn as reviewAttemptResourceSchema, u as reviseGroupMembership, ui as selectedWorks, un as sessionReviewQuerySchema, ur as preparationStartSchema, v as projectJourneyInventory, vn as reviewRepairResourceSchema, vt as candidateSortAvailable, wn as scanCanonicalResourceSchema, x as bReviewScope, xn as mergeBRepair, y as preparationScope, yi as maskedHitsStale, zr as sendReachedPassport, zt as isolatedWorkId } from "./src-B3il9x5F.mjs";
1
+ import { C as writePrivateReviewPayload, ct as openPrivateFile, lt as restrictToOwner, ot as exclusiveLock, ut as windowsOwnerOnly, w as readPrivateReviewPayload } from "./src-sERffIem.mjs";
2
+ import { Bt as reviewTermsResultSchema, C as validateBReview, Ft as privacyTermSchema, It as emptyReviewCorrectionResultSchema, Lt as emptyReviewCorrectionSchema, M as semanticFindingSchema, Nn as createDetectionSummary, Rt as journeyTermSchema, St as journeyWorkSuggestionSchema, Wt as termTypeSchema, an as ApplicationError, b as validateReviewAlignment, c as reviewBatchSchema, d as reviewSubmitSchema, dn as reviewFamilies, dt as journeyIdSchema, f as textDigest, gn as fileIdentitySchema, gt as nativeJourneySchema, h as reviewAlignmentAudit, lr as isStaticCategory, lt as journeyDigestSchema, m as findingReferenceKey, p as validateReview, s as reviewBatchChunks, u as reviewDigest, un as familySelected, ur as staticCategories, v as reviewAlignmentSchema, vt as journeyGuidanceSchema, x as bContextEvidence, xt as journeyDescribeSchema, zt as reviewTermsInputSchema } from "./locate-LpCex6Xj.mjs";
3
+ import { $ as validateDetectionSummary, $t as journeyPlaceSchema, At as validateAttemptAppend, Bn as journeySearchResultSchema, Br as sendReachedPassport, Bt as newJourneyWork, Cn as scanAliasResourceSchema, Cr as applyCardAnswers, Dn as scanGitSeedsId, En as scanSessionResourceSchema, Er as reconcileReaderKeeps, Fn as journeyInventoryReadSchema, Ft as classificationCommitSchema, Gn as journeyEventSchema, Gt as hideFinishSchema, Hn as searchScopeDigest, Ht as journeyContextQuerySchema, In as journeyInventorySchema, J as validateInspectionFence, Jt as sendOutputQuerySchema, Kt as hidePublishSchema, Ln as journeyPreparationProgressSchema, Mt as journeyBatchReadSchema, Nn as projectPreparationProgress, Nt as journeyReviewStorageQuerySchema, Ot as settleCorrections, Pi as stateSchema, Pt as applyClassificationProposal, Q as validateInspectionContribution, Qr as journeySendSchema, Qt as journeyIsolateSchema, Rr as obsoleteJourney, U as validateInspectionBatch, Un as journeyCommitResultSchema, Ut as journeyContextSchema, Vn as journeySearchSaveSchema, W as validateInspectionBatches, Wn as journeyCommitSchema, Wr as mergePrivacyTerms, Wt as hideBeginSchema, X as validateInspectionInputs, Xn as settleConfirmedHides, Xt as journeyResourceQuerySchema, Y as validateInspectionHead, Yt as sendOutputSchema, Z as validateInspectionQuery, Zt as journeyResourceSchema, _i as confirmedHideTerms, ai as hasCompleteWorkDescription, an as sessionReconcileResultSchema, bi as maskedHitsStale, bn as bReviewDigest, c as reconstructBFields, ci as isReadingComplete, cn as sessionRereadResourceSchema, cr as preparationPermissionSchema, d as resolveGroupSplit, di as selectedWorks, dn as sessionReviewResourceSchema, dr as preparationStateSchema, en as sortingApplySchema, et as inspectionInputs, fn as sessionReviewStatusSchema, fr as preparationUpdateSchema, g as semanticGroupKey, gn as reviewCandidateResourceSchema, gt as manualUploadSchema, h as hideScopeDigest, hi as confirmedHideKey, ir as workPrivacyDecisions, jn as validateScanExclusion, jt as journeyGuidance, kt as attemptBudgetCodePoints, l as chooseCheapPlacement, li as isSelectedWork, lr as preparationSettlementSchema, mi as confirmedHideGroupIds, mn as sessionUsefulnessResourceSchema, nn as reviewAttemptsQuerySchema, nr as retireWorkDescription, o as bRereadDigest, on as sessionReconciliationResourceSchema, pi as withReadingProgress, pn as sessionUsefulnessInputSchema, pr as validatePreparationFacts, pt as manualUploadBindingSchema, q as validateInspectionClaim, qn as confirmedHideDeltaSchema, qr as staticSessionId, qt as journeyPolicyRespondSchema, ri as sendSessionUploadSchema, rn as reviewAttemptsResultSchema, rr as workDecisionDigest, s as reconcileBSession, sr as preparationBeginSchema, t as scanBatchContextDigest, tn as reviewAttemptResourceSchema, u as reviseGroupMembership, ui as isSkippedWork, un as sessionReviewQuerySchema, ur as preparationStartSchema, v as projectJourneyInventory, vi as dictionaryHides, vn as reviewRepairResourceSchema, vt as candidateSortAvailable, wi as bMaskedHits, wn as scanCanonicalResourceSchema, wr as assertJourneyPrivacyReady, x as bReviewScope, xi as syncTermGroups, xn as mergeBRepair, y as preparationScope, zr as sendOwesPassport, zt as isolatedWorkId } from "./src-CHy3-siB.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";
@@ -1,7 +1,7 @@
1
- import { et as createInspectionProcessor } from "./src-CmvEJj46.mjs";
2
- import { In as createStaticProcessor } from "./locate-CP2t26j2.mjs";
3
- import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-CWMrGXJK.mjs";
4
- import { G as validateInspectionRequest } from "./src-B3il9x5F.mjs";
1
+ import { et as createInspectionProcessor } from "./src-sERffIem.mjs";
2
+ import { In as createStaticProcessor } from "./locate-LpCex6Xj.mjs";
3
+ import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-ikYI-1c5.mjs";
4
+ import { G as validateInspectionRequest } from "./src-CHy3-siB.mjs";
5
5
  import "./messages-D3m3bhva.mjs";
6
6
  import { z } from "zod";
7
7
  import { parentPort, workerData } from "node:worker_threads";
@@ -1,7 +1,7 @@
1
- import { E as readConfiguredSearchFields, F as parseCollectionWorkspaceSummary, K as readConfiguredOutputInfo, M as renderJobDigest, O as checkReusableBundle, P as readCollectionIndex, S as writeLogicalJourneyBase, U as writeLogicalJourneyOutput, V as gitSeedsProvider, ct as openPrivateFile, dt as isWindowsAclFailure, k as prepareCollectionProduction, m as writeOutputShard, p as verifyOutputShard, st as makePrivateDirectory, ut as windowsOwnerOnly, z as privateCollectionDirectory } from "./src-CmvEJj46.mjs";
2
- import { C as validateBReview, J as bAnchorKey, Ut as termTypeInfo, X as bDigest, Xt as journeyProfileAddressActionSchema, Z as codePointLength, Zt as journeyProfileLinksActionSchema, an as ApplicationError, cn as safeField, d as reviewSubmitSchema, dn as reviewFamilies, en as passportAddressSchema, f as textDigest, i as matchesReadReceipts, j as bUnitFragments, n as runOccurrences, o as compileBFindings, p as validateReview, qt as filterInventoryByPeriod, r as termSearchRuns, s as reviewBatchChunks, sn as safeCode, t as locateTerms, tt as utf16Offset, xt as journeyDescribeSchema, y as reviewFindingsDigest, z as bClassificationKey, zt as reviewTermsInputSchema } from "./locate-CP2t26j2.mjs";
3
- import { $n as hideKeyId, $t as journeyPlaceSchema, Ai as selectionSchema, Bi as selectFrozenConfiguration, C as rebindReviewOverlay, Ct as sendActionSchema, D as staticallyHiddenFindings, Di as commandSchema, Dr as nativeEventsSchema, Dt as sendStartSchema, E as guardedFindingText, Et as sendRequestSchema, H as inspectionStartSchema, Ht as journeyContextQuerySchema, Jn as readConfirmedHideChange, K as inspectionQuerySchema, Kn as confirmedHideAdditions, Mi as producerVersion, Ni as stateSchema, Nt as journeyReviewStorageQuerySchema, Oi as packageCommandSchema, Or as nativeGetSchema, Pn as journeyInventoryQuerySchema, Qn as addHideIndexTokens, Ri as defaultScopedSettings, S as rebindReviewAlignment, Sn as planBRepair, St as replaceSensitiveTermsSchema, T as reviewBatchReuse, Tt as sendPrepareSchema, V as inspectionCancelSchema, Vt as reviewCompileSchema, Xt as journeyResourceQuerySchema, Yn as renderedHideValue, Zn as termHideAdditions, _n as reviewRepairInputSchema, _r as journeyPreviewSchema, _t as manualUploadStartSchema, a as bCrossSegmentReviewSchema, b as isGenericPublicTerm, bn as bReviewDigest, bt as maximumTermsFileBytes, c as reconstructBFields, ci as isSelectedWork, f as selectedValueMembers, fi as withReadingProgress, ft as manualUploadActionSchema, gn as reviewCandidateResourceSchema, gr as journeyFindingsSchema, hn as reviewCandidateInputSchema, hr as journeyFindingImpactSchema, ht as manualUploadPrepareSchema, i as validateBCrossSegmentReview, in as sessionReconcileInputSchema, jr as retryReviewActionSchema, ki as selectionBatchSchema, kr as nativeRespondSchema, ln as sessionReviewInputSchema, mr as journeyClassificationSessionsSchema, mt as manualUploadChoiceSchema, n as scanBatchEquivalenceDigest, nt as settingsQuerySchema, o as bRereadDigest, p as splitSelectorValues, pi as confirmedHideGroupIds, pn as sessionUsefulnessInputSchema, qr as staticSessionResourceSchema, qt as journeyPolicyRespondSchema, r as locateTermEvidence, rt as readWorkspaceOutcomes, s as reconcileBSession, sn as sessionRereadInputSchema, t as scanBatchContextDigest, tn as reviewAttemptResourceSchema, tr as packHideIndex, tt as settingsBatchSchema, un as sessionReviewQuerySchema, ut as resolveFailureLocation, vn as reviewRepairResourceSchema, vr as journeyRenderInputSchema, w as rebindReviewSubmit, wt as sendChoiceSchema, x as bReviewScope, yi as maskedHitsStale, yr as journeyRenderSchema, zi as freezeConfiguration } from "./src-B3il9x5F.mjs";
4
- import { $ as validateState, A as resourceSelectionQuerySchema, B as termReuseQuerySchema, C as loadAcceptedReview, D as aggregateUsefulness, E as loadPrivateResource, F as validateUnitCandidate, G as validateBatchBody, H as privateReviewHash, I as reuseQuerySchema, J as ownership, K as requireActiveBatch, L as batchQuery, M as evaluateUnitEvidence, N as sameCandidateRequest, O as sessionUsefulnessRecommendation, P as validateCandidateAttempt, Q as readStoredState, R as isPrivateResourceKind, S as validateSessionBindings, T as loadBatch, U as batchHeader, V as scanAliasRequestKey, W as createJourneyPayloadFiles, X as withDatabase, Y as validateDatabase, Z as readBundleDirectory, _ as loadReconciliation, _t as errorCode, a as decodeError, at as finishReset, b as validatePreparationSelection, c as dropsAnchor, ct as present, d as parseDelivery, dt as recheckPrivatePath, et as checkVersion, f as validateCandidate, ft as stateDirectory, g as loadPreparedBodies, gt as StoreError, h as loadPreparation, ht as withFileCheckTimings, i as createExecutor, it as databaseName, j as inspectionQuerySchema$1, k as sessionQuery, l as replySchema, lt as privatePath, m as loadStatus, mt as withStateSnapshot, n as releaseInheritedHeapFlags, nt as beginReset, o as ProtocolError, ot as hasResetMarker, p as classificationJourneyCommit, pt as syncDirectory, q as initializeAndClaim, r as storeHeapLimits, rt as createDatabaseFile, s as allowedReplies, st as inspectStateFiles, tt as schemaVersion, u as operations, ut as readResetMarker, v as loadRereadBodies, vt as isCoordinationBusy, w as loadAuthenticatedReview, x as validateSessionReconciliation, y as loadSessionBodies, yt as isSqliteCorruption, z as privateResourceHeader } from "./heap-Bh9tySJp.mjs";
1
+ import { E as readConfiguredSearchFields, F as parseCollectionWorkspaceSummary, K as readConfiguredOutputInfo, M as renderJobDigest, O as checkReusableBundle, P as readCollectionIndex, S as writeLogicalJourneyBase, U as writeLogicalJourneyOutput, V as gitSeedsProvider, ct as openPrivateFile, dt as isWindowsAclFailure, k as prepareCollectionProduction, m as writeOutputShard, p as verifyOutputShard, st as makePrivateDirectory, ut as windowsOwnerOnly, z as privateCollectionDirectory } from "./src-sERffIem.mjs";
2
+ import { C as validateBReview, J as bAnchorKey, Ut as termTypeInfo, X as bDigest, Xt as journeyProfileAddressActionSchema, Z as codePointLength, Zt as journeyProfileLinksActionSchema, an as ApplicationError, cn as safeField, d as reviewSubmitSchema, dn as reviewFamilies, en as passportAddressSchema, f as textDigest, i as matchesReadReceipts, j as bUnitFragments, n as runOccurrences, o as compileBFindings, p as validateReview, qt as filterInventoryByPeriod, r as termSearchRuns, s as reviewBatchChunks, sn as safeCode, t as locateTerms, tt as utf16Offset, xt as journeyDescribeSchema, y as reviewFindingsDigest, z as bClassificationKey, zt as reviewTermsInputSchema } from "./locate-LpCex6Xj.mjs";
3
+ import { $n as hideKeyId, $t as journeyPlaceSchema, Ai as selectionBatchSchema, Ar as nativeRespondSchema, Bi as freezeConfiguration, C as rebindReviewOverlay, Ct as sendActionSchema, D as staticallyHiddenFindings, Dt as sendStartSchema, E as guardedFindingText, Et as sendRequestSchema, H as inspectionStartSchema, Ht as journeyContextQuerySchema, Jn as readConfirmedHideChange, Jr as staticSessionResourceSchema, K as inspectionQuerySchema, Kn as confirmedHideAdditions, Mr as retryReviewActionSchema, Ni as producerVersion, Nt as journeyReviewStorageQuerySchema, Oi as commandSchema, Or as nativeEventsSchema, Pi as stateSchema, Pn as journeyInventoryQuerySchema, Qn as addHideIndexTokens, S as rebindReviewAlignment, Sn as planBRepair, St as replaceSensitiveTermsSchema, T as reviewBatchReuse, Tt as sendPrepareSchema, V as inspectionCancelSchema, Vi as selectFrozenConfiguration, Vt as reviewCompileSchema, Xt as journeyResourceQuerySchema, Yn as renderedHideValue, Zn as termHideAdditions, _n as reviewRepairInputSchema, _r as journeyFindingsSchema, _t as manualUploadStartSchema, a as bCrossSegmentReviewSchema, b as isGenericPublicTerm, bi as maskedHitsStale, bn as bReviewDigest, br as journeyRenderSchema, bt as maximumTermsFileBytes, c as reconstructBFields, f as selectedValueMembers, ft as manualUploadActionSchema, gn as reviewCandidateResourceSchema, gr as journeyFindingImpactSchema, hn as reviewCandidateInputSchema, hr as journeyClassificationSessionsSchema, ht as manualUploadPrepareSchema, i as validateBCrossSegmentReview, in as sessionReconcileInputSchema, ji as selectionSchema, ki as packageCommandSchema, kr as nativeGetSchema, li as isSelectedWork, ln as sessionReviewInputSchema, mi as confirmedHideGroupIds, mt as manualUploadChoiceSchema, n as scanBatchEquivalenceDigest, nt as settingsQuerySchema, o as bRereadDigest, p as splitSelectorValues, pi as withReadingProgress, pn as sessionUsefulnessInputSchema, qt as journeyPolicyRespondSchema, r as locateTermEvidence, rt as readWorkspaceOutcomes, s as reconcileBSession, sn as sessionRereadInputSchema, t as scanBatchContextDigest, tn as reviewAttemptResourceSchema, tr as packHideIndex, tt as settingsBatchSchema, un as sessionReviewQuerySchema, ut as resolveFailureLocation, vn as reviewRepairResourceSchema, vr as journeyPreviewSchema, w as rebindReviewSubmit, wt as sendChoiceSchema, x as bReviewScope, yr as journeyRenderInputSchema, zi as defaultScopedSettings } from "./src-CHy3-siB.mjs";
4
+ import { $ as validateState, A as resourceSelectionQuerySchema, B as termReuseQuerySchema, C as loadAcceptedReview, D as aggregateUsefulness, E as loadPrivateResource, F as validateUnitCandidate, G as validateBatchBody, H as privateReviewHash, I as reuseQuerySchema, J as ownership, K as requireActiveBatch, L as batchQuery, M as evaluateUnitEvidence, N as sameCandidateRequest, O as sessionUsefulnessRecommendation, P as validateCandidateAttempt, Q as readStoredState, R as isPrivateResourceKind, S as validateSessionBindings, T as loadBatch, U as batchHeader, V as scanAliasRequestKey, W as createJourneyPayloadFiles, X as withDatabase, Y as validateDatabase, Z as readBundleDirectory, _ as loadReconciliation, _t as errorCode, a as decodeError, at as finishReset, b as validatePreparationSelection, c as dropsAnchor, ct as present, d as parseDelivery, dt as recheckPrivatePath, et as checkVersion, f as validateCandidate, ft as stateDirectory, g as loadPreparedBodies, gt as StoreError, h as loadPreparation, ht as withFileCheckTimings, i as createExecutor, it as databaseName, j as inspectionQuerySchema$1, k as sessionQuery, l as replySchema, lt as privatePath, m as loadStatus, mt as withStateSnapshot, n as releaseInheritedHeapFlags, nt as beginReset, o as ProtocolError, ot as hasResetMarker, p as classificationJourneyCommit, pt as syncDirectory, q as initializeAndClaim, r as storeHeapLimits, rt as createDatabaseFile, s as allowedReplies, st as inspectStateFiles, tt as schemaVersion, u as operations, ut as readResetMarker, v as loadRereadBodies, vt as isCoordinationBusy, w as loadAuthenticatedReview, x as validateSessionReconciliation, y as loadSessionBodies, yt as isSqliteCorruption, z as privateResourceHeader } from "./heap-aWke8lrK.mjs";
5
5
  import { constants, write } from "node:fs";
6
6
  import { z } from "zod";
7
7
  import { copyFile, link, lstat, mkdir, mkdtemp, open, opendir, readFile, readdir, realpath, rename, rm, unlink, writeFile } from "node:fs/promises";
@@ -8717,7 +8717,8 @@ const safeFields = /* @__PURE__ */ new Set([
8717
8717
  "cards.append.own-identity-card",
8718
8718
  "cards.append.other-person",
8719
8719
  "classification.late.several-works",
8720
- "classification.account-work-split"
8720
+ "classification.account-work-split",
8721
+ "classification.account-work-join"
8721
8722
  ]);
8722
8723
  function safeField(error) {
8723
8724
  if (!(error instanceof ApplicationError) || !error.field) return null;
@@ -10420,93 +10421,6 @@ function expandBDuplicates(unit, review) {
10420
10421
  };
10421
10422
  }
10422
10423
  //#endregion
10423
- //#region packages/application/src/journey/b/unit-budget.ts
10424
- const wide = /[ᄀ-ᇿ⺀-꓏가-힯豈-﫿︰-﹏＀-￯\p{Extended_Pictographic}]/u;
10425
- /** Matches the reader's estimate; rounds each line up and reserves field headers. */
10426
- function bUnitBudget(fields) {
10427
- const lines = [];
10428
- let end = 0;
10429
- for (const field of fields) {
10430
- let start = end;
10431
- const fieldStart = end;
10432
- let thirds = 0;
10433
- const take = () => {
10434
- if (end > start) lines.push({
10435
- start,
10436
- end,
10437
- tokens: (start === fieldStart ? 40 : 0) + Math.ceil(thirds / 3)
10438
- });
10439
- start = end;
10440
- thirds = 0;
10441
- };
10442
- for (const scalar of field.text) {
10443
- end++;
10444
- thirds += wide.test(scalar) ? 3 : 1;
10445
- if (scalar === "\n" || end - start === 64e3) take();
10446
- }
10447
- take();
10448
- }
10449
- const cores = [];
10450
- let core = 0;
10451
- let tokens = 40;
10452
- const whole = lines.reduce((sum, line) => sum + line.tokens, 0) <= 8e3 && end <= 64e3;
10453
- for (const line of lines) {
10454
- const length = line.end - line.start;
10455
- if (core && !whole && (tokens + line.tokens > 6e3 || core + length > 64e3)) {
10456
- cores.push(core);
10457
- core = 0;
10458
- tokens = 40;
10459
- }
10460
- core += length;
10461
- tokens += line.tokens;
10462
- }
10463
- if (core) cores.push(core);
10464
- const totals = [0];
10465
- for (const line of lines) totals.push((totals.at(-1) ?? 0) + line.tokens);
10466
- const boundary = (point) => {
10467
- let low = 0;
10468
- let high = lines.length;
10469
- while (low < high) {
10470
- const mid = Math.floor((low + high) / 2);
10471
- if ((lines[mid]?.start ?? Infinity) < point) low = mid + 1;
10472
- else high = mid;
10473
- }
10474
- return low;
10475
- };
10476
- function context(start, finish) {
10477
- const left = boundary(start);
10478
- const right = boundary(finish);
10479
- const coreTokens = 40 + (totals[right] ?? 0) - (totals[left] ?? 0);
10480
- const allowance = coreTokens > 8e3 ? 960 : Math.max(0, Math.min(960, Math.floor((8e3 - coreTokens) / 2) - 40));
10481
- let before = start;
10482
- let after = finish;
10483
- let remaining = allowance;
10484
- for (let i = left - 1; i >= 0; i--) {
10485
- const line = lines[i];
10486
- if (!line || line.tokens > remaining) break;
10487
- before = line.start;
10488
- remaining -= line.tokens;
10489
- }
10490
- remaining = allowance;
10491
- for (let i = right; i < lines.length; i++) {
10492
- const line = lines[i];
10493
- if (!line || line.tokens > remaining) break;
10494
- after = line.end;
10495
- remaining -= line.tokens;
10496
- }
10497
- if (before === start && start > 0) before = Math.max(lines[left - 1]?.start ?? 0, start - allowance);
10498
- if (after === finish && finish < end) after = Math.min(lines[right]?.end ?? end, finish + allowance);
10499
- return {
10500
- before,
10501
- after
10502
- };
10503
- }
10504
- return {
10505
- cores,
10506
- context
10507
- };
10508
- }
10509
- //#endregion
10510
10424
  //#region packages/application/src/journey/b/units.ts
10511
10425
  function validateBFields(fields) {
10512
10426
  const ids = /* @__PURE__ */ new Set();
@@ -10577,9 +10491,8 @@ function createBAnalysisUnits(input) {
10577
10491
  };
10578
10492
  });
10579
10493
  if (total === 0) return [];
10580
- const budget = bUnitBudget(unique);
10581
10494
  const coreSize = total <= 4e4 ? 4e4 : 24e3;
10582
- const cores = input.cores ?? (input.lineContext ? budget.cores : Array.from({ length: Math.ceil(total / coreSize) }, (_, ordinal) => Math.min(coreSize, total - ordinal * coreSize)));
10495
+ const cores = input.cores ?? Array.from({ length: Math.ceil(total / coreSize) }, (_, ordinal) => Math.min(coreSize, total - ordinal * coreSize));
10583
10496
  if (cores.reduce((sum, core) => sum + core, 0) !== total) throw new ApplicationError("INCOMPLETE_REVIEW");
10584
10497
  const totalUnits = cores.length;
10585
10498
  const result = [];
@@ -10587,10 +10500,8 @@ function createBAnalysisUnits(input) {
10587
10500
  for (const [ordinal, core] of cores.entries()) {
10588
10501
  const start = end;
10589
10502
  end += core;
10590
- const { before, after } = input.lineContext ? budget.context(start, end) : {
10591
- before: Math.max(0, start - 8e3),
10592
- after: Math.min(total, end + 8e3)
10593
- };
10503
+ const before = Math.max(0, start - 8e3);
10504
+ const after = Math.min(total, end + 8e3);
10594
10505
  const parts = [
10595
10506
  ...totalUnits === 1 ? [] : fragments(positions, before, start, false),
10596
10507
  ...fragments(positions, start, end, true),
@@ -1,4 +1,4 @@
1
- import "./src-B3il9x5F.mjs";
1
+ import "./src-CHy3-siB.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, g as longCommands, i as invoke, m as parseOptions, n as readOperation, o as createRuntime, r as waitOperation, v as startupFailure } from "./query-D28k3XOr.mjs";
2
- import { an as ApplicationError, cn as safeField, sn as safeCode } from "./locate-CP2t26j2.mjs";
3
- import "./src-B3il9x5F.mjs";
1
+ import { c as executorRequestSchema, g as longCommands, i as invoke, m as parseOptions, n as readOperation, o as createRuntime, r as waitOperation, v as startupFailure } from "./query-BX8QwaBi.mjs";
2
+ import { an as ApplicationError, cn as safeField, sn as safeCode } from "./locate-LpCex6Xj.mjs";
3
+ import "./src-CHy3-siB.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-CiJmV__5.mjs";
1
+ import { n as assertPreviewHeap, o as previewInputSchema, t as runPreview } from "./run-P_uZgSYa.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,4 +1,4 @@
1
- import { At as decisionCardInputSchema, Nt as privacyResolveSchema, Pt as privacyTermKey, a as reviewReadPages, t as locateTerms } from "./locate-CP2t26j2.mjs";
1
+ import { At as decisionCardInputSchema, Nt as privacyResolveSchema, Pt as privacyTermKey, a as reviewReadPages, t as locateTerms } from "./locate-LpCex6Xj.mjs";
2
2
  import { z } from "zod";
3
3
  //#region apps/cli/src/skill-install/privacy-validator.ts
4
4
  const sourceReferenceSchema = z.object({
@@ -1,11 +1,11 @@
1
- import { A as captureLogicalJourneySources, B as defaultParallelism, D as createCollectionArtifacts, E as readConfiguredSearchFields, G as readLogicalJourneyFinalMasks, H as parallelismLimits, I as createSharedSessionPool, J as confirmedFamily, K as readConfiguredOutputInfo, L as SessionWorkerError, N as runConfiguredSessionJob, R as sessionWorkerFailure, T as readOriginalSearchFields, V as gitSeedsProvider, W as privateJourneyDirectory, X as staticMaskCategory, Y as confirmedTitleSpans, Z as readWorkspacePair, a as prepareSessionScans, b as readStaticSessionMasks, c as createWorkPieces, ct as openPrivateFile, d as scanPreparedSession, dt as isWindowsAclFailure, ft as windowsAclCodes, g as openConfiguredUpload, h as configuredSessionUploads, i as verifyPreparedSessionSources, it as createCleanup, j as capturedJourneyScope, l as readSessionScanFields, lt as restrictToOwner, n as sessionExtensions, nt as createTemporary, o as buildWorkScanBatches, q as processJourneyMetadataFields, r as preparedScanConfiguration, rt as removeNamedTemporarySpools, s as scanReviewFields, st as makePrivateDirectory, t as hasRetiredSessionMarker, tt as decodeZstd, u as readSessionScanRecords, ut as windowsOwnerOnly, v as readCapturedOriginalRows, x as staticSessionJobs, y as processJourneyMetadata } from "./src-CmvEJj46.mjs";
2
- import { A as exportDelivery, C as prepareSourcePlan, D as saveRemoteState, E as readRemoteState, H as isBackgroundStatusPoll, I as withStateMutex, L as createDeliveryService, M as createStore, O as journeyDirectory, P as createExecutionPort, R as preflight, S as changePreparation, T as isRemoteImport, U as retrySharingViolation, V as inBackgroundStoreLane, _ as staticBaseProduction, a as writeJourneyOutput, b as blockedCodes, c as mergeHideIndexTokens, f as writeJourneyBase, g as staticBaseInputs, h as staticSessions, j as createPackagingProgressPort, k as collectRemoteWorkers, l as packRenderHideIndex, m as saveStaticSession, o as createHideIndexTokens, p as readStaticResult, s as hideIndexTexts, t as journeyOutputJob, u as journeyBaseJob, v as readSelectedCaptures, w as workApproval, x as isolateFailingRoots, y as RootPreparationFailure, z as loadDeliveryResults } from "./job-CsWKWcM4.mjs";
3
- import { $t as ownerProfileSchema, Cr as processingSite, In as createStaticProcessor, Jt as sessionPeriodSchema, P as bLiteralTerms, Pt as privacyTermKey, Qn as frameRecords, Qt as mergeOwnerProfile, Ut as termTypeInfo, Wn as entityDictionaryVersion, an as ApplicationError, cn as safeField, dn as reviewFamilies, en as passportAddressSchema, f as textDigest, hr as admitGitName, jn as currentDetectorVersion, mn as observeSource, mr as admitCustomTerm, on as UnfinishedJourneyError, pr as createEntityMatcher, qt as filterInventoryByPeriod, rn as accountWorksInventorySchema, sn as safeCode, tn as profileHasChoices, un as familySelected, wr as siteFields, yr as ProcessingError } from "./locate-CP2t26j2.mjs";
4
- 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-CWMrGXJK.mjs";
5
- import { $r as sendReceiptSchema, Ai as selectionSchema, An as scanExclusionResourceSchema, Ar as nativeStartSchema, B as createApplication, Bn as journeySearchResultSchema, Br as sendsOnNextAdvance, Bt as newJourneyWork, Cr as assertJourneyPrivacyReady, Ct as sendActionSchema, Di as commandSchema, Dn as scanGitSeedsId, Dt as sendStartSchema, Ei as replacementMarkerPattern, En as scanSessionResourceSchema, Er as rememberedHideValues, Et as sendRequestSchema, F as readAccountAvatarUrl, Fi as recommendParallelism, Fr as hostDrives, Gr as staticReviewDigest, H as inspectionStartSchema, Hn as searchScopeDigest, I as storedCredentialSchema, Ir as itemAtPassport, It as classificationPartition, K as inspectionQuerySchema, Kr as staticSessionId, Lr as obsoleteJourney, Lt as classificationWorks, M as deviceAuthorizationSchema, Mi as producerVersion, Mr as advanceStepsSend, N as deviceProfileScopeSchema, O as createAccount, Oi as packageCommandSchema, On as scanGitSeedsResource, P as profileUrlMatchesIdentity, Pr as currentJourneyAdapters, Qr as sendArtifactSchema, Rn as accountReadStop, Rt as retireScanGeneration, St as replaceSensitiveTermsSchema, Tn as scanPreparationDigest, Tt as sendPrepareSchema, U as validateInspectionBatch, V as inspectionCancelSchema, Wr as hasCurrentStaticReview, Xr as agentSourcesSchema, Yr as agentSourceSchema, Zr as journeySendSchema, _ as changeJourney, _t as manualUploadStartSchema, ai as isClassifying, ar as workCorrectionBinding, at as appendSensitiveTerms, br as displayedScopeDigest, ci as isSelectedWork, di as unfinishedPackagingCode, dt as validateFailureLocation, ei as sendReplaceResultSchema, fi as withReadingProgress, ft as manualUploadActionSchema, gt as manualUploadSchema, h as hideScopeDigest, hi as confirmedHideKinds, ht as manualUploadPrepareSchema, ii as hasCompleteWorkDescription, j as accountProfileSchema, k as renew, ki as selectionBatchSchema, kn as verifiedScanGitSeeds, lt as artifactFailureDetailSchema, m as activeJourneyTerms, mt as manualUploadChoiceSchema, nr as retireWorkDescription, nt as settingsQuerySchema, oi as isIncludedWork, or as emptyPreparationFacts, ri as sendSettingsSchema, rr as workDecisionDigest, si as isReadingComplete, ti as sendResolutionSchema, tt as settingsBatchSchema, vi as journeyConfirmedHides, wi as bTermMatcher, wr as privacyDecisionDigest, wt as sendChoiceSchema, xr as requestedScope, xt as normalizeSensitiveTerms, yt as emptyTermsRevision, zn as applyClassification, zt as isolatedWorkId } from "./src-B3il9x5F.mjs";
6
- import { vt as isCoordinationBusy } from "./heap-Bh9tySJp.mjs";
7
- import { d as checkOpenSource, h as openSource } from "./run-CiJmV__5.mjs";
8
- import { t as createAgentSetupPort } from "./agent-setup-CEPQfjBv.mjs";
1
+ import { A as captureLogicalJourneySources, B as defaultParallelism, D as createCollectionArtifacts, E as readConfiguredSearchFields, G as readLogicalJourneyFinalMasks, H as parallelismLimits, I as createSharedSessionPool, J as confirmedFamily, K as readConfiguredOutputInfo, L as SessionWorkerError, N as runConfiguredSessionJob, R as sessionWorkerFailure, T as readOriginalSearchFields, V as gitSeedsProvider, W as privateJourneyDirectory, X as staticMaskCategory, Y as confirmedTitleSpans, Z as readWorkspacePair, a as prepareSessionScans, b as readStaticSessionMasks, c as createWorkPieces, ct as openPrivateFile, d as scanPreparedSession, dt as isWindowsAclFailure, ft as windowsAclCodes, g as openConfiguredUpload, h as configuredSessionUploads, i as verifyPreparedSessionSources, it as createCleanup, j as capturedJourneyScope, l as readSessionScanFields, lt as restrictToOwner, n as sessionExtensions, nt as createTemporary, o as buildWorkScanBatches, q as processJourneyMetadataFields, r as preparedScanConfiguration, rt as removeNamedTemporarySpools, s as scanReviewFields, st as makePrivateDirectory, t as hasRetiredSessionMarker, tt as decodeZstd, u as readSessionScanRecords, ut as windowsOwnerOnly, v as readCapturedOriginalRows, x as staticSessionJobs, y as processJourneyMetadata } from "./src-sERffIem.mjs";
2
+ import { A as exportDelivery, C as prepareSourcePlan, D as saveRemoteState, E as readRemoteState, H as isBackgroundStatusPoll, I as withStateMutex, L as createDeliveryService, M as createStore, O as journeyDirectory, P as createExecutionPort, R as preflight, S as changePreparation, T as isRemoteImport, U as retrySharingViolation, V as inBackgroundStoreLane, _ as staticBaseProduction, a as writeJourneyOutput, b as blockedCodes, c as mergeHideIndexTokens, f as writeJourneyBase, g as staticBaseInputs, h as staticSessions, j as createPackagingProgressPort, k as collectRemoteWorkers, l as packRenderHideIndex, m as saveStaticSession, o as createHideIndexTokens, p as readStaticResult, s as hideIndexTexts, t as journeyOutputJob, u as journeyBaseJob, v as readSelectedCaptures, w as workApproval, x as isolateFailingRoots, y as RootPreparationFailure, z as loadDeliveryResults } from "./job-ILnqW1ge.mjs";
3
+ import { $t as ownerProfileSchema, Cr as processingSite, In as createStaticProcessor, Jt as sessionPeriodSchema, P as bLiteralTerms, Pt as privacyTermKey, Qn as frameRecords, Qt as mergeOwnerProfile, Ut as termTypeInfo, Wn as entityDictionaryVersion, an as ApplicationError, cn as safeField, dn as reviewFamilies, en as passportAddressSchema, f as textDigest, hr as admitGitName, jn as currentDetectorVersion, mn as observeSource, mr as admitCustomTerm, on as UnfinishedJourneyError, pr as createEntityMatcher, qt as filterInventoryByPeriod, rn as accountWorksInventorySchema, sn as safeCode, tn as profileHasChoices, un as familySelected, wr as siteFields, yr as ProcessingError } from "./locate-LpCex6Xj.mjs";
4
+ 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-ikYI-1c5.mjs";
5
+ import { $r as sendArtifactSchema, Ai as selectionBatchSchema, An as scanExclusionResourceSchema, B as createApplication, Bn as journeySearchResultSchema, Bt as newJourneyWork, Ct as sendActionSchema, Di as replacementMarkerPattern, Dn as scanGitSeedsId, Dr as rememberedHideValues, Dt as sendStartSchema, En as scanSessionResourceSchema, Et as sendRequestSchema, F as readAccountAvatarUrl, Fr as currentJourneyAdapters, Gr as hasCurrentStaticReview, H as inspectionStartSchema, Hn as searchScopeDigest, I as storedCredentialSchema, Ii as recommendParallelism, Ir as hostDrives, It as classificationPartition, K as inspectionQuerySchema, Kr as staticReviewDigest, Lr as itemAtPassport, Lt as classificationWorks, M as deviceAuthorizationSchema, N as deviceProfileScopeSchema, Ni as producerVersion, Nr as advanceStepsSend, O as createAccount, Oi as commandSchema, On as scanGitSeedsResource, P as profileUrlMatchesIdentity, Qr as journeySendSchema, Rn as accountReadStop, Rr as obsoleteJourney, Rt as retireScanGeneration, Sr as requestedScope, St as replaceSensitiveTermsSchema, Ti as bTermMatcher, Tn as scanPreparationDigest, Tr as privacyDecisionDigest, Tt as sendPrepareSchema, U as validateInspectionBatch, V as inspectionCancelSchema, Vr as sendsOnNextAdvance, Xr as agentSourceSchema, Zr as agentSourcesSchema, _ as changeJourney, _t as manualUploadStartSchema, ai as hasCompleteWorkDescription, ar as workCorrectionBinding, at as appendSensitiveTerms, ci as isReadingComplete, dt as validateFailureLocation, ei as sendReceiptSchema, fi as unfinishedPackagingCode, ft as manualUploadActionSchema, gi as confirmedHideKinds, gt as manualUploadSchema, h as hideScopeDigest, ht as manualUploadPrepareSchema, ii as sendSettingsSchema, j as accountProfileSchema, ji as selectionSchema, jr as nativeStartSchema, k as renew, ki as packageCommandSchema, kn as verifiedScanGitSeeds, li as isSelectedWork, lt as artifactFailureDetailSchema, m as activeJourneyTerms, mr as isClassificationAccountJoin, mt as manualUploadChoiceSchema, ni as sendResolutionSchema, nr as retireWorkDescription, nt as settingsQuerySchema, oi as isClassifying, or as emptyPreparationFacts, pi as withReadingProgress, qr as staticSessionId, rr as workDecisionDigest, si as isIncludedWork, ti as sendReplaceResultSchema, tt as settingsBatchSchema, wr as assertJourneyPrivacyReady, wt as sendChoiceSchema, xr as displayedScopeDigest, xt as normalizeSensitiveTerms, yi as journeyConfirmedHides, yt as emptyTermsRevision, zn as applyClassification, zt as isolatedWorkId } from "./src-CHy3-siB.mjs";
6
+ import { vt as isCoordinationBusy } from "./heap-aWke8lrK.mjs";
7
+ import { d as checkOpenSource, h as openSource } from "./run-P_uZgSYa.mjs";
8
+ import { t as createAgentSetupPort } from "./agent-setup-Bv73EZ2b.mjs";
9
9
  import { t as workerMessageSchema } from "./messages-D3m3bhva.mjs";
10
10
  import { constants, write } from "node:fs";
11
11
  import { z } from "zod";
@@ -2465,6 +2465,21 @@ function createAccountAccess(storage, auth, options) {
2465
2465
  }
2466
2466
  //#endregion
2467
2467
  //#region apps/cli/src/account/journey/rebuild.ts
2468
+ /**
2469
+ * ADR 0276 slice H: the given roots whose family has a current or legacy key that the formation
2470
+ * inventory lists, held in a Work or `unassigned` for any reason. Such a root never joins a
2471
+ * rebuilt Work (D4).
2472
+ */
2473
+ async function accountListedRoots(approval, inventory, roots, signal) {
2474
+ const families = reviewFamilies(approval.inventory);
2475
+ const listed = /* @__PURE__ */ new Set([...inventory.works.flatMap((work) => work.sessions.map((session) => session.key)), ...inventory.unassigned.map((item) => item.key)]);
2476
+ const result = /* @__PURE__ */ new Set();
2477
+ for (const root of roots) {
2478
+ signal.throwIfAborted();
2479
+ for (const session of families.members.get(root) ?? []) for (const pair of await keysOf(session)) if (pair.some((key) => listed.has(key))) result.add(root);
2480
+ }
2481
+ return result;
2482
+ }
2468
2483
  const removed = (work) => work.access === "removed" || work.unitAccess === "removed";
2469
2484
  async function rebuildAccountWorks(approval, inventory, signal) {
2470
2485
  const families = reviewFamilies(approval.inventory);
@@ -6056,6 +6071,7 @@ async function resolveChunkSessions(storage, state, works, signal) {
6056
6071
  function groupedClassificationItems(items) {
6057
6072
  const merged = /* @__PURE__ */ new Map();
6058
6073
  for (const item of items) {
6074
+ if (isClassificationAccountJoin(item)) continue;
6059
6075
  const key = projectNameKey(item.projectName);
6060
6076
  const prior = merged.get(key);
6061
6077
  if (prior) {
@@ -6069,6 +6085,30 @@ function groupedClassificationItems(items) {
6069
6085
  return [...merged.values()];
6070
6086
  }
6071
6087
  /**
6088
+ * ADR 0276 slice H: join items merged per rebuilt Work, after the partition check. A target must
6089
+ * be a rebuilt Work; a joined root must have no key the formation inventory lists (D4); after
6090
+ * scope confirmation only roots still being grouped may join, so no confirmed Work loses roots.
6091
+ */
6092
+ async function preparedAccountJoins(state, approval, input, signal) {
6093
+ const refused = () => new ApplicationError("INVALID_SELECTION", "classification.account-work-join");
6094
+ const joins = /* @__PURE__ */ new Map();
6095
+ for (const item of input.items) {
6096
+ if (!isClassificationAccountJoin(item)) continue;
6097
+ if (!state.works.some((work) => work.accountWork && work.id === item.accountWorkId)) throw refused();
6098
+ joins.set(item.accountWorkId, [...joins.get(item.accountWorkId) ?? [], ...item.rootSessionIds]);
6099
+ }
6100
+ if (!joins.size) return [];
6101
+ const roots = [...joins.values()].flat();
6102
+ const grouping = new Set(state.works.flatMap((work) => work.placement === "classifying" ? work.rootSessionIds : []));
6103
+ if (state.scope.status === "confirmed" && roots.some((root) => !grouping.has(root))) throw refused();
6104
+ const account = state.accountWorks?.status === "read" ? state.accountWorks.inventory : null;
6105
+ if (!account || (await accountListedRoots(approval, account, roots, signal)).size) throw refused();
6106
+ return [...joins].map(([accountWorkId, rootSessionIds]) => ({
6107
+ accountWorkId,
6108
+ rootSessionIds
6109
+ }));
6110
+ }
6111
+ /**
6072
6112
  * One atomic root partition; recommendations have no access authority. Roots still being grouped
6073
6113
  * wait in one unread Work while the other Works are confirmed and read; the submission that
6074
6114
  * groups them may arrive after confirmation and keeps it (E2). The proposal is prepared from one
@@ -6143,6 +6183,7 @@ function createClassificationProposal(storage, accountAccess) {
6143
6183
  workspaceIds: workspacesOf(item.rootSessionIds)
6144
6184
  });
6145
6185
  }
6186
+ const accountJoins = await preparedAccountJoins(state, plan.approval, input, signal);
6146
6187
  const prepared = {
6147
6188
  journeyId: state.journeyId,
6148
6189
  requestKey: input.idempotencyKey,
@@ -6154,6 +6195,10 @@ function createClassificationProposal(storage, accountAccess) {
6154
6195
  partition: classificationPartition(state),
6155
6196
  late,
6156
6197
  items,
6198
+ ...accountJoins.length ? { accountJoins: accountJoins.map((join) => ({
6199
+ ...join,
6200
+ workspaceIds: workspacesOf(join.rootSessionIds)
6201
+ })) } : {},
6157
6202
  pending: pending.length ? {
6158
6203
  workId: randomUUID(),
6159
6204
  rootSessionIds: pending,
@@ -6316,6 +6361,30 @@ async function collectCatalogProjectEvidence(options, signal) {
6316
6361
  return results;
6317
6362
  }
6318
6363
  //#endregion
6364
+ //#region apps/cli/src/journey/works/account-targets.ts
6365
+ /** Known project identity to rebuilt Work id; projects without exactly one match are absent. */
6366
+ async function accountJoinTargets(input, signal) {
6367
+ const account = input.state.accountWorks;
6368
+ if (account?.status !== "read") return /* @__PURE__ */ new Map();
6369
+ const owners = /* @__PURE__ */ new Map();
6370
+ for (const work of input.state.works) {
6371
+ if (!work.accountWork) continue;
6372
+ for (const root of work.rootSessionIds) {
6373
+ const session = input.sessions.get(root);
6374
+ const id = session ? input.identityOf(session) : null;
6375
+ if (id) owners.set(id, (owners.get(id) ?? /* @__PURE__ */ new Set()).add(work.id));
6376
+ }
6377
+ }
6378
+ const candidates = input.projects.filter((project) => owners.get(project.repositoryId)?.size === 1);
6379
+ const listed = await accountListedRoots(input.approval, account.inventory, candidates.flatMap((project) => project.rootSessionIds), signal);
6380
+ const targets = /* @__PURE__ */ new Map();
6381
+ for (const project of candidates) {
6382
+ const [owner] = owners.get(project.repositoryId) ?? [];
6383
+ if (owner && !project.rootSessionIds.some((root) => listed.has(root))) targets.set(project.repositoryId, owner);
6384
+ }
6385
+ return targets;
6386
+ }
6387
+ //#endregion
6319
6388
  //#region apps/cli/src/journey/works/catalog.ts
6320
6389
  /** `host/owner` from a sanitized network remote; local paths and unparsable values are omitted. */
6321
6390
  function remoteOwner(locator) {
@@ -6546,6 +6615,20 @@ function createJourneyCatalog(storage, processing, stateDir) {
6546
6615
  unresolvedRoots = remaining;
6547
6616
  }
6548
6617
  const groups = [...known.values()];
6618
+ const joinTargets = await accountJoinTargets({
6619
+ state,
6620
+ approval: plan.approval,
6621
+ sessions,
6622
+ identityOf: (session) => {
6623
+ const workspace = workspaces.get(session.workspaceId);
6624
+ if (workspace?.repository) return sortingRepositoryId(workspace.repository.root);
6625
+ if (!workspace?.path || kindOf(workspace) !== "folder") return null;
6626
+ const path = resolve(workspace.path);
6627
+ const identity = routeFrozenPath(path);
6628
+ return identity && (identity.kind === "repository" || identity.root === path) ? identity.id : null;
6629
+ },
6630
+ projects: groups.filter((group) => group.rootSessionIds.every((root) => assignments.some((item) => item.rootSessionId === root && (item.rule === "repository" || item.rule === "folder"))))
6631
+ }, signal);
6549
6632
  const names = distinctProjectNames(groups.map((group) => group.repositoryRoot), processing.environment.userHome?.trim() || homedir());
6550
6633
  const nameCounts = /* @__PURE__ */ new Map();
6551
6634
  for (const group of groups) {
@@ -6558,7 +6641,8 @@ function createJourneyCatalog(storage, processing, stateDir) {
6558
6641
  repositoryName: fitProjectName(evidenceOnlyIds.has(group.repositoryId) && (nameCounts.get((names[index] ?? group.repositoryName).toLocaleLowerCase("en-US")) ?? 0) > 1 ? `${group.repositoryName.slice(0, 150)} (${group.repositoryId})` : names[index] ?? group.repositoryName),
6559
6642
  workspaceIds: [...group.workspaceIds].toSorted(),
6560
6643
  rootSessionIds: group.rootSessionIds.toSorted(),
6561
- titles: group.titles.slice(0, 5).map(fitProjectName)
6644
+ titles: group.titles.slice(0, 5).map(fitProjectName),
6645
+ ...joinTargets.has(group.repositoryId) ? { accountWorkId: joinTargets.get(group.repositoryId) } : {}
6562
6646
  })),
6563
6647
  unresolvedRoots,
6564
6648
  assignments: assignments.toSorted((left, right) => left.rootSessionId.localeCompare(right.rootSessionId))
@@ -1,7 +1,7 @@
1
- import { vn as sessionSchema } from "./locate-CP2t26j2.mjs";
2
- import { t as createZstdFrameCheck$1 } from "./frame-CRm99088.mjs";
3
- import "./src-B3il9x5F.mjs";
4
- import { a as isRecord } from "./model-ChHuVKoB.mjs";
1
+ import { vn as sessionSchema } from "./locate-LpCex6Xj.mjs";
2
+ import { t as createZstdFrameCheck$1 } from "./frame-0v_mLdvG.mjs";
3
+ import "./src-CHy3-siB.mjs";
4
+ import { a as isRecord } from "./model-BEWsfkIU.mjs";
5
5
  import { constants } from "node:fs";
6
6
  import { z } from "zod";
7
7
  import { lstat, open, stat } from "node:fs/promises";