@askdb/studio 0.2.0-beta.36 → 0.2.0-beta.38
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 -4
- package/dist/bin.d.ts.map +1 -1
- package/dist/bin.js +16 -7
- package/dist/bin.js.map +1 -1
- package/dist/client/assets/index-Db2Xf11c.js +100 -0
- package/dist/client/index.html +1 -1
- package/dist/execute-registry.d.ts +4 -2
- package/dist/execute-registry.d.ts.map +1 -1
- package/dist/execute-registry.js +9 -3
- package/dist/execute-registry.js.map +1 -1
- package/dist/introspection.d.ts +6 -6
- package/dist/introspection.d.ts.map +1 -1
- package/dist/introspection.js +12 -69
- package/dist/introspection.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +213 -142
- package/dist/server.js.map +1 -1
- package/dist/setup.d.ts +3 -1
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +29 -33
- package/dist/setup.js.map +1 -1
- package/dist/shared/api.d.ts +11 -3
- package/dist/shared/api.d.ts.map +1 -1
- package/package.json +35 -36
- package/dist/client/assets/index-TAdxvl0x.js +0 -101
package/README.md
CHANGED
|
@@ -60,10 +60,7 @@ Environment variables:
|
|
|
60
60
|
| `ASKDB_STUDIO_HOST` | Bind host. Defaults to `127.0.0.1`. |
|
|
61
61
|
| `ASKDB_STUDIO_PORT` | Bind port. Defaults to `5556`. |
|
|
62
62
|
| `ASKDB_MOCK_SQL` | Deterministic generated SQL for tests or offline demos. |
|
|
63
|
-
| `ASKDB_RAG_EMBEDDER` | Set to `mock`, `openai`, or `ai-sdk` for Studio RAG indexing. Defaults to the mock lexical embedder unless an AI key is configured. |
|
|
64
|
-
| `ASKDB_RAG_EMBEDDER_MODEL` | Embedding model override for Studio RAG. |
|
|
65
|
-
| `ASKDB_RAG_EMBEDDER_DIMENSIONS` | Optional embedding dimension override. |
|
|
66
63
|
|
|
67
64
|
Security: every `/api/*` request must carry the per-launch session token that Studio injects into the page it serves (`x-askdb-studio-token` header), come with an allowed `Host` (`localhost`, `127.0.0.1`, `[::1]`, or the bound host), and, for writes, be same-origin JSON. Programmatic callers of `createStudioServer()` can read the token from `server.sessionToken`. Binding to a non-loopback host exposes query execution and schema writes to anyone on that network who can load the page. Only do that on a trusted network. See [Studio → Security model](https://askdb.tools/studio/#security-model).
|
|
68
65
|
|
|
69
|
-
Studio uses the active `rag.store` branch from `askdb.config
|
|
66
|
+
Studio uses the active `rag.store` branch from `askdb.config.*`, and embeds with `rag.embedder`: `mock`, a local lexical embedder that needs no key, or `ai`, the `ai.embedding` model, built from that section's connection only (see the [configuration reference](https://askdb.tools/reference/config/#aiembedding)). For `pgvector`, make sure `ASKDB_PGVECTOR_URL` resolves; there's no need to create the table. The first index build creates it, and the `vector` extension, at the width the embedding model returns (or `ai.embedding.dimensions`). A table that already exists at another width is refused, with a message saying how to resolve it. If Studio's database role can't create extensions, create `vector` first.
|
package/dist/bin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAKA,wBAAsB,YAAY,CAAC,IAAI,GAAE,SAAS,MAAM,EAA0B,GAAG,OAAO,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AAKA,wBAAsB,YAAY,CAAC,IAAI,GAAE,SAAS,MAAM,EAA0B,GAAG,OAAO,CAAC,MAAM,CAAC,CAmBnG"}
|
package/dist/bin.js
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { bootstrapAskDbEnv } from "@askdb/config";
|
|
2
|
+
import { bootstrapAskDbEnv, discoverAskDbConfigPath } from "@askdb/config";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
import { runStudioCli } from "./cli.js";
|
|
5
5
|
export async function runStudioBin(argv = process.argv.slice(2)) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
const cwd = process.cwd();
|
|
7
|
+
const configPath = discoverAskDbConfigPath(cwd);
|
|
8
|
+
// No config yet: Studio starts in setup mode and the browser wizard walks the user through
|
|
9
|
+
// creating one. runStudioCli re-probes.
|
|
10
|
+
if (configPath) {
|
|
11
|
+
try {
|
|
12
|
+
bootstrapAskDbEnv({ cwd });
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
// A config that exists but fails to load (a syntax error, or dependencies not installed
|
|
16
|
+
// yet) still lets Studio start so setup can continue, but the user must hear why their
|
|
17
|
+
// settings are ignored. Setup never overwrites an existing config file.
|
|
18
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
19
|
+
process.stderr.write(`askdb-studio: warning: ${configPath} could not be loaded, so Studio is ignoring it: ${message}\n`);
|
|
20
|
+
}
|
|
12
21
|
}
|
|
13
22
|
return runStudioCli(argv);
|
|
14
23
|
}
|
package/dist/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAA0B,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAChF,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC1B,MAAM,UAAU,GAAG,uBAAuB,CAAC,GAA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