agentic_core 0.1.1
agentic_core: ^0.1.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.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.