ai-hist-native 0.18.8 → 0.20.0

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/index.d.ts CHANGED
@@ -58,6 +58,8 @@ export interface NativeSessionEvent {
58
58
  source: string
59
59
  sessionId: string
60
60
  project?: string
61
+ /** Canonical project identity, denormalized from the owning session. */
62
+ projectKey?: string
61
63
  cwd?: string
62
64
  gitBranch?: string
63
65
  messageId?: string
@@ -69,6 +71,12 @@ export interface NativeSessionEvent {
69
71
  model?: string
70
72
  tokenJson?: string
71
73
  eventUid: string
74
+ requestId?: string
75
+ stopReason?: string
76
+ agentVersion?: string
77
+ isSidechain?: boolean
78
+ isMeta?: boolean
79
+ turnId?: string
72
80
  }
73
81
  export interface EventCursor {
74
82
  tsMs: number
@@ -161,6 +169,12 @@ export interface NativeStats {
161
169
  total: number
162
170
  bySource: Array<SourceCount>
163
171
  byProject: Array<ProjectCount>
172
+ /**
173
+ * Which key `by_project` is bucketed by: `project_key` or `cwd`. Read it
174
+ * rather than assuming -- the two produce different counts for the same
175
+ * database.
176
+ */
177
+ groupedBy: string
164
178
  firstTimestampMs?: number
165
179
  lastTimestampMs?: number
166
180
  }
@@ -168,6 +182,11 @@ export interface StatsOptions {
168
182
  scope?: string
169
183
  dbPath?: string
170
184
  tag?: string
185
+ /**
186
+ * Bucket `by_project` by the raw working directory instead of the
187
+ * canonical project key. Defaults to false.
188
+ */
189
+ byCwd?: boolean
171
190
  }
172
191
  /** Full-text search of indexed history. Never discovers or syncs implicitly. */
173
192
  export declare function search(query: string, options?: SearchOptions | undefined | null): Promise<Array<NativeHistoryEntry>>
@@ -206,6 +225,13 @@ export interface CatalogSession {
206
225
  rawPath?: string
207
226
  sourceStamp?: string
208
227
  discoveryState: string
228
+ /**
229
+ * Canonical project identity: `host/owner/repo`, or the working
230
+ * directory when no git remote resolves.
231
+ */
232
+ projectKey?: string
233
+ /** `remote`, `path`, or `inherited`. */
234
+ projectKeyMethod?: string
209
235
  locations: Array<string>
210
236
  fromCache: boolean
211
237
  }
@@ -221,6 +247,11 @@ export interface ListCatalogOptions {
221
247
  limit?: number
222
248
  beforeMs?: number
223
249
  after?: CatalogCursor
250
+ /**
251
+ * Exact canonical project key (`host/owner/repo`, or the working
252
+ * directory when the checkout has no remote).
253
+ */
254
+ projectKey?: string
224
255
  }
225
256
  export interface SessionCatalogPage {
226
257
  contractVersion: number
@@ -314,6 +345,12 @@ export interface HydrateSessionResult {
314
345
  presence: string
315
346
  indexedThrough: HydrationIndexedThrough
316
347
  evidence: HydrationEvidence
348
+ /**
349
+ * Evidence kinds this hydration can have indexed, as wire names
350
+ * (`history`, `session_event`, `tool_call`, `file_edit`,
351
+ * `relationship`, `commit_link`).
352
+ */
353
+ coverage: Array<string>
317
354
  relatedSessionIds: Array<string>
318
355
  diagnostics: Array<HydrationDiagnostic>
319
356
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-hist-native-darwin-arm64",
3
- "version": "0.18.8",
3
+ "version": "0.20.0",
4
4
  "os": [
5
5
  "darwin"
6
6
  ],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-hist-native-darwin-x64",
3
- "version": "0.18.8",
3
+ "version": "0.20.0",
4
4
  "os": [
5
5
  "darwin"
6
6
  ],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-hist-native-linux-arm64-gnu",
3
- "version": "0.18.8",
3
+ "version": "0.20.0",
4
4
  "os": [
5
5
  "linux"
6
6
  ],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-hist-native-linux-arm64-musl",
3
- "version": "0.18.8",
3
+ "version": "0.20.0",
4
4
  "os": [
5
5
  "linux"
6
6
  ],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-hist-native-linux-x64-gnu",
3
- "version": "0.18.8",
3
+ "version": "0.20.0",
4
4
  "os": [
5
5
  "linux"
6
6
  ],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-hist-native-linux-x64-musl",
3
- "version": "0.18.8",
3
+ "version": "0.20.0",
4
4
  "os": [
5
5
  "linux"
6
6
  ],
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-hist-native-win32-x64-msvc",
3
- "version": "0.18.8",
3
+ "version": "0.20.0",
4
4
  "os": [
5
5
  "win32"
6
6
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-hist-native",
3
- "version": "0.18.8",
3
+ "version": "0.20.0",
4
4
  "description": "Mandatory Node-API engine for RelayHistory.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -44,12 +44,12 @@
44
44
  "@napi-rs/cli": "^2.18.4"
45
45
  },
46
46
  "optionalDependencies": {
47
- "ai-hist-native-darwin-arm64": "0.18.8",
48
- "ai-hist-native-darwin-x64": "0.18.8",
49
- "ai-hist-native-linux-x64-gnu": "0.18.8",
50
- "ai-hist-native-linux-arm64-gnu": "0.18.8",
51
- "ai-hist-native-linux-x64-musl": "0.18.8",
52
- "ai-hist-native-linux-arm64-musl": "0.18.8",
53
- "ai-hist-native-win32-x64-msvc": "0.18.8"
47
+ "ai-hist-native-darwin-arm64": "0.20.0",
48
+ "ai-hist-native-darwin-x64": "0.20.0",
49
+ "ai-hist-native-linux-x64-gnu": "0.20.0",
50
+ "ai-hist-native-linux-arm64-gnu": "0.20.0",
51
+ "ai-hist-native-linux-x64-musl": "0.20.0",
52
+ "ai-hist-native-linux-arm64-musl": "0.20.0",
53
+ "ai-hist-native-win32-x64-msvc": "0.20.0"
54
54
  }
55
55
  }