Commit 43a4ddc
authored
Prepare v0.13.0 release: reconcile changelog, docs, and examples (#146)
* Correct v0.13.0 release narrative per spec review
Three blocking + three should-fix items spec flagged on the
pre-tag review. All narrative; no code behavior change.
- 0047 CHANGELOG entry mis-attributed pieces 1+2 (Response.usage
cache fields + OTel cache attributes) to v0.12.0. Verified via
git: those landed in PRs #136 + #140 post-v0.12.0-tag, so all
three pieces of 0047 ship in v0.13.0. Reframed.
- conformance.toml [proposals."0047"] leading-comment block had
the same v0.12.0 mis-attribution. Same correction; added PR
references for traceability.
- Unreleased section had two ### Added headings with the 0057
entry orphaned below ### Changed. Consolidated.
- Spec pin advance text undercounted the cycle journey (said
v0.51.0 → v0.53.0; actual is v0.46.0 → v0.53.0 across three
hops). Reframed and listed absorbed proposals inline.
- tool_call.arguments JSON encoding now uses sort_keys=True
(functionally equivalent but byte-different for downstream
snapshot consumers). Surfaced as its own ### Changed entry
instead of buried in the 0047 ### Added.
- conformance.toml [proposals."0049"] leading-comment block
grew the fixture-deferral surface (057-068 + 069-073 parser-
deferred pending harness directive schema catch-up; behavior
pinned by unit tests) per spec OQ2.
* Migrate LLM-event docs to typed-event-first
Three docs still pushed the legacy sentinel-namespace pattern as
the primary path for custom observers consuming LLM events and
custom providers emitting them. After v0.13.0 the bundled provider
emits typed LlmCompletionEvent / LlmFailedEvent variants directly;
the bundled OTel + Langfuse observers consume via isinstance
discrimination. Rewrites:
- docs/concepts/observability.md: "Publishing LLM events for
custom observers" → "Consuming LLM events in custom observers".
Typed-event consumption shown as primary (isinstance branch on
LlmCompletionEvent + LlmFailedEvent with the mutual-exclusion +
field-set notes). Sentinel pattern demoted to a "Legacy
sentinel-namespace pattern (compatibility surface)" subsection
for downstream code interoperating with custom providers that
haven't migrated.
- docs/model-providers/authoring.md: custom-provider emission
sketch rewritten — dispatch LlmCompletionEvent on success,
LlmFailedEvent alongside the §7 exception on failure. Shows the
current-attempt-index / current-fan-out-index / etc. scoping
fields the typed events carry. Calls out the mutual-exclusion
+ exception-flow-preservation contracts. Legacy sentinel pattern
retained as a compatibility-surface callout for older providers.
- docs/agent/non-obvious-shapes.md: "filter openarmature.*-
namespaced events" tip drops the openarmature.llm.complete
example (v0.13.0 retired the sentinel pattern for LLM events);
checkpoint sentinels stay since the tip is still applicable for
those. Adjusted the follow-on paragraph mentioning LLM events.
mkdocs strict build clean.
* Regenerate AGENTS.md for typed-event doc migration
The non-obvious-shapes doc migration changed a generator source
without regenerating the committed AGENTS.md. Bring it back in
sync so the drift guard passes.
* Extend production-observability example for v0.13.0
Add an LlmFailureTracker observer that consumes the typed
LlmFailedEvent and rolls up per-invocation error-category counts,
and extend LlmUsageAccumulator to track cached_tokens and report a
cache-hit ratio. The persist node now reports both rollups and the
OTel formatter surfaces the cache-read attribute.
Also drop spec/proposal references and em dashes from the
example's comments and walk-through, which carry no meaning for
end users reading the code.
* Drop spec and proposal references from examples
Example comments and docstrings quoted proposal numbers and spec
section refs that have no meaning to end users reading the code.
Reword them to describe only the implementation behavior.
* Add tests for production-observability observers
The examples smoke test only proves the demo loads and its
build_graph() compiles. Cover the two queryable observers the
production-observability example ships: cache-token accumulation
and the derived cache-hit ratio, failure-category counting,
mutual exclusion between the success and failure events, the
per-invocation bucket cleanup, and the OTel cache-read attribute.
The persist-output check drives the real persist node offline.
* Guard legacy LLM observer snippet with NodeEvent check
The legacy sentinel-namespace observer example accessed
event.namespace / event.pre_state without narrowing to NodeEvent.
A real observer receives the full ObserverEvent union, where
variants like InvocationCompletedEvent have no namespace, so the
snippet would raise AttributeError. Add an isinstance(event,
NodeEvent) guard so the copy-paste example is correct.1 parent a6b6f26 commit 43a4ddc
11 files changed
Lines changed: 783 additions & 251 deletions
File tree
- docs
- agent
- concepts
- examples
- model-providers
- examples
- chat-with-multimodal
- production-observability
- tool-use
- src/openarmature
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
273 | 274 | | |
274 | | - | |
| 275 | + | |
275 | 276 | | |
276 | 277 | | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
282 | 283 | | |
283 | 284 | | |
284 | 285 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
291 | 297 | | |
292 | 298 | | |
293 | | - | |
294 | | - | |
295 | | - | |
| 299 | + | |
| 300 | + | |
296 | 301 | | |
297 | 302 | | |
298 | 303 | | |
| |||
344 | 349 | | |
345 | 350 | | |
346 | 351 | | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
357 | 370 | | |
358 | 371 | | |
359 | 372 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
0 commit comments