@iqai/adk 0.6.5 → 0.7.0

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 CHANGED
@@ -1,5 +1,143 @@
1
1
  # @iqai/adk
2
2
 
3
+ ## 0.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 6e3eddc: Add `AgentScheduler` for recurring agent execution
8
+
9
+ New `AgentScheduler` class that runs ADK agents on cron expressions or fixed intervals. Supports job lifecycle management (schedule, unschedule, pause, resume), manual triggering with `triggerNow` and `triggerNowStream`, overlap prevention, execution limits, per-job callbacks, and global event listeners.
10
+
11
+ ```typescript
12
+ import { AgentBuilder, AgentScheduler } from "@iqai/adk";
13
+
14
+ const { runner } = await AgentBuilder.create("reporter")
15
+ .withModel("gemini-2.5-flash")
16
+ .withInstruction("Generate a daily report")
17
+ .build();
18
+
19
+ const scheduler = new AgentScheduler();
20
+
21
+ scheduler.schedule({
22
+ id: "daily-report",
23
+ cron: "0 9 * * *",
24
+ runner,
25
+ userId: "system",
26
+ input: "Generate today's report",
27
+ });
28
+
29
+ scheduler.start();
30
+ ```
31
+
32
+ - df81392: feat: add Limitless, Kalshi, Opinion, Defillama, and Debank MCP server wrappers
33
+
34
+ Added five new MCP server wrapper functions for integrating with prediction markets, DeFi data, and portfolio tracking platforms:
35
+ - **McpLimitless** - Interact with Limitless prediction markets via `@iqai/mcp-limitless`
36
+ - **McpKalshi** - Interact with Kalshi prediction markets via `@iqai/mcp-kalshi`
37
+ - **McpOpinion** - Interact with opinion.trade prediction market via `@iqai/mcp-opinion`
38
+ - **McpDefillama** - Access DeFi data from Defillama aggregator via `@iqai/defillama-mcp`
39
+ - **McpDebank** - Interact with the DeBank portfolio platform via `@iqai/mcp-debank`
40
+
41
+ - 7066213: feat: add streaming utilities and improve streaming across LLM providers
42
+
43
+ **Streaming Utilities**
44
+ - Add `textStreamFrom()` to extract text-only deltas from an event stream
45
+ - Add `collectTextFrom()` to accumulate streamed text into a single string
46
+ - Add `streamTextWithFinalEvent()` to stream text while capturing the final event with metadata
47
+
48
+ **Anthropic Streaming**
49
+ - Implement full streaming support via `handleStreaming()` async generator
50
+ - Yield partial text deltas, accumulate tool call JSON, and detect thought blocks
51
+ - Emit final response with complete text, tool calls, and usage metadata
52
+
53
+ **AI SDK Streaming Fix**
54
+ - Fix partial responses yielding accumulated text instead of deltas, which caused duplicated text when consumed via streaming utilities
55
+
56
+ **Code Quality**
57
+ - Extract thought tag detection into `THOUGHT_OPEN_TAGS`/`THOUGHT_CLOSE_TAGS` constants and `containsAny()` helper
58
+ - Replace `as any` casts with proper `Part` type from `@google/genai`
59
+ - Use guard clauses in streaming utilities for cleaner control flow
60
+
61
+ - 8bf7a31: Overhaul memory system with pluggable provider architecture
62
+
63
+ This release introduces a completely redesigned memory system with a flexible, pluggable architecture that separates storage, summarization, and embedding concerns.
64
+
65
+ ### New Architecture
66
+
67
+ **Storage Providers** - Pluggable backends for persisting memories:
68
+ - `InMemoryStorageProvider` - Simple in-memory storage for development
69
+ - `FileStorageProvider` - File-based persistence
70
+ - `VectorStorageProvider` - Base class for vector-enabled storage
71
+ - `InMemoryVectorStore` - In-memory vector storage with similarity search
72
+ - `FileVectorStore` - File-based vector storage with persistence
73
+ - `QdrantVectorStore` - Production-ready vector storage using Qdrant
74
+
75
+ **Summary Providers** - Transform sessions into memories:
76
+ - `LlmSummaryProvider` - LLM-powered summarization with topic segmentation and entity extraction
77
+ - `PassthroughSummaryProvider` - Store raw session content without transformation
78
+
79
+ **Embedding Providers** - Generate vector embeddings for semantic search:
80
+ - `OpenAIEmbeddingProvider` - OpenAI embeddings API
81
+ - `CohereEmbeddingProvider` - Cohere embeddings API
82
+ - `OllamaEmbeddingProvider` - Local embeddings via Ollama
83
+ - `OpenRouterEmbeddingProvider` - Embeddings via OpenRouter
84
+
85
+ ### New Types
86
+ - `MemoryServiceConfig` - Unified configuration for the memory service
87
+ - `MemoryStorageProvider` - Interface for storage backends
88
+ - `MemorySummaryProvider` - Interface for summarization
89
+ - `EmbeddingProvider` - Interface for embedding generation
90
+ - `MemoryRecord`, `MemoryContent`, `TopicSegment`, `Entity` - Structured memory types
91
+ - `MemorySearchQuery`, `MemorySearchResult` - Search types with vector support
92
+
93
+ ### Features
94
+ - Semantic search with configurable similarity thresholds
95
+ - Hybrid search combining keyword and vector approaches
96
+ - Topic-based memory segmentation for granular retrieval
97
+ - Entity extraction and relationship tracking
98
+ - Session-to-memory transformation pipeline
99
+ - Debug logging throughout the memory pipeline
100
+
101
+ ### Backwards Compatibility
102
+
103
+ The following legacy exports are deprecated and will be removed in the next major version:
104
+ - `InMemoryMemoryService` - Use `MemoryService` with `InMemoryStorageProvider` instead
105
+ - `BaseMemoryService` - Use `MemoryStorageProvider` interface instead
106
+ - `MemoryEntry` - Use `MemoryRecord` instead
107
+ - `SearchMemoryResponse` - Use `MemorySearchResult[]` instead
108
+
109
+ Migration example:
110
+
111
+ ```typescript
112
+ // Old (deprecated)
113
+ import { InMemoryMemoryService } from "@iqai/adk";
114
+ const memory = new InMemoryMemoryService();
115
+
116
+ // New
117
+ import { MemoryService, InMemoryStorageProvider } from "@iqai/adk";
118
+ const memory = new MemoryService({
119
+ storage: new InMemoryStorageProvider(),
120
+ });
121
+ ```
122
+
123
+ ### Patch Changes
124
+
125
+ - d671e06: Add `ToolOutputFilterPlugin` to intelligently reduce large tool outputs before downstream processing.
126
+
127
+ The plugin dynamically generates safe `jq` filters using an LLM to extract only relevant data, applying adaptive and iterative filtering until configurable size or key-count targets are met. This improves performance, prevents context window overflows, and supports per-tool enablement, schema-aware filtering, and strict security checks against unsafe filters.
128
+
129
+ ## 0.6.6
130
+
131
+ ### Patch Changes
132
+
133
+ - 78bac0e: Previously, chaining builder methods after `withOutputSchema()` caused TypeScript to lose the inferred output type, resulting in `EnhancedRunner<any, any>` instead of the schema-derived type.
134
+
135
+ This update:
136
+ - Makes all chainable builder methods return `this` to preserve polymorphic typing.
137
+ - Refactors `AgentBuilderWithSchema` using a mapped type that preserves all methods from `AgentBuilder` while correctly typing `build`, `buildWithSchema`, and `ask`.
138
+
139
+ Now, the inferred output type `T` flows correctly through the builder chain, ensuring `BuiltAgent<T, M>` and `EnhancedRunner<T, M>` are fully typed.
140
+
3
141
  ## 0.6.5
4
142
 
5
143
  ### Patch Changes