akashi 0.3.2
akashi: ^0.3.2 copied to clipboard
Provider-neutral core for the Akashi agent framework: streaming tool-loop agents, typed tools, sealed message/event unions, multi-agent and durable-execution seams. Pure Dart.
Changelog #
0.3.2 #
- Fix: add a
library;directive tosrc/transport/http_client_factory.dartso its file-level doc comment is no longer a dangling library doc comment (dangling_library_doc_comments, part ofpackage:lints/core.yaml). Restores full marks on pub.dev's static-analysis score. No code or API changes.
0.3.1 #
- Docs: README status now reflects v0.3 (was stale at v0.1) and links the v0.4/v0.5 roadmap. No code or API changes.
0.3.0 #
Multi-agent + durable-execution milestone (additive; one noted sealed-union extension).
- Subagent-as-tool —
Agent.asTool(...)(extension) turns any agent into aToola parent can call, running the child fresh with isolated history and tools. - Handoffs —
Handoff/handoff(...)exposetransfer_to_<name>tools; the loop switches the active agent's model/instructions/tools while preserving history, emitting a newHandoffEvent. API note:HandoffEventis a new subtype of the sealedAgentEvent— exhaustiveswitches without adefaultmust add a case. - First-class escalation —
EscalationPolicyobjects (escalateOnToolErrors,escalateAfterSteps,escalateOnLowConfidence,escalateWhen) folded into aprepareStephook viaescalate([...]). - Message/Part serialization —
partToJson/partFromJson,messageToJson/messageFromJson, version-taggedmessagesToJson, andcheckpointToJson/checkpointFromJson. Total encoding (non-JSON tool output degrades to a flagged string). - Durable human-in-the-loop —
ToolLoopAgent(durableApproval: true)with aCheckpointStorepersists asuspendedcheckpoint and throwsSuspendedinstead of blocking;resume(checkpointId, decision: ...)re-enters the suspended step.AgentCheckpointgains additivependingApproval,resolvedResults, andstatus(CheckpointStatus) fields. - Adapter helpers —
partsToText(flatten a message's parts to text) andencodeToolOutput(string-or-JSON-encode a tool result), shared by the first-party provider adapters and available to anyone writing their own.
0.2.0 #
Production single-agent milestone (additive — no 0.1.0 API breaks).
- Structured output strategy selection in
generateObject: nativejsonSchema→toolMode(forcedfinal_answertool) →promptOnly, with the validate/repair loop as the universal safety net. StructuredOutputModeenum and the optionalStructuredOutputCapablecapability interface aLanguageModelmay also implement to declare support.RunOptions.responseFormatis now threaded into the model request.Output<T>convenience schemas (Output.object/Output.array/Output.choice), drop-in forgenerateObject(schema: ...).- Context-engineering helpers for
prepareStep:keepLastMessages,summarizeOlderThan, andescalateAfterErrors. InMemoryCheckpointStoreandToolLoopAgent.resume(checkpointId)to resume a checkpointed run from its persisted message history.CallbackApprovalHandler— an in-process human-in-the-loop approval handler backed by a callback.ConsoleTracer— prints therun -> step -> toolspan tree for local debugging.EmbeddingModeland the optionalEmbeddingProvidercapability for RAG / memory vectors (adapters implement them;akashi_gatewayresolves them viaProviderRegistry.embeddingModel).- Parallel tool execution: a step's tool calls now run concurrently by default
(
ToolLoopAgent(parallelToolCalls: ...), defaulttrue). Approvals are still resolved sequentially, andToolResultevents are emitted in call-index order once the step's tools settle (previously interleaved with execution). ReasoningDeltaPart.signature(optional, additive) carries provider reasoning signatures (e.g. Anthropic thinking blocks); the loop folds the last signature into the accumulatedReasoningPart.- Cross-platform SSE: the SSE line parser is now a pure, platform-agnostic unit
(
parseSseBytes/parseSseLines), andHttpSseTransportselects a streaming client per platform via conditional import (afetch-based client on the web, where the default client cannot stream response bodies).
0.1.0 #
Initial release — the first working vertical slice.
- Runtime
Schema<T>builder (string/integer/number/boolean/array/object/raw) withdecodeand non-throwingvalidate. - Sealed
Message/PartandAgentEventunions for exhaustiveswitch. Provider/LanguageModelcontract with the low-levelModelStreamPartunion every adapter normalizes to.Tool+ the typedtool<I, TDeps>factory andToolContext<TDeps>(typed dependency injection).- Composable
StopConditions:stepCountIs,hasText,hasToolCall. Agent<TDeps>interface +ToolLoopAgentstreaming tool loop (streamis the primitive;runcollects over it).Tracerinterface +NoopTracer; pluggableSseTransport.- Seams (no-op in 0.1) for
prepareStep, checkpointing, and tool approval.