@flowrunner/cli 0.1.18 → 0.1.19-dev.2

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 (318) hide show
  1. package/ai-docs/instructions/service-code-format/01-service-structure.md +1 -1
  2. package/ai-docs/instructions/service-code-format/02-zod-types.md +115 -7
  3. package/ai-docs/instructions/service-code-format/05-dictionaries.md +1 -1
  4. package/ai-docs/instructions/service-code-format/11-output-model.md +5 -5
  5. package/ai-docs/instructions/service-code-format/13-runtime-contracts.md +2 -3
  6. package/ai-docs/instructions/service-code-format/16-gotchas.md +30 -6
  7. package/ai-docs/instructions/service-code-format/README.md +2 -2
  8. package/dist/cli.js +944 -958
  9. package/dist/cli.js.map +4 -4
  10. package/dist/index.js +977 -988
  11. package/dist/index.js.map +4 -4
  12. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/context/execution-context.d.ts +10 -2
  13. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/extension.d.ts +3 -3
  14. package/dist/types/flow-extension-runner/src/global.d.ts +6 -18
  15. package/dist/types/flow-extension-runner/src/index.d.ts +39 -13
  16. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/model/field-mapper.d.ts +1 -1
  17. package/dist/types/flow-extension-runner/src/{v2/model → model}/model-types.d.ts +11 -1
  18. package/dist/types/flow-extension-runner/src/{v2/model → model}/params-model.d.ts +1 -1
  19. package/dist/types/flow-extension-runner/src/{v2/params → params}/config-params.d.ts +1 -1
  20. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/index.d.ts +2 -0
  21. package/dist/types/flow-extension-runner/src/{v2/params → params}/json/types.d.ts +2 -0
  22. package/dist/types/flow-extension-runner/src/params/schema/date-format.d.ts +80 -0
  23. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/schema/defaults.d.ts +3 -2
  24. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/schema/field-plan.d.ts +9 -2
  25. package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/introspect.d.ts +8 -0
  26. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/schema/messages.d.ts +1 -1
  27. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/schema/normalize.d.ts +1 -1
  28. package/dist/types/flow-extension-runner/src/params/schema/notices.d.ts +15 -0
  29. package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/parse.d.ts +1 -1
  30. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/types.d.ts +1 -1
  31. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/zod.d.ts +21 -0
  32. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/registry.d.ts +2 -0
  33. package/dist/types/flow-extension-runner/src/{v2/types.d.ts → types.d.ts} +1 -1
  34. package/dist/types/packages/cli/src/operations/deploy/discover-services.d.ts +2 -4
  35. package/dist/types/shared/src/constants/activity-log.d.ts +248 -2
  36. package/dist/types/shared/src/constants/error-codes.d.ts +6 -0
  37. package/dist/types/shared/src/constants/index.d.ts +1 -0
  38. package/dist/types/shared/src/constants/notification-types.d.ts +309 -0
  39. package/dist/types/shared/src/constants/panic-mode.d.ts +17 -0
  40. package/dist/types/shared/src/constants/shared-extensions.d.ts +10 -0
  41. package/dist/types/shared/src/errors/index.d.ts +1 -0
  42. package/dist/types/shared/src/errors/secrets.d.ts +16 -0
  43. package/dist/types/shared/src/scheme/access-keys/dto.d.ts +35 -13
  44. package/dist/types/shared/src/scheme/api-keys/dto.d.ts +29 -4
  45. package/dist/types/shared/src/scheme/flowrunner/custom-elements.d.ts +0 -16
  46. package/dist/types/shared/src/scheme/flowrunner/index.d.ts +1 -0
  47. package/dist/types/shared/src/scheme/flowrunner/java.dto.d.ts +26 -0
  48. package/dist/types/shared/src/scheme/flowrunner/workspace-dashboard.dto.d.ts +207 -0
  49. package/dist/types/shared/src/scheme/integration-connection/dto.d.ts +22 -0
  50. package/dist/types/shared/src/scheme/notifications/dto.d.ts +10 -0
  51. package/dist/types/shared/src/scheme/notifications/rest.d.ts +20 -0
  52. package/dist/types/shared/src/scheme/remote-mcp-server/dto.d.ts +153 -29
  53. package/dist/types/shared/src/scheme/shared-extensions/base.d.ts +0 -4
  54. package/dist/types/shared/src/scheme/shared-extensions/custom-extensions.d.ts +0 -24
  55. package/dist/types/shared/src/scheme/shared-extensions/extension.d.ts +0 -18
  56. package/dist/types/shared/src/scheme/shared-extensions/flow-extensions.d.ts +0 -3
  57. package/dist/types/shared/src/scheme/shared-extensions/index.d.ts +1 -0
  58. package/dist/types/shared/src/scheme/shared-extensions/list.d.ts +0 -28
  59. package/dist/types/shared/src/scheme/shared-extensions/methods.d.ts +0 -1
  60. package/dist/types/shared/src/scheme/shared-extensions/resolve.d.ts +0 -12
  61. package/dist/types/shared/src/scheme/shared-extensions/search.d.ts +0 -8
  62. package/dist/types/shared/src/scheme/shared-extensions/usage-stats.d.ts +189 -0
  63. package/package.json +1 -4
  64. package/project-files/sandbox/files-mock.js +3 -5
  65. package/project-files/sandbox/service.js +10 -11
  66. package/runtime/index.js +794 -896
  67. package/runtime/index.js.map +4 -4
  68. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/context/execution-context.d.ts +10 -2
  69. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/extension.d.ts +3 -3
  70. package/runtime/types/flow-extension-runner/src/global.d.ts +6 -18
  71. package/runtime/types/flow-extension-runner/src/index.d.ts +39 -13
  72. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/model/field-mapper.d.ts +1 -1
  73. package/runtime/types/flow-extension-runner/src/{v2/model → model}/model-types.d.ts +11 -1
  74. package/runtime/types/flow-extension-runner/src/{v2/model → model}/params-model.d.ts +1 -1
  75. package/runtime/types/flow-extension-runner/src/{v2/params → params}/config-params.d.ts +1 -1
  76. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/index.d.ts +2 -0
  77. package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/types.d.ts +2 -0
  78. package/runtime/types/flow-extension-runner/src/params/schema/date-format.d.ts +80 -0
  79. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/schema/defaults.d.ts +3 -2
  80. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/schema/field-plan.d.ts +9 -2
  81. package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/introspect.d.ts +8 -0
  82. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/schema/messages.d.ts +1 -1
  83. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/schema/normalize.d.ts +1 -1
  84. package/runtime/types/flow-extension-runner/src/params/schema/notices.d.ts +15 -0
  85. package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/parse.d.ts +1 -1
  86. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/types.d.ts +1 -1
  87. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/zod.d.ts +21 -0
  88. package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/registry.d.ts +2 -0
  89. package/runtime/types/flow-extension-runner/src/{v2/types.d.ts → types.d.ts} +1 -1
  90. package/runtime/types/packages/cli/src/runtime/index.d.ts +6 -5
  91. package/dist/types/flow-extension-runner/src/common/config.d.ts +0 -12
  92. package/dist/types/flow-extension-runner/src/common/context.d.ts +0 -6
  93. package/dist/types/flow-extension-runner/src/common/types.d.ts +0 -11
  94. package/dist/types/flow-extension-runner/src/v1/config.d.ts +0 -3
  95. package/dist/types/flow-extension-runner/src/v1/constants.d.ts +0 -4
  96. package/dist/types/flow-extension-runner/src/v1/index.d.ts +0 -11
  97. package/dist/types/flow-extension-runner/src/v1/namespace.d.ts +0 -9
  98. package/dist/types/flow-extension-runner/src/v1/service.d.ts +0 -29
  99. package/dist/types/flow-extension-runner/src/v1/types.d.ts +0 -13
  100. package/dist/types/flow-extension-runner/src/v2/index.d.ts +0 -39
  101. package/dist/types/jsdoc-parser/src/custom-type-defs/files.d.ts +0 -2
  102. package/dist/types/jsdoc-parser/src/index.d.ts +0 -2
  103. package/dist/types/jsdoc-parser/src/lib.d.ts +0 -42
  104. package/dist/types/jsdoc-parser/src/types.d.ts +0 -2
  105. package/runtime/types/flow-extension-runner/src/common/config.d.ts +0 -12
  106. package/runtime/types/flow-extension-runner/src/common/context.d.ts +0 -6
  107. package/runtime/types/flow-extension-runner/src/common/types.d.ts +0 -11
  108. package/runtime/types/flow-extension-runner/src/v1/config.d.ts +0 -3
  109. package/runtime/types/flow-extension-runner/src/v1/constants.d.ts +0 -4
  110. package/runtime/types/flow-extension-runner/src/v1/index.d.ts +0 -11
  111. package/runtime/types/flow-extension-runner/src/v1/namespace.d.ts +0 -9
  112. package/runtime/types/flow-extension-runner/src/v1/service.d.ts +0 -29
  113. package/runtime/types/flow-extension-runner/src/v1/types.d.ts +0 -13
  114. package/runtime/types/flow-extension-runner/src/v2/index.d.ts +0 -39
  115. package/runtime/types/jsdoc-parser/src/custom-type-defs/files.d.ts +0 -2
  116. package/runtime/types/jsdoc-parser/src/index.d.ts +0 -2
  117. package/runtime/types/jsdoc-parser/src/lib.d.ts +0 -42
  118. package/runtime/types/jsdoc-parser/src/types.d.ts +0 -2
  119. package/runtime/types/shared/src/constants/activity-log.d.ts +0 -1573
  120. package/runtime/types/shared/src/constants/ai-agent-tools.d.ts +0 -20
  121. package/runtime/types/shared/src/constants/ai.d.ts +0 -11
  122. package/runtime/types/shared/src/constants/api-keys.d.ts +0 -1
  123. package/runtime/types/shared/src/constants/app.d.ts +0 -57
  124. package/runtime/types/shared/src/constants/billing.d.ts +0 -16
  125. package/runtime/types/shared/src/constants/compliances.d.ts +0 -3
  126. package/runtime/types/shared/src/constants/data-types.d.ts +0 -26
  127. package/runtime/types/shared/src/constants/docs.d.ts +0 -6
  128. package/runtime/types/shared/src/constants/error-codes.d.ts +0 -20
  129. package/runtime/types/shared/src/constants/flow.d.ts +0 -12
  130. package/runtime/types/shared/src/constants/index.d.ts +0 -18
  131. package/runtime/types/shared/src/constants/knowledge-base.d.ts +0 -15
  132. package/runtime/types/shared/src/constants/notification-types.d.ts +0 -1234
  133. package/runtime/types/shared/src/constants/notifications.d.ts +0 -10
  134. package/runtime/types/shared/src/constants/oauth-connection-error.d.ts +0 -3
  135. package/runtime/types/shared/src/constants/patterns.d.ts +0 -28
  136. package/runtime/types/shared/src/constants/retry-policy.d.ts +0 -30
  137. package/runtime/types/shared/src/constants/severity.d.ts +0 -9
  138. package/runtime/types/shared/src/constants/shared-extensions-search.d.ts +0 -6
  139. package/runtime/types/shared/src/constants/shared-extensions.d.ts +0 -56
  140. package/runtime/types/shared/src/constants/zod.d.ts +0 -2
  141. package/runtime/types/shared/src/errors/api.d.ts +0 -15
  142. package/runtime/types/shared/src/errors/base.d.ts +0 -38
  143. package/runtime/types/shared/src/errors/common.d.ts +0 -39
  144. package/runtime/types/shared/src/errors/index.d.ts +0 -14
  145. package/runtime/types/shared/src/errors/k8s.d.ts +0 -14
  146. package/runtime/types/shared/src/errors/message.d.ts +0 -48
  147. package/runtime/types/shared/src/errors/oauth-connection.d.ts +0 -4
  148. package/runtime/types/shared/src/errors/open-search.d.ts +0 -4
  149. package/runtime/types/shared/src/errors/s3.d.ts +0 -11
  150. package/runtime/types/shared/src/extensions/zod.d.ts +0 -25
  151. package/runtime/types/shared/src/scheme/access-keys/dto.d.ts +0 -101
  152. package/runtime/types/shared/src/scheme/access-keys/index.d.ts +0 -2
  153. package/runtime/types/shared/src/scheme/account/dto.d.ts +0 -63
  154. package/runtime/types/shared/src/scheme/account/index.d.ts +0 -1
  155. package/runtime/types/shared/src/scheme/activity-log-base.d.ts +0 -35
  156. package/runtime/types/shared/src/scheme/ai-agent-tools/dto.d.ts +0 -69
  157. package/runtime/types/shared/src/scheme/ai-agent-tools/index.d.ts +0 -2
  158. package/runtime/types/shared/src/scheme/ai-agent-tools/parameters.d.ts +0 -7
  159. package/runtime/types/shared/src/scheme/ai-router/dto.d.ts +0 -23
  160. package/runtime/types/shared/src/scheme/ai-router/index.d.ts +0 -2
  161. package/runtime/types/shared/src/scheme/api-keys/dto.d.ts +0 -28
  162. package/runtime/types/shared/src/scheme/api-keys/index.d.ts +0 -2
  163. package/runtime/types/shared/src/scheme/app/index.d.ts +0 -1
  164. package/runtime/types/shared/src/scheme/app/java.dto.d.ts +0 -6
  165. package/runtime/types/shared/src/scheme/billing/index.d.ts +0 -1
  166. package/runtime/types/shared/src/scheme/billing/java.dto.d.ts +0 -181
  167. package/runtime/types/shared/src/scheme/crm/billing.d.ts +0 -149
  168. package/runtime/types/shared/src/scheme/crm/dto.d.ts +0 -218
  169. package/runtime/types/shared/src/scheme/crm/index.d.ts +0 -3
  170. package/runtime/types/shared/src/scheme/data-types/index.d.ts +0 -1
  171. package/runtime/types/shared/src/scheme/data-types/java.dto.d.ts +0 -22
  172. package/runtime/types/shared/src/scheme/dynamic-forms/dto.d.ts +0 -30
  173. package/runtime/types/shared/src/scheme/dynamic-forms/index.d.ts +0 -2
  174. package/runtime/types/shared/src/scheme/extensions/index.d.ts +0 -1
  175. package/runtime/types/shared/src/scheme/extensions/params-to-zod.d.ts +0 -14
  176. package/runtime/types/shared/src/scheme/flowrunner/custom-elements.d.ts +0 -383
  177. package/runtime/types/shared/src/scheme/flowrunner/index.d.ts +0 -3
  178. package/runtime/types/shared/src/scheme/flowrunner/java.dto.d.ts +0 -655
  179. package/runtime/types/shared/src/scheme/index.d.ts +0 -21
  180. package/runtime/types/shared/src/scheme/integration-connection/dto.d.ts +0 -135
  181. package/runtime/types/shared/src/scheme/integration-connection/index.d.ts +0 -2
  182. package/runtime/types/shared/src/scheme/knowledge-base/dto.d.ts +0 -776
  183. package/runtime/types/shared/src/scheme/knowledge-base/index.d.ts +0 -2
  184. package/runtime/types/shared/src/scheme/mcp-oauth/dto.d.ts +0 -9
  185. package/runtime/types/shared/src/scheme/mcp-oauth/index.d.ts +0 -2
  186. package/runtime/types/shared/src/scheme/notifications/dto.d.ts +0 -118
  187. package/runtime/types/shared/src/scheme/notifications/index.d.ts +0 -3
  188. package/runtime/types/shared/src/scheme/notifications/rest.d.ts +0 -162
  189. package/runtime/types/shared/src/scheme/onboarding/dto.d.ts +0 -29
  190. package/runtime/types/shared/src/scheme/onboarding/index.d.ts +0 -1
  191. package/runtime/types/shared/src/scheme/properties/account.d.ts +0 -3
  192. package/runtime/types/shared/src/scheme/properties/app.d.ts +0 -5
  193. package/runtime/types/shared/src/scheme/properties/billing.d.ts +0 -12
  194. package/runtime/types/shared/src/scheme/properties/common.d.ts +0 -2
  195. package/runtime/types/shared/src/scheme/properties/db.d.ts +0 -8
  196. package/runtime/types/shared/src/scheme/properties/flow-extensions.d.ts +0 -7
  197. package/runtime/types/shared/src/scheme/properties/index.d.ts +0 -7
  198. package/runtime/types/shared/src/scheme/remote-mcp-server/dto.d.ts +0 -278
  199. package/runtime/types/shared/src/scheme/remote-mcp-server/index.d.ts +0 -2
  200. package/runtime/types/shared/src/scheme/shared-extensions/base.d.ts +0 -62
  201. package/runtime/types/shared/src/scheme/shared-extensions/config.d.ts +0 -96
  202. package/runtime/types/shared/src/scheme/shared-extensions/custom-extensions.d.ts +0 -631
  203. package/runtime/types/shared/src/scheme/shared-extensions/extension.d.ts +0 -411
  204. package/runtime/types/shared/src/scheme/shared-extensions/flow-extensions.d.ts +0 -64
  205. package/runtime/types/shared/src/scheme/shared-extensions/index.d.ts +0 -17
  206. package/runtime/types/shared/src/scheme/shared-extensions/light.d.ts +0 -38
  207. package/runtime/types/shared/src/scheme/shared-extensions/list.d.ts +0 -250
  208. package/runtime/types/shared/src/scheme/shared-extensions/logs.d.ts +0 -21
  209. package/runtime/types/shared/src/scheme/shared-extensions/methods.d.ts +0 -112
  210. package/runtime/types/shared/src/scheme/shared-extensions/params-schema.d.ts +0 -48
  211. package/runtime/types/shared/src/scheme/shared-extensions/popular-pool.d.ts +0 -11
  212. package/runtime/types/shared/src/scheme/shared-extensions/resolve.d.ts +0 -373
  213. package/runtime/types/shared/src/scheme/shared-extensions/rest.d.ts +0 -9
  214. package/runtime/types/shared/src/scheme/shared-extensions/search.d.ts +0 -189
  215. package/runtime/types/shared/src/scheme/shared-extensions/service-identity.d.ts +0 -10
  216. package/runtime/types/shared/src/scheme/shared-extensions/service-info.d.ts +0 -16
  217. package/runtime/types/shared/src/scheme/shared-extensions/workspace-stack.d.ts +0 -44
  218. package/runtime/types/shared/src/scheme/workspace/dto.d.ts +0 -40
  219. package/runtime/types/shared/src/scheme/workspace/index.d.ts +0 -1
  220. package/runtime/types/shared/src/utils/object.d.ts +0 -8
  221. package/runtime/types/shared/src/utils/uuid.d.ts +0 -5
  222. package/runtime/types/shared/src/utils/versions.d.ts +0 -4
  223. package/dist/types/flow-extension-runner/src/{v2/actions → actions}/action-method.d.ts +0 -0
  224. package/dist/types/flow-extension-runner/src/{common/context-files.d.ts → context/files.d.ts} +0 -0
  225. package/dist/types/flow-extension-runner/src/{v2/context → context}/logger.d.ts +0 -0
  226. package/dist/types/flow-extension-runner/src/{v2/context → context}/method-input.d.ts +0 -0
  227. package/dist/types/flow-extension-runner/src/{v2/context → context}/proxies.d.ts +0 -0
  228. package/dist/types/flow-extension-runner/src/{v2/create-extension.d.ts → create-extension.d.ts} +0 -0
  229. package/dist/types/flow-extension-runner/src/{v2/crypto.d.ts → crypto.d.ts} +0 -0
  230. package/dist/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/dictionary-method.d.ts +0 -0
  231. package/dist/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/payload-schema.d.ts +0 -0
  232. package/dist/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-method.d.ts +0 -0
  233. package/dist/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-owner.d.ts +0 -0
  234. package/dist/types/flow-extension-runner/src/{v2/loaders → loaders}/payload-schema.d.ts +0 -0
  235. package/dist/types/flow-extension-runner/src/{v2/method.d.ts → method.d.ts} +0 -0
  236. package/dist/types/flow-extension-runner/src/{v2/model → model}/method-model.d.ts +0 -0
  237. package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/method-names.d.ts +0 -0
  238. package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/oauth2.d.ts +0 -0
  239. package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/system-params.d.ts +0 -0
  240. package/dist/types/flow-extension-runner/src/{v2/oauth → oauth}/types.d.ts +0 -0
  241. package/dist/types/flow-extension-runner/src/{common/constants.d.ts → params/config-types.d.ts} +0 -0
  242. package/{runtime/types/flow-extension-runner/src/v2 → dist/types/flow-extension-runner/src}/params/files-options.d.ts +4 -4
  243. /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/checks.d.ts +0 -0
  244. /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/decode.d.ts +0 -0
  245. /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/encode.d.ts +0 -0
  246. /package/dist/types/flow-extension-runner/src/{v2/params → params}/json/values.d.ts +0 -0
  247. /package/dist/types/flow-extension-runner/src/{v2/params → params}/method-params.d.ts +0 -0
  248. /package/dist/types/flow-extension-runner/src/{v2/params → params}/params.d.ts +0 -0
  249. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/assert-object-schema.d.ts +0 -0
  250. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/assert-supported-schema.d.ts +0 -0
  251. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/coerce.d.ts +0 -0
  252. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/dates.d.ts +0 -0
  253. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/dictionary-binding.d.ts +0 -0
  254. /package/dist/types/flow-extension-runner/src/{v2/params → params}/schema/labels.d.ts +0 -0
  255. /package/dist/types/flow-extension-runner/src/{v2/params → params}/widget-types.d.ts +0 -0
  256. /package/dist/types/flow-extension-runner/src/{v2/path.d.ts → path.d.ts} +0 -0
  257. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/mechanisms.d.ts +0 -0
  258. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/method-names.d.ts +0 -0
  259. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/polling-triggers.d.ts +0 -0
  260. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/system-params.d.ts +0 -0
  261. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/trigger-method.d.ts +0 -0
  262. /package/dist/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/types.d.ts +0 -0
  263. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/method-names.d.ts +0 -0
  264. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/realtime-setup.d.ts +0 -0
  265. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/system-params.d.ts +0 -0
  266. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/trigger-method.d.ts +0 -0
  267. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/types.d.ts +0 -0
  268. /package/dist/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/verify.d.ts +0 -0
  269. /package/dist/types/flow-extension-runner/src/{v2/result.d.ts → result.d.ts} +0 -0
  270. /package/dist/types/flow-extension-runner/src/{v2/system-method.d.ts → system-method.d.ts} +0 -0
  271. /package/runtime/types/flow-extension-runner/src/{v2/actions → actions}/action-method.d.ts +0 -0
  272. /package/runtime/types/flow-extension-runner/src/{common/context-files.d.ts → context/files.d.ts} +0 -0
  273. /package/runtime/types/flow-extension-runner/src/{v2/context → context}/logger.d.ts +0 -0
  274. /package/runtime/types/flow-extension-runner/src/{v2/context → context}/method-input.d.ts +0 -0
  275. /package/runtime/types/flow-extension-runner/src/{v2/context → context}/proxies.d.ts +0 -0
  276. /package/runtime/types/flow-extension-runner/src/{v2/create-extension.d.ts → create-extension.d.ts} +0 -0
  277. /package/runtime/types/flow-extension-runner/src/{v2/crypto.d.ts → crypto.d.ts} +0 -0
  278. /package/runtime/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/dictionary-method.d.ts +0 -0
  279. /package/runtime/types/flow-extension-runner/src/{v2/dictionaries → dictionaries}/payload-schema.d.ts +0 -0
  280. /package/runtime/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-method.d.ts +0 -0
  281. /package/runtime/types/flow-extension-runner/src/{v2/loaders → loaders}/loader-owner.d.ts +0 -0
  282. /package/runtime/types/flow-extension-runner/src/{v2/loaders → loaders}/payload-schema.d.ts +0 -0
  283. /package/runtime/types/flow-extension-runner/src/{v2/method.d.ts → method.d.ts} +0 -0
  284. /package/runtime/types/flow-extension-runner/src/{v2/model → model}/method-model.d.ts +0 -0
  285. /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/method-names.d.ts +0 -0
  286. /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/oauth2.d.ts +0 -0
  287. /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/system-params.d.ts +0 -0
  288. /package/runtime/types/flow-extension-runner/src/{v2/oauth → oauth}/types.d.ts +0 -0
  289. /package/runtime/types/flow-extension-runner/src/{common/constants.d.ts → params/config-types.d.ts} +0 -0
  290. /package/{dist/types/flow-extension-runner/src/v2 → runtime/types/flow-extension-runner/src}/params/files-options.d.ts +0 -0
  291. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/checks.d.ts +0 -0
  292. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/decode.d.ts +0 -0
  293. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/encode.d.ts +0 -0
  294. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/json/values.d.ts +0 -0
  295. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/method-params.d.ts +0 -0
  296. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/params.d.ts +0 -0
  297. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/assert-object-schema.d.ts +0 -0
  298. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/assert-supported-schema.d.ts +0 -0
  299. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/coerce.d.ts +0 -0
  300. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/dates.d.ts +0 -0
  301. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/dictionary-binding.d.ts +0 -0
  302. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/schema/labels.d.ts +0 -0
  303. /package/runtime/types/flow-extension-runner/src/{v2/params → params}/widget-types.d.ts +0 -0
  304. /package/runtime/types/flow-extension-runner/src/{v2/path.d.ts → path.d.ts} +0 -0
  305. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/mechanisms.d.ts +0 -0
  306. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/method-names.d.ts +0 -0
  307. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/polling-triggers.d.ts +0 -0
  308. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/system-params.d.ts +0 -0
  309. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/trigger-method.d.ts +0 -0
  310. /package/runtime/types/flow-extension-runner/src/{v2/polling-triggers → polling-triggers}/types.d.ts +0 -0
  311. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/method-names.d.ts +0 -0
  312. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/realtime-setup.d.ts +0 -0
  313. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/system-params.d.ts +0 -0
  314. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/trigger-method.d.ts +0 -0
  315. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/types.d.ts +0 -0
  316. /package/runtime/types/flow-extension-runner/src/{v2/realtime-triggers → realtime-triggers}/verify.d.ts +0 -0
  317. /package/runtime/types/flow-extension-runner/src/{v2/result.d.ts → result.d.ts} +0 -0
  318. /package/runtime/types/flow-extension-runner/src/{v2/system-method.d.ts → system-method.d.ts} +0 -0
@@ -61,7 +61,7 @@ logo for that one item. Omit it and the item inherits the service's.
61
61
  | `logo` | string | ✓ | Icon path, resolved **inside the service's `public/` folder** — see [Folder layout](#folder-layout). |
62
62
  | `appearanceColors` | `[string, string]` | – | `[primary, secondary]`. |
63
63
  | `usesFileStorage` | boolean | – | `true` provisions `ctx.files`; when false, `ctx.files` is a proxy that throws. Default false. See [10-files-api.md](10-files-api.md). |
64
- | `serviceClassName` | string | – | **Deprecated — will be removed soon. Shared extensions only.** The class name of a shared extension rewritten from the legacy JSDoc class format (`'GeminiAIService'`). It is published as `serviceInfo.serviceClassName` (absent otherwise), so flows, configs and connections saved against the old service keep resolving to this one. Keep it unchanged once set. Never set it on a new service or a custom extension. |
64
+ | `serviceClassName` | string | – | **Deprecated — will be removed soon. Shared extensions only.** The class name of a shared extension that was previously published as a class-based service (`'GeminiAIService'`). It is published as `serviceInfo.serviceClassName` (absent otherwise), so flows, configs and connections saved against the old service keep resolving to this one. Keep it unchanged once set. Never set it on a new service or a custom extension. |
65
65
  | `configItems` | `z.object` | – | App + shared config (see [02-zod-types.md](02-zod-types.md)). → `appConfigDescriptions` / `sharedConfigDescriptions`. Omit when the service needs none — see [Services with no credentials](#services-with-no-credentials); a plain object of fields is **not** accepted (see [03-parameters.md](03-parameters.md)). |
66
66
  | `initContext` | fn | – | `({ config, oauth }) => context`; runs once per invocation. Runs for OAuth flows too (`oauth` may be empty). |
67
67
  | `apiRequest` | fn | – | Shared HTTP helper (envelope-unwrap, error-normalize, redacted logging). See [04-http-requests.md](04-http-requests.md). |
@@ -12,6 +12,7 @@ and behaviors.
12
12
  | `z.boolean()` | toggle | | `.optional()` | any field | not required (required is default) |
13
13
  | `z.enum([...])` | dropdown | | `.default(v)` | any field | default value |
14
14
  | `z.date()` | date picker | | `.shared()` | config field | `shared:true` (OAuth client id/secret) |
15
+ | `z.iso.date()`, `z.iso.datetime({ local: true })`, `z.iso.time()` | date / date-and-time / time picker that stores **text** — see [Dates](#dates--an-instant-or-a-date-as-text) | | `.dateFormat(pattern)` | those three | the text `execute` receives: `'dd/MM/yyyy'` → `'31/01/2024'` |
15
16
  | `z.object({...})` | nested form — **drops** the keys it does not declare | | `.dictionary(ref)` | param field | dynamic options + auto `dependsOn` (see [05-dictionaries.md](05-dictionaries.md)) |
16
17
  | `z.looseObject({...})` | nested form — **keeps** the keys it does not declare; see [`z.object` or `z.looseObject`](#zobject-or-zlooseobject) | | | | |
17
18
  | `z.array(inner)` | list | | `.labels({ value: 'Label' })` | `z.enum` | UI shows the label; the flow stores and `execute` receives the VALUE |
@@ -71,6 +72,7 @@ what the **handler** needs, and convert in the handler:
71
72
  | An object or list whose shape you know, which the author may also supply as JSON text | `z.object({ … })` / `z.array(…)`: they draw a real form **and** accept JSON text (see [Text and structures](#text-and-structures)) | — |
72
73
  | Several lines of text | `z.text()` | — |
73
74
  | Several values (ids, emails, tags), even when the vendor wants them comma-separated | `z.array(<element>)`, and `.join(',')` at the request if the vendor needs text | A comma-separated `z.string()` gets a bound list as JSON text, which `.split(',')` breaks ([16-gotchas.md](16-gotchas.md#a-list-is-a-zarray-never-comma-separated-text-you-split)) |
75
+ | A calendar date or a wall-clock time the vendor wants as text (`20/05/2026`, `2026-05-20`, `10:00`) | `z.iso.date().dateFormat('dd/MM/yyyy')` (or `z.iso.datetime({ local: true })` / `z.iso.time()`) — see [Dates](#dates--an-instant-or-a-date-as-text) | `z.date()` hands you an instant; formatting it yourself needs a time zone you do not have, and is a day early for an author east of UTC ([16-gotchas.md](16-gotchas.md#a-date-the-vendor-wants-as-text-is-dateformat-never-a-zdate-you-format)) |
74
76
 
75
77
  **`z.json()` is not supported.** It fails when the extension loads, with a message naming the two declarations
76
78
  above. A value whose shape you don't declare is `z.unknown()`. One you do know is the shape itself, which
@@ -112,6 +114,95 @@ The top-level `params` object is the exception. It is always a `z.object()`, and
112
114
  dropped unless the action declares `dynamicParams` (see [07-actions.md](07-actions.md)). Looseness is for the
113
115
  objects **inside** it.
114
116
 
117
+ ## Dates — an instant, or a date as text
118
+
119
+ Two different things are called "a date", and they are declared differently:
120
+
121
+ | The vendor wants | Declare | Widget | `execute` receives |
122
+ |---|---|---|---|
123
+ | an **instant** — a moment, the same everywhere (`scheduled_at: 2026-05-20T07:00:00Z`) | `z.date()` (the value as sent) or `z.coerce.date()` (a `Date`) | date picker | what the caller sent / a `Date` |
124
+ | a **calendar date** as text | `z.iso.date()` | date picker | `'2024-01-31'` |
125
+ | | `z.iso.date().dateFormat('dd/MM/yyyy')` | date picker | `'31/01/2024'` |
126
+ | a **wall-clock date and time** as text, read in the vendor's zone | `z.iso.datetime({ local: true })` | date-and-time picker | `'2024-01-31T13:45'` |
127
+ | | `z.iso.datetime({ local: true }).dateFormat('dd/MM/yy HH:mm')` | date-and-time picker | `'31/01/24 13:45'` |
128
+ | a **time of day** as text | `z.iso.time()` | time picker | `'13:45'` |
129
+ | | `z.iso.time().dateFormat('h:mm a')` | time picker | `'1:45 PM'` |
130
+
131
+ A date as text is **text from end to end**: the picker builds it from the day and time the author clicked, the
132
+ flow stores it as text, and your handler receives it in your pattern. Nothing converts it through a time zone,
133
+ so 31 January picked in UTC+3 stays 31 January. `z.iso.datetime()` **without** `{ local: true }` is an instant
134
+ with a zone and stays a text box.
135
+
136
+ ### `.dateFormat(pattern)`
137
+
138
+ The pattern uses these tokens, and only these:
139
+
140
+ | Token | Meaning | 31 Jan 2024, 13:45:30 |
141
+ |---|---|---|
142
+ | `yyyy` / `yy` | year | `2024` / `24` |
143
+ | `MM` / `M` | month | `01` / `1` |
144
+ | `dd` / `d` | day of the month | `31` / `31` |
145
+ | `HH` / `H` | hour, 0–23 | `13` / `13` |
146
+ | `hh` / `h` | hour, 1–12 — needs `a` | `01` / `1` |
147
+ | `mm` | minute | `45` |
148
+ | `ss` | second | `30` |
149
+ | `a` | AM / PM | `PM` |
150
+ | `'text'` | literal text | `'at'` → `at` |
151
+
152
+ Any other character that is not a letter (`/ - . : , space`) is written as is. Without `.dateFormat()` the
153
+ value is ISO: `yyyy-MM-dd`, `yyyy-MM-ddTHH:mm` (with seconds when the value had them), `HH:mm`.
154
+
155
+ **Checked when the extension loads**, naming the parameter — so a mistake stops `flowrunner deploy`:
156
+
157
+ | You wrote | Refused because |
158
+ |---|---|
159
+ | `'DD/MM/YYYY'`, `'dd/mm/YYYY'` | `YYYY` is the week-numbering year, `DD` the day of the year, `mm` minutes — the message suggests `dd/MM/yyyy` |
160
+ | `'dd/MM/yyyy HH:mm'` on `z.iso.date()` | a date has no time of day — declare `z.iso.datetime({ local: true })` |
161
+ | `'dd/MM'` on `z.iso.time()`, `'MM/yyyy'` on `z.iso.date()` | a time has no date; every part of a date must be in its pattern |
162
+ | `'hh:mm'` | a 12-hour clock without `a` cannot be read back — add `a`, or use `HH` |
163
+ | `'HH:mm a'` | a 24-hour clock with `a` writes `13:45 PM`, which cannot be read back — use `hh:mm a` or `HH:mm` |
164
+ | `.dateFormat()` on `z.string()`, `z.date()`, or `z.iso.datetime()` without `{ local: true }` | only the three wall-clock types take a format |
165
+ | `.default('2024-01-31')` with `.dateFormat('dd/MM/yyyy')` | a default is handed to `execute` as written, so write it in the field's own format: `.default('31/01/2024')` |
166
+
167
+ ### What a date-as-text field accepts
168
+
169
+ A value picked in the editor already has your pattern. A value **bound from another block** may be any text,
170
+ and is reshaped from the characters as written:
171
+
172
+ | Declared `.dateFormat('dd/MM/yyyy')`, given | `execute` receives |
173
+ |---|---|
174
+ | `'31/01/2024'` | `'31/01/2024'` |
175
+ | `'2024-01-31'`, `'2024-01-31T23:30:00+03:00'`, `'2024-01-31T23:30:00Z'` | `'31/01/2024'` — the date **as written**; a zone is dropped, never applied |
176
+ | `'31/02/2024'`, `'1/1/2024'`, `'01/31/2024'` | refused: `«Due Date» must be a date in dd/MM/yyyy, e.g. 31/01/2024` |
177
+ | a timestamp (`1706659200000`) | refused, with the same message — a timestamp is an instant, and turning it into a day needs a time zone. A field that takes one is `z.date()` |
178
+
179
+ - **Strict.** The text must be exactly what the pattern writes — `1/1/2024` is not `dd/MM/yyyy`, `1:45 pm` is not
180
+ `h:mm a`, and `31/02/2024` or `24:00` is no date at all.
181
+ - **Nothing is invented.** A date alone is refused by a date-and-time or a time field, rather than given a
182
+ midnight nobody picked.
183
+ - **An ISO value with `Z`** keeps its UTC date: `new Date().toISOString()` just after midnight in UTC+3 is still
184
+ yesterday's date in UTC. If the local day matters, format it in the zone you mean before it reaches the field.
185
+ - **Blank is "not set"**, as on a number: `''`, `null` and a missing value follow `.optional()` / `.nullable()` /
186
+ `.default()`. `.min()` / `.max()` are not available on these types.
187
+ - **A pattern made only of digits** (`yyyyMMdd`, `HHmm`) is fine: `20240131` is read as that date, and a value
188
+ that is no date in it (`20241331`) is refused like any other.
189
+ - **To let a flow clear a date**, declare a union with an empty branch:
190
+ `z.union([z.iso.date().dateFormat('dd/MM/yyyy'), z.literal('')]).optional()` (or with `z.date()`). The picker
191
+ stays; `''` (the flow sets the field to Empty Text, or binds an empty value) reaches `execute` as `''`, and an
192
+ untouched field arrives as `undefined`. Map `''` to the vendor's clear in the handler. **Never use `null` as
193
+ the clear signal**: a field left empty in a block arrives as `null`, so `.nullable()` would clear the date on
194
+ every run. This holds for `z.date()` as well — see [Clearing a value](#clearing-a-value).
195
+ - Inside an object or a list it behaves the same, and a failure names the property (`«Days item 2» must be …`).
196
+
197
+ ### Moving a field from `z.date()` to a date as text
198
+
199
+ A flow saved against `z.date()` holds the old picker's **timestamp**. When an author opens the block, the
200
+ console converts it to your pattern **in the author's own time zone** — the day they originally picked — and
201
+ notes *"Converted from an older saved value — check it and save."* Ask your users to open and save the flows
202
+ that use the field. A flow that is never re-saved keeps sending the timestamp: for a transition period the
203
+ runtime still accepts it, reading it in **UTC** (a day early for an author east of UTC), and after that it is
204
+ refused like any other timestamp.
205
+
115
206
  ## The type list is CLOSED
116
207
 
117
208
  The table above is what a service declares day to day. A few more types are accepted and rarely reached for:
@@ -229,7 +320,7 @@ converted:
229
320
  ```js
230
321
  limit: z.union([z.number(), z.literal('max')]) // '5' → 5 'max' → 'max'
231
322
  mode : z.union([z.boolean(), z.literal('auto')]) // 'false' → false 'auto' → 'auto'
232
- scope: z.union([z.number(), z.enum(['all', 'none'])]) // '5' → 5 'all' → 'all' 'x' → «Scope» is invalid
323
+ scope: z.union([z.number(), z.enum(['all', 'none'])]) // '5' → 5 'all' → 'all' 'x' → «Scope» must be a number, or one of: all, none
233
324
  ```
234
325
 
235
326
  Keep `z.string()` in a union only when free text really is one of the forms, and convert in the handler if
@@ -239,17 +330,33 @@ you need a number out of it. For a value that must pass through untouched whatev
239
330
  A constraint is part of "fits": `z.union([z.number().min(10), z.string()])` given `5` hands over `'5'`,
240
331
  because the number branch refuses it and the string branch takes it converted.
241
332
 
242
- ### A blank means "not set"
333
+ A value no branch accepts is refused with what **every** branch expects, in declared order: `«Scope» must be a
334
+ number, or one of: all, none`. A `z.literal('')` branch is left out, so a `''` union reads like its other
335
+ branch.
336
+
337
+ ### Clearing a value
338
+
339
+ A flow sends three kinds of "nothing", and only one of them is deliberate:
340
+
341
+ | In the block | `execute` receives |
342
+ |---|---|
343
+ | the field left untouched, or cleared | `null` → absence (`undefined` under `.optional()`) |
344
+ | the **Empty Text** chip, or a bound `''` | `''` |
345
+ | a cleared text box in the **config dialog** | `''` |
243
346
 
244
- `''` is a real value on a plain `z.string()`, which is why a cleared text box fails an optional formatted
245
- field. On a union it is absence, and that is the spelling to reach for:
347
+ `''` is a value on a plain `z.string()`. On every other type it is absence — unless you declare it with a
348
+ `z.literal('')` branch, which keeps it as a value. That is how a field lets a flow **clear** something:
246
349
 
247
350
  ```js
248
- webhookUrl: z.url().optional() // blank → «Webhook URL» is invalid — expects a URL
249
- webhookUrl: z.union([z.url(), z.literal('')]).optional() // blank → not provided
351
+ dueDate : z.union([z.date(), z.literal('')]).optional() // untouched → undefined Empty Text → '' a date → the date
352
+ webhookUrl: z.url().optional() // '' → «Webhook URL» is invalid — expects a URL
353
+ webhookUrl: z.union([z.url(), z.literal('')]).optional() // '' → '' untouched → undefined
250
354
  ```
251
355
 
252
- See [16-gotchas.md](16-gotchas.md) for the rest of that trap.
356
+ The handler decides what `''` means for the vendor: send the vendor's clear (`body.dueDate = null` when
357
+ `params.dueDate === ''`), or leave the field out (`params.webhookUrl || undefined`). Never make `null` the
358
+ clear signal — an untouched field arrives as `null`, so the vendor's value would be cleared on every run. See
359
+ [16-gotchas.md](16-gotchas.md) for the rest of that trap.
253
360
 
254
361
  ## Config fields publish a smaller set of types
255
362
 
@@ -360,6 +467,7 @@ field by its `.label()`:
360
467
  «Retries» must be at least 1
361
468
  «Site» is invalid — expects a URL, e.g. https://example.com
362
469
  «Region» must be one of: us, eu
470
+ «Scope» must be a number, or one of: all, none
363
471
  ```
364
472
 
365
473
  The console checks the *same* schema while the form is being filled in, so a config dialog reports the same
@@ -8,7 +8,7 @@ via `.dictionary(ref)` on a param (see [02-zod-types.md](02-zod-types.md)). A di
8
8
  | Property | Type | Description |
9
9
  |---|---|---|
10
10
  | `id` | string | Dictionary id — **starts with `get`, ends with `Dictionary`** (`getChatsDictionary`). |
11
- | `category` | string | Optional grouping label. Defaults to `''` — unlike an action's `category`, which is required. The v1 convention was to leave dictionaries uncategorised, so set it only to match a v1 dictionary that declared one. |
11
+ | `category` | string | Optional grouping label. Defaults to `''` — unlike an action's `category`, which is required. |
12
12
  | `label` | string | **Human-readable name** → `operationName`. Dictionaries are shown in the UI and exposed to AI tools, so **always set a label**. Falls back to `id` when omitted. |
13
13
  | `description` | string | Description. |
14
14
  | `criteria` | `z.object` | Optional dependency inputs (become `dependsOn` on consumers). Omit when the dictionary depends on nothing; declared ⇒ must be a `z.object` (see [03-parameters.md](03-parameters.md)). |
@@ -31,7 +31,7 @@ The names change on the way out, which matters when you inspect a built model:
31
31
  | `appearanceColors` | per-method `colorStart` / `colorEnd` (every method inherits them) |
32
32
  | `label` | per-method `operationName` |
33
33
 
34
- `serviceInfo` also carries `requireOAuth`, and the definition root carries `runnerVersion` (`'v2'`). A
34
+ `serviceInfo` also carries `requireOAuth`. A
35
35
  service's `appearanceColors` are not published on `serviceInfo` itself.
36
36
 
37
37
  ## The schema travels too
@@ -94,6 +94,9 @@ There is no `.uiComponent()`; the widget follows the zod type (after unwrapping
94
94
  | `z.number()` | `NUMBER` | `NUMERIC_STEPPER` |
95
95
  | `z.boolean()` | `BOOLEAN` | `TOGGLE` |
96
96
  | `z.date()` | `STRING` | `DATE_PICKER` |
97
+ | `z.iso.date()` | `STRING` | `DATE_PICKER` + `valueKind: 'string'` + `format` (the `.dateFormat()` pattern, else `yyyy-MM-dd`) |
98
+ | `z.iso.datetime({ local: true })` | `STRING` | `DATE_TIME_PICKER` + `valueKind: 'string'` + `format` (else `yyyy-MM-dd'T'HH:mm`) |
99
+ | `z.iso.time()` | `STRING` | `TIME_PICKER` + `valueKind: 'string'` + `format` (else `HH:mm`) |
97
100
  | `z.enum([...])` | `STRING` | `DROPDOWN` — `{ value, label }` pairs when `.labels()` is declared, else the enum values |
98
101
  | `z.object({...})` | `OBJECT` | — (recurses into `properties`) |
99
102
  | `z.array(inner)` | `LIST` | — (`items.type` from the element) |
@@ -153,8 +156,7 @@ function itself never ships; only its name does.
153
156
  | `field.dynamicProps({ dependsOn, execute })` | `metaInfo.args[field].schemaLoader` = the loader's name, `metaInfo.args[field].dependsOn` = `dependsOn` (`[]` when omitted); in `paramsSchema`, the field's `meta.frDynamicProps` = `{ id, dependsOn }` and the object carries `loose: true` | `<actionId>_<field>_DynamicProps` |
154
157
  | `dynamicParams: { dependsOn, execute }` | `metaInfo.dynamicParams` = `{ methodName, dependsOn }` | `<actionId>_DynamicParams` |
155
158
 
156
- - `schemaLoader` is the key a legacy (class-based) service uses for the same purpose, so a consumer reads both
157
- the same way. The field's own `bodyParams` entry and `paramsSchema` entry stay as declared.
159
+ - The field's own `bodyParams` entry and `paramsSchema` entry stay as declared.
158
160
  - `frDynamicProps` in `paramsSchema` is the plain ref `{ id, dependsOn }`, written next to the other `fr*`
159
161
  meta keys (`frDictionary`, `frLabels`, …).
160
162
  - `loose: true` marks an object that keeps the keys it does not declare (`z.looseObject()`); without it a
@@ -181,5 +183,3 @@ Both are built from the one schema `execute` returned, so they cannot disagree.
181
183
  field's own static keys come **first** in both. A loaded field that carries `.dictionary(ref)` publishes the
182
184
  dictionary on its `params` entry.
183
185
 
184
- A legacy loader differs: it answers with a plain list of param definitions, not this object. Consumers accept
185
- both.
@@ -15,8 +15,8 @@ Two different surfaces, easily confused:
15
15
 
16
16
  | Surface | How you get it | Contains |
17
17
  |---|---|---|
18
- | **`Flowrunner` global** | always present when the platform runs your service; a harness gets it as a side effect of importing `@flowrunner/cli/runtime` | `Request`, `z`, `crypto`, `createExtension`, `getExtension`, `ServerCode` |
19
- | **`require('@flowrunner/cli/runtime')`** | explicit import — **harness-side only** | `buildServiceDefinition`, `getServiceConfigs`, `runServiceMethod`, `detectVersion`, `resetRegistry`, `parseJsDocToServiceJson` |
18
+ | **`Flowrunner` global** | always present when the platform runs your service; a harness gets it as a side effect of importing `@flowrunner/cli/runtime` | `Request`, `z`, `crypto`, `createExtension`, `getExtension` |
19
+ | **`require('@flowrunner/cli/runtime')`** | explicit import — **harness-side only** | `buildServiceDefinition`, `getServiceConfigs`, `runServiceMethod`, `resetRegistry` |
20
20
 
21
21
  A service module uses only the global, and `require`s nothing. Note that importing the module is what
22
22
  installs the global — there is no separate namespace export to pull in.
@@ -31,7 +31,6 @@ than a syntax error. Check it directly:
31
31
  | `buildServiceDefinition` | `(serviceId, serviceEntryPointPath)` | `SharedExtensionDefinition` — `serviceInfo` + `methodsMap` (see [11-output-model.md](11-output-model.md)) |
32
32
  | `getServiceConfigs` | `(serviceId, serviceEntryPointPath)` | `ConfigItem[]` — the published config descriptions |
33
33
  | `runServiceMethod` | `(data: RunServiceMethodData)` | `Promise<unknown>` — invokes one method, SYSTEM methods included |
34
- | `detectVersion` | `(serviceId, serviceEntryPointPath)` | `'v1' \| 'v2'` |
35
34
  | `resetRegistry` | `()` | clears the extension registry — **not sufficient on its own**, see below |
36
35
 
37
36
  ```js
@@ -25,7 +25,8 @@ builder that prunes `''` makes the documented "leave it blank to clear it" behav
25
25
  error anywhere.
26
26
 
27
27
  **The inverse is equally sharp, and appears the moment you fix the first half.** Once `''` reaches the wire,
28
- every optional string param sends one when the flow author leaves it blank — and for an API where an absent
28
+ every optional string param sends one whenever a flow passes an empty value (a cleared config field, the Empty
29
+ Text chip, a bound `''`; a block field left untouched arrives as `null`, which is absence) — and for an API where an absent
29
30
  field means *keep the current value*, a blank one now **overwrites** it. Copy/duplicate endpoints are the
30
31
  usual place this bites: an absent caption keeps the original, an empty caption erases it.
31
32
 
@@ -41,15 +42,17 @@ documentation.
41
42
  ### The same `''` fails a format-constrained field
42
43
 
43
44
  Because `''` is a value, it reaches the format check and fails it — and `.optional()` does not help, since
44
- the field WAS provided. A cleared text box is what sends it, so this fires the first time a flow author
45
- leaves an optional URL or email blank:
45
+ the field WAS provided. A cleared config text box sends it, and so does a flow passing an empty value, so this
46
+ fires the first time someone clears an optional URL or email:
46
47
 
47
48
  ```js
48
- webhookUrl: z.url().optional().label('Webhook URL') // blank → «Webhook URL» is invalid — expects a URL
49
- webhookUrl: z.union([z.url(), z.literal('')]).optional().label('Webhook URL') // blank → not provided
49
+ webhookUrl: z.url().optional().label('Webhook URL') // '' → «Webhook URL» is invalid — expects a URL
50
+ webhookUrl: z.union([z.url(), z.literal('')]).optional().label('Webhook URL') // '' → '' (a value)
50
51
  ```
51
52
 
52
- Declare the union wherever blank has to mean "not set". A non-empty value still has to satisfy the format.
53
+ Declare the union wherever an empty value must be accepted, then decide in the handler what `''` means:
54
+ `params.webhookUrl || undefined` when empty means "not set", the vendor's clear when it means "clear it". A
55
+ non-empty value still has to satisfy the format.
53
56
 
54
57
  ## An optional object the author never filled in is absent — but may still arrive as `{}`
55
58
 
@@ -246,6 +249,26 @@ if (listIds?.length) payload.listIds = listIds
246
249
 
247
250
  Details in [02-zod-types.md](02-zod-types.md#text-and-structures).
248
251
 
252
+ ## A date the vendor wants as text is `.dateFormat()`, never a `z.date()` you format
253
+
254
+ A `z.date()` value is an **instant**. Turning it into the text a vendor wants (`20/05/2026`, `10:00`) needs a
255
+ time zone, and your handler has none — so the usual code is wrong for every author east of UTC:
256
+
257
+ ```js
258
+ // ✗ the picker stores local midnight: 20 May picked in UTC+3 is 2026-05-19T21:00:00Z
259
+ dueDate: z.date()
260
+ // …
261
+ body.due = new Date(params.dueDate).toISOString().slice(0, 10) // '2026-05-19' — a day early
262
+
263
+ // ✓ the picker stores the day the author clicked, as text in your pattern
264
+ dueDate: z.iso.date().dateFormat('dd/MM/yyyy')
265
+ // …
266
+ body.due = params.dueDate // '20/05/2026'
267
+ ```
268
+
269
+ The same goes for `getUTCDate()` / `getUTCHours()` and hand-rolled `pad2` helpers. Keep `z.date()` for a field
270
+ whose vendor wants an instant. Details in [02-zod-types.md](02-zod-types.md#dates--an-instant-or-a-date-as-text).
271
+
249
272
  ## A schema slot must be a `z.object`, or the method quietly has no inputs
250
273
 
251
274
  `params`, `criteria` and `configItems` are containers of named fields. Hand one anything else and there is
@@ -360,6 +383,7 @@ Do not restate these here; they are covered where they belong.
360
383
  | A binary download is `.toBuffer()`, not a response encoding — an encoded body is parsed and corrupted | [04-http-requests.md](04-http-requests.md) |
361
384
  | `ResponseError.message` is the response *body*, so it can be an object | [04-http-requests.md](04-http-requests.md) |
362
385
  | A blank (`''`) fails `z.url().optional()` — `.optional()` does not cover it | this document |
386
+ | A `.dateFormat()` pattern is checked at load; `YYYY`, `DD`, and `hh` without `a` are refused | [02-zod-types.md](02-zod-types.md#dateformatpattern) |
363
387
  | Secrets in logs, credentials in the URL, credentials or caller headers sent to an origin the service didn't choose, upload MIME type | [19-security.md](19-security.md) |
364
388
  | `.default()` is not applied to realtime-trigger `match` params | [13-runtime-contracts.md](13-runtime-contracts.md) |
365
389
  | `rawBody` is **absent**, not empty, when there is nothing to verify — hashing `''` looks like a bad signature | [09-realtime-triggers.md](09-realtime-triggers.md) |
@@ -115,7 +115,7 @@ and testing one are separate jobs; do not read it while writing a service.
115
115
 
116
116
  That is also separate from **checking that a service builds**, which needs no suite at all and is part of
117
117
  writing one: `require('@flowrunner/cli/runtime')` exports `buildServiceDefinition`, `getServiceConfigs`,
118
- `runServiceMethod`, `detectVersion`, `resetRegistry` and `parseJsDocToServiceJson`, and importing it installs
119
- the `Flowrunner` global (`Request`, `z`, `crypto`, `createExtension`, `getExtension`, `ServerCode`).
118
+ `runServiceMethod` and `resetRegistry`, and importing it installs
119
+ the `Flowrunner` global (`Request`, `z`, `crypto`, `createExtension`, `getExtension`).
120
120
  Signatures, a copy-paste snippet, and the boundary between a throwaway check and a suite are in
121
121
  [13-runtime-contracts.md](13-runtime-contracts.md).