Skip to content

Commit 4be3c18

Browse files
committed
MeTTa TS 1.3.0
1 parent 55ec0b9 commit 4be3c18

59 files changed

Lines changed: 2665 additions & 1835 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,17 @@ website/.vitepress/dist/
1313
website/.vitepress/cache/
1414
# Local hyperon venv for the @metta-ts/py differential oracle (HYPERON_LIVE=1)
1515
.venv-hyperon/
16+
17+
# Test coverage and V8 profiler output
18+
coverage/
19+
isolate-*.log
20+
21+
# Local scratch, notes, and screenshots (never committed)
22+
/ai-notes/
23+
/ai-tmp/
24+
/ai-*.md
25+
/metta-interlingua/
26+
/scratch-review/
27+
/billboard-25d.png
28+
/browser-ide-mobile.png
29+
/readme-full.png

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
packages/core/src/prelude.ts
44
corpus/**
55
pnpm-lock.yaml
6+
ai-*.md
67

78
packages/das-client/src/gen/
89
packages/das-client/proto/

LICENSES/GPL-3.0-only.txt

Lines changed: 232 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ npm install @metta-ts/hyperon # a Python-hyperon-style class API
2222
npm install @metta-ts/edsl # a typed TypeScript eDSL for building MeTTa
2323
npm install @metta-ts/node # CLI + file import! + a parallel matcher
2424
npm install @metta-ts/browser # web entry + in-memory virtual file system
25+
npm install @metta-ts/libraries # PeTTa standard libraries (auto-loaded by node/hyperon/browser)
2526
npm install @metta-ts/py # optional Python interop: pythonia or Pyodide
2627
npm install @metta-ts/prolog # optional Prolog interop: SWI native or SWI-WASM
2728
npm install @metta-ts/grapher # visual editor + browser or Node reduction GIFs
29+
npm install @metta-ts/debug # debugger engine (trace + why); the metta-debug CLI ships in @metta-ts/node
2830
```
2931

3032
For the command-line runner, install `@metta-ts/node` globally (or use `npx`):

RELEASE_NOTES.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,67 @@
1+
# MeTTa TS 1.3.0
2+
3+
MeTTa TS 1.3.0 moves the standard libraries and the debugger engine out of the
4+
core into their own packages. The interpreter behaves exactly as in 1.2.0: the
5+
conformance oracle is byte-identical and every library returns the same results.
6+
This is a structural release, so there are no new language features.
7+
8+
## `@metta-ts/libraries`
9+
10+
The eight standard libraries (`vector`, `roman`, `combinatorics`, `patrick`,
11+
`datastructures`, `spaces`, `nars`, `pln`) moved out of `@metta-ts/core` into a
12+
new `@metta-ts/libraries` package, one folder and one `.metta` file per library,
13+
so the engine no longer ships library source it does not run.
14+
15+
`@metta-ts/node`, `@metta-ts/hyperon`, and `@metta-ts/browser` depend on the new
16+
package and register it when they load, so `(import! &self pln)` and the other
17+
library imports keep working with no change. The one behavior change is that bare
18+
`@metta-ts/core` no longer resolves the libraries on its own. A program run
19+
through `runProgram` from core alone registers them first:
20+
21+
```ts
22+
import { registerLibraries } from "@metta-ts/libraries";
23+
registerLibraries();
24+
```
25+
26+
The libraries are ports of Patrick Hammer's PeTTa `lib/lib_*.metta` set, with
27+
`roman` from Roman Treutlein's PeTTa prelude; the extraction now credits them.
28+
29+
## `@metta-ts/debug`
30+
31+
The `metta-debug` engine moved into a new `@metta-ts/debug` package. It holds the
32+
execution-trace summary behind `why` and the `explainCall`, `collectTrace`, and
33+
`summarize` helpers, depends only on `@metta-ts/core`, and uses no Node APIs, so
34+
an editor or tool can drive it directly. The `metta-debug` command still ships in
35+
`@metta-ts/node` and works exactly as before, now a thin wrapper over the shared
36+
engine.
37+
38+
## Verification
39+
40+
Checked on Linux with Node and pnpm.
41+
42+
- Build, type check, lint, and format checks pass across all twelve packages.
43+
- `pnpm test` passes: 1,218 tests across 126 files, with 38 optional live
44+
integration tests (7 files) skipped.
45+
- The oracle passes all 23 corpus files, byte-identical to 1.2.0: the extraction
46+
moves the library source without changing it.
47+
- The repository is REUSE 3.3 compliant.
48+
49+
## Packages
50+
51+
All public packages use version `1.3.0`:
52+
53+
```bash
54+
npm install @metta-ts/core@1.3.0
55+
npm install -g @metta-ts/node@1.3.0
56+
```
57+
58+
The standard libraries and the debugger engine are available on their own:
59+
60+
```bash
61+
npm install @metta-ts/libraries@1.3.0
62+
npm install @metta-ts/debug@1.3.0
63+
```
64+
165
# MeTTa TS 1.2.0
266

367
MeTTa TS 1.2.0 adds eight importable standard libraries and makes the core list

REUSE.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,38 @@ path = ["corpus/EXPECTED.txt"]
2929
precedence = "aggregate"
3030
SPDX-FileCopyrightText = "2026 TrueAGI Inc. and the hyperon-experimental contributors"
3131
SPDX-License-Identifier = "MIT"
32+
33+
# Pure MeTTa library sources are generated back into runtime strings, so they cannot carry inline headers.
34+
# They are ports of Patrick Hammer's PeTTa lib/lib_*.metta set; roman is Roman Treutlein's PeTTa prelude.
35+
[[annotations]]
36+
path = ["packages/libraries/src/roman/**"]
37+
precedence = "aggregate"
38+
SPDX-FileCopyrightText = [
39+
"2025 Roman Treutlein — PeTTa (https://github.com/trueagi-io/PeTTa)",
40+
"2026 MesTTo — MeTTa-TS adaptation",
41+
]
42+
SPDX-License-Identifier = "MIT"
43+
44+
[[annotations]]
45+
path = [
46+
"packages/libraries/src/vector/**",
47+
"packages/libraries/src/combinatorics/**",
48+
"packages/libraries/src/patrick/**",
49+
"packages/libraries/src/datastructures/**",
50+
"packages/libraries/src/spaces/**",
51+
"packages/libraries/src/nars/**",
52+
"packages/libraries/src/pln/**",
53+
]
54+
precedence = "aggregate"
55+
SPDX-FileCopyrightText = [
56+
"2025 Patrick Hammer — PeTTa (https://github.com/trueagi-io/PeTTa)",
57+
"2026 MesTTo — MeTTa-TS adaptation",
58+
]
59+
SPDX-License-Identifier = "MIT"
60+
61+
# @metta-ts/py interop parity fixtures and binary docs-site assets carry no inline header.
62+
[[annotations]]
63+
path = ["packages/py/corpus/**", "website/public/**"]
64+
precedence = "aggregate"
65+
SPDX-FileCopyrightText = "2026 MesTTo"
66+
SPDX-License-Identifier = "MIT"

examples/browser-interop/index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<!doctype html>
2+
<!--
3+
SPDX-FileCopyrightText: 2026 MesTTo
4+
5+
SPDX-License-Identifier: MIT
6+
-->
27
<html lang="en">
38
<head>
49
<meta charset="utf-8" />

packages/browser/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metta-ts/browser",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",
@@ -31,7 +31,8 @@
3131
"build": "tsup src/index.ts src/source.ts src/host.ts src/hyperpose-worker.ts --format esm --dts --clean --platform browser"
3232
},
3333
"dependencies": {
34-
"@metta-ts/core": "workspace:*"
34+
"@metta-ts/core": "workspace:*",
35+
"@metta-ts/libraries": "workspace:*"
3536
},
3637
"author": "MesTTo",
3738
"engines": {

packages/browser/src/source.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// Browser source runners. They mirror the Node source runners without file-system capability: imports come
66
// from an in-memory VFS, async forms run through the core async driver, and browser hyperpose uses Web Workers
77
// when the host exposes them.
8+
import "@metta-ts/libraries";
89
import {
910
DEFAULT_FUEL,
1011
evalSequential,

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.2.0",
3+
"version": "1.3.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)