@use-aistack/cli 0.16.7 → 0.16.8

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.
@@ -19130,6 +19130,8 @@ async function readLocalOnce(root, before, onProgress, sourceReadLimits) {
19130
19130
  let unresolved = 0;
19131
19131
  let corrupted = 0;
19132
19132
  let ambiguous = 0;
19133
+ let stage = "reader setup";
19134
+ const signal = AbortSignal.timeout(12e4);
19133
19135
  try {
19134
19136
  const reader = await Promise.resolve().then(() => (init_lib(), lib_exports));
19135
19137
  const options = {
@@ -19139,7 +19141,7 @@ async function readLocalOnce(root, before, onProgress, sourceReadLimits) {
19139
19141
  traceError("cursor source diagnostic", diagnostic, "warn");
19140
19142
  out.complete = false;
19141
19143
  },
19142
- signal: AbortSignal.timeout(12e4)
19144
+ signal
19143
19145
  };
19144
19146
  context = reader.createSessionReadContext({ ...options, sourceReadLimits });
19145
19147
  const config = { ...options, readContext: context };
@@ -19148,6 +19150,7 @@ async function readLocalOnce(root, before, onProgress, sourceReadLimits) {
19148
19150
  const pageDone = traceTimer(
19149
19151
  offset === 0 ? "cursor session listing" : "cursor session page"
19150
19152
  );
19153
+ stage = "session listing";
19151
19154
  const page = await reader.listSessionSummaries({
19152
19155
  ...config,
19153
19156
  offset,
@@ -19161,6 +19164,7 @@ async function readLocalOnce(root, before, onProgress, sourceReadLimits) {
19161
19164
  out.complete = false;
19162
19165
  }
19163
19166
  try {
19167
+ stage = "session read";
19164
19168
  const session = await reader.getSession(summary.id, config);
19165
19169
  if (session.resolutionState !== "complete" || session.messages.some((m) => m.metadata?.corrupted)) {
19166
19170
  if (session.resolutionState !== "complete") unresolved++;
@@ -19168,6 +19172,7 @@ async function readLocalOnce(root, before, onProgress, sourceReadLimits) {
19168
19172
  corrupted++;
19169
19173
  out.complete = false;
19170
19174
  }
19175
+ stage = "token evidence";
19171
19176
  const tokens = await readTokenEvidence(root, session);
19172
19177
  out.sessions.push({ session, tokens });
19173
19178
  stats.filesRead++;
@@ -19175,7 +19180,7 @@ async function readLocalOnce(root, before, onProgress, sourceReadLimits) {
19175
19180
  } catch (error) {
19176
19181
  if (isPageByteLimit(error)) throw error;
19177
19182
  if (traceErrorCode(error) === "SESSION_AMBIGUOUS") ambiguous++;
19178
- else traceError("cursor session skipped", error, "warn");
19183
+ else traceError(`cursor ${stage}`, error, "warn");
19179
19184
  out.complete = false;
19180
19185
  stats.filesUnreadable++;
19181
19186
  } finally {
@@ -19194,7 +19199,9 @@ async function readLocalOnce(root, before, onProgress, sourceReadLimits) {
19194
19199
  offset += page.data.length;
19195
19200
  }
19196
19201
  } catch (error) {
19197
- traceError("cursor history", error);
19202
+ traceError(`cursor ${stage}`, error);
19203
+ if (signal.aborted)
19204
+ traceError("cursor read deadline", signal.reason, "warn");
19198
19205
  retrySmallPage = isPageByteLimit(error) && sourceReadLimits?.sqlitePageRows !== 1;
19199
19206
  stats.unreadableFiles.push({
19200
19207
  path: "history",