@nhtio/adk 1.20260529.0 → 1.20260531.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -0
- package/adk-mcp.cjs +20307 -0
- package/adk-mcp.cjs.map +1 -0
- package/adk-mcp.mjs +20305 -0
- package/adk-mcp.mjs.map +1 -0
- package/batteries/llm/openai_chat_completions/adapter.cjs +10 -10
- package/batteries/llm/openai_chat_completions/adapter.cjs.map +1 -1
- package/batteries/llm/openai_chat_completions/adapter.mjs +9 -9
- package/batteries/llm/openai_chat_completions/adapter.mjs.map +1 -1
- package/batteries/llm/openai_chat_completions/exceptions.cjs +2 -1
- package/batteries/llm/openai_chat_completions/exceptions.cjs.map +1 -1
- package/batteries/llm/openai_chat_completions/exceptions.mjs +1 -1
- package/batteries/llm/openai_chat_completions/helpers.cjs +17 -16
- package/batteries/llm/openai_chat_completions/helpers.cjs.map +1 -1
- package/batteries/llm/openai_chat_completions/helpers.d.ts +10 -10
- package/batteries/llm/openai_chat_completions/helpers.mjs +16 -16
- package/batteries/llm/openai_chat_completions/helpers.mjs.map +1 -1
- package/batteries/llm/openai_chat_completions/types.cjs +1 -0
- package/batteries/llm/openai_chat_completions/types.d.ts +26 -6
- package/batteries/llm/openai_chat_completions/validation.cjs +3 -1
- package/batteries/llm/openai_chat_completions/validation.cjs.map +1 -1
- package/batteries/llm/openai_chat_completions/validation.mjs +2 -0
- package/batteries/llm/openai_chat_completions/validation.mjs.map +1 -1
- package/batteries/llm/openai_chat_completions.cjs +1 -0
- package/batteries/llm/webllm_chat_completions/adapter.cjs +10 -10
- package/batteries/llm/webllm_chat_completions/adapter.cjs.map +1 -1
- package/batteries/llm/webllm_chat_completions/adapter.mjs +9 -9
- package/batteries/llm/webllm_chat_completions/adapter.mjs.map +1 -1
- package/batteries/llm/webllm_chat_completions/exceptions.cjs +2 -1
- package/batteries/llm/webllm_chat_completions/exceptions.cjs.map +1 -1
- package/batteries/llm/webllm_chat_completions/exceptions.mjs +1 -1
- package/batteries/llm/webllm_chat_completions/helpers.cjs +1 -0
- package/batteries/llm/webllm_chat_completions/validation.cjs +3 -1
- package/batteries/llm/webllm_chat_completions/validation.cjs.map +1 -1
- package/batteries/llm/webllm_chat_completions/validation.mjs +2 -0
- package/batteries/llm/webllm_chat_completions/validation.mjs.map +1 -1
- package/batteries/llm/webllm_chat_completions.cjs +1 -0
- package/batteries/llm.cjs +1 -0
- package/batteries/storage/flydrive/index.d.ts +10 -4
- package/batteries/storage/flydrive.cjs +13 -3
- package/batteries/storage/flydrive.cjs.map +1 -1
- package/batteries/storage/flydrive.mjs +12 -4
- package/batteries/storage/flydrive.mjs.map +1 -1
- package/batteries/storage/in_memory/index.d.ts +31 -17
- package/batteries/storage/in_memory.cjs +90 -30
- package/batteries/storage/in_memory.cjs.map +1 -1
- package/batteries/storage/in_memory.mjs +89 -30
- package/batteries/storage/in_memory.mjs.map +1 -1
- package/batteries/storage/opfs/index.d.ts +10 -4
- package/batteries/storage/opfs.cjs +56 -5
- package/batteries/storage/opfs.cjs.map +1 -1
- package/batteries/storage/opfs.mjs +55 -5
- package/batteries/storage/opfs.mjs.map +1 -1
- package/batteries/storage.cjs +1 -0
- package/batteries/tools/color.cjs +3 -3
- package/batteries/tools/color.mjs +2 -2
- package/batteries/tools/comparison.cjs +4 -4
- package/batteries/tools/comparison.mjs +3 -3
- package/batteries/tools/data_structure.cjs +4 -4
- package/batteries/tools/data_structure.mjs +3 -3
- package/batteries/tools/datetime_extended.cjs +3 -3
- package/batteries/tools/datetime_extended.mjs +2 -2
- package/batteries/tools/datetime_math.cjs +3 -3
- package/batteries/tools/datetime_math.mjs +2 -2
- package/batteries/tools/encoding.cjs +4 -4
- package/batteries/tools/encoding.mjs +3 -3
- package/batteries/tools/formatting.cjs +4 -4
- package/batteries/tools/formatting.mjs +3 -3
- package/batteries/tools/geo_basics.cjs +3 -3
- package/batteries/tools/geo_basics.mjs +2 -2
- package/batteries/tools/math.cjs +4 -4
- package/batteries/tools/math.mjs +3 -3
- package/batteries/tools/memory.cjs +7 -7
- package/batteries/tools/memory.mjs +6 -6
- package/batteries/tools/parsing.cjs +5 -5
- package/batteries/tools/parsing.mjs +4 -4
- package/batteries/tools/retrievables.cjs +12 -11
- package/batteries/tools/retrievables.cjs.map +1 -1
- package/batteries/tools/retrievables.mjs +11 -10
- package/batteries/tools/retrievables.mjs.map +1 -1
- package/batteries/tools/standing_instructions.cjs +5 -5
- package/batteries/tools/standing_instructions.mjs +4 -4
- package/batteries/tools/statistics.cjs +5 -5
- package/batteries/tools/statistics.mjs +4 -4
- package/batteries/tools/string_processing.cjs +4 -4
- package/batteries/tools/string_processing.mjs +3 -3
- package/batteries/tools/structured_data.cjs +4 -4
- package/batteries/tools/structured_data.mjs +3 -3
- package/batteries/tools/text_analysis.cjs +4 -4
- package/batteries/tools/text_analysis.mjs +3 -3
- package/batteries/tools/text_comparison.cjs +3 -3
- package/batteries/tools/text_comparison.mjs +2 -2
- package/batteries/tools/time.cjs +3 -3
- package/batteries/tools/time.mjs +2 -2
- package/batteries/tools/unit_conversion.cjs +3 -3
- package/batteries/tools/unit_conversion.mjs +2 -2
- package/batteries/tools.cjs +2 -1
- package/batteries/tools.mjs +1 -1
- package/batteries.cjs +2 -1
- package/batteries.mjs +1 -1
- package/chunk-Ble4zEEl.js +64 -0
- package/{chunk-KmRHZBOW.js → chunk-kRvK8_k2.mjs} +12 -12
- package/{common-DeZaonK1.mjs → common-ClCHam5-.mjs} +78 -12
- package/common-ClCHam5-.mjs.map +1 -0
- package/{common-Od8edUXU.js → common-DuKWGTVd.js} +90 -12
- package/common-DuKWGTVd.js.map +1 -0
- package/common.cjs +10 -7
- package/common.d.ts +8 -0
- package/common.mjs +8 -8
- package/{dispatch_runner-CsoH0nld.js → dispatch_runner-CEFHXRJZ.js} +38 -6
- package/dispatch_runner-CEFHXRJZ.js.map +1 -0
- package/{dispatch_runner-9j6bXHL3.mjs → dispatch_runner-uNtS-XSP.mjs} +37 -5
- package/dispatch_runner-uNtS-XSP.mjs.map +1 -0
- package/dispatch_runner.cjs +2 -1
- package/dispatch_runner.mjs +1 -1
- package/{exceptions-NrzIHw_R.mjs → exceptions-BeWH2FwP.mjs} +1 -1
- package/{exceptions-NrzIHw_R.mjs.map → exceptions-BeWH2FwP.mjs.map} +1 -1
- package/{exceptions-D5YrO9Vm.js → exceptions-CitH5wZI.js} +2 -2
- package/{exceptions-D5YrO9Vm.js.map → exceptions-CitH5wZI.js.map} +1 -1
- package/exceptions.cjs +3 -2
- package/exceptions.mjs +2 -2
- package/factories.cjs +2 -1
- package/factories.mjs +1 -1
- package/forge.cjs +5 -4
- package/forge.mjs +4 -4
- package/guards.cjs +10 -9
- package/guards.cjs.map +1 -1
- package/guards.mjs +9 -9
- package/index.cjs +14 -13
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -1
- package/index.mjs +13 -13
- package/index.mjs.map +1 -1
- package/lib/classes/retrievable.d.ts +47 -4
- package/lib/contracts/byte_store.d.ts +93 -0
- package/lib/contracts/dispatch_context.d.ts +44 -0
- package/lib/contracts/turn_runner_config.d.ts +5 -1
- package/lib/contracts/turn_runner_context.d.ts +25 -0
- package/mcp/adk-docs-corpus.json +1 -0
- package/mcp/corpus.d.ts +26 -0
- package/mcp/server.d.ts +2 -0
- package/package.json +84 -65
- package/{runtime-CrEPIFgr.mjs → runtime-CDIZwCT0.mjs} +2 -2
- package/{runtime-CrEPIFgr.mjs.map → runtime-CDIZwCT0.mjs.map} +1 -1
- package/{runtime-BJVkrGQe.js → runtime-DyD9oQjH.js} +2 -2
- package/{runtime-BJVkrGQe.js.map → runtime-DyD9oQjH.js.map} +1 -1
- package/skills/adk-assembly/SKILL.md +2 -2
- package/{spooled_artifact-Cm9Te22K.js → spooled_artifact-CHvDDYGA.js} +6 -6
- package/{spooled_artifact-Cm9Te22K.js.map → spooled_artifact-CHvDDYGA.js.map} +1 -1
- package/{spooled_artifact-C5ZtGxuJ.mjs → spooled_artifact-D-JrpY4W.mjs} +5 -5
- package/{spooled_artifact-C5ZtGxuJ.mjs.map → spooled_artifact-D-JrpY4W.mjs.map} +1 -1
- package/spooled_artifact.cjs +3 -2
- package/spooled_artifact.mjs +2 -2
- package/{spooled_markdown_artifact-BpUJol0W.mjs → spooled_markdown_artifact-B4eWOfCX.mjs} +3 -3
- package/{spooled_markdown_artifact-BpUJol0W.mjs.map → spooled_markdown_artifact-B4eWOfCX.mjs.map} +1 -1
- package/{spooled_markdown_artifact-RRB113sy.js → spooled_markdown_artifact-BYfPqFvk.js} +4 -4
- package/{spooled_markdown_artifact-RRB113sy.js.map → spooled_markdown_artifact-BYfPqFvk.js.map} +1 -1
- package/{thought-CDb457b4.mjs → thought-D9IS11b5.mjs} +5 -5
- package/{thought-CDb457b4.mjs.map → thought-D9IS11b5.mjs.map} +1 -1
- package/{thought-DuN2PgdO.js → thought-DBNsR6l8.js} +6 -6
- package/{thought-DuN2PgdO.js.map → thought-DBNsR6l8.js.map} +1 -1
- package/{tool-D2WB1EA1.mjs → tool-CsYuHhiS.mjs} +4 -4
- package/{tool-D2WB1EA1.mjs.map → tool-CsYuHhiS.mjs.map} +1 -1
- package/{tool-COSeH8I6.js → tool-DIHzOZiV.js} +5 -5
- package/{tool-COSeH8I6.js.map → tool-DIHzOZiV.js.map} +1 -1
- package/{tool_call-BKyyxGaZ.mjs → tool_call-Bs_Q5LOG.mjs} +5 -5
- package/{tool_call-BKyyxGaZ.mjs.map → tool_call-Bs_Q5LOG.mjs.map} +1 -1
- package/{tool_call-DFgzcVcU.js → tool_call-CkOVOhg0.js} +6 -6
- package/{tool_call-DFgzcVcU.js.map → tool_call-CkOVOhg0.js.map} +1 -1
- package/{tool_registry-Dkfprsck.js → tool_registry-CKk5ooxm.js} +4 -4
- package/{tool_registry-Dkfprsck.js.map → tool_registry-CKk5ooxm.js.map} +1 -1
- package/{tool_registry-DqLOyGyG.mjs → tool_registry-CX3ofUh9.mjs} +3 -3
- package/{tool_registry-DqLOyGyG.mjs.map → tool_registry-CX3ofUh9.mjs.map} +1 -1
- package/{turn_runner-y7eyEcJH.mjs → turn_runner-C1-mup84.mjs} +10 -6
- package/turn_runner-C1-mup84.mjs.map +1 -0
- package/{turn_runner-CMm2BHdX.js → turn_runner-D0qGIrRI.js} +11 -7
- package/turn_runner-D0qGIrRI.js.map +1 -0
- package/turn_runner.cjs +2 -1
- package/turn_runner.mjs +1 -1
- package/types.cjs +1 -0
- package/types.d.ts +2 -2
- package/common-DeZaonK1.mjs.map +0 -1
- package/common-Od8edUXU.js.map +0 -1
- package/dispatch_runner-9j6bXHL3.mjs.map +0 -1
- package/dispatch_runner-CsoH0nld.js.map +0 -1
- package/turn_runner-CMm2BHdX.js.map +0 -1
- package/turn_runner-y7eyEcJH.mjs.map +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@nhtio/adk` are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## 2026-05-31
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Packaged ADK Assembly MCP server** (`src/mcp/server.ts`) — `@nhtio/adk` now ships a local
|
|
13
|
+
stdio MCP server that can be launched with `npx -y @nhtio/adk`. The server exposes ADK assembly
|
|
14
|
+
guidance, packaged documentation search, document reads, generated API lookup, and pasted-code
|
|
15
|
+
assembly review through MCP tools, resources, and prompts.
|
|
16
|
+
- **Version-aligned MCP documentation corpus** (`dist/mcp/adk-docs-corpus.json`) — package
|
|
17
|
+
generation now copies hand-written docs, generated TypeDoc API pages, changelog content, and the
|
|
18
|
+
ADK assembly Skill into a read-only corpus for the MCP server. The corpus is built from the docs
|
|
19
|
+
available at package time so MCP answers match the installed package version.
|
|
20
|
+
- **ADK MCP documentation page** (`docs/mcp.md`) — added a VitePress guide for installing and using
|
|
21
|
+
the ADK MCP across common coding-agent clients, including VS Code / Copilot, Claude Code, Claude
|
|
22
|
+
Desktop, Cursor, Windsurf, Cline / Roo Code, and Continue.
|
|
23
|
+
- **Unified `ByteStore<R>` storage contract** (`src/lib/contracts/byte_store.ts`) — the single
|
|
24
|
+
low-level "give bytes, get a reader" shape every storage layer implements, with `SpoolStore`
|
|
25
|
+
(`ByteStore<SpoolReader>`) and `MediaStore` (`ByteStore<MediaReader>`) semantic aliases. `write`
|
|
26
|
+
accepts `string | Uint8Array | ReadableStream<Uint8Array>`; string input is UTF-8-encoded.
|
|
27
|
+
Exported alongside `implementsByteStore` and `byteStoreSchema`.
|
|
28
|
+
- **Injectable `spoolStore` option** on the OpenAI and WebLLM Chat Completions batteries — back
|
|
29
|
+
tool-output artifacts with durable storage (`OpfsSpoolStore`, a Flydrive-backed store) instead of
|
|
30
|
+
the default per-dispatch in-memory store. Durable stores also stream large/binary tool output to
|
|
31
|
+
disk rather than buffering it in memory.
|
|
32
|
+
- **`ctx.storeMediaBytes(id, bytes)` → `MediaReader`** and **`ctx.storeRetrievableBytes(id, bytes)`
|
|
33
|
+
→ `SpoolReader`** — handler-reachable byte-persistence conduits that route tool-generated media
|
|
34
|
+
and large extracted RAG text into consumer storage. Both accept a `ReadableStream`. Exposed on
|
|
35
|
+
`TurnContext` and `DispatchContext`; `ConduitBytes` is exported from the public API.
|
|
36
|
+
- **Reader-backed `Retrievable.content`** — `content` now accepts a `SpooledArtifact` in addition
|
|
37
|
+
to `string | Tokenizable`, so large extracted RAG text can live in a consumer `ByteStore` instead
|
|
38
|
+
of permanently on the heap. New `Retrievable.estimateTokens(encoding)` and
|
|
39
|
+
`Retrievable.contentString()` accessors. (Note: token estimation and render still materialise the
|
|
40
|
+
body transiently; reader-backing removes *permanent* heap residency, not the transient
|
|
41
|
+
allocation.)
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- **`InMemorySpoolStore` no longer corrupts binary tool output.** It previously UTF-8-decoded every
|
|
46
|
+
`Uint8Array` at write time, mangling non-text bytes (PDFs, images). Bytes are now stored
|
|
47
|
+
byte-faithfully; `InMemorySpoolReader` decodes on demand for line/text reads and reports the true
|
|
48
|
+
stored byte length.
|
|
49
|
+
|
|
50
|
+
### Changed (BREAKING)
|
|
51
|
+
|
|
52
|
+
- **Documentation now builds before the library package in CI.** The package build consumes the
|
|
53
|
+
generated docs, API reference, and changelog artifact so the npm package always includes the MCP
|
|
54
|
+
documentation corpus when built from tagged/default-branch CI jobs.
|
|
55
|
+
- **The generated npm package now exposes an `adk` binary.** `bin/package.ts` writes
|
|
56
|
+
`bin.adk = "./adk-mcp.mjs"` into the packaged manifest and bundles the MCP SDK/Zod-backed server
|
|
57
|
+
entry while keeping those MCP implementation dependencies out of the published runtime dependency
|
|
58
|
+
list.
|
|
59
|
+
- **Render helpers are now async.** `renderFirstPartyRetrievables`,
|
|
60
|
+
`renderThirdPartyPublicRetrievables`, `renderThirdPartyPrivateRetrievables`, `renderRetrievables`,
|
|
61
|
+
and `renderChatCompletionsSystemPrompt` on `ChatCompletionsHelpers` now return `Promise<string>`
|
|
62
|
+
(previously `string`). Consumers who override these helpers must update their signatures.
|
|
63
|
+
- **`TurnRunnerConfig` gains two required callbacks** — `storeMediaBytesCallback` and
|
|
64
|
+
`storeRetrievableBytesCallback` (both arity 3). `RawDispatchContext` gains the matching required
|
|
65
|
+
`storeMediaBytes` / `storeRetrievableBytes` fields.
|
|
66
|
+
- **Tool-output spool writes are now awaited** — a custom `spoolStore.write()` may return a
|
|
67
|
+
`Promise` (required for `ReadableStream` input).
|