@use-aistack/cli 0.16.6 → 0.16.7
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/README.md +3 -1
- package/dist/cursor-worker.js +14 -9
- package/dist/cursor-worker.js.map +1 -1
- package/dist/index.js +104 -44
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,7 +31,9 @@ npx @use-aistack/cli sync --verbose
|
|
|
31
31
|
AISTACK_DEBUG=1 npx @use-aistack/cli sync # the same, for a hook or a script
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
The lines go to stderr and hold counts and
|
|
34
|
+
The lines go to stderr and hold counts, durations, and safe error codes: no paths, prompts, or database values. Paste them into a bug report. Expected Git discovery misses are summarized as informational messages; incomplete Cursor sessions are grouped into one warning.
|
|
35
|
+
|
|
36
|
+
Partial history still contributes dated usage. The review marks it as partial, and the backend retains previously recorded evidence. Missing models, harnesses, dates, and workflow readings are not cleared by a partial sync. Repeated readings are not added together. An existing model is updated only when the incoming reading covers all its stored token buckets and recorded cost; otherwise the stored model reading stays. A complete scan can still apply corrections through the normal daily replacement path.
|
|
35
37
|
|
|
36
38
|
### `npx @use-aistack/cli sync --auto on` / `off`
|
|
37
39
|
|
package/dist/cursor-worker.js
CHANGED
|
@@ -19127,6 +19127,9 @@ async function readLocalOnce(root, before, onProgress, sourceReadLimits) {
|
|
|
19127
19127
|
const readDone = traceTimer("cursor history read");
|
|
19128
19128
|
let context;
|
|
19129
19129
|
let retrySmallPage = false;
|
|
19130
|
+
let unresolved = 0;
|
|
19131
|
+
let corrupted = 0;
|
|
19132
|
+
let ambiguous = 0;
|
|
19130
19133
|
try {
|
|
19131
19134
|
const reader = await Promise.resolve().then(() => (init_lib(), lib_exports));
|
|
19132
19135
|
const options = {
|
|
@@ -19155,19 +19158,14 @@ async function readLocalOnce(root, before, onProgress, sourceReadLimits) {
|
|
|
19155
19158
|
for (const summary of page.data) {
|
|
19156
19159
|
stats.filesFound++;
|
|
19157
19160
|
if (summary.resolutionState === "ambiguous") {
|
|
19158
|
-
trace(
|
|
19159
|
-
"cursor session resolution incomplete \xB7 ambiguous source",
|
|
19160
|
-
"warn"
|
|
19161
|
-
);
|
|
19162
19161
|
out.complete = false;
|
|
19163
19162
|
}
|
|
19164
19163
|
try {
|
|
19165
19164
|
const session = await reader.getSession(summary.id, config);
|
|
19166
19165
|
if (session.resolutionState !== "complete" || session.messages.some((m) => m.metadata?.corrupted)) {
|
|
19167
|
-
|
|
19168
|
-
|
|
19169
|
-
|
|
19170
|
-
);
|
|
19166
|
+
if (session.resolutionState !== "complete") unresolved++;
|
|
19167
|
+
if (session.messages.some((m) => m.metadata?.corrupted))
|
|
19168
|
+
corrupted++;
|
|
19171
19169
|
out.complete = false;
|
|
19172
19170
|
}
|
|
19173
19171
|
const tokens = await readTokenEvidence(root, session);
|
|
@@ -19176,7 +19174,8 @@ async function readLocalOnce(root, before, onProgress, sourceReadLimits) {
|
|
|
19176
19174
|
onProgress?.(stats.filesRead, page.pagination.total);
|
|
19177
19175
|
} catch (error) {
|
|
19178
19176
|
if (isPageByteLimit(error)) throw error;
|
|
19179
|
-
|
|
19177
|
+
if (traceErrorCode(error) === "SESSION_AMBIGUOUS") ambiguous++;
|
|
19178
|
+
else traceError("cursor session skipped", error, "warn");
|
|
19180
19179
|
out.complete = false;
|
|
19181
19180
|
stats.filesUnreadable++;
|
|
19182
19181
|
} finally {
|
|
@@ -19228,6 +19227,12 @@ async function readLocalOnce(root, before, onProgress, sourceReadLimits) {
|
|
|
19228
19227
|
);
|
|
19229
19228
|
out.complete = false;
|
|
19230
19229
|
}
|
|
19230
|
+
if (unresolved || corrupted || ambiguous) {
|
|
19231
|
+
trace(
|
|
19232
|
+
`cursor partial history \xB7 ${unresolved} sessions unresolved, ${corrupted} with corrupted messages, ${ambiguous} skipped with conflicting copies${ambiguous ? " (SESSION_AMBIGUOUS)" : ""} \xB7 available dated usage retained`,
|
|
19233
|
+
"warn"
|
|
19234
|
+
);
|
|
19235
|
+
}
|
|
19231
19236
|
readDone(
|
|
19232
19237
|
`${stats.filesRead}/${stats.filesFound} sessions read, ${stats.filesUnreadable} unreadable${out.complete ? "" : ", incomplete"}`,
|
|
19233
19238
|
out.complete ? "success" : "warn"
|