Skip to content
bahnerPublic

About

ma-scheme actors for 間 runtime

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

136 Commits

Folders and files

Repository files navigation

lambda-ma

Lambda-ma is a small direct-DID actor world for ma-runtime and operator. It publishes Scheme actor behaviours and a bootstrap YAML that builders can fork, reshape, and extend.

The world has no identity entity. A user acts as their authenticated bare did:ma: DID. Rooms store every node, including bare DIDs, in one children map; agents, things, and containers use full DID-URLs as their child keys.

Contents

actors/root.ma          local trust anchor and runtime service directory
actors/room.ma          room presence, exits, presentation, and room policy
actors/passage.ma          direct DID traversal policy
actors/trigger.ma      trigger actor — per-DID counters and narration rules
actors/trigger.md       trigger actor protocol — per-DID counters and narration rules
kinds/                  kinds used by the generated bootstrap
scheme-actor/           Scheme layers and the Wasm actor host
Makefile                publishes sources and generates dist/lambda-ma.yaml

The zscheme repository owns the Operator-side stdlib.zscheme, runtime.zscheme, avatar.zscheme, and events.zscheme libraries. Lambda-ma owns the actor behaviours and wire contract, not duplicate client-library sources.

The bootstrap creates #root, #scheduler, and #concourse. #root :ctx? exposes the runtime service directory; only #root is required in a given runtime. A bare DID enters a room directly with :enter; the room replies with the committed DID ctx.

A client that has no room address yet sends :enter to #root, which always replies [:entrance, <room>] naming a room to enter — the configured start room by default. Root never admits anyone itself.

Claimed containers support owner-controlled locks. An owner may use :lock or :unlock; :lock <secret> additionally grants anyone with that secret access to :unlock <secret>, until the owner replaces it with another :lock call.

An exit is one top-level two-ended node; a room references it by a cosmetic local name in its own exits map. A dug passage is named separately by each room: dig down to "Top of a very large tree" back up names it down here and up in the new room, and a plain dig down names it down at both ends. dig <passage-did-url> <name> renames this room's local entry later without touching the passage or the far room. Exits use the same :lock <secret> contract as containers, addressed directly: the owner or the source room locks it, and a traveller holding the secret presents it with unlock <direction> with <secret> to open the exit (a lock is global: locked is locked, unlocked is unlocked, for everyone).

Walking a passage, go <direction>, sends :move to the room, which sends :move to the exit. The exit routes and authorises; the destination answers with a key and the traveller enters with it. Every movement carries a traverseId minted by the traveller, so a late answer to an abandoned move is ignored. A public room admits directly; a room with public: false requires a key, so nobody can jump in. One passage is one exit object: registering it in both endpoint rooms is what makes it two-way.

The normative contract is ma-lambda-ma-v1.md. Local actor APIs and bootstrap details are in REFERENCE.md; operational setup is in HOWTO.md.

Build

Kubo/IPFS and the Rust Wasm target are required:

rustup target add wasm32-unknown-unknown
make
make check

The build publishes the actor inputs with ipfs add and writes the generated bootstrap to dist/lambda-ma.yaml. Do not commit generated dist/ content.

About

ma-scheme actors for 間 runtime

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages