ai-hist-native 0.32.1 → 0.33.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
@@ -21,6 +21,21 @@ export declare function applySourceObservations(requestJson: string): Promise<st
21
21
  export declare function applySourceEvidence(requestJson: string): Promise<string>
22
22
  /** Contract version implemented by this native addon. */
23
23
  export declare function nativeContractVersion(): number
24
+ /**
25
+ * Call `callback` with `"started"`, then `"finished"` or `"failed"`, and the
26
+ * database's path whenever an open in this process migrates an existing
27
+ * database. Returns
28
+ * false when a callback is already registered: the first registration wins.
29
+ *
30
+ * The callback never keeps the process alive. It runs asynchronously on the
31
+ * JS thread, so a caller that needs `finished` before exiting waits for it.
32
+ */
33
+ export declare function onStoreMigration(callback: (event: 'started' | 'finished' | 'failed', dbPath: string | null) => void): boolean
34
+ /**
35
+ * Run any outstanding schema migration now, creating the database if it
36
+ * does not exist. The same work the first open of any operation would do.
37
+ */
38
+ export declare function migrateStore(dbPath?: string | undefined | null): Promise<void>
24
39
  /**
25
40
  * Optimization profile this addon was compiled with: `release` or `debug`.
26
41
  * Performance measurements are only meaningful against `release`.
package/index.js CHANGED
@@ -310,7 +310,7 @@ if (!nativeBinding) {
310
310
  throw new Error(`Failed to load native binding`)
311
311
  }
312
312
 
313
- const { historyExport, sessionStoreCall, getSourceObservation, applySourceObservations, applySourceEvidence, nativeContractVersion, nativeBuildProfile, search, searchPage, recent, recentPage, getSession, getSessionEventsPage, getSessionToolCallsPage, getSessionUserTurnsPage, getSessionFileEditsPage, getSessionRequestsPage, getSessionUsage, stats, listSessionCatalogPage, listSessionCatalog, discoverSessions, hydrateSession, getSessionRelationships, getSessionTree, getSessionChildrenPage, sync, syncLocal, installGitHooks, linkGitCommit } = nativeBinding
313
+ const { historyExport, sessionStoreCall, getSourceObservation, applySourceObservations, applySourceEvidence, nativeContractVersion, onStoreMigration, migrateStore, nativeBuildProfile, search, searchPage, recent, recentPage, getSession, getSessionEventsPage, getSessionToolCallsPage, getSessionUserTurnsPage, getSessionFileEditsPage, getSessionRequestsPage, getSessionUsage, stats, listSessionCatalogPage, listSessionCatalog, discoverSessions, hydrateSession, getSessionRelationships, getSessionTree, getSessionChildrenPage, sync, syncLocal, installGitHooks, linkGitCommit } = nativeBinding
314
314
 
315
315
  module.exports.historyExport = historyExport
316
316
  module.exports.sessionStoreCall = sessionStoreCall
@@ -318,6 +318,8 @@ module.exports.getSourceObservation = getSourceObservation
318
318
  module.exports.applySourceObservations = applySourceObservations
319
319
  module.exports.applySourceEvidence = applySourceEvidence
320
320
  module.exports.nativeContractVersion = nativeContractVersion
321
+ module.exports.onStoreMigration = onStoreMigration
322
+ module.exports.migrateStore = migrateStore
321
323
  module.exports.nativeBuildProfile = nativeBuildProfile
322
324
  module.exports.search = search
323
325
  module.exports.searchPage = searchPage
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-hist-native-darwin-arm64",
3
- "version": "0.32.1",
3
+ "version": "0.33.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.32.1",
3
+ "version": "0.33.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.32.1",
3
+ "version": "0.33.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.32.1",
3
+ "version": "0.33.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.32.1",
3
+ "version": "0.33.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.32.1",
3
+ "version": "0.33.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.32.1",
3
+ "version": "0.33.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.32.1",
3
+ "version": "0.33.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.32.1",
48
- "ai-hist-native-darwin-x64": "0.32.1",
49
- "ai-hist-native-linux-x64-gnu": "0.32.1",
50
- "ai-hist-native-linux-arm64-gnu": "0.32.1",
51
- "ai-hist-native-linux-x64-musl": "0.32.1",
52
- "ai-hist-native-linux-arm64-musl": "0.32.1",
53
- "ai-hist-native-win32-x64-msvc": "0.32.1"
47
+ "ai-hist-native-darwin-arm64": "0.33.0",
48
+ "ai-hist-native-darwin-x64": "0.33.0",
49
+ "ai-hist-native-linux-x64-gnu": "0.33.0",
50
+ "ai-hist-native-linux-arm64-gnu": "0.33.0",
51
+ "ai-hist-native-linux-x64-musl": "0.33.0",
52
+ "ai-hist-native-linux-arm64-musl": "0.33.0",
53
+ "ai-hist-native-win32-x64-msvc": "0.33.0"
54
54
  }
55
55
  }