Skip to main content

JSON-RPC adapter for Muscles actions

Project description

Muscles JSON-RPC

JSON-RPC protocol projection for Muscles actions.

This package makes Muscles action-first applications callable over JSON-RPC while preserving the same schemas, rules, dispatcher, and context used by other projections.

Related Repositories

  • muscles - core action contracts, dispatcher and inspect contract.
  • muscles-cli - CLI action inspection and execution over the same contracts.
  • muscles-mcp - MCP projection over the same action model.
  • muscles-sse - streaming projection for action output.
  • muscles-benchmarks - protocol projection regression checks.

Concept Guardrails

  • JSON-RPC is a protocol projection, not a new framework layer.
  • Methods must be discovered from inspect_application(app).
  • Validation and error normalization must reuse Muscles core schema/rules/errors.
  • Auth/rules must run through ActionDispatcher.
  • The same use case must be callable from CLI, HTTP, MCP, and JSON-RPC without duplicating implementation.
  • JSON-RPC state is scoped to the application instance; no mutable module-level method registry is the source of truth.

Initial Goal

Implement a JSON-RPC 2.0 projection around Muscles actions with typed request/response contracts, deterministic error mapping, notifications, and batch dispatch.

Current Stage (Issue #1)

Implemented JSON-RPC 2.0 projection:

  • request validation (jsonrpc, method, params);
  • method discovery from inspect_application(app);
  • dispatch through ActionDispatcher(..., transport="jsonrpc");
  • notification calls;
  • batch calls;
  • deterministic error mapping:
    • -32600 invalid request;
    • -32601 method not found;
    • -32602 invalid params;
    • -32001 permission denied;
    • -32603 internal error.

Run tests

python -m pytest -q

When testing against local core changes:

PYTHONPATH=../muscles/src:src python -m pytest -q

User docs:

Project details


Download files

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

Source Distribution

muscles_jsonrpc-1.0.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

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

muscles_jsonrpc-1.0.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file muscles_jsonrpc-1.0.0.tar.gz.

File metadata

  • Download URL: muscles_jsonrpc-1.0.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for muscles_jsonrpc-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4b5cd05d0c44e52131b62ff05a3ef6765e590ff7ca8b075515e461f8ca20ed4f
MD5 0d3469b8c00a6e5064212655788bbdcd
BLAKE2b-256 140841750773ef09630f2281a8cf0d9e917ecd1a955526d240ad6ce3214b39bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for muscles_jsonrpc-1.0.0.tar.gz:

Publisher: release.yml on butkoden/muscles-jsonrpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file muscles_jsonrpc-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for muscles_jsonrpc-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2f4f7e23e3ee3476db6f681966ab7bd71644795e5ae9284dfe12049fe6e9aaf
MD5 ddc8c7d07808420c99dcd3266071eece
BLAKE2b-256 dd7d4a7bde4429bfc38d50d51aec4d91117db06432ba5e4439646c9444c4a8ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for muscles_jsonrpc-1.0.0-py3-none-any.whl:

Publisher: release.yml on butkoden/muscles-jsonrpc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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