agentic_core 0.3.1
agentic_core: ^0.3.1 copied to clipboard
Foundation of the agentic AI framework: messages, JSON Schema, typed errors, cancellation, retry, an event bus, logging and tracing. Pure Dart, with no provider knowledge.
Changelog #
0.3.1 #
- Updated package documentation for the published 0.3.x release line.
0.3.0 #
Added #
TraceContext.fromTraceParent,fromHeadersandtoHeaders: read a W3C trace-context header and continue that trace, or write the headers that continue it in the next hop. Malformed input returns null rather than throwing — a header an outside caller controls being wrong means "start a new trace", not "fail the request" — and header names are matched case-insensitively, because a lookup that misses silently starts a new trace for every request.TraceContext.traceState, carried through untouched. The framework never reads it and never invents it; it only refuses to drop what a backend put there.AgenticContext.root(traceContext:), so a server can join the trace that arrived with a request instead of starting its own.
0.2.0 #
-
JsonSchema.coercetreatsnullfor an optional, non-nullable property as not given, applying the default if there is one. Models sendnullfor parameters they skip, andToolExecutorused to reject those calls.nullfor a required property is still rejected. -
UntrustedContentLedgeronAgenticContext.untrustedContent: which tools brought text into a run that the application did not write. Shared by every scope in a run, and impossible to clear.
0.1.1 #
- Shortened the package description to the 60-180 character window pana scores against. Search engines truncate anything longer, so the ten points it withheld were pointing at a real defect: the useful half of the sentence was never being shown.
0.1.0 #
Initial release of the foundation layer.
Added #
- Messaging —
Message,MessageRoleand a sealedContentParthierarchy covering text, reasoning, images, files, audio, tool calls and tool results.ConversationHistoryextensions for trimming and for finding unanswered tool calls.TokenUsagewith cache and reasoning accounting, and addition. - Schema —
JsonSchema, an immutable validating subset of JSON Schema matched to what LLM providers actually accept, with full-violation reporting,coercefor the near-misses models really produce, andtoStrict()for guaranteed structured output. - Errors —
AgenticExceptionand eighteen concrete failures, each with a stable code, anisRetryableanswer and JSON serialisation. Errors accumulateannotationsas they propagate. - Cancellation —
CancellationToken/CancellationTokenSourcewith callbacks, future racing, stream binding that closes the underlying socket, token merging and clock-driven deadlines. - Resilience —
RetryPolicywith budgets andRetry-Aftersupport;ExponentialBackoff,LinearBackoff,ConstantBackoffandFixedScheduleBackoffwith four jitter modes;CircuitBreakerwith a half-open probe phase. - Events —
AgenticEventandBroadcastEventBuswith bounded replay for late subscribers, typedon<T>()filtering and run-scoped selection. - Telemetry —
StructuredLoggerwith bound fields, child scopes and credential redaction by default;Tracerwith spans, events, sampling and pluggable exporters. - Primitives — web-safe monotonic
Ulid, injectableClock,DisposableandDisposableBag, checked JSON accessors,Result, typedRegistry. - Context —
AgenticContextbundling run identity, logger, bus, tracer, clock, IDs, cancellation and deadlines, with scoped derivation. - Testing —
package:agentic_core/testing.dartexportsFakeClock,SequentialIdGenerator,InMemoryLogSinkandInMemorySpanExporter.