All notable changes to the astorlm package will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
astorlm/browserentry point: loop, providers, tools API and the QuickJS runner, with nonode:*import (enforced by a test).- In-browser demo at
/demo/(docs site): the agent loop, in-memory file tools and the WASM sandbox against a user-supplied OpenAI-compatible endpoint. QuickJsCodeRunneraccepts a preloadedmodule(experimental), e.g. a single-file QuickJS variant for browsers.
createAgentimportstoolfromtools/defineinstead of the tools barrel, so it no longer pulls the Node-only built-in tools.
0.2.3 — 2026-10-23
License and dependency release. No API changes.
- License: Apache 2.0 (was MIT), with a
NOTICEfile. KeepLICENSEandNOTICEwhen you redistribute. Versions up to 0.2.2 stay MIT. - Author is now "Aralde" in
package.jsonandLICENSE. @anthropic-ai/sdkrange raised to^0.135.0(was^0.128.0).
- Public documentation site served from
/docs, linked from the README together with harnesspatterns.dev.
0.2.2 — 2026-09-18
Documentation only. No runtime changes, no API changes — dist/ is identical
to 0.2.1 apart from the version string. npm renders the README of the newest
published version, so the corrections below cannot reach the package page
without a release of its own.
- The entrypoint map contradicted the code. "Module Layout" claimed the
agnostic core lives behind
astorlm/core, the opposite of the intro and ofsrc/core.ts, which is the Node runner.astorlmis the agnostic barrel. - The diagram did not render on npm. npm does not support Mermaid, so the
package page showed a raw wall of
graph TD/subgraph/-->three screens below the table that sells "No graph DSL" as the difference from LangGraph. It is now a plain text block that renders identically on npm and GitHub, and it carries the agnostic/Node split per entrypoint — the fact the diagram was burying in its subgraph labels. - Four internal links pointed at the wrong section, including
experimental/edge-boostandsteeringin the feature tables.
- Sections for four public surfaces the README never documented:
astorlm/prompt(compilePrompts,formatPromptReport),astorlm/experimental/contract(createContractHooks,ContractValidator),generateObject(exported from the main barrel with no prose at all) andrunGoalLoop(two unlinked words in a table). Every subpath declared inpackage.json#exportsnow has a documented section.
0.2.1 — 2026-09-18
Metadata only. No runtime changes, no API changes — dist/ is identical to
0.2.0 apart from the version string.
package.json#descriptionis now "The agent loop as a library: an embeddable, SDK-first agentic runtime for TypeScript." It is the tagline npm shows in search results, so it says what the package is rather than what it was inspired by. npm renders the description of the newest published version, which is the reason this ships as a release of its own.
0.2.0 — 2026-09-18
Everything below landed after the initial release: structured output, the edge-boost profile for weak models, MCP Apps UI, a WASM code sandbox, first-class embeddings, the full observability stack (tracing, metrics, replay, evals) and the repository infrastructure for going public.
The observability stack was documented and tested but not packaged.
tracing,tracing/otel,metrics,replayandevalsexisted undersrc/experimental/, had passing tests and were described in the README, but appeared in neithertsup.config.tsnorpackage.json#exports. They never reacheddist/—dist/experimental/evalswas an empty directory — soimport ... from 'astorlm/experimental/tracing'failed withERR_PACKAGE_PATH_NOT_EXPORTEDfor anyone installing the package. Tests never caught it because they import fromsrc/, not from the built package.- All five are now built and exported.
test/package-exports.test.tsguards the contract: the tsup entry list and the exports map must agree, every export must point at the file its entry produces, and anysrc/experimental/<name>/index.tsmust be exported.
- The provider hardcoded
thinking: { type: 'enabled', budget_tokens: n }. That form is removed on current models, which reject it with a 400 — the code compiled and failed only at runtime, and only for callers who setthinking. thinkingnow accepts{ type: 'adaptive', display? }(the current form, in which the model decides how much to think) and keeps{ budget_tokens }for callers still targeting older models.- New
effortoption ('low'…'max'), mapped tooutput_config. contextLimitis now an option instead of a hardcoded 200000. The default is unchanged and deliberately conservative: compacting earlier than necessary wastes turns, compacting later than necessary fails the request. Callers on larger-context models raise it.test/anthropic-wire.test.tsgives this provider its first wire-level coverage, asserting the request body against a real HTTP server.
heartbeat stops automatically via maxTicks and timeoutMsfailed roughly one run in five: it slept a fixed 40 ms and then asserted an exact tick count, which is a bet on timer scheduling that parallel load loses. Waits for something to happen now poll with a deadline; waits asserting that nothing happens stay as real sleeps, since those can only produce false passes.
AuthStorage.requirethrew its error in Spanish (Falta credencial: ...). It is a message consumers of an English-language library see at runtime, so it now readsMissing credential: <key>. Set it in the environment or pass it as an override.Two leftover Spanish comments intools/define.tswere translated as well. The Spanish stopword list in the error registry's fingerprinting stays — that one is data, not prose.- The README and CONTRIBUTING pointed at "the examples repo" as if it were reachable. The examples are published separately, so the pointers now say so instead of sending readers somewhere that does not exist yet.
openai4.104 → 7.17 (three majors),@anthropic-ai/sdk0.40.1 → 0.126,@modelcontextprotocol/sdk1.29 → 1.30,quickjs-emscripten0.31 → 0.32,vitest2 → 4,tsx4.21 → 4.23.viteststops at 4 rather than 5 on purpose: 5 declaresengines: ^22.12 || ^24 || >=26, which excludes Node 20 — the floor this package promises. CI was passing on Node 20 with vitest 5 only because nothing enforcesengines, so the oldest supported runtime was being verified by a runner that does not claim to work there. Version 4 declares^20 || ^22 || >=24and covers the whole matrix honestly.- Held back on purpose:
zod3 → 4 is a public-API migration, since consumers hand their own Zod schemas totool()— it needs its own change.typescript5 → 7 typechecks clean but breaks the.d.tsbuild under tsup.@types/nodestays on 22 to match the supported Node floor (engines: >=20); newer type packages describe APIs the supported runtimes do not have. - GitHub Actions bumped:
checkoutv5 → v7,setup-nodev5 → v7,pnpm/action-setupv4 → v6.
test/openai-wire.test.tsruns the agent against a real (minimal) OpenAI-compatible HTTP server instead of a mock provider, covering the request body, streamed text deltas, a tool call reassembled from splitargumentsfragments, the tool-result round-trip, and usage on the final chunk. The rest of the suite stops at the provider boundary, so nothing exercised the SDK's HTTP and SSE paths — exactly what moves whenopenaicrosses a major version.
Repository plumbing ahead of the public release. No runtime changes.
- CI workflow (
.github/workflows/ci.yml): typecheck, test, build andpnpm packon Node 20/22/24 (Linux) plus Node 22 on Windows. - Community files:
CONTRIBUTING.md(setup, architecture map, conventions, PR expectations),CODE_OF_CONDUCT.md(Contributor Covenant 2.1) andSECURITY.md— the latter includes an explicit threat model covering the executor, path confinement, prompt injection and MCP trust boundaries. - Issue and PR templates, plus a monthly Dependabot config for npm and GitHub Actions.
- De-flaked
executor-local.test.ts: it waited a fixed 200 ms for a spawned interpreter to produce output, which is not enough while the rest of the suite runs in parallel. It now polls with a deadline. - README opening rewritten: tagline, a runnable quickstart, a short comparison against coding CLIs / agent frameworks / vendor SDKs, a capability table and a table of contents. The reference material below it is unchanged.
- Brand assets in
assets/: bandoneón-bellows logo (lockup in light and dark, standalone mark, and a rounded-square app icon), now used in the README header alongside status badges. packageManageris pinned inpackage.jsonso CI and contributors resolve the same pnpm version.filesnow shipsassets/,CHANGELOG.mdandLICENSEin the npm tarball.- Package metadata:
author,repository,homepage,bugsandpublishConfig.access— without them the npm page would carry no link back to the repository or its issue tracker.
Surfaced by the new CI matrix, which runs the suite on Linux for the first time.
spawn(cmd, { shell: true })returns the pid of the shell, not of the command it runs.kill()signalled only that shell, so the real process survived, kept the inherited stdio pipes open, and'close'never fired — meaninggetOutput()reportedrunning: trueforever and the process was orphaned. Windows already handled this withtaskkill /T; POSIX did not.- POSIX spawns are now detached into their own process group and terminated
with a negative pid, so the whole tree goes down. This covers
kill(),dispose(),exec()'s timeout path and abort viaabortSignal(Node's ownsignalhandling also reaches the shell only).
Typed, schema-validated model output as a first-class API.
generateObject({ provider, schema, prompt, ... })returns{ object, message, sessionId?, mode }whereobjectis typed and validated against a Zod schema.- Two strategies behind one call:
'tool'(terminal tool) — the general primitive. Registers a synthetic tool whose schema is the desired output and instructs the model to call it; its input is the object. Works with any provider, composes with other tools, and reuses the agent's tool validation + repair loop (an invalid object comes back as an errortool_resultthe model self-corrects).'native'(response_format) — for the no-tools, one-shot case. Maps to OpenAIresponse_format: json_schema(constrained decoding). Repairs by re-asking with the validation error when the provider lacks native support.'auto'(default) —'native'when there are no tools and the provider is OpenAI-compatible;'tool'otherwise.
OutputFormattype +ProviderStreamOptions.outputFormat.OpenAIProvidermaps it toresponse_format(only when no tools are sent in the same call).CreateAgentOptions.stopOnToolNames/runLoopsupport: the loop returns immediately after a named tool runs without error (powers the terminal-tool primitive; also useful standalone).GenerateObjectErrorthrown when the model never produces a valid object.
A complete, spec-aligned skills implementation. Skills are reusable markdown instructions the agent loads on demand; this drop introduces the data model, three activation modes, two built-in sources, the canonical filesystem pattern, and strict frontmatter validation.
Skill/SkillMetadata/SkillSource/SkillModetypes under the agnosticastorlmbarrel. Skills are pure data — markdown body plus metadata — and the SDK ships no opinion about where they live.Skill.path?: string— absolute path to the SKILL.md when the source exposes one (filesystem sources do; in-memory sources do not). Required by the'filesystem'activation mode.Skill.metadata?: Record<string, string>— catch-all that captures any frontmatter field other thannameanddescription(version,tags,license, …). The SDK does not interpret these; they are available to consumer policy code (filtering, gating, etc.). Forward- compatible with future spec extensions.
createInMemorySkillSource({ name, skills })— host-supplied skills, useful for tests, embedded resources, or skills materialised from a database. Accepts optionalmetadataper skill.createFileSystemSkillSource({ dir, name? })(inastorlm/node) — reads<dir>/<name>/SKILL.mdfiles from disk; populates absolutepathand extrametadatafrom the frontmatter.- The session accepts any number of sources via
skillSources: SkillSource[]. Conflicts (two sources offering the same skill name) throw at session creation; there is no silent override.
'filesystem'— the canonical Agent Skills pattern adopted by Claude Code, OpenAI Codex and Gemini CLI. The system prompt lists each skill's name, description and absolute SKILL.md path; the agent reads the body with the standardreadtool when triggered. No meta-tool is registered. Most robust across model sizes; unlocks bundledscripts/,references/,assets/for free viaread/bash.'on-demand'(default) — the system prompt lists only name + description; the SDK auto-registers aload_skillmeta-tool the model invokes to materialise a body. Scales to many skills without bloating context, but depends on the model being willing to invoke a meta-tool.'all'— every body is concatenated into the system prompt at session init. Cheapest at runtime; eats context. Use for small, always-relevant skill sets.
name: 1–64 chars,^[a-z0-9][a-z0-9-]*$, reserved identifiers (anthropic,claude) blocked.description: 1–1024 chars, no XML tags (e.g.<foo>/</foo>) — they can be mistaken for native tool-call syntax by some models.- The
namefrom the frontmatter must match the directory name on the filesystem source (drift throws a clear error with the file path). - Public validators exposed for programmatic use:
validateSkillName,validateSkillDescription,validateSkillSpec,SkillValidationError,SKILL_VALIDATION_LIMITS(frozen).
SkillRegistry— aggregates one or moreSkillSources, dedupes by name with throw-on-conflict, caches loaded bodies.parseSkillFrontmatter(content)— minimal YAML-frontmatter parser tailored for SKILL.md files (no dependency added).renderSkillsBlock(skills, mode)— renders the system-prompt block for any of the three modes.createLoadSkillTool(registry)— theload_skillmeta-tool used by'on-demand'.
- Bodies returned by
load_skillland astool_resultblocks in the conversation, so when sessions are persisted viaFileSessionManager, loaded skills survive resumes for free — no re-invocation needed.
- The
<available-skills>block in'on-demand'mode lists entries as markdown bullets with the name in backticks (`pptx-deck` — Build a PowerPoint deck…). A YAML-ish layout (name: pptx-deck\n description: …) was tried first and rejected because it primes Llama-family models to leak the literalname:prefix into their native tool-call syntax (<function=name: foo>), making the provider reject the call withtool_use_failed. Backticks- em-dash read as prose to all models and remove the ambiguity.
- Paths in
'filesystem'mode are rendered with forward slashes regardless of host OS. Node accepts them on Windows, and the change keeps the JSON the model emits for thereadtool call free of heavy backslash escaping (which has been observed to confuse Llama 4 Scout into emitting malformed<function=name=…>syntax). - File-system source error messages always include the absolute path of the offending SKILL.md.
- 9 new test files:
skills-parseFrontmatter,skills-registry,skills-inMemorySource,skills-integration,skills-fileSystemSource,skills-validate,skills-filesystem-mode. 152 tests passing total.
- New "Skills (loadable knowledge packs)" section in
README.mdwith all three modes, frontmatter rules table, an example skill featuring extra frontmatter fields (version,tags,license), in-memory skill example withmetadata, and the canonical'filesystem'setup. astorlm-examples/examples/15-skills-playground/(separate repo) ships nine ready-to-run variants (00–08) covering diagnostic, on-demand FS,'all'mode, in-memory, custom remote source, multi-source, persistence round-trip, host-side auto-router, and the canonical'filesystem'pattern. Validated end-to-end against Llama 4 Scout via Groq.
Embeddable, runtime-agnostic agentic TypeScript SDK with:
- Multi-turn agent loop with parallel tool execution
- Anthropic + OpenAI-compatible providers
- Session persistence and branching (FileSessionManager)
- Pluggable
Executorfor shell commands (Local + Docker) - Session hooks (permission gating, pre/post tool wrapping)
- Context optimizer and opt-in retry policy
- MCP client (stdio + HTTP)
- Experimental federated error registry under
astorlm/experimental/error-registry.