Skip to content

fix: close #5#6

Open
reaatech wants to merge 1 commit into
mainfrom
issue/tighten-type-usage-replace-lazy-any-unknown-with-true-types-5
Open

fix: close #5#6
reaatech wants to merge 1 commit into
mainfrom
issue/tighten-type-usage-replace-lazy-any-unknown-with-true-types-5

Conversation

@reaatech

@reaatech reaatech commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

Changes across 6 files (30 insertions, 8 deletions): Added JsonValue and ToolDefinition types to packages/core/src/types/index.ts, replacing lazy unknown with precise types in all layers — CacheEntry.response uses JsonValue (the full JSON-serializable type), CacheOptions.tools uses ToolDefinition[], and adapter deserializers (DynamoDBAdapter, QdrantAdapter) were tightened accordingly. The CacheEngine.set/setBatch signatures and app.ts route handler body were also updated. Genuinely dynamic boundaries (readBody, sendJson, safeParseJson, adapter Record<string, unknown> for SDK interop) were left as unknown per the issue's own carve-outs.

Closes #5

#5

**Changes across 6 files (30 insertions, 8 deletions):** Added `JsonValue` and `ToolDefinition` types to `packages/core/src/types/index.ts`, replacing lazy `unknown` with precise types in all layers — `CacheEntry.response` uses `JsonValue` (the full JSON-serializable type), `CacheOptions.tools` uses `ToolDefinition[]`, and adapter deserializers (`DynamoDBAdapter`, `QdrantAdapter`) were tightened accordingly. The `CacheEngine.set`/`setBatch` signatures and `app.ts` route handler body were also updated. Genuinely dynamic boundaries (`readBody`, `sendJson`, `safeParseJson`, adapter `Record<string, unknown>` for SDK interop) were left as `unknown` per the issue's own carve-outs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tighten type usage: replace lazy any/unknown with true types

1 participant