@xano/sdk 1.0.0

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 (336) hide show
  1. package/CHANGELOG.md +788 -0
  2. package/LICENSE +21 -0
  3. package/README.md +541 -0
  4. package/dist/.build-fingerprint +1 -0
  5. package/dist/agent-file-refresh-ZEMK33AX.js +38 -0
  6. package/dist/answer-shape-K67TAAPY.js +33 -0
  7. package/dist/backend-dir-2U53CIAL.js +39 -0
  8. package/dist/backend-slot-7QXW2QYC.js +28 -0
  9. package/dist/bin.d.ts +1 -0
  10. package/dist/bin.js +255 -0
  11. package/dist/branch-NCRNWQBQ.js +61 -0
  12. package/dist/branch-commands-ACIRCEQJ.js +79 -0
  13. package/dist/bundle.d.ts +223 -0
  14. package/dist/bundle.js +153 -0
  15. package/dist/capture-WAXPD7DR.js +41 -0
  16. package/dist/chunk-27GWNP2I.js +23 -0
  17. package/dist/chunk-2CMJZDCL.js +177 -0
  18. package/dist/chunk-2EZ3ZJZZ.js +302 -0
  19. package/dist/chunk-2GNFDZA2.js +390 -0
  20. package/dist/chunk-2MNLRIOX.js +11 -0
  21. package/dist/chunk-2TFRR6JV.js +104 -0
  22. package/dist/chunk-2ZUEE4EK.js +408 -0
  23. package/dist/chunk-36JUQZVQ.js +22 -0
  24. package/dist/chunk-3DRXWLJ5.js +83 -0
  25. package/dist/chunk-3JDU4VRL.js +137 -0
  26. package/dist/chunk-3KZCLN4Z.js +241 -0
  27. package/dist/chunk-3LDULPRE.js +168 -0
  28. package/dist/chunk-3M4LFYNQ.js +111 -0
  29. package/dist/chunk-3XI5CTUE.js +22 -0
  30. package/dist/chunk-3YW23UFH.js +50 -0
  31. package/dist/chunk-45UIT5T2.js +862 -0
  32. package/dist/chunk-4BW2SG2N.js +46 -0
  33. package/dist/chunk-4KHEMC32.js +79 -0
  34. package/dist/chunk-4POWHT2K.js +321 -0
  35. package/dist/chunk-4Q2GN7NW.js +192 -0
  36. package/dist/chunk-5A2PLKZB.js +70 -0
  37. package/dist/chunk-5FBYXK5P.js +159 -0
  38. package/dist/chunk-5HVXPTU4.js +323 -0
  39. package/dist/chunk-5QU2P5CA.js +304 -0
  40. package/dist/chunk-5V5XU32D.js +191 -0
  41. package/dist/chunk-5ZSO4T2G.js +10 -0
  42. package/dist/chunk-622HUCZT.js +10 -0
  43. package/dist/chunk-65HWOMGV.js +177 -0
  44. package/dist/chunk-6ELFRN3P.js +365 -0
  45. package/dist/chunk-6HO3NCSJ.js +1055 -0
  46. package/dist/chunk-6IUMKYWI.js +457 -0
  47. package/dist/chunk-6KEB3C3U.js +65 -0
  48. package/dist/chunk-6MR5TI5V.js +987 -0
  49. package/dist/chunk-6NNTNXN7.js +157 -0
  50. package/dist/chunk-6PBR37LN.js +97 -0
  51. package/dist/chunk-6QXLMMT3.js +155 -0
  52. package/dist/chunk-6ZGJCBZS.js +224 -0
  53. package/dist/chunk-73IVBKMA.js +250 -0
  54. package/dist/chunk-7G3CTU7I.js +286 -0
  55. package/dist/chunk-A3UDOZB6.js +222 -0
  56. package/dist/chunk-A6E77GDW.js +85 -0
  57. package/dist/chunk-AHJWCYQO.js +660 -0
  58. package/dist/chunk-AKNCFVKZ.js +36 -0
  59. package/dist/chunk-AM4FKL4J.js +237 -0
  60. package/dist/chunk-AN6BL47T.js +26 -0
  61. package/dist/chunk-AOSYVMUS.js +147 -0
  62. package/dist/chunk-APWXY5SL.js +182 -0
  63. package/dist/chunk-AWEIIR2U.js +218 -0
  64. package/dist/chunk-AWQ7BQTQ.js +73 -0
  65. package/dist/chunk-BAUZOWGX.js +393 -0
  66. package/dist/chunk-BHACRS6R.js +940 -0
  67. package/dist/chunk-BWPNT55T.js +680 -0
  68. package/dist/chunk-C6RIMRU4.js +187 -0
  69. package/dist/chunk-CGVQZXYG.js +263 -0
  70. package/dist/chunk-CIMQZRRE.js +162 -0
  71. package/dist/chunk-CJHQKJU4.js +113 -0
  72. package/dist/chunk-CTMO46PK.js +1897 -0
  73. package/dist/chunk-D53J55C5.js +106 -0
  74. package/dist/chunk-D7VGG3WS.js +90 -0
  75. package/dist/chunk-DAD3ONIS.js +245 -0
  76. package/dist/chunk-DGWHAVRG.js +162 -0
  77. package/dist/chunk-DX4QR4B2.js +483 -0
  78. package/dist/chunk-EHP3WPEG.js +21 -0
  79. package/dist/chunk-ELP2HMXC.js +432 -0
  80. package/dist/chunk-ERVIASGL.js +21 -0
  81. package/dist/chunk-ET4Y4XCB.js +865 -0
  82. package/dist/chunk-ETO6LGLD.js +4750 -0
  83. package/dist/chunk-EUUUMY7J.js +24 -0
  84. package/dist/chunk-FQJ2TTHP.js +218 -0
  85. package/dist/chunk-FQOF7E2E.js +133 -0
  86. package/dist/chunk-FWD7AL6N.js +21 -0
  87. package/dist/chunk-FXFV3KU6.js +138 -0
  88. package/dist/chunk-FXRQOWTE.js +171 -0
  89. package/dist/chunk-G554NZNI.js +210 -0
  90. package/dist/chunk-GSGDWJB5.js +13 -0
  91. package/dist/chunk-H2V3N23D.js +66 -0
  92. package/dist/chunk-H5C7MBCR.js +159 -0
  93. package/dist/chunk-HHN734BU.js +371 -0
  94. package/dist/chunk-HRVBLCVJ.js +243 -0
  95. package/dist/chunk-HVRUQXGD.js +1264 -0
  96. package/dist/chunk-I4F5TCJH.js +130 -0
  97. package/dist/chunk-IDOTCMDV.js +57 -0
  98. package/dist/chunk-IGOLHKWF.js +427 -0
  99. package/dist/chunk-JGE7CAWB.js +148 -0
  100. package/dist/chunk-JTUKLCXS.js +92 -0
  101. package/dist/chunk-JZGVVJSI.js +66 -0
  102. package/dist/chunk-K4WX6UUU.js +923 -0
  103. package/dist/chunk-K5BBGTYZ.js +217 -0
  104. package/dist/chunk-K6RXBGUB.js +427 -0
  105. package/dist/chunk-KTSDSD36.js +165 -0
  106. package/dist/chunk-L5JYN3NM.js +1038 -0
  107. package/dist/chunk-LIEOKXKD.js +354 -0
  108. package/dist/chunk-LLNZGEFK.js +51 -0
  109. package/dist/chunk-LPECSJ2J.js +55 -0
  110. package/dist/chunk-LQCMKAJ7.js +413 -0
  111. package/dist/chunk-LRN4ZJCQ.js +1145 -0
  112. package/dist/chunk-MJ4ZVHKN.js +17 -0
  113. package/dist/chunk-MXHSQOC4.js +3061 -0
  114. package/dist/chunk-N5GKCWE5.js +367 -0
  115. package/dist/chunk-NA3PXMEF.js +10 -0
  116. package/dist/chunk-NAQDMEHV.js +76 -0
  117. package/dist/chunk-NWKXM5RD.js +109 -0
  118. package/dist/chunk-NZOWWHU5.js +196 -0
  119. package/dist/chunk-OHX6MIUZ.js +184 -0
  120. package/dist/chunk-OOXWYAA4.js +15 -0
  121. package/dist/chunk-OPHB5ORL.js +1990 -0
  122. package/dist/chunk-OXA6PSZT.js +1725 -0
  123. package/dist/chunk-P2HAGF6H.js +73 -0
  124. package/dist/chunk-PTHVMXZI.js +3036 -0
  125. package/dist/chunk-PZ5AY32C.js +10 -0
  126. package/dist/chunk-Q325JKYB.js +189 -0
  127. package/dist/chunk-Q7DGTQ5G.js +255 -0
  128. package/dist/chunk-QCNYHBL7.js +601 -0
  129. package/dist/chunk-QO6BVGS5.js +145 -0
  130. package/dist/chunk-QXTKSOFI.js +76 -0
  131. package/dist/chunk-ROY4YAEQ.js +66 -0
  132. package/dist/chunk-RTJRZFFY.js +447 -0
  133. package/dist/chunk-SAVJUS2X.js +128 -0
  134. package/dist/chunk-SFLHVCKX.js +173 -0
  135. package/dist/chunk-STSFNCY4.js +127 -0
  136. package/dist/chunk-SWBF2LTK.js +170 -0
  137. package/dist/chunk-T5KELPAR.js +109 -0
  138. package/dist/chunk-TFFGOFVZ.js +1481 -0
  139. package/dist/chunk-TLHIFK4M.js +256 -0
  140. package/dist/chunk-TLQE7ZN3.js +156 -0
  141. package/dist/chunk-TPHWJ7UG.js +1981 -0
  142. package/dist/chunk-TRJCALW3.js +291 -0
  143. package/dist/chunk-TTEIYD5P.js +133 -0
  144. package/dist/chunk-U64O2MXY.js +407 -0
  145. package/dist/chunk-UCQ2VUTG.js +630 -0
  146. package/dist/chunk-UTI5G6OJ.js +44 -0
  147. package/dist/chunk-UVHDMMIP.js +188 -0
  148. package/dist/chunk-UZ6QQWJT.js +120 -0
  149. package/dist/chunk-VAX3UZOY.js +686 -0
  150. package/dist/chunk-W3HBUKFO.js +57 -0
  151. package/dist/chunk-WKQLGKCL.js +2823 -0
  152. package/dist/chunk-WQFNASK4.js +560 -0
  153. package/dist/chunk-WRBKLYSJ.js +224 -0
  154. package/dist/chunk-WTPZRR4I.js +17 -0
  155. package/dist/chunk-WZDJ2LLX.js +2385 -0
  156. package/dist/chunk-X2NL4KUO.js +14 -0
  157. package/dist/chunk-X4DVXBFY.js +38 -0
  158. package/dist/chunk-X677DMZM.js +7050 -0
  159. package/dist/chunk-XBKMWY7F.js +612 -0
  160. package/dist/chunk-XNCP4KYO.js +78 -0
  161. package/dist/chunk-XVBGLISP.js +35 -0
  162. package/dist/chunk-XW6KISBB.js +1192 -0
  163. package/dist/chunk-YGZHHAAB.js +8156 -0
  164. package/dist/chunk-YHEFQUQB.js +186 -0
  165. package/dist/chunk-YLDALTWZ.js +653 -0
  166. package/dist/chunk-YU4HSQW7.js +229 -0
  167. package/dist/chunk-ZDPP6RKB.js +27 -0
  168. package/dist/chunk-ZFDZKNGG.js +194 -0
  169. package/dist/chunk-ZIY7RNUT.js +49 -0
  170. package/dist/chunk-ZYJP6BOO.js +30 -0
  171. package/dist/cli.d.ts +1111 -0
  172. package/dist/cli.js +165 -0
  173. package/dist/codegen-command-VR2GWR6C.js +173 -0
  174. package/dist/codegen.d.ts +115 -0
  175. package/dist/codegen.js +19 -0
  176. package/dist/commands-GJMJ4XYZ.js +76 -0
  177. package/dist/completion-ZQLO6PB6.js +738 -0
  178. package/dist/config-MBYGCAFK.js +136 -0
  179. package/dist/deploy-command-JVZPWHMK.js +180 -0
  180. package/dist/deploy-source-3W45CXMP.js +81 -0
  181. package/dist/dev-env-sync-HN44K4D5.js +188 -0
  182. package/dist/diagnostics-UEAAHWVF.js +30 -0
  183. package/dist/display-name-hint-ABBPVQIR.js +46 -0
  184. package/dist/emit-CyhBDxli.d.ts +7007 -0
  185. package/dist/env-example-refresh-ET5HMMDW.js +126 -0
  186. package/dist/env-pull-command-TNMNB3CV.js +323 -0
  187. package/dist/env-target-O4HRKTGZ.js +40 -0
  188. package/dist/env-var-command-ZIRDCAZA.js +427 -0
  189. package/dist/ephemeral-P7F3PMAD.js +54 -0
  190. package/dist/ephemeral-command-CLJJKOFT.js +592 -0
  191. package/dist/ephemeral-state-PYCBSOGX.js +61 -0
  192. package/dist/file-lock-PT74GWYW.js +10 -0
  193. package/dist/generate-command-AYEOLA26.js +510 -0
  194. package/dist/gitignore-3SJ3WNRG.js +51 -0
  195. package/dist/guards-4EBNCZDC.js +162 -0
  196. package/dist/hosted-file-PSHJB3HX.js +28 -0
  197. package/dist/impersonate-command-5JAS3WSV.js +152 -0
  198. package/dist/import-EQSFU6JC.js +19 -0
  199. package/dist/index.d.ts +5470 -0
  200. package/dist/index.js +371 -0
  201. package/dist/init-command-X2FR4UAK.js +125 -0
  202. package/dist/init-modules-RY7UHAOL.js +50 -0
  203. package/dist/init-web-M4YZSZK6.js +42 -0
  204. package/dist/internal.d.ts +179 -0
  205. package/dist/internal.js +2634 -0
  206. package/dist/io-RC56QSN5.js +26 -0
  207. package/dist/keep-data-merge-7MPLVAVI.js +1119 -0
  208. package/dist/lambda-config-reconcile-OUZ4OYAB.js +116 -0
  209. package/dist/landed-753YLJ5H.js +40 -0
  210. package/dist/landing-record-SU52SKXU.js +61 -0
  211. package/dist/live-diff-YONW2VI3.js +65 -0
  212. package/dist/local-engine-choice-CH5X3W7E.js +79 -0
  213. package/dist/local-engine-command-Z3OL7VOD.js +766 -0
  214. package/dist/local-engine-config-5U3SC434.js +39 -0
  215. package/dist/local-engine-deploy-PCQ4SNPB.js +39 -0
  216. package/dist/local-engine-process-EHTE5LLU.js +63 -0
  217. package/dist/local-engine-state-A4FTRFAF.js +32 -0
  218. package/dist/local-engine-update-check-6L645VBL.js +162 -0
  219. package/dist/lock-MRRHW5GS.js +87 -0
  220. package/dist/lock-commands-2QG25HL7.js +963 -0
  221. package/dist/login-command-QPYRWOXZ.js +538 -0
  222. package/dist/logout-command-WOIQLDP6.js +56 -0
  223. package/dist/loop-ALIZLOSX.js +191 -0
  224. package/dist/marketplace-command-K5YL42NO.js +977 -0
  225. package/dist/marketplace-resolve-LY32JES5.js +40 -0
  226. package/dist/meta-client-YXGPW53C.js +244 -0
  227. package/dist/module-manifest-JFGHU2TC.js +38 -0
  228. package/dist/near-key.d.ts +13 -0
  229. package/dist/near-key.js +8 -0
  230. package/dist/node.d.ts +95 -0
  231. package/dist/node.js +969 -0
  232. package/dist/operation-outcome-TZSESNC7.js +51 -0
  233. package/dist/output-target-AL3I44GG.js +47 -0
  234. package/dist/package-manager-PRAHUSCN.js +34 -0
  235. package/dist/plan-disclosure-6G4MLZKD.js +114 -0
  236. package/dist/plugin-contributions-WRNY5ABG.js +28 -0
  237. package/dist/plugin-prompt-4VA3B4FF.js +20 -0
  238. package/dist/plugin-questions-JTSYA74Q.js +24 -0
  239. package/dist/plugin.d.ts +396 -0
  240. package/dist/plugin.js +1 -0
  241. package/dist/preflight-command-2T5Z36MI.js +321 -0
  242. package/dist/profile-command-AH3PIM4X.js +800 -0
  243. package/dist/profile-pointer-GRWJU3YD.js +31 -0
  244. package/dist/profile-select-74TRDEPD.js +23 -0
  245. package/dist/project-dependency-KSH63ODT.js +35 -0
  246. package/dist/project-sdk-REPPOIBD.js +24 -0
  247. package/dist/promote-command-PCWT5N6S.js +140 -0
  248. package/dist/prompt-II3F3LND.js +27 -0
  249. package/dist/publish-command-TTDUUJI5.js +414 -0
  250. package/dist/pull-command-VBO7C4S3.js +161 -0
  251. package/dist/pull-superseded-GJWLG7XO.js +20 -0
  252. package/dist/release-command-N4ZPKMHR.js +146 -0
  253. package/dist/release-ns-command-3KFDMZ6G.js +1745 -0
  254. package/dist/response-HlXahv4K.d.ts +925 -0
  255. package/dist/retry-command-AS5EVREX.js +34 -0
  256. package/dist/routes-manifest-SNWUVBT6.js +43 -0
  257. package/dist/runtime-XETHVF33.js +14 -0
  258. package/dist/scaffold.d.ts +1911 -0
  259. package/dist/scaffold.js +107 -0
  260. package/dist/secrets-file-LVZD6IIM.js +56 -0
  261. package/dist/secrets-fill-command-TTCPSVXN.js +218 -0
  262. package/dist/seed-VU7C3QYS.js +46 -0
  263. package/dist/sent-writes-N7X4OVXT.js +22 -0
  264. package/dist/source-resolve-S2XA3XZF.js +83 -0
  265. package/dist/static-host-B2Y6AG3W.js +352 -0
  266. package/dist/status-command-RUDXTF7I.js +554 -0
  267. package/dist/store-6VNCD4D7.js +20 -0
  268. package/dist/store-ARM6VMO5.js +98 -0
  269. package/dist/store-DuYfzKlW.d.ts +3144 -0
  270. package/dist/suggest-6FOOYKHG.js +12 -0
  271. package/dist/sveltekit.d.ts +154 -0
  272. package/dist/sveltekit.js +109 -0
  273. package/dist/sync-contributions-UCEROO26.js +415 -0
  274. package/dist/table-ENAVMITR.js +42 -0
  275. package/dist/tables-command-GUPXXSB5.js +156 -0
  276. package/dist/tenant-IIHPOHGP.js +42 -0
  277. package/dist/tenant-command-D5HGI2X4.js +965 -0
  278. package/dist/test-command-TIKZMDPZ.js +476 -0
  279. package/dist/tests-BGGIOK3L.js +26 -0
  280. package/dist/token-NICJUTMT.js +72 -0
  281. package/dist/toolchain-hooks-GHKLUJOH.js +96 -0
  282. package/dist/toolchain-modules-5EAZUONB.js +24 -0
  283. package/dist/tracked-backend-EIBUMDZA.js +80 -0
  284. package/dist/update-check-2W2NLDTC.js +136 -0
  285. package/dist/upgrade-command-QHNFWM7O.js +531 -0
  286. package/dist/verify-rollout-DRCK5TDD.js +61 -0
  287. package/dist/whoami-command-STGINTXH.js +51 -0
  288. package/dist/workspace-2CLHU2LK.js +93 -0
  289. package/dist/workspace-binding-56PIIPCP.js +54 -0
  290. package/dist/workspace-command-JEXQETJD.js +535 -0
  291. package/dist/workspace-env-F2RFMSC5.js +70 -0
  292. package/dist/workspace-export-OJSH2HIW.js +21 -0
  293. package/dist/writable-VA7OISSK.js +25 -0
  294. package/dist/xano-ICFUSPFR.js +42 -0
  295. package/dist/xanosdk-import-GN42TO2B.js +56 -0
  296. package/dist/xanosdk-project-S6DXJONQ.js +41 -0
  297. package/dist/xdo-CxDr2Q1C.d.ts +1371 -0
  298. package/guides/README.md +33 -0
  299. package/guides/authoring.md +921 -0
  300. package/guides/cli.md +401 -0
  301. package/guides/codegen.md +177 -0
  302. package/guides/codes.md +404 -0
  303. package/guides/coverage.md +74 -0
  304. package/guides/deploying.md +1525 -0
  305. package/guides/environment.md +400 -0
  306. package/guides/marketplace.md +415 -0
  307. package/guides/module-contract.md +558 -0
  308. package/guides/object-kinds.md +433 -0
  309. package/guides/project-structure.md +43 -0
  310. package/guides/scaffold.md +351 -0
  311. package/guides/typed-frontend.md +242 -0
  312. package/llms/client.md +63 -0
  313. package/llms/errors.md +56 -0
  314. package/llms/fields.md +176 -0
  315. package/llms/filters.md +183 -0
  316. package/llms/kinds-agent-mcp.md +30 -0
  317. package/llms/kinds-core.md +100 -0
  318. package/llms/kinds-knowledge.md +20 -0
  319. package/llms/kinds-realtime.md +76 -0
  320. package/llms/lambda.md +94 -0
  321. package/llms/legacy.md +44 -0
  322. package/llms/lock.md +40 -0
  323. package/llms/object-kinds.md +34 -0
  324. package/llms/statements-calls.md +62 -0
  325. package/llms/statements-catalog.md +320 -0
  326. package/llms/statements-data.md +66 -0
  327. package/llms/statements-runtime.md +68 -0
  328. package/llms/tests.md +59 -0
  329. package/llms/toolchain.md +16 -0
  330. package/llms/triggers.md +36 -0
  331. package/llms/values.md +29 -0
  332. package/llms-full.txt +2085 -0
  333. package/llms.txt +493 -0
  334. package/manifest.json +11224 -0
  335. package/package.json +162 -0
  336. package/types/lambda-globals.d.ts +129 -0
@@ -0,0 +1,987 @@
1
+ import {
2
+ shellQuote
3
+ } from "./chunk-5ZSO4T2G.js";
4
+ import {
5
+ isPrivateLibraryRow
6
+ } from "./chunk-XNCP4KYO.js";
7
+ import {
8
+ REFERENCEABLE_KIND_PAYLOAD_KEYS,
9
+ rawDeriveGuid
10
+ } from "./chunk-NZOWWHU5.js";
11
+ import {
12
+ getLockedGuid
13
+ } from "./chunk-4BW2SG2N.js";
14
+ import {
15
+ randomBytes
16
+ } from "./chunk-OHX6MIUZ.js";
17
+ import {
18
+ article,
19
+ withArticle
20
+ } from "./chunk-36JUQZVQ.js";
21
+
22
+ // src/util/sdk-kind.ts
23
+ var SDK_KIND_BY_PAYLOAD_KEY = {
24
+ dbo: "table",
25
+ app: "apiGroup",
26
+ workflow_test: "workflowTest",
27
+ realtime_server: "realtimeServer",
28
+ channel: "realtimeChannel",
29
+ message: "realtimeMessage"
30
+ };
31
+ var TRIGGER_FACTORY = {
32
+ database: "tableTrigger",
33
+ workspace_realtime_channel: "realtimeTrigger",
34
+ realtime_server: "realtimeServerTrigger",
35
+ channel: "realtimeChannelTrigger",
36
+ workspace: "workspaceTrigger",
37
+ error: "errorTrigger"
38
+ };
39
+ function sdkKindName(payloadKey, row) {
40
+ if (payloadKey === "toolset" && row !== void 0) return row.type === "agent" ? "agent" : "mcpServer";
41
+ if (payloadKey === "trigger" && typeof row?.obj_type === "string" && Object.hasOwn(TRIGGER_FACTORY, row.obj_type)) {
42
+ return TRIGGER_FACTORY[row.obj_type];
43
+ }
44
+ return (Object.hasOwn(SDK_KIND_BY_PAYLOAD_KEY, payloadKey) ? SDK_KIND_BY_PAYLOAD_KEY[payloadKey] : void 0) ?? payloadKey;
45
+ }
46
+ var PAYLOAD_KEY_BY_SDK_KIND = {
47
+ ...Object.fromEntries(Object.entries(SDK_KIND_BY_PAYLOAD_KEY).map(([key, kind]) => [kind, key])),
48
+ mcpServer: "toolset",
49
+ agent: "toolset"
50
+ };
51
+
52
+ // src/lock/lock.ts
53
+ var LOCK_VERSION = 1;
54
+ var WORKSPACE_KEY = "workspace";
55
+ var RETIRED_KEYS = /* @__PURE__ */ new Map([
56
+ [
57
+ "workspace:realtime",
58
+ "the legacy workspace-level realtime block is no longer modelled; realtime servers and channels lock under their own keys"
59
+ ]
60
+ ]);
61
+ var LOCK_PAYLOAD_KEYS = new Set(Object.values(REFERENCEABLE_KIND_PAYLOAD_KEYS));
62
+ var CANONICAL_PAYLOAD_KEYS = /* @__PURE__ */ new Set(["app", "toolset", "realtime_server"]);
63
+ function sdkKindName2(payloadKey) {
64
+ return sdkKindName(payloadKey);
65
+ }
66
+ function acceptedLockKinds() {
67
+ return [
68
+ ...new Set([...LOCK_PAYLOAD_KEYS].flatMap((key) => key === "toolset" ? ["mcpServer", "agent"] : [sdkKindName2(key)]))
69
+ ];
70
+ }
71
+ function toolsetKindsFromPayload(payload, lock) {
72
+ const kinds = lock === void 0 ? /* @__PURE__ */ new Map() : toolsetKindsFromLock(lock);
73
+ const rows = payload?.toolset;
74
+ if (!Array.isArray(rows)) return kinds;
75
+ for (const row of rows) {
76
+ if (!row || typeof row !== "object") continue;
77
+ const { name, type } = row;
78
+ if (typeof name === "string") kinds.set(name, type === "agent" ? "agent" : "mcpServer");
79
+ }
80
+ return kinds;
81
+ }
82
+ function toolsetKindsFromLock(objects) {
83
+ const kinds = /* @__PURE__ */ new Map();
84
+ for (const [key, entry] of Object.entries(objects)) {
85
+ if (key.startsWith("toolset:")) kinds.set(key.slice("toolset:".length), entry.type === "agent" ? "agent" : "mcpServer");
86
+ }
87
+ return kinds;
88
+ }
89
+ function displayLockKey(key, toolsetKinds) {
90
+ const colon = key.indexOf(":");
91
+ if (colon <= 0) return key;
92
+ const payloadKey = key.slice(0, colon);
93
+ if (!LOCK_PAYLOAD_KEYS.has(payloadKey)) return key;
94
+ const name = key.slice(colon + 1);
95
+ const kind = payloadKey === "toolset" ? toolsetKinds?.get(name) ?? "mcpServer" : sdkKindName2(payloadKey);
96
+ return `${kind}:${name}`;
97
+ }
98
+ function fileSpellingNote(keys) {
99
+ const pairs = /* @__PURE__ */ new Map();
100
+ for (const key of keys) {
101
+ const colon = key.indexOf(":");
102
+ if (colon <= 0) continue;
103
+ const payloadKey = key.slice(0, colon);
104
+ if (!LOCK_PAYLOAD_KEYS.has(payloadKey)) continue;
105
+ const sdk = payloadKey === "toolset" ? "agent/mcpServer" : sdkKindName2(payloadKey);
106
+ if (sdk !== payloadKey) pairs.set(sdk, payloadKey);
107
+ }
108
+ if (pairs.size === 0) return "";
109
+ return ` (xano.lock spells ${[...pairs].map(([sdk, file]) => `${sdk} as "${file}:"`).join(", ")})`;
110
+ }
111
+ function resolvePayloadKey(kindOrPayloadKey) {
112
+ if (LOCK_PAYLOAD_KEYS.has(kindOrPayloadKey)) return kindOrPayloadKey;
113
+ const key = (Object.hasOwn(PAYLOAD_KEY_BY_SDK_KIND, kindOrPayloadKey) ? PAYLOAD_KEY_BY_SDK_KIND[kindOrPayloadKey] : void 0) ?? (Object.hasOwn(REFERENCEABLE_KIND_PAYLOAD_KEYS, kindOrPayloadKey) ? REFERENCEABLE_KIND_PAYLOAD_KEYS[kindOrPayloadKey] : void 0);
114
+ if (key === void 0) {
115
+ throw new UnknownLockKindError(
116
+ `Unknown object kind "${kindOrPayloadKey}". Expected one of: ${acceptedLockKinds().join(", ")}.`
117
+ );
118
+ }
119
+ return key;
120
+ }
121
+ var UnknownLockKindError = class extends Error {
122
+ };
123
+ var LockEntryNotFoundError = class extends Error {
124
+ name = "LockEntryNotFoundError";
125
+ /** A named thing that is not there, like every other: `SDK_ERROR`, exit 8. */
126
+ code = "SDK_ERROR";
127
+ exitCode = 8;
128
+ /** The key the reader most likely meant, when one is near — the `--json` failure's `suggestion`. */
129
+ suggestion;
130
+ constructor(message, opts = {}) {
131
+ super(message);
132
+ this.suggestion = opts.suggestion;
133
+ }
134
+ };
135
+ var LockRenameConflictError = class extends Error {
136
+ constructor(message, keys) {
137
+ super(message);
138
+ this.keys = keys;
139
+ }
140
+ keys;
141
+ name = "LockRenameConflictError";
142
+ exitCode = 2;
143
+ };
144
+ var LockImportConflictError = class extends Error {
145
+ name = "LockImportConflictError";
146
+ exitCode = 2;
147
+ /**
148
+ * The same-kind guid clash behind this refusal, when it is one: which name the
149
+ * bundle carries the guid under and which the lock pins it to. Only the
150
+ * workspace source can say which side renamed, so the command that has the
151
+ * source words the remedy from this.
152
+ */
153
+ clash;
154
+ constructor(message, opts = {}) {
155
+ super(message);
156
+ this.clash = opts.clash;
157
+ }
158
+ };
159
+ function normalizeLockKey(key) {
160
+ const colon = key.indexOf(":");
161
+ if (colon <= 0) return key;
162
+ const kind = key.slice(0, colon);
163
+ if (LOCK_PAYLOAD_KEYS.has(kind)) return key;
164
+ const payloadKey = (Object.hasOwn(PAYLOAD_KEY_BY_SDK_KIND, kind) ? PAYLOAD_KEY_BY_SDK_KIND[kind] : void 0) ?? (Object.hasOwn(REFERENCEABLE_KIND_PAYLOAD_KEYS, kind) ? REFERENCEABLE_KIND_PAYLOAD_KEYS[kind] : void 0);
165
+ return payloadKey === void 0 ? key : `${payloadKey}${key.slice(colon)}`;
166
+ }
167
+ function lockKey(payloadKey, name) {
168
+ return `${payloadKey}:${name}`;
169
+ }
170
+ function codePinnedTables(bundle, lock, classified) {
171
+ const out = /* @__PURE__ */ new Map();
172
+ const payload = bundle?.payload;
173
+ const rows = payload !== null && typeof payload === "object" ? payload.dbo : void 0;
174
+ for (const r of Array.isArray(rows) ? rows : []) {
175
+ const row = r;
176
+ if (typeof row?.name !== "string" || typeof row.guid !== "string" || row.guid === "") continue;
177
+ const key = lockKey("dbo", row.name);
178
+ const entry = lock.objects[key];
179
+ const merged = classified?.objects[key];
180
+ const held = entry?.guid;
181
+ const source = merged ?? entry;
182
+ const marked = source?.guid_source === "code" && source.guid === row.guid;
183
+ if (!marked && row.guid === (held ?? rawDeriveGuid(key))) continue;
184
+ const replaces = [
185
+ .../* @__PURE__ */ new Set([...held !== void 0 && held !== row.guid ? [held] : [], ...entry?.replaced ?? [], ...merged?.replaced ?? []])
186
+ ].filter((g) => g !== row.guid);
187
+ out.set(row.name, { guid: row.guid, ...replaces.length > 0 ? { replaces } : {} });
188
+ }
189
+ return out;
190
+ }
191
+ function lockNameForObject(payloadKey, obj, appNameByGuid) {
192
+ if (payloadKey === "channel" || payloadKey === "message") {
193
+ const parts = [parentName(obj.server, appNameByGuid)];
194
+ if (payloadKey === "message") parts.push(parentName(obj.channel, appNameByGuid));
195
+ return [...parts, obj.name].join("|");
196
+ }
197
+ if (payloadKey !== "query") return obj.name;
198
+ const verb = typeof obj.verb === "string" ? obj.verb : "";
199
+ const appId = obj.app?.id;
200
+ let group = "";
201
+ if (typeof appId === "string" && appId !== "") {
202
+ group = appNameByGuid.get(appId) ?? appId;
203
+ } else if (typeof appId === "number" && appId !== 0) {
204
+ group = `#${appId}`;
205
+ }
206
+ return [group, verb, obj.name].join("|");
207
+ }
208
+ function parentName(ref, names) {
209
+ const id = ref?.id;
210
+ if (typeof id === "string" && id !== "") return names.get(id) ?? id;
211
+ return typeof id === "number" && id !== 0 ? `#${id}` : "";
212
+ }
213
+ function identityNamesByGuid(sections) {
214
+ const map = appNamesByGuid(sections["app"]);
215
+ for (const key of ["realtime_server", "channel"]) {
216
+ for (const [guid, name] of appNamesByGuid(sections[key])) map.set(guid, name);
217
+ }
218
+ return map;
219
+ }
220
+ function appNamesByGuid(appSection) {
221
+ const map = /* @__PURE__ */ new Map();
222
+ if (!Array.isArray(appSection)) return map;
223
+ for (const row of appSection) {
224
+ if (!row || typeof row !== "object") continue;
225
+ const { name, guid } = row;
226
+ if (typeof name === "string" && typeof guid === "string" && guid !== "") {
227
+ map.set(guid, name);
228
+ }
229
+ }
230
+ return map;
231
+ }
232
+ var CANONICAL_SOURCES = /* @__PURE__ */ new Set(["code", "minted", "adopted"]);
233
+ var DESTINATION_KEY = /^[^/\s]+\/(?:workspace\/[1-9]\d*|tenant\/[^/\s]+)$/;
234
+ var EPHEMERAL_DESTINATION_KEY = /^[^/\s]+\/ephemeral\/[^/\s]+$/;
235
+ function emptyLock() {
236
+ return { version: LOCK_VERSION, objects: {} };
237
+ }
238
+ function withObjects(lock, objects) {
239
+ return lock.landed !== void 0 && Object.keys(lock.landed).length > 0 ? { version: lock.version, objects, landed: lock.landed } : { version: lock.version, objects };
240
+ }
241
+ function findDuplicateRawKey(text) {
242
+ const stack = [];
243
+ let i = 0;
244
+ while (i < text.length) {
245
+ const ch = text[i];
246
+ if (ch === "{") {
247
+ stack.push(/* @__PURE__ */ new Set());
248
+ i++;
249
+ } else if (ch === "[") {
250
+ stack.push(null);
251
+ i++;
252
+ } else if (ch === "}" || ch === "]") {
253
+ stack.pop();
254
+ i++;
255
+ } else if (ch === '"') {
256
+ let j = i + 1;
257
+ let value = "";
258
+ while (j < text.length && text[j] !== '"') {
259
+ if (text[j] === "\\") {
260
+ value += text[j] + (text[j + 1] ?? "");
261
+ j += 2;
262
+ } else {
263
+ value += text[j];
264
+ j++;
265
+ }
266
+ }
267
+ j++;
268
+ let k = j;
269
+ while (k < text.length && /\s/.test(text[k])) k++;
270
+ if (text[k] === ":") {
271
+ const scope = stack[stack.length - 1];
272
+ if (scope) {
273
+ let decoded = value;
274
+ try {
275
+ decoded = JSON.parse(`"${value}"`);
276
+ } catch {
277
+ }
278
+ if (scope.has(decoded)) return decoded;
279
+ scope.add(decoded);
280
+ }
281
+ }
282
+ i = j;
283
+ } else {
284
+ i++;
285
+ }
286
+ }
287
+ return void 0;
288
+ }
289
+ function fail(path, message) {
290
+ throw new Error(`Invalid lock file ${path}: ${message}`);
291
+ }
292
+ function parseLock(text, path = "xano.lock") {
293
+ return parseLockReport(text, path).lock;
294
+ }
295
+ function parseLockReport(text, path = "xano.lock", opts = {}) {
296
+ const droppedLandings = [];
297
+ if (/^(?:<{7}|>{7})(?: |$)|^={7}$/m.test(text)) {
298
+ fail(
299
+ path,
300
+ `it holds unresolved merge-conflict markers (\`<<<<<<<\`, \`=======\`, \`>>>>>>>\`). Resolve it as the union of both sides: keep every entry under \`objects\` (and \`landed\`) from each, delete the markers, and fix the commas. Where both sides renamed one object, two keys then share a guid \u2014 keep the one your code exports and remove the other with \`xanosdk lock prune --identity-only --yes <key>\`.`
301
+ );
302
+ }
303
+ const dup = findDuplicateRawKey(text);
304
+ if (dup !== void 0) {
305
+ fail(
306
+ path,
307
+ `duplicate key "${dup}" in the raw text (likely a bad merge \u2014 JSON keeps only the last one silently). Resolve the duplicate and re-run.`
308
+ );
309
+ }
310
+ let data;
311
+ try {
312
+ data = JSON.parse(text);
313
+ } catch (err) {
314
+ fail(path, `unparseable JSON (${err instanceof Error ? err.message : String(err)}).`);
315
+ }
316
+ if (!data || typeof data !== "object" || Array.isArray(data)) {
317
+ fail(path, "expected a top-level object.");
318
+ }
319
+ const obj = data;
320
+ if (obj.version !== LOCK_VERSION) {
321
+ fail(
322
+ path,
323
+ `unknown version ${JSON.stringify(obj.version)} (this Xano SDK reads version ${LOCK_VERSION}). Upgrade Xano SDK to a release that understands this lock format.`
324
+ );
325
+ }
326
+ if (!obj.objects || typeof obj.objects !== "object" || Array.isArray(obj.objects)) {
327
+ fail(path, "expected an `objects` map.");
328
+ }
329
+ const objects = validateLockObjects(obj.objects, path, opts);
330
+ const landed = obj.landed === void 0 ? void 0 : validateLanded(obj.landed, path, droppedLandings);
331
+ return {
332
+ lock: { version: LOCK_VERSION, objects, ...landed !== void 0 && Object.keys(landed).length > 0 ? { landed } : {} },
333
+ droppedLandings
334
+ };
335
+ }
336
+ function validateLanded(raw, path, dropped) {
337
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) {
338
+ fail(path, "`landed` must be an object of destination \u2192 landed identities.");
339
+ }
340
+ const out = {};
341
+ for (const [dest, entries] of Object.entries(raw)) {
342
+ if (EPHEMERAL_DESTINATION_KEY.test(dest)) {
343
+ dropped.push(dest);
344
+ continue;
345
+ }
346
+ if (!DESTINATION_KEY.test(dest)) {
347
+ fail(
348
+ path,
349
+ `\`landed\` destination "${dest}" is not \`<instance host>/workspace/<id>\` or \`<instance host>/tenant/<name>\`.`
350
+ );
351
+ }
352
+ if (!entries || typeof entries !== "object" || Array.isArray(entries)) {
353
+ fail(path, `\`landed\` destination "${dest}" must map lock keys to \`{ "guid": \u2026 }\`.`);
354
+ }
355
+ const record = {};
356
+ for (const [key, entryRaw] of Object.entries(entries)) {
357
+ if (key === WORKSPACE_KEY) fail(path, `\`landed\` under "${dest}" names "${key}", which is not an object a deploy lands.`);
358
+ validateKey(key, path);
359
+ const { guid, type } = entryRaw ?? {};
360
+ if (!entryRaw || typeof entryRaw !== "object" || Array.isArray(entryRaw) || typeof guid !== "string" || guid === "") {
361
+ fail(path, `\`landed\` entry "${key}" under "${dest}" must be \`{ "guid": "<guid>" }\`.`);
362
+ }
363
+ if (type !== void 0 && (type !== "agent" || !key.startsWith("toolset:"))) {
364
+ fail(path, `\`landed\` entry "${key}" under "${dest}" has \`type\` ${JSON.stringify(type)} \u2014 only an agent's toolset entry carries one, and it is "agent".`);
365
+ }
366
+ record[key] = type === "agent" ? { guid, type: "agent" } : { guid };
367
+ }
368
+ if (Object.keys(record).length > 0) out[dest] = record;
369
+ }
370
+ return out;
371
+ }
372
+ function validateLockModel(lock, label, observed) {
373
+ if (observed !== void 0) {
374
+ assertEmittedCanonicalsUnique(observed, label);
375
+ assertNoCrossKindGuid(lock, observed, label);
376
+ }
377
+ validateLockObjects(lock.objects, label);
378
+ }
379
+ function assertNoCrossKindGuid(lock, observed, lockLabel) {
380
+ const held = /* @__PURE__ */ new Map();
381
+ for (const [key, entry] of Object.entries(lock.objects)) {
382
+ if (entry.guid !== void 0 && !(key in observed)) held.set(entry.guid, key);
383
+ }
384
+ for (const [key, entry] of Object.entries(observed)) {
385
+ const other = entry.guid === void 0 ? void 0 : held.get(entry.guid);
386
+ if (other === void 0 || splitKey(other)[0] === splitKey(key)[0]) continue;
387
+ const [pin, holder] = [displayLockKey(key), displayLockKey(other)];
388
+ throw new Error(
389
+ `${pin} pins guid ${entry.guid} in code (\`guid:\` on the def), but ${lockLabel} holds it for ${holder}. A guid never moves between kinds, so this is not a rename: remove that \`guid:\` and ${pin} takes its own identity. Nothing was written.`
390
+ );
391
+ }
392
+ }
393
+ function assertEmittedCanonicalsUnique(observed, lockLabel) {
394
+ const owners = /* @__PURE__ */ new Map();
395
+ for (const key of Object.keys(observed).sort()) {
396
+ const canonical = observed[key].canonical;
397
+ if (typeof canonical !== "string" || key === WORKSPACE_KEY) continue;
398
+ const scoped = `${key.slice(0, key.indexOf(":"))}\0${canonical}`;
399
+ const prior = owners.get(scoped);
400
+ if (prior === void 0) {
401
+ owners.set(scoped, key);
402
+ continue;
403
+ }
404
+ const pinned = (k) => observed[k].canonical_source === "code";
405
+ if (!pinned(prior) && !pinned(key)) continue;
406
+ const [a, b] = [displayLockKey(prior), displayLockKey(key)];
407
+ const where = (k, shown) => pinned(k) ? `${shown} pins it in code` : `${shown} carries it from ${lockLabel}`;
408
+ const fix = pinned(prior) && pinned(key) ? `change or drop the \`canonical\` on one of them` : `change the \`canonical\` ${pinned(prior) ? a : b} pins`;
409
+ throw new Error(
410
+ `Two definitions in this project have the same canonical "${canonical}": ${where(prior, a)}, and ${where(key, b)}. A canonical is the object's public URL slug, unique per kind \u2014 ${fix}.`
411
+ );
412
+ }
413
+ }
414
+ function duplicateRemedy(keys, lockFile) {
415
+ if (lockFile === void 0) return "";
416
+ const prune = (key) => `\`xanosdk lock prune --identity-only --yes ${shellQuote(displayLockKey(key))} --lock=${shellQuote(lockFile)}\``;
417
+ return keys.length === 2 ? ` If a merge kept both sides of a rename, keep the one your code exports and remove the other: ${prune(keys[0])} or ${prune(keys[1])}.` : ` Keep the one your code exports and remove each of the others: ${keys.map(prune).join(", ")}.`;
418
+ }
419
+ function quotedKeys(keys) {
420
+ const q = keys.map((k) => `"${k}"`);
421
+ return q.length === 1 ? q[0] : `${q.slice(0, -1).join(", ")} and ${q.at(-1)}`;
422
+ }
423
+ function failDuplicates(path, shared, lockFile) {
424
+ if (shared.length === 0) return;
425
+ const line = (d) => `entries ${quotedKeys(d.keys)} share the same ${d.what}.${duplicateRemedy(d.keys, lockFile)}`;
426
+ if (shared.length === 1) fail(path, line(shared[0]));
427
+ fail(
428
+ path,
429
+ `${shared.length} identities are each held by more than one entry \u2014 fix all of them:
430
+ ` + shared.map((d) => ` - ${line(d)}`).join("\n")
431
+ );
432
+ }
433
+ function validateLockObjects(raw, path, opts = {}) {
434
+ const objects = {};
435
+ const guidOwners = /* @__PURE__ */ new Map();
436
+ const canonicalOwners = /* @__PURE__ */ new Map();
437
+ const shared = /* @__PURE__ */ new Map();
438
+ const share = (id, what, owner, key) => {
439
+ const seen = shared.get(id);
440
+ if (seen === void 0) shared.set(id, { what, keys: [owner, key] });
441
+ else seen.keys.push(key);
442
+ };
443
+ for (const [key, entryRaw] of Object.entries(raw)) {
444
+ validateKey(key, path);
445
+ if (!entryRaw || typeof entryRaw !== "object" || Array.isArray(entryRaw)) {
446
+ fail(path, `entry "${key}" must be an object.`);
447
+ }
448
+ const { guid, canonical, canonical_source: canonicalSource, type, adopted, imported, guid_source: guidSource, replaced } = entryRaw;
449
+ if (guidSource !== void 0 && (guidSource !== "code" || guid === void 0)) {
450
+ fail(
451
+ path,
452
+ `entry "${key}" has \`guid_source\` ${JSON.stringify(guidSource)} \u2014 it is either \`"code"\` (the guid is a def's own \`guid:\`) beside a \`guid\`, or absent. Remove the field; the next export writes it.`
453
+ );
454
+ }
455
+ if (replaced !== void 0 && (!Array.isArray(replaced) || replaced.some((g) => typeof g !== "string" || g === "") || !key.startsWith("dbo:"))) {
456
+ fail(
457
+ path,
458
+ `entry "${key}" has \`replaced\` ${JSON.stringify(replaced)} \u2014 only a table entry carries one, as a list of the guids its def's \`guid:\` replaced. Remove the field to stop guarding those tables.`
459
+ );
460
+ }
461
+ if (adopted !== void 0 && adopted !== true) {
462
+ fail(
463
+ path,
464
+ `entry "${key}" has \`adopted\` ${JSON.stringify(adopted)} \u2014 it is either \`true\` (added by \`lock import\`) or absent. Remove the field; the next export clears it for anything the project declares.`
465
+ );
466
+ }
467
+ if (imported !== void 0 && imported !== true) {
468
+ fail(
469
+ path,
470
+ `entry "${key}" has \`imported\` ${JSON.stringify(imported)} \u2014 it is either \`true\` (a guid \`lock import\` took from a live backend) or absent. Remove the field.`
471
+ );
472
+ }
473
+ if (type !== void 0 && (type !== "agent" || !key.startsWith("toolset:"))) {
474
+ fail(
475
+ path,
476
+ `entry "${key}" has \`type\` ${JSON.stringify(type)} \u2014 only an agent's toolset entry carries one, and it is "agent". Remove the field; the next export writes it where it belongs.`
477
+ );
478
+ }
479
+ if (guid !== void 0 && (typeof guid !== "string" || guid === "")) {
480
+ fail(path, `entry "${key}" has a non-string or empty \`guid\`.`);
481
+ }
482
+ if (canonical !== void 0 && (typeof canonical !== "string" || canonical === "")) {
483
+ fail(path, `entry "${key}" has a non-string or empty \`canonical\`.`);
484
+ }
485
+ if (guid === void 0 && canonical === void 0) {
486
+ fail(path, `entry "${key}" carries neither \`guid\` nor \`canonical\`.`);
487
+ }
488
+ if (canonicalSource !== void 0) {
489
+ if (typeof canonicalSource !== "string" || !CANONICAL_SOURCES.has(canonicalSource)) {
490
+ fail(
491
+ path,
492
+ `entry "${key}" has an unknown \`canonical_source\` ${JSON.stringify(canonicalSource)} \u2014 expected ${[...CANONICAL_SOURCES].map((s) => `"${s}"`).join(", ")}, or omit it. Re-export to have it written for you.`
493
+ );
494
+ }
495
+ if (canonical === void 0) {
496
+ fail(
497
+ path,
498
+ `entry "${key}" has a \`canonical_source\` but no \`canonical\` to classify. Remove the field.`
499
+ );
500
+ }
501
+ }
502
+ const isWorkspaceKey = key === WORKSPACE_KEY;
503
+ if (isWorkspaceKey && guid !== void 0) {
504
+ fail(path, `entry "${key}" cannot carry a \`guid\` (workspace identities are canonical-only).`);
505
+ }
506
+ if (!isWorkspaceKey && canonical !== void 0) {
507
+ const prefix = key.slice(0, key.indexOf(":"));
508
+ if (!CANONICAL_PAYLOAD_KEYS.has(prefix)) {
509
+ fail(
510
+ path,
511
+ `entry "${key}" cannot carry a \`canonical\` \u2014 only ${[...CANONICAL_PAYLOAD_KEYS].join("/")} objects and the workspace key have one.`
512
+ );
513
+ }
514
+ }
515
+ if (typeof guid === "string") {
516
+ const owner = guidOwners.get(guid);
517
+ if (owner !== void 0 && opts.tolerateDuplicates !== true) share(`guid\0${guid}`, `guid (${guid})`, owner, key);
518
+ else guidOwners.set(guid, key);
519
+ }
520
+ if (typeof canonical === "string") {
521
+ const scope = isWorkspaceKey ? WORKSPACE_KEY : key.slice(0, key.indexOf(":"));
522
+ let owners = canonicalOwners.get(scope);
523
+ if (owners === void 0) canonicalOwners.set(scope, owners = /* @__PURE__ */ new Map());
524
+ const owner = owners.get(canonical);
525
+ if (owner !== void 0 && opts.tolerateDuplicates !== true) {
526
+ share(`canonical\0${scope}\0${canonical}`, `canonical (${canonical})`, owner, key);
527
+ } else owners.set(canonical, key);
528
+ }
529
+ const entry = {};
530
+ if (typeof guid === "string") entry.guid = guid;
531
+ if (typeof canonical === "string") entry.canonical = canonical;
532
+ if (typeof canonicalSource === "string") {
533
+ entry.canonical_source = canonicalSource;
534
+ }
535
+ if (type === "agent") entry.type = "agent";
536
+ if (adopted === true) entry.adopted = true;
537
+ if (imported === true) entry.imported = true;
538
+ if (guidSource === "code") entry.guid_source = "code";
539
+ if (Array.isArray(replaced) && replaced.length > 0) entry.replaced = [...replaced];
540
+ objects[key] = entry;
541
+ }
542
+ failDuplicates(path, [...shared.values()], opts.lockFile);
543
+ return objects;
544
+ }
545
+ function validateKey(key, path) {
546
+ if (key === WORKSPACE_KEY) return;
547
+ const retired = RETIRED_KEYS.get(key);
548
+ if (retired !== void 0) {
549
+ fail(path, `key "${key}" is retired \u2014 ${retired}. Remove the entry.`);
550
+ }
551
+ const idx = key.indexOf(":");
552
+ const prefix = idx === -1 ? key : key.slice(0, idx);
553
+ const name = idx === -1 ? "" : key.slice(idx + 1);
554
+ if (prefix === "workspace") {
555
+ fail(
556
+ path,
557
+ `key "${key}" is not a lockable workspace identity (only "${WORKSPACE_KEY}" exists).`
558
+ );
559
+ }
560
+ if (idx === -1 || name === "" || !LOCK_PAYLOAD_KEYS.has(prefix)) {
561
+ fail(
562
+ path,
563
+ `key "${key}" is not \`<payloadKey>:<name>\` with a known payload key (${[...LOCK_PAYLOAD_KEYS].join(", ")}).`
564
+ );
565
+ }
566
+ }
567
+ function serializeLock(lock) {
568
+ const objects = {};
569
+ for (const key of Object.keys(lock.objects).sort()) {
570
+ const src = lock.objects[key];
571
+ const entry = {};
572
+ if (src.guid !== void 0) entry.guid = src.guid;
573
+ if (src.canonical !== void 0) entry.canonical = src.canonical;
574
+ if (src.canonical !== void 0 && src.canonical_source !== void 0) {
575
+ entry.canonical_source = src.canonical_source;
576
+ }
577
+ if (src.type === "agent" && key.startsWith("toolset:")) entry.type = "agent";
578
+ if (src.adopted === true) entry.adopted = true;
579
+ if (src.imported === true) entry.imported = true;
580
+ if (src.guid_source === "code" && src.guid !== void 0) entry.guid_source = "code";
581
+ if (src.replaced !== void 0 && src.replaced.length > 0 && key.startsWith("dbo:")) entry.replaced = [...src.replaced];
582
+ objects[key] = entry;
583
+ }
584
+ const landed = {};
585
+ for (const dest of Object.keys(lock.landed ?? {}).sort()) {
586
+ const src = lock.landed[dest];
587
+ const keys = Object.keys(src).sort();
588
+ if (keys.length === 0) continue;
589
+ const record = {};
590
+ for (const key of keys) {
591
+ const e = src[key];
592
+ record[key] = e.type === "agent" && key.startsWith("toolset:") ? { guid: e.guid, type: "agent" } : { guid: e.guid };
593
+ }
594
+ landed[dest] = record;
595
+ }
596
+ return JSON.stringify(
597
+ Object.keys(landed).length > 0 ? { version: lock.version, objects, landed } : { version: lock.version, objects },
598
+ null,
599
+ 2
600
+ ) + "\n";
601
+ }
602
+ function mintCanonical() {
603
+ let bin = "";
604
+ for (const b of randomBytes(6)) bin += String.fromCharCode(b);
605
+ return btoa(bin).replace(/\+/g, "-").replace(/\//g, "_");
606
+ }
607
+ function createLockContext(lock = emptyLock()) {
608
+ return { lock, observed: {}, repinned: [] };
609
+ }
610
+ function recordObserved(ctx, key, identity) {
611
+ const prior = ctx.observed[key];
612
+ if (prior?.guid !== void 0 && identity.guid !== void 0 && prior.guid !== identity.guid) {
613
+ throw new Error(
614
+ `Two exported objects collapse onto lock key "${displayLockKey(key)}" with different guids (${prior.guid} vs ${identity.guid}) \u2014 two same-kind objects sharing one identity behind explicit guids. The lock cannot track both under one key; rename one of the objects.`
615
+ );
616
+ }
617
+ const entry = ctx.lock.objects[key];
618
+ if (identity.guid !== void 0 && entry?.guid !== void 0 && identity.guid !== entry.guid) {
619
+ if (getLockedGuid(key) === entry.guid) {
620
+ (ctx.repinned ??= []).push({ key, from: entry.guid, to: identity.guid });
621
+ ctx.observed[key] = { ...ctx.observed[key], ...identity };
622
+ return;
623
+ }
624
+ if (identity.guid === rawDeriveGuid(key)) {
625
+ throw new Error(
626
+ `"${displayLockKey(key)}" emitted its name-derived guid (${identity.guid}) but xano.lock pins ${entry.guid}. The lock overrides were not seeded before the workspace module loaded \u2014 programmatic exports must call seedLockOverrides(lock) before importing any def module (the CLI does this automatically). With them seeded, a \`guid:\` the def pins wins over the lock entry.`
627
+ );
628
+ }
629
+ throw new Error(
630
+ `"${displayLockKey(key)}" has an explicit guid (${identity.guid}) that differs from its xano.lock entry (${entry.guid}), so references resolved through the lock would split from the object itself. Update the xano.lock entry to the explicit guid, or remove the explicit guid from code, then re-export.`
631
+ );
632
+ }
633
+ ctx.observed[key] = { ...ctx.observed[key], ...identity };
634
+ }
635
+ var COMPOSED_QUERY_NAME = /^[^|]*\|[A-Z]+\|[^|]+$/;
636
+ function checkRenameTarget(payloadKey, oldName, newName) {
637
+ if (oldName === newName) {
638
+ throw new Error(`The old and new names are both "${newName}" \u2014 there is nothing to move. Name the entry's new name.`);
639
+ }
640
+ if (payloadKey === "query") {
641
+ if (COMPOSED_QUERY_NAME.test(newName)) return;
642
+ const oldParts = oldName.split("|");
643
+ const suggestion = oldParts.length === 3 && !newName.includes("|") ? ` \u2014 e.g. "${oldParts[0]}|${oldParts[1]}|${newName}"` : "";
644
+ throw new Error(
645
+ `"${newName}" is not a query lock name. A query is locked by its composed identity "<group>|<VERB>|<name>"${suggestion}; an entry under any other name matches nothing an export writes.`
646
+ );
647
+ }
648
+ const realtimeParts = payloadKey === "channel" ? 2 : payloadKey === "message" ? 3 : 0;
649
+ if (realtimeParts > 0) {
650
+ const composed = (name) => {
651
+ const parts = name.split("|");
652
+ return parts.length === realtimeParts && parts.every((p) => p !== "");
653
+ };
654
+ const bad = [oldName, newName].filter((n) => !composed(n));
655
+ if (bad.length === 0) return;
656
+ const shape = payloadKey === "channel" ? "<server>|<path>" : "<server>|<channel path>|<name>";
657
+ const placeholder = shape.split("|").slice(0, -1);
658
+ const composedFor = (name) => {
659
+ if (name.includes("|")) return void 0;
660
+ const other = name === oldName ? newName : oldName;
661
+ return [...composed(other) ? other.split("|").slice(0, -1) : placeholder, name].join("|");
662
+ };
663
+ const examples = bad.map(composedFor).filter((s) => s !== void 0);
664
+ const kindName = sdkKindName2(payloadKey);
665
+ throw new Error(
666
+ (bad.length === 1 ? `"${bad[0]}" is not a ${kindName} lock name.` : `Neither "${oldName}" nor "${newName}" is a ${kindName} lock name.`) + ` It is locked by its composed identity "${shape}"` + (examples.length === 0 ? "" : ` \u2014 e.g. ${examples.map((e) => `"${e}"`).join(" and ")}`) + `; an entry under any other name matches nothing an export writes.`
667
+ );
668
+ }
669
+ if (COMPOSED_QUERY_NAME.test(newName)) {
670
+ throw new Error(
671
+ `"${newName}" is a query lock name ("<group>|<VERB>|<name>"), not ${withArticle(sdkKindName2(payloadKey))} name. ${article(sdkKindName2(payloadKey)) === "an" ? "An" : "A"} ${sdkKindName2(payloadKey)} entry is keyed by the object's own name; to move a query entry, use \`lock rename query\`.`
672
+ );
673
+ }
674
+ }
675
+ function renameLockEntry(lock, payloadKey, oldName, newName, observed, shownKind = payloadKey === "toolset" ? "mcpServer" : sdkKindName2(payloadKey)) {
676
+ const oldKey = lockKey(payloadKey, oldName);
677
+ const newKey = lockKey(payloadKey, newName);
678
+ const shownOld = `${shownKind}:${oldName}`;
679
+ const shownNew = `${shownKind}:${newName}`;
680
+ const entry = lock.objects[oldKey];
681
+ if (entry === void 0) {
682
+ throw new LockEntryNotFoundError(
683
+ `No lock entry "${shownOld}". \`lock rename\` moves an existing entry \u2014 check the kind and old name (kinds: ${acceptedLockKinds().join(", ")}).`
684
+ );
685
+ }
686
+ const objects = { ...lock.objects };
687
+ let discardedNewcomer;
688
+ const existing = objects[newKey];
689
+ const sameIdentity = existing?.guid !== void 0 && existing.guid === entry.guid;
690
+ if (existing !== void 0 && !sameIdentity) {
691
+ if (existing.guid !== rawDeriveGuid(newKey) || existing.imported === true || existing.adopted === true || existing.guid_source === "code") {
692
+ throw new LockRenameConflictError(
693
+ `Lock entry "${shownNew}" already pins an identity of its own (${existing.guid ?? `canonical ${existing.canonical}`}), so moving "${shownOld}" onto it would lose one of the two. Nothing was written.`,
694
+ { shownOld, shownNew }
695
+ );
696
+ }
697
+ if (observed === void 0) {
698
+ throw new Error(
699
+ `Lock entry "${shownNew}" already exists, and its name-derived guid cannot tell the fresh entry an export appends after a rename from a live object registered as "${newName}". Pass --entry=<path> so the workspace source can say which one it is.`
700
+ );
701
+ }
702
+ if (observed.has(oldKey)) {
703
+ throw new Error(
704
+ `"${shownOld}" is still exported by the workspace, so "${shownNew}" is a separate live object, not the renamed one. Moving the entry would give "${newName}" the identity of "${oldName}" and the next deploy would swap or recreate both. Rename the object in code first, then re-run \`lock rename\`.`
705
+ );
706
+ }
707
+ discardedNewcomer = existing;
708
+ }
709
+ delete objects[oldKey];
710
+ const { guid_source: _source, ...moved } = entry;
711
+ objects[newKey] = existing?.canonical_source === "code" && existing.canonical !== void 0 ? { ...moved, canonical: existing.canonical, canonical_source: "code" } : { ...moved };
712
+ const movedChildren = [];
713
+ const children = payloadKey === "app" ? ["query"] : payloadKey === "realtime_server" ? ["channel", "message"] : payloadKey === "channel" ? ["message"] : [];
714
+ for (const child of children) {
715
+ for (const key of Object.keys(lock.objects).filter((k) => k.startsWith(`${child}:${oldName}|`))) {
716
+ const to = `${child}:${newName}|${key.slice(`${child}:${oldName}|`.length)}`;
717
+ const there = objects[to];
718
+ if (there !== void 0 && there.guid !== rawDeriveGuid(to)) {
719
+ throw new LockRenameConflictError(
720
+ `Lock entry "${to}" already pins an identity of its own (${there.guid ?? `canonical ${there.canonical}`}), so moving "${key}" with its group onto it would lose one of the two. Nothing was written.`,
721
+ { shownOld: key, shownNew: to }
722
+ );
723
+ }
724
+ objects[to] = { ...objects[key] };
725
+ delete objects[key];
726
+ movedChildren.push({ kind: child, from: key, to });
727
+ }
728
+ }
729
+ return { lock: withObjects(lock, objects), discardedNewcomer, movedChildren };
730
+ }
731
+ function adoptFromBundle(lock, bundle, bundlePath) {
732
+ if (!bundle || typeof bundle !== "object" || Array.isArray(bundle)) {
733
+ throw new NotABundleError(`${bundlePath} is not a Xano bundle (expected a JSON object with a \`payload\`).`);
734
+ }
735
+ const payload = bundle.payload;
736
+ if (!payload || typeof payload !== "object" || Array.isArray(payload)) {
737
+ throw new NotABundleError(`${bundlePath} has no \`payload\` \u2014 it is not a Xano bundle.`);
738
+ }
739
+ const sections = payload;
740
+ const objects = { ...lock.objects };
741
+ for (const key of Object.keys(objects)) objects[key] = { ...objects[key] };
742
+ const added = [];
743
+ const changed = [];
744
+ let canonicalsSeen = false;
745
+ const imported = /* @__PURE__ */ new Set();
746
+ const codePinned = [];
747
+ const applyEntry = (key, incoming) => {
748
+ const before = objects[key];
749
+ if (before?.guid_source === "code" && before.guid !== void 0 && incoming.guid !== void 0 && incoming.guid !== before.guid) {
750
+ codePinned.push({ key, guid: before.guid, live: incoming.guid });
751
+ return;
752
+ }
753
+ imported.add(key);
754
+ const after = { ...before, ...incoming };
755
+ if (incoming.canonical !== void 0 && incoming.canonical !== before?.canonical) {
756
+ if (key === WORKSPACE_KEY) delete after.canonical_source;
757
+ else after.canonical_source = "adopted";
758
+ }
759
+ if (before?.guid !== after.guid) delete after.guid_source;
760
+ if (after.replaced !== void 0 && after.guid !== void 0 && after.replaced.includes(after.guid)) {
761
+ const rest = after.replaced.filter((g) => g !== after.guid);
762
+ if (rest.length > 0) after.replaced = rest;
763
+ else delete after.replaced;
764
+ }
765
+ if (before === void 0) {
766
+ objects[key] = after;
767
+ added.push(key);
768
+ } else if (before.guid !== after.guid || before.canonical !== after.canonical) {
769
+ changed.push({ key, before, after });
770
+ objects[key] = after;
771
+ } else if (before.canonical_source !== after.canonical_source || before.type !== after.type) {
772
+ objects[key] = after;
773
+ }
774
+ };
775
+ const appNames = identityNamesByGuid(sections);
776
+ for (const payloadKey of LOCK_PAYLOAD_KEYS) {
777
+ const arr = sections[payloadKey];
778
+ if (!Array.isArray(arr)) continue;
779
+ const namesSeen = /* @__PURE__ */ new Set();
780
+ for (const obj of arr) {
781
+ if (!obj || typeof obj !== "object") continue;
782
+ const o = obj;
783
+ if (typeof o.name !== "string" || typeof o.guid !== "string" || o.guid === "") continue;
784
+ const lockName = lockNameForObject(payloadKey, o, appNames);
785
+ if (namesSeen.has(lockName)) {
786
+ throw new Error(
787
+ `${bundlePath} contains two "${payloadKey}" objects with the identity "${lockName}" \u2014 the lock keys identity per kind and cannot represent both. Adoption aborted; rename one of them engine-side, then re-export and re-adopt.`
788
+ );
789
+ }
790
+ namesSeen.add(lockName);
791
+ const incoming = { guid: o.guid };
792
+ if (typeof o.canonical === "string" && o.canonical !== "") {
793
+ incoming.canonical = o.canonical;
794
+ canonicalsSeen = true;
795
+ }
796
+ if (payloadKey === "toolset" && o.type === "agent") incoming.type = "agent";
797
+ applyEntry(lockKey(payloadKey, lockName), incoming);
798
+ }
799
+ }
800
+ const ws = sections["workspace"];
801
+ if (ws && typeof ws === "object" && !Array.isArray(ws)) {
802
+ const w = ws;
803
+ if (typeof w.canonical === "string" && w.canonical !== "") {
804
+ canonicalsSeen = true;
805
+ applyEntry(WORKSPACE_KEY, { canonical: w.canonical });
806
+ }
807
+ }
808
+ const vault = sections["vault"];
809
+ const vaultCount = Array.isArray(vault) ? vault.length : 0;
810
+ const privateVaultCount = Array.isArray(vault) ? vault.filter(isPrivateLibraryRow).length : 0;
811
+ refuseImportedGuidClash(objects, imported, bundlePath, toolsetKindsFromPayload(payload, lock.objects));
812
+ let validated;
813
+ try {
814
+ validated = validateLockObjects(objects, bundlePath);
815
+ } catch (err) {
816
+ const detail = err instanceof Error ? err.message.replace(/^Invalid lock file [^:]*: /, "") : String(err);
817
+ throw new LockImportConflictError(
818
+ `Adopting ${bundlePath} would leave an invalid lock \u2014 ${detail} Fix the entry named in xano.lock (\`xanosdk lock rename\` or \`xanosdk lock prune --identity-only\`), then re-run the import.`
819
+ );
820
+ }
821
+ const merged = withObjects(lock, validated);
822
+ return {
823
+ lock: merged,
824
+ added: added.sort(),
825
+ changed,
826
+ canonicalsSeen,
827
+ vaultCount,
828
+ privateVaultCount,
829
+ seen: [...imported].sort(),
830
+ codePinned
831
+ };
832
+ }
833
+ var NotABundleError = class extends Error {
834
+ name = "NotABundleError";
835
+ };
836
+ function refuseImportedGuidClash(objects, imported, bundlePath, kinds) {
837
+ const owners = /* @__PURE__ */ new Map();
838
+ for (const [key, entry] of Object.entries(objects)) {
839
+ if (entry.guid === void 0) continue;
840
+ const other = owners.get(entry.guid);
841
+ if (other === void 0) {
842
+ owners.set(entry.guid, key);
843
+ continue;
844
+ }
845
+ const live = imported.has(key) ? key : other;
846
+ const stale = live === key ? other : key;
847
+ const [liveKind, liveName] = splitKey(live);
848
+ const [staleKind, staleName] = splitKey(stale);
849
+ const kindWord = staleKind === "toolset" ? kinds.get(liveName) ?? "mcpServer" : sdkKindName2(staleKind);
850
+ const sameKindRename = !imported.has(stale) && liveKind === staleKind;
851
+ const remedy = imported.has(stale) ? `The bundle itself carries that guid twice; export the workspace again and re-import.` : sameKindRename ? `One side renamed it. If the workspace did, rename it in code to "${liveName}" too, then \`xanosdk lock rename ${kindWord} ${staleName} ${liveName}\` and re-run the import. If your source did, the lock already follows it: deploy the rename, then export the workspace again and re-import.` : `Drop the stale entry first \u2014 \`xanosdk lock prune --identity-only ${displayLockKey(stale, kinds)} --yes\` \u2014 then re-run the import.`;
852
+ const head = `${bundlePath} holds guid ${entry.guid} under "${displayLockKey(live, kinds)}", but the lock already pins it to "${displayLockKey(stale, kinds)}".`;
853
+ throw new LockImportConflictError(`${head} ${remedy}`, {
854
+ ...sameKindRename ? {
855
+ clash: {
856
+ guid: entry.guid,
857
+ kind: staleKind,
858
+ kindWord,
859
+ workspaceName: liveName,
860
+ lockName: staleName,
861
+ workspaceKey: displayLockKey(live, kinds),
862
+ lockKey: displayLockKey(stale, kinds)
863
+ }
864
+ } : {}
865
+ });
866
+ }
867
+ }
868
+ function splitKey(key) {
869
+ const colon = key.indexOf(":");
870
+ return colon <= 0 ? [key, ""] : [key.slice(0, colon), key.slice(colon + 1)];
871
+ }
872
+ function withoutGuidSources(lock) {
873
+ const objects = {};
874
+ for (const [key, entry] of Object.entries(lock.objects)) {
875
+ const { guid_source: _source, ...rest } = entry;
876
+ objects[key] = rest;
877
+ }
878
+ return withObjects(lock, objects);
879
+ }
880
+ function mergeObserved(lock, observed, opts = {}) {
881
+ const objects = {};
882
+ for (const [key, identity] of Object.entries(observed)) {
883
+ const prior = lock.objects[key];
884
+ const entry = { ...prior, ...identity };
885
+ if (identity.type === void 0) delete entry.type;
886
+ if (identity.guid_source === void 0) delete entry.guid_source;
887
+ if (key.startsWith("dbo:") && prior?.guid !== void 0 && entry.guid !== void 0 && prior.guid !== entry.guid) {
888
+ const mayHoldRows = prior.guid_source !== "code" || opts.landedGuids?.has(prior.guid) === true;
889
+ if (mayHoldRows) entry.replaced = [...prior.replaced ?? [], prior.guid];
890
+ }
891
+ if (opts.keepAdopted !== true && entry.adopted === true) {
892
+ delete entry.adopted;
893
+ entry.imported = true;
894
+ }
895
+ if (lock.objects[key]?.guid !== entry.guid) delete entry.imported;
896
+ objects[key] = entry;
897
+ }
898
+ const liveGuids = new Map(
899
+ Object.entries(objects).flatMap(([k, e]) => e.guid === void 0 ? [] : [[e.guid, splitKey(k)[0]]])
900
+ );
901
+ const liveCanonicals = new Set(
902
+ Object.values(objects).map((e) => e.canonical).filter(Boolean)
903
+ );
904
+ const orphans = [];
905
+ const dropped = [];
906
+ const cededCanonicals = [];
907
+ for (const [key, entry] of Object.entries(lock.objects)) {
908
+ if (key in objects) continue;
909
+ if (entry.guid !== void 0 && liveGuids.get(entry.guid) === splitKey(key)[0]) {
910
+ dropped.push(key);
911
+ continue;
912
+ }
913
+ if (entry.canonical !== void 0 && liveCanonicals.has(entry.canonical)) {
914
+ const kept = { ...entry };
915
+ delete kept.canonical;
916
+ delete kept.canonical_source;
917
+ if (kept.guid === void 0) {
918
+ dropped.push(key);
919
+ continue;
920
+ }
921
+ objects[key] = kept;
922
+ orphans.push(key);
923
+ cededCanonicals.push(key);
924
+ continue;
925
+ }
926
+ objects[key] = entry;
927
+ orphans.push(key);
928
+ }
929
+ const held = new Set(Object.values(objects).flatMap((e) => e.guid === void 0 ? [] : [e.guid]));
930
+ for (const [key, entry] of Object.entries(objects)) {
931
+ if (entry.replaced === void 0) continue;
932
+ const kept = [...new Set(entry.replaced)].filter((g) => !held.has(g));
933
+ if (kept.length === entry.replaced.length) continue;
934
+ const next = { ...entry };
935
+ if (kept.length > 0) next.replaced = kept;
936
+ else delete next.replaced;
937
+ objects[key] = next;
938
+ }
939
+ return {
940
+ lock: withObjects(lock, objects),
941
+ orphans: orphans.sort(),
942
+ dropped: dropped.sort(),
943
+ cededCanonicals: cededCanonicals.sort()
944
+ };
945
+ }
946
+
947
+ export {
948
+ sdkKindName,
949
+ LOCK_VERSION,
950
+ WORKSPACE_KEY,
951
+ LOCK_PAYLOAD_KEYS,
952
+ CANONICAL_PAYLOAD_KEYS,
953
+ sdkKindName2,
954
+ acceptedLockKinds,
955
+ toolsetKindsFromPayload,
956
+ toolsetKindsFromLock,
957
+ displayLockKey,
958
+ fileSpellingNote,
959
+ resolvePayloadKey,
960
+ UnknownLockKindError,
961
+ LockEntryNotFoundError,
962
+ LockRenameConflictError,
963
+ LockImportConflictError,
964
+ normalizeLockKey,
965
+ lockKey,
966
+ codePinnedTables,
967
+ lockNameForObject,
968
+ identityNamesByGuid,
969
+ appNamesByGuid,
970
+ DESTINATION_KEY,
971
+ emptyLock,
972
+ withObjects,
973
+ parseLock,
974
+ parseLockReport,
975
+ validateLockModel,
976
+ serializeLock,
977
+ mintCanonical,
978
+ createLockContext,
979
+ recordObserved,
980
+ checkRenameTarget,
981
+ renameLockEntry,
982
+ adoptFromBundle,
983
+ NotABundleError,
984
+ withoutGuidSources,
985
+ mergeObserved
986
+ };
987
+ //# sourceMappingURL=chunk-6MR5TI5V.js.map