@askdb/http-api 1.0.0-beta.51 → 1.0.0-beta.52
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/README.md +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ Notes:
|
|
|
76
76
|
- **Mode**: optional `x-askdb-mode` header (body `mode` wins if present). A request mode can only tighten config `modes.askdbMode` (default `schema_only`), never loosen it.
|
|
77
77
|
- **Execution**: not supported. Retired execution controls return `400`; review generated SQL and run any approved query outside AskDB under your own database roles, read-only controls, tenant policy, and audit logging.
|
|
78
78
|
- **Generation config**: set `ai.provider` / `ai.providerConfig` in `askdb.config.ts` (for tests/dev, set `dev.mockSql` to bypass live model calls). The server reads no setting from the shell on its own; to set this one from a variable, map it in the config, such as `dev: { mockSql: env("MOCK_SQL") }`.
|
|
79
|
-
- **Schema config (recommended)**: set `host.schemaPath` in `askdb.config.ts` (or pass `--schema-path`) to
|
|
79
|
+
- **Schema config (recommended)**: set `host.schemaPath` in `askdb.config.ts` (or pass `--schema-path`) to a schema directory, bundled JSON file, or `schema.json`. Per-request `schemaJson` overrides are rejected with `403 schema_override_disabled` unless you set `httpApi.allowSchemaOverride: true`. An override gets SQL for its own recorded `provider`, not for the config's `dialect`.
|
|
80
80
|
- **Timeouts**: the model call is aborted after `httpApi.requestTimeoutMs` (default `60000`, at most `2147483647`) and the request returns `502 sql_generation_error`.
|
|
81
81
|
- **Errors**: status codes come from the error type. Model-provider failures return a generic `502`, and unexpected failures return a generic `500`. Every non-`2xx` `POST /ask` response is logged as `askdb.run.error` under the response's `correlationId`, with the full error for failures inside `ask()`, except last-resort `500`s (an error that escapes the handler), which are written to stderr.
|
|
82
82
|
|
package/dist/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { AskDbModeV1, AskUsage, SensitiveGuardrailResult } from "@askdb/cor
|
|
|
2
2
|
export type AskHttpRequest = {
|
|
3
3
|
question: string;
|
|
4
4
|
/**
|
|
5
|
-
* Optional override:
|
|
5
|
+
* Optional override: a bundled schema artifact, as a JSON string.
|
|
6
6
|
*
|
|
7
7
|
* Rejected with `403 schema_override_disabled` unless the server sets
|
|
8
8
|
* `httpApi.allowSchemaOverride: true`. Preferred: configure a server-default
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askdb/http-api",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.52",
|
|
4
4
|
"description": "AskDB HTTP API: minimal HTTP wrapper around @askdb/core. POST /ask returns checked SQL only.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"askdb",
|
|
@@ -55,10 +55,10 @@
|
|
|
55
55
|
"@ai-sdk/azure": "^4.0.114",
|
|
56
56
|
"@ai-sdk/google": "^4.0.109",
|
|
57
57
|
"@ai-sdk/openai": "^4.0.106",
|
|
58
|
-
"@askdb/ai": "0.1.0-beta.
|
|
59
|
-
"@askdb/client": "1.0.0-beta.
|
|
60
|
-
"@askdb/config": "1.0.0-beta.
|
|
61
|
-
"@askdb/core": "1.0.0-beta.
|
|
58
|
+
"@askdb/ai": "0.1.0-beta.12",
|
|
59
|
+
"@askdb/client": "1.0.0-beta.13",
|
|
60
|
+
"@askdb/config": "1.0.0-beta.20",
|
|
61
|
+
"@askdb/core": "1.0.0-beta.52",
|
|
62
62
|
"ai": "^7.0.51",
|
|
63
63
|
"zod": "^4.6.7"
|
|
64
64
|
},
|