Skip to content

Rosetta Stone Protocol v0.1.0

Latest

Choose a tag to compare

@WGlynn WGlynn released this 24 May 22:57

Rosetta Stone Protocol v0.1.0 — Initial release

Universal cross-domain concept translation as a public substrate. Extracted from the working VibeSwap frontend /rosetta route into a standalone, installable monorepo.

What ships

Package Description
@rosetta/engine Pure ESM translation engine. ~3200 lines. LEXICONS + EXTENDED_UNIVERSAL_CONCEPTS + translate / translateToAll / discoverEquivalent / composeLexicon / lexiconShapley / CKG event log. Embeds in any JS runtime.
@rosetta/server Node + Express + better-sqlite3 backend. /lexicons (registry + content-hash + on-chain binding), /ckg (snapshot persistence), /attribution (translation citation logging + epoch sealing). Local-first SQLite.
@rosetta/web Vite + React demo SPA. Translates concepts across all bundled lexicons.
lexicons/ Contribution surface. Seeded with oph.json — Bernhard Mueller's Observer-Patch Holography concept graph (57 concepts), author_did placeholder pending the on-chain mint.

On-chain attribution integration points

The whole point of Rosetta is that citation flow ⇒ authorship attribution by structure. The integration with VibeSwap closes that loop through three contracts:

  • PrimitiveRegistry — each lexicon mints as a Primitive NFT, binding (content_hash, author) to a tokenId
  • ContributionDAG — citation graph weighted by sealed-epoch translation counts
  • ShapleyDistributor — marginal-contribution rewards across the DAG (foundational lexicons cited via many paths earn more by structure)

Honest-number: contract roles are spec'd in the README and audits workspace against VibeSwap's existing testnet stack. The end-to-end wiring — from this server's epoch/seal merkle root through CitationAnchor.anchorCitations to a settled royalty payout — is the next milestone, not yet executed live. The server emits the merkle root; the anchor + payout cycle ships separately.

Quick start

```bash
git clone https://github.com/WGlynn/rosetta-stone-protocol.git
cd rosetta-stone-protocol
bash install.sh # or: npm install
npm run dev:server # http://localhost:4242
npm run dev:web # http://localhost:3001 (separate terminal)
curl http://localhost:4242/health
```

Verified end-to-end before tagging

  • `npm install` clean against Node 24 + better-sqlite3 12.x prebuilds (no native compile required)
  • All 9 server routes exercised live: `/health`, `/lexicons` (GET/POST/GET-by-id), `/attribution/translation`, `/attribution/epoch/seal`, `/ckg` (POST/GET-by-id) — outputs in commit log
  • `npm run build:web` builds the Vite SPA cleanly (~265 KB / 87 KB gzip with OPH lexicon wired in)
  • 4 engine integration tests pass (`node --test packages/engine/src/oph-integration.test.js`)
  • Real bug fixed during integration: `discoverEquivalent` ReferenceError on the return path (surfaced by the new tests)

License

MIT