@reddb-io/sdk 1.29.2 → 1.30.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.
Files changed (2) hide show
  1. package/index.d.ts +32 -0
  2. package/package.json +6 -6
package/index.d.ts CHANGED
@@ -72,17 +72,49 @@ export interface AskValidation {
72
72
  errors: AskValidationItem[]
73
73
  }
74
74
 
75
+ export interface AskExploratoryQuery {
76
+ sql: string
77
+ params: unknown[]
78
+ purpose: string
79
+ }
80
+
81
+ export interface AskReasoningStep {
82
+ sequence: number
83
+ tool: string
84
+ purpose: string
85
+ arguments?: Record<string, unknown>
86
+ phase?: 'explore' | 'final'
87
+ sql?: string
88
+ params?: unknown[]
89
+ observation?: { rows: number; truncated: boolean }
90
+ evidence?: 'answer_and_citations'
91
+ }
92
+
93
+ export interface AskReasoning {
94
+ summary: string
95
+ evidence_policy: 'final_query_only'
96
+ steps: AskReasoningStep[]
97
+ }
98
+
75
99
  export interface AskQueryResult {
76
100
  answer: string
77
101
  cache_hit: boolean
78
102
  citations: AskCitation[]
79
103
  completion_tokens: number
80
104
  cost_usd: number
105
+ executed_query?: string
106
+ exploratory_queries?: AskExploratoryQuery[]
107
+ final_query?: string
108
+ final_query_params?: unknown[]
109
+ intent?: 'factual' | 'synthesis' | 'how_to'
81
110
  mode: 'strict' | 'lenient'
82
111
  model: string
112
+ plan_summary?: string
83
113
  prompt_tokens: number
84
114
  provider: string
115
+ reasoning?: AskReasoning
85
116
  retry_count: number
117
+ sources_count?: number
86
118
  sources_flat: AskSource[]
87
119
  validation: AskValidation
88
120
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reddb-io/sdk",
3
- "version": "1.29.2",
3
+ "version": "1.30.0",
4
4
  "description": "Official embedded RedDB SDK — launches a local red binary over stdio JSON-RPC. The binary arrives as a per-platform optionalDependency — no install script. Use @reddb-io/client for remote HTTP, gRPC, and RedWire.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -43,11 +43,11 @@
43
43
  "url": "https://github.com/reddb-io/reddb/issues"
44
44
  },
45
45
  "optionalDependencies": {
46
- "@reddb-io/red-linux-x64": "1.29.2",
47
- "@reddb-io/red-linux-x64-musl": "1.29.2",
48
- "@reddb-io/red-linux-arm64": "1.29.2",
49
- "@reddb-io/red-linux-arm64-musl": "1.29.2",
50
- "@reddb-io/red-win32-x64": "1.29.2"
46
+ "@reddb-io/red-linux-x64": "1.30.0",
47
+ "@reddb-io/red-linux-x64-musl": "1.30.0",
48
+ "@reddb-io/red-linux-arm64": "1.30.0",
49
+ "@reddb-io/red-linux-arm64-musl": "1.30.0",
50
+ "@reddb-io/red-win32-x64": "1.30.0"
51
51
  },
52
52
  "scripts": {
53
53
  "test": "node --test test/ask.test.mjs test/cache.test.mjs test/db-helpers.test.mjs test/embedded-only.test.mjs test/helpers.test.mjs test/insert-ids.test.mjs test/kv.test.mjs test/params.test.mjs test/platform-binary.test.mjs test/native-engine.test.mjs test/queue.test.mjs test/redwire.params.test.mjs test/transaction.test.mjs test/url.test.mjs && node test/smoke.test.mjs && node test/conformance.test.mjs && node test/readme-examples.test.mjs"