Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -1709,6 +1709,7 @@ find node_modules -path "*/zod/package.json" | while read f; do echo "$f $(node
need_tools/replay loop), Redis `SandboxInstanceStore`/`SandboxCheckpointStore` (+ Upstash Blob
`BlobStore`), QStash-backed background runs writing to `upstashStream`, and a QStash schedule for
`reapDetachedRuns`.
- **ai 7.0.166 + @tanstack/ai 1.4.0 + @tanstack/ai-openai 1.1.1 (2026-11-10):** devDependency/example pins only (no published-content change, no changeset). eve stays on 0.91.0 (`1.0.0-rc.8` is npm `latest` but RCs are not adopted); published `@upstash/agentkit-eve-extension@0.19.0` / `@upstash/agentkit-eve@0.19.0` install and `eve build` clean on `eve@1.0.0-rc.8`. Published ai-sdk 0.15.1 typechecks (`skipLibCheck:false`, nodenext) and imports on ai 7.0.166; published tanstack-ai 0.3.0 typechecks (bundler) and imports on `@tanstack/ai@1.4.0`. Repo: lint, typecheck, sync-version, build, examples build pass. `pnpm test` had 18 failures, all from the throwaway free Redis allowing 1 search index (`ERR Exceeded max index count of 1`) plus one rate-limit test; inconclusive, CI covers it.
- **ai 7.0.163 (2026-11-05):** pins bumped from 7.0.159 (no code change); `examples/ai-sdk-demo`'s `@ai-sdk/react` raised to `^4.0.167` because 4.0.160 depends on an *exact* `ai@7.0.156`, which split the `UIMessage` type from the demo's `ai@7.0.163` and failed `next build` (`SteeringMessageUIPart`). Re-checked 2026-11-05: published `@upstash/agentkit-eve-extension@0.19.0` / `@upstash/agentkit-eve@0.19.0` build clean on `eve@1.0.0-rc.5` (the 0.91.0 build stays); TanStack AI 1.x (ai 1.1.0, ai-persistence 1.0.1, ai-memory 1.1.0) still not adopted (same `threadId`/`blobKey` test-file errors).
- **TanStack AI 1.x applied (2026-11-05):** `@tanstack/ai` 1.1.0, `ai-persistence` 1.0.1, `ai-memory` 1.1.0 (devDeps, exact) and the tanstack-ai-demo's `ai-client` 1.1.0 / `ai-react` 1.0.2 / `ai-openai` 1.1.0. `src` needed no change; only tests did: `chat()` calls pass `threadId` (`middleware.test.ts`, `search-tools.test.ts`) and `ArtifactRecord` fixtures carry `blobKey` (`persistence.test.ts`). The peer floors (`>=0.65.0` / `>=0.8.0` / `>=0.2.8`) are untouched: the source is unchanged and still works on 0.x, and published `@upstash/agentkit-tanstack-ai@0.2.0` imports on 1.x, so no changeset. Upstream `@tanstack/ai@1.1.0`'s `spawn.d.ts` still has the broken `import('../../..')` (TS2307 with `skipLibCheck: false`). The 1.0 contracts `SessionIndexStore` and `CredentialStore` are implemented in the follow-up below.
- **TanStack AI 1.0 contracts implemented (2026-11-05, `@upstash/agentkit-tanstack-ai` minor):** `stores.log` (`persistence/log-store.ts`, see below), `stores.sessions` (`SessionIndexStore`, `persistence/sessions.ts`) and `./byok` (`upstashCredentials`, `byok/credentials.ts`, `CredentialStore`). **Peer floors raised to `@tanstack/ai >=1.0.0` and `@tanstack/ai-persistence >=1.0.0`** (verified by packing 0.71.0/0.10.1: neither has `SessionIndexStore` / `@tanstack/ai/byok`; `ai-memory` floor untouched). Sessions: doc `{r,e}` per `(tenant, thread)` + one ZSET per tenant (score `updatedAt`, member `~<threadId>` so the client never JSON-parses a numeric-looking id); `list` walks the ZSET in batches of whole score groups and re-reads a tie group in full so the `threadId` UTF-8 order is exact, filtering after loading; `ZRANGE BYSCORE REV` takes `(max, min)` (cast through `number`, the SDK types forbid `(`-exclusive strings). Revisions come from an `INCR` counter, never reused (the credential contract requires that; sessions may reuse). Passes the 19 `sessions` cases of `runPersistenceConformance` (they run only when the store is present). Credentials: one hash per owner (`%none` segment = undefined tenant/user, distinct from `""`), value `{r,t,x?,c | iv,ct}` with type/expiry in the clear so `list` never decrypts; optional AES-256-GCM `encryptionKey`, AAD = owner key + id (a copied ciphertext does not decrypt). `storedProviderKeys` lives in `@tanstack/ai/byok/server`, not `/byok`. **`stores.log` (`LogStore`):** per log a meta hash (head, first, epoch, owner, harness, exp, rel, wake, aff, del, laneH, oseq), a records ZSET (score seq, member `<seq>:<json>`), snapshot string (`seq` must stay the first JSON key: `truncate` reads it with a Lua pattern), offers hash + info hash + pending ZSET, and a tick counter; shared `logDue` ZSET (when each log needs an owner) and `logHosts` hash. Every op is one Lua script over the same nine declared keys; the store clock is Redis `TIME` inside the script; numbers written from Lua go through `%.0f` (plain `tostring` prints epoch ms in scientific notation); ids returned from Lua are `~`-prefixed because the client JSON-parses numeric-looking strings (`"007"` -> 7). `subscribe` = immediate local callback + a `reported` and an `observed` tick per log so each counter value is reported once (a baseline read that already contains a local write must not mark it reported: that swallowed the notification), plus a 250 ms tick poll for other machines (non-overlapping; the first successful read is the baseline, so a failed first read is retried instead of silencing the subscription). `changed()` skips a counter the poll already reported (deterministic repro in tests: delay the append reply with a Proxy), which fixed a double notification (a poll can see the tick before the write reply arrives; it failed the `calls a listener after each append` conformance case in CI). The baseline read is still async, so a write by another machine landing in the first round trip after `subscribe` can go unreported (listeners are wake-ups, hosts reconcile with `read`). `append` rejects more than 10,000 records (a 50,000-record batch outran the Lua time limit and left part of the writes). Known follow-ups: `listLogsWithoutOwner` re-checks entries skipped by `harnesses` / a live pin on every call; consumed offers, old hosts and `deleteLog` tombstones are never cleaned up; `read` / `listOfferedInputs` without a limit return everything. Conformance needs the `twin` option (a second store set on the same keyspace) for the 4 `log across instances` cases; all 56 log cases and 19 sessions cases pass. Not implemented: `ownership` TTL-based cleanup of finished logs (logs and their keys live until `deleteLog`).
Expand Down
2 changes: 1 addition & 1 deletion examples/ai-sdk-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@upstash/agentkit-ai-sdk": "workspace:*",
"@upstash/agentkit-sdk": "workspace:*",
"@upstash/redis": "^1.38.4",
"ai": "7.0.163",
"ai": "7.0.166",
"dotenv": "^16.4.5",
"next": "16.2.9",
"react": "19.2.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/eve-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@upstash/box": "^0.7.5",
"@upstash/redis": "^1.38.4",
"@vercel/connect": "2.5.6",
"ai": "7.0.163",
"ai": "7.0.166",
"class-variance-authority": "0.7.1",
"clsx": "2.1.1",
"cmdk": "1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/eve-extension-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@upstash/agentkit-eve-extension": "workspace:*",
"@upstash/redis": "^1.38.4",
"@vercel/connect": "2.5.6",
"ai": "7.0.163",
"ai": "7.0.166",
"eve": "^0.91.0",
"zod": "4.4.3"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/tanstack-ai-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"e2e": "vitest run --config e2e/vitest.config.ts"
},
"dependencies": {
"@tanstack/ai": "1.1.0",
"@tanstack/ai": "1.4.0",
"@tanstack/ai-client": "1.1.0",
"@tanstack/ai-memory": "1.1.0",
"@tanstack/ai-openai": "1.1.0",
"@tanstack/ai-openai": "1.1.1",
"@tanstack/ai-persistence": "1.0.1",
"@tanstack/ai-react": "1.0.2",
"@upstash/agentkit-tanstack-ai": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@ai-sdk/openai": "^4.0.71",
"@ai-sdk/provider": "^4.0.17",
"@upstash/redis": "^1.38.4",
"ai": "7.0.163",
"ai": "7.0.166",
"dotenv": "^16.4.5"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/eve/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"devDependencies": {
"@upstash/box": "^0.7.5",
"@upstash/redis": "^1.38.4",
"ai": "7.0.163",
"ai": "7.0.166",
"dotenv": "^16.4.5",
"eve": "^0.91.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/tanstack-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"zod": "^3.23.8 || ^4"
},
"devDependencies": {
"@tanstack/ai": "1.1.0",
"@tanstack/ai": "1.4.0",
"@tanstack/ai-memory": "1.1.0",
"@tanstack/ai-persistence": "1.0.1",
"dotenv": "^16.4.5",
Expand Down
Loading
Loading