Skip to content

Commit 5870b3e

Browse files
committed
MeTTa TS 1.4.0
1 parent af07a10 commit 5870b3e

38 files changed

Lines changed: 1523 additions & 482 deletions

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# MeTTa TS
22

3-
A pure-TypeScript implementation of **MeTTa** (Meta Type Talk), the OpenCog Hyperon language. The core engine runs anywhere TypeScript runs: the browser, Node, Deno, Bun, edge and serverless functions, and inside TypeScript-based AI agents. No native addons, no required WASM, no Rust.
3+
MeTTa TS is a metagraph rewriting database, written in pure TypeScript. You store facts in a space, query them by pattern, and compute by writing rewrite rules over the same facts, all with the same pattern-matching mechanism.
4+
5+
A metagraph is the most expressive of the graph data models. A graph joins two nodes with an edge, a hypergraph joins any number of nodes, and a metagraph lets links contain other links, so a fact can be about another fact: `(Believes Tom (parent Bob Ann))` is a statement whose subject is itself a statement. Rules live in the space as atoms too, so you compute by rewriting the data itself, and a program can query and rewrite its own rules.
6+
7+
The core engine runs anywhere TypeScript runs: the browser, Node, Deno, Bun, edge and serverless functions, and inside TypeScript-based AI agents. No native addons, no required WASM, no Rust. MeTTa (Meta Type Talk) is the language of OpenCog Hyperon, and MeTTa TS is a faithful port of its interpreter, but you do not need to know Hyperon to use it.
48

59
<p align="center">
610
<img src="website/public/recursion.gif" width="840" alt="The factorial (fact 5) reducing to 120, played side by side as a node graph and as nested blocks in MeTTaGrapher" />

RELEASE_NOTES.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
# MeTTa TS 1.4.0
2+
3+
MeTTa TS 1.4.0 replaces the two command-line tools with one `metta` command and
4+
documents every package.
5+
6+
## The metta CLI
7+
8+
`@metta-ts/node` now installs a single `metta` command with subcommands:
9+
10+
- `metta run <file.metta>` runs a program, and `metta <file.metta>` is shorthand for it.
11+
- `metta check <file.metta>` runs the static analyzer.
12+
- `metta debug (--file <p> | --source '<m>') <why|eval|run>` is the engine debugger.
13+
- `metta graph <file.metta> -o out.gif` renders the reduction as an animated GIF through
14+
`@metta-ts/grapher`, which is loaded only when you use the command.
15+
16+
The earlier `metta-ts` and `metta-debug` commands stay as aliases, so existing scripts keep
17+
working. Note that the Python Hyperon package also installs a `metta` executable, so if both
18+
are on your PATH they shadow each other; the `metta-ts` alias reaches this runner.
19+
20+
## Documentation
21+
22+
The API reference now covers all twelve packages, with new pages for `@metta-ts/py`,
23+
`@metta-ts/prolog`, `@metta-ts/libraries`, `@metta-ts/debug`, and the Distributed AtomSpace
24+
packages. The debugger and traces page moved out of the visual-editor section into a Tools
25+
section next to the CLI and MeTTaGrapher.
26+
27+
The README and the repository description now open by saying what MeTTa TS is, a metagraph
28+
rewriting database in pure TypeScript, instead of assuming you already know OpenCog Hyperon.
29+
30+
## Verification
31+
32+
`pnpm -r build`, `pnpm typecheck`, `pnpm lint`, and `pnpm format:check` pass. The test suite
33+
runs 1228 tests plus the 23-file byte-identical oracle, and the documentation site builds with
34+
no dead links. The `metta-ts` and `metta-debug` aliases are covered by tests asserting they
35+
stay byte-identical to `metta run` and `metta debug`.
36+
137
# MeTTa TS 1.3.1
238

339
MeTTa TS 1.3.1 fixes the type checker's arity check for overloaded operations. An

packages/browser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/browser",
3-
"version": "1.3.1",
3+
"version": "1.4.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/core",
3-
"version": "1.3.1",
3+
"version": "1.4.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

packages/das-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/das-client",
3-
"version": "1.3.1",
3+
"version": "1.4.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

packages/das-gateway/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/das-gateway",
3-
"version": "1.3.1",
3+
"version": "1.4.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

packages/debug/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/debug",
3-
"version": "1.3.1",
3+
"version": "1.4.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

packages/edsl/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/edsl",
3-
"version": "1.3.1",
3+
"version": "1.4.0",
44
"author": "MesTTo",
55
"license": "MIT",
66
"description": "Ergonomic, typed TypeScript eDSL for MeTTa: term builders, tagged templates, host-interop builders, and auto-grounding of TypeScript values.",

packages/grapher/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/grapher",
3-
"version": "1.3.1",
3+
"version": "1.4.0",
44
"author": "MesTTo",
55
"license": "MIT",
66
"description": "MeTTa visual editor and reduction renderer for browser and Node.js, with node-graph and nested-block views.",

packages/hyperon/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/hyperon",
3-
"version": "1.3.1",
3+
"version": "1.4.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)