Expand description
§adk-drivers
Service drivers for ADK-Rust agents (spec 3.5 §7.13): DNS and registrar, email, analytics and search console, social and advertising.
A driver is a kernel driver — a supervised MCP server under a manifest the owner approved (spec 3.2 §7.7) — or an in-process adapter with the same tools. For each class this crate gives:
| Part | What it is |
|---|---|
| Contract | A trait for in-process adapters (dns::DnsDriver, email::EmailDriver, …) and the class’s tool list with effect classes, sides and default autonomy caps (DriverClass) |
| Manifest | DriverClass::manifest and DriverClass::manifest_toml make the kernel DriverManifest of one side; DriverClass::check_manifest and DriverClass::check_listing tell whether any MCP server and its manifest satisfy the class, so the owner connects whichever server they choose (D-13) |
| Rules | DriverCapPolicy holds DNS changes and campaign launches in every mode (A-I21) and within-budget calls beyond the owner’s DriverBudget; the email and social outboxes keep the Disclosure line, unsubscribes, consent and reply_in_thread’s limits (§7.10, A-I8, A-I17) |
| Conformance | A suite per contract (conformance, feature conformance) |
| Adapters | In-memory adapters for hermetic tests, and a reference adapter per class over an open protocol or a common API |
| Class | Tools | Reference adapter |
|---|---|---|
| DNS | dns_list_records, dns_change_records | dns::Rfc2136Dns: RFC 2136 with TSIG, AXFR |
| Registrar | registrar_domain_status, registrar_renew_domain | dns::RdapRegistrar: RDAP expiry |
email_list_inbox, email_reply_in_thread, email_send_sequence_step, email_send_newsletter, email_delivery_stats, email_check_domain | email::ImapSmtpEmail: IMAP and SMTP | |
| Analytics | analytics_metric | analytics::PlausibleAnalytics: Plausible Stats API v2 |
| Search console | search_console_performance | analytics::SearchAnalyticsApi: Search Analytics API |
| Social | social_list_mentions, social_list_messages, social_reply_in_thread, social_post | social::MastodonSocial: Mastodon client API |
| Advertising | ads_performance, ads_launch_campaign, ads_set_bid, ads_pause_campaign | ads::RecordedAds: recorded responses, no live spend |
reply_in_thread (ReplyInThread) is the public partition’s one SendExternal tool
(§7.10, A-I2): it answers an email or social thread through its outbox.
Delivery statistics, analytics, search performance and ad spend are KpiSources
the KPI tracker reads (§7.11, §7.12).
§Features
| Feature | Default | Adds |
|---|---|---|
rfc2136 | yes | dns::Rfc2136Dns and dns::tsig |
rdap | yes | dns::RdapRegistrar |
imap-smtp | yes | email::ImapSmtpEmail |
system-dns | yes | email::SystemTxtLookup for SPF, DKIM and DMARC checks |
plausible | yes | analytics::PlausibleAnalytics |
search-console | yes | analytics::SearchAnalyticsApi |
mastodon | yes | social::MastodonSocial |
conformance | no | The conformance suites |
§Example
use std::sync::Arc;
use adk_core::{PolicyDecision, ToolPolicy, ToolPolicyRequest};
use adk_drivers::{DriverBudget, DriverCapPolicy, DriverKind, Side};
use adk_drivers::dns::{InMemoryDns, dns_tools};
use serde_json::json;
// The DNS class's tools over an in-process adapter...
let tools = dns_tools(Arc::new(InMemoryDns::new().with_zone("bakery.example", [])));
assert_eq!(tools[1].name(), "dns_change_records");
// ...or a manifest for any MCP server that serves them.
let manifest = DriverKind::Dns.class().manifest_toml("dns", "mcp-dns", &[], Side::BackOffice);
assert!(manifest.contains("dns_change_records = \"publish_public\""));
// Either way, a change is held for the owner in every mode (A-I21).
let policy = DriverCapPolicy::new(DriverBudget::new());
let change = ToolPolicyRequest::new("dns_change_records", json!({"zone": "bakery.example"}));
assert!(matches!(policy.evaluate(&change).await, PolicyDecision::RequireApproval { .. }));§Stability
Experimental — new in 3.0.0 (spec 3.5), and its API may change while the spec lands. See STABILITY.md.
Modules§
- ads
- Advertising drivers (spec 3.5 §7.13): spend and performance read, campaigns launched only by a person’s decision, bids and pauses within budget.
- analytics
- Analytics and search-console drivers (spec 3.5 §7.12, §7.13): read-only metrics, each a
KpiSourcefor the KPI tracker. - conformance
- Conformance suites for every driver contract (spec 3.5 §11; feature
conformance). - dns
- DNS and registrar drivers (spec 3.5 §7.13): records and their changes, domain expiry and renewal.
- Email drivers (spec 3.5 §7.13): the inbox in the public partition,
reply_in_thread, sequences and newsletters in the back office, and delivery statistics as a metric source. - social
- Social drivers (spec 3.5 §7.13): mentions and messages read in the public partition, replies in their thread, posts from the back office; Propose by default.
Structs§
- Budget
Cap - The owner’s budget for one
AutonomyCap::WithinBudgettool (spec 3.5 §7.13): the most a single call may commit, in minor units ofcurrency. - Disclosure
- The line every outbound message carries (spec 3.5 A-I17, §13 Q6): it names the site’s owner and says an AI agent wrote the message.
- Driver
Budget - The owner’s budgets for the driver tools that act within budget (spec 3.5 §7.13): a domain renewal’s price, an advertising bid.
- Driver
CapPolicy - Enforces the driver classes’ autonomy caps on the governed path (spec 3.5 §7.13, A-I21).
- Driver
Class - A class of driver and its tools (spec 3.5 §7.13), as kernel driver manifests.
- InMemory
Consent - Consent receipts in process memory, for tests.
- InMemory
Suppressions - Suppressions in process memory, for tests and single-process hosts.
- Manifest
Check - The result of checking a manifest or a listing against a driver class.
- Rate
Limit - At most
maxcalls perper(spec 3.5 §7.10:reply_in_threadis rate limited). - Reply
InThread reply_in_thread, the public partition’s onlySendExternaltool (spec 3.5 §7.10, A-I2): answers the person who wrote, in their thread, within a playbook template, at a rate limit, with no new recipients and no attachments.- Reply
Templates - The playbook’s reply templates (spec 3.5 §7.10:
reply_in_threadanswers “within a playbook template”): a public agent fills a template’s{fields}, never writes a message from nothing. - Suppression
- A recipient who unsubscribed or revoked (spec 3.5 A-I17).
- Tool
Spec - One tool of a driver class (spec 3.5 §7.13): its name, effect class, side and default autonomy cap, and the JSON Schema of its arguments.
Enums§
- Autonomy
Cap - How far a job goes with a tool before a person decides, by default (spec 3.5 §7.13, “Default autonomy cap”; §7.11 autonomy ladder).
- Driver
Error - Why a driver call did not happen (spec 3.5 §7.13).
- Driver
Kind - A class of driver (spec 3.5 §7.13).
- Gap
- What keeps a manifest or a server’s listing from satisfying a driver class (spec 3.5 §7.13).
- Side
- Which of a website’s two partitions a driver tool serves (spec 3.5 §7.10).
- Suppression
Scope - What an unsubscribe or a revocation stops (spec 3.5 A-I17).
Constants§
- BACK_
OFFICE_ PARTITION - The partition of a website’s back office (spec 3.5 §7.10): Steward, Growth, Revenue, Guardian, Finance.
- DRIVER_
CAP_ POLICY_ REF - The policy reference of
DriverCapPolicyin audit records:tool_policy:adk-drivers/caps. - IN_
PROCESS_ ORIGIN_ PREFIX - The origin every in-process driver tool reports:
adk-drivers:<class>. - PUBLIC_
PARTITION - The partition of a website’s public agents (spec 3.5 §7.10): Concierge, Agent desk, Inbox.
Traits§
- Consent
Check - Whether a recipient holds a live consent receipt for a scope (spec 3.5 A-I8): the edge’s consent store answers it; sequences and newsletters ask it at send time.
- KpiSource
- A source of KPI measurements (spec 3.5 §7.11, §7.12): the edge beacon, host logs, an
analytics driver, the commerce or spend ledger, the email driver. The product and the
edge implement them; the tracker reads each KPI’s source by its name, the KPI’s
SourceRef. - Suppression
List - Where unsubscribes and revocations are kept (spec 3.5 A-I17): every driver’s outbox reads it before each send, so one takes effect before the next send.
- Thread
Replier - A driver that answers the person who wrote, in the same thread (spec 3.5 §7.10): the email and social outboxes.
Functions§
- all_
tools - The spec of every driver tool of every class.
- recipient_
key - A recipient as suppressions and consent key it: trimmed and in lower case.
- tool_
spec - The spec of the driver tool named
name, of any class.
Type Aliases§
- Result
- The result of a driver call.