@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
package/dist/node.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  TEST_EXPECT_TYPES,
7
7
  expect
8
- } from "./chunk-JRGDLAEA.js";
8
+ } from "./chunk-JAVB27HL.js";
9
9
  import {
10
10
  addon,
11
11
  agent,
@@ -17,7 +17,7 @@ import {
17
17
  task,
18
18
  tool,
19
19
  workflowTest
20
- } from "./chunk-CU5VOSTW.js";
20
+ } from "./chunk-JUHKEAHJ.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-GC7ZQHW7.js";
103
+ } from "./chunk-2V3JUXTF.js";
104
104
  import {
105
105
  exportBundleJson,
106
106
  loadDefault,
@@ -108,18 +108,18 @@ import {
108
108
  run,
109
109
  writeArtifact,
110
110
  writeBundle
111
- } from "./chunk-SOCYCBYG.js";
111
+ } from "./chunk-CL2H2WYE.js";
112
112
  import "./chunk-JQLR64UC.js";
113
113
  import {
114
114
  readLockFile,
115
115
  writeLockFile
116
- } from "./chunk-OLQLJY5T.js";
116
+ } from "./chunk-OYMR5AMJ.js";
117
117
  import "./chunk-GNPVYOPB.js";
118
118
  import "./chunk-EZG76F7R.js";
119
119
  import {
120
120
  Xano,
121
121
  workspace
122
- } from "./chunk-3FQD3QME.js";
122
+ } from "./chunk-FAWNUE2U.js";
123
123
  import "./chunk-OKNSR7MT.js";
124
124
  import {
125
125
  LAMBDA_BINDINGS,
@@ -167,7 +167,7 @@ import {
167
167
  toSearchParams,
168
168
  toolset,
169
169
  withFilters
170
- } from "./chunk-CQBJNFDK.js";
170
+ } from "./chunk-NJGNUVXR.js";
171
171
  import "./chunk-WHOJWOSV.js";
172
172
  import {
173
173
  annotate,
@@ -176,7 +176,7 @@ import {
176
176
  import {
177
177
  resetLockOverrides,
178
178
  seedLockOverrides
179
- } from "./chunk-EFH4NFPY.js";
179
+ } from "./chunk-7JDT4PBU.js";
180
180
 
181
181
  // src/values/lambda-file.ts
182
182
  import { readFileSync } from "fs";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getAccessToken
3
- } from "./chunk-SG4UBJ47.js";
4
- import "./chunk-LLWK6H77.js";
3
+ } from "./chunk-3QW5NFZJ.js";
4
+ import "./chunk-BKDJN76G.js";
5
5
  import {
6
6
  isMachineOutput,
7
7
  writeJson
@@ -74,4 +74,4 @@ export {
74
74
  fetchProfile,
75
75
  runProfileCommand
76
76
  };
77
- //# sourceMappingURL=profile-command-ZPC2DPFV.js.map
77
+ //# sourceMappingURL=profile-command-QJAAUZIV.js.map
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  assertBundleInput,
8
8
  loadBundleText
9
- } from "./chunk-QVSUMHNN.js";
9
+ } from "./chunk-7BUTRVKA.js";
10
10
  import {
11
11
  sharedSchemaChanges
12
12
  } from "./chunk-5HCDZ2XN.js";
@@ -24,8 +24,8 @@ import {
24
24
  } from "./chunk-4PTSTDIG.js";
25
25
  import {
26
26
  getAccessToken
27
- } from "./chunk-SG4UBJ47.js";
28
- import "./chunk-LLWK6H77.js";
27
+ } from "./chunk-3QW5NFZJ.js";
28
+ import "./chunk-BKDJN76G.js";
29
29
  import {
30
30
  encodeWorkspaceArchive
31
31
  } from "./chunk-ZUTSMMAG.js";
@@ -37,14 +37,14 @@ import {
37
37
  import "./chunk-3IGNIP6R.js";
38
38
  import {
39
39
  resolveLockPath
40
- } from "./chunk-SOCYCBYG.js";
40
+ } from "./chunk-CL2H2WYE.js";
41
41
  import {
42
42
  UsageError,
43
43
  assertWritableDest
44
44
  } from "./chunk-JQLR64UC.js";
45
45
  import {
46
46
  readLockFile
47
- } from "./chunk-OLQLJY5T.js";
47
+ } from "./chunk-OYMR5AMJ.js";
48
48
  import "./chunk-GNPVYOPB.js";
49
49
  import {
50
50
  blank,
@@ -55,15 +55,15 @@ import {
55
55
  success,
56
56
  warn
57
57
  } from "./chunk-EZG76F7R.js";
58
- import "./chunk-3FQD3QME.js";
58
+ import "./chunk-FAWNUE2U.js";
59
59
  import "./chunk-OKNSR7MT.js";
60
- import "./chunk-CQBJNFDK.js";
60
+ import "./chunk-NJGNUVXR.js";
61
61
  import "./chunk-WHOJWOSV.js";
62
62
  import "./chunk-5XZ744TS.js";
63
63
  import {
64
64
  REFERENCEABLE_KIND_PAYLOAD_KEYS,
65
65
  lockKey
66
- } from "./chunk-EFH4NFPY.js";
66
+ } from "./chunk-7JDT4PBU.js";
67
67
 
68
68
  // src/emit/release-command.ts
69
69
  import { existsSync } from "fs";
@@ -179,12 +179,24 @@ function payloadKeyFor(type) {
179
179
  return REFERENCEABLE_KIND_PAYLOAD_KEYS[type] ?? type;
180
180
  }
181
181
  function splitPruneDeletes(plan, tracked) {
182
+ const ownedQueryNames = /* @__PURE__ */ new Set();
183
+ for (const key of tracked) {
184
+ if (!key.startsWith("query:")) continue;
185
+ const lockName = key.slice("query:".length);
186
+ const lastSep = lockName.lastIndexOf("|");
187
+ ownedQueryNames.add(lastSep === -1 ? lockName : lockName.slice(lastSep + 1));
188
+ }
189
+ const isOwned = (op) => {
190
+ const payloadKey = payloadKeyFor(op.type);
191
+ if (payloadKey === "query") return ownedQueryNames.has(op.name);
192
+ return tracked.has(lockKey(payloadKey, op.name));
193
+ };
182
194
  const collateral = [];
183
195
  const owned = [];
184
196
  for (const op of plan.operations) {
185
197
  if (op.action !== "delete") continue;
186
198
  if (IDENTITY_EXEMPT_TYPES.has(op.type)) continue;
187
- (tracked.has(lockKey(payloadKeyFor(op.type), op.name)) ? owned : collateral).push(op);
199
+ (isOwned(op) ? owned : collateral).push(op);
188
200
  }
189
201
  return { collateral, owned };
190
202
  }
@@ -206,8 +218,8 @@ async function reconcileLockAfterReplace(args, auth, workspaceId) {
206
218
  return;
207
219
  }
208
220
  try {
209
- const { adoptFromBundle } = await import("./lock-PDFCNYUW.js");
210
- const { readLockFile: readLockFile2, writeLockFile } = await import("./io-65CJNLYI.js");
221
+ const { adoptFromBundle } = await import("./lock-GFXD6G2E.js");
222
+ const { readLockFile: readLockFile2, writeLockFile } = await import("./io-M7XZEMK7.js");
211
223
  const { lock, added, changed } = adoptFromBundle(readLockFile2(lockPath), live, lockPath);
212
224
  writeLockFile(lockPath, lock);
213
225
  const touched = added.length + changed.length;
@@ -431,7 +443,7 @@ async function runReleaseCommand(args) {
431
443
  { withSeed: req.records === true }
432
444
  );
433
445
  if (args.static !== void 0) {
434
- const { assertNoSeedLeaks } = await import("./deploy-command-MTQQXPOO.js");
446
+ const { assertNoSeedLeaks } = await import("./deploy-command-HM57BINV.js");
435
447
  await assertNoSeedLeaks(args.static, nonPublicSeedValues, args.allowSeedInStatic);
436
448
  }
437
449
  const workspaceId = auth.workspaceId;
@@ -573,7 +585,7 @@ Retry, or drop \`--backup-branch\` to release without one.`,
573
585
  ...backupLabel !== void 0 ? { backupBranch: backupLabel } : {}
574
586
  };
575
587
  if (args.static !== void 0) {
576
- const { buildStaticEnv, deployStaticTo } = await import("./deploy-command-MTQQXPOO.js");
588
+ const { buildStaticEnv, deployStaticTo } = await import("./deploy-command-HM57BINV.js");
577
589
  const env = buildStaticEnv(auth.instance, args.staticEnv);
578
590
  const explicit = Object.keys(args.staticEnv).length > 0;
579
591
  summary.static = await deployStaticTo(
@@ -592,4 +604,4 @@ Retry, or drop \`--backup-branch\` to release without one.`,
592
604
  export {
593
605
  runReleaseCommand
594
606
  };
595
- //# sourceMappingURL=release-command-V4K4IORX.js.map
607
+ //# sourceMappingURL=release-command-3IET7YII.js.map
@@ -2,10 +2,10 @@ import {
2
2
  fetchSandboxDetails,
3
3
  runSandboxDetailsCommand,
4
4
  sandboxBaseUrl
5
- } from "./chunk-OR43PDCW.js";
5
+ } from "./chunk-3EYUR3TX.js";
6
6
  import "./chunk-NDZFBZHC.js";
7
- import "./chunk-SG4UBJ47.js";
8
- import "./chunk-LLWK6H77.js";
7
+ import "./chunk-3QW5NFZJ.js";
8
+ import "./chunk-BKDJN76G.js";
9
9
  import "./chunk-NUQCEOKA.js";
10
10
  import "./chunk-3IGNIP6R.js";
11
11
  import "./chunk-GNPVYOPB.js";
@@ -15,4 +15,4 @@ export {
15
15
  runSandboxDetailsCommand,
16
16
  sandboxBaseUrl
17
17
  };
18
- //# sourceMappingURL=sandbox-details-command-DMY2KGA2.js.map
18
+ //# sourceMappingURL=sandbox-details-command-EDO56IY3.js.map
@@ -3,11 +3,11 @@ import {
3
3
  fetchSandboxMultidoc,
4
4
  resolveOutputTarget,
5
5
  runSandboxExportCommand
6
- } from "./chunk-AAFBSOSD.js";
7
- import "./chunk-OR43PDCW.js";
6
+ } from "./chunk-JQJPFUZI.js";
7
+ import "./chunk-3EYUR3TX.js";
8
8
  import "./chunk-NDZFBZHC.js";
9
- import "./chunk-SG4UBJ47.js";
10
- import "./chunk-LLWK6H77.js";
9
+ import "./chunk-3QW5NFZJ.js";
10
+ import "./chunk-BKDJN76G.js";
11
11
  import "./chunk-QTNO2WD6.js";
12
12
  import "./chunk-ZUTSMMAG.js";
13
13
  import "./chunk-X4DVXBFY.js";
@@ -21,4 +21,4 @@ export {
21
21
  resolveOutputTarget,
22
22
  runSandboxExportCommand
23
23
  };
24
- //# sourceMappingURL=sandbox-export-command-R6QMEK3D.js.map
24
+ //# sourceMappingURL=sandbox-export-command-MO6DEZ7Z.js.map
@@ -5979,7 +5979,7 @@ interface QueryDef<I extends Record<string, InputDescriptor> = Record<string, In
5979
5979
  * Captured as a literal so `getPath({ params })` types its keys from it.
5980
5980
  */
5981
5981
  name: N;
5982
- /** Explicit Xano `guid` (this object's identity). Defaults to a guid derived from `name`; set it to keep identity across a rename or to match an existing object. */
5982
+ /** Explicit Xano `guid` (this object's identity). Defaults to a guid derived from `(apiGroup, verb, name)` a query's engine uniqueness — so a `GET`/`POST` pair on one path, and one path across two groups, are distinct objects. Set it to keep identity across a rename or to match an existing object. */
5983
5983
  guid?: string;
5984
5984
  /**
5985
5985
  * The HTTP method, UPPERCASE — one of `GET`, `POST`, `PUT`, `PATCH`,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  resolveMetaTarget
3
- } from "./chunk-CEFYM6N5.js";
4
- import "./chunk-WJYB7DSI.js";
5
- import "./chunk-OR43PDCW.js";
3
+ } from "./chunk-H2DEDWQF.js";
4
+ import "./chunk-MDXR5E5Q.js";
5
+ import "./chunk-3EYUR3TX.js";
6
6
  import "./chunk-NDZFBZHC.js";
7
7
  import {
8
8
  getAccessToken
9
- } from "./chunk-SG4UBJ47.js";
10
- import "./chunk-LLWK6H77.js";
9
+ } from "./chunk-3QW5NFZJ.js";
10
+ import "./chunk-BKDJN76G.js";
11
11
  import {
12
12
  isMachineOutput,
13
13
  writeJson
@@ -380,4 +380,4 @@ export {
380
380
  runSuite,
381
381
  runTestCommand
382
382
  };
383
- //# sourceMappingURL=test-command-OEBIGOPP.js.map
383
+ //# sourceMappingURL=test-command-S7SMRWMP.js.map
@@ -7,8 +7,8 @@ import {
7
7
  } from "./chunk-NUQCEOKA.js";
8
8
  import {
9
9
  refreshAgentFiles
10
- } from "./chunk-P5OAM3G2.js";
11
- import "./chunk-2SUCC4DV.js";
10
+ } from "./chunk-QIWBCS7N.js";
11
+ import "./chunk-4PE4ZAB7.js";
12
12
  import {
13
13
  runNpm
14
14
  } from "./chunk-ZSYZTGJH.js";
@@ -22,10 +22,10 @@ import {
22
22
  registryUrl,
23
23
  suppressUpdateNotice,
24
24
  upgradeCommand
25
- } from "./chunk-Y7BARS25.js";
26
- import "./chunk-SOCYCBYG.js";
25
+ } from "./chunk-FDKR4YMN.js";
26
+ import "./chunk-CL2H2WYE.js";
27
27
  import "./chunk-JQLR64UC.js";
28
- import "./chunk-OLQLJY5T.js";
28
+ import "./chunk-OYMR5AMJ.js";
29
29
  import "./chunk-GNPVYOPB.js";
30
30
  import {
31
31
  blank,
@@ -35,12 +35,12 @@ import {
35
35
  success,
36
36
  warn
37
37
  } from "./chunk-EZG76F7R.js";
38
- import "./chunk-3FQD3QME.js";
38
+ import "./chunk-FAWNUE2U.js";
39
39
  import "./chunk-OKNSR7MT.js";
40
- import "./chunk-CQBJNFDK.js";
40
+ import "./chunk-NJGNUVXR.js";
41
41
  import "./chunk-WHOJWOSV.js";
42
42
  import "./chunk-5XZ744TS.js";
43
- import "./chunk-EFH4NFPY.js";
43
+ import "./chunk-7JDT4PBU.js";
44
44
 
45
45
  // src/emit/upgrade-command.ts
46
46
  import { readFileSync, writeFileSync } from "fs";
@@ -174,4 +174,4 @@ function messageOf(err) {
174
174
  export {
175
175
  runUpgradeCommand
176
176
  };
177
- //# sourceMappingURL=upgrade-command-52AAZ3NV.js.map
177
+ //# sourceMappingURL=upgrade-command-TZYSGXP7.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  assertBundleInput,
3
3
  loadBundleText
4
- } from "./chunk-QVSUMHNN.js";
5
- import "./chunk-SOCYCBYG.js";
4
+ } from "./chunk-7BUTRVKA.js";
5
+ import "./chunk-CL2H2WYE.js";
6
6
  import "./chunk-JQLR64UC.js";
7
- import "./chunk-OLQLJY5T.js";
7
+ import "./chunk-OYMR5AMJ.js";
8
8
  import "./chunk-GNPVYOPB.js";
9
9
  import {
10
10
  blank,
@@ -14,12 +14,12 @@ import {
14
14
  success,
15
15
  warn
16
16
  } from "./chunk-EZG76F7R.js";
17
- import "./chunk-3FQD3QME.js";
17
+ import "./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
- import "./chunk-EFH4NFPY.js";
22
+ import "./chunk-7JDT4PBU.js";
23
23
 
24
24
  // src/emit/validate-command.ts
25
25
  var EXIT_VALIDATION_FAILED = 2;
@@ -119,4 +119,4 @@ function fmt(v) {
119
119
  export {
120
120
  runValidateCommand
121
121
  };
122
- //# sourceMappingURL=validate-command-KTLPSSH7.js.map
122
+ //# sourceMappingURL=validate-command-MMXEVHH3.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  fetchWorkspaceBundle,
3
3
  runCodegenCommand
4
- } from "./chunk-TYBB7ON3.js";
4
+ } from "./chunk-5PDOAR77.js";
5
5
  import "./chunk-ZOYMZZ3S.js";
6
6
  import {
7
7
  resolveOutputTarget
8
- } from "./chunk-AAFBSOSD.js";
9
- import "./chunk-OR43PDCW.js";
8
+ } from "./chunk-JQJPFUZI.js";
9
+ import "./chunk-3EYUR3TX.js";
10
10
  import {
11
11
  printMicroserviceSection,
12
12
  readMicroservices
@@ -14,35 +14,35 @@ import {
14
14
  import {
15
15
  ENV_WORKSPACE,
16
16
  getAccessToken
17
- } from "./chunk-SG4UBJ47.js";
18
- import "./chunk-LLWK6H77.js";
17
+ } from "./chunk-3QW5NFZJ.js";
18
+ import "./chunk-BKDJN76G.js";
19
19
  import "./chunk-QTNO2WD6.js";
20
20
  import "./chunk-ZUTSMMAG.js";
21
21
  import "./chunk-X4DVXBFY.js";
22
- import "./chunk-4HDOP7LH.js";
22
+ import "./chunk-DBHE35JM.js";
23
23
  import {
24
24
  isMachineOutput,
25
25
  writeJson
26
26
  } from "./chunk-NUQCEOKA.js";
27
- import "./chunk-2SUCC4DV.js";
27
+ import "./chunk-4PE4ZAB7.js";
28
28
  import "./chunk-ZSYZTGJH.js";
29
29
  import {
30
30
  fetchOrExplain,
31
31
  httpFailure
32
32
  } from "./chunk-3IGNIP6R.js";
33
- import "./chunk-JRGDLAEA.js";
33
+ import "./chunk-JAVB27HL.js";
34
34
  import "./chunk-LU7TRWMC.js";
35
35
  import "./chunk-MU3O43L2.js";
36
36
  import "./chunk-P5C2YKAM.js";
37
37
  import "./chunk-Q77KNEUL.js";
38
38
  import "./chunk-4BXJGVZ3.js";
39
- import "./chunk-GC7ZQHW7.js";
40
- import "./chunk-SOCYCBYG.js";
39
+ import "./chunk-2V3JUXTF.js";
40
+ import "./chunk-CL2H2WYE.js";
41
41
  import {
42
42
  removedSubcommand,
43
43
  unknownSubcommand
44
44
  } from "./chunk-JQLR64UC.js";
45
- import "./chunk-OLQLJY5T.js";
45
+ import "./chunk-OYMR5AMJ.js";
46
46
  import "./chunk-GNPVYOPB.js";
47
47
  import {
48
48
  formatFields,
@@ -50,12 +50,12 @@ import {
50
50
  step,
51
51
  success
52
52
  } from "./chunk-EZG76F7R.js";
53
- import "./chunk-3FQD3QME.js";
53
+ import "./chunk-FAWNUE2U.js";
54
54
  import "./chunk-OKNSR7MT.js";
55
- import "./chunk-CQBJNFDK.js";
55
+ import "./chunk-NJGNUVXR.js";
56
56
  import "./chunk-WHOJWOSV.js";
57
57
  import "./chunk-5XZ744TS.js";
58
- import "./chunk-EFH4NFPY.js";
58
+ import "./chunk-7JDT4PBU.js";
59
59
 
60
60
  // src/emit/workspace-command.ts
61
61
  import { writeFileSync } from "fs";
@@ -70,7 +70,7 @@ async function runWorkspaceCommand(args) {
70
70
  case "codegen":
71
71
  return runCodegenCommand(args, { kind: "workspace" });
72
72
  case "branch": {
73
- const { runBranchCommand } = await import("./branch-commands-R4FR75UW.js");
73
+ const { runBranchCommand } = await import("./branch-commands-PBQ36L4A.js");
74
74
  return runBranchCommand(args);
75
75
  }
76
76
  case "deploy":
@@ -160,4 +160,4 @@ async function runExport(args) {
160
160
  export {
161
161
  runWorkspaceCommand
162
162
  };
163
- //# sourceMappingURL=workspace-command-LX5S5N2H.js.map
163
+ //# sourceMappingURL=workspace-command-X6L7HTXO.js.map
@@ -65,8 +65,10 @@ Every top-level object carries a stable `guid` — Xano's identity anchor. On a
65
65
  the engine matches an incoming object to an existing one **by guid** and updates it in
66
66
  place; no match means a new object. So re-running `export`/`deploy` on the same code maps
67
67
  cleanly onto the same workspace — **no duplicates**. By default the guid derives from the
68
- object's `name`; set an explicit `guid` to pin identity across a rename, or to adopt an
69
- existing workspace object into code.
68
+ object's `name` for a **query**, from its api group, verb, and name together, which is
69
+ the engine's own uniqueness for an endpoint, so `GET items` and `POST items` are distinct
70
+ objects and a path may repeat across groups. Set an explicit `guid` to pin identity across
71
+ a rename, or to adopt an existing workspace object into code.
70
72
 
71
73
  The opt-in **`xano.lock`** freezes the whole workspace's identities at once — every
72
74
  auto-derived guid, plus the `canonical` URL tokens of API groups and toolsets (which the
@@ -81,7 +83,8 @@ guard. Adopt it early either way: once identities have drifted, the only way bac
81
83
  Precedence at emit is always **explicit in-code value → lock entry → name derivation**.
82
84
 
83
85
  **When the lock is actually load-bearing.** Because the default derivation is deterministic
84
- — `md5("<type>:<name>")` a project that created all of its own objects can regenerate a
86
+ — `md5("<type>:<name>")`, and `md5("query:<group>|<verb>|<name>")` for a query a project
87
+ that created all of its own objects can regenerate a
85
88
  byte-identical lock from its own source. Delete that lock, release again, and the same guids
86
89
  come back: the objects match and update in place. For that project the lock is a *cache*, and
87
90
  losing it costs nothing.
package/llms/fields.md CHANGED
@@ -57,6 +57,14 @@ the entry's own name. `hidden: ["created_at"]` drops columns from that expansion
57
57
  `input.list(element)` for arrays — wrap any element constructor, e.g.
58
58
  `input.list(input.text())` or `input.list(input.object({ id: f.int() }))`. Prefer the
59
59
  typed forms over `input.json()` when the shape is known.
60
+ **A file reaches a column in two steps.** `input.file` is the RAW upload (the request's
61
+ multipart/base64 bytes) and cannot be written to a file column directly: store it first —
62
+ `s.storage.create_image({ as: "img", value: ref("input.avatar"), access: "public" })`
63
+ (the request input bag is read as a dotted `ref("input.<name>")` here) — then write
64
+ `ref("img")` into the `f.image()` cell with `s.db.add`/`edit`. `access` defaults to
65
+ `"public"` (a guessable URL): pass `"private"` and hand out `s.storage.sign_private_url`
66
+ results for anything user-scoped. `create_video`/`create_audio`/`create_attachment` are
67
+ the same shape for the other file columns.
60
68
  **Typed inputs validate/coerce on bind, before your stack runs** — so reach for the
61
69
  specific type instead of hand-rolling checks. `input.email({ required: true })` rejects a
62
70
  malformed address with a 400 (and trims; add `methods: ["lower"]` to downcase) — no
@@ -5,7 +5,8 @@
5
5
  The def-object passed to each factory. `?` = optional. `input` is keyed by
6
6
  input name (`input.<type>(opts?)`); `stack` is `Statement[]` (`s.*`); `response`
7
7
  is a `ResponseDef` (see **Responses** below). Object identity is `guid?` —
8
- omit it and it derives from `name` (set it to survive a rename).
8
+ omit it and it derives from `name` (for a query, from group + verb + name; set it
9
+ to survive a rename).
9
10
 
10
11
  - `defineFunction({ name, guid?, description?, docs?, workspace?, input?, stack?, response?, tests? })`
11
12
  - `query({ name, verb, apiGroup?, guid?, auth?, input?, stack?, response?, responseType?, apiEnabled?, disabled?, cache?, description?, docs?, tests?, example? })`
package/llms/lambda.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Lambda bodies (JavaScript)
2
2
 
3
- > Read when writing a JavaScript body, or weighing whether to reach for one at all — `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.
3
+ > Read when writing a JavaScript body, or weighing whether to reach for one at all — `lam.fn`, `fl.lambda`, `fl.reduce`, `s.lambda`. Lambda workers are a bounded shared resource, and each surface binds a different set of identifiers.
4
4
 
5
5
  **A lambda is an escape hatch, not a default.** The body runs outside the request's own
6
6
  runtime, and a workspace has a BOUNDED pool of lambda workers every lambda in it shares
package/llms/legacy.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Legacy paradigms and retired statements
2
2
 
3
- > Read when the code was PULLED from an existing Xano instance rather than authored here — how a codegen'd tree reads and the three shapes in it that must not be "fixed", plus a `raw({ name: "mvp:…" })` statement, a `realtimeTrigger()`, or any name the catalogs do not list. None of the retired names are authorable for new code.
3
+ > Read when the code was PULLED from an existing Xano instance rather than authored here — how a codegen'd tree reads and the three shapes in it that must not be "fixed", plus a `raw({ name: "mvp:…" })` statement, a `realtimeTrigger()`, or any name the catalogs do not list.
4
4
 
5
5
  Older paradigms this SDK still supports and still emits when it decodes an existing
6
6
  workspace. **Do not author these.** They are listed by name only so you recognize them
package/llms/lock.md ADDED
@@ -0,0 +1,32 @@
1
+ # Lock file
2
+
3
+ > Read when a `xano.lock` exists or should — renaming/pruning/adopting identities, seeding the lock programmatically, or asking which commands write it.
4
+
5
+ `xano.lock` pins each object's guid and each api-group/toolset canonical, so renames
6
+ stay renames (guids otherwise derive from `(type, name)`; a query's from `(api group,
7
+ verb, name)`). Created by `xanots export <entry> --lock`, auto-read once present,
8
+ committed. A query's entry is keyed by that composed identity —
9
+ `query:<group>|<verb>|<name>` — the same seed its guid derives from; a legacy
10
+ `query:<name>` entry keeps pinning and is migrated by the next locked export (the
11
+ old key drops automatically once its guid re-lands under the composed one).
12
+
13
+ - `xanots lock rename <kind> <old> <new>` — `kind` is the payload key (or `table`/`api_group`).
14
+ Run it after renaming in code; the next export emits the original guid under the new name.
15
+ - `xanots lock prune <entry-file> [keys…] --yes` — drops orphaned entries. Finding orphans
16
+ RUNS the entry's module scope (env assertions included); `--no-verify --yes <kind:name>…`
17
+ prunes named keys with no evaluation and no orphan check.
18
+ - `xanots lock adopt <live-bundle.json> [--yes]` — seed the lock from an engine
19
+ packageExport when taking over an existing workspace.
20
+ - Every lock subcommand accepts `--lock=<path>`. `rename`/`adopt` take no entry file, so
21
+ from outside the lock's directory pass `--lock` (or `--entry=<entry-file>` to derive it).
22
+ - Programmatic use: call `seedLockOverrides(readLockFile(path))` BEFORE importing any def
23
+ module — references bake guids at import time, so late seeding is a silent no-op
24
+ (`resetLockOverrides` exists for tests).
25
+
26
+ What writes the lock: `export`/`deploy` of an ENTRY FILE update it via the shared compile
27
+ step — only when a lock exists or `--lock` is passed. Nothing from a DEPLOY is written
28
+ back beyond that (an ephemeral/sandbox is a separate workspace, so its identities must
29
+ not pollute yours). The one write-back is `release --replace`, which mints fresh
30
+ identities in the workspace the lock describes: it re-pins the lock from the rebuilt
31
+ workspace, because otherwise the next release matches nothing and duplicates every
32
+ object. CI: `--frozen-lock` fails instead of changing the lock.
@@ -1,6 +1,6 @@
1
1
  # Object kinds
2
2
 
3
- > Read when you need the full catalog of authorable primitives 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.
3
+ > Read when deciding WHAT to build every authorable primitive (tables, endpoints, functions, tasks, agents, MCP, realtime, microservices, …), 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.
4
4
 
5
5
  Author with the factory, register on the Xano instance, lands under the payload key. Each line ends with a one-liner on what the primitive is.
6
6
 
@@ -27,6 +27,6 @@ Author with the factory, register on the Xano instance, lands under the payload
27
27
  - realtime_server: `realtimeServer` → `Xano.registerRealtimeServers` → payload `realtime_server` — 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>`).
28
28
  - channel: `realtimeChannel` → `Xano.registerRealtimeChannels` → payload `channel` — 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.
29
29
  - message: `realtimeMessage` → `Xano.registerRealtimeMessages` → payload `message` — A realtime message handler: a named message type on a channel with its own typed payload and stack — the realtime analogue of a query. Pass the `realtimeChannel()` handle as `channel` and the owning server comes with it.
30
- - microservice: `microservice` → `Xano.registerMicroservices` → payload `microservice` — 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` — passing both throws. EARLY SURFACE, expected to change — 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 — they need not match the microservice name, which is what a stack addresses. SECRETS RIDE ALONG — `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 — 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")`.
30
+ - microservice: `microservice` → `Xano.registerMicroservices` → payload `microservice` — 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`.
31
31
  - knowledge: `knowledge` → `Xano.registerKnowledge` → payload `knowledge` — Markdown the workspace's AI agents read before they act — an `agents.md` of standing instructions, a `skill`, or a `doc`. The body is a real markdown FILE via `knowledgeFile("./x.md", import.meta.url)`, and `mode` decides how much of it reaches the agent.
32
32
  - workspace: `workspaceConfig` → `Xano.registerWorkspace` → payload `workspace` — Workspace-level configuration such as default middleware chains and request-history defaults per host kind.
@@ -1,14 +1,19 @@
1
1
  # Auth, cross-object calls, and microservices
2
2
 
3
- > Read when the stack authenticates, calls another object (`s.function.run`, `s.api.request`, `s.tool.call`), or reaches a microservice.
3
+ > 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.
4
4
 
5
5
  Auth & calls:
6
6
 
7
7
  - `s.security.create_auth_token({ table, id, extras?, expiration?, as? })` — `extras` defaults to `{}`, `expiration` to `86400`s (`0` = never).
8
+ - **Marketplace first:** `@xanots/auth` registers a complete auth surface — signup/login/me endpoints plus their `user`/`account`/`event_log` tables — via `registerAuth(ws, { canonical: "authn" })`. Authentication only, not authorization. Inspect with `xanots marketplace details @xanots/auth --prompt`.
9
+ - **The auth loop end to end** — 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(...)`.
10
+ - Signup: `s.db.add({ table: users, row: { email: inp("email"), password: inp("password") } })` — the `f.password()` column hashes on write; take the submission as `input.text()` on signup AND login (see Gotchas on double-hashing).
11
+ - Login: `s.db.get({ table: users, fieldName: "email", fieldValue: inp("email"), output: ["id", "password"], as: "u" })` — the `output` naming `password` is REQUIRED (the column is `access: "internal"` and absent from the row otherwise) → `s.precondition({ expr: expr(ref("u", { safe: true }), "!=", c.null()), error: c.text("No such user."), error_type: "notfound" })` → `s.security.check_password({ text_password: inp("password"), hash_password: ref("u.password"), as: "ok" })` → precondition on `ok` → `s.security.create_auth_token({ table: users, id: ref("u.id"), as: "token" })` → `response: { token: ref("token") }`.
12
+ - 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).
8
13
  - `s.security.create_guid({ as? })` — bind a fresh GUID string. Takes nothing else.
9
14
  - `s.function.run({ fn, input?, as?, runtime? })` / `s.function.call({ fn, input?, as? })` — run another function; `input` is keyed by the target's input names.
10
15
  - `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 — 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`.
11
- - `s.api.call({ api, input?, headers?, auth?, as? })` — invoke an endpoint. `headers` REPLACES the request headers the callee sees and takes the same shapes as `s.api.request`'s — 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 — 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`) — elsewhere it deploys clean and 500s the first real request.
16
+ - `s.api.call({ api, input?, headers?, auth?, as? })` — invoke an endpoint. `api` takes the `query()` def HANDLE (or a `{ name, guid }` pair) — 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 — 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 — 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`) — elsewhere it deploys clean and 500s the first real request.
12
17
  - `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? })` — 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 — 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` (→ 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 — prefer a header over a `?key=` query param for a credential — a URL travels into access logs, proxies and `Referer`. ⚠ 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 — 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–86400), and `follow_location`/`verify_host`/`verify_peer` booleans. `description` (Settings tab) and `output` filters (Output tab) ride the envelope. SSL cert interdependencies (certificate↔private_key, ca_certificate→verify_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`.
13
18
  - `s.stream.from_request({ url, method?, …tls, as? })` — streaming external HTTP request (`mvp:streaming_api_request`); same typed field surface as `s.api.request` (no description/output envelope). `url` is REQUIRED — it shares `api.request`'s engine declaration, which has no default.
14
19
  - `s.webflow.request({ path, method?, …tls, as? })` — Webflow API request (`mvp:connect_webflow_api_request`); like `s.api.request` but addressed by `path` (host is engine-supplied), and `path` is REQUIRED — the engine rejects an empty one. No `headers`: the engine builds its own from the workspace's Webflow connection and ignores an authored value.
@@ -19,5 +24,7 @@ Auth & calls:
19
24
 
20
25
  Microservices (the `microservice()` def and the statement that calls it):
21
26
 
27
+ - `microservice({ name, kind, … })` — 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` — passing both throws. EARLY SURFACE, expected to change — 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 — they need not match the microservice name, which is what a stack addresses.
28
+ - SECRETS RIDE ALONG — `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 — 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")`.
22
29
  - `s.microservice.request({ host, path, port?, method?, params?, headers?, timeout?, follow_location?, as? })` — 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` — 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.
23
30
  - `s.workflow_test.call({ workflowTest, datasource?, as? })` — 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 — same clone caveat as the kind's own field.