Type Alias: AskRequest
type AskRequest = object;Defined in: packages/sdk/src/index.ts:22
Request body for client.ask() / askStream() — the plain-English goal plus optional routing hints.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
confirm? |
boolean |
SK-ONBOARD-004: when the API returned requires_confirm: true for a destructive plan, the surface re-sends the same request with confirm: true. The orchestrator skips its confidence gate on the second hop and runs the SQL. |
packages/sdk/src/index.ts:40 |
dbId? |
string |
SK-ASK-009 / SK-HDC-011: dbId is optional. When omitted the API resolves it deterministically (0 dbs → CREATE, 1 → auto-target) or via a cheap-tier LLM disambiguator on 2+ DBs (≥ 0.7 confidence → auto-target with selected_db echo on the response; below → 409 ambiguous_db with candidate_dbs for the surface to render). |
packages/sdk/src/index.ts:29 |
engine? |
Engine |
SK-DB-010: when the request routes the create branch (no dbId, 0 DBs, or kind=create), engine overrides the classifier’s pick. Ignored on the query / write branches. Power-user escape hatch per GLOBAL-015; absent path is the goal-first default per GLOBAL-020. |
packages/sdk/src/index.ts:35 |
forceQuery? |
boolean |
SK-ASK-032 — resolve a clarify_required (create_or_query_pinned) by confirming “query this pinned DB”. Re-sending the same goal with the pin set would re-run the classifier and dead-end on the same clarify; this flag forces the query route so the confirmation always progresses. Only honoured alongside a pinned dbId; a no-op otherwise. |
packages/sdk/src/index.ts:46 |
goal |
string |
- | packages/sdk/src/index.ts:23 |
model? |
ModelPreset |
SK-PREMIUM-014 — the goal-first model preset (SK-PREMIUM-003): fast pins the free chain, best demands a frontier lane (throws model_unavailable when the account has no BYOLLM key and no paid plan), auto/absent lets the server pick. Named frontier models are not chosen per-request — store a key via setByollm() or pass byollm in ClientOptions. |
packages/sdk/src/index.ts:53 |
source? |
Record<string, string> |
SK-GTM-007 — first-touch acquisition attribution. When this ask routes the create branch (no dbId, 0 DBs, or kind=create), the web layer forwards the visitor’s stored first touch (utm_source, referrer host, landing path) so the API can stamp it on the new databases.source_json. Telemetry only: the API sanitizes it (whitelist keys, length caps) and drops it on any problem, never 400s. Ignored on the query / write branches. |
packages/sdk/src/index.ts:61 |