utcp 0.2.0
utcp: ^0.2.0 copied to clipboard
Universal Tool Calling Protocol (UTCP) client for Dart. Discover tools from UTCP manuals and call them directly over their native HTTP interfaces.
0.2.0 #
- Breaking:
UtcpClient.createtakesprotocolsas a list; each protocol declares itscallTemplateTypes. - Breaking: tool arguments are
Map<String, Object?>andTool.inputs/outputsare typedJsonSchemas. - Breaking:
HttpCallTemplate.httpMethodis anHttpMethodenum;Auth.registerandCallTemplate.registermoved toAuth.registryandCallTemplate.registry. - Added
UtcpClient.fromJsonfor the configuration format shared with the other UTCP SDKs. HttpTransportandbuildToolRequestare public for transports built on HTTP.httpmanuals may be OpenAPI 2.0 or 3.x documents, converted to tools;OpenApiConverterconverts documents loaded elsewhere.- Added the
texttransport for UTCP manuals and OpenAPI documents supplied inline. - Added
substituteArgumentPlaceholdersandutcpDiscoveryMessagefor transports that sendUTCP_ARG_<name>_UTCP_ARGtemplates. - Redirects to another origin drop every credential-like header, static template headers included, and a request body is never resent to another origin.
- The remote-loopback rule covers every transport through
CallTemplate.endpoints. - YAML alias expansion is bounded (
decodeYaml), so a small hostile document cannot exhaust memory or CPU; aliases and collections used as mapping keys are rejected. Nesting too deep to parse fails with aFormatExceptioninstead of a stack overflow. - OpenAPI-generated tools send the manual's static headers only to the spec's own origin, and a spec reached through a cross-origin redirect gets neither those headers nor
auth_tools(a warning is logged). - Fixed concurrent registrations of the same manual name both succeeding.
- Fixed loopback detection of decimal IPv4 addresses on the web.
- Added the
ssetransport: event-type filtering,Last-Event-IDreconnects, and streaming as events arrive. - Added the
streamable_httptransport for NDJSON, JSON and chunked binary responses. - Added
filter_dictandlimit_stringsresult post-processors, configured withpost_processing. - A timed-out or cancelled HTTP request now releases its connection.
- A remotely discovered manual may not point
sseorstreamable_httptools at loopback either. - Requires
http1.6.0 or later.
0.1.0 #
- Initial release: UTCP manual, tool, call-template, and auth models.
UtcpClientwith manual registration, tool calls, streaming calls, and tag/description search.- Namespaced
${VAR}substitution from config, variable loaders, and the environment. - HTTP transport with API key, Basic, OAuth2 client-credentials, and user OAuth2 auth.
- HTTPS-only remote requests, redirect re-validation, and auth stripping on cross-origin redirects.