@flowrunner/cli 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 (460) hide show
  1. package/README.md +148 -0
  2. package/ai-docs/instructions/service-code-format/01-service-structure.md +180 -0
  3. package/ai-docs/instructions/service-code-format/02-zod-types.md +260 -0
  4. package/ai-docs/instructions/service-code-format/03-parameters.md +193 -0
  5. package/ai-docs/instructions/service-code-format/04-http-requests.md +257 -0
  6. package/ai-docs/instructions/service-code-format/05-dictionaries.md +103 -0
  7. package/ai-docs/instructions/service-code-format/06-oauth2.md +42 -0
  8. package/ai-docs/instructions/service-code-format/07-actions.md +171 -0
  9. package/ai-docs/instructions/service-code-format/08-polling-triggers.md +54 -0
  10. package/ai-docs/instructions/service-code-format/09-realtime-triggers.md +269 -0
  11. package/ai-docs/instructions/service-code-format/10-files-api.md +148 -0
  12. package/ai-docs/instructions/service-code-format/11-output-model.md +142 -0
  13. package/ai-docs/instructions/service-code-format/12-service-readme.md +69 -0
  14. package/ai-docs/instructions/service-code-format/13-runtime-contracts.md +193 -0
  15. package/ai-docs/instructions/service-code-format/14-reference-service.md +341 -0
  16. package/ai-docs/instructions/service-code-format/15-unit-tests.md +361 -0
  17. package/ai-docs/instructions/service-code-format/16-gotchas.md +201 -0
  18. package/ai-docs/instructions/service-code-format/17-client-certificates.md +162 -0
  19. package/ai-docs/instructions/service-code-format/18-test-recipes.md +160 -0
  20. package/ai-docs/instructions/service-code-format/README.md +120 -0
  21. package/ai-docs/providers/claude/agents/flowrunner-service-code-engineer.md +139 -0
  22. package/ai-docs/providers/claude/agents/flowrunner-service-test-engineer.md +497 -0
  23. package/ai-docs/providers/claude/main-orchestrator-segment.md +51 -0
  24. package/bin/flowrunner.js +66 -0
  25. package/bin/resolve-local.js +98 -0
  26. package/dist/cli.js +10972 -0
  27. package/dist/cli.js.map +7 -0
  28. package/dist/index.d.ts +2 -0
  29. package/dist/index.js +10131 -0
  30. package/dist/index.js.map +7 -0
  31. package/dist/types/flow-extension-runner/src/common/config.d.ts +12 -0
  32. package/dist/types/flow-extension-runner/src/common/constants.d.ts +9 -0
  33. package/dist/types/flow-extension-runner/src/common/context-files.d.ts +107 -0
  34. package/dist/types/flow-extension-runner/src/common/context.d.ts +6 -0
  35. package/dist/types/flow-extension-runner/src/common/types.d.ts +11 -0
  36. package/dist/types/flow-extension-runner/src/errors/base.d.ts +17 -0
  37. package/dist/types/flow-extension-runner/src/errors/codes.d.ts +17 -0
  38. package/dist/types/flow-extension-runner/src/errors/errors.d.ts +48 -0
  39. package/dist/types/flow-extension-runner/src/errors/index.d.ts +3 -0
  40. package/dist/types/flow-extension-runner/src/global.d.ts +34 -0
  41. package/dist/types/flow-extension-runner/src/index.d.ts +15 -0
  42. package/dist/types/flow-extension-runner/src/namespace.d.ts +3 -0
  43. package/dist/types/flow-extension-runner/src/v1/config.d.ts +3 -0
  44. package/dist/types/flow-extension-runner/src/v1/constants.d.ts +4 -0
  45. package/dist/types/flow-extension-runner/src/v1/index.d.ts +11 -0
  46. package/dist/types/flow-extension-runner/src/v1/namespace.d.ts +9 -0
  47. package/dist/types/flow-extension-runner/src/v1/service.d.ts +29 -0
  48. package/dist/types/flow-extension-runner/src/v1/types.d.ts +13 -0
  49. package/dist/types/flow-extension-runner/src/v2/actions/action-method.d.ts +34 -0
  50. package/dist/types/flow-extension-runner/src/v2/context/execution-context.d.ts +25 -0
  51. package/dist/types/flow-extension-runner/src/v2/context/logger.d.ts +2 -0
  52. package/dist/types/flow-extension-runner/src/v2/context/method-input.d.ts +27 -0
  53. package/dist/types/flow-extension-runner/src/v2/context/proxies.d.ts +1 -0
  54. package/dist/types/flow-extension-runner/src/v2/create-extension.d.ts +2 -0
  55. package/dist/types/flow-extension-runner/src/v2/crypto.d.ts +6 -0
  56. package/dist/types/flow-extension-runner/src/v2/dictionaries/dictionary-method.d.ts +24 -0
  57. package/dist/types/flow-extension-runner/src/v2/dictionaries/payload-schema.d.ts +10 -0
  58. package/dist/types/flow-extension-runner/src/v2/extension.d.ts +51 -0
  59. package/dist/types/flow-extension-runner/src/v2/index.d.ts +39 -0
  60. package/dist/types/flow-extension-runner/src/v2/loaders/loader-method.d.ts +31 -0
  61. package/dist/types/flow-extension-runner/src/v2/loaders/loader-owner.d.ts +17 -0
  62. package/dist/types/flow-extension-runner/src/v2/loaders/payload-schema.d.ts +3 -0
  63. package/dist/types/flow-extension-runner/src/v2/method.d.ts +22 -0
  64. package/dist/types/flow-extension-runner/src/v2/model/field-mapper.d.ts +10 -0
  65. package/dist/types/flow-extension-runner/src/v2/model/method-model.d.ts +3 -0
  66. package/dist/types/flow-extension-runner/src/v2/model/model-types.d.ts +70 -0
  67. package/dist/types/flow-extension-runner/src/v2/model/params-model.d.ts +16 -0
  68. package/dist/types/flow-extension-runner/src/v2/oauth/method-names.d.ts +5 -0
  69. package/dist/types/flow-extension-runner/src/v2/oauth/oauth2.d.ts +9 -0
  70. package/dist/types/flow-extension-runner/src/v2/oauth/system-params.d.ts +6 -0
  71. package/dist/types/flow-extension-runner/src/v2/oauth/types.d.ts +54 -0
  72. package/dist/types/flow-extension-runner/src/v2/params/config-params.d.ts +14 -0
  73. package/dist/types/flow-extension-runner/src/v2/params/files-options.d.ts +58 -0
  74. package/dist/types/flow-extension-runner/src/v2/params/index.d.ts +19 -0
  75. package/dist/types/flow-extension-runner/src/v2/params/json/checks.d.ts +26 -0
  76. package/dist/types/flow-extension-runner/src/v2/params/json/decode.d.ts +24 -0
  77. package/dist/types/flow-extension-runner/src/v2/params/json/encode.d.ts +20 -0
  78. package/dist/types/flow-extension-runner/src/v2/params/json/types.d.ts +86 -0
  79. package/dist/types/flow-extension-runner/src/v2/params/json/values.d.ts +5 -0
  80. package/dist/types/flow-extension-runner/src/v2/params/method-params.d.ts +17 -0
  81. package/dist/types/flow-extension-runner/src/v2/params/params.d.ts +26 -0
  82. package/dist/types/flow-extension-runner/src/v2/params/schema/assert-object-schema.d.ts +6 -0
  83. package/dist/types/flow-extension-runner/src/v2/params/schema/assert-supported-schema.d.ts +8 -0
  84. package/dist/types/flow-extension-runner/src/v2/params/schema/coerce.d.ts +54 -0
  85. package/dist/types/flow-extension-runner/src/v2/params/schema/dates.d.ts +40 -0
  86. package/dist/types/flow-extension-runner/src/v2/params/schema/defaults.d.ts +36 -0
  87. package/dist/types/flow-extension-runner/src/v2/params/schema/field-plan.d.ts +33 -0
  88. package/dist/types/flow-extension-runner/src/v2/params/schema/introspect.d.ts +58 -0
  89. package/dist/types/flow-extension-runner/src/v2/params/schema/labels.d.ts +3 -0
  90. package/dist/types/flow-extension-runner/src/v2/params/schema/messages.d.ts +16 -0
  91. package/dist/types/flow-extension-runner/src/v2/params/schema/normalize.d.ts +8 -0
  92. package/dist/types/flow-extension-runner/src/v2/params/schema/parse.d.ts +7 -0
  93. package/dist/types/flow-extension-runner/src/v2/params/types.d.ts +29 -0
  94. package/dist/types/flow-extension-runner/src/v2/params/widget-types.d.ts +40 -0
  95. package/dist/types/flow-extension-runner/src/v2/params/zod.d.ts +86 -0
  96. package/dist/types/flow-extension-runner/src/v2/path.d.ts +1 -0
  97. package/dist/types/flow-extension-runner/src/v2/polling-triggers/mechanisms.d.ts +19 -0
  98. package/dist/types/flow-extension-runner/src/v2/polling-triggers/method-names.d.ts +1 -0
  99. package/dist/types/flow-extension-runner/src/v2/polling-triggers/polling-triggers.d.ts +11 -0
  100. package/dist/types/flow-extension-runner/src/v2/polling-triggers/system-params.d.ts +7 -0
  101. package/dist/types/flow-extension-runner/src/v2/polling-triggers/trigger-method.d.ts +25 -0
  102. package/dist/types/flow-extension-runner/src/v2/polling-triggers/types.d.ts +46 -0
  103. package/dist/types/flow-extension-runner/src/v2/realtime-triggers/method-names.d.ts +7 -0
  104. package/dist/types/flow-extension-runner/src/v2/realtime-triggers/realtime-setup.d.ts +10 -0
  105. package/dist/types/flow-extension-runner/src/v2/realtime-triggers/system-params.d.ts +29 -0
  106. package/dist/types/flow-extension-runner/src/v2/realtime-triggers/trigger-method.d.ts +33 -0
  107. package/dist/types/flow-extension-runner/src/v2/realtime-triggers/types.d.ts +147 -0
  108. package/dist/types/flow-extension-runner/src/v2/realtime-triggers/verify.d.ts +2 -0
  109. package/dist/types/flow-extension-runner/src/v2/registry.d.ts +20 -0
  110. package/dist/types/flow-extension-runner/src/v2/result.d.ts +13 -0
  111. package/dist/types/flow-extension-runner/src/v2/system-method.d.ts +41 -0
  112. package/dist/types/flow-extension-runner/src/v2/types.d.ts +126 -0
  113. package/dist/types/jsdoc-parser/src/custom-type-defs/files.d.ts +2 -0
  114. package/dist/types/jsdoc-parser/src/index.d.ts +2 -0
  115. package/dist/types/jsdoc-parser/src/lib.d.ts +42 -0
  116. package/dist/types/jsdoc-parser/src/types.d.ts +2 -0
  117. package/dist/types/packages/cli/src/api/console-client.d.ts +69 -0
  118. package/dist/types/packages/cli/src/constants/index.d.ts +5 -0
  119. package/dist/types/packages/cli/src/constants/packaging.d.ts +7 -0
  120. package/dist/types/packages/cli/src/constants/project.d.ts +9 -0
  121. package/dist/types/packages/cli/src/constants/providers.d.ts +30 -0
  122. package/dist/types/packages/cli/src/constants/server.d.ts +29 -0
  123. package/dist/types/packages/cli/src/constants/testing.d.ts +32 -0
  124. package/dist/types/packages/cli/src/errors.d.ts +131 -0
  125. package/dist/types/packages/cli/src/index.d.ts +29 -0
  126. package/dist/types/packages/cli/src/operations/deploy/discover-services.d.ts +26 -0
  127. package/dist/types/packages/cli/src/operations/deploy/hash.d.ts +1 -0
  128. package/dist/types/packages/cli/src/operations/deploy/index.d.ts +94 -0
  129. package/dist/types/packages/cli/src/operations/deploy/public-files.d.ts +20 -0
  130. package/dist/types/packages/cli/src/operations/deploy/select.d.ts +9 -0
  131. package/dist/types/packages/cli/src/operations/deploy/zip.d.ts +1 -0
  132. package/dist/types/packages/cli/src/operations/init/answers.d.ts +35 -0
  133. package/dist/types/packages/cli/src/operations/init/create-service.d.ts +39 -0
  134. package/dist/types/packages/cli/src/operations/init/index.d.ts +79 -0
  135. package/dist/types/packages/cli/src/operations/init/testing.d.ts +13 -0
  136. package/dist/types/packages/cli/src/operations/init-claude/index.d.ts +40 -0
  137. package/dist/types/packages/cli/src/operations/init-claude/segment.d.ts +25 -0
  138. package/dist/types/packages/cli/src/operations/login.d.ts +38 -0
  139. package/dist/types/packages/cli/src/operations/logout.d.ts +19 -0
  140. package/dist/types/packages/cli/src/operations/pull/extract.d.ts +23 -0
  141. package/dist/types/packages/cli/src/operations/pull/index.d.ts +87 -0
  142. package/dist/types/packages/cli/src/operations/server-target.d.ts +14 -0
  143. package/dist/types/packages/cli/src/operations/types.d.ts +20 -0
  144. package/dist/types/packages/cli/src/operations/use-server.d.ts +17 -0
  145. package/dist/types/packages/cli/src/project/auth.d.ts +41 -0
  146. package/dist/types/packages/cli/src/project/config.d.ts +31 -0
  147. package/dist/types/packages/cli/src/project/token.d.ts +5 -0
  148. package/dist/types/packages/cli/src/server/index.d.ts +14 -0
  149. package/dist/types/packages/cli/src/server/pages.d.ts +2 -0
  150. package/dist/types/packages/cli/src/server/routes/callback.d.ts +6 -0
  151. package/dist/types/packages/cli/src/server/types.d.ts +12 -0
  152. package/dist/types/packages/cli/src/templates/index.d.ts +8 -0
  153. package/dist/types/packages/cli/src/templates/manifest.d.ts +97 -0
  154. package/dist/types/packages/cli/src/templates/package-root.d.ts +3 -0
  155. package/dist/types/packages/cli/src/templates/paths.d.ts +3 -0
  156. package/dist/types/packages/cli/src/templates/registry.d.ts +13 -0
  157. package/dist/types/packages/cli/src/templates/render.d.ts +13 -0
  158. package/dist/types/packages/cli/src/templates/scaffold.d.ts +25 -0
  159. package/dist/types/packages/cli/src/utils/invocation.d.ts +28 -0
  160. package/dist/types/packages/cli/src/utils/open-browser.d.ts +2 -0
  161. package/dist/types/shared/src/constants/ai-agent-tools.d.ts +20 -0
  162. package/dist/types/shared/src/constants/ai.d.ts +11 -0
  163. package/dist/types/shared/src/constants/api-keys.d.ts +1 -0
  164. package/dist/types/shared/src/constants/app.d.ts +58 -0
  165. package/dist/types/shared/src/constants/billing.d.ts +16 -0
  166. package/dist/types/shared/src/constants/compliances.d.ts +3 -0
  167. package/dist/types/shared/src/constants/data-types.d.ts +26 -0
  168. package/dist/types/shared/src/constants/error-codes.d.ts +16 -0
  169. package/dist/types/shared/src/constants/flow.d.ts +12 -0
  170. package/dist/types/shared/src/constants/index.d.ts +16 -0
  171. package/dist/types/shared/src/constants/knowledge-base.d.ts +13 -0
  172. package/dist/types/shared/src/constants/notification-types.d.ts +985 -0
  173. package/dist/types/shared/src/constants/notifications.d.ts +10 -0
  174. package/dist/types/shared/src/constants/patterns.d.ts +28 -0
  175. package/dist/types/shared/src/constants/retry-policy.d.ts +30 -0
  176. package/dist/types/shared/src/constants/severity.d.ts +9 -0
  177. package/dist/types/shared/src/constants/shared-extensions-search.d.ts +6 -0
  178. package/dist/types/shared/src/constants/shared-extensions.d.ts +35 -0
  179. package/dist/types/shared/src/constants/zod.d.ts +2 -0
  180. package/dist/types/shared/src/errors/api.d.ts +4 -0
  181. package/dist/types/shared/src/errors/base.d.ts +38 -0
  182. package/dist/types/shared/src/errors/common.d.ts +39 -0
  183. package/dist/types/shared/src/errors/index.d.ts +13 -0
  184. package/dist/types/shared/src/errors/k8s.d.ts +4 -0
  185. package/dist/types/shared/src/errors/message.d.ts +48 -0
  186. package/dist/types/shared/src/errors/open-search.d.ts +4 -0
  187. package/dist/types/shared/src/errors/s3.d.ts +11 -0
  188. package/dist/types/shared/src/extensions/zod.d.ts +25 -0
  189. package/dist/types/shared/src/scheme/account/dto.d.ts +60 -0
  190. package/dist/types/shared/src/scheme/account/index.d.ts +1 -0
  191. package/dist/types/shared/src/scheme/ai-agent-tools/dto.d.ts +69 -0
  192. package/dist/types/shared/src/scheme/ai-agent-tools/index.d.ts +2 -0
  193. package/dist/types/shared/src/scheme/ai-agent-tools/parameters.d.ts +7 -0
  194. package/dist/types/shared/src/scheme/ai-router/dto.d.ts +23 -0
  195. package/dist/types/shared/src/scheme/ai-router/index.d.ts +2 -0
  196. package/dist/types/shared/src/scheme/api-keys/dto.d.ts +28 -0
  197. package/dist/types/shared/src/scheme/api-keys/index.d.ts +2 -0
  198. package/dist/types/shared/src/scheme/app/index.d.ts +1 -0
  199. package/dist/types/shared/src/scheme/app/java.dto.d.ts +6 -0
  200. package/dist/types/shared/src/scheme/billing/index.d.ts +1 -0
  201. package/dist/types/shared/src/scheme/billing/java.dto.d.ts +163 -0
  202. package/dist/types/shared/src/scheme/crm/billing.d.ts +149 -0
  203. package/dist/types/shared/src/scheme/crm/dto.d.ts +212 -0
  204. package/dist/types/shared/src/scheme/crm/index.d.ts +3 -0
  205. package/dist/types/shared/src/scheme/data-types/index.d.ts +1 -0
  206. package/dist/types/shared/src/scheme/data-types/java.dto.d.ts +23 -0
  207. package/dist/types/shared/src/scheme/dynamic-forms/dto.d.ts +30 -0
  208. package/dist/types/shared/src/scheme/dynamic-forms/index.d.ts +2 -0
  209. package/dist/types/shared/src/scheme/extensions/index.d.ts +1 -0
  210. package/dist/types/shared/src/scheme/extensions/params-to-zod.d.ts +14 -0
  211. package/dist/types/shared/src/scheme/flowrunner/custom-elements.d.ts +368 -0
  212. package/dist/types/shared/src/scheme/flowrunner/index.d.ts +3 -0
  213. package/dist/types/shared/src/scheme/flowrunner/java.dto.d.ts +628 -0
  214. package/dist/types/shared/src/scheme/index.d.ts +19 -0
  215. package/dist/types/shared/src/scheme/integration-connection/dto.d.ts +81 -0
  216. package/dist/types/shared/src/scheme/integration-connection/index.d.ts +2 -0
  217. package/dist/types/shared/src/scheme/knowledge-base/dto.d.ts +540 -0
  218. package/dist/types/shared/src/scheme/knowledge-base/index.d.ts +2 -0
  219. package/dist/types/shared/src/scheme/mcp-oauth/dto.d.ts +7 -0
  220. package/dist/types/shared/src/scheme/mcp-oauth/index.d.ts +2 -0
  221. package/dist/types/shared/src/scheme/notifications/dto.d.ts +111 -0
  222. package/dist/types/shared/src/scheme/notifications/index.d.ts +3 -0
  223. package/dist/types/shared/src/scheme/notifications/rest.d.ts +148 -0
  224. package/dist/types/shared/src/scheme/properties/account.d.ts +3 -0
  225. package/dist/types/shared/src/scheme/properties/app.d.ts +5 -0
  226. package/dist/types/shared/src/scheme/properties/billing.d.ts +12 -0
  227. package/dist/types/shared/src/scheme/properties/common.d.ts +2 -0
  228. package/dist/types/shared/src/scheme/properties/db.d.ts +8 -0
  229. package/dist/types/shared/src/scheme/properties/flow-extensions.d.ts +7 -0
  230. package/dist/types/shared/src/scheme/properties/index.d.ts +7 -0
  231. package/dist/types/shared/src/scheme/remote-mcp-server/dto.d.ts +278 -0
  232. package/dist/types/shared/src/scheme/remote-mcp-server/index.d.ts +2 -0
  233. package/dist/types/shared/src/scheme/shared-extensions/base.d.ts +56 -0
  234. package/dist/types/shared/src/scheme/shared-extensions/config.d.ts +96 -0
  235. package/dist/types/shared/src/scheme/shared-extensions/custom-extensions.d.ts +485 -0
  236. package/dist/types/shared/src/scheme/shared-extensions/extension.d.ts +387 -0
  237. package/dist/types/shared/src/scheme/shared-extensions/flow-extensions.d.ts +64 -0
  238. package/dist/types/shared/src/scheme/shared-extensions/index.d.ts +15 -0
  239. package/dist/types/shared/src/scheme/shared-extensions/light.d.ts +38 -0
  240. package/dist/types/shared/src/scheme/shared-extensions/logs.d.ts +21 -0
  241. package/dist/types/shared/src/scheme/shared-extensions/methods.d.ts +80 -0
  242. package/dist/types/shared/src/scheme/shared-extensions/params-schema.d.ts +47 -0
  243. package/dist/types/shared/src/scheme/shared-extensions/popular-pool.d.ts +11 -0
  244. package/dist/types/shared/src/scheme/shared-extensions/resolve.d.ts +364 -0
  245. package/dist/types/shared/src/scheme/shared-extensions/rest.d.ts +9 -0
  246. package/dist/types/shared/src/scheme/shared-extensions/search.d.ts +177 -0
  247. package/dist/types/shared/src/scheme/shared-extensions/service-identity.d.ts +10 -0
  248. package/dist/types/shared/src/scheme/shared-extensions/service-info.d.ts +15 -0
  249. package/dist/types/shared/src/scheme/workspace/dto.d.ts +40 -0
  250. package/dist/types/shared/src/scheme/workspace/index.d.ts +1 -0
  251. package/dist/types/shared/src/utils/object.d.ts +8 -0
  252. package/dist/types/shared/src/utils/uuid.d.ts +5 -0
  253. package/dist/types/shared/src/utils/versions.d.ts +4 -0
  254. package/dist/types/types/backendless-request.d.ts +40 -0
  255. package/package.json +66 -0
  256. package/project-files/jest.config.js +38 -0
  257. package/project-files/jest.setup.js +24 -0
  258. package/project-files/sandbox/files-mock.js +654 -0
  259. package/project-files/sandbox/index.js +32 -0
  260. package/project-files/sandbox/nock-mock.js +600 -0
  261. package/project-files/sandbox/service.js +145 -0
  262. package/runtime/index.d.ts +2 -0
  263. package/runtime/index.js +5665 -0
  264. package/runtime/index.js.map +7 -0
  265. package/runtime/types/flow-extension-runner/src/common/config.d.ts +12 -0
  266. package/runtime/types/flow-extension-runner/src/common/constants.d.ts +9 -0
  267. package/runtime/types/flow-extension-runner/src/common/context-files.d.ts +107 -0
  268. package/runtime/types/flow-extension-runner/src/common/context.d.ts +6 -0
  269. package/runtime/types/flow-extension-runner/src/common/types.d.ts +11 -0
  270. package/runtime/types/flow-extension-runner/src/errors/base.d.ts +17 -0
  271. package/runtime/types/flow-extension-runner/src/errors/codes.d.ts +17 -0
  272. package/runtime/types/flow-extension-runner/src/errors/errors.d.ts +48 -0
  273. package/runtime/types/flow-extension-runner/src/errors/index.d.ts +3 -0
  274. package/runtime/types/flow-extension-runner/src/global.d.ts +34 -0
  275. package/runtime/types/flow-extension-runner/src/index.d.ts +15 -0
  276. package/runtime/types/flow-extension-runner/src/namespace.d.ts +3 -0
  277. package/runtime/types/flow-extension-runner/src/v1/config.d.ts +3 -0
  278. package/runtime/types/flow-extension-runner/src/v1/constants.d.ts +4 -0
  279. package/runtime/types/flow-extension-runner/src/v1/index.d.ts +11 -0
  280. package/runtime/types/flow-extension-runner/src/v1/namespace.d.ts +9 -0
  281. package/runtime/types/flow-extension-runner/src/v1/service.d.ts +29 -0
  282. package/runtime/types/flow-extension-runner/src/v1/types.d.ts +13 -0
  283. package/runtime/types/flow-extension-runner/src/v2/actions/action-method.d.ts +34 -0
  284. package/runtime/types/flow-extension-runner/src/v2/context/execution-context.d.ts +25 -0
  285. package/runtime/types/flow-extension-runner/src/v2/context/logger.d.ts +2 -0
  286. package/runtime/types/flow-extension-runner/src/v2/context/method-input.d.ts +27 -0
  287. package/runtime/types/flow-extension-runner/src/v2/context/proxies.d.ts +1 -0
  288. package/runtime/types/flow-extension-runner/src/v2/create-extension.d.ts +2 -0
  289. package/runtime/types/flow-extension-runner/src/v2/crypto.d.ts +6 -0
  290. package/runtime/types/flow-extension-runner/src/v2/dictionaries/dictionary-method.d.ts +24 -0
  291. package/runtime/types/flow-extension-runner/src/v2/dictionaries/payload-schema.d.ts +10 -0
  292. package/runtime/types/flow-extension-runner/src/v2/extension.d.ts +51 -0
  293. package/runtime/types/flow-extension-runner/src/v2/index.d.ts +39 -0
  294. package/runtime/types/flow-extension-runner/src/v2/loaders/loader-method.d.ts +31 -0
  295. package/runtime/types/flow-extension-runner/src/v2/loaders/loader-owner.d.ts +17 -0
  296. package/runtime/types/flow-extension-runner/src/v2/loaders/payload-schema.d.ts +3 -0
  297. package/runtime/types/flow-extension-runner/src/v2/method.d.ts +22 -0
  298. package/runtime/types/flow-extension-runner/src/v2/model/field-mapper.d.ts +10 -0
  299. package/runtime/types/flow-extension-runner/src/v2/model/method-model.d.ts +3 -0
  300. package/runtime/types/flow-extension-runner/src/v2/model/model-types.d.ts +70 -0
  301. package/runtime/types/flow-extension-runner/src/v2/model/params-model.d.ts +16 -0
  302. package/runtime/types/flow-extension-runner/src/v2/oauth/method-names.d.ts +5 -0
  303. package/runtime/types/flow-extension-runner/src/v2/oauth/oauth2.d.ts +9 -0
  304. package/runtime/types/flow-extension-runner/src/v2/oauth/system-params.d.ts +6 -0
  305. package/runtime/types/flow-extension-runner/src/v2/oauth/types.d.ts +54 -0
  306. package/runtime/types/flow-extension-runner/src/v2/params/config-params.d.ts +14 -0
  307. package/runtime/types/flow-extension-runner/src/v2/params/files-options.d.ts +58 -0
  308. package/runtime/types/flow-extension-runner/src/v2/params/index.d.ts +19 -0
  309. package/runtime/types/flow-extension-runner/src/v2/params/json/checks.d.ts +26 -0
  310. package/runtime/types/flow-extension-runner/src/v2/params/json/decode.d.ts +24 -0
  311. package/runtime/types/flow-extension-runner/src/v2/params/json/encode.d.ts +20 -0
  312. package/runtime/types/flow-extension-runner/src/v2/params/json/types.d.ts +86 -0
  313. package/runtime/types/flow-extension-runner/src/v2/params/json/values.d.ts +5 -0
  314. package/runtime/types/flow-extension-runner/src/v2/params/method-params.d.ts +17 -0
  315. package/runtime/types/flow-extension-runner/src/v2/params/params.d.ts +26 -0
  316. package/runtime/types/flow-extension-runner/src/v2/params/schema/assert-object-schema.d.ts +6 -0
  317. package/runtime/types/flow-extension-runner/src/v2/params/schema/assert-supported-schema.d.ts +8 -0
  318. package/runtime/types/flow-extension-runner/src/v2/params/schema/coerce.d.ts +54 -0
  319. package/runtime/types/flow-extension-runner/src/v2/params/schema/dates.d.ts +40 -0
  320. package/runtime/types/flow-extension-runner/src/v2/params/schema/defaults.d.ts +36 -0
  321. package/runtime/types/flow-extension-runner/src/v2/params/schema/field-plan.d.ts +33 -0
  322. package/runtime/types/flow-extension-runner/src/v2/params/schema/introspect.d.ts +58 -0
  323. package/runtime/types/flow-extension-runner/src/v2/params/schema/labels.d.ts +3 -0
  324. package/runtime/types/flow-extension-runner/src/v2/params/schema/messages.d.ts +16 -0
  325. package/runtime/types/flow-extension-runner/src/v2/params/schema/normalize.d.ts +8 -0
  326. package/runtime/types/flow-extension-runner/src/v2/params/schema/parse.d.ts +7 -0
  327. package/runtime/types/flow-extension-runner/src/v2/params/types.d.ts +29 -0
  328. package/runtime/types/flow-extension-runner/src/v2/params/widget-types.d.ts +40 -0
  329. package/runtime/types/flow-extension-runner/src/v2/params/zod.d.ts +86 -0
  330. package/runtime/types/flow-extension-runner/src/v2/path.d.ts +1 -0
  331. package/runtime/types/flow-extension-runner/src/v2/polling-triggers/mechanisms.d.ts +19 -0
  332. package/runtime/types/flow-extension-runner/src/v2/polling-triggers/method-names.d.ts +1 -0
  333. package/runtime/types/flow-extension-runner/src/v2/polling-triggers/polling-triggers.d.ts +11 -0
  334. package/runtime/types/flow-extension-runner/src/v2/polling-triggers/system-params.d.ts +7 -0
  335. package/runtime/types/flow-extension-runner/src/v2/polling-triggers/trigger-method.d.ts +25 -0
  336. package/runtime/types/flow-extension-runner/src/v2/polling-triggers/types.d.ts +46 -0
  337. package/runtime/types/flow-extension-runner/src/v2/realtime-triggers/method-names.d.ts +7 -0
  338. package/runtime/types/flow-extension-runner/src/v2/realtime-triggers/realtime-setup.d.ts +10 -0
  339. package/runtime/types/flow-extension-runner/src/v2/realtime-triggers/system-params.d.ts +29 -0
  340. package/runtime/types/flow-extension-runner/src/v2/realtime-triggers/trigger-method.d.ts +33 -0
  341. package/runtime/types/flow-extension-runner/src/v2/realtime-triggers/types.d.ts +147 -0
  342. package/runtime/types/flow-extension-runner/src/v2/realtime-triggers/verify.d.ts +2 -0
  343. package/runtime/types/flow-extension-runner/src/v2/registry.d.ts +20 -0
  344. package/runtime/types/flow-extension-runner/src/v2/result.d.ts +13 -0
  345. package/runtime/types/flow-extension-runner/src/v2/system-method.d.ts +41 -0
  346. package/runtime/types/flow-extension-runner/src/v2/types.d.ts +126 -0
  347. package/runtime/types/jsdoc-parser/src/custom-type-defs/files.d.ts +2 -0
  348. package/runtime/types/jsdoc-parser/src/index.d.ts +2 -0
  349. package/runtime/types/jsdoc-parser/src/lib.d.ts +42 -0
  350. package/runtime/types/jsdoc-parser/src/types.d.ts +2 -0
  351. package/runtime/types/packages/cli/src/runtime/index.d.ts +5 -0
  352. package/runtime/types/shared/src/constants/ai-agent-tools.d.ts +20 -0
  353. package/runtime/types/shared/src/constants/ai.d.ts +11 -0
  354. package/runtime/types/shared/src/constants/api-keys.d.ts +1 -0
  355. package/runtime/types/shared/src/constants/app.d.ts +58 -0
  356. package/runtime/types/shared/src/constants/billing.d.ts +16 -0
  357. package/runtime/types/shared/src/constants/compliances.d.ts +3 -0
  358. package/runtime/types/shared/src/constants/data-types.d.ts +26 -0
  359. package/runtime/types/shared/src/constants/error-codes.d.ts +16 -0
  360. package/runtime/types/shared/src/constants/flow.d.ts +12 -0
  361. package/runtime/types/shared/src/constants/index.d.ts +16 -0
  362. package/runtime/types/shared/src/constants/knowledge-base.d.ts +13 -0
  363. package/runtime/types/shared/src/constants/notification-types.d.ts +985 -0
  364. package/runtime/types/shared/src/constants/notifications.d.ts +10 -0
  365. package/runtime/types/shared/src/constants/patterns.d.ts +28 -0
  366. package/runtime/types/shared/src/constants/retry-policy.d.ts +30 -0
  367. package/runtime/types/shared/src/constants/severity.d.ts +9 -0
  368. package/runtime/types/shared/src/constants/shared-extensions-search.d.ts +6 -0
  369. package/runtime/types/shared/src/constants/shared-extensions.d.ts +35 -0
  370. package/runtime/types/shared/src/constants/zod.d.ts +2 -0
  371. package/runtime/types/shared/src/errors/api.d.ts +4 -0
  372. package/runtime/types/shared/src/errors/base.d.ts +38 -0
  373. package/runtime/types/shared/src/errors/common.d.ts +39 -0
  374. package/runtime/types/shared/src/errors/index.d.ts +13 -0
  375. package/runtime/types/shared/src/errors/k8s.d.ts +4 -0
  376. package/runtime/types/shared/src/errors/message.d.ts +48 -0
  377. package/runtime/types/shared/src/errors/open-search.d.ts +4 -0
  378. package/runtime/types/shared/src/errors/s3.d.ts +11 -0
  379. package/runtime/types/shared/src/extensions/zod.d.ts +25 -0
  380. package/runtime/types/shared/src/scheme/account/dto.d.ts +60 -0
  381. package/runtime/types/shared/src/scheme/account/index.d.ts +1 -0
  382. package/runtime/types/shared/src/scheme/ai-agent-tools/dto.d.ts +69 -0
  383. package/runtime/types/shared/src/scheme/ai-agent-tools/index.d.ts +2 -0
  384. package/runtime/types/shared/src/scheme/ai-agent-tools/parameters.d.ts +7 -0
  385. package/runtime/types/shared/src/scheme/ai-router/dto.d.ts +23 -0
  386. package/runtime/types/shared/src/scheme/ai-router/index.d.ts +2 -0
  387. package/runtime/types/shared/src/scheme/api-keys/dto.d.ts +28 -0
  388. package/runtime/types/shared/src/scheme/api-keys/index.d.ts +2 -0
  389. package/runtime/types/shared/src/scheme/app/index.d.ts +1 -0
  390. package/runtime/types/shared/src/scheme/app/java.dto.d.ts +6 -0
  391. package/runtime/types/shared/src/scheme/billing/index.d.ts +1 -0
  392. package/runtime/types/shared/src/scheme/billing/java.dto.d.ts +163 -0
  393. package/runtime/types/shared/src/scheme/crm/billing.d.ts +149 -0
  394. package/runtime/types/shared/src/scheme/crm/dto.d.ts +212 -0
  395. package/runtime/types/shared/src/scheme/crm/index.d.ts +3 -0
  396. package/runtime/types/shared/src/scheme/data-types/index.d.ts +1 -0
  397. package/runtime/types/shared/src/scheme/data-types/java.dto.d.ts +23 -0
  398. package/runtime/types/shared/src/scheme/dynamic-forms/dto.d.ts +30 -0
  399. package/runtime/types/shared/src/scheme/dynamic-forms/index.d.ts +2 -0
  400. package/runtime/types/shared/src/scheme/extensions/index.d.ts +1 -0
  401. package/runtime/types/shared/src/scheme/extensions/params-to-zod.d.ts +14 -0
  402. package/runtime/types/shared/src/scheme/flowrunner/custom-elements.d.ts +368 -0
  403. package/runtime/types/shared/src/scheme/flowrunner/index.d.ts +3 -0
  404. package/runtime/types/shared/src/scheme/flowrunner/java.dto.d.ts +628 -0
  405. package/runtime/types/shared/src/scheme/index.d.ts +19 -0
  406. package/runtime/types/shared/src/scheme/integration-connection/dto.d.ts +81 -0
  407. package/runtime/types/shared/src/scheme/integration-connection/index.d.ts +2 -0
  408. package/runtime/types/shared/src/scheme/knowledge-base/dto.d.ts +540 -0
  409. package/runtime/types/shared/src/scheme/knowledge-base/index.d.ts +2 -0
  410. package/runtime/types/shared/src/scheme/mcp-oauth/dto.d.ts +7 -0
  411. package/runtime/types/shared/src/scheme/mcp-oauth/index.d.ts +2 -0
  412. package/runtime/types/shared/src/scheme/notifications/dto.d.ts +111 -0
  413. package/runtime/types/shared/src/scheme/notifications/index.d.ts +3 -0
  414. package/runtime/types/shared/src/scheme/notifications/rest.d.ts +148 -0
  415. package/runtime/types/shared/src/scheme/properties/account.d.ts +3 -0
  416. package/runtime/types/shared/src/scheme/properties/app.d.ts +5 -0
  417. package/runtime/types/shared/src/scheme/properties/billing.d.ts +12 -0
  418. package/runtime/types/shared/src/scheme/properties/common.d.ts +2 -0
  419. package/runtime/types/shared/src/scheme/properties/db.d.ts +8 -0
  420. package/runtime/types/shared/src/scheme/properties/flow-extensions.d.ts +7 -0
  421. package/runtime/types/shared/src/scheme/properties/index.d.ts +7 -0
  422. package/runtime/types/shared/src/scheme/remote-mcp-server/dto.d.ts +278 -0
  423. package/runtime/types/shared/src/scheme/remote-mcp-server/index.d.ts +2 -0
  424. package/runtime/types/shared/src/scheme/shared-extensions/base.d.ts +56 -0
  425. package/runtime/types/shared/src/scheme/shared-extensions/config.d.ts +96 -0
  426. package/runtime/types/shared/src/scheme/shared-extensions/custom-extensions.d.ts +485 -0
  427. package/runtime/types/shared/src/scheme/shared-extensions/extension.d.ts +387 -0
  428. package/runtime/types/shared/src/scheme/shared-extensions/flow-extensions.d.ts +64 -0
  429. package/runtime/types/shared/src/scheme/shared-extensions/index.d.ts +15 -0
  430. package/runtime/types/shared/src/scheme/shared-extensions/light.d.ts +38 -0
  431. package/runtime/types/shared/src/scheme/shared-extensions/logs.d.ts +21 -0
  432. package/runtime/types/shared/src/scheme/shared-extensions/methods.d.ts +80 -0
  433. package/runtime/types/shared/src/scheme/shared-extensions/params-schema.d.ts +47 -0
  434. package/runtime/types/shared/src/scheme/shared-extensions/popular-pool.d.ts +11 -0
  435. package/runtime/types/shared/src/scheme/shared-extensions/resolve.d.ts +364 -0
  436. package/runtime/types/shared/src/scheme/shared-extensions/rest.d.ts +9 -0
  437. package/runtime/types/shared/src/scheme/shared-extensions/search.d.ts +177 -0
  438. package/runtime/types/shared/src/scheme/shared-extensions/service-identity.d.ts +10 -0
  439. package/runtime/types/shared/src/scheme/shared-extensions/service-info.d.ts +15 -0
  440. package/runtime/types/shared/src/scheme/workspace/dto.d.ts +40 -0
  441. package/runtime/types/shared/src/scheme/workspace/index.d.ts +1 -0
  442. package/runtime/types/shared/src/utils/object.d.ts +8 -0
  443. package/runtime/types/shared/src/utils/uuid.d.ts +5 -0
  444. package/runtime/types/shared/src/utils/versions.d.ts +4 -0
  445. package/runtime/types/types/backendless-request.d.ts +40 -0
  446. package/templates/blank/files/README.md +28 -0
  447. package/templates/blank/files/package.json +8 -0
  448. package/templates/blank/files/public/icon.svg +5 -0
  449. package/templates/blank/files/src/index.js +130 -0
  450. package/templates/blank/template.json +61 -0
  451. package/templates/demo-todo-list/files/README.md +54 -0
  452. package/templates/demo-todo-list/files/package.json +8 -0
  453. package/templates/demo-todo-list/files/public/icon.svg +8 -0
  454. package/templates/demo-todo-list/files/src/index.js +590 -0
  455. package/templates/demo-todo-list/template.json +44 -0
  456. package/templates/qa-test/files/README.md +88 -0
  457. package/templates/qa-test/files/package.json +8 -0
  458. package/templates/qa-test/files/public/icon.svg +8 -0
  459. package/templates/qa-test/files/src/index.js +755 -0
  460. package/templates/qa-test/template.json +62 -0
@@ -0,0 +1,497 @@
1
+ ---
2
+ name: flowrunner-service-test-engineer
3
+ description: "Use this agent to write, fix or improve the unit tests for a FlowRunner extension service in this project — a new suite for a service that has none, wider coverage for one that does, or a failing suite. It writes suites under services/{id}/tests/ against the project's sandbox, with HTTP mocked at the socket; it never calls a real API. Examples — <example>Context: A service was just written. user: \"Write tests for the new Linear service\" assistant: \"I'll use the flowrunner-service-test-engineer agent to write the unit suite against the sandbox.\"</example> <example>Context: A suite is red. user: \"The Asana tests are failing since I changed the dictionary\" assistant: \"Let me use the flowrunner-service-test-engineer agent to diagnose and fix them.\"</example> <example>Context: Thin coverage. user: \"My Stripe service only has one test\" assistant: \"I'll use the flowrunner-service-test-engineer agent to cover every method the platform can invoke.\"</example>"
4
+ color: blue
5
+ ---
6
+
7
+ You write, fix and improve **unit** tests for the services in this project. Unit means HTTP is mocked at the
8
+ socket and nothing leaves the process — there is no live-API test kind here, and you never write one.
9
+
10
+ A suite lives at `services/{id}/tests/{id}.test.js` and runs with `npm test`. Everything it needs comes from
11
+ `sandbox/`, which `flowrunner init` copied into this project.
12
+
13
+ ## Before writing anything
14
+
15
+ 1. **Read `services/{id}/src/index.js` in full.** Every action, dictionary and trigger; the params each one
16
+ declares and their names; the URLs, headers and body shapes; the shared `apiRequest` helper and what it
17
+ does to a response on the way back.
18
+
19
+ If you were given a **handover** from the engineer who wrote the service — the registered items, what each
20
+ calls, the error envelope, deliberate omissions, and the paths it was least sure of — use it to aim: read
21
+ the risky paths closely and start your coverage where it admits uncertainty. **Treat it as a claim, not a
22
+ specification.** It describes what the author believed they wrote. Where it and the source disagree the
23
+ source wins, and the disagreement is itself a finding worth reporting. A handover never replaces reading
24
+ the source or step 2 below.
25
+ 2. **Enumerate what the platform can actually invoke** — do not work from what the source *looks* like it
26
+ registers. Run this from the project root and read the answer:
27
+
28
+ ```js
29
+ // scratch.js — run it, read it, delete it
30
+ const path = require('path')
31
+ const { getServiceDefinition } = require('./sandbox')
32
+
33
+ const definition = getServiceDefinition('{id}', path.resolve('services/{id}/src/index.js'))
34
+
35
+ for (const [name, method] of Object.entries(definition.methodsMap)) {
36
+ console.log(method.registerAs.padEnd(24), name)
37
+ }
38
+ ```
39
+
40
+ Those names are exactly what `runServiceMethod`'s `methodName` takes, and `registerAs` is what decides
41
+ the `describe` a test goes in. A method missing from that map is a method no flow can reach — report it
42
+ rather than testing around it.
43
+ 3. **Note the auth shape** from `configItems`: which values are config, and whether the service declares
44
+ OAuth2. Both change what you pass to `runServiceMethod`.
45
+ 4. **Read the authoring reference for anything you are unsure about**, at
46
+ `node_modules/flowrunner-cli/ai-docs/instructions/service-code-format/` — it ships inside the installed
47
+ CLI. `15-unit-tests.md` is the testing document and the authority where this file is silent. Add
48
+ `18-test-recipes.md` **only for the kinds this service actually registers** (dictionaries, triggers,
49
+ files); an actions-only service does not need it. `04-http-requests.md`
50
+ describes the HTTP client a service is written against — the sending model, multipart bodies and the
51
+ `ResponseError` shape — and `13-runtime-contracts.md` covers the SYSTEM-method seams and what the harness
52
+ cannot reach. Load what the service's feature set implies, in one batch, rather than a document at a time.
53
+
54
+ **Work incrementally.** Write one group, run it, then continue. A whole suite written in one pass and
55
+ interrupted is a whole suite lost.
56
+
57
+ ## The rules
58
+
59
+ Requirements, not preferences. A suite that breaks one is wrong even when it is green.
60
+
61
+ 1. **Run methods only through `runServiceMethod`.** Never `require()` the service entry file, never touch
62
+ `global.Flowrunner`, never reach for an internal. Behaviour unreachable through a method call is not the
63
+ service's contract and not yours to test.
64
+ 2. **Group by `registerAs`.** Top-level groups are exactly `Actions`, `Dictionaries`, `OAuth`,
65
+ `Polling Triggers`, `RealTime Triggers`, `DynamicResults`, `DynamicParams`. A method's group comes from
66
+ its registration, never its subject matter — `sendPhoto` and `getChannel` are both `Actions`. Never
67
+ invent a group (`Media`, `Messaging`…). **SYSTEM trigger methods are the one kind with no group and no
68
+ `describe` of their own** — see rule 10.
69
+ 3. **One shortcut per `describe`** — `run<Method>Method(...)`, naming the method once, so the method name
70
+ appears in the file exactly once per group.
71
+ 4. **Mock HTTP with `createNockMock()` only.** No `jest.mock`, no stubbed transport, no hand-written fake.
72
+ 5. **No `it.each`, no `expect` inside a loop, no tests generated from a list.** Three hostile inputs means
73
+ three `it`s. A loop collapses N results into one unreadable failure.
74
+ 6. **Every file asserts the config items** via `getServiceConfigItems(serviceId, serviceEntryPointPath)`,
75
+ as one whole-object `toEqual`.
76
+ 7. **Every file opens its main `describe` with exactly:**
77
+ ```js
78
+ const serviceId = 'asana'
79
+ const serviceEntryPointPath = require.resolve('../src/index.js')
80
+ ```
81
+ 8. **Compare whole objects.** `toEqual` on the entire result and on the entire `httpMock.history` entry —
82
+ not `toHaveProperty`, not `toContain`, not field by field. The whole-object compare is what catches the
83
+ field you did not know the service was sending. `toMatchObject` is for a genuinely varying value, with a
84
+ comment saying which one and why.
85
+ 9. **Files API goes through `createFilesSandbox()`**, injected as `createFiles`. Never patch a client,
86
+ never override a global.
87
+ 10. **Only SYSTEM methods are runnable for triggers — and none of them gets its own `describe`.** Call
88
+ `handleTriggerResolveEvents` and friends, never a trigger's own handler: the platform does not call those
89
+ either, and the mapping between them is the part most likely to be wrong.
90
+
91
+ But group the tests by **trigger**, not by SYSTEM method. `describe('onMessage')`,
92
+ `describe('onChannelPost')`, `describe('onChatJoinRequest')` — never
93
+ `describe('handleTriggerResolveEvents')` or `describe('handleTriggerUpsertWebhook')`. Declare the
94
+ `run<SystemMethod>Method` shortcuts once at the top of `RealTime Triggers` / `Polling Triggers` and call
95
+ them from inside each trigger's group. A group named after a SYSTEM method describes the runtime rather
96
+ than the service, and it splits one trigger's behaviour across several places. OAuth SYSTEM methods keep
97
+ the `OAuth` group — they have no trigger to belong to.
98
+ 11. **`dispose()` in `afterAll` is not optional.** See below.
99
+ 12. **One file per service**, `services/{id}/tests/{id}.test.js`. Run only that file while you work:
100
+ ```sh
101
+ npx jest services/{id}/tests
102
+ npx jest services/{id}/tests -t 'getItems' # narrower
103
+ ```
104
+
105
+ ## The sandbox
106
+
107
+ Five exports, and they are the whole surface a test file touches. There is no sandbox object to build, no
108
+ `Flowrunner` global to install or clean up, no service instance — `runServiceMethod` owns all of that, per
109
+ call.
110
+
111
+ | Export | For |
112
+ |---|---|
113
+ | `runServiceMethod(data)` | run one method the way the platform invokes it |
114
+ | `createNockMock()` | intercept and record HTTP at the socket |
115
+ | `createFilesSandbox()` | a real Files API, injected through `createFiles` |
116
+ | `getServiceConfigItems(id, entryPoint)` | the rule-6 assertion |
117
+ | `getServiceDefinition(id, entryPoint)` | the built model — what to cover |
118
+
119
+ ```js
120
+ const result = await runServiceMethod({
121
+ serviceId,
122
+ serviceEntryPointPath,
123
+ configs: { apiKey: 'test-api-key' }, // your configItems values, in ONE bag
124
+ methodName: 'getItems',
125
+ methodData: { limit: 10 }, // keyed by PARAM NAME, never positional
126
+ executionContext: { accessToken: 'test-oauth-access-token' }, // OAuth services only
127
+ })
128
+ ```
129
+
130
+ - `methodData` is keyed by the declared param name and the order in it never matters — which is exactly why
131
+ a suite catches a param whose declared name disagrees with what the handler reads: the value arrives
132
+ `undefined`.
133
+ - The sandbox fills the rest of `executionContext` with stable `test-*` values you can assert against
134
+ (`appId`, `apiKey`, `serverURL`, `flowId`, `executionId`, `runtimeKey`).
135
+ - **Per-test overrides**: give the shortcut a trailing `data` argument and spread it. This is how a suite
136
+ proves auth is read from config rather than hardcoded:
137
+ ```js
138
+ function runSendSmsMethod(to, body, data) {
139
+ return runMethod({ methodName: 'sendSms', methodData: { to, body }, data })
140
+ }
141
+ await runSendSmsMethod('+1', 'Hi', { configs: { apiKey: 'other-key' } })
142
+ ```
143
+
144
+ ## The HTTP mock
145
+
146
+ Intercepts at the **socket**, so whatever the service used to send — the runtime `Request`, the Files
147
+ client, a bundled npm SDK — is recorded identically. That is why rule 4 admits no other tool.
148
+
149
+ ```js
150
+ let httpMock
151
+ beforeAll(() => { httpMock = createNockMock() })
152
+ afterEach(() => { httpMock.reset() }) // drops recorded calls AND handlers
153
+ afterAll(() => { httpMock.dispose() }) // un-patches `http` — mandatory
154
+ ```
155
+
156
+ ```js
157
+ httpMock.onGet(url).reply({ items: [] }) // 200 + body
158
+ httpMock.onPost(url).reply(body, 201, headers) // explicit status / response headers
159
+ httpMock.onPut · onPatch · onDelete · onHead · onOptions
160
+ httpMock.on('propfind', url).reply(xmlString) // custom verbs
161
+ httpMock.onGet(url).replyWith(call => ({ … })) // dynamic: receives the history record
162
+ ```
163
+
164
+ Handlers match in registration order, first wins. A URL registered without a query string matches whatever
165
+ query the service added. `onAny()` exists and is **banned** in new suites: every method under test calls a
166
+ known URL, so a catch-all only hides a wrong one.
167
+
168
+ **Why `dispose()` is mandatory.** nock patches the shared `http` module when it activates, and jest gives
169
+ every test file its own module registry — its own copy of nock — but one `http`. A suite that skips
170
+ `dispose()` leaves its activation stacked on `http` for the rest of the worker, and the layers corrupt each
171
+ other: request bodies that silently vanish from `history`, wrappers left pointing into a torn-down realm
172
+ throwing `Cannot convert undefined or null to object` with an empty stack. The damage lands on whichever
173
+ suite runs *next*, which is why the symptom is "passes alone, fails in a full run".
174
+
175
+ **Two kinds of failure, and services branch differently on them — test both:**
176
+
177
+ ```js
178
+ httpMock.onPost(url).replyWithError({ message: 'Insufficient credit' }, 400) // error RESPONSE
179
+ httpMock.onGet(url).replyWithNetworkError('ECONNRESET') // TRANSPORT failure
180
+ ```
181
+
182
+ An SDK that wraps its own transport may never see `replyWithNetworkError`'s sentinel — the failure arrives
183
+ as an ordinary error response instead. When that happens, assert only that the method **rejects**, and say
184
+ in a comment why the message is not pinned.
185
+
186
+ ### The history record — what rule 8 compares
187
+
188
+ ```js
189
+ expect(httpMock.history).toEqual([{
190
+ method: 'post',
191
+ url: `${ BASE }/sms/send`,
192
+ canonicalUrl: `${ BASE }/sms/send`, // scheme + host + path, no query
193
+ fullUrl: `${ BASE }/sms/send`, // with query string
194
+ headers: { 'Authorization': `Bearer ${ API_KEY }`, 'Content-Type': 'application/json' },
195
+ query: {}, // parsed: ?limit=10&active=true → { limit: 10, active: true }
196
+ body: { messages: [{ to: '+1', body: 'Hi' }] },
197
+ formData: undefined,
198
+ contentType: 'application/json',
199
+ contentLength: 38,
200
+ timeout: undefined, // set only by a client that calls req.setTimeout()
201
+ }])
202
+ ```
203
+
204
+ - **Never hand-compute `contentLength`.** Write the assertion, run it, take the real number out of the diff.
205
+ Guessed values are wrong, and the value varies by method and body shape (a bodyless POST is often `0`, a
206
+ bodyless GET often `undefined`).
207
+ - `query` is re-typed by shape, because a query string carries no types: `?limit=100` reads back as
208
+ `{ limit: 100 }`, and an id sent as the string `'123'` reads back as `123`. Assert the coerced value.
209
+ - Header names come back in conventional casing, because the client lowercases them on the way out and the
210
+ mock re-derives them: `X-API-KEY` reads back as `X-Api-Key`.
211
+ - The record has **no** `encoding` and no `unwrapBody` — both are client-side flags with no wire footprint.
212
+ To pin a binary path, reply with known bytes and assert those exact bytes arrive.
213
+ - An SDK-stamped header carrying a package version (`User-Agent`, `X-Stripe-Client-User-Agent`) moves when
214
+ the package does — match it with `expect.stringMatching` *inside* the whole-object compare.
215
+
216
+ ## The suite template
217
+
218
+ ```js
219
+ 'use strict'
220
+
221
+ const { createNockMock, getServiceConfigItems, runServiceMethod } = require('../../../sandbox')
222
+
223
+ const API_KEY = 'test-api-key'
224
+ const BASE = 'https://api.example.com/v1'
225
+ const HEADERS = { 'Authorization': `Bearer ${ API_KEY }`, 'Content-Type': 'application/json' }
226
+
227
+ describe('ServiceName Service', () => {
228
+ const serviceId = 'service-name'
229
+ const serviceEntryPointPath = require.resolve('../src/index.js')
230
+
231
+ let httpMock
232
+
233
+ const configs = { apiKey: API_KEY }
234
+
235
+ function runMethod({ methodName, methodData, data }) {
236
+ return runServiceMethod({ serviceId, serviceEntryPointPath, configs, ...data, methodName, methodData })
237
+ }
238
+
239
+ beforeAll(() => { httpMock = createNockMock() })
240
+ afterEach(() => { httpMock.reset() })
241
+ afterAll(() => { httpMock.dispose() })
242
+
243
+ it('service config items', () => {
244
+ expect(getServiceConfigItems(serviceId, serviceEntryPointPath)).toEqual([
245
+ {
246
+ name: 'apiKey', label: 'API Key', type: 'string',
247
+ required: true, shared: false, options: [],
248
+ description: 'Your API key, from Settings → Developers.',
249
+ },
250
+ ])
251
+ })
252
+
253
+ describe('Actions', () => {
254
+ describe('getItems', () => {
255
+ function runGetItemsMethod(limit, offset, data) {
256
+ return runMethod({ methodName: 'getItems', methodData: { limit, offset }, data })
257
+ }
258
+
259
+ it('sends the defaults when no parameters are supplied', async () => {
260
+ httpMock.onGet(`${ BASE }/items`).reply({ items: [], total: 0 })
261
+
262
+ const result = await runGetItemsMethod()
263
+
264
+ expect(result).toEqual({ items: [], total: 0 })
265
+
266
+ expect(httpMock.history).toEqual([{
267
+ method: 'get',
268
+ url: `${ BASE }/items`,
269
+ canonicalUrl: `${ BASE }/items`,
270
+ fullUrl: `${ BASE }/items?limit=50&offset=0`,
271
+ headers: HEADERS,
272
+ query: { limit: 50, offset: 0 },
273
+ body: undefined,
274
+ formData: undefined,
275
+ contentType: undefined,
276
+ contentLength: 0,
277
+ timeout: undefined,
278
+ }])
279
+ })
280
+
281
+ it('passes the supplied paging through to the query', async () => {
282
+ httpMock.onGet(`${ BASE }/items`).reply({ items: [{ id: 1 }], total: 1 })
283
+
284
+ await runGetItemsMethod(10, 20)
285
+
286
+ expect(httpMock.history[0].query).toEqual({ limit: 10, offset: 20 })
287
+ })
288
+
289
+ it('reads the key from config rather than a hardcoded one', async () => {
290
+ httpMock.onGet(`${ BASE }/items`).reply({ items: [], total: 0 })
291
+
292
+ await runGetItemsMethod(undefined, undefined, { configs: { apiKey: 'other-key' } })
293
+
294
+ expect(httpMock.history[0].headers.Authorization).toBe('Bearer other-key')
295
+ })
296
+
297
+ it('rejects when the API answers with an error status', async () => {
298
+ httpMock.onGet(`${ BASE }/items`).replyWithError({ message: 'Unauthorized' }, 401)
299
+
300
+ await expect(runGetItemsMethod()).rejects.toThrow()
301
+ })
302
+
303
+ it('rejects when the connection drops', async () => {
304
+ httpMock.onGet(`${ BASE }/items`).replyWithNetworkError('ECONNRESET')
305
+
306
+ await expect(runGetItemsMethod()).rejects.toThrow()
307
+ })
308
+ })
309
+ })
310
+ })
311
+ ```
312
+
313
+ ## What to cover
314
+
315
+ Every method the platform can invoke — the list you enumerated in step 2, not a sample of it. Per method:
316
+
317
+ - the request the service sends, as one whole-object compare on the history entry;
318
+ - optional params **omitted** and **supplied**, one `it` each;
319
+ - auth read from config, proved by a per-call override;
320
+ - the whole returned object;
321
+ - **both** failure kinds.
322
+
323
+ **Do not test:** that the vendor's API returns correct data; trivially correct JavaScript; anything past the
324
+ method boundary — no internals, no partially-applied helpers (rule 1).
325
+
326
+ ### Dictionaries
327
+
328
+ `{ search?, cursor?, criteria? }` in, `{ items: [{ label, value, note? }], cursor }` out. That envelope is a
329
+ single `payload` param, so invoke with `methodData: { payload }` — put the wrapper in the per-`describe`
330
+ shortcut. One `it` each for: the mapping, a case-insensitive search, an **absent `search`** listing
331
+ everything, and empty or missing data answering `{ items: [], cursor: null }`.
332
+
333
+ `payload` itself must be present — `methodData: { payload: null }` throws `MissingMethodParamError`, which is
334
+ a malformed call rather than an empty search. "No search" is `runItemsDictionaryMethod({})`.
335
+
336
+ Then the failure branch — and the two cases that look alike are not the same. A search that **matched
337
+ nothing** is `{ items: [], cursor: null }`, and that is the documented behaviour of a resolve dictionary. A
338
+ request that **failed** is not "there are none": a dictionary answering `{ items: [] }` to a rejected key
339
+ hands the flow author an empty dropdown and no way to tell why.
340
+
341
+ ```js
342
+ it('does not answer a rejected key with an empty list', async () => {
343
+ httpMock.onGet(`${ BASE }/items`).replyWithError({ message: 'Invalid API key' }, 401)
344
+
345
+ await expect(runItemsDictionaryMethod({})).rejects.toThrow()
346
+ })
347
+ ```
348
+
349
+ If that fails because the service swallows the error behind a bare `catch`, it is a finding to report — not
350
+ a test to rewrite into agreement with the service. Read `05-dictionaries.md` before deciding which of the
351
+ two a given branch is.
352
+
353
+ ### The choice test that is almost always missing
354
+
355
+ A label→wire mapping must guard its lookup with `Object.prototype.hasOwnProperty.call(mapping, value)`, or
356
+ `'constructor'` / `'toString'` / `'__proto__'` resolve to an inherited **function** and get sent as a
357
+ parameter value. A test asserting only the matching side never catches that — a known label maps identically
358
+ either way. What catches it is a wire-level assertion on a **pass-through** choice:
359
+
360
+ ```js
361
+ it('passes an unrecognized choice through as itself, even an inherited property name', async () => {
362
+ httpMock.onGet(url).reply({})
363
+
364
+ await runListThingsMethod(undefined, 'constructor')
365
+
366
+ expect(httpMock.history[0].query).toEqual({ order: 'constructor' }) // a literal string, not a function
367
+ })
368
+ ```
369
+
370
+ One per service, against a pass-through choice. If every choice is confined to a fixed set, assert each
371
+ hostile name is rejected by name instead — one `it` per name (rule 5).
372
+
373
+ ### Triggers
374
+
375
+ The platform calls a SYSTEM method, which maps the delivery to an event name and dispatches internally.
376
+ Calling a trigger's own handler skips exactly that mapping.
377
+
378
+ | Kind | Runnable methods |
379
+ |---|---|
380
+ | Realtime | `handleTriggerUpsertWebhook`, `handleTriggerResolveEvents`, `handleTriggerSelectMatched`, `handleTriggerDeleteWebhook`, `handleTriggerRefreshWebhook` |
381
+ | Polling | `handleTriggerPollingForEvent` |
382
+
383
+ Their payload does not sit directly in `methodData` — it goes one level down, under `invocation`.
384
+
385
+ ```js
386
+ describe('RealTime Triggers', () => {
387
+ function runHandleTriggerResolveEventsMethod(invocation) {
388
+ return runMethod({ methodName: 'handleTriggerResolveEvents', methodData: { invocation } })
389
+ }
390
+
391
+ describe('onMention', () => {
392
+ it('shapes one event per mention in the delivery', async () => {
393
+ const result = await runHandleTriggerResolveEventsMethod({
394
+ body: { team_id: 'T1', event: { type: 'message', text: 'hey <@U1>', user: 'U9' } },
395
+ })
396
+
397
+ // The WHOLE emission — one delivery often produces events for OTHER triggers too, and they
398
+ // belong in the same assertion.
399
+ expect(result).toEqual({
400
+ eventScopeId: 'T1',
401
+ events: [
402
+ { name: 'onMention', data: { type: 'message', text: 'hey <@U1>', user: 'U9' } },
403
+ ],
404
+ })
405
+ })
406
+ })
407
+ })
408
+ ```
409
+
410
+ Polling is about **state** — the first poll seeds and emits nothing, later polls emit only what is new:
411
+
412
+ ```js
413
+ const result = await runHandleTriggerPollingForEventMethod({
414
+ eventName: 'onMessageFromQuery', triggerData: { query: 'x' }, state: { messages: [{ ts: '1.1' }] },
415
+ })
416
+
417
+ expect(result).toEqual({ events: [{ ts: '3.3' }], state: { messages: [{ ts: '1.1' }, { ts: '3.3' }] } })
418
+ ```
419
+
420
+ Webhook lifecycle (`handleTriggerUpsertWebhook` / `DeleteWebhook`) is tested like any action: the whole
421
+ history entry for the registration call, the whole returned `webhookData`.
422
+
423
+ **One thing the sandbox cannot reach:** the live trigger set. `triggers` is resolved from persisted flow
424
+ instances, which a test has none of, so what you put in the invocation for a subscribe path is discarded
425
+ silently. Do not build a test on it, and do not probe the runtime with malformed input to find out more —
426
+ `13-runtime-contracts.md` states which contracts are exercisable and which are not.
427
+
428
+ ### Files API
429
+
430
+ Hand a backend to `runServiceMethod({ createFiles })` — the same seam the platform fills in production.
431
+ Storage is real, so the test asserts **what ended up saved** rather than what a stub was asked for.
432
+
433
+ ```js
434
+ beforeAll(() => { httpMock = createNockMock(); filesAPI = createFilesSandbox() })
435
+ afterEach(() => { httpMock.reset(); filesAPI.reset() })
436
+ afterAll(() => { httpMock.dispose(); filesAPI.dispose() })
437
+
438
+ function runMethod({ methodName, methodData, data }) {
439
+ return runServiceMethod({ serviceId, serviceEntryPointPath, configs,
440
+ createFiles: filesAPI.inMemory, ...data, methodName, methodData })
441
+ }
442
+ ```
443
+
444
+ ```js
445
+ filesAPI.stored() // [{ key, scope, filename, contents, size, ttl, generateUrl, … }]
446
+ filesAPI.urlFor('flow/test-flow-id/a.pdf') // the URL the service hands back to the flow
447
+ filesAPI.keys() · contents(scope, name) · read(scope, name)
448
+ filesAPI.calls() // [{ method, scope, filename, size, options }] — options as the service BUILT them
449
+ filesAPI.seed('FLOW', 'a.pdf', 'BYTES') // storage an earlier run left behind
450
+ filesAPI.failNext(body, 507) // one-shot failure, shaped like a real error
451
+ ```
452
+
453
+ Use `inMemory`. The clock is frozen, so `createdAt` and `urlExpiresAt` are byte-stable and a whole-object
454
+ compare on a result is possible at all. `calls()` is where an inverted option spread shows: `options` is the
455
+ object the service built, so `options.filename` is whichever name actually won.
456
+
457
+ **Nothing goes over the wire**, and that is itself an assertion worth making: with the client injected,
458
+ `httpMock.history` holds the vendor's calls and nothing else, so a whole-array compare on it proves the
459
+ upload never reached the platform's file service.
460
+
461
+ ## Service bugs are reported, not fixed
462
+
463
+ Never modify a service's source to make a test pass, and never write a test that pins a defect as expected
464
+ behaviour — a green test asserting a bug reads as "this is correct".
465
+
466
+ | | |
467
+ |---|---|
468
+ | **Test bug** — fix it | the mock URL does not match, a wrong expected value, an assertion reading the wrong field |
469
+ | **Service bug** — report it | wrong headers, missing body fields, an unhandled error, a wrong return shape, an unguarded lookup, a Boolean read with bare truthiness |
470
+
471
+ Leave the broken path untested and report it with the observable consequence you verified against the mock.
472
+ Where a whole-object compare forces you to encode the current wrong behaviour, mark it `⚠️ SERVICE DEFECT`
473
+ in a comment saying what the correct value would be, so it is updated deliberately when fixed.
474
+
475
+ Worth checking in every service, because they recur: an unguarded `MAP[value]` lookup · a Boolean param read
476
+ with bare truthiness or `=== true` (a bound expression delivers the STRING `'false'`, which is truthy — the
477
+ same applies to numbers arriving as strings) · a dictionary crashing on an absent `search` · a file call that is
478
+ not one of `uploadFile` / `list` / `get` / `delete` / `usage`.
479
+
480
+ ## Finish
481
+
482
+ Run the suite you wrote, scoped to your file, and iterate until it is green. Not complete until it is.
483
+
484
+ ```sh
485
+ npx jest services/{id}/tests
486
+ ```
487
+
488
+ Then report: what you covered, anything you could not reach and why, and every service defect you found.
489
+
490
+ ## Style
491
+
492
+ - `describe` / `it`, never `test`. `'use strict'` at the top.
493
+ - Fixed nesting: `describe('<Service> Service')` → `describe('<Group>')` → `describe('<methodName>')` →
494
+ `it(...)`. No feature-area groupings, no `// ── Category ──` comment standing in for a `describe`.
495
+ - Name a test for the behaviour it pins — "omits the optional fields when they are not supplied", never
496
+ "test sendSms 2".
497
+ - If the project lints, run its linter on the file you wrote and leave it clean. Scope it to your file.
@@ -0,0 +1,51 @@
1
+ # FlowRunner Extensions
2
+
3
+ This project holds FlowRunner custom extensions, managed with the `flowrunner` CLI. One service per folder
4
+ under `services/{id}/`, each a single JavaScript module in `src/index.js`, with its unit suite alongside it
5
+ in `services/{id}/tests/`.
6
+
7
+ ## Dispatch service work — don't do it inline
8
+
9
+ Two agents, split by what they touch. Dispatch one rather than editing a service or a suite directly — each
10
+ loads the documents its task needs.
11
+
12
+ | Agent | Owns |
13
+ |---|---|
14
+ | `flowrunner-service-code-engineer` | everything inside a service — creating one, reviewing, fixing, extending, and keeping its `README.md` in step with its actions and triggers |
15
+ | `flowrunner-service-test-engineer` | everything inside `services/{id}/tests/` — writing a suite, widening one, fixing a red one |
16
+
17
+ A new service is both, in order: write it, then test it. They are separate agents because the second one's
18
+ job is to disagree with the first — a test engineer that also owns the source fixes the service to make its
19
+ test pass, which is the one outcome a test suite exists to prevent.
20
+
21
+ **Do not read the authoring reference on the main thread.** It is the agents' job to load, and reading it
22
+ here duplicates that cost without producing anything.
23
+
24
+ ## The authoring reference
25
+
26
+ The reference ships inside the installed CLI, versioned with it, so it describes the format this project
27
+ actually deploys:
28
+
29
+ `node_modules/flowrunner-cli/ai-docs/instructions/service-code-format/`
30
+
31
+ Its `README.md` is the source of truth for service format — the reading order, the identity-and-naming
32
+ rules, and which document covers what. Where anything conflicts with it, it wins.
33
+
34
+ If that directory does not exist, stop and ask the developer to install or update `flowrunner-cli` — do not
35
+ proceed from memory.
36
+
37
+ ## Testing
38
+
39
+ `npm test` runs every service's unit suite. The harness is `sandbox/` in the project root — `flowrunner init`
40
+ copied it here, and it belongs to this project: it is editable, and a service needing something it does not
41
+ do is a reason to extend it.
42
+
43
+ Suites mock HTTP at the socket and never reach a real API. There is no live-API test kind — a service is
44
+ validated against the vendor by deploying it and running a flow.
45
+
46
+ ## Repo rules
47
+
48
+ - **Never read or analyse `node_modules/` as project source.** The authoring reference above is the only
49
+ exception; in particular, do not read the CLI's bundled runtime or its `templates/` — the reference
50
+ carries a verified example service for that purpose.
51
+ - Everything for a service stays inside its own `services/{id}/` folder, tests included.
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env node
2
+
3
+ const path = require('path')
4
+ const fs = require('fs')
5
+
6
+ const { resolveLocalCli } = require('./resolve-local')
7
+
8
+ const cliRoot = path.resolve(__dirname, '..')
9
+ const srcEntry = path.resolve(cliRoot, 'src', 'cli', 'index.ts')
10
+
11
+ // ─── Hand over to the project's own copy, if there is one ────────────────────
12
+ //
13
+ // A global install exists to put `flowrunner` on PATH; the project's copy is what should actually run, so
14
+ // that `npm i -D flowrunner-cli@x` is the single thing deciding a project's version — and so that the
15
+ // templates and ai-docs used are the ones that project pinned. See ./resolve-local.js.
16
+ //
17
+ // `FLOWRUNNER_DELEGATED` makes the hop one-way: the child must run itself whatever it finds, or a copy that
18
+ // somehow resolves to a third one would bounce forever.
19
+ if (!process.env.FLOWRUNNER_DELEGATED) {
20
+ const resolution = resolveLocalCli(process.cwd(), cliRoot)
21
+
22
+ if (resolution.kind === 'not-installed') {
23
+ console.error('This project depends on flowrunner-cli, but it is not installed.')
24
+ console.error(' Run `npm install` first — running the globally installed CLI here would use its')
25
+ console.error(' templates and ai-docs instead of the versions this project pinned.')
26
+ process.exit(1)
27
+ }
28
+
29
+ if (resolution.kind === 'delegate') {
30
+ const { spawnSync } = require('child_process')
31
+
32
+ const result = spawnSync(process.execPath, [resolution.bin, ...process.argv.slice(2)], {
33
+ stdio: 'inherit',
34
+ env: { ...process.env, FLOWRUNNER_DELEGATED: '1' },
35
+ })
36
+
37
+ if (result.error) {
38
+ console.error(`Could not run this project's flowrunner-cli (${ resolution.bin }):`)
39
+ console.error(` ${ result.error.message }`)
40
+ process.exit(1)
41
+ }
42
+
43
+ // Killed by a signal: report it the way a shell does rather than as a clean exit.
44
+ process.exit(result.signal ? 1 : (result.status ?? 1))
45
+ }
46
+ }
47
+
48
+ if (fs.existsSync(srcEntry)) {
49
+ // Dev mode (npm link): run from TypeScript source via tsx
50
+ require('tsx/cjs')
51
+
52
+ const tsconfig = JSON.parse(fs.readFileSync(path.resolve(cliRoot, 'tsconfig.json'), 'utf8'))
53
+ const baseUrl = path.resolve(cliRoot, tsconfig.compilerOptions.baseUrl || '.')
54
+
55
+ // Convert relative tsconfig paths to absolute paths
56
+ const absolutePaths = {}
57
+ for (const [key, values] of Object.entries(tsconfig.compilerOptions.paths || {})) {
58
+ absolutePaths[key] = values.map(v => path.resolve(baseUrl, v))
59
+ }
60
+
61
+ require('tsconfig-paths').register({ baseUrl, paths: absolutePaths })
62
+ require(srcEntry)
63
+ } else {
64
+ // Production (npm install): run built dist
65
+ require('../dist/cli.js')
66
+ }