@gitroll/tacitt-cli 0.6.3 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-setup-Cze03fCL.mjs → agent-setup-C7iqLMYm.mjs} +1 -1
- package/dist/agent-setup-worker.mjs +4 -4
- package/dist/cli.mjs +5 -5
- package/dist/codex-title-worker.mjs +1 -1
- package/dist/configured-preview-worker.mjs +4 -4
- package/dist/configured-session-worker.mjs +4 -4
- package/dist/{heap-CApARI9x.mjs → heap-DQbsSUrB.mjs} +2 -2
- package/dist/inspection-worker.mjs +3 -3
- package/dist/{job-Bc0SmQC9.mjs → job-D4N5Pe91.mjs} +3 -3
- package/dist/{model-CYweY9fR.mjs → model-CZeHzKif.mjs} +1 -1
- package/dist/operation-executor.mjs +2 -2
- package/dist/preview-worker.mjs +1 -1
- package/dist/{query-CztBNjXI.mjs → query-BMvtisKu.mjs} +123 -21
- package/dist/{run-CnI7NSET.mjs → run-u2EfHjz4.mjs} +2 -2
- package/dist/{src-BlP4urDH.mjs → src-BRwicVza.mjs} +4 -2
- package/dist/{src-vTFLdYlS.mjs → src-BgoSvnXe.mjs} +3 -3
- package/dist/{src-Bz2CXuiR.mjs → src-DmSIVU7-.mjs} +2 -0
- package/dist/store-database-worker.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { J as listAgentSetup } from "./src-
|
|
1
|
+
import { J as listAgentSetup } from "./src-BRwicVza.mjs";
|
|
2
2
|
import { Dn as createStaticProcessor, dn as workspaceSchema, ln as sessionSchema } from "./locate-CNU4z9G1.mjs";
|
|
3
|
-
import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-
|
|
4
|
-
import { fi as effectiveTreatmentSchema, ot as maximumAgentSetupSessions } from "./src-
|
|
5
|
-
import "./agent-setup-
|
|
3
|
+
import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-BgoSvnXe.mjs";
|
|
4
|
+
import { fi as effectiveTreatmentSchema, ot as maximumAgentSetupSessions } from "./src-DmSIVU7-.mjs";
|
|
5
|
+
import "./agent-setup-C7iqLMYm.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 guardDetachedStartup, f as createRenderActivity, g as longCommands, h as businessCommands, i as invoke, l as awaitingPassport, m as parseOptions, n as readOperation, o as createRuntime, p as helpText, r as waitOperation, s as executorEventSchema, t as cancelOperation, u as serveDetached, v as startupFailure, y as traceStartup } from "./query-
|
|
3
|
-
import { nt as makePrivateDirectory, rt as openPrivateFile } from "./src-
|
|
4
|
-
import { A as createExecutionPort, j as startHost, k as readStateDump } from "./job-
|
|
2
|
+
import { _ as permissionDiagnostic, a as readAgentPresence, d as guardDetachedStartup, f as createRenderActivity, g as longCommands, h as businessCommands, i as invoke, l as awaitingPassport, m as parseOptions, n as readOperation, o as createRuntime, p as helpText, r as waitOperation, s as executorEventSchema, t as cancelOperation, u as serveDetached, v as startupFailure, y as traceStartup } from "./query-BMvtisKu.mjs";
|
|
3
|
+
import { nt as makePrivateDirectory, rt as openPrivateFile } from "./src-BRwicVza.mjs";
|
|
4
|
+
import { A as createExecutionPort, j as startHost, k as readStateDump } from "./job-D4N5Pe91.mjs";
|
|
5
5
|
import { $t as safeField, Qt as safeCode, Xt as ApplicationError } from "./locate-CNU4z9G1.mjs";
|
|
6
|
-
import { $n as reviewTransportBytes, ci as stateSchema, ct as resolveFailureLocation, tt as readWorkspaceOutcomes } from "./src-
|
|
7
|
-
import { _t as isCoordinationBusy } from "./heap-
|
|
6
|
+
import { $n as reviewTransportBytes, ci as stateSchema, ct as resolveFailureLocation, tt as readWorkspaceOutcomes } from "./src-DmSIVU7-.mjs";
|
|
7
|
+
import { _t as isCoordinationBusy } from "./heap-DQbsSUrB.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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as errorCode } from "./model-
|
|
1
|
+
import { i as errorCode } from "./model-CZeHzKif.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-
|
|
1
|
+
import { Y as createConfiguredPreviewStream } from "./src-BRwicVza.mjs";
|
|
2
2
|
import { Dn as createStaticProcessor, dn as workspaceSchema, ln as sessionSchema } from "./locate-CNU4z9G1.mjs";
|
|
3
|
-
import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-
|
|
4
|
-
import { fi as effectiveTreatmentSchema } from "./src-
|
|
5
|
-
import { a as classifyRecord, n as assertPreviewHeap, t as runPreview } from "./run-
|
|
3
|
+
import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-BgoSvnXe.mjs";
|
|
4
|
+
import { fi as effectiveTreatmentSchema } from "./src-DmSIVU7-.mjs";
|
|
5
|
+
import { a as classifyRecord, n as assertPreviewHeap, t as runPreview } from "./run-u2EfHjz4.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-
|
|
2
|
-
import { d as runJourneyBaseJob, i as runJourneyOutputVerifyJob, n as runJourneyOutputJob, r as runJourneyOutputShardJob } from "./job-
|
|
1
|
+
import { et as safeError, h as captureConfiguredSessionJob, j as runConfiguredSessionJob, u as runConfiguredScanJob, z as gitSeedsProvider } from "./src-BRwicVza.mjs";
|
|
2
|
+
import { d as runJourneyBaseJob, i as runJourneyOutputVerifyJob, n as runJourneyOutputJob, r as runJourneyOutputShardJob } from "./job-D4N5Pe91.mjs";
|
|
3
3
|
import { Dn as createStaticProcessor, Qt as safeCode } from "./locate-CNU4z9G1.mjs";
|
|
4
|
-
import { l as createNativeAdapters } from "./src-
|
|
5
|
-
import "./src-
|
|
4
|
+
import { l as createNativeAdapters } from "./src-BgoSvnXe.mjs";
|
|
5
|
+
import "./src-DmSIVU7-.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-
|
|
1
|
+
import { S as readPrivateReviewPayload, at as windowsOwnerOnly, it as restrictToOwner, rt as openPrivateFile, tt as exclusiveLock, x as writePrivateReviewPayload } from "./src-BRwicVza.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-CNU4z9G1.mjs";
|
|
3
|
-
import { $t as projectPreparationProgress, Bn as confirmedHideTerms, Cn as confirmedHideDeltaSchema, Cr as applyCardAnswers, En as settleConfirmedHides, Et as settleCorrections, Ft as journeyBatchReadSchema, G as validateInspectionClaim, Gn as retireWorkDescription, Gr as isReadingComplete, Gt as journeyContextSchema, H as validateInspectionBatches, Ht as newJourneyWork, Ir as journeySendSchema, It as journeyReviewStorageQuerySchema, J as validateInspectionInputs, Jr as selectedWorks, Jt as hidePublishSchema, K as validateInspectionFence, Kn as workDecisionDigest, Kr as isSelectedWork, Kt as hideBeginSchema, Ln as confirmedHideGroupIds, Lt as applyClassificationProposal, Mt as validateAttemptAppend, Nt as journeyGuidance, Ot as obsoleteJourney, Pn as bMaskedHits, Q as inspectionInputs, Qn as reviewRepairResourceSchema, Qt as journeyPolicyRespondSchema, Rn as confirmedHideKey, Rt as classificationCommitSchema, Un as maskedHitsStale, V as validateInspectionBatch, Vn as dictionaryHides, Wn as syncTermGroups, Wt as journeyContextQuerySchema, X as validateInspectionContribution, Xn as reviewCandidateResourceSchema, Xr as mergePrivacyTerms, Xt as journeySearchSaveSchema, Y as validateInspectionQuery, Yr as withReadingProgress, Yt as journeySearchResultSchema, Z as validateDetectionSummary, Zt as searchScopeDigest, _n as sessionUsefulnessInputSchema, an as reviewAttemptResourceSchema, bn as journeyCommitSchema, br as preparationStartSchema, c as reconstructBFields, ci as stateSchema, d as resolveGroupSplit, dr as validateScanExclusion, dt as manualUploadBindingSchema, en as journeyResourceQuerySchema, er as bReviewDigest, fn as sessionRereadResourceSchema, g as semanticGroupKey, gn as sessionReviewStatusSchema, gr as journeyPreparationProgressSchema, gt as candidateSortAvailable, h as hideScopeDigest, hn as sessionReviewResourceSchema, hr as journeyInventorySchema, in as sortingApplySchema, ir as scanCanonicalResourceSchema, jr as staticSessionId, jt as attemptBudgetCodePoints, l as chooseCheapPlacement, ln as sessionReconcileResultSchema, mn as sessionReviewQuerySchema, mr as journeyInventoryReadSchema, mt as manualUploadSchema, nn as journeyIsolateSchema, o as bRereadDigest, on as reviewAttemptsQuerySchema, or as scanSessionResourceSchema, q as validateInspectionHead, qn as workPrivacyDecisions, qr as isSkippedWork, qt as hideFinishSchema, rn as journeyPlaceSchema, rr as scanAliasResourceSchema, s as reconcileBSession, sn as reviewAttemptsResultSchema, sr as scanGitSeedsId, t as scanBatchContextDigest, tn as journeyResourceSchema, tr as mergeBRepair, u as reviseGroupMembership, un as sessionReconciliationResourceSchema, v as projectJourneyInventory, vn as sessionUsefulnessResourceSchema, vr as preparationBeginSchema, x as bReviewScope, xn as journeyEventSchema, xr as validatePreparationFacts, y as preparationScope, yn as journeyCommitResultSchema, yr as preparationSettlementSchema } from "./src-
|
|
3
|
+
import { $t as projectPreparationProgress, Bn as confirmedHideTerms, Cn as confirmedHideDeltaSchema, Cr as applyCardAnswers, En as settleConfirmedHides, Et as settleCorrections, Ft as journeyBatchReadSchema, G as validateInspectionClaim, Gn as retireWorkDescription, Gr as isReadingComplete, Gt as journeyContextSchema, H as validateInspectionBatches, Ht as newJourneyWork, Ir as journeySendSchema, It as journeyReviewStorageQuerySchema, J as validateInspectionInputs, Jr as selectedWorks, Jt as hidePublishSchema, K as validateInspectionFence, Kn as workDecisionDigest, Kr as isSelectedWork, Kt as hideBeginSchema, Ln as confirmedHideGroupIds, Lt as applyClassificationProposal, Mt as validateAttemptAppend, Nt as journeyGuidance, Ot as obsoleteJourney, Pn as bMaskedHits, Q as inspectionInputs, Qn as reviewRepairResourceSchema, Qt as journeyPolicyRespondSchema, Rn as confirmedHideKey, Rt as classificationCommitSchema, Un as maskedHitsStale, V as validateInspectionBatch, Vn as dictionaryHides, Wn as syncTermGroups, Wt as journeyContextQuerySchema, X as validateInspectionContribution, Xn as reviewCandidateResourceSchema, Xr as mergePrivacyTerms, Xt as journeySearchSaveSchema, Y as validateInspectionQuery, Yr as withReadingProgress, Yt as journeySearchResultSchema, Z as validateDetectionSummary, Zt as searchScopeDigest, _n as sessionUsefulnessInputSchema, an as reviewAttemptResourceSchema, bn as journeyCommitSchema, br as preparationStartSchema, c as reconstructBFields, ci as stateSchema, d as resolveGroupSplit, dr as validateScanExclusion, dt as manualUploadBindingSchema, en as journeyResourceQuerySchema, er as bReviewDigest, fn as sessionRereadResourceSchema, g as semanticGroupKey, gn as sessionReviewStatusSchema, gr as journeyPreparationProgressSchema, gt as candidateSortAvailable, h as hideScopeDigest, hn as sessionReviewResourceSchema, hr as journeyInventorySchema, in as sortingApplySchema, ir as scanCanonicalResourceSchema, jr as staticSessionId, jt as attemptBudgetCodePoints, l as chooseCheapPlacement, ln as sessionReconcileResultSchema, mn as sessionReviewQuerySchema, mr as journeyInventoryReadSchema, mt as manualUploadSchema, nn as journeyIsolateSchema, o as bRereadDigest, on as reviewAttemptsQuerySchema, or as scanSessionResourceSchema, q as validateInspectionHead, qn as workPrivacyDecisions, qr as isSkippedWork, qt as hideFinishSchema, rn as journeyPlaceSchema, rr as scanAliasResourceSchema, s as reconcileBSession, sn as reviewAttemptsResultSchema, sr as scanGitSeedsId, t as scanBatchContextDigest, tn as journeyResourceSchema, tr as mergeBRepair, u as reviseGroupMembership, un as sessionReconciliationResourceSchema, v as projectJourneyInventory, vn as sessionUsefulnessResourceSchema, vr as preparationBeginSchema, x as bReviewScope, xn as journeyEventSchema, xr as validatePreparationFacts, y as preparationScope, yn as journeyCommitResultSchema, yr as preparationSettlementSchema } from "./src-DmSIVU7-.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 { X as createInspectionProcessor } from "./src-
|
|
1
|
+
import { X as createInspectionProcessor } from "./src-BRwicVza.mjs";
|
|
2
2
|
import { Dn as createStaticProcessor } from "./locate-CNU4z9G1.mjs";
|
|
3
|
-
import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-
|
|
4
|
-
import { U as validateInspectionRequest } from "./src-
|
|
3
|
+
import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-BgoSvnXe.mjs";
|
|
4
|
+
import { U as validateInspectionRequest } from "./src-DmSIVU7-.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 { A as renderJobDigest, D as prepareCollectionProduction, E as checkReusableBundle, L as privateCollectionDirectory, M as readCollectionIndex, N as parseCollectionWorkspaceSummary, V as writeLogicalJourneyOutput, W as readConfiguredOutputInfo, at as windowsOwnerOnly, b as writeLogicalJourneyBase, d as verifyOutputShard, f as writeOutputShard, nt as makePrivateDirectory, ot as isWindowsAclFailure, rt as openPrivateFile, w as readConfiguredSearchFields, z as gitSeedsProvider } from "./src-
|
|
1
|
+
import { A as renderJobDigest, D as prepareCollectionProduction, E as checkReusableBundle, L as privateCollectionDirectory, M as readCollectionIndex, N as parseCollectionWorkspaceSummary, V as writeLogicalJourneyOutput, W as readConfiguredOutputInfo, at as windowsOwnerOnly, b as writeLogicalJourneyBase, d as verifyOutputShard, f as writeOutputShard, nt as makePrivateDirectory, ot as isWindowsAclFailure, rt as openPrivateFile, w as readConfiguredSearchFields, z as gitSeedsProvider } from "./src-BRwicVza.mjs";
|
|
2
2
|
import { $t as safeField, F as bClassificationKey, Ft as termTypeInfo, H as codePointLength, Ht as journeyProfileAddressActionSchema, K as utf16Offset, Kt as passportAddressSchema, N as bUnitFragments, Qt as safeCode, Ut as journeyProfileLinksActionSchema, V as bDigest, Xt as ApplicationError, b as validateBReview, c as textDigest, h as reviewFindingsDigest, ht as journeyDescribeSchema, jt as reviewTermsInputSchema, l as validateReview, n as compileBFindings, nn as reviewFamilies, r as reviewBatchChunks, s as reviewSubmitSchema, t as locateTerms, z as bAnchorKey, zt as filterInventoryByPeriod } from "./locate-CNU4z9G1.mjs";
|
|
3
|
-
import { $ as settingsBatchSchema, $r as journeyPreviewSchema, B as inspectionStartSchema, C as rebindReviewOverlay, Ct as sendPrepareSchema, D as staticallyHiddenFindings, Dn as termHideAdditions, Dr as nativeGetSchema, E as guardedFindingText, Er as nativeEventsSchema, It as journeyReviewStorageQuerySchema, Ln as confirmedHideGroupIds, Mr as staticSessionResourceSchema, On as addHideIndexTokens, Or as nativeRespondSchema, Qn as reviewRepairResourceSchema, Qr as journeyFindingsSchema, Qt as journeyPolicyRespondSchema, S as rebindReviewAlignment, Sn as confirmedHideAdditions, Sr as journeyClassificationSessionsSchema, St as sendChoiceSchema, T as reviewBatchReuse, Tn as renderedHideValue, Tt as sendStartSchema, Un as maskedHitsStale, Ut as reviewCompileSchema, W as inspectionQuerySchema, Wt as journeyContextQuerySchema, Xn as reviewCandidateResourceSchema, Yn as reviewCandidateInputSchema, Zn as reviewRepairInputSchema, Zr as journeyFindingImpactSchema, _n as sessionUsefulnessInputSchema, a as bCrossSegmentReviewSchema, ai as selectionSchema, an as reviewAttemptResourceSchema, b as isGenericPublicTerm, bt as replaceSensitiveTermsSchema, c as reconstructBFields, ci as stateSchema, cn as sessionReconcileInputSchema, ct as resolveFailureLocation, dn as sessionRereadInputSchema, ei as journeyRenderInputSchema, en as journeyResourceQuerySchema, er as bReviewDigest, et as settingsQuerySchema, f as selectedValueMembers, ft as manualUploadChoiceSchema, hi as selectFrozenConfiguration, ht as manualUploadStartSchema, i as validateBCrossSegmentReview, ii as selectionBatchSchema, jn as packHideIndex, kn as hideKeyId, mi as freezeConfiguration, mn as sessionReviewQuerySchema, n as scanBatchEquivalenceDigest, ni as commandSchema, nr as planBRepair, o as bRereadDigest, p as splitSelectorValues, pi as defaultScopedSettings, pn as sessionReviewInputSchema, pr as journeyInventoryQuerySchema, pt as manualUploadPrepareSchema, r as locateTermEvidence, ri as packageCommandSchema, rn as journeyPlaceSchema, s as reconcileBSession, si as producerVersion, t as scanBatchContextDigest, ti as journeyRenderSchema, tt as readWorkspaceOutcomes, ut as manualUploadActionSchema, vt as maximumTermsFileBytes, w as rebindReviewSubmit, wn as readConfirmedHideChange, wt as sendRequestSchema, x as bReviewScope, xt as sendActionSchema, z as inspectionCancelSchema } from "./src-
|
|
4
|
-
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, 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-
|
|
3
|
+
import { $ as settingsBatchSchema, $r as journeyPreviewSchema, B as inspectionStartSchema, C as rebindReviewOverlay, Ct as sendPrepareSchema, D as staticallyHiddenFindings, Dn as termHideAdditions, Dr as nativeGetSchema, E as guardedFindingText, Er as nativeEventsSchema, It as journeyReviewStorageQuerySchema, Ln as confirmedHideGroupIds, Mr as staticSessionResourceSchema, On as addHideIndexTokens, Or as nativeRespondSchema, Qn as reviewRepairResourceSchema, Qr as journeyFindingsSchema, Qt as journeyPolicyRespondSchema, S as rebindReviewAlignment, Sn as confirmedHideAdditions, Sr as journeyClassificationSessionsSchema, St as sendChoiceSchema, T as reviewBatchReuse, Tn as renderedHideValue, Tt as sendStartSchema, Un as maskedHitsStale, Ut as reviewCompileSchema, W as inspectionQuerySchema, Wt as journeyContextQuerySchema, Xn as reviewCandidateResourceSchema, Yn as reviewCandidateInputSchema, Zn as reviewRepairInputSchema, Zr as journeyFindingImpactSchema, _n as sessionUsefulnessInputSchema, a as bCrossSegmentReviewSchema, ai as selectionSchema, an as reviewAttemptResourceSchema, b as isGenericPublicTerm, bt as replaceSensitiveTermsSchema, c as reconstructBFields, ci as stateSchema, cn as sessionReconcileInputSchema, ct as resolveFailureLocation, dn as sessionRereadInputSchema, ei as journeyRenderInputSchema, en as journeyResourceQuerySchema, er as bReviewDigest, et as settingsQuerySchema, f as selectedValueMembers, ft as manualUploadChoiceSchema, hi as selectFrozenConfiguration, ht as manualUploadStartSchema, i as validateBCrossSegmentReview, ii as selectionBatchSchema, jn as packHideIndex, kn as hideKeyId, mi as freezeConfiguration, mn as sessionReviewQuerySchema, n as scanBatchEquivalenceDigest, ni as commandSchema, nr as planBRepair, o as bRereadDigest, p as splitSelectorValues, pi as defaultScopedSettings, pn as sessionReviewInputSchema, pr as journeyInventoryQuerySchema, pt as manualUploadPrepareSchema, r as locateTermEvidence, ri as packageCommandSchema, rn as journeyPlaceSchema, s as reconcileBSession, si as producerVersion, t as scanBatchContextDigest, ti as journeyRenderSchema, tt as readWorkspaceOutcomes, ut as manualUploadActionSchema, vt as maximumTermsFileBytes, w as rebindReviewSubmit, wn as readConfirmedHideChange, wt as sendRequestSchema, x as bReviewScope, xt as sendActionSchema, z as inspectionCancelSchema } from "./src-DmSIVU7-.mjs";
|
|
4
|
+
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, 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-DQbsSUrB.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";
|
|
@@ -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-
|
|
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-BMvtisKu.mjs";
|
|
2
2
|
import { $t as safeField, Qt as safeCode, Xt as ApplicationError } from "./locate-CNU4z9G1.mjs";
|
|
3
|
-
import "./src-
|
|
3
|
+
import "./src-DmSIVU7-.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { setTimeout } from "node:timers/promises";
|
|
6
6
|
//#region apps/cli/src/operation/executor.ts
|
package/dist/preview-worker.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as assertPreviewHeap, o as previewInputSchema, t as runPreview } from "./run-
|
|
1
|
+
import { n as assertPreviewHeap, o as previewInputSchema, t as runPreview } from "./run-u2EfHjz4.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, F as SessionWorkerError, G as processJourneyMetadataFields, H as privateJourneyDirectory, I as sessionWorkerFailure, K as staticMaskCategory, 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-
|
|
2
|
-
import { A as createExecutionPort, C as saveRemoteState, D as createPackagingProgressPort, E as exportDelivery, F as preflight, I as loadDeliveryResults, L as retrySharingViolation, M as inBackgroundStoreLane, N as withStateMutex, O as createStore, P as createDeliveryService, S as readRemoteState, T as collectRemoteWorkers, _ as staticBaseProduction, a as writeJourneyOutput, b as workApproval, 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 readSelectedCaptures, w as journeyDirectory, x as isRemoteImport, y as prepareSourcePlan } from "./job-
|
|
1
|
+
import { $ as createCleanup, B as parallelismLimits, C as readOriginalSearchFields, F as SessionWorkerError, G as processJourneyMetadataFields, H as privateJourneyDirectory, I as sessionWorkerFailure, K as staticMaskCategory, 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-BRwicVza.mjs";
|
|
2
|
+
import { A as createExecutionPort, C as saveRemoteState, D as createPackagingProgressPort, E as exportDelivery, F as preflight, I as loadDeliveryResults, L as retrySharingViolation, M as inBackgroundStoreLane, N as withStateMutex, O as createStore, P as createDeliveryService, S as readRemoteState, T as collectRemoteWorkers, _ as staticBaseProduction, a as writeJourneyOutput, b as workApproval, 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 readSelectedCaptures, w as journeyDirectory, x as isRemoteImport, y as prepareSourcePlan } from "./job-D4N5Pe91.mjs";
|
|
3
3
|
import { $t as safeField, Bt as sessionPeriodSchema, Dn as createStaticProcessor, Fn as entityDictionaryVersion, Ft as termTypeInfo, Gt as ownerProfileSchema, Kt as passportAddressSchema, Ot as privacyTermKey, Qt as safeCode, Sn as currentDetectorVersion, T as bLiteralTerms, Un as frameRecords, Wt as mergeOwnerProfile, Xt as ApplicationError, Zt as UnfinishedJourneyError, an as observeSource, ar as admitCustomTerm, c as textDigest, ir as createEntityMatcher, nn as reviewFamilies, or as admitGitName, qt as profileHasChoices, tn as familySelected, ur as ProcessingError, zt as filterInventoryByPeriod } from "./locate-CNU4z9G1.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-
|
|
5
|
-
import { $ as settingsBatchSchema, A as deviceAuthorizationSchema, Ar as staticReviewDigest, B as inspectionStartSchema, Br as sendResolutionSchema, Bt as classificationWorks, Ct as sendPrepareSchema, Dt as currentJourneyAdapters, Fn as bTermMatcher, Fr as agentSourcesSchema, Gn as retireWorkDescription, Gr as isReadingComplete, Hn as journeyConfirmedHides, Hr as hasCompleteWorkDescription, Ht as newJourneyWork, Ir as journeySendSchema, Jn as workCorrectionBinding, Kn as workDecisionDigest, Kr as isSelectedWork, Lr as sendArtifactSchema, M as profileUrlMatchesIdentity, N as readAccountAvatarUrl, O as createAccount, Ot as obsoleteJourney, P as storedCredentialSchema, Pr as agentSourceSchema, Pt as applyClassification, R as createApplication, Rr as sendReceiptSchema, St as sendChoiceSchema, Tr as privacyDecisionDigest, Tt as sendStartSchema, Ur as isClassifying, V as validateInspectionBatch, Vr as sendSettingsSchema, Vt as retireScanGeneration, W as inspectionQuerySchema, Wr as isIncludedWork, Yr as withReadingProgress, Yt as journeySearchResultSchema, Zt as searchScopeDigest, _ as changeJourney, _r as emptyPreparationFacts, _t as emptyTermsRevision, ai as selectionSchema, ar as scanPreparationDigest, bt as replaceSensitiveTermsSchema, cr as scanGitSeedsResource, et as settingsQuerySchema, ft as manualUploadChoiceSchema, h as hideScopeDigest, ht as manualUploadStartSchema, ii as selectionBatchSchema, j as deviceProfileScopeSchema, k as accountProfileSchema, kr as hasCurrentStaticReview, lr as verifiedScanGitSeeds, lt as validateFailureLocation, m as activeJourneyTerms, mt as manualUploadSchema, ni as commandSchema, or as scanSessionResourceSchema, pt as manualUploadPrepareSchema, ri as packageCommandSchema, rt as appendSensitiveTerms, si as producerVersion, sr as scanGitSeedsId, st as artifactFailureDetailSchema, ui as recommendParallelism, ur as scanExclusionResourceSchema, ut as manualUploadActionSchema, wr as assertJourneyPrivacyReady, wt as sendRequestSchema, xt as sendActionSchema, yt as normalizeSensitiveTerms, z as inspectionCancelSchema, zn as confirmedHideKinds, zr as sendReplaceResultSchema, zt as classificationPartition } from "./src-
|
|
6
|
-
import { _t as isCoordinationBusy } from "./heap-
|
|
7
|
-
import { t as createAgentSetupPort } from "./agent-setup-
|
|
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-BgoSvnXe.mjs";
|
|
5
|
+
import { $ as settingsBatchSchema, A as deviceAuthorizationSchema, Ar as staticReviewDigest, B as inspectionStartSchema, Br as sendResolutionSchema, Bt as classificationWorks, Ct as sendPrepareSchema, Dt as currentJourneyAdapters, Fn as bTermMatcher, Fr as agentSourcesSchema, Gn as retireWorkDescription, Gr as isReadingComplete, Hn as journeyConfirmedHides, Hr as hasCompleteWorkDescription, Ht as newJourneyWork, Ir as journeySendSchema, Jn as workCorrectionBinding, Kn as workDecisionDigest, Kr as isSelectedWork, Lr as sendArtifactSchema, M as profileUrlMatchesIdentity, N as readAccountAvatarUrl, O as createAccount, Ot as obsoleteJourney, P as storedCredentialSchema, Pr as agentSourceSchema, Pt as applyClassification, R as createApplication, Rr as sendReceiptSchema, St as sendChoiceSchema, Tr as privacyDecisionDigest, Tt as sendStartSchema, Ur as isClassifying, V as validateInspectionBatch, Vr as sendSettingsSchema, Vt as retireScanGeneration, W as inspectionQuerySchema, Wr as isIncludedWork, Yr as withReadingProgress, Yt as journeySearchResultSchema, Zt as searchScopeDigest, _ as changeJourney, _r as emptyPreparationFacts, _t as emptyTermsRevision, ai as selectionSchema, ar as scanPreparationDigest, bt as replaceSensitiveTermsSchema, cr as scanGitSeedsResource, et as settingsQuerySchema, ft as manualUploadChoiceSchema, h as hideScopeDigest, ht as manualUploadStartSchema, ii as selectionBatchSchema, j as deviceProfileScopeSchema, k as accountProfileSchema, kr as hasCurrentStaticReview, lr as verifiedScanGitSeeds, lt as validateFailureLocation, m as activeJourneyTerms, mt as manualUploadSchema, ni as commandSchema, or as scanSessionResourceSchema, pt as manualUploadPrepareSchema, ri as packageCommandSchema, rt as appendSensitiveTerms, si as producerVersion, sr as scanGitSeedsId, st as artifactFailureDetailSchema, ui as recommendParallelism, ur as scanExclusionResourceSchema, ut as manualUploadActionSchema, wr as assertJourneyPrivacyReady, wt as sendRequestSchema, xt as sendActionSchema, yt as normalizeSensitiveTerms, z as inspectionCancelSchema, zn as confirmedHideKinds, zr as sendReplaceResultSchema, zt as classificationPartition } from "./src-DmSIVU7-.mjs";
|
|
6
|
+
import { _t as isCoordinationBusy } from "./heap-DQbsSUrB.mjs";
|
|
7
|
+
import { t as createAgentSetupPort } from "./agent-setup-C7iqLMYm.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";
|
|
@@ -5860,8 +5860,9 @@ function createSessionPreparation(dependencies, facts) {
|
|
|
5860
5860
|
const original = dependencies.artifacts.sessionFacts ?? dependencies.artifacts.sessions;
|
|
5861
5861
|
const items = [];
|
|
5862
5862
|
if (original) for await (const item of original(journeyId, artifact, signal)) {
|
|
5863
|
-
const { nativeSessionId, relativePath, harness, lastAt, metadata, sha256, byteLength, crc32 } = item;
|
|
5863
|
+
const { workerIdentity, nativeSessionId, relativePath, harness, lastAt, metadata, sha256, byteLength, crc32 } = item;
|
|
5864
5864
|
items.push({
|
|
5865
|
+
...workerIdentity ? { workerIdentity } : {},
|
|
5865
5866
|
nativeSessionId,
|
|
5866
5867
|
relativePath,
|
|
5867
5868
|
harness,
|
|
@@ -5900,6 +5901,19 @@ async function sessionKeyFor(input) {
|
|
|
5900
5901
|
const native = input.nativeSessionId;
|
|
5901
5902
|
const path = input.relativePath?.replaceAll("\\", "/");
|
|
5902
5903
|
if (!input.harness || (!native || !native.trim()) && !path) throw new TypeError("SESSION_RELATIVE_PATH_REQUIRED");
|
|
5904
|
+
if (input.harness === "claude" && native?.trim() && input.workerIdentity) {
|
|
5905
|
+
const agentId = input.workerIdentity.agentId;
|
|
5906
|
+
const discriminator = agentId?.trim() ? ["agent-id", agentId] : ["path", path];
|
|
5907
|
+
if (!agentId?.trim() && !path) throw new TypeError("SESSION_RELATIVE_PATH_REQUIRED");
|
|
5908
|
+
const source = JSON.stringify([
|
|
5909
|
+
"native-v2-worker",
|
|
5910
|
+
input.harness,
|
|
5911
|
+
"session",
|
|
5912
|
+
native,
|
|
5913
|
+
...discriminator
|
|
5914
|
+
]);
|
|
5915
|
+
return createHash("sha256").update(source, "utf8").digest("hex");
|
|
5916
|
+
}
|
|
5903
5917
|
const source = native && native.trim() ? JSON.stringify([
|
|
5904
5918
|
"native-v1",
|
|
5905
5919
|
input.harness,
|
|
@@ -5908,6 +5922,43 @@ async function sessionKeyFor(input) {
|
|
|
5908
5922
|
]) : `path-v1|${input.harness}|${path}`;
|
|
5909
5923
|
return createHash("sha256").update(source, "utf8").digest("hex");
|
|
5910
5924
|
}
|
|
5925
|
+
/**
|
|
5926
|
+
* Current Work keys and v1 aliases. An alias is displaced only when no selected session
|
|
5927
|
+
* still produces it and its stored bytes are a selected worker's own; any other content
|
|
5928
|
+
* under that key (for example an earlier main) stays.
|
|
5929
|
+
*/
|
|
5930
|
+
function createSessionKeys() {
|
|
5931
|
+
const selected = /* @__PURE__ */ new Set();
|
|
5932
|
+
const legacy = /* @__PURE__ */ new Map();
|
|
5933
|
+
const workers = /* @__PURE__ */ new Set();
|
|
5934
|
+
return {
|
|
5935
|
+
async add(input) {
|
|
5936
|
+
const { sha256, ...identity } = input;
|
|
5937
|
+
const key = await sessionKeyFor(identity);
|
|
5938
|
+
selected.add(key);
|
|
5939
|
+
const { workerIdentity: _, ...original } = identity;
|
|
5940
|
+
const oldKey = await sessionKeyFor(original);
|
|
5941
|
+
const legacyKey = oldKey === key ? void 0 : oldKey;
|
|
5942
|
+
if (legacyKey) {
|
|
5943
|
+
const digests = legacy.get(legacyKey) ?? /* @__PURE__ */ new Set();
|
|
5944
|
+
if (sha256) digests.add(sha256);
|
|
5945
|
+
legacy.set(legacyKey, digests);
|
|
5946
|
+
workers.add(key);
|
|
5947
|
+
}
|
|
5948
|
+
return {
|
|
5949
|
+
key,
|
|
5950
|
+
legacyKey
|
|
5951
|
+
};
|
|
5952
|
+
},
|
|
5953
|
+
needsMigration(current) {
|
|
5954
|
+
return current.some((key) => legacy.has(key) && !selected.has(key)) || [...workers].some((key) => !current.includes(key));
|
|
5955
|
+
},
|
|
5956
|
+
membership(current) {
|
|
5957
|
+
const displaced = ({ key, sha256 }) => !selected.has(key) && (legacy.get(key)?.has(sha256) ?? false);
|
|
5958
|
+
return [.../* @__PURE__ */ new Set([...current.filter((session) => !displaced(session)).map((session) => session.key), ...selected])];
|
|
5959
|
+
}
|
|
5960
|
+
};
|
|
5961
|
+
}
|
|
5911
5962
|
//#endregion
|
|
5912
5963
|
//#region apps/cli/src/account/journey/session-access.ts
|
|
5913
5964
|
/** Safe facts for a local preflight conflict; no paths or session content escape. */
|
|
@@ -5924,17 +5975,29 @@ async function sessionAccessBlocked(dependencies, journeyId, items, inventory, s
|
|
|
5924
5975
|
if (!sessions) return false;
|
|
5925
5976
|
const requestedAccess = /* @__PURE__ */ new Map();
|
|
5926
5977
|
const requestedDigests = /* @__PURE__ */ new Map();
|
|
5978
|
+
const contentAccess = /* @__PURE__ */ new Map();
|
|
5979
|
+
const claimContent = (key, sha256, access) => {
|
|
5980
|
+
const identity = JSON.stringify([key, sha256]);
|
|
5981
|
+
const previous = contentAccess.get(identity);
|
|
5982
|
+
if (previous !== void 0 && previous !== access) return true;
|
|
5983
|
+
contentAccess.set(identity, access);
|
|
5984
|
+
return false;
|
|
5985
|
+
};
|
|
5927
5986
|
for (const item of items) {
|
|
5928
|
-
if (item.status === "blocked" || item.sessionAssembly
|
|
5987
|
+
if (item.status === "blocked" || item.sessionAssembly) continue;
|
|
5988
|
+
const keys = item.sessionMembership?.keys ?? (item.sessionUpload ? [item.sessionUpload.key] : []);
|
|
5989
|
+
if (!keys.length) continue;
|
|
5929
5990
|
const destination = inventory.works.find((work) => work.logicalWorkId === item.workId);
|
|
5930
5991
|
if (destination?.access === "removed") throw new ApplicationError("WORK_REMOVED");
|
|
5931
|
-
for (const key of
|
|
5992
|
+
for (const key of keys) {
|
|
5932
5993
|
const access = requestedAccess.get(key);
|
|
5933
5994
|
if (access !== void 0 && access !== item.access) return true;
|
|
5934
5995
|
requestedAccess.set(key, item.access);
|
|
5935
5996
|
const source = inventory.works.find((work) => work.sessions.some((entry) => entry.key === key));
|
|
5936
5997
|
if (source && source.logicalWorkId !== item.workId && source.access !== item.access) return true;
|
|
5937
|
-
|
|
5998
|
+
const sha256 = item.sessionMembership ? source?.sessions.find((session) => session.key === key)?.sha256 : item.sessionUpload?.sha256;
|
|
5999
|
+
if (sha256 && claimContent(key, sha256, item.access)) return true;
|
|
6000
|
+
if (destination && destination.access !== item.access && !destination.sessions.some((entry) => entry.key === key && (item.sessionMembership || entry.sha256 === sha256))) return true;
|
|
5938
6001
|
}
|
|
5939
6002
|
}
|
|
5940
6003
|
for (const item of items) {
|
|
@@ -5943,6 +6006,9 @@ async function sessionAccessBlocked(dependencies, journeyId, items, inventory, s
|
|
|
5943
6006
|
if (destination?.access === "removed") throw new ApplicationError("WORK_REMOVED");
|
|
5944
6007
|
for await (const session of sessions(journeyId, item.artifact, signal)) {
|
|
5945
6008
|
const key = await sessionKeyFor(session);
|
|
6009
|
+
const { workerIdentity: _, ...original } = session;
|
|
6010
|
+
const legacyKey = session.workerIdentity ? await sessionKeyFor(original) : key;
|
|
6011
|
+
if (claimContent(key, session.sha256, item.access) || legacyKey !== key && claimContent(legacyKey, session.sha256, item.access)) return true;
|
|
5946
6012
|
const otherAccess = requestedAccess.get(key);
|
|
5947
6013
|
if (otherAccess !== void 0 && otherAccess !== item.access) return true;
|
|
5948
6014
|
requestedAccess.set(key, item.access);
|
|
@@ -5955,8 +6021,7 @@ async function sessionAccessBlocked(dependencies, journeyId, items, inventory, s
|
|
|
5955
6021
|
sha256: session.sha256,
|
|
5956
6022
|
workIds: [.../* @__PURE__ */ new Set([...otherDigest?.workIds ?? [], item.workId])]
|
|
5957
6023
|
});
|
|
5958
|
-
|
|
5959
|
-
if (source && source.logicalWorkId !== item.workId && source.access !== item.access) return true;
|
|
6024
|
+
if (inventory.works.some((work) => work.logicalWorkId !== item.workId && work.access !== item.access && work.sessions.some((entry) => entry.key === key || entry.key === legacyKey && entry.sha256 === session.sha256))) return true;
|
|
5960
6025
|
if (destination && destination.access !== item.access && !destination.sessions.some((entry) => entry.key === key && entry.sha256 === session.sha256)) return true;
|
|
5961
6026
|
}
|
|
5962
6027
|
}
|
|
@@ -5970,7 +6035,11 @@ async function sessionIndependentItems(dependencies, journeyId, items, inventory
|
|
|
5970
6035
|
const claimed = /* @__PURE__ */ new Set();
|
|
5971
6036
|
const independent = [];
|
|
5972
6037
|
for (const item of pending) {
|
|
5973
|
-
const keys = /* @__PURE__ */ new Set([
|
|
6038
|
+
const keys = /* @__PURE__ */ new Set([
|
|
6039
|
+
...inventory.works.find((work) => work.logicalWorkId === item.workId)?.sessions.map((session) => session.key) ?? [],
|
|
6040
|
+
...item.sessionMembership?.keys ?? [],
|
|
6041
|
+
...item.sessionUpload ? [item.sessionUpload.key] : []
|
|
6042
|
+
]);
|
|
5974
6043
|
if (!item.sessionMembership && !item.sessionAssembly) for await (const session of sessions(journeyId, item.artifact, signal)) keys.add(await sessionKeyFor(session));
|
|
5975
6044
|
if (![...keys].some((key) => claimed.has(key))) independent.push(item);
|
|
5976
6045
|
for (const key of keys) claimed.add(key);
|
|
@@ -6941,11 +7010,26 @@ async function stepSessionWork(dependencies, journeyId, context, item, connectio
|
|
|
6941
7010
|
};
|
|
6942
7011
|
};
|
|
6943
7012
|
if ((assembly?.revision ?? 0) !== intent.expectedRevision) return conflict();
|
|
7013
|
+
let migrate = false;
|
|
7014
|
+
if (item.sessionMembershipKeyVersion !== 2) {
|
|
7015
|
+
const selected = createSessionKeys();
|
|
7016
|
+
const facts = dependencies.artifacts.sessionFacts ?? sessions;
|
|
7017
|
+
for await (const session of facts(journeyId, item.artifact, signal)) await selected.add(session);
|
|
7018
|
+
migrate = selected.needsMigration(intent.keys);
|
|
7019
|
+
}
|
|
6944
7020
|
await guard();
|
|
6945
7021
|
try {
|
|
6946
7022
|
const { workId, ...input } = intent;
|
|
6947
7023
|
const result = await remote.membership(workId, input, signal);
|
|
6948
7024
|
await guard();
|
|
7025
|
+
if (migrate) {
|
|
7026
|
+
const { sessionMembership: _, ...rest } = item;
|
|
7027
|
+
return {
|
|
7028
|
+
...rest,
|
|
7029
|
+
status: "uploading",
|
|
7030
|
+
error: null
|
|
7031
|
+
};
|
|
7032
|
+
}
|
|
6949
7033
|
return {
|
|
6950
7034
|
...item,
|
|
6951
7035
|
sessionAssembly: {
|
|
@@ -6963,11 +7047,27 @@ async function stepSessionWork(dependencies, journeyId, context, item, connectio
|
|
|
6963
7047
|
if (item.sessionUpload?.nextAttemptAt && Date.parse(item.sessionUpload.nextAttemptAt) > Date.parse(dependencies.now())) return item;
|
|
6964
7048
|
const inventory = await remote.inventory(signal);
|
|
6965
7049
|
const stored = new Map([...inventory.unassigned, ...inventory.works.flatMap((work) => work.sessions)].map((session) => [session.key, session]));
|
|
6966
|
-
const keys =
|
|
7050
|
+
const keys = createSessionKeys();
|
|
7051
|
+
const pending = item.sessionUpload;
|
|
7052
|
+
let recoverLegacy = false;
|
|
7053
|
+
if (pending) {
|
|
7054
|
+
const facts = dependencies.artifacts.sessionFacts ?? sessions;
|
|
7055
|
+
for await (const session of facts(journeyId, item.artifact, signal)) if ((await keys.add(session)).legacyKey === pending.key && session.sha256 === pending.sha256) {
|
|
7056
|
+
recoverLegacy = true;
|
|
7057
|
+
break;
|
|
7058
|
+
}
|
|
7059
|
+
}
|
|
6967
7060
|
for await (const session of sessions(journeyId, item.artifact, signal)) {
|
|
6968
|
-
const
|
|
6969
|
-
|
|
6970
|
-
|
|
7061
|
+
const identity = await keys.add(session);
|
|
7062
|
+
if (recoverLegacy && (identity.legacyKey !== pending?.key || session.sha256 !== pending?.sha256)) continue;
|
|
7063
|
+
const key = recoverLegacy && pending ? pending.key : identity.key;
|
|
7064
|
+
if (stored.get(key)?.sha256 === session.sha256) {
|
|
7065
|
+
if (recoverLegacy) return {
|
|
7066
|
+
...item,
|
|
7067
|
+
sessionUpload: null
|
|
7068
|
+
};
|
|
7069
|
+
continue;
|
|
7070
|
+
}
|
|
6971
7071
|
item = await attemptSession({
|
|
6972
7072
|
dependencies,
|
|
6973
7073
|
original: item,
|
|
@@ -6978,6 +7078,7 @@ async function stepSessionWork(dependencies, journeyId, context, item, connectio
|
|
|
6978
7078
|
guard,
|
|
6979
7079
|
checkpoint
|
|
6980
7080
|
});
|
|
7081
|
+
if (recoverLegacy) return item;
|
|
6981
7082
|
}
|
|
6982
7083
|
await guard();
|
|
6983
7084
|
const assembly = await remote.assembly(item.workId, signal);
|
|
@@ -6995,10 +7096,11 @@ async function stepSessionWork(dependencies, journeyId, context, item, connectio
|
|
|
6995
7096
|
return {
|
|
6996
7097
|
...item,
|
|
6997
7098
|
sessionUpload: null,
|
|
7099
|
+
sessionMembershipKeyVersion: 2,
|
|
6998
7100
|
sessionMembership: {
|
|
6999
7101
|
workId: item.workId,
|
|
7000
7102
|
expectedRevision: assembly?.revision ?? 0,
|
|
7001
|
-
keys:
|
|
7103
|
+
keys: keys.membership(current?.sessions ?? []),
|
|
7002
7104
|
title: item.title,
|
|
7003
7105
|
access: item.access
|
|
7004
7106
|
}
|
|
@@ -9337,15 +9439,15 @@ function createJourneySender(dependencies, phases = 3, host = {
|
|
|
9337
9439
|
for (const item of draft.items) {
|
|
9338
9440
|
const current = inventory.works.find((work) => work.logicalWorkId === item.workId);
|
|
9339
9441
|
const assembly = await remote.assembly(item.workId, signal);
|
|
9340
|
-
const selected =
|
|
9341
|
-
for await (const session of sessions(input.journeyId, item.artifact, signal)) selected.
|
|
9442
|
+
const selected = createSessionKeys();
|
|
9443
|
+
for await (const session of sessions(input.journeyId, item.artifact, signal)) await selected.add(session);
|
|
9342
9444
|
const currentKeys = current?.sessions.map((session) => session.key) ?? [];
|
|
9343
9445
|
item.recoveryReview = {
|
|
9344
9446
|
previousSendId: snapshot.send.id,
|
|
9345
9447
|
revision: assembly?.revision ?? 0,
|
|
9346
9448
|
currentAccess: current?.access ?? null,
|
|
9347
9449
|
currentKeys,
|
|
9348
|
-
proposedKeys:
|
|
9450
|
+
proposedKeys: selected.membership(current?.sessions ?? [])
|
|
9349
9451
|
};
|
|
9350
9452
|
}
|
|
9351
9453
|
await connection.assertCurrent(signal);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ln as sessionSchema } from "./locate-CNU4z9G1.mjs";
|
|
2
2
|
import { t as createZstdFrameCheck$1 } from "./frame-BGFmADbg.mjs";
|
|
3
|
-
import "./src-
|
|
4
|
-
import { a as isRecord } from "./model-
|
|
3
|
+
import "./src-DmSIVU7-.mjs";
|
|
4
|
+
import { a as isRecord } from "./model-CZeHzKif.mjs";
|
|
5
5
|
import { constants } from "node:fs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { lstat, open, stat } from "node:fs/promises";
|
|
@@ -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-CNU4z9G1.mjs";
|
|
2
2
|
import { t as createZstdFrameCheck } from "./frame-BGFmADbg.mjs";
|
|
3
|
-
import { F as sourceIdentityEvidence, I as withSourceEvidence, In as bWordBounded, L as agentSetupKey, Mn as bContainment, Nn as bExceptionRanges, Nr as agentSourcePathSegment, Pr as agentSourceSchema, at as defaultAgentSetupInclusion, di as approvedTreatmentSchema, fr as resolveSourceSelection, gi as staticCatalogRef, it as classifyAgentSetup, kt as metadataProcessingVersion, li as sourceChangePolicy } from "./src-
|
|
3
|
+
import { F as sourceIdentityEvidence, I as withSourceEvidence, In as bWordBounded, L as agentSetupKey, Mn as bContainment, Nn as bExceptionRanges, Nr as agentSourcePathSegment, Pr as agentSourceSchema, at as defaultAgentSetupInclusion, di as approvedTreatmentSchema, fr as resolveSourceSelection, gi as staticCatalogRef, it as classifyAgentSetup, kt as metadataProcessingVersion, li as sourceChangePolicy } from "./src-DmSIVU7-.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";
|
|
@@ -15501,7 +15501,8 @@ async function* configuredSessionUploads(input, identities, signal) {
|
|
|
15501
15501
|
const text = await readMetadata(entry, signal);
|
|
15502
15502
|
if (Buffer.byteLength(text) !== description.byteLength || createHash("sha256").update(text).digest("hex") !== description.sha256) fail("ARTIFACT_INVALID_ARCHIVE");
|
|
15503
15503
|
const { version: _, ...facts } = validateConfiguredSourceMetadata(strictJson(text, metadataLimitBytes), workspace);
|
|
15504
|
-
const
|
|
15504
|
+
const native = session.parts[0]?.native;
|
|
15505
|
+
const nativeSessionId = native?.sessionId ?? session.sourceSessionId;
|
|
15505
15506
|
if (!nativeSessionId?.trim() && !identity.relativePath) fail("ARTIFACT_IDENTITY_MISMATCH");
|
|
15506
15507
|
const metadata = {
|
|
15507
15508
|
workspace: facts,
|
|
@@ -15557,6 +15558,7 @@ async function* configuredSessionUploads(input, identities, signal) {
|
|
|
15557
15558
|
...content,
|
|
15558
15559
|
metadata,
|
|
15559
15560
|
nativeSessionId,
|
|
15561
|
+
...session.harness === "claude" && native?.role === "worker" ? { workerIdentity: { agentId: native.agentId } } : {},
|
|
15560
15562
|
relativePath: identity.relativePath,
|
|
15561
15563
|
harness: session.harness,
|
|
15562
15564
|
lastAt: identity.lastAt,
|
|
@@ -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-CNU4z9G1.mjs";
|
|
2
|
-
import { At as nativeAdapterVersions, nt as reviewInventory, oi as gitMetadataBudgetBytes } from "./src-
|
|
3
|
-
import { a as isRecord, i as errorCode, n as checkDiscoveryAbort, o as unresolvedMetadata, r as discoveryBounds, t as DiscoveryWarnings } from "./model-
|
|
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-
|
|
2
|
+
import { At as nativeAdapterVersions, nt as reviewInventory, oi as gitMetadataBudgetBytes } from "./src-DmSIVU7-.mjs";
|
|
3
|
+
import { a as isRecord, i as errorCode, n as checkDiscoveryAbort, o as unresolvedMetadata, r as discoveryBounds, t as DiscoveryWarnings } from "./model-CZeHzKif.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-u2EfHjz4.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";
|
|
@@ -1602,6 +1602,8 @@ const sendItemSchema = z.object({
|
|
|
1602
1602
|
bytesSent: count$13.optional(),
|
|
1603
1603
|
nextAttemptAt: z.iso.datetime().optional()
|
|
1604
1604
|
}).strict().nullable().optional(),
|
|
1605
|
+
/** Local key-rule marker; current membership replays need no artifact migration inspection. */
|
|
1606
|
+
sessionMembershipKeyVersion: z.literal(2).optional(),
|
|
1605
1607
|
/** Exact write-ahead membership request; never rebase it after an uncertain PUT. */
|
|
1606
1608
|
sessionMembership: z.object({
|
|
1607
1609
|
workId: journeyIdSchema,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as createExecutor, t as assertStoreHeap } from "./heap-
|
|
1
|
+
import { i as createExecutor, t as assertStoreHeap } from "./heap-DQbsSUrB.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");
|