@equationalapplications/expo-llm-wiki 2.1.0 → 2.2.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.
@@ -4,6 +4,7 @@ interface WikiConfig {
4
4
  tablePrefix?: string;
5
5
  maxFtsResults?: number;
6
6
  pruneEventsAfter?: number;
7
+ pruneRetainSoftDeletedFor?: number;
7
8
  autoLibrarianThreshold?: number;
8
9
  autoHealThreshold?: number;
9
10
  orphanAfterDays?: number | null;
@@ -101,15 +102,28 @@ interface FormattedMemoryDump {
101
102
  content: string;
102
103
  }>;
103
104
  }
105
+ interface FormatContextOptions {
106
+ format?: 'markdown' | 'plain';
107
+ maxFacts?: number;
108
+ maxTasks?: number;
109
+ maxEvents?: number;
110
+ includeConfidence?: boolean;
111
+ includeTags?: boolean;
112
+ factWeights?: {
113
+ confidence?: number;
114
+ accessCount?: number;
115
+ recency?: number;
116
+ };
117
+ }
104
118
  interface EntityStatus {
105
119
  ingesting: boolean;
106
120
  librarian: boolean;
107
121
  heal: boolean;
108
122
  }
109
123
  declare class WikiBusyError extends Error {
110
- readonly operation: 'ingest' | 'librarian' | 'heal';
124
+ readonly operation: 'ingest' | 'librarian' | 'heal' | 'prune';
111
125
  readonly entityId: string;
112
- constructor(operation: 'ingest' | 'librarian' | 'heal', entityId: string);
126
+ constructor(operation: 'ingest' | 'librarian' | 'heal' | 'prune', entityId: string);
113
127
  }
114
128
 
115
129
  declare class WikiMemory {
@@ -163,4 +177,4 @@ declare class WikiMemory {
163
177
  }>;
164
178
  }
165
179
 
166
- export { type EntityStatus as E, type FormattedMemoryDump as F, type LLMProvider as L, type MemoryDump as M, type WikiOptions as W, WikiMemory as a, type ExtractedFact as b, type ExtractedTask as c, type MemoryBundle as d, WikiBusyError as e, type WikiCheckpoint as f, type WikiConfig as g, type WikiEvent as h, type WikiFact as i, type WikiTask as j };
180
+ export { type EntityStatus as E, type FormattedMemoryDump as F, type LLMProvider as L, type MemoryDump as M, type WikiOptions as W, WikiMemory as a, type ExtractedFact as b, type ExtractedTask as c, type FormatContextOptions as d, type MemoryBundle as e, WikiBusyError as f, type WikiCheckpoint as g, type WikiConfig as h, type WikiEvent as i, type WikiFact as j, type WikiTask as k };
@@ -4,6 +4,7 @@ interface WikiConfig {
4
4
  tablePrefix?: string;
5
5
  maxFtsResults?: number;
6
6
  pruneEventsAfter?: number;
7
+ pruneRetainSoftDeletedFor?: number;
7
8
  autoLibrarianThreshold?: number;
8
9
  autoHealThreshold?: number;
9
10
  orphanAfterDays?: number | null;
@@ -101,15 +102,28 @@ interface FormattedMemoryDump {
101
102
  content: string;
102
103
  }>;
103
104
  }
105
+ interface FormatContextOptions {
106
+ format?: 'markdown' | 'plain';
107
+ maxFacts?: number;
108
+ maxTasks?: number;
109
+ maxEvents?: number;
110
+ includeConfidence?: boolean;
111
+ includeTags?: boolean;
112
+ factWeights?: {
113
+ confidence?: number;
114
+ accessCount?: number;
115
+ recency?: number;
116
+ };
117
+ }
104
118
  interface EntityStatus {
105
119
  ingesting: boolean;
106
120
  librarian: boolean;
107
121
  heal: boolean;
108
122
  }
109
123
  declare class WikiBusyError extends Error {
110
- readonly operation: 'ingest' | 'librarian' | 'heal';
124
+ readonly operation: 'ingest' | 'librarian' | 'heal' | 'prune';
111
125
  readonly entityId: string;
112
- constructor(operation: 'ingest' | 'librarian' | 'heal', entityId: string);
126
+ constructor(operation: 'ingest' | 'librarian' | 'heal' | 'prune', entityId: string);
113
127
  }
114
128
 
115
129
  declare class WikiMemory {
@@ -163,4 +177,4 @@ declare class WikiMemory {
163
177
  }>;
164
178
  }
165
179
 
166
- export { type EntityStatus as E, type FormattedMemoryDump as F, type LLMProvider as L, type MemoryDump as M, type WikiOptions as W, WikiMemory as a, type ExtractedFact as b, type ExtractedTask as c, type MemoryBundle as d, WikiBusyError as e, type WikiCheckpoint as f, type WikiConfig as g, type WikiEvent as h, type WikiFact as i, type WikiTask as j };
180
+ export { type EntityStatus as E, type FormattedMemoryDump as F, type LLMProvider as L, type MemoryDump as M, type WikiOptions as W, WikiMemory as a, type ExtractedFact as b, type ExtractedTask as c, type FormatContextOptions as d, type MemoryBundle as e, WikiBusyError as f, type WikiCheckpoint as g, type WikiConfig as h, type WikiEvent as i, type WikiFact as j, type WikiTask as k };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as SQLite from 'expo-sqlite';
2
- import { M as MemoryDump, F as FormattedMemoryDump, W as WikiOptions, a as WikiMemory } from './WikiMemory-BDVn-TJf.mjs';
3
- export { E as EntityStatus, b as ExtractedFact, c as ExtractedTask, L as LLMProvider, d as MemoryBundle, e as WikiBusyError, f as WikiCheckpoint, g as WikiConfig, h as WikiEvent, i as WikiFact, j as WikiTask } from './WikiMemory-BDVn-TJf.mjs';
2
+ import { M as MemoryDump, F as FormattedMemoryDump, W as WikiOptions, a as WikiMemory } from './WikiMemory-CjlQ68X0.mjs';
3
+ export { E as EntityStatus, b as ExtractedFact, c as ExtractedTask, d as FormatContextOptions, L as LLMProvider, e as MemoryBundle, f as WikiBusyError, g as WikiCheckpoint, h as WikiConfig, i as WikiEvent, j as WikiFact, k as WikiTask } from './WikiMemory-CjlQ68X0.mjs';
4
4
 
5
5
  declare function formatMemoryDump(dump: MemoryDump): FormattedMemoryDump;
6
6
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as SQLite from 'expo-sqlite';
2
- import { M as MemoryDump, F as FormattedMemoryDump, W as WikiOptions, a as WikiMemory } from './WikiMemory-BDVn-TJf.js';
3
- export { E as EntityStatus, b as ExtractedFact, c as ExtractedTask, L as LLMProvider, d as MemoryBundle, e as WikiBusyError, f as WikiCheckpoint, g as WikiConfig, h as WikiEvent, i as WikiFact, j as WikiTask } from './WikiMemory-BDVn-TJf.js';
2
+ import { M as MemoryDump, F as FormattedMemoryDump, W as WikiOptions, a as WikiMemory } from './WikiMemory-CjlQ68X0.js';
3
+ export { E as EntityStatus, b as ExtractedFact, c as ExtractedTask, d as FormatContextOptions, L as LLMProvider, e as MemoryBundle, f as WikiBusyError, g as WikiCheckpoint, h as WikiConfig, i as WikiEvent, j as WikiFact, k as WikiTask } from './WikiMemory-CjlQ68X0.js';
4
4
 
5
5
  declare function formatMemoryDump(dump: MemoryDump): FormattedMemoryDump;
6
6
 
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { a as WikiMemory, d as MemoryBundle, h as WikiEvent, M as MemoryDump } from '../WikiMemory-BDVn-TJf.mjs';
3
+ import { a as WikiMemory, e as MemoryBundle, i as WikiEvent, M as MemoryDump } from '../WikiMemory-CjlQ68X0.mjs';
4
4
  import 'expo-sqlite';
5
5
 
6
6
  declare function WikiProvider({ wiki, children }: {
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { a as WikiMemory, d as MemoryBundle, h as WikiEvent, M as MemoryDump } from '../WikiMemory-BDVn-TJf.js';
3
+ import { a as WikiMemory, e as MemoryBundle, i as WikiEvent, M as MemoryDump } from '../WikiMemory-CjlQ68X0.js';
4
4
  import 'expo-sqlite';
5
5
 
6
6
  declare function WikiProvider({ wiki, children }: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equationalapplications/expo-llm-wiki",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "A standalone, general-purpose React Native/Expo package for LLM Wiki Memory.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",