@vpxa/aikit 0.1.174 → 0.1.176

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 (39) hide show
  1. package/package.json +4 -3
  2. package/packages/blocks-core/dist/index.d.ts +2 -1
  3. package/packages/blocks-core/dist/index.js +1 -1
  4. package/packages/cli/dist/index.js +13 -17
  5. package/packages/cli/dist/init-ieEwteQl.js +7 -0
  6. package/packages/cli/dist/{scaffold-BB6OrTuA.js → scaffold-BdUnq1xy.js} +1 -1
  7. package/packages/cli/dist/{templates-D-eA4QVK.js → templates-Cg0roqvb.js} +11 -7
  8. package/packages/core/dist/index.d.ts +29 -1
  9. package/packages/dashboard/dist/assets/{index-ehoWAjDs.js → index-4HQiq-qo.js} +2 -2
  10. package/packages/dashboard/dist/index.html +1 -1
  11. package/packages/present/dist/index.html +45 -45
  12. package/packages/server/dist/auth-BfqgawfR.js +1 -0
  13. package/packages/server/dist/config-DAnAxrUW.js +1 -0
  14. package/packages/server/dist/{curated-manager-BkSgtNC2.js → curated-manager-BnP6VqvL.js} +4 -4
  15. package/packages/server/dist/index.js +1 -1
  16. package/packages/server/dist/proxy.d.ts +32 -0
  17. package/packages/server/dist/proxy.js +4 -0
  18. package/packages/server/dist/server-B0gtRiNa.js +2909 -0
  19. package/packages/server/dist/supersession-DJQGXMWm.js +2 -0
  20. package/packages/settings-ui/dist/assets/{index-DSTxXokO.js → index-DLcLvASh.js} +2 -2
  21. package/packages/store/dist/index.d.ts +135 -1
  22. package/packages/store/dist/index.js +447 -12
  23. package/packages/tools/dist/index.d.ts +72 -30
  24. package/packages/tools/dist/index.js +72 -73
  25. package/{scaffold/general → packages}/viewers/README.md +1 -1
  26. package/scaffold/dist/definitions/prompts.mjs +1 -1
  27. package/scaffold/dist/definitions/protocols.mjs +2 -0
  28. package/scaffold/dist/definitions/skills/aikit.mjs +1 -1
  29. package/scaffold/dist/definitions/skills/c4-architecture.mjs +1 -1
  30. package/scaffold/dist/definitions/skills/docs.mjs +1 -1
  31. package/scaffold/dist/definitions/tools.mjs +1 -1
  32. package/packages/cli/dist/init-BVU1RVy5.js +0 -7
  33. package/packages/server/dist/config-Dsu2Kd3U.js +0 -1
  34. package/packages/server/dist/server-CqEB0MaC.js +0 -2901
  35. /package/packages/server/dist/{dashboard-static-BfIe0Si1.js → dashboard-static-CnXafYTs.js} +0 -0
  36. /package/packages/server/dist/{routes-gbC5Wmr9.js → routes-CR3fI-HJ.js} +0 -0
  37. /package/packages/server/dist/{settings-static-BosGZSPf.js → settings-static-BkVLqWOr.js} +0 -0
  38. /package/packages/server/dist/{version-check-Bj07vc5x.js → version-check-BgHzxxCW.js} +0 -0
  39. /package/packages/store/dist/{lance-store-BIP1LEiS.js → lance-store-BRKcJXVO.js} +0 -0
@@ -1,4 +1,5 @@
1
1
  import { ContentType, IndexStats, KnowledgeOrigin, KnowledgeRecord, SearchResult, SourceType } from "../../core/dist/index.js";
2
+ import BetterSqlite3 from "better-sqlite3";
2
3
 
3
4
  //#region packages/store/src/graph-store.interface.d.ts
4
5
  /**
@@ -220,6 +221,16 @@ declare function createSqliteAdapter(dbPath: string): Promise<ISqliteAdapter>;
220
221
  */
221
222
  declare function createSqlJsAdapter(dbPath: string): Promise<ISqliteAdapter>;
222
223
  //#endregion
224
+ //#region packages/store/src/migrations.d.ts
225
+ type MigrationDb = Pick<ISqliteAdapter, 'exec' | 'queryAll' | 'run'>;
226
+ interface Migration {
227
+ version: number;
228
+ name: string;
229
+ up: (db: MigrationDb) => void;
230
+ }
231
+ declare function runMigrations(db: MigrationDb, migrations: readonly Migration[]): void;
232
+ declare const allMigrations: readonly Migration[];
233
+ //#endregion
223
234
  //#region packages/store/src/sqlite-graph-store.d.ts
224
235
  declare class SqliteGraphStore implements IGraphStore {
225
236
  private adapter;
@@ -377,6 +388,7 @@ declare class SqliteVecStore implements IKnowledgeStore {
377
388
  private _onCloseHooks;
378
389
  constructor(options?: SqliteVecStoreOptions);
379
390
  initialize(): Promise<void>;
391
+ private configureConnectionPragmas;
380
392
  /**
381
393
  * Diagnostics for the status tool. Returns runtime info about the underlying
382
394
  * adapter and DB file (read-only; safe to call after initialize()).
@@ -438,6 +450,128 @@ declare class SqliteVecStore implements IKnowledgeStore {
438
450
  private fromRow;
439
451
  }
440
452
  //#endregion
453
+ //#region packages/store/src/state-store.d.ts
454
+ interface MemoryMeta {
455
+ entryId: string;
456
+ tier: string;
457
+ retentionScore: number;
458
+ accessCount: number;
459
+ lastAccessedAt: string | null;
460
+ createdAt: string;
461
+ promotedAt: string | null;
462
+ supersededBy: string | null;
463
+ confidence: number;
464
+ }
465
+ interface MemoryMetaListOptions {
466
+ tier?: string;
467
+ belowScore?: number;
468
+ limit?: number;
469
+ }
470
+ interface StateStore {
471
+ stashGet(key: string): string | undefined;
472
+ stashSet(key: string, value: string): void;
473
+ stashList(): Array<{
474
+ key: string;
475
+ value: string;
476
+ updatedAt: string;
477
+ }>;
478
+ stashDelete(key: string): boolean;
479
+ stashClear(): void;
480
+ signalPost(workspace: string, key: string, value: string, agent?: string, ttlSeconds?: number): number;
481
+ signalGet(workspace: string, key: string): Array<{
482
+ id: number;
483
+ value: string;
484
+ agent?: string;
485
+ createdAt: string;
486
+ expiresAt: string;
487
+ }>;
488
+ signalList(workspace: string): Array<{
489
+ id: number;
490
+ key: string;
491
+ value: string;
492
+ agent?: string;
493
+ createdAt: string;
494
+ }>;
495
+ signalClear(workspace: string, key?: string): number;
496
+ signalCleanExpired(): number;
497
+ leaseAcquire(resource: string, holder: string, workspace: string, intent?: string, ttlMinutes?: number): boolean;
498
+ leaseRelease(resource: string, holder: string, workspace: string): boolean;
499
+ leaseGet(resource: string, workspace: string): {
500
+ resource: string;
501
+ holder: string;
502
+ intent?: string;
503
+ workspace: string;
504
+ acquiredAt: string;
505
+ expiresAt: string;
506
+ } | undefined;
507
+ leaseList(workspace: string): Array<{
508
+ resource: string;
509
+ holder: string;
510
+ intent?: string;
511
+ acquiredAt: string;
512
+ expiresAt: string;
513
+ }>;
514
+ leaseCleanExpired(): number;
515
+ sessionCreate(sessionId: string, metadata?: Record<string, unknown>): void;
516
+ sessionTouch(sessionId: string): void;
517
+ sessionGet(sessionId: string): {
518
+ sessionId: string;
519
+ createdAt: string;
520
+ lastActivity: string;
521
+ metadata?: string;
522
+ } | undefined;
523
+ sessionList(): Array<{
524
+ sessionId: string;
525
+ createdAt: string;
526
+ lastActivity: string;
527
+ }>;
528
+ sessionDelete(sessionId: string): boolean;
529
+ sessionDeleteStale(maxInactiveMinutes: number): number;
530
+ checkpointSave(id: string, label: string, data: string, notes?: string): void;
531
+ checkpointLoad(id: string): {
532
+ id: string;
533
+ label: string;
534
+ data: string;
535
+ notes?: string;
536
+ createdAt: string;
537
+ } | undefined;
538
+ checkpointList(label?: string, limit?: number): Array<{
539
+ id: string;
540
+ label: string;
541
+ createdAt: string;
542
+ notes?: string;
543
+ }>;
544
+ checkpointLatest(label?: string): {
545
+ id: string;
546
+ label: string;
547
+ data: string;
548
+ notes?: string;
549
+ createdAt: string;
550
+ } | undefined;
551
+ checkpointDelete(id: string): boolean;
552
+ checkpointDiff(fromId: string, toId: string): {
553
+ from: string;
554
+ to: string;
555
+ } | undefined;
556
+ checkpointHistory(label?: string, limit?: number): Array<{
557
+ id: string;
558
+ label: string;
559
+ createdAt: string;
560
+ notes?: string;
561
+ }>;
562
+ checkpointGc(keepLast?: number, maxAgeDays?: number): number;
563
+ memoryMetaCreate(entryId: string, tier?: string): void;
564
+ memoryMetaGet(entryId: string): MemoryMeta | undefined;
565
+ memoryMetaTouch(entryId: string): void;
566
+ memoryMetaUpdateScore(entryId: string, score: number): void;
567
+ memoryMetaUpdateConfidence(entryId: string, confidence: number): void;
568
+ memoryMetaUpdateTier(entryId: string, tier: string): void;
569
+ memoryMetaSetSuperseded(entryId: string, supersededBy: string): void;
570
+ memoryMetaList(options?: MemoryMetaListOptions): MemoryMeta[];
571
+ }
572
+ declare function createStateStore(db: BetterSqlite3.Database): StateStore;
573
+ declare function createStateStore(db: ISqliteAdapter): StateStore;
574
+ //#endregion
441
575
  //#region packages/store/src/store-factory.d.ts
442
576
  type StoreBackend = 'lancedb' | 'sqlite-vec';
443
577
  interface StoreConfig {
@@ -451,4 +585,4 @@ interface StoreConfig {
451
585
  }
452
586
  declare function createStore(config: StoreConfig): Promise<IKnowledgeStore>;
453
587
  //#endregion
454
- export { type DepthGroupedResult, type GraphEdge, type GraphNode, type GraphStats, type GraphTraversalOptions, type GraphTraversalResult, type GraphValidationResult, type IGraphStore, type IKnowledgeStore, type ISqliteAdapter, type ProcessInfo, type SearchOptions, type SqliteAdapterType, SqliteGraphStore, SqliteVecStore, type SqliteVecStoreOptions, type StoreBackend, type StoreConfig, type Symbol360, createSqlJsAdapter, createSqliteAdapter, createStore };
588
+ export { type DepthGroupedResult, type GraphEdge, type GraphNode, type GraphStats, type GraphTraversalOptions, type GraphTraversalResult, type GraphValidationResult, type IGraphStore, type IKnowledgeStore, type ISqliteAdapter, type MemoryMeta, type Migration, type MigrationDb, type ProcessInfo, type SearchOptions, type SqliteAdapterType, SqliteGraphStore, SqliteVecStore, type SqliteVecStoreOptions, type StateStore, type StoreBackend, type StoreConfig, type Symbol360, allMigrations, createSqlJsAdapter, createSqliteAdapter, createStateStore, createStore, runMigrations };