You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add prompt-management surface refinements
Implements proposal 0033 (spec v0.26.0) plus python-side wishes 1
(FS flat layout) and 5 (Jinja-undefined opt-out).
New fields on Prompt and PromptResult:
- sampling: SamplingConfig | None, a RuntimeConfig subclass mirroring
the seven declared fields plus extras. Splats directly into
provider.complete(config=...) without translation.
- observability_entities: dict[str, Any] | None, with the
spec-normative key langfuse_prompt holding the Langfuse SDK Prompt
reference (replaces the implementation-defined metadata key from
proposal 0031's v0.23.0 placeholder).
New LabelResolver primitive (openarmature.prompts.LabelResolver) with
the spec §7 three-step fallback: per-name override > default override
> spec fallback "production". The reference impl MappingLabelResolver
is mapping-backed; the Protocol is open to JSON-file or remote-config
implementations. PromptManager accepts label_resolver= and
jinja_undefined= constructor kwargs; the render Environment is now
per-instance to let the undefined-class knob bite without affecting
other managers.
FilesystemPromptBackend gains layout= (per-label default, flat opt-in)
and sampling_source= (none default, per-prompt-sidecar reading
<root>/<label>/<name>.config.json, or unified reading
<root>/prompt_configs.json once at construction).
A latent import cycle between openarmature.llm and
openarmature.prompts surfaced once prompt.py imported RuntimeConfig
from the llm package (for the SamplingConfig subclass). Deferred the
current_prompt_group / current_prompt_result imports in openai.py to
function-local; same behavior, no top-level re-entry.
Spec submodule bumped to v0.26.0; conformance.toml grows entries for
proposals 0033 (PR 2) and 0034 (PR 4), both not-yet pending the
release PR. Fixture-parser defers prompt-management/015 and 016 (the
PM-specific harness models the new shapes; the cross-capability
parser doesn't) and observability/027-030 (PR 4 territory).
Tests: four new prompt-management fixtures (013-016) plus six new
unit tests covering the python-only ergonomics (jinja opt-out, flat
layout, sidecar variants, LabelResolver precedence).
Second of 6 PRs in the v0.10.0 batch.
* Defensive validation and copy in prompt-management
Two defensive fixes from CoPilot PR review on #79:
- Unified-mode sampling source: validate each per-prompt entry in
prompt_configs.json is a JSON object before calling
_sampling_from_dict, raising a structured PromptStoreUnavailable
on shape drift. Matches the symmetric top-level guard already in
_load_unified_configs. Relaxed _unified_sampling's value type to
Any so the runtime isinstance guard remains meaningful (the cast
would have made it dead code).
- PromptResult construction: shallow-copy prompt.sampling
(model_copy) and prompt.observability_entities (dict(...)) so a
caller mutating the result can't leak into the source Prompt or
whatever instance the backend may be caching.
Copy file name to clipboardExpand all lines: conformance.toml
+9-3Lines changed: 9 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@
29
29
30
30
[manifest]
31
31
implementation = "openarmature-python"
32
-
spec_pin = "v0.24.0"
32
+
spec_pin = "v0.26.0"
33
33
34
34
# Status values:
35
35
# implemented — shipped behavior matches the proposal's contract
@@ -150,8 +150,8 @@ status = "textual-only"
150
150
since = "0.9.0"
151
151
note = "Drain snapshot semantic and timeout-input validation already implemented as part of the proposal 0010 impl PR (v0.9.0); no additional module-level work needed."
Copy file name to clipboardExpand all lines: src/openarmature/AGENTS.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# OpenArmature — Agent documentation
2
2
3
-
*This is the agent guide bundled with the openarmature Python package, version 0.9.0 (spec v0.24.0). For the full docs site see [openarmature.ai](https://openarmature.ai). For the canonical spec text see [openarmature.org/capabilities](https://openarmature.org/capabilities/). For project-specific conventions for the code you're editing, see the host project's `AGENTS.md` or `CLAUDE.md`.*
3
+
*This is the agent guide bundled with the openarmature Python package, version 0.9.0 (spec v0.26.0). For the full docs site see [openarmature.ai](https://openarmature.ai). For the canonical spec text see [openarmature.org/capabilities](https://openarmature.org/capabilities/). For project-specific conventions for the code you're editing, see the host project's `AGENTS.md` or `CLAUDE.md`.*
4
4
5
5
## TL;DR
6
6
@@ -10,7 +10,7 @@ OpenArmature is a workflow framework for LLM pipelines and tool-calling agents
10
10
11
11
## Capability contracts
12
12
13
-
_Sourced from openarmature-spec v0.24.0. Each entry below reproduces §1 (Purpose) and §2 (Concepts) of the capability's `spec.md`. For the full spec text (execution model, error semantics, determinism, observer hooks, etc.) see the linked docs site._
13
+
_Sourced from openarmature-spec v0.26.0. Each entry below reproduces §1 (Purpose) and §2 (Concepts) of the capability's `spec.md`. For the full spec text (execution model, error semantics, determinism, observer hooks, etc.) see the linked docs site._
0 commit comments