sift-light 1.1.0 → 1.1.1-2

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.
@@ -222,7 +222,7 @@ export async function readWorkspaceDocument(
222
222
  });
223
223
  if (!before) throw new SourceDocumentError("source-unavailable", "Source is unavailable");
224
224
  if (expected && !sameSourceRevision(before, expected.revision)) {
225
- throw new SourceDocumentError("source-changed", "Source changed; start a new inspection");
225
+ throw new SourceDocumentError("source-changed", "Source changed; refresh the search");
226
226
  }
227
227
  if (before.size > Math.min(MAX_SOURCE_FILE_BYTES, readBudget)) {
228
228
  throw new SourceDocumentError("file-too-large", "Source exceeds the 5 MiB file limit");
@@ -261,10 +261,7 @@ export async function readWorkspaceDocument(
261
261
  if (signal?.aborted) throw abortError();
262
262
  const hash = contentHash(bytes);
263
263
  if (expected && expected.contentHash !== hash) {
264
- throw new SourceDocumentError(
265
- "source-changed",
266
- "Source content changed; start a new inspection",
267
- );
264
+ throw new SourceDocumentError("source-changed", "Source content changed; refresh the search");
268
265
  }
269
266
  return new SourceDocument(
270
267
  {
@@ -74,6 +74,7 @@ export function matchInspectionTarget(target: InspectionTarget): SourceInspectio
74
74
  path: target.path,
75
75
  line: target.line,
76
76
  unverified: target.unverified,
77
+ ...(target.expectedReference ? { reference: target.expectedReference } : {}),
77
78
  ...(target.expectedRevision ? { expectedRevision: target.expectedRevision } : {}),
78
79
  ...(target.retainedMatch?.occurrences[0]
79
80
  ? { focus: target.retainedMatch.occurrences[0].byteStart }
package/src/types.ts CHANGED
@@ -231,6 +231,8 @@ export interface SearchScan {
231
231
  totalMatches: number;
232
232
  fileCounts: Map<string, number>;
233
233
  sourceRevisions: Map<string, SourceRevision>;
234
+ /** Full content identities for retained worktree matches; missing entries are unverified. */
235
+ sourceReferences?: Map<string, SourceReference>;
234
236
  snapshotComplete: boolean;
235
237
  filesystemCoverage?: "complete" | "policy-filtered" | "partial";
236
238
  filesystemCoverageReasons?: string[];