ai-hist 0.6.0 → 0.8.2
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 +34 -254
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +248 -0
- package/dist/cli.js.map +1 -0
- package/dist/cloud-client.d.ts +0 -1
- package/dist/cloud-client.d.ts.map +1 -1
- package/dist/cloud-client.js +0 -2
- package/dist/cloud-client.js.map +1 -1
- package/dist/index.d.ts +138 -309
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +258 -1191
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.d.ts +0 -9
- package/dist/mcp-server.d.ts.map +1 -1
- package/dist/mcp-server.js +52 -790
- package/dist/mcp-server.js.map +1 -1
- package/package.json +14 -8
- package/dist/cloud-push.d.ts +0 -51
- package/dist/cloud-push.d.ts.map +0 -1
- package/dist/cloud-push.js +0 -113
- package/dist/cloud-push.js.map +0 -1
- package/dist/cloud-push.test.d.ts +0 -2
- package/dist/cloud-push.test.d.ts.map +0 -1
- package/dist/cloud-push.test.js +0 -82
- package/dist/cloud-push.test.js.map +0 -1
- package/dist/jsonl-sources.d.ts +0 -33
- package/dist/jsonl-sources.d.ts.map +0 -1
- package/dist/jsonl-sources.js +0 -351
- package/dist/jsonl-sources.js.map +0 -1
- package/dist/mcp-smoke.test.d.ts +0 -2
- package/dist/mcp-smoke.test.d.ts.map +0 -1
- package/dist/mcp-smoke.test.js +0 -574
- package/dist/mcp-smoke.test.js.map +0 -1
- package/dist/pair-client.d.ts +0 -41
- package/dist/pair-client.d.ts.map +0 -1
- package/dist/pair-client.js +0 -60
- package/dist/pair-client.js.map +0 -1
- package/dist/pair-client.test.d.ts +0 -2
- package/dist/pair-client.test.d.ts.map +0 -1
- package/dist/pair-client.test.js +0 -118
- package/dist/pair-client.test.js.map +0 -1
- package/dist/session-catalog.d.ts +0 -257
- package/dist/session-catalog.d.ts.map +0 -1
- package/dist/session-catalog.js +0 -340
- package/dist/session-catalog.js.map +0 -1
- package/dist/session-catalog.test.d.ts +0 -2
- package/dist/session-catalog.test.d.ts.map +0 -1
- package/dist/session-catalog.test.js +0 -710
- package/dist/session-catalog.test.js.map +0 -1
- package/dist/session-events.test.d.ts +0 -2
- package/dist/session-events.test.d.ts.map +0 -1
- package/dist/session-events.test.js +0 -177
- package/dist/session-events.test.js.map +0 -1
- package/dist/trajectory-sources.d.ts +0 -36
- package/dist/trajectory-sources.d.ts.map +0 -1
- package/dist/trajectory-sources.js +0 -201
- package/dist/trajectory-sources.js.map +0 -1
package/dist/pair-client.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { execFile } from "node:child_process";
|
|
2
|
-
import { promisify } from "node:util";
|
|
3
|
-
const execFileAsync = promisify(execFile);
|
|
4
|
-
function pushArg(args, name, value) {
|
|
5
|
-
const trimmed = value?.trim();
|
|
6
|
-
if (trimmed)
|
|
7
|
-
args.push(name, trimmed);
|
|
8
|
-
}
|
|
9
|
-
function cliArgs(req) {
|
|
10
|
-
const c = req.context;
|
|
11
|
-
const args = ["pair", "check", "--json"];
|
|
12
|
-
pushArg(args, "--project-id", c.projectId);
|
|
13
|
-
pushArg(args, "--repo-path", c.repoPath);
|
|
14
|
-
pushArg(args, "--cwd", c.cwd);
|
|
15
|
-
pushArg(args, "--git-remote", c.gitRemote);
|
|
16
|
-
pushArg(args, "--task", c.task);
|
|
17
|
-
pushArg(args, "--tool", c.tool);
|
|
18
|
-
pushArg(args, "--target", c.target);
|
|
19
|
-
pushArg(args, "--action", c.action);
|
|
20
|
-
pushArg(args, "--recent-prompt", c.recentPrompt);
|
|
21
|
-
for (const file of c.files ?? [])
|
|
22
|
-
pushArg(args, "--file", file);
|
|
23
|
-
if (req.limit != null)
|
|
24
|
-
args.push("--limit", String(req.limit));
|
|
25
|
-
return args;
|
|
26
|
-
}
|
|
27
|
-
export async function pairCheck(req, timeoutMs = 10_000) {
|
|
28
|
-
const bin = process.env.AI_HIST_PAIR_CHECK_BIN || "ai-hist";
|
|
29
|
-
const { stdout } = await execFileAsync(bin, cliArgs(req), {
|
|
30
|
-
timeout: timeoutMs,
|
|
31
|
-
maxBuffer: 1024 * 1024,
|
|
32
|
-
env: process.env,
|
|
33
|
-
});
|
|
34
|
-
const parsed = (stdout.trim() ? JSON.parse(stdout) : {});
|
|
35
|
-
return {
|
|
36
|
-
decision: parsed.decision,
|
|
37
|
-
warnings: Array.isArray(parsed.warnings) ? parsed.warnings : [],
|
|
38
|
-
correlationId: parsed.correlationId,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export function formatPairWarnings(result) {
|
|
42
|
-
if (result.warnings.length === 0)
|
|
43
|
-
return "";
|
|
44
|
-
const lines = ["Pair advisory warnings from prior convergence events:"];
|
|
45
|
-
for (const warning of result.warnings) {
|
|
46
|
-
const label = [warning.kind, warning.lens].filter(Boolean).join("/");
|
|
47
|
-
const score = typeof warning.score === "number" ? ` score=${warning.score.toFixed(2)}` : "";
|
|
48
|
-
lines.push(`- ${label ? `[${label}${score}] ` : ""}${warning.text}`);
|
|
49
|
-
for (const ev of warning.evidence ?? []) {
|
|
50
|
-
const id = [ev.machineId, ev.source, ev.sessionId, ev.eventId].filter(Boolean).join(":");
|
|
51
|
-
const when = ev.ts ? ` ${ev.ts}` : "";
|
|
52
|
-
const snippet = ev.snippet ? ` - ${ev.snippet}` : "";
|
|
53
|
-
lines.push(` evidence: ${id || ev.eventId || "(unknown)"}${when}${snippet}`);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
if (result.correlationId)
|
|
57
|
-
lines.push(`correlationId: ${result.correlationId}`);
|
|
58
|
-
return lines.join("\n");
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=pair-client.js.map
|
package/dist/pair-client.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pair-client.js","sourceRoot":"","sources":["../src/pair-client.ts"],"names":[],"mappings":"A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C,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pair-client.test.d.ts","sourceRoot":"","sources":["../src/pair-client.test.ts"],"names":[],"mappings":""}
|
package/dist/pair-client.test.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import assert from 'node:assert/strict';
|
|
2
|
-
import { mkdtemp, readFile, writeFile } from 'node:fs/promises';
|
|
3
|
-
import { tmpdir } from 'node:os';
|
|
4
|
-
import { join } from 'node:path';
|
|
5
|
-
import { test } from 'node:test';
|
|
6
|
-
import { formatPairWarnings, pairCheck } from './pair-client.js';
|
|
7
|
-
test('pairCheck shells to ai-hist pair check with locked v1 context args', async () => {
|
|
8
|
-
const root = await mkdtemp(join(tmpdir(), 'ai-hist-pair-cli-'));
|
|
9
|
-
const callsPath = join(root, 'calls.json');
|
|
10
|
-
const binPath = join(root, 'ai-hist-mock.mjs');
|
|
11
|
-
await writeFile(binPath, `#!/usr/bin/env node
|
|
12
|
-
import { writeFileSync } from 'node:fs';
|
|
13
|
-
writeFileSync(${JSON.stringify(callsPath)}, JSON.stringify(process.argv.slice(2)));
|
|
14
|
-
process.stdout.write(JSON.stringify({
|
|
15
|
-
decision: 'warn',
|
|
16
|
-
warnings: [{
|
|
17
|
-
text: 'Update permissions config before editing auth middleware.',
|
|
18
|
-
kind: 'reflection',
|
|
19
|
-
lens: 'trajectories',
|
|
20
|
-
score: 0.91,
|
|
21
|
-
evidence: [{
|
|
22
|
-
machineId: 'm_1',
|
|
23
|
-
source: 'trajectory',
|
|
24
|
-
sessionId: 'tA',
|
|
25
|
-
kind: 'reflection',
|
|
26
|
-
eventId: 'reflection:tA:suggestion:0',
|
|
27
|
-
ts: '2026-06-21T20:00:00Z',
|
|
28
|
-
snippet: 'update permissions config'
|
|
29
|
-
}]
|
|
30
|
-
}],
|
|
31
|
-
correlationId: 'pair_test'
|
|
32
|
-
}));
|
|
33
|
-
`, { mode: 0o755 });
|
|
34
|
-
const previousBin = process.env.AI_HIST_PAIR_CHECK_BIN;
|
|
35
|
-
process.env.AI_HIST_PAIR_CHECK_BIN = binPath;
|
|
36
|
-
try {
|
|
37
|
-
const result = await pairCheck({
|
|
38
|
-
context: {
|
|
39
|
-
projectId: 'proj-auth-svc',
|
|
40
|
-
repoPath: '/work/auth',
|
|
41
|
-
cwd: '/work/auth',
|
|
42
|
-
gitRemote: 'git@github.com:org/auth.git',
|
|
43
|
-
task: 'refactor auth middleware token check',
|
|
44
|
-
files: ['src/auth/middleware.ts'],
|
|
45
|
-
tool: 'Edit',
|
|
46
|
-
target: 'src/auth/middleware.ts',
|
|
47
|
-
action: 'edit',
|
|
48
|
-
recentPrompt: 'short prompt summary',
|
|
49
|
-
},
|
|
50
|
-
limit: 5,
|
|
51
|
-
});
|
|
52
|
-
assert.equal(result.decision, 'warn');
|
|
53
|
-
assert.equal(result.warnings[0].evidence?.[0].eventId, 'reflection:tA:suggestion:0');
|
|
54
|
-
assert.deepEqual(JSON.parse(await readFile(callsPath, 'utf8')), [
|
|
55
|
-
'pair',
|
|
56
|
-
'check',
|
|
57
|
-
'--json',
|
|
58
|
-
'--project-id',
|
|
59
|
-
'proj-auth-svc',
|
|
60
|
-
'--repo-path',
|
|
61
|
-
'/work/auth',
|
|
62
|
-
'--cwd',
|
|
63
|
-
'/work/auth',
|
|
64
|
-
'--git-remote',
|
|
65
|
-
'git@github.com:org/auth.git',
|
|
66
|
-
'--task',
|
|
67
|
-
'refactor auth middleware token check',
|
|
68
|
-
'--tool',
|
|
69
|
-
'Edit',
|
|
70
|
-
'--target',
|
|
71
|
-
'src/auth/middleware.ts',
|
|
72
|
-
'--action',
|
|
73
|
-
'edit',
|
|
74
|
-
'--recent-prompt',
|
|
75
|
-
'short prompt summary',
|
|
76
|
-
'--file',
|
|
77
|
-
'src/auth/middleware.ts',
|
|
78
|
-
'--limit',
|
|
79
|
-
'5',
|
|
80
|
-
]);
|
|
81
|
-
}
|
|
82
|
-
finally {
|
|
83
|
-
if (previousBin === undefined)
|
|
84
|
-
delete process.env.AI_HIST_PAIR_CHECK_BIN;
|
|
85
|
-
else
|
|
86
|
-
process.env.AI_HIST_PAIR_CHECK_BIN = previousBin;
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
test('formatPairWarnings renders advisory evidence and no-ops on empty warnings', () => {
|
|
90
|
-
assert.equal(formatPairWarnings({ decision: 'allow', warnings: [] }), '');
|
|
91
|
-
const text = formatPairWarnings({
|
|
92
|
-
decision: 'warn',
|
|
93
|
-
warnings: [
|
|
94
|
-
{
|
|
95
|
-
text: 'Prior finding applies here.',
|
|
96
|
-
kind: 'finding',
|
|
97
|
-
lens: 'trajectories',
|
|
98
|
-
score: 0.875,
|
|
99
|
-
evidence: [
|
|
100
|
-
{
|
|
101
|
-
machineId: 'm_1',
|
|
102
|
-
source: 'trajectory',
|
|
103
|
-
sessionId: 'tA',
|
|
104
|
-
eventId: 'finding:tA:learning:0',
|
|
105
|
-
ts: '2026-06-21T20:00:00Z',
|
|
106
|
-
snippet: 'rth_at hash lookup bypasses JWT verify',
|
|
107
|
-
},
|
|
108
|
-
],
|
|
109
|
-
},
|
|
110
|
-
],
|
|
111
|
-
correlationId: 'pair_1',
|
|
112
|
-
});
|
|
113
|
-
assert.match(text, /Pair advisory warnings/);
|
|
114
|
-
assert.match(text, /\[finding\/trajectories score=0\.88\]/);
|
|
115
|
-
assert.match(text, /m_1:trajectory:tA:finding:tA:learning:0/);
|
|
116
|
-
assert.match(text, /correlationId: pair_1/);
|
|
117
|
-
});
|
|
118
|
-
//# sourceMappingURL=pair-client.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pair-client.test.js","sourceRoot":"","sources":["../src/pair-client.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO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AAE,IAAI;wBACf,OAAO,EAAE,uBAAuB;wBAChC,EAAE,EAAE,sBAAsB;wBAC1B,OAAO,EAAE,wCAAwC;qBAClD;iBACF;aACF;SACF;QACD,aAAa,EAAE,QAAQ;KACxB,CAAC,CAAC;IACH,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,wBAAwB,CAAC,CAAC;IAC7C,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,uCAAuC,CAAC,CAAC;IAC5D,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,yCAAyC,CAAC,CAAC;IAC9D,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAC;AAC9C,CAAC,CAAC,CAAC"}
|
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Session catalog: the materialized shallow index of coding-agent sessions.
|
|
3
|
-
*
|
|
4
|
-
* Two halves, deliberately split by who owns the write:
|
|
5
|
-
*
|
|
6
|
-
* - **Cache-only listing** — `AiHist.listSessionCatalog()` in `index.ts`
|
|
7
|
-
* reads the `sessions` table and nothing else. No provider file is opened,
|
|
8
|
-
* no `history` / `session_events` scan happens. This module supplies the
|
|
9
|
-
* row type and the raw-row → `CatalogSession` mapping it uses.
|
|
10
|
-
* - **Shallow discovery** — `discoverSessions()` here drives
|
|
11
|
-
* `ai-hist sessions discover --json`, which scans the known provider
|
|
12
|
-
* locations with bounded reads and upserts the catalog. It is a top-level
|
|
13
|
-
* function rather than an `AiHist` method because discovery *writes* the
|
|
14
|
-
* on-disk database, and an `AiHist` instance is an in-memory snapshot taken
|
|
15
|
-
* at open time — a method would hand back a reader that cannot see the rows
|
|
16
|
-
* it just wrote. Re-open (or `openAiHist` again) afterwards to read them.
|
|
17
|
-
*
|
|
18
|
-
* The Rust CLI stays the single source of truth for discovery (provider
|
|
19
|
-
* locations, bounded reads, global recency ordering, stamp comparison), exactly
|
|
20
|
-
* as `cloud-push.ts` defers to `ai-hist push` for the push pipeline.
|
|
21
|
-
*/
|
|
22
|
-
import { spawn } from 'node:child_process';
|
|
23
|
-
import type { Source } from './index.js';
|
|
24
|
-
/**
|
|
25
|
-
* Version of the session-catalog output contract this SDK understands.
|
|
26
|
-
* Mirrors the native `SESSION_CATALOG_CONTRACT_VERSION`; a `summary` whose
|
|
27
|
-
* `contractVersion` differs came from a binary that speaks a different dialect.
|
|
28
|
-
*/
|
|
29
|
-
export declare const SESSION_CATALOG_CONTRACT_VERSION = 1;
|
|
30
|
-
/**
|
|
31
|
-
* One row of the session catalog — a coding-agent session as shallow
|
|
32
|
-
* discovery knows it.
|
|
33
|
-
*
|
|
34
|
-
* Most fields are *observed* (read straight out of provider data);
|
|
35
|
-
* `firstPrompt` is *derived* — a bounded excerpt of the first substantive human
|
|
36
|
-
* prompt. Provider quirks worth knowing:
|
|
37
|
-
*
|
|
38
|
-
* - `cursor` rows never have a `firstActivityMs` (the provider records no
|
|
39
|
-
* timestamps) and their `lastActivityMs` comes from the file mtime.
|
|
40
|
-
* - `relay` rows never have a `cwd` (a relay thread has no working
|
|
41
|
-
* directory) and only exist for threads a previous sync pulled down.
|
|
42
|
-
* - `lastAssistantText` is only written by a full ingest (`ai-hist sync`), so
|
|
43
|
-
* it is `null` on rows that have only ever been discovered shallowly.
|
|
44
|
-
* - `models` / `workspaceRoots` are best effort: `[]` means "not seen in a
|
|
45
|
-
* bounded read", not "none exist".
|
|
46
|
-
*/
|
|
47
|
-
export interface CatalogSession {
|
|
48
|
-
/** Provider that owns the session. `trajectory` never appears here. */
|
|
49
|
-
source: Source;
|
|
50
|
-
/** The provider's own session id. `(source, sessionId)` is the catalog key. */
|
|
51
|
-
sessionId: string;
|
|
52
|
-
cwd: string | null;
|
|
53
|
-
gitBranch: string | null;
|
|
54
|
-
firstActivityMs: number | null;
|
|
55
|
-
lastActivityMs: number | null;
|
|
56
|
-
/** Derived: bounded excerpt of the first substantive human prompt. */
|
|
57
|
-
firstPrompt: string | null;
|
|
58
|
-
/** Full-ingest only; `null` on shallow-only rows. */
|
|
59
|
-
lastAssistantText: string | null;
|
|
60
|
-
/** Parsed from `models_json`; `[]` when nothing was observed. */
|
|
61
|
-
models: string[];
|
|
62
|
-
originator: string | null;
|
|
63
|
-
agentVersion: string | null;
|
|
64
|
-
repoUrl: string | null;
|
|
65
|
-
initialCommit: string | null;
|
|
66
|
-
/** Parsed from `workspace_roots_json`; `[]` when nothing was observed. */
|
|
67
|
-
workspaceRoots: string[];
|
|
68
|
-
rawPath: string | null;
|
|
69
|
-
/** Change stamp of the raw source at scan time (`v{scanner}:{provider stamp}`). */
|
|
70
|
-
sourceStamp: string | null;
|
|
71
|
-
/**
|
|
72
|
-
* `'shallow'` (catalog row only) or `'full'` (full evidence ingested).
|
|
73
|
-
* Rows written before the catalog existed store `NULL` and are reported as
|
|
74
|
-
* `'full'`, matching the native reader.
|
|
75
|
-
*/
|
|
76
|
-
discoveryState: 'shallow' | 'full';
|
|
77
|
-
/** `true` when the row was served from the catalog without re-reading the source. */
|
|
78
|
-
fromCache: boolean;
|
|
79
|
-
/** Parser generation that wrote the row; absent on rows streamed by discovery. */
|
|
80
|
-
parserVersion?: number;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* A precise continuation point in the catalog's total order,
|
|
84
|
-
* `(lastActivityMs DESC, source ASC, sessionId ASC)`.
|
|
85
|
-
*
|
|
86
|
-
* Recency alone is not a key — one discovery pass can stamp many sessions with
|
|
87
|
-
* the same mtime-derived millisecond, and a cursor carrying only a timestamp
|
|
88
|
-
* silently drops every row tied with the page boundary — so the identity
|
|
89
|
-
* columns make the cursor total. `lastActivityMs` is null/absent for the tail
|
|
90
|
-
* of rows whose recency is unknown; those sort after every dated row.
|
|
91
|
-
*/
|
|
92
|
-
export interface CatalogCursor {
|
|
93
|
-
lastActivityMs?: number | null;
|
|
94
|
-
source: string;
|
|
95
|
-
sessionId: string;
|
|
96
|
-
}
|
|
97
|
-
/** Filters for the cache-only catalog listing. */
|
|
98
|
-
export interface ListCatalogOptions {
|
|
99
|
-
/** Restrict to these sources. Omit for every discoverable source. */
|
|
100
|
-
sources?: Iterable<Source | string>;
|
|
101
|
-
/** Row cap. Default 50, mirroring the native `DEFAULT_CATALOG_LIMIT`. */
|
|
102
|
-
limit?: number;
|
|
103
|
-
/**
|
|
104
|
-
* Coarse cutoff: only sessions strictly older than this epoch-ms. Convenient
|
|
105
|
-
* for "anything before last Tuesday", but it cannot separate rows that share
|
|
106
|
-
* a millisecond — use `after` to walk pages. Ignored when `after` is set.
|
|
107
|
-
*/
|
|
108
|
-
beforeMs?: number;
|
|
109
|
-
/** Precise continuation from the previous page's `nextCursor`. */
|
|
110
|
-
after?: CatalogCursor;
|
|
111
|
-
}
|
|
112
|
-
/** One page of the catalog plus the cursor that continues it. */
|
|
113
|
-
export interface SessionCatalogPage {
|
|
114
|
-
/** The rows, newest first. */
|
|
115
|
-
sessions: CatalogSession[];
|
|
116
|
-
/**
|
|
117
|
-
* Pass as {@link ListCatalogOptions.after} for the next page. `null` when
|
|
118
|
-
* the page did not fill its limit, i.e. the catalog is exhausted.
|
|
119
|
-
*/
|
|
120
|
-
nextCursor: CatalogCursor | null;
|
|
121
|
-
}
|
|
122
|
-
/** A non-fatal failure during discovery: one provider, or one bad session. */
|
|
123
|
-
export interface DiscoveryDiagnostic {
|
|
124
|
-
source: string;
|
|
125
|
-
/** File path or provider-scoped handle, when the failure has one. */
|
|
126
|
-
locator: string | null;
|
|
127
|
-
error: string;
|
|
128
|
-
}
|
|
129
|
-
/** Per-provider tallies for one discovery run. */
|
|
130
|
-
export interface ProviderDiscoverySummary {
|
|
131
|
-
/** Candidates enumerated, before the global limit. */
|
|
132
|
-
candidates: number;
|
|
133
|
-
/** Rows emitted after a shallow read. */
|
|
134
|
-
discovered: number;
|
|
135
|
-
/** Rows served from the catalog because the stamp was unchanged. */
|
|
136
|
-
skippedUnchanged: number;
|
|
137
|
-
/** `true` when enumeration itself failed. */
|
|
138
|
-
failed: boolean;
|
|
139
|
-
}
|
|
140
|
-
/** Work one discovery run actually performed — bounded-work evidence. */
|
|
141
|
-
export interface DiscoveryCounters {
|
|
142
|
-
candidatesEnumerated: number;
|
|
143
|
-
shallowReads: number;
|
|
144
|
-
skippedUnchanged: number;
|
|
145
|
-
filesOpened: number;
|
|
146
|
-
bytesRead: number;
|
|
147
|
-
}
|
|
148
|
-
/** A source that deliberately has no shallow adapter, and why. */
|
|
149
|
-
export interface SourceExemption {
|
|
150
|
-
source: string;
|
|
151
|
-
reason: string;
|
|
152
|
-
}
|
|
153
|
-
/** The closing `summary` line of a discovery run. */
|
|
154
|
-
export interface DiscoverySummary {
|
|
155
|
-
/** Compare against {@link SESSION_CATALOG_CONTRACT_VERSION}. */
|
|
156
|
-
contractVersion: number;
|
|
157
|
-
discovered: number;
|
|
158
|
-
skippedUnchanged: number;
|
|
159
|
-
/** Per-provider tallies, keyed by source name. */
|
|
160
|
-
providers: Record<string, ProviderDiscoverySummary>;
|
|
161
|
-
exemptSources: SourceExemption[];
|
|
162
|
-
counters: DiscoveryCounters;
|
|
163
|
-
}
|
|
164
|
-
/** Everything one `discoverSessions()` run produced. */
|
|
165
|
-
export interface DiscoverResult {
|
|
166
|
-
/** Rows in the order the CLI streamed them: newest first, globally. */
|
|
167
|
-
sessions: CatalogSession[];
|
|
168
|
-
/** Non-fatal per-provider / per-session failures. Never throws on these. */
|
|
169
|
-
diagnostics: DiscoveryDiagnostic[];
|
|
170
|
-
/** The closing summary. Always present: a run without one is rejected. */
|
|
171
|
-
summary: DiscoverySummary;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* A discovery run that could not be completed or trusted.
|
|
175
|
-
*
|
|
176
|
-
* The native command emits its diagnostics and the summary trailer even when
|
|
177
|
-
* every provider fails, so a failed run still carries everything it managed to
|
|
178
|
-
* learn: `diagnostics` says which sources broke and why, and `summary` (when
|
|
179
|
-
* the trailer arrived) says what the run actually did. `stderr` and `exitCode`
|
|
180
|
-
* carry the process-level detail.
|
|
181
|
-
*/
|
|
182
|
-
export declare class DiscoveryError extends Error {
|
|
183
|
-
readonly exitCode: number | null;
|
|
184
|
-
readonly stderr: string;
|
|
185
|
-
readonly diagnostics: DiscoveryDiagnostic[];
|
|
186
|
-
readonly summary: DiscoverySummary | null;
|
|
187
|
-
constructor(message: string, details?: {
|
|
188
|
-
exitCode?: number | null;
|
|
189
|
-
stderr?: string;
|
|
190
|
-
diagnostics?: DiscoveryDiagnostic[];
|
|
191
|
-
summary?: DiscoverySummary | null;
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
export interface DiscoverSessionsOptions {
|
|
195
|
-
/** Explicit path to the ai-hist binary (overrides discovery). */
|
|
196
|
-
binPath?: string;
|
|
197
|
-
/** Restrict to these sources (forwarded as repeated `--source`). */
|
|
198
|
-
sources?: Iterable<Source | string>;
|
|
199
|
-
/**
|
|
200
|
-
* Global cap across all providers, applied by recency (`--limit`). The
|
|
201
|
-
* native ordering is global, so a limit of 3 returns the three newest
|
|
202
|
-
* sessions overall, not three per provider.
|
|
203
|
-
*/
|
|
204
|
-
limit?: number;
|
|
205
|
-
/** Called for each session row as it streams, before the promise resolves. */
|
|
206
|
-
onSession?: (session: CatalogSession) => void;
|
|
207
|
-
/** Called for each diagnostic line as it streams. */
|
|
208
|
-
onDiagnostic?: (diagnostic: DiscoveryDiagnostic) => void;
|
|
209
|
-
/** Extra environment for the spawned binary (merged over `process.env`). */
|
|
210
|
-
env?: NodeJS.ProcessEnv;
|
|
211
|
-
/** Injectable spawn for testing. */
|
|
212
|
-
spawnFn?: typeof spawn;
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Parse a JSON string array column (`models_json`, `workspace_roots_json`).
|
|
216
|
-
* `NULL`, `''`, and malformed JSON all mean "nothing observed" → `[]`; the
|
|
217
|
-
* column never stores `[]` itself.
|
|
218
|
-
*/
|
|
219
|
-
export declare function parseJsonStringList(raw: string | null | undefined): string[];
|
|
220
|
-
/** `NULL` `discovery_state` predates the catalog and means a fully ingested row. */
|
|
221
|
-
export declare function normalizeDiscoveryState(raw: unknown): 'shallow' | 'full';
|
|
222
|
-
/** Map one snake_case CLI/`sessions`-row object onto a {@link CatalogSession}. */
|
|
223
|
-
export declare function catalogSessionFromJson(raw: Record<string, unknown>): CatalogSession;
|
|
224
|
-
/**
|
|
225
|
-
* Run shallow session discovery by driving `ai-hist sessions discover --json`.
|
|
226
|
-
*
|
|
227
|
-
* The CLI streams JSONL — one `session` object per discovered row, a
|
|
228
|
-
* `diagnostic` per non-fatal failure, then a closing `summary` — and this
|
|
229
|
-
* parses it as it arrives, so `onSession` fires progressively rather than only
|
|
230
|
-
* once the whole run finishes.
|
|
231
|
-
*
|
|
232
|
-
* Discovery **writes the on-disk database**. An `AiHist` opened before the run
|
|
233
|
-
* is a snapshot and will not contain the new rows; re-open (or call
|
|
234
|
-
* `openAiHist` again) before `listSessionCatalog()` to see them.
|
|
235
|
-
*
|
|
236
|
-
* Failure behavior mirrors the CLI's: a provider that blows up contributes a
|
|
237
|
-
* diagnostic and the run still resolves (exit 0). Individual unparseable or
|
|
238
|
-
* unrecognized lines are skipped rather than failing the run, so a newer
|
|
239
|
-
* binary's extra line types stay forward-compatible. The promise rejects with
|
|
240
|
-
* a {@link DiscoveryError} when:
|
|
241
|
-
*
|
|
242
|
-
* - the binary cannot be run at all (the message names `AI_HIST_RUST_BIN`);
|
|
243
|
-
* - the run exits non-zero — every selected provider failed. The native
|
|
244
|
-
* command still writes its diagnostics and the summary trailer before
|
|
245
|
-
* exiting, so the error carries both alongside `stderr` and `exitCode`;
|
|
246
|
-
* - no summary line arrived, or its `contractVersion` is not the one this
|
|
247
|
-
* SDK understands. The trailer is mandatory in the native contract, so a
|
|
248
|
-
* run without one (or with a version this SDK cannot read) means the rows
|
|
249
|
-
* are not safe to interpret — better to say so than to hand back a
|
|
250
|
-
* half-understood catalog.
|
|
251
|
-
*
|
|
252
|
-
* An exception thrown by `onSession` or `onDiagnostic` aborts the run: the
|
|
253
|
-
* child is killed and the promise rejects with that exception, rather than
|
|
254
|
-
* escaping the stream handler as an uncaught error in the host process.
|
|
255
|
-
*/
|
|
256
|
-
export declare function discoverSessions(opts?: DiscoverSessionsOptions): Promise<DiscoverResult>;
|
|
257
|
-
//# sourceMappingURL=session-catalog.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session-catalog.d.ts","sourceRoot":"","sources":["../src/session-catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAI9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAElD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,cAAc;IAC7B,uEAAuE;IACvE,MAAM,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,sEAAsE;IACtE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,qDAAqD;IACrD,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,iEAAiE;IACjE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,0EAA0E;IAC1E,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,mFAA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