@gitroll/tacitt-cli 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/{agent-setup-B8DAiQ6Z.mjs → agent-setup-CLXdKr2I.mjs} +1 -1
  2. package/dist/agent-setup-worker.mjs +4 -4
  3. package/dist/cli.mjs +65 -8
  4. package/dist/codex-title-worker.mjs +1 -1
  5. package/dist/configured-preview-worker.mjs +4 -4
  6. package/dist/configured-session-worker.mjs +25 -4
  7. package/dist/{heap-BHcvxWCw.mjs → heap-eO_uWpD1.mjs} +45 -3
  8. package/dist/inspection-worker.mjs +3 -3
  9. package/dist/job-rK-Ho9OD.mjs +613 -0
  10. package/dist/{model-BJdTLNjT.mjs → model-BBAnsFAx.mjs} +1 -1
  11. package/dist/operation-executor.mjs +2 -2
  12. package/dist/preview-worker.mjs +1 -1
  13. package/dist/{query-BA0XCwnR.mjs → query-DN99jiRc.mjs} +273 -551
  14. package/dist/{run-BeLHsZWb.mjs → run-4G_CvdDj.mjs} +2 -2
  15. package/dist/session-process.mjs +6 -1
  16. package/dist/{src-CC95LYYp.mjs → src-B4R5XMEP.mjs} +370 -176
  17. package/dist/{src-k0Ya1Bri.mjs → src-CPbdnGrk.mjs} +118 -47
  18. package/dist/{src-B5SArpVY.mjs → src-qoLRvX-A.mjs} +17 -5
  19. package/dist/store-database-worker.mjs +1 -1
  20. package/dist/web/assets/index-BkuUI3Eu.js +67 -0
  21. package/dist/web/assets/index-Clg6Pfv_.css +1 -0
  22. package/dist/web/index.html +2 -2
  23. package/package.json +1 -1
  24. package/skills/tacitt/SKILL.md +8 -6
  25. package/skills/tacitt/references/commands.md +14 -9
  26. package/skills/tacitt/references/journey.md +10 -6
  27. package/skills/tacitt/references/send.md +1 -1
  28. package/skills/tacitt/scripts/INDEX.md +6 -2
  29. package/skills/tacitt/scripts/journey-card-consolidation.mjs +90 -4
  30. package/skills/tacitt/scripts/journey-card-values.d.mts +17 -0
  31. package/skills/tacitt/scripts/journey-card-values.mjs +116 -0
  32. package/skills/tacitt/scripts/journey-classification.mjs +6 -2
  33. package/skills/tacitt/scripts/journey-panel-host.d.mts +9 -0
  34. package/skills/tacitt/scripts/journey-panel-host.mjs +56 -0
  35. package/skills/tacitt/scripts/journey-state.mjs +10 -4
  36. package/skills/tacitt/scripts/journey-tasks.mjs +1 -1
  37. package/skills/tacitt/scripts/journey.d.mts +2 -0
  38. package/skills/tacitt/scripts/journey.mjs +120 -53
  39. package/skills/tacitt/scripts/review-stream-client.mjs +1 -1
  40. package/dist/job-J3NFw3MH.mjs +0 -194
  41. package/dist/web/assets/index-Bjos73wK.js +0 -67
  42. package/dist/web/assets/index-Bl4C2b2_.css +0 -1
@@ -1,5 +1,5 @@
1
1
  import "./locate-U3-nkird.mjs";
2
- import "./src-CC95LYYp.mjs";
2
+ import "./src-B4R5XMEP.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-k0Ya1Bri.mjs";
1
+ import { q as listAgentSetup } from "./src-CPbdnGrk.mjs";
2
2
  import { rn as workspaceSchema, tn as sessionSchema, yn as createStaticProcessor } from "./locate-U3-nkird.mjs";
3
- import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-B5SArpVY.mjs";
4
- import { ct as maximumAgentSetupSessions, ni as effectiveTreatmentSchema } from "./src-CC95LYYp.mjs";
5
- import "./agent-setup-B8DAiQ6Z.mjs";
3
+ import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-qoLRvX-A.mjs";
4
+ import { ai as effectiveTreatmentSchema, at as maximumAgentSetupSessions } from "./src-B4R5XMEP.mjs";
5
+ import "./agent-setup-CLXdKr2I.mjs";
6
6
  import { z } from "zod";
7
7
  import { parentPort, workerData } from "node:worker_threads";
8
8
  //#region apps/cli/src/agent-setup/worker.ts
package/dist/cli.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- import { _ as createExecutionPort, a as readAgentPresence, d as parseOptions, f as businessCommands, g as readStateDump, h as startupFailure, i as invoke, l as createRenderActivity, m as permissionDiagnostic, n as readOperation, o as createRuntime, p as longCommands, r as waitOperation, s as executorEventSchema, t as cancelOperation, u as helpText, v as startHost, y as traceStartup } from "./query-BA0XCwnR.mjs";
3
- import { et as makePrivateDirectory, tt as openPrivateFile } from "./src-k0Ya1Bri.mjs";
2
+ import { _ as createExecutionPort, a as readAgentPresence, d as parseOptions, f as businessCommands, g as readStateDump, h as startupFailure, i as invoke, l as createRenderActivity, m as permissionDiagnostic, n as readOperation, o as createRuntime, p as longCommands, r as waitOperation, s as executorEventSchema, t as cancelOperation, u as helpText, v as startHost, y as traceStartup } from "./query-DN99jiRc.mjs";
3
+ import { nt as openPrivateFile, tt as makePrivateDirectory } from "./src-CPbdnGrk.mjs";
4
4
  import { Gt as safeField, Ht as ApplicationError, Wt as safeCode } from "./locate-U3-nkird.mjs";
5
- import { Qr as stateSchema, er as reviewTransportBytes, rt as readWorkspaceOutcomes, ut as resolveFailureLocation } from "./src-CC95LYYp.mjs";
6
- import { gt as isCoordinationBusy } from "./heap-BHcvxWCw.mjs";
5
+ import { et as readWorkspaceOutcomes, rr as reviewTransportBytes, st as resolveFailureLocation, ti as stateSchema } from "./src-B4R5XMEP.mjs";
6
+ import { _t as isCoordinationBusy } from "./heap-eO_uWpD1.mjs";
7
7
  import { constants, createReadStream, write } from "node:fs";
8
8
  import { z } from "zod";
9
9
  import { lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, writeFile } from "node:fs/promises";
@@ -931,6 +931,42 @@ const readySchema = z.object({
931
931
  journeyId: z.string()
932
932
  })
933
933
  });
934
+ const recordSchema = z.object({
935
+ url: z.string(),
936
+ journeyId: z.string(),
937
+ pid: z.number().int().positive(),
938
+ log: z.string()
939
+ });
940
+ const recordPath = (directory, journeyId) => join(directory, `${journeyId}.host.json`);
941
+ function running(pid) {
942
+ try {
943
+ process.kill(pid, 0);
944
+ return true;
945
+ } catch {
946
+ return false;
947
+ }
948
+ }
949
+ /**
950
+ * The detached host this state directory recorded for the journey, while its process runs and
951
+ * its URL answers; a stale record (a stopped host, a reused pid) is ignored.
952
+ */
953
+ async function liveHost(directory, journeyId) {
954
+ let record;
955
+ try {
956
+ const parsed = recordSchema.safeParse(JSON.parse(await readFile(recordPath(directory, journeyId), "utf8")));
957
+ if (!parsed.success || parsed.data.journeyId !== journeyId) return null;
958
+ record = parsed.data;
959
+ } catch {
960
+ return null;
961
+ }
962
+ if (!running(record.pid)) return null;
963
+ try {
964
+ await fetch(record.url, { signal: AbortSignal.timeout(2e3) });
965
+ return record;
966
+ } catch {
967
+ return null;
968
+ }
969
+ }
934
970
  /** The same CLI arguments without `--detach` and with the journey read from `input`. */
935
971
  function hostArguments(args, input) {
936
972
  const kept = [];
@@ -953,6 +989,8 @@ function hostArguments(args, input) {
953
989
  * Starts `journey.serve` in its own process group, outside the agent tool that ran this command,
954
990
  * so an agent host's limit on background tasks does not stop the panel mid-Send (BL-210). The
955
991
  * host's output goes to an owner-only log; this command prints its readiness with the pid.
992
+ * A detached host already serving the journey is reused (`reused: true`), so the Skill helper can
993
+ * ensure one owns the panel before the agent's turn ends (ADR 0227).
956
994
  */
957
995
  async function serveDetached(args, stateDir, journeyId) {
958
996
  const directory = join(stateDir, "serve");
@@ -960,6 +998,18 @@ async function serveDetached(args, stateDir, journeyId) {
960
998
  recursive: true,
961
999
  mode: 448
962
1000
  });
1001
+ const existing = await liveHost(directory, journeyId);
1002
+ if (existing) {
1003
+ process.stdout.write(`${JSON.stringify({
1004
+ ok: true,
1005
+ event: "ready",
1006
+ result: {
1007
+ ...existing,
1008
+ reused: true
1009
+ }
1010
+ })}\n`);
1011
+ return;
1012
+ }
963
1013
  const id = randomUUID();
964
1014
  const input = join(directory, `${id}.json`);
965
1015
  const log = join(directory, `${id}.log`);
@@ -992,14 +1042,21 @@ async function serveDetached(args, stateDir, journeyId) {
992
1042
  return [];
993
1043
  }
994
1044
  })[0];
995
- if (ready) {
1045
+ if (ready && child.pid !== void 0) {
1046
+ const record = {
1047
+ ...ready,
1048
+ pid: child.pid,
1049
+ log
1050
+ };
1051
+ const temporary = `${recordPath(directory, journeyId)}.${id}.tmp`;
1052
+ await writeFile(temporary, JSON.stringify(record), { mode: 384 });
1053
+ await rename(temporary, recordPath(directory, journeyId));
996
1054
  process.stdout.write(`${JSON.stringify({
997
1055
  ok: true,
998
1056
  event: "ready",
999
1057
  result: {
1000
- ...ready,
1001
- pid: child.pid,
1002
- log
1058
+ ...record,
1059
+ reused: false
1003
1060
  }
1004
1061
  })}\n`);
1005
1062
  return;
@@ -1,4 +1,4 @@
1
- import { i as errorCode } from "./model-BJdTLNjT.mjs";
1
+ import { i as errorCode } from "./model-BBAnsFAx.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 { J as createConfiguredPreviewStream } from "./src-k0Ya1Bri.mjs";
1
+ import { J as createConfiguredPreviewStream } from "./src-CPbdnGrk.mjs";
2
2
  import { rn as workspaceSchema, tn as sessionSchema, yn as createStaticProcessor } from "./locate-U3-nkird.mjs";
3
- import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-B5SArpVY.mjs";
4
- import { ni as effectiveTreatmentSchema } from "./src-CC95LYYp.mjs";
5
- import { a as classifyRecord, n as assertPreviewHeap, t as runPreview } from "./run-BeLHsZWb.mjs";
3
+ import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-qoLRvX-A.mjs";
4
+ import { ai as effectiveTreatmentSchema } from "./src-B4R5XMEP.mjs";
5
+ import { a as classifyRecord, n as assertPreviewHeap, t as runPreview } from "./run-4G_CvdDj.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,7 +1,8 @@
1
- import { A as runConfiguredSessionJob, Q as safeError, R as gitSeedsProvider, m as captureConfiguredSessionJob, u as runConfiguredScanJob } from "./src-k0Ya1Bri.mjs";
2
- import { yn as createStaticProcessor } from "./locate-U3-nkird.mjs";
3
- import { l as createNativeAdapters } from "./src-B5SArpVY.mjs";
4
- import { i as runJourneyOutputVerifyJob, n as runJourneyOutputJob, r as runJourneyOutputShardJob } from "./job-J3NFw3MH.mjs";
1
+ import { $ as safeError, A as runConfiguredSessionJob, R as gitSeedsProvider, m as captureConfiguredSessionJob, u as runConfiguredScanJob } from "./src-CPbdnGrk.mjs";
2
+ import { Wt as safeCode, yn as createStaticProcessor } from "./locate-U3-nkird.mjs";
3
+ import { l as createNativeAdapters } from "./src-qoLRvX-A.mjs";
4
+ import "./src-B4R5XMEP.mjs";
5
+ import { d as runJourneyBaseJob, i as runJourneyOutputVerifyJob, n as runJourneyOutputJob, r as runJourneyOutputShardJob } from "./job-rK-Ho9OD.mjs";
5
6
  import { parentPort } from "node:worker_threads";
6
7
  //#region apps/cli/src/configured-session-worker.ts
7
8
  const port = parentPort;
@@ -28,6 +29,9 @@ function isJourneyOutputShardRequest(value) {
28
29
  function isJourneyOutputVerifyRequest(value) {
29
30
  return typeof value === "object" && value !== null && Reflect.get(value, "kind") === "journey-output-verify";
30
31
  }
32
+ function isJourneyBaseRequest(value) {
33
+ return typeof value === "object" && value !== null && Reflect.get(value, "kind") === "journey-base";
34
+ }
31
35
  function failureSourceId(error) {
32
36
  let current = error;
33
37
  for (let depth = 0; depth < 8 && current instanceof Error; depth++) {
@@ -82,6 +86,23 @@ port?.on("message", async (message) => {
82
86
  path
83
87
  }))
84
88
  });
89
+ else if (isJourneyBaseRequest(message)) try {
90
+ post({
91
+ kind: "result",
92
+ result: await runJourneyBaseJob(message.job, {
93
+ adapters,
94
+ processor
95
+ }, signal, (path) => post({
96
+ kind: "spool",
97
+ path
98
+ }))
99
+ });
100
+ } catch (error) {
101
+ post({
102
+ kind: "error",
103
+ code: safeCode(error)
104
+ });
105
+ }
85
106
  else if (isJourneyOutputShardRequest(message)) post({
86
107
  kind: "result",
87
108
  result: await runJourneyOutputShardJob(message.job, {
@@ -1,6 +1,6 @@
1
- import { $ as exclusiveLock, b as writePrivateReviewPayload, nt as restrictToOwner, rt as windowsOwnerOnly, tt as openPrivateFile, x as readPrivateReviewPayload } from "./src-k0Ya1Bri.mjs";
1
+ import { b as writePrivateReviewPayload, et as exclusiveLock, it as windowsOwnerOnly, nt as openPrivateFile, rt as restrictToOwner, x as readPrivateReviewPayload } from "./src-CPbdnGrk.mjs";
2
2
  import { $t as fileIdentitySchema, At as journeyTermSchema, Ht as ApplicationError, It as termTypeSchema, Jt as reviewFamilies, Kn as isStaticCategory, Mt as reviewTermsResultSchema, _ as semanticFindingSchema, b as validateBReview, c as textDigest, d as reviewAlignmentAudit, dt as nativeJourneySchema, ft as journeyGuidanceSchema, g as validateReviewAlignment, gn as createDetectionSummary, gt as journeyWorkSuggestionSchema, ht as journeyDescribeSchema, i as reviewBatchSchema, it as journeyDigestSchema, jt as reviewTermsInputSchema, kt as privacyTermSchema, l as validateReview, m as reviewAlignmentSchema, o as reviewDigest, ot as journeyIdSchema, qn as staticCategories, qt as familySelected, r as reviewBatchChunks, s as reviewSubmitSchema, u as findingReferenceKey, v as bContextEvidence } from "./locate-U3-nkird.mjs";
3
- import { $ as validateDetectionSummary, $n as reviewRepairResourceSchema, $t as journeyPolicyRespondSchema, Br as mergePrivacyTerms, Bt as journeyGuidance, C as bReviewScope, Dn as settleConfirmedHides, Dt as journeySendSchema, Fn as bMaskedHits, Ft as obsoleteJourney, Gn as syncTermGroups, Gt as journeyContextQuerySchema, Hn as dictionaryHides, Ht as journeyBatchReadSchema, Ir as isReadingComplete, J as validateInspectionFence, Jn as workPrivacyDecisions, Jt as hideFinishSchema, Kn as retireWorkDescription, Kt as journeyContextSchema, Lr as isSelectedWork, Mr as staticSessionId, Nt as settleCorrections, Q as validateInspectionContribution, Qr as stateSchema, Qt as searchScopeDigest, Rn as confirmedHideGroupIds, Rr as selectedWorks, Rt as attemptBudgetCodePoints, Sn as journeyEventSchema, Sr as validatePreparationFacts, U as validateInspectionBatch, Ut as journeyReviewStorageQuerySchema, Vn as confirmedHideTerms, W as validateInspectionBatches, Wn as maskedHitsStale, X as validateInspectionInputs, Xt as journeySearchResultSchema, Y as validateInspectionHead, Yt as hidePublishSchema, Z as validateInspectionQuery, Zn as reviewCandidateResourceSchema, Zt as journeySearchSaveSchema, _ as hideScopeDigest, _n as sessionReviewStatusSchema, _r as journeyPreparationProgressSchema, an as sortingApplySchema, ar as scanCanonicalResourceSchema, b as projectJourneyInventory, bn as journeyCommitResultSchema, br as preparationSettlementSchema, c as bRereadDigest, cn as reviewAttemptsResultSchema, cr as scanGitSeedsId, d as newJourneyWork, dn as sessionReconciliationResourceSchema, en as projectPreparationProgress, et as inspectionInputs, f as reviseGroupMembership, fr as validateScanExclusion, gn as sessionReviewResourceSchema, gr as journeyInventorySchema, gt as manualUploadSchema, hn as sessionReviewQuerySchema, hr as journeyInventoryReadSchema, in as journeyPlaceSchema, ir as scanAliasResourceSchema, l as reconcileBSession, nn as journeyResourceSchema, nr as mergeBRepair, on as reviewAttemptResourceSchema, p as resolveGroupSplit, pn as sessionRereadResourceSchema, pt as manualUploadBindingSchema, q as validateInspectionClaim, qn as workDecisionDigest, qt as hideBeginSchema, r as scanBatchContextDigest, rn as journeyIsolateSchema, sn as reviewAttemptsQuerySchema, sr as scanSessionResourceSchema, tn as journeyResourceQuerySchema, tr as bReviewDigest, u as reconstructBFields, un as sessionReconcileResultSchema, v as semanticGroupKey, vn as sessionUsefulnessInputSchema, vt as candidateSortAvailable, wn as confirmedHideDeltaSchema, wr as applyCardAnswers, x as preparationScope, xn as journeyCommitSchema, xr as preparationStartSchema, yn as sessionUsefulnessResourceSchema, yr as preparationBeginSchema, zn as confirmedHideKey, zr as withReadingProgress, zt as validateAttemptAppend } from "./src-CC95LYYp.mjs";
3
+ import { $t as journeySearchResultSchema, An as settleConfirmedHides, At as settleCorrections, B as validateInspectionBatch, Br as isSelectedWork, Bt as journeyReviewStorageQuerySchema, Cn as journeyCommitResultSchema, Cr as preparationSettlementSchema, Dn as confirmedHideDeltaSchema, Dr as applyCardAnswers, Fr as staticSessionId, Ft as attemptBudgetCodePoints, G as validateInspectionFence, Gn as dictionaryHides, Hn as confirmedHideKey, Hr as withReadingProgress, Ht as classificationCommitSchema, It as validateAttemptAppend, J as validateInspectionQuery, Jn as syncTermGroups, Jt as journeyContextQuerySchema, K as validateInspectionHead, Kt as newJourneyWork, Lt as journeyGuidance, Mt as obsoleteJourney, Qt as hidePublishSchema, Rn as bMaskedHits, Sn as sessionUsefulnessResourceSchema, Sr as preparationBeginSchema, Tn as journeyEventSchema, Tr as validatePreparationFacts, Ur as mergePrivacyTerms, V as validateInspectionBatches, Vn as confirmedHideGroupIds, Vr as selectedWorks, Vt as applyClassificationProposal, W as validateInspectionClaim, Wn as confirmedHideTerms, X as validateDetectionSummary, Xn as workDecisionDigest, Xt as hideBeginSchema, Y as validateInspectionContribution, Yn as retireWorkDescription, Yt as journeyContextSchema, Z as inspectionInputs, Zn as workPrivacyDecisions, Zt as hideFinishSchema, _ as projectJourneyInventory, an as journeyResourceSchema, ar as mergeBRepair, b as bReviewScope, bn as sessionReviewStatusSchema, br as journeyPreparationProgressSchema, c as reconstructBFields, cn as sortingApplySchema, cr as scanCanonicalResourceSchema, dn as reviewAttemptsResultSchema, dr as scanGitSeedsId, en as journeySearchSaveSchema, er as reviewCandidateResourceSchema, gn as sessionRereadResourceSchema, h as semanticGroupKey, hr as validateScanExclusion, ht as candidateSortAvailable, in as journeyResourceQuerySchema, ir as bReviewDigest, l as reviseGroupMembership, ln as reviewAttemptResourceSchema, m as hideScopeDigest, mn as sessionReconciliationResourceSchema, nn as journeyPolicyRespondSchema, nr as reviewRepairResourceSchema, o as bRereadDigest, on as journeyIsolateSchema, pn as sessionReconcileResultSchema, pt as manualUploadSchema, q as validateInspectionInputs, qn as maskedHitsStale, rn as projectPreparationProgress, s as reconcileBSession, sn as journeyPlaceSchema, sr as scanAliasResourceSchema, t as scanBatchContextDigest, ti as stateSchema, tn as searchScopeDigest, u as resolveGroupSplit, un as reviewAttemptsQuerySchema, ur as scanSessionResourceSchema, ut as manualUploadBindingSchema, v as preparationScope, vn as sessionReviewQuerySchema, vr as journeyInventoryReadSchema, wn as journeyCommitSchema, wr as preparationStartSchema, wt as journeySendSchema, xn as sessionUsefulnessInputSchema, yn as sessionReviewResourceSchema, yr as journeyInventorySchema, zr as isReadingComplete, zt as journeyBatchReadSchema } from "./src-B4R5XMEP.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";
@@ -6222,6 +6222,43 @@ function finishStatus(db, packet) {
6222
6222
  };
6223
6223
  }
6224
6224
  //#endregion
6225
+ //#region packages/local-host/src/store/journey/classification.ts
6226
+ function classificationJourneyCommit(plan, state, expectedRevision) {
6227
+ return {
6228
+ expectedRevision,
6229
+ requestKey: plan.requestKey,
6230
+ requestHash: plan.requestHash,
6231
+ state,
6232
+ event: {
6233
+ journeyId: plan.journeyId,
6234
+ kind: "response",
6235
+ source: "conversation",
6236
+ at: plan.at
6237
+ }
6238
+ };
6239
+ }
6240
+ /**
6241
+ * BL-216: the prepared proposal is applied to the state read in this transaction, so scan writes
6242
+ * since it was prepared are kept instead of refusing it. A replay returns its receipt; a changed
6243
+ * classification, partition or scope answers stale. A change of confirmed Hide values returns
6244
+ * the proposed state so the caller can read the value change and commit it at that revision.
6245
+ */
6246
+ function commitJourneyClassification(db, plan) {
6247
+ const current = readJourney(db);
6248
+ if (!current) throw new ApplicationError("REVISION_CONFLICT");
6249
+ if (db.prepare("SELECT 1 FROM journey_receipts WHERE request_key=?").get(plan.requestKey)) return commitJourney(db, classificationJourneyCommit(plan, current, current.revision));
6250
+ const next = current.journeyId === plan.journeyId && applyClassificationProposal(current, plan);
6251
+ if (!next) return {
6252
+ status: "stale",
6253
+ state: current
6254
+ };
6255
+ const result = commitJourneyChecked(db, classificationJourneyCommit(plan, next, current.revision));
6256
+ return result.status === "hide-delta" ? {
6257
+ ...result,
6258
+ next
6259
+ } : result;
6260
+ }
6261
+ //#endregion
6225
6262
  //#region packages/local-host/src/store/inspection/claim.ts
6226
6263
  function currentInputs(db, runId) {
6227
6264
  const row = db.prepare("SELECT * FROM inspection_inputs WHERE run_id=?").get(runId);
@@ -6796,6 +6833,11 @@ const operations = {
6796
6833
  status: z.literal("hide-delta"),
6797
6834
  state: nativeJourneySchema
6798
6835
  }).strict()]).parse(value)),
6836
+ "journey.classification.commit": define(true, classificationCommitSchema, commitJourneyClassification, (value) => z.union([journeyCommitResultSchema, z.object({
6837
+ status: z.literal("hide-delta"),
6838
+ state: nativeJourneySchema,
6839
+ next: nativeJourneySchema
6840
+ }).strict()]).parse(value)),
6799
6841
  "journey.events": define(false, z.object({
6800
6842
  journeyId: z.uuid(),
6801
6843
  after: z.number().int().nonnegative(),
@@ -7262,4 +7304,4 @@ function assertStoreHeap(limitBytes = getHeapStatistics().heap_size_limit) {
7262
7304
  return limitBytes;
7263
7305
  }
7264
7306
  //#endregion
7265
- export { schemaVersion as $, inspectionQuerySchema as A, privateReviewHash as B, loadAuthenticatedReview as C, sessionUsefulnessRecommendation as D, aggregateUsefulness as E, reuseQuerySchema as F, initializeAndClaim as G, createJourneyPayloadFiles as H, batchQuery as I, withDatabase as J, ownership as K, isPrivateResourceKind as L, sameCandidateRequest as M, validateCandidateAttempt as N, sessionQuery as O, validateUnitCandidate as P, checkVersion as Q, privateResourceHeader as R, loadAcceptedReview as S, loadPrivateResource as T, validateBatchBody as U, batchHeader as V, requireActiveBatch as W, readStoredState as X, readBundleDirectory as Y, validateState as Z, loadRereadBodies as _, isSqliteCorruption as _t, decodeError as a, inspectStateFiles as at, validateSessionReconciliation as b, dropsAnchor as c, readResetMarker as ct, parseDelivery as d, syncDirectory as dt, beginReset as et, validateCandidate as f, withStateSnapshot as ft, loadReconciliation as g, isCoordinationBusy as gt, loadPreparedBodies as h, errorCode as ht, createExecutor as i, hasResetMarker as it, evaluateUnitEvidence as j, resourceSelectionQuerySchema as k, replySchema as l, recheckPrivatePath as lt, loadPreparation as m, StoreError as mt, releaseInheritedHeapFlags as n, databaseName as nt, ProtocolError as o, present as ot, loadStatus as p, withFileCheckTimings as pt, validateDatabase as q, storeHeapLimits as r, finishReset as rt, allowedReplies as s, privatePath as st, assertStoreHeap as t, createDatabaseFile as tt, operations as u, stateDirectory as ut, loadSessionBodies as v, loadBatch as w, validateSessionBindings as x, validatePreparationSelection as y, termReuseQuerySchema as z };
7307
+ export { checkVersion as $, resourceSelectionQuerySchema as A, termReuseQuerySchema as B, loadAcceptedReview as C, aggregateUsefulness as D, loadPrivateResource as E, validateUnitCandidate as F, requireActiveBatch as G, batchHeader as H, reuseQuerySchema as I, validateDatabase as J, initializeAndClaim as K, batchQuery as L, evaluateUnitEvidence as M, sameCandidateRequest as N, sessionUsefulnessRecommendation as O, validateCandidateAttempt as P, validateState as Q, isPrivateResourceKind as R, validateSessionBindings as S, loadBatch as T, createJourneyPayloadFiles as U, privateReviewHash as V, validateBatchBody as W, readBundleDirectory as X, withDatabase as Y, readStoredState as Z, loadReconciliation as _, isCoordinationBusy as _t, decodeError as a, hasResetMarker as at, validatePreparationSelection as b, dropsAnchor as c, privatePath as ct, parseDelivery as d, stateDirectory as dt, schemaVersion as et, validateCandidate as f, syncDirectory as ft, loadPreparedBodies as g, errorCode as gt, loadPreparation as h, StoreError as ht, createExecutor as i, finishReset as it, inspectionQuerySchema as j, sessionQuery as k, replySchema as l, readResetMarker as lt, loadStatus as m, withFileCheckTimings as mt, releaseInheritedHeapFlags as n, createDatabaseFile as nt, ProtocolError as o, inspectStateFiles as ot, classificationJourneyCommit as p, withStateSnapshot as pt, ownership as q, storeHeapLimits as r, databaseName as rt, allowedReplies as s, present as st, assertStoreHeap as t, beginReset as tt, operations as u, recheckPrivatePath as ut, loadRereadBodies as v, isSqliteCorruption as vt, loadAuthenticatedReview as w, validateSessionReconciliation as x, loadSessionBodies as y, privateResourceHeader as z };
@@ -1,7 +1,7 @@
1
- import { Y as createInspectionProcessor } from "./src-k0Ya1Bri.mjs";
1
+ import { Y as createInspectionProcessor } from "./src-CPbdnGrk.mjs";
2
2
  import { yn as createStaticProcessor } from "./locate-U3-nkird.mjs";
3
- import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-B5SArpVY.mjs";
4
- import { G as validateInspectionRequest } from "./src-CC95LYYp.mjs";
3
+ import { l as createNativeAdapters, u as createGitNameSeedProvider } from "./src-qoLRvX-A.mjs";
4
+ import { H as validateInspectionRequest } from "./src-B4R5XMEP.mjs";
5
5
  import "./messages-D3m3bhva.mjs";
6
6
  import { z } from "zod";
7
7
  import { parentPort, workerData } from "node:worker_threads";