Skip to content

Commit 617a987

Browse files
committed
MeTTa TS 1.2.0-experimental.0
1 parent 57a8331 commit 617a987

12 files changed

Lines changed: 111 additions & 11 deletions

File tree

.github/workflows/release.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,23 @@ jobs:
2323
cache: pnpm
2424
- run: pnpm install --frozen-lockfile
2525
- run: pnpm -r build
26-
- run: pnpm -r --filter "./packages/*" publish --access public --provenance --no-git-checks
26+
# Route the npm dist-tag by the semver prerelease identifier: stable versions stay on
27+
# `latest`, `-experimental.*` versions publish to the opt-in `experimental` channel, and
28+
# any other prerelease lands on `next`. Without an explicit tag npm would point `latest`
29+
# at a prerelease.
30+
- name: Resolve npm dist-tag
31+
id: channel
32+
run: |
33+
VERSION=$(node -p "require('./packages/core/package.json').version")
34+
case "$VERSION" in
35+
*-experimental*) TAG=experimental ;;
36+
*-*) TAG=next ;;
37+
*) TAG=latest ;;
38+
esac
39+
echo "Publishing $VERSION to dist-tag $TAG"
40+
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
41+
- run: >
42+
pnpm -r --filter "./packages/*" publish --access public --provenance
43+
--no-git-checks --tag ${{ steps.channel.outputs.tag }}
2744
env:
2845
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

RELEASE_NOTES.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,86 @@
1+
# MeTTa TS 1.2.0-experimental.0
2+
3+
This is an experimental prerelease on the `experimental` npm dist-tag, not the
4+
default `latest`. It carries the in-progress Minimal MeTTa runtime and the
5+
Grounded V2 operation protocol for early adopters; the surface may still change
6+
before 1.2.0. Install it explicitly:
7+
8+
```bash
9+
npm install @metta-ts/core@experimental
10+
npm install @metta-ts/hyperon@experimental
11+
```
12+
13+
`npm install @metta-ts/core` continues to resolve the stable 1.1.6 release.
14+
15+
## Grounded operation V2 and streaming operations
16+
17+
Grounded operations can now return an owned, pull-based answer stream with
18+
per-answer binding deltas and effects, rather than an eagerly collected array.
19+
The runner exposes `MeTTa.registerStreamingOperation` and
20+
`registerAsyncStreamingOperation`: the function returns an iterable (or async
21+
iterable) of answers and the evaluator pulls one at a time, so a consumer such as
22+
`once` stops the producer instead of draining it. Each answer may bind the call's
23+
argument variables and attach effects applied only on that answer's branch. The
24+
low-level `registerGroundedOperationV2` protocol underneath owns and closes every
25+
cursor exactly once, bounds each pull with a finite allowance, and rejects foreign
26+
variables in answers. This is MeTTa TS's implementation of the Minimal MeTTa
27+
document's unimplemented "grounded operations returning bindings" future work; it
28+
has no upstream parity oracle, so its ownership, retention, and binding-delta
29+
behavior are pinned by an executable law suite and a protocol fuzzer.
30+
31+
## Cursor streaming through interpreted evaluation
32+
33+
A `metta`/`metta-thread` call under a cooperative cursor and interpreted rule
34+
alternatives now stream one answer per pull, so `once` over a large interpreted
35+
producer performs one step and closes the tail. A single-answer chain keeps its
36+
direct tail-call path; a producer fault after one delivered answer still delivers
37+
that answer first.
38+
39+
## Minimal MeTTa runtime foundations
40+
41+
Typed runtime foundations for the minimal machine: scoped variables and canonical
42+
persistent binding frames, binding capture and replay, coherent evaluation
43+
contexts with logical snapshots, explicit Minimal MeTTa control semantics,
44+
resumable search cursors with owned concurrency, and persistent branch worlds with
45+
bounded effect replay.
46+
47+
## eval.ts modularization
48+
49+
The core evaluator file was split from about 15,000 lines into a 4,400-line core
50+
plus sixteen leaf-ward modules (machine types, terms, environment, world,
51+
specializer, type views, generator driver, query, concurrent merge, tabling,
52+
cursor constructors, world mutation, matching, fast paths, scheduler glue, and the
53+
eval operation), with the public API preserved through the facade. The change is
54+
mechanical and behavior-preserving.
55+
56+
## Correctness: substitution resolves to a fixpoint
57+
58+
A specialized forward chainer emulating backward chaining on propositional
59+
calculus returned an extra spurious proof (GitHub issue #2). Applying a binding
60+
set as a substitution was single-pass, so a variable whose value mentioned another
61+
still-bound variable left that inner variable unresolved; a later scope
62+
restriction then dropped its binding and lost the derived constraint. `instantiate`
63+
now resolves to a fixpoint. The query returns the single proof that Hyperon 0.2.10
64+
and PeTTa (SWI-Prolog) both produce. The resolution stays bounded and scalable: a
65+
variable chain is followed iteratively (a four-million-link chain resolves rather
66+
than overflowing the stack), a name-to-value index makes a long chain linear rather
67+
than quadratic, binding cycles truncate deterministically, and a shared value DAG
68+
is resolved once by object identity, so a term with an exponential number of paths
69+
resolves in constant time with bounded memory.
70+
71+
## Verification
72+
73+
- Full test suite: 147 files pass, 1,849 tests pass, 38 optional live integration
74+
tests skipped. The Grounded V2 protocol adds an executable law suite, a scripted
75+
cursor fuzzer, and a disjoint-set binding oracle. The substitution fix adds
76+
fixpoint and backward-chaining regression tests, each shown to fail on the
77+
single-pass version.
78+
- Core/ST conformance is unchanged from 1.1.6: 431 passed, 77 established
79+
failures, 60 manifest expected failures, byte-identical failure set.
80+
- Performance is neutral against 1.1.6 on the nondeterminism benchmark suite;
81+
the substitution change adds asymptotic headroom (linear chains, DAG sharing)
82+
with no measured regression.
83+
184
# MeTTa TS 1.1.6
285

386
MeTTa TS 1.1.6 reduces the cold and loaded cost of compiled nondeterministic

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

packages/node/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/node",
3-
"version": "1.1.6",
3+
"version": "1.2.0-experimental.0",
44
"license": "MIT",
55
"type": "module",
66
"main": "./dist/index.js",

0 commit comments

Comments
 (0)