Expand description
Qefro backend SDK — mirrors @qefro-ai/backend (TypeScript).
Organizations expose one signed webhook (typically POST /qefro).
Qefro Runtime calls ping, tools.list, tool.invoke, and tool.resume.
Structs§
- Auth
Builder - Helpers matching JS
AuthBuilder. - Authentication
Context Payload - Business
Flow - A Business Flow as advertised through
capabilities.list. Never executed by the SDK. - Business
Flow Metadata - Immutable identity + descriptive metadata for a Business Flow.
- Challenge
Payload - Challenge
Signal - Signal an auth challenge from a tool handler (caught like JS
ChallengeSignal). - Consent
Context ctx.consent— grant/revoke consent purposes.- Conversation
- Customer
Api - In-handler customer API (mirrors JS
ctx.customer). - Customer
Authorize Context - Customer
Lookup Context - Customer
State - Event
Handler Definition - Standalone event / webhook / schedule handler advertised via capabilities.list.
- Flow
Builder - Fluent builder returned by
Qefro::flow. Step methods append into the SDK’s flow registry as they are declared and never panic; the first step-id violation is recorded and surfaced byFlowBuilder::complete. - Flow
Step - Wire shape of a flow step:
{ id, type, config }. - Listen
Handle - Listen
Options - Membership
Context ctx.membership— attach/detach solution membership.- Platform
Capabilities - Platform capabilities injected on
tool.invoke. - Platform
Customer Binding - Platform
Customer Context - Customer Hub gateway context injected on
tool.invoke(platform.customer). - Platform
Storage Binding - Platform
Storage Context - Managed storage context (ADR-002) — kept for platform parity; Hub is independent.
- Qefro
- Qefro
Config - Qefro
Request - Registered
Tool - Timeline
Context ctx.timeline— append Customer Hub timeline activities.- Tool
Context - Tool
Lookup - Identity attributes the Qefro runtime must resolve before
tool.invoke. - Tool
Metadata
Enums§
- Auth
Outcome - Flow
Error - Developer mistakes surfaced as explicit errors — the SDK never panics on a malformed flow declaration.
- Flow
Step Kind - Type-specific settings for a flow step. Serialized as
{ "type": ..., "config": {...} }so new settings (retry, timeout, permissions, parallel) extendconfigwithout changing the wire schema. - Flow
Trigger - How a Business Flow is entered (Phase 3). Events are triggers into the Qefro runtime — not a second execution engine.
- Qefro
Response - Tool
Auth Mode
Constants§
- SDK_
NAME - Package name reported to Qefro Runtime (
X-Qefro-SDK/ protocol payloads). - SDK_
VERSION - Package version reported to Qefro Runtime (
sdk_version/X-Qefro-Version).
Traits§
Functions§
- env_
flag_ true - hub_
call - POST
/v1/internal/customer-hub/{op}. Soft-skip or hard-fail per flags. - hub_
customer_ from_ person - Map a Person / Hub JSON object to the canonical HubCustomer projection.
- is_
customer_ hub_ enabled - Master switch — when false, hub methods soft-skip (never call Hub).
- is_
customer_ hub_ optional - When true (default), missing hub config returns
None/ no-ops. - normalize_
lookup - Normalize
lookup.by/lookup.requiredinto a deduped lowercase attribute list. - pick_
identity - read_
identity_ phone - seed_
from_ person - Seed hub customer projection from a Person snapshot on
tool.invoke.