AbstractRuntime 0.4.0__py3-none-any.whl → 0.4.1__py3-none-any.whl

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.
Files changed (65) hide show
  1. abstractruntime/__init__.py +76 -1
  2. abstractruntime/core/config.py +68 -1
  3. abstractruntime/core/models.py +5 -0
  4. abstractruntime/core/policy.py +74 -3
  5. abstractruntime/core/runtime.py +1002 -126
  6. abstractruntime/core/vars.py +8 -2
  7. abstractruntime/evidence/recorder.py +1 -1
  8. abstractruntime/history_bundle.py +772 -0
  9. abstractruntime/integrations/abstractcore/__init__.py +3 -0
  10. abstractruntime/integrations/abstractcore/default_tools.py +127 -3
  11. abstractruntime/integrations/abstractcore/effect_handlers.py +2440 -99
  12. abstractruntime/integrations/abstractcore/embeddings_client.py +69 -0
  13. abstractruntime/integrations/abstractcore/factory.py +68 -20
  14. abstractruntime/integrations/abstractcore/llm_client.py +447 -15
  15. abstractruntime/integrations/abstractcore/mcp_worker.py +1 -0
  16. abstractruntime/integrations/abstractcore/session_attachments.py +946 -0
  17. abstractruntime/integrations/abstractcore/tool_executor.py +31 -10
  18. abstractruntime/integrations/abstractcore/workspace_scoped_tools.py +561 -0
  19. abstractruntime/integrations/abstractmemory/__init__.py +3 -0
  20. abstractruntime/integrations/abstractmemory/effect_handlers.py +946 -0
  21. abstractruntime/memory/active_context.py +6 -1
  22. abstractruntime/memory/kg_packets.py +164 -0
  23. abstractruntime/memory/memact_composer.py +175 -0
  24. abstractruntime/memory/recall_levels.py +163 -0
  25. abstractruntime/memory/token_budget.py +86 -0
  26. abstractruntime/storage/__init__.py +4 -1
  27. abstractruntime/storage/artifacts.py +158 -30
  28. abstractruntime/storage/base.py +17 -1
  29. abstractruntime/storage/commands.py +339 -0
  30. abstractruntime/storage/in_memory.py +41 -1
  31. abstractruntime/storage/json_files.py +195 -12
  32. abstractruntime/storage/observable.py +38 -1
  33. abstractruntime/storage/offloading.py +433 -0
  34. abstractruntime/storage/sqlite.py +836 -0
  35. abstractruntime/visualflow_compiler/__init__.py +29 -0
  36. abstractruntime/visualflow_compiler/adapters/__init__.py +11 -0
  37. abstractruntime/visualflow_compiler/adapters/agent_adapter.py +126 -0
  38. abstractruntime/visualflow_compiler/adapters/context_adapter.py +109 -0
  39. abstractruntime/visualflow_compiler/adapters/control_adapter.py +615 -0
  40. abstractruntime/visualflow_compiler/adapters/effect_adapter.py +1051 -0
  41. abstractruntime/visualflow_compiler/adapters/event_adapter.py +307 -0
  42. abstractruntime/visualflow_compiler/adapters/function_adapter.py +97 -0
  43. abstractruntime/visualflow_compiler/adapters/memact_adapter.py +114 -0
  44. abstractruntime/visualflow_compiler/adapters/subflow_adapter.py +74 -0
  45. abstractruntime/visualflow_compiler/adapters/variable_adapter.py +316 -0
  46. abstractruntime/visualflow_compiler/compiler.py +3832 -0
  47. abstractruntime/visualflow_compiler/flow.py +247 -0
  48. abstractruntime/visualflow_compiler/visual/__init__.py +13 -0
  49. abstractruntime/visualflow_compiler/visual/agent_ids.py +29 -0
  50. abstractruntime/visualflow_compiler/visual/builtins.py +1376 -0
  51. abstractruntime/visualflow_compiler/visual/code_executor.py +214 -0
  52. abstractruntime/visualflow_compiler/visual/executor.py +2804 -0
  53. abstractruntime/visualflow_compiler/visual/models.py +211 -0
  54. abstractruntime/workflow_bundle/__init__.py +52 -0
  55. abstractruntime/workflow_bundle/models.py +236 -0
  56. abstractruntime/workflow_bundle/packer.py +317 -0
  57. abstractruntime/workflow_bundle/reader.py +87 -0
  58. abstractruntime/workflow_bundle/registry.py +587 -0
  59. abstractruntime-0.4.1.dist-info/METADATA +177 -0
  60. abstractruntime-0.4.1.dist-info/RECORD +86 -0
  61. abstractruntime-0.4.0.dist-info/METADATA +0 -167
  62. abstractruntime-0.4.0.dist-info/RECORD +0 -49
  63. {abstractruntime-0.4.0.dist-info → abstractruntime-0.4.1.dist-info}/WHEEL +0 -0
  64. {abstractruntime-0.4.0.dist-info → abstractruntime-0.4.1.dist-info}/entry_points.txt +0 -0
  65. {abstractruntime-0.4.0.dist-info → abstractruntime-0.4.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,177 @@
1
+ Metadata-Version: 2.4
2
+ Name: AbstractRuntime
3
+ Version: 0.4.1
4
+ Summary: AbstractRuntime: a durable graph runner designed to pair with AbstractCore.
5
+ Project-URL: AbstractCore (website), https://www.abstractcore.ai/
6
+ Project-URL: AbstractRuntime (GitHub), https://github.com/lpalbou/abstractruntime
7
+ Author: Laurent-Philippe Albou
8
+ License: MIT
9
+ License-File: LICENSE
10
+ Keywords: agents,checkpoint,durable,graph,llm,resume,workflow
11
+ Classifier: Development Status :: 1 - Planning
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: abstractsemantics>=0.0.1
22
+ Provides-Extra: abstractcore
23
+ Requires-Dist: abstractcore>=2.6.8; extra == 'abstractcore'
24
+ Provides-Extra: mcp-worker
25
+ Requires-Dist: abstractcore[tools]>=2.6.8; extra == 'mcp-worker'
26
+ Description-Content-Type: text/markdown
27
+
28
+ # AbstractRuntime
29
+
30
+ **AbstractRuntime** is a durable workflow runtime (interrupt → checkpoint → resume) with an append-only execution ledger.
31
+
32
+ It is designed for long-running workflows that must survive restarts and explicitly model blocking (human input, timers, external events, subworkflows) without keeping Python stacks alive.
33
+
34
+ **Version:** 0.4.1 (`pyproject.toml`) • **Python:** 3.10+
35
+
36
+ ## Install
37
+
38
+ Core runtime:
39
+
40
+ ```bash
41
+ pip install abstractruntime
42
+ ```
43
+
44
+ AbstractCore integration (LLM + tools):
45
+
46
+ ```bash
47
+ pip install "abstractruntime[abstractcore]"
48
+ ```
49
+
50
+ MCP worker entrypoint (default toolsets over stdio):
51
+
52
+ ```bash
53
+ pip install "abstractruntime[mcp-worker]"
54
+ ```
55
+
56
+ ## Quick start (pause + resume)
57
+
58
+ ```python
59
+ from abstractruntime import Effect, EffectType, Runtime, StepPlan, WorkflowSpec
60
+ from abstractruntime.storage import InMemoryLedgerStore, InMemoryRunStore
61
+
62
+
63
+ def ask(run, ctx):
64
+ return StepPlan(
65
+ node_id="ask",
66
+ effect=Effect(
67
+ type=EffectType.ASK_USER,
68
+ payload={"prompt": "Continue?"},
69
+ result_key="user_answer",
70
+ ),
71
+ next_node="done",
72
+ )
73
+
74
+
75
+ def done(run, ctx):
76
+ return StepPlan(node_id="done", complete_output={"answer": run.vars.get("user_answer")})
77
+
78
+
79
+ wf = WorkflowSpec(workflow_id="demo", entry_node="ask", nodes={"ask": ask, "done": done})
80
+ rt = Runtime(run_store=InMemoryRunStore(), ledger_store=InMemoryLedgerStore())
81
+
82
+ run_id = rt.start(workflow=wf)
83
+ state = rt.tick(workflow=wf, run_id=run_id)
84
+ assert state.status.value == "waiting"
85
+
86
+ state = rt.resume(
87
+ workflow=wf,
88
+ run_id=run_id,
89
+ wait_key=state.waiting.wait_key,
90
+ payload={"text": "yes"},
91
+ )
92
+ assert state.status.value == "completed"
93
+ ```
94
+
95
+ ## What’s included (v0.4.1)
96
+
97
+ Kernel (dependency-light):
98
+ - workflow graphs: `WorkflowSpec` (`src/abstractruntime/core/spec.py`)
99
+ - durable execution: `Runtime.start/tick/resume` (`src/abstractruntime/core/runtime.py`)
100
+ - durable waits/events: `WAIT_EVENT`, `WAIT_UNTIL`, `ASK_USER`, `EMIT_EVENT`
101
+ - append-only ledger (`StepRecord`) + node traces (`vars["_runtime"]["node_traces"]`)
102
+ - retries/idempotency hooks: `src/abstractruntime/core/policy.py`
103
+
104
+ Durability + storage:
105
+ - stores: in-memory, JSON/JSONL, SQLite (`src/abstractruntime/storage/*`)
106
+ - artifacts + offloading (store large payloads by reference)
107
+ - snapshots/bookmarks (`docs/snapshots.md`)
108
+ - tamper-evident hash-chained ledger (`docs/provenance.md`)
109
+
110
+ Drivers + distribution:
111
+ - scheduler: `create_scheduled_runtime()` (`src/abstractruntime/scheduler/*`)
112
+ - VisualFlow compiler + WorkflowBundles (`src/abstractruntime/visualflow_compiler/*`, `src/abstractruntime/workflow_bundle/*`)
113
+ - run history export: `export_run_history_bundle(...)` (`src/abstractruntime/history_bundle.py`)
114
+
115
+ Optional integrations:
116
+ - AbstractCore (LLM + tools): `docs/integrations/abstractcore.md`
117
+ - comms toolset gating (email/WhatsApp/Telegram): `docs/tools-comms.md`
118
+
119
+ ## Built-in scheduler (zero-config)
120
+
121
+ ```python
122
+ from abstractruntime import create_scheduled_runtime
123
+
124
+ sr = create_scheduled_runtime()
125
+ run_id, state = sr.run(my_workflow)
126
+
127
+ if state.status.value == "waiting":
128
+ state = sr.respond(run_id, {"answer": "yes"})
129
+
130
+ sr.stop()
131
+ ```
132
+
133
+ For persistent storage:
134
+
135
+ ```python
136
+ from abstractruntime import create_scheduled_runtime, JsonFileRunStore, JsonlLedgerStore
137
+
138
+ sr = create_scheduled_runtime(
139
+ run_store=JsonFileRunStore("./data"),
140
+ ledger_store=JsonlLedgerStore("./data"),
141
+ )
142
+ ```
143
+
144
+ ## Documentation
145
+
146
+ | Document | Description |
147
+ |----------|-------------|
148
+ | [Getting Started](docs/getting-started.md) | Install + first durable workflow |
149
+ | [API Reference](docs/api.md) | Public API surface (imports + pointers) |
150
+ | [Docs Index](docs/README.md) | Full docs map (guides + reference) |
151
+ | [FAQ](docs/faq.md) | Common questions and gotchas |
152
+ | [Architecture](docs/architecture.md) | Component map + diagrams |
153
+ | [Overview](docs/proposal.md) | Design goals, core concepts, and scope |
154
+ | [Integrations](docs/integrations/) | Integration guides (AbstractCore) |
155
+ | [Snapshots](docs/snapshots.md) | Named checkpoints for run state |
156
+ | [Provenance](docs/provenance.md) | Tamper-evident ledger documentation |
157
+ | [Evidence](docs/evidence.md) | Artifact-backed evidence capture for web/command tools |
158
+ | [Limits](docs/limits.md) | `_limits` namespace and RuntimeConfig |
159
+ | [WorkflowBundles](docs/workflow-bundles.md) | `.flow` bundle format (VisualFlow distribution) |
160
+ | [MCP Worker](docs/mcp-worker.md) | `abstractruntime-mcp-worker` CLI |
161
+ | [Changelog](CHANGELOG.md) | Release notes |
162
+ | [Contributing](CONTRIBUTING.md) | How to build/test and submit changes |
163
+ | [Security](SECURITY.md) | Responsible vulnerability reporting |
164
+ | [Acknowledgments](ACKNOWLEDGMENTS.md) | Credits |
165
+ | [ROADMAP](ROADMAP.md) | Prioritized next steps |
166
+
167
+ ## Development
168
+
169
+ ```bash
170
+ python -m venv .venv
171
+ source .venv/bin/activate
172
+ python -m pip install -U pip
173
+ python -m pip install -e ".[abstractcore,mcp-worker]"
174
+ python -m pytest -q
175
+ ```
176
+
177
+ See `CONTRIBUTING.md` for contribution guidelines and doc conventions.
@@ -0,0 +1,86 @@
1
+ abstractruntime/__init__.py,sha256=cLlpoJ9FijJJL_9yur2dePt0YJ-sTmAivSC2vfJ2Rgc,4995
2
+ abstractruntime/history_bundle.py,sha256=sT90NTdDd65Rscyamf46ad5hoyi1Ii4aHVz5ruIudXE,28381
3
+ abstractruntime/core/__init__.py,sha256=msUcfYjAwjkiEgvi-twteo1H11oBclYJFXqYVWlf8JQ,547
4
+ abstractruntime/core/config.py,sha256=CxqkZvdABItNf33PIxopCVS4bbZ3nrHMJ0-vBsKpc6U,7608
5
+ abstractruntime/core/event_keys.py,sha256=5YECNuMkJV_pCGGV5uXzNU5LtGIy2Nu1I9JKiLrZb_c,1782
6
+ abstractruntime/core/models.py,sha256=lcD7SUaaTBukCO6Goy9am7MMPV4xOiGuRCpTCjdbdOo,8669
7
+ abstractruntime/core/policy.py,sha256=s5182kKwCaMJe0SvMgyf8vRwKDPOPPgj90DVSDKizTQ,7344
8
+ abstractruntime/core/runtime.py,sha256=6Khs9TYVkELhzX42wfbce9ixsH2PYvS27mQxVFvZqs4,169228
9
+ abstractruntime/core/spec.py,sha256=SBxAFaaIe9eJTRDMEgDub-GaF2McHTDkEgIl3L-DXbE,1461
10
+ abstractruntime/core/vars.py,sha256=8GgeVusjj9lg0vJF3fhJAbIz5_uilkk3_LfuBizJcyE,6523
11
+ abstractruntime/evidence/__init__.py,sha256=pSfu8fdvvjGKclJdQ-5dUVc4KIDKLSq_MpOTDSQFvw0,212
12
+ abstractruntime/evidence/recorder.py,sha256=zclxpiCdMrhcEcQejAWnj1eiUDP7Y-J5IyrDL7TYflw,12964
13
+ abstractruntime/identity/__init__.py,sha256=aV_aA6lfqsIQMPE2S0B0AKi0rnb-_vmKYpgv1wWoaq8,119
14
+ abstractruntime/identity/fingerprint.py,sha256=axQFEHSJFsrYGNkikkfEVhNNQxdR8wBmv4TuVbTs0lM,1748
15
+ abstractruntime/integrations/__init__.py,sha256=CnhKNxeT-rCeJRURWOXT8YBZ7HJPOESJROV5cnEwJoQ,408
16
+ abstractruntime/integrations/abstractcore/__init__.py,sha256=7NbIp5ghsut8u2PAYriBLPzd1oonrNtTL7tgWxgQrQo,1578
17
+ abstractruntime/integrations/abstractcore/constants.py,sha256=INu273hahMySNiNUIqUK7HhbXs-oJe0OjbsYyXiU92U,690
18
+ abstractruntime/integrations/abstractcore/default_tools.py,sha256=q5A9zUWZgfltORb3uKuU22nmedRDZXtIVTsHrZu9IZA,9171
19
+ abstractruntime/integrations/abstractcore/effect_handlers.py,sha256=WLyrc5DL35JfG0rIdyQ6EIOLh47-yyCSHKXezx3bwmk,120070
20
+ abstractruntime/integrations/abstractcore/embeddings_client.py,sha256=TEnVEUxSzK0-PfutKcYIIbFndts864zANgjmYtNtomo,2394
21
+ abstractruntime/integrations/abstractcore/factory.py,sha256=3uFr3CpqntgoJhClOocnmk3jU9lauEeNu_rSz3hOU08,12213
22
+ abstractruntime/integrations/abstractcore/llm_client.py,sha256=AMRIHaMoVyFK868y3D_m9_euZhcgNXZeoPqEeJU1cm0,46531
23
+ abstractruntime/integrations/abstractcore/logging.py,sha256=iYmibudvLXs83hhF-dpbgEoyUdzTo8tnT4dV-cC6uyE,683
24
+ abstractruntime/integrations/abstractcore/mcp_worker.py,sha256=joYAbMee2IPul1mTuEQWjEpGk2SiDZRdFzBqDpkoqjw,22607
25
+ abstractruntime/integrations/abstractcore/observability.py,sha256=YPTBrr5IPr7vCgBoClNaxTo09M1MdVko4OEN3lMxrpc,2527
26
+ abstractruntime/integrations/abstractcore/session_attachments.py,sha256=hGgARBLkMZsuIkPGA29CjZRTtNL06aGxmeRZr1bqu9I,36911
27
+ abstractruntime/integrations/abstractcore/summarizer.py,sha256=lobota-K5mKMbDBgxIXczK_SHGmhZ832VwIMgtSvagw,5431
28
+ abstractruntime/integrations/abstractcore/tool_executor.py,sha256=5FvqDSqjz5xrMrWe92hvfV6_ubpRr5Nd1rdlsdd_DFg,25185
29
+ abstractruntime/integrations/abstractcore/workspace_scoped_tools.py,sha256=pFWFZSi7ikIrltuMn_GqZRnfCheyZGUfXGZW2k8nx6E,20769
30
+ abstractruntime/integrations/abstractmemory/__init__.py,sha256=EKQO-84kmLeTIZMZf6zVOiAXEhRjVzE1DlBduH6PAYM,158
31
+ abstractruntime/integrations/abstractmemory/effect_handlers.py,sha256=9_5bWbBDPqTs7Zq9QfyELeKNsogiaEy2vOa1eWI59Fs,40090
32
+ abstractruntime/memory/__init__.py,sha256=0Ew8Z4z0vttW0rLYc6FnysU0UXFEtE6eDUf7kC_0MK0,689
33
+ abstractruntime/memory/active_context.py,sha256=w1BHC0Mi77uESkK6xpxjreZi3-Que90gZOL1mMBco58,28822
34
+ abstractruntime/memory/active_memory.py,sha256=hJy5ssx_fi4nTcoVlAFG3qZz4OzOczVC0Benxduw6CE,16565
35
+ abstractruntime/memory/compaction.py,sha256=oZfjfsM9CzLT0xWv4jmWkKIgq3FWh20RAniY-pc7Oxg,3505
36
+ abstractruntime/memory/kg_packets.py,sha256=oghHLQKeMWx57vs6czhBqwdoo1iyp7vwJDz5fs76-QY,5250
37
+ abstractruntime/memory/memact_composer.py,sha256=PKrZklwygJpP4LdWzwetLuWJ8msewaoET7eH0hTdFy4,6178
38
+ abstractruntime/memory/recall_levels.py,sha256=pvgMv_NHgJAYt2dO-mn3A9rzBsaPceL4n2Y5pcqSvmo,4384
39
+ abstractruntime/memory/token_budget.py,sha256=0aoOFaM9d7O72mmocztq5gtJ0WYAOCnMxOdE22oEKwY,3113
40
+ abstractruntime/rendering/__init__.py,sha256=SgOW1wRic90sMVRKseATR4h6-9LZrx9FOlNA8t2XpyM,491
41
+ abstractruntime/rendering/agent_trace_report.py,sha256=SqEl4oj4s1YVfsO_GLK3XdFO-aKnH6yNlb-eqGsm9TE,9458
42
+ abstractruntime/rendering/json_stringify.py,sha256=llYWiNR9Ywu41V1ly0GGjLZO2BqmaG2bwEjfLXtBTDg,4198
43
+ abstractruntime/scheduler/__init__.py,sha256=ZwFJQrBN3aQOv7xuGXsURXEEBJAHV6qVQy13DYvbhqw,337
44
+ abstractruntime/scheduler/convenience.py,sha256=Rremvw_P3JMQ-NOkwn7ATlD5HPkKxRtSGJRfBkimyJY,10278
45
+ abstractruntime/scheduler/registry.py,sha256=0iqcTcCV0bYmhw-T7n8TFoZXVkhBRZt89AebXz_Z5fc,2969
46
+ abstractruntime/scheduler/scheduler.py,sha256=TSIz0sZeH-O7Vb3RSBsXv9qKrD62ttg_pMecYHAwKyE,16570
47
+ abstractruntime/storage/__init__.py,sha256=TBeE72N4m2m8U3FY3tHhXjGXsjmOZuyvVKXi59jvpRs,1014
48
+ abstractruntime/storage/artifacts.py,sha256=VOcF9MKX9FWPALkyCO5YuHTL3vLd3_OF_S3S2cDCB8I,20959
49
+ abstractruntime/storage/base.py,sha256=L4q8-41agEstcyWekO7DlCBFuIfELBITa1ZlssjYMOA,3261
50
+ abstractruntime/storage/commands.py,sha256=TTJhBXXts4qp5WyNMDFdK0tP5GxcDG7ttFctdzmhPLM,11548
51
+ abstractruntime/storage/in_memory.py,sha256=RCMhBNWqLhVMBDJorke0J1-ugFhB61plcl28Q3yZ7Q4,5397
52
+ abstractruntime/storage/json_files.py,sha256=O2NMrlZZ5fbSt_c30GNC_Wy9phzSX1UTwWZNK_o98S4,14964
53
+ abstractruntime/storage/ledger_chain.py,sha256=TnAWacQ9e58RAg2vKP8OU6WN8Re1PdqN72g574A2CGA,4717
54
+ abstractruntime/storage/observable.py,sha256=Jea83exiMiVf6woKRoDPVMMm8TgRodACgwcLjyj6PJM,4313
55
+ abstractruntime/storage/offloading.py,sha256=-SDnFnkn9Ldc4hu0v2HEOLI2_D9KFXDna0W3OuqmGUg,15826
56
+ abstractruntime/storage/snapshots.py,sha256=-IUlZ40Vxcyl3hKzKk_IxYxm9zumBhkSAzrcL9WpmcU,6481
57
+ abstractruntime/storage/sqlite.py,sha256=NJv_XiEdypEAJIZWicTuZX_B8GF-fnHmvGJ4-bt-E4I,31381
58
+ abstractruntime/visualflow_compiler/__init__.py,sha256=sE9h_YmWQrlG4cYq38b86j3ALJVjH1dw36ELd-NEpAQ,839
59
+ abstractruntime/visualflow_compiler/compiler.py,sha256=To9XSku6s3oVBfKoOLZ5Wn0_G-tUpfbcF0Mtnb1uwfQ,178415
60
+ abstractruntime/visualflow_compiler/flow.py,sha256=YAEXUwptshR0E2er9vY6s-oSGnPemPjLLTGCLlezWTE,7918
61
+ abstractruntime/visualflow_compiler/adapters/__init__.py,sha256=1My7MaQqrg9DRGNR3fq0PSGfs06ZpzuwHJnj7LRqX9A,360
62
+ abstractruntime/visualflow_compiler/adapters/agent_adapter.py,sha256=Gq0culPmbtkVmwaErvbbhE6zeDO_iHVMAR7LuiC4gYE,4648
63
+ abstractruntime/visualflow_compiler/adapters/context_adapter.py,sha256=3O1RrDZEotw8yTAQO5Ws1WrWTI_Wt4Ktcl2OR-HN3vA,3679
64
+ abstractruntime/visualflow_compiler/adapters/control_adapter.py,sha256=jTUY6lmq7s4mllf23bQ81hFo8uYnrt7HAKOC5MILaHM,22368
65
+ abstractruntime/visualflow_compiler/adapters/effect_adapter.py,sha256=ePeZ05myPBluEuRBrrb6wBSSApPdMpqkLd9A43oCFIQ,36381
66
+ abstractruntime/visualflow_compiler/adapters/event_adapter.py,sha256=x9_u5MOr3USAYsS8Y4u3JkZjto31K-NpNsGN6SIwcdM,11236
67
+ abstractruntime/visualflow_compiler/adapters/function_adapter.py,sha256=QGqkZ4tPTy2H5isz1dur3i6tObVWJ4r3Z2lbdOi3suQ,3040
68
+ abstractruntime/visualflow_compiler/adapters/memact_adapter.py,sha256=oFzIBLpelgyYaVoI995fjRgwSgYQncAgBj9Qm5CqyGQ,4499
69
+ abstractruntime/visualflow_compiler/adapters/subflow_adapter.py,sha256=NVD5iIiQdbmMUPrYJ0kocpTIaxlNqVOEDgw1DFQsUgI,2567
70
+ abstractruntime/visualflow_compiler/adapters/variable_adapter.py,sha256=-as81pki8HAhJgDBgJlTAiFSJhTI_kHNH2B3g-JptWc,12957
71
+ abstractruntime/visualflow_compiler/visual/__init__.py,sha256=2F4C-472gCqbKSPcd8qKYAOXWM62eMTjvBnPDCyyfzQ,301
72
+ abstractruntime/visualflow_compiler/visual/agent_ids.py,sha256=o3ajBWshM5o3t7uhKfZm8AxWVN0Bnw8ph3KB_UaCLWE,875
73
+ abstractruntime/visualflow_compiler/visual/builtins.py,sha256=9KYQfArsmfqcyvXMJ_0CMPImOwqR68r7qCv8_vNYp-w,43898
74
+ abstractruntime/visualflow_compiler/visual/code_executor.py,sha256=Kc30O5JG0Weh9yHAQclEeCocuEOc7T1Wp7E5cfcgf58,7612
75
+ abstractruntime/visualflow_compiler/visual/executor.py,sha256=3uOMD9n-rAxlKwvjZ1lbr3iuQmp55SleYSOsqaj2bx0,120176
76
+ abstractruntime/visualflow_compiler/visual/models.py,sha256=suxl4iaBJ0d_sM0Ipp6AgM4KGeX5kvMrCcQFU5sMs6o,6682
77
+ abstractruntime/workflow_bundle/__init__.py,sha256=X_jxymHX_lMR7p4gIgzsl8JtY4EetVHixRjr4uIgNTE,1570
78
+ abstractruntime/workflow_bundle/models.py,sha256=k66d7hTcPkUgmFoQmwEyy3_QTQ4j_UQliUrPmSY6Cd0,9745
79
+ abstractruntime/workflow_bundle/packer.py,sha256=1y08novqHLQOy8Y3E6sXhG2YsbSd0v361i1eeuZIRBo,11476
80
+ abstractruntime/workflow_bundle/reader.py,sha256=qkriecKkwyfDJLcwUjPhUEFp-sPJt9z1JVgXg3sbneg,3082
81
+ abstractruntime/workflow_bundle/registry.py,sha256=oy1L6Cginuqd5g2dStHkeAXw1PYhKQDtJNU4_v_fJPU,22128
82
+ abstractruntime-0.4.1.dist-info/METADATA,sha256=-5cY21OtNGcwL_6ZlnQrZKyoBya8oLCQyfj3RP4yc-E,6153
83
+ abstractruntime-0.4.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
84
+ abstractruntime-0.4.1.dist-info/entry_points.txt,sha256=4-KMU85GJkTOEBN3cNI7bvzwwhqAvGMCzup6RM-ZiCI,105
85
+ abstractruntime-0.4.1.dist-info/licenses/LICENSE,sha256=6rL4UIO5IdK59THf7fx0q6Hmxp5grSFi7-kWLcczseA,1083
86
+ abstractruntime-0.4.1.dist-info/RECORD,,
@@ -1,167 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: AbstractRuntime
3
- Version: 0.4.0
4
- Summary: AbstractRuntime: a durable graph runner designed to pair with AbstractCore.
5
- Project-URL: AbstractCore (website), https://www.abstractcore.ai/
6
- Project-URL: AbstractCore (GitHub), https://github.com/lpalbou/abstractruntime
7
- Author: Laurent-Philippe Albou
8
- License: MIT
9
- License-File: LICENSE
10
- Keywords: agents,checkpoint,durable,graph,llm,resume,workflow
11
- Classifier: Development Status :: 1 - Planning
12
- Classifier: Intended Audience :: Developers
13
- Classifier: License :: OSI Approved :: MIT License
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3 :: Only
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3.12
19
- Classifier: Programming Language :: Python :: 3.13
20
- Requires-Python: >=3.10
21
- Provides-Extra: abstractcore
22
- Requires-Dist: abstractcore>=2.6.8; extra == 'abstractcore'
23
- Provides-Extra: mcp-worker
24
- Requires-Dist: abstractcore[tools]>=2.6.8; extra == 'mcp-worker'
25
- Description-Content-Type: text/markdown
26
-
27
- ## AbstractRuntime
28
-
29
- **AbstractRuntime** is a low-level **durable workflow runtime**:
30
- - Execute workflow graphs (state machines)
31
- - **Interrupt → checkpoint → resume** (hours/days) without keeping Python stacks alive
32
- - Append-only **ledger** ("journal d’exécution") for audit/debug/provenance
33
-
34
- **Status**: MVP kernel + file persistence + AbstractCore integration adapters are implemented.
35
-
36
- ---
37
-
38
- ### Key concepts
39
- - **WorkflowSpec**: graph definition (node handlers keyed by id)
40
- - **RunState**: durable state (`current_node`, `vars`, `waiting`, etc.)
41
- - **Effect**: a side-effect request (`llm_call`, `tool_calls`, `ask_user`, `wait_event`, ...)
42
- - **Ledger**: append-only step records (`StepRecord`) describing what happened
43
-
44
- ---
45
-
46
- ### Quick start (pause + resume)
47
-
48
- ```python
49
- from abstractruntime import Effect, EffectType, Runtime, StepPlan, WorkflowSpec
50
- from abstractruntime.storage import InMemoryLedgerStore, InMemoryRunStore
51
-
52
-
53
- def ask(run, ctx):
54
- return StepPlan(
55
- node_id="ask",
56
- effect=Effect(
57
- type=EffectType.ASK_USER,
58
- payload={"prompt": "Continue?"},
59
- result_key="user_answer",
60
- ),
61
- next_node="done",
62
- )
63
-
64
-
65
- def done(run, ctx):
66
- return StepPlan(node_id="done", complete_output={"answer": run.vars.get("user_answer")})
67
-
68
-
69
- wf = WorkflowSpec(workflow_id="demo", entry_node="ask", nodes={"ask": ask, "done": done})
70
- rt = Runtime(run_store=InMemoryRunStore(), ledger_store=InMemoryLedgerStore())
71
-
72
- run_id = rt.start(workflow=wf)
73
- state = rt.tick(workflow=wf, run_id=run_id)
74
- assert state.status.value == "waiting"
75
-
76
- state = rt.resume(
77
- workflow=wf,
78
- run_id=run_id,
79
- wait_key=state.waiting.wait_key,
80
- payload={"text": "yes"},
81
- )
82
- assert state.status.value == "completed"
83
- ```
84
-
85
- ---
86
-
87
- ### Built-in Scheduler
88
-
89
- AbstractRuntime includes a zero-config scheduler for automatic run resumption:
90
-
91
- ```python
92
- from abstractruntime import create_scheduled_runtime
93
-
94
- # Zero-config: defaults to in-memory storage, auto-starts scheduler
95
- sr = create_scheduled_runtime()
96
-
97
- # run() does start + tick in one call
98
- run_id, state = sr.run(my_workflow)
99
-
100
- # If waiting for user input, respond (auto-finds wait_key)
101
- if state.status.value == "waiting":
102
- state = sr.respond(run_id, {"answer": "yes"})
103
-
104
- # Stop scheduler when done
105
- sr.stop()
106
- ```
107
-
108
- For production with persistent storage:
109
-
110
- ```python
111
- from abstractruntime import create_scheduled_runtime, JsonFileRunStore, JsonlLedgerStore
112
-
113
- sr = create_scheduled_runtime(
114
- run_store=JsonFileRunStore("./data"),
115
- ledger_store=JsonlLedgerStore("./data"),
116
- )
117
- ```
118
-
119
- ---
120
-
121
- ### AbstractCore integration (LLM + tools)
122
-
123
- AbstractRuntime’s kernel stays dependency-light; AbstractCore integration lives in:
124
- - `src/abstractruntime/integrations/abstractcore/`
125
-
126
- Execution modes:
127
- - **Local**: in-process AbstractCore providers + local tool execution
128
- - **Remote**: HTTP to AbstractCore server (`/v1/chat/completions`) + tool passthrough (default)
129
- - **Hybrid**: remote LLM + local tool execution
130
-
131
- See: `docs/integrations/abstractcore.md`.
132
-
133
- ---
134
-
135
- ### Snapshots / bookmarks
136
-
137
- Snapshots are named, searchable checkpoints of a run state:
138
- - `Snapshot(snapshot_id, run_id, name, description, tags, run_state)`
139
-
140
- See: `docs/snapshots.md`.
141
-
142
- ---
143
-
144
- ### Provenance (tamper-evident ledger)
145
-
146
- You can wrap any `LedgerStore` with a hash chain:
147
-
148
- - `HashChainedLedgerStore(inner_store)`
149
- - `verify_ledger_chain(records)`
150
-
151
- This is **tamper-evident**, not non-forgeable (signatures are optional future work).
152
-
153
- See: `docs/provenance.md`.
154
-
155
- ---
156
-
157
- ### Documentation index
158
-
159
- | Document | Description |
160
- |----------|-------------|
161
- | [Proposal](docs/proposal.md) | Design goals, core concepts, and scope |
162
- | [ROADMAP](ROADMAP.md) | Prioritized next steps with rationale |
163
- | [ADRs](docs/adr/) | Architectural decisions and their rationale |
164
- | [Backlog](docs/backlog/) | Completed and planned work items |
165
- | [Integrations](docs/integrations/) | AbstractCore integration guide |
166
- | [Snapshots](docs/snapshots.md) | Named checkpoints for run state |
167
- | [Provenance](docs/provenance.md) | Tamper-evident ledger documentation |
@@ -1,49 +0,0 @@
1
- abstractruntime/__init__.py,sha256=hO9d8o5R-9TF7TrxybMdRvtE0jQBO7t2nkMkZQDEnnY,2804
2
- abstractruntime/core/__init__.py,sha256=msUcfYjAwjkiEgvi-twteo1H11oBclYJFXqYVWlf8JQ,547
3
- abstractruntime/core/config.py,sha256=U8cZbovq8dNI_7NaPkKiBwuGxABezhqytrN1L_lASJs,4672
4
- abstractruntime/core/event_keys.py,sha256=5YECNuMkJV_pCGGV5uXzNU5LtGIy2Nu1I9JKiLrZb_c,1782
5
- abstractruntime/core/models.py,sha256=-vYRcnm2G5PL8LsAhNU7rEyGHAzVpmHjLnn3hGCy0Dc,8490
6
- abstractruntime/core/policy.py,sha256=C8tmxaY8YCTvs8_5-5Ns6tsFdCVE_G2vHBOiEckeg9Y,5115
7
- abstractruntime/core/runtime.py,sha256=XeipSjlShb5P6ZT1ak7BFPiKAkiJtdoNfSWYL5QZZuA,130066
8
- abstractruntime/core/spec.py,sha256=SBxAFaaIe9eJTRDMEgDub-GaF2McHTDkEgIl3L-DXbE,1461
9
- abstractruntime/core/vars.py,sha256=SdDRpHVf4LL5PyHIn7QFx82Gc9HMgnPKis82QZWLMFk,6178
10
- abstractruntime/evidence/__init__.py,sha256=pSfu8fdvvjGKclJdQ-5dUVc4KIDKLSq_MpOTDSQFvw0,212
11
- abstractruntime/evidence/recorder.py,sha256=oqMDDqs6vj_DZDpLZrnHC9zhQo0Yzm28qKu1_HHrL_A,12894
12
- abstractruntime/identity/__init__.py,sha256=aV_aA6lfqsIQMPE2S0B0AKi0rnb-_vmKYpgv1wWoaq8,119
13
- abstractruntime/identity/fingerprint.py,sha256=axQFEHSJFsrYGNkikkfEVhNNQxdR8wBmv4TuVbTs0lM,1748
14
- abstractruntime/integrations/__init__.py,sha256=CnhKNxeT-rCeJRURWOXT8YBZ7HJPOESJROV5cnEwJoQ,408
15
- abstractruntime/integrations/abstractcore/__init__.py,sha256=7i-vqiXabK5gZnyUUqs_jKzfjGCJLFwC92BpTq06XWQ,1440
16
- abstractruntime/integrations/abstractcore/constants.py,sha256=INu273hahMySNiNUIqUK7HhbXs-oJe0OjbsYyXiU92U,690
17
- abstractruntime/integrations/abstractcore/default_tools.py,sha256=AQikJhja0ejy918oRMwh6o7rEPk1zokuEpy9VxxvK5Y,4209
18
- abstractruntime/integrations/abstractcore/effect_handlers.py,sha256=8AM3LuKYTu5bwS7hL9BOM5IMh-2i-ajj8O1mqjYNXO0,15381
19
- abstractruntime/integrations/abstractcore/factory.py,sha256=9T0369jNtDghPH2zaTbuUE1zKIqvBYxglDaCpTorwcc,9894
20
- abstractruntime/integrations/abstractcore/llm_client.py,sha256=6W1uB6tW3p_X7m63e8vegpQceHqZUbscKtw46wBrXG4,29625
21
- abstractruntime/integrations/abstractcore/logging.py,sha256=iYmibudvLXs83hhF-dpbgEoyUdzTo8tnT4dV-cC6uyE,683
22
- abstractruntime/integrations/abstractcore/mcp_worker.py,sha256=rB2f0xbxA-WgnV44VBkonHR44inH0hxXZSVMrbwbo5Q,22514
23
- abstractruntime/integrations/abstractcore/observability.py,sha256=YPTBrr5IPr7vCgBoClNaxTo09M1MdVko4OEN3lMxrpc,2527
24
- abstractruntime/integrations/abstractcore/summarizer.py,sha256=lobota-K5mKMbDBgxIXczK_SHGmhZ832VwIMgtSvagw,5431
25
- abstractruntime/integrations/abstractcore/tool_executor.py,sha256=LbA4GilPfbNYUAZv404fUCzjs2h_WTWZBpkBTMKWHrU,23646
26
- abstractruntime/memory/__init__.py,sha256=0Ew8Z4z0vttW0rLYc6FnysU0UXFEtE6eDUf7kC_0MK0,689
27
- abstractruntime/memory/active_context.py,sha256=py5_LZpUQ83blC-62SPh_-tDC8-iKAwSiJo9RpQ893A,28565
28
- abstractruntime/memory/active_memory.py,sha256=hJy5ssx_fi4nTcoVlAFG3qZz4OzOczVC0Benxduw6CE,16565
29
- abstractruntime/memory/compaction.py,sha256=oZfjfsM9CzLT0xWv4jmWkKIgq3FWh20RAniY-pc7Oxg,3505
30
- abstractruntime/rendering/__init__.py,sha256=SgOW1wRic90sMVRKseATR4h6-9LZrx9FOlNA8t2XpyM,491
31
- abstractruntime/rendering/agent_trace_report.py,sha256=SqEl4oj4s1YVfsO_GLK3XdFO-aKnH6yNlb-eqGsm9TE,9458
32
- abstractruntime/rendering/json_stringify.py,sha256=llYWiNR9Ywu41V1ly0GGjLZO2BqmaG2bwEjfLXtBTDg,4198
33
- abstractruntime/scheduler/__init__.py,sha256=ZwFJQrBN3aQOv7xuGXsURXEEBJAHV6qVQy13DYvbhqw,337
34
- abstractruntime/scheduler/convenience.py,sha256=Rremvw_P3JMQ-NOkwn7ATlD5HPkKxRtSGJRfBkimyJY,10278
35
- abstractruntime/scheduler/registry.py,sha256=0iqcTcCV0bYmhw-T7n8TFoZXVkhBRZt89AebXz_Z5fc,2969
36
- abstractruntime/scheduler/scheduler.py,sha256=TSIz0sZeH-O7Vb3RSBsXv9qKrD62ttg_pMecYHAwKyE,16570
37
- abstractruntime/storage/__init__.py,sha256=z1qmXdUm9q_5iCi2J9_KIGoTCWxQG4-_WSi5u3AoJUM,844
38
- abstractruntime/storage/artifacts.py,sha256=bvVTLMOpauNyz2_fT4MGXiuB8Ill-_y9zkWQ7OxNQe4,16129
39
- abstractruntime/storage/base.py,sha256=QkNjtHRhqRHHg5FbEP9CVNjL97RTFcy4y8vNRPtVVvc,2758
40
- abstractruntime/storage/in_memory.py,sha256=baSlhu5ZPEFS82PvYwW89n0PbK7JmS1H07qlrPf40rI,3534
41
- abstractruntime/storage/json_files.py,sha256=Mhrq7SeWC4RYkPlflcUuVzbEskLUVfc4LdIghOr23Ko,7459
42
- abstractruntime/storage/ledger_chain.py,sha256=TnAWacQ9e58RAg2vKP8OU6WN8Re1PdqN72g574A2CGA,4717
43
- abstractruntime/storage/observable.py,sha256=B0MK5GKsU7wdfF8Fkj7si7ivToKJCZXaF3AnPwOM5qM,2897
44
- abstractruntime/storage/snapshots.py,sha256=-IUlZ40Vxcyl3hKzKk_IxYxm9zumBhkSAzrcL9WpmcU,6481
45
- abstractruntime-0.4.0.dist-info/METADATA,sha256=e8XN94ocwrmd4kcxTHSRaQOGoNqdLZNgaYSKupWLo6Q,5178
46
- abstractruntime-0.4.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
47
- abstractruntime-0.4.0.dist-info/entry_points.txt,sha256=4-KMU85GJkTOEBN3cNI7bvzwwhqAvGMCzup6RM-ZiCI,105
48
- abstractruntime-0.4.0.dist-info/licenses/LICENSE,sha256=6rL4UIO5IdK59THf7fx0q6Hmxp5grSFi7-kWLcczseA,1083
49
- abstractruntime-0.4.0.dist-info/RECORD,,