tigrbl-atoms 0.4.2.dev4__tar.gz → 0.4.3.dev4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/PKG-INFO +80 -4
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/README.md +79 -3
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/pyproject.toml +1 -1
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/__init__.py +0 -7
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/atoms/framing/__init__.py +41 -0
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/atoms/framing/app_frame.py +119 -0
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/atoms/framing/codec.py +512 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/__init__.py +7 -0
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/atoms/sys/handler_well_known.py +73 -0
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/atoms/transport/asgi_channel.py +270 -0
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/atoms/transport/completion_fence.py +41 -0
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/atoms/transport/websocket_unary.py +151 -0
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/client_session_coverage.py +438 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/events.py +8 -2
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/fallback.py +12 -0
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/packed_inputs.py +273 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/protocol_runtime.py +127 -0
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/protocol_scope.py +63 -0
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/runtime_channel.py +657 -0
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/runtime_loop_regions.py +46 -0
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/runtime_resume.py +131 -0
- tigrbl_atoms-0.4.3.dev4/tigrbl_atoms/rust.py +29 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/types.py +6 -6
- tigrbl_atoms-0.4.2.dev4/tigrbl_atoms/fallback.py +0 -11
- tigrbl_atoms-0.4.2.dev4/tigrbl_atoms/runtime_channel.py +0 -78
- tigrbl_atoms-0.4.2.dev4/tigrbl_atoms/rust.py +0 -35
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/LICENSE +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/NOTICE +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/_ctx.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/_opview_helpers.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/_request.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/algebra.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/_temp.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/_scheduler.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/_types.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/abort_group.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/admit.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/await_seal.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/cleanup.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/commit.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/dedupe.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/error_project.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/execute.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/precommit_validate.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/prepare_execute.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/reject_admission.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/result_slots.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/scheduler.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/seal_check.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/batch/tx_begin.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/dep/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/dep/_param_resolver.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/dep/extra.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/dep/security.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/dispatch/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/dispatch/binding_match.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/dispatch/binding_parse.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/dispatch/input_normalize.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/dispatch/op_resolve.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/egress/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/egress/asgi_send.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/egress/envelope_apply.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/egress/headers_apply.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/egress/http_finalize.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/egress/out_dump.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/egress/result_normalize.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/egress/to_transport_response.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/emit/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/emit/paired_post.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/emit/paired_pre.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/emit/readtime_alias.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/err/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/err/classify.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/err/ctx_build.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/err/rollback.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/err/transport_shape.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/fanout/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/fanout/emit_many.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/fanout/shape.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/hot/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/hot/slots.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/ingress/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/ingress/ctx_init.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/ingress/input_prepare.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/ingress/transport_extract.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/intent/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/intent/build.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/intent/final_group_key.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/intent/prekey.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/out/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/out/masking.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/refresh/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/refresh/demand.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/resolve/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/resolve/assemble.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/resolve/paired_gen.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/response/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/response/error_to_transport.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/response/headers_from_payload.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/response/negotiate.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/response/negotiation.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/response/render.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/response/renderer.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/response/template.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/response/templates.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/schema/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/schema/collect_in.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/schema/collect_out.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/storage/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/storage/to_stored.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/_db.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/_oltp_context.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/commit_tx.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_aggregate.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_append_chunk.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_bulk_create.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_bulk_delete.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_bulk_merge.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_bulk_replace.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_bulk_update.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_checkpoint.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_clear.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_count.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_create.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_custom.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_delete.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_download.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_exists.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_group_by.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_list.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_merge.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_noop.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_persistence.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_publish.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_read.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_replace.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_send_datagram.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_subscribe.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_tail.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_update.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/handler_upload.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/phase_db.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/sys/start_tx.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/transport/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/transport/sink_bind.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/transport/unit_capture.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/wire/__init__.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/wire/build_in.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/wire/build_out.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/wire/dump.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/atoms/wire/validate_in.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/phases.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/runtime_callbacks.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/runtime_transactions.py +0 -0
- {tigrbl_atoms-0.4.2.dev4 → tigrbl_atoms-0.4.3.dev4}/tigrbl_atoms/stages.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tigrbl-atoms
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3.dev4
|
|
4
4
|
Summary: Runtime atom package for Tigrbl stages, phases, typed contexts, event anchors, protocol execution, and composable pipeline algebra.
|
|
5
5
|
License: Apache License
|
|
6
6
|
Version 2.0, January 2004
|
|
@@ -254,7 +254,7 @@ Description-Content-Type: text/markdown
|
|
|
254
254
|
<a href="https://discord.gg/K4YTAPapjR"><img src="https://img.shields.io/badge/Discord-Join%20chat-5865F2?logo=discord&logoColor=white" alt="Discord community for tigrbl-atoms"/></a>
|
|
255
255
|
<a href="https://github.com/tigrbl/tigrbl/blob/master/pkgs/core/tigrbl_atoms/README.md"><img src="https://hits.sh/github.com/tigrbl/tigrbl/blob/master/pkgs/core/tigrbl_atoms/README.md.svg?label=hits" alt="Repository hits for tigrbl-atoms README"/></a>
|
|
256
256
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-525252" alt="Apache 2.0 license"/></a>
|
|
257
|
-
<a href="pyproject.toml"><img src="https://img.shields.io/badge/python-3.10%
|
|
257
|
+
<a href="pyproject.toml"><img src="https://img.shields.io/badge/python-3.10%2C%203.11%2C%203.12%2C%203.13%2C%203.14-3776ab" alt="Python versions 3.10 | 3.11 | 3.12 | 3.13 | 3.14 for tigrbl-atoms"/></a>
|
|
258
258
|
<a href="https://github.com/tigrbl/tigrbl/blob/master/docs/README.md"><img src="https://img.shields.io/badge/workspace-core-1f6feb" alt="Workspace group for tigrbl-atoms"/></a>
|
|
259
259
|
</div>
|
|
260
260
|
|
|
@@ -311,7 +311,7 @@ pip install tigrbl-atoms
|
|
|
311
311
|
| Entry points | none declared |
|
|
312
312
|
| Optional extras | none declared |
|
|
313
313
|
| Legal files | `LICENSE`, `NOTICE` |
|
|
314
|
-
| Supported Python | `3.10
|
|
314
|
+
| Supported Python | `3.10, 3.11, 3.12, 3.13, 3.14` |
|
|
315
315
|
|
|
316
316
|
## What It Owns
|
|
317
317
|
|
|
@@ -320,6 +320,19 @@ pip install tigrbl-atoms
|
|
|
320
320
|
Implementation orientation:
|
|
321
321
|
- `tigrbl_atoms`: _ctx, _opview_helpers, _request, algebra, atoms/, events, fallback, phases, protocol_runtime, runtime_callbacks, runtime_channel, runtime_transactions
|
|
322
322
|
|
|
323
|
+
Package catalog:
|
|
324
|
+
- `phases.py` and `stages.py`: lifecycle phase names, aliases, stage transitions, transaction flags, and error-phase metadata.
|
|
325
|
+
- `_ctx.py`, `_request.py`, `types.py`, and `events.py`: typed context, request, event, and callable contracts shared by kernel/runtime code.
|
|
326
|
+
- `algebra.py`: composable pipeline helpers for sequencing runtime work.
|
|
327
|
+
- `atoms/ingress`: context initialization, transport extraction, and input preparation.
|
|
328
|
+
- `atoms/dispatch`: binding matching, binding parsing, operation resolution, and input normalization.
|
|
329
|
+
- `atoms/dep`: security dependency, general dependency, and parameter resolution units.
|
|
330
|
+
- `atoms/wire`: input schema construction, input validation, output construction, and dump/serialization units.
|
|
331
|
+
- `atoms/sys`: default system handlers for CRUD, bulk, analytics, realtime, transport, transaction, and persistence operations.
|
|
332
|
+
- `atoms/storage`, `atoms/out`, `atoms/response`, `atoms/egress`, and `atoms/err`: storage conversion, masking, response negotiation/rendering, transport egress, error shaping, and rollback.
|
|
333
|
+
- `atoms/batch`, `atoms/fanout`, `atoms/hot`, `atoms/intent`, and `atoms/transport`: batch scheduling, fanout shaping, hot slots, intent grouping, and transport sink/capture units.
|
|
334
|
+
- `protocol_runtime.py`, `runtime_channel.py`, `runtime_callbacks.py`, and `runtime_transactions.py`: helpers used by runtime-owned protocol execution.
|
|
335
|
+
|
|
323
336
|
## Public API and Import Surface
|
|
324
337
|
|
|
325
338
|
- Import roots: `tigrbl_atoms`.
|
|
@@ -327,6 +340,67 @@ Implementation orientation:
|
|
|
327
340
|
- Workspace dependencies: [`tigrbl-ops-oltp`](https://pypi.org/project/tigrbl-ops-oltp/), [`tigrbl-ops-olap`](https://pypi.org/project/tigrbl-ops-olap/), [`tigrbl-ops-realtime`](https://pypi.org/project/tigrbl-ops-realtime/), [`tigrbl-core`](https://pypi.org/project/tigrbl-core/), [`tigrbl-typing`](https://pypi.org/project/tigrbl-typing/).
|
|
328
341
|
- External runtime dependencies: `jinja2>=3.1`, `sqlalchemy>=2.0`, `typing-extensions>=4.0`.
|
|
329
342
|
|
|
343
|
+
## Lifecycle Phases
|
|
344
|
+
|
|
345
|
+
Atoms are organized around the runtime lifecycle:
|
|
346
|
+
|
|
347
|
+
| Group | Phases | Meaning |
|
|
348
|
+
|---|---|---|
|
|
349
|
+
| Ingress | `INGRESS_BEGIN`, `INGRESS_PARSE`, `INGRESS_DISPATCH` | Receive a transport unit, initialize context, parse input, and resolve the target binding/operation. |
|
|
350
|
+
| Transaction and handler | `PRE_TX_BEGIN`, `START_TX`, `PRE_HANDLER`, `HANDLER`, `POST_HANDLER`, `PRE_COMMIT`, `TX_COMMIT` | Prepare policy, open or attach transaction state, validate input, run handlers, post-process, and commit when Tigrbl owns the transaction. |
|
|
351
|
+
| Egress | `POST_COMMIT`, `EGRESS_SHAPE`, `EGRESS_FINALIZE`, `POST_RESPONSE` | Shape output, apply response rules, finalize transport output, and run after-response work. |
|
|
352
|
+
| Error | `ON_ERROR`, phase-specific `ON_*_ERROR`, `TX_ROLLBACK` | Classify errors, shape error responses, and roll back transaction-owned work. |
|
|
353
|
+
|
|
354
|
+
`END_TX`, `ON_END_TX_ERROR`, and `ON_ROLLBACK` are compatibility aliases for `TX_COMMIT`, `ON_TX_COMMIT_ERROR`, and `TX_ROLLBACK`. New docs and new atoms should use the current names.
|
|
355
|
+
|
|
356
|
+
## Atom Semantics
|
|
357
|
+
|
|
358
|
+
An atom is a small, named runtime unit. It should do one thing, take context from the compiled plan, and leave the context in the expected next stage. Atoms are intentionally smaller than handlers:
|
|
359
|
+
|
|
360
|
+
- ingress atoms do not perform persistence;
|
|
361
|
+
- dispatch atoms do not execute business logic;
|
|
362
|
+
- wire atoms do not choose transport routes;
|
|
363
|
+
- storage atoms do not commit transactions;
|
|
364
|
+
- egress atoms do not reopen handler work;
|
|
365
|
+
- error atoms should be deterministic and avoid masking the original failure unless policy requires it.
|
|
366
|
+
|
|
367
|
+
This separation lets the kernel produce readable labels, lets diagnostics explain execution order, and lets runtime transports share behavior across REST, JSON-RPC, stream, SSE, WebSocket, WSS, and WebTransport surfaces.
|
|
368
|
+
|
|
369
|
+
## System Handler Catalog
|
|
370
|
+
|
|
371
|
+
The `atoms/sys` package contains default handlers and transaction units used by operation packs and runtime plans. The catalog includes scalar CRUD handlers (`create`, `read`, `update`, `replace`, `merge`, `delete`, `list`, `clear`), bulk handlers, analytical handlers (`count`, `exists`, `aggregate`, `group_by`), realtime handlers (`publish`, `subscribe`, `tail`), stream/file handlers (`upload`, `download`, `append_chunk`, `checkpoint`), custom/no-op handlers, persistence helpers, and transaction helpers such as `start_tx`, `phase_db`, and `commit_tx`.
|
|
372
|
+
|
|
373
|
+
Use system handlers when implementing framework behavior. Application code should normally reach these through operations on a Tigrbl app or model rather than importing a handler atom directly.
|
|
374
|
+
|
|
375
|
+
## Transaction Discipline
|
|
376
|
+
|
|
377
|
+
Transaction atoms and database guards exist so user hooks and system handlers do not silently commit or flush at the wrong phase. The broad rule is:
|
|
378
|
+
|
|
379
|
+
- before `START_TX`, do not assume a database transaction exists;
|
|
380
|
+
- from `START_TX` through `PRE_COMMIT`, in-transaction validation and handler work may proceed under guards;
|
|
381
|
+
- `TX_COMMIT` owns final commit when Tigrbl owns the transaction;
|
|
382
|
+
- `POST_COMMIT`, `EGRESS_*`, and `POST_RESPONSE` should not mutate transaction-owned state;
|
|
383
|
+
- `TX_ROLLBACK` performs rollback and cleanup for failures.
|
|
384
|
+
|
|
385
|
+
If you add or modify an atom, make its transaction expectations explicit in tests. Do not hide direct session commits inside validation, response, transport, or error atoms.
|
|
386
|
+
|
|
387
|
+
## Transport and Protocol Atoms
|
|
388
|
+
|
|
389
|
+
Transport atoms model runtime units instead of broad protocol names. A WebSocket message, an SSE event, an HTTP stream chunk, and a WebTransport datagram are different units even when they carry similar payloads. Keep family, exchange, framing, lane, subevent, and handler intent separate.
|
|
390
|
+
|
|
391
|
+
Practical guidance:
|
|
392
|
+
- Use ingress/dispatch atoms to parse and resolve transport units.
|
|
393
|
+
- Use protocol/runtime helpers to carry channel metadata.
|
|
394
|
+
- Use response and egress atoms to render or emit units.
|
|
395
|
+
- Preserve fail-closed behavior for unsupported protocol/framing/lane combinations.
|
|
396
|
+
|
|
397
|
+
## Extension Guidance
|
|
398
|
+
|
|
399
|
+
- Add atoms when the behavior is reusable, phase-specific, and independently testable.
|
|
400
|
+
- Keep application policy in hooks or dependencies, not in generic atoms.
|
|
401
|
+
- Keep atom names stable and descriptive; they show up in kernel diagnostics.
|
|
402
|
+
- Avoid broad atoms that parse, validate, execute, persist, and render at once.
|
|
403
|
+
|
|
330
404
|
## Usage Examples
|
|
331
405
|
|
|
332
406
|
### Verify the installed package
|
|
@@ -388,6 +462,8 @@ Choose `tigrbl-atoms` when the quick-answer table matches your use case. Choose
|
|
|
388
462
|
- [Package layout](https://github.com/tigrbl/tigrbl/blob/master/docs/developer/PACKAGE_LAYOUT.md)
|
|
389
463
|
- [Current target](https://github.com/tigrbl/tigrbl/blob/master/docs/conformance/CURRENT_TARGET.md)
|
|
390
464
|
- [Current state](https://github.com/tigrbl/tigrbl/blob/master/docs/conformance/CURRENT_STATE.md)
|
|
465
|
+
- [Next steps](https://github.com/tigrbl/tigrbl/blob/master/docs/conformance/NEXT_STEPS.md)
|
|
466
|
+
- [Documentation pointers](https://github.com/tigrbl/tigrbl/blob/master/docs/governance/DOC_POINTERS.md)
|
|
391
467
|
- [SSOT registry](https://github.com/tigrbl/tigrbl/blob/master/.ssot/registry.json)
|
|
392
468
|
- [Release workflow](https://github.com/tigrbl/tigrbl/actions/workflows/publish.yml)
|
|
393
469
|
|
|
@@ -399,7 +475,7 @@ Choose `tigrbl-atoms` when the quick-answer table matches your use case. Choose
|
|
|
399
475
|
|
|
400
476
|
## Package-local Boundary
|
|
401
477
|
|
|
402
|
-
This README is the package-local distribution entry point for `tigrbl-atoms`. It answers install, usage, API, ownership, and certification-orientation questions for this package. Broader architectural decisions, release status, and cross-package proof chains remain in the repository-level docs and SSOT registry.
|
|
478
|
+
This file is a package-local distribution entry point. This README is the package-local distribution entry point for `tigrbl-atoms`. It answers install, usage, API, ownership, and certification-orientation questions for this package. Broader architectural decisions, release status, and cross-package proof chains remain in the repository-level docs and SSOT registry.
|
|
403
479
|
|
|
404
480
|
## License
|
|
405
481
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<a href="https://discord.gg/K4YTAPapjR"><img src="https://img.shields.io/badge/Discord-Join%20chat-5865F2?logo=discord&logoColor=white" alt="Discord community for tigrbl-atoms"/></a>
|
|
8
8
|
<a href="https://github.com/tigrbl/tigrbl/blob/master/pkgs/core/tigrbl_atoms/README.md"><img src="https://hits.sh/github.com/tigrbl/tigrbl/blob/master/pkgs/core/tigrbl_atoms/README.md.svg?label=hits" alt="Repository hits for tigrbl-atoms README"/></a>
|
|
9
9
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-525252" alt="Apache 2.0 license"/></a>
|
|
10
|
-
<a href="pyproject.toml"><img src="https://img.shields.io/badge/python-3.10%
|
|
10
|
+
<a href="pyproject.toml"><img src="https://img.shields.io/badge/python-3.10%2C%203.11%2C%203.12%2C%203.13%2C%203.14-3776ab" alt="Python versions 3.10 | 3.11 | 3.12 | 3.13 | 3.14 for tigrbl-atoms"/></a>
|
|
11
11
|
<a href="https://github.com/tigrbl/tigrbl/blob/master/docs/README.md"><img src="https://img.shields.io/badge/workspace-core-1f6feb" alt="Workspace group for tigrbl-atoms"/></a>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -64,7 +64,7 @@ pip install tigrbl-atoms
|
|
|
64
64
|
| Entry points | none declared |
|
|
65
65
|
| Optional extras | none declared |
|
|
66
66
|
| Legal files | `LICENSE`, `NOTICE` |
|
|
67
|
-
| Supported Python | `3.10
|
|
67
|
+
| Supported Python | `3.10, 3.11, 3.12, 3.13, 3.14` |
|
|
68
68
|
|
|
69
69
|
## What It Owns
|
|
70
70
|
|
|
@@ -73,6 +73,19 @@ pip install tigrbl-atoms
|
|
|
73
73
|
Implementation orientation:
|
|
74
74
|
- `tigrbl_atoms`: _ctx, _opview_helpers, _request, algebra, atoms/, events, fallback, phases, protocol_runtime, runtime_callbacks, runtime_channel, runtime_transactions
|
|
75
75
|
|
|
76
|
+
Package catalog:
|
|
77
|
+
- `phases.py` and `stages.py`: lifecycle phase names, aliases, stage transitions, transaction flags, and error-phase metadata.
|
|
78
|
+
- `_ctx.py`, `_request.py`, `types.py`, and `events.py`: typed context, request, event, and callable contracts shared by kernel/runtime code.
|
|
79
|
+
- `algebra.py`: composable pipeline helpers for sequencing runtime work.
|
|
80
|
+
- `atoms/ingress`: context initialization, transport extraction, and input preparation.
|
|
81
|
+
- `atoms/dispatch`: binding matching, binding parsing, operation resolution, and input normalization.
|
|
82
|
+
- `atoms/dep`: security dependency, general dependency, and parameter resolution units.
|
|
83
|
+
- `atoms/wire`: input schema construction, input validation, output construction, and dump/serialization units.
|
|
84
|
+
- `atoms/sys`: default system handlers for CRUD, bulk, analytics, realtime, transport, transaction, and persistence operations.
|
|
85
|
+
- `atoms/storage`, `atoms/out`, `atoms/response`, `atoms/egress`, and `atoms/err`: storage conversion, masking, response negotiation/rendering, transport egress, error shaping, and rollback.
|
|
86
|
+
- `atoms/batch`, `atoms/fanout`, `atoms/hot`, `atoms/intent`, and `atoms/transport`: batch scheduling, fanout shaping, hot slots, intent grouping, and transport sink/capture units.
|
|
87
|
+
- `protocol_runtime.py`, `runtime_channel.py`, `runtime_callbacks.py`, and `runtime_transactions.py`: helpers used by runtime-owned protocol execution.
|
|
88
|
+
|
|
76
89
|
## Public API and Import Surface
|
|
77
90
|
|
|
78
91
|
- Import roots: `tigrbl_atoms`.
|
|
@@ -80,6 +93,67 @@ Implementation orientation:
|
|
|
80
93
|
- Workspace dependencies: [`tigrbl-ops-oltp`](https://pypi.org/project/tigrbl-ops-oltp/), [`tigrbl-ops-olap`](https://pypi.org/project/tigrbl-ops-olap/), [`tigrbl-ops-realtime`](https://pypi.org/project/tigrbl-ops-realtime/), [`tigrbl-core`](https://pypi.org/project/tigrbl-core/), [`tigrbl-typing`](https://pypi.org/project/tigrbl-typing/).
|
|
81
94
|
- External runtime dependencies: `jinja2>=3.1`, `sqlalchemy>=2.0`, `typing-extensions>=4.0`.
|
|
82
95
|
|
|
96
|
+
## Lifecycle Phases
|
|
97
|
+
|
|
98
|
+
Atoms are organized around the runtime lifecycle:
|
|
99
|
+
|
|
100
|
+
| Group | Phases | Meaning |
|
|
101
|
+
|---|---|---|
|
|
102
|
+
| Ingress | `INGRESS_BEGIN`, `INGRESS_PARSE`, `INGRESS_DISPATCH` | Receive a transport unit, initialize context, parse input, and resolve the target binding/operation. |
|
|
103
|
+
| Transaction and handler | `PRE_TX_BEGIN`, `START_TX`, `PRE_HANDLER`, `HANDLER`, `POST_HANDLER`, `PRE_COMMIT`, `TX_COMMIT` | Prepare policy, open or attach transaction state, validate input, run handlers, post-process, and commit when Tigrbl owns the transaction. |
|
|
104
|
+
| Egress | `POST_COMMIT`, `EGRESS_SHAPE`, `EGRESS_FINALIZE`, `POST_RESPONSE` | Shape output, apply response rules, finalize transport output, and run after-response work. |
|
|
105
|
+
| Error | `ON_ERROR`, phase-specific `ON_*_ERROR`, `TX_ROLLBACK` | Classify errors, shape error responses, and roll back transaction-owned work. |
|
|
106
|
+
|
|
107
|
+
`END_TX`, `ON_END_TX_ERROR`, and `ON_ROLLBACK` are compatibility aliases for `TX_COMMIT`, `ON_TX_COMMIT_ERROR`, and `TX_ROLLBACK`. New docs and new atoms should use the current names.
|
|
108
|
+
|
|
109
|
+
## Atom Semantics
|
|
110
|
+
|
|
111
|
+
An atom is a small, named runtime unit. It should do one thing, take context from the compiled plan, and leave the context in the expected next stage. Atoms are intentionally smaller than handlers:
|
|
112
|
+
|
|
113
|
+
- ingress atoms do not perform persistence;
|
|
114
|
+
- dispatch atoms do not execute business logic;
|
|
115
|
+
- wire atoms do not choose transport routes;
|
|
116
|
+
- storage atoms do not commit transactions;
|
|
117
|
+
- egress atoms do not reopen handler work;
|
|
118
|
+
- error atoms should be deterministic and avoid masking the original failure unless policy requires it.
|
|
119
|
+
|
|
120
|
+
This separation lets the kernel produce readable labels, lets diagnostics explain execution order, and lets runtime transports share behavior across REST, JSON-RPC, stream, SSE, WebSocket, WSS, and WebTransport surfaces.
|
|
121
|
+
|
|
122
|
+
## System Handler Catalog
|
|
123
|
+
|
|
124
|
+
The `atoms/sys` package contains default handlers and transaction units used by operation packs and runtime plans. The catalog includes scalar CRUD handlers (`create`, `read`, `update`, `replace`, `merge`, `delete`, `list`, `clear`), bulk handlers, analytical handlers (`count`, `exists`, `aggregate`, `group_by`), realtime handlers (`publish`, `subscribe`, `tail`), stream/file handlers (`upload`, `download`, `append_chunk`, `checkpoint`), custom/no-op handlers, persistence helpers, and transaction helpers such as `start_tx`, `phase_db`, and `commit_tx`.
|
|
125
|
+
|
|
126
|
+
Use system handlers when implementing framework behavior. Application code should normally reach these through operations on a Tigrbl app or model rather than importing a handler atom directly.
|
|
127
|
+
|
|
128
|
+
## Transaction Discipline
|
|
129
|
+
|
|
130
|
+
Transaction atoms and database guards exist so user hooks and system handlers do not silently commit or flush at the wrong phase. The broad rule is:
|
|
131
|
+
|
|
132
|
+
- before `START_TX`, do not assume a database transaction exists;
|
|
133
|
+
- from `START_TX` through `PRE_COMMIT`, in-transaction validation and handler work may proceed under guards;
|
|
134
|
+
- `TX_COMMIT` owns final commit when Tigrbl owns the transaction;
|
|
135
|
+
- `POST_COMMIT`, `EGRESS_*`, and `POST_RESPONSE` should not mutate transaction-owned state;
|
|
136
|
+
- `TX_ROLLBACK` performs rollback and cleanup for failures.
|
|
137
|
+
|
|
138
|
+
If you add or modify an atom, make its transaction expectations explicit in tests. Do not hide direct session commits inside validation, response, transport, or error atoms.
|
|
139
|
+
|
|
140
|
+
## Transport and Protocol Atoms
|
|
141
|
+
|
|
142
|
+
Transport atoms model runtime units instead of broad protocol names. A WebSocket message, an SSE event, an HTTP stream chunk, and a WebTransport datagram are different units even when they carry similar payloads. Keep family, exchange, framing, lane, subevent, and handler intent separate.
|
|
143
|
+
|
|
144
|
+
Practical guidance:
|
|
145
|
+
- Use ingress/dispatch atoms to parse and resolve transport units.
|
|
146
|
+
- Use protocol/runtime helpers to carry channel metadata.
|
|
147
|
+
- Use response and egress atoms to render or emit units.
|
|
148
|
+
- Preserve fail-closed behavior for unsupported protocol/framing/lane combinations.
|
|
149
|
+
|
|
150
|
+
## Extension Guidance
|
|
151
|
+
|
|
152
|
+
- Add atoms when the behavior is reusable, phase-specific, and independently testable.
|
|
153
|
+
- Keep application policy in hooks or dependencies, not in generic atoms.
|
|
154
|
+
- Keep atom names stable and descriptive; they show up in kernel diagnostics.
|
|
155
|
+
- Avoid broad atoms that parse, validate, execute, persist, and render at once.
|
|
156
|
+
|
|
83
157
|
## Usage Examples
|
|
84
158
|
|
|
85
159
|
### Verify the installed package
|
|
@@ -141,6 +215,8 @@ Choose `tigrbl-atoms` when the quick-answer table matches your use case. Choose
|
|
|
141
215
|
- [Package layout](https://github.com/tigrbl/tigrbl/blob/master/docs/developer/PACKAGE_LAYOUT.md)
|
|
142
216
|
- [Current target](https://github.com/tigrbl/tigrbl/blob/master/docs/conformance/CURRENT_TARGET.md)
|
|
143
217
|
- [Current state](https://github.com/tigrbl/tigrbl/blob/master/docs/conformance/CURRENT_STATE.md)
|
|
218
|
+
- [Next steps](https://github.com/tigrbl/tigrbl/blob/master/docs/conformance/NEXT_STEPS.md)
|
|
219
|
+
- [Documentation pointers](https://github.com/tigrbl/tigrbl/blob/master/docs/governance/DOC_POINTERS.md)
|
|
144
220
|
- [SSOT registry](https://github.com/tigrbl/tigrbl/blob/master/.ssot/registry.json)
|
|
145
221
|
- [Release workflow](https://github.com/tigrbl/tigrbl/actions/workflows/publish.yml)
|
|
146
222
|
|
|
@@ -152,7 +228,7 @@ Choose `tigrbl-atoms` when the quick-answer table matches your use case. Choose
|
|
|
152
228
|
|
|
153
229
|
## Package-local Boundary
|
|
154
230
|
|
|
155
|
-
This README is the package-local distribution entry point for `tigrbl-atoms`. It answers install, usage, API, ownership, and certification-orientation questions for this package. Broader architectural decisions, release status, and cross-package proof chains remain in the repository-level docs and SSOT registry.
|
|
231
|
+
This file is a package-local distribution entry point. This README is the package-local distribution entry point for `tigrbl-atoms`. It answers install, usage, API, ownership, and certification-orientation questions for this package. Broader architectural decisions, release status, and cross-package proof chains remain in the repository-level docs and SSOT registry.
|
|
156
232
|
|
|
157
233
|
## License
|
|
158
234
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "tigrbl-atoms"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.3.dev4"
|
|
4
4
|
description = "Runtime atom package for Tigrbl stages, phases, typed contexts, event anchors, protocol execution, and composable pipeline algebra."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { file = "LICENSE" }
|
|
@@ -3,9 +3,6 @@ from __future__ import annotations
|
|
|
3
3
|
from importlib import import_module
|
|
4
4
|
from typing import Any
|
|
5
5
|
|
|
6
|
-
from .fallback import rust_atoms_enabled
|
|
7
|
-
from .rust import register_rust_atom, register_rust_callback, register_rust_hook
|
|
8
|
-
|
|
9
6
|
_LAZY_EXPORTS = {
|
|
10
7
|
"PHASE_SEQUENCE": "types",
|
|
11
8
|
"INGRESS_PHASES": "types",
|
|
@@ -40,10 +37,6 @@ __all__ = [
|
|
|
40
37
|
"TypedErr",
|
|
41
38
|
"ErrorCtx",
|
|
42
39
|
"build_error_ctx",
|
|
43
|
-
"rust_atoms_enabled",
|
|
44
|
-
"register_rust_atom",
|
|
45
|
-
"register_rust_callback",
|
|
46
|
-
"register_rust_hook",
|
|
47
40
|
]
|
|
48
41
|
|
|
49
42
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from .app_frame import (
|
|
4
|
+
DEFAULT_MAX_PAYLOAD_SIZE,
|
|
5
|
+
HEADER_SIZE,
|
|
6
|
+
RESERVED_FLAG_MASK,
|
|
7
|
+
SUPPORTED_VERSION,
|
|
8
|
+
FrameStreamDecoder,
|
|
9
|
+
decode_app_frame,
|
|
10
|
+
decode_app_frames,
|
|
11
|
+
encode_app_frame,
|
|
12
|
+
)
|
|
13
|
+
from .codec import (
|
|
14
|
+
FRAME_CODECS,
|
|
15
|
+
FrameCodec,
|
|
16
|
+
decode_frame,
|
|
17
|
+
decode_webtransport_inner_frame,
|
|
18
|
+
encode_frame,
|
|
19
|
+
encode_webtransport_inner_frame,
|
|
20
|
+
get_frame_codec,
|
|
21
|
+
supported_frame_codecs,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
__all__ = [
|
|
25
|
+
"DEFAULT_MAX_PAYLOAD_SIZE",
|
|
26
|
+
"FRAME_CODECS",
|
|
27
|
+
"HEADER_SIZE",
|
|
28
|
+
"RESERVED_FLAG_MASK",
|
|
29
|
+
"SUPPORTED_VERSION",
|
|
30
|
+
"FrameCodec",
|
|
31
|
+
"FrameStreamDecoder",
|
|
32
|
+
"decode_app_frame",
|
|
33
|
+
"decode_app_frames",
|
|
34
|
+
"decode_frame",
|
|
35
|
+
"decode_webtransport_inner_frame",
|
|
36
|
+
"encode_app_frame",
|
|
37
|
+
"encode_frame",
|
|
38
|
+
"encode_webtransport_inner_frame",
|
|
39
|
+
"get_frame_codec",
|
|
40
|
+
"supported_frame_codecs",
|
|
41
|
+
]
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Iterator
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
HEADER_SIZE = 8
|
|
7
|
+
SUPPORTED_VERSION = 1
|
|
8
|
+
RESERVED_FLAG_MASK = 0x80
|
|
9
|
+
DEFAULT_MAX_PAYLOAD_SIZE = 16 * 1024 * 1024
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _as_bytes(payload: bytes | bytearray | memoryview) -> bytes:
|
|
13
|
+
if isinstance(payload, bytes):
|
|
14
|
+
return payload
|
|
15
|
+
if isinstance(payload, (bytearray, memoryview)):
|
|
16
|
+
return bytes(payload)
|
|
17
|
+
raise TypeError("payload must be bytes-like")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def encode_app_frame(
|
|
21
|
+
*,
|
|
22
|
+
version: int = SUPPORTED_VERSION,
|
|
23
|
+
kind: int,
|
|
24
|
+
flags: int = 0,
|
|
25
|
+
payload: bytes | bytearray | memoryview = b"",
|
|
26
|
+
) -> bytes:
|
|
27
|
+
if version != SUPPORTED_VERSION:
|
|
28
|
+
raise ValueError(f"unsupported app frame version: {version}")
|
|
29
|
+
if not 0 <= kind <= 0xFF:
|
|
30
|
+
raise ValueError("app frame kind must fit in one byte")
|
|
31
|
+
if not 0 <= flags <= 0x7F:
|
|
32
|
+
raise ValueError("app frame flags include reserved bits")
|
|
33
|
+
body = _as_bytes(payload)
|
|
34
|
+
if len(body) > 0xFFFFFFFF:
|
|
35
|
+
raise ValueError("app frame payload length exceeds wire limit")
|
|
36
|
+
return bytes((version, kind, flags, 0)) + len(body).to_bytes(4, "big") + body
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def decode_app_frame(
|
|
40
|
+
frame: bytes | bytearray | memoryview,
|
|
41
|
+
*,
|
|
42
|
+
max_payload_size: int = DEFAULT_MAX_PAYLOAD_SIZE,
|
|
43
|
+
) -> dict[str, object]:
|
|
44
|
+
raw = _as_bytes(frame)
|
|
45
|
+
if len(raw) < HEADER_SIZE:
|
|
46
|
+
raise ValueError("truncated app frame header")
|
|
47
|
+
version, kind, flags, reserved = raw[:4]
|
|
48
|
+
if version != SUPPORTED_VERSION:
|
|
49
|
+
raise ValueError(f"unsupported app frame version: {version}")
|
|
50
|
+
if flags & RESERVED_FLAG_MASK or reserved:
|
|
51
|
+
raise ValueError("app frame reserved bits must be zero")
|
|
52
|
+
length = int.from_bytes(raw[4:8], "big")
|
|
53
|
+
if length > max_payload_size:
|
|
54
|
+
raise ValueError("app frame size exceeds configured limit before allocation")
|
|
55
|
+
end = HEADER_SIZE + length
|
|
56
|
+
if len(raw) < end:
|
|
57
|
+
raise ValueError("truncated app frame payload length")
|
|
58
|
+
if len(raw) > end:
|
|
59
|
+
raise ValueError("app frame contains trailing bytes")
|
|
60
|
+
return {
|
|
61
|
+
"version": version,
|
|
62
|
+
"kind": kind,
|
|
63
|
+
"flags": flags,
|
|
64
|
+
"length": length,
|
|
65
|
+
"payload": raw[HEADER_SIZE:end],
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def decode_app_frames(
|
|
70
|
+
stream: bytes | bytearray | memoryview,
|
|
71
|
+
*,
|
|
72
|
+
max_payload_size: int = DEFAULT_MAX_PAYLOAD_SIZE,
|
|
73
|
+
) -> Iterator[dict[str, object]]:
|
|
74
|
+
raw = _as_bytes(stream)
|
|
75
|
+
offset = 0
|
|
76
|
+
while offset < len(raw):
|
|
77
|
+
if len(raw) - offset < HEADER_SIZE:
|
|
78
|
+
raise ValueError("truncated app frame header")
|
|
79
|
+
length = int.from_bytes(raw[offset + 4 : offset + 8], "big")
|
|
80
|
+
end = offset + HEADER_SIZE + length
|
|
81
|
+
if end > len(raw):
|
|
82
|
+
raise ValueError("truncated app frame payload length")
|
|
83
|
+
yield decode_app_frame(raw[offset:end], max_payload_size=max_payload_size)
|
|
84
|
+
offset = end
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class FrameStreamDecoder:
|
|
88
|
+
def __init__(self, *, max_payload_size: int = DEFAULT_MAX_PAYLOAD_SIZE) -> None:
|
|
89
|
+
self._buffer = bytearray()
|
|
90
|
+
self._max_payload_size = max_payload_size
|
|
91
|
+
|
|
92
|
+
def feed(
|
|
93
|
+
self, chunk: bytes | bytearray | memoryview
|
|
94
|
+
) -> Iterator[dict[str, object]]:
|
|
95
|
+
self._buffer.extend(_as_bytes(chunk))
|
|
96
|
+
while len(self._buffer) >= HEADER_SIZE:
|
|
97
|
+
length = int.from_bytes(self._buffer[4:8], "big")
|
|
98
|
+
if length > self._max_payload_size:
|
|
99
|
+
raise ValueError(
|
|
100
|
+
"app frame size exceeds configured limit before allocation"
|
|
101
|
+
)
|
|
102
|
+
end = HEADER_SIZE + length
|
|
103
|
+
if len(self._buffer) < end:
|
|
104
|
+
break
|
|
105
|
+
frame = bytes(self._buffer[:end])
|
|
106
|
+
del self._buffer[:end]
|
|
107
|
+
yield decode_app_frame(frame, max_payload_size=self._max_payload_size)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
__all__ = [
|
|
111
|
+
"DEFAULT_MAX_PAYLOAD_SIZE",
|
|
112
|
+
"HEADER_SIZE",
|
|
113
|
+
"RESERVED_FLAG_MASK",
|
|
114
|
+
"SUPPORTED_VERSION",
|
|
115
|
+
"FrameStreamDecoder",
|
|
116
|
+
"decode_app_frame",
|
|
117
|
+
"decode_app_frames",
|
|
118
|
+
"encode_app_frame",
|
|
119
|
+
]
|