ai-hist-native 0.18.8 → 0.19.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
@@ -161,6 +163,12 @@ export interface NativeStats {
161
163
  total: number
162
164
  bySource: Array<SourceCount>
163
165
  byProject: Array<ProjectCount>
166
+ /**
167
+ * Which key `by_project` is bucketed by: `project_key` or `cwd`. Read it
168
+ * rather than assuming -- the two produce different counts for the same
169
+ * database.
170
+ */
171
+ groupedBy: string
164
172
  firstTimestampMs?: number
165
173
  lastTimestampMs?: number
166
174
  }
@@ -168,6 +176,11 @@ export interface StatsOptions {
168
176
  scope?: string
169
177
  dbPath?: string
170
178
  tag?: string
179
+ /**
180
+ * Bucket `by_project` by the raw working directory instead of the
181
+ * canonical project key. Defaults to false.
182
+ */
183
+ byCwd?: boolean
171
184
  }
172
185
  /** Full-text search of indexed history. Never discovers or syncs implicitly. */
173
186
  export declare function search(query: string, options?: SearchOptions | undefined | null): Promise<Array<NativeHistoryEntry>>
@@ -206,6 +219,13 @@ export interface CatalogSession {
206
219
  rawPath?: string
207
220
  sourceStamp?: string
208
221
  discoveryState: string
222
+ /**
223
+ * Canonical project identity: `host/owner/repo`, or the working
224
+ * directory when no git remote resolves.
225
+ */
226
+ projectKey?: string
227
+ /** `remote`, `path`, or `inherited`. */
228
+ projectKeyMethod?: string
209
229
  locations: Array<string>
210
230
  fromCache: boolean
211
231
  }
@@ -221,6 +241,11 @@ export interface ListCatalogOptions {
221
241
  limit?: number
222
242
  beforeMs?: number
223
243
  after?: CatalogCursor
244
+ /**
245
+ * Exact canonical project key (`host/owner/repo`, or the working
246
+ * directory when the checkout has no remote).
247
+ */
248
+ projectKey?: string
224
249
  }
225
250
  export interface SessionCatalogPage {
226
251
  contractVersion: number
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-hist-native-darwin-arm64",
3
- "version": "0.18.8",
3
+ "version": "0.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.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.19.0",
48
+ "ai-hist-native-darwin-x64": "0.19.0",
49
+ "ai-hist-native-linux-x64-gnu": "0.19.0",
50
+ "ai-hist-native-linux-arm64-gnu": "0.19.0",
51
+ "ai-hist-native-linux-x64-musl": "0.19.0",
52
+ "ai-hist-native-linux-arm64-musl": "0.19.0",
53
+ "ai-hist-native-win32-x64-msvc": "0.19.0"
54
54
  }
55
55
  }