@@ -6,13 +6,13 @@ This describes what will exist next, why, and what is explicitly out of scope.
66
77## Current State (snapshot)
88
9- | Package | Status |
10- | ---| ---|
11- | ` agentic-kit ` | Core portability layer. Streaming, message model, providers registry, cross-provider transforms, usage/cost. |
12- | ` @agentic-kit/agent ` | Sequential agent loop. Tool execution, lifecycle events, abort/continue, JSON Schema validation. |
13- | ` @agentic-kit/anthropic ` | Provider adapter. Streaming, thinking, tool calls, multimodal, abort. |
14- | ` @agentic-kit/openai ` | Provider adapter. Streaming, reasoning, tool calls, multimodal, abort. OpenAI-compatible endpoints. |
15- | ` @agentic-kit/ollama ` | Provider adapter. Local inference, embeddings. ** Tool execution in streaming is a stub.** |
9+ | Package | Status |
10+ | ------------------------ | ------------------------------------------------------------------------------------------------------------ |
11+ | ` agentic-kit ` | Core portability layer. Streaming, message model, providers registry, cross-provider transforms, usage/cost. |
12+ | ` @agentic-kit/agent ` | Sequential agent loop. Tool execution, lifecycle events, abort/continue, JSON Schema validation. |
13+ | ` @agentic-kit/anthropic ` | Provider adapter. Streaming, thinking, tool calls, multimodal, abort. |
14+ | ` @agentic-kit/openai ` | Provider adapter. Streaming, reasoning, tool calls, multimodal, abort. OpenAI-compatible endpoints. |
15+ | ` @agentic-kit/ollama ` | Provider adapter. Local inference, embeddings. ** Tool execution in streaming is a stub.** |
1616
1717The agent loop today runs to completion in-process: it does not pause for
1818out-of-band input and has no transport layer above it. Consumers wire it into
@@ -272,6 +272,16 @@ Unit tests in `@agentic-kit/agent`.
272272 contract suite against ` MemoryRunStore ` . The same export is consumed by
273273 any third-party ` RunStore ` implementation.
274274- Concurrent save/load on the same id (last write wins, no torn reads).
275+ - Re-pause ` createdAt ` preservation: a second ` save() ` of the same run id keeps
276+ the original ` createdAt ` ; only ` updatedAt ` advances. (1.1 does not yet
277+ enforce this — fold into the contract suite.)
278+ - Abort-during-save race: ` agent.abort() ` while a ` runStore.save() ` is
279+ in-flight resolves without orphaning the persisted record or surfacing a
280+ rejected save promise.
281+ - Mixed-batch tool ordering: when an assistant turn contains a regular tool
282+ call followed by a decision-bearing tool whose arguments fail validation,
283+ the persisted ` messages ` order matches the LLM's tool-call order. (Latent
284+ in 1.1's invalid-args branch; surfaces only via the contract suite.)
275285
276286### 1.3 Run Serialization Helpers
277287
@@ -556,14 +566,14 @@ companion packages, or other ecosystems entirely.
556566
557567## Package Layout After Phase 1
558568
559- | Package | Change |
560- | ---| ---|
561- | ` agentic-kit ` | unchanged |
562- | ` @agentic-kit/agent ` | extended: pausable tools, ` RunStore ` , run serialization helpers, middleware hooks (Phase 2) |
563- | ` @agentic-kit/anthropic ` | unchanged in Phase 1; caching API in Phase 2 |
564- | ` @agentic-kit/openai ` | unchanged in Phase 1; caching API in Phase 2 |
565- | ` @agentic-kit/ollama ` | unchanged in Phase 1; tool support in Phase 3 |
566- | ` @agentic-kit/react ` | ** new** — ` useChat ` hook |
569+ | Package | Change |
570+ | ------------------------ | ------------------------------------------------------------------------------------------- |
571+ | ` agentic-kit ` | unchanged |
572+ | ` @agentic-kit/agent ` | extended: pausable tools, ` RunStore ` , run serialization helpers, middleware hooks (Phase 2) |
573+ | ` @agentic-kit/anthropic ` | unchanged in Phase 1; caching API in Phase 2 |
574+ | ` @agentic-kit/openai ` | unchanged in Phase 1; caching API in Phase 2 |
575+ | ` @agentic-kit/ollama ` | unchanged in Phase 1; tool support in Phase 3 |
576+ | ` @agentic-kit/react ` | ** new** — ` useChat ` hook |
567577
568578Shared test helpers live in ` tools/test/ ` (repo-internal directory, not a
569579package). Phase 2 and 3 add no new packages; everything extends in place.
@@ -573,10 +583,18 @@ package). Phase 2 and 3 add no new packages; everything extends in place.
573583- ** Run record schema versioning.** Once ` RunStore ` is shipped, the on-disk
574584 ` AgentRun ` shape becomes a compatibility surface. Decide on an explicit
575585 version field and migration story before 1.0.
576- - ** Decision schema validator scope.** The agent already validates tool inputs
577- against JSON Schema (` packages/agent/src/validation.ts ` ). The decision
578- validator should reuse that same code path. Confirm coverage of the
579- features needed (discriminated unions in particular).
586+ - ** Decision schema validator scope.** Resolved (1.1): the decision validator
587+ reuses ` validateSchema ` from ` packages/agent/src/validation.ts ` — same code
588+ path as tool inputs. Discriminated-union and ` oneOf ` / ` anyOf ` coverage is
589+ still untested; fold into the 1.2 contract suite.
590+ - ** Lifecycle events across pause boundaries.** On resume, ` agent_start `
591+ re-fires (each ` runLoop ` entry is a fresh start) but ` turn_start ` does not
592+ (the persisted assistant message is reused, not regenerated). This
593+ asymmetry is invisible to a single-prompt consumer but matters for any
594+ listener that tracks turn vs. run lifecycle. Decide before 1.4 whether to
595+ introduce a distinct ` agent_resume ` event or to redocument ` agent_start `
596+ with explicit "loop entry" semantics — the ` @agentic-kit/react ` hook will
597+ codify whichever choice externally.
580598- ** SSE vs. NDJSON.** SSE is the proposed default. NDJSON is simpler but lacks
581599 reconnection semantics and event-type framing. Revisit if real-world
582600 consumers report SSE problems behind specific proxies.
0 commit comments