ai-hist-native 0.12.0 → 0.13.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 +106 -0
- package/index.js +4 -1
- package/npm/darwin-arm64/ai-hist-native.darwin-arm64.node +0 -0
- package/npm/darwin-arm64/package.json +1 -1
- package/npm/darwin-x64/ai-hist-native.darwin-x64.node +0 -0
- package/npm/darwin-x64/package.json +1 -1
- package/npm/linux-arm64-gnu/ai-hist-native.linux-arm64-gnu.node +0 -0
- package/npm/linux-arm64-gnu/package.json +1 -1
- package/npm/linux-arm64-musl/ai-hist-native.linux-arm64-musl.node +0 -0
- package/npm/linux-arm64-musl/package.json +1 -1
- package/npm/linux-x64-gnu/ai-hist-native.linux-x64-gnu.node +0 -0
- package/npm/linux-x64-gnu/package.json +1 -1
- package/npm/linux-x64-musl/ai-hist-native.linux-x64-musl.node +0 -0
- package/npm/linux-x64-musl/package.json +1 -1
- package/npm/win32-x64-msvc/ai-hist-native.win32-x64-msvc.node +0 -0
- package/npm/win32-x64-msvc/package.json +1 -1
- package/package.json +8 -8
package/index.d.ts
CHANGED
|
@@ -246,6 +246,8 @@ export interface DiscoveryCounters {
|
|
|
246
246
|
skippedUnchanged: number
|
|
247
247
|
filesOpened: number
|
|
248
248
|
bytesRead: number
|
|
249
|
+
providerQueries: number
|
|
250
|
+
recordsInspected: number
|
|
249
251
|
}
|
|
250
252
|
export interface SourceExemption {
|
|
251
253
|
source: string
|
|
@@ -280,6 +282,7 @@ export interface HydrationEvidence {
|
|
|
280
282
|
prompts: number
|
|
281
283
|
events: number
|
|
282
284
|
toolCalls: number
|
|
285
|
+
fileEdits: number
|
|
283
286
|
relatedSessions: number
|
|
284
287
|
}
|
|
285
288
|
export interface HydrationDiagnostic {
|
|
@@ -294,6 +297,7 @@ export interface HydrateSessionResult {
|
|
|
294
297
|
source: string
|
|
295
298
|
sessionId: string
|
|
296
299
|
status: string
|
|
300
|
+
capability: string
|
|
297
301
|
discoveryState: string
|
|
298
302
|
presence: string
|
|
299
303
|
indexedThrough: HydrationIndexedThrough
|
|
@@ -303,6 +307,108 @@ export interface HydrateSessionResult {
|
|
|
303
307
|
}
|
|
304
308
|
/** Fully index one cataloged session without enumerating unrelated sessions. */
|
|
305
309
|
export declare function hydrateSession(options: HydrateSessionOptions): Promise<HydrateSessionResult>
|
|
310
|
+
export interface NativeSessionRelationship {
|
|
311
|
+
source: string
|
|
312
|
+
parentSessionId: string
|
|
313
|
+
childSessionId?: string
|
|
314
|
+
relationship: string
|
|
315
|
+
identityStatus: string
|
|
316
|
+
childAgentType?: string
|
|
317
|
+
childAgentName?: string
|
|
318
|
+
childModel?: string
|
|
319
|
+
spawnDepth?: number
|
|
320
|
+
evidenceKind: string
|
|
321
|
+
evidenceLocator?: string
|
|
322
|
+
evidenceRef?: string
|
|
323
|
+
childHasEvents: boolean
|
|
324
|
+
spawnedAtMs?: number
|
|
325
|
+
createdMs: number
|
|
326
|
+
relationshipUid: string
|
|
327
|
+
}
|
|
328
|
+
export interface NativeRelationshipCapabilities {
|
|
329
|
+
source: string
|
|
330
|
+
stableChildIdentity: string
|
|
331
|
+
recordsAgentType: boolean
|
|
332
|
+
recordsSpawnTime: boolean
|
|
333
|
+
recordsEvidenceLocator: boolean
|
|
334
|
+
}
|
|
335
|
+
export interface NativeRelationshipDiagnostic {
|
|
336
|
+
code: string
|
|
337
|
+
message: string
|
|
338
|
+
relationshipUid?: string
|
|
339
|
+
}
|
|
340
|
+
export interface NativeSessionRelationships {
|
|
341
|
+
contractVersion: number
|
|
342
|
+
source: string
|
|
343
|
+
sessionId: string
|
|
344
|
+
asParent: Array<NativeSessionRelationship>
|
|
345
|
+
asChild: Array<NativeSessionRelationship>
|
|
346
|
+
capabilities: NativeRelationshipCapabilities
|
|
347
|
+
diagnostics: Array<NativeRelationshipDiagnostic>
|
|
348
|
+
}
|
|
349
|
+
export interface NativeSessionTreeNode {
|
|
350
|
+
source: string
|
|
351
|
+
sessionId: string
|
|
352
|
+
depth: number
|
|
353
|
+
parentSessionId?: string
|
|
354
|
+
relationship?: NativeSessionRelationship
|
|
355
|
+
childCount: number
|
|
356
|
+
hasEvents: boolean
|
|
357
|
+
truncated: boolean
|
|
358
|
+
}
|
|
359
|
+
export interface NativeSessionTree {
|
|
360
|
+
contractVersion: number
|
|
361
|
+
source: string
|
|
362
|
+
rootSessionId: string
|
|
363
|
+
nodes: Array<NativeSessionTreeNode>
|
|
364
|
+
unlinked: Array<NativeSessionRelationship>
|
|
365
|
+
capabilities: NativeRelationshipCapabilities
|
|
366
|
+
diagnostics: Array<NativeRelationshipDiagnostic>
|
|
367
|
+
truncated: boolean
|
|
368
|
+
maxDepthReached: number
|
|
369
|
+
}
|
|
370
|
+
export interface RelationshipCursor {
|
|
371
|
+
spawnedAtMs?: number
|
|
372
|
+
relationshipUid: string
|
|
373
|
+
}
|
|
374
|
+
export interface NativeSessionChildrenPage {
|
|
375
|
+
children: Array<NativeSessionRelationship>
|
|
376
|
+
nextCursor?: RelationshipCursor
|
|
377
|
+
}
|
|
378
|
+
export interface RelationshipOptions {
|
|
379
|
+
source: string
|
|
380
|
+
sessionId: string
|
|
381
|
+
dbPath?: string
|
|
382
|
+
}
|
|
383
|
+
export interface SessionTreeOptions {
|
|
384
|
+
source: string
|
|
385
|
+
sessionId: string
|
|
386
|
+
dbPath?: string
|
|
387
|
+
maxDepth?: number
|
|
388
|
+
maxNodes?: number
|
|
389
|
+
}
|
|
390
|
+
export interface SessionChildrenPageOptions {
|
|
391
|
+
source: string
|
|
392
|
+
sessionId: string
|
|
393
|
+
dbPath?: string
|
|
394
|
+
limit?: number
|
|
395
|
+
after?: RelationshipCursor
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Direct delegation relationships for one session, in both directions.
|
|
399
|
+
* A missing database is an empty result, not an error.
|
|
400
|
+
*/
|
|
401
|
+
export declare function getSessionRelationships(options: RelationshipOptions): Promise<NativeSessionRelationships>
|
|
402
|
+
/**
|
|
403
|
+
* The complete descendant delegation tree for one session: pre-order,
|
|
404
|
+
* cycle-safe, and bounded by `maxDepth` / `maxNodes`.
|
|
405
|
+
*/
|
|
406
|
+
export declare function getSessionTree(options: SessionTreeOptions): Promise<NativeSessionTree>
|
|
407
|
+
/**
|
|
408
|
+
* One bounded page of a session's direct children, in the same total order
|
|
409
|
+
* the tree traversal uses.
|
|
410
|
+
*/
|
|
411
|
+
export declare function getSessionChildrenPage(options: SessionChildrenPageOptions): Promise<NativeSessionChildrenPage>
|
|
306
412
|
export interface SyncOptions {
|
|
307
413
|
dbPath?: string
|
|
308
414
|
scope?: string
|
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 { nativeContractVersion, nativeBuildProfile, search, recent, getSession, getSessionEventsPage, getSessionToolCallsPage, getSessionFileEditsPage, stats, listSessionCatalogPage, listSessionCatalog, discoverSessions, hydrateSession, sync, syncLocal, syncAndPush } = nativeBinding
|
|
313
|
+
const { nativeContractVersion, nativeBuildProfile, search, recent, getSession, getSessionEventsPage, getSessionToolCallsPage, getSessionFileEditsPage, stats, listSessionCatalogPage, listSessionCatalog, discoverSessions, hydrateSession, getSessionRelationships, getSessionTree, getSessionChildrenPage, sync, syncLocal, syncAndPush } = nativeBinding
|
|
314
314
|
|
|
315
315
|
module.exports.nativeContractVersion = nativeContractVersion
|
|
316
316
|
module.exports.nativeBuildProfile = nativeBuildProfile
|
|
@@ -325,6 +325,9 @@ module.exports.listSessionCatalogPage = listSessionCatalogPage
|
|
|
325
325
|
module.exports.listSessionCatalog = listSessionCatalog
|
|
326
326
|
module.exports.discoverSessions = discoverSessions
|
|
327
327
|
module.exports.hydrateSession = hydrateSession
|
|
328
|
+
module.exports.getSessionRelationships = getSessionRelationships
|
|
329
|
+
module.exports.getSessionTree = getSessionTree
|
|
330
|
+
module.exports.getSessionChildrenPage = getSessionChildrenPage
|
|
328
331
|
module.exports.sync = sync
|
|
329
332
|
module.exports.syncLocal = syncLocal
|
|
330
333
|
module.exports.syncAndPush = syncAndPush
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-hist-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.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.
|
|
48
|
-
"ai-hist-native-darwin-x64": "0.
|
|
49
|
-
"ai-hist-native-linux-x64-gnu": "0.
|
|
50
|
-
"ai-hist-native-linux-arm64-gnu": "0.
|
|
51
|
-
"ai-hist-native-linux-x64-musl": "0.
|
|
52
|
-
"ai-hist-native-linux-arm64-musl": "0.
|
|
53
|
-
"ai-hist-native-win32-x64-msvc": "0.
|
|
47
|
+
"ai-hist-native-darwin-arm64": "0.13.0",
|
|
48
|
+
"ai-hist-native-darwin-x64": "0.13.0",
|
|
49
|
+
"ai-hist-native-linux-x64-gnu": "0.13.0",
|
|
50
|
+
"ai-hist-native-linux-arm64-gnu": "0.13.0",
|
|
51
|
+
"ai-hist-native-linux-x64-musl": "0.13.0",
|
|
52
|
+
"ai-hist-native-linux-arm64-musl": "0.13.0",
|
|
53
|
+
"ai-hist-native-win32-x64-msvc": "0.13.0"
|
|
54
54
|
}
|
|
55
55
|
}
|