Skip to content

Latest commit

 

History

History
438 lines (275 loc) · 34.8 KB

CHANGELOG.md

File metadata and controls

438 lines (275 loc) · 34.8 KB

Changelog

This file is the canonical source for unreleased changes and published release notes for the codework.

Format

  • Add in-progress work under ## [Unreleased].
  • Move shipped changes into a versioned release section when publishing.
  • Prefer these labels when writing release notes: Added, Changed, Fixed, Removed, Internal, Breaking Changes, Reverted.
  • Keep entries user-facing where possible. Use Internal for refactors, tooling, and package housekeeping.

[Unreleased]

Added

  • @codeworksh/cli: Added OpenTelemetry export. Set OTEL_EXPORTER_OTLP_ENDPOINT and every command sends its traces and metrics over OTLP/HTTP, as protobuf by default or JSON with OTEL_EXPORTER_OTLP_PROTOCOL=http/json. The standard OTEL_* variables configure it (headers, per-signal endpoints, OTEL_SDK_DISABLED, OTEL_SERVICE_NAME, OTEL_RESOURCE_ATTRIBUTES); there is no settings key. Without an endpoint nothing is exported, and a bad configuration never stops a command. Only the high-level spans are exported (command, agent loop, model and tool calls, sandbox create and wake); set CODEWORK_TRACE_LEVEL=debug to export every span, including database queries.
  • @codeworksh/harness: Spans for model requests, tool calls and agent runs carry the OpenTelemetry GenAI attributes (provider, model, session, response id, finish reason, token counts, time to first token), and a failed model request ends its span with an error. Metrics: codework.llm.duration, codework.llm.ttft, codework.llm.tokens (by type: input, output, cache_read, cache_write, reasoning), codework.llm.cost, codework.agent.duration, codework.tool.duration (by tool), codework.sandbox.provision.duration, codework.sandbox.exec.duration and codework.sandbox.active (by driver), plus Effect's fiber runtime metrics (child_fibers_*). Prompts, file contents and model output are never exported.

Fixed

  • @codeworksh/plugin: Fixed tools whose parameters are Schema.Struct({}) being rejected by OpenAI and Anthropic. Their JSON Schema is now { "type": "object", "properties": {} } instead of { "not": { "type": "null" } }.
  • @codeworksh/cli: Fixed codework run exiting 1 with statement has been finalized after printing the response when it created its own sandbox (--sandbox-driver memory, daytona or vercel). The sandbox was stopped after the database had closed, so the stop failed and a Daytona or Vercel sandbox was left running. It is now stopped before the database closes, and the run exits 0.
  • @codeworksh/cli: codework run now writes logs to stderr, so stdout carries only the response.
  • @codeworksh/harness: Fixed Daytona sandboxes logging a warning, with the full HTTP error, for every instruction file (AGENTS.md, CLAUDE.md, ...) a directory does not have. A missing path on Daytona now reads as not found, as on the other sandboxes, which also gives the read tool its usual not-found error there.

Internal

  • Instruction-file discovery probes candidates with exists and only stats the files that exist, so a missing AGENTS.md or CLAUDE.md no longer records a failed span in debug traces.
  • The codework tui E2E artifact now records the CLI version as <version>, so it no longer goes stale on every version bump.
  • Tests load provider and sandbox credentials from the root .env.local instead of one file per package.
  • Added a live E2E test that runs codework run on a memory, Daytona and Vercel sandbox and checks the sandbox is stopped on exit.
  • The live runner-cycle test now interrupts a reply long enough that it cannot finish first, so the interrupt no longer races the model.

[@codeworksh/cli@0.2.0] - 2026-10-12

Added

  • Added codework tui, which opens the terminal UI against a local background server. It reuses the server registered in <home>/service.json when that server answers with the registered pid, and otherwise starts a detached codework serve --service that logs to <home>/log/server.log. A server from another CLI version is replaced, concurrent starts converge on one server, and a server that dies while the TUI runs is restarted on the same port so the TUI reconnects. Pass --server <url> to use a server of your own.
  • Added codework service start|restart|status|stop to manage that background server.
  • Added the server.info RPC, which returns the running server's { pid, version }.

Changed

  • The ACP session config now lists every thinking level the model supports and keeps the selected level as given.

Fixed

  • Fixed a failed codework serve reporting only an error tag. It now shows the cause, such as EADDRINUSE.

Breaking Changes

  • Moved the RPC route to /rpc/v1. Clients that connect with --server or their own URL must use ws://<host>:<port>/rpc/v1.

[@codeworksh/tui@0.0.2] - 2026-10-12

Added

  • First release of the terminal UI on latest, still in development. The launcher resolves a prebuilt binary from the platform package for macOS (arm64, x64) or Linux (arm64, x64; static musl), falling back to CODEWORK_TUI_BIN. Nothing is downloaded at runtime, and Windows is not supported.
  • The TUI connects to the server named in CODEWORK_RPC_SERVER instead of starting its own, and shows a reconnecting state after a dropped connection instead of failing the turn.

[@codeworksh/harness@0.2.0] - 2026-10-12

Added

  • Added automatic retry of transient provider failures in the harness loop. A turn whose request fails with a rate limit, overload, 5xx, timeout or dropped connection, including one that fails mid-stream, is retried with exponential backoff. Configure it with a top-level retry block in settings.jsonc: { "maxRetries": 3, "baseDelayMs": 2000, "maxDelayMs": 60000 }, where maxRetries: 0 turns it off. Quota errors are never retried, and a server that asks to wait longer than maxDelayMs fails the turn. Each failed attempt stays in the session as an aborted entry that the model never sees, and clients receive session.retry.scheduled and session.retry.finished events to show progress.

Fixed

  • Fixed an interrupted turn never reporting session.turn.aborted. The cleanup that settles the turn's open draft and publishes the event was skipped on interruption, so the draft was only cleaned up on the session's next run.

[@codeworksh/plugin@0.2.0] - 2026-10-12

Added

  • Added optIn to plugin definitions. An opt-in plugin is selected like any other but runs only when a settings entry turns it on: { "plugin": "<id>", "enabled": true }.
  • Added Paths to the plugin context: the harness's own home, bin, cache, data and log directories on the host.
  • Added prepareArguments, constrainedSampling and encodeDetails to tool definitions, to repair common argument shapes before validation, constrain how the provider generates arguments, and control the details stored with a result.
  • Added readBytes and scanLines to the sandbox filesystem. scanLines returns a bounded window of a file's lines; a remote backend runs the scan inside the sandbox (Scan.script) so only the window crosses the network.
  • Added SandboxMutation, which serializes the harness's own read-modify-write of one file across parallel tool calls. Every mount layer provides it through withMutation.
  • Added spillPath to the runtime config and sandbox mounts: where oversized tool output is written inside the sandbox, /tmp by default.
  • Added idleTimeoutMs to model options in settings, defaulting to 300000.

Breaking Changes

  • A sandbox filesystem Provider must now implement readBytes and scanLines. A backend that only runs processes can use readBytesViaShell and Scan.script.

[@codeworksh/aikit@0.11.0] - 2026-10-12

Added

  • Added idleTimeoutMs to the request options in aikit. A stream that goes this long without a chunk is aborted as a retryable timeout, so a dead connection fails instead of waiting out timeoutMs. It defaults to 300000 in model.options.
  • Added the normalizeOptionalNulls export, which drops the null a strict tool call sends for an omitted optional argument whose schema does not accept null. validateToolArguments now applies it.

Changed

  • A usage-limit error now classifies as Quota instead of RateLimit, so it is not retried. This covers codes such as insufficient_quota and usage_limit_exceeded, and messages about credit balance, billing or an exhausted quota. A limit that names a per-minute or per-second window still counts as a rate limit.
  • An Anthropic model that cannot disable thinking now records providerThinkingLevel: "high" when asked to run with thinking off, since the request runs at that default effort. The effort is sent on the wire; a caller's own effort provider option still wins.

Fixed

  • Fixed tools with constrainedSampling: { type: "json_schema" } being rejected by Anthropic and other strict providers. aikit set strict: true but sent the original schema; it now converts it to the strict subset (closed objects, every property required, optional ones nullable). A "prefer" tool whose schema the provider cannot express in strict mode, such as Anthropic with minimum, is sent non-strict; a "require" tool throws.

Breaking Changes

  • model.options.maxRetries, the retry inside the provider SDK, now defaults to 0 (was 3). The SDK retried silently, only before the stream started, and also retried quota errors. Combined with the loop retry, one outage would have cost up to 16 requests. Set it per model if an endpoint needs it.
  • resolveOpenAICodexToolConstraint now resolves grammar constraints only, and Message.resolveJsonSchemaConstraint is removed; convertTools handles JSON-schema strictness for every provider.

[@codeworksh/aikit@0.10.0] - 2026-10-07

Covers every change since 0.9.2, the last release on the latest tag, including 0.9.3, which only shipped as dev and canary builds.

Added

  • Added the getEnvApiKey export, so a caller can check whether a provider has an API key in the environment using the same lookup aikit applies when it opens that provider.
  • Added gpt-6-luna to the OpenAI Codex catalog. The Codex backend serves it to ChatGPT accounts, with every reasoning level from low to max and reasoning off.

Changed

  • Updated @ai-sdk/openai to ^4.0.81 and @ai-sdk/provider to ^4.0.19.

Fixed

  • Fixed images reaching models that cannot read them. For a model whose input does not include "image", each image in a user message is now replaced with (image omitted: model does not support images) and each image in a tool result with (tool image omitted: model does not support images); consecutive images collapse to one placeholder. The message and tool result are kept, so the model still knows an image was there. Previously a user image was silently dropped, which removed an image-only message entirely, and a tool-result image was sent anyway, which providers often reject. Vision models are unchanged.
  • Fixed retry-after-ms and an HTTP-date retry-after being ignored when normalizing a provider failure. Only a retry-after given in seconds was read, so retryAfterMs was missing and a retry could come before the server's requested wait.
  • Fixed OpenAI and Codex reasoning levels that the API rejects. minimal is no longer offered for gpt-5.4 through gpt-6 and is clamped to low, since these models reject it. xhigh and max are now offered on gpt-5.6 and gpt-6 models through the OpenAI API, and max stays off gpt-5.5 and earlier. OpenAI gpt-5.6 and gpt-6 models now turn reasoning off with none, as do Codex gpt-5.5, gpt-5.6-luna and gpt-6-luna.
  • Fixed gpt-6-luna ignoring a request to turn reasoning off. @ai-sdk/openai 4.0.66 dropped reasoningEffort: "none" for the model; aikit now requires 4.0.81.
  • Fixed every request to Claude Sonnet 5.5, Opus 5.5 and the Fable 5 models failing when no reasoning level was set. aikit sent thinking: {type: "disabled"}, which these models reject; they cannot turn thinking off, so aikit now leaves thinking to the model.
  • Fixed Claude thinking levels. xhigh and max are now offered on Opus 4.7 and 4.8, the Sonnet 5, Opus 5 and Fable 5 families, and max on Sonnet 4.6 and Opus 4.6; previously these requests were clamped down to high.
  • Fixed Claude Sonnet 4.5's context window on the Anthropic API, which is 200k tokens, not 1M (1M needs a beta header). Responses were sized against the wrong window, so long sessions failed with a context overflow instead of a shorter answer.
  • Fixed a prompt that already overflows the context window failing as an invalid max_output_tokens. The response ceiling is no longer shrunk below 16 tokens, the smallest OpenAI accepts, so the provider's context overflow error reaches the caller and isContextOverflow recognises it.
  • Fixed conversations started on OpenAI Codex failing when continued on OpenAI, Anthropic or OpenRouter. Codex tool call IDs (call_…|fc_…) exceed the 64-character call_id limit of OpenAI and of OpenRouter upstreams such as Meta, and contain characters Anthropic rejects; they are now shortened to the unique call part for those providers.
  • Fixed a provider error sent mid-stream, such as OpenAI's context_length_exceeded event, being reported as an Unknown failure. It is now classified by its status and code like an error returned before the stream starts, so the same overflow is an InvalidRequest either way.

Internal

  • The OpenAI, Codex, Anthropic and OpenRouter live e2e suites now run against a model matrix: gpt-6-luna through gpt-5.4-nano for OpenAI, gpt-6-luna, gpt-5.6-luna and gpt-5.5 for Codex, Claude Sonnet 4.6 through Fable 5.1 plus the 4.5 generation for Anthropic, and Muse Spark 1.3, GLM 5.3 Flash, DeepSeek V4.1 Flash and Gemini 3.8 Flash for OpenRouter. New suites cover every reasoning level, context overflow, cross-model and cross-provider handoff, and prompt caching.

[@codeworksh/aikit@0.9.2] - 2026-09-23

Added

  • Added Model.configureCatalog(path), Model.catalogPath(), and Model.reloadCatalog(). An embedder can keep models.gen.json somewhere other than the working directory (CODEWORK_MODELS_FILE still wins), and a long-running process can pick up a regenerated catalog without restarting.

Fixed

  • Fixed generateModels reusing the first models.dev download for the life of the process. Every call now fetches again, so a process that regenerates its catalog gets current data.
  • Fixed a catalog that failed to load, for example because the file did not exist yet, staying failed for the life of the process. Model.reloadCatalog() now clears the failure along with the loaded catalog.
  • Fixed generateModels writing the catalog in place, where a concurrent reader could see a partial file. It now writes a temp file and renames it over the catalog.
  • Fixed an error response from models.dev surfacing as a JSON parse error. It now fails with the HTTP status.

[@codeworksh/aikit@0.9.1] - 2026-09-23

Fixed

  • Fixed a request that hit timeoutMs being reported as if the caller had cancelled it. Only the caller's own signal now ends a stream with stopReason: "aborted"; an abort raised inside the AI SDK, such as its timeout timer, ends it with stopReason: "error" and a Timeout failure. Callers can now tell a timeout from a cancel and retry it, and codework run prints error[timeout] instead of exiting silently as if Ctrl+C had been pressed.

[@codeworksh/aikit@0.9.0] - 2026-09-23

Added

  • Added a GitHub Copilot provider, exported as createGitHubCopilot / githubCopilot. Copilot serves three inference protocols on one host, so the provider routes each model to the one it actually speaks — OpenAI Chat Completions, OpenAI Responses, or Anthropic Messages — and applies Copilot's client identity to every request.
  • Added the github-copilot protocol to the catalog, options, registry, and thinking paths, so Copilot models are selected and configured like any other provider's.
  • Added per-route reasoning control for Copilot models, which do not share one: the Messages route takes a thinking budget or an adaptive effort level, the Responses route takes a reasoning effort, and the chat route has no generic control and relies on compat.supportsThinkingTokenBudget.
  • Added GitHub Copilot OAuth. aikit auth --github-copilot runs the GitHub device flow, checks that the account can use Copilot, and records the plan-specific API host and the models the account can actually see. --enterprise <domain> targets a GitHub Enterprise host, and --enable-models turns on catalog models the account has left unconfigured.
  • Added getGitHubCopilotApiKey, which resolves a Copilot token from COPILOT_GITHUB_TOKEN or the auth.json store, and from nothing else. GITHUB_TOKEN and GH_TOKEN are deliberately not consulted — they are usually set for git or gh and carry no Copilot access, and in GitHub Actions GITHUB_TOKEN is a workflow token — and neither is a token another application stored for itself, such as an editor's Copilot sign-in.
  • Added Copilot entries to models generate, carrying each model's endpoint routing, thinking-level map, extended context window where GitHub documents one, and compatibility flags.
  • Added device-code login for OpenAI Codex, aikit auth --openai-codex --device. It needs no local callback port, so it works over SSH, inside a container, and when another sign-in already holds port 1455.
  • Added the oauth/github/copilot, oauth/summary, and oauth/interactive subpath exports, covering Copilot credentials, how a login is described to a user, and the terminal helpers an interactive login needs.

Changed

  • Changed the Codex callback server to bind the port and path its redirect URI names, rather than a second hardcoded copy of them, so a caller-supplied redirectUri now works.
  • Changed a failed callback bind from silence to an explanation. Port 1455 is usually held by another Codex sign-in, which would receive the callback, so the login now says so before falling back to asking for the redirect URL.
  • Changed aikit auth to print credential metadata on stdout and every notice on stderr, so --json output is parseable.
  • Changed an unreadable auth.json to fail with the path and the parse error, rather than whatever the underlying reader raised.
  • Updated the AI SDK provider packages and typebox to current releases.

Breaking Changes

  • Removed --originator, --print-headers, and --manual from aikit auth. The first two had no caller behind them, and --device now covers what --manual was for without needing a callback port at all.
  • Removed onManualCodeInput from the Codex login options. A callback that never arrives already falls back to onPrompt, which is what that option raced against.

[@codeworksh/aikit@0.8.0] - 2026-09-06

Added

  • Added context-aware response sizing: every request now measures what the conversation already costs and shrinks its output ceiling to what the context window can still hold, instead of asking for an answer that cannot fit.
  • Added adaptive thinking for newer Claude models, which receive an effort level and size each turn's reasoning themselves rather than being pinned to a fixed token budget.
  • Added usage.cacheWrite1h, the portion of a cache write made with 1h retention, where the provider reports the split.
  • Added isRecoverableLength, which reports whether a length stop ended below the output limit that was actually requested, so callers can decide whether one compact-and-retry attempt is worthwhile.
  • Added compat.thinkingTokenBudgetField and compat.supportsThinkingTokenBudget, letting an OpenAI-compatible endpoint declare the request field it takes a thinking-token budget in.
  • Added compat.forceAdaptiveThinking to the generated catalog for Claude models that support it.
  • Added native JSON Schema output support to the OpenAI Codex provider and a live Codex round-trip regression test.

Changed

  • Changed maxTokens to mean the room reserved for the answer. A thinking budget is added on top and the total is clamped to the model's ceiling, so raising the thinking level no longer silently shortens the answer.
  • Changed default thinking budgets to fixed token counts per level (1024, 2048, 8192, 16384) rather than a fraction of each model's output ceiling, so one setting behaves the same across large and small models. xhigh and max inherit the high budget unless one is configured for them.
  • Changed reasoning to be switched off explicitly when no thinking level is requested. Models that reason by default previously did so anyway, spending output tokens on reasoning the caller never asked for.
  • Changed Google thinking configuration to use per-family token budgets, and to send a thinking level rather than a budget for the model families that take one.
  • Aligned OpenAI Codex request shaping with the ChatGPT Codex backend: requests always disable storage, include encrypted reasoning content, and derive the prompt cache key from the provider session ID.

Fixed

  • Fixed an oversized thinking budget consuming the entire response. A budget that does not fit is now reduced, always leaving at least 1024 tokens for the answer, instead of shrinking the answer toward a single token.
  • Fixed Anthropic requests counting the thinking budget twice, which inflated the requested ceiling and, with an explicit maxTokens, produced answers several times longer than asked for.
  • Fixed a thinking budget below a provider's own minimum being sent as an enabled request, which the provider rejected outright. Thinking is now dropped for that turn instead, so a nearly full context still produces an answer.
  • Fixed 1h cache writes being billed at the 5-minute rate. The 1h portion is now priced at twice the base input rate, correcting a roughly 37% understatement of cache-write cost whenever long cache retention is enabled.
  • Fixed service-tier pricing being applied only to OpenAI Codex requests and being calculated from the tier requested rather than the tier the response was served at.
  • Fixed rate-limit and throttling errors being misread as context overflow, which sent callers to compact a conversation that was never too long instead of retrying.
  • Fixed context-overflow detection missing providers that truncate an oversized prompt to fit the window and then stop with no output, and broadened the recognized provider error messages.
  • Fixed thinking-token budgets never reaching OpenAI-compatible endpoints that accept one.
  • Fixed the default response ceiling being capped at a fixed 32000 tokens for models whose catalog output limit approaches their context window; the context-aware ceiling now decides.
  • Replaced the OpenAI Codex SSE decoder with a standards-compliant parser, rejected streams that close before a terminal Responses event, and stopped accepting WebSocket-only completion events on the HTTP transport.
  • Distinguished transient Codex rate limits from terminal plan and quota failures while preserving structured error codes, retry timing, and OpenAI request IDs.
  • Restricted persisted OpenAI Codex OAuth credentials to owner-only file permissions and redacted token material from OAuth failure messages.

Breaking Changes

  • Changed the meaning of maxTokens from the whole response to the answer alone. A request that previously carved the thinking budget out of maxTokens now adds it on top, so responses can be longer than before at the same setting.
  • Changed default thinking budgets to absolute token counts. On models with a large output ceiling these are substantially smaller than the previous proportional defaults; set thinkingBudgets explicitly to keep the old amounts.
  • Changed requests without a thinking level to disable reasoning explicitly. Providers whose models reason by default will no longer do so unless a level is set.
  • Removed the store, include, and promptCacheKey OpenAI Codex language-model options. These backend-required values are now controlled by the provider.
  • Removed the unused agent lifecycle event protocol from the public Event namespace: AgentEventType, AgentEventSchema, AgentEvent, and the tool.execution.start / tool.execution.update / tool.execution.end types. LLM stream events (LLMMessageEvent) are unchanged.

Internal

  • Extracted thinking resolution, request pricing, and context estimation into llm/thinking.ts, llm/pricing.ts, and utils/estimate.ts, so each derivation from model metadata has one home and can be tested directly.
  • Added Model.optionsKey as the single accessor for a model's provider option namespace, replacing a copy inside the streaming module.
  • Surfaced the service tier a Codex response was served at in provider metadata, so a turn is priced by what it actually cost.
  • Reorganized the OpenAI Codex unit tests by provider module and expanded live coverage for empty messages, response IDs, Unicode surrogate handling, incomplete tool-call histories, native grammar tools, and structured output using HTTP/SSE behavior as a reference.
  • Renamed the Codex OAuth suite for clarity and added CLI coverage for credential status, refresh, and logout wiring.
  • Removed unit coverage for the unused agent lifecycle event schemas.

[@codeworksh/aikit@0.7.2] - 2026-08-25

Added

  • Added a provider-independent failure taxonomy with safe authentication, configuration, authorization, model availability, rate limit, quota, request, policy, timeout, transport, availability, response, and unknown failure categories.
  • Added structured failure metadata to terminal assistant messages and exported the failure schemas and normalization helpers from @codeworksh/aikit and @codeworksh/aikit/failure.
  • Added typed model-catalog load errors for missing, unreadable, empty, and invalid generated catalogs.

Changed

  • Changed model-catalog loading to report configuration failures instead of silently treating an unavailable catalog as empty.
  • Standardized normalized provider error messages with lowercase opening prose and no terminal punctuation.

Fixed

  • Preserved safe provider status, code, request ID, retryability, and retry timing metadata without exposing request bodies, response bodies, or headers.
  • Prevented the underlying AI SDK from logging raw provider exceptions before Aikit can return its normalized terminal failure event.

[@codeworksh/aikit@0.7.1] - 2026-08-24

Fixed

  • Preserved native OpenAI Responses reasoning metadata across multi-turn requests so reasoning items replay without AI SDK Non-OpenAI reasoning parts are not supported warnings.
  • Silently omitted legacy OpenAI reasoning parts whose replay metadata was already lost, matching the provider's existing behavior without emitting unusable-content warnings.

Internal

  • Added real API regression coverage for reasoning metadata persistence and replay with openai/gpt-5.6-luna.

[@codeworksh/aikit@0.7.0] - 2026-08-04

Added

  • Added GPT-5.6 Luna, Sol, and Terra model metadata, reasoning levels, pricing, and OpenAI Codex OAuth support.
  • Exported concrete pending, running, completed, error, skipped, aborted, and terminal tool-call part schemas and their corresponding TypeScript types.
  • Added skipped and aborted support to the terminal tool.execution.end event contract.

Changed

  • Expanded the OpenAI Codex provider with deferred tools, replay metadata, usage reporting, and grammar-constrained custom tools.
  • Preserved Aikit's existing tool-call event contract while adding the new Codex provider capabilities.
  • Made tool execution lifecycle events self-contained: start, update, and end events now carry messageId, partIndex, and a complete pending, running, or terminal toolCall part.

Breaking Changes

  • Replaced the flattened ToolCallInFlight fields on tool.execution.start, tool.execution.update, and tool.execution.end with the complete tool-call part under event.toolCall. Consumers must read call identity and lifecycle data from event.toolCall.

[@codeworksh/aikit@0.6.0] - 2026-06-13

Added

  • Added OpenAI Codex support: authenticate with a ChatGPT Plus/Pro subscription via OAuth (no API key required) and stream responses, tool calls, and reasoning through a dedicated provider. Adds the openai-codex protocol to the model catalog.
  • Added the aikit auth --openai-codex CLI for managing Codex OAuth credentials, including --status, --refresh, and --logout.
  • Added the @codeworksh/aikit/oauth/openai/codex subpath export exposing the OAuth client, credential storage, and authorization-flow helpers so the Codex login can be embedded in your own app or server callback route.

Internal

  • Reorganized the test suite into deterministic unit tests (test/) and opt-in live-provider end-to-end suites (test/e2e/, run via pnpm test:e2e), so the default pnpm test no longer calls paid provider APIs.
  • Added offline unit coverage for streaming-JSON repair, Unicode surrogate sanitization, the event stream, context-overflow detection, usage and cost mapping, multi-model message transforms, model thinking-level resolution, and the Codex OAuth helpers.

[@codeworksh/aikit@0.5.0] - 2026-05-31

Added

  • Replaced the custom LLM protocol with the Vercel AI SDK (ai, @ai-sdk/*). This serves as the new foundational layer for all model interactions, streaming, and provider routing, unlocking native support for Anthropic, Google, Google Vertex AI, OpenAI, xAI, OpenRouter, and other OpenAI-compatible APIs out of the box.

Changed

  • Standardized stream handling, tool calling, and messaging around the Vercel AI SDK primitives rather than maintaining a bespoke protocol.
  • Improved test coverage across the package to ensure robust behavior with the new Vercel AI SDK integration.

Fixed

  • Addressed various TypeScript type mismatch issues regarding the model signatures and the newly integrated AI SDK objects.

Breaking Changes

  • The stateful Agent and higher-level agent wrapper modules have been completely removed to simplify the package's scope. The toolkit now focuses strictly on foundational AI capabilities, relying on the consumers to implement the stateful execution harness and specific agent loops.

[@codeworksh/aikit@0.4.0] - 2026-05-04

Added

  • Added package-local build, lint, format, and test configuration for @codeworksh/aikit using vite-plus.

Changed

  • Migrated @codeworksh/aikit schemas and runtime validation to TypeBox 1.x.
  • Replaced AJV-backed validation with TypeBox's built-in schema compiler and value parser.
  • Updated message, event, model, stream, agent, and Code Mode schemas to use the TypeBox 1.x API shape.
  • Updated the package export map for built ESM output, package metadata access, and local development resolution.
  • Updated tests and examples to match the new TypeBox compiler behavior and dependency layout.

Fixed

  • Improved validation error formatting while preserving the received value in failure messages.
  • Cached compiled validators to avoid recompiling schemas for repeated validation calls.

Internal

  • Removed direct AJV and @sinclair/typebox usage from @codeworksh/aikit in favor of typebox.
  • Refined package metadata and release scripts for the next npm publish.

[@codeworksh/aikit@0.3.1] - 2026-04-17

Added

  • Added OpenAI Completions API support to @codeworksh/aikit, including streaming responses, tool-call handling, and compatibility switches for OpenAI-compatible providers.

Changed

  • Extended the model and provider registry to support runtime protocol overrides and custom model transforms for future provider-specific expansion.
  • Updated the exa example to run against the OpenAI completions flow and simplified example result rendering to reduce response noise.

Fixed

  • Fixed TypeScript issues around the new OpenAI completions integration.
  • Fixed base URL handling for OpenAI-compatible completions providers, including canonical fallback behavior when the catalog omits an explicit OpenAI base URL.

[@codeworksh/aikit@0.3.0] - 2026-04-13

Added

  • Added Code Mode to @codeworksh/aikit with TypeScript system-prompt stubs and the sandbox_execute_typescript tool.
  • Added a QuickJS-WASI sandbox driver for executing generated TypeScript code.
  • Added the codemode-finance-csv example showing Code Mode over a typed CSV-backed finance workflow.

Changed

  • Updated Code Mode to use pluggable drivers via CodeMode.create({ driver, tools }).
  • Exposed first-party Code Mode drivers from @codeworksh/aikit/codemode/drivers.
  • Updated aikit packaging so examples consume built package artifacts like external apps instead of bundling workspace source.

Internal

  • Added runtime and live-agent test coverage for Code Mode, sandbox execution, and tool bindings.
  • Updated package publishing and subpath build outputs to support dedicated Code Mode driver artifacts.

[@codeworksh/aikit@0.2.1] - 2026-04-08

Added

  • Generated stable message IDs so messages keep a consistent identifier through creation and follow-up updates.

Changed

  • Updated message-part mutation and update flows to target message IDs, making streamed and incremental assistant updates more reliable.
  • Reduced the exposed public API surface to keep internals out of the package contract.

Internal

  • Applied general package cleanup as part of the patch release.

[@codeworksh/aikit@0.2.0] - 2026-04-08

Added

  • Introduced the core AI toolkit with agent loops, streaming, message primitives, model catalog support, provider abstractions, and an Anthropic provider.
  • Added a stateful Agent.create(...) instance API on top of the core loop.
  • Expanded package coverage with tests for public API behavior, instance state, loop continuation, and self-contained test paths.

Changed

  • Standardized runtime and stream event names to dot notation for a more consistent public API.
  • Improved async agent emit flow and run or continue-loop behavior.
  • Simplified internal generic usage while keeping the public tool authoring API ergonomic, including cleaner Message.defineTool(...) and Agent.defineTool(...) patterns.

Fixed

  • Fixed state persistence so tool-driven mutations continue to update assistant messages after message.end.

Internal

  • Applied Vite+-driven lint cleanup across provider and stream internals.

[@codeworksh/utils@0.1.1] - 2026-04-08

Added

  • Added the shared utilities package for reusable filesystem, lazy evaluation, async, and runtime helpers.

Changed

  • Aligned package metadata and workspace setup for npm publishing as part of monorepo release preparation.

Internal

  • Carried the package through the Bun-to-Vite+ workspace migration and package rename cleanup reflected in repository history.

[Setup]

Added

  • Bootstrapped the workspace with the initial aikit and shared utilities packages.
  • Added top-level documentation, the project logo, the repository license, and AGENTS.md.

Changed

  • Prepared the workspace for npm publishing and cleaned up package naming and dependency metadata.
  • Migrated the repo from Bun and Biome-based tooling to pnpm with vite-plus and an ESM-first configuration.

Internal

  • Pinned the root vite-plus version and tightened the publishing pipeline for package releases.