@xanots/sdk 0.0.6 → 0.0.7

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 (63) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/.build-fingerprint +1 -1
  3. package/dist/{agent-file-refresh-6XT23SLU.js → agent-file-refresh-4W37DGXS.js} +3 -3
  4. package/dist/bin.js +6 -6
  5. package/dist/{branch-commands-R4FR75UW.js → branch-commands-PBQ36L4A.js} +3 -3
  6. package/dist/{chunk-GC7ZQHW7.js → chunk-2V3JUXTF.js} +5 -4
  7. package/dist/{chunk-OR43PDCW.js → chunk-3EYUR3TX.js} +2 -2
  8. package/dist/{chunk-SG4UBJ47.js → chunk-3QW5NFZJ.js} +26 -5
  9. package/dist/{chunk-2SUCC4DV.js → chunk-4PE4ZAB7.js} +2 -2
  10. package/dist/{chunk-TYBB7ON3.js → chunk-5PDOAR77.js} +11 -11
  11. package/dist/{chunk-QVSUMHNN.js → chunk-7BUTRVKA.js} +2 -2
  12. package/dist/{chunk-EFH4NFPY.js → chunk-7JDT4PBU.js} +70 -6
  13. package/dist/{chunk-LLWK6H77.js → chunk-BKDJN76G.js} +31 -1
  14. package/dist/{chunk-SOCYCBYG.js → chunk-CL2H2WYE.js} +23 -23
  15. package/dist/{chunk-4HDOP7LH.js → chunk-DBHE35JM.js} +3 -3
  16. package/dist/{chunk-3FQD3QME.js → chunk-FAWNUE2U.js} +39 -8
  17. package/dist/{chunk-Y7BARS25.js → chunk-FDKR4YMN.js} +2 -2
  18. package/dist/{chunk-CEFYM6N5.js → chunk-H2DEDWQF.js} +4 -4
  19. package/dist/{chunk-JRGDLAEA.js → chunk-JAVB27HL.js} +2 -2
  20. package/dist/{chunk-AAFBSOSD.js → chunk-JQJPFUZI.js} +3 -3
  21. package/dist/{chunk-CU5VOSTW.js → chunk-JUHKEAHJ.js} +4 -4
  22. package/dist/{chunk-WJYB7DSI.js → chunk-MDXR5E5Q.js} +2 -2
  23. package/dist/{chunk-CQBJNFDK.js → chunk-NJGNUVXR.js} +15 -4
  24. package/dist/{chunk-OLQLJY5T.js → chunk-OYMR5AMJ.js} +2 -2
  25. package/dist/{chunk-P5OAM3G2.js → chunk-QIWBCS7N.js} +2 -2
  26. package/dist/cli.js +5 -5
  27. package/dist/{codegen-command-6XXOIQ25.js → codegen-command-DYH4H4TD.js} +13 -13
  28. package/dist/{deploy-command-MTQQXPOO.js → deploy-command-HM57BINV.js} +12 -12
  29. package/dist/{env-target-C5JFLDK3.js → env-target-WA3BH5YU.js} +6 -6
  30. package/dist/{ephemeral-command-K3UJSDS4.js → ephemeral-command-SD2KLX4P.js} +7 -7
  31. package/dist/index.d.ts +2 -2
  32. package/dist/index.js +6 -6
  33. package/dist/{init-command-AY4KSXR5.js → init-command-VIPWAQYS.js} +8 -8
  34. package/dist/internal.d.ts +2 -2
  35. package/dist/internal.js +111 -55
  36. package/dist/{io-65CJNLYI.js → io-M7XZEMK7.js} +3 -3
  37. package/dist/{lock-PDFCNYUW.js → lock-GFXD6G2E.js} +6 -2
  38. package/dist/{lock-commands-MC6I3MZA.js → lock-commands-7VJKAXV6.js} +6 -6
  39. package/dist/{login-command-LCOOOPO2.js → login-command-DFCURZLC.js} +3 -3
  40. package/dist/{logout-command-J2AG5NKC.js → logout-command-WXVZQCAV.js} +2 -2
  41. package/dist/node.d.ts +2 -2
  42. package/dist/node.js +8 -8
  43. package/dist/{profile-command-ZPC2DPFV.js → profile-command-QJAAUZIV.js} +3 -3
  44. package/dist/{release-command-V4K4IORX.js → release-command-3IET7YII.js} +26 -14
  45. package/dist/{sandbox-details-command-DMY2KGA2.js → sandbox-details-command-EDO56IY3.js} +4 -4
  46. package/dist/{sandbox-export-command-R6QMEK3D.js → sandbox-export-command-MO6DEZ7Z.js} +5 -5
  47. package/dist/{store-BJONDJoZ.d.ts → store-DfuWu1tE.d.ts} +1 -1
  48. package/dist/{test-command-OEBIGOPP.js → test-command-S7SMRWMP.js} +6 -6
  49. package/dist/{upgrade-command-52AAZ3NV.js → upgrade-command-TZYSGXP7.js} +9 -9
  50. package/dist/{validate-command-KTLPSSH7.js → validate-command-MMXEVHH3.js} +7 -7
  51. package/dist/{workspace-command-LX5S5N2H.js → workspace-command-X6L7HTXO.js} +16 -16
  52. package/guides/environment.md +6 -3
  53. package/llms/fields.md +8 -0
  54. package/llms/kinds-core.md +2 -1
  55. package/llms/lambda.md +1 -1
  56. package/llms/legacy.md +1 -1
  57. package/llms/lock.md +32 -0
  58. package/llms/object-kinds.md +2 -2
  59. package/llms/statements-calls.md +9 -2
  60. package/llms-full.txt +105 -56
  61. package/llms.txt +49 -49
  62. package/manifest.json +2 -2
  63. package/package.json +1 -1
@@ -2,29 +2,29 @@ import {
2
2
  projectShellFiles,
3
3
  runInitCommand,
4
4
  sanitizeAppName
5
- } from "./chunk-4HDOP7LH.js";
5
+ } from "./chunk-DBHE35JM.js";
6
6
  import {
7
7
  resolveAiFlags
8
- } from "./chunk-2SUCC4DV.js";
8
+ } from "./chunk-4PE4ZAB7.js";
9
9
  import "./chunk-ZSYZTGJH.js";
10
10
  import "./chunk-MU3O43L2.js";
11
11
  import "./chunk-P5C2YKAM.js";
12
12
  import "./chunk-Q77KNEUL.js";
13
- import "./chunk-SOCYCBYG.js";
13
+ import "./chunk-CL2H2WYE.js";
14
14
  import "./chunk-JQLR64UC.js";
15
- import "./chunk-OLQLJY5T.js";
15
+ import "./chunk-OYMR5AMJ.js";
16
16
  import "./chunk-GNPVYOPB.js";
17
17
  import "./chunk-EZG76F7R.js";
18
- import "./chunk-3FQD3QME.js";
18
+ import "./chunk-FAWNUE2U.js";
19
19
  import "./chunk-OKNSR7MT.js";
20
- import "./chunk-CQBJNFDK.js";
20
+ import "./chunk-NJGNUVXR.js";
21
21
  import "./chunk-WHOJWOSV.js";
22
22
  import "./chunk-5XZ744TS.js";
23
- import "./chunk-EFH4NFPY.js";
23
+ import "./chunk-7JDT4PBU.js";
24
24
  export {
25
25
  projectShellFiles,
26
26
  resolveAiFlags,
27
27
  runInitCommand,
28
28
  sanitizeAppName
29
29
  };
30
- //# sourceMappingURL=init-command-AY4KSXR5.js.map
30
+ //# sourceMappingURL=init-command-VIPWAQYS.js.map
@@ -1,7 +1,7 @@
1
1
  import { F as FunctionXdo } from './response-CVAE2kMj.js';
2
2
  export { a as FIELD_METHODS, R as REFERENCEABLE_KINDS, d as deriveGuid, e as encodeResponse, b as encodeStatement, g as getStatementFactory, i as isRegisteredStatement, r as resolveRef, t as toNestedFields } from './response-CVAE2kMj.js';
3
- import { S as StatementSpec, F as FunctionDef, O as ObjectKind } from './store-BJONDJoZ.js';
4
- export { A as AdoptChange, a as AdoptResult, B as Bundle, b as BundlePayload, c as BundleType, d as FILTER_NAMES, G as GENERATED_STATEMENT_NAMES, K as KNOWLEDGE_DIR, e as KNOWLEDGE_FILE, L as LLMS_TXT, f as LOCK_VERSION, g as LockEntry, h as LockExportContext, i as LockFile, M as Manifest, j as ManifestField, k as ManifestKind, l as ManifestStatement, m as MergeResult, P as PAYLOAD_ARRAY_KEYS, n as PayloadArrayKey, Q as QUERY_EXPRESSION_FILTERS, R as RenameResult, T as TOTAL_OBJECT_KINDS, V as VECTOR_FILTERS, W as WORKSPACE_KEY, o as addonKind, p as adoptFromBundle, q as agentKind, r as apiGroupKind, s as buildBundle, t as buildManifest, u as buildMiddlewareBlock, v as buildWorkspaceHistory, w as calcSignatureJson, x as channelPathParams, y as createLockContext, z as declaredServicePorts, C as emptyLock, D as encodeAddon, E as encodeAgent, H as encodeApiGroup, I as encodeColumn, J as encodeContainerHistory, N as encodeFromSpec, U as encodeHistory, X as encodeIndex, Y as encodeKnowledge, Z as encodeMcpServer, _ as encodeMicroservice, $ as encodeMiddleware, a0 as encodeMiddlewareEntry, a1 as encodeMiddlewareList, a2 as encodeObject, a3 as encodeQuery, a4 as encodeRealtimeChannel, a5 as encodeRealtimeMessage, a6 as encodeRealtimeServer, a7 as encodeSchedule, a8 as encodeTable, a9 as encodeTask, aa as encodeTool, ab as encodeToolRefs, ac as encodeToolsetBase, ad as encodeTrigger, ae as encodeView, af as encodeWorkflowTest, ag as encodeWorkspaceConfig, ah as generatedStatements, ai as getKind, aj as getLockedCanonical, ak as getLockedGuid, al as isKnowledgeDirSource, am as isKnowledgeFileSource, an as isLockSeeded, ao as isQueryExpressionFilter, ap as isRegisteredKind, aq as knowledgeKind, ar as lockKey, as as mcpServerKind, at as mergeObserved, au as microserviceKind, av as middlewareKind, aw as mintCanonical, ax as parseLock, ay as phpJsonEncode, az as queryKind, aA as realtimeChannelGuid, aB as realtimeChannelKind, aC as realtimeMessageGuid, aD as realtimeMessageKind, aE as realtimeServerKind, aF as recordObserved, aG as registerKind, aH as registerSpec, aI as registeredKinds, aJ as renameLockEntry, aK as renderDocs, aL as renderLlmsTxt, aM as resolveAuthRef, aN as resolvePayloadKey, aO as resolveRealtimeServerCanonical, aP as resolveToolsetCanonical, aQ as serializeBundle, aR as serializeLock, aS as tableKind, aT as taskKind, aU as toolKind, aV as triggerKind, aW as validateLockModel, aX as workflowTestKind, aY as workspaceKind } from './store-BJONDJoZ.js';
3
+ import { S as StatementSpec, F as FunctionDef, O as ObjectKind } from './store-DfuWu1tE.js';
4
+ export { A as AdoptChange, a as AdoptResult, B as Bundle, b as BundlePayload, c as BundleType, d as FILTER_NAMES, G as GENERATED_STATEMENT_NAMES, K as KNOWLEDGE_DIR, e as KNOWLEDGE_FILE, L as LLMS_TXT, f as LOCK_VERSION, g as LockEntry, h as LockExportContext, i as LockFile, M as Manifest, j as ManifestField, k as ManifestKind, l as ManifestStatement, m as MergeResult, P as PAYLOAD_ARRAY_KEYS, n as PayloadArrayKey, Q as QUERY_EXPRESSION_FILTERS, R as RenameResult, T as TOTAL_OBJECT_KINDS, V as VECTOR_FILTERS, W as WORKSPACE_KEY, o as addonKind, p as adoptFromBundle, q as agentKind, r as apiGroupKind, s as buildBundle, t as buildManifest, u as buildMiddlewareBlock, v as buildWorkspaceHistory, w as calcSignatureJson, x as channelPathParams, y as createLockContext, z as declaredServicePorts, C as emptyLock, D as encodeAddon, E as encodeAgent, H as encodeApiGroup, I as encodeColumn, J as encodeContainerHistory, N as encodeFromSpec, U as encodeHistory, X as encodeIndex, Y as encodeKnowledge, Z as encodeMcpServer, _ as encodeMicroservice, $ as encodeMiddleware, a0 as encodeMiddlewareEntry, a1 as encodeMiddlewareList, a2 as encodeObject, a3 as encodeQuery, a4 as encodeRealtimeChannel, a5 as encodeRealtimeMessage, a6 as encodeRealtimeServer, a7 as encodeSchedule, a8 as encodeTable, a9 as encodeTask, aa as encodeTool, ab as encodeToolRefs, ac as encodeToolsetBase, ad as encodeTrigger, ae as encodeView, af as encodeWorkflowTest, ag as encodeWorkspaceConfig, ah as generatedStatements, ai as getKind, aj as getLockedCanonical, ak as getLockedGuid, al as isKnowledgeDirSource, am as isKnowledgeFileSource, an as isLockSeeded, ao as isQueryExpressionFilter, ap as isRegisteredKind, aq as knowledgeKind, ar as lockKey, as as mcpServerKind, at as mergeObserved, au as microserviceKind, av as middlewareKind, aw as mintCanonical, ax as parseLock, ay as phpJsonEncode, az as queryKind, aA as realtimeChannelGuid, aB as realtimeChannelKind, aC as realtimeMessageGuid, aD as realtimeMessageKind, aE as realtimeServerKind, aF as recordObserved, aG as registerKind, aH as registerSpec, aI as registeredKinds, aJ as renameLockEntry, aK as renderDocs, aL as renderLlmsTxt, aM as resolveAuthRef, aN as resolvePayloadKey, aO as resolveRealtimeServerCanonical, aP as resolveToolsetCanonical, aQ as serializeBundle, aR as serializeLock, aS as tableKind, aT as taskKind, aU as toolKind, aV as triggerKind, aW as validateLockModel, aX as workflowTestKind, aY as workspaceKind } from './store-DfuWu1tE.js';
5
5
 
6
6
  /**
7
7
  * AUTO-GENERATED by scripts/codegen.ts — DO NOT EDIT BY HAND.
package/dist/internal.js CHANGED
@@ -33,7 +33,7 @@ import {
33
33
  taskKind,
34
34
  toolKind,
35
35
  workflowTestKind
36
- } from "./chunk-CU5VOSTW.js";
36
+ } from "./chunk-JUHKEAHJ.js";
37
37
  import {
38
38
  GENERATED_SPECS,
39
39
  GENERATED_STATEMENT_NAMES,
@@ -55,7 +55,7 @@ import {
55
55
  registerSpec,
56
56
  triggerKind,
57
57
  workspaceKind
58
- } from "./chunk-GC7ZQHW7.js";
58
+ } from "./chunk-2V3JUXTF.js";
59
59
  import {
60
60
  COMMANDS,
61
61
  FLAGS,
@@ -109,7 +109,7 @@ import {
109
109
  serializeBundle,
110
110
  tableKind,
111
111
  toNestedFields
112
- } from "./chunk-CQBJNFDK.js";
112
+ } from "./chunk-NJGNUVXR.js";
113
113
  import "./chunk-WHOJWOSV.js";
114
114
  import {
115
115
  encodeStatement,
@@ -137,7 +137,7 @@ import {
137
137
  resolveRef,
138
138
  serializeLock,
139
139
  validateLockModel
140
- } from "./chunk-EFH4NFPY.js";
140
+ } from "./chunk-7JDT4PBU.js";
141
141
 
142
142
  // src/statements/byte-evidence.ts
143
143
  var UNCONFIRMED_STATEMENTS = /* @__PURE__ */ new Set([]);
@@ -219,7 +219,7 @@ var KIND_DESCRIPTORS = [
219
219
  { kind: "realtime_server", payloadKey: "realtime_server", authorFactory: "realtimeServer", description: "A realtime (websocket) server: the canonical-addressed container that owns realtime channels. Off until `enabled: true`. Returns a handle with `getUrl(baseUrl)`/`getPath()` for the client's socket URL (`wss://<host>/ws/<canonical>`).", registerMethod: "registerRealtimeServers" },
220
220
  { kind: "channel", payloadKey: "channel", authorFactory: "realtimeChannel", description: "A realtime channel: a joinable path on a realtime server (`rooms/{room_id}`) with typed path params, join/publish policy, a client-visible conversation transcript, and delivery semantics. Owns message handlers. Returns a handle with `getChannel(params)` for the path a client joins.", registerMethod: "registerRealtimeChannels" },
221
221
  { kind: "message", payloadKey: "message", authorFactory: "realtimeMessage", description: "A realtime message handler: a named message type on a channel with its own typed payload and stack \u2014 the realtime analogue of a query. Pass the `realtimeChannel()` handle as `channel` and the owning server comes with it.", registerMethod: "registerRealtimeMessages" },
222
- { kind: "microservice", payloadKey: "microservice", authorFactory: "microservice", description: "A container workload deployed alongside the workspace, called from a stack with `s.microservice.request`. Two mutually exclusive shapes via `kind`: `builtin` declares containers (image/ports/resources/env/command/args) plus optional `ingresses`, and `helm` points at a chart and its `values` \u2014 passing both throws. EARLY SURFACE, expected to change \u2014 every export of a workspace declaring one prints a notice saying so. `configs`/`volumes` are typed and `@deprecated` but NOT deployable: the engine rejects an import carrying either, so `export()` fails the build rather than letting the deploy fatal. Put a value the workload reads in a container's `env`, and storage in a container's own `volumes` (`emptyDir`/`persistent`/`config`). Container names are free-form \u2014 they need not match the microservice name, which is what a stack addresses. SECRETS RIDE ALONG \u2014 `chart.values` and `registryAuth.dockerconfigjson` are carried into the bundle, and into a pulled tree, verbatim (they must be, or a pulled microservice could not be redeployed). Both are stored strings with NO deploy-time indirection: `process.env.X` in the def resolves at EXPORT and writes the literal into the bundle, so it is not a way to keep the credential out. Either leave `registryAuth` unset (public image, or a credential attached outside this workspace) or treat the bundle and any pulled tree as secret material \u2014 keep them out of git, or rotate after. Export prints a notice per microservice carrying either field; `--strict` does not promote it. For a secret a STACK reads, the mapped surface is `workspaceConfig({ env })` + `env(\"NAME\")`.", registerMethod: "registerMicroservices" },
222
+ { kind: "microservice", payloadKey: "microservice", authorFactory: "microservice", description: "A container workload deployed alongside the workspace, called from a stack with `s.microservice.request`. Def shapes (`builtin` containers vs a `helm` chart) and the SECRET-handling rules its config carries: `llms/statements-calls.md`.", registerMethod: "registerMicroservices" },
223
223
  {
224
224
  kind: "knowledge",
225
225
  payloadKey: "knowledge",
@@ -787,9 +787,18 @@ function renderSections(m) {
787
787
  lines.push(`# ${m.name} v${m.version}`, "");
788
788
  lines.push(`> ${m.description}`, "");
789
789
  lines.push(
790
- "Author a Xano workspace in TypeScript: build typed objects, register them on a",
791
- "`new Xano()` instance, and call `.export()` to get one importable bundle. Compile",
792
- "with `xanots export ./xano/index.js`.",
790
+ "Xano is a hosted backend platform: one WORKSPACE serves a managed PostgreSQL",
791
+ "database, HTTP API endpoints, background tasks, realtime websocket channels, AI",
792
+ "agents and MCP servers, file storage, and redis. This SDK authors that workspace in",
793
+ "TypeScript \u2014 typed def objects registered on a `workspace(name)` \u2014 compiled to one",
794
+ "importable bundle by `xanots export ./xano/index.ts`, shipped live by `xanots deploy`.",
795
+ "",
796
+ "Def modules execute at BUILD time only: `s.*` factories return data, and the engine",
797
+ "runs the compiled stack per request \u2014 statements in order, a statement's `as:`",
798
+ "naming a runtime variable, `response` the HTTP body. Every dynamic operand is a",
799
+ 'TAGGED value \u2014 `ref("x")` a stack variable, `inp("x")` an input, `auth("id")` the',
800
+ "caller, `c.*` a constant \u2014 resolved at request time; JS operators over them do not",
801
+ "compute (see Gotchas). Requests share no memory \u2014 state persists in tables or redis.",
793
802
  "",
794
803
  `Coverage: object kinds ${m.coverage.objectKinds.implemented}/${m.coverage.objectKinds.total}, statement surfaces ${m.coverage.statements.implemented}/${m.coverage.statements.total}, filters ${m.coverage.filters.total} (${m.coverage.filters.typed} typed).`,
795
804
  // The shortfall by name: an agent that cannot see WHICH kinds are missing
@@ -802,7 +811,7 @@ function renderSections(m) {
802
811
  "exhaustive per-entry detail in NEITHER \u2014 a statement's full field schema with engine",
803
812
  "defaults, a filter's complete argument list, the engine `storedName` mapping \u2014 do a",
804
813
  "TARGETED lookup in the shipped `manifest.json` (grep or `jq` the one entry you need;",
805
- "it is ~55k tokens, so never read it whole). Its top-level keys are `" + Object.keys(m).join("`, `") + "`. `statements` and `filters` are ARRAYS, not maps \u2014 SELECT, do not index:",
814
+ "it is ~65k tokens, so never read it whole). Its top-level keys are `" + Object.keys(m).join("`, `") + "`. `statements` and `filters` are ARRAYS, not maps \u2014 SELECT, do not index:",
806
815
  ` jq '.statements[] | select(.sPath=="db.get")' manifest.json`,
807
816
  ` jq '.filters[] | select(.name=="json_decode")' manifest.json`,
808
817
  `Select a statement on \`sPath\` (the \`s.*\` path you write), NOT \`surface\` (the XanoScript term): ${m.statements.filter((s) => s.surface !== s.sPath).length} of ${m.statements.length} differ \u2014 \`var\`\u2192\`set_var\`, \`break\`\u2192\`foreach_break\`, \`foreach.remove\`\u2192\`foreach_remove\`, and every \`expect.*\`.`,
@@ -881,26 +890,18 @@ function renderSections(m) {
881
890
  "pass `--strict` (`emitBundle(app, { strict: true })` / `app.export({ strict: true })`):",
882
891
  "every warning becomes a hard failure. Same bundle bytes either way.",
883
892
  "",
884
- "Identity: object guids derive from `(type, name)`, so renames change identity.",
885
- "`xanots export <entry> --lock` freezes every guid + api-group/toolset canonical in a lock",
886
- "file written BESIDE THE ENTRY FILE \u2014 `xano/xano.lock` for the standard scaffold, NOT the",
887
- "project root \u2014 which you commit (auto-read once present; CI guard `--frozen-lock` fails",
888
- "instead of changing the lock). Fix-up subcommands:",
889
- "`xanots lock rename <kind> <old> <new>` (kind = payloadKey or table/api_group),",
890
- "`xanots lock prune <entry-file> [keys\u2026] --yes` \u2014 finding orphans RUNS the entry's module scope",
891
- "(env assertions included); `--no-verify --yes <kind:name>\u2026` prunes named keys with no evaluation",
892
- "and no orphan check,",
893
- "`xanots lock adopt <live-bundle.json> [--yes]` \u2014 all accept `--lock=<path>`.",
894
- "Programmatic use: call `seedLockOverrides(readLockFile(path))` BEFORE importing",
895
- "any def module \u2014 references bake guids at import time, so late seeding is a",
896
- "silent no-op (`resetLockOverrides` exists for tests).",
897
- "Development workflow: opt in EARLY \u2014 run `xanots export ./xano/index.ts --lock` once and COMMIT",
898
- "`xano.lock` beside the entry file; every later export then keeps identities",
899
- "stable across renames and environments. To rename an object: rename in code,",
900
- "export (stderr prints the exact fix-up), run `xanots lock rename <kind> <old>",
901
- "<new>`, export again \u2014 the original guid is emitted under the new name, so the",
902
- "engine renames in place instead of delete+create. Taking over an existing",
903
- "workspace: `xanots lock adopt <its-packageExport.json>` first, then export.",
893
+ "Identity: object guids derive from `(type, name)` \u2014 a query's from `(api group,",
894
+ "verb, name)` \u2014 so renames change identity.",
895
+ "Opt in EARLY: `xanots export ./xano/index.ts --lock` freezes every guid +",
896
+ "api-group/toolset canonical in a lock file written BESIDE THE ENTRY FILE \u2014",
897
+ "`xano/xano.lock` for the standard scaffold, NOT the project root \u2014 which you COMMIT",
898
+ "(auto-read once present; CI guard `--frozen-lock` fails instead of changing it).",
899
+ "To rename an object: rename in code, export (stderr prints the exact fix-up), run",
900
+ "`xanots lock rename <kind> <old> <new>`, export again \u2014 the original guid is emitted",
901
+ "under the new name, so the engine renames in place instead of delete+create. Taking",
902
+ "over an existing workspace: `xanots lock adopt <its-packageExport.json>` first, then",
903
+ "export. Pruning, programmatic seeding, and which commands write the lock:",
904
+ "`llms/lock.md`.",
904
905
  "",
905
906
  "## Deploy",
906
907
  "",
@@ -931,14 +932,6 @@ function renderSections(m) {
931
932
  " (previewed against live). `--prune` deletes only what `xano.lock` records this",
932
933
  " project released, and refuses without a lock.",
933
934
  "",
934
- "Nothing from a DEPLOY is written back into `xano.lock` (an ephemeral/sandbox is a",
935
- "separate workspace, so its identities must not pollute yours). The one write-back is",
936
- "`release --replace`, which mints fresh identities in the workspace the lock describes:",
937
- "it re-pins the lock from the rebuilt workspace, because otherwise the next release",
938
- "matches nothing and duplicates every object. Deploying an ENTRY",
939
- "FILE still updates the local lock via the shared compile step, exactly as `export`",
940
- "does \u2014 only when a lock exists or `--lock` is passed.",
941
- "",
942
935
  "**Frontend wiring.** `--static <dir>` injects the DEPLOYED env's backend URL as",
943
936
  "`window.XANO_HOST` into EVERY html document in the build, before the app bundle runs,",
944
937
  "so the frontend needs no rebuild to target an env. Every document, not just the root:",
@@ -988,6 +981,12 @@ function renderSections(m) {
988
981
  "- **Reference-helper picker:** `ref` = stack var (`as:` output), `inp` = input,",
989
982
  ' `col` = table column (in `db.query` `where`), `auth("id")` = the caller,',
990
983
  " `c.*` = a constant. Pick by what you're pointing at.",
984
+ "- **Tagged values are DATA \u2014 a JS template literal cannot compose them.** `${ref(...)}`",
985
+ ' (or `"a" + ref(...)`) stringifies the tag object at BUILD time: ``c.text(`Hi ${ref("u.name")}`)``',
986
+ " type-checks and encodes the literal text `Hi [object Object]`, served verbatim.",
987
+ " `export()` warns; `--strict` fails. Compose at RUNTIME:",
988
+ ' `withFilters(c.text("Hi "), fl.concat(ref("u.name")))`, an `obj({...})`/record member,',
989
+ " or `c.expression('\"Hi, \" ~ $var.u.name')`.",
991
990
  "- **`s.api.call` / `s.task.call` / `s.trigger.call` / `s.workflow_test.call` are",
992
991
  " WORKFLOW-TEST ONLY.** Outside a `workflowTest({...})` stack the engine cannot reach",
993
992
  " the target, so one in a query/function/task deploys clean and then answers the first",
@@ -1068,15 +1067,16 @@ function renderSections(m) {
1068
1067
  "- **Self-referencing tables** need the bare-name form: inside `tweets`'s own",
1069
1068
  ' schema, write `f.tableRef("tweets", { type: "int" })` \u2014 the `const tweets`',
1070
1069
  ` handle isn't assigned yet, so the handle form throws "used before declaration".`,
1071
- "- **Same-name siblings collide.** Object guids derive from `(type, name)` and",
1072
- " ignore a query's `verb`, so a `GET` and `POST` both named `posts` clash;",
1073
- " `export()` throws on the collision \u2014 give them DISTINCT names (`posts` and",
1074
- " `posts/create`; the verb still carries the semantics). A distinct explicit",
1075
- " `guid` on each clears that throw but is NOT a lasting fix: a lock entry is",
1076
- " keyed by `(type, name)` too and cannot hold two guids, so `export --lock`",
1077
- " refuses the pair \u2014 and a committed lock is the recommended workflow.",
1078
- " `export()` warns on a same-name pair even unlocked. An explicit `guid` is",
1079
- " for pinning identity across a rename, not for sharing a name.",
1070
+ "- **Same-name siblings collide \u2014 queries excepted: their identity carries group + verb.**",
1071
+ " Guids derive from `(type, name)`, so two functions (or tables, toolsets, \u2026) sharing",
1072
+ " a name derive ONE guid and `export()` throws \u2014 give them DISTINCT names. A QUERY",
1073
+ " derives from `(api group, verb, name)`, the engine's own uniqueness: `GET items` +",
1074
+ " `POST items`, and `items` across two groups, coexist, and the lock keys the same",
1075
+ " composed identity (`query:blog|GET|items`) \u2014 changing a query's verb or group",
1076
+ " changes its identity. An explicit `guid` on a colliding pair clears the throw but",
1077
+ " is NOT a lasting fix: a lock entry cannot hold two guids, so `export --lock`",
1078
+ " refuses the pair (`export()` warns even unlocked); it is for pinning identity",
1079
+ " across a rename, not for sharing a name.",
1080
1080
  "- **`export()` vs `emitBundle()` vs `writeBundle()`:** `writeBundle(app, path)`",
1081
1081
  " writes it to disk; `export()` returns the bundle object;",
1082
1082
  " `emitBundle()` returns the pretty JSON string. All three run the SAME build-time",
@@ -1243,7 +1243,8 @@ function renderSections(m) {
1243
1243
  "The def-object passed to each factory. `?` = optional. `input` is keyed by",
1244
1244
  "input name (`input.<type>(opts?)`); `stack` is `Statement[]` (`s.*`); `response`",
1245
1245
  "is a `ResponseDef` (see **Responses** below). Object identity is `guid?` \u2014",
1246
- "omit it and it derives from `name` (set it to survive a rename).",
1246
+ "omit it and it derives from `name` (for a query, from group + verb + name; set it",
1247
+ "to survive a rename).",
1247
1248
  "",
1248
1249
  "- `defineFunction({ name, guid?, description?, docs?, workspace?, input?, stack?, response?, tests? })`",
1249
1250
  "- `query({ name, verb, apiGroup?, guid?, auth?, input?, stack?, response?, responseType?, apiEnabled?, disabled?, cache?, description?, docs?, tests?, example? })`",
@@ -1498,6 +1499,14 @@ function renderSections(m) {
1498
1499
  "`input.list(element)` for arrays \u2014 wrap any element constructor, e.g.",
1499
1500
  "`input.list(input.text())` or `input.list(input.object({ id: f.int() }))`. Prefer the",
1500
1501
  "typed forms over `input.json()` when the shape is known.",
1502
+ "**A file reaches a column in two steps.** `input.file` is the RAW upload (the request's",
1503
+ "multipart/base64 bytes) and cannot be written to a file column directly: store it first \u2014",
1504
+ '`s.storage.create_image({ as: "img", value: ref("input.avatar"), access: "public" })`',
1505
+ '(the request input bag is read as a dotted `ref("input.<name>")` here) \u2014 then write',
1506
+ '`ref("img")` into the `f.image()` cell with `s.db.add`/`edit`. `access` defaults to',
1507
+ '`"public"` (a guessable URL): pass `"private"` and hand out `s.storage.sign_private_url`',
1508
+ "results for anything user-scoped. `create_video`/`create_audio`/`create_attachment` are",
1509
+ "the same shape for the other file columns.",
1501
1510
  "**Typed inputs validate/coerce on bind, before your stack runs** \u2014 so reach for the",
1502
1511
  "specific type instead of hand-rolling checks. `input.email({ required: true })` rejects a",
1503
1512
  'malformed address with a 400 (and trims; add `methods: ["lower"]` to downcase) \u2014 no',
@@ -1735,14 +1744,52 @@ function renderSections(m) {
1735
1744
  '- **Workspace environment variables** set a tenant\'s env vars through the workspace object: `workspaceConfig({ env: { STRIPE_KEY: process.env.STRIPE_KEY!, APP_BASE_URL: "https://\u2026" } })`. Author them as a name\u2192value MAP. Read a var back with `env("NAME")` (\u2192 `$env.NAME`), which compiles to tag "setting" with the plain name. Values are SECRETS: prefer sourcing from `process.env` over committing literals, and don\'t commit a compiled bundle with real values. `deploy` REPLACES the tenant\'s env with the declared map; `release` (merge) is ADD-ONLY \u2014 it creates missing keys but does NOT update or remove existing ones, so changing a value in code and releasing leaves the live value unchanged. Omit `env` to leave existing env untouched. The separate `settings` field is a plain object.',
1736
1745
  ""
1737
1746
  ];
1747
+ const lock = [
1748
+ "## Lock file",
1749
+ "",
1750
+ "`xano.lock` pins each object's guid and each api-group/toolset canonical, so renames",
1751
+ "stay renames (guids otherwise derive from `(type, name)`; a query's from `(api group,",
1752
+ "verb, name)`). Created by `xanots export <entry> --lock`, auto-read once present,",
1753
+ "committed. A query's entry is keyed by that composed identity \u2014",
1754
+ "`query:<group>|<verb>|<name>` \u2014 the same seed its guid derives from; a legacy",
1755
+ "`query:<name>` entry keeps pinning and is migrated by the next locked export (the",
1756
+ "old key drops automatically once its guid re-lands under the composed one).",
1757
+ "",
1758
+ "- `xanots lock rename <kind> <old> <new>` \u2014 `kind` is the payload key (or `table`/`api_group`).",
1759
+ " Run it after renaming in code; the next export emits the original guid under the new name.",
1760
+ "- `xanots lock prune <entry-file> [keys\u2026] --yes` \u2014 drops orphaned entries. Finding orphans",
1761
+ " RUNS the entry's module scope (env assertions included); `--no-verify --yes <kind:name>\u2026`",
1762
+ " prunes named keys with no evaluation and no orphan check.",
1763
+ "- `xanots lock adopt <live-bundle.json> [--yes]` \u2014 seed the lock from an engine",
1764
+ " packageExport when taking over an existing workspace.",
1765
+ "- Every lock subcommand accepts `--lock=<path>`. `rename`/`adopt` take no entry file, so",
1766
+ " from outside the lock's directory pass `--lock` (or `--entry=<entry-file>` to derive it).",
1767
+ "- Programmatic use: call `seedLockOverrides(readLockFile(path))` BEFORE importing any def",
1768
+ " module \u2014 references bake guids at import time, so late seeding is a silent no-op",
1769
+ " (`resetLockOverrides` exists for tests).",
1770
+ "",
1771
+ "What writes the lock: `export`/`deploy` of an ENTRY FILE update it via the shared compile",
1772
+ "step \u2014 only when a lock exists or `--lock` is passed. Nothing from a DEPLOY is written",
1773
+ "back beyond that (an ephemeral/sandbox is a separate workspace, so its identities must",
1774
+ "not pollute yours). The one write-back is `release --replace`, which mints fresh",
1775
+ "identities in the workspace the lock describes: it re-pins the lock from the rebuilt",
1776
+ "workspace, because otherwise the next release matches nothing and duplicates every",
1777
+ "object. CI: `--frozen-lock` fails instead of changing the lock.",
1778
+ ""
1779
+ ];
1738
1780
  const stmtCalls = [
1739
1781
  "Auth & calls:",
1740
1782
  "",
1741
1783
  "- `s.security.create_auth_token({ table, id, extras?, expiration?, as? })` \u2014 `extras` defaults to `{}`, `expiration` to `86400`s (`0` = never).",
1784
+ '- **Marketplace first:** `@xanots/auth` registers a complete auth surface \u2014 signup/login/me endpoints plus their `user`/`account`/`event_log` tables \u2014 via `registerAuth(ws, { canonical: "authn" })`. Authentication only, not authorization. Inspect with `xanots marketplace details @xanots/auth --prompt`.',
1785
+ "- **The auth loop end to end** \u2014 what that module implements; author it directly for a custom flow. An auth TABLE (`table({ auth: true })`) backs identity; a PUBLIC login query verifies and mints a token; every protected query names that table as `auth:` and reads the caller with `auth(...)`.",
1786
+ ' - Signup: `s.db.add({ table: users, row: { email: inp("email"), password: inp("password") } })` \u2014 the `f.password()` column hashes on write; take the submission as `input.text()` on signup AND login (see Gotchas on double-hashing).',
1787
+ ' - Login: `s.db.get({ table: users, fieldName: "email", fieldValue: inp("email"), output: ["id", "password"], as: "u" })` \u2014 the `output` naming `password` is REQUIRED (the column is `access: "internal"` and absent from the row otherwise) \u2192 `s.precondition({ expr: expr(ref("u", { safe: true }), "!=", c.null()), error: c.text("No such user."), error_type: "notfound" })` \u2192 `s.security.check_password({ text_password: inp("password"), hash_password: ref("u.password"), as: "ok" })` \u2192 precondition on `ok` \u2192 `s.security.create_auth_token({ table: users, id: ref("u.id"), as: "token" })` \u2192 `response: { token: ref("token") }`.',
1788
+ ' - Client: send it as an `Authorization: Bearer <token>` header. A `query({ auth: users })` refuses a request without a valid one before its stack runs; inside the stack `auth("id")` is the caller\'s row id (`response: { id: auth("id") }` is the whole `me` endpoint).',
1742
1789
  "- `s.security.create_guid({ as? })` \u2014 bind a fresh GUID string. Takes nothing else.",
1743
1790
  "- `s.function.run({ fn, input?, as?, runtime? })` / `s.function.call({ fn, input?, as? })` \u2014 run another function; `input` is keyed by the target's input names.",
1744
1791
  ' - `runtime?` runs it in the BACKGROUND: `{ mode: "async-shared" }` or `{ mode: "async-dedicated", cpu?, memory?, timeout?, maxRetry? }` (resources read at dedicated only). An async call DOES NOT return the result \u2014 it dispatches and continues, so `as` binds nothing; collect with `s.await({ ids })`. Omit for a normal call. Same block on `s.ai.agent.run`.',
1745
- '- `s.api.call({ api, input?, headers?, auth?, as? })` \u2014 invoke an endpoint. `headers` REPLACES the request headers the callee sees and takes the same shapes as `s.api.request`\'s \u2014 a `{ "Name": value }` record (values may be tagged), a `string[]` of `"Name: value"` lines, or one `Value`. `auth` is `{ token, ignoreExpiration? }`: `token` must be a BARE STRING \u2014 a tagged `Value` deploys clean and then fails the run with `Param: token - Text filter requires an integer, float, string or boolean value`, since the engine stores that slot as plain text and never evaluates it. Neither slot authenticates the call today; see `llms/tests.md` for what a workflow-test run actually sees. WORKFLOW-TEST ONLY (see Gotchas in `llms.txt`) \u2014 elsewhere it deploys clean and 500s the first real request.',
1792
+ '- `s.api.call({ api, input?, headers?, auth?, as? })` \u2014 invoke an endpoint. `api` takes the `query()` def HANDLE (or a `{ name, guid }` pair) \u2014 a bare name is refused, because a query\'s identity is composed from its api group, verb, and name. `headers` REPLACES the request headers the callee sees and takes the same shapes as `s.api.request`\'s \u2014 a `{ "Name": value }` record (values may be tagged), a `string[]` of `"Name: value"` lines, or one `Value`. `auth` is `{ token, ignoreExpiration? }`: `token` must be a BARE STRING \u2014 a tagged `Value` deploys clean and then fails the run with `Param: token - Text filter requires an integer, float, string or boolean value`, since the engine stores that slot as plain text and never evaluates it. Neither slot authenticates the call today; see `llms/tests.md` for what a workflow-test run actually sees. WORKFLOW-TEST ONLY (see Gotchas in `llms.txt`) \u2014 elsewhere it deploys clean and 500s the first real request.',
1746
1793
  '- `s.api.request({ url, method?, params?, headers?, timeout?, follow_location?, verify_host?, verify_peer?, ca_certificate?, certificate?, certificate_pass?, private_key?, private_key_pass?, description?, output?, as? })` \u2014 external HTTP request (`mvp:api_request`). Ergonomic types, each also accepting a dynamic `Value`: `method` suggests the 7 verbs (GET/POST/PUT/DELETE/HEAD/OPTIONS/PATCH), `params` a plain JSON object **or** a FLAT record whose values are tagged `Value`s (`{ count: ref("count") }`, each lifted via a `set` filter \u2014 the same record-of-values shape `response: { key: value }` takes); a tagged value NESTED inside an object or array THROWS at encode, so wrap a structured body in `obj({...})`, which encodes any depth as one `const:expr2` (\u2192 query string for GET/HEAD/OPTIONS, body otherwise), `headers` a `{ "Name": value }` record whose values may be tagged (`{ "x-api-key": env("KEY") }`, each pair joined to a `"Name: value"` line) **or** a `string[]` of full header lines \u2014 prefer a header over a `?key=` query param for a credential \u2014 a URL travels into access logs, proxies and `Referer`. \u26A0 Neither spelling is envelope-safe: the `as` envelope\'s `request` half mirrors `url`, `params` AND `headers`, so never return it raw from a credentialed request \u2014 read `response.result`. A NAME outside the header-token charset is refused, and a LITERAL value carrying a newline is refused; a value may hold `:` and spaces (`Bearer a: b` is a valid value). A TAGGED value cannot be checked at build time, so strip CRLF from caller-controlled input before this slot. Literal pairs lead the emitted array and computed ones follow, so the wire order is not the record\'s key order, `timeout` a `number` in seconds (1\u201386400), and `follow_location`/`verify_host`/`verify_peer` booleans. `description` (Settings tab) and `output` filters (Output tab) ride the envelope. SSL cert interdependencies (certificate\u2194private_key, ca_certificate\u2192verify_peer) are checked at build time when statically provable, else by the engine at runtime. The `as` result is typed as the `{request, response}` envelope (`response.status: number`, `response.result: unknown`), so `InferResponse` resolves a `ref` to it. Same typed result on `webflow.request` and `microservice.request`.',
1747
1794
  "- `s.stream.from_request({ url, method?, \u2026tls, as? })` \u2014 streaming external HTTP request (`mvp:streaming_api_request`); same typed field surface as `s.api.request` (no description/output envelope). `url` is REQUIRED \u2014 it shares `api.request`'s engine declaration, which has no default.",
1748
1795
  "- `s.webflow.request({ path, method?, \u2026tls, as? })` \u2014 Webflow API request (`mvp:connect_webflow_api_request`); like `s.api.request` but addressed by `path` (host is engine-supplied), and `path` is REQUIRED \u2014 the engine rejects an empty one. No `headers`: the engine builds its own from the workspace's Webflow connection and ignores an authored value.",
@@ -1753,6 +1800,8 @@ function renderSections(m) {
1753
1800
  "",
1754
1801
  "Microservices (the `microservice()` def and the statement that calls it):",
1755
1802
  "",
1803
+ "- `microservice({ name, kind, \u2026 })` \u2014 two mutually exclusive shapes via `kind`: `builtin` declares containers (image/ports/resources/env/command/args) plus optional `ingresses`, and `helm` points at a chart and its `values` \u2014 passing both throws. EARLY SURFACE, expected to change \u2014 every export of a workspace declaring one prints a notice saying so. `configs`/`volumes` are typed and `@deprecated` but NOT deployable: the engine rejects an import carrying either, so `export()` fails the build rather than letting the deploy fatal. Put a value the workload reads in a container's `env`, and storage in a container's own `volumes` (`emptyDir`/`persistent`/`config`). Container names are free-form \u2014 they need not match the microservice name, which is what a stack addresses.",
1804
+ '- SECRETS RIDE ALONG \u2014 `chart.values` and `registryAuth.dockerconfigjson` are carried into the bundle, and into a pulled tree, verbatim (they must be, or a pulled microservice could not be redeployed). Both are stored strings with NO deploy-time indirection: `process.env.X` in the def resolves at EXPORT and writes the literal into the bundle, so it is not a way to keep the credential out. Either leave `registryAuth` unset (public image, or a credential attached outside this workspace) or treat the bundle and any pulled tree as secret material \u2014 keep them out of git, or rotate after. Export prints a notice per microservice carrying either field; `--strict` does not promote it. For a secret a STACK reads, the mapped surface is `workspaceConfig({ env })` + `env("NAME")`.',
1756
1805
  '- `s.microservice.request({ host, path, port?, method?, params?, headers?, timeout?, follow_location?, as? })` \u2014 in-cluster microservice call (`mvp:microservice_request`); no TLS fields. ONLY `host`+`path` required; the rest default to the engine\'s values (`GET`/`{}`/`[]`/`10`/`true`), always emitted. Pass the `microservice()` DEF as `host` \u2014 it binds by NAME (how the engine resolves it), so a rename fixes every call site and the port is checked before deploy. `port?` folds into `host` as `"name:port"`: a def exposing ONE `servicePort` resolves automatically, SEVERAL requires it. A raw `"name:port"` string works, unvalidated, and is the only way to reach an instance-level microservice. `tenantDeploy: "manual"` on the def imports the row without starting the workload.',
1757
1806
  "- `s.workflow_test.call({ workflowTest, datasource?, as? })` \u2014 run another workflow test from inside one, which is the only place it runs (see Gotchas in `llms.txt`). The odd one out: NO `input` (a workflow test takes none), and it carries `datasource?` instead \u2014 same clone caveat as the kind's own field.",
1758
1807
  ""
@@ -1847,6 +1896,7 @@ function renderSections(m) {
1847
1896
  );
1848
1897
  return {
1849
1898
  router: lines,
1899
+ lock,
1850
1900
  legacy,
1851
1901
  objectKinds,
1852
1902
  kindsCore,
@@ -1882,7 +1932,7 @@ function renderDocs(m) {
1882
1932
  {
1883
1933
  path: "llms/object-kinds.md",
1884
1934
  title: "Object kinds",
1885
- readWhen: "Read when you need the full catalog of authorable primitives \u2014 which factory builds each, which register method takes it, and which payload key it lands under. Read it too when a `register*` call will not typecheck because the array was built by `.flatMap()`/`.concat()` across modules.",
1935
+ readWhen: "Read when deciding WHAT to build \u2014 every authorable primitive (tables, endpoints, functions, tasks, agents, MCP, realtime, microservices, \u2026), what each is, and which factory + register method build it. Read it too when a `register*` call will not typecheck because the array was built by `.flatMap()`/`.concat()` across modules.",
1886
1936
  body: s.objectKinds,
1887
1937
  dropLeadingHeading: true
1888
1938
  },
@@ -1940,7 +1990,7 @@ function renderDocs(m) {
1940
1990
  {
1941
1991
  path: "llms/statements-calls.md",
1942
1992
  title: "Auth, cross-object calls, and microservices",
1943
- readWhen: "Read when the stack authenticates, calls another object (`s.function.run`, `s.api.request`, `s.tool.call`), or reaches a microservice.",
1993
+ readWhen: "Read when the stack authenticates (the signup/login/token recipe is here), calls another object (`s.function.run`, `s.api.request`, `s.tool.call`), or reaches a microservice.",
1944
1994
  body: s.stmtCalls
1945
1995
  },
1946
1996
  {
@@ -1967,14 +2017,21 @@ function renderDocs(m) {
1967
2017
  {
1968
2018
  path: "llms/lambda.md",
1969
2019
  title: "Lambda bodies (JavaScript)",
1970
- readWhen: "Read when writing a JavaScript body, or weighing whether to reach for one at all \u2014 `lam.fn`, `fl.lambda`, `fl.reduce`, `s.lambda`. Lambda workers are a bounded shared resource, each surface binds a different set of identifiers, and the hazards are not guessable.",
2020
+ readWhen: "Read when writing a JavaScript body, or weighing whether to reach for one at all \u2014 `lam.fn`, `fl.lambda`, `fl.reduce`, `s.lambda`. Lambda workers are a bounded shared resource, and each surface binds a different set of identifiers.",
1971
2021
  body: s.lambda,
1972
2022
  dropLeadingHeading: true
1973
2023
  },
2024
+ {
2025
+ path: "llms/lock.md",
2026
+ title: "Lock file",
2027
+ readWhen: "Read when a `xano.lock` exists or should \u2014 renaming/pruning/adopting identities, seeding the lock programmatically, or asking which commands write it.",
2028
+ body: s.lock,
2029
+ dropLeadingHeading: true
2030
+ },
1974
2031
  {
1975
2032
  path: "llms/legacy.md",
1976
2033
  title: "Legacy paradigms and retired statements",
1977
- readWhen: 'Read when the code was PULLED from an existing Xano instance rather than authored here \u2014 how a codegen\'d tree reads and the three shapes in it that must not be "fixed", plus a `raw({ name: "mvp:\u2026" })` statement, a `realtimeTrigger()`, or any name the catalogs do not list. None of the retired names are authorable for new code.',
2034
+ readWhen: 'Read when the code was PULLED from an existing Xano instance rather than authored here \u2014 how a codegen\'d tree reads and the three shapes in it that must not be "fixed", plus a `raw({ name: "mvp:\u2026" })` statement, a `realtimeTrigger()`, or any name the catalogs do not list.',
1978
2035
  body: s.legacy,
1979
2036
  dropLeadingHeading: true
1980
2037
  },
@@ -1990,9 +2047,8 @@ function renderDocs(m) {
1990
2047
  "",
1991
2048
  "Each line is a condition on the task. Open the files whose condition matches and",
1992
2049
  "skip the rest \u2014 paths are relative to this file (`node_modules/@xanots/sdk/` once",
1993
- "installed), so they resolve with a plain file read and always match the version you",
1994
- `have. \`${LLMS_FULL_TXT}\` is this file and every one below concatenated \u2014 for a reader`,
1995
- "that wants one fetch, not for an agent that can open the two files it needs.",
2050
+ `installed), so a plain file read resolves them at the version you have.`,
2051
+ `\`${LLMS_FULL_TXT}\` is everything concatenated \u2014 one fetch, for a reader that cannot open files.`,
1996
2052
  "",
1997
2053
  ...topics.map((t) => `- [${t.title}](${t.path}): ${t.readWhen}`),
1998
2054
  ""
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  readLockFile,
3
3
  writeLockFile
4
- } from "./chunk-OLQLJY5T.js";
4
+ } from "./chunk-OYMR5AMJ.js";
5
5
  import "./chunk-GNPVYOPB.js";
6
- import "./chunk-EFH4NFPY.js";
6
+ import "./chunk-7JDT4PBU.js";
7
7
  export {
8
8
  readLockFile,
9
9
  writeLockFile
10
10
  };
11
- //# sourceMappingURL=io-65CJNLYI.js.map
11
+ //# sourceMappingURL=io-M7XZEMK7.js.map
@@ -4,9 +4,11 @@ import {
4
4
  LOCK_VERSION,
5
5
  WORKSPACE_KEY,
6
6
  adoptFromBundle,
7
+ appNamesByGuid,
7
8
  createLockContext,
8
9
  emptyLock,
9
10
  lockKey,
11
+ lockNameForObject,
10
12
  mergeObserved,
11
13
  mintCanonical,
12
14
  parseLock,
@@ -15,16 +17,18 @@ import {
15
17
  resolvePayloadKey,
16
18
  serializeLock,
17
19
  validateLockModel
18
- } from "./chunk-EFH4NFPY.js";
20
+ } from "./chunk-7JDT4PBU.js";
19
21
  export {
20
22
  CANONICAL_PAYLOAD_KEYS,
21
23
  LOCK_PAYLOAD_KEYS,
22
24
  LOCK_VERSION,
23
25
  WORKSPACE_KEY,
24
26
  adoptFromBundle,
27
+ appNamesByGuid,
25
28
  createLockContext,
26
29
  emptyLock,
27
30
  lockKey,
31
+ lockNameForObject,
28
32
  mergeObserved,
29
33
  mintCanonical,
30
34
  parseLock,
@@ -34,4 +38,4 @@ export {
34
38
  serializeLock,
35
39
  validateLockModel
36
40
  };
37
- //# sourceMappingURL=lock-PDFCNYUW.js.map
41
+ //# sourceMappingURL=lock-GFXD6G2E.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadDefault
3
- } from "./chunk-SOCYCBYG.js";
3
+ } from "./chunk-CL2H2WYE.js";
4
4
  import {
5
5
  UsageError,
6
6
  missingArgument,
@@ -9,14 +9,14 @@ import {
9
9
  import {
10
10
  readLockFile,
11
11
  writeLockFile
12
- } from "./chunk-OLQLJY5T.js";
12
+ } from "./chunk-OYMR5AMJ.js";
13
13
  import "./chunk-GNPVYOPB.js";
14
14
  import "./chunk-EZG76F7R.js";
15
15
  import {
16
16
  Xano
17
- } from "./chunk-3FQD3QME.js";
17
+ } from "./chunk-FAWNUE2U.js";
18
18
  import "./chunk-OKNSR7MT.js";
19
- import "./chunk-CQBJNFDK.js";
19
+ import "./chunk-NJGNUVXR.js";
20
20
  import "./chunk-WHOJWOSV.js";
21
21
  import "./chunk-5XZ744TS.js";
22
22
  import {
@@ -27,7 +27,7 @@ import {
27
27
  resetLockOverrides,
28
28
  resolvePayloadKey,
29
29
  seedLockOverrides
30
- } from "./chunk-EFH4NFPY.js";
30
+ } from "./chunk-7JDT4PBU.js";
31
31
 
32
32
  // src/emit/lock-commands.ts
33
33
  import { existsSync, readFileSync } from "fs";
@@ -229,4 +229,4 @@ ${lines}
229
229
  export {
230
230
  runLockCommand
231
231
  };
232
- //# sourceMappingURL=lock-commands-MC6I3MZA.js.map
232
+ //# sourceMappingURL=lock-commands-7VJKAXV6.js.map
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-4PTSTDIG.js";
9
9
  import {
10
10
  envMetaCredentialVarsSet
11
- } from "./chunk-SG4UBJ47.js";
11
+ } from "./chunk-3QW5NFZJ.js";
12
12
  import {
13
13
  CALLBACK_PATH,
14
14
  DEFAULT_PORT,
@@ -23,7 +23,7 @@ import {
23
23
  resolveAuthHost,
24
24
  resolveScope,
25
25
  writeCredential
26
- } from "./chunk-LLWK6H77.js";
26
+ } from "./chunk-BKDJN76G.js";
27
27
  import {
28
28
  UsageError
29
29
  } from "./chunk-JQLR64UC.js";
@@ -267,4 +267,4 @@ async function acquireByPaste(p) {
267
267
  export {
268
268
  runLoginCommand
269
269
  };
270
- //# sourceMappingURL=login-command-LCOOOPO2.js.map
270
+ //# sourceMappingURL=login-command-DFCURZLC.js.map
@@ -5,7 +5,7 @@ import {
5
5
  readCredential,
6
6
  resolveAuthFilePath,
7
7
  resolveScope
8
- } from "./chunk-LLWK6H77.js";
8
+ } from "./chunk-BKDJN76G.js";
9
9
  import "./chunk-GNPVYOPB.js";
10
10
  import {
11
11
  detail,
@@ -65,4 +65,4 @@ async function runLogoutCommand(args) {
65
65
  export {
66
66
  runLogoutCommand
67
67
  };
68
- //# sourceMappingURL=logout-command-J2AG5NKC.js.map
68
+ //# sourceMappingURL=logout-command-WXVZQCAV.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-BJONDJoZ.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-BJONDJoZ.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-DfuWu1tE.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-DfuWu1tE.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
  import { V as Value } from './response-CVAE2kMj.js';
5
5
  export { B as BrandOpts, c as BrandValue, C as CacheXdo, f as CaughtField, h as ConditionalContext, j as ConditionalElifContext, D as DecimalMethod, E as EmailMethod, k as ExprGroup, l as ExprNode, m as ExprOperand, n as ExprStatement, o as FieldAccess, p as FieldDescriptor, q as FieldMap, s as FieldOpts, u as FieldStyleType, v as FieldXdo, w as FilterXdo, x as FilteredValue, y as FromFieldMap, F as FunctionXdo, H as HistoryXdo, I as InputXdo, z as IntMethod, L as ListBoundsXdo, M as MethodArg, A as MethodOpts, G as MethodSpec, J as MethodXdo, K as MockEntry, N as MockMap, O as MockXdo, P as ObjInput, Q as ObjMember, S as ObjValue, T as ObjectRef, U as PasswordMethod, W as PersistedFunctionRow, X as RefValue, Y as RegexValue, Z as ResponseDef, _ as ResultItemXdo, $ as RowFromFieldMap, a0 as StackItemXdo, a1 as Statement, a2 as StatementAnnotations, a3 as StatementInputXdo, a4 as StatementOptions, a5 as TAGS, a6 as TEST_EXPECT_TYPES, a7 as TableRefMethod, a8 as Tag, a9 as TaggedValue, aa as TestDef, ab as TestExpect, ac as TestExpectType, ad as TestXdo, ae as TextFormat, af as TextMethod, ag as TypeBrand, ah as ValueOf, ai as VectorMethod, aj as XanoFileRef, ak as XanoGeoPosition, al as XanoGeoValue, am as annotate, an as auth, ao as c, ap as caught, aq as col, ar as env, as as expect, at as f, au as filter, av as inp, aw as obj, ax as out, ay as ref, az as resp, aA as setting, aB as statements, aC as sys, aD as test, aE as toolset, aF as withFilters } from './response-CVAE2kMj.js';