@xanots/sdk 0.0.12 → 0.0.14

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 (56) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +5 -3
  3. package/dist/.build-fingerprint +1 -1
  4. package/dist/{agent-file-refresh-GQWAAOBV.js → agent-file-refresh-2LZ2YRFZ.js} +3 -3
  5. package/dist/bin.js +3 -3
  6. package/dist/{chunk-GSP2BY4F.js → chunk-BYQHCCYU.js} +1 -1
  7. package/dist/{chunk-AG5GCZDD.js → chunk-CII2TOE4.js} +2 -2
  8. package/dist/{chunk-2VTJSI6X.js → chunk-F3MRG7NI.js} +2 -2
  9. package/dist/{chunk-XT3XQ4PF.js → chunk-LISUHLWI.js} +11 -11
  10. package/dist/{chunk-QYSQ3UDO.js → chunk-MEFMTICH.js} +76 -1
  11. package/dist/{chunk-VPAWRBK5.js → chunk-ORZINVGQ.js} +33 -9
  12. package/dist/{chunk-VRNZ2NVV.js → chunk-PJNWOZMT.js} +2 -2
  13. package/dist/{chunk-PLE5QQOZ.js → chunk-UQMMFW32.js} +5 -5
  14. package/dist/{chunk-ELK7UALJ.js → chunk-UXPDQFG2.js} +2 -2
  15. package/dist/{chunk-VK26K7AY.js → chunk-XBIFQWZM.js} +2 -2
  16. package/dist/cli.js +2 -2
  17. package/dist/{codegen-command-Y2SPMAUW.js → codegen-command-5A6FVKUA.js} +7 -7
  18. package/dist/{deploy-command-XHS5PKPV.js → deploy-command-VBB7JYXH.js} +4 -4
  19. package/dist/index.d.ts +2 -2
  20. package/dist/index.js +3 -3
  21. package/dist/{init-command-23FFNUFT.js → init-command-SIJUH2DD.js} +5 -5
  22. package/dist/internal.d.ts +2 -2
  23. package/dist/internal.js +362 -264
  24. package/dist/{lock-commands-WCRC56ME.js → lock-commands-4TX3BONI.js} +3 -3
  25. package/dist/node.d.ts +2 -2
  26. package/dist/node.js +4 -4
  27. package/dist/{preflight-command-TZWPHBXY.js → preflight-command-MTYGPNVT.js} +4 -4
  28. package/dist/{release-command-WEFYRTCI.js → release-command-NXCPQDFF.js} +6 -6
  29. package/dist/{routes-manifest-5ZFKUQWA.js → routes-manifest-MN6XBYRE.js} +24 -13
  30. package/dist/{store-DAnUIi1T.d.ts → store-9Psd0jiF.d.ts} +34 -16
  31. package/dist/{upgrade-command-GYEIMJBG.js → upgrade-command-GSH3M3N6.js} +6 -6
  32. package/dist/{workspace-command-2ZTGT26W.js → workspace-command-XUOPLVQ4.js} +7 -7
  33. package/guides/README.md +1 -1
  34. package/guides/coverage.md +3 -2
  35. package/guides/typed-frontend.md +20 -3
  36. package/llms/client.md +44 -0
  37. package/llms/errors.md +33 -0
  38. package/llms/fields.md +26 -1
  39. package/llms/filters.md +4 -8
  40. package/llms/kinds-agent-mcp.md +1 -0
  41. package/llms/kinds-core.md +16 -2
  42. package/llms/kinds-knowledge.md +1 -1
  43. package/llms/kinds-realtime.md +3 -3
  44. package/llms/lambda.md +1 -1
  45. package/llms/legacy.md +1 -1
  46. package/llms/object-kinds.md +2 -2
  47. package/llms/statements-calls.md +25 -4
  48. package/llms/statements-catalog.md +1 -1
  49. package/llms/statements-runtime.md +20 -5
  50. package/llms/tests.md +3 -3
  51. package/llms/triggers.md +14 -2
  52. package/llms/values.md +2 -2
  53. package/llms-full.txt +362 -270
  54. package/llms.txt +163 -234
  55. package/manifest.json +4 -4
  56. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadDefault
3
- } from "./chunk-XT3XQ4PF.js";
3
+ } from "./chunk-LISUHLWI.js";
4
4
  import "./chunk-7WRJPKGK.js";
5
5
  import {
6
6
  readLockFile,
@@ -15,7 +15,7 @@ import "./chunk-GNPVYOPB.js";
15
15
  import "./chunk-EZG76F7R.js";
16
16
  import {
17
17
  Xano
18
- } from "./chunk-QYSQ3UDO.js";
18
+ } from "./chunk-MEFMTICH.js";
19
19
  import "./chunk-V5Y7D4LH.js";
20
20
  import "./chunk-N74KDCBD.js";
21
21
  import "./chunk-EETVJZAZ.js";
@@ -231,4 +231,4 @@ ${lines}
231
231
  export {
232
232
  runLockCommand
233
233
  };
234
- //# sourceMappingURL=lock-commands-WCRC56ME.js.map
234
+ //# sourceMappingURL=lock-commands-4TX3BONI.js.map
package/dist/node.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { aZ as LambdaOptions, a_ as CaptureValue, a$ as LambdaSurface, b0 as CaptureRecord, b1 as LambdaBindings, F as FunctionDef, b2 as Xano, i as LockFile } from './store-DAnUIi1T.js';
2
- export { b3 as AddonDef, b4 as AddonXdo, A as AdoptChange, a as AdoptResult, b5 as AgentDef, b6 as AgentHandle, b7 as AgentOutput, b8 as AgentSettingsXdo, b9 as AgentXdo, ba as AmbientBindings, bb as AnthropicLlm, bc as ApiGroupDef, bd as ApiGroupXdo, be as AuthRef, bf as Authored, B as Bundle, b as BundlePayload, c as BundleType, bg as Capturable, bh as ChannelConversationDef, bi as ChannelDeliveryDef, bj as ChannelDeliveryGuarantee, bk as ChannelPublishDef, bl as ChannelPublishWho, bm as ChannelRateLimitDef, bn as ColumnDef, bo as Comparison, bp as ContainerEnv, bq as ContainerPort, br as ContainerResources, bs as ContainerVolume, bt as CorsConfig, bu as CorsMode, bv as DatabaseActions, bw as DatabaseInputs, bx as DbEval, by as DbEvalFilter, bz as DbWhere, bA as ErrorInputs, bB as ExceptionPolicy, bC as FieldAccessor, bD as FieldRule, bE as GoogleGenAiLlm, bF as HistoryInput, bG as HttpVerb, bH as IndexDef, bI as IndexLang, bJ as IndexOp, bK as IndexType, bL as IndexXdo, bM as InferRow, bN as InputDescriptor, bO as InputOptions, bP as IteratingBindings, bQ as KnowledgeDef, bR as KnowledgeDirSource, bS as KnowledgeFileSource, bT as KnowledgeMode, bU as KnowledgeType, bV as LAMBDA_BINDINGS, bW as LAMBDA_CODE_FILTERS, bX as LAMBDA_GLOBALS, bY as LAMBDA_MODULE_GLOBALS, bZ as LAMBDA_STATEMENTS, b_ as LambdaBody, b$ as LlmPrompt, c0 as LlmProvider, c1 as LlmSettings, g as LockEntry, h as LockExportContext, M as Manifest, j as ManifestField, k as ManifestKind, l as ManifestStatement, c2 as ManifestValue, c3 as McpPathOptions, c4 as McpServerDef, c5 as McpServerHandle, c6 as McpServerXdo, m as MergeResult, c7 as MessageDeliverTo, c8 as MicroserviceChart, c9 as MicroserviceConfig, ca as MicroserviceContainer, cb as MicroserviceDef, cc as MicroserviceDeployment, cd as MicroserviceIngress, ce as MicroserviceRegistryAuth, cf as MicroserviceVolume, cg as MicroserviceXdo, ch as MiddlewareAttach, ci as MiddlewareAttachEntry, cj as MiddlewareDef, ck as MiddlewareXdo, O as ObjectKind, cl as OpenAiLlm, n as PayloadArrayKey, cm as QueryDef, cn as QueryFilterName, co as QueryHandle, cp as QueryResponseType, cq as QueryXdo, cr as RealtimeActions, cs as RealtimeChannelActions, ct as RealtimeChannelDef, cu as RealtimeChannelHandle, cv as RealtimeChannelRef, cw as RealtimeChannelTriggerInputs, cx as RealtimeChannelXdo, cy as RealtimeClient, cz as RealtimeInputs, cA as RealtimeMessageDef, cB as RealtimeMessageXdo, cC as RealtimeServerActions, cD as RealtimeServerDef, cE as RealtimeServerHandle, cF as RealtimeServerRef, cG as RealtimeServerTriggerInputs, cH as RealtimeServerXdo, cI as RealtimeUrlOptions, R as RenameResult, cJ as ResultStrategy, cK as Route, cL as RowOf, cM as ScheduleDef, cN as SchemaCols, cO as SchemaDef, cP as SearchComparison, cQ as SearchGroup, cR as SearchNode, cS as SearchOp, cT as SearchParamValue, cU as SeedFileSource, cV as SeedRow, cW as SeedSource, cX as SortDir, cY as SortDirective, S as StatementSpec, cZ as TableDef, c_ as TableXdo, c$ as TaskDef, d0 as TaskXdo, d1 as ToolDef, d2 as ToolXdo, d3 as ToolsetBaseDef, d4 as ToolsetBaseXdo, d5 as ToolsetInputs, d6 as ToolsetToolEntry, d7 as ToolsetToolRef, d8 as TriggerDef, d9 as TriggerObjType, da as TriggerXdo, db as ViewDef, dc as ViewXdo, dd as WorkflowTestDef, de as WorkflowTestXdo, df as WorkspaceActions, dg as WorkspaceConfigDef, dh as WorkspaceConfigXdo, di as WorkspaceHistoryDef, dj as WorkspaceHistoryXdo, dk as WorkspaceInputs, dl as WorkspaceMiddlewareDef, dm as WorkspaceMiddlewareXdo, dn as XanoFreeLlm, dp as addon, dq as agent, dr as agentTrigger, ds as and, dt as apiGroup, du as assertLambdaBody, dv as bitwiseAnd, dw as bitwiseOr, dx as bitwiseXor, dy as cmp, dz as defineFunction, dA as emit, dB as emitBundle, dC as errorTrigger, dD as expr, dE as fl, dF as input, dG as knowledge, dH as knowledgeDir, dI as knowledgeFile, dJ as mathAdd, dK as mathDiv, dL as mathMul, dM as mathSub, dN as mcpServer, dO as mcpServerTrigger, dP as microservice, dQ as middleware, dR as mixed, dS as objectEntries, dT as objectKeys, dU as objectValues, dV as or, dW as query, dX as realtimeChannel, dY as realtimeChannelTrigger, dZ as realtimeMessage, d_ as realtimeServer, d$ as realtimeServerTrigger, e0 as realtimeTrigger, e1 as resetLockOverrides, e2 as seedFile, e3 as seedLockOverrides, e4 as table, e5 as tableTrigger, e6 as task, e7 as textAppend, e8 as textPrepend, e9 as toSearchParams, ea as tool, eb as workflowTest, ec as workspace, ed as workspaceConfig, ee as workspaceTrigger } from './store-DAnUIi1T.js';
1
+ import { aZ as LambdaOptions, a_ as CaptureValue, a$ as LambdaSurface, b0 as CaptureRecord, b1 as LambdaBindings, F as FunctionDef, b2 as Xano, i as LockFile } from './store-9Psd0jiF.js';
2
+ export { b3 as AddonDef, b4 as AddonXdo, A as AdoptChange, a as AdoptResult, b5 as AgentDef, b6 as AgentHandle, b7 as AgentOutput, b8 as AgentSettingsXdo, b9 as AgentXdo, ba as AmbientBindings, bb as AnthropicLlm, bc as ApiGroupDef, bd as ApiGroupXdo, be as AuthRef, bf as Authored, B as Bundle, b as BundlePayload, c as BundleType, bg as Capturable, bh as ChannelConversationDef, bi as ChannelDeliveryDef, bj as ChannelDeliveryGuarantee, bk as ChannelPublishDef, bl as ChannelPublishWho, bm as ChannelRateLimitDef, bn as ColumnDef, bo as Comparison, bp as ContainerEnv, bq as ContainerPort, br as ContainerResources, bs as ContainerVolume, bt as CorsConfig, bu as CorsMode, bv as DatabaseActions, bw as DatabaseInputs, bx as DbEval, by as DbEvalFilter, bz as DbWhere, bA as ErrorInputs, bB as ExceptionPolicy, bC as FieldAccessor, bD as FieldRule, bE as GoogleGenAiLlm, bF as HistoryInput, bG as HttpVerb, bH as IndexDef, bI as IndexLang, bJ as IndexOp, bK as IndexType, bL as IndexXdo, bM as InferRow, bN as InputDescriptor, bO as InputOptions, bP as IteratingBindings, bQ as KnowledgeDef, bR as KnowledgeDirSource, bS as KnowledgeFileSource, bT as KnowledgeMode, bU as KnowledgeType, bV as LAMBDA_BINDINGS, bW as LAMBDA_CODE_FILTERS, bX as LAMBDA_GLOBALS, bY as LAMBDA_MODULE_GLOBALS, bZ as LAMBDA_STATEMENTS, b_ as LambdaBody, b$ as LlmPrompt, c0 as LlmProvider, c1 as LlmSettings, g as LockEntry, h as LockExportContext, M as Manifest, j as ManifestField, k as ManifestKind, l as ManifestStatement, c2 as ManifestValue, c3 as McpPathOptions, c4 as McpServerDef, c5 as McpServerHandle, c6 as McpServerXdo, m as MergeResult, c7 as MessageDeliverTo, c8 as MicroserviceChart, c9 as MicroserviceConfig, ca as MicroserviceContainer, cb as MicroserviceDef, cc as MicroserviceDeployment, cd as MicroserviceIngress, ce as MicroserviceRegistryAuth, cf as MicroserviceVolume, cg as MicroserviceXdo, ch as MiddlewareAttach, ci as MiddlewareAttachEntry, cj as MiddlewareDef, ck as MiddlewareXdo, O as ObjectKind, cl as OpenAiLlm, n as PayloadArrayKey, cm as QueryDef, cn as QueryFilterName, co as QueryHandle, cp as QueryResponseType, cq as QueryXdo, cr as RealtimeActions, cs as RealtimeChannelActions, ct as RealtimeChannelDef, cu as RealtimeChannelHandle, cv as RealtimeChannelRef, cw as RealtimeChannelTriggerInputs, cx as RealtimeChannelXdo, cy as RealtimeClient, cz as RealtimeInputs, cA as RealtimeMessageDef, cB as RealtimeMessageXdo, cC as RealtimeServerActions, cD as RealtimeServerDef, cE as RealtimeServerHandle, cF as RealtimeServerRef, cG as RealtimeServerTriggerInputs, cH as RealtimeServerXdo, cI as RealtimeUrlOptions, R as RenameResult, cJ as ResultStrategy, cK as Route, cL as RowOf, cM as ScheduleDef, cN as SchemaCols, cO as SchemaDef, cP as SearchComparison, cQ as SearchGroup, cR as SearchNode, cS as SearchOp, cT as SearchParamValue, cU as SeedFileSource, cV as SeedRow, cW as SeedSource, cX as SortDir, cY as SortDirective, S as StatementSpec, cZ as TableDef, c_ as TableXdo, c$ as TaskDef, d0 as TaskXdo, d1 as ToolDef, d2 as ToolXdo, d3 as ToolsetBaseDef, d4 as ToolsetBaseXdo, d5 as ToolsetInputs, d6 as ToolsetToolEntry, d7 as ToolsetToolRef, d8 as TriggerDef, d9 as TriggerObjType, da as TriggerXdo, db as ViewDef, dc as ViewXdo, dd as WorkflowTestDef, de as WorkflowTestXdo, df as WorkspaceActions, dg as WorkspaceConfigDef, dh as WorkspaceConfigXdo, di as WorkspaceHistoryDef, dj as WorkspaceHistoryXdo, dk as WorkspaceInputs, dl as WorkspaceMiddlewareDef, dm as WorkspaceMiddlewareXdo, dn as XanoFreeLlm, dp as addon, dq as agent, dr as agentTrigger, ds as and, dt as apiGroup, du as assertLambdaBody, dv as bitwiseAnd, dw as bitwiseOr, dx as bitwiseXor, dy as cmp, dz as defineFunction, dA as emit, dB as emitBundle, dC as errorTrigger, dD as expr, dE as fl, dF as input, dG as knowledge, dH as knowledgeDir, dI as knowledgeFile, dJ as mathAdd, dK as mathDiv, dL as mathMul, dM as mathSub, dN as mcpServer, dO as mcpServerTrigger, dP as microservice, dQ as middleware, dR as mixed, dS as objectEntries, dT as objectKeys, dU as objectValues, dV as or, dW as query, dX as realtimeChannel, dY as realtimeChannelTrigger, dZ as realtimeMessage, d_ as realtimeServer, d$ as realtimeServerTrigger, e0 as realtimeTrigger, e1 as resetLockOverrides, e2 as seedFile, e3 as seedLockOverrides, e4 as table, e5 as tableTrigger, e6 as task, e7 as textAppend, e8 as textPrepend, e9 as toSearchParams, ea as tool, eb as workflowTest, ec as workspace, ed as workspaceConfig, ee as workspaceTrigger } from './store-9Psd0jiF.js';
3
3
  export { ActionCallArgs, AddonCallArgs, AddonSpec, AgentRunResult, AiAgentRunArgs, AnyAddonDef, AnyFunctionDef, AnyQueryDef, AnyTableDef, ApiCallArgs, ApplyFilter, ApplyFilters, ArrayMapArgs, CloudJobArgs, CloudJobAwaitArgs, CloudJobStatusArgs, CreateAuthTokenArgs, DbAddArgs, DbAddOrEditArgs, DbAggregate, DbAggregatePaging, DbBind, DbBulkAddArgs, DbBulkDeleteArgs, DbBulkWriteArgs, DbDelArgs, DbDirectQueryArgs, DbDistinct, DbEditArgs, DbExternal, DbExternalPermissions, DbExternalQueryArgs, DbField, DbGetArgs, DbHasArgs, DbJoin, DbPaging, DbPatchArgs, DbQueryArgs, DbResponseType, DbReturnType, DbSchemaArgs, DbTransactionArgs, DbTruncateArgs, ExpectToThrowArgs, ExternalSqlEngine, ForArgs, ForeachArgs, FunctionCallArgs, FunctionRunArgs, GetRawInputArgs, HeaderMap, HttpMethod, InferInput, InferResponse, IpLookupArgs, IpLookupResult, MiddlewareCallArgs, RealtimeEventArgs, StackTupleWidened, SwitchArgs, SwitchCaseArgs, TaskCallArgs, ToolCallArgs, TriggerCallArgs, TryCatchArgs, WhileArgs, WorkflowTestCallArgs, actionCall, actionPackageCall, addonCall, aiAgentRun, apiCall, arrayMap, arrayUnion, cloudJob, cloudJobAwait, cloudJobStatus, comment, compile, conditional, createAuthToken, dbAdd, dbAddOrEdit, dbBulkAdd, dbBulkDelete, dbBulkPatch, dbBulkUpdate, dbDel, dbDirectQuery, dbEdit, dbExternalQuery, dbGet, dbHas, dbPatch, dbQuery, dbSchema, dbTransaction, dbTruncate, debugLog, die, expectToThrow, fileUrl, forLoop, foreachBreak, foreachContinue, foreachLoop, foreachRemove, functionCall, functionRun, getRawInput, group, ignored, ipLookup, middlewareCall, postProcess, realtimeEvent, returnValue, s, setVar, switchCase, switchStatement, taskCall, toolCall, triggerCall, tryCatch, updateVar, whileLoop, workflowTestCall } from './index.js';
4
4
  export { B as BrandOpts, b as BrandValue, D as DecimalMethod, E as EmailMethod, c as FieldAccess, f as FieldDescriptor, h as FieldMap, j as FieldOpts, k as FieldStyleType, l as FromFieldMap, I as IntMethod, M as MethodArg, m as MethodOpts, n as MethodSpec, o as MockEntry, p as MockMap, q as MockXdo, O as ObjInput, s as ObjMember, u as ObjValue, v as ObjectRef, P as PasswordMethod, w as ResponseDef, x as RowFromFieldMap, S as Statement, y as StatementAnnotations, z as StatementOptions, T as TableRefMethod, A as TextFormat, C as TextMethod, G as TypeBrand, V as ValueOf, H as VectorMethod, X as XanoFileRef, J as XanoGeoPosition, K as XanoGeoValue, L as annotate, N as f, Q as obj, U as statements } from './response-D6xGLEIn.js';
5
5
  import { V as Value } from './xdo-ODuJklk6.js';
package/dist/node.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  task,
18
18
  tool,
19
19
  workflowTest
20
- } from "./chunk-VRNZ2NVV.js";
20
+ } from "./chunk-PJNWOZMT.js";
21
21
  import {
22
22
  actionCall,
23
23
  actionPackageCall,
@@ -100,7 +100,7 @@ import {
100
100
  workflowTestCall,
101
101
  workspaceConfig,
102
102
  workspaceTrigger
103
- } from "./chunk-GSP2BY4F.js";
103
+ } from "./chunk-BYQHCCYU.js";
104
104
  import {
105
105
  exportBundleJson,
106
106
  loadDefault,
@@ -108,7 +108,7 @@ import {
108
108
  run,
109
109
  writeArtifact,
110
110
  writeBundle
111
- } from "./chunk-XT3XQ4PF.js";
111
+ } from "./chunk-LISUHLWI.js";
112
112
  import "./chunk-7WRJPKGK.js";
113
113
  import {
114
114
  readLockFile,
@@ -120,7 +120,7 @@ import "./chunk-EZG76F7R.js";
120
120
  import {
121
121
  Xano,
122
122
  workspace
123
- } from "./chunk-QYSQ3UDO.js";
123
+ } from "./chunk-MEFMTICH.js";
124
124
  import "./chunk-V5Y7D4LH.js";
125
125
  import {
126
126
  LAMBDA_BINDINGS,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  assertBundleInput,
3
3
  loadBundleText
4
- } from "./chunk-ELK7UALJ.js";
5
- import "./chunk-XT3XQ4PF.js";
4
+ } from "./chunk-UXPDQFG2.js";
5
+ import "./chunk-LISUHLWI.js";
6
6
  import "./chunk-7WRJPKGK.js";
7
7
  import "./chunk-3LQGF2WS.js";
8
8
  import "./chunk-Z2ZIE5CO.js";
@@ -15,7 +15,7 @@ import {
15
15
  success,
16
16
  warn
17
17
  } from "./chunk-EZG76F7R.js";
18
- import "./chunk-QYSQ3UDO.js";
18
+ import "./chunk-MEFMTICH.js";
19
19
  import "./chunk-V5Y7D4LH.js";
20
20
  import "./chunk-N74KDCBD.js";
21
21
  import "./chunk-EETVJZAZ.js";
@@ -121,4 +121,4 @@ function fmt(v) {
121
121
  export {
122
122
  runPreflightCommand
123
123
  };
124
- //# sourceMappingURL=preflight-command-TZWPHBXY.js.map
124
+ //# sourceMappingURL=preflight-command-MTYGPNVT.js.map
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  assertBundleInput,
8
8
  loadBundleText
9
- } from "./chunk-ELK7UALJ.js";
9
+ } from "./chunk-UXPDQFG2.js";
10
10
  import {
11
11
  sharedSchemaChanges
12
12
  } from "./chunk-AOFFKSJC.js";
@@ -37,7 +37,7 @@ import "./chunk-NDP7OUPS.js";
37
37
  import "./chunk-AE3PDSDS.js";
38
38
  import {
39
39
  resolveLockPath
40
- } from "./chunk-XT3XQ4PF.js";
40
+ } from "./chunk-LISUHLWI.js";
41
41
  import "./chunk-7WRJPKGK.js";
42
42
  import {
43
43
  readLockFile
@@ -57,7 +57,7 @@ import {
57
57
  success,
58
58
  warn
59
59
  } from "./chunk-EZG76F7R.js";
60
- import "./chunk-QYSQ3UDO.js";
60
+ import "./chunk-MEFMTICH.js";
61
61
  import "./chunk-V5Y7D4LH.js";
62
62
  import "./chunk-N74KDCBD.js";
63
63
  import "./chunk-EETVJZAZ.js";
@@ -447,7 +447,7 @@ async function runReleaseCommand(args) {
447
447
  { withSeed: req.records === true }
448
448
  );
449
449
  if (args.static !== void 0) {
450
- const { assertNoSeedLeaks } = await import("./deploy-command-XHS5PKPV.js");
450
+ const { assertNoSeedLeaks } = await import("./deploy-command-VBB7JYXH.js");
451
451
  await assertNoSeedLeaks(args.static, nonPublicSeedValues, args.allowSeedInStatic);
452
452
  }
453
453
  const workspaceId = auth.workspaceId;
@@ -589,7 +589,7 @@ Retry, or drop \`--backup-branch\` to release without one.`,
589
589
  ...backupLabel !== void 0 ? { backupBranch: backupLabel } : {}
590
590
  };
591
591
  if (args.static !== void 0) {
592
- const { buildStaticEnv, deployStaticTo } = await import("./deploy-command-XHS5PKPV.js");
592
+ const { buildStaticEnv, deployStaticTo } = await import("./deploy-command-VBB7JYXH.js");
593
593
  const env = buildStaticEnv(auth.instance, args.staticEnv);
594
594
  const explicit = Object.keys(args.staticEnv).length > 0;
595
595
  summary.static = await deployStaticTo(
@@ -608,4 +608,4 @@ Retry, or drop \`--backup-branch\` to release without one.`,
608
608
  export {
609
609
  runReleaseCommand
610
610
  };
611
- //# sourceMappingURL=release-command-WEFYRTCI.js.map
611
+ //# sourceMappingURL=release-command-NXCPQDFF.js.map
@@ -5,6 +5,9 @@ import {
5
5
  // src/emit/routes-manifest.ts
6
6
  var RouteManifestError = class extends Error {
7
7
  };
8
+ function routeKey(route) {
9
+ return `${route.verb} ${route.name}`;
10
+ }
8
11
  function literal(value) {
9
12
  return JSON.stringify(value);
10
13
  }
@@ -70,31 +73,33 @@ ${REALTIME_IMPLEMENTATION}`;
70
73
  }
71
74
  function renderRouteManifest(routes, realtime) {
72
75
  const sorted = [...routes].sort(
73
- (a, b) => a.canonical.localeCompare(b.canonical) || a.name.localeCompare(b.name)
76
+ (a, b) => a.canonical.localeCompare(b.canonical) || a.name.localeCompare(b.name) || a.verb.localeCompare(b.verb)
74
77
  );
75
- const seen = /* @__PURE__ */ new Set();
78
+ const seen = /* @__PURE__ */ new Map();
76
79
  const rows = sorted.map((route) => {
77
- if (seen.has(route.name)) {
80
+ const key = routeKey(route);
81
+ const clash = seen.get(key);
82
+ if (clash !== void 0) {
78
83
  throw new RouteManifestError(
79
- `Two endpoints are both named "${route.name}". The route manifest keys on the endpoint name, so the names must be unique across api groups. Rename one.`
84
+ `Two endpoints are both "${key}" \u2014 one in the api group whose canonical is "${clash}", one in "${route.canonical}". The route manifest keys on "<VERB> <name>", so a verb+name pair must be unique across api groups. Rename one, or give it a different verb.`
80
85
  );
81
86
  }
82
- seen.add(route.name);
83
- const params = parsePathParams(`route "${route.name}"`, route.name);
87
+ seen.set(key, route.canonical);
88
+ const params = parsePathParams(`route "${key}"`, route.name);
84
89
  const path = `/api:${route.canonical}/${route.name.replace(/^\/+/, "")}`;
85
- return { ...route, params, path };
90
+ return { ...route, key, params, path };
86
91
  });
87
92
  const entries = rows.map(
88
- (r) => ` ${literal(r.name)}: { verb: ${literal(r.verb)}, path: ${literal(r.path)} },`
93
+ (r) => ` ${literal(r.key)}: { verb: ${literal(r.verb)}, path: ${literal(r.path)} },`
89
94
  );
90
95
  const realtimeSection = realtime && (realtime.servers.length > 0 || realtime.channels.length > 0) ? renderRealtime(realtime) : "";
91
96
  return `${HEADER}${FILL_PARAMS}
92
97
  export const ROUTES = ${objectLiteral(entries)} as const;
93
98
 
94
- /** Every endpoint name in this workspace. */
99
+ /** Every endpoint in this workspace, keyed \`"<VERB> <name>"\` (e.g. \`"GET listings"\`). */
95
100
  export type RouteName = keyof typeof ROUTES;
96
101
 
97
- ${overloadsFor("routePath", rows)}
102
+ ${overloadsFor("routePath", rows.map((r) => ({ name: r.key, params: r.params })))}
98
103
  ${IMPLEMENTATION}${realtimeSection}`;
99
104
  }
100
105
  var HEADER = `/**
@@ -157,7 +162,12 @@ export function routePath(name: RouteName, params?: Record<string, string | numb
157
162
  // Read through a widened view: a workspace with no endpoints at all makes
158
163
  // \`RouteName\` \`never\`, which cannot index the literal type.
159
164
  const route = (ROUTES as Record<string, { verb: string; path: string } | undefined>)[name];
160
- if (!route) throw new Error(\`routePath: unknown route "\${String(name)}".\`);
165
+ if (!route) {
166
+ throw new Error(
167
+ \`routePath: unknown route "\${String(name)}". Routes are keyed "<VERB> <name>", \` +
168
+ 'e.g. "GET listings" \u2014 regenerate the manifest if the endpoint is new.',
169
+ );
170
+ }
161
171
  return fillParams(\`routePath("\${String(name)}")\`, "route", route.path, params, true);
162
172
  }
163
173
  `;
@@ -239,6 +249,7 @@ export function socketUrl(
239
249
  `;
240
250
  export {
241
251
  RouteManifestError,
242
- renderRouteManifest
252
+ renderRouteManifest,
253
+ routeKey
243
254
  };
244
- //# sourceMappingURL=routes-manifest-5ZFKUQWA.js.map
255
+ //# sourceMappingURL=routes-manifest-MN6XBYRE.js.map
@@ -4763,13 +4763,24 @@ interface RealtimeServerTriggerInputs {
4763
4763
  /** The connecting client — `permissions` gates its realtime row/table access. */
4764
4764
  client: RealtimeClient;
4765
4765
  }
4766
- /** Realtime channel lifecycle trigger inputs (join / leave). */
4766
+ /** Realtime channel lifecycle trigger inputs (join / leave / deliver). */
4767
4767
  interface RealtimeChannelTriggerInputs {
4768
- /** The membership action (`"join"` | `"leave"`). */
4768
+ /** The membership action (`"join"` | `"leave"` | `"deliver"`). */
4769
4769
  action: Value;
4770
4770
  /** The channel path the client addressed. */
4771
4771
  channel: Value;
4772
- /** The joining client — `permissions` gates its realtime row/table access. */
4772
+ /**
4773
+ * The message body on a `deliver` run, null on join/leave. It arrives NESTED,
4774
+ * so read a field as `t.payload("text")`. A flat `inp("text")` names an input
4775
+ * this trigger does not declare and RAISES at runtime, which for `deliver`
4776
+ * means the hook fails open and the recipient gets the original.
4777
+ */
4778
+ payload: FieldAccessor;
4779
+ /**
4780
+ * The client — the JOINING client on join/leave, and the SENDING client on
4781
+ * `deliver` (the recipient that run is for is `s.realtime.get_session`).
4782
+ * `permissions` gates its realtime row/table access.
4783
+ */
4773
4784
  client: RealtimeClient;
4774
4785
  }
4775
4786
  /** Toolset trigger inputs (MCP server / agent). */
@@ -5414,8 +5425,7 @@ interface RealtimeActions {
5414
5425
  * Same return shape as a channel `join`: `{ allowed: c.bool(true) }` or any truthy value
5415
5426
  * admits, and an EMPTY OR FALSY return DENIES — including a gating trigger with
5416
5427
  * no `response`, which returns nothing and so refuses every client. A CRASH also
5417
- * DENIES: the transport seeds a deny decision before running the stack and keeps
5418
- * it when the stack throws, because a gate that cannot answer must not admit.
5428
+ * DENIES: a gate that cannot answer must not admit.
5419
5429
  *
5420
5430
  * So both failure modes lock the door rather than open it, and the risk to plan
5421
5431
  * for is a self-inflicted lockout — an unguarded drill into a `db.get` that
@@ -5444,16 +5454,24 @@ interface RealtimeServerActions {
5444
5454
  * optional `reason` surfaces in the client's error frame) or any other truthy
5445
5455
  * value to admit. AN EMPTY OR FALSY RETURN DENIES — a stack that just falls
5446
5456
  * through, or a gating trigger with no `response`, refuses the join. A CRASH
5447
- * DENIES TOO (the gate is seeded with a deny and keeps it when the stack
5448
- * throws), which is the INVERSE of a normal message: a message whose stack
5449
- * crashes still delivers, so one workspace bug cannot black-hole a channel.
5450
- * Note the asymmetry with `deliver` below, which is a gate that fails OPEN.
5451
- *
5452
- * `join` and `leave` both bind the channel's typed path params as INPUTS, so
5453
- * `inp("room_id")` resolves inside them and the gate can decide per room.
5454
- * (`s.realtime.get_session` carries the same values under `params`; either
5455
- * reads them.) A SERVER `connect`/`disconnect` trigger has no channel and so
5456
- * no params that is the one place a path param cannot be read.
5457
+ * DENIES TOO, which is the INVERSE of a normal message: a message whose
5458
+ * stack crashes still delivers, so one workspace bug cannot black-hole a
5459
+ * channel. Note the asymmetry with `deliver` below, which is a hook that
5460
+ * fails OPEN.
5461
+ *
5462
+ * A lifecycle trigger's inputs are PINNED to `action`/`channel`/`payload`/
5463
+ * `client`, so a channel path param is NOT among them: `inp("room_id")`
5464
+ * RAISES inside a gate, which crashes it and so refuses every client. Take
5465
+ * the param from `s.realtime.get_session` under `params`
5466
+ * (`ref("session.params.room_id")`) and the gate can decide per room. A
5467
+ * SERVER `connect`/`disconnect` trigger has no channel and so no params
5468
+ * at all.
5469
+ *
5470
+ * A gate also establishes NO auth, so `ref("auth.id")` reads 0 even for an
5471
+ * authenticated client — identity is `t.client("permissions.dbo_id")` (0 is
5472
+ * anonymous) or the session. And once the returned object carries an
5473
+ * `allowed` key, admission needs STRICTLY `true`: a computed `1` or `"yes"`
5474
+ * in that shape DENIES, so produce a real bool.
5457
5475
  * - `leave` is OBSERVATIONAL (return ignored, throws swallowed).
5458
5476
  * - `deliver` GATES delivery PER RECIPIENT — it runs once for each client the
5459
5477
  * message is about to reach. It is the heaviest of the three by a wide
@@ -5468,7 +5486,7 @@ interface RealtimeServerActions {
5468
5486
  * null instead.
5469
5487
  *
5470
5488
  * The delivered payload arrives NESTED under `payload`, so read
5471
- * `inp("payload").<field>`. And the two identities differ: `t.client` is the
5489
+ * `t.payload("<field>")`. And the two identities differ: `t.client` is the
5472
5490
  * SENDER, while `s.realtime.get_session` describes the RECIPIENT this run is
5473
5491
  * for — per-viewer redaction needs both, and reaching for the wrong one is
5474
5492
  * silent.
@@ -3,12 +3,12 @@ import {
3
3
  } from "./chunk-ERQZFWIW.js";
4
4
  import {
5
5
  refreshAgentFiles
6
- } from "./chunk-2VTJSI6X.js";
6
+ } from "./chunk-F3MRG7NI.js";
7
7
  import {
8
8
  isMachineOutput,
9
9
  writeJson
10
10
  } from "./chunk-NUQCEOKA.js";
11
- import "./chunk-VK26K7AY.js";
11
+ import "./chunk-XBIFQWZM.js";
12
12
  import {
13
13
  runNpm
14
14
  } from "./chunk-ZSYZTGJH.js";
@@ -21,8 +21,8 @@ import {
21
21
  registryUrl,
22
22
  suppressUpdateNotice,
23
23
  upgradeCommand
24
- } from "./chunk-AG5GCZDD.js";
25
- import "./chunk-XT3XQ4PF.js";
24
+ } from "./chunk-CII2TOE4.js";
25
+ import "./chunk-LISUHLWI.js";
26
26
  import "./chunk-7WRJPKGK.js";
27
27
  import "./chunk-3LQGF2WS.js";
28
28
  import "./chunk-Z2ZIE5CO.js";
@@ -35,7 +35,7 @@ import {
35
35
  success,
36
36
  warn
37
37
  } from "./chunk-EZG76F7R.js";
38
- import "./chunk-QYSQ3UDO.js";
38
+ import "./chunk-MEFMTICH.js";
39
39
  import "./chunk-V5Y7D4LH.js";
40
40
  import "./chunk-N74KDCBD.js";
41
41
  import "./chunk-EETVJZAZ.js";
@@ -175,4 +175,4 @@ function messageOf(err) {
175
175
  export {
176
176
  runUpgradeCommand
177
177
  };
178
- //# sourceMappingURL=upgrade-command-GYEIMJBG.js.map
178
+ //# sourceMappingURL=upgrade-command-GSH3M3N6.js.map
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-NUQCEOKA.js";
12
12
  import {
13
13
  fetchWorkspaceBundle
14
- } from "./chunk-PLE5QQOZ.js";
14
+ } from "./chunk-UQMMFW32.js";
15
15
  import "./chunk-RQ3FXV4K.js";
16
16
  import "./chunk-K5IOND4K.js";
17
17
  import {
@@ -26,18 +26,18 @@ import {
26
26
  fetchOrExplain,
27
27
  httpFailure
28
28
  } from "./chunk-NDP7OUPS.js";
29
- import "./chunk-VPAWRBK5.js";
30
- import "./chunk-VK26K7AY.js";
29
+ import "./chunk-ORZINVGQ.js";
30
+ import "./chunk-XBIFQWZM.js";
31
31
  import "./chunk-ZSYZTGJH.js";
32
32
  import "./chunk-YX22LKQE.js";
33
33
  import "./chunk-6VNRMKFJ.js";
34
34
  import "./chunk-RQNMTDXD.js";
35
35
  import "./chunk-PR7OXHGZ.js";
36
- import "./chunk-GSP2BY4F.js";
36
+ import "./chunk-BYQHCCYU.js";
37
37
  import "./chunk-EHP3WPEG.js";
38
38
  import "./chunk-AE3PDSDS.js";
39
39
  import "./chunk-DCMANKMX.js";
40
- import "./chunk-XT3XQ4PF.js";
40
+ import "./chunk-LISUHLWI.js";
41
41
  import "./chunk-7WRJPKGK.js";
42
42
  import "./chunk-3LQGF2WS.js";
43
43
  import {
@@ -51,7 +51,7 @@ import {
51
51
  step,
52
52
  success
53
53
  } from "./chunk-EZG76F7R.js";
54
- import "./chunk-QYSQ3UDO.js";
54
+ import "./chunk-MEFMTICH.js";
55
55
  import "./chunk-V5Y7D4LH.js";
56
56
  import "./chunk-N74KDCBD.js";
57
57
  import "./chunk-EETVJZAZ.js";
@@ -160,4 +160,4 @@ async function runExport(args) {
160
160
  export {
161
161
  runWorkspaceCommand
162
162
  };
163
- //# sourceMappingURL=workspace-command-2ZTGT26W.js.map
163
+ //# sourceMappingURL=workspace-command-XUOPLVQ4.js.map
package/guides/README.md CHANGED
@@ -23,7 +23,7 @@ These guides are for humans. Agents read a different set, generated from the SDK
23
23
  sources so it cannot drift from what the code does:
24
24
 
25
25
  - **`llms.txt`** — a small always-read router: the mental model, the deploy contract, and
26
- every gotcha, ending in a map of the topic files.
26
+ every cross-cutting gotcha, ending in a map of the topic files.
27
27
  - **`llms/*.md`** — one file per surface, opened only when that surface is in play.
28
28
  - **`manifest.json`** — the exhaustive per-entry catalog, reached by targeted lookup.
29
29
 
@@ -53,8 +53,9 @@ can learn the SDK without reading source:
53
53
  --help` and the `cli` array in `manifest.json` do, from the same registry that generates
54
54
  the shell completions. The written version is the [CLI guide](cli.md).
55
55
  - **`llms/*.md`** — one file per surface (object def shapes, statements, values, fields,
56
- filters, lambda bodies, and the legacy names a pulled workspace carries), read only when
57
- that surface is in play. **`llms-full.txt`** is all
56
+ filters, lambda bodies, what a client pays to import a def, an index of exact error
57
+ strings, and the legacy names a pulled workspace carries), read only when that surface
58
+ is in play. **`llms-full.txt`** is all
58
59
  of them concatenated, for a reader that wants one file rather than two.
59
60
  - **`manifest.json`** — the exhaustive reference tier, reached by targeted lookup (grep or
60
61
  `jq` one entry; never read it whole). Every object kind (factory, `Xano.register*` method,
@@ -172,15 +172,32 @@ xanots routes ./xano/index.ts --emit xano/routes.gen.ts
172
172
  ```
173
173
 
174
174
  The emitted file is plain data plus one interpolator and imports nothing at all — the same
175
- app builds to 1.3 kB, a ~200x saving, with no SDK code in the output. Route names and their `{param}` keys are still checked at compile
176
- time, so a backend rename is a compile error rather than a 404:
175
+ app builds to 1.3 kB, a ~200x saving, with no SDK code in the output. Route keys and their
176
+ `{param}` names are still checked at compile time, so a backend rename is a compile error
177
+ rather than a 404:
177
178
 
178
179
  ```ts
179
180
  import { routePath, ROUTES } from "../xano/routes.gen";
180
181
 
181
- fetch(BASE + routePath("blog/{slug}", { slug }), { method: ROUTES["blog/{slug}"].verb });
182
+ fetch(BASE + routePath("GET blog/{slug}", { slug }), {
183
+ method: ROUTES["GET blog/{slug}"].verb,
184
+ });
185
+ ```
186
+
187
+ A route key is `"<VERB> <name>"`, which is the endpoint identity the engine itself uses —
188
+ so verb-differentiated siblings are ordinary, and a REST-shaped group emits without
189
+ renaming anything:
190
+
191
+ ```ts
192
+ routePath("GET listings"); // list
193
+ routePath("POST listings"); // create
194
+ routePath("PATCH listings/{id}", { id }); // update
182
195
  ```
183
196
 
197
+ The verb comes first so the key is stable: adding a `POST` sibling never renames the `GET`
198
+ that was already there. Two api groups holding the same verb AND name is the one shape a
199
+ single manifest cannot express, and the emit fails naming both rather than picking one.
200
+
184
201
  Realtime is in the same file when the workspace has any: `socketUrl(server, baseUrl)` for the
185
202
  websocket URL and `channelPath(channel, params)` for the path a frame's `channel` field takes,
186
203
  both keyed and `{param}`-checked exactly like the routes. `socketUrl` is the equivalent of
package/llms/client.md ADDED
@@ -0,0 +1,44 @@
1
+ # Consuming defs from a client
2
+
3
+ > Read when a frontend imports a def (`getPath()`/`InferResponse`) or calls the deployed backend — what the import costs, `window.XANO_HOST`, local dev, file URLs, and a Node spot-check.
4
+
5
+ Importing a def into a browser bundle or a Node script — for `getPath()`, `getUrl()`, `verb`, or `InferResponse` — runs its factory calls; these are the costs and the checks.
6
+
7
+ - **Client bundle size / tree-shaking.** `@xanots/sdk` is `sideEffects: false` and pulls
8
+ no Node built-ins, so a bundler drops unused SDK exports. But importing a **def** for its
9
+ `getPath()`/`verb`/`getUrl()`/`getChannel()` also pulls whatever its `stack` references:
10
+ the `s.*`/`c.*` factory CALLS run at module load to BUILD it. Types are free.
11
+ ⚠ A FLOOR — **~267 kB minified (~65 kB gzipped)** for the FIRST def; splitting modules
12
+ never removes it. The floor is the RUNTIME, not the def: a second or much richer def
13
+ adds ~2 kB, so trimming a def does not shrink it.
14
+ Fix: `xanots routes <entry> --emit xano/routes.gen.ts` (`paths` is an accepted alias) — verbs, paths, and sockets as
15
+ plain data importing NOTHING, still compile-checked: `routePath("GET blog/{slug}", { slug })`
16
+ `channelPath("rooms/{room_id}", { room_id })`, `socketUrl("chat", baseUrl)` (tenant base
17
+ URLs lifted to `wss://h/ws/<tenant>:<canonical>`). A rename is a type error, not a 404.
18
+ - **Verifying a def outside a bundler.** Inside a bundler (Vite/webpack) importing a
19
+ query def to read `getPath()`/`verb` works directly. To spot-check from Node, run a REAL
20
+ file with `tsx <file.ts>` **from inside the project root** — not `tsx -e "import …"`
21
+ (its CJS-preparse mis-resolves the package `exports` map → ERR_PACKAGE_PATH_NOT_EXPORTED),
22
+ and not bare `node file.ts` (chokes on the `.js`-specifier intra-workspace imports the
23
+ xanots CLI's own loader resolves). Running from outside the project root also breaks
24
+ the `@xanots/sdk` specifier resolution.
25
+
26
+ **Reading the injected backend URL.** `xanots deploy <entry> --static <dir>` writes the deployed env's URL
27
+ into every html document: a prerendered build serves a different one per
28
+ route, and a route without the global renders fine while every call goes to the wrong
29
+ origin. Read it at runtime with a build-time fallback:
30
+ const HOST = (typeof window !== 'undefined' && window.XANO_HOST) || import.meta.env.VITE_XANO_HOST;
31
+ In LOCAL DEV there is no injected global, so the fallback is what answers: set
32
+ `VITE_XANO_HOST` in a `.env.local` beside `.env.example` at the PROJECT ROOT. The
33
+ scaffold's vite config sets `envDir` there (its `root` is `frontend/`, and Vite
34
+ resolves `.env` files against `root`) — without it the var reads as undefined, the
35
+ host falls back to '', and every call 404s off the dev server.
36
+ ⚠ It is INJECTED in bracket form — `window["XANO_HOST"]="…"` — so verifying a deploy
37
+ by grepping `window.XANO_HOST` matches nothing and reads as a failed inject. Grep the
38
+ bare `XANO_HOST` token.
39
+ **Displaying a stored file.** A file column comes back as `{ path, name, type, size,
40
+ meta, access, url }`. ⚠ Do NOT use its `url`: on a tenant-scoped environment that field
41
+ addresses the instance host WITHOUT the `/tenant/<name>` segment and 404s, silently —
42
+ as a broken `<img>`, with every API assertion still passing. Build the URL from `path`
43
+ instead: `fileUrl(row.avatar, HOST)` returns `null` for
44
+ an absent file and is correct on an ephemeral and an instance workspace alike.
package/llms/errors.md ADDED
@@ -0,0 +1,33 @@
1
+ # Error index
2
+
3
+ > Read when a request, test, build, or pull fails with a message you did not write — the string, its cause, and where the fix is.
4
+
5
+ ### Request-time (deployed) failures
6
+
7
+ - `Unable to locate input: <name>` — `inp()` names an undeclared input, or an attached middleware reads its own `input` (never bound). Declare it; a stack value is `ref("var.field")`; middleware reads the body with `s.util.get_all_input`. `llms.txt`; `llms/kinds-core.md`.
8
+ - `Unable to locate var: <a.b>` (HTTP 500) — a dotted `ref` into a null base (a `db.get` miss), or a column absent from the row (`f.password` is `internal`). Guard existence first, or use the null-safe `safe` option; name the column in `output`. `llms.txt`.
9
+ - `Missing var entry: <name>` inside `s.expect.to_throw` — the body runs in an isolated var stack; bind what it needs inside the body. `llms/tests.md`.
10
+ - `Missing param: field_value` (HTTP 400) — a `db.*` match argument resolved to `null` (a safe ref, a nullable foreign key). Guard existence before the lookup; an optional FK stores `0` and is read with field-match `db.get`. `llms.txt`; `llms/fields.md`.
11
+ - `Value is less than the minimum value of 1` (HTTP 400) — `db.get_by_id` given `0`; use field-match `db.get`. `llms/statements-data.md`.
12
+ - `Invalid op: <op>` — a `cmp` operator (`in`, `like`, …) in a RUNTIME condition, which takes the `expr` set only; write `or(expr(...), expr(...))`. `llms/kinds-core.md`.
13
+ - `Unsupported param format` / `Unsupported parameter reference` — an aggregate or `eval` `name` that is not a bare column, or a bare `eval` name for a joined column. `llms/statements-data.md`.
14
+ - `ParseError: Invalid value for param` (HTTP 400) — `contains`/`@>`/`overlaps` on a text column (use `includes`), or a joined column qualified without `tableAlias`. `llms/statements-data.md`.
15
+ - `ERROR_FATAL: <Type> does not exist: <type>:<n>` — `s.api.call`/`s.task.call`/`s.trigger.call`/`s.workflow_test.call` outside a workflow test; share logic via `defineFunction` + `s.function.run`. `llms.txt`.
16
+ - `ERROR_FATAL "Unable to decode."` — a populated JSON string where the engine expects `c.obj`'s form; write `c.obj({...})` or `obj({...})`. `llms/values.md`.
17
+ - `Precondition failed.` in place of your message — `error` was a bare string; pass `c.text("…")`. `llms/fields.md`.
18
+ - `Param: token - Text filter requires an integer, float, string or boolean value` — `s.api.call` `auth.token` given a tagged `Value`; it must be a bare string. `llms/statements-calls.md`.
19
+ - Every `s.db.add` into one table 400s naming a column while complaining about its VALUE — the column is named `run`. `llms.txt`.
20
+ - HTTP 200 with an EMPTY body where `0` was expected — a bare `returnType: "count"` of zero; wrap it as `{ count: ref("n") }`. `llms/statements-data.md`.
21
+ - A lambda returns error TEXT with HTTP 200 (`Could not resolve "node:crypto"`, an undefined-binding message) — the body threw; use the preloaded globals, the surface's bindings, and `capture`. `llms/lambda.md`.
22
+ - `Unable to locate request.` (404) on an endpoint that deployed — a lowercase verb, a `.` in the name, or a CORS `mode` typo that dropped the whole API group. `llms/kinds-core.md`.
23
+ - A browser call fails on a missing `access-control-allow-origin` while deploy looks fine — CORS `mode: "custom"` with `"*"` or an unmatched origin. `llms/kinds-core.md`.
24
+ - A websocket is closed right after the handshake — a refused `connect` gate: an empty/falsy return, a crash, or a gating trigger with no `response`. `llms/triggers.md`.
25
+ - `to_throw failed - response is ok` around an auth-refused call — `ERROR_CODE_ACCESS_DENIED` carries no message; the auth gate is not reachable from a workflow test. `llms/tests.md`.
26
+ - Output reads `Hi [object Object]` — a tagged value inside a JS template literal; compose at runtime with `withFilters` + `fl.concat`. `llms.txt`.
27
+
28
+ ### Build-time and tooling failures
29
+
30
+ - `must be ES modules` — package.json says `"type": "commonjs"`; set `"type": "module"`. `llms.txt` Quickstart.
31
+ - A response types as `StackTupleWidened` — a `Statement[]` helper was spread into the stack; return `statements(...)`. `llms.txt`; `llms/statements-runtime.md`.
32
+ - `ERR_PACKAGE_PATH_NOT_EXPORTED` — `tsx -e "import …"`, or running from outside the project root; run a real file with `tsx <file.ts>` from the root. `llms/client.md`.
33
+ - `Missing statement: mvp:placeholder` on import — an unconfigured slot in a pulled tree; replace it with the statement it stands in for. `llms/legacy.md`.
package/llms/fields.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Column and input types
2
2
 
3
- > Read when declaring a table column (`f.*`) or a function/query input (`input.*`) — a type's options and accessor methods, and the `s.precondition` error/status contract that rides the same catalog.
3
+ > Read when declaring a table column (`f.*`) or a function/query input (`input.*`) — a type's options and methods, and the `s.precondition` error/status contract. Also `table({ seed })` rows and `use_xdo`.
4
4
 
5
5
  Author table columns + function/API inputs with the typed catalog: `f.<type>(opts?)`
6
6
  for columns, `input.<type>(opts?)` for inputs. Common opts: `required`, `nullable`,
@@ -45,6 +45,31 @@ any `SearchOp`: give the table `index: [{ type: "vector", fields: [{ name: "embe
45
45
  queries it.
46
46
  `{ array: true }` makes any `f.*` scalar a **list column** — `f.text({ array: true })`
47
47
  surfaces as `string[]` in `InferRow<typeof table>` (the column analogue of `input.list`).
48
+ **Seed a table's starting rows with `table({ seed })`.** `seed` takes rows
49
+ typed against the table's schema as a WRITE shape (a column without
50
+ `required: true`, and the system columns, may be omitted; `null` needs
51
+ `nullable: true`) — inline (`seed: [{ name: "…" }]`), a FILE
52
+ (`seed: seedFile("./seed.json", import.meta.url)`; path resolves against the DECLARING
53
+ file), or a thunk (`seed: () => import("./seed.json")`, async ok, `.default` unwrapped).
54
+ Inline rows are TYPED against the schema at compile time; a `seedFile`/thunk seed is
55
+ NOT — the JSON is opaque to the typechecker, and the `xanots export`/`deploy` CLI
56
+ validates it instead, naming the row index, the offending column, and the known
57
+ columns. ⚠ Prefer `seedFile` for a file: a thunk's `import()` sits in
58
+ YOUR module, so a bundler emits the JSON as a served chunk. NEITHER is a secrecy
59
+ boundary — a bundler that inlines the asset ships them either way. Never put secrets
60
+ in `seed`. `deploy --static` REFUSES a build carrying internal/sensitive seed values;
61
+ `--allow-seed-in-static` overrides for deliberately public demo credentials.
62
+ Deploy is a full replace, so re-deploying re-seeds
63
+ cleanly (no duplication). Omit `id` and rows auto-number `1..N` (int PK) or take
64
+ a stable derived uuid (uuid PK); supplying `id` pins it (engine preserves it,
65
+ resets an int sequence past the max). All-or-nothing — mixing explicit and
66
+ omitted `id` throws. A `system:false` PK is the author's to supply. Pinning is
67
+ `seed`-only — `s.db.bulk.add` DROPS `id` unless `allowIdField: true`.
68
+ **`use_xdo` storage mode.** Workspace setting (`registerWorkspace({ use_xdo })`,
69
+ default `false`) controlling whether fields are stored as JSON under the `xdo`
70
+ column (`true`, adds a `gin(xdo)` index) or as real columns (`false`, no gin).
71
+ Tables inherit it; override per-table with `table({ useXdo })`. Resolved at
72
+ `export()`, so the workspace and tables can be registered in any order.
48
73
  A **column `default` must stay within the BMP** — a 4-byte character (codepoint > U+FFFF,
49
74
  e.g. an emoji) is mangled into invalid UTF-8 by the engine's default pipeline and is rejected
50
75
  at export rather than 500ing at deploy (Postgres `22021`); BMP defaults (accents, `€`, most
package/llms/filters.md CHANGED
@@ -38,14 +38,10 @@ statement, and one CANNOT be synthesized in the SDK (it would compile to this sa
38
38
  database with a single `s.db.direct_query` UPDATE (`SET clicks = clicks + 1 WHERE …`),
39
39
  which the DB applies atomically. Reserve the pipeline form for low-contention counters
40
40
  where a rare lost update is acceptable.
41
- ⚠ `direct_query` needs the table's PHYSICAL Postgres name, which the typed surface
42
- does NOT expose: the engine derives it from ids assigned at import not knowable from a
43
- `table()` def (identity is a name + guid, not the numeric id) — and `sql_name` persists
44
- empty. The derived name is also NOT STABLE: a deploy is a full replace, so every table is
45
- created afresh and the id in its name moves each time, on the same unchanged project. So
46
- the safe counter drops out of the typed surface: resolve the physical name from
47
- `information_schema` inside the request that uses it, and never store, cache or hardcode
48
- one. A typed atomic path needs an engine change.
41
+ ⚠ `direct_query` needs the table's PHYSICAL Postgres name, which the typed surface does NOT
42
+ expose and which is NOT STABLE across deploysresolve it from `information_schema` inside
43
+ the request that uses it, never store or hardcode one (rules under `s.db.direct_query` in
44
+ `llms/statements-data.md`). A typed atomic path needs an engine change.
49
45
 
50
46
  - `fl.add(value: decimal): decimal`
51
47
  - `fl.append(value: <T>, path: text): <T>[]`
@@ -10,3 +10,4 @@
10
10
  - `output?`: `{ schema: Record<string, input.*>, enabled? }` — structured-output schema. `schema` is a named-field record authored with the `input.*` catalog, exactly like a `defineFunction`/`query` `input:` map (the stored `structuredOutputsSchema` is the same wire shape as function inputs). e.g. `output: { schema: { priority: input.enum(["low","high"]), summary: input.text() } }`. When you pass the agent *handle* to `s.ai.agent.run({ agent })`, `.result` is typed straight from this schema — no `resultShape` witness needed (the shape is declared once). `resultShape` remains only to override that, or to type an agent referenced by bare name.
11
11
  - **Run + read recipe (`s.ai.agent.run`):** bind the run to a var (`s.ai.agent.run({ agent, args, as: "run" })`) — it produces a rich envelope, and the completion is at **`.result`**. Read one structured field with a dotted ref (`response: ref("run.result.priority")`) or the whole completion (`ref("run.result")`, typed from `output.schema`); persist it in a later step the same way (`s.set_var({ name, value: ref("run.result.summary") })`). `args` is a plain object of run inputs (`{ topic: inp("topic") }` — raw literals are fine, e.g. `{ max_steps: 3 }`) surfaced to the agent as `{{ $args.topic }}`. Tool-call / per-step data (when tools ran) rides `.toolCalls` / `.steps` on the same envelope — both optional, absent or empty when no tools executed.
12
12
  - **Marketplace:** for chat history, use `@xanots/chatbot`; for vector RAG, use `@xanots/vector` (`tools: [vector.searchTool]`). Find add-ons with `xanots marketplace search <q>`.
13
+ - Both kinds persist under the `toolset` payload key, so a same-name `agent` + `mcpServer` pair derives ONE guid and `export()` throws — give them distinct names.