@xano/sdk 1.0.5 → 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.
- package/CHANGELOG.md +35 -5
- package/README.md +56 -20
- package/dist/.build-fingerprint +1 -1
- package/dist/{agent-file-refresh-KVLR7M5Y.js → agent-file-refresh-DGGSRPJ4.js} +15 -14
- package/dist/agent-skill-command-37DFYS7Q.js +414 -0
- package/dist/{answer-shape-XGR2DGWY.js → answer-shape-RBFDCNZ7.js} +5 -5
- package/dist/{backend-dir-IE4RMUFH.js → backend-dir-KDD43X7K.js} +16 -15
- package/dist/{backend-slot-6HBWG5FN.js → backend-slot-TBOVZXDE.js} +4 -4
- package/dist/bin.js +63 -61
- package/dist/{branch-T2APKPVG.js → branch-7PIKNUD7.js} +12 -11
- package/dist/{branch-commands-HXXTCSOO.js → branch-commands-EGY7ZEZE.js} +32 -32
- package/dist/bundle.js +9 -39
- package/dist/{capture-HBXFXZEW.js → capture-GW5KNKMB.js} +3 -3
- package/dist/{chunk-3BJYQGAZ.js → chunk-26LHXLD3.js} +2 -2
- package/dist/{chunk-N6BWB35H.js → chunk-2ACWDSAQ.js} +3 -3
- package/dist/{chunk-XIABDKFQ.js → chunk-2SD4LA22.js} +2 -2
- package/dist/{chunk-K6PRKPFX.js → chunk-2XWVZRL6.js} +7 -7
- package/dist/{chunk-ES5A66IH.js → chunk-2YER2J47.js} +13 -13
- package/dist/{chunk-G57RYMKB.js → chunk-3FRGNBOC.js} +2 -2
- package/dist/{chunk-BMCZQZMI.js → chunk-46PATL23.js} +13 -9
- package/dist/{chunk-MYLPOVX6.js → chunk-47XT6WQL.js} +8 -8
- package/dist/{chunk-AWQ7BQTQ.js → chunk-4GPIOIAC.js} +6 -1
- package/dist/{chunk-7GX445AE.js → chunk-4XHAT7C5.js} +2 -2
- package/dist/{chunk-QOLOQ35F.js → chunk-567KK6XF.js} +8 -8
- package/dist/{chunk-57HMNJGB.js → chunk-5GIOCDUM.js} +893 -922
- package/dist/{chunk-OKNE3TWU.js → chunk-5KJBWIDZ.js} +83 -5
- package/dist/{chunk-SRX6B544.js → chunk-5QMJOE2K.js} +5 -5
- package/dist/{chunk-AGD7F7YI.js → chunk-5SCPRXFB.js} +4 -4
- package/dist/{chunk-SNGFEESM.js → chunk-5ZG7V2VW.js} +3 -3
- package/dist/{chunk-XJU6UAFV.js → chunk-7FIMUFBP.js} +2 -2
- package/dist/{chunk-AESE434J.js → chunk-7M6JP3FS.js} +2 -2
- package/dist/{chunk-K6CB5TKM.js → chunk-7REDHC4N.js} +2 -2
- package/dist/chunk-7VR4IO5B.js +44 -0
- package/dist/{chunk-57B56I4B.js → chunk-7XXWKTCE.js} +65 -41
- package/dist/{chunk-PL7AIAWS.js → chunk-A4R5CAY4.js} +4 -111
- package/dist/{chunk-QZTJ2556.js → chunk-AKERAUNH.js} +4 -4
- package/dist/{chunk-JZWUAEMO.js → chunk-ARWMVNDJ.js} +6 -3
- package/dist/{chunk-WYS6XVZ3.js → chunk-AVS4WPPY.js} +2 -2
- package/dist/{chunk-KUU7T4ZE.js → chunk-B2URJBC4.js} +18 -18
- package/dist/chunk-B3P25SDP.js +78 -0
- package/dist/chunk-BRANWM4U.js +853 -0
- package/dist/{chunk-BBPAXOU6.js → chunk-BSVQEKHO.js} +6 -6
- package/dist/{chunk-3WHWOKU4.js → chunk-BZ6WTG3E.js} +4 -4
- package/dist/{chunk-XNZURZ7T.js → chunk-CH23ONYG.js} +77 -6
- package/dist/{chunk-SQPIECXD.js → chunk-CJDPSCMX.js} +45 -5
- package/dist/{chunk-M7GJ6YUF.js → chunk-CNZASQPL.js} +16 -2
- package/dist/{chunk-44CWK6YC.js → chunk-CPN6WSBH.js} +4 -4
- package/dist/{chunk-L3BDO2BI.js → chunk-CT3J5JRZ.js} +7 -7
- package/dist/{chunk-3HOGFGKG.js → chunk-D3KEPRRN.js} +2 -2
- package/dist/{chunk-OGUMHW2X.js → chunk-D5OZRJ3T.js} +7 -7
- package/dist/{chunk-S5KQIFKJ.js → chunk-DG3APBUJ.js} +208 -112
- package/dist/chunk-DIWF7L33.js +995 -0
- package/dist/{chunk-WRBKLYSJ.js → chunk-DNBP4GJN.js} +4 -3
- package/dist/{chunk-LZDA6SVD.js → chunk-DXZTL7NA.js} +141 -91
- package/dist/{chunk-XMDDBEEM.js → chunk-E763QI3G.js} +2 -2
- package/dist/{chunk-3VX7VAQT.js → chunk-EF4MHLEW.js} +26 -9
- package/dist/{chunk-AGSCOISO.js → chunk-ELPQTDW6.js} +108 -100
- package/dist/{chunk-Q22BMRPF.js → chunk-EPFDY5JU.js} +2 -2
- package/dist/{chunk-7DBM6XHR.js → chunk-EU32BC5B.js} +8 -8
- package/dist/{chunk-Y76ERHLK.js → chunk-FDTET7FZ.js} +6 -6
- package/dist/{chunk-Z3SNX45M.js → chunk-FENA7K7C.js} +3 -3
- package/dist/{chunk-WOGJB2F6.js → chunk-FNLTFOUD.js} +4 -9
- package/dist/{chunk-FV55SRQU.js → chunk-FQ53GTII.js} +9 -9
- package/dist/{chunk-DEVGLLNZ.js → chunk-GHMLRFRX.js} +8 -8
- package/dist/{chunk-GMVW6ZZK.js → chunk-H2K4GFUS.js} +4 -4
- package/dist/{chunk-NUU76247.js → chunk-HTQWAQRW.js} +3 -3
- package/dist/{chunk-ROY4YAEQ.js → chunk-HU7F56VF.js} +22 -2
- package/dist/{chunk-RXCT3OCU.js → chunk-HZ6ADG3O.js} +47 -8
- package/dist/{chunk-Z2BRSQ6M.js → chunk-I6XRUU6U.js} +91 -64
- package/dist/chunk-IPNN2KRW.js +257 -0
- package/dist/{chunk-SF2B7MZK.js → chunk-IYXL5NYU.js} +259 -31
- package/dist/chunk-JI3BLXWQ.js +107 -0
- package/dist/{chunk-4DJTQ6W4.js → chunk-JIKGT7DO.js} +2 -1
- package/dist/{chunk-OVV2HXJ6.js → chunk-JOOKM7AH.js} +2 -2
- package/dist/{chunk-65SW2BA5.js → chunk-JOWY6HFL.js} +3 -3
- package/dist/{chunk-I5VEROXW.js → chunk-JX6N73H3.js} +2 -2
- package/dist/{chunk-5D6DGF3W.js → chunk-L472YIGG.js} +8 -8
- package/dist/{chunk-HLQH3AXB.js → chunk-L6HZ67P6.js} +2 -2
- package/dist/{chunk-TM5LRSBB.js → chunk-LBJA7IEM.js} +370 -45
- package/dist/chunk-LCOCRJ4K.js +116 -0
- package/dist/{chunk-DGWHAVRG.js → chunk-LJM5CIY4.js} +16 -1
- package/dist/{chunk-5RLAF6RL.js → chunk-M2C54ZBC.js} +4 -4
- package/dist/{chunk-U6DR6464.js → chunk-M3NEK3LT.js} +4 -4
- package/dist/{chunk-5XVBT6CQ.js → chunk-MBL7CXJ7.js} +2 -2
- package/dist/{chunk-5YBNXNKU.js → chunk-MFWF2NZJ.js} +12 -5
- package/dist/{chunk-TEBS7FE6.js → chunk-MYZRMSPM.js} +2 -2
- package/dist/{chunk-YSLMMR2U.js → chunk-N3YFCFCO.js} +14 -14
- package/dist/{chunk-OJPZEUPH.js → chunk-NDJAKSE7.js} +11 -8
- package/dist/{chunk-PIPIA7K7.js → chunk-NV37YGOV.js} +7 -7
- package/dist/{chunk-ZHGWR45B.js → chunk-O56DQKPL.js} +9 -9
- package/dist/{chunk-4QBGE3EO.js → chunk-ORGNLQN6.js} +6 -6
- package/dist/{chunk-NNB7VUCH.js → chunk-PEIBGH2V.js} +55 -31
- package/dist/{chunk-UJ6ZZJDD.js → chunk-PEX4QZVI.js} +2 -2
- package/dist/{chunk-LLS2WO2K.js → chunk-PV25BDCH.js} +5 -5
- package/dist/{chunk-F3557PVM.js → chunk-PY722CHR.js} +2 -2
- package/dist/{chunk-4GDEEY2U.js → chunk-QGIZLFAS.js} +4 -4
- package/dist/{chunk-YI76TURL.js → chunk-QRQ54LUI.js} +16 -14
- package/dist/{chunk-JQOX6HW4.js → chunk-RBU2YX22.js} +3 -3
- package/dist/{chunk-4NEBBKOP.js → chunk-RRMH7WMY.js} +7 -7
- package/dist/{chunk-HOOOOJJP.js → chunk-S46ODQRA.js} +2 -2
- package/dist/{chunk-37FBPMNE.js → chunk-S56YBYMN.js} +5 -2
- package/dist/{chunk-4QFBEKXI.js → chunk-SDGV76HF.js} +2 -2
- package/dist/{chunk-CV54PASI.js → chunk-SGK3PTTM.js} +312 -132
- package/dist/{chunk-S5TEJIGP.js → chunk-SKEG3V2V.js} +2 -2
- package/dist/{chunk-VZ22VUAS.js → chunk-SLGJIWCY.js} +3 -3
- package/dist/{chunk-JSEVKRVJ.js → chunk-T4LJ5UR2.js} +29 -7
- package/dist/{chunk-JXKO6JT7.js → chunk-TWVUYS63.js} +24 -24
- package/dist/{chunk-UIEFE6FU.js → chunk-U5M7T6CI.js} +7 -7
- package/dist/{chunk-Z4VN347O.js → chunk-UYFUIHH3.js} +2 -2
- package/dist/{chunk-Y6NO3DLQ.js → chunk-V7MBRUK6.js} +3 -3
- package/dist/chunk-VAGSKUWC.js +67 -0
- package/dist/{chunk-A4NNCI4O.js → chunk-VIJ5D3RC.js} +3 -3
- package/dist/{chunk-3IYVHVM6.js → chunk-VJFMUJWZ.js} +4 -4
- package/dist/{chunk-V4IBHDIY.js → chunk-VNDR2T35.js} +7 -7
- package/dist/chunk-WAVNUTMT.js +9 -0
- package/dist/{chunk-KQLACS4Q.js → chunk-WNCW2RNB.js} +4 -4
- package/dist/chunk-WUEPP5HD.js +111 -0
- package/dist/{chunk-IV446ZLJ.js → chunk-Y453TW6J.js} +2 -2
- package/dist/{local-engine-command-73NHWD6V.js → chunk-YCUDOF6Q.js} +22 -76
- package/dist/{chunk-CJ76PSJT.js → chunk-YH2JVJAO.js} +12 -12
- package/dist/{chunk-GPI3OWRE.js → chunk-YHB34BN6.js} +2 -1
- package/dist/{chunk-AMBEITWL.js → chunk-ZGLNHA7T.js} +7 -7
- package/dist/{chunk-NGAODDLX.js → chunk-ZJOAWRED.js} +8 -8
- package/dist/{chunk-TUEFTRC2.js → chunk-ZXRDD3Q2.js} +50 -27
- package/dist/cli.d.ts +40 -11
- package/dist/cli.js +60 -56
- package/dist/{codegen-command-L2OO6OTE.js → codegen-command-T7TC7PQO.js} +79 -72
- package/dist/codegen.d.ts +2 -2
- package/dist/codegen.js +2 -2
- package/dist/{commands-2E4JB3DB.js → commands-JDENTDJS.js} +3 -3
- package/dist/{completion-LPJIH5VQ.js → completion-YFD5OVJW.js} +9 -5
- package/dist/{config-QDCRKEWD.js → config-YJFUTRJW.js} +8 -8
- package/dist/{deploy-command-HJZNYCUY.js → deploy-command-OEVEE6UG.js} +65 -63
- package/dist/deploy-source-HYVZEYXV.js +83 -0
- package/dist/{dev-env-sync-GZ4QQJGV.js → dev-env-sync-EFDCJ6KU.js} +63 -61
- package/dist/{diagnostics-LSMGB4TY.js → diagnostics-OMN5Y2AH.js} +2 -2
- package/dist/{display-name-hint-AHCNH6TF.js → display-name-hint-SW3GB3V7.js} +14 -13
- package/dist/{emit-DqG6qddr.d.ts → emit-Dov_92kn.d.ts} +66 -20
- package/dist/env-example-refresh-WNSOH534.js +134 -0
- package/dist/{env-pull-command-Z4RLVEGJ.js → env-pull-command-UYEXMQ3P.js} +53 -52
- package/dist/{env-target-ZHQUS5BO.js → env-target-JBSLBKNX.js} +15 -14
- package/dist/{env-var-command-FKQ4VVQ6.js → env-var-command-BJNRAXNV.js} +51 -49
- package/dist/{ephemeral-L4KUOGEU.js → ephemeral-CEOGMIEA.js} +11 -10
- package/dist/{ephemeral-command-GRPFI3TD.js → ephemeral-command-IPSGBCS5.js} +70 -69
- package/dist/{ephemeral-state-VLYU2BXR.js → ephemeral-state-MTBASPRS.js} +13 -12
- package/dist/{generate-command-XNODJFDQ.js → generate-command-XQXODBS6.js} +96 -86
- package/dist/{gitignore-VWRSZX5F.js → gitignore-RUVCIZO4.js} +21 -20
- package/dist/{guards-OPSGB6LG.js → guards-KYEOCVHN.js} +6 -6
- package/dist/{impersonate-command-AEKIZHHK.js → impersonate-command-MA27O7S5.js} +46 -44
- package/dist/{import-PHSSFFLA.js → import-XKRFHABE.js} +5 -5
- package/dist/index.d.ts +14 -20
- package/dist/index.js +13 -13
- package/dist/init-command-6RDTCMAB.js +143 -0
- package/dist/{init-modules-SGSX7XEY.js → init-modules-DHTBOCQT.js} +10 -9
- package/dist/{init-web-6HX3YLQP.js → init-web-ELBXSXDL.js} +3 -3
- package/dist/internal.d.ts +5 -5
- package/dist/internal.js +47 -20
- package/dist/{io-TAF4WXYQ.js → io-PGTCBSIQ.js} +6 -4
- package/dist/{keep-data-merge-GUGF7MVZ.js → keep-data-merge-TDJOIAVT.js} +33 -34
- package/dist/{lambda-config-reconcile-65U6I4KU.js → lambda-config-reconcile-47X5C2E4.js} +6 -5
- package/dist/{landed-QA6PRTV2.js → landed-F7PCHGCK.js} +3 -3
- package/dist/{landing-record-FCAWLCZU.js → landing-record-TPPYFQAS.js} +26 -25
- package/dist/{live-diff-IM4W3ELT.js → live-diff-5E2BQWQ7.js} +9 -8
- package/dist/local-engine-choice-S6VHPJRU.js +81 -0
- package/dist/local-engine-command-4EZCGZ6M.js +85 -0
- package/dist/{local-engine-config-W3KB7RWM.js → local-engine-config-2EBL3QKA.js} +3 -2
- package/dist/{local-engine-deploy-Y4OAWL7K.js → local-engine-deploy-FOPNWU7X.js} +18 -16
- package/dist/local-engine-lookup-GM3E3NPP.js +43 -0
- package/dist/local-engine-mcp-bridge-QKZHUGW3.js +423 -0
- package/dist/local-engine-mcp-command-BFQVLXZC.js +181 -0
- package/dist/{local-engine-process-6YPJHKYM.js → local-engine-process-XUQPQENQ.js} +12 -9
- package/dist/{local-engine-state-OCW5YDD7.js → local-engine-state-JQPKGB65.js} +4 -3
- package/dist/{local-engine-update-check-X7TZGRFL.js → local-engine-update-check-S7UF6ZF5.js} +7 -6
- package/dist/{lock-WXXC3QHL.js → lock-HDCHD2ON.js} +4 -2
- package/dist/{lock-commands-PKDBNRSD.js → lock-commands-HJ6Y5QVS.js} +66 -64
- package/dist/{login-command-V4U4FA5G.js → login-command-JO55NZAS.js} +34 -33
- package/dist/{logout-command-TV3P545Z.js → logout-command-MPRIRSJA.js} +18 -17
- package/dist/{loop-VKHGQ6MP.js → loop-SUB6C2LK.js} +8 -9
- package/dist/{marketplace-command-LEFOAEAV.js → marketplace-command-BM6G257N.js} +90 -54
- package/dist/{marketplace-resolve-ME7O7JBJ.js → marketplace-resolve-AWH3RG57.js} +7 -6
- package/dist/{meta-client-TEEECA5W.js → meta-client-AOSWODQQ.js} +16 -15
- package/dist/{module-manifest-7YLGIRCY.js → module-manifest-GXI46PEF.js} +7 -4
- package/dist/node.d.ts +5 -5
- package/dist/node.js +68 -67
- package/dist/operation-outcome-4UKPXTNC.js +53 -0
- package/dist/{output-target-5FWX3NGZ.js → output-target-RAZ4KN5J.js} +22 -21
- package/dist/{package-manager-PRAHUSCN.js → package-manager-K762W7XT.js} +2 -2
- package/dist/{plan-disclosure-QGL5UYQR.js → plan-disclosure-JR52DWXN.js} +21 -21
- package/dist/{plugin-contributions-GNFTWDEB.js → plugin-contributions-E6XHLQWK.js} +6 -6
- package/dist/{plugin-prompt-VEQGMZ4T.js → plugin-prompt-IODX5EU6.js} +5 -5
- package/dist/{plugin-questions-BGRL23GO.js → plugin-questions-AAAJ7POP.js} +4 -4
- package/dist/plugin.d.ts +254 -10
- package/dist/{preflight-command-VKJKXRRI.js → preflight-command-7GKJBWOQ.js} +71 -70
- package/dist/{profile-command-P7A3BH26.js → profile-command-CM6J7E2M.js} +35 -34
- package/dist/{profile-pointer-HG7IXE4I.js → profile-pointer-KTYXL6FU.js} +5 -4
- package/dist/{project-dependency-Z4CKOCJI.js → project-dependency-OQ5575QQ.js} +11 -8
- package/dist/{project-sdk-JWZWGXXR.js → project-sdk-2ESHHZVL.js} +4 -4
- package/dist/promote-command-BDRPG6UU.js +147 -0
- package/dist/{prompt-SURZOUUW.js → prompt-MQPGU4ZI.js} +4 -4
- package/dist/{publish-command-HGAB3H4A.js → publish-command-IEMYZ7LF.js} +69 -67
- package/dist/pull-command-S5E2ABZ4.js +169 -0
- package/dist/{pull-superseded-TOT5S4QU.js → pull-superseded-E34BZVLH.js} +4 -4
- package/dist/{raw-where-EoWl5fqY.d.ts → raw-where-ZMLND6AG.d.ts} +20 -3
- package/dist/release-command-7F5TBKO2.js +151 -0
- package/dist/{release-ns-command-WOQE2BDQ.js → release-ns-command-EK2ZQ4CC.js} +101 -100
- package/dist/{retry-command-JRGMZZAC.js → retry-command-GL5HCMVB.js} +10 -9
- package/dist/{routes-manifest-URFMAWJE.js → routes-manifest-YR4ZIMLM.js} +15 -7
- package/dist/routes-manifest-file-LCIKPDAG.js +41 -0
- package/dist/scaffold.js +4 -4
- package/dist/secrets-IV4N5HYI.js +20 -0
- package/dist/{secrets-file-YWZWVJ52.js → secrets-file-LXREYU3M.js} +21 -20
- package/dist/{secrets-fill-command-HIHK3VH2.js → secrets-fill-command-QHZS3KWM.js} +64 -62
- package/dist/{seed-24DTEY5S.js → seed-FRKMDN2Z.js} +9 -9
- package/dist/{source-resolve-OWD3MIEO.js → source-resolve-BBHYTOXI.js} +26 -24
- package/dist/{static-host-UIR2OLPQ.js → static-host-7LC7OZR4.js} +5 -5
- package/dist/{status-command-JKTHH5QE.js → status-command-TY253MJT.js} +54 -52
- package/dist/{store-zxw2go0f.d.ts → store-Boba9OOh.d.ts} +2 -2
- package/dist/{store-5YAQS6KU.js → store-VJ3OS6VO.js} +8 -7
- package/dist/sync-baseline-DOV5AGIO.js +36 -0
- package/dist/{sync-contributions-RBB6JVOL.js → sync-contributions-63542VE4.js} +20 -12
- package/dist/sync-record-RGHK7EAL.js +43 -0
- package/dist/{table-MQFVYA4K.js → table-OAYGFGEN.js} +8 -8
- package/dist/{tables-command-5Q4BSUNO.js → tables-command-PZIVDAH3.js} +45 -43
- package/dist/{tenant-Q3LPVSSM.js → tenant-Y3II4VY3.js} +12 -11
- package/dist/{tenant-command-BFVU2PEX.js → tenant-command-G6XON7CF.js} +113 -107
- package/dist/{test-command-F4VUU4QR.js → test-command-3FZOX7O3.js} +44 -42
- package/dist/{tests-5ZSDFVIJ.js → tests-KF6N6BZ7.js} +6 -6
- package/dist/{token-TERSTNU4.js → token-DJJUW5HY.js} +14 -13
- package/dist/toolchain-hooks-7PWCFLSU.js +46 -0
- package/dist/{toolchain-modules-FD5ANV2U.js → toolchain-modules-OTNSKK52.js} +8 -5
- package/dist/toolchain-peers-KQ7TQ2AR.js +28 -0
- package/dist/tracked-backend-AJCGTO5Y.js +82 -0
- package/dist/{update-check-O4C2LCZH.js → update-check-4E5L6GAW.js} +61 -59
- package/dist/{upgrade-command-NVFWLMTA.js → upgrade-command-BXMSQN4C.js} +68 -64
- package/dist/{whoami-command-YKNTISIV.js → whoami-command-NLCCIEUM.js} +17 -16
- package/dist/{workspace-GGVGE2S5.js → workspace-PNMJOXE4.js} +5 -5
- package/dist/{workspace-binding-OS4ZOX4S.js → workspace-binding-J5GWDFRI.js} +16 -15
- package/dist/{workspace-command-GTUNVN7K.js → workspace-command-MHIIY352.js} +125 -93
- package/dist/{workspace-env-467C5KHM.js → workspace-env-LLRWCHSA.js} +17 -16
- package/dist/{workspace-export-3XTVGQVM.js → workspace-export-BIKAYHWJ.js} +5 -5
- package/dist/{writable-7SSWUQJ3.js → writable-UOTO4WWC.js} +4 -4
- package/dist/{xano-6RS5XQZE.js → xano-LCI7VWPS.js} +8 -8
- package/dist/{xanosdk-import-E3WSIYUE.js → xanosdk-import-S7A3CVBN.js} +8 -8
- package/dist/{xanosdk-project-KH5TZ2KI.js → xanosdk-project-J4VCFRHP.js} +18 -17
- package/guides/README.md +2 -2
- package/guides/cli.md +73 -4
- package/guides/codegen.md +23 -5
- package/guides/codes.md +8 -2
- package/guides/coverage.md +5 -0
- package/guides/deploying.md +80 -0
- package/guides/marketplace.md +21 -0
- package/guides/module-contract.md +80 -4
- package/guides/scaffold.md +61 -10
- package/guides/typed-frontend.md +37 -0
- package/llms/client.md +11 -1
- package/llms/filters.md +4 -0
- package/llms/kinds-core.md +1 -1
- package/llms/statements-data.md +3 -2
- package/llms/toolchain.md +12 -0
- package/llms-full.txt +34 -7
- package/llms.txt +3 -3
- package/manifest.json +63 -5
- package/package.json +5 -2
- package/skills/xano-backend/SKILL.md +119 -0
- package/dist/chunk-F6IKWAIU.js +0 -664
- package/dist/chunk-M6ZFSTIZ.js +0 -630
- package/dist/chunk-MEIJDRHU.js +0 -243
- package/dist/deploy-source-5COWTBOC.js +0 -81
- package/dist/env-example-refresh-DWQIOQYR.js +0 -127
- package/dist/init-command-TI3HCKXZ.js +0 -126
- package/dist/local-engine-choice-FPJAZSSD.js +0 -79
- package/dist/operation-outcome-GNDD35WL.js +0 -51
- package/dist/promote-command-KHTIK44I.js +0 -141
- package/dist/pull-command-EUEWBRXZ.js +0 -162
- package/dist/release-command-WOVQAMUY.js +0 -147
- package/dist/toolchain-hooks-QVUZ6HZ4.js +0 -96
- package/dist/tracked-backend-B4HTME4S.js +0 -80
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isLoopbackUrl
|
|
3
|
+
} from "./chunk-LCOCRJ4K.js";
|
|
4
|
+
import {
|
|
5
|
+
isRecord
|
|
6
|
+
} from "./chunk-MYZRMSPM.js";
|
|
7
|
+
import "./chunk-L6HZ67P6.js";
|
|
8
|
+
import "./chunk-MF4W6FHU.js";
|
|
9
|
+
import "./chunk-X2NL4KUO.js";
|
|
10
|
+
import "./chunk-CH23ONYG.js";
|
|
11
|
+
import "./chunk-YHB34BN6.js";
|
|
12
|
+
import "./chunk-UTI5G6OJ.js";
|
|
13
|
+
import "./chunk-5ZSO4T2G.js";
|
|
14
|
+
import "./chunk-TFFGOFVZ.js";
|
|
15
|
+
import "./chunk-36JUQZVQ.js";
|
|
16
|
+
import "./chunk-PZ5AY32C.js";
|
|
17
|
+
|
|
18
|
+
// src/deploy/local-engine-mcp-bridge.ts
|
|
19
|
+
import { request as httpRequest } from "http";
|
|
20
|
+
import { request as httpsRequest } from "https";
|
|
21
|
+
var PROTOCOL_VERSIONS = ["2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"];
|
|
22
|
+
var POLL_INTERVAL_MS = 2e3;
|
|
23
|
+
var CONNECT_TIMEOUT_MS = 5e3;
|
|
24
|
+
var PARSE_ERROR = -32700;
|
|
25
|
+
var INVALID_REQUEST = -32600;
|
|
26
|
+
var INTERNAL_ERROR = -32603;
|
|
27
|
+
var SERVER_ERROR = -32e3;
|
|
28
|
+
var PostFailure = class extends Error {
|
|
29
|
+
constructor(kind, message) {
|
|
30
|
+
super(message);
|
|
31
|
+
this.kind = kind;
|
|
32
|
+
}
|
|
33
|
+
kind;
|
|
34
|
+
};
|
|
35
|
+
async function runMcpBridge(opts) {
|
|
36
|
+
const bridge = new Bridge(opts);
|
|
37
|
+
try {
|
|
38
|
+
await bridge.run();
|
|
39
|
+
} catch (err) {
|
|
40
|
+
opts.log(`xano-local MCP bridge stopped: ${err.message}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
var Bridge = class {
|
|
44
|
+
constructor(opts) {
|
|
45
|
+
this.opts = opts;
|
|
46
|
+
this.post = opts.post ?? defaultPost;
|
|
47
|
+
this.cli = opts.cli ?? "npx xanosdk";
|
|
48
|
+
}
|
|
49
|
+
opts;
|
|
50
|
+
post;
|
|
51
|
+
cli;
|
|
52
|
+
/** The engine in use, or why there is none. Undefined until first looked up. */
|
|
53
|
+
state;
|
|
54
|
+
resolving;
|
|
55
|
+
/** The agent sent `notifications/initialized`: notifications may now be sent to it. */
|
|
56
|
+
initialized = false;
|
|
57
|
+
lastSignal;
|
|
58
|
+
/** The lookup failure last said on stderr, so one that persists is said once, not every poll. */
|
|
59
|
+
lastFailure;
|
|
60
|
+
timer;
|
|
61
|
+
pending = /* @__PURE__ */ new Set();
|
|
62
|
+
async run() {
|
|
63
|
+
try {
|
|
64
|
+
for await (const line of this.opts.lines) {
|
|
65
|
+
if (line.trim() === "") continue;
|
|
66
|
+
const handling = this.handleLine(line).catch((err) => {
|
|
67
|
+
this.opts.log(`xano-local MCP bridge: ${err.message}`);
|
|
68
|
+
});
|
|
69
|
+
this.pending.add(handling);
|
|
70
|
+
void handling.finally(() => this.pending.delete(handling));
|
|
71
|
+
}
|
|
72
|
+
await Promise.all(this.pending);
|
|
73
|
+
} finally {
|
|
74
|
+
this.stopPolling();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
// ── messages ──────────────────────────────────────────────────────────────
|
|
78
|
+
async handleLine(line) {
|
|
79
|
+
let parsed;
|
|
80
|
+
try {
|
|
81
|
+
parsed = JSON.parse(line);
|
|
82
|
+
} catch {
|
|
83
|
+
this.send(errorFrame(null, PARSE_ERROR, "Parse error: the line is not JSON."));
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (Array.isArray(parsed)) return this.handleBatch(parsed, line);
|
|
87
|
+
if (!isRecord(parsed)) {
|
|
88
|
+
this.send(errorFrame(null, INVALID_REQUEST, "Invalid request: expected a JSON-RPC object."));
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (typeof parsed.method !== "string") {
|
|
92
|
+
if ("id" in parsed && ("result" in parsed || "error" in parsed)) {
|
|
93
|
+
this.opts.log("xano-local MCP bridge: dropped a response to a request it did not send.");
|
|
94
|
+
} else {
|
|
95
|
+
this.send(errorFrame(idOf(parsed), INVALID_REQUEST, "Invalid request: no method."));
|
|
96
|
+
}
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const answer = await this.handleMessage(parsed, line);
|
|
100
|
+
if (answer !== void 0) this.send(answer);
|
|
101
|
+
}
|
|
102
|
+
/** One message's answer, or undefined when it gets none (a notification). */
|
|
103
|
+
async handleMessage(msg, raw) {
|
|
104
|
+
const method = msg.method;
|
|
105
|
+
const isRequest = "id" in msg;
|
|
106
|
+
if (method === "ping") return isRequest ? { jsonrpc: "2.0", id: idOf(msg), result: {} } : void 0;
|
|
107
|
+
if (method === "notifications/initialized") this.initialized = true;
|
|
108
|
+
const state = await this.current();
|
|
109
|
+
if (method === "initialize") return this.initialize(msg, raw, state);
|
|
110
|
+
if (state.state !== "usable") return isRequest ? this.noEngineAnswer(msg, state) : void 0;
|
|
111
|
+
return this.forward(raw, msg, state);
|
|
112
|
+
}
|
|
113
|
+
async handleBatch(items, raw) {
|
|
114
|
+
const state = await this.current();
|
|
115
|
+
if (state.state === "usable" && items.every((m) => isRecord(m) && m.method !== "initialize")) {
|
|
116
|
+
const answer = await this.forward(raw, void 0, state);
|
|
117
|
+
if (answer !== void 0) this.send(answer);
|
|
118
|
+
if (answer !== void 0 || this.state?.state === "usable") return;
|
|
119
|
+
}
|
|
120
|
+
const answers = [];
|
|
121
|
+
for (const item of items) {
|
|
122
|
+
if (!isRecord(item) || typeof item.method !== "string") {
|
|
123
|
+
answers.push(errorFrame(isRecord(item) ? idOf(item) : null, INVALID_REQUEST, "Invalid request: no method."));
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
const answer = await this.handleMessage(item, JSON.stringify(item));
|
|
127
|
+
if (Array.isArray(answer)) answers.push(...answer);
|
|
128
|
+
else if (answer !== void 0) answers.push(answer);
|
|
129
|
+
}
|
|
130
|
+
if (answers.length > 0) this.send(answers);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* The bridge's own `initialize` answer, with the engine's server info and
|
|
134
|
+
* instructions when there is an engine to ask. `listChanged` is the bridge's
|
|
135
|
+
* promise either way: it is the bridge that notices an engine come and go.
|
|
136
|
+
*/
|
|
137
|
+
async initialize(msg, raw, state) {
|
|
138
|
+
const id = idOf(msg);
|
|
139
|
+
const params = isRecord(msg.params) ? msg.params : {};
|
|
140
|
+
const asked = typeof params.protocolVersion === "string" ? params.protocolVersion : void 0;
|
|
141
|
+
const local = {
|
|
142
|
+
jsonrpc: "2.0",
|
|
143
|
+
id,
|
|
144
|
+
result: {
|
|
145
|
+
protocolVersion: asked !== void 0 && PROTOCOL_VERSIONS.includes(asked) ? asked : PROTOCOL_VERSIONS[0],
|
|
146
|
+
capabilities: { tools: { listChanged: true } },
|
|
147
|
+
serverInfo: { name: "xano-local", title: "Xano Engine (local, via xanosdk)", version: "1" },
|
|
148
|
+
instructions: noEngineText(state, this.cli)
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
if (state.state !== "usable") return local;
|
|
152
|
+
const answer = await this.forward(raw, msg, state);
|
|
153
|
+
if (!isRecord(answer) || !isRecord(answer.result)) return local;
|
|
154
|
+
const result = answer.result;
|
|
155
|
+
const capabilities = isRecord(result.capabilities) ? result.capabilities : {};
|
|
156
|
+
const tools = isRecord(capabilities.tools) ? capabilities.tools : {};
|
|
157
|
+
return { ...answer, result: { ...result, capabilities: { ...capabilities, tools: { ...tools, listChanged: true } } } };
|
|
158
|
+
}
|
|
159
|
+
/** The answer a request gets while there is no engine: what to do, in words the model reads. */
|
|
160
|
+
noEngineAnswer(msg, state) {
|
|
161
|
+
const id = idOf(msg);
|
|
162
|
+
const text = noEngineText(state, this.cli);
|
|
163
|
+
if (msg.method === "tools/list") return { jsonrpc: "2.0", id, result: { tools: [] } };
|
|
164
|
+
if (msg.method === "tools/call") {
|
|
165
|
+
return { jsonrpc: "2.0", id, result: { content: [{ type: "text", text }], isError: true } };
|
|
166
|
+
}
|
|
167
|
+
return errorFrame(id, SERVER_ERROR, text);
|
|
168
|
+
}
|
|
169
|
+
// ── forwarding ────────────────────────────────────────────────────────────
|
|
170
|
+
/**
|
|
171
|
+
* POST `raw` to the engine and turn its answer into what the agent gets.
|
|
172
|
+
* `msg` is undefined for a batch. Resent once, after a fresh lookup, only when
|
|
173
|
+
* the first attempt provably did not run: refused, an HTTP 401 (no bearer
|
|
174
|
+
* reached the route), or the engine's in-band refusal of a stale bearer (the
|
|
175
|
+
* Meta API refuses it before the route runs).
|
|
176
|
+
*/
|
|
177
|
+
async forward(raw, msg, state) {
|
|
178
|
+
const first = await this.attempt(raw, state);
|
|
179
|
+
if (!needsRetry(first)) return this.answerFor(first, msg);
|
|
180
|
+
const fresh = await this.refresh();
|
|
181
|
+
if (fresh.state !== "usable") return msg !== void 0 && "id" in msg ? this.noEngineAnswer(msg, fresh) : void 0;
|
|
182
|
+
return this.answerFor(await this.attempt(raw, fresh), msg);
|
|
183
|
+
}
|
|
184
|
+
async attempt(raw, state) {
|
|
185
|
+
if (state.state !== "usable") return { kind: "refused", message: "no engine" };
|
|
186
|
+
if (!isLoopbackUrl(state.mcpUrl)) {
|
|
187
|
+
return { kind: "refused", message: `the engine's MCP url is not on this machine (${state.mcpUrl})` };
|
|
188
|
+
}
|
|
189
|
+
try {
|
|
190
|
+
const reply = await this.post(
|
|
191
|
+
state.mcpUrl,
|
|
192
|
+
{
|
|
193
|
+
"content-type": "application/json",
|
|
194
|
+
accept: "application/json, text/event-stream",
|
|
195
|
+
authorization: `Bearer ${state.engine.token}`
|
|
196
|
+
},
|
|
197
|
+
raw
|
|
198
|
+
);
|
|
199
|
+
return { kind: "reply", reply, frames: parseReply(reply) };
|
|
200
|
+
} catch (err) {
|
|
201
|
+
if (err instanceof PostFailure && err.kind === "refused") return { kind: "refused", message: err.message };
|
|
202
|
+
return { kind: "unknown", message: err.message };
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
answerFor(attempt, msg) {
|
|
206
|
+
const id = msg === void 0 ? null : idOf(msg);
|
|
207
|
+
const isRequest = msg === void 0 || "id" in msg;
|
|
208
|
+
if (attempt.kind === "refused") {
|
|
209
|
+
this.opts.log(`xano-local MCP bridge: the engine refused the connection (${attempt.message}).`);
|
|
210
|
+
return isRequest ? errorFrame(id, SERVER_ERROR, `The Xano Engine is not answering. Deploy again with \`${this.cli} deploy --local\`, then retry.`) : void 0;
|
|
211
|
+
}
|
|
212
|
+
if (attempt.kind === "unknown") {
|
|
213
|
+
this.opts.log(`xano-local MCP bridge: the connection to the engine failed after sending (${attempt.message}).`);
|
|
214
|
+
if (!isRequest) return void 0;
|
|
215
|
+
const what = msg?.method === "tools/call" ? describeCall(msg) : `this ${typeof msg?.method === "string" ? msg.method : "batch"} request`;
|
|
216
|
+
return errorFrame(
|
|
217
|
+
id,
|
|
218
|
+
SERVER_ERROR,
|
|
219
|
+
`The connection to the Xano Engine failed after ${what} was sent, so whether it ran is unknown. It was not sent again. Check what it would have changed before retrying.`
|
|
220
|
+
);
|
|
221
|
+
}
|
|
222
|
+
const { reply, frames } = attempt;
|
|
223
|
+
if (reply.status === 202) return void 0;
|
|
224
|
+
if (frames === void 0) {
|
|
225
|
+
if (!isRequest) return void 0;
|
|
226
|
+
return errorFrame(id, INTERNAL_ERROR, `The Xano Engine answered HTTP ${reply.status} without a JSON-RPC message.`);
|
|
227
|
+
}
|
|
228
|
+
if (reply.status === 401 && !Array.isArray(frames) && frames.id === null && msg !== void 0) {
|
|
229
|
+
return isRequest ? { ...frames, id } : void 0;
|
|
230
|
+
}
|
|
231
|
+
return frames;
|
|
232
|
+
}
|
|
233
|
+
// ── the engine ────────────────────────────────────────────────────────────
|
|
234
|
+
/** The state, looked up on first use. */
|
|
235
|
+
async current() {
|
|
236
|
+
return this.state ?? this.refresh();
|
|
237
|
+
}
|
|
238
|
+
/** Look the engine up again; one lookup at a time, shared by whoever asks. */
|
|
239
|
+
refresh() {
|
|
240
|
+
this.resolving ??= this.lookup().finally(() => {
|
|
241
|
+
this.resolving = void 0;
|
|
242
|
+
});
|
|
243
|
+
return this.resolving;
|
|
244
|
+
}
|
|
245
|
+
async lookup() {
|
|
246
|
+
this.lastSignal = this.readSignal();
|
|
247
|
+
let found;
|
|
248
|
+
try {
|
|
249
|
+
found = await this.opts.lookup();
|
|
250
|
+
this.lastFailure = void 0;
|
|
251
|
+
} catch (err) {
|
|
252
|
+
const failure = err.message;
|
|
253
|
+
if (failure !== this.lastFailure) this.opts.log(`xano-local MCP bridge: could not look up the Xano Engine: ${failure}`);
|
|
254
|
+
this.lastFailure = failure;
|
|
255
|
+
found = { state: "not-running" };
|
|
256
|
+
this.lastSignal = void 0;
|
|
257
|
+
}
|
|
258
|
+
if (found.state === "usable") this.opts.registerSecret(found.engine.token);
|
|
259
|
+
const before = this.state;
|
|
260
|
+
this.state = found;
|
|
261
|
+
if (found.state === "usable") this.stopPolling();
|
|
262
|
+
else this.startPolling();
|
|
263
|
+
if (before !== void 0 && connectionOf(before) !== connectionOf(found)) this.notifyToolsChanged();
|
|
264
|
+
return found;
|
|
265
|
+
}
|
|
266
|
+
notifyToolsChanged() {
|
|
267
|
+
if (this.initialized) this.send({ jsonrpc: "2.0", method: "notifications/tools/list_changed" });
|
|
268
|
+
}
|
|
269
|
+
readSignal() {
|
|
270
|
+
try {
|
|
271
|
+
return this.opts.recordSignal();
|
|
272
|
+
} catch {
|
|
273
|
+
return void 0;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
startPolling() {
|
|
277
|
+
if (this.timer !== void 0) return;
|
|
278
|
+
const every = this.opts.setInterval ?? ((fn, ms) => setInterval(fn, ms).unref());
|
|
279
|
+
this.timer = every(() => {
|
|
280
|
+
const signal = this.readSignal();
|
|
281
|
+
if (signal === this.lastSignal || this.resolving !== void 0) return;
|
|
282
|
+
void this.refresh();
|
|
283
|
+
}, this.opts.pollMs ?? POLL_INTERVAL_MS);
|
|
284
|
+
}
|
|
285
|
+
stopPolling() {
|
|
286
|
+
if (this.timer === void 0) return;
|
|
287
|
+
(this.opts.clearInterval ?? ((h) => clearInterval(h)))(this.timer);
|
|
288
|
+
this.timer = void 0;
|
|
289
|
+
}
|
|
290
|
+
send(frame) {
|
|
291
|
+
this.opts.write(JSON.stringify(frame));
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
function connectionOf(state) {
|
|
295
|
+
return state.state === "usable" ? state.mcpUrl : void 0;
|
|
296
|
+
}
|
|
297
|
+
function needsRetry(attempt) {
|
|
298
|
+
if (attempt.kind === "refused") return true;
|
|
299
|
+
if (attempt.kind === "unknown") return false;
|
|
300
|
+
if (attempt.reply.status === 401) return true;
|
|
301
|
+
const { frames } = attempt;
|
|
302
|
+
return frames !== void 0 && !Array.isArray(frames) && isBearerRefusal(frames);
|
|
303
|
+
}
|
|
304
|
+
function isBearerRefusal(frame) {
|
|
305
|
+
const result = frame.result;
|
|
306
|
+
if (!isRecord(result) || result.isError !== true || !Array.isArray(result.content)) return false;
|
|
307
|
+
return result.content.some((part) => {
|
|
308
|
+
if (!isRecord(part) || part.type !== "text" || typeof part.text !== "string") return false;
|
|
309
|
+
try {
|
|
310
|
+
const body = JSON.parse(part.text);
|
|
311
|
+
return isRecord(body) && body.status === 401 && body.code === "ERROR_CODE_UNAUTHORIZED" && typeof body.hint === "string" && /refused this server's bearer/.test(body.hint);
|
|
312
|
+
} catch {
|
|
313
|
+
return false;
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
function parseReply(reply) {
|
|
318
|
+
if (/text\/event-stream/i.test(reply.contentType)) {
|
|
319
|
+
const frames = [];
|
|
320
|
+
for (const event of reply.body.split(/\r?\n\r?\n/)) {
|
|
321
|
+
const data = event.split(/\r?\n/).filter((l) => l.startsWith("data:")).map((l) => l.slice(5).replace(/^ /, "")).join("\n");
|
|
322
|
+
if (data === "") continue;
|
|
323
|
+
const parsed2 = parseJson(data);
|
|
324
|
+
if (Array.isArray(parsed2)) frames.push(...parsed2.filter(isRecord));
|
|
325
|
+
else if (isRecord(parsed2)) frames.push(parsed2);
|
|
326
|
+
}
|
|
327
|
+
if (frames.length === 0) return void 0;
|
|
328
|
+
return frames.length === 1 ? frames[0] : frames;
|
|
329
|
+
}
|
|
330
|
+
const parsed = parseJson(reply.body);
|
|
331
|
+
if (Array.isArray(parsed)) return parsed.filter(isRecord);
|
|
332
|
+
return isRecord(parsed) ? parsed : void 0;
|
|
333
|
+
}
|
|
334
|
+
function noEngineText(state, cli) {
|
|
335
|
+
if (state.state === "usable") return "Operates the workspace deployed to the Xano Engine on this machine.";
|
|
336
|
+
const deploy = `Deploy with \`npm run xano:deploy\` (or \`${cli} deploy --local\`) and the tools appear here.`;
|
|
337
|
+
const named = state.name === void 0 ? "This project's Xano Engine" : `Xano Engine "${state.name}"`;
|
|
338
|
+
switch (state.state) {
|
|
339
|
+
case "none-cached":
|
|
340
|
+
case "not-recorded":
|
|
341
|
+
return `No Xano Engine is running for this project. ${deploy}`;
|
|
342
|
+
case "not-running":
|
|
343
|
+
return `${named} is not running.` + (state.suggestion === void 0 ? "" : ` Did you mean "${state.suggestion}"? It is running.`) + ` ${deploy}`;
|
|
344
|
+
case "no-mcp":
|
|
345
|
+
return `${named} serves no MCP server. Run \`${cli} local update\`, then deploy again, and the tools appear here.`;
|
|
346
|
+
case "not-loopback":
|
|
347
|
+
return `${named} listens beyond this machine, so its bearer is not sent to it. Stop it with \`${cli} local stop${state.name === void 0 ? "" : ` ${state.name}`}\`, then deploy again.`;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
function describeCall(msg) {
|
|
351
|
+
const params = isRecord(msg.params) ? msg.params : {};
|
|
352
|
+
return typeof params.name === "string" ? `the call to ${params.name}` : "the tool call";
|
|
353
|
+
}
|
|
354
|
+
function errorFrame(id, code, message) {
|
|
355
|
+
return { jsonrpc: "2.0", id, error: { code, message } };
|
|
356
|
+
}
|
|
357
|
+
function idOf(msg) {
|
|
358
|
+
const id = msg.id;
|
|
359
|
+
return typeof id === "string" || typeof id === "number" ? id : null;
|
|
360
|
+
}
|
|
361
|
+
function parseJson(text) {
|
|
362
|
+
try {
|
|
363
|
+
return JSON.parse(text);
|
|
364
|
+
} catch {
|
|
365
|
+
return void 0;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
var defaultPost = (url, headers, body) => new Promise((resolve, reject) => {
|
|
369
|
+
const target = new URL(url);
|
|
370
|
+
const send = target.protocol === "https:" ? httpsRequest : httpRequest;
|
|
371
|
+
let connected = false;
|
|
372
|
+
const req = send(target, {
|
|
373
|
+
method: "POST",
|
|
374
|
+
// A fresh connection per request: a pooled socket the engine already
|
|
375
|
+
// closed would fail after "connecting" and read as an unknown outcome
|
|
376
|
+
// for a request that never left. On loopback the handshake is free.
|
|
377
|
+
agent: false,
|
|
378
|
+
headers: { ...headers, "content-length": Buffer.byteLength(body) }
|
|
379
|
+
});
|
|
380
|
+
const connectTimer = setTimeout(() => {
|
|
381
|
+
req.destroy(new PostFailure("refused", `could not connect within ${CONNECT_TIMEOUT_MS / 1e3}s`));
|
|
382
|
+
}, CONNECT_TIMEOUT_MS);
|
|
383
|
+
req.on("socket", (socket) => {
|
|
384
|
+
const onConnect = () => {
|
|
385
|
+
connected = true;
|
|
386
|
+
clearTimeout(connectTimer);
|
|
387
|
+
};
|
|
388
|
+
if (!socket.connecting) onConnect();
|
|
389
|
+
else socket.once("connect", onConnect);
|
|
390
|
+
});
|
|
391
|
+
req.on("error", (err) => {
|
|
392
|
+
clearTimeout(connectTimer);
|
|
393
|
+
if (err instanceof PostFailure) return reject(err);
|
|
394
|
+
const refused = !connected || err.code === "ECONNREFUSED";
|
|
395
|
+
reject(new PostFailure(refused ? "refused" : "unknown", err.message));
|
|
396
|
+
});
|
|
397
|
+
req.on("response", (res) => {
|
|
398
|
+
clearTimeout(connectTimer);
|
|
399
|
+
const chunks = [];
|
|
400
|
+
res.on("data", (c) => chunks.push(c));
|
|
401
|
+
res.on("error", (err) => reject(new PostFailure("unknown", err.message)));
|
|
402
|
+
res.on("aborted", () => reject(new PostFailure("unknown", "the answer was cut off")));
|
|
403
|
+
res.on(
|
|
404
|
+
"end",
|
|
405
|
+
() => resolve({
|
|
406
|
+
status: res.statusCode ?? 0,
|
|
407
|
+
contentType: String(res.headers["content-type"] ?? ""),
|
|
408
|
+
body: Buffer.concat(chunks).toString("utf8")
|
|
409
|
+
})
|
|
410
|
+
);
|
|
411
|
+
});
|
|
412
|
+
req.end(body);
|
|
413
|
+
});
|
|
414
|
+
export {
|
|
415
|
+
CONNECT_TIMEOUT_MS,
|
|
416
|
+
POLL_INTERVAL_MS,
|
|
417
|
+
PostFailure,
|
|
418
|
+
defaultPost,
|
|
419
|
+
isBearerRefusal,
|
|
420
|
+
noEngineText,
|
|
421
|
+
runMcpBridge
|
|
422
|
+
};
|
|
423
|
+
//# sourceMappingURL=local-engine-mcp-bridge-QKZHUGW3.js.map
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveLiveEngine
|
|
3
|
+
} from "./chunk-YCUDOF6Q.js";
|
|
4
|
+
import "./chunk-O56DQKPL.js";
|
|
5
|
+
import "./chunk-QRQ54LUI.js";
|
|
6
|
+
import "./chunk-NV37YGOV.js";
|
|
7
|
+
import "./chunk-7M6JP3FS.js";
|
|
8
|
+
import "./chunk-2SD4LA22.js";
|
|
9
|
+
import "./chunk-3DRXWLJ5.js";
|
|
10
|
+
import "./chunk-X4DVXBFY.js";
|
|
11
|
+
import "./chunk-HZ6ADG3O.js";
|
|
12
|
+
import "./chunk-FENA7K7C.js";
|
|
13
|
+
import "./chunk-64WWE3EF.js";
|
|
14
|
+
import "./chunk-RBU2YX22.js";
|
|
15
|
+
import "./chunk-2TFRR6JV.js";
|
|
16
|
+
import "./chunk-S46ODQRA.js";
|
|
17
|
+
import "./chunk-TWVUYS63.js";
|
|
18
|
+
import "./chunk-26LHXLD3.js";
|
|
19
|
+
import "./chunk-MBL7CXJ7.js";
|
|
20
|
+
import "./chunk-VNDR2T35.js";
|
|
21
|
+
import "./chunk-EPFDY5JU.js";
|
|
22
|
+
import "./chunk-A4R5CAY4.js";
|
|
23
|
+
import "./chunk-LCOCRJ4K.js";
|
|
24
|
+
import "./chunk-WNCW2RNB.js";
|
|
25
|
+
import "./chunk-QGIZLFAS.js";
|
|
26
|
+
import "./chunk-2MNLRIOX.js";
|
|
27
|
+
import "./chunk-AKERAUNH.js";
|
|
28
|
+
import "./chunk-ORGNLQN6.js";
|
|
29
|
+
import "./chunk-ZYJP6BOO.js";
|
|
30
|
+
import "./chunk-QO6BVGS5.js";
|
|
31
|
+
import "./chunk-PEX4QZVI.js";
|
|
32
|
+
import "./chunk-MYZRMSPM.js";
|
|
33
|
+
import "./chunk-UYFUIHH3.js";
|
|
34
|
+
import "./chunk-622HUCZT.js";
|
|
35
|
+
import "./chunk-3FRGNBOC.js";
|
|
36
|
+
import "./chunk-NDJAKSE7.js";
|
|
37
|
+
import "./chunk-EUUUMY7J.js";
|
|
38
|
+
import "./chunk-5SCPRXFB.js";
|
|
39
|
+
import "./chunk-DIWF7L33.js";
|
|
40
|
+
import "./chunk-D5OZRJ3T.js";
|
|
41
|
+
import "./chunk-EF4MHLEW.js";
|
|
42
|
+
import "./chunk-ZFDZKNGG.js";
|
|
43
|
+
import "./chunk-FWD7AL6N.js";
|
|
44
|
+
import "./chunk-47XT6WQL.js";
|
|
45
|
+
import "./chunk-DXUICABI.js";
|
|
46
|
+
import "./chunk-L6HZ67P6.js";
|
|
47
|
+
import "./chunk-4KHEMC32.js";
|
|
48
|
+
import "./chunk-MFWF2NZJ.js";
|
|
49
|
+
import {
|
|
50
|
+
detectPackageManager
|
|
51
|
+
} from "./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 "./chunk-X2NL4KUO.js";
|
|
59
|
+
import "./chunk-4GPIOIAC.js";
|
|
60
|
+
import "./chunk-5GIOCDUM.js";
|
|
61
|
+
import "./chunk-LJM5CIY4.js";
|
|
62
|
+
import {
|
|
63
|
+
MCP_CONFIGS,
|
|
64
|
+
MCP_SERVER_NAME,
|
|
65
|
+
info,
|
|
66
|
+
isMachineOutput,
|
|
67
|
+
mcpServerCommand,
|
|
68
|
+
printHuman,
|
|
69
|
+
projectFileCli,
|
|
70
|
+
writeJson
|
|
71
|
+
} from "./chunk-CH23ONYG.js";
|
|
72
|
+
import "./chunk-7FIMUFBP.js";
|
|
73
|
+
import "./chunk-H2V3N23D.js";
|
|
74
|
+
import "./chunk-3JDU4VRL.js";
|
|
75
|
+
import "./chunk-YHB34BN6.js";
|
|
76
|
+
import "./chunk-UTI5G6OJ.js";
|
|
77
|
+
import "./chunk-5KJBWIDZ.js";
|
|
78
|
+
import "./chunk-5ZSO4T2G.js";
|
|
79
|
+
import "./chunk-VQPDATQT.js";
|
|
80
|
+
import "./chunk-TFFGOFVZ.js";
|
|
81
|
+
import "./chunk-LL6ED5IB.js";
|
|
82
|
+
import "./chunk-4BW2SG2N.js";
|
|
83
|
+
import "./chunk-4MIV244X.js";
|
|
84
|
+
import "./chunk-OHX6MIUZ.js";
|
|
85
|
+
import "./chunk-36JUQZVQ.js";
|
|
86
|
+
import "./chunk-PZ5AY32C.js";
|
|
87
|
+
|
|
88
|
+
// src/emit/local-engine-mcp-command.ts
|
|
89
|
+
import { resolve } from "path";
|
|
90
|
+
async function runMcp(args, opts) {
|
|
91
|
+
if (args.stdio) return runMcpStdio(args, opts);
|
|
92
|
+
if (args.project !== void 0) process.chdir(resolve(args.project));
|
|
93
|
+
const engine = await resolveLiveEngine(args.positionals[0], opts, "connect an agent to");
|
|
94
|
+
const dir = process.cwd();
|
|
95
|
+
const manager = detectPackageManager(dir, opts.env ?? process.env);
|
|
96
|
+
const server = mcpServerCommand(dir, manager);
|
|
97
|
+
if (engine.mcpUrl === void 0) {
|
|
98
|
+
info(`Xano Engine ${engine.name} serves no MCP server for coding agents; \`xanosdk local update\` moves the project to one that does.`);
|
|
99
|
+
}
|
|
100
|
+
if (isMachineOutput(args)) {
|
|
101
|
+
writeJson({
|
|
102
|
+
name: engine.name,
|
|
103
|
+
url: engine.url,
|
|
104
|
+
mcpUrl: engine.mcpUrl ?? null,
|
|
105
|
+
workspaceId: engine.workspaceId,
|
|
106
|
+
command: [server.command, ...server.args]
|
|
107
|
+
});
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (engine.mcpUrl === void 0) return;
|
|
111
|
+
const labels = MCP_CONFIGS.map((c) => `${c.path} (${c.agent})`);
|
|
112
|
+
const width = Math.max(...labels.map((l) => l.length));
|
|
113
|
+
const configs = MCP_CONFIGS.map((c, i) => {
|
|
114
|
+
const block = mcpServerCommand(dir, manager, c.workspaceFolder === void 0 ? {} : { workspaceFolder: c.workspaceFolder });
|
|
115
|
+
return ` ${labels[i].padEnd(width)} ${JSON.stringify({ mcpServers: { [MCP_SERVER_NAME]: block } })}`;
|
|
116
|
+
});
|
|
117
|
+
printHuman(
|
|
118
|
+
[
|
|
119
|
+
`Xano Engine ${engine.name}`,
|
|
120
|
+
` URL ${engine.url}`,
|
|
121
|
+
` MCP ${engine.mcpUrl}`,
|
|
122
|
+
` Bearer \`xanosdk local token\` (the bridge fetches it itself; never put it in a config)`,
|
|
123
|
+
` Command ${[server.command, ...server.args].join(" ")}`,
|
|
124
|
+
``,
|
|
125
|
+
`Connect a coding agent with this server (\`xanosdk init\` writes each):`,
|
|
126
|
+
...configs,
|
|
127
|
+
``,
|
|
128
|
+
`Use it to look at the backend, seed and edit rows, and run functions, tasks, triggers, endpoints and tests.`,
|
|
129
|
+
`Tables, functions, endpoints and every other primitive change in xano/ and ship with \`xanosdk deploy\`.`
|
|
130
|
+
].join("\n") + "\n"
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
async function runMcpStdio(args, opts) {
|
|
134
|
+
const log = (line) => void process.stderr.write(line + "\n");
|
|
135
|
+
for (const [signal, code] of [["SIGINT", 130], ["SIGTERM", 143], ["SIGHUP", 129]]) {
|
|
136
|
+
process.removeAllListeners(signal);
|
|
137
|
+
process.on(signal, () => {
|
|
138
|
+
log(`xano-local MCP bridge: stopped by ${signal}.`);
|
|
139
|
+
process.exit(code);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
try {
|
|
143
|
+
if (args.project !== void 0) process.chdir(resolve(args.project));
|
|
144
|
+
const env = opts.env ?? process.env;
|
|
145
|
+
const cwd = process.cwd();
|
|
146
|
+
const name = args.positionals[0];
|
|
147
|
+
const [{ createInterface }, { runMcpBridge }, { lookupEngine }, { registerSecret, writeData }, { projectKey, readLocalEngineState }] = await Promise.all([
|
|
148
|
+
import("readline"),
|
|
149
|
+
import("./local-engine-mcp-bridge-QKZHUGW3.js"),
|
|
150
|
+
import("./local-engine-lookup-GM3E3NPP.js"),
|
|
151
|
+
import("./secrets-IV4N5HYI.js"),
|
|
152
|
+
import("./local-engine-state-JQPKGB65.js")
|
|
153
|
+
]);
|
|
154
|
+
await runMcpBridge({
|
|
155
|
+
lines: createInterface({ input: process.stdin, crlfDelay: Infinity }),
|
|
156
|
+
// Unredacted on purpose: a frame is data the agent asked for (a row may
|
|
157
|
+
// well hold a token-shaped value), and rewriting it would corrupt it.
|
|
158
|
+
write: (frame) => void writeData(process.stdout, frame + "\n"),
|
|
159
|
+
log,
|
|
160
|
+
lookup: () => lookupEngine({ cwd, ...name === void 0 ? {} : { name }, env }),
|
|
161
|
+
// This project's row, or the rows naming the engine asked for: a deploy
|
|
162
|
+
// in another project rewrites the same file and must not cost a lookup.
|
|
163
|
+
recordSignal: () => {
|
|
164
|
+
const { engines } = readLocalEngineState(env);
|
|
165
|
+
return JSON.stringify(
|
|
166
|
+
name === void 0 ? engines[projectKey(cwd)] : Object.values(engines).filter((r) => r.name === name)
|
|
167
|
+
);
|
|
168
|
+
},
|
|
169
|
+
registerSecret,
|
|
170
|
+
// Spelled as the project's own files spell it: the reader is an agent
|
|
171
|
+
// working in the project, whatever launched this process.
|
|
172
|
+
cli: projectFileCli(cwd, detectPackageManager(cwd, env))
|
|
173
|
+
});
|
|
174
|
+
} catch (err) {
|
|
175
|
+
log(`xano-local MCP bridge stopped: ${err.message}`);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
export {
|
|
179
|
+
runMcp
|
|
180
|
+
};
|
|
181
|
+
//# sourceMappingURL=local-engine-mcp-command-BFQVLXZC.js.map
|
|
@@ -13,27 +13,29 @@ import {
|
|
|
13
13
|
engineVersionToken,
|
|
14
14
|
findOrphanedEngineProcesses,
|
|
15
15
|
listEngines,
|
|
16
|
+
listEnginesAsync,
|
|
16
17
|
mintEngineLoginLink,
|
|
17
18
|
resolveRecordedEngine,
|
|
18
19
|
startEngine,
|
|
19
20
|
stopAllEngines,
|
|
20
21
|
stopEngineNamed,
|
|
21
22
|
stopOrphanedEngineProcesses
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
23
|
+
} from "./chunk-HZ6ADG3O.js";
|
|
24
|
+
import "./chunk-FENA7K7C.js";
|
|
24
25
|
import "./chunk-64WWE3EF.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-RBU2YX22.js";
|
|
27
|
+
import "./chunk-EPFDY5JU.js";
|
|
28
|
+
import "./chunk-A4R5CAY4.js";
|
|
29
|
+
import "./chunk-LCOCRJ4K.js";
|
|
28
30
|
import "./chunk-ZYJP6BOO.js";
|
|
29
31
|
import "./chunk-QO6BVGS5.js";
|
|
30
32
|
import "./chunk-DXUICABI.js";
|
|
31
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-L6HZ67P6.js";
|
|
32
34
|
import "./chunk-LLNZGEFK.js";
|
|
33
35
|
import "./chunk-MF4W6FHU.js";
|
|
34
36
|
import "./chunk-X2NL4KUO.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-CH23ONYG.js";
|
|
38
|
+
import "./chunk-YHB34BN6.js";
|
|
37
39
|
import "./chunk-UTI5G6OJ.js";
|
|
38
40
|
import "./chunk-5ZSO4T2G.js";
|
|
39
41
|
import "./chunk-TFFGOFVZ.js";
|
|
@@ -54,6 +56,7 @@ export {
|
|
|
54
56
|
engineVersionToken,
|
|
55
57
|
findOrphanedEngineProcesses,
|
|
56
58
|
listEngines,
|
|
59
|
+
listEnginesAsync,
|
|
57
60
|
mintEngineLoginLink,
|
|
58
61
|
resolveRecordedEngine,
|
|
59
62
|
startEngine,
|
|
@@ -61,4 +64,4 @@ export {
|
|
|
61
64
|
stopEngineNamed,
|
|
62
65
|
stopOrphanedEngineProcesses
|
|
63
66
|
};
|
|
64
|
-
//# sourceMappingURL=local-engine-process-
|
|
67
|
+
//# sourceMappingURL=local-engine-process-XUQPQENQ.js.map
|
|
@@ -11,8 +11,9 @@ import {
|
|
|
11
11
|
projectKey,
|
|
12
12
|
readLocalEngineState,
|
|
13
13
|
setEngineRecord
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-EPFDY5JU.js";
|
|
15
|
+
import "./chunk-A4R5CAY4.js";
|
|
16
|
+
import "./chunk-LCOCRJ4K.js";
|
|
16
17
|
import "./chunk-ZYJP6BOO.js";
|
|
17
18
|
import "./chunk-QO6BVGS5.js";
|
|
18
19
|
import "./chunk-LLNZGEFK.js";
|
|
@@ -32,4 +33,4 @@ export {
|
|
|
32
33
|
readLocalEngineState,
|
|
33
34
|
setEngineRecord
|
|
34
35
|
};
|
|
35
|
-
//# sourceMappingURL=local-engine-state-
|
|
36
|
+
//# sourceMappingURL=local-engine-state-JQPKGB65.js.map
|