@aeye/query 0.9.0 → 0.10.1
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.
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -5
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -14527,7 +14527,9 @@ interface BuildQueryToolOptions extends QuerySchemaOptions {
|
|
|
14527
14527
|
* shape: a CLI / file def, an integration harness), WITHOUT building a Tool:
|
|
14528
14528
|
* the runnable `Query` (or `null`) with the accumulated `problems` and their
|
|
14529
14529
|
* underlined `report`. A model's answer goes through `buildQueryTool` instead,
|
|
14530
|
-
* whose schema decodes the wire shape first.
|
|
14530
|
+
* whose schema decodes the wire shape first. A string `query` is prose (it
|
|
14531
|
+
* needs structuring); a structured one is parsed and checked whatever the
|
|
14532
|
+
* Type count — `max` / `types` choose only what a model is shown.
|
|
14531
14533
|
*/
|
|
14532
14534
|
declare function parseQueryRequest(engine: QueryEngine, raw: unknown, options?: BuildQueryToolOptions): {
|
|
14533
14535
|
query: Query | null;
|
package/dist/index.js
CHANGED
|
@@ -24227,7 +24227,7 @@ function reportFor(value2, problems, opts) {
|
|
|
24227
24227
|
return Code.fromJson(value2).formatProblems(problems, opts);
|
|
24228
24228
|
}
|
|
24229
24229
|
var NEEDS_STRUCTURING = "Received a prose query; it must be converted to a structured query before it can run.";
|
|
24230
|
-
function parseQueryInput(engine,
|
|
24230
|
+
function parseQueryInput(engine, raw2, reportOpts) {
|
|
24231
24231
|
if (!isRecord2(raw2)) {
|
|
24232
24232
|
const problems2 = new Problems();
|
|
24233
24233
|
problems2.error("shape.not-object", expected("QueryRequest", raw2));
|
|
@@ -24239,7 +24239,7 @@ function parseQueryInput(engine, useString, raw2, reportOpts) {
|
|
|
24239
24239
|
return { query: null, problems: problems2, report: reportFor(raw2, problems2, reportOpts) };
|
|
24240
24240
|
}
|
|
24241
24241
|
const queryValue = raw2["query"];
|
|
24242
|
-
if (
|
|
24242
|
+
if (typeof queryValue === "string") {
|
|
24243
24243
|
const problems2 = new Problems();
|
|
24244
24244
|
problems2.info("query.needs-structuring", NEEDS_STRUCTURING);
|
|
24245
24245
|
return { query: null, problems: problems2, report: reportFor(queryValue, problems2, reportOpts) };
|
|
@@ -24253,9 +24253,7 @@ function parseQueryInput(engine, useString, raw2, reportOpts) {
|
|
|
24253
24253
|
return { query, problems: semantic2, report: reportFor(queryValue, semantic2, reportOpts) };
|
|
24254
24254
|
}
|
|
24255
24255
|
function parseQueryRequest(engine, raw2, options = {}) {
|
|
24256
|
-
|
|
24257
|
-
const useString = shouldUseStringSchema(types, options.max);
|
|
24258
|
-
return parseQueryInput(engine, useString, raw2, options.report);
|
|
24256
|
+
return parseQueryInput(engine, raw2, options.report);
|
|
24259
24257
|
}
|
|
24260
24258
|
function parseQueryTool(engine, raw2, options = {}) {
|
|
24261
24259
|
const { query, problems, report } = parseQueryRequest(engine, raw2, options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeye/query",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Query - An LLM-friendly relational query language, runtime & SQL converter",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"clean": "rimraf dist"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@aeye/core": "^0.
|
|
40
|
-
"@aeye/schema": "0.
|
|
39
|
+
"@aeye/core": "^0.10.1",
|
|
40
|
+
"@aeye/schema": "0.10.1",
|
|
41
41
|
"zod": "^4.6.7",
|
|
42
|
-
"@aeye/gin": "^0.
|
|
42
|
+
"@aeye/gin": "^0.10.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@aeye/ai": "^0.
|
|
46
|
-
"@aeye/aws": "^0.
|
|
47
|
-
"@aeye/models": "^0.
|
|
48
|
-
"@aeye/openai": "^0.
|
|
49
|
-
"@aeye/openrouter": "^0.
|
|
45
|
+
"@aeye/ai": "^0.10.1",
|
|
46
|
+
"@aeye/aws": "^0.10.1",
|
|
47
|
+
"@aeye/models": "^0.10.1",
|
|
48
|
+
"@aeye/openai": "^0.10.1",
|
|
49
|
+
"@aeye/openrouter": "^0.10.1",
|
|
50
50
|
"@vitest/coverage-v8": "^3.2.4",
|
|
51
51
|
"tsup": "^8.0.0",
|
|
52
52
|
"tsx": "^4.19.0",
|