Commit cf1f007
authored
feat(adk): overhaul ADK backend to align with v1.0.0 store (#400)
## Summary
Improved ADK integration based on upstream improvements since initial implementation.
- **Full-event JSON storage**: Replace 17-column decomposed `EventRecord` with 5-column model (`session_id`, `invocation_id`, `author`, `timestamp`, `event_json`). Eliminates column drift with upstream ADK — new Event fields are captured automatically without schema changes.
- **State persistence fix**: `append_event()` now persists session state atomically with the event via `append_event_and_update_state()`. Previously, state mutations from `event.actions.state_delta` were lost on reload.
- **Scoped state**: `temp:` keys stripped before persistence, `app:`/`user:` split/merge helpers for future cross-session state sharing.
- **Unified async contract**: All stores (including previously sync-only DuckDB, ADBC, pymysql, Oracle sync, Spanner, psycopg sync, mysqlconnector sync) now extend `BaseAsyncADKStore` and wrap sync operations via `sqlspec.utils.sync_tools.async_()`.
- **Artifact service**: New `SQLSpecArtifactService` composing SQL metadata tables with `sqlspec/storage/` content backends (S3, GCS, Azure, local filesystem).
- **BigQuery removed**: Correctness bugs (JSON_VALUE flattening, unsafe bytes encoding) and architectural mismatch (high latency, eventual consistency, per-query cost) confirmed removal.
- **CockroachDB upgraded**: GIN indexes and native tsvector FTS restored (incorrectly stripped in prior code).
- **Memory service expanded**: `add_events_to_memory()` and `add_memory()` implemented (ADK v1.25+ contract).
- **Capability config**: `ADKConfig` expanded with `fts_language`, `artifact_storage_uri`, `schema_version`, partitioning, retention, compression, and SQLite optimization sections.1 parent 466107b commit cf1f007
68 files changed
Lines changed: 7172 additions & 5181 deletions
File tree
- .github/workflows
- docs
- _tapes
- extensions/adk
- reference/extensions
- usage
- sqlspec
- adapters
- adbc/adk
- aiosqlite/adk
- asyncmy/adk
- asyncpg/adk
- bigquery/adk
- cockroach_asyncpg/adk
- cockroach_psycopg/adk
- duckdb/adk
- mysqlconnector/adk
- oracledb/adk
- psqlpy/adk
- psycopg/adk
- pymysql/adk
- spanner/adk
- sqlite/adk
- core
- extensions/adk
- artifact
- memory
- tests
- integration/adapters
- adbc/extensions/adk
- asyncmy/extensions/adk
- duckdb/extensions/adk
- mysqlconnector/extensions/adk
- oracledb/extensions/adk
- psycopg/extensions/adk
- spanner/extensions/adk
- sqlite/extensions/adk
- unit
- adapters
- test_oracledb
- test_psycopg
- extensions/test_adk
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
18 | 43 | | |
19 | 44 | | |
20 | 45 | | |
| |||
30 | 55 | | |
31 | 56 | | |
32 | 57 | | |
33 | | - | |
| 58 | + | |
34 | 59 | | |
35 | 60 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
24 | 36 | | |
25 | 37 | | |
26 | 38 | | |
| |||
34 | 46 | | |
35 | 47 | | |
36 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
37 | 52 | | |
38 | 53 | | |
39 | 54 | | |
| |||
45 | 60 | | |
46 | 61 | | |
47 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
0 commit comments