feat(ts): add Nowledge Mem resource - #159
Draft
wey-gu wants to merge 3 commits into
Draft
Conversation
wey-gu
force-pushed
the
feat/nowledge-mem-resource
branch
from
June 4, 2026 09:34
ed70617 to
3458d30
Compare
Contributor
|
I am doing some refactoring for the ts. Will take a look at this soon :) |
wey-gu
force-pushed
the
feat/nowledge-mem-resource
branch
from
June 6, 2026 05:27
3458d30 to
cb8dcaf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a read-only TypeScript resource for Nowledge Mem backed directly by the Nowledge FS API (
/fs/*). Nowledge FS is a knowledge tree, not a memory-note folder: a Mirage workspace can mount it at/memand browse memories, threads, parsed sources, wiki pages, guidance context, Working Memory, feed events, artifacts, and skills through familiar shell-shaped commands.ls,cat, andstatfor tree discovery and targeted reads;lsandstatnow delegate to Mirage's shared generic helpers.cat --line/--linesfor small evidence windows from large thread/source files.findfor Nowledge metadata filters.grepfor exact text search across rendered content.recallfor semantic recall through Nowledge Mem.This is intentionally API-only. It does not shell out to the
nmemCLI and does not require the CLI to be installed.Notes
main./fs/*API is release-stable.Validation
Validated with Homebrew
node@22(v22.22.3) because local Node 26 rejects Mirage's--experimental-wasm-jspitest flag.pnpm --dir typescript --filter @struktoai/mirage-core exec vitest run src/resource/nowledge_mem/nowledge_mem.test.ts src/types.test.tspnpm --dir typescript --filter @struktoai/mirage-core typecheckpnpm --dir typescript --filter @struktoai/mirage-node exec vitest run src/resource/registry.test.tspnpm --dir typescript --filter @struktoai/mirage-browser exec vitest run src/resource/registry.test.tspnpm --dir typescript --filter @struktoai/mirage-core buildpnpm --dir typescript --filter @struktoai/mirage-node buildpnpm --dir typescript --filter @struktoai/mirage-browser buildgit diff --checkhttp://127.0.0.1:14242through built@struktoai/mirage-nodeoutput:ls /mem,stat /mem/context, andrecall "Nowledge Mem" --in /mem/memories -k 2.