SSE adapter for Muscles streaming events
Project description
Muscles SSE
Server-Sent Events adapter for Muscles streaming use cases.
This package should provide progress, logs, notifications, and AI output streams over SSE while keeping the underlying workflow in the Muscles application model.
Related Repositories
muscles- coreStreamResult,StreamEvent, actions and dispatcher.muscles-asgi- HTTP runtime that can expose SSE responses.muscles-ai- AI/RAG actions that may produce streaming output.muscles-jsonrpc- sibling protocol projection over actions.muscles-benchmarks- streaming regression checks.
Concept Guardrails
- SSE streams must be backed by Muscles actions/events/jobs, not ad hoc handlers.
- The adapter must preserve shared rules/security and request context.
- Stream events must have typed names and payload schemas.
- SSE should be the simple default for one-way streaming before WebSocket is introduced.
- The package must be usable from ASGI without forcing unrelated runtime choices.
Current Stage (Issue #1)
Implemented SSE transport projection over Muscles action execution:
- action dispatch path:
dispatcher.execute(action, payload, transport="sse"); - application facade:
SseAdapter.from_application(app)backed by coreActionDispatcher; - stream normalization delegates to core
stream_events()/StreamResult; - typed events:
progress,log,result,error; - wire formatting:
id,event,retry,data; SseResponsewith SSE headers and status;- heartbeat policy (optional);
- safe source close on stream completion/disconnect;
- structured core action error mapping: not found, validation, permission, execution.
This keeps SSE as a thin delivery layer. Business logic stays in Muscles actions.
Run tests
python -m pytest -q
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file muscles_sse-1.0.1.tar.gz.
File metadata
- Download URL: muscles_sse-1.0.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1d96abc2bc22f90f687ec2f7d8deeca85fa4c4b78b4f478167c7c5d4e47c470
|
|
| MD5 |
72ba4a69e24512561b035ca92be8bcf2
|
|
| BLAKE2b-256 |
da916a2ae08c842c9868ec2d8a15ff014c863f2a480cb830cfe814fc57d29b37
|
Provenance
The following attestation bundles were made for muscles_sse-1.0.1.tar.gz:
Publisher:
release.yml on butkoden/muscles-sse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
muscles_sse-1.0.1.tar.gz -
Subject digest:
c1d96abc2bc22f90f687ec2f7d8deeca85fa4c4b78b4f478167c7c5d4e47c470 - Sigstore transparency entry: 2261286728
- Sigstore integration time:
-
Permalink:
butkoden/muscles-sse@06ce7af0b5d56ba69ea017eb56a1e83155aac404 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/butkoden
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@06ce7af0b5d56ba69ea017eb56a1e83155aac404 -
Trigger Event:
release
-
Statement type:
File details
Details for the file muscles_sse-1.0.1-py3-none-any.whl.
File metadata
- Download URL: muscles_sse-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f18309d8781947ad993a506205ac114e41fb81b76691f4306bb50b6124aa9745
|
|
| MD5 |
cfd9ed7aa636702242965ee1e72e1d18
|
|
| BLAKE2b-256 |
fc75baebd8955eca10f8ba4acd0c05e700d278275a4d82ba40375d9140ef1305
|
Provenance
The following attestation bundles were made for muscles_sse-1.0.1-py3-none-any.whl:
Publisher:
release.yml on butkoden/muscles-sse
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
muscles_sse-1.0.1-py3-none-any.whl -
Subject digest:
f18309d8781947ad993a506205ac114e41fb81b76691f4306bb50b6124aa9745 - Sigstore transparency entry: 2261287057
- Sigstore integration time:
-
Permalink:
butkoden/muscles-sse@06ce7af0b5d56ba69ea017eb56a1e83155aac404 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/butkoden
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@06ce7af0b5d56ba69ea017eb56a1e83155aac404 -
Trigger Event:
release
-
Statement type: