Skip to main content

meadows-protocol

Pure declaration of the MEADOWS protocol: envelope, event names, JWT claims, permissions, labels. No behavior. See MEADOWS-migration-intent.md section 3.1.

What this package contains

  • envelope.pyMessage model, MessageType enum, QuotedMessage, mention/everyone parsing
  • events.pyEventName constants (the closed set of Socket.IO events)
  • jwt.pyJWTClaims model, JWTRole, build_claims() helper
  • permissions.pyAVAILABLE_PERMISSIONS (single source of truth)
  • labels.pyLabel triplet (origin, label, semver); reserved origins: meadows, system
  • codec.py — reference encoder/decoder, subordinated to the models (not the source of truth)

Install

cd meadows-protocol
uv pip install -e .

Test

uv run pytest -q

Usage

from meadows.protocol import (
    Message,
    MessageType,
    EventName,
    JWTClaims,
    JWTRole,
    build_claims,
    Label,
    AVAILABLE_PERMISSIONS,
)

The protocol boundary (section 3.2 sort rule)

The system contracts what it itself must understand. What only bots and humans need to understand stays opaque.

In protocol: envelope fields, event names, JWT claims, system-message bodies, the label signaling mechanism. Not in protocol: the content payload of ordinary messages (opaque Markdown), domain schemas (SLO results, export formats, todo shapes).

Labels (section 3.5)

A sender declares a body-sort via a triplet: Label("meadows", "interactive-form", "1.0.0").

  • origin: who declares this label. Reserved: meadows, system. Extensible to bot/UI names later.
  • label: the sort name.
  • semver: version of this label's contract.

Forms is the first concrete use case (postponed to iteration 4).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meadows_protocol-0.1.0.tar.gz (57.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meadows_protocol-0.1.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

Details for the file meadows_protocol-0.1.0.tar.gz.

File metadata

  • Download URL: meadows_protocol-0.1.0.tar.gz
  • Upload date:
  • Size: 57.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for meadows_protocol-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a372fc366a41cec9325b8162a4655d973e7bbb76a049ddc377e0e99af55acf89
MD5 72c6a0ff82dad3e68f8fb825b64e0602
BLAKE2b-256 297b23c02408b437648d365a78b2063edf90aa0c69669dfc77c556d410bd6a6c

See more details on using hashes here.

File details

Details for the file meadows_protocol-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: meadows_protocol-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for meadows_protocol-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19e9b8a0cfc4b7fbea7c9efeaf2ff9b094c9d3736c97399ddbab7a561b19f32b
MD5 2920551baf0798046817d687f7e1c997
BLAKE2b-256 ef8b9d36818a52734819872c6e6b8f3a3400452f875502873465d81ac94e0648

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page