osborn 0.9.292 → 0.9.295
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.
|
@@ -25,6 +25,11 @@ Use this every time changes are ready to ship.
|
|
|
25
25
|
4. User publishes to NPM from Mac
|
|
26
26
|
- User runs `git pull` on their Mac
|
|
27
27
|
- User runs `cd agent && npm publish` from the osborn repo
|
|
28
|
+
- Or publish from CI (`.github/workflows/publish-agent.yml`, npm Trusted Publishing, no token):
|
|
29
|
+
after the version bump is merged to main, `git tag agent-v<ver> && git push origin agent-v<ver>`
|
|
30
|
+
(on that merged commit). CI checks the tag matches package.json and the commit is on main, runs
|
|
31
|
+
every agent test, builds and packs, then a separate job holding the publish token publishes that
|
|
32
|
+
tarball after the `npm` environment's required reviewer approves (npm refuses an existing version).
|
|
28
33
|
|
|
29
34
|
5. Update the Sprite from the NPM registry
|
|
30
35
|
- `npm install -g osborn`
|
package/dist/config.js
CHANGED
|
@@ -543,6 +543,8 @@ function accumulatePreviewEntry(acc, entry) {
|
|
|
543
543
|
return;
|
|
544
544
|
if (!acc.firstTs && typeof entry.timestamp === 'string' && entry.timestamp)
|
|
545
545
|
acc.firstTs = entry.timestamp;
|
|
546
|
+
if (typeof entry.timestamp === 'string' && entry.timestamp)
|
|
547
|
+
acc.anyTs = entry.timestamp;
|
|
546
548
|
if (entry.type === 'ai-title' && typeof entry.aiTitle === 'string') {
|
|
547
549
|
const t = cleanTurnText(entry.aiTitle, 'assistant');
|
|
548
550
|
if (t)
|
|
@@ -660,7 +662,9 @@ async function getSessionPreview(filePath, fileSize) {
|
|
|
660
662
|
title: tail.aiTitle ?? head.aiTitle ?? head.firstUser,
|
|
661
663
|
messageCount,
|
|
662
664
|
firstTs: head.firstTs,
|
|
663
|
-
|
|
665
|
+
// No dated turn in the tail sample: any dated record there (a tool result), else unset
|
|
666
|
+
// so callers use the file's mtime — never the head sample's turn.
|
|
667
|
+
lastActivityAt: tail.lastTs ?? tail.anyTs,
|
|
664
668
|
};
|
|
665
669
|
}
|
|
666
670
|
finally {
|
|
@@ -781,8 +785,8 @@ export function invalidateSessionListCache() {
|
|
|
781
785
|
}
|
|
782
786
|
// Older manifests are discarded on load. v2: sanitized preview fields. v3: the
|
|
783
787
|
// large-file messageCount estimate changed, and unchanged files are never re-read.
|
|
784
|
-
// v4: the large-file count is the sampled lower bound.
|
|
785
|
-
const SESSION_MANIFEST_VERSION =
|
|
788
|
+
// v4: the large-file count is the sampled lower bound. v5: no head fallback for last activity.
|
|
789
|
+
const SESSION_MANIFEST_VERSION = 5;
|
|
786
790
|
function sessionManifestPath() {
|
|
787
791
|
return join(homedir(), '.claude', 'session-manifest.json');
|
|
788
792
|
}
|
|
@@ -265,7 +265,7 @@ export async function runLibraryStep(o) {
|
|
|
265
265
|
// Period map on exactly this row range, staged first; published only when a map came back.
|
|
266
266
|
mkdirSync(join(dir, STAGING_DIR), { recursive: true });
|
|
267
267
|
const staged = join(dir, STAGING_DIR, file);
|
|
268
|
-
const r = await runPeriodMap({ sessionId: o.sessionId, outPath: staged, fromRowId: p.startRowId, toRowId: p.endRowId, dry: o.dry, log });
|
|
268
|
+
const r = await runPeriodMap({ sessionId: o.sessionId, outPath: staged, fromRowId: p.startRowId, toRowId: p.endRowId, projectDir, dry: o.dry, log });
|
|
269
269
|
res.costUsd = r.costUsd;
|
|
270
270
|
res.errors = [...r.errors];
|
|
271
271
|
const ok = !!r.map || !!o.dry;
|
|
@@ -25,6 +25,8 @@ export interface PeriodOptions {
|
|
|
25
25
|
/** Block stats only — no model call. */
|
|
26
26
|
dry?: boolean;
|
|
27
27
|
audio?: AudioAdapter;
|
|
28
|
+
/** The session's project dir: a session id can have a store under more than one project. */
|
|
29
|
+
projectDir?: string | null;
|
|
28
30
|
log?: (m: string) => void;
|
|
29
31
|
}
|
|
30
32
|
export declare function runPeriodMap(o: PeriodOptions): Promise<PeriodRunReport>;
|
|
@@ -28,7 +28,7 @@ export const PERIOD_CAP_USD = 0.5;
|
|
|
28
28
|
const MAX_OUT = 12_000;
|
|
29
29
|
export async function runPeriodMap(o) {
|
|
30
30
|
const log = o.log ?? (() => { });
|
|
31
|
-
const db = resolveSessionDb(o.sessionId);
|
|
31
|
+
const db = resolveSessionDb(o.sessionId, o.projectDir);
|
|
32
32
|
if (!db)
|
|
33
33
|
throw new Error(`no session.db for ${o.sessionId}`);
|
|
34
34
|
const projectDir = dirname(dirname(dirname(db)));
|