tenjin-cli 0.1.0-alpha.34 → 0.1.0-alpha.35
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/NOTICE.md +30 -0
- package/README.md +20 -18
- package/dist/{_esm-MMYV66AX.js → _esm-2KST7HQ7.js} +4 -4
- package/dist/{alive-VOIL5W3I.js → alive-5TV22PNF.js} +13 -13
- package/dist/{auth-UHD3QFX4.js → auth-XI7BJFLW.js} +4 -4
- package/dist/balance-DFHC6XEU.js +71 -0
- package/dist/{ccip-CS7K5QRQ.js → ccip-HOW3DZYF.js} +3 -3
- package/dist/{chunk-RJ5HRPAZ.js → chunk-24XKUN2S.js} +68 -10
- package/dist/chunk-24XKUN2S.js.map +1 -0
- package/dist/chunk-2L7TDGLV.js +56 -0
- package/dist/chunk-2L7TDGLV.js.map +1 -0
- package/dist/{chunk-PZHBPGDE.js → chunk-34SAECKZ.js} +34 -10
- package/dist/chunk-34SAECKZ.js.map +1 -0
- package/dist/{chunk-EQZ2CCWC.js → chunk-3Y2EHT4F.js} +5 -2
- package/dist/chunk-3Y2EHT4F.js.map +1 -0
- package/dist/{chunk-FSYH7J75.js → chunk-3Y6BHIN6.js} +3 -3
- package/dist/{chunk-FZZWTDWP.js → chunk-3YPL6T3P.js} +6 -6
- package/dist/{chunk-JEZMWJEF.js → chunk-44MVIRZH.js} +4 -4
- package/dist/{chunk-27FIHFXF.js → chunk-45MMSBHA.js} +5 -5
- package/dist/{chunk-QXP3Z3JN.js → chunk-4MBCJFY4.js} +35 -3
- package/dist/chunk-4MBCJFY4.js.map +1 -0
- package/dist/chunk-4TPL54KW.js +227 -0
- package/dist/chunk-4TPL54KW.js.map +1 -0
- package/dist/{chunk-7JB6SYJX.js → chunk-54ELBTKE.js} +2 -2
- package/dist/{chunk-6J64MQFD.js → chunk-5F4OB5B3.js} +21 -15
- package/dist/chunk-5F4OB5B3.js.map +1 -0
- package/dist/{chunk-PYVQ74D5.js → chunk-5HN4KVQU.js} +189 -117
- package/dist/chunk-5HN4KVQU.js.map +1 -0
- package/dist/{chunk-VFKPIIV2.js → chunk-5J4E5GYI.js} +35 -32
- package/dist/chunk-5J4E5GYI.js.map +1 -0
- package/dist/chunk-5USBZ2MU.js +58 -0
- package/dist/chunk-5USBZ2MU.js.map +1 -0
- package/dist/chunk-64WOMNYR.js +183 -0
- package/dist/chunk-64WOMNYR.js.map +1 -0
- package/dist/{chunk-APWELUI7.js → chunk-65RS4LQS.js} +57 -43
- package/dist/chunk-65RS4LQS.js.map +1 -0
- package/dist/{chunk-HWZO6HYZ.js → chunk-6QMDUDF2.js} +3 -3
- package/dist/{chunk-FNBGRKS6.js → chunk-7V25UAQO.js} +2 -2
- package/dist/chunk-BGA4DO5M.js +719 -0
- package/dist/chunk-BGA4DO5M.js.map +1 -0
- package/dist/chunk-BVP7YK2J.js +706 -0
- package/dist/chunk-BVP7YK2J.js.map +1 -0
- package/dist/chunk-C265QIMJ.js +83 -0
- package/dist/chunk-C265QIMJ.js.map +1 -0
- package/dist/{chunk-MXN2ZEUB.js → chunk-D6M3ZK66.js} +2 -2
- package/dist/chunk-D6M3ZK66.js.map +1 -0
- package/dist/chunk-DJ36BM62.js +78 -0
- package/dist/chunk-DJ36BM62.js.map +1 -0
- package/dist/{chunk-JOKPBYXP.js → chunk-DTEWAVNE.js} +2 -2
- package/dist/chunk-F2KJAJ7T.js +13 -0
- package/dist/chunk-F2KJAJ7T.js.map +1 -0
- package/dist/{chunk-KAILF7QA.js → chunk-F43CV6UC.js} +2 -2
- package/dist/{chunk-ACO7ZCR2.js → chunk-FKVJKLPI.js} +2 -2
- package/dist/{chunk-43HLS2HM.js → chunk-FYFHH7V5.js} +54 -3
- package/dist/{chunk-43HLS2HM.js.map → chunk-FYFHH7V5.js.map} +1 -1
- package/dist/{chunk-2F5JUAHZ.js → chunk-GAJC4BQZ.js} +3 -3
- package/dist/{chunk-L7N73ZAW.js → chunk-HAZAN4UM.js} +2 -2
- package/dist/{chunk-6QJZA6EX.js → chunk-HI5XQOX2.js} +2 -2
- package/dist/{chunk-BOENA6XR.js → chunk-HKGUKAQW.js} +6 -6
- package/dist/{chunk-LJSCGIYH.js → chunk-HPRVFJPM.js} +2 -2
- package/dist/{chunk-OO6FIBL7.js → chunk-HZKANST2.js} +3 -6
- package/dist/chunk-HZKANST2.js.map +1 -0
- package/dist/{chunk-UVDJ5SSQ.js → chunk-I557SAOM.js} +8 -2
- package/dist/chunk-I557SAOM.js.map +1 -0
- package/dist/{chunk-SDUOJRSV.js → chunk-IGLWLH73.js} +3 -3
- package/dist/{chunk-3AKH7ODX.js → chunk-INSIW65E.js} +5 -5
- package/dist/{chunk-PNHNXUSL.js → chunk-IULCDMVG.js} +12 -1
- package/dist/chunk-IULCDMVG.js.map +1 -0
- package/dist/{chunk-JF4T4HCQ.js → chunk-IVNSUAVC.js} +10 -5
- package/dist/chunk-IVNSUAVC.js.map +1 -0
- package/dist/chunk-JDQZCREI.js +87 -0
- package/dist/chunk-JDQZCREI.js.map +1 -0
- package/dist/{chunk-2P3NJTHE.js → chunk-JHFFUVON.js} +23 -23
- package/dist/{chunk-7JVARP5R.js → chunk-JTILUN4W.js} +55 -29
- package/dist/{chunk-7JVARP5R.js.map → chunk-JTILUN4W.js.map} +1 -1
- package/dist/{chunk-2TO5F6CT.js → chunk-K5KNGC4I.js} +8 -8
- package/dist/{chunk-HUWTFKEM.js → chunk-KAQ4Q3TO.js} +3 -3
- package/dist/{chunk-E6VP6MQM.js → chunk-KGUE5AVX.js} +4 -4
- package/dist/chunk-KGUE5AVX.js.map +1 -0
- package/dist/{chunk-GS5RZF7U.js → chunk-KLDMLWXT.js} +2 -2
- package/dist/{chunk-HN2EN6P4.js → chunk-KNKDMTHU.js} +5 -5
- package/dist/chunk-LDA6TAYQ.js +95 -0
- package/dist/chunk-LDA6TAYQ.js.map +1 -0
- package/dist/chunk-LWSSIZOY.js +347 -0
- package/dist/chunk-LWSSIZOY.js.map +1 -0
- package/dist/{chunk-5VWQSCDO.js → chunk-MAHNZA6C.js} +89 -9
- package/dist/chunk-MAHNZA6C.js.map +1 -0
- package/dist/{chunk-46HAB26L.js → chunk-MEWZCIA6.js} +56 -9
- package/dist/chunk-MEWZCIA6.js.map +1 -0
- package/dist/{chunk-R2KMLONN.js → chunk-MJDO4EXD.js} +4 -4
- package/dist/{chunk-IHVUE3XF.js → chunk-NJA6NT3A.js} +3 -3
- package/dist/{chunk-TSIID2LV.js → chunk-ODRPASFP.js} +375 -1166
- package/dist/chunk-ODRPASFP.js.map +1 -0
- package/dist/{chunk-S3JKF3IK.js → chunk-OJJFANO6.js} +3 -3
- package/dist/{chunk-56SOPRM2.js → chunk-OQWPRFAC.js} +344 -4
- package/dist/chunk-OQWPRFAC.js.map +1 -0
- package/dist/{chunk-QEZZDIQT.js → chunk-P6YQWIT2.js} +4053 -4039
- package/dist/chunk-P6YQWIT2.js.map +1 -0
- package/dist/{chunk-GGGEGMWC.js → chunk-Q6RSJCXB.js} +9 -9
- package/dist/{chunk-OTIUEUIS.js → chunk-QKEUKBRK.js} +7 -7
- package/dist/{chunk-X52BVGCJ.js → chunk-QQDPRTLP.js} +5 -5
- package/dist/chunk-QQYCYAKI.js +79 -0
- package/dist/chunk-QQYCYAKI.js.map +1 -0
- package/dist/chunk-R4KDH477.js +1064 -0
- package/dist/chunk-R4KDH477.js.map +1 -0
- package/dist/{chunk-6AQSUBNR.js → chunk-RGCPELQN.js} +2 -2
- package/dist/{chunk-AXODGQ23.js → chunk-RGVCOG2S.js} +9 -2
- package/dist/{chunk-AXODGQ23.js.map → chunk-RGVCOG2S.js.map} +1 -1
- package/dist/chunk-SOLNJ3AZ.js +209 -0
- package/dist/chunk-SOLNJ3AZ.js.map +1 -0
- package/dist/{chunk-LQ33RLHL.js → chunk-TFT2X7SH.js} +3 -3
- package/dist/chunk-TVWCLUBI.js +293 -0
- package/dist/chunk-TVWCLUBI.js.map +1 -0
- package/dist/{chunk-VH7JMLTG.js → chunk-UIB33QQP.js} +25 -16
- package/dist/chunk-UIB33QQP.js.map +1 -0
- package/dist/chunk-V6GIVALQ.js +1889 -0
- package/dist/chunk-V6GIVALQ.js.map +1 -0
- package/dist/{chunk-IVHGQNIN.js → chunk-VHXCPXUS.js} +8 -8
- package/dist/{chunk-7DW7GAM6.js → chunk-VU6GMWF6.js} +2 -2
- package/dist/chunk-VWZYE3NC.js +8415 -0
- package/dist/chunk-VWZYE3NC.js.map +1 -0
- package/dist/{chunk-3X4GOMXT.js → chunk-W2GXIARJ.js} +12 -7
- package/dist/chunk-W2GXIARJ.js.map +1 -0
- package/dist/chunk-W4G3K3V7.js +288 -0
- package/dist/chunk-W4G3K3V7.js.map +1 -0
- package/dist/{chunk-FHXTEVO7.js → chunk-W74LJ5OT.js} +21 -28
- package/dist/chunk-W74LJ5OT.js.map +1 -0
- package/dist/{chunk-FOEPH67T.js → chunk-W7ELYLYK.js} +1 -74
- package/dist/chunk-W7ELYLYK.js.map +1 -0
- package/dist/{chunk-YU3DLVSQ.js → chunk-XSCGUO2U.js} +5 -5
- package/dist/{chunk-EPCIJLLU.js → chunk-XWROSMI5.js} +9 -9
- package/dist/{chunk-HMT6L65V.js → chunk-YJGEVBKZ.js} +4 -4
- package/dist/{chunk-7U3P4PB7.js → chunk-ZEYA2WWX.js} +4 -4
- package/dist/chunk-ZEYA2WWX.js.map +1 -0
- package/dist/chunk-ZRC7Z5X3.js +82 -0
- package/dist/chunk-ZRC7Z5X3.js.map +1 -0
- package/dist/{chunk-I47ARU5G.js → chunk-ZS7JIUJ3.js} +2 -2
- package/dist/{claude-cli-2YKABJJZ.js → claude-cli-GIIHOBGT.js} +4 -2
- package/dist/claude-install-BAUSJMW3.js +64 -0
- package/dist/{cli-BFDKEX53.js → cli-QY4KKA3D.js} +116 -49
- package/dist/cli-QY4KKA3D.js.map +1 -0
- package/dist/{client-XMWEKXX7.js → client-3YQKORVK.js} +4 -4
- package/dist/{codex-host-B6NAUWL6.js → codex-host-ZON3S6HU.js} +5 -5
- package/dist/{codex-install-GTGO5FYN.js → codex-install-HZV2DOAB.js} +62 -47
- package/dist/codex-install-HZV2DOAB.js.map +1 -0
- package/dist/{config-THJANIU5.js → config-QZOBMTEL.js} +18 -18
- package/dist/{config-names-JU54HYWY.js → config-names-Z5NZD5R2.js} +18 -18
- package/dist/{config-rules-VNU23RL4.js → config-rules-YOYHS6YL.js} +19 -19
- package/dist/config-subagents-WQV2ZAD5.js +362 -0
- package/dist/config-subagents-WQV2ZAD5.js.map +1 -0
- package/dist/{connect-HPWS7U63.js → connect-YDWTYU4B.js} +28 -27
- package/dist/{connect-HPWS7U63.js.map → connect-YDWTYU4B.js.map} +1 -1
- package/dist/core-0a66n3e7-TTP554XV.js +127 -0
- package/dist/core-0a66n3e7-TTP554XV.js.map +1 -0
- package/dist/core-0bmnpbz2-C2JIRVZO.js +10790 -0
- package/dist/core-0bmnpbz2-C2JIRVZO.js.map +1 -0
- package/dist/core-9je8ee1j-74DGHWPV.js +30 -0
- package/dist/core-9je8ee1j-74DGHWPV.js.map +1 -0
- package/dist/core-wadgcjfh-TSZFQZGH.js +666 -0
- package/dist/core-wadgcjfh-TSZFQZGH.js.map +1 -0
- package/dist/core-zg882d22-LKV5DZYW.js +37 -0
- package/dist/core-zg882d22-LKV5DZYW.js.map +1 -0
- package/dist/{decision-JIIHDTOF.js → decision-QSKHOGCO.js} +6 -6
- package/dist/{doctor-4MMHBRDU.js → doctor-ZWJXRD75.js} +67 -66
- package/dist/doctor-ZWJXRD75.js.map +1 -0
- package/dist/{explicit-AGENAX6E.js → explicit-ME2NRADQ.js} +45 -42
- package/dist/{explicit-AGENAX6E.js.map → explicit-ME2NRADQ.js.map} +1 -1
- package/dist/flush-stdio-NYIJ3QXT.js +18 -0
- package/dist/{fund-MLXUH24Q.js → fund-VF7TLDJH.js} +110 -34
- package/dist/fund-VF7TLDJH.js.map +1 -0
- package/dist/{hook-command-UB7FOEUL.js → hook-command-VZ27MGWO.js} +21 -20
- package/dist/hosts/claude/.claude-plugin/marketplace.json +2 -2
- package/dist/hosts/claude/tenjin/.claude-plugin/plugin.json +2 -2
- package/dist/hosts/claude/tenjin/hooks/hook-data.ts +152 -0
- package/dist/hosts/claude/tenjin/hooks/hooks.json +7 -0
- package/dist/hosts/claude/tenjin/hooks/model-viewer.tsx +2987 -0
- package/dist/hosts/claude/tenjin/hooks/register.tsx +265 -30
- package/dist/hosts/claude/tenjin/skills/tenjin-pay/SKILL.md +14 -4
- package/dist/hosts/claude/tenjin/types/index.d.ts +133 -0
- package/dist/{hosts-WNQKYKP2.js → hosts-3EMTVM4H.js} +5 -3
- package/dist/index.js +16 -13
- package/dist/index.js.map +1 -1
- package/dist/{install-Q5SHHEDH.js → install-ZA7L2UF3.js} +34 -30
- package/dist/{install-funding-EGSW2KEP.js → install-funding-JDGYTF72.js} +9 -13
- package/dist/{install-identity-OID43B4D.js → install-identity-FFAYEFLX.js} +8 -8
- package/dist/{install-wallet-TZFWY5GK.js → install-wallet-2SFOVE3Q.js} +48 -33
- package/dist/{install-wallet-TZFWY5GK.js.map → install-wallet-2SFOVE3Q.js.map} +1 -1
- package/dist/mcp-36S6MK3C.js +67642 -0
- package/dist/mcp-36S6MK3C.js.map +1 -0
- package/dist/new-install-5L4GY3LN.js +51 -0
- package/dist/{package-NRHU7HBR.js → package-BONDXSV3.js} +2 -2
- package/dist/{passphrase-3JEVW5XG.js → passphrase-T4ULBN4M.js} +4 -4
- package/dist/{pay-I47AIUQR.js → pay-CMV5KL74.js} +37 -30
- package/dist/{payments-A5FNI5GN.js → payments-Z6UBZL4Z.js} +10 -10
- package/dist/reclaim-subagent-credit-ABSF67SJ.js +105 -0
- package/dist/reclaim-subagent-credit-ABSF67SJ.js.map +1 -0
- package/dist/{routing-quote-QQW2I5MH.js → routing-quote-AHLAREXR.js} +16 -18
- package/dist/{run-4SHEOBIU.js → run-JH7ELYAM.js} +41 -38
- package/dist/{runtime-BABJMHY7.js → runtime-2GX4ALJP.js} +12 -12
- package/dist/{runtime-activate-N6VLQI2C.js → runtime-activate-IDQ2NCSP.js} +9 -9
- package/dist/{runtime-launchers-GMAUICRW.js → runtime-launchers-YAPKCBHV.js} +7 -7
- package/dist/{runtime-place-DOEWFTF3.js → runtime-place-4POL4KK4.js} +3 -3
- package/dist/{send-ECXS6JEO.js → send-ELXFKEKY.js} +17 -17
- package/dist/{status-AHE5HSR7.js → status-FXUFWJDM.js} +89 -36
- package/dist/status-FXUFWJDM.js.map +1 -0
- package/dist/{status-line-63XFJAXR.js → status-line-IH5JBWBC.js} +11 -11
- package/dist/{streamableHttp-Z3YF6LTQ.js → streamableHttp-CP2ZQBIK.js} +4 -4
- package/dist/{uninstall-YGQPRCVY.js → uninstall-LJZUKM4D.js} +42 -38
- package/dist/{uninstall-YGQPRCVY.js.map → uninstall-LJZUKM4D.js.map} +1 -1
- package/dist/{update-GTLMLFA3.js → update-EUIX72IX.js} +34 -30
- package/dist/{usage-FCWP2CHO.js → usage-EKDC7LUC.js} +13 -13
- package/dist/{usdc-25RNBYYR.js → usdc-YIHK2OMC.js} +5 -5
- package/dist/{viemAdapter-By13KInL-3CG63XDX.js → viemAdapter-By13KInL-PRLSIESK.js} +2 -2
- package/dist/viemAdapter-By13KInL-PRLSIESK.js.map +1 -0
- package/dist/wallet-HSW757W6.js +80 -0
- package/dist/wallet-HSW757W6.js.map +1 -0
- package/docs/agent-permissions.md +19 -11
- package/docs/router-reference.md +21 -12
- package/docs/safety-model.md +4 -2
- package/docs/subagents-internals.md +97 -0
- package/docs/subagents.md +348 -0
- package/package.json +4 -1
- package/dist/balance-RQW5T5FB.js +0 -55
- package/dist/chunk-3X4GOMXT.js.map +0 -1
- package/dist/chunk-46HAB26L.js.map +0 -1
- package/dist/chunk-56SOPRM2.js.map +0 -1
- package/dist/chunk-5VWQSCDO.js.map +0 -1
- package/dist/chunk-6J64MQFD.js.map +0 -1
- package/dist/chunk-7U3P4PB7.js.map +0 -1
- package/dist/chunk-APWELUI7.js.map +0 -1
- package/dist/chunk-E6VP6MQM.js.map +0 -1
- package/dist/chunk-EQZ2CCWC.js.map +0 -1
- package/dist/chunk-FHXTEVO7.js.map +0 -1
- package/dist/chunk-FOEPH67T.js.map +0 -1
- package/dist/chunk-IVXPIIZJ.js +0 -91
- package/dist/chunk-IVXPIIZJ.js.map +0 -1
- package/dist/chunk-JF4T4HCQ.js.map +0 -1
- package/dist/chunk-LPQNZKSG.js +0 -269
- package/dist/chunk-LPQNZKSG.js.map +0 -1
- package/dist/chunk-MXN2ZEUB.js.map +0 -1
- package/dist/chunk-OO6FIBL7.js.map +0 -1
- package/dist/chunk-PNHNXUSL.js.map +0 -1
- package/dist/chunk-PYVQ74D5.js.map +0 -1
- package/dist/chunk-PZHBPGDE.js.map +0 -1
- package/dist/chunk-QEZZDIQT.js.map +0 -1
- package/dist/chunk-QXP3Z3JN.js.map +0 -1
- package/dist/chunk-RJ5HRPAZ.js.map +0 -1
- package/dist/chunk-TSIID2LV.js.map +0 -1
- package/dist/chunk-UVDJ5SSQ.js.map +0 -1
- package/dist/chunk-VFKPIIV2.js.map +0 -1
- package/dist/chunk-VH7JMLTG.js.map +0 -1
- package/dist/claude-install-7CVYQ73E.js +0 -60
- package/dist/cli-BFDKEX53.js.map +0 -1
- package/dist/codex-install-GTGO5FYN.js.map +0 -1
- package/dist/doctor-4MMHBRDU.js.map +0 -1
- package/dist/fund-MLXUH24Q.js.map +0 -1
- package/dist/mcp-CC3H7LFO.js +0 -3655
- package/dist/mcp-CC3H7LFO.js.map +0 -1
- package/dist/status-AHE5HSR7.js.map +0 -1
- package/dist/wallet-CJGEHP2Q.js +0 -64
- /package/dist/{_esm-MMYV66AX.js.map → _esm-2KST7HQ7.js.map} +0 -0
- /package/dist/{alive-VOIL5W3I.js.map → alive-5TV22PNF.js.map} +0 -0
- /package/dist/{auth-UHD3QFX4.js.map → auth-XI7BJFLW.js.map} +0 -0
- /package/dist/{balance-RQW5T5FB.js.map → balance-DFHC6XEU.js.map} +0 -0
- /package/dist/{ccip-CS7K5QRQ.js.map → ccip-HOW3DZYF.js.map} +0 -0
- /package/dist/{chunk-FSYH7J75.js.map → chunk-3Y6BHIN6.js.map} +0 -0
- /package/dist/{chunk-FZZWTDWP.js.map → chunk-3YPL6T3P.js.map} +0 -0
- /package/dist/{chunk-JEZMWJEF.js.map → chunk-44MVIRZH.js.map} +0 -0
- /package/dist/{chunk-27FIHFXF.js.map → chunk-45MMSBHA.js.map} +0 -0
- /package/dist/{chunk-7JB6SYJX.js.map → chunk-54ELBTKE.js.map} +0 -0
- /package/dist/{chunk-HWZO6HYZ.js.map → chunk-6QMDUDF2.js.map} +0 -0
- /package/dist/{chunk-FNBGRKS6.js.map → chunk-7V25UAQO.js.map} +0 -0
- /package/dist/{chunk-JOKPBYXP.js.map → chunk-DTEWAVNE.js.map} +0 -0
- /package/dist/{chunk-KAILF7QA.js.map → chunk-F43CV6UC.js.map} +0 -0
- /package/dist/{chunk-ACO7ZCR2.js.map → chunk-FKVJKLPI.js.map} +0 -0
- /package/dist/{chunk-2F5JUAHZ.js.map → chunk-GAJC4BQZ.js.map} +0 -0
- /package/dist/{chunk-L7N73ZAW.js.map → chunk-HAZAN4UM.js.map} +0 -0
- /package/dist/{chunk-6QJZA6EX.js.map → chunk-HI5XQOX2.js.map} +0 -0
- /package/dist/{chunk-BOENA6XR.js.map → chunk-HKGUKAQW.js.map} +0 -0
- /package/dist/{chunk-LJSCGIYH.js.map → chunk-HPRVFJPM.js.map} +0 -0
- /package/dist/{chunk-SDUOJRSV.js.map → chunk-IGLWLH73.js.map} +0 -0
- /package/dist/{chunk-3AKH7ODX.js.map → chunk-INSIW65E.js.map} +0 -0
- /package/dist/{chunk-2P3NJTHE.js.map → chunk-JHFFUVON.js.map} +0 -0
- /package/dist/{chunk-2TO5F6CT.js.map → chunk-K5KNGC4I.js.map} +0 -0
- /package/dist/{chunk-HUWTFKEM.js.map → chunk-KAQ4Q3TO.js.map} +0 -0
- /package/dist/{chunk-GS5RZF7U.js.map → chunk-KLDMLWXT.js.map} +0 -0
- /package/dist/{chunk-HN2EN6P4.js.map → chunk-KNKDMTHU.js.map} +0 -0
- /package/dist/{chunk-R2KMLONN.js.map → chunk-MJDO4EXD.js.map} +0 -0
- /package/dist/{chunk-IHVUE3XF.js.map → chunk-NJA6NT3A.js.map} +0 -0
- /package/dist/{chunk-S3JKF3IK.js.map → chunk-OJJFANO6.js.map} +0 -0
- /package/dist/{chunk-GGGEGMWC.js.map → chunk-Q6RSJCXB.js.map} +0 -0
- /package/dist/{chunk-OTIUEUIS.js.map → chunk-QKEUKBRK.js.map} +0 -0
- /package/dist/{chunk-X52BVGCJ.js.map → chunk-QQDPRTLP.js.map} +0 -0
- /package/dist/{chunk-6AQSUBNR.js.map → chunk-RGCPELQN.js.map} +0 -0
- /package/dist/{chunk-LQ33RLHL.js.map → chunk-TFT2X7SH.js.map} +0 -0
- /package/dist/{chunk-IVHGQNIN.js.map → chunk-VHXCPXUS.js.map} +0 -0
- /package/dist/{chunk-7DW7GAM6.js.map → chunk-VU6GMWF6.js.map} +0 -0
- /package/dist/{chunk-YU3DLVSQ.js.map → chunk-XSCGUO2U.js.map} +0 -0
- /package/dist/{chunk-EPCIJLLU.js.map → chunk-XWROSMI5.js.map} +0 -0
- /package/dist/{chunk-HMT6L65V.js.map → chunk-YJGEVBKZ.js.map} +0 -0
- /package/dist/{chunk-I47ARU5G.js.map → chunk-ZS7JIUJ3.js.map} +0 -0
- /package/dist/{claude-cli-2YKABJJZ.js.map → claude-cli-GIIHOBGT.js.map} +0 -0
- /package/dist/{claude-install-7CVYQ73E.js.map → claude-install-BAUSJMW3.js.map} +0 -0
- /package/dist/{client-XMWEKXX7.js.map → client-3YQKORVK.js.map} +0 -0
- /package/dist/{codex-host-B6NAUWL6.js.map → codex-host-ZON3S6HU.js.map} +0 -0
- /package/dist/{config-THJANIU5.js.map → config-QZOBMTEL.js.map} +0 -0
- /package/dist/{config-names-JU54HYWY.js.map → config-names-Z5NZD5R2.js.map} +0 -0
- /package/dist/{config-rules-VNU23RL4.js.map → config-rules-YOYHS6YL.js.map} +0 -0
- /package/dist/{decision-JIIHDTOF.js.map → decision-QSKHOGCO.js.map} +0 -0
- /package/dist/{hook-command-UB7FOEUL.js.map → flush-stdio-NYIJ3QXT.js.map} +0 -0
- /package/dist/{hosts-WNQKYKP2.js.map → hook-command-VZ27MGWO.js.map} +0 -0
- /package/dist/{install-Q5SHHEDH.js.map → hosts-3EMTVM4H.js.map} +0 -0
- /package/dist/{install-funding-EGSW2KEP.js.map → install-ZA7L2UF3.js.map} +0 -0
- /package/dist/{install-identity-OID43B4D.js.map → install-funding-JDGYTF72.js.map} +0 -0
- /package/dist/{package-NRHU7HBR.js.map → install-identity-FFAYEFLX.js.map} +0 -0
- /package/dist/{passphrase-3JEVW5XG.js.map → new-install-5L4GY3LN.js.map} +0 -0
- /package/dist/{pay-I47AIUQR.js.map → package-BONDXSV3.js.map} +0 -0
- /package/dist/{routing-quote-QQW2I5MH.js.map → passphrase-T4ULBN4M.js.map} +0 -0
- /package/dist/{run-4SHEOBIU.js.map → pay-CMV5KL74.js.map} +0 -0
- /package/dist/{payments-A5FNI5GN.js.map → payments-Z6UBZL4Z.js.map} +0 -0
- /package/dist/{runtime-activate-N6VLQI2C.js.map → routing-quote-AHLAREXR.js.map} +0 -0
- /package/dist/{runtime-launchers-GMAUICRW.js.map → run-JH7ELYAM.js.map} +0 -0
- /package/dist/{runtime-BABJMHY7.js.map → runtime-2GX4ALJP.js.map} +0 -0
- /package/dist/{runtime-place-DOEWFTF3.js.map → runtime-activate-IDQ2NCSP.js.map} +0 -0
- /package/dist/{update-GTLMLFA3.js.map → runtime-launchers-YAPKCBHV.js.map} +0 -0
- /package/dist/{usdc-25RNBYYR.js.map → runtime-place-4POL4KK4.js.map} +0 -0
- /package/dist/{send-ECXS6JEO.js.map → send-ELXFKEKY.js.map} +0 -0
- /package/dist/{status-line-63XFJAXR.js.map → status-line-IH5JBWBC.js.map} +0 -0
- /package/dist/{streamableHttp-Z3YF6LTQ.js.map → streamableHttp-CP2ZQBIK.js.map} +0 -0
- /package/dist/{viemAdapter-By13KInL-3CG63XDX.js.map → update-EUIX72IX.js.map} +0 -0
- /package/dist/{usage-FCWP2CHO.js.map → usage-EKDC7LUC.js.map} +0 -0
- /package/dist/{wallet-CJGEHP2Q.js.map → usdc-YIHK2OMC.js.map} +0 -0
|
@@ -1,67 +1,62 @@
|
|
|
1
1
|
import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
appendPaidRecord,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
require_codegen,
|
|
10
|
-
require_compile,
|
|
11
|
-
require_core,
|
|
12
|
-
require_core2,
|
|
13
|
-
require_dependencies,
|
|
14
|
-
require_discriminator,
|
|
15
|
-
require_dist,
|
|
16
|
-
require_format,
|
|
17
|
-
require_metadata,
|
|
18
|
-
require_names,
|
|
19
|
-
require_ref,
|
|
20
|
-
require_ref_error,
|
|
21
|
-
require_util,
|
|
22
|
-
require_validate,
|
|
23
|
-
require_validation,
|
|
24
|
-
require_validation_error
|
|
25
|
-
} from "./chunk-QKYUCITR.js";
|
|
4
|
+
chargedOnChain,
|
|
5
|
+
recordedSent,
|
|
6
|
+
walletPaidHost,
|
|
7
|
+
writeNewFile
|
|
8
|
+
} from "./chunk-MAHNZA6C.js";
|
|
26
9
|
import {
|
|
27
10
|
promptYesNo
|
|
28
11
|
} from "./chunk-NVSKJPRC.js";
|
|
12
|
+
import {
|
|
13
|
+
validateResultBody
|
|
14
|
+
} from "./chunk-R4KDH477.js";
|
|
15
|
+
import {
|
|
16
|
+
paymentShortOfFunds
|
|
17
|
+
} from "./chunk-5USBZ2MU.js";
|
|
18
|
+
import {
|
|
19
|
+
buildExactPayment,
|
|
20
|
+
createPayerClient,
|
|
21
|
+
isCanonicalUsdc,
|
|
22
|
+
noPayableRequirement,
|
|
23
|
+
selectPayableRequirement,
|
|
24
|
+
signsEip3009
|
|
25
|
+
} from "./chunk-JTILUN4W.js";
|
|
29
26
|
import {
|
|
30
27
|
SIGN_IN_WITH_X,
|
|
31
28
|
SIWX_HEADER,
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
answerSignInChallenge,
|
|
30
|
+
buildSiwxHeader,
|
|
31
|
+
signInOnlyChallenge
|
|
32
|
+
} from "./chunk-OQWPRFAC.js";
|
|
34
33
|
import {
|
|
35
34
|
describeWallet,
|
|
36
35
|
resolveSpendAuthorizer,
|
|
37
36
|
resolveWalletProvider
|
|
38
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-K5KNGC4I.js";
|
|
39
38
|
import {
|
|
40
39
|
readSpendSummary,
|
|
41
40
|
spentOf
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import {
|
|
44
|
-
buildExactPayment,
|
|
45
|
-
createPayerClient,
|
|
46
|
-
isCanonicalUsdc,
|
|
47
|
-
noPayableRequirement,
|
|
48
|
-
selectPayableRequirement
|
|
49
|
-
} from "./chunk-7JVARP5R.js";
|
|
41
|
+
} from "./chunk-HPRVFJPM.js";
|
|
50
42
|
import {
|
|
51
43
|
HTTPFacilitatorClient,
|
|
52
44
|
PaymentRequirementsV2Schema,
|
|
53
45
|
decodePaymentRequiredHeader,
|
|
54
46
|
decodePaymentResponseHeader
|
|
55
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-RGVCOG2S.js";
|
|
56
48
|
import {
|
|
57
49
|
getAddress
|
|
58
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-INSIW65E.js";
|
|
51
|
+
import {
|
|
52
|
+
notePaymentSent
|
|
53
|
+
} from "./chunk-C265QIMJ.js";
|
|
59
54
|
import {
|
|
60
55
|
withFileLock
|
|
61
56
|
} from "./chunk-2W4DQQUU.js";
|
|
62
57
|
import {
|
|
63
58
|
sanitizeForTerminal
|
|
64
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-KLDMLWXT.js";
|
|
65
60
|
import {
|
|
66
61
|
evaluatePlan,
|
|
67
62
|
parseUsdToAtomic,
|
|
@@ -72,11 +67,12 @@ import {
|
|
|
72
67
|
} from "./chunk-7SLOTLO7.js";
|
|
73
68
|
import {
|
|
74
69
|
resolveContextSettings
|
|
75
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-DTEWAVNE.js";
|
|
76
71
|
import {
|
|
77
72
|
writeFileAtomic
|
|
78
73
|
} from "./chunk-7WEQQJLG.js";
|
|
79
74
|
import {
|
|
75
|
+
downloadsDir,
|
|
80
76
|
quotesDir
|
|
81
77
|
} from "./chunk-JTX3BUDK.js";
|
|
82
78
|
import {
|
|
@@ -86,844 +82,24 @@ import {
|
|
|
86
82
|
fetchFailureToCliError,
|
|
87
83
|
httpRequest,
|
|
88
84
|
requestHeaderProblem
|
|
89
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-D6M3ZK66.js";
|
|
90
86
|
import {
|
|
91
87
|
isSameDeployment
|
|
92
88
|
} from "./chunk-CRG54LEB.js";
|
|
93
89
|
import {
|
|
94
90
|
external_exports
|
|
95
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-P6YQWIT2.js";
|
|
96
92
|
import {
|
|
97
93
|
CliError
|
|
98
94
|
} from "./chunk-DI4QAGRZ.js";
|
|
99
|
-
import {
|
|
100
|
-
__commonJS,
|
|
101
|
-
__toESM
|
|
102
|
-
} from "./chunk-ZXTAQYNA.js";
|
|
103
|
-
|
|
104
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js
|
|
105
|
-
var require_dynamicAnchor = __commonJS({
|
|
106
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js"(exports) {
|
|
107
|
-
"use strict";
|
|
108
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
109
|
-
exports.dynamicAnchor = void 0;
|
|
110
|
-
var codegen_1 = require_codegen();
|
|
111
|
-
var names_1 = require_names();
|
|
112
|
-
var compile_1 = require_compile();
|
|
113
|
-
var ref_1 = require_ref();
|
|
114
|
-
var def = {
|
|
115
|
-
keyword: "$dynamicAnchor",
|
|
116
|
-
schemaType: "string",
|
|
117
|
-
code: (cxt) => dynamicAnchor(cxt, cxt.schema)
|
|
118
|
-
};
|
|
119
|
-
function dynamicAnchor(cxt, anchor) {
|
|
120
|
-
const { gen, it } = cxt;
|
|
121
|
-
it.schemaEnv.root.dynamicAnchors[anchor] = true;
|
|
122
|
-
const v = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`;
|
|
123
|
-
const validate = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt);
|
|
124
|
-
gen.if((0, codegen_1._)`!${v}`, () => gen.assign(v, validate));
|
|
125
|
-
}
|
|
126
|
-
exports.dynamicAnchor = dynamicAnchor;
|
|
127
|
-
function _getValidate(cxt) {
|
|
128
|
-
const { schemaEnv, schema, self } = cxt.it;
|
|
129
|
-
const { root, baseId, localRefs, meta } = schemaEnv.root;
|
|
130
|
-
const { schemaId } = self.opts;
|
|
131
|
-
const sch = new compile_1.SchemaEnv({ schema, schemaId, root, baseId, localRefs, meta });
|
|
132
|
-
compile_1.compileSchema.call(self, sch);
|
|
133
|
-
return (0, ref_1.getValidate)(cxt, sch);
|
|
134
|
-
}
|
|
135
|
-
exports.default = def;
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js
|
|
140
|
-
var require_dynamicRef = __commonJS({
|
|
141
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js"(exports) {
|
|
142
|
-
"use strict";
|
|
143
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
144
|
-
exports.dynamicRef = void 0;
|
|
145
|
-
var codegen_1 = require_codegen();
|
|
146
|
-
var names_1 = require_names();
|
|
147
|
-
var ref_1 = require_ref();
|
|
148
|
-
var def = {
|
|
149
|
-
keyword: "$dynamicRef",
|
|
150
|
-
schemaType: "string",
|
|
151
|
-
code: (cxt) => dynamicRef(cxt, cxt.schema)
|
|
152
|
-
};
|
|
153
|
-
function dynamicRef(cxt, ref) {
|
|
154
|
-
const { gen, keyword, it } = cxt;
|
|
155
|
-
if (ref[0] !== "#")
|
|
156
|
-
throw new Error(`"${keyword}" only supports hash fragment reference`);
|
|
157
|
-
const anchor = ref.slice(1);
|
|
158
|
-
if (it.allErrors) {
|
|
159
|
-
_dynamicRef();
|
|
160
|
-
} else {
|
|
161
|
-
const valid = gen.let("valid", false);
|
|
162
|
-
_dynamicRef(valid);
|
|
163
|
-
cxt.ok(valid);
|
|
164
|
-
}
|
|
165
|
-
function _dynamicRef(valid) {
|
|
166
|
-
if (it.schemaEnv.root.dynamicAnchors[anchor]) {
|
|
167
|
-
const v = gen.let("_v", (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`);
|
|
168
|
-
gen.if(v, _callRef(v, valid), _callRef(it.validateName, valid));
|
|
169
|
-
} else {
|
|
170
|
-
_callRef(it.validateName, valid)();
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
function _callRef(validate, valid) {
|
|
174
|
-
return valid ? () => gen.block(() => {
|
|
175
|
-
(0, ref_1.callRef)(cxt, validate);
|
|
176
|
-
gen.let(valid, true);
|
|
177
|
-
}) : () => (0, ref_1.callRef)(cxt, validate);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
exports.dynamicRef = dynamicRef;
|
|
181
|
-
exports.default = def;
|
|
182
|
-
}
|
|
183
|
-
});
|
|
184
|
-
|
|
185
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js
|
|
186
|
-
var require_recursiveAnchor = __commonJS({
|
|
187
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js"(exports) {
|
|
188
|
-
"use strict";
|
|
189
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
190
|
-
var dynamicAnchor_1 = require_dynamicAnchor();
|
|
191
|
-
var util_1 = require_util();
|
|
192
|
-
var def = {
|
|
193
|
-
keyword: "$recursiveAnchor",
|
|
194
|
-
schemaType: "boolean",
|
|
195
|
-
code(cxt) {
|
|
196
|
-
if (cxt.schema)
|
|
197
|
-
(0, dynamicAnchor_1.dynamicAnchor)(cxt, "");
|
|
198
|
-
else
|
|
199
|
-
(0, util_1.checkStrictMode)(cxt.it, "$recursiveAnchor: false is ignored");
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
exports.default = def;
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js
|
|
207
|
-
var require_recursiveRef = __commonJS({
|
|
208
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js"(exports) {
|
|
209
|
-
"use strict";
|
|
210
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
211
|
-
var dynamicRef_1 = require_dynamicRef();
|
|
212
|
-
var def = {
|
|
213
|
-
keyword: "$recursiveRef",
|
|
214
|
-
schemaType: "string",
|
|
215
|
-
code: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema)
|
|
216
|
-
};
|
|
217
|
-
exports.default = def;
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
|
|
221
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/index.js
|
|
222
|
-
var require_dynamic = __commonJS({
|
|
223
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/dynamic/index.js"(exports) {
|
|
224
|
-
"use strict";
|
|
225
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
226
|
-
var dynamicAnchor_1 = require_dynamicAnchor();
|
|
227
|
-
var dynamicRef_1 = require_dynamicRef();
|
|
228
|
-
var recursiveAnchor_1 = require_recursiveAnchor();
|
|
229
|
-
var recursiveRef_1 = require_recursiveRef();
|
|
230
|
-
var dynamic = [dynamicAnchor_1.default, dynamicRef_1.default, recursiveAnchor_1.default, recursiveRef_1.default];
|
|
231
|
-
exports.default = dynamic;
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
|
|
235
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js
|
|
236
|
-
var require_dependentRequired = __commonJS({
|
|
237
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js"(exports) {
|
|
238
|
-
"use strict";
|
|
239
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
240
|
-
var dependencies_1 = require_dependencies();
|
|
241
|
-
var def = {
|
|
242
|
-
keyword: "dependentRequired",
|
|
243
|
-
type: "object",
|
|
244
|
-
schemaType: "object",
|
|
245
|
-
error: dependencies_1.error,
|
|
246
|
-
code: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt)
|
|
247
|
-
};
|
|
248
|
-
exports.default = def;
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js
|
|
253
|
-
var require_dependentSchemas = __commonJS({
|
|
254
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js"(exports) {
|
|
255
|
-
"use strict";
|
|
256
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
257
|
-
var dependencies_1 = require_dependencies();
|
|
258
|
-
var def = {
|
|
259
|
-
keyword: "dependentSchemas",
|
|
260
|
-
type: "object",
|
|
261
|
-
schemaType: "object",
|
|
262
|
-
code: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt)
|
|
263
|
-
};
|
|
264
|
-
exports.default = def;
|
|
265
|
-
}
|
|
266
|
-
});
|
|
267
|
-
|
|
268
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js
|
|
269
|
-
var require_limitContains = __commonJS({
|
|
270
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/validation/limitContains.js"(exports) {
|
|
271
|
-
"use strict";
|
|
272
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
273
|
-
var util_1 = require_util();
|
|
274
|
-
var def = {
|
|
275
|
-
keyword: ["maxContains", "minContains"],
|
|
276
|
-
type: "array",
|
|
277
|
-
schemaType: "number",
|
|
278
|
-
code({ keyword, parentSchema, it }) {
|
|
279
|
-
if (parentSchema.contains === void 0) {
|
|
280
|
-
(0, util_1.checkStrictMode)(it, `"${keyword}" without "contains" is ignored`);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
};
|
|
284
|
-
exports.default = def;
|
|
285
|
-
}
|
|
286
|
-
});
|
|
287
|
-
|
|
288
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js
|
|
289
|
-
var require_next = __commonJS({
|
|
290
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/next.js"(exports) {
|
|
291
|
-
"use strict";
|
|
292
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
293
|
-
var dependentRequired_1 = require_dependentRequired();
|
|
294
|
-
var dependentSchemas_1 = require_dependentSchemas();
|
|
295
|
-
var limitContains_1 = require_limitContains();
|
|
296
|
-
var next = [dependentRequired_1.default, dependentSchemas_1.default, limitContains_1.default];
|
|
297
|
-
exports.default = next;
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
|
|
301
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js
|
|
302
|
-
var require_unevaluatedProperties = __commonJS({
|
|
303
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js"(exports) {
|
|
304
|
-
"use strict";
|
|
305
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
306
|
-
var codegen_1 = require_codegen();
|
|
307
|
-
var util_1 = require_util();
|
|
308
|
-
var names_1 = require_names();
|
|
309
|
-
var error = {
|
|
310
|
-
message: "must NOT have unevaluated properties",
|
|
311
|
-
params: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}`
|
|
312
|
-
};
|
|
313
|
-
var def = {
|
|
314
|
-
keyword: "unevaluatedProperties",
|
|
315
|
-
type: "object",
|
|
316
|
-
schemaType: ["boolean", "object"],
|
|
317
|
-
trackErrors: true,
|
|
318
|
-
error,
|
|
319
|
-
code(cxt) {
|
|
320
|
-
const { gen, schema, data, errsCount, it } = cxt;
|
|
321
|
-
if (!errsCount)
|
|
322
|
-
throw new Error("ajv implementation error");
|
|
323
|
-
const { allErrors, props } = it;
|
|
324
|
-
if (props instanceof codegen_1.Name) {
|
|
325
|
-
gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));
|
|
326
|
-
} else if (props !== true) {
|
|
327
|
-
gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));
|
|
328
|
-
}
|
|
329
|
-
it.props = true;
|
|
330
|
-
cxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);
|
|
331
|
-
function unevaluatedPropCode(key) {
|
|
332
|
-
if (schema === false) {
|
|
333
|
-
cxt.setParams({ unevaluatedProperty: key });
|
|
334
|
-
cxt.error();
|
|
335
|
-
if (!allErrors)
|
|
336
|
-
gen.break();
|
|
337
|
-
return;
|
|
338
|
-
}
|
|
339
|
-
if (!(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
340
|
-
const valid = gen.name("valid");
|
|
341
|
-
cxt.subschema({
|
|
342
|
-
keyword: "unevaluatedProperties",
|
|
343
|
-
dataProp: key,
|
|
344
|
-
dataPropType: util_1.Type.Str
|
|
345
|
-
}, valid);
|
|
346
|
-
if (!allErrors)
|
|
347
|
-
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
function unevaluatedDynamic(evaluatedProps, key) {
|
|
351
|
-
return (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`;
|
|
352
|
-
}
|
|
353
|
-
function unevaluatedStatic(evaluatedProps, key) {
|
|
354
|
-
const ps = [];
|
|
355
|
-
for (const p in evaluatedProps) {
|
|
356
|
-
if (evaluatedProps[p] === true)
|
|
357
|
-
ps.push((0, codegen_1._)`${key} !== ${p}`);
|
|
358
|
-
}
|
|
359
|
-
return (0, codegen_1.and)(...ps);
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
};
|
|
363
|
-
exports.default = def;
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
|
|
367
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js
|
|
368
|
-
var require_unevaluatedItems = __commonJS({
|
|
369
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js"(exports) {
|
|
370
|
-
"use strict";
|
|
371
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
372
|
-
var codegen_1 = require_codegen();
|
|
373
|
-
var util_1 = require_util();
|
|
374
|
-
var error = {
|
|
375
|
-
message: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,
|
|
376
|
-
params: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`
|
|
377
|
-
};
|
|
378
|
-
var def = {
|
|
379
|
-
keyword: "unevaluatedItems",
|
|
380
|
-
type: "array",
|
|
381
|
-
schemaType: ["boolean", "object"],
|
|
382
|
-
error,
|
|
383
|
-
code(cxt) {
|
|
384
|
-
const { gen, schema, data, it } = cxt;
|
|
385
|
-
const items = it.items || 0;
|
|
386
|
-
if (items === true)
|
|
387
|
-
return;
|
|
388
|
-
const len = gen.const("len", (0, codegen_1._)`${data}.length`);
|
|
389
|
-
if (schema === false) {
|
|
390
|
-
cxt.setParams({ len: items });
|
|
391
|
-
cxt.fail((0, codegen_1._)`${len} > ${items}`);
|
|
392
|
-
} else if (typeof schema == "object" && !(0, util_1.alwaysValidSchema)(it, schema)) {
|
|
393
|
-
const valid = gen.var("valid", (0, codegen_1._)`${len} <= ${items}`);
|
|
394
|
-
gen.if((0, codegen_1.not)(valid), () => validateItems(valid, items));
|
|
395
|
-
cxt.ok(valid);
|
|
396
|
-
}
|
|
397
|
-
it.items = true;
|
|
398
|
-
function validateItems(valid, from) {
|
|
399
|
-
gen.forRange("i", from, len, (i) => {
|
|
400
|
-
cxt.subschema({ keyword: "unevaluatedItems", dataProp: i, dataPropType: util_1.Type.Num }, valid);
|
|
401
|
-
if (!it.allErrors)
|
|
402
|
-
gen.if((0, codegen_1.not)(valid), () => gen.break());
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
};
|
|
407
|
-
exports.default = def;
|
|
408
|
-
}
|
|
409
|
-
});
|
|
410
|
-
|
|
411
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js
|
|
412
|
-
var require_unevaluated = __commonJS({
|
|
413
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/unevaluated/index.js"(exports) {
|
|
414
|
-
"use strict";
|
|
415
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
416
|
-
var unevaluatedProperties_1 = require_unevaluatedProperties();
|
|
417
|
-
var unevaluatedItems_1 = require_unevaluatedItems();
|
|
418
|
-
var unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default];
|
|
419
|
-
exports.default = unevaluated;
|
|
420
|
-
}
|
|
421
|
-
});
|
|
422
|
-
|
|
423
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft2020.js
|
|
424
|
-
var require_draft2020 = __commonJS({
|
|
425
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/vocabularies/draft2020.js"(exports) {
|
|
426
|
-
"use strict";
|
|
427
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
428
|
-
var core_1 = require_core2();
|
|
429
|
-
var validation_1 = require_validation();
|
|
430
|
-
var applicator_1 = require_applicator();
|
|
431
|
-
var dynamic_1 = require_dynamic();
|
|
432
|
-
var next_1 = require_next();
|
|
433
|
-
var unevaluated_1 = require_unevaluated();
|
|
434
|
-
var format_1 = require_format();
|
|
435
|
-
var metadata_1 = require_metadata();
|
|
436
|
-
var draft2020Vocabularies = [
|
|
437
|
-
dynamic_1.default,
|
|
438
|
-
core_1.default,
|
|
439
|
-
validation_1.default,
|
|
440
|
-
(0, applicator_1.default)(true),
|
|
441
|
-
format_1.default,
|
|
442
|
-
metadata_1.metadataVocabulary,
|
|
443
|
-
metadata_1.contentVocabulary,
|
|
444
|
-
next_1.default,
|
|
445
|
-
unevaluated_1.default
|
|
446
|
-
];
|
|
447
|
-
exports.default = draft2020Vocabularies;
|
|
448
|
-
}
|
|
449
|
-
});
|
|
450
|
-
|
|
451
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json
|
|
452
|
-
var require_schema = __commonJS({
|
|
453
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json"(exports, module) {
|
|
454
|
-
module.exports = {
|
|
455
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
456
|
-
$id: "https://json-schema.org/draft/2020-12/schema",
|
|
457
|
-
$vocabulary: {
|
|
458
|
-
"https://json-schema.org/draft/2020-12/vocab/core": true,
|
|
459
|
-
"https://json-schema.org/draft/2020-12/vocab/applicator": true,
|
|
460
|
-
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true,
|
|
461
|
-
"https://json-schema.org/draft/2020-12/vocab/validation": true,
|
|
462
|
-
"https://json-schema.org/draft/2020-12/vocab/meta-data": true,
|
|
463
|
-
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true,
|
|
464
|
-
"https://json-schema.org/draft/2020-12/vocab/content": true
|
|
465
|
-
},
|
|
466
|
-
$dynamicAnchor: "meta",
|
|
467
|
-
title: "Core and Validation specifications meta-schema",
|
|
468
|
-
allOf: [
|
|
469
|
-
{ $ref: "meta/core" },
|
|
470
|
-
{ $ref: "meta/applicator" },
|
|
471
|
-
{ $ref: "meta/unevaluated" },
|
|
472
|
-
{ $ref: "meta/validation" },
|
|
473
|
-
{ $ref: "meta/meta-data" },
|
|
474
|
-
{ $ref: "meta/format-annotation" },
|
|
475
|
-
{ $ref: "meta/content" }
|
|
476
|
-
],
|
|
477
|
-
type: ["object", "boolean"],
|
|
478
|
-
$comment: "This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",
|
|
479
|
-
properties: {
|
|
480
|
-
definitions: {
|
|
481
|
-
$comment: '"definitions" has been replaced by "$defs".',
|
|
482
|
-
type: "object",
|
|
483
|
-
additionalProperties: { $dynamicRef: "#meta" },
|
|
484
|
-
deprecated: true,
|
|
485
|
-
default: {}
|
|
486
|
-
},
|
|
487
|
-
dependencies: {
|
|
488
|
-
$comment: '"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',
|
|
489
|
-
type: "object",
|
|
490
|
-
additionalProperties: {
|
|
491
|
-
anyOf: [{ $dynamicRef: "#meta" }, { $ref: "meta/validation#/$defs/stringArray" }]
|
|
492
|
-
},
|
|
493
|
-
deprecated: true,
|
|
494
|
-
default: {}
|
|
495
|
-
},
|
|
496
|
-
$recursiveAnchor: {
|
|
497
|
-
$comment: '"$recursiveAnchor" has been replaced by "$dynamicAnchor".',
|
|
498
|
-
$ref: "meta/core#/$defs/anchorString",
|
|
499
|
-
deprecated: true
|
|
500
|
-
},
|
|
501
|
-
$recursiveRef: {
|
|
502
|
-
$comment: '"$recursiveRef" has been replaced by "$dynamicRef".',
|
|
503
|
-
$ref: "meta/core#/$defs/uriReferenceString",
|
|
504
|
-
deprecated: true
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
};
|
|
508
|
-
}
|
|
509
|
-
});
|
|
510
|
-
|
|
511
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json
|
|
512
|
-
var require_applicator2 = __commonJS({
|
|
513
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json"(exports, module) {
|
|
514
|
-
module.exports = {
|
|
515
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
516
|
-
$id: "https://json-schema.org/draft/2020-12/meta/applicator",
|
|
517
|
-
$vocabulary: {
|
|
518
|
-
"https://json-schema.org/draft/2020-12/vocab/applicator": true
|
|
519
|
-
},
|
|
520
|
-
$dynamicAnchor: "meta",
|
|
521
|
-
title: "Applicator vocabulary meta-schema",
|
|
522
|
-
type: ["object", "boolean"],
|
|
523
|
-
properties: {
|
|
524
|
-
prefixItems: { $ref: "#/$defs/schemaArray" },
|
|
525
|
-
items: { $dynamicRef: "#meta" },
|
|
526
|
-
contains: { $dynamicRef: "#meta" },
|
|
527
|
-
additionalProperties: { $dynamicRef: "#meta" },
|
|
528
|
-
properties: {
|
|
529
|
-
type: "object",
|
|
530
|
-
additionalProperties: { $dynamicRef: "#meta" },
|
|
531
|
-
default: {}
|
|
532
|
-
},
|
|
533
|
-
patternProperties: {
|
|
534
|
-
type: "object",
|
|
535
|
-
additionalProperties: { $dynamicRef: "#meta" },
|
|
536
|
-
propertyNames: { format: "regex" },
|
|
537
|
-
default: {}
|
|
538
|
-
},
|
|
539
|
-
dependentSchemas: {
|
|
540
|
-
type: "object",
|
|
541
|
-
additionalProperties: { $dynamicRef: "#meta" },
|
|
542
|
-
default: {}
|
|
543
|
-
},
|
|
544
|
-
propertyNames: { $dynamicRef: "#meta" },
|
|
545
|
-
if: { $dynamicRef: "#meta" },
|
|
546
|
-
then: { $dynamicRef: "#meta" },
|
|
547
|
-
else: { $dynamicRef: "#meta" },
|
|
548
|
-
allOf: { $ref: "#/$defs/schemaArray" },
|
|
549
|
-
anyOf: { $ref: "#/$defs/schemaArray" },
|
|
550
|
-
oneOf: { $ref: "#/$defs/schemaArray" },
|
|
551
|
-
not: { $dynamicRef: "#meta" }
|
|
552
|
-
},
|
|
553
|
-
$defs: {
|
|
554
|
-
schemaArray: {
|
|
555
|
-
type: "array",
|
|
556
|
-
minItems: 1,
|
|
557
|
-
items: { $dynamicRef: "#meta" }
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
};
|
|
561
|
-
}
|
|
562
|
-
});
|
|
563
|
-
|
|
564
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json
|
|
565
|
-
var require_unevaluated2 = __commonJS({
|
|
566
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json"(exports, module) {
|
|
567
|
-
module.exports = {
|
|
568
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
569
|
-
$id: "https://json-schema.org/draft/2020-12/meta/unevaluated",
|
|
570
|
-
$vocabulary: {
|
|
571
|
-
"https://json-schema.org/draft/2020-12/vocab/unevaluated": true
|
|
572
|
-
},
|
|
573
|
-
$dynamicAnchor: "meta",
|
|
574
|
-
title: "Unevaluated applicator vocabulary meta-schema",
|
|
575
|
-
type: ["object", "boolean"],
|
|
576
|
-
properties: {
|
|
577
|
-
unevaluatedItems: { $dynamicRef: "#meta" },
|
|
578
|
-
unevaluatedProperties: { $dynamicRef: "#meta" }
|
|
579
|
-
}
|
|
580
|
-
};
|
|
581
|
-
}
|
|
582
|
-
});
|
|
583
|
-
|
|
584
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json
|
|
585
|
-
var require_content = __commonJS({
|
|
586
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json"(exports, module) {
|
|
587
|
-
module.exports = {
|
|
588
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
589
|
-
$id: "https://json-schema.org/draft/2020-12/meta/content",
|
|
590
|
-
$vocabulary: {
|
|
591
|
-
"https://json-schema.org/draft/2020-12/vocab/content": true
|
|
592
|
-
},
|
|
593
|
-
$dynamicAnchor: "meta",
|
|
594
|
-
title: "Content vocabulary meta-schema",
|
|
595
|
-
type: ["object", "boolean"],
|
|
596
|
-
properties: {
|
|
597
|
-
contentEncoding: { type: "string" },
|
|
598
|
-
contentMediaType: { type: "string" },
|
|
599
|
-
contentSchema: { $dynamicRef: "#meta" }
|
|
600
|
-
}
|
|
601
|
-
};
|
|
602
|
-
}
|
|
603
|
-
});
|
|
604
|
-
|
|
605
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json
|
|
606
|
-
var require_core3 = __commonJS({
|
|
607
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json"(exports, module) {
|
|
608
|
-
module.exports = {
|
|
609
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
610
|
-
$id: "https://json-schema.org/draft/2020-12/meta/core",
|
|
611
|
-
$vocabulary: {
|
|
612
|
-
"https://json-schema.org/draft/2020-12/vocab/core": true
|
|
613
|
-
},
|
|
614
|
-
$dynamicAnchor: "meta",
|
|
615
|
-
title: "Core vocabulary meta-schema",
|
|
616
|
-
type: ["object", "boolean"],
|
|
617
|
-
properties: {
|
|
618
|
-
$id: {
|
|
619
|
-
$ref: "#/$defs/uriReferenceString",
|
|
620
|
-
$comment: "Non-empty fragments not allowed.",
|
|
621
|
-
pattern: "^[^#]*#?$"
|
|
622
|
-
},
|
|
623
|
-
$schema: { $ref: "#/$defs/uriString" },
|
|
624
|
-
$ref: { $ref: "#/$defs/uriReferenceString" },
|
|
625
|
-
$anchor: { $ref: "#/$defs/anchorString" },
|
|
626
|
-
$dynamicRef: { $ref: "#/$defs/uriReferenceString" },
|
|
627
|
-
$dynamicAnchor: { $ref: "#/$defs/anchorString" },
|
|
628
|
-
$vocabulary: {
|
|
629
|
-
type: "object",
|
|
630
|
-
propertyNames: { $ref: "#/$defs/uriString" },
|
|
631
|
-
additionalProperties: {
|
|
632
|
-
type: "boolean"
|
|
633
|
-
}
|
|
634
|
-
},
|
|
635
|
-
$comment: {
|
|
636
|
-
type: "string"
|
|
637
|
-
},
|
|
638
|
-
$defs: {
|
|
639
|
-
type: "object",
|
|
640
|
-
additionalProperties: { $dynamicRef: "#meta" }
|
|
641
|
-
}
|
|
642
|
-
},
|
|
643
|
-
$defs: {
|
|
644
|
-
anchorString: {
|
|
645
|
-
type: "string",
|
|
646
|
-
pattern: "^[A-Za-z_][-A-Za-z0-9._]*$"
|
|
647
|
-
},
|
|
648
|
-
uriString: {
|
|
649
|
-
type: "string",
|
|
650
|
-
format: "uri"
|
|
651
|
-
},
|
|
652
|
-
uriReferenceString: {
|
|
653
|
-
type: "string",
|
|
654
|
-
format: "uri-reference"
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
};
|
|
658
|
-
}
|
|
659
|
-
});
|
|
660
|
-
|
|
661
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json
|
|
662
|
-
var require_format_annotation = __commonJS({
|
|
663
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json"(exports, module) {
|
|
664
|
-
module.exports = {
|
|
665
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
666
|
-
$id: "https://json-schema.org/draft/2020-12/meta/format-annotation",
|
|
667
|
-
$vocabulary: {
|
|
668
|
-
"https://json-schema.org/draft/2020-12/vocab/format-annotation": true
|
|
669
|
-
},
|
|
670
|
-
$dynamicAnchor: "meta",
|
|
671
|
-
title: "Format vocabulary meta-schema for annotation results",
|
|
672
|
-
type: ["object", "boolean"],
|
|
673
|
-
properties: {
|
|
674
|
-
format: { type: "string" }
|
|
675
|
-
}
|
|
676
|
-
};
|
|
677
|
-
}
|
|
678
|
-
});
|
|
679
|
-
|
|
680
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json
|
|
681
|
-
var require_meta_data = __commonJS({
|
|
682
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json"(exports, module) {
|
|
683
|
-
module.exports = {
|
|
684
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
685
|
-
$id: "https://json-schema.org/draft/2020-12/meta/meta-data",
|
|
686
|
-
$vocabulary: {
|
|
687
|
-
"https://json-schema.org/draft/2020-12/vocab/meta-data": true
|
|
688
|
-
},
|
|
689
|
-
$dynamicAnchor: "meta",
|
|
690
|
-
title: "Meta-data vocabulary meta-schema",
|
|
691
|
-
type: ["object", "boolean"],
|
|
692
|
-
properties: {
|
|
693
|
-
title: {
|
|
694
|
-
type: "string"
|
|
695
|
-
},
|
|
696
|
-
description: {
|
|
697
|
-
type: "string"
|
|
698
|
-
},
|
|
699
|
-
default: true,
|
|
700
|
-
deprecated: {
|
|
701
|
-
type: "boolean",
|
|
702
|
-
default: false
|
|
703
|
-
},
|
|
704
|
-
readOnly: {
|
|
705
|
-
type: "boolean",
|
|
706
|
-
default: false
|
|
707
|
-
},
|
|
708
|
-
writeOnly: {
|
|
709
|
-
type: "boolean",
|
|
710
|
-
default: false
|
|
711
|
-
},
|
|
712
|
-
examples: {
|
|
713
|
-
type: "array",
|
|
714
|
-
items: true
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
};
|
|
718
|
-
}
|
|
719
|
-
});
|
|
720
|
-
|
|
721
|
-
// node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json
|
|
722
|
-
var require_validation2 = __commonJS({
|
|
723
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json"(exports, module) {
|
|
724
|
-
module.exports = {
|
|
725
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
726
|
-
$id: "https://json-schema.org/draft/2020-12/meta/validation",
|
|
727
|
-
$vocabulary: {
|
|
728
|
-
"https://json-schema.org/draft/2020-12/vocab/validation": true
|
|
729
|
-
},
|
|
730
|
-
$dynamicAnchor: "meta",
|
|
731
|
-
title: "Validation vocabulary meta-schema",
|
|
732
|
-
type: ["object", "boolean"],
|
|
733
|
-
properties: {
|
|
734
|
-
type: {
|
|
735
|
-
anyOf: [
|
|
736
|
-
{ $ref: "#/$defs/simpleTypes" },
|
|
737
|
-
{
|
|
738
|
-
type: "array",
|
|
739
|
-
items: { $ref: "#/$defs/simpleTypes" },
|
|
740
|
-
minItems: 1,
|
|
741
|
-
uniqueItems: true
|
|
742
|
-
}
|
|
743
|
-
]
|
|
744
|
-
},
|
|
745
|
-
const: true,
|
|
746
|
-
enum: {
|
|
747
|
-
type: "array",
|
|
748
|
-
items: true
|
|
749
|
-
},
|
|
750
|
-
multipleOf: {
|
|
751
|
-
type: "number",
|
|
752
|
-
exclusiveMinimum: 0
|
|
753
|
-
},
|
|
754
|
-
maximum: {
|
|
755
|
-
type: "number"
|
|
756
|
-
},
|
|
757
|
-
exclusiveMaximum: {
|
|
758
|
-
type: "number"
|
|
759
|
-
},
|
|
760
|
-
minimum: {
|
|
761
|
-
type: "number"
|
|
762
|
-
},
|
|
763
|
-
exclusiveMinimum: {
|
|
764
|
-
type: "number"
|
|
765
|
-
},
|
|
766
|
-
maxLength: { $ref: "#/$defs/nonNegativeInteger" },
|
|
767
|
-
minLength: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
|
|
768
|
-
pattern: {
|
|
769
|
-
type: "string",
|
|
770
|
-
format: "regex"
|
|
771
|
-
},
|
|
772
|
-
maxItems: { $ref: "#/$defs/nonNegativeInteger" },
|
|
773
|
-
minItems: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
|
|
774
|
-
uniqueItems: {
|
|
775
|
-
type: "boolean",
|
|
776
|
-
default: false
|
|
777
|
-
},
|
|
778
|
-
maxContains: { $ref: "#/$defs/nonNegativeInteger" },
|
|
779
|
-
minContains: {
|
|
780
|
-
$ref: "#/$defs/nonNegativeInteger",
|
|
781
|
-
default: 1
|
|
782
|
-
},
|
|
783
|
-
maxProperties: { $ref: "#/$defs/nonNegativeInteger" },
|
|
784
|
-
minProperties: { $ref: "#/$defs/nonNegativeIntegerDefault0" },
|
|
785
|
-
required: { $ref: "#/$defs/stringArray" },
|
|
786
|
-
dependentRequired: {
|
|
787
|
-
type: "object",
|
|
788
|
-
additionalProperties: {
|
|
789
|
-
$ref: "#/$defs/stringArray"
|
|
790
|
-
}
|
|
791
|
-
}
|
|
792
|
-
},
|
|
793
|
-
$defs: {
|
|
794
|
-
nonNegativeInteger: {
|
|
795
|
-
type: "integer",
|
|
796
|
-
minimum: 0
|
|
797
|
-
},
|
|
798
|
-
nonNegativeIntegerDefault0: {
|
|
799
|
-
$ref: "#/$defs/nonNegativeInteger",
|
|
800
|
-
default: 0
|
|
801
|
-
},
|
|
802
|
-
simpleTypes: {
|
|
803
|
-
enum: ["array", "boolean", "integer", "null", "number", "object", "string"]
|
|
804
|
-
},
|
|
805
|
-
stringArray: {
|
|
806
|
-
type: "array",
|
|
807
|
-
items: { type: "string" },
|
|
808
|
-
uniqueItems: true,
|
|
809
|
-
default: []
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
};
|
|
813
|
-
}
|
|
814
|
-
});
|
|
815
95
|
|
|
816
|
-
//
|
|
817
|
-
|
|
818
|
-
"node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/refs/json-schema-2020-12/index.js"(exports) {
|
|
819
|
-
"use strict";
|
|
820
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
821
|
-
var metaSchema = require_schema();
|
|
822
|
-
var applicator = require_applicator2();
|
|
823
|
-
var unevaluated = require_unevaluated2();
|
|
824
|
-
var content = require_content();
|
|
825
|
-
var core = require_core3();
|
|
826
|
-
var format = require_format_annotation();
|
|
827
|
-
var metadata = require_meta_data();
|
|
828
|
-
var validation = require_validation2();
|
|
829
|
-
var META_SUPPORT_DATA = ["/properties"];
|
|
830
|
-
function addMetaSchema2020($data) {
|
|
831
|
-
;
|
|
832
|
-
[
|
|
833
|
-
metaSchema,
|
|
834
|
-
applicator,
|
|
835
|
-
unevaluated,
|
|
836
|
-
content,
|
|
837
|
-
core,
|
|
838
|
-
with$data(this, format),
|
|
839
|
-
metadata,
|
|
840
|
-
with$data(this, validation)
|
|
841
|
-
].forEach((sch) => this.addMetaSchema(sch, void 0, false));
|
|
842
|
-
return this;
|
|
843
|
-
function with$data(ajv, sch) {
|
|
844
|
-
return $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
|
-
exports.default = addMetaSchema2020;
|
|
848
|
-
}
|
|
849
|
-
});
|
|
96
|
+
// src/commands/pay.ts
|
|
97
|
+
import { tmpdir } from "node:os";
|
|
850
98
|
|
|
851
|
-
//
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
856
|
-
exports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2020 = void 0;
|
|
857
|
-
var core_1 = require_core();
|
|
858
|
-
var draft2020_1 = require_draft2020();
|
|
859
|
-
var discriminator_1 = require_discriminator();
|
|
860
|
-
var json_schema_2020_12_1 = require_json_schema_2020_12();
|
|
861
|
-
var META_SCHEMA_ID = "https://json-schema.org/draft/2020-12/schema";
|
|
862
|
-
var Ajv20202 = class extends core_1.default {
|
|
863
|
-
constructor(opts = {}) {
|
|
864
|
-
super({
|
|
865
|
-
...opts,
|
|
866
|
-
dynamicRef: true,
|
|
867
|
-
next: true,
|
|
868
|
-
unevaluated: true
|
|
869
|
-
});
|
|
870
|
-
}
|
|
871
|
-
_addVocabularies() {
|
|
872
|
-
super._addVocabularies();
|
|
873
|
-
draft2020_1.default.forEach((v) => this.addVocabulary(v));
|
|
874
|
-
if (this.opts.discriminator)
|
|
875
|
-
this.addKeyword(discriminator_1.default);
|
|
876
|
-
}
|
|
877
|
-
_addDefaultMetaSchema() {
|
|
878
|
-
super._addDefaultMetaSchema();
|
|
879
|
-
const { $data, meta } = this.opts;
|
|
880
|
-
if (!meta)
|
|
881
|
-
return;
|
|
882
|
-
json_schema_2020_12_1.default.call(this, $data);
|
|
883
|
-
this.refs["http://json-schema.org/schema"] = META_SCHEMA_ID;
|
|
884
|
-
}
|
|
885
|
-
defaultMeta() {
|
|
886
|
-
return this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);
|
|
887
|
-
}
|
|
888
|
-
};
|
|
889
|
-
exports.Ajv2020 = Ajv20202;
|
|
890
|
-
module.exports = exports = Ajv20202;
|
|
891
|
-
module.exports.Ajv2020 = Ajv20202;
|
|
892
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
893
|
-
exports.default = Ajv20202;
|
|
894
|
-
var validate_1 = require_validate();
|
|
895
|
-
Object.defineProperty(exports, "KeywordCxt", { enumerable: true, get: function() {
|
|
896
|
-
return validate_1.KeywordCxt;
|
|
897
|
-
} });
|
|
898
|
-
var codegen_1 = require_codegen();
|
|
899
|
-
Object.defineProperty(exports, "_", { enumerable: true, get: function() {
|
|
900
|
-
return codegen_1._;
|
|
901
|
-
} });
|
|
902
|
-
Object.defineProperty(exports, "str", { enumerable: true, get: function() {
|
|
903
|
-
return codegen_1.str;
|
|
904
|
-
} });
|
|
905
|
-
Object.defineProperty(exports, "stringify", { enumerable: true, get: function() {
|
|
906
|
-
return codegen_1.stringify;
|
|
907
|
-
} });
|
|
908
|
-
Object.defineProperty(exports, "nil", { enumerable: true, get: function() {
|
|
909
|
-
return codegen_1.nil;
|
|
910
|
-
} });
|
|
911
|
-
Object.defineProperty(exports, "Name", { enumerable: true, get: function() {
|
|
912
|
-
return codegen_1.Name;
|
|
913
|
-
} });
|
|
914
|
-
Object.defineProperty(exports, "CodeGen", { enumerable: true, get: function() {
|
|
915
|
-
return codegen_1.CodeGen;
|
|
916
|
-
} });
|
|
917
|
-
var validation_error_1 = require_validation_error();
|
|
918
|
-
Object.defineProperty(exports, "ValidationError", { enumerable: true, get: function() {
|
|
919
|
-
return validation_error_1.default;
|
|
920
|
-
} });
|
|
921
|
-
var ref_error_1 = require_ref_error();
|
|
922
|
-
Object.defineProperty(exports, "MissingRefError", { enumerable: true, get: function() {
|
|
923
|
-
return ref_error_1.default;
|
|
924
|
-
} });
|
|
925
|
-
}
|
|
926
|
-
});
|
|
99
|
+
// src/router/model-worker-context.ts
|
|
100
|
+
function isModelWorkerProcess(env = process.env) {
|
|
101
|
+
return env.TENJIN_MODEL_WORKER === "1";
|
|
102
|
+
}
|
|
927
103
|
|
|
928
104
|
// src/lib/bazaar.ts
|
|
929
105
|
import { readFile } from "node:fs/promises";
|
|
@@ -1231,8 +407,8 @@ async function ultravioletListings(registry, timeoutMs, query) {
|
|
|
1231
407
|
const pagination = response.pagination;
|
|
1232
408
|
if (pagination.offset !== offset || response.items.length > pagination.limit)
|
|
1233
409
|
throw new Error("Invalid registry pagination");
|
|
1234
|
-
for (const
|
|
1235
|
-
const parsed = ultravioletResource.safeParse(
|
|
410
|
+
for (const record of response.items) {
|
|
411
|
+
const parsed = ultravioletResource.safeParse(record);
|
|
1236
412
|
if (!parsed.success) {
|
|
1237
413
|
incomplete = "Registry search skipped malformed records";
|
|
1238
414
|
continue;
|
|
@@ -1454,255 +630,6 @@ function sameAddress(a, b) {
|
|
|
1454
630
|
}
|
|
1455
631
|
}
|
|
1456
632
|
|
|
1457
|
-
// src/lib/payment-failure.ts
|
|
1458
|
-
var MAX_ERROR_CHARS = 16384;
|
|
1459
|
-
function reasonCode(error) {
|
|
1460
|
-
if (error === void 0) return void 0;
|
|
1461
|
-
const colon = error.indexOf(":");
|
|
1462
|
-
return (colon === -1 ? error : error.slice(0, colon)).trim();
|
|
1463
|
-
}
|
|
1464
|
-
function fundsCode(code) {
|
|
1465
|
-
return code === "insufficient_funds" || code === "invalid_exact_evm_insufficient_funds" || // Preserve facilitator prefixes for insufficient_balance, but require a
|
|
1466
|
-
// whole code: prose ending in the same words is not a code.
|
|
1467
|
-
code !== void 0 && /^(?:[a-z0-9]+_)*insufficient_balance$/.test(code);
|
|
1468
|
-
}
|
|
1469
|
-
function record(value) {
|
|
1470
|
-
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
|
|
1471
|
-
}
|
|
1472
|
-
function isShortOfFunds(value) {
|
|
1473
|
-
if (typeof value !== "string" || value.length > MAX_ERROR_CHARS) return false;
|
|
1474
|
-
if (fundsCode(reasonCode(value))) return true;
|
|
1475
|
-
const colon = value.indexOf(":");
|
|
1476
|
-
if (colon === -1) return false;
|
|
1477
|
-
try {
|
|
1478
|
-
const detail = record(JSON.parse(value.slice(colon + 1)));
|
|
1479
|
-
return typeof detail?.invalidReason === "string" && fundsCode(reasonCode(detail.invalidReason));
|
|
1480
|
-
} catch {
|
|
1481
|
-
return false;
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
|
-
function headerObject(header, decode) {
|
|
1485
|
-
if (header === void 0 || header.length > MAX_ERROR_CHARS) return void 0;
|
|
1486
|
-
try {
|
|
1487
|
-
return record(decode(header));
|
|
1488
|
-
} catch {
|
|
1489
|
-
return void 0;
|
|
1490
|
-
}
|
|
1491
|
-
}
|
|
1492
|
-
function paymentShortOfFunds(res) {
|
|
1493
|
-
const settled = headerObject(
|
|
1494
|
-
res.header("PAYMENT-RESPONSE") ?? res.header("X-PAYMENT-RESPONSE"),
|
|
1495
|
-
decodePaymentResponseHeader
|
|
1496
|
-
);
|
|
1497
|
-
if ([settled?.errorReason, settled?.errorMessage].some(isShortOfFunds)) return true;
|
|
1498
|
-
if (res.status !== 402) return false;
|
|
1499
|
-
const required = headerObject(res.header("PAYMENT-REQUIRED"), decodePaymentRequiredHeader);
|
|
1500
|
-
const body = record(res.json);
|
|
1501
|
-
return [required?.error, body?.error, body?.reason].some(isShortOfFunds);
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
// src/lib/request-schema.ts
|
|
1505
|
-
var import_ajv = __toESM(require_ajv(), 1);
|
|
1506
|
-
var import__ = __toESM(require__(), 1);
|
|
1507
|
-
var import_ajv_formats = __toESM(require_dist(), 1);
|
|
1508
|
-
import { createHash } from "node:crypto";
|
|
1509
|
-
var MAX_SCHEMA_BYTES = 96 * 1024;
|
|
1510
|
-
var MAX_VALUE_BYTES = 64 * 1024;
|
|
1511
|
-
var MAX_BODY_BYTES = 4 * 1024 * 1024;
|
|
1512
|
-
var MAX_DEPTH = 24;
|
|
1513
|
-
var VALIDATOR_CACHE_LIMIT = 128;
|
|
1514
|
-
var DRAFT_07 = "http://json-schema.org/draft-07/schema#";
|
|
1515
|
-
function stable(value) {
|
|
1516
|
-
if (Array.isArray(value)) return `[${value.map(stable).join(",")}]`;
|
|
1517
|
-
if (value !== null && typeof value === "object") {
|
|
1518
|
-
const object = value;
|
|
1519
|
-
return `{${Object.keys(object).sort().map((key) => `${JSON.stringify(key)}:${stable(object[key])}`).join(",")}}`;
|
|
1520
|
-
}
|
|
1521
|
-
return JSON.stringify(value) ?? "null";
|
|
1522
|
-
}
|
|
1523
|
-
function canonicalHash(value) {
|
|
1524
|
-
return createHash("sha256").update(stable(value)).digest("hex");
|
|
1525
|
-
}
|
|
1526
|
-
function walk(value, schemaMode, depth = 0) {
|
|
1527
|
-
if (depth > MAX_DEPTH) throw new Error("Schema or value exceeds the nesting limit.");
|
|
1528
|
-
if (Array.isArray(value)) {
|
|
1529
|
-
for (const entry of value) walk(entry, schemaMode, depth + 1);
|
|
1530
|
-
return;
|
|
1531
|
-
}
|
|
1532
|
-
if (value === null || typeof value !== "object") return;
|
|
1533
|
-
for (const [key, entry] of Object.entries(value)) {
|
|
1534
|
-
if (["__proto__", "constructor", "prototype"].includes(key)) {
|
|
1535
|
-
throw new Error(`Forbidden object key: ${key}`);
|
|
1536
|
-
}
|
|
1537
|
-
if (schemaMode && key === "$ref" && typeof entry === "string" && !entry.startsWith("#/")) {
|
|
1538
|
-
throw new Error("Remote or recursive schema references are unsupported.");
|
|
1539
|
-
}
|
|
1540
|
-
if (schemaMode && (key === "pattern" && typeof entry === "string" || key === "patternProperties")) {
|
|
1541
|
-
throw new Error("Regular-expression schema constraints are unsupported.");
|
|
1542
|
-
}
|
|
1543
|
-
walk(entry, schemaMode, depth + 1);
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
var validators = /* @__PURE__ */ new Map();
|
|
1547
|
-
function compile(schema, { allErrors = false, ignoreUnknown = false, project = false } = {}) {
|
|
1548
|
-
if (Buffer.byteLength(stable(schema)) > MAX_SCHEMA_BYTES) {
|
|
1549
|
-
throw new Error("Schema exceeds its size limit.");
|
|
1550
|
-
}
|
|
1551
|
-
const key = `${canonicalHash(schema)}${allErrors ? ":all" : ""}${ignoreUnknown ? ":lenient" : ""}${project ? ":project" : ""}`;
|
|
1552
|
-
const cached = validators.get(key);
|
|
1553
|
-
if (cached !== void 0) return cached;
|
|
1554
|
-
walk(schema, true);
|
|
1555
|
-
const options = {
|
|
1556
|
-
strict: true,
|
|
1557
|
-
strictTypes: false,
|
|
1558
|
-
strictTuples: false,
|
|
1559
|
-
strictRequired: false,
|
|
1560
|
-
...ignoreUnknown ? { strictSchema: false, logger: false } : {},
|
|
1561
|
-
allErrors,
|
|
1562
|
-
validateFormats: true,
|
|
1563
|
-
coerceTypes: false,
|
|
1564
|
-
useDefaults: false,
|
|
1565
|
-
removeAdditional: project ? "all" : false,
|
|
1566
|
-
allowUnionTypes: true
|
|
1567
|
-
};
|
|
1568
|
-
const ajv = schema.$schema === DRAFT_07 ? new import_ajv.default(options) : new import__.default(options);
|
|
1569
|
-
if (!ajv.getSchema(DRAFT_07)) ajv.addMetaSchema({ $id: DRAFT_07 });
|
|
1570
|
-
(0, import_ajv_formats.default)(ajv);
|
|
1571
|
-
const compiled = ajv.compile(schema);
|
|
1572
|
-
if (validators.size >= VALIDATOR_CACHE_LIMIT) {
|
|
1573
|
-
validators.delete(validators.keys().next().value);
|
|
1574
|
-
}
|
|
1575
|
-
validators.set(key, compiled);
|
|
1576
|
-
return compiled;
|
|
1577
|
-
}
|
|
1578
|
-
function checkValue(schema, value) {
|
|
1579
|
-
try {
|
|
1580
|
-
if (schema === null || typeof schema !== "object" || Array.isArray(schema)) {
|
|
1581
|
-
throw new Error("A schema must be a JSON Schema object.");
|
|
1582
|
-
}
|
|
1583
|
-
const validate = compile(schema);
|
|
1584
|
-
if (validate(value)) return { valid: true, errors: [] };
|
|
1585
|
-
return {
|
|
1586
|
-
valid: false,
|
|
1587
|
-
errors: (validate.errors ?? []).map(
|
|
1588
|
-
(e) => `${e.instancePath || "/"} ${e.message ?? "invalid"}`
|
|
1589
|
-
)
|
|
1590
|
-
};
|
|
1591
|
-
} catch (err) {
|
|
1592
|
-
return { valid: false, errors: [err instanceof Error ? err.message : String(err)] };
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
function withoutPatterns(value) {
|
|
1596
|
-
if (Array.isArray(value)) return value.map(withoutPatterns);
|
|
1597
|
-
if (value === null || typeof value !== "object") return value;
|
|
1598
|
-
return Object.fromEntries(
|
|
1599
|
-
Object.entries(value).filter(
|
|
1600
|
-
([key, entry]) => !(key === "pattern" && typeof entry === "string") && key !== "patternProperties"
|
|
1601
|
-
).map(([key, entry]) => [key, withoutPatterns(entry)])
|
|
1602
|
-
);
|
|
1603
|
-
}
|
|
1604
|
-
function describeProblem(error) {
|
|
1605
|
-
const at = error.instancePath.replace(/^\//, "").replaceAll("/", ".");
|
|
1606
|
-
const field = (name) => at ? `${at}.${name}` : name;
|
|
1607
|
-
const subject = at || "the input";
|
|
1608
|
-
const { params } = error;
|
|
1609
|
-
switch (error.keyword) {
|
|
1610
|
-
case "required":
|
|
1611
|
-
return `${field(String(params.missingProperty))} is required`;
|
|
1612
|
-
case "additionalProperties":
|
|
1613
|
-
return `${subject} has no field ${JSON.stringify(params.additionalProperty)}`;
|
|
1614
|
-
case "enum":
|
|
1615
|
-
return `${subject} must be one of ${params.allowedValues.map((v) => JSON.stringify(v)).join(", ")}`;
|
|
1616
|
-
case "const":
|
|
1617
|
-
return `${subject} must be ${JSON.stringify(params.allowedValue)}`;
|
|
1618
|
-
case "type":
|
|
1619
|
-
return `${subject} must be ${String(params.type)}`;
|
|
1620
|
-
default:
|
|
1621
|
-
return `${subject} ${error.message ?? "is invalid"}`;
|
|
1622
|
-
}
|
|
1623
|
-
}
|
|
1624
|
-
function inputProblems(schema, value) {
|
|
1625
|
-
if (schema === null || typeof schema !== "object" || Array.isArray(schema)) return void 0;
|
|
1626
|
-
let validate;
|
|
1627
|
-
try {
|
|
1628
|
-
validate = compile(withoutPatterns(schema), {
|
|
1629
|
-
allErrors: true,
|
|
1630
|
-
ignoreUnknown: true
|
|
1631
|
-
});
|
|
1632
|
-
} catch {
|
|
1633
|
-
return void 0;
|
|
1634
|
-
}
|
|
1635
|
-
try {
|
|
1636
|
-
const json = JSON.stringify(value);
|
|
1637
|
-
if (json === void 0 || Buffer.byteLength(json) > MAX_VALUE_BYTES) {
|
|
1638
|
-
return ["the input is not JSON, or exceeds its size limit"];
|
|
1639
|
-
}
|
|
1640
|
-
walk(value, false);
|
|
1641
|
-
} catch (err) {
|
|
1642
|
-
return [err instanceof Error ? err.message : String(err)];
|
|
1643
|
-
}
|
|
1644
|
-
if (validate(value)) return [];
|
|
1645
|
-
return [...new Set((validate.errors ?? []).map(describeProblem))];
|
|
1646
|
-
}
|
|
1647
|
-
function assertResultSchema(schema) {
|
|
1648
|
-
if (schema === null || typeof schema !== "object" || Array.isArray(schema)) {
|
|
1649
|
-
throw new Error("A result success schema must be a JSON Schema object.");
|
|
1650
|
-
}
|
|
1651
|
-
compile(schema);
|
|
1652
|
-
}
|
|
1653
|
-
function preview(body) {
|
|
1654
|
-
const flat = mask(body).replace(/\s+/g, " ").trim();
|
|
1655
|
-
return flat.length <= 300 ? flat : `${flat.slice(0, 300)}\u2026`;
|
|
1656
|
-
}
|
|
1657
|
-
function validateResultBody(schema, body) {
|
|
1658
|
-
const bytes = Buffer.byteLength(body);
|
|
1659
|
-
const base = () => ({ json: false, bytes, maxBytes: MAX_BODY_BYTES, preview: preview(body) });
|
|
1660
|
-
if (bytes > MAX_BODY_BYTES) {
|
|
1661
|
-
return {
|
|
1662
|
-
valid: false,
|
|
1663
|
-
unvalidated: true,
|
|
1664
|
-
reason: `The result is ${bytes} bytes, over the ${MAX_BODY_BYTES} byte validation limit, so its success schema was not checked.`,
|
|
1665
|
-
diagnosis: { ...base(), failed: "too-large" }
|
|
1666
|
-
};
|
|
1667
|
-
}
|
|
1668
|
-
let value;
|
|
1669
|
-
try {
|
|
1670
|
-
value = JSON.parse(body);
|
|
1671
|
-
walk(value, false);
|
|
1672
|
-
} catch (err) {
|
|
1673
|
-
return {
|
|
1674
|
-
valid: false,
|
|
1675
|
-
reason: `The result is not a supported bounded JSON document (${err instanceof Error ? err.message : String(err)}).`,
|
|
1676
|
-
diagnosis: { ...base(), failed: "not-json" }
|
|
1677
|
-
};
|
|
1678
|
-
}
|
|
1679
|
-
const check = checkValue(schema, value);
|
|
1680
|
-
if (check.valid) return { valid: true };
|
|
1681
|
-
const failed = check.errors[0] ?? "the success rule";
|
|
1682
|
-
return {
|
|
1683
|
-
valid: false,
|
|
1684
|
-
reason: `The result does not satisfy its success schema: ${failed}`,
|
|
1685
|
-
diagnosis: { ...base(), json: true, failed }
|
|
1686
|
-
};
|
|
1687
|
-
}
|
|
1688
|
-
function projectBody(schema, body) {
|
|
1689
|
-
if (schema === null || typeof schema !== "object" || Array.isArray(schema)) return void 0;
|
|
1690
|
-
if (Buffer.byteLength(body) > MAX_BODY_BYTES) return void 0;
|
|
1691
|
-
try {
|
|
1692
|
-
const value = JSON.parse(body);
|
|
1693
|
-
walk(value, false);
|
|
1694
|
-
const project = compile(withoutPatterns(schema), {
|
|
1695
|
-
allErrors: true,
|
|
1696
|
-
ignoreUnknown: true,
|
|
1697
|
-
project: true
|
|
1698
|
-
});
|
|
1699
|
-
project(value);
|
|
1700
|
-
return { value };
|
|
1701
|
-
} catch {
|
|
1702
|
-
return void 0;
|
|
1703
|
-
}
|
|
1704
|
-
}
|
|
1705
|
-
|
|
1706
633
|
// src/lib/spend-gate.ts
|
|
1707
634
|
async function gateSpend(input) {
|
|
1708
635
|
const { authorizer, amountAtomic } = input;
|
|
@@ -1967,6 +894,11 @@ function isLowFundsRefusal(err) {
|
|
|
1967
894
|
return err.code === "PAYMENT_FAILED" && err.message === LOW_FUNDS_MESSAGE;
|
|
1968
895
|
}
|
|
1969
896
|
async function runPay(args, ctx, deps = {}) {
|
|
897
|
+
if (isModelWorkerProcess())
|
|
898
|
+
throw new CliError(
|
|
899
|
+
"REFUSED",
|
|
900
|
+
"Nested Tenjin payments are unavailable inside a model worker; use the native tools."
|
|
901
|
+
);
|
|
1970
902
|
const warnings = [];
|
|
1971
903
|
try {
|
|
1972
904
|
return await executePay(args, ctx, deps, warnings);
|
|
@@ -1985,7 +917,15 @@ async function runPay(args, ctx, deps = {}) {
|
|
|
1985
917
|
throw err;
|
|
1986
918
|
}
|
|
1987
919
|
}
|
|
920
|
+
function checkPaymentActive(signal) {
|
|
921
|
+
if (signal?.aborted)
|
|
922
|
+
throw new CliError("REFUSED", "The request was stopped before payment was sent.", {
|
|
923
|
+
details: { reason: "cancelled" }
|
|
924
|
+
});
|
|
925
|
+
}
|
|
1988
926
|
async function executePay(args, ctx, deps, warnings) {
|
|
927
|
+
const { signal } = deps;
|
|
928
|
+
checkPaymentActive(signal);
|
|
1989
929
|
const router = args.execution === "router" || args.terms !== void 0;
|
|
1990
930
|
if (router) {
|
|
1991
931
|
const terms = args.terms;
|
|
@@ -2030,32 +970,49 @@ async function executePay(args, ctx, deps, warnings) {
|
|
|
2030
970
|
...deps.fetchImpl !== void 0 ? { fetchImpl: deps.fetchImpl } : {},
|
|
2031
971
|
...body,
|
|
2032
972
|
...Object.keys(headers).length > 0 ? { headers } : {},
|
|
2033
|
-
// A
|
|
2034
|
-
//
|
|
2035
|
-
|
|
973
|
+
// A call can buy a file (a sound, an image): its bytes are kept whole,
|
|
974
|
+
// never decoded as text. The router's tool saves them itself; a direct
|
|
975
|
+
// pay writes them to a file and hands back its path (`keepBody`).
|
|
976
|
+
binaryBody: true,
|
|
2036
977
|
...args.maxBytes !== void 0 ? { maxBinaryBytes: args.maxBytes } : {},
|
|
2037
978
|
method
|
|
2038
979
|
};
|
|
2039
|
-
const
|
|
980
|
+
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
981
|
+
const prepaymentFetchOpts = signal === void 0 ? fetchOpts : {
|
|
982
|
+
...fetchOpts,
|
|
983
|
+
fetchImpl: ((input, init) => {
|
|
984
|
+
checkPaymentActive(signal);
|
|
985
|
+
return fetchImpl(input, {
|
|
986
|
+
...init,
|
|
987
|
+
signal: init?.signal ? AbortSignal.any([signal, init.signal]) : signal
|
|
988
|
+
});
|
|
989
|
+
})
|
|
990
|
+
};
|
|
991
|
+
checkPaymentActive(signal);
|
|
992
|
+
const probe = await httpRequest(url, prepaymentFetchOpts);
|
|
993
|
+
checkPaymentActive(signal);
|
|
2040
994
|
if (!probe.ok) {
|
|
2041
995
|
throw fetchFailureToCliError(probe, {
|
|
2042
996
|
fix: `Nothing was sent and nothing was paid. ${legFix(probe)}`
|
|
2043
997
|
});
|
|
2044
998
|
}
|
|
999
|
+
const keep = async (res) => router ? void 0 : args.quote === true ? describeBody(res) : keepBody(ctx.dataDir, url, res);
|
|
2045
1000
|
if (probe.status >= 200 && probe.status < 300) {
|
|
2046
1001
|
const caveat = assertUsableResult(args.resultSchema, probe.text, probe.status, "free");
|
|
2047
1002
|
args.onPaidLeg?.({ status: probe.status, header: probe.header });
|
|
1003
|
+
const saved = await keep(probe);
|
|
2048
1004
|
return deliver(url, lane, probe, {
|
|
2049
1005
|
paid: false,
|
|
2050
1006
|
...caveat !== void 0 ? { caveat } : {},
|
|
1007
|
+
...saved !== void 0 ? { saved } : {},
|
|
2051
1008
|
printBody: args.printBody === true
|
|
2052
1009
|
});
|
|
2053
1010
|
}
|
|
2054
1011
|
if (probe.status !== 402) {
|
|
2055
|
-
const
|
|
1012
|
+
const said2 = providerMessage(probe.json);
|
|
2056
1013
|
throw new CliError(
|
|
2057
1014
|
"API_UNREACHABLE",
|
|
2058
|
-
`${url} answered ${probe.status}${
|
|
1015
|
+
`${url} answered ${probe.status}${said2 === null ? "." : `: ${said2}`}`,
|
|
2059
1016
|
{
|
|
2060
1017
|
fix: probe.status === 404 ? "Nothing was paid. The same request will answer 404 again." : "Check the URL and the endpoint status, then retry.",
|
|
2061
1018
|
details: { status: probe.status, body: probe.json, ...providerError(probe.text) }
|
|
@@ -2078,6 +1035,68 @@ async function executePay(args, ctx, deps, warnings) {
|
|
|
2078
1035
|
if (args.quote === true) {
|
|
2079
1036
|
return deliverQuote(url, lane, probe, paymentRequired, requirement, args.printBody === true);
|
|
2080
1037
|
}
|
|
1038
|
+
const signIn = router ? void 0 : signInOnlyChallenge(paymentRequired);
|
|
1039
|
+
if (signIn !== void 0) {
|
|
1040
|
+
if (method !== "GET") {
|
|
1041
|
+
throw new CliError(
|
|
1042
|
+
"REFUSED",
|
|
1043
|
+
`${new URL(url).host} asks the wallet that paid it to sign in, and nothing was signed: a sign-in answers only a GET, and this is a ${method}.`,
|
|
1044
|
+
{
|
|
1045
|
+
fix: "Nothing was signed or paid. Fetch the result with a plain GET (no -X, no body).",
|
|
1046
|
+
details: { status: 402, reason: "sign_in_method", signIn: true }
|
|
1047
|
+
}
|
|
1048
|
+
);
|
|
1049
|
+
}
|
|
1050
|
+
const provider2 = resolveWalletProvider(
|
|
1051
|
+
ctx,
|
|
1052
|
+
deps.provider !== void 0 ? { provider: deps.provider } : {}
|
|
1053
|
+
);
|
|
1054
|
+
const answer = await answerSignInChallenge(paymentRequired, signIn, url, {
|
|
1055
|
+
address: async () => (await describeOpenable(provider2)).address,
|
|
1056
|
+
paidHost: (host2, address) => walletPaidHost(ctx.dataDir, host2, address),
|
|
1057
|
+
signer: () => openWallet(provider2)
|
|
1058
|
+
});
|
|
1059
|
+
if ("refused" in answer) {
|
|
1060
|
+
throw new CliError(
|
|
1061
|
+
"REFUSED",
|
|
1062
|
+
`${new URL(url).host} asks the wallet that paid it to sign in, and nothing was signed: ${answer.reason}.`,
|
|
1063
|
+
{
|
|
1064
|
+
fix: answer.refused === "unpaid" ? "Nothing was signed or paid. This seller returns the result only to the wallet that paid for it; sign in from that wallet." : answer.refused === "payer_unknown" ? "Nothing was signed or paid. The payment was recorded before this CLI kept the wallet that paid, so it cannot show this wallet paid; `tenjin payments` lists it." : "Nothing was signed or paid.",
|
|
1065
|
+
details: { status: 402, reason: `sign_in_${answer.refused}`, signIn: true }
|
|
1066
|
+
}
|
|
1067
|
+
);
|
|
1068
|
+
}
|
|
1069
|
+
const signed = await httpRequest(url, {
|
|
1070
|
+
...prepaymentFetchOpts,
|
|
1071
|
+
headers: { ...headers, ...answer.headers }
|
|
1072
|
+
});
|
|
1073
|
+
checkPaymentActive(signal);
|
|
1074
|
+
if (!signed.ok) {
|
|
1075
|
+
throw fetchFailureToCliError(signed, {
|
|
1076
|
+
fix: `Nothing was paid: the request carried a sign-in, not a payment. ${legFix(signed)}`
|
|
1077
|
+
});
|
|
1078
|
+
}
|
|
1079
|
+
if (signed.status >= 200 && signed.status < 300) {
|
|
1080
|
+
const caveat = assertUsableResult(args.resultSchema, signed.text, signed.status, "signed-in");
|
|
1081
|
+
const saved = await keep(signed);
|
|
1082
|
+
return deliver(url, lane, signed, {
|
|
1083
|
+
paid: false,
|
|
1084
|
+
signedIn: true,
|
|
1085
|
+
...caveat !== void 0 ? { caveat } : {},
|
|
1086
|
+
...saved !== void 0 ? { saved } : {},
|
|
1087
|
+
printBody: args.printBody === true
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
const said2 = providerMessage(signed.json);
|
|
1091
|
+
throw new CliError(
|
|
1092
|
+
"API_UNREACHABLE",
|
|
1093
|
+
signed.status === 402 ? `${new URL(url).host} did not accept this wallet's sign-in.` : `${url} answered ${signed.status} to this wallet's sign-in${said2 === null ? "." : `: ${said2}`}`,
|
|
1094
|
+
{
|
|
1095
|
+
fix: "Nothing was paid: the request carried a sign-in, not a payment. This seller returns the result only to the wallet that paid for it.",
|
|
1096
|
+
details: { status: signed.status, body: signed.json, ...providerError(signed.text) }
|
|
1097
|
+
}
|
|
1098
|
+
);
|
|
1099
|
+
}
|
|
2081
1100
|
if (requirement === void 0) {
|
|
2082
1101
|
throw noMatchingEntry(paymentRequired, args.terms);
|
|
2083
1102
|
}
|
|
@@ -2097,13 +1116,16 @@ async function executePay(args, ctx, deps, warnings) {
|
|
|
2097
1116
|
);
|
|
2098
1117
|
}
|
|
2099
1118
|
const entitlement = paymentRequired.extensions?.[SIGN_IN_WITH_X] !== void 0;
|
|
1119
|
+
checkPaymentActive(signal);
|
|
2100
1120
|
let slot = router && !entitlement ? await args.admit(firstSeenAmount) : void 0;
|
|
1121
|
+
checkPaymentActive(signal);
|
|
2101
1122
|
const provider = resolveWalletProvider(
|
|
2102
1123
|
ctx,
|
|
2103
1124
|
deps.provider !== void 0 ? { provider: deps.provider } : {}
|
|
2104
1125
|
);
|
|
2105
1126
|
const signer = await openWallet(provider);
|
|
2106
1127
|
openedSigner.current = signer;
|
|
1128
|
+
checkPaymentActive(signal);
|
|
2107
1129
|
let effectiveChallenge = paymentRequired;
|
|
2108
1130
|
let effectiveRequirement = requirement;
|
|
2109
1131
|
if (entitlement) {
|
|
@@ -2112,9 +1134,10 @@ async function executePay(args, ctx, deps, warnings) {
|
|
|
2112
1134
|
chainId: requirement.network
|
|
2113
1135
|
});
|
|
2114
1136
|
const recheck = await httpRequest(url, {
|
|
2115
|
-
...
|
|
1137
|
+
...prepaymentFetchOpts,
|
|
2116
1138
|
headers: { ...headers, [SIWX_HEADER]: siwxHeader }
|
|
2117
1139
|
});
|
|
1140
|
+
checkPaymentActive(signal);
|
|
2118
1141
|
if (!recheck.ok) throw fetchFailureToCliError(recheck);
|
|
2119
1142
|
if (recheck.status >= 200 && recheck.status < 300) {
|
|
2120
1143
|
const caveat = assertUsableResult(
|
|
@@ -2124,10 +1147,12 @@ async function executePay(args, ctx, deps, warnings) {
|
|
|
2124
1147
|
"entitled"
|
|
2125
1148
|
);
|
|
2126
1149
|
args.onPaidLeg?.({ status: recheck.status, header: recheck.header });
|
|
1150
|
+
const saved = await keep(recheck);
|
|
2127
1151
|
return deliver(url, lane, recheck, {
|
|
2128
1152
|
paid: false,
|
|
2129
1153
|
entitled: true,
|
|
2130
1154
|
...caveat !== void 0 ? { caveat } : {},
|
|
1155
|
+
...saved !== void 0 ? { saved } : {},
|
|
2131
1156
|
printBody: args.printBody === true
|
|
2132
1157
|
});
|
|
2133
1158
|
}
|
|
@@ -2176,6 +1201,7 @@ async function executePay(args, ctx, deps, warnings) {
|
|
|
2176
1201
|
}
|
|
2177
1202
|
}
|
|
2178
1203
|
const amountAtomic = BigInt(effectiveRequirement.amount);
|
|
1204
|
+
checkPaymentActive(signal);
|
|
2179
1205
|
if (router && entitlement) slot = await args.admit(amountAtomic);
|
|
2180
1206
|
if (router) {
|
|
2181
1207
|
const refusal2 = spendSlot(slot, amountAtomic);
|
|
@@ -2210,6 +1236,7 @@ async function executePay(args, ctx, deps, warnings) {
|
|
|
2210
1236
|
const verifiedVia = registry ?? termsLabel;
|
|
2211
1237
|
const via = verifiedVia !== void 0 ? ` (${sanitizeForTerminal(verifiedVia)})` : "";
|
|
2212
1238
|
const mode = router && !approved ? "automatic" : "manual";
|
|
1239
|
+
checkPaymentActive(signal);
|
|
2213
1240
|
const reservationId = await gateSpend({
|
|
2214
1241
|
mode,
|
|
2215
1242
|
ctx,
|
|
@@ -2226,6 +1253,7 @@ async function executePay(args, ctx, deps, warnings) {
|
|
|
2226
1253
|
});
|
|
2227
1254
|
let payment;
|
|
2228
1255
|
try {
|
|
1256
|
+
checkPaymentActive(signal);
|
|
2229
1257
|
payment = await buildExactPayment(effectiveChallenge, signer, effectiveRequirement);
|
|
2230
1258
|
} catch (err) {
|
|
2231
1259
|
await authorizer.release(reservationId);
|
|
@@ -2235,16 +1263,29 @@ async function executePay(args, ctx, deps, warnings) {
|
|
|
2235
1263
|
effectiveRequirement,
|
|
2236
1264
|
Math.max(legTimeoutMs, ctx.flags.timeout)
|
|
2237
1265
|
);
|
|
1266
|
+
let transmitted = false;
|
|
2238
1267
|
const paid = await httpRequest(url, {
|
|
2239
1268
|
...fetchOpts,
|
|
2240
1269
|
timeoutMs: paidTimeoutMs,
|
|
2241
|
-
headers: { ...headers, ...payment.headers }
|
|
1270
|
+
headers: { ...headers, ...payment.headers },
|
|
1271
|
+
...signal !== void 0 ? {
|
|
1272
|
+
fetchImpl: ((input, init) => {
|
|
1273
|
+
checkPaymentActive(signal);
|
|
1274
|
+
transmitted = true;
|
|
1275
|
+
return fetchImpl(input, init);
|
|
1276
|
+
})
|
|
1277
|
+
} : {}
|
|
2242
1278
|
});
|
|
1279
|
+
if (!transmitted && signal?.aborted) {
|
|
1280
|
+
await authorizer.release(reservationId);
|
|
1281
|
+
checkPaymentActive(signal);
|
|
1282
|
+
}
|
|
2243
1283
|
await authorizer.commit(reservationId, payment.amountAtomic, {
|
|
2244
1284
|
mode,
|
|
2245
1285
|
...payment.authorization !== void 0 ? { nonce: payment.authorization.nonce } : {}
|
|
2246
1286
|
});
|
|
2247
|
-
|
|
1287
|
+
notePaymentSent();
|
|
1288
|
+
const recordDirect = async (entry) => {
|
|
2248
1289
|
if (router) return;
|
|
2249
1290
|
await appendPaidRecord(ctx.dataDir, {
|
|
2250
1291
|
version: 1,
|
|
@@ -2254,11 +1295,33 @@ async function executePay(args, ctx, deps, warnings) {
|
|
|
2254
1295
|
url,
|
|
2255
1296
|
sent: recordedSent(args.data ?? args.dataRaw ?? ""),
|
|
2256
1297
|
amountAtomic: payment.amountAtomic.toString(),
|
|
2257
|
-
|
|
2258
|
-
|
|
1298
|
+
...entry.txHash !== void 0 ? { txHash: entry.txHash } : {},
|
|
1299
|
+
...entry.reportedTxHash !== void 0 ? { reportedTxHash: entry.reportedTxHash } : {},
|
|
1300
|
+
settlement: entry.settlement,
|
|
1301
|
+
savedFiles: entry.savedFiles ?? [],
|
|
1302
|
+
payer: payment.payer,
|
|
2259
1303
|
...payment.authorization !== void 0 ? { authorization: payment.authorization } : {}
|
|
2260
1304
|
});
|
|
2261
1305
|
};
|
|
1306
|
+
const failedSettlement = async (header) => {
|
|
1307
|
+
const reportedTxHash2 = header !== void 0 ? settledTx({ header }) : void 0;
|
|
1308
|
+
const tx = reportedTxHash2 !== void 0 ? { reportedTxHash: reportedTxHash2 } : {};
|
|
1309
|
+
const settlement2 = await chargedOnChain(payment.authorization, settings.rpcUrl, {
|
|
1310
|
+
...(deps.chainFetch ?? deps.fetchImpl) !== void 0 ? { fetchImpl: deps.chainFetch ?? deps.fetchImpl } : {}
|
|
1311
|
+
});
|
|
1312
|
+
if (settlement2 === "settled") {
|
|
1313
|
+
return {
|
|
1314
|
+
settlement: settlement2,
|
|
1315
|
+
...tx,
|
|
1316
|
+
charged: "The chain shows the authorization was used, so it was charged."
|
|
1317
|
+
};
|
|
1318
|
+
}
|
|
1319
|
+
return reportedTxHash2 !== void 0 ? {
|
|
1320
|
+
settlement: settlement2,
|
|
1321
|
+
...tx,
|
|
1322
|
+
reported: `The seller reports a charge (tx ${reportedTxHash2}), but the chain does not show it yet. Check \`tenjin payments\` before paying again.`
|
|
1323
|
+
} : { settlement: settlement2 };
|
|
1324
|
+
};
|
|
2262
1325
|
if (paid.ok || paid.header !== void 0) {
|
|
2263
1326
|
args.onPaidLeg?.({
|
|
2264
1327
|
...paid.status !== void 0 ? { status: paid.status } : {},
|
|
@@ -2267,27 +1330,33 @@ async function executePay(args, ctx, deps, warnings) {
|
|
|
2267
1330
|
}
|
|
2268
1331
|
if (!paid.ok) {
|
|
2269
1332
|
const statusUrl = paid.kind === "timeout" ? statusUrlOf(paid, url) : null;
|
|
2270
|
-
await
|
|
1333
|
+
const { settlement: settlement2, reportedTxHash: reportedTxHash2, charged: charged2, reported: reported2 } = await failedSettlement(paid.header);
|
|
1334
|
+
await recordDirect({ settlement: settlement2, ...reportedTxHash2 !== void 0 ? { reportedTxHash: reportedTxHash2 } : {} });
|
|
1335
|
+
const known2 = charged2 ?? reported2;
|
|
2271
1336
|
if (statusUrl !== null) {
|
|
2272
1337
|
throw new CliError(
|
|
2273
1338
|
"NETWORK_ERROR",
|
|
2274
1339
|
`The seller is still working on this: no result within ${Math.round(paidTimeoutMs / 1e3)} s, and it named a status URL to check: ${statusUrl}`,
|
|
2275
1340
|
{
|
|
2276
|
-
fix: "The authorization was transmitted and settlement is unknown until the job ends; it is recorded as transmitted exposure. Do not pay again: check the status URL for the result.",
|
|
1341
|
+
fix: (known2 !== void 0 ? `${known2} ` : "The authorization was transmitted and settlement is unknown until the job ends; it is recorded as transmitted exposure. ") + "Do not pay again: check the status URL for the result.",
|
|
2277
1342
|
details: {
|
|
2278
1343
|
statusUrl,
|
|
2279
1344
|
amountAtomic: payment.amountAtomic.toString(),
|
|
2280
|
-
settlement:
|
|
1345
|
+
settlement: settlement2,
|
|
1346
|
+
...reportedTxHash2 !== void 0 ? { reportedTxHash: reportedTxHash2 } : {},
|
|
1347
|
+
payer: payment.payer,
|
|
2281
1348
|
...payment.authorization !== void 0 ? { authorization: payment.authorization } : {}
|
|
2282
1349
|
}
|
|
2283
1350
|
}
|
|
2284
1351
|
);
|
|
2285
1352
|
}
|
|
2286
1353
|
throw fetchFailureToCliError(paid, {
|
|
2287
|
-
fix: `The authorization was transmitted and settlement is unknown; it is recorded as transmitted exposure. Do not simply retry: each attempt signs a fresh authorization. ${legFix(paid)}`,
|
|
1354
|
+
fix: (known2 !== void 0 ? `The authorization was transmitted. ${known2} ` : "The authorization was transmitted and settlement is unknown; it is recorded as transmitted exposure. ") + `Do not simply retry: each attempt signs a fresh authorization. ${legFix(paid)}`,
|
|
2288
1355
|
details: {
|
|
2289
1356
|
amountAtomic: payment.amountAtomic.toString(),
|
|
2290
|
-
settlement:
|
|
1357
|
+
settlement: settlement2,
|
|
1358
|
+
...reportedTxHash2 !== void 0 ? { reportedTxHash: reportedTxHash2 } : {},
|
|
1359
|
+
payer: payment.payer,
|
|
2291
1360
|
...payment.authorization !== void 0 ? { authorization: payment.authorization } : {}
|
|
2292
1361
|
}
|
|
2293
1362
|
});
|
|
@@ -2299,35 +1368,53 @@ async function executePay(args, ctx, deps, warnings) {
|
|
|
2299
1368
|
if (check.unvalidated === true) caveat = unvalidatedCaveat(check);
|
|
2300
1369
|
else if (!check.valid) caveat = failedRuleCaveat(check);
|
|
2301
1370
|
}
|
|
1371
|
+
const saved = await keep(paid);
|
|
1372
|
+
const txHash = settlementTx(paid);
|
|
1373
|
+
await recordDirect({
|
|
1374
|
+
settlement: txHash !== void 0 ? "settled" : "unknown",
|
|
1375
|
+
...txHash !== void 0 ? { txHash } : {},
|
|
1376
|
+
savedFiles: saved?.savedTo !== void 0 ? [saved.savedTo] : []
|
|
1377
|
+
});
|
|
2302
1378
|
return deliver(url, lane, paid, {
|
|
2303
1379
|
paid: true,
|
|
2304
1380
|
warnings,
|
|
2305
1381
|
amountAtomic: payment.amountAtomic,
|
|
2306
1382
|
requirement: effectiveRequirement,
|
|
1383
|
+
payer: payment.payer,
|
|
2307
1384
|
...payment.authorization !== void 0 ? { authorization: payment.authorization } : {},
|
|
2308
1385
|
...registry !== void 0 ? { registry } : {},
|
|
2309
1386
|
...caveat !== void 0 ? { caveat } : {},
|
|
1387
|
+
...saved !== void 0 ? { saved } : {},
|
|
2310
1388
|
printBody: args.printBody === true
|
|
2311
1389
|
});
|
|
2312
1390
|
}
|
|
1391
|
+
const { settlement, reportedTxHash, charged, reported } = await failedSettlement(paid.header);
|
|
1392
|
+
await recordDirect({ settlement, ...reportedTxHash !== void 0 ? { reportedTxHash } : {} });
|
|
1393
|
+
const known = charged ?? reported;
|
|
2313
1394
|
const refusal = settlementRefusal(paid);
|
|
2314
|
-
const
|
|
1395
|
+
const sellerShort = paymentShortOfFunds(paid);
|
|
1396
|
+
const paymentError = paymentRequiredError(payer.http, paid);
|
|
1397
|
+
const lowFunds = sellerShort && known === void 0;
|
|
2315
1398
|
if (lowFunds) markShortOfFunds(slot);
|
|
2316
|
-
|
|
1399
|
+
const said = sellerShort ? known !== void 0 ? "The seller said the wallet does not hold enough USDC for this payment." : LOW_FUNDS_MESSAGE : refusal !== void 0 ? `The endpoint did not settle the payment${refusal.reason !== void 0 ? `: ${refusal.reason.replace(/\.+$/, "")}` : ""}.` : paid.status === 402 ? `Payment was not accepted by the endpoint${paymentError !== void 0 ? `: ${paymentError.replace(/\.+$/, "")}` : ""}.` : known !== void 0 ? `The endpoint answered ${paid.status} on the paid request.` : `The endpoint answered ${paid.status} on the paid request; whether it settled is unknown.`;
|
|
2317
1400
|
throw new CliError(
|
|
2318
1401
|
"PAYMENT_FAILED",
|
|
2319
|
-
|
|
1402
|
+
charged !== void 0 ? `The payment was charged, and the endpoint answered ${paid.status} with no result. ${charged}` : reported !== void 0 ? `The endpoint answered ${paid.status} with no result. ${reported}` : said,
|
|
2320
1403
|
{
|
|
2321
|
-
fix: lowFunds ? `Ask the person once to add funds; on yes, run \`tenjin fund\`. ${LOW_FUNDS_TAIL}` : refusal !== void 0 ? "The seller reported that nothing settled, but the signed authorization stays valid until it expires, so it is recorded as transmitted exposure. Do not simply retry: each attempt signs a fresh authorization. Use a different service for this." : "The signed payment already left and is recorded as transmitted exposure; the endpoint may still settle it. Do not simply retry: each attempt signs a fresh authorization. Verify the endpoint (and this listing, if Bazaar) before paying again.",
|
|
1404
|
+
fix: charged !== void 0 ? "The payment was charged and is recorded as settled. Do not simply retry: each attempt pays again. Read the seller's reason in the details, fix the request, and quote again." : reported !== void 0 ? "The payment is recorded as transmitted exposure until the chain shows it taken. Do not simply retry: each attempt signs a fresh authorization. Read the seller's reason in the details, fix the request, and quote again." : lowFunds ? `Ask the person once to add funds; on yes, run \`tenjin fund\`. ${LOW_FUNDS_TAIL}` : refusal !== void 0 ? "The seller reported that nothing settled, but the signed authorization stays valid until it expires, so it is recorded as transmitted exposure. Do not simply retry: each attempt signs a fresh authorization. Use a different service for this." : "The signed payment already left and is recorded as transmitted exposure; the endpoint may still settle it. Do not simply retry: each attempt signs a fresh authorization. Verify the endpoint (and this listing, if Bazaar) before paying again.",
|
|
2322
1405
|
// The amount rides on the failure so a caller can report what is at risk
|
|
2323
|
-
// rather than a zero.
|
|
1406
|
+
// rather than a zero.
|
|
2324
1407
|
details: {
|
|
2325
1408
|
status: paid.status,
|
|
2326
1409
|
body: paid.json,
|
|
2327
1410
|
...providerError(paid.text),
|
|
1411
|
+
...known !== void 0 ? { sellerReason: said } : {},
|
|
1412
|
+
...paymentError !== void 0 ? { paymentError } : {},
|
|
2328
1413
|
...refusal?.reason !== void 0 ? { settlementError: refusal.reason } : {},
|
|
2329
1414
|
amountAtomic: payment.amountAtomic.toString(),
|
|
2330
|
-
settlement
|
|
1415
|
+
settlement,
|
|
1416
|
+
...reportedTxHash !== void 0 ? { reportedTxHash } : {},
|
|
1417
|
+
payer: payment.payer,
|
|
2331
1418
|
...payment.authorization !== void 0 ? { authorization: payment.authorization } : {}
|
|
2332
1419
|
}
|
|
2333
1420
|
}
|
|
@@ -2636,7 +1723,10 @@ function sellerLine(text) {
|
|
|
2636
1723
|
return chars.length <= PROVIDER_ERROR_CHARS ? flat : `${chars.slice(0, PROVIDER_ERROR_CHARS).join("")}\u2026`;
|
|
2637
1724
|
}
|
|
2638
1725
|
function noMatchingEntry(challenge, terms) {
|
|
2639
|
-
|
|
1726
|
+
const unsupportedMethod = challenge.accepts.some(
|
|
1727
|
+
(a) => !signsEip3009(a) && (terms?.network === void 0 || a.network === terms.network)
|
|
1728
|
+
);
|
|
1729
|
+
if (terms === void 0 || terms.network === void 0 && terms.asset === void 0 || unsupportedMethod) {
|
|
2640
1730
|
return noPayableRequirement(challenge.accepts);
|
|
2641
1731
|
}
|
|
2642
1732
|
const advertised = challenge.accepts.map((a) => `${a.scheme}/${a.network}/${a.asset}`);
|
|
@@ -2727,6 +1817,7 @@ function deliverQuote(url, lane, res, challenge, chosen, printBody) {
|
|
|
2727
1817
|
maxTimeoutSeconds: a.maxTimeoutSeconds,
|
|
2728
1818
|
...a.extra !== void 0 ? { extra: a.extra } : {}
|
|
2729
1819
|
}));
|
|
1820
|
+
const signIn = signInOnlyChallenge(challenge) !== void 0;
|
|
2730
1821
|
const data = {
|
|
2731
1822
|
url,
|
|
2732
1823
|
lane,
|
|
@@ -2735,17 +1826,18 @@ function deliverQuote(url, lane, res, challenge, chosen, printBody) {
|
|
|
2735
1826
|
quote: true,
|
|
2736
1827
|
resource: challenge.resource,
|
|
2737
1828
|
accepts,
|
|
1829
|
+
...signIn ? { signIn: true } : {},
|
|
2738
1830
|
...challenge.extensions !== void 0 ? { extensions: challenge.extensions } : {},
|
|
2739
1831
|
...res.json !== void 0 ? { body: res.json } : {},
|
|
2740
1832
|
bodyText: res.text
|
|
2741
1833
|
};
|
|
2742
1834
|
const host = sanitizeForTerminal(new URL(url).host);
|
|
2743
1835
|
const payable = accepts[chosenAt];
|
|
2744
|
-
const headline = payable?.usd !== void 0 ? `quote: ${payable.usd} USD to ${host} on ${sanitizeForTerminal(payable.network)} (nothing paid)` : accepts.length === 0 ? `quote: ${host} answered 402 with no payment option (nothing paid)` : `quote: ${host} lists no option this wallet can pay, only USDC on Base is supported (nothing paid)`;
|
|
1836
|
+
const headline = payable?.usd !== void 0 ? `quote: ${payable.usd} USD to ${host} on ${sanitizeForTerminal(payable.network)} (nothing paid)` : signIn ? `quote: ${host} asks the wallet that paid it to sign in, and lists no payment option (nothing paid)` : accepts.length === 0 ? `quote: ${host} answered 402 with no payment option (nothing paid)` : `quote: ${host} lists no option this wallet can pay, only USDC on Base is supported (nothing paid)`;
|
|
2745
1837
|
const body = sanitizeForTerminal(res.text);
|
|
2746
|
-
const
|
|
1838
|
+
const preview = printBody || body.length <= BODY_PREVIEW_CHARS ? body : `${body.slice(0, BODY_PREVIEW_CHARS)}
|
|
2747
1839
|
\u2026 truncated; run with --print-body or --json for the full body`;
|
|
2748
|
-
return { data, humanLines: [headline, ...
|
|
1840
|
+
return { data, humanLines: [headline, ...preview.length > 0 ? [preview] : []] };
|
|
2749
1841
|
}
|
|
2750
1842
|
function sameDeal(a, b) {
|
|
2751
1843
|
return a === b || a.scheme === b.scheme && a.network === b.network && a.asset.toLowerCase() === b.asset.toLowerCase() && a.amount === b.amount && a.payTo.toLowerCase() === b.payTo.toLowerCase();
|
|
@@ -2763,9 +1855,10 @@ function deliver(url, lane, res, opts) {
|
|
|
2763
1855
|
payTo: opts.requirement.payTo,
|
|
2764
1856
|
network: opts.requirement.network,
|
|
2765
1857
|
asset: opts.requirement.asset,
|
|
1858
|
+
payer: opts.payer,
|
|
2766
1859
|
...opts.authorization !== void 0 ? { authorization: opts.authorization } : {},
|
|
2767
1860
|
...opts.registry !== void 0 ? { registry: opts.registry } : {}
|
|
2768
|
-
} : opts.entitled === true ? { entitled: true } : {},
|
|
1861
|
+
} : opts.entitled === true ? { entitled: true } : opts.signedIn === true ? { signedIn: true } : {},
|
|
2769
1862
|
...settlementTxHash !== void 0 ? { settlementTxHash } : {},
|
|
2770
1863
|
// Beside the body, never instead of it: the caller gets the product AND the
|
|
2771
1864
|
// fact that its shape was never checked. The flag is what a machine reads:
|
|
@@ -2773,14 +1866,15 @@ function deliver(url, lane, res, opts) {
|
|
|
2773
1866
|
// is how an unchecked body passed for a checked one one layer up.
|
|
2774
1867
|
...opts.caveat !== void 0 ? { resultUnverified: true, resultCaveat: opts.caveat } : {},
|
|
2775
1868
|
// The body is the product: JSON when the endpoint spoke it, raw text always,
|
|
2776
|
-
// and
|
|
1869
|
+
// and, when it was a file, where a direct pay saved it, or the bytes
|
|
1870
|
+
// themselves for the router's tool to save.
|
|
2777
1871
|
...res.json !== void 0 ? { body: res.json } : {},
|
|
2778
1872
|
bodyText: res.text,
|
|
2779
|
-
...res.bytes !== void 0 ? { bodyBytes: res.bytes, contentType: res.header("content-type") ?? "" } : {}
|
|
1873
|
+
...opts.saved !== void 0 ? opts.saved : res.bytes !== void 0 ? { bodyBytes: res.bytes, contentType: res.header("content-type") ?? "" } : {}
|
|
2780
1874
|
};
|
|
2781
|
-
const headline = opts.paid ? `paid ${toMoney(opts.amountAtomic.toString()).usd} USD to ${sanitizeForTerminal(new URL(url).host)}` + (settlementTxHash !== void 0 ? ` (tx ${settlementTxHash})` : "") : opts.entitled === true ? `free (entitled, no charge)` : `free (${res.status}, no charge)`;
|
|
1875
|
+
const headline = opts.paid ? `paid ${toMoney(opts.amountAtomic.toString()).usd} USD to ${sanitizeForTerminal(new URL(url).host)}` + (settlementTxHash !== void 0 ? ` (tx ${settlementTxHash})` : "") : opts.entitled === true ? `free (entitled, no charge)` : opts.signedIn === true ? `free (signed in, no charge)` : `free (${res.status}, no charge)`;
|
|
2782
1876
|
const body = sanitizeForTerminal(res.text);
|
|
2783
|
-
const
|
|
1877
|
+
const preview = opts.printBody || body.length <= BODY_PREVIEW_CHARS ? body : `${body.slice(0, BODY_PREVIEW_CHARS)}
|
|
2784
1878
|
\u2026 truncated; run with --print-body or --json for the full body`;
|
|
2785
1879
|
return {
|
|
2786
1880
|
data,
|
|
@@ -2790,14 +1884,59 @@ function deliver(url, lane, res, opts) {
|
|
|
2790
1884
|
(w) => `${sanitizeForTerminal(warningMessage(w))} (acknowledged)`
|
|
2791
1885
|
),
|
|
2792
1886
|
...opts.caveat !== void 0 ? [sanitizeForTerminal(opts.caveat)] : [],
|
|
2793
|
-
...
|
|
1887
|
+
...opts.saved !== void 0 ? [savedLine(opts.saved)] : [],
|
|
1888
|
+
// The paid bytes no folder took: the only copy, so printed whole.
|
|
1889
|
+
...opts.saved?.bodyBase64 !== void 0 ? [opts.saved.bodyBase64] : [],
|
|
1890
|
+
...preview.length > 0 ? [preview] : []
|
|
2794
1891
|
]
|
|
2795
1892
|
};
|
|
2796
1893
|
}
|
|
1894
|
+
function describeBody(res) {
|
|
1895
|
+
if (res.bytes === void 0) return void 0;
|
|
1896
|
+
return {
|
|
1897
|
+
notSaved: "--quote writes no file; run it without --quote to save it",
|
|
1898
|
+
contentType: res.header("content-type") ?? "",
|
|
1899
|
+
bytes: res.bytes.byteLength
|
|
1900
|
+
};
|
|
1901
|
+
}
|
|
1902
|
+
async function keepBody(dataDir, url, res) {
|
|
1903
|
+
if (res.bytes === void 0) return void 0;
|
|
1904
|
+
const contentType = res.header("content-type") ?? "";
|
|
1905
|
+
const described = { contentType, bytes: res.bytes.byteLength };
|
|
1906
|
+
const stem = `pay-${new URL(url).hostname.slice(0, 60)}-${Date.now()}`;
|
|
1907
|
+
const first = await writeBody(downloadsDir(dataDir), stem, contentType, res.bytes);
|
|
1908
|
+
if ("path" in first) return { savedTo: first.path, ...described };
|
|
1909
|
+
const second = await writeBody(tmpdir(), stem, contentType, res.bytes);
|
|
1910
|
+
if ("path" in second) return { savedTo: second.path, saveError: first.error, ...described };
|
|
1911
|
+
return {
|
|
1912
|
+
saveError: `${first.error}; the temp folder failed too: ${second.error}`,
|
|
1913
|
+
bodyBase64: Buffer.from(res.bytes).toString("base64"),
|
|
1914
|
+
...described
|
|
1915
|
+
};
|
|
1916
|
+
}
|
|
1917
|
+
async function writeBody(directory, stem, contentType, bytes) {
|
|
1918
|
+
try {
|
|
1919
|
+
return { path: await writeNewFile(directory, stem, contentType, bytes) };
|
|
1920
|
+
} catch (err) {
|
|
1921
|
+
return { error: err instanceof Error ? err.message : String(err) };
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
function savedLine(saved) {
|
|
1925
|
+
const what = `${saved.bytes}-byte ${sanitizeForTerminal(saved.contentType) || "binary"} body`;
|
|
1926
|
+
const why = sanitizeForTerminal(saved.saveError ?? "unknown error");
|
|
1927
|
+
if (saved.savedTo !== void 0) {
|
|
1928
|
+
return saved.saveError !== void 0 ? `the downloads folder could not take the ${what} (${why}), so it was saved to ${saved.savedTo}` : `saved the ${what} to ${saved.savedTo}`;
|
|
1929
|
+
}
|
|
1930
|
+
if (saved.notSaved !== void 0) return `the ${what} was not saved: ${saved.notSaved}`;
|
|
1931
|
+
return saved.bodyBase64 !== void 0 ? `the ${what} could not be saved (${why}); its bytes follow as base64` : `the ${what} could not be saved: ${why}`;
|
|
1932
|
+
}
|
|
2797
1933
|
function settlementTx(res) {
|
|
2798
1934
|
const tx = paymentResponse(res)?.transaction;
|
|
2799
1935
|
return typeof tx === "string" && /^0x[0-9a-fA-F]{64}$/.test(tx) ? tx : void 0;
|
|
2800
1936
|
}
|
|
1937
|
+
function settledTx(res) {
|
|
1938
|
+
return paymentResponse(res)?.success === true ? settlementTx(res) : void 0;
|
|
1939
|
+
}
|
|
2801
1940
|
function settlementRefusal(res) {
|
|
2802
1941
|
const settle = paymentResponse(res);
|
|
2803
1942
|
if (settle?.success !== false) return void 0;
|
|
@@ -2822,16 +1961,90 @@ async function openWallet(provider) {
|
|
|
2822
1961
|
await describeWallet(provider);
|
|
2823
1962
|
return await provider.getSigner();
|
|
2824
1963
|
} catch (err) {
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
1964
|
+
throw walletError(err);
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
async function describeOpenable(provider) {
|
|
1968
|
+
try {
|
|
1969
|
+
return await describeWallet(provider);
|
|
1970
|
+
} catch (err) {
|
|
1971
|
+
throw walletError(err);
|
|
1972
|
+
}
|
|
1973
|
+
}
|
|
1974
|
+
function walletError(err) {
|
|
1975
|
+
if (!(err instanceof CliError)) return err;
|
|
1976
|
+
return new CliError(err.code, err.message, {
|
|
1977
|
+
exitCode: err.exitCode,
|
|
1978
|
+
...err.fix !== void 0 ? { fix: err.fix } : {},
|
|
1979
|
+
details: {
|
|
1980
|
+
...typeof err.details === "object" && err.details !== null ? err.details : {},
|
|
1981
|
+
walletUnavailable: true
|
|
1982
|
+
},
|
|
1983
|
+
cause: err
|
|
1984
|
+
});
|
|
1985
|
+
}
|
|
1986
|
+
var MAX_CHALLENGE_CHARS = 16384;
|
|
1987
|
+
function paymentRequiredError(http, res) {
|
|
1988
|
+
let said;
|
|
1989
|
+
try {
|
|
1990
|
+
said = http.getPaymentRequiredResponse((name) => {
|
|
1991
|
+
const value = res.header(name);
|
|
1992
|
+
return value !== void 0 && value.length <= MAX_CHALLENGE_CHARS ? value : void 0;
|
|
1993
|
+
}, res.json).error;
|
|
1994
|
+
} catch {
|
|
1995
|
+
said = void 0;
|
|
1996
|
+
}
|
|
1997
|
+
if (typeof said !== "string") return void 0;
|
|
1998
|
+
const line = sellerLine(said);
|
|
1999
|
+
return line.length > 0 ? line : void 0;
|
|
2000
|
+
}
|
|
2001
|
+
function signInOnlyHeader(paymentRequiredHeader) {
|
|
2002
|
+
if (paymentRequiredHeader.length > MAX_CHALLENGE_CHARS) return void 0;
|
|
2003
|
+
let challenge;
|
|
2004
|
+
try {
|
|
2005
|
+
challenge = decodePaymentRequiredHeader(paymentRequiredHeader);
|
|
2006
|
+
} catch {
|
|
2007
|
+
return void 0;
|
|
2008
|
+
}
|
|
2009
|
+
const extension = signInOnlyChallenge(challenge);
|
|
2010
|
+
return extension !== void 0 ? { challenge, extension } : void 0;
|
|
2011
|
+
}
|
|
2012
|
+
async function signInForPoll(paymentRequiredHeader, url, ctx, deps) {
|
|
2013
|
+
const read = signInOnlyHeader(paymentRequiredHeader);
|
|
2014
|
+
if (read === void 0) return void 0;
|
|
2015
|
+
const { challenge, extension } = read;
|
|
2016
|
+
const { paidBy } = deps;
|
|
2017
|
+
try {
|
|
2018
|
+
const provider = resolveWalletProvider(
|
|
2019
|
+
ctx,
|
|
2020
|
+
deps.provider !== void 0 ? { provider: deps.provider } : {}
|
|
2021
|
+
);
|
|
2022
|
+
let current;
|
|
2023
|
+
const answer = await answerSignInChallenge(challenge, extension, url, {
|
|
2024
|
+
address: async () => current = (await describeOpenable(provider)).address,
|
|
2025
|
+
paidHost: async (host, address) => paidBy.from === void 0 ? "payer_unknown" : hostOf(paidBy.url) === host && paidBy.from.toLowerCase() === address.toLowerCase() ? "paid" : "unpaid",
|
|
2026
|
+
signer: async () => {
|
|
2027
|
+
const signer = await openWallet(provider);
|
|
2028
|
+
current = signer.address;
|
|
2029
|
+
return signer;
|
|
2030
|
+
}
|
|
2834
2031
|
});
|
|
2032
|
+
if (!("refused" in answer)) return answer;
|
|
2033
|
+
if (answer.refused === "unpaid" && paidBy.from !== void 0 && current !== void 0 && hostOf(paidBy.url) === hostOf(url) && current.toLowerCase() !== paidBy.from.toLowerCase()) {
|
|
2034
|
+
return { otherWallet: { paidBy: paidBy.from, current } };
|
|
2035
|
+
}
|
|
2036
|
+
return { refused: answer.reason };
|
|
2037
|
+
} catch (err) {
|
|
2038
|
+
return {
|
|
2039
|
+
error: `the wallet could not be opened (${sellerLine(err instanceof Error ? err.message : String(err)) || "no reason given"})`
|
|
2040
|
+
};
|
|
2041
|
+
}
|
|
2042
|
+
}
|
|
2043
|
+
function hostOf(url) {
|
|
2044
|
+
try {
|
|
2045
|
+
return new URL(url).host;
|
|
2046
|
+
} catch {
|
|
2047
|
+
return void 0;
|
|
2835
2048
|
}
|
|
2836
2049
|
}
|
|
2837
2050
|
function signerOrThrow(held) {
|
|
@@ -2842,13 +2055,7 @@ function signerOrThrow(held) {
|
|
|
2842
2055
|
}
|
|
2843
2056
|
|
|
2844
2057
|
export {
|
|
2845
|
-
|
|
2846
|
-
paymentShortOfFunds,
|
|
2847
|
-
canonicalHash,
|
|
2848
|
-
inputProblems,
|
|
2849
|
-
assertResultSchema,
|
|
2850
|
-
validateResultBody,
|
|
2851
|
-
projectBody,
|
|
2058
|
+
isModelWorkerProcess,
|
|
2852
2059
|
policyFix,
|
|
2853
2060
|
createQuote,
|
|
2854
2061
|
readQuote,
|
|
@@ -2864,6 +2071,8 @@ export {
|
|
|
2864
2071
|
paidLegTimeoutMs,
|
|
2865
2072
|
quoteRouterCall,
|
|
2866
2073
|
sellerLine,
|
|
2867
|
-
settlementTx
|
|
2074
|
+
settlementTx,
|
|
2075
|
+
signInOnlyHeader,
|
|
2076
|
+
signInForPoll
|
|
2868
2077
|
};
|
|
2869
|
-
//# sourceMappingURL=chunk-
|
|
2078
|
+
//# sourceMappingURL=chunk-ODRPASFP.js.map
|