ai-lens 0.8.89 → 0.8.90
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/.commithash +1 -1
- package/CHANGELOG.md +3 -0
- package/cli/import/claude-code.js +2 -2
- package/cli/import.js +1 -1
- package/cli/init.js +5 -1
- package/package.json +1 -1
package/.commithash
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
9596d22
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
History of changes to the `ai-lens` CLI package on npm. New entries go on top. Format: `## X.Y.Z — YYYY-MM-DD`, followed by user-facing bullets.
|
|
4
4
|
|
|
5
|
+
## 0.8.90 — 2026-06-11
|
|
6
|
+
- improve: the default import window for `ai-lens import claude-code` (and the import offer inside `init`) is now 90 days instead of 30 — machines with a longer Claude Code transcript retention get their full recent history. Auto-analysis still covers only the last 30 days; older sessions enter metrics and cost rollups.
|
|
7
|
+
|
|
5
8
|
## 0.8.89 — 2026-06-11
|
|
6
9
|
- improve: `ai-lens import claude-code` (and the import step inside `init`) now shows a live progress spinner — transcripts scanned, events collected, batches shipping — instead of sitting silent for minutes on a large history. Terminal-only; piped/CI output is unchanged.
|
|
7
10
|
|
|
@@ -88,7 +88,7 @@ export function resolveCutoff({ days, since, from }, now = new Date()) {
|
|
|
88
88
|
const lower = from || since;
|
|
89
89
|
if (lower) return new Date(Date.parse(lower)).toISOString();
|
|
90
90
|
if (days === 0) return new Date(0).toISOString();
|
|
91
|
-
const d = Number.isInteger(days) && days >= 0 ? days :
|
|
91
|
+
const d = Number.isInteger(days) && days >= 0 ? days : 90;
|
|
92
92
|
return new Date(now.getTime() - d * DAY_MS).toISOString();
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -284,7 +284,7 @@ async function drainSpool({ timeoutMs = 120_000 } = {}) {
|
|
|
284
284
|
|
|
285
285
|
export default async function importClaudeCode(flags) {
|
|
286
286
|
const {
|
|
287
|
-
days =
|
|
287
|
+
days = 90, since = null, from = null, to = null, dryRun = false, projects = null,
|
|
288
288
|
noRedact = false, analysisMaxAgeDays: amAgeFlag = 30,
|
|
289
289
|
} = flags;
|
|
290
290
|
const analysisMaxAgeDays = Number.isInteger(amAgeFlag) && amAgeFlag >= 0 ? amAgeFlag : 30;
|
package/cli/import.js
CHANGED
|
@@ -17,7 +17,7 @@ const INT_KEYS = new Set(['days', 'analysisMaxAgeDays']);
|
|
|
17
17
|
* REAL import instead of a preview.)
|
|
18
18
|
*/
|
|
19
19
|
export function parseFlags(argv) {
|
|
20
|
-
const flags = { days:
|
|
20
|
+
const flags = { days: 90, since: null, from: null, to: null, dryRun: false, projects: null, noRedact: false, analysisMaxAgeDays: 30 };
|
|
21
21
|
const errors = [];
|
|
22
22
|
for (let i = 0; i < argv.length; i++) {
|
|
23
23
|
const arg = argv[i];
|
package/cli/init.js
CHANGED
|
@@ -1251,7 +1251,11 @@ async function maybeOfferImportHistory(flags) {
|
|
|
1251
1251
|
heading('Importing local history');
|
|
1252
1252
|
try {
|
|
1253
1253
|
const { default: importClaudeCode } = await import('./import/claude-code.js');
|
|
1254
|
-
|
|
1254
|
+
// 90 days, not 30: Claude Code's local retention (~30d default) bounds the
|
|
1255
|
+
// volume anyway, but machines with longer retention get their full recent
|
|
1256
|
+
// history. LLM-analysis cost stays capped by the importer's
|
|
1257
|
+
// analysisMaxAgeDays=30 — older sessions land in metrics/cost rollups only.
|
|
1258
|
+
await importClaudeCode({ days: 90 }); // server URL + git identity were just configured
|
|
1255
1259
|
} catch (err) {
|
|
1256
1260
|
error(` Import failed: ${err.message}`);
|
|
1257
1261
|
info(' You can retry later: `npx -y ai-lens import claude-code`');
|