This release is a pre-release and may not be stable for production use.
anna-app-runtime-local
Local-dev in-memory runtime for Anna Apps. Reuses the production
anna_app_rpc_dispatcher
through WindowStoreProtocol so harness behaviour is byte-identical to
nexus production.
How it shares code with production
This package does not vendor a copy of the dispatcher. Instead it:
- Imports
dispatch,WindowStoreProtocol,HostRpcErrorfromsrc.services.anna_app_rpc_dispatcher(matrix-nexus source). - Provides
InMemoryWindowStore— aWindowStoreProtocolimpl that keeps state in dictionaries and queues SSE events in memory. - Wires the production
dispatch(store, …)against in-memory state.
Because the wheel imports src.services.… directly, the bridge process
must be launched from a Python environment that has matrix-nexus on
PYTHONPATH (typically: cd matrix-nexus && uv run python -m anna_app_runtime_local.bridge).
Public surface
from anna_app_runtime_local import LocalDispatcherSession, mint_dev_token
session = LocalDispatcherSession.create(
user_id=1,
app_slug="focus-flow",
manifest_dict={...}, # parsed manifest.json
view="main",
entry_payload={"topic": "ECM"},
)
result = await session.call("storage", "set", {"key": "x", "value": 42})
events = session.drain_events() # list[dict] for SSE relay
stdio bridge
python -m anna_app_runtime_local.bridge
Speaks JSON-RPC 2.0 over stdin/stdout (one envelope per line). Methods:
session.create→{ session_id, window_uuid, token, view, view_meta }session.call→ forwards todispatch(); returns{ ok, result | error }session.drain_events→ flushes queued SSE eventssession.close→ drops the sessionsession.refresh_token→ re-mints a dev token for an active sessionexecutas.register→ registers{tool_id, project_dir, command?}fortools.invoke; first call lazy-spawnsuv run --project <dir> <tool_id>and reuses the warm subprocess.
The Node-side harness (anna-app-cli/src/harness/bridge.ts) speaks this
protocol over python-shell.
Local HMAC tokens
mint_dev_token / verify_dev_token use a per-user key at
~/.anna-app/dev.key (mode 600, generated on first use). TTL defaults
to 30 s — shorter than production's 120 s — to surface SDK refresh bugs
early.
These tokens are not interoperable with the production JWT path;
production's _is_tool_allowed already rejects tool-dev-… prefixes.
Metadata
Release files for anna-app-runtime-local 0.2.0a32
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anna_app_runtime_local-0.2.0a32.tar.gz | 56.5 kB | Without provenance | Details for anna_app_runtime_local-0.2.0a32.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anna_app_runtime_local-0.2.0a32-py3-none-any.whl | Python 3 | none | any | Details for anna_app_runtime_local-0.2.0a32-py3-none-any.whl |
Total release size: 101.7 kB
Release files / anna_app_runtime_local-0.2.0a32.tar.gz
| Download URL | anna_app_runtime_local-0.2.0a32.tar.gz |
|---|---|
| Size | 56.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a208391f2304ea4d0f83d88b78f121017ec9cda6e8bffde5e1ee6cc78c6b5937
|
|
BLAKE2b-256 checksum How to use checksums |
713f5606c675728d90262a6c42748ad084c56b5d4f9118b56a4182fded670c35
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / anna_app_runtime_local-0.2.0a32-py3-none-any.whl
| Download URL | anna_app_runtime_local-0.2.0a32-py3-none-any.whl |
|---|---|
| Size | 45.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
938f6219dc72d2207a58bb9c330db6bd85e005f86af407b6419b86e452cb25a8
|
|
BLAKE2b-256 checksum How to use checksums |
0b22e1e2305fd3edc146958588f125a585a9b039c2f282e5966d9a4de94eaa64
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Security for anna-app-runtime-local 0.2.0a32
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.