@atbas/m-mcp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (366) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +364 -0
  3. package/dist/builder/transaction-builder.d.ts +53 -0
  4. package/dist/builder/transaction-builder.d.ts.map +1 -0
  5. package/dist/builder/transaction-builder.js +159 -0
  6. package/dist/builder/transaction-builder.js.map +1 -0
  7. package/dist/catalogue/default-catalogue.d.ts +18 -0
  8. package/dist/catalogue/default-catalogue.d.ts.map +1 -0
  9. package/dist/catalogue/default-catalogue.js +21 -0
  10. package/dist/catalogue/default-catalogue.js.map +1 -0
  11. package/dist/catalogue/endpoints.d.ts +22 -0
  12. package/dist/catalogue/endpoints.d.ts.map +1 -0
  13. package/dist/catalogue/endpoints.js +24 -0
  14. package/dist/catalogue/endpoints.js.map +1 -0
  15. package/dist/catalogue/flows.d.ts +32 -0
  16. package/dist/catalogue/flows.d.ts.map +1 -0
  17. package/dist/catalogue/flows.js +64 -0
  18. package/dist/catalogue/flows.js.map +1 -0
  19. package/dist/catalogue/hash-options.d.ts +112 -0
  20. package/dist/catalogue/hash-options.d.ts.map +1 -0
  21. package/dist/catalogue/hash-options.js +151 -0
  22. package/dist/catalogue/hash-options.js.map +1 -0
  23. package/dist/catalogue/types.d.ts +279 -0
  24. package/dist/catalogue/types.d.ts.map +1 -0
  25. package/dist/catalogue/types.js +360 -0
  26. package/dist/catalogue/types.js.map +1 -0
  27. package/dist/codegen/generate.d.ts +14 -0
  28. package/dist/codegen/generate.d.ts.map +1 -0
  29. package/dist/codegen/generate.js +490 -0
  30. package/dist/codegen/generate.js.map +1 -0
  31. package/dist/codegen/languages/node.d.ts +3 -0
  32. package/dist/codegen/languages/node.d.ts.map +1 -0
  33. package/dist/codegen/languages/node.js +32 -0
  34. package/dist/codegen/languages/node.js.map +1 -0
  35. package/dist/codegen/languages/php.d.ts +3 -0
  36. package/dist/codegen/languages/php.d.ts.map +1 -0
  37. package/dist/codegen/languages/php.js +27 -0
  38. package/dist/codegen/languages/php.js.map +1 -0
  39. package/dist/codegen/languages/python.d.ts +3 -0
  40. package/dist/codegen/languages/python.d.ts.map +1 -0
  41. package/dist/codegen/languages/python.js +27 -0
  42. package/dist/codegen/languages/python.js.map +1 -0
  43. package/dist/codegen/renderer.d.ts +24 -0
  44. package/dist/codegen/renderer.d.ts.map +1 -0
  45. package/dist/codegen/renderer.js +59 -0
  46. package/dist/codegen/renderer.js.map +1 -0
  47. package/dist/codegen/types.d.ts +50 -0
  48. package/dist/codegen/types.d.ts.map +1 -0
  49. package/dist/codegen/types.js +5 -0
  50. package/dist/codegen/types.js.map +1 -0
  51. package/dist/config/credentials.d.ts +64 -0
  52. package/dist/config/credentials.d.ts.map +1 -0
  53. package/dist/config/credentials.js +216 -0
  54. package/dist/config/credentials.js.map +1 -0
  55. package/dist/config/environment.d.ts +23 -0
  56. package/dist/config/environment.d.ts.map +1 -0
  57. package/dist/config/environment.js +54 -0
  58. package/dist/config/environment.js.map +1 -0
  59. package/dist/core/dependencies.d.ts +43 -0
  60. package/dist/core/dependencies.d.ts.map +1 -0
  61. package/dist/core/dependencies.js +2 -0
  62. package/dist/core/dependencies.js.map +1 -0
  63. package/dist/core/registry.d.ts +33 -0
  64. package/dist/core/registry.d.ts.map +1 -0
  65. package/dist/core/registry.js +13 -0
  66. package/dist/core/registry.js.map +1 -0
  67. package/dist/core/server.d.ts +61 -0
  68. package/dist/core/server.d.ts.map +1 -0
  69. package/dist/core/server.js +90 -0
  70. package/dist/core/server.js.map +1 -0
  71. package/dist/dependencies.d.ts +28 -0
  72. package/dist/dependencies.d.ts.map +1 -0
  73. package/dist/dependencies.js +2 -0
  74. package/dist/dependencies.js.map +1 -0
  75. package/dist/diagnostics/diagnose.d.ts +43 -0
  76. package/dist/diagnostics/diagnose.d.ts.map +1 -0
  77. package/dist/diagnostics/diagnose.js +121 -0
  78. package/dist/diagnostics/diagnose.js.map +1 -0
  79. package/dist/domain/amount.d.ts +157 -0
  80. package/dist/domain/amount.d.ts.map +1 -0
  81. package/dist/domain/amount.js +275 -0
  82. package/dist/domain/amount.js.map +1 -0
  83. package/dist/domain/datetime.d.ts +95 -0
  84. package/dist/domain/datetime.d.ts.map +1 -0
  85. package/dist/domain/datetime.js +211 -0
  86. package/dist/domain/datetime.js.map +1 -0
  87. package/dist/domain/response-codes.d.ts +116 -0
  88. package/dist/domain/response-codes.d.ts.map +1 -0
  89. package/dist/domain/response-codes.js +380 -0
  90. package/dist/domain/response-codes.js.map +1 -0
  91. package/dist/domain/secure-hash.d.ts +78 -0
  92. package/dist/domain/secure-hash.d.ts.map +1 -0
  93. package/dist/domain/secure-hash.js +69 -0
  94. package/dist/domain/secure-hash.js.map +1 -0
  95. package/dist/domain/signature/jazzcash.d.ts +56 -0
  96. package/dist/domain/signature/jazzcash.d.ts.map +1 -0
  97. package/dist/domain/signature/jazzcash.js +214 -0
  98. package/dist/domain/signature/jazzcash.js.map +1 -0
  99. package/dist/domain/signature/registry.d.ts +69 -0
  100. package/dist/domain/signature/registry.d.ts.map +1 -0
  101. package/dist/domain/signature/registry.js +92 -0
  102. package/dist/domain/signature/registry.js.map +1 -0
  103. package/dist/domain/signature/scheme.d.ts +349 -0
  104. package/dist/domain/signature/scheme.d.ts.map +1 -0
  105. package/dist/domain/signature/scheme.js +398 -0
  106. package/dist/domain/signature/scheme.js.map +1 -0
  107. package/dist/domain/txn-ref.d.ts +76 -0
  108. package/dist/domain/txn-ref.d.ts.map +1 -0
  109. package/dist/domain/txn-ref.js +126 -0
  110. package/dist/domain/txn-ref.js.map +1 -0
  111. package/dist/domain/types.d.ts +45 -0
  112. package/dist/domain/types.d.ts.map +1 -0
  113. package/dist/domain/types.js +70 -0
  114. package/dist/domain/types.js.map +1 -0
  115. package/dist/errors.d.ts +84 -0
  116. package/dist/errors.d.ts.map +1 -0
  117. package/dist/errors.js +87 -0
  118. package/dist/errors.js.map +1 -0
  119. package/dist/gateway/checkout-form.d.ts +16 -0
  120. package/dist/gateway/checkout-form.d.ts.map +1 -0
  121. package/dist/gateway/checkout-form.js +103 -0
  122. package/dist/gateway/checkout-form.js.map +1 -0
  123. package/dist/gateway/checkout-output.d.ts +70 -0
  124. package/dist/gateway/checkout-output.d.ts.map +1 -0
  125. package/dist/gateway/checkout-output.js +199 -0
  126. package/dist/gateway/checkout-output.js.map +1 -0
  127. package/dist/gateway/guards.d.ts +37 -0
  128. package/dist/gateway/guards.d.ts.map +1 -0
  129. package/dist/gateway/guards.js +44 -0
  130. package/dist/gateway/guards.js.map +1 -0
  131. package/dist/gateway/http-client.d.ts +42 -0
  132. package/dist/gateway/http-client.d.ts.map +1 -0
  133. package/dist/gateway/http-client.js +153 -0
  134. package/dist/gateway/http-client.js.map +1 -0
  135. package/dist/gateway/rest-client.d.ts +42 -0
  136. package/dist/gateway/rest-client.d.ts.map +1 -0
  137. package/dist/gateway/rest-client.js +241 -0
  138. package/dist/gateway/rest-client.js.map +1 -0
  139. package/dist/gateway/transport.d.ts +31 -0
  140. package/dist/gateway/transport.d.ts.map +1 -0
  141. package/dist/gateway/transport.js +73 -0
  142. package/dist/gateway/transport.js.map +1 -0
  143. package/dist/index.d.ts +3 -0
  144. package/dist/index.d.ts.map +1 -0
  145. package/dist/index.js +75 -0
  146. package/dist/index.js.map +1 -0
  147. package/dist/install/cli.d.ts +38 -0
  148. package/dist/install/cli.d.ts.map +1 -0
  149. package/dist/install/cli.js +274 -0
  150. package/dist/install/cli.js.map +1 -0
  151. package/dist/install/harnesses.d.ts +74 -0
  152. package/dist/install/harnesses.d.ts.map +1 -0
  153. package/dist/install/harnesses.js +263 -0
  154. package/dist/install/harnesses.js.map +1 -0
  155. package/dist/knowledge/corpus.d.ts +15 -0
  156. package/dist/knowledge/corpus.d.ts.map +1 -0
  157. package/dist/knowledge/corpus.js +129 -0
  158. package/dist/knowledge/corpus.js.map +1 -0
  159. package/dist/knowledge/search.d.ts +29 -0
  160. package/dist/knowledge/search.d.ts.map +1 -0
  161. package/dist/knowledge/search.js +181 -0
  162. package/dist/knowledge/search.js.map +1 -0
  163. package/dist/knowledge/source.d.ts +60 -0
  164. package/dist/knowledge/source.d.ts.map +1 -0
  165. package/dist/knowledge/source.js +91 -0
  166. package/dist/knowledge/source.js.map +1 -0
  167. package/dist/knowledge/types.d.ts +40 -0
  168. package/dist/knowledge/types.d.ts.map +1 -0
  169. package/dist/knowledge/types.js +19 -0
  170. package/dist/knowledge/types.js.map +1 -0
  171. package/dist/paths.d.ts +26 -0
  172. package/dist/paths.d.ts.map +1 -0
  173. package/dist/paths.js +106 -0
  174. package/dist/paths.js.map +1 -0
  175. package/dist/prompts/integration-walkthrough.d.ts +11 -0
  176. package/dist/prompts/integration-walkthrough.d.ts.map +1 -0
  177. package/dist/prompts/integration-walkthrough.js +52 -0
  178. package/dist/prompts/integration-walkthrough.js.map +1 -0
  179. package/dist/prompts/register.d.ts +4 -0
  180. package/dist/prompts/register.d.ts.map +1 -0
  181. package/dist/prompts/register.js +4 -0
  182. package/dist/prompts/register.js.map +1 -0
  183. package/dist/registry.d.ts +14 -0
  184. package/dist/registry.d.ts.map +1 -0
  185. package/dist/registry.js +2 -0
  186. package/dist/registry.js.map +1 -0
  187. package/dist/resources/knowledge-resources.d.ts +5 -0
  188. package/dist/resources/knowledge-resources.d.ts.map +1 -0
  189. package/dist/resources/knowledge-resources.js +121 -0
  190. package/dist/resources/knowledge-resources.js.map +1 -0
  191. package/dist/resources/register.d.ts +4 -0
  192. package/dist/resources/register.d.ts.map +1 -0
  193. package/dist/resources/register.js +8 -0
  194. package/dist/resources/register.js.map +1 -0
  195. package/dist/server.d.ts +40 -0
  196. package/dist/server.d.ts.map +1 -0
  197. package/dist/server.js +56 -0
  198. package/dist/server.js.map +1 -0
  199. package/dist/telemetry/logger.d.ts +31 -0
  200. package/dist/telemetry/logger.d.ts.map +1 -0
  201. package/dist/telemetry/logger.js +67 -0
  202. package/dist/telemetry/logger.js.map +1 -0
  203. package/dist/telemetry/redaction.d.ts +88 -0
  204. package/dist/telemetry/redaction.d.ts.map +1 -0
  205. package/dist/telemetry/redaction.js +238 -0
  206. package/dist/telemetry/redaction.js.map +1 -0
  207. package/dist/tools/build-transaction-parameters.d.ts +10 -0
  208. package/dist/tools/build-transaction-parameters.d.ts.map +1 -0
  209. package/dist/tools/build-transaction-parameters.js +154 -0
  210. package/dist/tools/build-transaction-parameters.js.map +1 -0
  211. package/dist/tools/call-context.d.ts +47 -0
  212. package/dist/tools/call-context.d.ts.map +1 -0
  213. package/dist/tools/call-context.js +15 -0
  214. package/dist/tools/call-context.js.map +1 -0
  215. package/dist/tools/codegen-tools.d.ts +4 -0
  216. package/dist/tools/codegen-tools.d.ts.map +1 -0
  217. package/dist/tools/codegen-tools.js +131 -0
  218. package/dist/tools/codegen-tools.js.map +1 -0
  219. package/dist/tools/credential-tools.d.ts +32 -0
  220. package/dist/tools/credential-tools.d.ts.map +1 -0
  221. package/dist/tools/credential-tools.js +65 -0
  222. package/dist/tools/credential-tools.js.map +1 -0
  223. package/dist/tools/descriptor.d.ts +52 -0
  224. package/dist/tools/descriptor.d.ts.map +1 -0
  225. package/dist/tools/descriptor.js +2 -0
  226. package/dist/tools/descriptor.js.map +1 -0
  227. package/dist/tools/diagnostic-tools.d.ts +3 -0
  228. package/dist/tools/diagnostic-tools.d.ts.map +1 -0
  229. package/dist/tools/diagnostic-tools.js +128 -0
  230. package/dist/tools/diagnostic-tools.js.map +1 -0
  231. package/dist/tools/gateway-tools.d.ts +6 -0
  232. package/dist/tools/gateway-tools.d.ts.map +1 -0
  233. package/dist/tools/gateway-tools.js +381 -0
  234. package/dist/tools/gateway-tools.js.map +1 -0
  235. package/dist/tools/hash-tools.d.ts +5 -0
  236. package/dist/tools/hash-tools.d.ts.map +1 -0
  237. package/dist/tools/hash-tools.js +238 -0
  238. package/dist/tools/hash-tools.js.map +1 -0
  239. package/dist/tools/knowledge-tools.d.ts +7 -0
  240. package/dist/tools/knowledge-tools.d.ts.map +1 -0
  241. package/dist/tools/knowledge-tools.js +247 -0
  242. package/dist/tools/knowledge-tools.js.map +1 -0
  243. package/dist/tools/onboarding-checklist.d.ts +3 -0
  244. package/dist/tools/onboarding-checklist.d.ts.map +1 -0
  245. package/dist/tools/onboarding-checklist.js +141 -0
  246. package/dist/tools/onboarding-checklist.js.map +1 -0
  247. package/dist/tools/register.d.ts +60 -0
  248. package/dist/tools/register.d.ts.map +1 -0
  249. package/dist/tools/register.js +145 -0
  250. package/dist/tools/register.js.map +1 -0
  251. package/dist/tools/tool-kit.d.ts +88 -0
  252. package/dist/tools/tool-kit.d.ts.map +1 -0
  253. package/dist/tools/tool-kit.js +297 -0
  254. package/dist/tools/tool-kit.js.map +1 -0
  255. package/dist/validation/payload-validator.d.ts +29 -0
  256. package/dist/validation/payload-validator.d.ts.map +1 -0
  257. package/dist/validation/payload-validator.js +79 -0
  258. package/dist/validation/payload-validator.js.map +1 -0
  259. package/dist/validation/rules/amount.d.ts +3 -0
  260. package/dist/validation/rules/amount.d.ts.map +1 -0
  261. package/dist/validation/rules/amount.js +77 -0
  262. package/dist/validation/rules/amount.js.map +1 -0
  263. package/dist/validation/rules/bill-reference.d.ts +10 -0
  264. package/dist/validation/rules/bill-reference.d.ts.map +1 -0
  265. package/dist/validation/rules/bill-reference.js +34 -0
  266. package/dist/validation/rules/bill-reference.js.map +1 -0
  267. package/dist/validation/rules/cnic.d.ts +3 -0
  268. package/dist/validation/rules/cnic.d.ts.map +1 -0
  269. package/dist/validation/rules/cnic.js +42 -0
  270. package/dist/validation/rules/cnic.js.map +1 -0
  271. package/dist/validation/rules/constants.d.ts +9 -0
  272. package/dist/validation/rules/constants.d.ts.map +1 -0
  273. package/dist/validation/rules/constants.js +28 -0
  274. package/dist/validation/rules/constants.js.map +1 -0
  275. package/dist/validation/rules/constraints.d.ts +3 -0
  276. package/dist/validation/rules/constraints.d.ts.map +1 -0
  277. package/dist/validation/rules/constraints.js +113 -0
  278. package/dist/validation/rules/constraints.js.map +1 -0
  279. package/dist/validation/rules/datetime.d.ts +3 -0
  280. package/dist/validation/rules/datetime.d.ts.map +1 -0
  281. package/dist/validation/rules/datetime.js +49 -0
  282. package/dist/validation/rules/datetime.js.map +1 -0
  283. package/dist/validation/rules/empty-string.d.ts +13 -0
  284. package/dist/validation/rules/empty-string.d.ts.map +1 -0
  285. package/dist/validation/rules/empty-string.js +32 -0
  286. package/dist/validation/rules/empty-string.js.map +1 -0
  287. package/dist/validation/rules/expiry.d.ts +3 -0
  288. package/dist/validation/rules/expiry.d.ts.map +1 -0
  289. package/dist/validation/rules/expiry.js +52 -0
  290. package/dist/validation/rules/expiry.js.map +1 -0
  291. package/dist/validation/rules/msisdn.d.ts +3 -0
  292. package/dist/validation/rules/msisdn.d.ts.map +1 -0
  293. package/dist/validation/rules/msisdn.js +45 -0
  294. package/dist/validation/rules/msisdn.js.map +1 -0
  295. package/dist/validation/rules/presence.d.ts +3 -0
  296. package/dist/validation/rules/presence.d.ts.map +1 -0
  297. package/dist/validation/rules/presence.js +90 -0
  298. package/dist/validation/rules/presence.js.map +1 -0
  299. package/dist/validation/rules/return-url.d.ts +14 -0
  300. package/dist/validation/rules/return-url.d.ts.map +1 -0
  301. package/dist/validation/rules/return-url.js +58 -0
  302. package/dist/validation/rules/return-url.js.map +1 -0
  303. package/dist/validation/rules/tool-argument.d.ts +16 -0
  304. package/dist/validation/rules/tool-argument.d.ts.map +1 -0
  305. package/dist/validation/rules/tool-argument.js +38 -0
  306. package/dist/validation/rules/tool-argument.js.map +1 -0
  307. package/dist/validation/rules/txn-ref.d.ts +3 -0
  308. package/dist/validation/rules/txn-ref.d.ts.map +1 -0
  309. package/dist/validation/rules/txn-ref.js +47 -0
  310. package/dist/validation/rules/txn-ref.js.map +1 -0
  311. package/dist/validation/rules/unknown-fields.d.ts +10 -0
  312. package/dist/validation/rules/unknown-fields.d.ts.map +1 -0
  313. package/dist/validation/rules/unknown-fields.js +29 -0
  314. package/dist/validation/rules/unknown-fields.js.map +1 -0
  315. package/dist/validation/types.d.ts +36 -0
  316. package/dist/validation/types.d.ts.map +1 -0
  317. package/dist/validation/types.js +12 -0
  318. package/dist/validation/types.js.map +1 -0
  319. package/dist/version.d.ts +23 -0
  320. package/dist/version.d.ts.map +1 -0
  321. package/dist/version.js +23 -0
  322. package/dist/version.js.map +1 -0
  323. package/knowledge/diagnostics/symptoms.json +321 -0
  324. package/knowledge/docs/bnpl-guide.md +77 -0
  325. package/knowledge/docs/card-page-redirection.md +67 -0
  326. package/knowledge/docs/card-refund.md +91 -0
  327. package/knowledge/docs/hmac-sha256-calculation.md +72 -0
  328. package/knowledge/docs/index.json +189 -0
  329. package/knowledge/docs/ipn-implementation.md +89 -0
  330. package/knowledge/docs/mwallet-recurring.md +117 -0
  331. package/knowledge/docs/mwallet-refund.md +65 -0
  332. package/knowledge/docs/mwallet-rest-v1-1.md +126 -0
  333. package/knowledge/docs/mwallet-rest-v2-0-cnic.md +113 -0
  334. package/knowledge/docs/portal-guide.md +45 -0
  335. package/knowledge/docs/shopify-guide.md +74 -0
  336. package/knowledge/docs/status-inquiry-2025-26.md +32 -0
  337. package/knowledge/docs/status-inquiry.md +111 -0
  338. package/knowledge/docs/wordpress-guide.md +49 -0
  339. package/knowledge/flow.schema.json +390 -0
  340. package/knowledge/flows/bnpl-page-redirection-v1.1.json +211 -0
  341. package/knowledge/flows/card-page-redirection-v1.1.json +211 -0
  342. package/knowledge/flows/mwallet-rest-v1.1.json +187 -0
  343. package/knowledge/flows/mwallet-rest-v2.0-cnic.json +197 -0
  344. package/knowledge/flows/mwallet-token-pay-v4.0.json +130 -0
  345. package/knowledge/flows/refund-bnpl.json +105 -0
  346. package/knowledge/flows/refund-card-v1.1.json +112 -0
  347. package/knowledge/flows/refund-card-v2.0.json +121 -0
  348. package/knowledge/flows/refund-mwallet-v1.1.json +106 -0
  349. package/knowledge/flows/status-inquiry-v1.1.json +102 -0
  350. package/knowledge/flows/status-inquiry-v2.0.json +103 -0
  351. package/knowledge/flows/token-delete-v1.json +85 -0
  352. package/knowledge/flows/token-inquiry-v1.json +85 -0
  353. package/knowledge/flows/wallet-linking-portal.json +103 -0
  354. package/knowledge/templates/node/checkout-redirect.tmpl +166 -0
  355. package/knowledge/templates/node/ipn-handler.tmpl +108 -0
  356. package/knowledge/templates/node/rest-client.tmpl +197 -0
  357. package/knowledge/templates/node/wallet-linking.tmpl +147 -0
  358. package/knowledge/templates/php/checkout-redirect.tmpl +149 -0
  359. package/knowledge/templates/php/ipn-handler.tmpl +105 -0
  360. package/knowledge/templates/php/rest-client.tmpl +191 -0
  361. package/knowledge/templates/php/wallet-linking.tmpl +137 -0
  362. package/knowledge/templates/python/checkout-redirect.tmpl +148 -0
  363. package/knowledge/templates/python/ipn-handler.tmpl +110 -0
  364. package/knowledge/templates/python/rest-client.tmpl +179 -0
  365. package/knowledge/templates/python/wallet-linking.tmpl +133 -0
  366. package/package.json +84 -0
@@ -0,0 +1,131 @@
1
+ import { z } from 'zod';
2
+ import { availableKinds, generateCode } from '../codegen/generate.js';
3
+ import { LANGUAGES, TEMPLATE_KINDS } from '../codegen/types.js';
4
+ import { JAZZCASH_ENVIRONMENTS } from '../config/environment.js';
5
+ import { JazzCashValidationError } from '../errors.js';
6
+ import { describeHowToSend } from '../gateway/transport.js';
7
+ import { citations, resolveEnvironment, safeHandler, toolResult } from './tool-kit.js';
8
+ /**
9
+ * Code generation tools.
10
+ *
11
+ * Generated code deliberately diverges from the official samples where those
12
+ * samples are defective: strict emptiness tests, deterministic sorting, escaped
13
+ * HTML output, and server-side hashing for the wallet-linking form.
14
+ */
15
+ const FENCE_BY_LANGUAGE = {
16
+ php: 'php',
17
+ node: 'javascript',
18
+ python: 'python',
19
+ };
20
+ function renderResult(result, docRefs) {
21
+ return [
22
+ `# ${result.kind} for ${result.flowId} (${result.language})`,
23
+ '',
24
+ ...result.files.flatMap((file) => [
25
+ `## ${file.path}`,
26
+ '',
27
+ `\`\`\`${FENCE_BY_LANGUAGE[file.language]}`,
28
+ file.contents,
29
+ '```',
30
+ '',
31
+ ]),
32
+ '## Still to do',
33
+ result.followUp.map((step, index) => `${String(index + 1)}. ${step}`).join('\n'),
34
+ '',
35
+ '## .env fragment',
36
+ '```',
37
+ result.envExample,
38
+ '```',
39
+ citations(docRefs),
40
+ ].join('\n');
41
+ }
42
+ export const registerGenerateIntegrationCode = (server, deps) => {
43
+ server.registerTool('jazzcash_generate_integration_code', {
44
+ title: 'Generate JazzCash integration code',
45
+ description: 'Generate working PHP, Node.js or Python for a flow: hosted checkout, REST client, or the wallet-linking form. The parameter list comes from the flow specification, so it cannot drift from the documented field set, and the known defects in the official samples are corrected.',
46
+ inputSchema: {
47
+ flowId: z.string().describe('Flow to generate for, e.g. "mwallet-rest-v1.1".'),
48
+ language: z.enum(LANGUAGES).describe('php, node or python.'),
49
+ kind: z
50
+ .enum(TEMPLATE_KINDS)
51
+ .optional()
52
+ .describe('Artefact to generate. Defaults to the one that suits the flow: checkout-redirect, rest-client or wallet-linking.'),
53
+ environment: z
54
+ .enum(JAZZCASH_ENVIRONMENTS)
55
+ .optional()
56
+ .describe('Which endpoint to embed. Both environments share the same URL, so this only affects the comments.'),
57
+ },
58
+ }, safeHandler(deps, 'jazzcash_generate_integration_code', ({ flowId, language, kind, environment }) => {
59
+ const flow = deps.catalogue.get(flowId);
60
+ const resolvedKind = kind ?? availableKinds(flow)[0];
61
+ // Required by the type and unreachable today: every shipped transport has
62
+ // an artefact kind, so `availableKinds` is currently total. It is kept
63
+ // rather than asserted away because a transport nothing here generates for
64
+ // must refuse in words rather than crash — a bare `Error` named the
65
+ // outcome and withheld the reason, leaving the caller to guess whether the
66
+ // flow, the language or the server was at fault.
67
+ /* c8 ignore next 6 -- unreachable while every transport has an artefact kind */
68
+ if (resolvedKind === undefined) {
69
+ throw new JazzCashValidationError(`There is no artefact kind to generate for ${flow.id}. ${describeHowToSend(flow)}`, { details: { flowId: flow.id, transport: flow.transport } });
70
+ }
71
+ const result = generateCode({
72
+ flow,
73
+ language,
74
+ kind: resolvedKind,
75
+ environment: resolveEnvironment(deps, environment),
76
+ });
77
+ return toolResult(renderResult(result, flow.docRefs), {
78
+ structuredContent: {
79
+ flowId: result.flowId,
80
+ language: result.language,
81
+ kind: result.kind,
82
+ files: result.files,
83
+ followUp: result.followUp,
84
+ envExample: result.envExample,
85
+ },
86
+ });
87
+ }));
88
+ };
89
+ export const registerGenerateIpnHandler = (server, deps) => {
90
+ server.registerTool('jazzcash_generate_ipn_handler', {
91
+ title: 'Generate a JazzCash IPN listener',
92
+ description: 'Generate an Instant Payment Notification listener that verifies pp_SecureHash before acting, is idempotent against the documented two retries, and acknowledges with pp_ResponseCode "000" inside the 60-second window. IPN is a mandatory integration.',
93
+ inputSchema: {
94
+ language: z.enum(LANGUAGES).describe('php, node or python.'),
95
+ framework: z
96
+ .string()
97
+ .optional()
98
+ .describe('Web framework, e.g. "Express", "Flask", "Laravel". Affects comments and routing only. The name is rendered inside a comment in the generated file, so it is reduced to letters, digits and simple punctuation first: anything else, including a comment terminator, is dropped.'),
99
+ flowId: z
100
+ .string()
101
+ .optional()
102
+ .describe('Flow whose notifications this listens for. Defaults to mwallet-rest-v1.1, whose IPN shape the guide documents.'),
103
+ },
104
+ }, safeHandler(deps, 'jazzcash_generate_ipn_handler', ({ language, framework, flowId }) => {
105
+ const flow = deps.catalogue.get(flowId ?? 'mwallet-rest-v1.1');
106
+ const result = generateCode({
107
+ flow,
108
+ language,
109
+ kind: 'ipn-handler',
110
+ environment: deps.config.defaultEnvironment,
111
+ framework,
112
+ });
113
+ const ipnDocRef = [{ docId: 'ipn-implementation', sectionId: 'handler-checklist' }];
114
+ return toolResult([
115
+ renderResult(result, ipnDocRef),
116
+ '',
117
+ '## Register the URL',
118
+ 'Open Integration → Credentials in the merchant portal and set the IPN URL to the public address of this endpoint.',
119
+ 'For WooCommerce the documented path is `{yourBaseURL}/jazzcash_ipn_v2`.',
120
+ ].join('\n'), {
121
+ structuredContent: {
122
+ language: result.language,
123
+ framework: framework ?? null,
124
+ files: result.files,
125
+ followUp: result.followUp,
126
+ envExample: result.envExample,
127
+ },
128
+ });
129
+ }));
130
+ };
131
+ //# sourceMappingURL=codegen-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codegen-tools.js","sourceRoot":"","sources":["../../src/tools/codegen-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAqC,MAAM,qBAAqB,CAAC;AACnG,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEvF;;;;;;GAMG;AAEH,MAAM,iBAAiB,GAAuC;IAC5D,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF,SAAS,YAAY,CACnB,MAAqB,EACrB,OAAqE;IAErE,OAAO;QACL,KAAK,MAAM,CAAC,IAAI,QAAQ,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,QAAQ,GAAG;QAC5D,EAAE;QACF,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;YAChC,MAAM,IAAI,CAAC,IAAI,EAAE;YACjB,EAAE;YACF,SAAS,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;YAC3C,IAAI,CAAC,QAAQ;YACb,KAAK;YACL,EAAE;SACH,CAAC;QACF,gBAAgB;QAChB,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI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AAE,CAAC;iBACN,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CACP,gHAAgH,CACjH;SACJ;KACF,EACD,WAAW,CAAC,IAAI,EAAE,+BAA+B,EAAE,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE;QACrF,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,IAAI,mBAAmB,CAAC,CAAC;QAE/D,MAAM,MAAM,GAAG,YAAY,CAAC;YAC1B,IAAI;YACJ,QAAQ;YACR,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,kBAAkB;YAC3C,SAAS;SACV,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;QAEpF,OAAO,UAAU,CACf;YACE,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC;YAC/B,EAAE;YACF,qBAAqB;YACrB,mHAAmH;YACnH,yEAAyE;SAC1E,CAAC,IAAI,CAAC,IAAI,CAAC,EACZ;YACE,iBAAiB,EAAE;gBACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,SAAS,EAAE,SAAS,IAAI,IAAI;gBAC5B,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,QAAQ,EAAE,MAAM,CAAC,QAAQ;gBACzB,UAAU,EAAE,MAAM,CAAC,UAAU;aAC9B;SACF,CACF,CAAC;IACJ,CAAC,CAAC,CACH,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { type CoreToolDescriptor } from './descriptor.js';
2
+ /**
3
+ * The tools that cannot run without a merchant credential.
4
+ *
5
+ * Written out here rather than filtered from the full descriptor list, and
6
+ * imported from this narrow module rather than from `./register.js`, because
7
+ * this list is what the published connector is built from. Reaching it through
8
+ * `./register.js` would put every other tool's registrar in the same module
9
+ * graph — the corpus loader, the search index, the code generators, the
10
+ * diagnostics — and a merchant installing four credential tools would receive
11
+ * all of it.
12
+ *
13
+ * A deployment that holds no credential must not offer these: the tool would
14
+ * fail on every call at best, and at worst would run against a credential that
15
+ * belongs to somebody other than the caller.
16
+ *
17
+ * Each descriptor is also exported on its own, because `./register.js` places
18
+ * these four among the credential-free ones in group order and needs to name
19
+ * them individually to do it. Sharing the objects rather than restating them is
20
+ * what makes the two lists the same descriptors rather than two descriptions of
21
+ * the same tools. `tests/tools/register.test.ts` asserts both halves of that:
22
+ * that this list and the `requiresCredentials` flag select the same tools, and
23
+ * that they select the same *objects* — a name comparison alone could not tell a
24
+ * shared descriptor from a duplicate carrying a different registrar.
25
+ */
26
+ export declare const BUILD_TRANSACTION_PARAMETERS: CoreToolDescriptor;
27
+ export declare const SEND_GATEWAY_REQUEST: CoreToolDescriptor;
28
+ export declare const RUN_SANDBOX_SMOKE_TEST: CoreToolDescriptor;
29
+ export declare const BUILD_CHECKOUT_FORM: CoreToolDescriptor;
30
+ /** Listed in the order they appear in `TOOL_DESCRIPTORS`. */
31
+ export declare const CREDENTIAL_TOOLS: readonly CoreToolDescriptor[];
32
+ //# sourceMappingURL=credential-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-tools.d.ts","sourceRoot":"","sources":["../../src/tools/credential-tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG1D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,eAAO,MAAM,4BAA4B,EAAE,kBAO1C,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,kBAMlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,kBAOpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,kBAMjC,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,EAAE,SAAS,kBAAkB,EAKzD,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { registerBuildTransactionParameters } from './build-transaction-parameters.js';
2
+ import {} from './descriptor.js';
3
+ import { registerBuildCheckoutForm, registerRunSandboxSmokeTest, registerSendGatewayRequest } from './gateway-tools.js';
4
+ /**
5
+ * The tools that cannot run without a merchant credential.
6
+ *
7
+ * Written out here rather than filtered from the full descriptor list, and
8
+ * imported from this narrow module rather than from `./register.js`, because
9
+ * this list is what the published connector is built from. Reaching it through
10
+ * `./register.js` would put every other tool's registrar in the same module
11
+ * graph — the corpus loader, the search index, the code generators, the
12
+ * diagnostics — and a merchant installing four credential tools would receive
13
+ * all of it.
14
+ *
15
+ * A deployment that holds no credential must not offer these: the tool would
16
+ * fail on every call at best, and at worst would run against a credential that
17
+ * belongs to somebody other than the caller.
18
+ *
19
+ * Each descriptor is also exported on its own, because `./register.js` places
20
+ * these four among the credential-free ones in group order and needs to name
21
+ * them individually to do it. Sharing the objects rather than restating them is
22
+ * what makes the two lists the same descriptors rather than two descriptions of
23
+ * the same tools. `tests/tools/register.test.ts` asserts both halves of that:
24
+ * that this list and the `requiresCredentials` flag select the same tools, and
25
+ * that they select the same *objects* — a name comparison alone could not tell a
26
+ * shared descriptor from a duplicate carrying a different registrar.
27
+ */
28
+ export const BUILD_TRANSACTION_PARAMETERS = {
29
+ // `deps.credentials.get(environment)` on every path: the payload is signed
30
+ // with the configured Integrity Salt and carries the merchant password.
31
+ name: 'jazzcash_build_transaction_parameters',
32
+ registrar: registerBuildTransactionParameters,
33
+ group: 'hash',
34
+ requiresCredentials: true,
35
+ };
36
+ export const SEND_GATEWAY_REQUEST = {
37
+ // `executeFlow` → `guardGatewayCall` → `deps.credentials.get`.
38
+ name: 'jazzcash_send_gateway_request',
39
+ registrar: registerSendGatewayRequest,
40
+ group: 'gateway',
41
+ requiresCredentials: true,
42
+ };
43
+ export const RUN_SANDBOX_SMOKE_TEST = {
44
+ // Runs the guard for its credential resolution even though the sandbox-only
45
+ // schema means the live opt-in can never fire.
46
+ name: 'jazzcash_run_sandbox_smoke_test',
47
+ registrar: registerRunSandboxSmokeTest,
48
+ group: 'gateway',
49
+ requiresCredentials: true,
50
+ };
51
+ export const BUILD_CHECKOUT_FORM = {
52
+ // `guardGatewayCall`, and the page it writes embeds the merchant password.
53
+ name: 'jazzcash_build_checkout_form',
54
+ registrar: registerBuildCheckoutForm,
55
+ group: 'gateway',
56
+ requiresCredentials: true,
57
+ };
58
+ /** Listed in the order they appear in `TOOL_DESCRIPTORS`. */
59
+ export const CREDENTIAL_TOOLS = [
60
+ BUILD_TRANSACTION_PARAMETERS,
61
+ SEND_GATEWAY_REQUEST,
62
+ RUN_SANDBOX_SMOKE_TEST,
63
+ BUILD_CHECKOUT_FORM,
64
+ ];
65
+ //# sourceMappingURL=credential-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential-tools.js","sourceRoot":"","sources":["../../src/tools/credential-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAA2B,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAExH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAuB;IAC9D,2EAA2E;IAC3E,wEAAwE;IACxE,IAAI,EAAE,uCAAuC;IAC7C,SAAS,EAAE,kCAAkC;IAC7C,KAAK,EAAE,MAAM;IACb,mBAAmB,EAAE,IAAI;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAuB;IACtD,+DAA+D;IAC/D,IAAI,EAAE,+BAA+B;IACrC,SAAS,EAAE,0BAA0B;IACrC,KAAK,EAAE,SAAS;IAChB,mBAAmB,EAAE,IAAI;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAuB;IACxD,4EAA4E;IAC5E,+CAA+C;IAC/C,IAAI,EAAE,iCAAiC;IACvC,SAAS,EAAE,2BAA2B;IACtC,KAAK,EAAE,SAAS;IAChB,mBAAmB,EAAE,IAAI;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAuB;IACrD,2EAA2E;IAC3E,IAAI,EAAE,8BAA8B;IACpC,SAAS,EAAE,yBAAyB;IACpC,KAAK,EAAE,SAAS;IAChB,mBAAmB,EAAE,IAAI;CAC1B,CAAC;AAEF,6DAA6D;AAC7D,MAAM,CAAC,MAAM,gBAAgB,GAAkC;IAC7D,4BAA4B;IAC5B,oBAAoB;IACpB,sBAAsB;IACtB,mBAAmB;CACpB,CAAC"}
@@ -0,0 +1,52 @@
1
+ import type { CoreRegistrar } from '../core/registry.js';
2
+ /**
3
+ * The facts about a tool that no consumer can derive for itself, and the
4
+ * descriptor shape for the tools that need no documentation corpus.
5
+ *
6
+ * Split out of `./register.js` so that a consumer needing only the credential
7
+ * half — the published connector, which serves those four tools on a merchant's
8
+ * own machine — can reach the descriptors without importing the module that
9
+ * references every registrar in the project. That import is not free: it would
10
+ * pull the corpus loader, the search index, the code generators and the
11
+ * diagnostics into a package built for four tools that read none of them.
12
+ */
13
+ /** The functional families a tool belongs to. Used for scoping, not for safety. */
14
+ export type ToolGroup = 'knowledge' | 'hash' | 'codegen' | 'gateway' | 'diagnostics';
15
+ /**
16
+ * What a descriptor records about a tool, apart from how to register it.
17
+ *
18
+ * A registrar names its tool inline, so until the descriptor list existed
19
+ * nothing outside a tool module knew a tool's name or whether it needs a
20
+ * merchant credential to run. Every consumer that has to answer one of those
21
+ * questions — a hosted endpoint deciding what to expose, a connector deciding
22
+ * what to serve locally — would otherwise keep its own copy of the answer, and a
23
+ * copy is what drifts.
24
+ */
25
+ export interface ToolFacts {
26
+ /** The name the registrar passes to `server.registerTool`, character for character. */
27
+ readonly name: string;
28
+ readonly group: ToolGroup;
29
+ /**
30
+ * True when the tool cannot run without a configured `CredentialProfile`.
31
+ *
32
+ * Read from the handler, never inferred from `group` — see the note above the
33
+ * descriptor list in `./register.js`.
34
+ */
35
+ readonly requiresCredentials: boolean;
36
+ }
37
+ /**
38
+ * A tool that needs a merchant credential and reads no documentation corpus.
39
+ *
40
+ * Both halves of that sentence are enforced by the type rather than asserted in
41
+ * prose: `requiresCredentials` is narrowed to `true`, and the registrar is a
42
+ * {@link CoreRegistrar}, so a handler that reaches for `deps.corpus`,
43
+ * `deps.search` or `deps.symptoms` fails to compile. The two travel together
44
+ * because the same four tools satisfy both, and because the published connector
45
+ * relies on both at once: it serves exactly the credential tools, and it is
46
+ * built without a corpus to serve them from.
47
+ */
48
+ export interface CoreToolDescriptor extends ToolFacts {
49
+ readonly registrar: CoreRegistrar;
50
+ readonly requiresCredentials: true;
51
+ }
52
+ //# sourceMappingURL=descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptor.d.ts","sourceRoot":"","sources":["../../src/tools/descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;;;;;;;;;GAUG;AAEH,mFAAmF;AACnF,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,aAAa,CAAC;AAErF;;;;;;;;;GASG;AACH,MAAM,WAAW,SAAS;IACxB,uFAAuF;IACvF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B;;;;;OAKG;IACH,QAAQ,CAAC,mBAAmB,EAAE,OAAO,CAAC;CACvC;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,QAAQ,CAAC,mBAAmB,EAAE,IAAI,CAAC;CACpC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"descriptor.js","sourceRoot":"","sources":["../../src/tools/descriptor.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { Registrar } from '../registry.js';
2
+ export declare const registerDiagnoseIntegrationIssue: Registrar;
3
+ //# sourceMappingURL=diagnostic-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic-tools.d.ts","sourceRoot":"","sources":["../../src/tools/diagnostic-tools.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAqBhD,eAAO,MAAM,gCAAgC,EAAE,SAyJ9C,CAAC"}
@@ -0,0 +1,128 @@
1
+ import { z } from 'zod';
2
+ import { forensicProvenance, requestHashOptions } from '../catalogue/hash-options.js';
3
+ import { classifyResponse } from '../domain/response-codes.js';
4
+ import { diagnoseHashMismatch } from '../domain/secure-hash.js';
5
+ import { formatValidationResult, validatePayload } from '../validation/payload-validator.js';
6
+ import { citations, resolveEnvironment, resolveIntegritySalt, safeHandler, toolResult } from './tool-kit.js';
7
+ /**
8
+ * Triage tool.
9
+ *
10
+ * Where a payload is supplied it does not guess: it runs the validator and the
11
+ * hash diagnosis and reports what they actually found. The symptom knowledge
12
+ * base is the fallback for when there is nothing concrete to inspect.
13
+ */
14
+ function renderSymptom(symptom) {
15
+ return [
16
+ `### ${symptom.title}`,
17
+ ...symptom.causes.map((cause, index) => `${String(index + 1)}. **${cause.cause}**\n Check: ${cause.check}\n Fix: ${cause.fix}`),
18
+ ].join('\n');
19
+ }
20
+ export const registerDiagnoseIntegrationIssue = (server, deps) => {
21
+ server.registerTool('jazzcash_diagnose_integration_issue', {
22
+ title: 'Diagnose a JazzCash integration problem',
23
+ description: 'Triage an integration failure. Given a payload or a response it runs the real validator and hash diagnosis rather than guessing; given only a description it returns ranked causes from the documented failure modes, each with a check and a fix.',
24
+ inputSchema: {
25
+ symptom: z
26
+ .string()
27
+ .optional()
28
+ .describe('What you observe, in your own words, e.g. "hash mismatch on every request".'),
29
+ flowId: z
30
+ .string()
31
+ .optional()
32
+ .describe('Flow being integrated, e.g. "mwallet-rest-v1.1". Enables payload validation.'),
33
+ requestPayload: z
34
+ .record(z.string(), z.union([z.string(), z.number(), z.null()]))
35
+ .optional()
36
+ .describe('The request you sent, including pp_SecureHash if you have it.'),
37
+ responsePayload: z
38
+ .record(z.string(), z.union([z.string(), z.number(), z.null()]))
39
+ .optional()
40
+ .describe('The response you received.'),
41
+ errorText: z.string().optional().describe('Any error message or code the gateway returned.'),
42
+ },
43
+ }, safeHandler(deps, 'jazzcash_diagnose_integration_issue', ({ symptom, flowId, requestPayload, responsePayload, errorText }) => {
44
+ const sections = ['# JazzCash integration diagnosis'];
45
+ const findings = {};
46
+ const docRefs = [];
47
+ const flow = flowId === undefined ? undefined : deps.catalogue.get(flowId);
48
+ // 1. Concrete evidence first: validate the actual payload.
49
+ if (flow !== undefined && requestPayload !== undefined) {
50
+ const environment = resolveEnvironment(deps, undefined);
51
+ const registeredReturnUrl = deps.credentials.has(environment)
52
+ ? deps.credentials.get(environment).returnUrl
53
+ : undefined;
54
+ const validation = validatePayload(flow, requestPayload, { registeredReturnUrl });
55
+ findings['validation'] = {
56
+ valid: validation.valid,
57
+ errors: validation.errors,
58
+ warnings: validation.warnings,
59
+ };
60
+ sections.push('## Payload validation', formatValidationResult(validation));
61
+ docRefs.push(...flow.docRefs);
62
+ }
63
+ // 2. If a hash was supplied, demonstrate what produced it.
64
+ const suppliedHash = requestPayload?.['pp_SecureHash'];
65
+ if (flow !== undefined &&
66
+ requestPayload !== undefined &&
67
+ typeof suppliedHash === 'string' &&
68
+ suppliedHash !== '') {
69
+ const environment = resolveEnvironment(deps, undefined);
70
+ const { salt } = resolveIntegritySalt(deps, undefined, environment);
71
+ const { pp_SecureHash: _supplied, ...withoutHash } = requestPayload;
72
+ // A request, so the construction is the flow's own declared one and a
73
+ // variant that reproduces the merchant's hash is a demonstration
74
+ // rather than a guess. Passed explicitly rather than left to a
75
+ // default, because the value that reports less is the safe one: a
76
+ // call site that says nothing must not be the one that accuses.
77
+ const diagnosis = diagnoseHashMismatch(withoutHash, salt, suppliedHash, requestHashOptions(flow), forensicProvenance(flow, 'request'));
78
+ findings['hash'] = {
79
+ matches: diagnosis.matches,
80
+ hypotheses: diagnosis.hypotheses.map((entry) => ({ id: entry.id, confidence: entry.confidence })),
81
+ };
82
+ sections.push('## Secure hash', diagnosis.matches
83
+ ? 'The supplied pp_SecureHash matches a hash computed from this payload. The hash is not the problem.'
84
+ : [
85
+ diagnosis.summary,
86
+ '',
87
+ diagnosis.hypotheses
88
+ .map((entry) => `- **${entry.label}** (${entry.confidence})\n Fix: ${entry.fix}`)
89
+ .join('\n'),
90
+ ].join('\n'));
91
+ }
92
+ // 3. Interpret the response.
93
+ if (responsePayload !== undefined) {
94
+ // The flow's own success contract, where a flow was named. Without it
95
+ // a declined card reads as "no recognisable response code field" and
96
+ // the merchant is sent to Status Inquiry instead of being told not to
97
+ // release the goods — on the tool they reach for after a payment has
98
+ // already gone wrong.
99
+ const classification = classifyResponse(responsePayload, flow?.responseContext ?? 'inquiry', flow?.response);
100
+ findings['response'] = { classification: classification.classification, reason: classification.reason };
101
+ sections.push('## Response', `Outcome: **${classification.classification}** — ${classification.reason}`, classification.nextSteps.map((step) => `- ${step}`).join('\n'));
102
+ }
103
+ // 4. Fall back to the documented failure modes.
104
+ const description = [symptom, errorText].filter((part) => part !== undefined && part !== '').join(' ');
105
+ const matches = description === '' ? [] : deps.symptoms.match(description);
106
+ if (matches.length > 0) {
107
+ findings['symptoms'] = matches.map((match) => match.symptom.id);
108
+ sections.push('## Documented failure modes matching your description', matches.map((match) => renderSymptom(match.symptom)).join('\n\n'));
109
+ for (const match of matches) {
110
+ docRefs.push(...deps.symptoms.docRefsFor(match.symptom));
111
+ }
112
+ }
113
+ if (sections.length === 1) {
114
+ sections.push('', 'Nothing to diagnose from the information supplied.', '', 'Supply at least one of: a description of what you observe, the request payload with its flowId, or the response you received.', '', `Documented failure modes: ${deps.symptoms
115
+ .symptoms()
116
+ .map((entry) => entry.title)
117
+ .join('; ')}.`);
118
+ }
119
+ return toolResult(`${sections.join('\n\n')}${citations(docRefs)}`, { structuredContent: findings });
120
+ },
121
+ // Both payloads, refused before either is validated or hashed. A triage
122
+ // tool is where a merchant is most likely to paste a whole failing
123
+ // request, so it is the likeliest route for a PAN to arrive. An unknown
124
+ // flowId is still the handler's to report: the wrapper looks the flow up
125
+ // tolerantly, so this call answers a refusal with the refusal.
126
+ { payloadArguments: ['requestPayload', 'responsePayload'], flowFrom: 'flowId' }));
127
+ };
128
+ //# sourceMappingURL=diagnostic-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostic-tools.js","sourceRoot":"","sources":["../../src/tools/diagnostic-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE7G;;;;;;GAMG;AAEH,SAAS,aAAa,CAAC,OAA0B;IAC/C,OAAO;QACL,OAAO,OAAO,CAAC,KAAK,EAAE;QACtB,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CACnB,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO,KAAK,CAAC,KAAK,iBAAiB,KAAK,CAAC,KAAK,aAAa,KAAK,CAAC,GAAG,EAAE,CAC7G;KACF,CAAC,IAAI,CAAC,IAAI,CAAC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CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YAC3D,CAAC;QACH,CAAC;QAED,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,QAAQ,CAAC,IAAI,CACX,EAAE,EACF,oDAAoD,EACpD,EAAE,EACF,+HAA+H,EAC/H,EAAE,EACF,6BAA6B,IAAI,CAAC,QAAQ;iBACvC,QAAQ,EAAE;iBACV,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;iBAC3B,IAAI,CAAC,IAAI,CAAC,GAAG,CACjB,CAAC;QACJ,CAAC;QAED,OAAO,UAAU,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,iBAAiB,EAAE,QAAQ,EAAE,CAAC,CAAC;IACtG,CAAC;IACD,wEAAwE;IACxE,mEAAmE;IACnE,wEAAwE;IACxE,yEAAyE;IACzE,+DAA+D;IAC/D,EAAE,gBAAgB,EAAE,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAChF,CACF,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { CoreRegistrar } from '../core/registry.js';
2
+ export declare const registerSendGatewayRequest: CoreRegistrar;
3
+ export declare const registerRunSandboxSmokeTest: CoreRegistrar;
4
+ export declare const registerBuildCheckoutForm: CoreRegistrar;
5
+ export declare const registerVerifyIpnNotification: CoreRegistrar;
6
+ //# sourceMappingURL=gateway-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gateway-tools.d.ts","sourceRoot":"","sources":["../../src/tools/gateway-tools.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAgEzD,eAAO,MAAM,0BAA0B,EAAE,aAkDxC,CAAC;AAcF,eAAO,MAAM,2BAA2B,EAAE,aAuFzC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,aAgHvC,CAAC;AAwBF,eAAO,MAAM,6BAA6B,EAAE,aAwH3C,CAAC"}