Changelog
Release history of @ratel-ai/sdk.
@ratel-ai/sdk release history · npm · source
Synced verbatim from the package's
CHANGELOG.mdatratel-ai/ratel@3be0ecb— do not edit by hand. Regenerate withpnpm sync:apiinapps/docs.
All notable changes to @ratel-ai/sdk are documented here.
The format follows Keep a Changelog and this package adheres to Semantic Versioning.
[0.4.1] - 2026-07-10
Added
configureTelemetryopts into message/tool content capture programmatically:captureContentsets the exactContentCapturemode (validated like the env var — case-insensitive, legacy boolean forms accepted — throwing aTypeErroron garbage before any exporter is wired), andincludeSpanAndEventsis boolean sugar (true→SPAN_AND_EVENT,false→NO_CONTENT).captureContentwins overincludeSpanAndEvents; when neither is provided,OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENTkeeps ruling (a provided option beats the env var, as in OTel code-over-env precedence). The handle'sshutdown()restores env-driven behavior via a generation-scoped clear (clearContentCapture), so a stale handle shutting down late never clobbers an override a newerconfigureTelemetryinstalled.ContentCapture,setContentCapture, andclearContentCaptureare re-exported from@ratel-ai/sdk(newConfigureTelemetryOptionstype).
[0.4.0] - 2026-07-07
Added
- OpenTelemetry emission. The SDK now opens an OTel span at each funnel boundary —
execute_tool(gen_ai.operation.name,gen_ai.tool.name,ratel.tool.args_size_bytes, plusratel.upstream.serverfor MCP-proxied tools),ratel.search(target,top_k, origin,hit_count),ratel.skill.load,ratel.upstream.register, andratel.auth.flow— alongside the existing localrecordEventstream, which is unchanged. Emission is transparent and free by default: spans flow to whatever OpenTelemetry provider is registered and are a no-op until one is, so a host already running OTel sees Ratel's funnel on its traces with no setup. Built on@opentelemetry/api+ the OTel-free@ratel-ai/telemetryvocabulary, so the base install stays OTel-SDK-free. configureTelemetry({ apiKey })convenience wiring (withTelemetryHandle/InitOptions): lazily loads the optional@ratel-ai/telemetry-otlppeer to ship the SDK's spans to Ratel Cloud (or any OTLP endpoint). Hosts already running OpenTelemetry skip it and addratelSpanProcessorfrom@ratel-ai/telemetry-otlpinstead.- Message/tool content (
ratel.search.query,gen_ai.tool.call.arguments/.result) rides span attributes only whenOTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENTselects a span mode (SPAN_ONLY/SPAN_AND_EVENT); default off.ratel.tool.args_size_bytesis measured in UTF-8 bytes.
[0.3.0] - 2026-07-06
Added
ToolCatalog/SkillCatalogaccept a defaultmethod("bm25"|"semantic"|"hybrid") andsearch(query, topK, origin?, method?)takes a per-call override."bm25"(default) is unchanged and model-free;"semantic"/"hybrid"load a local embedding model and throw if it fails to load. Exposed via the nativesearchWithMethodbinding and theSearchMethodtype.- A
"semantic"/"hybrid"catalog embeds each tool/skill eagerly atregister(incrementally), so searches never pay the corpus-embedding cost. Newcatalog.buildEmbeddings()pre-computes embeddings on demand (e.g. after a bulk register). BM25 catalogs do neither. A semantic/hybrid search on a catalog with no embeddings built throws (embeddings not computed) rather than embedding during the search.
[0.2.1-rc.1] - 2026-07-04
Changed
- First release cut under the per-package release scheme (ADR-0008):
@ratel-ai/sdk(loader + platform packages) now versions and ships independently, taggedsdk-js-v*. No API changes since 0.2.0.
[0.2.0] - 2026-06-16
Changed
- BREAKING: the discovery gateway tool is renamed
search_tools→search_capabilities. It now returns two independently-ranked, separately-budgeted buckets —{ tools, skills }— so a relevant skill is never crowded out by matching tools. New surface:searchCapabilitiesTool/SEARCH_CAPABILITIES_ID. The oldsearchToolsTool/SEARCH_TOOLS_IDare kept as deprecated aliases (see Deprecated), so0.1.xcode keeps working after upgrading.
Added
- First-class skills:
SkillCatalog,getSkillContentTool(get_skill_content), andSkill/SkillHit/SkillRegistry. Skills are reusable playbooks ranked by a separate BM25 corpus and loaded on demand. - Skill–tool coupling: a
Skillcan declare atoolslist, andsearch_capabilitiespulls a matched skill's declared tools into thetoolsbucket — additively (beyondtopKTools) and deduped against query hits — so the agent gets the playbook and the tools it needs in one turn.
Deprecated
searchToolsTool,SEARCH_TOOLS_ID, and theSearchToolHit/SearchToolsGroup/SearchToolsResult/SearchToolsToolOptionstypes. They retain their pre-0.2.0 behaviour — a tools-only{ groups }result and thesearch_toolsid — so upgrading from0.1.xdoes not break existing callers. Migrate tosearchCapabilitiesTool; the aliases will be removed in a future release.
Fixed
- Gateway error payloads (
invoke_tool,get_skill_content) carryisError: true, so a host can flag a failed call rather than read it as content. invoke_toolrejects a non-objectargsinstead of forwarding stray top-level keys.search_capabilitiesvalidatestopKTools/topKSkills(declaredinteger, positive):0, negative, and fractional values fall back to the default instead of returning zero results — or, via a negative wrapping tou32in the native layer, an unbounded set. TypeScript and Python behave identically.search_capabilitiesadvertises theskillsbucket andget_skill_contentin its description only when a non-empty skill catalog is wired in.Skill.tagsandSkill.bodyare optional (default[]/""), matching the Python SDK — a minimal{ id, name, description }skill is valid.
[0.1.6] - 2026-06-10
Fixed
- TypeScript typehint for JSON-schema tool input/output (#54).
[0.1.5] - 2026-05-10
Added
- Initial release on the v1 (revamp) line. TypeScript SDK over the Rust core: BM25 tool retrieval, MCP ingestion, framework-neutral gateway tools. See the package README for the full surface.
ToolCatalogaccepts{ trace }config in its constructor —noop(default),memory, orjsonl. Captured events flow through the Rust core sink (ADR-0007). NewrecordEvent,drainTraceEvents, and an optional thirdoriginargument onsearch.searchToolsToolemitsgateway_searchwithorigin: "agent".invokeToolToolemitsgateway_invokeon success andgateway_errorfor unknown ids,needs_auth, and underlying throws.ToolCatalog.invokeemitsinvoke_start/invoke_end/invoke_erroraround the executor withargs_size_bytesandtook_ms.registerMcpServeremitsupstream_registeron connect andupstream_invoke/upstream_errorper upstream call. NewsearchWithOriginand trace plumbing on the underlying NAPIToolRegistry.SearchOriginis now"direct" | "agent"(was"user" | "agent"); the union is exported from the package entry point.
Changed
- Rewrote
search_toolsdescription to nudge agents toward discovery before falling back to broad listing.