1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! `turul-a2a-patterns` defines reusable abstractions for A2A skill
//! authoring — the `SkillHandler` trait, `SkillRegistry`, `SkillCard`
//! (SKILL.md) helpers, and the `SkillProgressSink` trait. It depends only
//! on `turul-a2a-proto` and `turul-a2a-types`, never on the server
//! runtime. It does NOT change the A2A wire contract; profile/extension
//! machinery lives elsewhere.
//!
//! Public surface (all re-exported from the crate root):
//!
//! - Errors: [`SkillError`], [`SinkError`], [`ManifestError`],
//! [`RenderError`], [`ValidationError`].
//! - Skill handler trait: [`SkillHandler`] taking a
//! [`SkillProgressSink`] for non-terminal status / artifact emits.
//! - Progress sink: [`SkillProgressSink`] + [`ProgressState`]
//! (non-terminal states only; terminals come from the handler's
//! return value).
//! - Pre-terminal gates: [`PreTerminalGate`] + [`GateContext`], run on a
//! handler's output by [`GatedHandler`]; a gate error replaces it.
//! - Terminal hook: [`TerminalHook`] + [`SkillOutcome`].
//! - SKILL.md projection: [`SkillCard`] (`from_embedded`, `from_skill`, `TryFrom<&Skill>`,
//! validate_input, validate_output, render_prompt, to_agent_skill) +
//! [`ExecutionHints`]. `turul-agent-skills` loads and validates the
//! `SKILL.md`; this crate reads its `a2a-*` metadata and asset files.
//! - Registry: [`SkillRegistry`] trait + [`InMemorySkillRegistry`] +
//! [`SkillDescriptor`].
//! - Schema validation: [`validate_json`] (JSON Schema 2020-12
//! strict-keyword check).
//!
//! Internal modules (`error`, `sink`, `handler`, `gate`, `hook`, `manifest`,
//! `template`, `schema`, `registry`) are implementation detail; use
//! the flat re-exports above.
pub use ;
pub use ;
pub use SkillHandler;
pub use ;
pub use ;
pub use ;
pub use validate_json;
pub use ;