Commit 92718db
committed
fix: migrate deprecated Gemini SDK, fix security fallbacks, and harden runtime
Critical fixes:
- Migrate from archived @google/generative-ai to @google/genai (deprecated Nov 2025)
- Rewrite gemini-provider.ts for new API surface (streaming, tool calling, thought signatures)
- Update summarizer.ts Gemini factories to new SDK
- Update web-search.ts to new SDK with proper GroundingChunk types
- Update summarizer default model from retired gemini-2.0-flash to gemini-2.5-flash
- Fix web_search silent Gemini coupling: thread providerApiKeys through
ToolContext so web_search resolves the Gemini key regardless of active provider
(kernel.ts, tool-handler.ts, tool-plugin.ts, run-controller.ts, autonomous-runner.ts)
- Default to safe mode on YAML parse failure instead of granting gloves_off
- Implement street/track safety mode aliases documented in README
Hardening:
- Collapse ../ sequences in normalizePath to prevent policy bypass
- Cap event log at 10,000 entries to prevent OOM in long autonomous missions
- Fix README defaults: token budget 500K (was 250K), max fanout 8 (was 5)
- Fix LanceDB label to "Vector Embeddings" (no LanceDB dependency exists)1 parent a37993d commit 92718db
22 files changed
Lines changed: 520 additions & 115 deletions
File tree
- src
- components/settings
- core
- plugins
- stores
- types
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
460 | | - | |
| 460 | + | |
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
464 | | - | |
| 464 | + | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| |||
0 commit comments