Skip to content
14 min read · 2,743 words

@nhtio/adk

Modules

ModuleDescription
@nhtio/adkRoot convenience barrel for the ADK's core runtime values and public TypeScript contracts.
@nhtio/adk/batteriesOpt-in aggregate barrel for bundled ADK batteries across LLMs, tools, and storage.
@nhtio/adk/batteries/contextAggregate barrel for bundled context-management batteries — strategies for fitting a large working set of messages, memories, retrievables, thoughts, and tools into a model's context window.
@nhtio/adk/batteries/context/compactCompact — summarize-over-threshold context management. Instead of shedding old turns outright, pay for a model call to fold them into a running summary, trading a real API cost for retaining compressed signal from everything folded away.
@nhtio/adk/batteries/context/compact/contractsStructural contracts for the Compact (summarize-over-threshold) context-management battery — the seams it invokes via injected functions, and the one cost-observability shape it hands back.
@nhtio/adk/batteries/context/compact/summarizerThe Compact summarizer and history assembler — the whole Compact thesis, in code.
@nhtio/adk/batteries/context/exceptionsShared exception for the context-management batteries — the one failure class thrift and compact have in common.
@nhtio/adk/batteries/context/thriftToken Thrift — subtractive context management. A pure, model-free algorithm that holds a large WORKING set (messages, memories, retrievables, thoughts, an image, tools) and SUBTRACTS it down to the highest-signal slice that fits the active model's context window.
@nhtio/adk/batteries/context/thrift/contractsStructural contracts for the Token Thrift subtractive-pass battery — every shape it reads off a caller's objects, and every capability it invokes via an injected function.
@nhtio/adk/batteries/context/thrift/relevanceRelevance-based history-turn selection — the companion to subtractToFit that decides WHICH prior turns are worth replaying at all, before the subtractive pass ever runs.
@nhtio/adk/batteries/context/thrift/subtractive_passThe subtractive pass — the whole Token Thrift thesis, in code.
@nhtio/adk/batteries/embeddingsEnvironment-neutral aggregate barrel for bundled embeddings batteries.
@nhtio/adk/batteries/embeddings/openaiOpenAI Embeddings adapter battery — the environment-neutral embeddings battery and owner of the shared embeddings option base.
@nhtio/adk/batteries/embeddings/openai/adapterCross-environment OpenAI Embeddings adapter battery.
@nhtio/adk/batteries/embeddings/openai/exceptionsBattery-scoped exception constructors for OpenAI Embeddings adapter failures.
@nhtio/adk/batteries/embeddings/openai/helpersShared, engine-agnostic helpers for the embeddings batteries.
@nhtio/adk/batteries/embeddings/openai/typesOption and wire-shape types for the OpenAI Embeddings adapter, plus the shared embeddings battery base type both bundled embeddings batteries build on.
@nhtio/adk/batteries/embeddings/openai/validationRuntime validation schema and wrapper for OpenAI Embeddings adapter options.
@nhtio/adk/batteries/embeddings/transformers_jstransformers.js Embeddings adapter battery — dual-environment ONNX feature-extraction.
@nhtio/adk/batteries/embeddings/transformers_js/adaptertransformers.js (ONNX, dual-environment) Embeddings adapter battery.
@nhtio/adk/batteries/embeddings/transformers_js/exceptionsBattery-scoped exception constructors for the transformers.js Embeddings adapter.
@nhtio/adk/batteries/embeddings/transformers_js/poolingDeterministic, battery-owned pooling + L2-normalization for the transformers.js embeddings battery.
@nhtio/adk/batteries/embeddings/transformers_js/typesOption and pipeline types for the transformers.js Embeddings adapter.
@nhtio/adk/batteries/embeddings/transformers_js/validationRuntime validation schema and wrapper for transformers.js Embeddings adapter options.
@nhtio/adk/batteries/embeddings/webllmWebLLM Embeddings adapter battery — WebGPU/in-process embeddings via @mlc-ai/web-llm.
@nhtio/adk/batteries/embeddings/webllm/adapterWebLLM (WebGPU, in-process) Embeddings adapter battery.
@nhtio/adk/batteries/embeddings/webllm/exceptionsBattery-scoped exception constructors for WebLLM Embeddings adapter failures.
@nhtio/adk/batteries/embeddings/webllm/typesOption and engine types for the WebLLM Embeddings adapter.
@nhtio/adk/batteries/embeddings/webllm/validationRuntime validation schema and wrapper for WebLLM Embeddings adapter options.
@nhtio/adk/batteries/encodingOpt-in serialization battery: make the ADK primitives round-trip through @nhtio/encoder.
@nhtio/adk/batteries/generationEnvironment-neutral aggregate barrel for bundled media generation batteries.
@nhtio/adk/batteries/generation/_sharedStructural contracts and normalization helpers shared by the media generation batteries (text→image + image editing).
@nhtio/adk/batteries/generation/geminiGemini media generation adapter battery.
@nhtio/adk/batteries/generation/gemini/adapterCross-environment Gemini media generation adapter battery.
@nhtio/adk/batteries/generation/gemini/exceptionsBattery-scoped exception constructors for Gemini media generation adapter failures.
@nhtio/adk/batteries/generation/gemini/typesOption and wire-shape types for the Gemini media generation adapter.
@nhtio/adk/batteries/generation/gemini/validationRuntime validation schema and wrapper for Gemini media generation adapter options.
@nhtio/adk/batteries/generation/openaiOpenAI media generation adapter battery — the environment-neutral generation battery and owner of the shared generation option base.
@nhtio/adk/batteries/generation/openai/adapterCross-environment OpenAI media generation adapter battery.
@nhtio/adk/batteries/generation/openai/exceptionsBattery-scoped exception constructors for OpenAI media generation adapter failures.
@nhtio/adk/batteries/generation/openai/typesOption and wire-shape types for the OpenAI media generation adapter, plus the shared generation battery base type both current and future generation batteries build on.
@nhtio/adk/batteries/generation/openai/validationRuntime validation schema and wrapper for OpenAI media generation adapter options.
@nhtio/adk/batteries/generation/transformers_jstransformers.js Generation battery — dual-environment, EXPERIMENTAL on-device Janus text→image.
@nhtio/adk/batteries/generation/transformers_js/adaptertransformers.js (on-device, EXPERIMENTAL) Generation adapter battery — DeepSeek Janus text→image.
@nhtio/adk/batteries/generation/transformers_js/exceptionsBattery-scoped exception constructors for the transformers.js Generation (on-device text→image) adapter.
@nhtio/adk/batteries/generation/transformers_js/helpersEnv-branched PNG-encoding helper for transformers.js Generation's RawImage results.
@nhtio/adk/batteries/generation/transformers_js/typesOption and model/processor seam types for the transformers.js (on-device Janus) Generation adapter.
@nhtio/adk/batteries/generation/transformers_js/validationRuntime validation schema and wrapper for transformers.js Generation adapter options.
@nhtio/adk/batteries/llmAggregate barrel for bundled LLM adapters and their helper, option, and exception exports.
@nhtio/adk/batteries/llm/chat_common/exceptionsShared, wire-shape-agnostic exceptions for the on-device LLM batteries.
@nhtio/adk/batteries/llm/litert_lmLiteRT-LM adapter battery — browser/WebGPU on-device inference with swappable translation helpers.
@nhtio/adk/batteries/llm/litert_lm/adapterBrowser/WebGPU executor adapter for Google's LiteRT-LM (@litert-lm/core).
@nhtio/adk/batteries/llm/litert_lm/exceptionsBattery-scoped exception constructors for LiteRT-LM adapter failures.
@nhtio/adk/batteries/llm/litert_lm/helpersTranslation helpers for the LiteRT-LM adapter.
@nhtio/adk/batteries/llm/litert_lm/typesTypes for the LiteRT-LM adapter — options, engine/conversation aliases, and the LiteRT wire shapes re-exported from @litert-lm/core.
@nhtio/adk/batteries/llm/litert_lm/validationRuntime validation schema and wrapper for LiteRT-LM adapter options.
@nhtio/adk/batteries/llm/ollamaNative Ollama /api/chat adapter battery with swappable translation helpers and wire types.
@nhtio/adk/batteries/llm/ollama/adapterCross-environment executor adapter for the native Ollama /api/chat endpoint.
@nhtio/adk/batteries/llm/ollama/exceptionsBattery-scoped exception constructors for the native Ollama /api/chat adapter.
@nhtio/adk/batteries/llm/ollama/helpersSwappable translation helpers for rendering ADK state into native Ollama /api/chat requests.
@nhtio/adk/batteries/llm/ollama/typesTypeScript wire shapes, helper contracts, and option types for the native Ollama battery.
@nhtio/adk/batteries/llm/ollama/validationRuntime validation schema and wrapper for native Ollama adapter options.
@nhtio/adk/batteries/llm/openai_chat_completionsOpenAI Chat Completions adapter battery with swappable translation helpers and wire types.
@nhtio/adk/batteries/llm/openai_chat_completions/adapterCross-environment executor adapter for OpenAI Chat Completions compatible endpoints.
@nhtio/adk/batteries/llm/openai_chat_completions/exceptionsBattery-scoped exception constructors for OpenAI Chat Completions adapter failures.
@nhtio/adk/batteries/llm/openai_chat_completions/helpersSwappable translation helpers for rendering ADK state into Chat Completions requests.
@nhtio/adk/batteries/llm/openai_chat_completions/typesTypeScript wire shapes, helper contracts, and option types for the Chat Completions battery.
@nhtio/adk/batteries/llm/openai_chat_completions/validationRuntime validation schema and wrapper for OpenAI Chat Completions adapter options.
@nhtio/adk/batteries/llm/transformers_jstransformers.js LLM adapter battery — dual-environment (Node + browser) on-device text generation.
@nhtio/adk/batteries/llm/transformers_js/adapterDual-environment (Node + browser) executor adapter for transformers.js (@huggingface/transformers).
@nhtio/adk/batteries/llm/transformers_js/exceptionsBattery-scoped exception constructors for the transformers.js LLM adapter.
@nhtio/adk/batteries/llm/transformers_js/helpersTranslation helpers for the transformers.js LLM adapter.
@nhtio/adk/batteries/llm/transformers_js/model_sourceCustom model-source resolver for transformers.js — the dual-environment seam that lets a consumer serve a model's files (each submodule ONNX, the tokenizer, the config) from anywhere: OPFS, a different repo per modality, bundled bytes, an in-memory map.
@nhtio/adk/batteries/llm/transformers_js/typesTypes for the transformers.js LLM adapter — options, pipeline aliases, and the parser option types.
@nhtio/adk/batteries/llm/transformers_js/validationRuntime validation schema and wrapper for transformers.js LLM adapter options.
@nhtio/adk/batteries/llm/webllm_chat_completionsWebLLM Chat Completions adapter battery with swappable translation helpers and wire types.
@nhtio/adk/batteries/llm/webllm_chat_completions/adapterCross-environment executor adapter for WebLLM Chat Completions compatible endpoints.
@nhtio/adk/batteries/llm/webllm_chat_completions/exceptionsBattery-scoped exception constructors for WebLLM Chat Completions adapter failures.
@nhtio/adk/batteries/llm/webllm_chat_completions/helpersSwappable translation helpers for rendering ADK state into WebLLM Chat Completions requests.
@nhtio/adk/batteries/llm/webllm_chat_completions/validationRuntime validation schema and wrapper for WebLLM Chat Completions adapter options.
@nhtio/adk/batteries/mediaA knex-inspired local media pipeline: one declarative plan, three front-ends (chainable builder, pipe string, JSON ops), engines as composable seams.
@nhtio/adk/batteries/media/contractsGeneric engine contracts for the media pipeline battery — the seams every implementation (bundled or BYO) plugs into.
@nhtio/adk/batteries/media/engines/audio_decodeA cross-environment audio-decoding @nhtio/adk/batteries/media/contracts!MediaEngine backed by the audio-decode package (pure JS/WASM codecs — no ffmpeg, no native bindings; works in Node and browsers).
@nhtio/adk/batteries/media/engines/dataThe deterministic text/data @nhtio/adk/batteries/media/contracts!MediaEngine: seeds and conversions for the text-shaped family (txt/md/json/yaml/csv/html).
@nhtio/adk/batteries/media/engines/exceljsThe ExcelJS-backed workbook @nhtio/adk/batteries/media/contracts!MediaEngine: the fidelity-preserving structural editor for xlsx, plus in-process blank-workbook generation.
@nhtio/adk/batteries/media/engines/execa_executorA @nhtio/adk/batteries/media/contracts!BinaryExecutor implementation that runs invocations as local child processes via execa.
@nhtio/adk/batteries/media/engines/fs_workspaceA @nhtio/adk/batteries/media/contracts!ScratchWorkspace implementation backed by the local filesystem via node:fs/promises.
@nhtio/adk/batteries/media/engines/jimpA cross-environment image @nhtio/adk/batteries/media/contracts!MediaEngine backed by Jimp (pure JavaScript — no native bindings, no binaries).
@nhtio/adk/batteries/media/engines/sharpA Node-native image @nhtio/adk/batteries/media/contracts!MediaEngine backed by sharp (libvips bindings — fast, full-format).
@nhtio/adk/batteries/media/engines/sheetjsThe SheetJS-backed spreadsheet @nhtio/adk/batteries/media/contracts!MediaEngine: the in-process, cross-environment spreadsheet converter, generator, and structural editor.
@nhtio/adk/batteries/media/engines/sofficeThe LibreOffice-backed @nhtio/adk/batteries/media/contracts!MediaEngine: document, spreadsheet, and presentation conversion via the soffice binary.
@nhtio/adk/batteries/media/engines/tesseract_jsA cross-environment OCR @nhtio/adk/batteries/media/contracts!MediaEngine backed by tesseract.js (WASM Tesseract — Node and browsers, no binary).
@nhtio/adk/batteries/media/engines/transformers_asrA cross-environment transcription @nhtio/adk/batteries/media/contracts!MediaEngine backed by @huggingface/transformers Whisper (ONNX in Node, WASM/WebGPU in browsers).
@nhtio/adk/batteries/media/forgeAgent glue: forge ADK tools from a media pipeline, so a model can drive local media work.
@nhtio/adk/batteries/specialistsEnvironment-neutral aggregate barrel for bundled specialist batteries.
@nhtio/adk/batteries/specialists/_sharedStructural contracts and normalization helpers shared by the on-device specialist batteries (STT / OCR / caption).
@nhtio/adk/batteries/specialists/captionCaption (image-to-text) specialist modality barrel.
@nhtio/adk/batteries/specialists/caption/transformers_jstransformers.js Caption specialist battery — dual-environment ONNX image-to-text.
@nhtio/adk/batteries/specialists/caption/transformers_js/adaptertransformers.js (ONNX, dual-environment) Caption (image-to-text) specialist adapter battery.
@nhtio/adk/batteries/specialists/caption/transformers_js/exceptionsBattery-scoped exception constructors for the transformers.js Caption specialist adapter.
@nhtio/adk/batteries/specialists/caption/transformers_js/typesOption and pipeline types for the transformers.js Caption (image-to-text) specialist adapter.
@nhtio/adk/batteries/specialists/caption/transformers_js/validationRuntime validation schema and wrapper for transformers.js Caption adapter options.
@nhtio/adk/batteries/specialists/ocrEnvironment-neutral aggregate barrel for bundled OCR specialist batteries.
@nhtio/adk/batteries/specialists/ocr/tesseract_jstesseract.js OCR specialist adapter battery — dual-environment WASM Tesseract.
@nhtio/adk/batteries/specialists/ocr/tesseract_js/adaptertesseract.js (WASM Tesseract, dual-environment) OCR specialist adapter battery.
@nhtio/adk/batteries/specialists/ocr/tesseract_js/exceptionsBattery-scoped exception constructors for the tesseract.js OCR specialist adapter.
@nhtio/adk/batteries/specialists/ocr/tesseract_js/typesOption and result types for the tesseract.js OCR specialist adapter.
@nhtio/adk/batteries/specialists/ocr/tesseract_js/validationRuntime validation schema and wrapper for tesseract.js OCR adapter options.
@nhtio/adk/batteries/specialists/sttEnvironment-neutral aggregate barrel for bundled STT (speech-to-text) specialist batteries.
@nhtio/adk/batteries/specialists/stt/transformers_jstransformers.js STT adapter battery — dual-environment ONNX Whisper transcription.
@nhtio/adk/batteries/storageEnvironment-neutral aggregate barrel for bundled storage batteries.
@nhtio/adk/batteries/storage/flydriveFlydrive-backed spooled artifact storage for Node and server runtimes.
@nhtio/adk/batteries/storage/in_memoryIn-memory spool readers and stores for tests, scripts, and non-durable prototypes.
@nhtio/adk/batteries/storage/opfsBrowser-only Origin Private File System storage for spooled artifacts.
@nhtio/adk/batteries/toolsAggregate barrel for every pre-constructed bundled tool category.
@nhtio/adk/batteries/tools/_sharedCross-battery helpers shared by the configured HTTP tool batteries (SearXNG, Scrapper, …).
@nhtio/adk/batteries/tools/colorPre-constructed tools for color conversion and palette-oriented calculations.
@nhtio/adk/batteries/tools/comparisonPre-constructed tools for comparing primitive values, arrays, and ranges.
@nhtio/adk/batteries/tools/data_structurePre-constructed tools for querying, filtering, grouping, and reshaping structured values.
@nhtio/adk/batteries/tools/datetime_extendedPre-constructed tools for parsing natural-language dates and business-calendar calculations.
@nhtio/adk/batteries/tools/datetime_mathPre-constructed tools for ISO datetime arithmetic, differences, and timezone-aware formatting.
@nhtio/adk/batteries/tools/encodingPre-constructed tools for common text encodings and decoding operations.
@nhtio/adk/batteries/tools/formattingPre-constructed tools for locale-aware number, list, table, and text formatting.
@nhtio/adk/batteries/tools/geo_basicsPre-constructed tools for basic geographic distance and coordinate calculations.
@nhtio/adk/batteries/tools/mathPre-constructed tools for safe arithmetic, expression evaluation, and numeric operations.
@nhtio/adk/batteries/tools/memoryPre-constructed CRUD tools for model-visible ADK memory management.
@nhtio/adk/batteries/tools/parsingPre-constructed tools for parsing CSV, TSV, JSON, YAML, and other structured text formats.
@nhtio/adk/batteries/tools/retrievablesPre-constructed CRUD tools for model-visible retrievable and RAG-record management.
@nhtio/adk/batteries/tools/scrapperFactories for configured Scrapper web-extraction tools (article + links).
@nhtio/adk/batteries/tools/searxngFactory for a configured SearXNG metasearch tool.
@nhtio/adk/batteries/tools/standing_instructionsPre-constructed CRUD tools for model-visible standing instruction management.
@nhtio/adk/batteries/tools/statisticsPre-constructed tools for descriptive statistics, correlation, quantiles, and numeric summaries.
@nhtio/adk/batteries/tools/string_processingPre-constructed tools for casing, trimming, normalizing, and transforming strings.
@nhtio/adk/batteries/tools/structured_dataPre-constructed tools for transforming arrays and objects into tables and tabular text.
@nhtio/adk/batteries/tools/text_analysisPre-constructed tools for extracting counts, token estimates, and character statistics from text.
@nhtio/adk/batteries/tools/text_comparisonPre-constructed tools for text diffs, similarity checks, and edit-distance comparisons.
@nhtio/adk/batteries/tools/timePre-constructed tools for current time lookup and timezone-aware time formatting.
@nhtio/adk/batteries/tools/unit_conversionPre-constructed tools for converting values across common measurement units.
@nhtio/adk/batteries/tools/web_retrievalRAG glue: turn web-search and web-scrape results into Retrievable records for a turn.
@nhtio/adk/batteries/vector-
@nhtio/adk/batteries/vector/builderKnex-style chainable query builder for the vector storage battery.
@nhtio/adk/batteries/vector/chroma-
@nhtio/adk/batteries/vector/conformanceShared conformance suite for vector-store adapters. Drive any adapter through runVectorStoreConformance to verify it honours the same contract all shipped adapters do. Public, deep-import-only (@nhtio/adk/batteries/vector/conformance) — it imports vitest, an optional peer you install to run the suite; it is never pulled in by the battery barrel.
@nhtio/adk/batteries/vector/contract-
@nhtio/adk/batteries/vector/exceptionsBattery-scoped exception constructors for vector store adapter failures.
@nhtio/adk/batteries/vector/factory-
@nhtio/adk/batteries/vector/filtersFilter types and evaluator for the vector battery.
@nhtio/adk/batteries/vector/helpersHelper utilities for the vector storage provider battery.
@nhtio/adk/batteries/vector/in_memory-
@nhtio/adk/batteries/vector/migrateKnex-style migration runner for the vector battery.
@nhtio/adk/batteries/vector/milvus-
@nhtio/adk/batteries/vector/orama-
@nhtio/adk/batteries/vector/pgvector-
@nhtio/adk/batteries/vector/pinecone-
@nhtio/adk/batteries/vector/planCompiled query plans for the vector storage battery.
@nhtio/adk/batteries/vector/qdrant-
@nhtio/adk/batteries/vector/retrievable-
@nhtio/adk/batteries/vector/schemaKnex-style schema builder for the vector battery.
@nhtio/adk/batteries/vector/sqlite_vec-
@nhtio/adk/batteries/vector/typesType definitions for the vector storage provider battery.
@nhtio/adk/batteries/vector/validationRuntime validation schemas and throwing wrappers for the vector battery.
@nhtio/adk/batteries/vector/vector_store_constructor-
@nhtio/adk/batteries/vector/weaviate-
@nhtio/adk/commonCore value classes, runtime primitives, media helpers, and their companion input types.
@nhtio/adk/dispatch_runnerThe LLM execution runner and its dispatch, hook, event, and helper types.
@nhtio/adk/exceptionsCore ADK exception classes and reusable runtime error constructors.
@nhtio/adk/factoriesFactory helpers for creating configured runtime values and exception classes.
@nhtio/adk/forgeSchema-first tool construction, invocation records, artifact tools, and registries.
@nhtio/adk/guardsRuntime type guards for ADK primitives, contexts, runners, tools, and artifacts.
@nhtio/adk/lib/helpers/bignumArbitrary-precision numeric helpers for the bundled tools.
@nhtio/adk/lib/utils/audioEnvironment-neutral PCM audio primitives shared across the media battery and the on-device specialist batteries.
@nhtio/adk/lib/utils/retryEnvironment-neutral retry/backoff/timeout primitives shared across HTTP-backed batteries.
@nhtio/adk/shimsRuntime-binding shims — use @nhtio/adk (or any bundle) WITHOUT importing it into your module graph.
@nhtio/adk/spooled_artifactLazy, line-oriented artifact readers and format-aware spooled artifact subclasses.
@nhtio/adk/turn_runnerThe turn runner orchestration surface and its configuration, event, and middleware types.
@nhtio/adk/typesType-only export surface for raw shapes, callbacks, events, hooks, and internal contracts.
batteries/isolation-
batteries/isolation/child_process-
batteries/media/lint-
batteries/vector/arangodb-
batteries/vector/clickhouse-
batteries/vector/cloudflare-
batteries/vector/couchbase-
batteries/vector/duckdb-
batteries/vector/elasticsearch-
batteries/vector/hnswlib-
batteries/vector/lancedb-
batteries/vector/mariadb-
batteries/vector/meilisearch-
batteries/vector/mongodb-
batteries/vector/neo4j-
batteries/vector/opensearch-
batteries/vector/oracle23ai-
batteries/vector/redis-
batteries/vector/s3vectors-
batteries/vector/solr-
batteries/vector/surrealdb-
batteries/vector/typesense-
batteries/vector/vespa-
eslint-
eslint/rules-
eslint/rules/artifact_tool_forbids_artifact_constructor-
eslint/rules/no_model_in_tool_handler-
eslint/rules/require_validator_any_required-
eslint/rules/thought_payload_requires_replay_tag-
eslint/rules/token_encoding_requires_context_window-