Node.js entry for MeTTa TS: the metta-ts command-line runner, file-based import!, and a SharedArrayBuffer worker-thread parallel matcher. Re-exports everything from @metta-ts/core.
npm install @metta-ts/node
# for the CLI on your PATH:
npm install -g @metta-ts/nodemetta-ts path/to/program.metta
# or without a global install:
npx -p @metta-ts/node metta-ts path/to/program.mettaimport { runFile, ParallelFlatMatcher } from "@metta-ts/node";
// Run a .metta file (resolves import! against the file system).
for (const { query, results } of runFile("program.metta")) {
console.log(query, results);
}ParallelFlatMatcher scans a large flat knowledge base across worker_threads over a shared token buffer. It pays off only for a large KB scanned by a non-selective query whose result set is small; a keyed query is already near-constant-time via the in-memory argument index.
MIT.