@xano/sdk 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/CHANGELOG.md +20 -5
  2. package/README.md +30 -4
  3. package/dist/.build-fingerprint +1 -1
  4. package/dist/{agent-file-refresh-67QIX45H.js → agent-file-refresh-DGGSRPJ4.js} +12 -12
  5. package/dist/agent-skill-command-37DFYS7Q.js +414 -0
  6. package/dist/{answer-shape-UCDUKPAN.js → answer-shape-RBFDCNZ7.js} +4 -4
  7. package/dist/{backend-dir-3LIL6SCT.js → backend-dir-KDD43X7K.js} +14 -14
  8. package/dist/{backend-slot-JREP27UD.js → backend-slot-TBOVZXDE.js} +3 -3
  9. package/dist/bin.js +48 -47
  10. package/dist/{branch-2IPHOAYS.js → branch-7PIKNUD7.js} +11 -10
  11. package/dist/{branch-commands-KTKAXBAN.js → branch-commands-EGY7ZEZE.js} +23 -22
  12. package/dist/bundle.js +4 -4
  13. package/dist/{chunk-GWTFI3GA.js → chunk-26LHXLD3.js} +2 -2
  14. package/dist/{chunk-ENMBEXOP.js → chunk-2ACWDSAQ.js} +3 -3
  15. package/dist/{chunk-GOLFAEUV.js → chunk-2SD4LA22.js} +2 -2
  16. package/dist/{chunk-GZHLCUZ6.js → chunk-2XWVZRL6.js} +7 -7
  17. package/dist/{chunk-IF4PEGVD.js → chunk-2YER2J47.js} +11 -11
  18. package/dist/{chunk-N5I37JFB.js → chunk-3FRGNBOC.js} +2 -2
  19. package/dist/{chunk-YKP4ZKVO.js → chunk-46PATL23.js} +3 -3
  20. package/dist/{chunk-QJM5XZ4K.js → chunk-47XT6WQL.js} +8 -8
  21. package/dist/{chunk-AWQ7BQTQ.js → chunk-4GPIOIAC.js} +6 -1
  22. package/dist/{chunk-ND43ZOS3.js → chunk-567KK6XF.js} +7 -7
  23. package/dist/{chunk-EQFYOOO6.js → chunk-5GIOCDUM.js} +829 -893
  24. package/dist/{chunk-TTEIDD5Q.js → chunk-5SCPRXFB.js} +4 -4
  25. package/dist/{chunk-LAOMN6QQ.js → chunk-5ZG7V2VW.js} +3 -3
  26. package/dist/{chunk-JXVJGF3Y.js → chunk-7M6JP3FS.js} +2 -2
  27. package/dist/{chunk-JFBRXRJD.js → chunk-7XXWKTCE.js} +36 -36
  28. package/dist/{chunk-PL7AIAWS.js → chunk-A4R5CAY4.js} +4 -111
  29. package/dist/{chunk-SPKA2LV6.js → chunk-AKERAUNH.js} +4 -4
  30. package/dist/{chunk-26MOFAJT.js → chunk-ARWMVNDJ.js} +6 -3
  31. package/dist/{chunk-I3VHW6XM.js → chunk-B2URJBC4.js} +18 -18
  32. package/dist/{chunk-A7MRZ4GF.js → chunk-B3P25SDP.js} +4 -4
  33. package/dist/chunk-BRANWM4U.js +853 -0
  34. package/dist/{chunk-CHINR7WD.js → chunk-BSVQEKHO.js} +4 -4
  35. package/dist/{chunk-UD2Z7K6W.js → chunk-BZ6WTG3E.js} +4 -4
  36. package/dist/{chunk-D7BUMOKU.js → chunk-CH23ONYG.js} +76 -5
  37. package/dist/{chunk-763M6LX3.js → chunk-CNZASQPL.js} +2 -2
  38. package/dist/{chunk-TECTL2NU.js → chunk-CPN6WSBH.js} +4 -4
  39. package/dist/{chunk-5YQV35C2.js → chunk-CT3J5JRZ.js} +7 -7
  40. package/dist/{chunk-YYC2DZMG.js → chunk-D5OZRJ3T.js} +6 -6
  41. package/dist/{chunk-XFBGXB7X.js → chunk-DG3APBUJ.js} +149 -97
  42. package/dist/chunk-DIWF7L33.js +995 -0
  43. package/dist/{chunk-RIN4YY34.js → chunk-DXZTL7NA.js} +95 -58
  44. package/dist/{chunk-PMMHSX4H.js → chunk-EF4MHLEW.js} +4 -4
  45. package/dist/{chunk-ZDP6GDAB.js → chunk-ELPQTDW6.js} +101 -93
  46. package/dist/{chunk-Q22BMRPF.js → chunk-EPFDY5JU.js} +2 -2
  47. package/dist/{chunk-ZJSTUD6D.js → chunk-EU32BC5B.js} +8 -8
  48. package/dist/{chunk-3BBIDW3Y.js → chunk-FDTET7FZ.js} +3 -3
  49. package/dist/{chunk-YYLUBYXM.js → chunk-FENA7K7C.js} +3 -3
  50. package/dist/{chunk-QZEAANWP.js → chunk-GHMLRFRX.js} +8 -8
  51. package/dist/{chunk-MBDFH7XB.js → chunk-H2K4GFUS.js} +3 -3
  52. package/dist/{chunk-U35MTOXQ.js → chunk-HTQWAQRW.js} +3 -3
  53. package/dist/{chunk-ROY4YAEQ.js → chunk-HU7F56VF.js} +22 -2
  54. package/dist/{chunk-2FLIJGBZ.js → chunk-HZ6ADG3O.js} +47 -8
  55. package/dist/{chunk-GLY552SI.js → chunk-I6XRUU6U.js} +54 -54
  56. package/dist/{chunk-KPFS3RGM.js → chunk-IPNN2KRW.js} +3 -3
  57. package/dist/{chunk-LD6ARK3A.js → chunk-JOOKM7AH.js} +2 -2
  58. package/dist/{chunk-6X6BJN6Y.js → chunk-JOWY6HFL.js} +3 -3
  59. package/dist/{chunk-UIVMR7UK.js → chunk-JX6N73H3.js} +2 -2
  60. package/dist/{chunk-JRVQ7M7W.js → chunk-L472YIGG.js} +8 -8
  61. package/dist/{chunk-YR2I5HGE.js → chunk-L6HZ67P6.js} +2 -2
  62. package/dist/chunk-LCOCRJ4K.js +116 -0
  63. package/dist/{chunk-3EDSPMXN.js → chunk-LJM5CIY4.js} +5 -1
  64. package/dist/{chunk-NPODGBVJ.js → chunk-M2C54ZBC.js} +4 -4
  65. package/dist/{chunk-QXYMDARD.js → chunk-M3NEK3LT.js} +4 -4
  66. package/dist/{chunk-BL3AZ3AP.js → chunk-MBL7CXJ7.js} +2 -2
  67. package/dist/{chunk-7GAIJW62.js → chunk-MYZRMSPM.js} +2 -2
  68. package/dist/{chunk-GHQ4BVI4.js → chunk-N3YFCFCO.js} +13 -13
  69. package/dist/{chunk-M5CSVB23.js → chunk-NDJAKSE7.js} +11 -8
  70. package/dist/{chunk-Z4ZGTCCD.js → chunk-NV37YGOV.js} +6 -6
  71. package/dist/{chunk-GW5RHGOB.js → chunk-O56DQKPL.js} +9 -9
  72. package/dist/{chunk-U6MTGB46.js → chunk-ORGNLQN6.js} +5 -5
  73. package/dist/{chunk-I3H3HCPY.js → chunk-PEIBGH2V.js} +33 -30
  74. package/dist/{chunk-5TVFLG3C.js → chunk-PEX4QZVI.js} +2 -2
  75. package/dist/{chunk-HCG7NDIL.js → chunk-PV25BDCH.js} +5 -5
  76. package/dist/{chunk-VDHA5SSQ.js → chunk-PY722CHR.js} +2 -2
  77. package/dist/{chunk-VW4CWVYX.js → chunk-QGIZLFAS.js} +4 -4
  78. package/dist/{chunk-SSITMX7I.js → chunk-QRQ54LUI.js} +16 -14
  79. package/dist/{chunk-OIKLDDYC.js → chunk-RBU2YX22.js} +3 -3
  80. package/dist/{chunk-EADVVTDK.js → chunk-RRMH7WMY.js} +7 -7
  81. package/dist/{chunk-WZHLMU6T.js → chunk-S46ODQRA.js} +2 -2
  82. package/dist/{chunk-SPITRSOF.js → chunk-SDGV76HF.js} +2 -2
  83. package/dist/{chunk-ATJ2W7DC.js → chunk-SGK3PTTM.js} +281 -121
  84. package/dist/{chunk-3II44CUJ.js → chunk-TWVUYS63.js} +24 -24
  85. package/dist/{chunk-2WBH5HUY.js → chunk-U5M7T6CI.js} +7 -7
  86. package/dist/{chunk-6X3MY2JP.js → chunk-UYFUIHH3.js} +2 -2
  87. package/dist/{chunk-IMELQ2I6.js → chunk-V7MBRUK6.js} +3 -3
  88. package/dist/{chunk-NDWVJ2QZ.js → chunk-VAGSKUWC.js} +3 -3
  89. package/dist/{chunk-WBH4KJWM.js → chunk-VIJ5D3RC.js} +3 -3
  90. package/dist/{chunk-ITC2R2OT.js → chunk-VNDR2T35.js} +7 -7
  91. package/dist/{chunk-IXFJORNH.js → chunk-WNCW2RNB.js} +4 -4
  92. package/dist/{chunk-BTVUYHWV.js → chunk-WUEPP5HD.js} +4 -4
  93. package/dist/{local-engine-command-RYLGMQ2O.js → chunk-YCUDOF6Q.js} +22 -77
  94. package/dist/{chunk-YGLMRH5U.js → chunk-YH2JVJAO.js} +12 -12
  95. package/dist/{chunk-PFBXSVZF.js → chunk-ZGLNHA7T.js} +7 -7
  96. package/dist/{chunk-CCU5CCRX.js → chunk-ZJOAWRED.js} +8 -8
  97. package/dist/{chunk-FU3VCE5A.js → chunk-ZXRDD3Q2.js} +13 -9
  98. package/dist/cli.d.ts +25 -4
  99. package/dist/cli.js +45 -42
  100. package/dist/{codegen-command-R5IASBFC.js → codegen-command-T7TC7PQO.js} +58 -57
  101. package/dist/{commands-H7CPMMHH.js → commands-JDENTDJS.js} +2 -2
  102. package/dist/{completion-W5ZAI6TN.js → completion-YFD5OVJW.js} +8 -4
  103. package/dist/{config-MZ5KG4EP.js → config-YJFUTRJW.js} +7 -7
  104. package/dist/{deploy-command-34T2LKQ5.js → deploy-command-OEVEE6UG.js} +50 -49
  105. package/dist/{deploy-source-YLQ7WMYR.js → deploy-source-HYVZEYXV.js} +33 -32
  106. package/dist/{dev-env-sync-TMJTNU3U.js → dev-env-sync-EFDCJ6KU.js} +48 -47
  107. package/dist/{display-name-hint-ZJGFNJKQ.js → display-name-hint-SW3GB3V7.js} +13 -12
  108. package/dist/{emit-D125xxty.d.ts → emit-Dov_92kn.d.ts} +1 -1
  109. package/dist/{env-example-refresh-CQP3ZMKM.js → env-example-refresh-WNSOH534.js} +59 -58
  110. package/dist/{env-pull-command-UTG6IC2K.js → env-pull-command-UYEXMQ3P.js} +43 -42
  111. package/dist/{env-target-FZROWYFS.js → env-target-JBSLBKNX.js} +12 -11
  112. package/dist/{env-var-command-VYDBQJJW.js → env-var-command-BJNRAXNV.js} +49 -48
  113. package/dist/{ephemeral-BIE6FMJV.js → ephemeral-CEOGMIEA.js} +10 -9
  114. package/dist/{ephemeral-command-OZ26RGXF.js → ephemeral-command-IPSGBCS5.js} +61 -60
  115. package/dist/{ephemeral-state-SNZOX2YK.js → ephemeral-state-MTBASPRS.js} +10 -9
  116. package/dist/{generate-command-4HR7MR36.js → generate-command-XQXODBS6.js} +73 -71
  117. package/dist/{gitignore-EWQBXNX2.js → gitignore-RUVCIZO4.js} +18 -18
  118. package/dist/{impersonate-command-WC7OGKUM.js → impersonate-command-MA27O7S5.js} +41 -40
  119. package/dist/{import-7Z4GCCPO.js → import-XKRFHABE.js} +4 -4
  120. package/dist/index.d.ts +4 -4
  121. package/dist/{init-command-HAO3WXH3.js → init-command-6RDTCMAB.js} +61 -46
  122. package/dist/{init-modules-NSKD4ASY.js → init-modules-DHTBOCQT.js} +7 -7
  123. package/dist/{init-web-MKFFOQUU.js → init-web-ELBXSXDL.js} +2 -2
  124. package/dist/internal.d.ts +4 -4
  125. package/dist/internal.js +1 -1
  126. package/dist/{keep-data-merge-QR2TMKEO.js → keep-data-merge-TDJOIAVT.js} +23 -23
  127. package/dist/{lambda-config-reconcile-7FJXXV6V.js → lambda-config-reconcile-47X5C2E4.js} +6 -5
  128. package/dist/{landing-record-MWXFIRCP.js → landing-record-TPPYFQAS.js} +21 -21
  129. package/dist/{local-engine-choice-VD5LNXJU.js → local-engine-choice-S6VHPJRU.js} +36 -35
  130. package/dist/local-engine-command-4EZCGZ6M.js +85 -0
  131. package/dist/{local-engine-config-W3KB7RWM.js → local-engine-config-2EBL3QKA.js} +3 -2
  132. package/dist/{local-engine-deploy-6O7NKZCA.js → local-engine-deploy-FOPNWU7X.js} +17 -15
  133. package/dist/local-engine-lookup-GM3E3NPP.js +43 -0
  134. package/dist/local-engine-mcp-bridge-QKZHUGW3.js +423 -0
  135. package/dist/local-engine-mcp-command-BFQVLXZC.js +181 -0
  136. package/dist/{local-engine-process-ZLLZEIRF.js → local-engine-process-XUQPQENQ.js} +11 -8
  137. package/dist/{local-engine-state-OCW5YDD7.js → local-engine-state-JQPKGB65.js} +4 -3
  138. package/dist/{local-engine-update-check-LVX4HBBI.js → local-engine-update-check-S7UF6ZF5.js} +6 -5
  139. package/dist/{lock-commands-X2OECR4R.js → lock-commands-HJ6Y5QVS.js} +51 -50
  140. package/dist/{login-command-RLLKD565.js → login-command-JO55NZAS.js} +32 -32
  141. package/dist/{logout-command-XDMSXCDO.js → logout-command-MPRIRSJA.js} +15 -14
  142. package/dist/{marketplace-command-2NHHY2X3.js → marketplace-command-BM6G257N.js} +33 -33
  143. package/dist/{marketplace-resolve-OTZYT4FG.js → marketplace-resolve-AWH3RG57.js} +5 -5
  144. package/dist/{meta-client-TMHVBZFY.js → meta-client-AOSWODQQ.js} +13 -12
  145. package/dist/{module-manifest-FNMW23IX.js → module-manifest-GXI46PEF.js} +3 -3
  146. package/dist/node.d.ts +4 -4
  147. package/dist/node.js +50 -49
  148. package/dist/{operation-outcome-RN62735X.js → operation-outcome-4UKPXTNC.js} +25 -23
  149. package/dist/{output-target-MOLCTPBP.js → output-target-RAZ4KN5J.js} +19 -19
  150. package/dist/{plan-disclosure-CY7AF6KP.js → plan-disclosure-JR52DWXN.js} +13 -12
  151. package/dist/{plugin-contributions-WR26U7NT.js → plugin-contributions-E6XHLQWK.js} +5 -5
  152. package/dist/{plugin-prompt-ZUYQQIX4.js → plugin-prompt-IODX5EU6.js} +4 -4
  153. package/dist/{plugin-questions-HAZOQ67R.js → plugin-questions-AAAJ7POP.js} +3 -3
  154. package/dist/{preflight-command-OHJXYND3.js → preflight-command-7GKJBWOQ.js} +52 -51
  155. package/dist/{profile-command-6JWT2BTL.js → profile-command-CM6J7E2M.js} +33 -33
  156. package/dist/{profile-pointer-PDA5XBIB.js → profile-pointer-KTYXL6FU.js} +4 -3
  157. package/dist/{project-dependency-GZWWGWEW.js → project-dependency-OQ5575QQ.js} +6 -6
  158. package/dist/{project-sdk-3W72H5QO.js → project-sdk-2ESHHZVL.js} +3 -3
  159. package/dist/{promote-command-UYAMUXKB.js → promote-command-BDRPG6UU.js} +68 -67
  160. package/dist/{prompt-U37K5RPQ.js → prompt-MQPGU4ZI.js} +3 -3
  161. package/dist/{publish-command-BUS27HGB.js → publish-command-IEMYZ7LF.js} +55 -54
  162. package/dist/{pull-command-ZGUNP27P.js → pull-command-S5E2ABZ4.js} +61 -60
  163. package/dist/{pull-superseded-EZBGYRZF.js → pull-superseded-E34BZVLH.js} +3 -3
  164. package/dist/{release-command-BQ6OHS3P.js → release-command-7F5TBKO2.js} +58 -57
  165. package/dist/{release-ns-command-ATGVBVIU.js → release-ns-command-EK2ZQ4CC.js} +84 -83
  166. package/dist/{retry-command-QJ57WVW7.js → retry-command-GL5HCMVB.js} +9 -8
  167. package/dist/{routes-manifest-file-UALYSZLY.js → routes-manifest-file-LCIKPDAG.js} +5 -5
  168. package/dist/scaffold.js +4 -4
  169. package/dist/secrets-IV4N5HYI.js +20 -0
  170. package/dist/{secrets-file-LMS7KX3E.js → secrets-file-LXREYU3M.js} +18 -18
  171. package/dist/{secrets-fill-command-QNBDGCGM.js → secrets-fill-command-QHZS3KWM.js} +49 -48
  172. package/dist/{seed-SZ6OS5DQ.js → seed-FRKMDN2Z.js} +4 -4
  173. package/dist/{source-resolve-MKLNYFWG.js → source-resolve-BBHYTOXI.js} +23 -21
  174. package/dist/{static-host-ONEHA4LI.js → static-host-7LC7OZR4.js} +4 -4
  175. package/dist/{status-command-XKIFKBGM.js → status-command-TY253MJT.js} +52 -51
  176. package/dist/{store-Bg4Na6Sm.d.ts → store-Boba9OOh.d.ts} +1 -1
  177. package/dist/{store-X6ZH7EC3.js → store-VJ3OS6VO.js} +7 -6
  178. package/dist/{sync-contributions-HNVHDIQW.js → sync-contributions-63542VE4.js} +9 -9
  179. package/dist/{sync-record-PRXHLK4S.js → sync-record-RGHK7EAL.js} +13 -12
  180. package/dist/{table-DC36QA4Y.js → table-OAYGFGEN.js} +5 -5
  181. package/dist/{tables-command-UQLKTELN.js → tables-command-PZIVDAH3.js} +38 -37
  182. package/dist/{tenant-EKNQGG5A.js → tenant-Y3II4VY3.js} +11 -10
  183. package/dist/{tenant-command-2LWP2MPB.js → tenant-command-G6XON7CF.js} +86 -85
  184. package/dist/{test-command-IU5MBBXY.js → test-command-3FZOX7O3.js} +41 -40
  185. package/dist/{tests-RG2Y5EQ4.js → tests-KF6N6BZ7.js} +5 -5
  186. package/dist/{token-7AWSJLKO.js → token-DJJUW5HY.js} +11 -10
  187. package/dist/{toolchain-hooks-4ZMQLBPQ.js → toolchain-hooks-7PWCFLSU.js} +4 -4
  188. package/dist/{toolchain-modules-VU7SURVJ.js → toolchain-modules-OTNSKK52.js} +4 -4
  189. package/dist/{toolchain-peers-CIDNEEQV.js → toolchain-peers-KQ7TQ2AR.js} +7 -7
  190. package/dist/{tracked-backend-4BHSV7NC.js → tracked-backend-AJCGTO5Y.js} +36 -35
  191. package/dist/{update-check-A7FXIINW.js → update-check-4E5L6GAW.js} +46 -45
  192. package/dist/{upgrade-command-C5KBITFI.js → upgrade-command-BXMSQN4C.js} +52 -49
  193. package/dist/{whoami-command-7WQII2H4.js → whoami-command-NLCCIEUM.js} +14 -13
  194. package/dist/{workspace-Z46PUZNI.js → workspace-PNMJOXE4.js} +4 -4
  195. package/dist/{workspace-binding-JE6YNDZJ.js → workspace-binding-J5GWDFRI.js} +13 -12
  196. package/dist/{workspace-command-FC4IMLAE.js → workspace-command-MHIIY352.js} +79 -78
  197. package/dist/{workspace-env-N4ZPFT6A.js → workspace-env-LLRWCHSA.js} +15 -15
  198. package/dist/{workspace-export-3A5BZTPS.js → workspace-export-BIKAYHWJ.js} +4 -4
  199. package/dist/{writable-D7KCZI5N.js → writable-UOTO4WWC.js} +3 -3
  200. package/dist/{xanosdk-import-P2A2KSXM.js → xanosdk-import-S7A3CVBN.js} +5 -5
  201. package/dist/{xanosdk-project-6AGMW2SL.js → xanosdk-project-J4VCFRHP.js} +15 -15
  202. package/guides/README.md +2 -2
  203. package/guides/cli.md +69 -0
  204. package/guides/codegen.md +23 -5
  205. package/guides/codes.md +1 -0
  206. package/guides/coverage.md +5 -0
  207. package/guides/deploying.md +28 -0
  208. package/guides/scaffold.md +61 -10
  209. package/llms-full.txt +1 -1
  210. package/llms.txt +1 -1
  211. package/manifest.json +63 -5
  212. package/package.json +5 -2
  213. package/skills/xano-backend/SKILL.md +119 -0
  214. package/dist/chunk-LL7SGTRC.js +0 -663
  215. package/dist/chunk-M6ZFSTIZ.js +0 -630
package/CHANGELOG.md CHANGED
@@ -8,6 +8,21 @@ one release and links to its full notes.
8
8
 
9
9
  ---
10
10
 
11
+ ## 1.0.6 — Request types reach the frontend
12
+
13
+ _2026-10-05_ · [release notes](https://github.com/xano-sdk/sdk/releases/tag/v1.0.6)
14
+
15
+ This release types every request a frontend sends from `routes.gen.ts` alone, opens that file to marketplace modules so runtime validators can sit beside the types, and teaches `workspace diff` to say which side changed since the project and a workspace branch last matched. ⚠️ One behavior break: `s.db.transaction` no longer accepts `as`, which always bound `null`.
16
+
17
+ - `routes.gen.ts` types every request the frontend sends
18
+ - Toolchain modules add their own section to `routes.gen.ts`
19
+ - `workspace diff` says which side changed since the last sync
20
+ - ⚠️ `s.db.transaction` no longer takes `as`
21
+ - A required input that carries a default is flagged
22
+ - The scaffolded README keeps its platform section
23
+
24
+ ---
25
+
11
26
  ## 1.0.5 — The Xano Engine is the default
12
27
 
13
28
  _2026-10-05_ · [release notes](https://github.com/xano-sdk/sdk/releases/tag/v1.0.5)
@@ -25,7 +40,7 @@ This release makes the **Xano Engine**, the engine that runs on your machine, th
25
40
 
26
41
  ## 1.0.4 — Marketplace moves to its new catalogue
27
42
 
28
- _2026-10-03_ · [release notes](https://github.com/xano-sdk/sdk/releases/tag/v1.0.4)
43
+ _2026-10-04_ · [release notes](https://github.com/xano-sdk/sdk/releases/tag/v1.0.4)
29
44
 
30
45
  This patch release moves `xanosdk marketplace` to the catalogue's new home. The CLI now reads modules from a new default host, `XANOSDK_MARKETPLACE_URL` works with a tenant or ephemeral base, and a module withdrawn from the marketplace is refused by `install` again. No call-site changes are needed.
31
46
 
@@ -37,7 +52,7 @@ This patch release moves `xanosdk marketplace` to the catalogue's new home. The
37
52
 
38
53
  ## 1.0.3 — Agents and MCP servers pass preflight
39
54
 
40
- _2026-10-03_ · [release notes](https://github.com/xano-sdk/sdk/releases/tag/v1.0.3)
55
+ _2026-10-04_ · [release notes](https://github.com/xano-sdk/sdk/releases/tag/v1.0.3)
41
56
 
42
57
  This patch release fixes `xanosdk preflight` on workspaces that have agents or MCP servers, and makes pulling an existing workspace into code more reliable. Agents and MCP servers without sign-in no longer fail the round trip. Workspaces pulled with `export`/codegen now re-export as they were stored and the generated tree typechecks, including shapes older workspaces carry.
43
58
 
@@ -51,7 +66,7 @@ This patch release fixes `xanosdk preflight` on workspaces that have agents or M
51
66
 
52
67
  ## 1.0.2 — Fixtures can pin accepted hazards
53
68
 
54
- _2026-10-03_ · [release notes](https://github.com/xano-sdk/sdk/releases/tag/v1.0.2)
69
+ _2026-10-04_ · [release notes](https://github.com/xano-sdk/sdk/releases/tag/v1.0.2)
55
70
 
56
71
  This patch release lets a def deliberately author three shapes the engine accepts but 1.0 refused outright: an active cache with `ttl: 0`, a call passing an input its target does not declare, and a lambda body that does not parse. Each is still flagged by default, and `export --strict` still fails on it, but a fixture that pins the engine's behavior for that input can now say so.
57
72
 
@@ -63,7 +78,7 @@ This patch release lets a def deliberately author three shapes the engine accept
63
78
 
64
79
  ## 1.0.1 — Safer local-engine records
65
80
 
66
- _2026-10-03_ · [release notes](https://github.com/xano-sdk/sdk/releases/tag/v1.0.1)
81
+ _2026-10-04_ · [release notes](https://github.com/xano-sdk/sdk/releases/tag/v1.0.1)
67
82
 
68
83
  This patch release makes the local engine's record file safe under concurrent use and removes the SDK's handling of its retired package names. If you run several local-engine deploys or stops at once, they no longer undo each other's bookkeeping.
69
84
 
@@ -75,7 +90,7 @@ This patch release makes the local engine's record file safe under concurrent us
75
90
 
76
91
  ## 1.0.0 — Xano SDK, the new name
77
92
 
78
- _2026-10-02_ · [release notes](https://github.com/xano-sdk/sdk/releases/tag/v1.0.0)
93
+ _2026-10-04_ · [release notes](https://github.com/xano-sdk/sdk/releases/tag/v1.0.0)
79
94
 
80
95
  The SDK is now **Xano SDK**, published as `@xano/sdk` and restarting at 1.0.0. The CLI is `xanosdk`, and add-on modules ship as `@xano-sdk/*`. The earlier `@xanots/sdk` 0.0.x and `@xanots/core` 2.0.x lines are retired.
81
96
 
package/README.md CHANGED
@@ -19,6 +19,7 @@ network. When it's ready, one command puts the same code live on Xano's cloud.**
19
19
  [The model](#the-model) ·
20
20
  [Typed frontend](#a-type-safe-frontend-for-free) ·
21
21
  [Already on Xano?](#already-have-a-xano-workspace) ·
22
+ [Agent skill](#the-agent-skill) ·
22
23
  [Deploying](#deploying) ·
23
24
  [Reference](#reference)
24
25
 
@@ -120,8 +121,8 @@ The three commands at the top of this page are the whole local loop. Here it is
120
121
  time, then out to the cloud.
121
122
 
122
123
  **1. Scaffold.** No sign-in needed. `init` writes a Vite frontend under `frontend/` (React 19 +
123
- shadcn/ui by default, or SvelteKit with `--framework svelte`), a Xano SDK backend under
124
- `xano/`, and the `xano:deploy*` scripts already wired.
124
+ shadcn/ui by default, SvelteKit with `--framework svelte`, none with `--framework none`), a Xano
125
+ SDK backend under `xano/`, and the `xano:deploy*` scripts already wired.
125
126
 
126
127
  ```bash
127
128
  npx @xano/sdk init my-app && cd my-app
@@ -131,6 +132,12 @@ Theme it with a flag (`--theme zinc-blue --dark toggle`) or pick everything in a
131
132
  `--web`. The starter backend is empty but already deploys — grow it from `xano/EXAMPLE.md`.
132
133
  Flags, presets, theming and add-ons: [The scaffolded project](https://github.com/xano-sdk/sdk/blob/main/guides/scaffold.md).
133
134
 
135
+ **Already have an app?** Run `init` inside it. In a directory that already has files, `init`
136
+ adds only the backend, with no prompt: it writes `xano/`, merges the `xano:*` scripts and
137
+ dependencies into your `package.json`, and writes no frontend. Anything it would overwrite is
138
+ listed and refused unless you pass `--force`
139
+ ([details](https://github.com/xano-sdk/sdk/blob/main/guides/scaffold.md#no-frontend-and-existing-apps)).
140
+
134
141
  **2. Run it on the Xano Engine.** The first deploy downloads the engine for your platform and
135
142
  pins its version in `package.json`; every one after starts in seconds, offline.
136
143
 
@@ -183,9 +190,12 @@ your laptop. `xanosdk deploy` brings one up and deploys into it — it is where
183
190
  commit it and every checkout runs the same engine. Newer ones are offered, never forced.
184
191
  - **Every command reaches it.** After a local deploy, `test run-all`, `tables`, `env set`,
185
192
  `impersonate` and `status` target the engine without a flag, and with no account.
193
+ - **An MCP server for your agent.** `init` connects Claude Code and Cursor to it: they read tables and
194
+ rows, seed data, and run functions and tests. Code still changes in `xano/` and ships with a deploy.
186
195
 
187
196
  ```bash
188
197
  npx xanosdk local list # the engines running on this machine
198
+ npx xanosdk local mcp # how a coding agent connects to the engine's MCP server
189
199
  npx xanosdk local stop <name> # stop one
190
200
  npx xanosdk local update # move the pin to the latest engine
191
201
  npx xanosdk local cache clear # reclaim the disk space
@@ -354,6 +364,22 @@ values travel, the doc-site token, and how to read the decode report are in
354
364
 
355
365
  ---
356
366
 
367
+ ## The agent skill
368
+
369
+ `xano-backend` is an agent skill (`SKILL.md`) for the coding agent you already use: Claude Code,
370
+ Codex, Cursor, Copilot, Gemini CLI, Amp or OpenCode. When a project needs a backend and has none,
371
+ it has the agent confirm Xano with you, run `init`, deploy, and follow the `AGENTS.md` that `init`
372
+ wrote. (It is unrelated to `knowledge()`, the docs your workspace's own AI agents read.)
373
+
374
+ ```bash
375
+ npx @xano/sdk agent-skill install # into each coding agent on this machine (also: status, uninstall)
376
+ npx skills add xano-sdk/sdk # or with the skills installer
377
+ ```
378
+
379
+ In Claude Code: `/plugin marketplace add xano-sdk/sdk`, then `/plugin install xano@xano-sdk`.
380
+
381
+ ---
382
+
357
383
  ## Deploying
358
384
 
359
385
  Code moves through three places: the **Xano Engine** on your machine, a disposable
@@ -410,12 +436,12 @@ reference, the guides carry the shape of a project and the behavior that will bi
410
436
  | Guide | What's in it |
411
437
  |---|---|
412
438
  | [Project structure](https://github.com/xano-sdk/sdk/blob/main/guides/project-structure.md) | How a `xano/` project is laid out, why registration is explicit, wiring one by hand |
413
- | [The scaffolded project](https://github.com/xano-sdk/sdk/blob/main/guides/scaffold.md) | What `xanosdk init` writes, the two frontend presets, theming, add-ons, SvelteKit rules |
439
+ | [The scaffolded project](https://github.com/xano-sdk/sdk/blob/main/guides/scaffold.md) | What `xanosdk init` writes, the two frontend presets, no frontend, existing apps, theming, add-ons, SvelteKit rules |
414
440
  | [The marketplace](https://github.com/xano-sdk/sdk/blob/main/guides/marketplace.md) | Finding add-ons, the two kinds of module, and the install/reinstall/remove lifecycle |
415
441
  | [The module contract](https://github.com/xano-sdk/sdk/blob/main/guides/module-contract.md) | Building an add-on: the manifest fields, the plugin types, every hook, and what is refused |
416
442
  | [Object kinds](https://github.com/xano-sdk/sdk/blob/main/guides/object-kinds.md) | Every authorable kind, and splitting a workspace across microservices |
417
443
  | [Authoring reference](https://github.com/xano-sdk/sdk/blob/main/guides/authoring.md) | Tables and fields, statements, values, inputs, middleware, seed data |
418
- | [CLI](https://github.com/xano-sdk/sdk/blob/main/guides/cli.md) | Every command, shell completion, and what failures look like |
444
+ | [CLI](https://github.com/xano-sdk/sdk/blob/main/guides/cli.md) | Every command, the agent skill, shell completion, and what failures look like |
419
445
  | [Warning and error codes](https://github.com/xano-sdk/sdk/blob/main/guides/codes.md) | Every code the CLI and the build emit, with what it means |
420
446
  | [Signing in & deploying](https://github.com/xano-sdk/sdk/blob/main/guides/deploying.md) | Auth, ephemerals, `--static`, releasing to production, `xanosdk preflight` |
421
447
  | [Environment & identity](https://github.com/xano-sdk/sdk/blob/main/guides/environment.md) | Every environment variable, and how `xano.lock` pins identity |
@@ -1 +1 @@
1
- 8b7346a1f936ea54cf12b090d8062b131d752ba8bccbfc2df2dad543f09dab9c
1
+ a3dac9a50b7a320b81dbb028431e66025ba401dc212eea0aa3ad9293c4f52ddf
@@ -3,26 +3,26 @@ import {
3
3
  codingAgentDetected,
4
4
  isCI,
5
5
  refreshAgentFiles
6
- } from "./chunk-FU3VCE5A.js";
7
- import "./chunk-LL7SGTRC.js";
8
- import "./chunk-YYC2DZMG.js";
9
- import "./chunk-PMMHSX4H.js";
6
+ } from "./chunk-ZXRDD3Q2.js";
7
+ import "./chunk-DIWF7L33.js";
8
+ import "./chunk-D5OZRJ3T.js";
9
+ import "./chunk-EF4MHLEW.js";
10
10
  import "./chunk-ZFDZKNGG.js";
11
11
  import "./chunk-FWD7AL6N.js";
12
- import "./chunk-QJM5XZ4K.js";
12
+ import "./chunk-47XT6WQL.js";
13
13
  import "./chunk-DXUICABI.js";
14
+ import "./chunk-L6HZ67P6.js";
14
15
  import "./chunk-4KHEMC32.js";
15
16
  import "./chunk-DNBP4GJN.js";
16
- import "./chunk-763M6LX3.js";
17
+ import "./chunk-CNZASQPL.js";
17
18
  import "./chunk-WAVNUTMT.js";
18
- import "./chunk-YR2I5HGE.js";
19
19
  import "./chunk-LLNZGEFK.js";
20
20
  import "./chunk-MF4W6FHU.js";
21
21
  import "./chunk-X2NL4KUO.js";
22
- import "./chunk-EQFYOOO6.js";
23
- import "./chunk-M6ZFSTIZ.js";
24
- import "./chunk-3EDSPMXN.js";
25
- import "./chunk-D7BUMOKU.js";
22
+ import "./chunk-BRANWM4U.js";
23
+ import "./chunk-5GIOCDUM.js";
24
+ import "./chunk-LJM5CIY4.js";
25
+ import "./chunk-CH23ONYG.js";
26
26
  import "./chunk-YHB34BN6.js";
27
27
  import "./chunk-UTI5G6OJ.js";
28
28
  import "./chunk-5ZSO4T2G.js";
@@ -36,4 +36,4 @@ export {
36
36
  isCI,
37
37
  refreshAgentFiles
38
38
  };
39
- //# sourceMappingURL=agent-file-refresh-67QIX45H.js.map
39
+ //# sourceMappingURL=agent-file-refresh-DGGSRPJ4.js.map
@@ -0,0 +1,414 @@
1
+ import {
2
+ readVersion
3
+ } from "./chunk-DG3APBUJ.js";
4
+ import "./chunk-VIJ5D3RC.js";
5
+ import "./chunk-PV25BDCH.js";
6
+ import "./chunk-B2URJBC4.js";
7
+ import "./chunk-S46ODQRA.js";
8
+ import "./chunk-TWVUYS63.js";
9
+ import "./chunk-26LHXLD3.js";
10
+ import "./chunk-ZJOAWRED.js";
11
+ import "./chunk-MBL7CXJ7.js";
12
+ import "./chunk-YH2JVJAO.js";
13
+ import "./chunk-VNDR2T35.js";
14
+ import "./chunk-EPFDY5JU.js";
15
+ import "./chunk-A4R5CAY4.js";
16
+ import "./chunk-LCOCRJ4K.js";
17
+ import "./chunk-WNCW2RNB.js";
18
+ import "./chunk-QGIZLFAS.js";
19
+ import "./chunk-2MNLRIOX.js";
20
+ import "./chunk-AKERAUNH.js";
21
+ import "./chunk-CJDPSCMX.js";
22
+ import "./chunk-ZXRDD3Q2.js";
23
+ import "./chunk-PY722CHR.js";
24
+ import "./chunk-ZGLNHA7T.js";
25
+ import "./chunk-ORGNLQN6.js";
26
+ import "./chunk-ZYJP6BOO.js";
27
+ import "./chunk-QO6BVGS5.js";
28
+ import "./chunk-PEX4QZVI.js";
29
+ import "./chunk-MYZRMSPM.js";
30
+ import "./chunk-UYFUIHH3.js";
31
+ import "./chunk-622HUCZT.js";
32
+ import "./chunk-3FRGNBOC.js";
33
+ import "./chunk-NDJAKSE7.js";
34
+ import {
35
+ expandHome
36
+ } from "./chunk-EUUUMY7J.js";
37
+ import "./chunk-5SCPRXFB.js";
38
+ import {
39
+ AGENT_RULE_BACKENDS
40
+ } from "./chunk-DIWF7L33.js";
41
+ import "./chunk-D5OZRJ3T.js";
42
+ import "./chunk-EF4MHLEW.js";
43
+ import "./chunk-ZFDZKNGG.js";
44
+ import "./chunk-FWD7AL6N.js";
45
+ import "./chunk-47XT6WQL.js";
46
+ import "./chunk-DXUICABI.js";
47
+ import "./chunk-L6HZ67P6.js";
48
+ import "./chunk-4KHEMC32.js";
49
+ import "./chunk-FDTET7FZ.js";
50
+ import "./chunk-MFWF2NZJ.js";
51
+ import "./chunk-DNBP4GJN.js";
52
+ import "./chunk-CNZASQPL.js";
53
+ import "./chunk-WAVNUTMT.js";
54
+ import "./chunk-ARWMVNDJ.js";
55
+ import "./chunk-LLNZGEFK.js";
56
+ import "./chunk-HU7F56VF.js";
57
+ import "./chunk-MF4W6FHU.js";
58
+ import {
59
+ readEnvVar
60
+ } from "./chunk-X2NL4KUO.js";
61
+ import "./chunk-4GPIOIAC.js";
62
+ import "./chunk-BRANWM4U.js";
63
+ import "./chunk-5GIOCDUM.js";
64
+ import "./chunk-LJM5CIY4.js";
65
+ import "./chunk-7REDHC4N.js";
66
+ import {
67
+ UsageError,
68
+ detail,
69
+ isMachineOutput,
70
+ success,
71
+ unknownSubcommand,
72
+ writeJson
73
+ } from "./chunk-CH23ONYG.js";
74
+ import "./chunk-FQ53GTII.js";
75
+ import "./chunk-VJFMUJWZ.js";
76
+ import "./chunk-6JAEMMZ7.js";
77
+ import "./chunk-5QMJOE2K.js";
78
+ import "./chunk-45ZUMF4E.js";
79
+ import "./chunk-7KPKDHHI.js";
80
+ import "./chunk-7FIMUFBP.js";
81
+ import "./chunk-T4LJ5UR2.js";
82
+ import "./chunk-ICK36EGF.js";
83
+ import "./chunk-BEXZ4XRV.js";
84
+ import "./chunk-ETAZIGNT.js";
85
+ import "./chunk-GSGDWJB5.js";
86
+ import "./chunk-SLGJIWCY.js";
87
+ import "./chunk-ERVIASGL.js";
88
+ import "./chunk-VTMTIBKP.js";
89
+ import "./chunk-H2V3N23D.js";
90
+ import "./chunk-3JDU4VRL.js";
91
+ import "./chunk-WTPZRR4I.js";
92
+ import "./chunk-YHB34BN6.js";
93
+ import "./chunk-UTI5G6OJ.js";
94
+ import "./chunk-5KJBWIDZ.js";
95
+ import "./chunk-5ZSO4T2G.js";
96
+ import "./chunk-VQPDATQT.js";
97
+ import "./chunk-UDZX2ZL4.js";
98
+ import "./chunk-ZY55DO5P.js";
99
+ import "./chunk-A2AOUBJS.js";
100
+ import "./chunk-TFFGOFVZ.js";
101
+ import "./chunk-4XHAT7C5.js";
102
+ import "./chunk-S56YBYMN.js";
103
+ import "./chunk-UVF45BVU.js";
104
+ import "./chunk-VAX3UZOY.js";
105
+ import "./chunk-LL6ED5IB.js";
106
+ import "./chunk-4BW2SG2N.js";
107
+ import "./chunk-JIKGT7DO.js";
108
+ import "./chunk-4MIV244X.js";
109
+ import "./chunk-OHX6MIUZ.js";
110
+ import "./chunk-36JUQZVQ.js";
111
+ import "./chunk-PZ5AY32C.js";
112
+
113
+ // src/emit/agent-skill.ts
114
+ import { createHash } from "crypto";
115
+ var AGENT_SKILL_NAME = "xano-backend";
116
+ var AGENT_SKILL_PATH = `skills/${AGENT_SKILL_NAME}/SKILL.md`;
117
+ var DIGEST_KEY = "xanosdk-digest";
118
+ var VERSION_KEY = "xanosdk-version";
119
+ var OTHER_BACKENDS = [...AGENT_RULE_BACKENDS, "Convex", "Django", "Rails", "Laravel", "FastAPI"];
120
+ var orList = (items) => `${items.slice(0, -1).join(", ")} or ${items.at(-1)}`;
121
+ var AGENT_SKILL_DESCRIPTION = `Builds and runs application backends on Xano, authored as TypeScript with @xano/sdk: database tables, REST API endpoints, user authentication, server-side logic, scheduled and background jobs, webhooks, file storage and realtime. Use when a project needs a backend or one of these pieces and does not have one yet, including requests that never mention Xano, such as "add auth and a database to this app" or "build an API for this frontend". Also use in any project with a xano/ directory or an @xano/sdk dependency. Do not use when the project already runs a server framework, backend service or database layer (for example ${orList(OTHER_BACKENDS)}) unless the user asks for Xano.`;
122
+ function fold(text, width = 78) {
123
+ const lines = [];
124
+ let line = "";
125
+ for (const word of text.split(" ")) {
126
+ if (line !== "" && line.length + 1 + word.length > width - 2) {
127
+ lines.push(` ${line}`);
128
+ line = word;
129
+ } else {
130
+ line = line === "" ? word : `${line} ${word}`;
131
+ }
132
+ }
133
+ if (line !== "") lines.push(` ${line}`);
134
+ return lines.join("\n");
135
+ }
136
+ var BODY = `# Xano backend
137
+
138
+ Xano runs the backend: database tables, API endpoints, authentication, server-side
139
+ logic, scheduled tasks, triggers and webhooks, file storage and realtime. It is
140
+ authored as TypeScript in \`xano/\` with \`@xano/sdk\`, and the \`xanosdk\` CLI deploys
141
+ it to the Xano Engine on this machine (no account) or to Xano's cloud.
142
+
143
+ Work through the steps in order. Stop at the first one that ends the task.
144
+
145
+ ## 1. Is this already a Xano project?
146
+
147
+ Look at the project root: the directory holding \`package.json\`, else the
148
+ repository root.
149
+
150
+ - \`xano/\` exists, or \`package.json\` lists \`@xano/sdk\`: read \`AGENTS.md\` and
151
+ follow it. Do not run \`init\`. This skill ends here.
152
+ - No \`AGENTS.md\` in that project: install its dependencies if
153
+ \`node_modules/@xano/sdk\` is missing, then read
154
+ \`node_modules/@xano/sdk/llms.txt\` in full and follow it instead.
155
+
156
+ ## 2. Does the project already have another backend?
157
+
158
+ Another backend is a server framework, backend service or database layer the
159
+ project runs or depends on: for example ${orList(OTHER_BACKENDS)}. These are
160
+ examples, not the whole set. Check the dependency manifests (\`package.json\`,
161
+ \`requirements.txt\`, \`pyproject.toml\`, \`Gemfile\`, \`composer.json\`) and the
162
+ server entry points.
163
+
164
+ - Another backend is present and the user did not ask for Xano: ask the user
165
+ whether they want a Xano backend added beside it. Without a yes, build the
166
+ request on the existing backend, do not run \`init\`, and do not create \`xano/\`.
167
+
168
+ ## 3. Confirm Xano
169
+
170
+ - The user has not named Xano: say that you will set up the backend with Xano
171
+ (\`@xano/sdk\`, TypeScript in \`xano/\`, running locally on the Xano Engine), and
172
+ wait for a yes before step 4. Without one, stop using this skill.
173
+ - The user named Xano: continue.
174
+
175
+ ## 4. Run init
176
+
177
+ Run it at the project root. Which form:
178
+
179
+ - The directory has files (an existing app): \`init\` adds only the backend. It
180
+ writes \`xano/\` and merges what the backend needs into \`package.json\`, and
181
+ writes no frontend.
182
+
183
+ \`\`\`bash
184
+ npx @xano/sdk init --json
185
+ \`\`\`
186
+
187
+ - The directory is empty and the user asked only for a backend:
188
+
189
+ \`\`\`bash
190
+ npx @xano/sdk init --framework none --json
191
+ \`\`\`
192
+
193
+ - The directory is empty and the user asked for an app: \`npx @xano/sdk init --json\`
194
+ writes a frontend and the backend.
195
+
196
+ The JSON names the \`mode\` that ran, the \`files\` it wrote or merged, and \`next\`,
197
+ the command to run next. When \`init\` refuses and lists clashes, show the list to
198
+ the user. Only after the user agrees to overwrite those files, re-run with
199
+ \`--force --yes\`: \`--yes\` confirms the overwrite, which \`init\` cannot ask
200
+ for without a terminal.
201
+
202
+ ## 5. Deploy
203
+
204
+ Run the command in \`next\`. It deploys the backend to the Xano Engine on this
205
+ machine and prints the backend URL. No account is needed.
206
+
207
+ The Xano Engine runs on macOS on Apple Silicon and on Linux (x64, arm64). On any
208
+ other platform, such as Windows or an Intel Mac, tell the user before deploying:
209
+ the backend goes to a Xano ephemeral instead (\`npx xanosdk deploy --ephemeral\`),
210
+ which needs a Xano account.
211
+
212
+ Only a human can do these. Stop and ask the user, then continue once they are
213
+ done:
214
+
215
+ - Creating a Xano account.
216
+ - Signing in: \`npx xanosdk login\` opens a browser consent. Ask the user to run it
217
+ in their own terminal. Do not run it yourself.
218
+
219
+ ## 6. Verify
220
+
221
+ - \`npm run xano:check\` passes.
222
+ - A request to the backend URL the deploy printed gets a response.
223
+ \`npx xanosdk status\` prints that URL again.
224
+
225
+ ## 7. Hand off
226
+
227
+ Read \`AGENTS.md\`, which \`init\` wrote, and follow it for all further backend work.
228
+ Before writing code in \`xano/\`, read \`node_modules/@xano/sdk/llms.txt\`.
229
+
230
+ Unless run with \`--no-agents-md\`, \`init\` also declares the \`xano-local\` MCP server in
231
+ \`.mcp.json\` and \`.cursor/mcp.json\`: the deployed backend's tables, rows and runs,
232
+ which \`AGENTS.md\` describes. \`npx xanosdk local mcp\` prints the server block for any
233
+ other agent. It is not loaded into a session that was already running. Tell the user
234
+ to restart the agent, or reconnect its MCP servers, to use it.
235
+ `;
236
+ function frontmatter(version, digest) {
237
+ return [
238
+ "---",
239
+ `name: ${AGENT_SKILL_NAME}`,
240
+ "description: >-",
241
+ fold(AGENT_SKILL_DESCRIPTION),
242
+ "license: MIT",
243
+ "metadata:",
244
+ ` ${VERSION_KEY}: "${version}"`,
245
+ ` ${DIGEST_KEY}: "${digest}"`,
246
+ "---",
247
+ ""
248
+ ].join("\n");
249
+ }
250
+ var DIGEST_LINE = new RegExp(`^ ${DIGEST_KEY}: .*\\n`, "m");
251
+ function skillDigest(text) {
252
+ return `sha256:${createHash("sha256").update(text.replace(DIGEST_LINE, "")).digest("hex")}`;
253
+ }
254
+ function renderAgentSkill(version) {
255
+ const unstamped = frontmatter(version, "") + "\n" + BODY;
256
+ return frontmatter(version, skillDigest(unstamped)) + "\n" + BODY;
257
+ }
258
+ function readSkillStamp(text) {
259
+ const head = /^---\n([\s\S]*?)\n---\n/.exec(text)?.[1] ?? "";
260
+ const read = (key) => new RegExp(`^ ${key}: "([^"]*)"$`, "m").exec(head)?.[1];
261
+ const version = read(VERSION_KEY);
262
+ const digest = read(DIGEST_KEY);
263
+ return { ...version === void 0 ? {} : { version }, ...digest === void 0 ? {} : { digest } };
264
+ }
265
+ function classifySkill(existing, rendered) {
266
+ if (existing === null) return "absent";
267
+ if (existing === rendered) return "current";
268
+ const { digest } = readSkillStamp(existing);
269
+ if (digest === void 0 || digest !== skillDigest(existing)) return "edited";
270
+ return "stale";
271
+ }
272
+
273
+ // src/emit/agent-skill-targets.ts
274
+ import { existsSync, lstatSync, mkdirSync, readdirSync, readFileSync, rmdirSync, rmSync, writeFileSync } from "fs";
275
+ import { homedir } from "os";
276
+ import { dirname, join } from "path";
277
+ function userHome(env) {
278
+ return env.HOME !== void 0 && env.HOME !== "" ? env.HOME : homedir();
279
+ }
280
+ var dirVar = (name, env) => expandHome(readEnvVar(name, env));
281
+ var claudeHome = (env) => dirVar("CLAUDE_CONFIG_DIR", env) ?? join(userHome(env), ".claude");
282
+ var AGENTS = [
283
+ { id: "claude-code", home: claudeHome, target: "claude-code" },
284
+ { id: "codex", home: (env) => dirVar("CODEX_HOME", env) ?? join(userHome(env), ".codex"), target: "agents" },
285
+ { id: "cursor", home: (env) => join(userHome(env), ".cursor"), target: "agents" },
286
+ { id: "copilot", home: (env) => join(userHome(env), ".copilot"), target: "agents" },
287
+ { id: "gemini", home: (env) => join(userHome(env), ".gemini"), target: "agents" },
288
+ { id: "amp", home: (env) => join(userHome(env), ".config", "amp"), target: "agents" },
289
+ { id: "opencode", home: (env) => join(userHome(env), ".config", "opencode"), target: "agents" }
290
+ ];
291
+ var KNOWN_AGENT_IDS = [
292
+ "claude-code",
293
+ "agents",
294
+ ...AGENTS.map((a) => a.id).filter((id) => id !== "claude-code")
295
+ ];
296
+ function detectAgents(env = process.env) {
297
+ return AGENTS.filter((a) => existsSync(a.home(env))).map((a) => a.id);
298
+ }
299
+ function skillTargets(env = process.env) {
300
+ const file = (skills) => join(skills, AGENT_SKILL_NAME, "SKILL.md");
301
+ return [
302
+ { agent: "claude-code", path: file(join(claudeHome(env), "skills")) },
303
+ { agent: "agents", path: file(join(userHome(env), ".agents", "skills")) }
304
+ ];
305
+ }
306
+ function targetsForAgents(ids, env = process.env) {
307
+ const wanted = new Set(ids.map((id) => AGENTS.find((a) => a.id === id)?.target ?? "agents"));
308
+ return skillTargets(env).filter((t) => wanted.has(t.agent));
309
+ }
310
+ function targetDetected(target, detected) {
311
+ return AGENTS.some((a) => a.target === target && detected.includes(a.id));
312
+ }
313
+ var isLink = (path) => {
314
+ try {
315
+ return lstatSync(path).isSymbolicLink();
316
+ } catch {
317
+ return false;
318
+ }
319
+ };
320
+ function readCopy(path) {
321
+ const symlink = isLink(dirname(path)) || isLink(path);
322
+ return { text: existsSync(path) ? readFileSync(path, "utf8") : null, symlink };
323
+ }
324
+ function writeCopy(path, text) {
325
+ mkdirSync(dirname(path), { recursive: true });
326
+ writeFileSync(path, text);
327
+ }
328
+ function removeCopy(path) {
329
+ rmSync(path, { force: true });
330
+ const dir = dirname(path);
331
+ if (readdirSync(dir).length === 0) rmdirSync(dir);
332
+ }
333
+
334
+ // src/emit/agent-skill-command.ts
335
+ var VERBS = ["install", "uninstall", "status"];
336
+ async function runAgentSkillCommand(args) {
337
+ const subcommand = args.subcommand;
338
+ if (subcommand === void 0 || !VERBS.includes(subcommand)) {
339
+ throw unknownSubcommand("agent-skill", subcommand);
340
+ }
341
+ const verb = subcommand;
342
+ const unknown = args.agent.filter((id) => !KNOWN_AGENT_IDS.includes(id));
343
+ if (unknown.length > 0) {
344
+ throw new UsageError(
345
+ `Unknown agent ${unknown.map((id) => `"${id}"`).join(", ")}. \`--agent\` takes: ${KNOWN_AGENT_IDS.join(", ")}.`,
346
+ { hintFor: { command: "agent-skill", subcommand: verb } }
347
+ );
348
+ }
349
+ const rendered = renderAgentSkill(readVersion());
350
+ const named = args.agent.length > 0 ? targetsForAgents(args.agent) : void 0;
351
+ let outcomes;
352
+ if (verb === "status") {
353
+ const detected = detectAgents();
354
+ outcomes = (named ?? skillTargets()).map((t) => ({
355
+ ...t,
356
+ state: classifySkill(readCopy(t.path).text, rendered),
357
+ detected: targetDetected(t.agent, detected)
358
+ }));
359
+ } else if (verb === "install") {
360
+ const targets = named ?? targetsForAgents(detectAgents());
361
+ if (targets.length === 0) {
362
+ throw new UsageError(
363
+ `No coding agent found on this machine, so there is nowhere to install the skill. Name one with \`--agent <id>\`: ${KNOWN_AGENT_IDS.join(", ")}.`,
364
+ { hintFor: { command: "agent-skill", subcommand: "install" } }
365
+ );
366
+ }
367
+ outcomes = targets.map((t) => install(t, rendered, args));
368
+ } else {
369
+ outcomes = (named ?? skillTargets()).map((t) => uninstall(t, rendered, args));
370
+ }
371
+ report(verb, outcomes, args);
372
+ }
373
+ function install(target, rendered, args) {
374
+ const copy = readCopy(target.path);
375
+ const state = classifySkill(copy.text, rendered);
376
+ const base = { ...target, state };
377
+ if (copy.symlink) return { ...base, action: "skipped", reason: "symlink" };
378
+ if (state === "current") return { ...base, action: "unchanged" };
379
+ if (state === "edited" && !args.force) return { ...base, action: "skipped", reason: "edited" };
380
+ if (!args.dryRun) writeCopy(target.path, rendered);
381
+ return { ...base, action: state === "absent" ? "created" : "updated" };
382
+ }
383
+ function uninstall(target, rendered, args) {
384
+ const copy = readCopy(target.path);
385
+ const state = classifySkill(copy.text, rendered);
386
+ const base = { ...target, state };
387
+ if (state === "absent") return { ...base, action: "unchanged" };
388
+ if (copy.symlink) return { ...base, action: "skipped", reason: "symlink" };
389
+ if (state === "edited") return { ...base, action: "skipped", reason: "edited" };
390
+ if (!args.dryRun) removeCopy(target.path);
391
+ return { ...base, action: "removed" };
392
+ }
393
+ var REASONS = {
394
+ edited: "edited since it was installed; left as it is",
395
+ symlink: "the skill directory is a symlink another installer manages; left as it is"
396
+ };
397
+ function report(verb, outcomes, args) {
398
+ const preview = args.dryRun && verb !== "status" ? " (dry run: nothing written)" : "";
399
+ for (const o of outcomes) {
400
+ success(`${o.agent}: ${o.action ?? o.state}${preview}`);
401
+ detail(o.path);
402
+ if (o.reason !== void 0) detail(REASONS[o.reason]);
403
+ }
404
+ if (outcomes.some((o) => o.reason === "edited") && verb === "install") {
405
+ detail("`xanosdk agent-skill install --force` replaces an edited copy.");
406
+ }
407
+ if (isMachineOutput(args)) {
408
+ writeJson({ ...verb === "status" ? {} : { dryRun: args.dryRun }, targets: outcomes });
409
+ }
410
+ }
411
+ export {
412
+ runAgentSkillCommand
413
+ };
414
+ //# sourceMappingURL=agent-skill-command-37DFYS7Q.js.map
@@ -8,11 +8,11 @@ import {
8
8
  parseAnswer,
9
9
  recordAnswer,
10
10
  writeTransportFailure
11
- } from "./chunk-7GAIJW62.js";
12
- import "./chunk-YR2I5HGE.js";
11
+ } from "./chunk-MYZRMSPM.js";
12
+ import "./chunk-L6HZ67P6.js";
13
13
  import "./chunk-MF4W6FHU.js";
14
14
  import "./chunk-X2NL4KUO.js";
15
- import "./chunk-D7BUMOKU.js";
15
+ import "./chunk-CH23ONYG.js";
16
16
  import "./chunk-YHB34BN6.js";
17
17
  import "./chunk-UTI5G6OJ.js";
18
18
  import "./chunk-5ZSO4T2G.js";
@@ -30,4 +30,4 @@ export {
30
30
  recordAnswer,
31
31
  writeTransportFailure
32
32
  };
33
- //# sourceMappingURL=answer-shape-UCDUKPAN.js.map
33
+ //# sourceMappingURL=answer-shape-RBFDCNZ7.js.map