@tangle-network/harness-sessions 1.0.9 → 1.0.11
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/dist/capture.js +103 -55
- package/dist/catalog.d.ts +28 -0
- package/dist/catalog.js +10 -0
- package/dist/formats/claude-code.js +37 -33
- package/dist/formats/codex.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/manifest-scan.d.ts +19 -0
- package/dist/manifest-scan.js +312 -0
- package/dist/source.js +8 -13
- package/dist/stores.d.ts +1 -1
- package/dist/stores.js +1 -1
- package/package.json +1 -1
package/dist/capture.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isRecord } from '@tangle-network/agent-core';
|
|
2
|
+
import { readJsonValues } from './manifest-scan.js';
|
|
2
3
|
import { readdir, readFile } from 'node:fs/promises';
|
|
3
4
|
import { join } from 'node:path';
|
|
4
5
|
import { str } from './builder.js';
|
|
@@ -20,6 +21,45 @@ async function readJson(path) {
|
|
|
20
21
|
throw error;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
24
|
+
/** The paths a capture listing reads from a raw-manifest.json: the v2 copies and the v1 source fields (#534). */
|
|
25
|
+
const MANIFEST_PATHS = (path) => path === '/nativeSessions'
|
|
26
|
+
|| path === '/source/backendType'
|
|
27
|
+
|| path === '/source/nativeSessionId'
|
|
28
|
+
|| /^\/source\/attempts\/\d+\/(?:nativeSessionIds|executionId|ordinal)$/u.test(path);
|
|
29
|
+
/** A raw-manifest.json read as only the fields a listing needs; a giant manifest streams instead of parsing whole. */
|
|
30
|
+
async function retentionManifest(dir) {
|
|
31
|
+
const manifestPath = join(dir, 'raw-manifest.json');
|
|
32
|
+
let values;
|
|
33
|
+
try {
|
|
34
|
+
values = await readJsonValues(manifestPath, MANIFEST_PATHS);
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
if (isMissing(error))
|
|
38
|
+
return null;
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
const attempts = [];
|
|
42
|
+
for (const key of values.keys()) {
|
|
43
|
+
const attempt = /^\/source\/attempts\/(\d+)\//u.exec(key);
|
|
44
|
+
if (attempt === null)
|
|
45
|
+
continue;
|
|
46
|
+
const index = Number.parseInt(attempt[1], 10);
|
|
47
|
+
attempts[index] ??= {};
|
|
48
|
+
const field = key.split('/').at(-1);
|
|
49
|
+
attempts[index][field] = values.get(key);
|
|
50
|
+
}
|
|
51
|
+
const hasSource = values.has('/source/backendType') || values.has('/source/nativeSessionId') || attempts.length > 0;
|
|
52
|
+
return {
|
|
53
|
+
...(values.has('/nativeSessions') ? { nativeSessions: values.get('/nativeSessions') } : {}),
|
|
54
|
+
...(hasSource ? {
|
|
55
|
+
source: {
|
|
56
|
+
...(values.has('/source/backendType') ? { backendType: values.get('/source/backendType') } : {}),
|
|
57
|
+
...(values.has('/source/nativeSessionId') ? { nativeSessionId: values.get('/source/nativeSessionId') } : {}),
|
|
58
|
+
...(attempts.length > 0 ? { attempts } : {}),
|
|
59
|
+
},
|
|
60
|
+
} : {}),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
23
63
|
async function dirs(path) {
|
|
24
64
|
try {
|
|
25
65
|
return (await readdir(path, { withFileTypes: true })).filter((e) => e.isDirectory()).map((e) => e.name).sort();
|
|
@@ -119,66 +159,74 @@ function captured(ref, copy, recordedId, archiveDir, path) {
|
|
|
119
159
|
async function fromRetention(captureDir, listing, fallbackHarness) {
|
|
120
160
|
const sessionsDir = join(captureDir, RETENTION_SESSIONS);
|
|
121
161
|
for (const sandboxSessionId of await dirs(sessionsDir)) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
if (isRecord(manifest) && Array.isArray(manifest.nativeSessions)) {
|
|
126
|
-
await fromV2(dir, manifest, listing);
|
|
127
|
-
continue;
|
|
128
|
-
}
|
|
129
|
-
const harness = (source ? str(source.backendType) : null) ?? fallbackHarness;
|
|
130
|
-
const reader = harness ? maybeReaderFor(harness) : undefined;
|
|
131
|
-
if (!reader) {
|
|
132
|
-
listing.missing.push({ sandboxSessionId, harness, reason: harness ? 'no_reader_for_harness' : 'harness_not_recorded' });
|
|
133
|
-
continue;
|
|
162
|
+
// One session's unreadable or oversized manifest must not sink the capture's whole listing (#534).
|
|
163
|
+
try {
|
|
164
|
+
await retentionSession(captureDir, join(sessionsDir, sandboxSessionId), sandboxSessionId, listing, fallbackHarness);
|
|
134
165
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
for (const attempt of attempts) {
|
|
138
|
-
for (const id of Array.isArray(attempt.nativeSessionIds) ? attempt.nativeSessionIds : []) {
|
|
139
|
-
if (typeof id === 'string')
|
|
140
|
-
recorded.set(id, { executionId: str(attempt.executionId), attempt: typeof attempt.ordinal === 'number' ? attempt.ordinal : null });
|
|
141
|
-
}
|
|
166
|
+
catch (error) {
|
|
167
|
+
listing.missing.push({ sandboxSessionId, harness: null, reason: 'manifest_unreadable', detail: error instanceof Error ? error.message : String(error) });
|
|
142
168
|
}
|
|
143
|
-
|
|
144
|
-
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
async function retentionSession(captureDir, dir, sandboxSessionId, listing, fallbackHarness) {
|
|
172
|
+
const manifest = await retentionManifest(dir);
|
|
173
|
+
const source = isRecord(manifest) && isRecord(manifest.source) ? manifest.source : null;
|
|
174
|
+
if (isRecord(manifest) && Array.isArray(manifest.nativeSessions)) {
|
|
175
|
+
await fromV2(dir, manifest, listing);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const harness = (source ? str(source.backendType) : null) ?? fallbackHarness;
|
|
179
|
+
const reader = harness ? maybeReaderFor(harness) : undefined;
|
|
180
|
+
if (!reader) {
|
|
181
|
+
listing.missing.push({ sandboxSessionId, harness, reason: harness ? 'no_reader_for_harness' : 'harness_not_recorded' });
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
const attempts = source && Array.isArray(source.attempts) ? source.attempts.filter(isRecord) : [];
|
|
185
|
+
const recorded = new Map();
|
|
186
|
+
for (const attempt of attempts) {
|
|
187
|
+
for (const id of Array.isArray(attempt.nativeSessionIds) ? attempt.nativeSessionIds : []) {
|
|
188
|
+
if (typeof id === 'string')
|
|
189
|
+
recorded.set(id, { executionId: str(attempt.executionId), attempt: typeof attempt.ordinal === 'number' ? attempt.ordinal : null });
|
|
145
190
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
191
|
+
}
|
|
192
|
+
if (source && typeof source.nativeSessionId === 'string' && !recorded.has(source.nativeSessionId)) {
|
|
193
|
+
recorded.set(source.nativeSessionId, { executionId: null, attempt: null });
|
|
194
|
+
}
|
|
195
|
+
const lastAttempt = attempts[attempts.length - 1];
|
|
196
|
+
const found = new Set();
|
|
197
|
+
for (const sourceId of await dirs(join(dir, 'native'))) {
|
|
198
|
+
for (const rootScope of await dirs(join(dir, 'native', sourceId))) {
|
|
199
|
+
const home = join(dir, 'native', sourceId, rootScope);
|
|
200
|
+
let refs;
|
|
201
|
+
try {
|
|
202
|
+
refs = await reader.locate(home);
|
|
203
|
+
}
|
|
204
|
+
catch (error) {
|
|
205
|
+
const store = reader.stores[0];
|
|
206
|
+
listing.missing.push({ sandboxSessionId, harness: reader.harness, reason: 'store_unreadable', root: home.slice(captureDir.length + 1), path: store.shared ? `${store.root}/${store.files[0]}` : store.root, detail: error instanceof Error ? error.message : String(error) });
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
for (const ref of refs) {
|
|
210
|
+
const join_ = recorded.get(ref.nativeSessionId) ?? (ref.parentNativeSessionId ? recorded.get(ref.parentNativeSessionId) : undefined);
|
|
211
|
+
found.add(ref.nativeSessionId);
|
|
212
|
+
listing.sessions.push({
|
|
213
|
+
ref,
|
|
214
|
+
harness: reader.harness,
|
|
215
|
+
sandboxSessionId,
|
|
216
|
+
executionId: join_?.executionId ?? (lastAttempt ? str(lastAttempt.executionId) : null) ?? sourceId,
|
|
217
|
+
attempt: join_?.attempt ?? (lastAttempt && typeof lastAttempt.ordinal === 'number' ? lastAttempt.ordinal : null),
|
|
218
|
+
copy: 'retained',
|
|
219
|
+
recordedId: recorded.has(ref.nativeSessionId),
|
|
220
|
+
root: home.slice(captureDir.length + 1),
|
|
221
|
+
sourceId,
|
|
222
|
+
rootScope,
|
|
223
|
+
});
|
|
176
224
|
}
|
|
177
225
|
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
226
|
+
}
|
|
227
|
+
for (const id of recorded.keys()) {
|
|
228
|
+
if (!found.has(id))
|
|
229
|
+
listing.missing.push({ sandboxSessionId, harness: reader.harness, reason: 'native_session_not_in_copy', nativeSessionId: id });
|
|
182
230
|
}
|
|
183
231
|
}
|
|
184
232
|
export async function listCapture(dir, manifest, options = {}) {
|
package/dist/catalog.d.ts
CHANGED
|
@@ -122,6 +122,34 @@ export declare const KIMI_STORES: readonly [{
|
|
|
122
122
|
write: "jsonl-append" | "json-rewrite" | "sqlite-wal";
|
|
123
123
|
shared: boolean;
|
|
124
124
|
}];
|
|
125
|
+
/** Every root the pinned CLIs write transcripts to: the classic home layout and the XDG config layout (#553). */
|
|
126
|
+
export declare const CLAUDE_CODE_STORES: readonly [{
|
|
127
|
+
format: "claude-code.projects-jsonl";
|
|
128
|
+
root: string;
|
|
129
|
+
files: readonly ["*/{id}.jsonl", "*/{id}/subagents/**/*.jsonl"];
|
|
130
|
+
write: "jsonl-append" | "json-rewrite" | "sqlite-wal";
|
|
131
|
+
shared: boolean;
|
|
132
|
+
}, {
|
|
133
|
+
readonly root: ".config/claude/projects";
|
|
134
|
+
readonly format: "claude-code.projects-jsonl";
|
|
135
|
+
readonly files: readonly ["*/{id}.jsonl", "*/{id}/subagents/**/*.jsonl"];
|
|
136
|
+
readonly write: "jsonl-append" | "json-rewrite" | "sqlite-wal";
|
|
137
|
+
readonly shared: boolean;
|
|
138
|
+
}];
|
|
139
|
+
/** Rollouts in date directories under each Codex home, and the flat archived_sessions Codex moves finished ones to (#556). */
|
|
140
|
+
export declare const CODEX_STORES: readonly [{
|
|
141
|
+
format: "codex.rollout-jsonl";
|
|
142
|
+
root: string;
|
|
143
|
+
files: readonly ["*/*/*/rollout-*-{id}.jsonl"];
|
|
144
|
+
write: "jsonl-append" | "json-rewrite" | "sqlite-wal";
|
|
145
|
+
shared: boolean;
|
|
146
|
+
}, {
|
|
147
|
+
readonly root: ".codex/archived_sessions";
|
|
148
|
+
readonly files: readonly ["rollout-*-{id}.jsonl"];
|
|
149
|
+
readonly format: "codex.rollout-jsonl";
|
|
150
|
+
readonly write: "jsonl-append" | "json-rewrite" | "sqlite-wal";
|
|
151
|
+
readonly shared: boolean;
|
|
152
|
+
}];
|
|
125
153
|
export declare const EVIDENCE: {
|
|
126
154
|
readonly 'claude-code.projects-jsonl': {
|
|
127
155
|
readonly servedModel: "provider-response";
|
package/dist/catalog.js
CHANGED
|
@@ -45,6 +45,16 @@ export const KIMI_STORES = [
|
|
|
45
45
|
{ ...STORES['kimi.session-dir'], root: '.kimi-code/sessions', files: ['wd_*/{id}/**'], globs: { session: 'wd_*/{id}/agents/main/wire.jsonl' } },
|
|
46
46
|
STORES['kimi.session-dir'],
|
|
47
47
|
];
|
|
48
|
+
/** Every root the pinned CLIs write transcripts to: the classic home layout and the XDG config layout (#553). */
|
|
49
|
+
export const CLAUDE_CODE_STORES = [
|
|
50
|
+
STORES['claude-code.projects-jsonl'],
|
|
51
|
+
{ ...STORES['claude-code.projects-jsonl'], root: '.config/claude/projects' },
|
|
52
|
+
];
|
|
53
|
+
/** Rollouts in date directories under each Codex home, and the flat archived_sessions Codex moves finished ones to (#556). */
|
|
54
|
+
export const CODEX_STORES = [
|
|
55
|
+
STORES['codex.rollout-jsonl'],
|
|
56
|
+
{ ...STORES['codex.rollout-jsonl'], root: '.codex/archived_sessions', files: ['rollout-*-{id}.jsonl'] },
|
|
57
|
+
];
|
|
48
58
|
export const EVIDENCE = {
|
|
49
59
|
'claude-code.projects-jsonl': { servedModel: 'provider-response', usage: 'per-response', endingError: 'session-record' },
|
|
50
60
|
'codex.rollout-jsonl': { servedModel: 'turn-context', usage: 'cumulative', endingError: 'session-record' },
|
|
@@ -3,11 +3,11 @@ import { basename, join } from 'node:path';
|
|
|
3
3
|
import { SessionBuilder, count, sessionError, str, textOf, usageOrNull } from '../builder.js';
|
|
4
4
|
import { fileRecords } from '../source.js';
|
|
5
5
|
import { foldedReader, runFold } from './fold.js';
|
|
6
|
-
import { EVIDENCE, LOCATE_READS,
|
|
6
|
+
import { CLAUDE_CODE_STORES, EVIDENCE, LOCATE_READS, mapLimit, mtimeMs, storeGlob, walkFiles, withinPath } from '../stores.js';
|
|
7
7
|
import { headRecord } from './head.js';
|
|
8
8
|
import { claudeRecordIsMachine, claudeTypedPromptText } from './claude-records.js';
|
|
9
9
|
const FORMAT = 'claude-code.projects-jsonl';
|
|
10
|
-
const STORE =
|
|
10
|
+
const STORE = CLAUDE_CODE_STORES[0];
|
|
11
11
|
const HARNESS = 'claude-code';
|
|
12
12
|
function usageOf(value) {
|
|
13
13
|
if (!isRecord(value))
|
|
@@ -198,39 +198,43 @@ export async function fold(ref, mode, options, source = fileRecords(ref.path, {
|
|
|
198
198
|
return runFold(createFold(ref, mode, source.stats), source);
|
|
199
199
|
}
|
|
200
200
|
async function locate(home, opts) {
|
|
201
|
-
const
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
const path = join(root, rel);
|
|
215
|
-
const id = basename(rel, '.jsonl');
|
|
216
|
-
const mtime = await mtimeMs(path);
|
|
217
|
-
if (opts.sinceMs && mtime < opts.sinceMs)
|
|
218
|
-
return [];
|
|
219
|
-
const head = await headRecord(path, (r) => typeof r.cwd === 'string');
|
|
220
|
-
const cwd = head ? str(head.cwd) : null;
|
|
221
|
-
if (opts.cwd && (cwd === null || !withinPath(cwd, opts.cwd)))
|
|
222
|
-
return [];
|
|
223
|
-
const subagents = subagentsBySession.get(`${rel.split('/')[0]}/${id}`) ?? [];
|
|
224
|
-
const refs = [{ harness: HARNESS, format: FORMAT, nativeSessionId: id, path, files: [path, ...subagents], home, cwd, mtimeMs: mtime, parentNativeSessionId: null }];
|
|
225
|
-
for (const file of subagents) {
|
|
226
|
-
const agentId = basename(file, '.jsonl').replace(/^agent-/u, '');
|
|
227
|
-
refs.push({ harness: HARNESS, format: FORMAT, nativeSessionId: agentId, path: file, files: [file], home, cwd, mtimeMs: await mtimeMs(file), parentNativeSessionId: id });
|
|
201
|
+
const refs = [];
|
|
202
|
+
for (const store of CLAUDE_CODE_STORES) {
|
|
203
|
+
const root = join(home, store.root);
|
|
204
|
+
const all = await walkFiles(root);
|
|
205
|
+
const main = storeGlob(store.files[0], opts.nativeSessionId);
|
|
206
|
+
const nested = storeGlob(store.files[1], opts.nativeSessionId);
|
|
207
|
+
const subagentsBySession = new Map();
|
|
208
|
+
for (const rel of all) {
|
|
209
|
+
if (!nested.test(rel))
|
|
210
|
+
continue;
|
|
211
|
+
const [project, id] = rel.split('/');
|
|
212
|
+
const key = `${project}/${id}`;
|
|
213
|
+
subagentsBySession.set(key, [...(subagentsBySession.get(key) ?? []), join(root, rel)]);
|
|
228
214
|
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
215
|
+
const sessions = await mapLimit(all.filter((rel) => main.test(rel)), LOCATE_READS, async (rel) => {
|
|
216
|
+
const path = join(root, rel);
|
|
217
|
+
const id = basename(rel, '.jsonl');
|
|
218
|
+
const mtime = await mtimeMs(path);
|
|
219
|
+
if (opts.sinceMs && mtime < opts.sinceMs)
|
|
220
|
+
return [];
|
|
221
|
+
const head = await headRecord(path, (r) => typeof r.cwd === 'string');
|
|
222
|
+
const cwd = head ? str(head.cwd) : null;
|
|
223
|
+
if (opts.cwd && (cwd === null || !withinPath(cwd, opts.cwd)))
|
|
224
|
+
return [];
|
|
225
|
+
const subagents = subagentsBySession.get(`${rel.split('/')[0]}/${id}`) ?? [];
|
|
226
|
+
const found = [{ harness: HARNESS, format: FORMAT, nativeSessionId: id, path, files: [path, ...subagents], home, cwd, mtimeMs: mtime, parentNativeSessionId: null }];
|
|
227
|
+
for (const file of subagents) {
|
|
228
|
+
const agentId = basename(file, '.jsonl').replace(/^agent-/u, '');
|
|
229
|
+
found.push({ harness: HARNESS, format: FORMAT, nativeSessionId: agentId, path: file, files: [file], home, cwd, mtimeMs: await mtimeMs(file), parentNativeSessionId: id });
|
|
230
|
+
}
|
|
231
|
+
return found;
|
|
232
|
+
});
|
|
233
|
+
refs.push(...sessions.flat());
|
|
234
|
+
}
|
|
235
|
+
return refs.sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
232
236
|
}
|
|
233
|
-
export const claudeCodeReader = foldedReader({ harness: HARNESS, aliases: ['claude', 'claude-code-acp', 'claudish'], format: FORMAT, globs: { session: STORE.files[0], children: STORE.files[1] } }, locate, fold);
|
|
237
|
+
export const claudeCodeReader = foldedReader({ harness: HARNESS, aliases: ['claude', 'claude-code-acp', 'claudish'], format: FORMAT, globs: { session: STORE.files[0], children: STORE.files[1] }, stores: CLAUDE_CODE_STORES }, locate, fold);
|
|
234
238
|
export function claudeCodeRefForFile(path, parentNativeSessionId = null) {
|
|
235
239
|
const name = basename(path, '.jsonl');
|
|
236
240
|
return {
|
package/dist/formats/codex.js
CHANGED
|
@@ -3,7 +3,7 @@ import { basename } from 'node:path';
|
|
|
3
3
|
import { SessionBuilder, argumentsOf, count, sessionError, str, textOf, usageOrNull, } from '../builder.js';
|
|
4
4
|
import { fileRecords, isMissing } from '../source.js';
|
|
5
5
|
import { foldedReader, runFold } from './fold.js';
|
|
6
|
-
import { CODEX_HOME_RULE, EVIDENCE, LOCATE_READS, STORES, codexHomes, mapLimit, storeGlob, walkFiles, withinPath } from '../stores.js';
|
|
6
|
+
import { CODEX_HOME_RULE, CODEX_STORES, EVIDENCE, LOCATE_READS, STORES, codexHomes, mapLimit, storeGlob, walkFiles, withinPath } from '../stores.js';
|
|
7
7
|
import { headRecord } from './head.js';
|
|
8
8
|
import { stat } from 'node:fs/promises';
|
|
9
9
|
import { join } from 'node:path';
|
|
@@ -407,7 +407,7 @@ async function locate(home, opts) {
|
|
|
407
407
|
}
|
|
408
408
|
return [...largest.values()].map((c) => c.ref).sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
409
409
|
}
|
|
410
|
-
export const codexReader = foldedReader({ harness: HARNESS, aliases: ['codex-acp', 'codex-cli'], format: FORMAT }, locate, fold);
|
|
410
|
+
export const codexReader = foldedReader({ harness: HARNESS, aliases: ['codex-acp', 'codex-cli'], format: FORMAT, stores: CODEX_STORES }, locate, fold);
|
|
411
411
|
export function codexRefForFile(path) {
|
|
412
412
|
return {
|
|
413
413
|
harness: HARNESS,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type { HarnessSession, HarnessSessionReader, LocateOptions, ModelCall, NativeSessionCopy, NativeSessionStore, Part, RawEvidenceArchiveManifestV2, ReadOptions, SessionEnding, SessionError, SessionEvidenceSources, SessionFormatId, SessionIntegrity, SessionMessage, SessionRef, SessionSummary, SessionToolCall, TokenUsage, } from './schema.js';
|
|
2
2
|
export { HARNESS_SESSION_SCHEMA } from './schema.js';
|
|
3
|
-
export { CODEX_HOME_RULE, EVIDENCE, SESSION_FORMAT_IDS, STORES, assertStoreRoot, isCodexHome, storeGlob, withinPath } from './catalog.js';
|
|
3
|
+
export { CLAUDE_CODE_STORES, CODEX_HOME_RULE, CODEX_STORES, EVIDENCE, KIMI_STORES, SESSION_FORMAT_IDS, STORES, assertStoreRoot, isCodexHome, storeGlob, withinPath } from './catalog.js';
|
|
4
4
|
export { codexHomes } from './stores.js';
|
|
5
5
|
export { knownHarnesses, listReaders, maybeReaderFor, readerFor, readerForFormat } from './registry.js';
|
|
6
6
|
export { claudeCodeReader, claudeCodeRefForFile } from './formats/claude-code.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { HARNESS_SESSION_SCHEMA } from './schema.js';
|
|
2
|
-
export { CODEX_HOME_RULE, EVIDENCE, SESSION_FORMAT_IDS, STORES, assertStoreRoot, isCodexHome, storeGlob, withinPath } from './catalog.js';
|
|
2
|
+
export { CLAUDE_CODE_STORES, CODEX_HOME_RULE, CODEX_STORES, EVIDENCE, KIMI_STORES, SESSION_FORMAT_IDS, STORES, assertStoreRoot, isCodexHome, storeGlob, withinPath } from './catalog.js';
|
|
3
3
|
export { codexHomes } from './stores.js';
|
|
4
4
|
export { knownHarnesses, listReaders, maybeReaderFor, readerFor, readerForFormat } from './registry.js';
|
|
5
5
|
export { claudeCodeReader, claudeCodeRefForFile } from './formats/claude-code.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** A wanted value that itself exceeds `maxCaptureBytes`; the value, not the file, is refused. */
|
|
2
|
+
export declare class JsonValueTooLarge extends Error {
|
|
3
|
+
readonly path: string;
|
|
4
|
+
readonly maxCaptureBytes: number;
|
|
5
|
+
constructor(path: string, maxCaptureBytes: number);
|
|
6
|
+
}
|
|
7
|
+
export interface ReadJsonValuesOptions {
|
|
8
|
+
/** Files at or under this size parse whole. Default 8 MiB. */
|
|
9
|
+
fastPathBytes?: number;
|
|
10
|
+
/** Ceiling per captured value. Default 64 MiB. */
|
|
11
|
+
maxCaptureBytes?: number;
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The selected values of the JSON document at `path`, keyed by RFC 6901-ish
|
|
16
|
+
* paths from the root (`/nativeSessions`, `/source/attempts/0/executionId`).
|
|
17
|
+
* String values are returned decoded; captured subtrees are parsed.
|
|
18
|
+
*/
|
|
19
|
+
export declare function readJsonValues(path: string, wanted: (path: string) => boolean, options?: ReadJsonValuesOptions): Promise<Map<string, unknown>>;
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { open, readFile, stat } from 'node:fs/promises';
|
|
2
|
+
/**
|
|
3
|
+
* Reads selected values out of a JSON file without materializing the whole
|
|
4
|
+
* document (#534): a retention manifest can run past V8's string limit while
|
|
5
|
+
* the values a listing needs stay small. Ordinary files parse whole; the rest
|
|
6
|
+
* stream one buffer at a time, and only the subtrees `wanted` accepts are
|
|
7
|
+
* captured, each under a byte ceiling.
|
|
8
|
+
*/
|
|
9
|
+
const BUFFER_BYTES = 1024 * 1024;
|
|
10
|
+
/** A wanted value that itself exceeds `maxCaptureBytes`; the value, not the file, is refused. */
|
|
11
|
+
export class JsonValueTooLarge extends Error {
|
|
12
|
+
path;
|
|
13
|
+
maxCaptureBytes;
|
|
14
|
+
constructor(path, maxCaptureBytes) {
|
|
15
|
+
super(`value at ${path} exceeds ${maxCaptureBytes} bytes`);
|
|
16
|
+
this.path = path;
|
|
17
|
+
this.maxCaptureBytes = maxCaptureBytes;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const escapeKey = (key) => key.replace(/~/gu, '~0').replace(/\//gu, '~1');
|
|
21
|
+
/** Deep-walk an in-memory document collecting the values `wanted` accepts, by the same paths the scanner reports. */
|
|
22
|
+
function walkMemory(value, path, wanted, out) {
|
|
23
|
+
if (wanted(path)) {
|
|
24
|
+
out.set(path, value);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
if (Array.isArray(value)) {
|
|
28
|
+
for (let i = 0; i < value.length; i += 1)
|
|
29
|
+
walkMemory(value[i], `${path}/${i}`, wanted, out);
|
|
30
|
+
}
|
|
31
|
+
else if (value !== null && typeof value === 'object') {
|
|
32
|
+
for (const [key, entry] of Object.entries(value))
|
|
33
|
+
walkMemory(entry, `${path}/${escapeKey(key)}`, wanted, out);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The selected values of the JSON document at `path`, keyed by RFC 6901-ish
|
|
38
|
+
* paths from the root (`/nativeSessions`, `/source/attempts/0/executionId`).
|
|
39
|
+
* String values are returned decoded; captured subtrees are parsed.
|
|
40
|
+
*/
|
|
41
|
+
export async function readJsonValues(path, wanted, options = {}) {
|
|
42
|
+
const fastPathBytes = options.fastPathBytes ?? 8 * 1024 * 1024;
|
|
43
|
+
const maxCaptureBytes = options.maxCaptureBytes ?? 64 * 1024 * 1024;
|
|
44
|
+
const { size } = await stat(path);
|
|
45
|
+
if (size <= fastPathBytes) {
|
|
46
|
+
const document = JSON.parse(await readFile(path, 'utf8'));
|
|
47
|
+
const out = new Map();
|
|
48
|
+
walkMemory(document, '', wanted, out);
|
|
49
|
+
return out;
|
|
50
|
+
}
|
|
51
|
+
const scanner = new StreamingScanner(path, options.signal);
|
|
52
|
+
try {
|
|
53
|
+
return await scanner.scan(wanted, maxCaptureBytes);
|
|
54
|
+
}
|
|
55
|
+
finally {
|
|
56
|
+
await scanner.close().catch(() => undefined);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
class StreamingScanner {
|
|
60
|
+
path;
|
|
61
|
+
signal;
|
|
62
|
+
chunk = Buffer.alloc(BUFFER_BYTES);
|
|
63
|
+
buffer = Buffer.alloc(0);
|
|
64
|
+
offset = 0;
|
|
65
|
+
capturing;
|
|
66
|
+
capturedBytes = 0;
|
|
67
|
+
overflow;
|
|
68
|
+
constructor(path, signal) {
|
|
69
|
+
this.path = path;
|
|
70
|
+
this.signal = signal;
|
|
71
|
+
}
|
|
72
|
+
async close() {
|
|
73
|
+
await this.handle?.close();
|
|
74
|
+
}
|
|
75
|
+
handle;
|
|
76
|
+
async fill() {
|
|
77
|
+
this.signal?.throwIfAborted();
|
|
78
|
+
this.handle ??= await open(this.path, 'r');
|
|
79
|
+
const { bytesRead } = await this.handle.read(this.chunk, 0, BUFFER_BYTES, null);
|
|
80
|
+
this.buffer = bytesRead === BUFFER_BYTES ? this.chunk : this.chunk.subarray(0, bytesRead);
|
|
81
|
+
this.offset = 0;
|
|
82
|
+
return bytesRead > 0;
|
|
83
|
+
}
|
|
84
|
+
async peek() {
|
|
85
|
+
if (this.offset < this.buffer.length)
|
|
86
|
+
return this.buffer[this.offset];
|
|
87
|
+
if (await this.fill())
|
|
88
|
+
return this.buffer[this.offset];
|
|
89
|
+
return -1;
|
|
90
|
+
}
|
|
91
|
+
async next() {
|
|
92
|
+
const byte = await this.peek();
|
|
93
|
+
if (byte >= 0) {
|
|
94
|
+
this.offset += 1;
|
|
95
|
+
if (this.capturing !== undefined) {
|
|
96
|
+
this.capturedBytes += 1;
|
|
97
|
+
if (this.capturedBytes <= this.maxCaptureBytes)
|
|
98
|
+
this.capturing.push(byte);
|
|
99
|
+
else if (this.overflow === undefined)
|
|
100
|
+
this.overflow = { path: this.capturePath };
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return byte;
|
|
104
|
+
}
|
|
105
|
+
maxCaptureBytes = 0;
|
|
106
|
+
capturePath = '';
|
|
107
|
+
async scan(wanted, maxCaptureBytes) {
|
|
108
|
+
this.maxCaptureBytes = maxCaptureBytes;
|
|
109
|
+
const out = new Map();
|
|
110
|
+
await this.value('', wanted, out);
|
|
111
|
+
await this.trailing();
|
|
112
|
+
if (this.overflow !== undefined)
|
|
113
|
+
throw new JsonValueTooLarge(this.overflow.path, maxCaptureBytes);
|
|
114
|
+
return out;
|
|
115
|
+
}
|
|
116
|
+
async trailing() {
|
|
117
|
+
for (;;) {
|
|
118
|
+
while (this.offset < this.buffer.length) {
|
|
119
|
+
if (!isSpace(this.buffer[this.offset]))
|
|
120
|
+
throw new SyntaxError('trailing content after the JSON document');
|
|
121
|
+
this.offset += 1;
|
|
122
|
+
}
|
|
123
|
+
if (!(await this.fill()))
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
beginCapture() {
|
|
128
|
+
this.capturing = [];
|
|
129
|
+
this.capturedBytes = 0;
|
|
130
|
+
}
|
|
131
|
+
async endCapture() {
|
|
132
|
+
const bytes = Buffer.from(this.capturing ?? []);
|
|
133
|
+
this.capturing = undefined;
|
|
134
|
+
return bytes.toString('utf8');
|
|
135
|
+
}
|
|
136
|
+
async skipSpaces() {
|
|
137
|
+
for (;;) {
|
|
138
|
+
while (this.offset < this.buffer.length && isSpace(this.buffer[this.offset]))
|
|
139
|
+
this.offset += 1;
|
|
140
|
+
if (this.offset < this.buffer.length)
|
|
141
|
+
return;
|
|
142
|
+
if (!(await this.fill()))
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/** One string token, decoded; the opening quote is already consumed. */
|
|
147
|
+
async stringToken() {
|
|
148
|
+
let escaped = false;
|
|
149
|
+
const raw = [];
|
|
150
|
+
for (;;) {
|
|
151
|
+
const byte = await this.next();
|
|
152
|
+
if (byte < 0)
|
|
153
|
+
throw new SyntaxError('unterminated string');
|
|
154
|
+
if (escaped) {
|
|
155
|
+
escaped = false;
|
|
156
|
+
raw.push(byte);
|
|
157
|
+
}
|
|
158
|
+
else if (byte === 0x5c) {
|
|
159
|
+
escaped = true;
|
|
160
|
+
raw.push(byte);
|
|
161
|
+
}
|
|
162
|
+
else if (byte === 0x22) {
|
|
163
|
+
return JSON.parse(`"${Buffer.from(raw).toString('utf8')}"`);
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
raw.push(byte);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
async literal() {
|
|
171
|
+
for (;;) {
|
|
172
|
+
const byte = await this.peek();
|
|
173
|
+
if (byte < 0 || !/[a-z]/.test(String.fromCharCode(byte)))
|
|
174
|
+
return;
|
|
175
|
+
await this.next();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
async numberToken() {
|
|
179
|
+
for (;;) {
|
|
180
|
+
const byte = await this.peek();
|
|
181
|
+
if (byte < 0 || !/[0-9+.eE-]/.test(String.fromCharCode(byte)))
|
|
182
|
+
return;
|
|
183
|
+
await this.next();
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/** The raw bytes of one complete value, captured; truncated to null when the value exceeded the ceiling. */
|
|
187
|
+
async rawValue(path) {
|
|
188
|
+
this.beginCapture();
|
|
189
|
+
this.capturePath = path;
|
|
190
|
+
await this.skipValueSyntax(path);
|
|
191
|
+
const overflowed = this.overflow?.path === path;
|
|
192
|
+
const raw = await this.endCapture();
|
|
193
|
+
return overflowed ? null : raw;
|
|
194
|
+
}
|
|
195
|
+
/** Walk one value, reporting wanted paths below `path`. */
|
|
196
|
+
async value(path, wanted, out) {
|
|
197
|
+
await this.skipSpaces();
|
|
198
|
+
if (path !== '' && wanted(path)) {
|
|
199
|
+
const raw = await this.rawValue(path);
|
|
200
|
+
if (raw !== null)
|
|
201
|
+
out.set(path, JSON.parse(raw));
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
const byte = await this.peek();
|
|
205
|
+
if (byte === 0x7b)
|
|
206
|
+
await this.object(path, wanted, out);
|
|
207
|
+
else if (byte === 0x5b)
|
|
208
|
+
await this.array(path, wanted, out);
|
|
209
|
+
else
|
|
210
|
+
await this.skipValueSyntax(path);
|
|
211
|
+
}
|
|
212
|
+
async object(path, wanted, out) {
|
|
213
|
+
await this.next(); // {
|
|
214
|
+
await this.skipSpaces();
|
|
215
|
+
if ((await this.peek()) === 0x7d) {
|
|
216
|
+
await this.next();
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
for (;;) {
|
|
220
|
+
await this.skipSpaces();
|
|
221
|
+
if ((await this.peek()) !== 0x22)
|
|
222
|
+
throw new SyntaxError('object key expected');
|
|
223
|
+
await this.next();
|
|
224
|
+
const key = await this.stringToken();
|
|
225
|
+
await this.skipSpaces();
|
|
226
|
+
if ((await this.next()) !== 0x3a)
|
|
227
|
+
throw new SyntaxError('colon expected');
|
|
228
|
+
await this.value(`${path}/${escapeKey(key)}`, wanted, out);
|
|
229
|
+
await this.skipSpaces();
|
|
230
|
+
const sep = await this.next();
|
|
231
|
+
if (sep === 0x7d)
|
|
232
|
+
return;
|
|
233
|
+
if (sep !== 0x2c)
|
|
234
|
+
throw new SyntaxError('comma or } expected');
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
async array(path, wanted, out) {
|
|
238
|
+
await this.next(); // [
|
|
239
|
+
await this.skipSpaces();
|
|
240
|
+
if ((await this.peek()) === 0x5d) {
|
|
241
|
+
await this.next();
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
for (let index = 0;; index += 1) {
|
|
245
|
+
await this.value(`${path}/${index}`, wanted, out);
|
|
246
|
+
await this.skipSpaces();
|
|
247
|
+
const sep = await this.next();
|
|
248
|
+
if (sep === 0x5d)
|
|
249
|
+
return;
|
|
250
|
+
if (sep !== 0x2c)
|
|
251
|
+
throw new SyntaxError('comma or ] expected');
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
/** Skip exactly one value's bytes, string- and nesting-aware, without reporting children. */
|
|
255
|
+
async skipValueSyntax(path) {
|
|
256
|
+
await this.skipSpaces();
|
|
257
|
+
const byte = await this.peek();
|
|
258
|
+
if (byte === 0x22) {
|
|
259
|
+
await this.next();
|
|
260
|
+
let escaped = false;
|
|
261
|
+
for (;;) {
|
|
262
|
+
const c = await this.next();
|
|
263
|
+
if (c < 0)
|
|
264
|
+
throw new SyntaxError('unterminated string');
|
|
265
|
+
if (escaped)
|
|
266
|
+
escaped = false;
|
|
267
|
+
else if (c === 0x5c)
|
|
268
|
+
escaped = true;
|
|
269
|
+
else if (c === 0x22)
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
if (byte === 0x7b || byte === 0x5b) {
|
|
274
|
+
let depth = 0;
|
|
275
|
+
for (;;) {
|
|
276
|
+
const c = await this.next();
|
|
277
|
+
if (c < 0)
|
|
278
|
+
throw new SyntaxError('unterminated structure');
|
|
279
|
+
if (c === 0x22) {
|
|
280
|
+
let escaped = false;
|
|
281
|
+
for (;;) {
|
|
282
|
+
const s = await this.next();
|
|
283
|
+
if (s < 0)
|
|
284
|
+
throw new SyntaxError('unterminated string');
|
|
285
|
+
if (escaped)
|
|
286
|
+
escaped = false;
|
|
287
|
+
else if (s === 0x5c)
|
|
288
|
+
escaped = true;
|
|
289
|
+
else if (s === 0x22)
|
|
290
|
+
break;
|
|
291
|
+
}
|
|
292
|
+
continue;
|
|
293
|
+
}
|
|
294
|
+
if (c === 0x7b || c === 0x5b)
|
|
295
|
+
depth += 1;
|
|
296
|
+
else if (c === 0x7d || c === 0x5d) {
|
|
297
|
+
depth -= 1;
|
|
298
|
+
if (depth === 0)
|
|
299
|
+
return;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
if (byte >= 0 && /[0-9-]/.test(String.fromCharCode(byte))) {
|
|
304
|
+
await this.numberToken();
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
await this.literal();
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
function isSpace(byte) {
|
|
311
|
+
return byte === 0x20 || byte === 0x09 || byte === 0x0a || byte === 0x0d;
|
|
312
|
+
}
|
package/dist/source.js
CHANGED
|
@@ -26,7 +26,6 @@ const NEWLINE = 0x0a;
|
|
|
26
26
|
export async function* readJsonlRecords(path, stats, options = {}) {
|
|
27
27
|
const hash = createHash('sha256');
|
|
28
28
|
let pending = [];
|
|
29
|
-
let pendingBytes = 0;
|
|
30
29
|
let lineNumber = 0;
|
|
31
30
|
const parse = (bytes, terminated) => {
|
|
32
31
|
lineNumber += 1;
|
|
@@ -53,6 +52,7 @@ export async function* readJsonlRecords(path, stats, options = {}) {
|
|
|
53
52
|
noteUnparsed(stats, lineNumber);
|
|
54
53
|
return undefined;
|
|
55
54
|
}
|
|
55
|
+
stats.line = lineNumber;
|
|
56
56
|
return value;
|
|
57
57
|
};
|
|
58
58
|
if (typeof constants.O_NOFOLLOW !== 'number' || typeof constants.O_NONBLOCK !== 'number')
|
|
@@ -61,6 +61,8 @@ export async function* readJsonlRecords(path, stats, options = {}) {
|
|
|
61
61
|
try {
|
|
62
62
|
if (!(await file.stat()).isFile())
|
|
63
63
|
throw new Error(`${path}: native session must be a regular file`);
|
|
64
|
+
// A stream created on an aborted signal emits an 'error' no one listens to, which crashes the process.
|
|
65
|
+
options.signal?.throwIfAborted();
|
|
64
66
|
const stream = file.createReadStream({ highWaterMark: 1 << 20, signal: options.signal, autoClose: false });
|
|
65
67
|
for await (const chunk of stream) {
|
|
66
68
|
hash.update(chunk);
|
|
@@ -71,33 +73,26 @@ export async function* readJsonlRecords(path, stats, options = {}) {
|
|
|
71
73
|
if (index === -1)
|
|
72
74
|
break;
|
|
73
75
|
let line;
|
|
74
|
-
if (
|
|
76
|
+
if (pending.length > 0) {
|
|
75
77
|
pending.push(chunk.subarray(start, index));
|
|
76
78
|
line = Buffer.concat(pending);
|
|
77
79
|
pending = [];
|
|
78
|
-
pendingBytes = 0;
|
|
79
80
|
}
|
|
80
81
|
else {
|
|
81
82
|
line = chunk.subarray(start, index);
|
|
82
83
|
}
|
|
83
84
|
const record = parse(line, true);
|
|
84
|
-
if (record !== undefined)
|
|
85
|
-
stats.line = lineNumber;
|
|
85
|
+
if (record !== undefined)
|
|
86
86
|
yield record;
|
|
87
|
-
}
|
|
88
87
|
start = index + 1;
|
|
89
88
|
}
|
|
90
|
-
if (start < chunk.length)
|
|
89
|
+
if (start < chunk.length)
|
|
91
90
|
pending.push(chunk.subarray(start));
|
|
92
|
-
pendingBytes += chunk.length - start;
|
|
93
|
-
}
|
|
94
91
|
}
|
|
95
|
-
if (
|
|
92
|
+
if (pending.length > 0) {
|
|
96
93
|
const record = parse(Buffer.concat(pending), false);
|
|
97
|
-
if (record !== undefined)
|
|
98
|
-
stats.line = lineNumber;
|
|
94
|
+
if (record !== undefined)
|
|
99
95
|
yield record;
|
|
100
|
-
}
|
|
101
96
|
}
|
|
102
97
|
stats.sha256 = `sha256:${hash.digest('hex')}`;
|
|
103
98
|
}
|
package/dist/stores.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { assertStoreRoot, CODEX_HOME_RULE, EVIDENCE, isCodexHome, SESSION_FORMAT_IDS, STORES, storeGlob, withinPath } from './catalog.js';
|
|
1
|
+
export { assertStoreRoot, CLAUDE_CODE_STORES, CODEX_HOME_RULE, CODEX_STORES, EVIDENCE, isCodexHome, KIMI_STORES, SESSION_FORMAT_IDS, STORES, storeGlob, withinPath } from './catalog.js';
|
|
2
2
|
export declare function walkFiles(dir: string, signal?: AbortSignal, matches?: (path: string) => boolean): Promise<string[]>;
|
|
3
3
|
export declare const LOCATE_READS = 32;
|
|
4
4
|
export declare function mapLimit<T, R>(items: readonly T[], limit: number, fn: (item: T) => Promise<R>): Promise<R[]>;
|
package/dist/stores.js
CHANGED
|
@@ -3,7 +3,7 @@ import { homedir } from 'node:os';
|
|
|
3
3
|
import { join, relative, resolve, sep } from 'node:path';
|
|
4
4
|
import { CODEX_HOME_RULE, isCodexHome } from './catalog.js';
|
|
5
5
|
import { isMissing } from './source.js';
|
|
6
|
-
export { assertStoreRoot, CODEX_HOME_RULE, EVIDENCE, isCodexHome, SESSION_FORMAT_IDS, STORES, storeGlob, withinPath } from './catalog.js';
|
|
6
|
+
export { assertStoreRoot, CLAUDE_CODE_STORES, CODEX_HOME_RULE, CODEX_STORES, EVIDENCE, isCodexHome, KIMI_STORES, SESSION_FORMAT_IDS, STORES, storeGlob, withinPath } from './catalog.js';
|
|
7
7
|
export async function walkFiles(dir, signal, matches) {
|
|
8
8
|
const out = [];
|
|
9
9
|
const visit = async (current) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/harness-sessions",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.11",
|
|
4
4
|
"description": "One reader for every coding-agent harness's native session (Claude Code, Codex, OpenCode, Pi): store layouts, a normalized session with messages, tool calls, served models, usage and ending errors, and projections to chat messages, OTLP spans and turns",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|