@equationalapplications/expo-llm-wiki 4.16.0 → 4.17.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/README.md +22 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ Local-first LLM memory for Expo and React Native. Combines the core semantic sea
|
|
|
19
19
|
- **Multi-entity reads** — Search across multiple `entity_id` namespaces in one pass with `tierWeights`
|
|
20
20
|
- **Source provenance** — `WikiFact.source_type` distinguishes immutable document facts (`immutable_document`) from mutable derived/user facts. Immutable document content is protected from librarian/heal rewriting and only changed by `forget()` or re-ingest.
|
|
21
21
|
- **Seeded ontologies** — Enforce strict taxonomies or allow emergent graph relationship extraction (`useOntologyManifest`, `useSetOntologyManifest`; Strict, Emergent, or Off; defaults to Off).
|
|
22
|
-
- **React hooks** — `WikiProvider`, `useMemoryRead`, `useOntologyManifest`, `useSetOntologyManifest`, and all other hooks re-exported from `@equationalapplications/expo-llm-wiki`
|
|
22
|
+
- **React hooks** — `WikiProvider`, `useMemoryRead`, `useOntologyManifest`, `useSetOntologyManifest`, `useWikiTraversal`, and all other hooks re-exported from `@equationalapplications/expo-llm-wiki`
|
|
23
23
|
- **Full-featured memory** — Facts, tasks, events, maintenance jobs (librarian, heal, reembed, prune)
|
|
24
24
|
- **Interoperability:** Supports [Open Knowledge Format (OKF) v0.1](https://github.com/GoogleCloudPlatform/knowledge-catalog/tree/main/okf) import and export.
|
|
25
25
|
|
|
@@ -280,6 +280,27 @@ Global defaults and `seedManifests` bootstrap are configured at construction tim
|
|
|
280
280
|
|
|
281
281
|
`useSetOntologyManifest` does not automatically refresh `useOntologyManifest` — call `refetch()` after a successful `execute()`, same as `useWikiWrite` + `useMemoryRead`.
|
|
282
282
|
|
|
283
|
+
### `useWikiTraversal(entityId, options)`
|
|
284
|
+
|
|
285
|
+
Reactive read — fetches on mount and whenever `entityId` or `options` change. Walks the knowledge graph N hops outward from a fact (`options.sourceId`) using edges written by `runLibrarian()`/`ingestDocument()`'s Seeded Ontology extraction pass:
|
|
286
|
+
|
|
287
|
+
```typescript
|
|
288
|
+
import { useWikiTraversal, formatGraphContext } from '@equationalapplications/expo-llm-wiki';
|
|
289
|
+
|
|
290
|
+
const { nodes, edges, isPending, error, refetch } = useWikiTraversal('user-123', {
|
|
291
|
+
sourceId: 'fact_42',
|
|
292
|
+
maxDepth: 2,
|
|
293
|
+
direction: 'both',
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
const promptContext = formatGraphContext({ nodes, edges });
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
- `maxDepth` is clamped to `[1, 3]` regardless of input.
|
|
300
|
+
- `edgeTypes: []` (explicit empty array) matches nothing; omitting it matches all edge types.
|
|
301
|
+
- Defaults (`maxTraversalNodes`, `minTraversalConfidence`, `traversalDirection`, `excludeSourceTypes`) can be set globally via `createWiki(..., { config: { maxTraversalNodes: 20, ... } })` and overridden per-call.
|
|
302
|
+
- `formatGraphContext()` is a pure function — call it with the hook's `{ nodes, edges }` to get a dense text block suitable for prompt injection.
|
|
303
|
+
|
|
283
304
|
## Component Lifecycle
|
|
284
305
|
|
|
285
306
|
```mermaid
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equationalapplications/expo-llm-wiki",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.17.0",
|
|
4
4
|
"description": "Local-first LLM memory for Expo and React Native. Combines the core semantic search and extraction engine with expo-sqlite and ready-to-use React hooks.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"registry": "https://registry.npmjs.org"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@equationalapplications/
|
|
59
|
-
"@equationalapplications/
|
|
58
|
+
"@equationalapplications/core-llm-wiki": "4.17.0",
|
|
59
|
+
"@equationalapplications/react-llm-wiki": "4.17.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"expo-sqlite": "^14.0.0 || ^15.0.0 || ^55.0.0 || ^56.0.0",
|