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.1.tar.gz (5.5 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.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: muscles_jsonrpc-1.0.1.tar.gz
  • Upload date:
  • Size: 5.5 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.1.tar.gz
Algorithm Hash digest
SHA256 fd668f1b340d93a11ecb1ec9020750041e7109b85690f94dbba8d38807b9772d
MD5 3b7053ef48e481aee10978c9040b7363
BLAKE2b-256 cfa6c4926d188b812d62518a1fde293027f60b3cb55d5f867e01c91b0ba2223f

See more details on using hashes here.

Provenance

The following attestation bundles were made for muscles_jsonrpc-1.0.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for muscles_jsonrpc-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ff993ad39de32b1e6dafb0e4ffe54ecd26f918f3ba82cb957d67fb479798504f
MD5 4e5275b1e566d2bf48df852a4189a16d
BLAKE2b-256 3592e975655890cd096192e684617b056ea1995b7ba0e09b19001400b46da140

See more details on using hashes here.

Provenance

The following attestation bundles were made for muscles_jsonrpc-1.0.1-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