klieo-macros
Procedural macros for the klieo agent framework: #[tool] derives
a Tool impl from an async fn.
Part of the klieo Rust agent framework.
The #[tool] macro
use ToolCtx;
use ToolError;
use tool;
/// Return current UTC time as an RFC 3339 timestamp string.
async
The macro generates a CurrentTime struct implementing
klieo_core::Tool with the function body as the invoke impl
and a JSON schema derived from the function's argument types.
Direct klieo-core dependency required
The #[tool] macro emits absolute paths to ::klieo_core::* types.
Your Cargo.toml must therefore depend on klieo-core directly,
even if every klieo-core symbol you use comes through the klieo
umbrella:
[]
= "0.7"
= { = "0.7", = ["macros", "tools"] }
= "0.7"
cargo machete flags klieo-core as unused. Silence the warning
explicitly:
[]
# Required by klieo-macros: the #[tool] proc-macro emits
# ::klieo_core:: paths that the proc-macro resolver needs as a
# direct dependency, even though application code goes through
# the klieo umbrella.
= ["klieo-core"]
(This requirement is on the carryover list to eliminate in a future release — the macro would route paths through the umbrella re-export instead.)
Status
0.7.x — public API stable. See docs/SEMVER.md.
License
MIT — see LICENSE.