@fllf/agent-sdk 0.1.2 → 0.1.3
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 +169 -0
- package/README.md +824 -198
- package/dist/agent/Agent.d.ts +16 -5
- package/dist/agent/Agent.d.ts.map +1 -1
- package/dist/agent/Agent.js +283 -2
- package/dist/agent/Agent.js.map +1 -1
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/types.d.ts +27 -3
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/config/config.d.ts +22 -3
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +194 -47
- package/dist/config/config.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/errors.d.ts +74 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +186 -0
- package/dist/errors.js.map +1 -0
- package/dist/executors/base-executor.d.ts +14 -0
- package/dist/executors/base-executor.d.ts.map +1 -0
- package/dist/executors/base-executor.js +31 -0
- package/dist/executors/base-executor.js.map +1 -0
- package/dist/executors/base.d.ts +36 -5
- package/dist/executors/base.d.ts.map +1 -1
- package/dist/executors/chat-request-builder.d.ts +10 -0
- package/dist/executors/chat-request-builder.d.ts.map +1 -0
- package/dist/executors/chat-request-builder.js +96 -0
- package/dist/executors/chat-request-builder.js.map +1 -0
- package/dist/executors/index.d.ts +4 -1
- package/dist/executors/index.d.ts.map +1 -1
- package/dist/executors/index.js +6 -1
- package/dist/executors/index.js.map +1 -1
- package/dist/executors/rag-executor.js +1 -1
- package/dist/executors/rag-executor.js.map +1 -1
- package/dist/executors/simple-chat-executor.d.ts +4 -2
- package/dist/executors/simple-chat-executor.d.ts.map +1 -1
- package/dist/executors/simple-chat-executor.js +59 -57
- package/dist/executors/simple-chat-executor.js.map +1 -1
- package/dist/executors/tool-calling-executor.d.ts +20 -2
- package/dist/executors/tool-calling-executor.d.ts.map +1 -1
- package/dist/executors/tool-calling-executor.js +189 -91
- package/dist/executors/tool-calling-executor.js.map +1 -1
- package/dist/history/base.d.ts +55 -2
- package/dist/history/base.d.ts.map +1 -1
- package/dist/history/base.js +49 -0
- package/dist/history/base.js.map +1 -1
- package/dist/history/compression.d.ts +49 -0
- package/dist/history/compression.d.ts.map +1 -0
- package/dist/history/compression.js +53 -0
- package/dist/history/compression.js.map +1 -0
- package/dist/history/context-window.d.ts +33 -0
- package/dist/history/context-window.d.ts.map +1 -0
- package/dist/history/context-window.js +68 -0
- package/dist/history/context-window.js.map +1 -0
- package/dist/history/in-memory.d.ts +6 -4
- package/dist/history/in-memory.d.ts.map +1 -1
- package/dist/history/in-memory.js +25 -39
- package/dist/history/in-memory.js.map +1 -1
- package/dist/history/index.d.ts +9 -2
- package/dist/history/index.d.ts.map +1 -1
- package/dist/history/index.js +18 -1
- package/dist/history/index.js.map +1 -1
- package/dist/history/postgres/index.d.ts +4 -0
- package/dist/history/postgres/index.d.ts.map +1 -0
- package/dist/history/postgres/index.js +20 -0
- package/dist/history/postgres/index.js.map +1 -0
- package/dist/history/postgres/postgres-message-history-store.d.ts +35 -0
- package/dist/history/postgres/postgres-message-history-store.d.ts.map +1 -0
- package/dist/history/postgres/postgres-message-history-store.js +195 -0
- package/dist/history/postgres/postgres-message-history-store.js.map +1 -0
- package/dist/history/postgres/schema.d.ts +18 -0
- package/dist/history/postgres/schema.d.ts.map +1 -0
- package/dist/history/postgres/schema.js +46 -0
- package/dist/history/postgres/schema.js.map +1 -0
- package/dist/history/postgres/sql.d.ts +29 -0
- package/dist/history/postgres/sql.d.ts.map +1 -0
- package/dist/history/postgres/sql.js +102 -0
- package/dist/history/postgres/sql.js.map +1 -0
- package/dist/history/postgres/types.d.ts +20 -0
- package/dist/history/postgres/types.d.ts.map +1 -0
- package/dist/history/postgres/types.js +3 -0
- package/dist/history/postgres/types.js.map +1 -0
- package/dist/history/tool-pairing.d.ts +11 -0
- package/dist/history/tool-pairing.d.ts.map +1 -0
- package/dist/history/tool-pairing.js +52 -0
- package/dist/history/tool-pairing.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/llm/LLM.d.ts +1 -0
- package/dist/llm/LLM.d.ts.map +1 -1
- package/dist/llm/LLM.js +136 -26
- package/dist/llm/LLM.js.map +1 -1
- package/dist/llm/errors.d.ts +11 -1
- package/dist/llm/errors.d.ts.map +1 -1
- package/dist/llm/errors.js +50 -1
- package/dist/llm/errors.js.map +1 -1
- package/dist/llm/factory.d.ts +14 -2
- package/dist/llm/factory.d.ts.map +1 -1
- package/dist/llm/factory.js +48 -9
- package/dist/llm/factory.js.map +1 -1
- package/dist/llm/index.d.ts +8 -3
- package/dist/llm/index.d.ts.map +1 -1
- package/dist/llm/index.js +10 -1
- package/dist/llm/index.js.map +1 -1
- package/dist/llm/providers/anthropic.d.ts +14 -0
- package/dist/llm/providers/anthropic.d.ts.map +1 -0
- package/dist/llm/providers/anthropic.js +336 -0
- package/dist/llm/providers/anthropic.js.map +1 -0
- package/dist/llm/providers/openai-compatible.d.ts +7 -0
- package/dist/llm/providers/openai-compatible.d.ts.map +1 -1
- package/dist/llm/providers/openai-compatible.js +151 -47
- package/dist/llm/providers/openai-compatible.js.map +1 -1
- package/dist/llm/stream-accumulator.d.ts +17 -0
- package/dist/llm/stream-accumulator.d.ts.map +1 -0
- package/dist/llm/stream-accumulator.js +83 -0
- package/dist/llm/stream-accumulator.js.map +1 -0
- package/dist/llm/tool-arguments.d.ts +6 -0
- package/dist/llm/tool-arguments.d.ts.map +1 -0
- package/dist/llm/tool-arguments.js +20 -0
- package/dist/llm/tool-arguments.js.map +1 -0
- package/dist/llm/types.d.ts +76 -4
- package/dist/llm/types.d.ts.map +1 -1
- package/dist/messages/content.d.ts +36 -0
- package/dist/messages/content.d.ts.map +1 -0
- package/dist/messages/content.js +70 -0
- package/dist/messages/content.js.map +1 -0
- package/dist/messages/index.d.ts +4 -2
- package/dist/messages/index.d.ts.map +1 -1
- package/dist/messages/index.js +10 -1
- package/dist/messages/index.js.map +1 -1
- package/dist/messages/message.d.ts +11 -9
- package/dist/messages/message.d.ts.map +1 -1
- package/dist/messages/message.js +69 -4
- package/dist/messages/message.js.map +1 -1
- package/dist/messages/types.d.ts +12 -0
- package/dist/messages/types.d.ts.map +1 -1
- package/dist/observability/collecting-observer.d.ts +8 -0
- package/dist/observability/collecting-observer.d.ts.map +1 -0
- package/dist/observability/collecting-observer.js +15 -0
- package/dist/observability/collecting-observer.js.map +1 -0
- package/dist/observability/index.d.ts +1 -0
- package/dist/observability/index.d.ts.map +1 -1
- package/dist/observability/index.js +3 -1
- package/dist/observability/index.js.map +1 -1
- package/dist/observability/observer.d.ts.map +1 -1
- package/dist/observability/observer.js +14 -1
- package/dist/observability/observer.js.map +1 -1
- package/dist/observability/types.d.ts +16 -1
- package/dist/observability/types.d.ts.map +1 -1
- package/dist/rag/chunking/auto-chunker.d.ts +7 -0
- package/dist/rag/chunking/auto-chunker.d.ts.map +1 -1
- package/dist/rag/chunking/auto-chunker.js +13 -0
- package/dist/rag/chunking/auto-chunker.js.map +1 -1
- package/dist/rag/chunking/chunker.d.ts.map +1 -1
- package/dist/rag/chunking/chunker.js +29 -5
- package/dist/rag/chunking/chunker.js.map +1 -1
- package/dist/rag/chunking/index.d.ts +2 -0
- package/dist/rag/chunking/index.d.ts.map +1 -1
- package/dist/rag/chunking/index.js +2 -0
- package/dist/rag/chunking/index.js.map +1 -1
- package/dist/rag/chunking/markdown-chunker.d.ts.map +1 -1
- package/dist/rag/chunking/markdown-chunker.js.map +1 -1
- package/dist/rag/chunking/qa-pair-chunker.d.ts +23 -0
- package/dist/rag/chunking/qa-pair-chunker.d.ts.map +1 -0
- package/dist/rag/chunking/qa-pair-chunker.js +162 -0
- package/dist/rag/chunking/qa-pair-chunker.js.map +1 -0
- package/dist/rag/chunking/semantic-chunker.d.ts +19 -0
- package/dist/rag/chunking/semantic-chunker.d.ts.map +1 -0
- package/dist/rag/chunking/semantic-chunker.js +291 -0
- package/dist/rag/chunking/semantic-chunker.js.map +1 -0
- package/dist/rag/embeddings/embedder.d.ts.map +1 -1
- package/dist/rag/embeddings/embedder.js +6 -0
- package/dist/rag/embeddings/embedder.js.map +1 -1
- package/dist/rag/generation/context-builder.d.ts +7 -0
- package/dist/rag/generation/context-builder.d.ts.map +1 -1
- package/dist/rag/generation/context-builder.js +4 -1
- package/dist/rag/generation/context-builder.js.map +1 -1
- package/dist/rag/ingestion/metadata.d.ts +6 -1
- package/dist/rag/ingestion/metadata.d.ts.map +1 -1
- package/dist/rag/ingestion/metadata.js +6 -2
- package/dist/rag/ingestion/metadata.js.map +1 -1
- package/dist/rag/pipeline.d.ts.map +1 -1
- package/dist/rag/pipeline.js +34 -11
- package/dist/rag/pipeline.js.map +1 -1
- package/dist/rag/retrieval/index.d.ts +1 -0
- package/dist/rag/retrieval/index.d.ts.map +1 -1
- package/dist/rag/retrieval/index.js +1 -0
- package/dist/rag/retrieval/index.js.map +1 -1
- package/dist/rag/retrieval/parent-child-expanding-retriever.d.ts +31 -0
- package/dist/rag/retrieval/parent-child-expanding-retriever.d.ts.map +1 -0
- package/dist/rag/retrieval/parent-child-expanding-retriever.js +194 -0
- package/dist/rag/retrieval/parent-child-expanding-retriever.js.map +1 -0
- package/dist/rag/stores/in-memory-keyword-store.d.ts.map +1 -1
- package/dist/rag/stores/in-memory-keyword-store.js +3 -8
- package/dist/rag/stores/in-memory-keyword-store.js.map +1 -1
- package/dist/rag/stores/keyword-tokenizer.d.ts +4 -0
- package/dist/rag/stores/keyword-tokenizer.d.ts.map +1 -0
- package/dist/rag/stores/keyword-tokenizer.js +113 -0
- package/dist/rag/stores/keyword-tokenizer.js.map +1 -0
- package/dist/rag/stores/postgres/pg-vector-store.d.ts.map +1 -1
- package/dist/rag/stores/postgres/pg-vector-store.js +21 -8
- package/dist/rag/stores/postgres/pg-vector-store.js.map +1 -1
- package/dist/rag/stores/postgres/postgres-document-store.d.ts.map +1 -1
- package/dist/rag/stores/postgres/postgres-document-store.js +26 -13
- package/dist/rag/stores/postgres/postgres-document-store.js.map +1 -1
- package/dist/rag/stores/postgres/postgres-keyword-store.d.ts.map +1 -1
- package/dist/rag/stores/postgres/postgres-keyword-store.js +43 -43
- package/dist/rag/stores/postgres/postgres-keyword-store.js.map +1 -1
- package/dist/rag/stores/postgres/sql.d.ts +22 -0
- package/dist/rag/stores/postgres/sql.d.ts.map +1 -1
- package/dist/rag/stores/postgres/sql.js +42 -0
- package/dist/rag/stores/postgres/sql.js.map +1 -1
- package/dist/rag/stores/types.d.ts +5 -0
- package/dist/rag/stores/types.d.ts.map +1 -1
- package/dist/rag/types.d.ts +6 -0
- package/dist/rag/types.d.ts.map +1 -1
- package/dist/testing/agent.d.ts +11 -0
- package/dist/testing/agent.d.ts.map +1 -0
- package/dist/testing/agent.js +45 -0
- package/dist/testing/agent.js.map +1 -0
- package/dist/testing/history-contract.d.ts +12 -0
- package/dist/testing/history-contract.d.ts.map +1 -0
- package/dist/testing/history-contract.js +111 -0
- package/dist/testing/history-contract.js.map +1 -0
- package/dist/testing/index.d.ts +11 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +16 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/models.d.ts +34 -0
- package/dist/testing/models.d.ts.map +1 -0
- package/dist/testing/models.js +74 -0
- package/dist/testing/models.js.map +1 -0
- package/dist/testing/tool-schema.d.ts +6 -0
- package/dist/testing/tool-schema.d.ts.map +1 -0
- package/dist/testing/tool-schema.js +29 -0
- package/dist/testing/tool-schema.js.map +1 -0
- package/dist/testing/tools.d.ts +21 -0
- package/dist/testing/tools.d.ts.map +1 -0
- package/dist/testing/tools.js +43 -0
- package/dist/testing/tools.js.map +1 -0
- package/dist/tools/base.d.ts +38 -7
- package/dist/tools/base.d.ts.map +1 -1
- package/dist/tools/base.js +238 -11
- package/dist/tools/base.js.map +1 -1
- package/dist/tools/builtin/advancedSearchTool.d.ts.map +1 -1
- package/dist/tools/builtin/advancedSearchTool.js +30 -4
- package/dist/tools/builtin/advancedSearchTool.js.map +1 -1
- package/dist/tools/builtin/ragSearchTool.d.ts +6 -3
- package/dist/tools/builtin/ragSearchTool.d.ts.map +1 -1
- package/dist/tools/builtin/ragSearchTool.js +8 -6
- package/dist/tools/builtin/ragSearchTool.js.map +1 -1
- package/dist/tools/executor.d.ts +30 -2
- package/dist/tools/executor.d.ts.map +1 -1
- package/dist/tools/executor.js +83 -15
- package/dist/tools/executor.js.map +1 -1
- package/dist/tools/index.d.ts +3 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/registry.d.ts +15 -3
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +21 -2
- package/dist/tools/registry.js.map +1 -1
- package/package.json +58 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this package should be recorded here.
|
|
4
|
+
|
|
5
|
+
This project follows semver. While the package is below `1.0.0`, stable
|
|
6
|
+
integration APIs should remain compatible whenever practical. Experimental and
|
|
7
|
+
low-level extension points may change in minor versions when the change is
|
|
8
|
+
documented here.
|
|
9
|
+
|
|
10
|
+
## Unreleased
|
|
11
|
+
|
|
12
|
+
## 0.1.3 - 2026-07-05
|
|
13
|
+
|
|
14
|
+
### Breaking changes
|
|
15
|
+
|
|
16
|
+
- `Message.content` / `ChatMessage.content` widened from `string` to
|
|
17
|
+
`MessageContent` (`string | ContentBlock[]`, text/image blocks). Plain string
|
|
18
|
+
content keeps working; code that assumed `content` is always a string should
|
|
19
|
+
use `Message.text` or `contentToText()`.
|
|
20
|
+
- `ToolExecutor.execute()` now returns a structured `ToolCallOutcome`
|
|
21
|
+
(`{ toolCallId, toolName, content, isError }`) instead of a plain string.
|
|
22
|
+
- `ChatStreamChunk.toolCallDelta: unknown` replaced with typed
|
|
23
|
+
`toolCallDeltas: ToolCallDelta[]`; chunks can now carry `finishReason` and
|
|
24
|
+
final `usage`.
|
|
25
|
+
- `ToolCallingExecutor` defaults to `onMaxIterations: 'finalize'`: when the
|
|
26
|
+
iteration budget runs out it issues one final no-tools request instead of
|
|
27
|
+
throwing. Pass `{ onMaxIterations: 'throw' }` for the previous behavior; in
|
|
28
|
+
both modes the executed trajectory is persisted to history.
|
|
29
|
+
- `Config.temperature` no longer defaults to `0.7`. When unset, no temperature
|
|
30
|
+
is sent and the provider/model default applies.
|
|
31
|
+
- Default tool result serialization now uses `JSON.stringify` for non-string
|
|
32
|
+
results instead of `String(result)`.
|
|
33
|
+
- The official `openai` provider sends `max_completion_tokens` instead of the
|
|
34
|
+
deprecated `max_tokens` (other OpenAI-compatible providers keep
|
|
35
|
+
`max_tokens`), and streaming requests set
|
|
36
|
+
`stream_options: { include_usage: true }`.
|
|
37
|
+
- RAG: `RagSearchTool` no longer exposes `tenantId` / `knowledgeBaseId` / `acl`
|
|
38
|
+
as model-fillable parameters; they must come from server-side
|
|
39
|
+
`defaultRetrieveOptions`. RAG document ids no longer include the content
|
|
40
|
+
checksum, and `answer()` no longer forwards retrieval `minScore` to the
|
|
41
|
+
context builder (use the new `minFusedScore`).
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
|
|
45
|
+
- Anthropic provider (`provider: 'anthropic'`, env: `ANTHROPIC_API_KEY` /
|
|
46
|
+
`ANTHROPIC_MODEL` / `ANTHROPIC_BASE_URL`, default model `claude-opus-4-8`):
|
|
47
|
+
Messages API mapping incl. multimodal content, tool_use/tool_result with
|
|
48
|
+
`is_error`, streaming SSE → typed chunks, structured output via
|
|
49
|
+
`output_config.format`, prompt-cache usage fields. `autoDetect` falls back
|
|
50
|
+
to Anthropic when only `ANTHROPIC_API_KEY` is set.
|
|
51
|
+
- Provider-neutral tool schema: `ToolDefinition` replaces the OpenAI-shaped
|
|
52
|
+
`ChatToolSchema` in `ChatRequest.tools` (`Tool.toToolSchema()` /
|
|
53
|
+
`ToolRegistry.toToolSchemas()`; the OpenAI-shaped methods remain as
|
|
54
|
+
deprecated wrappers). `toolChoice` supports forcing a specific tool
|
|
55
|
+
(`{ type: 'tool', name }`); `ChatRequest.reasoning.effort` maps to
|
|
56
|
+
Anthropic `output_config.effort` / OpenAI `reasoning_effort`;
|
|
57
|
+
`ChatMessage.cacheControl: 'ephemeral'` marks prompt-cache breakpoints;
|
|
58
|
+
responses and stream chunks expose `reasoning` / `reasoningDelta` and
|
|
59
|
+
`cacheCreationPromptTokens`.
|
|
60
|
+
- Optimistic concurrency for message history: `getVersion()` +
|
|
61
|
+
`addMany(messages, { expectedVersion })` with
|
|
62
|
+
`HistoryVersionConflictError` (CAS retry pattern for multi-instance
|
|
63
|
+
deployments), plus a reference `PostgresMessageHistoryStore` working with
|
|
64
|
+
any `query()` client, including schema SQL and windowed reads.
|
|
65
|
+
- Multimodal message content: `ContentBlock` (`textBlock()`, `imageUrlBlock()`,
|
|
66
|
+
`imageBase64Block()`), `contentToText()`, and user-message image mapping in
|
|
67
|
+
OpenAI-compatible providers. `Agent.run()` / `Agent.stream()` accept
|
|
68
|
+
`MessageContent` input.
|
|
69
|
+
- Streaming tool calling: `ToolCallingExecutor` implements
|
|
70
|
+
`StreamingAgentExecutor`, emitting `agent:text_delta`, typed
|
|
71
|
+
`agent:tool_call` / `agent:tool_result` events, and falling back to
|
|
72
|
+
non-streaming models transparently. `ChatStreamAccumulator` aggregates
|
|
73
|
+
chunks into a full `ChatResponse`.
|
|
74
|
+
- Parallel tool execution: multiple tool calls in one model turn run
|
|
75
|
+
concurrently via `ToolExecutor.executeMany()`, with result order preserved.
|
|
76
|
+
- Context window management: `Config.maxInputTokens` (env: `MAX_INPUT_TOKENS`)
|
|
77
|
+
enables token-aware history truncation with a pluggable `TokenEstimator`;
|
|
78
|
+
`truncateToTokenBudget()` and `repairLeadingToolContext()` are exported.
|
|
79
|
+
`MessageHistory.get({ limit })` now repairs orphan tool messages the same
|
|
80
|
+
way `addMany()` overflow does.
|
|
81
|
+
- Reliability: transport errors without an HTTP status (`ECONNRESET`,
|
|
82
|
+
`fetch failed`, undici timeouts, …) normalize as retryable provider errors;
|
|
83
|
+
`llm:retry` observability events expose retry attempts.
|
|
84
|
+
- Cost observability: `llm:end` and `agent:end` events carry token `usage`
|
|
85
|
+
(including `cachedPromptTokens` when reported); `ChatResponse` and stream
|
|
86
|
+
chunks expose `finishReason`.
|
|
87
|
+
- Tool errors returned to the model are flagged with `isError` on the tool
|
|
88
|
+
message metadata, and unknown-tool feedback lists the registered tools.
|
|
89
|
+
- RAG: `replaceExisting` re-ingestion now cleans up prior versions by stable
|
|
90
|
+
document id and skips unchanged documents (`skippedDocumentIds`); pgvector
|
|
91
|
+
search restores HNSW-index-friendly `ORDER BY`; Postgres stores upsert in
|
|
92
|
+
multi-row batches (≤500 rows).
|
|
93
|
+
|
|
94
|
+
### Added (previous)
|
|
95
|
+
|
|
96
|
+
- Documented stable integration APIs, lower-level extension points, API
|
|
97
|
+
compatibility expectations, and the release checklist.
|
|
98
|
+
- Added `npm run pack:dry-run` for pre-publish package inspection.
|
|
99
|
+
- Added stable SDK error classes for Agent, Tool, History, and Config layers,
|
|
100
|
+
including code/retryability metadata.
|
|
101
|
+
- Added Tool runtime controls for execution context, timeout, abort propagation,
|
|
102
|
+
error mode, and result serialization.
|
|
103
|
+
- Added observability event levels, optional span fields, observer redaction
|
|
104
|
+
hooks, and `CollectingObserver`.
|
|
105
|
+
- Added `MessageJSON`, `Message.fromJSON()`, and `reviveMessage()` as the
|
|
106
|
+
documented message persistence contract.
|
|
107
|
+
- Added custom provider, history store, executor, observer, and production
|
|
108
|
+
factory examples.
|
|
109
|
+
- Added `ModelProviderRegistry` and `LLM` provider registry injection for scoped
|
|
110
|
+
provider registration.
|
|
111
|
+
- Added shared `buildChatMessages()` and `buildChatRequest()` helpers for custom
|
|
112
|
+
executor implementations.
|
|
113
|
+
- Added `MessageHistory.get({ limit, before })` window reads and the
|
|
114
|
+
`applyMessageHistoryWindow()` helper.
|
|
115
|
+
- Added `BaseExecutor` and type-level streaming executor contracts through
|
|
116
|
+
`StreamingAgentExecutor` and `AgentStreamEvent`.
|
|
117
|
+
- Added downstream testing helpers: `ScriptedChatModel`, `FakeChatModel`,
|
|
118
|
+
`FakeTool`, `createTestAgent()`, and
|
|
119
|
+
`assertMessageHistoryStoreContract()`.
|
|
120
|
+
- Added tool schema snapshot helpers for downstream tests.
|
|
121
|
+
- Added Tool permission policies through `canExecute()` and
|
|
122
|
+
`ToolPermissionError`.
|
|
123
|
+
- Added `Agent` run option validation and injectable `runIdFactory`.
|
|
124
|
+
- Added runtime provider capability checks for tool calling, structured output,
|
|
125
|
+
and streaming through `LLMUnsupportedCapabilityError`.
|
|
126
|
+
- Added `Config.fromEnv()` diagnostics through `envWarnings`, `onWarning`, and
|
|
127
|
+
strict `ConfigError` rejection.
|
|
128
|
+
- Added stable package subpath exports for agent, config, executors, history,
|
|
129
|
+
llm, messages, observability, rag, testing, and tools modules.
|
|
130
|
+
- Added a stable `errors` subpath export for typed SDK error handling.
|
|
131
|
+
- Added `AgentLifecycleHooks` for `beforeRun`, `afterRun`, and `onRunError`
|
|
132
|
+
integration around `Agent.run()`.
|
|
133
|
+
- Added constructor validation for `Config` and `LLM` runtime options.
|
|
134
|
+
- Added `npm run test:exports` to verify root and subpath package exports after
|
|
135
|
+
build.
|
|
136
|
+
- Added simple-chat `Agent.stream()` runtime support through
|
|
137
|
+
`StreamingAgentExecutor`, with default support in `SimpleChatExecutor`.
|
|
138
|
+
- Added `ToolConfigurationError` and constructor-time validation for tool
|
|
139
|
+
names, descriptions, schemas, timeout, error mode, permission checker, and
|
|
140
|
+
result serializer.
|
|
141
|
+
- Added offline `streaming-chat` and `tool-error-policy` examples.
|
|
142
|
+
- Added explicit `ToolRegistry` duplicate-name handling with fail-fast defaults
|
|
143
|
+
and opt-in replacement for compatibility adapters.
|
|
144
|
+
- Added RAG chunking improvements for Chinese and mixed-language boundary
|
|
145
|
+
handling, including stable overlap behavior when text has no whitespace.
|
|
146
|
+
- Added shared sparse keyword tokenization for in-memory and Postgres keyword
|
|
147
|
+
stores, including technical identifier splitting, Chinese n-grams, and
|
|
148
|
+
`title` / `headingPath` indexing.
|
|
149
|
+
- Added `ParentChildExpandingRetriever` for expanding child chunk hits into
|
|
150
|
+
parent or neighboring context chunks.
|
|
151
|
+
- Added `QaPairChunker` for FAQ-style question/answer documents.
|
|
152
|
+
- Added experimental `SemanticChunker` for optional embedding-based semantic
|
|
153
|
+
chunking.
|
|
154
|
+
|
|
155
|
+
### Changed
|
|
156
|
+
|
|
157
|
+
- Replaced non-RAG source-level bare runtime `Error` throws with typed SDK/LLM
|
|
158
|
+
errors where they are part of public execution flow.
|
|
159
|
+
- Sparse RAG keyword indexes now use expanded token terms. Existing persistent
|
|
160
|
+
keyword indexes should be rebuilt or documents should be re-ingested after
|
|
161
|
+
upgrading.
|
|
162
|
+
|
|
163
|
+
### Compatibility notes
|
|
164
|
+
|
|
165
|
+
- Breaking changes must include migration notes in this file before release.
|
|
166
|
+
- Experimental API changes should name the affected exports and expected
|
|
167
|
+
replacement path.
|
|
168
|
+
- `SemanticChunker` is experimental and must be selected explicitly; it is not
|
|
169
|
+
used by `AutoChunker` by default.
|