@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,131 @@
1
+ export declare const ERROR_CODES: readonly ["FR_NOT_LOGGED_IN", "FR_NO_WORKSPACE", "FR_NO_SERVICES_DIR", "FR_NO_SERVICES", "FR_SELECTION_REQUIRED", "FR_UNKNOWN_SERVICE", "FR_TOKEN_EXPIRED", "FR_DEPLOY_FAILED", "FR_LOGIN_TIMEOUT", "FR_LOGIN_FAILED", "FR_PROMPT_REQUIRED", "FR_PROMPT_ABORTED", "FR_TEMPLATE_NOT_FOUND", "FR_UNKNOWN_SERVER", "FR_NOT_A_PROJECT", "FR_AI_DOCS_MISSING", "FR_HTTP"];
2
+ export type CliErrorCode = typeof ERROR_CODES[number];
3
+ /**
4
+ * The base every failure below extends, so a caller can catch the whole family at once.
5
+ *
6
+ * `name` is assigned from the constructor rather than left to the class, because the bundler is free to
7
+ * rename classes and `error.name` is the one thing that tends to end up in someone's log.
8
+ */
9
+ export declare class CliError extends Error {
10
+ readonly code: CliErrorCode;
11
+ constructor(code: CliErrorCode, message: string, name?: string);
12
+ }
13
+ /** No `flowrunner.json` naming a server, or no token in `.flowrunner/`. */
14
+ export declare class NotLoggedInError extends CliError {
15
+ constructor(message?: string);
16
+ }
17
+ /** Logged in, but `flowrunner.json` names no workspace — so there is nowhere to deploy to. */
18
+ export declare class NoWorkspaceError extends CliError {
19
+ constructor(message?: string);
20
+ }
21
+ /** The server rejected the deploy token. */
22
+ export declare class TokenExpiredError extends CliError {
23
+ constructor(message?: string);
24
+ }
25
+ export declare class LoginTimeoutError extends CliError {
26
+ constructor(message?: string);
27
+ }
28
+ export declare class LoginFailedError extends CliError {
29
+ constructor(message: string);
30
+ }
31
+ /** The project has no `services/` directory at all. */
32
+ export declare class NoServicesDirectoryError extends CliError {
33
+ constructor(message?: string);
34
+ }
35
+ /**
36
+ * `services/` exists but nothing in it loaded as a service.
37
+ *
38
+ * Carries the folders that were skipped and why: with the whole deploy refusing to run, the reason a
39
+ * particular folder was not counted is the only thing that tells anyone what to fix.
40
+ */
41
+ export declare class NoServicesError extends CliError {
42
+ readonly skipped: SkippedService[];
43
+ constructor(skipped?: SkippedService[], message?: string);
44
+ }
45
+ export interface SkippedService {
46
+ serviceId: string;
47
+ reason: string;
48
+ }
49
+ /**
50
+ * More than one service is deployable and none was chosen.
51
+ *
52
+ * A deploy now touches only the services it names, so "all of them" has to be asked for rather than assumed
53
+ * — silently deploying every service would be the old behaviour wearing a new coat.
54
+ */
55
+ export declare class SelectionRequiredError extends CliError {
56
+ readonly available: string[];
57
+ constructor(available: string[], message?: string);
58
+ }
59
+ /** A `-s` name that matches no deployable service in this project. */
60
+ export declare class UnknownServiceError extends CliError {
61
+ readonly serviceId: string;
62
+ readonly available: string[];
63
+ constructor(serviceId: string, available: string[]);
64
+ }
65
+ /** The server accepted the request and refused the package. */
66
+ export declare class DeployFailedError extends CliError {
67
+ readonly status?: number;
68
+ readonly body?: string;
69
+ constructor(message: string, { status, body }?: {
70
+ status?: number;
71
+ body?: string;
72
+ });
73
+ }
74
+ export declare class TemplateNotFoundError extends CliError {
75
+ readonly templateId: string;
76
+ readonly available: string[];
77
+ constructor(templateId: string, available: string[]);
78
+ }
79
+ /**
80
+ * An answer is needed and there is no way to ask for it.
81
+ *
82
+ * The programmatic path throws this instead of blocking on a terminal that may not exist; supply the answer
83
+ * up front, or pass the hook that knows how to ask.
84
+ */
85
+ export declare class PromptRequiredError extends CliError {
86
+ readonly promptName: string;
87
+ constructor(promptName: string, message: string);
88
+ }
89
+ /** The user was asked and declined — Ctrl-C, Escape, or an answer that failed its own validator. */
90
+ export declare class PromptAbortedError extends CliError {
91
+ constructor(message: string);
92
+ }
93
+ /** Ctrl-C or Escape out of an interactive list. Its own type so a caller can offer something else instead. */
94
+ export declare class SelectionAbortedError extends PromptAbortedError {
95
+ constructor(message?: string);
96
+ }
97
+ /** There is no `flowrunner.json` here, so there is no project to act on. */
98
+ export declare class NotAProjectError extends CliError {
99
+ constructor(message?: string);
100
+ }
101
+ /** A server name that is not one of the known clusters, and not a URL either. */
102
+ export declare class UnknownServerError extends CliError {
103
+ readonly target: string;
104
+ readonly available: string[];
105
+ constructor(target: string, available: string[]);
106
+ }
107
+ /**
108
+ * The installed CLI ships no AI docs for the requested provider.
109
+ *
110
+ * They are build output packed into the package, so this means an install that predates them — or a repo
111
+ * checkout that has not been built. Carries the directory looked for, because "which path did you expect"
112
+ * is the only question anyone asks next.
113
+ */
114
+ export declare class AiDocsMissingError extends CliError {
115
+ readonly directory: string;
116
+ constructor(directory: string, message?: string);
117
+ }
118
+ /**
119
+ * A non-2xx response, with the status kept as a number.
120
+ *
121
+ * The status is the whole point: deciding "expired token" by looking for "401" inside a message is a test
122
+ * that passes for any server that happens to mention the number.
123
+ *
124
+ * `what` names the call for a human ("Token exchange", "Deploy"); without it the message names the URL.
125
+ */
126
+ export declare class HttpError extends CliError {
127
+ readonly status: number;
128
+ readonly body: string;
129
+ readonly url: string;
130
+ constructor(status: number, body: string, url: string, what?: string);
131
+ }
@@ -0,0 +1,29 @@
1
+ export type { ClusterName, ProviderLayout } from './constants';
2
+ export { AI_INSTRUCTIONS_DIRECTORY, CLAUDE_PROVIDER, CLUSTERS, DEFAULT_CLUSTER, DEFAULT_SERVER_URL, PROVIDERS, SANDBOX_DIRECTORY, TEST_DEV_DEPENDENCIES, TEST_SCRIPTS, TESTING_FILES, } from './constants';
3
+ export type { CliErrorCode, SkippedService } from './errors';
4
+ export { AiDocsMissingError, CliError, DeployFailedError, ERROR_CODES, HttpError, LoginFailedError, LoginTimeoutError, NoServicesDirectoryError, NoServicesError, NotAProjectError, NotLoggedInError, NoWorkspaceError, PromptAbortedError, PromptRequiredError, SelectionAbortedError, TemplateNotFoundError, TokenExpiredError, UnknownServerError, } from './errors';
5
+ export type { DeployedService, DeployEvent, DeployOptions, DeployResult, DiscoveredService, DiscoveryResult, PlannedService, PublicFile, Selection, ServiceStatus, Workspace, } from './operations/deploy';
6
+ export { collectPublicFiles, computeServiceHash, createServiceZip, deploy, discoverServices, selectServices, } from './operations/deploy';
7
+ export type { InitEvent, InitOptions, InitResult, TargetDescription, TestingFilesResult, } from './operations/init';
8
+ export { describeTarget, init, testingFilesDirectory, writeTestingFiles } from './operations/init';
9
+ export type { Ask, AskRequest, ResolveAnswersOptions } from './operations/init/answers';
10
+ export { resolveAnswers } from './operations/init/answers';
11
+ export type { CreateServiceEvent, CreateServiceOptions, ScaffoldedService, } from './operations/init/create-service';
12
+ export { createService, resolveTemplateId, scaffoldFromTemplate } from './operations/init/create-service';
13
+ export type { InitClaudeEvent, InitClaudeOptions, InitClaudeResult, MergeResult, SegmentOutcome, } from './operations/init-claude';
14
+ export { BEGIN_MARKER, END_MARKER, initClaude, mergeSegment, providerDirectory, } from './operations/init-claude';
15
+ export type { LoginEvent, LoginOptions, LoginResult } from './operations/login';
16
+ export { login } from './operations/login';
17
+ export type { LogoutEvent, LogoutOptions, LogoutResult } from './operations/logout';
18
+ export { logout } from './operations/logout';
19
+ export type { PulledService, PullEvent, PullOptions, PullResult, } from './operations/pull';
20
+ export { declaredDependencies, extractService, isSafeServiceId, localState, pull } from './operations/pull';
21
+ export { CLUSTER_NAMES, clusterFor, normalizeServerUrl, resolveServerTarget } from './operations/server-target';
22
+ export type { OperationOptions } from './operations/types';
23
+ export type { UseServerResult } from './operations/use-server';
24
+ export { useServer } from './operations/use-server';
25
+ export type { AuthGap, AuthToSave, StoredAuth } from './project/auth';
26
+ export { authGap, clearAuth, describeWorkspace, loadAuth, requireAuth } from './project/auth';
27
+ export { getServerUrl, getWorkspaceId } from './project/config';
28
+ export type { Answers, Prompt, Template, TemplateManifest } from './templates';
29
+ export { defaultTemplate, findTemplate, listTemplates } from './templates';
@@ -0,0 +1,26 @@
1
+ import type { SharedExtensionConfigItem, SharedExtensionDefinition } from '../../../../../shared/src/scheme/index';
2
+ import type { SkippedService } from '../../errors';
3
+ export interface DiscoveredService {
4
+ /** Entry point relative to the service root — 'src/index.js', not 'services/<id>/src/index.js'. */
5
+ serviceFilePath: string;
6
+ serviceId: string;
7
+ serviceInfo: SharedExtensionDefinition['serviceInfo'];
8
+ methodsMap: SharedExtensionDefinition['methodsMap'];
9
+ configDescriptions: SharedExtensionConfigItem[];
10
+ /** Which authoring format the entry point turned out to be — the deploy carries it so the console can branch. */
11
+ runnerVersion: SharedExtensionDefinition['runnerVersion'];
12
+ /** v2 only: the declared config schema, encoded. `null` for a JSDoc-parsed service. */
13
+ configSchema: SharedExtensionDefinition['configSchema'];
14
+ }
15
+ export interface DiscoveryResult {
16
+ services: DiscoveredService[];
17
+ /**
18
+ * Folders under `services/` that did not become a service, and why.
19
+ *
20
+ * Returned rather than warned about: a folder silently missing from a deploy is the kind of thing someone
21
+ * notices a week later, and a caller driving this from code has no console to have missed a warning on.
22
+ */
23
+ skipped: SkippedService[];
24
+ }
25
+ /** Scan `services/*` under the project root and build each service's definition, v2 declarative or v1 JSDoc. */
26
+ export declare function discoverServices(projectRoot?: string): DiscoveryResult;
@@ -0,0 +1 @@
1
+ export declare function computeServiceHash(projectRoot: string, serviceId: string): Promise<string>;
@@ -0,0 +1,94 @@
1
+ import type { SkippedService } from '../../errors';
2
+ import type { AuthGap } from '../../project/auth';
3
+ import type { OperationOptions } from '../types';
4
+ import type { DiscoveredService } from './discover-services';
5
+ import type { Selection } from './select';
6
+ export type { DiscoveredService, DiscoveryResult } from './discover-services';
7
+ export { discoverServices } from './discover-services';
8
+ export { computeServiceHash } from './hash';
9
+ export type { PublicFile, PublicFilesResult } from './public-files';
10
+ export { collectPublicFiles } from './public-files';
11
+ export type { Selection } from './select';
12
+ export { selectServices } from './select';
13
+ export { createServiceZip } from './zip';
14
+ /** What deploying a service would do to the workspace. */
15
+ export type ServiceStatus = 'new' | 'modified' | 'same';
16
+ export interface PlannedService {
17
+ service: DiscoveredService;
18
+ serviceId: string;
19
+ /** The hash this deploy would publish. */
20
+ sourceHash: string;
21
+ status: ServiceStatus;
22
+ }
23
+ export type DeployEvent = {
24
+ type: 'connecting';
25
+ serverUrl: string;
26
+ workspace: Workspace;
27
+ } | {
28
+ type: 'discovered';
29
+ planned: PlannedService[];
30
+ } | {
31
+ type: 'skipped';
32
+ skipped: SkippedService;
33
+ } | {
34
+ type: 'selected';
35
+ planned: PlannedService[];
36
+ } | {
37
+ type: 'icon-missing';
38
+ serviceId: string;
39
+ relativePath: string;
40
+ } | {
41
+ type: 'deployed';
42
+ entry: DeployedService;
43
+ } | {
44
+ type: 'unchanged';
45
+ entry: PlannedService;
46
+ };
47
+ export interface DeployOptions extends OperationOptions<DeployEvent>, Selection {
48
+ /**
49
+ * Called when the project has no usable credentials, before giving up.
50
+ *
51
+ * The CLI passes an interactive login here, which is why `flowrunner deploy` can offer to connect a
52
+ * project mid-run. A caller that passes nothing gets NotLoggedInError or NoWorkspaceError thrown instead —
53
+ * a library must not open a browser on someone's behalf.
54
+ */
55
+ onAuthRequired?: (gap: AuthGap) => Promise<void>;
56
+ /**
57
+ * Called when the project has several services and the caller named none.
58
+ *
59
+ * Same bargain as `onAuthRequired`: the CLI turns it into a picker, and a caller that passes nothing gets
60
+ * SelectionRequiredError to handle its own way. Receives the classified list, so a picker can say which
61
+ * services would actually change.
62
+ */
63
+ onSelectionRequired?: (available: PlannedService[]) => Promise<Selection>;
64
+ /**
65
+ * Upload a service even when the workspace already has exactly this code.
66
+ *
67
+ * The default is to skip it — the deploy would produce the version that is already active, at the cost of
68
+ * shipping the whole package. Worth overriding when the stored package itself is in doubt.
69
+ */
70
+ force?: boolean;
71
+ }
72
+ export interface Workspace {
73
+ workspaceId: string;
74
+ workspaceName: string;
75
+ }
76
+ export interface DeployedService {
77
+ serviceId: string;
78
+ serviceName: string;
79
+ sourceHash: string;
80
+ packageBytes: number;
81
+ /** `new` the first time the workspace sees it, `modified` when it replaces a different version. */
82
+ status: Exclude<ServiceStatus, 'same'>;
83
+ }
84
+ export interface DeployResult {
85
+ workspace: Workspace;
86
+ serverUrl: string;
87
+ /** Services actually uploaded. */
88
+ services: DeployedService[];
89
+ /** Selected, but the workspace already had exactly this code. */
90
+ unchanged: PlannedService[];
91
+ /** Folders under `services/` that were not deployable, and why. Empty on a clean run. */
92
+ skipped: SkippedService[];
93
+ }
94
+ export declare function deploy(options?: DeployOptions): Promise<DeployResult>;
@@ -0,0 +1,20 @@
1
+ import type { DiscoveredService } from './discover-services';
2
+ export interface PublicFile {
3
+ serviceId: string;
4
+ /** Path relative to public/, e.g. "icon.webp" */
5
+ relativePath: string;
6
+ buffer: Buffer;
7
+ }
8
+ export interface PublicFilesResult {
9
+ files: PublicFile[];
10
+ /** Icons a service declares that are not on disk — the deploy goes ahead without them. */
11
+ missing: {
12
+ serviceId: string;
13
+ relativePath: string;
14
+ }[];
15
+ }
16
+ /**
17
+ * Collects all public files referenced by the given service definitions (e.g. integrationIcon).
18
+ * Icon paths in JSDoc use a leading slash relative to public/ (e.g. "/icon.webp").
19
+ */
20
+ export declare function collectPublicFiles(services: DiscoveredService[], projectRoot?: string): PublicFilesResult;
@@ -0,0 +1,9 @@
1
+ export interface Selection {
2
+ /** Explicit ids. Wins over `all`. */
3
+ serviceIds?: string[];
4
+ /** Take every candidate. */
5
+ all?: boolean;
6
+ }
7
+ export declare function selectServices<T extends {
8
+ serviceId: string;
9
+ }>(available: T[], selection?: Selection): T[];
@@ -0,0 +1 @@
1
+ export declare function createServiceZip(definition: object, projectRoot: string, serviceId: string): Promise<Buffer>;
@@ -0,0 +1,35 @@
1
+ import type { Answers, Prompt } from '../../templates/manifest';
2
+ /** Shared with the standalone confirmations in `cli/prompts/confirm`, so both read a yes/no the same way. */
3
+ export declare const TRUTHY: string[];
4
+ export declare const FALSY: string[];
5
+ export interface AskRequest {
6
+ prompt: Prompt;
7
+ /** What the answer would be if the user just pressed Enter. */
8
+ fallback: string | boolean;
9
+ /** Returns a message to show before asking again, or null when the value is acceptable. */
10
+ validate: (value: string) => string | null;
11
+ }
12
+ export type Ask = (request: AskRequest) => Promise<string | boolean>;
13
+ export interface ResolveAnswersOptions {
14
+ /** Pre-supplied answers (CLI flags). A prompt with a prefill is not asked. */
15
+ prefilled?: Answers;
16
+ /** Answers the template fixes rather than asking for — see `values` in the manifest. */
17
+ constants?: Answers;
18
+ /** Ask nothing; take every default. */
19
+ acceptDefaults?: boolean;
20
+ /** The project being scaffolded into; validators need it to tell whether an id is taken. */
21
+ projectRoot?: string;
22
+ /** How to ask a human. Omitted means nothing can be asked, and an unanswered prompt is an error. */
23
+ ask?: Ask;
24
+ }
25
+ /** Resolve a prompt's declared default, which may interpolate answers collected before it. */
26
+ export declare function resolveDefault(prompt: Prompt, answers: Answers): string | boolean;
27
+ /**
28
+ * A prefill arrives as a raw string when it came from a flag; anything boolean has to interpret it.
29
+ *
30
+ * Skipping this for a fixed value would be quietly wrong rather than merely untidy: `--set flag=false`
31
+ * would store the STRING "false", which is truthy, and the `{{#if flag}}` block would survive.
32
+ */
33
+ export declare function coerceBoolean(label: string, value: string | boolean): boolean;
34
+ /** Run a template's declared prompts in order, honouring prefills and `--yes`. */
35
+ export declare function resolveAnswers(prompts: Prompt[], { prefilled, constants, acceptDefaults, projectRoot, ask, }?: ResolveAnswersOptions): Promise<Answers>;
@@ -0,0 +1,39 @@
1
+ import type { Answers, Template } from '../../templates/manifest';
2
+ import type { OperationOptions } from '../types';
3
+ import type { Ask } from './answers';
4
+ export type CreateServiceEvent = {
5
+ type: 'template';
6
+ template: Template;
7
+ } | {
8
+ type: 'created-services-directory';
9
+ } | {
10
+ type: 'created';
11
+ relativePath: string;
12
+ files: string[];
13
+ };
14
+ export interface CreateServiceOptions extends OperationOptions<CreateServiceEvent> {
15
+ /** Answers the template's prompts, keyed by prompt name. `id` and `name` are expected by every template. */
16
+ answers?: Answers;
17
+ /** Take every default rather than asking. */
18
+ acceptDefaults?: boolean;
19
+ /** How to ask for anything still unanswered. Omitted means an unanswered prompt throws. */
20
+ ask?: Ask;
21
+ }
22
+ export interface ScaffoldedService {
23
+ serviceId: string;
24
+ serviceDirectory: string;
25
+ /** `serviceDirectory` relative to the project root, for printing. */
26
+ relativePath: string;
27
+ files: string[];
28
+ }
29
+ /** Resolves a template id — the `demo` alias included — or throws naming what is available. */
30
+ export declare function resolveTemplateId(templateId: string, templates?: Template[]): Template;
31
+ /**
32
+ * Ask the template's questions and write the service — the part `createService` and `init` share.
33
+ *
34
+ * Reports the files it created; the caller owns the "next steps" it prints afterwards, since those differ
35
+ * between scaffolding into an existing project and bootstrapping a new one.
36
+ */
37
+ export declare function scaffoldFromTemplate(template: Template, options?: CreateServiceOptions, projectRoot?: string): Promise<ScaffoldedService>;
38
+ /** Scaffold a service from the named template into the project. */
39
+ export declare function createService(templateId: string, options?: CreateServiceOptions): Promise<ScaffoldedService>;
@@ -0,0 +1,79 @@
1
+ import type { OperationOptions } from '../types';
2
+ import type { CreateServiceOptions, ScaffoldedService } from './create-service';
3
+ export type InitEvent = {
4
+ type: 'target';
5
+ projectRoot: string;
6
+ lines: string[];
7
+ } | {
8
+ type: 'files';
9
+ created: string[];
10
+ skipped: string[];
11
+ serverUrl: string;
12
+ } | {
13
+ type: 'repository';
14
+ committed: boolean;
15
+ } | {
16
+ type: 'cancelled';
17
+ } | {
18
+ type: 'warning';
19
+ message: string;
20
+ };
21
+ export interface InitOptions extends Omit<CreateServiceOptions, 'onEvent'>, OperationOptions<InitEvent> {
22
+ /** A template to scaffold a first service from. Omitted creates just the project. */
23
+ template?: string;
24
+ /**
25
+ * Written into `flowrunner.json`; defaults to the CLI's own default cluster.
26
+ *
27
+ * A cluster name (`prod`/`dev`/`local`) or a full URL.
28
+ */
29
+ server?: string;
30
+ /** Set false to skip `npm install`. */
31
+ install?: boolean;
32
+ /**
33
+ * Set false to skip the unit-test harness — the sandbox, the jest config, and their dependencies.
34
+ *
35
+ * For a project that already has a test runner it does not want two of.
36
+ */
37
+ tests?: boolean;
38
+ /** Set false to skip initialising a git repository and making the first commit. */
39
+ git?: boolean;
40
+ /**
41
+ * Confirm writing into a directory that already holds something.
42
+ *
43
+ * `init` never overwrites, but landing a project on top of an unrelated one — a mistyped `--dir`, a
44
+ * stray `..` — is worth a second look. Omitted means nothing can be asked, so a directory that needs
45
+ * confirming throws instead.
46
+ */
47
+ onConfirmTarget?: (target: TargetDescription) => Promise<boolean>;
48
+ /** Progress from the service scaffold, when a template was given. */
49
+ onServiceEvent?: CreateServiceOptions['onEvent'];
50
+ }
51
+ export interface TargetDescription {
52
+ projectRoot: string;
53
+ lines: string[];
54
+ defaultYes: boolean;
55
+ }
56
+ export interface InitResult {
57
+ projectRoot: string;
58
+ /** The target was not confirmed, so nothing was written. */
59
+ cancelled: boolean;
60
+ created: string[];
61
+ skipped: string[];
62
+ serverUrl: string;
63
+ /** The harness files that were written, relative to the project root. Empty under `tests: false`. */
64
+ testingFiles: string[];
65
+ service?: ScaffoldedService;
66
+ installed: boolean;
67
+ /** 'created' — a new repository; 'existing' — left alone; 'skipped' — `--no-git`; 'failed' — git refused. */
68
+ repository: 'created' | 'existing' | 'skipped' | 'failed';
69
+ committed: boolean;
70
+ }
71
+ /**
72
+ * What the user is about to do to a directory, in the terms that would make them notice a mistake: the
73
+ * absolute path, whether it exists, whether anything is in it, and whether it is already a project.
74
+ */
75
+ export declare function describeTarget(projectRoot: string): TargetDescription;
76
+ /** Create the project the other operations assume, optionally with a first service in it. */
77
+ export declare function init(options?: InitOptions): Promise<InitResult>;
78
+ export type { TestingFilesResult } from './testing';
79
+ export { testingFilesDirectory, writeTestingFiles } from './testing';
@@ -0,0 +1,13 @@
1
+ export interface TestingFilesResult {
2
+ created: string[];
3
+ skipped: string[];
4
+ }
5
+ /** Where the shipped harness lives inside the installed package. */
6
+ export declare function testingFilesDirectory(): string;
7
+ /**
8
+ * Copy the harness into `projectRoot`, leaving any file that is already there alone.
9
+ *
10
+ * Reports what it did per file so `init` can print the same `+ file` / `file — already there` lines it
11
+ * prints for everything else it writes.
12
+ */
13
+ export declare function writeTestingFiles(projectRoot: string): TestingFilesResult;
@@ -0,0 +1,40 @@
1
+ import type { OperationOptions } from '../types';
2
+ import type { SegmentOutcome } from './segment';
3
+ export type InitClaudeEvent = {
4
+ type: 'agents';
5
+ directory: string;
6
+ created: string[];
7
+ updated: string[];
8
+ unchanged: string[];
9
+ } | {
10
+ type: 'segment';
11
+ file: string;
12
+ outcome: SegmentOutcome;
13
+ } | {
14
+ type: 'warning';
15
+ message: string;
16
+ };
17
+ export type InitClaudeOptions = OperationOptions<InitClaudeEvent>;
18
+ export interface InitClaudeResult {
19
+ projectRoot: string;
20
+ /** Absolute path of the provider's agents directory. */
21
+ agentsDirectory: string;
22
+ /** Agent file names, relative to `agentsDirectory`. */
23
+ created: string[];
24
+ updated: string[];
25
+ unchanged: string[];
26
+ /** Absolute path of the provider's instructions file. */
27
+ claudeFile: string;
28
+ segment: SegmentOutcome;
29
+ }
30
+ /** Where the packed docs for a provider live inside the installed package. */
31
+ export declare function providerDirectory(provider?: string): string;
32
+ /**
33
+ * Wire the shipped FlowRunner agent instructions into a project's Claude setup.
34
+ *
35
+ * Deliberately does not require a FlowRunner project: someone can reasonably run this in a repo before
36
+ * `init`, and refusing would be a rule with nothing behind it — nothing here reads `flowrunner.json`.
37
+ */
38
+ export declare function initClaude(options?: InitClaudeOptions): Promise<InitClaudeResult>;
39
+ export type { MergeResult, SegmentOutcome } from './segment';
40
+ export { BEGIN_MARKER, END_MARKER, mergeSegment } from './segment';
@@ -0,0 +1,25 @@
1
+ export declare const BEGIN_MARKER = "<!-- flowrunner-cli:ai:start -->";
2
+ export declare const END_MARKER = "<!-- flowrunner-cli:ai:end -->";
3
+ /**
4
+ * What happened to the file.
5
+ *
6
+ * `inserted` and `replaced` are kept apart because they answer different questions: the first says the CLI
7
+ * added something to a file that was already there, the second says it refreshed what it had added before.
8
+ */
9
+ export type SegmentOutcome = 'created' | 'inserted' | 'replaced' | 'unchanged';
10
+ export interface MergeResult {
11
+ contents: string;
12
+ outcome: SegmentOutcome;
13
+ }
14
+ /**
15
+ * Compute the new contents of an instructions file with `segment` merged into it.
16
+ *
17
+ * Pure — takes the current contents (`null` when the file does not exist) and returns the new ones, so the
18
+ * decision of what to write is testable without a filesystem, and the caller stays the only thing that
19
+ * touches disk.
20
+ *
21
+ * An unbalanced marker pair throws. A half-marked file is either a bad hand-edit or a merge conflict
22
+ * someone resolved wrongly, and both readings of "repair it" — treat the file as unmarked and append a
23
+ * second block, or guess where the missing marker went — silently damage the user's own instructions.
24
+ */
25
+ export declare function mergeSegment(current: string | null, segment: string, file: string): MergeResult;
@@ -0,0 +1,38 @@
1
+ import type { OperationOptions } from './types';
2
+ export type LoginEvent = {
3
+ type: 'connecting';
4
+ serverUrl: string;
5
+ } | {
6
+ type: 'authorize';
7
+ url: string;
8
+ } | {
9
+ type: 'waiting';
10
+ } | {
11
+ type: 'exchanging';
12
+ } | {
13
+ type: 'connected';
14
+ serverUrl: string;
15
+ workspaceId: string;
16
+ workspaceName: string;
17
+ };
18
+ export interface LoginOptions extends OperationOptions<LoginEvent> {
19
+ /** Overrides the server in `flowrunner.json`. A cluster name (`prod`/`dev`/`local`) or a full URL. */
20
+ server?: string;
21
+ /** How long to wait for the browser round-trip. */
22
+ timeoutMs?: number;
23
+ /**
24
+ * Called with the authorization URL after it is known and before `openUrl` runs.
25
+ *
26
+ * The CLI waits for Enter here when the login is a step inside another command: a browser window taking
27
+ * focus out of nowhere, mid-deploy, is startling in a way that one typed `flowrunner login` is not.
28
+ */
29
+ onBeforeOpen?: (url: string) => Promise<void>;
30
+ /** How the user gets the URL. Defaults to opening their browser. */
31
+ openUrl?: (url: string) => void | Promise<void>;
32
+ }
33
+ export interface LoginResult {
34
+ serverUrl: string;
35
+ workspaceId: string;
36
+ workspaceName: string;
37
+ }
38
+ export declare function login(options?: LoginOptions): Promise<LoginResult>;
@@ -0,0 +1,19 @@
1
+ import type { OperationOptions } from './types';
2
+ export type LogoutEvent =
3
+ /** Emitted once there is something to log out of, before the revoke goes over the network. */
4
+ {
5
+ type: 'starting';
6
+ serverUrl: string;
7
+ } | {
8
+ type: 'revoked';
9
+ } | {
10
+ type: 'cleared';
11
+ };
12
+ export type LogoutOptions = OperationOptions<LogoutEvent>;
13
+ export interface LogoutResult {
14
+ /** False when there was nothing to log out of — not an error, just nothing to do. */
15
+ wasLoggedIn: boolean;
16
+ /** The server the revoked token belonged to, when there was one. */
17
+ serverUrl?: string;
18
+ }
19
+ export declare function logout(options?: LogoutOptions): Promise<LogoutResult>;
@@ -0,0 +1,23 @@
1
+ import type AdmZip from 'adm-zip';
2
+ /**
3
+ * Whether `serviceId` is safe to use as a path segment.
4
+ *
5
+ * The id arrives from the server, so it is input: `../../etc` as a service id would otherwise decide where
6
+ * this command writes.
7
+ */
8
+ export declare function isSafeServiceId(serviceId: string): boolean;
9
+ /**
10
+ * Write the service's files into `directory`, returning how many were written.
11
+ *
12
+ * Entry names are confined to the target directory before anything is written: an archive is input, and a
13
+ * `../` in a path is the oldest way to get a file written somewhere it was never meant to go.
14
+ */
15
+ export declare function extractService(archive: AdmZip, directory: string): number;
16
+ /**
17
+ * The dependencies the pulled service declares, if any.
18
+ *
19
+ * `node_modules` is not extracted, so a service that declares anything needs an install before it will run.
20
+ * Reported rather than installed: running a package manager on someone's behalf, in a folder they have not
21
+ * looked at yet, is a bigger act than unpacking it.
22
+ */
23
+ export declare function declaredDependencies(archive: AdmZip): string[];