akribes 0.21.17__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.
@@ -0,0 +1,236 @@
1
+ Metadata-Version: 2.4
2
+ Name: akribes
3
+ Version: 0.21.17
4
+ Summary: Pythonic async client for the Akribes workflow server
5
+ Author-email: Podesta <info@podesta.ai>
6
+ License: MIT
7
+ Project-URL: Homepage, https://akribes.ai
8
+ Project-URL: Repository, https://github.com/PodestaAI/akribes-sdks
9
+ Project-URL: Documentation, https://akribes.ai
10
+ Project-URL: Issues, https://github.com/PodestaAI/akribes-sdks/issues
11
+ Project-URL: Changelog, https://github.com/PodestaAI/akribes-sdks/blob/main/packages/akribes-sdk-python/CHANGELOG.md
12
+ Keywords: akribes,llm,ai-workflows,agent,dsl,sdk
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: httpx>=0.27.0
28
+ Requires-Dist: httpx-sse>=0.4.0
29
+ Requires-Dist: pydantic>=2.6
30
+ Requires-Dist: typing-extensions>=4.10
31
+ Requires-Dist: websockets>=12.0
32
+ Provides-Extra: otel
33
+ Requires-Dist: opentelemetry-api>=1.20; extra == "otel"
34
+ Provides-Extra: test
35
+ Requires-Dist: pytest>=8.0.0; extra == "test"
36
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == "test"
37
+ Requires-Dist: respx>=0.21.0; extra == "test"
38
+ Requires-Dist: opentelemetry-api>=1.20; extra == "test"
39
+ Requires-Dist: opentelemetry-sdk>=1.20; extra == "test"
40
+ Dynamic: license-file
41
+
42
+ # akribes
43
+
44
+ Pythonic async client for the [Akribes](https://akribes.ai) workflow server.
45
+
46
+ Requires Python 3.10+.
47
+
48
+ ## Install
49
+
50
+ ```bash
51
+ pip install akribes
52
+ # or with optional OpenTelemetry support:
53
+ pip install 'akribes[otel]'
54
+ ```
55
+
56
+ ## Quick start
57
+
58
+ ```python
59
+ import asyncio
60
+ from akribes_sdk import AkribesClient
61
+
62
+ async def main():
63
+ async with AkribesClient("https://akribes.example.com", token="akribes_tk_...") as client:
64
+ proj = client.project(2)
65
+ output = await proj.script("summarize").run_and_await(brief="explain quantum")
66
+ print(output.execution_id, output.result)
67
+
68
+ asyncio.run(main())
69
+ ```
70
+
71
+ ## Construction
72
+
73
+ ```python
74
+ import os
75
+ from datetime import timedelta
76
+ from akribes_sdk import AkribesClient, RetryPolicy
77
+
78
+ client = AkribesClient(
79
+ "https://akribes.example.com",
80
+ token=os.environ["AKRIBES_TOKEN"],
81
+ timeout=timedelta(seconds=30),
82
+ retry=RetryPolicy(max_attempts=4), # retries transients + 429 by default
83
+ otel=True, # opt-in OTel auto-instrumentation
84
+ )
85
+ ```
86
+
87
+ ## Project handles
88
+
89
+ ```python
90
+ proj = client.project(2) # sync, lazy
91
+ proj = await client.get_project("podesta-staging") # async, resolves name → id
92
+ sandbox = await client.sandbox() # per-user sandbox project
93
+ ```
94
+
95
+ ## Typed inputs (codegen)
96
+
97
+ Generate typed `ScriptType[I, O]` stubs from a live server:
98
+
99
+ ```bash
100
+ akribes types pull --project podesta --lang python --out src/akribes_types/
101
+ ```
102
+
103
+ Then:
104
+
105
+ ```python
106
+ from akribes_types.podesta import summarize # ScriptType[I, O] with typed input/output
107
+
108
+ out = await proj.run(summarize, brief="hi", tone="formal")
109
+ # IDE knows brief: str, tone: Literal["formal","casual"]
110
+ print(out.execution_id, out.result)
111
+ ```
112
+
113
+ ## Streaming
114
+
115
+ ```python
116
+ run = await proj.executions.run_stream("summarize", brief="hi")
117
+ async for evt in run:
118
+ match evt.kind:
119
+ case "agent_chunk": print(evt.chunk, end="")
120
+ case "task_end": print(f"\n[task {evt.task!r} done]")
121
+ case "error": print(f"\n[error {evt.message}]")
122
+ output = await run.output()
123
+ ```
124
+
125
+ ## Document ingest
126
+
127
+ ```python
128
+ from pathlib import Path
129
+
130
+ # One-liner
131
+ result = await proj.documents.ingest_and_wait(Path("invoice.pdf"))
132
+
133
+ # With progress
134
+ handle = proj.documents.ingest(Path("invoice.pdf"))
135
+ async for evt in handle:
136
+ print(evt)
137
+ result = await handle.result()
138
+ ```
139
+
140
+ ## Subscribe (long-lived events)
141
+
142
+ ```python
143
+ async with proj.events.subscribe(interests=[{"script_name": "summarize"}]) as sub:
144
+ async for evt in sub:
145
+ print(evt)
146
+ ```
147
+
148
+ Heartbeat runs for the lifetime of the subscription only — not automatically on client construction.
149
+
150
+ ## Pagination
151
+
152
+ ```python
153
+ async for script in proj.scripts.list():
154
+ print(script.name)
155
+
156
+ # Or materialise
157
+ scripts = await proj.scripts.list().to_list()
158
+ first = await proj.scripts.list().first()
159
+ top10 = await proj.scripts.list().take(10)
160
+ ```
161
+
162
+ ## Error handling
163
+
164
+ ```python
165
+ from akribes_sdk import (
166
+ AkribesError, AuthError, NotFoundError, TransientError,
167
+ RateLimitError, ScriptError, AkribesTimeoutError,
168
+ )
169
+
170
+ try:
171
+ output = await proj.run_and_await("summarize", brief="hi")
172
+ except AuthError: # 401/403
173
+ ...
174
+ except NotFoundError: # 404
175
+ ...
176
+ except TransientError: # 502/503 (retried by default)
177
+ ...
178
+ except RateLimitError: # 429 (retried by default, respects Retry-After)
179
+ ...
180
+ except ScriptError as e: # workflow failed; e.error_kind, e.execution_id
181
+ ...
182
+ ```
183
+
184
+ ## Tokens
185
+
186
+ ```python
187
+ from datetime import timedelta
188
+ minted = await client.tokens.mint(
189
+ scopes={"projects": "*", "role": "admin"},
190
+ expires_in=timedelta(hours=8),
191
+ label="web-session",
192
+ user_email="alice@acme.com",
193
+ )
194
+ print(minted.token) # ship to the browser
195
+ ```
196
+
197
+ ## Authentication
198
+
199
+ `AkribesClient` accepts either a **service token** (long-lived, set via
200
+ `AKRIBES_SERVICE_TOKEN_<NAME>=<scope>:<secret>` on the server) or a **scoped
201
+ token** (`akribes_tk_...` — legacy `aura_tk_...` still accepted — minted
202
+ via `client.tokens.mint(...)`).
203
+
204
+ ### Prefer `Authorization: Bearer` over `?token=…` (#789)
205
+
206
+ `AkribesClient` always sends the token in the `Authorization` header
207
+ for HTTP requests and WebSocket upgrades. The `?token=…` query-string
208
+ form exists only because browser `EventSource` / `WebSocket`
209
+ constructors cannot set arbitrary headers — treat it as a browser-only
210
+ escape hatch.
211
+
212
+ For CLIs, scripts, and backend services, avoid `?token=…` because:
213
+
214
+ - Reverse proxies, ingress controllers, and CDNs log the full URL
215
+ (including the token) in access logs by default.
216
+ - CI runners (Forgejo Actions, GitHub Actions) echo `curl` commands
217
+ into job logs.
218
+ - Browsers leak `?token=` in the `Referer` header on cross-origin
219
+ sub-resource requests.
220
+
221
+ The server stamps `X-Token-Source: query-param` on responses to any
222
+ request that used the query fallback so operators can chart adoption.
223
+
224
+ ---
225
+
226
+ See `examples/` for runnable end-to-end demos.
227
+
228
+ Upgrading from v0.20.x? See [MIGRATION-0.21.md](./MIGRATION-0.21.md).
229
+
230
+ - Source mirror: <https://github.com/PodestaAI/akribes-sdks>
231
+ - Language guide: <https://akribes.ai/docs>
232
+ - Issues: <https://github.com/PodestaAI/akribes-sdks/issues>
233
+
234
+ ## License
235
+
236
+ MIT
@@ -0,0 +1,39 @@
1
+ akribes-0.21.17.dist-info/licenses/LICENSE,sha256=AkGMPHFQaCG_v30NPbjxK4Gvj2UqBLkPmWa842xo9gU,1064
2
+ akribes_sdk/__init__.py,sha256=huhcS2SH6PRD5RVTYtxkqhzkxwiDWA7LdpdIQX5SZwU,8621
3
+ akribes_sdk/_handles.py,sha256=7V87-x-wWPyPAUGbJotQvL_5w6CIGE8jVhFMQ-vX3Cs,11682
4
+ akribes_sdk/_otel.py,sha256=rJJBuIuSbbivuc6z8N51NkpCBIgt2atCh9GuYAkuPVw,1942
5
+ akribes_sdk/_pagination.py,sha256=_zZaWkN6TS5MsQzbmlrRWn1nBIpN1QjU-n-V3PuLwv8,2009
6
+ akribes_sdk/_parsers.py,sha256=EldBzsArWuH9u4GIkYPeG3lkman1G2-bRdecGIQRfO0,25110
7
+ akribes_sdk/_retry.py,sha256=CW90qQKS0870hDE8DtNwjkZXN2XtTJVO21olg1DYrhU,4713
8
+ akribes_sdk/_timing.py,sha256=2mRLSsRSaHXhp-ujy_Ivkz7ePsIQNh9nx67qdoI_P04,631
9
+ akribes_sdk/_token_safety.py,sha256=9CdBcgtp7DK7H9tUP5ZpjdeSxI49UGhXWBJ4gj63MII,1492
10
+ akribes_sdk/_transport.py,sha256=CrTfAWDyDhuDN38pmXFPxGmq30ivnBaPA3gtSHZ7L6M,14334
11
+ akribes_sdk/client.py,sha256=VhDVmjYjFv52b3JgJFFhBC22tnRf8UBnrHit2RW6JM0,22503
12
+ akribes_sdk/errors.py,sha256=lcdX-g7IqbFGwWrwUS2fn3d9UcXXqi7V8PRER4hUti8,15317
13
+ akribes_sdk/ingest_handle.py,sha256=1jx126EJdaF6EuNFSiKUSSdaJjIqVAvNulvKvz8Gj5A,3900
14
+ akribes_sdk/models.py,sha256=mQM864VLPwACuxjsPItOm0PkB9OYXGs7f2Ma21KRWow,47928
15
+ akribes_sdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
+ akribes_sdk/run_stream.py,sha256=Mw79KqpFPUY_AgdYHilIbyeBGfURW1s7mWpN-Ec7XpI,19452
17
+ akribes_sdk/script_type.py,sha256=6bKg54xBSXcoFQ62HvSIOyh33glZqx4hZjDL4gtajMU,2075
18
+ akribes_sdk/types.py,sha256=ZRXhaknLcSe5-qZsAUw8zanAN_Pa9uK8aaMBW_GyVdk,2172
19
+ akribes_sdk/workflow_events.py,sha256=EXYhZlHOiJkNSq71GB_4KaguSAfe--Z0-ESztaVL4mU,38734
20
+ akribes_sdk/resources/__init__.py,sha256=wtUaAaiauWI_Jdqf4QdwLuOoxvEZ-6H9S5KhvfGFaQc,1050
21
+ akribes_sdk/resources/_base.py,sha256=65IM5lbaRwkww9qd1NKm9Mt-eMnnlNbqqxLoEdKXgPc,3239
22
+ akribes_sdk/resources/_sentinel.py,sha256=_ri_arV94v5Nw5VepXcS6q6Qb443c_TJBhEnT7Nw1_0,669
23
+ akribes_sdk/resources/channels.py,sha256=Nf__iBVXiDwTQGszg0l_dHp7PdMjxgfqJmNUOq-7RbQ,1705
24
+ akribes_sdk/resources/clients.py,sha256=p7GvIOeTDeTTjCXpL-1xwqGsI715NXGnEF3EBLxV2Z8,3377
25
+ akribes_sdk/resources/documents.py,sha256=fETPctomD7fi7IIkGVfuRG2vtLHZH0tA5FjlDG3kphk,16586
26
+ akribes_sdk/resources/drafts.py,sha256=2qLmJOnMl410jjMO-etfv7TUM_xcU0-sqSpxdFq5J_o,1246
27
+ akribes_sdk/resources/evals.py,sha256=yk82xqP2YHU871ouf_EgIB21-1PxwIEPKWS1PTq6974,8595
28
+ akribes_sdk/resources/events.py,sha256=DhHMkVTnqk2qsrhU-1EdJuRIoKwWUqDIYZimp0AyS7M,32207
29
+ akribes_sdk/resources/executions.py,sha256=D8YEEJ6rMxrz0j_v08DYMPOYie6WBaiLBA-UdR5wG2s,21206
30
+ akribes_sdk/resources/mcp.py,sha256=IdEh0YUvQPzDBYkNzxcX166UHBvHF0qfkWgMNQUR4LM,1976
31
+ akribes_sdk/resources/me.py,sha256=VWCxW4M1bdL7CTMngdWR58wIlwDQ3ZPNZIRVYlUX0dM,1065
32
+ akribes_sdk/resources/projects.py,sha256=ObNUoxDWT7RI1qIve-V1a7XDc_xfb_vR4b-tO5O0wW8,6335
33
+ akribes_sdk/resources/scripts.py,sha256=RtqXhSZ2x631WgkXraM3UlDHmS3eYKQCGprkhwXTRbg,3438
34
+ akribes_sdk/resources/tokens.py,sha256=g9KXyZLUZp58Thm2Qkahw3bQD2GnhBBsrpLfyjxPpOk,3437
35
+ akribes_sdk/resources/versions.py,sha256=QIyUlsRbN0XavKrE1ZIOEBt07xM3dvSZvuv0x1u_BLA,3437
36
+ akribes-0.21.17.dist-info/METADATA,sha256=tttXX78Db15Zu1p2kUbmcDu_9ap4bSwSmbbbBKzU_4s,6896
37
+ akribes-0.21.17.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
38
+ akribes-0.21.17.dist-info/top_level.txt,sha256=jJZu7eTgBdHI5CtfG1o3NknV2tCv2n3OcJ15Fhs6KBg,12
39
+ akribes-0.21.17.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Podesta
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ akribes_sdk
@@ -0,0 +1,365 @@
1
+ """Akribes SDK for Python — async client for the Akribes workflow server.
2
+
3
+ Quick start::
4
+
5
+ import asyncio, os
6
+ from akribes_sdk import AkribesClient
7
+
8
+ async def main():
9
+ async with AkribesClient(
10
+ "https://akribes.example.com",
11
+ token=os.environ["AKRIBES_TOKEN"],
12
+ ) as client:
13
+ proj = client.project(2)
14
+ output = await proj.script("summarize").run_and_await(brief="…")
15
+ print(output.execution_id, output.result)
16
+
17
+ asyncio.run(main())
18
+
19
+ Event stream layering
20
+ ---------------------
21
+ Three progressively richer APIs sit on top of the same SSE connection:
22
+
23
+ 1. Layer 1 — :class:`EngineEvent` (raw ``{type, payload}``): escape hatch
24
+ for anything the typed layer doesn't model.
25
+ 2. Layer 2 — :class:`WorkflowEvent`: frozen-dataclass discriminated union
26
+ matched on ``evt.kind`` (a ``Literal`` tag), with an :class:`Other`
27
+ catch-all. Use :func:`to_workflow_event` for ad-hoc conversion.
28
+ 3. Layer 3 — :class:`RunStream` from
29
+ :meth:`Executions.run_stream`: async-iterable handle that also exposes
30
+ ``await .output()``, ``.execution_id``, and ``.on.<category>(cb)``
31
+ callback registration.
32
+ """
33
+
34
+ from akribes_sdk._handles import ProjectHandle, ScriptHandle
35
+ from akribes_sdk._pagination import AsyncPage
36
+ from akribes_sdk._retry import ExponentialBackoff, RetryPolicy
37
+ from akribes_sdk.client import AkribesClient
38
+ from akribes_sdk.ingest_handle import IngestHandle, IngestEvent
39
+ from akribes_sdk.script_type import ScriptType
40
+ from akribes_sdk.errors import (
41
+ AkribesConnectionError,
42
+ AkribesConversionError,
43
+ AkribesError,
44
+ AkribesHTTPError,
45
+ AkribesTimeoutError,
46
+ AuthError,
47
+ DocumentConversionError,
48
+ IngestProtocolError,
49
+ IngestTimeoutError,
50
+ BadGateway502,
51
+ GatewayTimeout504,
52
+ NotFoundError,
53
+ RateLimitError,
54
+ ScriptError,
55
+ ScriptInputMismatchError,
56
+ ScriptSchemaChangedError,
57
+ ServerError500,
58
+ ServiceUnavailable503,
59
+ TransientError,
60
+ )
61
+ from akribes_sdk.resources.documents import (
62
+ DEFAULT_INGEST_POLL_TIMEOUT_MS,
63
+ DocumentsClient,
64
+ ingest_poll_timeout_ms_from_env,
65
+ )
66
+ from akribes_sdk.resources.me import Me
67
+ from akribes_sdk.models import (
68
+ AdhocRunResult,
69
+ AgentOutputEvent,
70
+ AgentUnableTrigger,
71
+ BreakingInterest,
72
+ ClaimHit,
73
+ ClaimMiss,
74
+ ClaimResult,
75
+ ClientInfo,
76
+ ContextCompactedEvent,
77
+ ContextOverflowEvent,
78
+ ContractWarning,
79
+ ConversionStatus,
80
+ ConvertResult,
81
+ CostAggregation,
82
+ CostByChannel,
83
+ CostByScript,
84
+ CostByVersion,
85
+ DagPositionTrigger,
86
+ Draft,
87
+ EngineEvent,
88
+ EngineEventType,
89
+ IngestPhase,
90
+ IngestProgress,
91
+ ErrorKind,
92
+ EvalResult,
93
+ EvalRun,
94
+ EvalSuite,
95
+ EvalSuiteSummary,
96
+ ExecutionChildSummary,
97
+ ExecutionEvents,
98
+ ExecutionOutput,
99
+ ExecutionStatus,
100
+ ExecutionStatusValue,
101
+ DocumentMeta,
102
+ GraphEdge,
103
+ GraphNode,
104
+ GraphResponse,
105
+ ScriptGraph,
106
+ HubEvent,
107
+ InputField,
108
+ LatestVersion,
109
+ LogEvent,
110
+ McpDriftResult,
111
+ McpHealth,
112
+ McpRefreshResult,
113
+ McpServerSummary,
114
+ McpToolSummary,
115
+ Project,
116
+ ProjectScope,
117
+ ProjectCost,
118
+ PublishDryRunResult,
119
+ PutDraftResponse,
120
+ ReconvertResult,
121
+ RunResult,
122
+ ScriptCost,
123
+ RuntimeEndEvent,
124
+ RuntimeErrorEvent,
125
+ RuntimeStartEvent,
126
+ RuntimeStderrEvent,
127
+ RuntimeStdoutEvent,
128
+ S3CredentialsRef,
129
+ S3DocumentRef,
130
+ S3PresignedRef,
131
+ SandboxInfo,
132
+ Script,
133
+ ScriptChannel,
134
+ ScriptVersion,
135
+ UploadResult,
136
+ SuspendedEvent,
137
+ SuspendTrigger,
138
+ TaskEndEvent,
139
+ TaskStartEvent,
140
+ TokenInfo,
141
+ TokenMinted,
142
+ TokenRole,
143
+ TokenScopes,
144
+ TokenUsage,
145
+ ToolApprovalPendingEvent,
146
+ TypedEngineEvent,
147
+ TypeRef,
148
+ UnableCategoryValue,
149
+ UnableRecord,
150
+ UnknownEvent,
151
+ UnknownTrigger,
152
+ ValidationErrorWire,
153
+ ValidationExhaustedTrigger,
154
+ ValidationFailureEvent,
155
+ WorkflowEndEvent,
156
+ WorkflowStartEvent,
157
+ parse_engine_event,
158
+ parse_suspend_trigger,
159
+ )
160
+ from akribes_sdk.run_stream import RunStream, RunStreamCallbacks
161
+ from akribes_sdk.workflow_events import (
162
+ AgentChunk,
163
+ Breakpoint,
164
+ Checkpoint,
165
+ End,
166
+ EventCategory,
167
+ Other,
168
+ RuntimeEnd,
169
+ RuntimeError,
170
+ RuntimeStart,
171
+ RuntimeStatus,
172
+ RuntimeStderr,
173
+ RuntimeStdout,
174
+ WorkflowTotals,
175
+ RuntimeStep,
176
+ RuntimeWorkflowEvent,
177
+ Start,
178
+ TaskEnd,
179
+ TaskStart,
180
+ ToolApproval,
181
+ ToolCallEnd,
182
+ ToolCallStart,
183
+ ValidationFailure,
184
+ WorkflowError,
185
+ WorkflowErrorKind,
186
+ WorkflowEvent,
187
+ category_of,
188
+ reduce_runtime_events,
189
+ reduce_runtime_events_async,
190
+ to_workflow_event,
191
+ )
192
+ # Re-export the per-variant `ErrorEvent` class from the legacy typed-engine-event
193
+ # layer in `models`. The new typed `WorkflowEvent::Error` variant lives at
194
+ # `WorkflowError` to avoid the name clash.
195
+ from akribes_sdk.models import ErrorEvent
196
+
197
+ __version__ = "0.21.0"
198
+
199
+ __all__ = [
200
+ "__version__",
201
+ # Client + handles
202
+ "AkribesClient",
203
+ "AsyncPage",
204
+ "IngestHandle",
205
+ "IngestEvent",
206
+ "ProjectHandle",
207
+ "ScriptHandle",
208
+ "ScriptType",
209
+ # Retry policy
210
+ "RetryPolicy",
211
+ "ExponentialBackoff",
212
+ # Errors
213
+ "AkribesError",
214
+ "AkribesConnectionError",
215
+ "AkribesHTTPError",
216
+ "AuthError",
217
+ "NotFoundError",
218
+ "RateLimitError",
219
+ "TransientError",
220
+ "ServerError500",
221
+ "BadGateway502",
222
+ "ServiceUnavailable503",
223
+ "GatewayTimeout504",
224
+ "ScriptError",
225
+ "AkribesTimeoutError",
226
+ "AkribesConversionError",
227
+ "DocumentConversionError",
228
+ "IngestProtocolError",
229
+ "IngestTimeoutError",
230
+ "ScriptSchemaChangedError",
231
+ "ScriptInputMismatchError",
232
+ # Models
233
+ "AdhocRunResult",
234
+ "BreakingInterest",
235
+ "ClaimHit",
236
+ "ClaimMiss",
237
+ "ClaimResult",
238
+ "ClientInfo",
239
+ "ContractWarning",
240
+ "ContextCompactedEvent",
241
+ "ContextOverflowEvent",
242
+ "ConversionStatus",
243
+ "CostAggregation",
244
+ "CostByChannel",
245
+ "CostByScript",
246
+ "CostByVersion",
247
+ "ConvertResult",
248
+ "Draft",
249
+ "EngineEvent",
250
+ "EngineEventType",
251
+ "ErrorEvent",
252
+ "ErrorKind",
253
+ "EvalResult",
254
+ "EvalRun",
255
+ "EvalSuite",
256
+ "EvalSuiteSummary",
257
+ "ExecutionEvents",
258
+ "ExecutionOutput",
259
+ "ExecutionChildSummary",
260
+ "DocumentMeta",
261
+ "ExecutionStatus",
262
+ "ExecutionStatusValue",
263
+ "GraphEdge",
264
+ "GraphNode",
265
+ "GraphResponse",
266
+ "ScriptGraph",
267
+ "HubEvent",
268
+ "IngestPhase",
269
+ "IngestProgress",
270
+ "InputField",
271
+ "LatestVersion",
272
+ "McpDriftResult",
273
+ "McpHealth",
274
+ "McpRefreshResult",
275
+ "McpServerSummary",
276
+ "McpToolSummary",
277
+ "Project",
278
+ "ProjectScope",
279
+ "ProjectCost",
280
+ "PublishDryRunResult",
281
+ "PutDraftResponse",
282
+ "ReconvertResult",
283
+ "RunResult",
284
+ "ScriptCost",
285
+ "S3CredentialsRef",
286
+ "S3DocumentRef",
287
+ "S3PresignedRef",
288
+ "SandboxInfo",
289
+ "Script",
290
+ "ScriptChannel",
291
+ "ScriptVersion",
292
+ "TokenInfo",
293
+ "UploadResult",
294
+ # Documents resource
295
+ "DEFAULT_INGEST_POLL_TIMEOUT_MS",
296
+ "DocumentsClient",
297
+ "Me",
298
+ "ingest_poll_timeout_ms_from_env",
299
+ "TokenMinted",
300
+ "TokenRole",
301
+ "TokenScopes",
302
+ "TokenUsage",
303
+ "TypeRef",
304
+ # SuspendTrigger + UnableRecord (Wave 4 — EPA S4 + S6)
305
+ "AgentUnableTrigger",
306
+ "DagPositionTrigger",
307
+ "SuspendTrigger",
308
+ "UnableCategoryValue",
309
+ "UnableRecord",
310
+ "UnknownTrigger",
311
+ "ValidationErrorWire",
312
+ "ValidationExhaustedTrigger",
313
+ "parse_suspend_trigger",
314
+ # Legacy per-variant event classes (still exported for back-compat)
315
+ "AgentOutputEvent",
316
+ "LogEvent",
317
+ "RuntimeEndEvent",
318
+ "RuntimeErrorEvent",
319
+ "RuntimeStartEvent",
320
+ "RuntimeStderrEvent",
321
+ "RuntimeStdoutEvent",
322
+ "SuspendedEvent",
323
+ "TaskEndEvent",
324
+ "TaskStartEvent",
325
+ "ToolApprovalPendingEvent",
326
+ "TypedEngineEvent",
327
+ "UnknownEvent",
328
+ "ValidationFailureEvent",
329
+ "WorkflowEndEvent",
330
+ "WorkflowStartEvent",
331
+ "parse_engine_event",
332
+ # Typed WorkflowEvent (Layer 2)
333
+ "AgentChunk",
334
+ "Breakpoint",
335
+ "Checkpoint",
336
+ "End",
337
+ "WorkflowTotals",
338
+ "EventCategory",
339
+ "Other",
340
+ "RuntimeEnd",
341
+ "RuntimeError",
342
+ "RuntimeStart",
343
+ "RuntimeStatus",
344
+ "RuntimeStderr",
345
+ "RuntimeStdout",
346
+ "RuntimeStep",
347
+ "RuntimeWorkflowEvent",
348
+ "Start",
349
+ "TaskEnd",
350
+ "TaskStart",
351
+ "ToolApproval",
352
+ "ToolCallEnd",
353
+ "ToolCallStart",
354
+ "ValidationFailure",
355
+ "WorkflowError",
356
+ "WorkflowErrorKind",
357
+ "WorkflowEvent",
358
+ "category_of",
359
+ "reduce_runtime_events",
360
+ "reduce_runtime_events_async",
361
+ "to_workflow_event",
362
+ # RunStream (Layer 3)
363
+ "RunStream",
364
+ "RunStreamCallbacks",
365
+ ]