All notable changes to the DataGrout Conduit SDK will be documented in this file.
This project follows Semantic Versioning.
Initial public release of the DataGrout Conduit SDK across five languages: Rust, TypeScript, Python, Elixir, and Ruby.
- JSON-RPC 2.0 transport — lightweight HTTP POST-based transport with full request/response handling, retry logic, and error mapping.
- MCP transport — Streamable HTTP / SSE transport for full MCP protocol compliance; supports
initialize,tools/list,tools/call, session management,Mcp-Session-Idtracking, SSE response parsing, and202 Acceptedhandling. - Default transport: MCP — all SDKs default to MCP transport. JSONRPC available as an explicit option.
- Intelligent Interface — auto-enabled for DataGrout endpoints; filters tool list to only non-integration tools (hides
@-prefixed tools likesalesforce@1/get_lead@1), exposing justdata-grout@1/discovery.discover@1anddata-grout@1/discovery.perform@1. - Bearer, Basic, API key, and OAuth authentication — all auth types supported across both transports.
- Rate limit handling — typed
RateLimitErrorwith parsedX-RateLimit-*headers andretry_afterfor automatic backoff. - OAuth 401 retry — automatic token refresh and request retry on 401 when OAuth is configured.
list_toolspagination — loops withcursor/nextCursorto aggregate all pages from paginated servers.
discover()— semantic search over tool catalogs by intent, with score-based ranking, integration filtering, and configurable limits. Callsdata-grout/discovery.discover.plan()— Prolog-backed workflow planner; returns ranked plans with required inputs and virtual skill handles. Callsdata-grout/discovery.plan. Params:goalorquery(required), plusserver,k,policy,have,return_call_handles,expose_virtual_skills,model_overrides.perform()— tracked tool execution with optional demultiplexing. Callsdata-grout/discovery.perform. Wire params:tool,args,demux_mode.guide()— interactive multi-step guided workflow sessions with branching choices. Callsdata-grout/discovery.guide.flow_into()— validates and executes a workflow plan; can save result as a reusable skill with a CTC. Callsdata-grout/flow.into.estimate_cost()— pre-execution credit estimate; injectsestimate_only: trueinto the tool's own args and calls the target tool method directly.callTool()— standard MCPtools/callpath, works with any MCP server.
refract()— transform any data structure toward a natural-language goal; the plan is compiled and verified on first use and subsequent equivalent calls are served from cache. Callsdata-grout/prism.refract. Required:goal,payload. Optional:verbose,chart.chart()— visualise any tool output as a chart (SVG, sparkline, Unicode, statistics). Callsdata-grout/prism.chart. Required:goal,payload. Optional:format,chart_type,title,x_label,y_label,width,height.prism_focus()— semantic type bridge converting data between semio types. Callsdata-grout/prism.focus. Params:data,source_type,target_type, plus optionalsource_annotations,target_annotations,context.dg("prism.render", params)— generate content (articles, reports, HTML, PDF, XLSX) from structured data.dg("prism.export", params)— format conversion without LLM (JSON → CSV → XLSX → LaTeX etc.).dg("prism.paginate", params)— page through large result sets bycache_refor payload.dg("prism.code_lens", params)— transform source code into queryable semantic facts.dg("prism.diff_analyzer", params)— analyse code changes for alignment with a stated goal.dg("prism.code_query", params)— execute Prolog queries over lensed code facts.
remember()— store natural-language facts in the persistent Logic Cell. Callsdata-grout/logic.remember. Params:statementorfacts, optionaltag.query_cell()— query stored facts by natural language or pattern. Callsdata-grout/logic.query. Params:questionorpatterns, optionallimit.forget()— retract facts by handle list or pattern. Callsdata-grout/logic.forget. Params:handlesorpattern.constrain()— store logical rules/policies governing agent behaviour. Callsdata-grout/logic.constrain. Params:rule, optionaltag.reflect()— introspect all facts in the Logic Cell. Callsdata-grout/logic.reflect. Optional:entity,summary_only.
dg("flow.request-approval", params)— pause for human approval before destructive operations.dg("flow.request-feedback", params)— request missing or clarifying information from the user.dg("inspect.execution-history", params)— list recent tool executions.dg("inspect.execution-details", params)— detailed info on a specific execution.dg("inspect.ctc-executions", params)— list executions tied to a specific CTC or skill.
dg(shortName, params)— call any DataGrout first-party tool by its short name (e.g."prism.render"). Automatically prefixesdata-grout/. Future tools are accessible without SDK updates.
extract_meta()— extract the_datagroutmetadata block from tool-call results (checks_datagrout,_meta.datagrout, and_metakeys), including receipts, credit estimates, and BYOK discount details.- Receipt type —
receipt_id,transaction_id,estimated_credits,actual_credits,net_credits,savings,savings_bonus,balance_before,balance_after,breakdown,byok. - CreditEstimate type —
estimated_total,actual_total,net_total,breakdown. - Byok type —
enabled,discount_applied,discount_rate.
ConduitIdentity— load client certificates from PEM files, PEM byte strings, or PKCS#12 bundles. mTLS works across both MCP and JSONRPC transports.- Auto-discovery — 5-step cascade:
override_dir→CONDUIT_MTLS_CERT/CONDUIT_MTLS_KEYenv vars →CONDUIT_IDENTITY_DIR→~/.conduit/→.conduit/relative to cwd. - Custom identity directories —
identity_diroption for running multiple agents on the same machine with separate certificates. needs_rotation?— check if identity certificate is approaching expiry.fetchWithIdentity()(TypeScript) /fetch_with_identity()(Python) — HTTP fetch helpers that attach the mTLS identity to any outgoing request.
generate_keypair()— ECDSA P-256 keypair generation (Rust: gated behindregistrationfeature).register_identity()— send public key to the DataGrout CA, receive a DG-CA-signed X.509 certificate. Private key never leaves the client.rotate_identity()— mTLS-authenticated certificate renewal without needing an API key.bootstrap_identity()— one-call flow: generate keys, register with DG CA, save to disk, return a connected client.bootstrap_identity_oauth()— same flow using OAuth 2.1client_credentialsinstead of a bearer token.save_identity_to_dir()— persist identity files with proper permissions (chmod 600 on Unix).refresh_ca_cert()— fetch the latest DG CA certificate for local pinning.
OAuthTokenProvider— automatic token acquisition, caching, and refresh via theclient_credentialsgrant.deriveTokenEndpoint()— resolves the OAuth token endpoint from/.well-known/oauth-authorization-serveror falls back to a conventional path.invalidate()— clear cached token to force re-acquisition (used by 401 retry logic).
Rust (datagrout-conduit crate)
- Builder pattern via
ClientBuilderwithurl(),auth_bearer(),transport(),with_identity(),with_identity_auto(),identity_dir(),bootstrap_identity(). registrationfeature flag to opt-in torcgen-based keypair generation.PlanBuilder,RefractBuilder,ChartBuilderfollow the same.execute().awaitbuilder pattern asDiscoverBuilder.- Logic cell methods (
remember,remember_facts,query_cell,query_cell_patterns,forget,forget_pattern,constrain,constrain_tagged,reflect,reflect_entity) as direct async methods. dg(short_name, params)generic hook.- 75 Rust tests across unit, integration, and transport suites. Seven runnable examples:
basic,discovery,guided_workflow,flow_orchestration,type_transformation,cost_tracking,batch_operations.
TypeScript (@datagrout/conduit npm package)
- ESM and CJS dual-publish via
tsup. Clientclass withconnect()/disconnect()lifecycle andensureInitialized()guard.Client.bootstrapIdentity()static method for one-call identity provisioning.sendWithRetry()— auto-reconnects onNotInitializederrors.annotationsfield onMCPTooltype.DG_SUBSTRATE_ENDPOINTandDG_CA_URLconstants exported.- 89 vitest tests (plus 12 skipped integration tests gated on env vars).
Python (datagrout-conduit PyPI package)
- Async context manager (
async with Client(url) as client) and explicitconnect()/disconnect()methods. _ensure_initialized()guard on all public methods._send_with_retry()— auto-reconnects onNotInitializederrors.httpx-based HTTP client withpydanticmodels.- 117 pytest tests.
Elixir (datagrout_conduit hex package)
- GenServer-based
Clientfor connection state management withbootstrap_identity/1andbootstrap_identity_oauth/1. Registrationmodule:generate_keypair,register_identity,rotate_identity,save_identity,fetch_ca_cert,refresh_ca_cert.GuidedSessionmodule withstart,choose,completefor interactive multi-step workflows.Identitymodule with full 5-step mTLS discovery cascade and X.509 expiry parsing.OAuthGenServer with token caching, auto-refresh, andinvalidate/1.Req-based HTTP transports with SSE parsing,Mcp-Session-Idtracking, 202 Accepted handling, 429 rate-limit handling, and 401 OAuth retry.annotationsfield onTooltype.- 87 ExUnit tests.
Ruby (datagrout-conduit gem)
- Thread-safe
Clientwithconnect/disconnectlifecycle,bootstrap_identity, andbootstrap_identity_oauth. Registrationclass:generate_keypair,register_identity,rotate_identity,save_identity,fetch_ca_cert,refresh_ca_cert.Identityclass with OpenSSL integration,with_expiry,needs_rotation?, andtry_discover.OAuth::TokenProviderwithMutex-protected token caching andinvalidate!.- Faraday-based transports with mTLS SSL configuration, SSE parsing,
Mcp-Session-Idtracking, andAccept: application/json, text/event-streamheader. identity_diranddisable_mtlsoptions onClient.- 98 minitest tests, 218 assertions.