@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,39 @@
1
+ import {
2
+ backendDirFor,
3
+ backendDirIn,
4
+ resolveBackendDir
5
+ } from "./chunk-5A2PLKZB.js";
6
+ import "./chunk-AHJWCYQO.js";
7
+ import "./chunk-DX4QR4B2.js";
8
+ import "./chunk-6QXLMMT3.js";
9
+ import "./chunk-ZFDZKNGG.js";
10
+ import "./chunk-FWD7AL6N.js";
11
+ import "./chunk-2GNFDZA2.js";
12
+ import "./chunk-JTUKLCXS.js";
13
+ import "./chunk-4KHEMC32.js";
14
+ import {
15
+ projectRootFrom
16
+ } from "./chunk-ROY4YAEQ.js";
17
+ import "./chunk-WRBKLYSJ.js";
18
+ import "./chunk-3LDULPRE.js";
19
+ import "./chunk-YLDALTWZ.js";
20
+ import "./chunk-LLNZGEFK.js";
21
+ import "./chunk-QXTKSOFI.js";
22
+ import "./chunk-X2NL4KUO.js";
23
+ import "./chunk-UCQ2VUTG.js";
24
+ import "./chunk-DGWHAVRG.js";
25
+ import "./chunk-PTHVMXZI.js";
26
+ import "./chunk-UTI5G6OJ.js";
27
+ import "./chunk-2EZ3ZJZZ.js";
28
+ import "./chunk-5ZSO4T2G.js";
29
+ import "./chunk-TFFGOFVZ.js";
30
+ import "./chunk-OHX6MIUZ.js";
31
+ import "./chunk-36JUQZVQ.js";
32
+ import "./chunk-PZ5AY32C.js";
33
+ export {
34
+ backendDirFor,
35
+ backendDirIn,
36
+ projectRootFrom,
37
+ resolveBackendDir
38
+ };
39
+ //# sourceMappingURL=backend-dir-2U53CIAL.js.map
@@ -0,0 +1,28 @@
1
+ import {
2
+ allBackendSlots,
3
+ backendSlot,
4
+ backendSlotForFlag,
5
+ commandPath,
6
+ parseSlot,
7
+ refusedKind,
8
+ requireBackendSlot,
9
+ slotValueMissing
10
+ } from "./chunk-STSFNCY4.js";
11
+ import "./chunk-PTHVMXZI.js";
12
+ import "./chunk-UTI5G6OJ.js";
13
+ import "./chunk-2EZ3ZJZZ.js";
14
+ import "./chunk-5ZSO4T2G.js";
15
+ import "./chunk-TFFGOFVZ.js";
16
+ import "./chunk-36JUQZVQ.js";
17
+ import "./chunk-PZ5AY32C.js";
18
+ export {
19
+ allBackendSlots,
20
+ backendSlot,
21
+ backendSlotForFlag,
22
+ commandPath,
23
+ parseSlot,
24
+ refusedKind,
25
+ requireBackendSlot,
26
+ slotValueMissing
27
+ };
28
+ //# sourceMappingURL=backend-slot-7QXW2QYC.js.map
package/dist/bin.d.ts ADDED
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/bin.js ADDED
@@ -0,0 +1,255 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ maybeNotifyUpdate
4
+ } from "./chunk-LIEOKXKD.js";
5
+ import "./chunk-D7VGG3WS.js";
6
+ import "./chunk-2TFRR6JV.js";
7
+ import {
8
+ readVersion,
9
+ run
10
+ } from "./chunk-ETO6LGLD.js";
11
+ import "./chunk-ZIY7RNUT.js";
12
+ import "./chunk-DAD3ONIS.js";
13
+ import "./chunk-HHN734BU.js";
14
+ import "./chunk-LPECSJ2J.js";
15
+ import "./chunk-6NNTNXN7.js";
16
+ import "./chunk-QCNYHBL7.js";
17
+ import "./chunk-2ZUEE4EK.js";
18
+ import "./chunk-AN6BL47T.js";
19
+ import "./chunk-ET4Y4XCB.js";
20
+ import "./chunk-SWBF2LTK.js";
21
+ import "./chunk-UZ6QQWJT.js";
22
+ import "./chunk-A3UDOZB6.js";
23
+ import "./chunk-2MNLRIOX.js";
24
+ import "./chunk-3M4LFYNQ.js";
25
+ import "./chunk-AM4FKL4J.js";
26
+ import "./chunk-Q325JKYB.js";
27
+ import "./chunk-STSFNCY4.js";
28
+ import "./chunk-I4F5TCJH.js";
29
+ import "./chunk-5QU2P5CA.js";
30
+ import "./chunk-ZYJP6BOO.js";
31
+ import "./chunk-QO6BVGS5.js";
32
+ import "./chunk-JZGVVJSI.js";
33
+ import "./chunk-7G3CTU7I.js";
34
+ import "./chunk-6PBR37LN.js";
35
+ import "./chunk-T5KELPAR.js";
36
+ import "./chunk-622HUCZT.js";
37
+ import "./chunk-NAQDMEHV.js";
38
+ import "./chunk-5A2PLKZB.js";
39
+ import "./chunk-AHJWCYQO.js";
40
+ import "./chunk-DX4QR4B2.js";
41
+ import "./chunk-6QXLMMT3.js";
42
+ import "./chunk-ZFDZKNGG.js";
43
+ import "./chunk-FWD7AL6N.js";
44
+ import "./chunk-2GNFDZA2.js";
45
+ import "./chunk-JTUKLCXS.js";
46
+ import {
47
+ installSentWriteTracking,
48
+ landedStep,
49
+ pendingWrite
50
+ } from "./chunk-4KHEMC32.js";
51
+ import "./chunk-U64O2MXY.js";
52
+ import "./chunk-ROY4YAEQ.js";
53
+ import "./chunk-P2HAGF6H.js";
54
+ import "./chunk-TLQE7ZN3.js";
55
+ import "./chunk-WRBKLYSJ.js";
56
+ import "./chunk-3LDULPRE.js";
57
+ import "./chunk-XW6KISBB.js";
58
+ import {
59
+ installSecretRedaction,
60
+ redactSecrets
61
+ } from "./chunk-AWQ7BQTQ.js";
62
+ import "./chunk-EUUUMY7J.js";
63
+ import "./chunk-YLDALTWZ.js";
64
+ import "./chunk-5FBYXK5P.js";
65
+ import "./chunk-LLNZGEFK.js";
66
+ import "./chunk-QXTKSOFI.js";
67
+ import "./chunk-X2NL4KUO.js";
68
+ import "./chunk-OPHB5ORL.js";
69
+ import "./chunk-UCQ2VUTG.js";
70
+ import "./chunk-DGWHAVRG.js";
71
+ import "./chunk-JGE7CAWB.js";
72
+ import {
73
+ EXIT_OUTCOME_UNKNOWN,
74
+ activeOperation,
75
+ clearProgress,
76
+ detail,
77
+ error,
78
+ failureWritesDocument,
79
+ installCliDiagnosticSink,
80
+ installCliPrefix,
81
+ installStdoutPipeGuard,
82
+ interruptDocumentText,
83
+ interruptedRunDocumentExitCode,
84
+ interruptedRunFinished,
85
+ interruptedRunWroteDocument,
86
+ processExitCode,
87
+ reportFailure,
88
+ success
89
+ } from "./chunk-PTHVMXZI.js";
90
+ import "./chunk-MXHSQOC4.js";
91
+ import "./chunk-6IUMKYWI.js";
92
+ import "./chunk-2CMJZDCL.js";
93
+ import "./chunk-CTMO46PK.js";
94
+ import "./chunk-ZDPP6RKB.js";
95
+ import "./chunk-K5BBGTYZ.js";
96
+ import "./chunk-LQCMKAJ7.js";
97
+ import "./chunk-YGZHHAAB.js";
98
+ import "./chunk-XVBGLISP.js";
99
+ import "./chunk-6HO3NCSJ.js";
100
+ import "./chunk-5V5XU32D.js";
101
+ import "./chunk-GSGDWJB5.js";
102
+ import "./chunk-HVRUQXGD.js";
103
+ import "./chunk-ERVIASGL.js";
104
+ import "./chunk-4POWHT2K.js";
105
+ import "./chunk-H2V3N23D.js";
106
+ import "./chunk-3JDU4VRL.js";
107
+ import "./chunk-WTPZRR4I.js";
108
+ import "./chunk-UTI5G6OJ.js";
109
+ import "./chunk-2EZ3ZJZZ.js";
110
+ import "./chunk-6MR5TI5V.js";
111
+ import "./chunk-5ZSO4T2G.js";
112
+ import "./chunk-XNCP4KYO.js";
113
+ import "./chunk-AKNCFVKZ.js";
114
+ import "./chunk-YU4HSQW7.js";
115
+ import "./chunk-TFFGOFVZ.js";
116
+ import "./chunk-G554NZNI.js";
117
+ import "./chunk-N5GKCWE5.js";
118
+ import "./chunk-OXA6PSZT.js";
119
+ import "./chunk-VAX3UZOY.js";
120
+ import "./chunk-NZOWWHU5.js";
121
+ import "./chunk-4BW2SG2N.js";
122
+ import "./chunk-TTEIYD5P.js";
123
+ import "./chunk-CIMQZRRE.js";
124
+ import "./chunk-OHX6MIUZ.js";
125
+ import "./chunk-36JUQZVQ.js";
126
+ import "./chunk-PZ5AY32C.js";
127
+
128
+ // src/emit/interrupt.ts
129
+ import { writeSync } from "fs";
130
+ var EXIT_SIGINT = 130;
131
+ var SIGNAL_EXIT = { SIGINT: EXIT_SIGINT, SIGTERM: 143, SIGHUP: 129 };
132
+ function writeStdoutSync(text) {
133
+ try {
134
+ writeSync(1, text);
135
+ } catch {
136
+ process.stdout.write(text);
137
+ }
138
+ }
139
+ function handleInterrupt(exit = process.exit, writeStdout = writeStdoutSync, signal = "SIGINT", argv2 = process.argv.slice(2)) {
140
+ let code = SIGNAL_EXIT[signal];
141
+ try {
142
+ clearProgress();
143
+ const write = (doc) => writeStdout(redactSecrets(interruptDocumentText(doc)));
144
+ const landed = landedStep();
145
+ const op = activeOperation();
146
+ if (op === void 0 || !op.writeSent) {
147
+ const sent = pendingWrite();
148
+ if (sent === void 0 && op === void 0 && interruptedRunFinished()) {
149
+ code = runExitCode();
150
+ return;
151
+ }
152
+ const reported = interruptedRunDocumentExitCode();
153
+ if (sent === void 0 && landed === void 0 && reported !== void 0) {
154
+ code = reported;
155
+ return;
156
+ }
157
+ if (sent === void 0) {
158
+ reportCancelled(signal, code, landed, argv2, write);
159
+ return;
160
+ }
161
+ code = EXIT_OUTCOME_UNKNOWN;
162
+ reportSentWrite(sent, landed, argv2, write);
163
+ return;
164
+ }
165
+ code = EXIT_OUTCOME_UNKNOWN;
166
+ if (op.machine) {
167
+ let doc;
168
+ try {
169
+ doc = withLanded(op.snapshot({ interrupted: true }), landed);
170
+ } catch {
171
+ doc = void 0;
172
+ }
173
+ if (doc !== void 0) write(doc);
174
+ }
175
+ if (landed !== void 0) success(landed.said);
176
+ error(`Interrupted: ${op.what ?? "the write"} was already sent and may have completed.`);
177
+ detail(`Check with \`${op.resolveWith}\` before retrying.`);
178
+ } catch {
179
+ } finally {
180
+ exit(code);
181
+ }
182
+ }
183
+ function runExitCode() {
184
+ const set = process.exitCode;
185
+ const n = typeof set === "number" ? set : typeof set === "string" ? Number(set) : 0;
186
+ return Number.isInteger(n) ? n : 0;
187
+ }
188
+ function withLanded(doc, landed) {
189
+ if (landed === void 0 || typeof doc !== "object" || doc === null || Array.isArray(doc)) return doc;
190
+ return { ...landed.fields, ...doc, landed: landed.said };
191
+ }
192
+ function reportCancelled(signal, code, landed, argv2, write) {
193
+ const head = signal === "SIGINT" ? "Cancelled." : `Stopped by ${signal}.`;
194
+ const after = landed === void 0 ? void 0 : landed.ifCancelled ?? landed.said;
195
+ const wantsDocument = landed === void 0 ? argv2.includes("--json") : failureWritesDocument(argv2);
196
+ if (wantsDocument && !interruptedRunWroteDocument()) {
197
+ write({
198
+ ...landed?.fields,
199
+ ok: false,
200
+ outcome: "cancelled",
201
+ interrupted: true,
202
+ ...landed === void 0 ? {} : { landed: landed.said },
203
+ error: { code: "SDK_ERROR", message: after === void 0 ? head : `${head}
204
+ ${after}`, exitCode: code }
205
+ });
206
+ }
207
+ error(head);
208
+ if (after !== void 0) detail(after);
209
+ }
210
+ function reportSentWrite(sent, landed, argv2, write) {
211
+ const what = sent.what ?? `a write to ${sent.host}`;
212
+ const head = `Interrupted: ${what} was already ${sent.local === true ? "running" : "sent"} and may have completed.`;
213
+ const check = sent.check ?? (sent.resolveWith !== void 0 ? `Check with \`${sent.resolveWith}\` before retrying.` : `Check what ${sent.host} now holds before retrying.`);
214
+ if (failureWritesDocument(argv2) && !interruptedRunWroteDocument()) {
215
+ write({
216
+ ...landed?.fields,
217
+ ok: false,
218
+ outcome: "unknown",
219
+ interrupted: true,
220
+ ...landed === void 0 ? {} : { landed: landed.said },
221
+ ...sent.resolveWith === void 0 ? {} : { resolveWith: sent.resolveWith },
222
+ error: {
223
+ code: "SDK_ERROR",
224
+ message: [...landed === void 0 ? [] : [landed.said], head, check].join("\n"),
225
+ exitCode: EXIT_OUTCOME_UNKNOWN
226
+ }
227
+ });
228
+ }
229
+ if (landed !== void 0) success(landed.said);
230
+ error(head);
231
+ detail(check);
232
+ }
233
+ function installInterruptHandler() {
234
+ for (const signal of Object.keys(SIGNAL_EXIT)) {
235
+ process.on(signal, () => handleInterrupt(process.exit, writeStdoutSync, signal));
236
+ }
237
+ }
238
+
239
+ // src/emit/bin.ts
240
+ import { fileURLToPath } from "url";
241
+ installSecretRedaction(process.stdout);
242
+ installSecretRedaction(process.stderr);
243
+ installInterruptHandler();
244
+ installSentWriteTracking();
245
+ installCliDiagnosticSink();
246
+ installStdoutPipeGuard();
247
+ installCliPrefix(fileURLToPath(import.meta.url));
248
+ var argv = process.argv.slice(2);
249
+ run(argv).then(() => maybeNotifyUpdate()).catch((err) => {
250
+ reportFailure(err, readVersion(), argv);
251
+ const code = processExitCode(err);
252
+ process.exitCode = code;
253
+ process.stdout.write("", () => process.exit(code));
254
+ });
255
+ //# sourceMappingURL=bin.js.map
@@ -0,0 +1,61 @@
1
+ import {
2
+ BRANCH_LABEL_PATTERN,
3
+ BranchHttpError,
4
+ BranchLabelError,
5
+ BranchNotFoundError,
6
+ BranchTakenError,
7
+ DEFAULT_BRANCH_LABEL,
8
+ assertBranchAbsent,
9
+ assertUsableBranchLabel,
10
+ createBranch,
11
+ deleteBranch,
12
+ derivedLabelTail,
13
+ findBranch,
14
+ freeBranchLabel,
15
+ listBranchListing,
16
+ listBranches,
17
+ liveBranchLabel,
18
+ requireBranch,
19
+ setLiveBranch
20
+ } from "./chunk-TRJCALW3.js";
21
+ import "./chunk-2MNLRIOX.js";
22
+ import "./chunk-T5KELPAR.js";
23
+ import "./chunk-622HUCZT.js";
24
+ import "./chunk-NAQDMEHV.js";
25
+ import "./chunk-FWD7AL6N.js";
26
+ import "./chunk-XW6KISBB.js";
27
+ import "./chunk-AWQ7BQTQ.js";
28
+ import "./chunk-EUUUMY7J.js";
29
+ import "./chunk-YLDALTWZ.js";
30
+ import "./chunk-5FBYXK5P.js";
31
+ import "./chunk-LLNZGEFK.js";
32
+ import "./chunk-QXTKSOFI.js";
33
+ import "./chunk-X2NL4KUO.js";
34
+ import "./chunk-PTHVMXZI.js";
35
+ import "./chunk-UTI5G6OJ.js";
36
+ import "./chunk-2EZ3ZJZZ.js";
37
+ import "./chunk-5ZSO4T2G.js";
38
+ import "./chunk-TFFGOFVZ.js";
39
+ import "./chunk-36JUQZVQ.js";
40
+ import "./chunk-PZ5AY32C.js";
41
+ export {
42
+ BRANCH_LABEL_PATTERN,
43
+ BranchHttpError,
44
+ BranchLabelError,
45
+ BranchNotFoundError,
46
+ BranchTakenError,
47
+ DEFAULT_BRANCH_LABEL,
48
+ assertBranchAbsent,
49
+ assertUsableBranchLabel,
50
+ createBranch,
51
+ deleteBranch,
52
+ derivedLabelTail,
53
+ findBranch,
54
+ freeBranchLabel,
55
+ listBranchListing,
56
+ listBranches,
57
+ liveBranchLabel,
58
+ requireBranch,
59
+ setLiveBranch
60
+ };
61
+ //# sourceMappingURL=branch-NCRNWQBQ.js.map
@@ -0,0 +1,79 @@
1
+ import {
2
+ liveBranchMismatch,
3
+ liveMismatch,
4
+ runBranchCommand,
5
+ shownLabel,
6
+ staleSchemaRefs
7
+ } from "./chunk-K6RXBGUB.js";
8
+ import "./chunk-65HWOMGV.js";
9
+ import "./chunk-BWPNT55T.js";
10
+ import "./chunk-TPHWJ7UG.js";
11
+ import "./chunk-CJHQKJU4.js";
12
+ import "./chunk-3DRXWLJ5.js";
13
+ import "./chunk-X4DVXBFY.js";
14
+ import "./chunk-TRJCALW3.js";
15
+ import "./chunk-45UIT5T2.js";
16
+ import "./chunk-HRVBLCVJ.js";
17
+ import "./chunk-ZIY7RNUT.js";
18
+ import "./chunk-2ZUEE4EK.js";
19
+ import "./chunk-ET4Y4XCB.js";
20
+ import "./chunk-A3UDOZB6.js";
21
+ import "./chunk-2MNLRIOX.js";
22
+ import "./chunk-5QU2P5CA.js";
23
+ import "./chunk-ZYJP6BOO.js";
24
+ import "./chunk-QO6BVGS5.js";
25
+ import "./chunk-JZGVVJSI.js";
26
+ import "./chunk-7G3CTU7I.js";
27
+ import "./chunk-6PBR37LN.js";
28
+ import "./chunk-T5KELPAR.js";
29
+ import "./chunk-622HUCZT.js";
30
+ import "./chunk-NAQDMEHV.js";
31
+ import "./chunk-FWD7AL6N.js";
32
+ import "./chunk-4KHEMC32.js";
33
+ import "./chunk-TLQE7ZN3.js";
34
+ import "./chunk-XW6KISBB.js";
35
+ import "./chunk-AWQ7BQTQ.js";
36
+ import "./chunk-EUUUMY7J.js";
37
+ import "./chunk-YLDALTWZ.js";
38
+ import "./chunk-5FBYXK5P.js";
39
+ import "./chunk-LLNZGEFK.js";
40
+ import "./chunk-QXTKSOFI.js";
41
+ import "./chunk-X2NL4KUO.js";
42
+ import "./chunk-3YW23UFH.js";
43
+ import "./chunk-PTHVMXZI.js";
44
+ import "./chunk-2CMJZDCL.js";
45
+ import "./chunk-K5BBGTYZ.js";
46
+ import "./chunk-6HO3NCSJ.js";
47
+ import "./chunk-5V5XU32D.js";
48
+ import "./chunk-ERVIASGL.js";
49
+ import "./chunk-4POWHT2K.js";
50
+ import "./chunk-H2V3N23D.js";
51
+ import "./chunk-3JDU4VRL.js";
52
+ import "./chunk-UTI5G6OJ.js";
53
+ import "./chunk-2EZ3ZJZZ.js";
54
+ import "./chunk-6MR5TI5V.js";
55
+ import "./chunk-5ZSO4T2G.js";
56
+ import "./chunk-XNCP4KYO.js";
57
+ import "./chunk-YU4HSQW7.js";
58
+ import "./chunk-TFFGOFVZ.js";
59
+ import "./chunk-EHP3WPEG.js";
60
+ import "./chunk-L5JYN3NM.js";
61
+ import "./chunk-G554NZNI.js";
62
+ import "./chunk-N5GKCWE5.js";
63
+ import "./chunk-OXA6PSZT.js";
64
+ import "./chunk-VAX3UZOY.js";
65
+ import "./chunk-NZOWWHU5.js";
66
+ import "./chunk-4BW2SG2N.js";
67
+ import "./chunk-TTEIYD5P.js";
68
+ import "./chunk-CIMQZRRE.js";
69
+ import "./chunk-OHX6MIUZ.js";
70
+ import "./chunk-36JUQZVQ.js";
71
+ import "./chunk-PZ5AY32C.js";
72
+ export {
73
+ liveBranchMismatch,
74
+ liveMismatch,
75
+ runBranchCommand,
76
+ shownLabel,
77
+ staleSchemaRefs
78
+ };
79
+ //# sourceMappingURL=branch-commands-ACIRCEQJ.js.map
@@ -0,0 +1,223 @@
1
+ import { S as StackItemXdo, F as FieldXdo } from './xdo-CxDr2Q1C.js';
2
+ export { c as ConditionalContext, d as ConditionalElifContext, E as ExprGroup, f as ExprNode, g as ExprOperand, h as ExprStatement, i as FilterXdo, l as InputXdo, M as MethodXdo, r as ResultItemXdo, s as StatementInputXdo, v as TaggedValue } from './xdo-CxDr2Q1C.js';
3
+
4
+ /**
5
+ * The statement catalog, keyed the way a bundle reader needs it.
6
+ *
7
+ * A compiled statement identifies itself by its STORED name (`mvp:dbo_view`);
8
+ * everything a person reads — a docs link, a lint message, a graph node label —
9
+ * wants the authoring path (`s.db.query`). The mapping is SDK metadata, so a
10
+ * third-party tool must not have to keep its own copy: a new statement kind
11
+ * would then need a release in every tool before it stopped rendering as an
12
+ * unknown node.
13
+ */
14
+ /** One stored statement name and the authoring surface(s) that compile to it. */
15
+ interface StatementCatalogEntry {
16
+ /** The stored `mvp:` name, as it appears on a compiled statement's `name`. */
17
+ readonly storedName: string;
18
+ /** The primary surface key — the engine's own schema name, e.g. `db.query`. */
19
+ readonly surface: string;
20
+ /** The dotted accessor under `s.`, e.g. `db.query` is reachable as `s.db.query`. */
21
+ readonly sPath: string;
22
+ /**
23
+ * Every surface key stored under this name, in catalog order. Almost always
24
+ * one; the mapping is NOT injective (`util.get_raw_input` and `util.get_input`
25
+ * both store `mvp:get_input`), so a reader that must not lose a surface reads
26
+ * this rather than {@link StatementCatalogEntry.surface}.
27
+ */
28
+ readonly surfaces: readonly string[];
29
+ }
30
+ /**
31
+ * Every stored statement name the SDK knows, mapped to its authoring surface.
32
+ *
33
+ * Built once and shared — the returned map is frozen in the sense that it is the
34
+ * same instance on every call, so a caller must not mutate it.
35
+ *
36
+ * `raw()` is deliberately absent: it is the passthrough for stored statements
37
+ * the catalog cannot model, so a `name` that misses here is exactly the set a
38
+ * tool should render as opaque.
39
+ */
40
+ declare function statementCatalog(): ReadonlyMap<string, StatementCatalogEntry>;
41
+
42
+ /**
43
+ * Statement-tree traversal for a compiled bundle.
44
+ *
45
+ * A stack is a `run[]` of {@link StackItemXdo} envelopes, and a statement that
46
+ * nests carries its children under `context` — never under a single key. A
47
+ * conditional stores `if.run` / `elif.run` / `else.run`, a try/catch reuses the
48
+ * same three keys for `try` / `catch` / `finally`, a switch stores its cases
49
+ * under `elif.run` and its default under `else.run`, and every loop, group and
50
+ * transaction stores a bare `context.run`.
51
+ *
52
+ * A tool that hardcodes that key set drops a subtree silently the day the engine
53
+ * adds a nesting shape, so {@link subStacks} does not hardcode it: it finds a
54
+ * sub-stack by SHAPE — any `context` member that is a `{run: [...]}` object,
55
+ * plus `context.run` itself. {@link SUB_STACK_KEYS} is exported as the set known
56
+ * today, and it fixes the ORDER discovery reports; a key outside it is still
57
+ * found, reported after the known ones, in `context` order.
58
+ */
59
+
60
+ /**
61
+ * The `context` keys that hold a nested stack today, in the order
62
+ * {@link subStacks} reports them. The order is the authoring order for every
63
+ * statement that nests: `if` before `elif` before `else` for a conditional,
64
+ * try before catch before finally for a try/catch, cases before default for a
65
+ * switch.
66
+ *
67
+ * This is a reference set, not a filter — see the module note.
68
+ */
69
+ declare const SUB_STACK_KEYS: readonly string[];
70
+ /** One nested stack hanging off a statement's `context`. */
71
+ interface SubStack {
72
+ /** The `context` key the stack is stored under (`if`, `elif`, `else`, `then`, `run`). */
73
+ readonly key: string;
74
+ /**
75
+ * What the branch means at the authoring surface — `try`/`catch`/`finally` for
76
+ * a try/catch, `cases`/`default` for a switch, `body` for a loop. Falls back
77
+ * to the key for a statement with no recorded mapping.
78
+ */
79
+ readonly label: string;
80
+ /** The nested statements, in run order. */
81
+ readonly run: readonly StackItemXdo[];
82
+ }
83
+ /** A statement reached by {@link walk}, with its address and nesting depth. */
84
+ interface WalkedStatement {
85
+ /** The statement envelope, by reference — not a copy. */
86
+ readonly raw: StackItemXdo;
87
+ /**
88
+ * The statement's address within the stack it was walked from — see
89
+ * {@link statementPath}. `"2"` is the third top-level statement; `"2.if.0"` is
90
+ * the first statement of its `if` branch.
91
+ */
92
+ readonly path: string;
93
+ /** Nesting depth: `0` for a top-level statement, `1` inside one sub-stack, and so on. */
94
+ readonly depth: number;
95
+ }
96
+ /**
97
+ * Every nested stack a statement carries, in canonical order.
98
+ *
99
+ * Returns an empty array for a leaf statement. A sub-stack stored empty
100
+ * (`elif: {run: []}`, which the engine always persists on a conditional) is
101
+ * REPORTED with an empty `run` rather than skipped — the branch exists in the
102
+ * bytes, and a tool that renders branches wants to know the difference between
103
+ * "no elif" and "an elif that does nothing".
104
+ */
105
+ declare function subStacks(raw: StackItemXdo): SubStack[];
106
+ /**
107
+ * Join path segments into a statement path.
108
+ *
109
+ * The format is dot-separated, alternating an index with the `context` key that
110
+ * contains the next level: `2` is the third top-level statement, `2.if.0` is the
111
+ * first statement of its `if` branch, `2.elif.0.if.1` is the second statement of
112
+ * its first elif branch. The KEY is used, not the label, so the path addresses
113
+ * the stored bytes and stays stable if an authoring name changes.
114
+ *
115
+ * One shared address is the point: a lint finding, a review comment and a
116
+ * runtime error written by three different tools all name the same node.
117
+ */
118
+ declare function statementPath(segments: readonly (string | number)[]): string;
119
+ /**
120
+ * Walk a stack depth-first in pre-order — every statement, then its sub-stacks
121
+ * in {@link subStacks} order.
122
+ *
123
+ * A statement that is itself a branch carrier (`mvp:conditional_elif`,
124
+ * `mvp:switch_case`) is a stack item like any other, so it is VISITED and then
125
+ * descended into. A tool counting statements should filter those out; a tool
126
+ * addressing nodes wants them present.
127
+ *
128
+ * Iterative rather than recursive: a generated stack can nest deep enough to
129
+ * blow the call stack, and a bundle reader must not be the thing that crashes.
130
+ */
131
+ declare function walk(run: readonly StackItemXdo[]): WalkedStatement[];
132
+
133
+ /**
134
+ * A structural fingerprint for a compiled statement — the thing a diff, a cache
135
+ * key or a "did this change" check wants, and the thing a byte comparison is
136
+ * not.
137
+ *
138
+ * Two reductions run before the hash:
139
+ *
140
+ * 1. {@link normalize}, the same normalizer the SDK uses for fixture comparison
141
+ * and for the `xanosdk preflight` round-trip diff. It strips server-assigned
142
+ * identity (`_xsid`, `id`, timestamps, `market_item`) and canonicalizes the
143
+ * spellings the engine persists two ways.
144
+ * 2. Engine-filled `input[]` slots — the entries carrying `ignore: true`.
145
+ *
146
+ * The second one is the whole reason this is not just `sha1(normalize(x))`. An
147
+ * edit (`db.edit`, `db.add_or_edit`) persists one `input[]` entry per column of
148
+ * the table it writes, and the ones the author did not set carry `ignore: true`.
149
+ * Add a column to a table and every such statement gains an entry — so an
150
+ * unfiltered diff reports that every one of them changed, when what changed was
151
+ * the table. Filtered, the same diff reports the one object that actually
152
+ * changed.
153
+ *
154
+ * A `db.add` is different, and its hash DOES change: an insert writes every
155
+ * column, so the slot for a column the author did not set carries
156
+ * `ignore: false` with the value the row gets (`null`, or the column's default).
157
+ * That slot is a real write, not engine noise.
158
+ *
159
+ * The normalizer deliberately KEEPS `ignore: true` (it is meaningful bytes on a
160
+ * system column, and the normalizer's job is byte fidelity — it must not drop
161
+ * what it cannot prove inert). That is not a contradiction: byte fidelity and
162
+ * structural identity are different questions, so they get different reductions.
163
+ * If you need the byte-level answer, hash `normalize()` yourself.
164
+ */
165
+
166
+ /**
167
+ * JSON with every object's keys sorted — so two statements that differ only in
168
+ * the order the engine happened to serialize their members hash the same.
169
+ */
170
+ declare function canonicalJson(value: unknown): string;
171
+ /**
172
+ * A stable hex fingerprint of a statement AND everything nested under it.
173
+ *
174
+ * Equal hashes mean the two statements do the same thing; different hashes mean
175
+ * something an author wrote differs. The value is stable across SDK versions
176
+ * only as far as the normalizer is — treat it as a comparison key computed in
177
+ * one pass over both sides, not as a value to persist and compare next year.
178
+ */
179
+ declare function structuralHash(raw: StackItemXdo): string;
180
+
181
+ /**
182
+ * Reading table relationships out of a stored column.
183
+ *
184
+ * Both are storage details a schema view needs and nothing else states, so they
185
+ * have been reverse-engineered once per tool up to now.
186
+ */
187
+
188
+ /**
189
+ * The table a foreign-key column points at, as a guid — or `null` if the column
190
+ * is not a reference.
191
+ *
192
+ * A reference is an `int` or `uuid` column whose LAST method is `@` with a
193
+ * single `dbo=<guid>` argument. The position matters: `@` is an annotation the
194
+ * engine appends, and reading any `@` in the list would misread a column that
195
+ * carries one for another reason.
196
+ *
197
+ * A bare `dbo=` returns `null`. That is what the editor writes when a reference
198
+ * is CLEARED — an FK annotation pointing at nothing, which is not a reference.
199
+ */
200
+ declare function tableRefOf(column: FieldXdo): string | null;
201
+ /**
202
+ * The table a db-link column expands, as a guid — or `null` if the column is not
203
+ * one.
204
+ *
205
+ * The other table relationship, and a different shape entirely: the column's
206
+ * TYPE is the table's identity with `_mvpschema` appended, and the engine
207
+ * expands the link into one input per column of the named table. A schema view
208
+ * that only reads {@link tableRefOf} misses these edges.
209
+ */
210
+ declare function linkedTableOf(column: FieldXdo): string | null;
211
+
212
+ /**
213
+ * Structural deep-equal for comparing an engine-default subtree to a frozen
214
+ * default — and, exported, for comparing two normalized objects.
215
+ *
216
+ * Exported so a caller that has already normalized both sides does not carry its
217
+ * own copy of the same walk; a second implementation is a second set of rules
218
+ * about what "equal" means.
219
+ */
220
+ declare function deepEqual(a: unknown, b: unknown): boolean;
221
+ declare function normalize<T>(value: T): T;
222
+
223
+ export { FieldXdo, SUB_STACK_KEYS, StackItemXdo, type StatementCatalogEntry, type SubStack, type WalkedStatement, canonicalJson, deepEqual, linkedTableOf, normalize, statementCatalog, statementPath, structuralHash, subStacks, tableRefOf, walk };