AI Initiative logoAI Initiative
Reading room / Manthan

The Scribe — `services/the-scribe/`

The Scribe — `services/the-scribe/`. Covers What this is and isn't; Run; API; What's in the `transcription` attestation.

Project explanation / technical method
This is the retained source text, not a new validation of its claims. Numerical results and comparative claims require the accompanying source review before public reuse.

Read the connected case study or article →

Not explicitly stated in source · Date not established

Provenance, authorship and editorial notes

The Scribe — `services/the-scribe/`

Id

manthan-herald-protocol-services-the-scribe-readme

Project

Manthan

Source path

manthan/herald-protocol/services/the-scribe/README.md

Source sha256

ead7931cc41689da343c97c3743e546281d4b378f2deb57a5d0f449a46098fae

Local copy sha256

ead7931cc41689da343c97c3743e546281d4b378f2deb57a5d0f449a46098fae

Repo head

3a94084024a3434cef331fecac91c2c3b43f0313

Date
Not recorded
Date basis

Original publication date not established; Git revision date retained separately.

Author

Not explicitly stated in source

Author basis

Unknown; Git committer not substituted for document author.

Last source commit

8b75d1b0157c20a0a463f0e31008ef9f73099beb

Last source commit date

2026-06-08T07:40:14Z

Document status

Project explanation / technical method

Summary

The Scribe — `services/the-scribe/`. Covers What this is and isn't; Run; API; What's in the `transcription` attestation.

Topics
  • Exploration architecture and selection
  • What this is and isn't
  • Run
  • API
Theme

Exploration architecture and selection

Priority

deep

Related ids
  • manthan-readme
  • manthan-docs-architecture
  • manthan-docs-business-overview
  • manthan-docs-demo-walkthrough
  • manthan-docs-principles
  • manthan-docs-qd-measurement-direction-plan
  • manthan-docs-swarm-evolution-integration
Evidence concerns
  • Recovered source text is preserved verbatim. Assertions, comparisons, commands and results belong to its original context; they were not re-executed or externally re-verified during this corpus review.
Word count

871

Bytes

6982

Source relative

herald-protocol/services/the-scribe/README.md

Remote mirror

manthan/herald-protocol/services/the-scribe/README.md

Full text preserved

True

The Scribe — services/the-scribe/

A cultural-conduit exemplar for HERALD per [CHARTER §5.6] and [CHARTER §2.5].

"A conduit that adds transcription envelopes summarising long traces into compact, signed digests. Useful for audit, for legal discovery, for the agent equivalent of a court reporter. The Scribe never modifies originals; it walks beside them." — [CHARTER §2.5]

The Scribe receives HERALD envelopes addressed to it (or simply submitted to it for the record), groups them by trace, and on demand emits one signed transcription envelope that cites every envelope in the trace. The originating envelopes are preserved byte-for-byte; the transcript walks beside them, never inside them. This service is the Charter exemplar — minimal, in-memory, reviewable. Not a production deployment.

What this is and isn't

Run

This sandbox uses a relative import path that, when promoted to the canonical services/the-scribe/ location, resolves to the in-tree lib/herald-core-ts/ reference library. The sandbox includes a symlink at manthan/state/findings/T-124/lib/herald-core-ts so that the same import path works during review.

cd learning/herald-protocol/manthan/state/findings/T-124/services/the-scribe
npm install
npm test

The Scribe is library-shaped: createScribe({ scribeSigil, scribeSigner, keys }) returns an Express app. The npm start script exists to refuse to start without a wired keys registry — the embedder must wire identity, not the script. See test/scribe.test.mjs for ten worked examples.

API

MethodPathPurpose
GET/healthLiveness; returns the Scribe's instance sigil and counts.
POST/envelopesIngest one HERALD envelope. Verifies via verifyEnvelope, persists into the in-memory trace store, returns { status: "stored", id, trace } on success.
POST/transcriptsBody { traceId }. Emits one signed transcription envelope summarising every envelope already stored for that trace, citing each by id.
GET/traces/:traceIdList envelope ids stored for the trace, in receipt order.
GET/transcripts/:envIdFetch a previously-emitted transcript envelope by its id.
GET/originals/:envIdReturn the byte-equal original of a stored envelope (the never-modify proof rail; embedder may set exposeOriginals: false).

Refusals are signed refusal envelopes per [EXT §10] — not just HTTP errors. Reasons used by The Scribe (all drawn from the registered set in lib/herald-core-ts/src/refusal.ts):

What's in the transcription attestation

Per [CHARTER §2.5] and registries/reserved-sigils.md §2.5, "transcripts MUST be new envelopes citing originals." The Scribe issues one transcription attestation whose value shape is:

{
  "type": "transcription",
  "value": {
    "of_trace":           "<traceId>",       // the trace summarised
    "cites": [                               // ordered citation rail
      {
        "id":               "<envelope id>",
        "from":             "sigil:...",
        "ts":               1746432000,
        "parent":           "<parent id or null>",
        "canonical_sha256": "<hex>",         // pin to the exact bytes signed
        "attestation_types": ["model", "..."]
      }
    ],
    "envelope_count":     2,
    "first_ts":           1746432000,
    "last_ts":            1746432042,
    "cites_digest_sha256": "<hex>",         // sha-256 of the cites list
    "scribed_at":         1746432043,
    "by":                 "sigil:<scribe instance>"  // not sigil:scribe
  }
}

The attestation shape is one defensible interpretation of the Charter's prose. See INTERPRETATION.md for the underspecification analysis and follow-on questions.

The transcript envelope itself

File layout

services/the-scribe/
├── README.md          (this file)
├── package.json
├── src/
│   └── scribe.mjs     (Express service factory; cited inline)
└── test/
    └── scribe.test.mjs (10 tests: success, multi-envelope, 4 refusals, 2 edge)

Citations

Continue exploring