ai-hist 0.4.1 → 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.
Files changed (46) hide show
  1. package/README.md +34 -156
  2. package/dist/cli.d.ts +3 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +248 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/cloud-client.d.ts +0 -1
  7. package/dist/cloud-client.d.ts.map +1 -1
  8. package/dist/cloud-client.js +0 -2
  9. package/dist/cloud-client.js.map +1 -1
  10. package/dist/index.d.ts +153 -211
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +263 -902
  13. package/dist/index.js.map +1 -1
  14. package/dist/mcp-server.d.ts +0 -9
  15. package/dist/mcp-server.d.ts.map +1 -1
  16. package/dist/mcp-server.js +52 -675
  17. package/dist/mcp-server.js.map +1 -1
  18. package/package.json +14 -8
  19. package/dist/cloud-push.d.ts +0 -47
  20. package/dist/cloud-push.d.ts.map +0 -1
  21. package/dist/cloud-push.js +0 -111
  22. package/dist/cloud-push.js.map +0 -1
  23. package/dist/cloud-push.test.d.ts +0 -2
  24. package/dist/cloud-push.test.d.ts.map +0 -1
  25. package/dist/cloud-push.test.js +0 -68
  26. package/dist/cloud-push.test.js.map +0 -1
  27. package/dist/jsonl-sources.d.ts +0 -35
  28. package/dist/jsonl-sources.d.ts.map +0 -1
  29. package/dist/jsonl-sources.js +0 -354
  30. package/dist/jsonl-sources.js.map +0 -1
  31. package/dist/mcp-smoke.test.d.ts +0 -2
  32. package/dist/mcp-smoke.test.d.ts.map +0 -1
  33. package/dist/mcp-smoke.test.js +0 -424
  34. package/dist/mcp-smoke.test.js.map +0 -1
  35. package/dist/pair-client.d.ts +0 -41
  36. package/dist/pair-client.d.ts.map +0 -1
  37. package/dist/pair-client.js +0 -60
  38. package/dist/pair-client.js.map +0 -1
  39. package/dist/pair-client.test.d.ts +0 -2
  40. package/dist/pair-client.test.d.ts.map +0 -1
  41. package/dist/pair-client.test.js +0 -118
  42. package/dist/pair-client.test.js.map +0 -1
  43. package/dist/trajectory-sources.d.ts +0 -36
  44. package/dist/trajectory-sources.d.ts.map +0 -1
  45. package/dist/trajectory-sources.js +0 -201
  46. package/dist/trajectory-sources.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,19 +1,30 @@
1
1
  /**
2
- * TypeScript SDK for reading the ai-hist SQLite database.
2
+ * RelayHistory's public TypeScript API.
3
3
  *
4
- * Backed by sql.js (WASM SQLite) so the package has zero native build
5
- * requirements — works in Electron, Node, and browser contexts without
6
- * needing electron-rebuild. The SDK reads the same ai-hist SQLite database
7
- * that `ai-hist sync` writes (default
8
- * `~/.local/share/ai-hist/ai-history.db`, or `$AI_HIST_DB`).
9
- *
10
- * Trade-off vs better-sqlite3: sql.js loads the whole DB file into
11
- * memory. Fine for the ai-hist scale (tens of thousands of rows, MBs
12
- * of data); revisit if anyone hits millions.
4
+ * Every production operation crosses one mandatory Node-API boundary into the
5
+ * Rust engine. This module owns only input defaults, object normalization,
6
+ * pagination ergonomics, and stable JavaScript errors.
13
7
  */
14
- import { type Database } from 'sql.js';
15
- import { type TrajectoryDecision, type TrajectoryRetrospective } from './trajectory-sources.js';
8
+ export declare const NATIVE_CONTRACT_VERSION = 2;
9
+ export declare const SESSION_CATALOG_CONTRACT_VERSION = 1;
16
10
  export type Source = 'claude' | 'codex' | 'cursor' | 'grok' | 'relay' | 'trajectory' | 'opencode';
11
+ export type CatalogSource = Exclude<Source, 'trajectory'>;
12
+ export declare class RelayHistoryError extends Error {
13
+ readonly code: string;
14
+ constructor(message: string, code: string, options?: ErrorOptions);
15
+ }
16
+ export declare class UnsupportedPlatformError extends RelayHistoryError {
17
+ }
18
+ export declare class NativePackageMissingError extends RelayHistoryError {
19
+ }
20
+ export declare class NativeLoadError extends RelayHistoryError {
21
+ }
22
+ export declare class NativeContractMismatchError extends RelayHistoryError {
23
+ }
24
+ export declare class DatabaseOpenError extends RelayHistoryError {
25
+ }
26
+ export declare class InvalidArgumentError extends RelayHistoryError {
27
+ }
17
28
  export interface HistoryEntry {
18
29
  id: number;
19
30
  source: Source;
@@ -21,71 +32,129 @@ export interface HistoryEntry {
21
32
  project: string | null;
22
33
  prompt: string;
23
34
  timestampMs: number;
24
- gitBranch: string | null;
25
35
  }
26
- export interface SessionMeta {
27
- sessionId: string;
28
- source: Source;
29
- cwd: string | null;
30
- gitBranch: string | null;
31
- firstActivityMs: number | null;
36
+ export interface ListOptions {
37
+ dbPath?: string;
38
+ source?: Source;
39
+ project?: string;
40
+ tag?: string;
41
+ beforeMs?: number;
42
+ limit?: number;
43
+ }
44
+ export interface SearchOptions extends ListOptions {
45
+ rawFts?: boolean;
46
+ }
47
+ export interface SessionOptions {
48
+ dbPath?: string;
49
+ source?: Source;
50
+ tag?: string;
51
+ }
52
+ export interface CatalogCursor {
32
53
  lastActivityMs: number | null;
33
- lastAssistantText: string | null;
34
- rawPath: string | null;
54
+ source: string;
55
+ sessionId: string;
35
56
  }
36
- export interface HandoffCandidate {
57
+ export interface CatalogSession {
58
+ source: CatalogSource;
37
59
  sessionId: string;
38
- source: Source;
39
60
  cwd: string | null;
40
61
  gitBranch: string | null;
41
62
  firstActivityMs: number | null;
42
63
  lastActivityMs: number | null;
43
- promptCount: number;
44
- goal: string;
45
- lastState: string;
64
+ firstPrompt: string | null;
46
65
  lastAssistantText: string | null;
47
- filesTouched: string[];
48
- resumeCommand: string | null;
49
- warmStartCommand: string;
50
- confidence: number;
66
+ models: string[];
67
+ originator: string | null;
68
+ agentVersion: string | null;
69
+ repoUrl: string | null;
70
+ initialCommit: string | null;
71
+ workspaceRoots: string[];
72
+ rawPath: string | null;
73
+ sourceStamp: string | null;
74
+ discoveryState: 'shallow' | 'full';
75
+ fromCache: boolean;
76
+ }
77
+ export interface ListCatalogOptions {
78
+ dbPath?: string;
79
+ sources?: CatalogSource[];
80
+ limit?: number;
81
+ beforeMs?: number;
82
+ after?: CatalogCursor;
83
+ }
84
+ export interface SessionCatalogPage {
85
+ contractVersion: number;
86
+ sessions: CatalogSession[];
87
+ nextCursor: CatalogCursor | null;
51
88
  }
52
- export interface Tag {
53
- name: string;
54
- displayName: string;
55
- color: string | null;
56
- sessionCount: number;
57
- firstTaggedMs: number | null;
58
- lastTaggedMs: number | null;
89
+ export interface DiscoveryDiagnostic {
90
+ source: string;
91
+ locator: string | null;
92
+ error: string;
59
93
  }
60
- export interface TaggedSession {
94
+ export interface ProviderDiscoverySummary {
95
+ source: string;
96
+ candidates: number;
97
+ discovered: number;
98
+ skippedUnchanged: number;
99
+ failed: boolean;
100
+ }
101
+ export interface DiscoveryCounters {
102
+ candidatesEnumerated: number;
103
+ shallowReads: number;
104
+ skippedUnchanged: number;
105
+ filesOpened: number;
106
+ bytesRead: number;
107
+ }
108
+ export interface SourceExemption {
109
+ source: string;
110
+ reason: string;
111
+ }
112
+ export interface DiscoverSessionsOptions {
113
+ dbPath?: string;
114
+ sources?: CatalogSource[];
115
+ limit?: number;
116
+ }
117
+ export interface DiscoverResult {
118
+ contractVersion: number;
119
+ sessions: CatalogSession[];
120
+ discovered: number;
121
+ skippedUnchanged: number;
122
+ providers: ProviderDiscoverySummary[];
123
+ exemptSources: SourceExemption[];
124
+ diagnostics: DiscoveryDiagnostic[];
125
+ counters: DiscoveryCounters;
126
+ }
127
+ export interface SessionEvent {
128
+ id: number;
61
129
  source: Source;
62
130
  sessionId: string;
63
131
  project: string | null;
64
- entryCount: number;
65
- lastActivityMs: number | null;
132
+ cwd: string | null;
133
+ gitBranch: string | null;
134
+ messageId: string | null;
135
+ parentId: string | null;
136
+ tsMs: number;
137
+ role: 'user' | 'assistant' | 'tool_result';
138
+ kind: 'text' | 'thinking' | 'tool_use' | 'tool_result';
139
+ text: string | null;
140
+ model: string | null;
141
+ tokenUsage: Record<string, unknown> | null;
142
+ eventUid: string;
66
143
  }
67
- export interface SessionSummary {
68
- sessionId: string;
69
- source: Source;
70
- project: string | null;
71
- firstPrompt: string;
72
- lastActivityMs: number;
73
- firstActivityMs: number;
74
- promptCount: number;
144
+ export interface EventCursor {
145
+ tsMs: number;
146
+ id: number;
75
147
  }
76
- export interface ListOptions {
148
+ export interface EventsPageOptions {
149
+ dbPath?: string;
77
150
  source?: Source;
78
- project?: string;
79
- tag?: string;
80
- /** Default 50. */
81
151
  limit?: number;
82
- /**
83
- * Paginate older than this timestamp (exclusive). Use the
84
- * `lastActivityMs` / `timestampMs` of the last item from the previous page.
85
- */
86
- beforeMs?: number;
152
+ after?: EventCursor;
153
+ }
154
+ export interface SessionEventsPage {
155
+ events: SessionEvent[];
156
+ nextCursor: EventCursor | null;
87
157
  }
88
- export type SearchOptions = ListOptions;
89
158
  export interface Stats {
90
159
  total: number;
91
160
  bySource: Partial<Record<Source, number>>;
@@ -96,164 +165,37 @@ export interface Stats {
96
165
  firstTimestampMs: number | null;
97
166
  lastTimestampMs: number | null;
98
167
  }
99
- export interface TrajectoryEntry {
100
- id: string;
101
- version: number | null;
102
- personaId: string | null;
103
- projectId: string | null;
104
- task: {
105
- title: string | null;
106
- description: string | null;
107
- };
108
- status: string | null;
109
- startedAt: string | null;
110
- completedAt: string | null;
111
- decisions: TrajectoryDecision[];
112
- retrospective: TrajectoryRetrospective;
113
- searchText: string;
114
- path: string | null;
115
- updatedMs: number;
116
- timestampMs: number;
117
- }
118
- export interface TrajectorySearchOptions {
119
- /** Default 20. */
120
- limit?: number;
121
- /** Filter to a trajectory projectId or path. */
122
- project?: string;
123
- }
124
- export interface GetHandoffOptions {
125
- /** Substring match against session cwd. */
126
- repo?: string;
127
- /** Substring match against git_branch. */
128
- branch?: string;
129
- /** Filter to a specific CLI source. */
130
- source?: 'claude' | 'codex';
131
- /** Max candidates to return. Default 3. */
132
- limit?: number;
133
- }
134
- /** Resolve the SQLite path that ai-hist writes to. */
135
- export declare function defaultDbPath(): string;
136
- export interface OpenOptions {
137
- /** Override the SQLite path (default: `$AI_HIST_DB` or `~/.local/share/ai-hist/ai-history.db`). */
168
+ export interface StatsOptions {
138
169
  dbPath?: string;
139
- /**
140
- * Restrict all reads to one project directory/path. Exact matches and
141
- * child paths are included, so a scope of `/repo` also includes `/repo/pkg`.
142
- */
143
- projectScope?: string;
144
- /**
145
- * What to do when the SQLite DB is missing:
146
- * - `'jsonl'` (default): scan local Claude/Codex/Cursor/Grok history files
147
- * directly into an in-memory SQLite — works without the Python
148
- * `ai-hist sync` tool installed.
149
- * - `'error'`: throw with an install hint (legacy 0.1.x behavior).
150
- */
151
- fallback?: 'jsonl' | 'error';
170
+ tag?: string;
152
171
  }
153
- export interface OpenSourceInfo {
154
- /** `'sqlite'` when the on-disk DB was used, `'jsonl'` when the fallback scan was. */
155
- kind: 'sqlite' | 'jsonl';
156
- /** SQLite DB path or, in jsonl mode, the paths that were scanned. */
157
- path: string;
172
+ export interface SyncOptions {
173
+ dbPath?: string;
158
174
  }
159
- /**
160
- * Open an `AiHist` reader. Async because sql.js initializes its WASM
161
- * runtime lazily and the DB file is read asynchronously so the host
162
- * process's event loop isn't blocked.
163
- *
164
- * Each call snapshots the data; to pick up later writes, call `reload()`
165
- * (or open a fresh instance).
166
- */
167
- export declare function openAiHist(opts?: OpenOptions): Promise<AiHist>;
168
- export declare class AiHist {
169
- private readonly db;
170
- private readonly _source;
171
- private readonly _projectScope;
172
- private closed;
173
- /** @internal — use `openAiHist(...)` to construct. */
174
- constructor(db: Database, source: OpenSourceInfo, opts?: Pick<OpenOptions, 'projectScope'>);
175
- /**
176
- * Path the data came from. SQLite mode: the .db path. JSONL fallback
177
- * mode: a comma-separated list of the scanned source paths.
178
- */
179
- get dbPath(): string;
180
- /** Which data path was used: `'sqlite'` (Python tool) or `'jsonl'` (fallback). */
181
- get sourceKind(): 'sqlite' | 'jsonl';
182
- /** Server/client-wide project scope applied to every read, if configured. */
183
- get projectScope(): string | undefined;
184
- close(): void;
185
- private persistIfWritable;
186
- private ensureTag;
187
- private matchingSessions;
188
- tagSession(sessionId: string, tagName: string, opts?: {
189
- source?: Source;
190
- color?: string | null;
191
- }): TaggedSession[];
192
- untagSession(sessionId: string, tagName: string, opts?: {
193
- source?: Source;
194
- }): number;
195
- listTags(opts?: {
196
- tag?: string;
197
- includeSessions?: boolean;
198
- }): Array<Tag & {
199
- sessions?: TaggedSession[];
200
- }>;
201
- sessionsByTag(tagName: string): TaggedSession[];
202
- searchByTag(tagName: string, opts?: Omit<SearchOptions, 'tag'>): HistoryEntry[];
203
- /** Most recent prompts, newest first. */
204
- recent(opts?: ListOptions): HistoryEntry[];
205
- /**
206
- * Group history into sessions, ordered by last activity (newest first).
207
- * Sessions without a `session_id` are skipped.
208
- *
209
- * Implementation note: this used to use a correlated scalar subquery
210
- * to pick `first_prompt`, which ran in O(sessions × rows) — ~19s on a
211
- * 35K-row DB. Switched to `ROW_NUMBER() OVER (PARTITION BY session_id
212
- * ORDER BY timestamp_ms)` so first-prompt picking is a single pass
213
- * over the table (~300ms on the same DB). Plus the index ensure step
214
- * in `openAiHist` keeps it fast even when the DB was written by the
215
- * older Python CLI that didn't create `idx_history_session`.
216
- */
217
- listSessions(opts?: ListOptions): SessionSummary[];
218
- /** All prompts in a session, ordered oldest → newest. */
219
- getSession(sessionId: string, opts?: Pick<ListOptions, 'source' | 'tag'>): HistoryEntry[];
220
- /**
221
- * Substring search across prompt + project, case-insensitive, recent
222
- * matches first. The Python CLI uses FTS5; this SDK uses LIKE because
223
- * sql.js's default WASM build doesn't ship the FTS5 module. Plenty fast
224
- * for the ai-hist scale (~tens of thousands of rows); revisit if a
225
- * future consumer needs phrase/boolean queries.
226
- *
227
- * The query is matched literally — `%` and `_` are escaped so users can
228
- * search for them. Empty queries return recent entries matching the filters.
229
- */
230
- search(query: string, opts?: SearchOptions): HistoryEntry[];
231
- /** Search compacted per-run trajectory WHY: decisions and retrospectives. */
232
- searchTrajectories(query: string, opts?: TrajectorySearchOptions): TrajectoryEntry[];
233
- /** Best-matching per-run trajectory for a task query, or `null` if none match. */
234
- whyForTask(query: string): TrajectoryEntry | null;
235
- /** Single entry by id, or `null` if not found. */
236
- getEntry(id: number): HistoryEntry | null;
237
- /**
238
- * All entries whose timestamp falls within [timestampMs - windowMs,
239
- * timestampMs + windowMs], ordered oldest first. Used by get_context.
240
- */
241
- getInTimeWindow(timestampMs: number, windowMs: number): HistoryEntry[];
242
- /**
243
- * Find sessions matching the given repo/branch/source and return ranked
244
- * handoff candidates with a warm-start command for the target CLI.
245
- *
246
- * Queries the `sessions` table (populated by `ai-hist sync`) for objective
247
- * metadata, then joins the last N user prompts from `history` to generate
248
- * a brief on demand — no pre-computed summaries.
249
- */
250
- getHandoff(opts?: GetHandoffOptions): HandoffCandidate[];
251
- /** Counts + date range, mirroring `ai-hist stats`. */
252
- stats(): Stats;
175
+ export interface SyncResult {
176
+ databasePath: string;
177
+ completed: boolean;
253
178
  }
179
+ export declare function runtimePlatform(): string;
180
+ export declare function validateNativeContract(actual: number): void;
181
+ export declare function defaultDbPath(): string;
254
182
  /**
255
- * Resume command for an entry/session, matching what `ai-hist show` prints.
256
- * Returns `null` for sources that don't have a resume affordance (relay).
183
+ * Optimization profile of the loaded native addon: 'release', 'debug', or
184
+ * 'unknown' for an addon predating the probe. Performance measurements are
185
+ * only meaningful against 'release'.
257
186
  */
187
+ export declare function nativeBuildProfile(): Promise<string>;
188
+ export declare function search(query: string, options?: SearchOptions): Promise<HistoryEntry[]>;
189
+ export declare function recent(options?: ListOptions): Promise<HistoryEntry[]>;
190
+ export declare function getSession(sessionId: string, options?: SessionOptions): Promise<HistoryEntry[]>;
191
+ export declare function listSessionCatalog(options?: ListCatalogOptions): Promise<CatalogSession[]>;
192
+ export declare function listSessionCatalogPage(options?: ListCatalogOptions): Promise<SessionCatalogPage>;
193
+ export declare function discoverSessions(options?: DiscoverSessionsOptions): Promise<DiscoverResult>;
194
+ export declare function discoverAndList(options?: DiscoverSessionsOptions & ListCatalogOptions): Promise<SessionCatalogPage>;
195
+ export declare function getSessionEventsPage(sessionId: string, options?: EventsPageOptions): Promise<SessionEventsPage>;
196
+ export declare function sessionEvents(sessionId: string, options?: Omit<EventsPageOptions, 'after'>): AsyncGenerator<SessionEvent>;
197
+ export declare function getSessionEvents(sessionId: string, options?: Omit<EventsPageOptions, 'after'>): Promise<SessionEvent[]>;
198
+ export declare function stats(options?: StatsOptions): Promise<Stats>;
199
+ export declare function sync(options?: SyncOptions): Promise<SyncResult>;
258
200
  export declare function resumeCommand(entry: Pick<HistoryEntry, 'source' | 'sessionId' | 'project'>): string | null;
259
201
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAkB,EAAE,KAAK,QAAQ,EAAoB,MAAM,QAAQ,CAAC;AASpE,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC7B,MAAM,yBAAyB,CAAC;AAIjC,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,YAAY,GAAG,UAAU,CAAC;AAElG,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,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,iBAAiB,EAAE,MA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