@openapi-flow/n8n 0.0.0-stage → 0.3.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 (332) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +129 -2
  3. package/THIRD_PARTY_NOTICES.md +9 -0
  4. package/dist/legacy/workflow/common/plan-validation.d.ts +1 -0
  5. package/dist/legacy/workflow/common/plan-validation.js +11 -0
  6. package/dist/legacy/workflow/common/workflow-id.d.ts +1 -0
  7. package/dist/legacy/workflow/common/workflow-id.js +8 -0
  8. package/dist/legacy/workflow/inbound/build-inbound-workflow.d.ts +2 -0
  9. package/dist/legacy/workflow/inbound/build-inbound-workflow.js +60 -0
  10. package/dist/legacy/workflow/inbound/compile-inbound-workflow.d.ts +2 -0
  11. package/dist/legacy/workflow/inbound/compile-inbound-workflow.js +25 -0
  12. package/dist/legacy/workflow/inbound/inbound-response.d.ts +2 -0
  13. package/dist/legacy/workflow/inbound/inbound-response.js +51 -0
  14. package/dist/legacy/workflow/request/base-url.d.ts +1 -0
  15. package/dist/legacy/workflow/request/base-url.js +14 -0
  16. package/dist/legacy/workflow/request/build-request-workflow.d.ts +3 -0
  17. package/dist/legacy/workflow/request/build-request-workflow.js +47 -0
  18. package/dist/legacy/workflow/request/build-sequence-workflow.d.ts +3 -0
  19. package/dist/legacy/workflow/request/build-sequence-workflow.js +53 -0
  20. package/dist/legacy/workflow/request/compile-catalog-sequence.d.ts +2 -0
  21. package/dist/legacy/workflow/request/compile-catalog-sequence.js +122 -0
  22. package/dist/legacy/workflow/request/compile-sequence.d.ts +2 -0
  23. package/dist/legacy/workflow/request/compile-sequence.js +41 -0
  24. package/dist/legacy/workflow/request/compile-workflow.d.ts +4 -0
  25. package/dist/legacy/workflow/request/compile-workflow.js +93 -0
  26. package/dist/legacy/workflow/request/credential-binding.d.ts +5 -0
  27. package/dist/legacy/workflow/request/credential-binding.js +31 -0
  28. package/dist/legacy/workflow/request/effect-policy.d.ts +4 -0
  29. package/dist/legacy/workflow/request/effect-policy.js +16 -0
  30. package/dist/legacy/workflow/request/http-request-node.d.ts +2 -0
  31. package/dist/legacy/workflow/request/http-request-node.js +69 -0
  32. package/dist/legacy/workflow/request/prepare-sequence.d.ts +4 -0
  33. package/dist/legacy/workflow/request/prepare-sequence.js +103 -0
  34. package/dist/legacy/workflow/request/request-body.d.ts +4 -0
  35. package/dist/legacy/workflow/request/request-body.js +64 -0
  36. package/dist/legacy/workflow/request/request-headers.d.ts +4 -0
  37. package/dist/legacy/workflow/request/request-headers.js +30 -0
  38. package/dist/legacy/workflow/request/request-url.d.ts +4 -0
  39. package/dist/legacy/workflow/request/request-url.js +34 -0
  40. package/dist/legacy/workflow/request/response-assertion-code.d.ts +3 -0
  41. package/dist/legacy/workflow/request/response-assertion-code.js +28 -0
  42. package/dist/legacy/workflow/request/sequence-url.d.ts +4 -0
  43. package/dist/legacy/workflow/request/sequence-url.js +104 -0
  44. package/dist/legacy-api.d.ts +25 -0
  45. package/dist/legacy-api.js +20 -0
  46. package/dist/nodes/common/validation/compile-standalone-validator.d.ts +3 -0
  47. package/dist/nodes/common/validation/compile-standalone-validator.js +44 -0
  48. package/dist/nodes/gap/create-gap-node.d.ts +3 -0
  49. package/dist/nodes/gap/create-gap-node.js +35 -0
  50. package/dist/nodes/inputs/compile-template-input-validators.d.ts +3 -0
  51. package/dist/nodes/inputs/compile-template-input-validators.js +26 -0
  52. package/dist/nodes/inputs/create-template-input-nodes.d.ts +4 -0
  53. package/dist/nodes/inputs/create-template-input-nodes.js +61 -0
  54. package/dist/nodes/native/arrays/create-array-node-fragment.d.ts +4 -0
  55. package/dist/nodes/native/arrays/create-array-node-fragment.js +42 -0
  56. package/dist/nodes/native/arrays/create-array-reader-code.d.ts +3 -0
  57. package/dist/nodes/native/arrays/create-array-reader-code.js +12 -0
  58. package/dist/nodes/native/arrays/create-bound-native-array-capability.d.ts +4 -0
  59. package/dist/nodes/native/arrays/create-bound-native-array-capability.js +81 -0
  60. package/dist/nodes/native/arrays/create-native-array-capability.d.ts +4 -0
  61. package/dist/nodes/native/arrays/create-native-array-capability.js +12 -0
  62. package/dist/nodes/native/arrays/native-array-definition.d.ts +2 -0
  63. package/dist/nodes/native/arrays/native-array-definition.js +27 -0
  64. package/dist/nodes/native/common/create-material-planning-capability.d.ts +4 -0
  65. package/dist/nodes/native/common/create-material-planning-capability.js +14 -0
  66. package/dist/nodes/native/common/create-native-fragment.d.ts +2 -0
  67. package/dist/nodes/native/common/create-native-fragment.js +10 -0
  68. package/dist/nodes/native/common/define-material-bound-capability.d.ts +4 -0
  69. package/dist/nodes/native/common/define-material-bound-capability.js +33 -0
  70. package/dist/nodes/native/common/resolve-native-runtime-source.d.ts +3 -0
  71. package/dist/nodes/native/common/resolve-native-runtime-source.js +15 -0
  72. package/dist/nodes/native/common/response-reference-bindings.d.ts +4 -0
  73. package/dist/nodes/native/common/response-reference-bindings.js +15 -0
  74. package/dist/nodes/native/common/response-references.d.ts +3 -0
  75. package/dist/nodes/native/common/response-references.js +5 -0
  76. package/dist/nodes/native/create-exclusive-branch-merge-capability.d.ts +3 -0
  77. package/dist/nodes/native/create-exclusive-branch-merge-capability.js +43 -0
  78. package/dist/nodes/native/create-json-output-capability.d.ts +3 -0
  79. package/dist/nodes/native/create-json-output-capability.js +48 -0
  80. package/dist/nodes/native/create-native-capabilities.d.ts +2 -0
  81. package/dist/nodes/native/create-native-capabilities.js +15 -0
  82. package/dist/nodes/native/create-pass-through-capability.d.ts +3 -0
  83. package/dist/nodes/native/create-pass-through-capability.js +32 -0
  84. package/dist/nodes/native/create-response-array-capability.d.ts +3 -0
  85. package/dist/nodes/native/create-response-array-capability.js +78 -0
  86. package/dist/nodes/native/create-response-collection-capability.d.ts +3 -0
  87. package/dist/nodes/native/create-response-collection-capability.js +134 -0
  88. package/dist/nodes/native/if-capability.d.ts +2 -0
  89. package/dist/nodes/native/if-capability.js +80 -0
  90. package/dist/nodes/native/inputs/native-input-runtime.bundle.js +24 -0
  91. package/dist/nodes/native/inputs/prepend-native-parameter-guard.d.ts +4 -0
  92. package/dist/nodes/native/inputs/prepend-native-parameter-guard.js +52 -0
  93. package/dist/nodes/native/item-join/create-bound-item-join-capability.d.ts +3 -0
  94. package/dist/nodes/native/item-join/create-bound-item-join-capability.js +169 -0
  95. package/dist/nodes/native/item-join/create-item-join-capability.d.ts +4 -0
  96. package/dist/nodes/native/item-join/create-item-join-capability.js +10 -0
  97. package/dist/nodes/native/item-join/create-item-join-reader-code.d.ts +2 -0
  98. package/dist/nodes/native/item-join/create-item-join-reader-code.js +18 -0
  99. package/dist/nodes/native/item-join/item-join-definition.d.ts +2 -0
  100. package/dist/nodes/native/item-join/item-join-definition.js +33 -0
  101. package/dist/nodes/native/item-join/runtime/item-join-runtime.bundle.js +24 -0
  102. package/dist/nodes/native/item-join/runtime/join-api-items.d.ts +3 -0
  103. package/dist/nodes/native/item-join/runtime/join-api-items.js +37 -0
  104. package/dist/nodes/native/merge-append-capability.d.ts +2 -0
  105. package/dist/nodes/native/merge-append-capability.js +33 -0
  106. package/dist/nodes/native/registry/native-feature-definitions.d.ts +4 -0
  107. package/dist/nodes/native/registry/native-feature-definitions.js +93 -0
  108. package/dist/nodes/native/registry/native-feature-material-requirements.d.ts +3 -0
  109. package/dist/nodes/native/registry/native-feature-material-requirements.js +10 -0
  110. package/dist/nodes/native/registry/resolve-n8n-native-features.d.ts +3 -0
  111. package/dist/nodes/native/registry/resolve-n8n-native-features.js +6 -0
  112. package/dist/nodes/native/registry/resolve-n8n-native-planning-features.d.ts +3 -0
  113. package/dist/nodes/native/registry/resolve-n8n-native-planning-features.js +5 -0
  114. package/dist/nodes/native/registry/resolve-native-feature-registry.d.ts +3 -0
  115. package/dist/nodes/native/registry/resolve-native-feature-registry.js +99 -0
  116. package/dist/nodes/native/registry/validate-native-feature-context.d.ts +2 -0
  117. package/dist/nodes/native/registry/validate-native-feature-context.js +46 -0
  118. package/dist/nodes/native/response-array-definition.d.ts +2 -0
  119. package/dist/nodes/native/response-array-definition.js +27 -0
  120. package/dist/nodes/native/response-assertion-capability.d.ts +2 -0
  121. package/dist/nodes/native/response-assertion-capability.js +57 -0
  122. package/dist/nodes/native/response-check-code.d.ts +3 -0
  123. package/dist/nodes/native/response-check-code.js +65 -0
  124. package/dist/nodes/native/response-checks/create-response-check-guard.d.ts +4 -0
  125. package/dist/nodes/native/response-checks/create-response-check-guard.js +22 -0
  126. package/dist/nodes/native/response-checks/create-response-check-reader.d.ts +3 -0
  127. package/dist/nodes/native/response-checks/create-response-check-reader.js +23 -0
  128. package/dist/nodes/native/response-collection-definition.d.ts +2 -0
  129. package/dist/nodes/native/response-collection-definition.js +27 -0
  130. package/dist/nodes/native/stop-and-error-capability.d.ts +2 -0
  131. package/dist/nodes/native/stop-and-error-capability.js +43 -0
  132. package/dist/nodes/request/authentication/credential-field-name.d.ts +1 -0
  133. package/dist/nodes/request/authentication/credential-field-name.js +3 -0
  134. package/dist/nodes/request/authentication/resolve-http-request-authentication.d.ts +2 -0
  135. package/dist/nodes/request/authentication/resolve-http-request-authentication.js +42 -0
  136. package/dist/nodes/request/bindings/compile-native-output-validators.d.ts +3 -0
  137. package/dist/nodes/request/bindings/compile-native-output-validators.js +12 -0
  138. package/dist/nodes/request/bindings/compile-request-validator.d.ts +3 -0
  139. package/dist/nodes/request/bindings/compile-request-validator.js +13 -0
  140. package/dist/nodes/request/bindings/compile-source-response-validators.d.ts +2 -0
  141. package/dist/nodes/request/bindings/compile-source-response-validators.js +12 -0
  142. package/dist/nodes/request/bindings/create-bound-request-fragment.d.ts +3 -0
  143. package/dist/nodes/request/bindings/create-bound-request-fragment.js +82 -0
  144. package/dist/nodes/request/bindings/create-output-item-reader-code.d.ts +2 -0
  145. package/dist/nodes/request/bindings/create-output-item-reader-code.js +7 -0
  146. package/dist/nodes/request/bindings/create-output-reader-code.d.ts +3 -0
  147. package/dist/nodes/request/bindings/create-output-reader-code.js +26 -0
  148. package/dist/nodes/request/bindings/resolve-output-binding-sources.d.ts +3 -0
  149. package/dist/nodes/request/bindings/resolve-output-binding-sources.js +36 -0
  150. package/dist/nodes/request/create-http-request-node.d.ts +2 -0
  151. package/dist/nodes/request/create-http-request-node.js +73 -0
  152. package/dist/nodes/request/deployment/create-request-deployment-notes.d.ts +2 -0
  153. package/dist/nodes/request/deployment/create-request-deployment-notes.js +3 -0
  154. package/dist/nodes/request/deployment/resolve-http-request-deployment.d.ts +2 -0
  155. package/dist/nodes/request/deployment/resolve-http-request-deployment.js +33 -0
  156. package/dist/nodes/request/finalize-http-request-fragment.d.ts +3 -0
  157. package/dist/nodes/request/finalize-http-request-fragment.js +22 -0
  158. package/dist/nodes/request/resolve-http-request-node-configuration.d.ts +4 -0
  159. package/dist/nodes/request/resolve-http-request-node-configuration.js +41 -0
  160. package/dist/nodes/request/response/create-http-response-decoder.d.ts +4 -0
  161. package/dist/nodes/request/response/create-http-response-decoder.js +57 -0
  162. package/dist/nodes/request/response/decode-http-response.d.ts +3 -0
  163. package/dist/nodes/request/response/decode-http-response.js +42 -0
  164. package/dist/nodes/request/response/http-response-media.d.ts +2 -0
  165. package/dist/nodes/request/response/http-response-media.js +32 -0
  166. package/dist/nodes/request/response/http-response-node-name.d.ts +2 -0
  167. package/dist/nodes/request/response/http-response-node-name.js +4 -0
  168. package/dist/nodes/request/response/response-runtime.bundle.js +24 -0
  169. package/dist/nodes/request/runtime/materialize-http-request.d.ts +4 -0
  170. package/dist/nodes/request/runtime/materialize-http-request.js +35 -0
  171. package/dist/nodes/request/runtime/request-runtime.bundle.js +24 -0
  172. package/dist/nodes/request/serialization/create-serialized-http-request-node.d.ts +3 -0
  173. package/dist/nodes/request/serialization/create-serialized-http-request-node.js +17 -0
  174. package/dist/nodes/request/serialization/serialize-http-request.d.ts +5 -0
  175. package/dist/nodes/request/serialization/serialize-http-request.js +70 -0
  176. package/dist/public-api.d.ts +43 -0
  177. package/dist/public-api.js +26 -0
  178. package/dist/schemas/batch-execution-schema.d.ts +15 -0
  179. package/dist/schemas/batch-execution-schema.js +14 -0
  180. package/dist/schemas/create-native-comparison-planning-schema.d.ts +81 -0
  181. package/dist/schemas/create-native-comparison-planning-schema.js +36 -0
  182. package/dist/schemas/exclusive-branch-merge-schema.d.ts +4 -0
  183. package/dist/schemas/exclusive-branch-merge-schema.js +7 -0
  184. package/dist/schemas/item-join-schema.d.ts +13 -0
  185. package/dist/schemas/item-join-schema.js +26 -0
  186. package/dist/schemas/native-array-schema.d.ts +11 -0
  187. package/dist/schemas/native-array-schema.js +19 -0
  188. package/dist/schemas/native-capability-schemas.d.ts +100 -0
  189. package/dist/schemas/native-capability-schemas.js +62 -0
  190. package/dist/schemas/native-feature-registry-schema.d.ts +17 -0
  191. package/dist/schemas/native-feature-registry-schema.js +8 -0
  192. package/dist/schemas/native-runtime-input-schema.d.ts +5 -0
  193. package/dist/schemas/native-runtime-input-schema.js +5 -0
  194. package/dist/schemas/request-deployment-schema.d.ts +9 -0
  195. package/dist/schemas/request-deployment-schema.js +27 -0
  196. package/dist/schemas/response-array-schema.d.ts +11 -0
  197. package/dist/schemas/response-array-schema.js +19 -0
  198. package/dist/schemas/response-collection-schema.d.ts +11 -0
  199. package/dist/schemas/response-collection-schema.js +19 -0
  200. package/dist/schemas/template-deployment-selection-schema.d.ts +3 -0
  201. package/dist/schemas/template-deployment-selection-schema.js +10 -0
  202. package/dist/schemas/workflow-input-value-map-schema.d.ts +5 -0
  203. package/dist/schemas/workflow-input-value-map-schema.js +5 -0
  204. package/dist/schemas/workflow-template-schema.d.ts +11 -0
  205. package/dist/schemas/workflow-template-schema.js +10 -0
  206. package/dist/types/array-iteration.d.ts +8 -0
  207. package/dist/types/array-iteration.js +1 -0
  208. package/dist/types/array-split.d.ts +13 -0
  209. package/dist/types/array-split.js +1 -0
  210. package/dist/types/authentication.d.ts +14 -0
  211. package/dist/types/authentication.js +1 -0
  212. package/dist/types/batch-execution.d.ts +23 -0
  213. package/dist/types/batch-execution.js +1 -0
  214. package/dist/types/http-response-decoding.d.ts +16 -0
  215. package/dist/types/http-response-decoding.js +1 -0
  216. package/dist/types/item-join.d.ts +40 -0
  217. package/dist/types/item-join.js +1 -0
  218. package/dist/types/legacy/catalog-workflow.d.ts +37 -0
  219. package/dist/types/legacy/catalog-workflow.js +1 -0
  220. package/dist/types/legacy/inbound-workflow.d.ts +27 -0
  221. package/dist/types/legacy/inbound-workflow.js +1 -0
  222. package/dist/types/legacy/request-node.d.ts +23 -0
  223. package/dist/types/legacy/request-node.js +1 -0
  224. package/dist/types/legacy/request-workflow.d.ts +43 -0
  225. package/dist/types/legacy/request-workflow.js +1 -0
  226. package/dist/types/legacy/sequence-workflow.d.ts +57 -0
  227. package/dist/types/legacy/sequence-workflow.js +1 -0
  228. package/dist/types/native-array.d.ts +8 -0
  229. package/dist/types/native-array.js +1 -0
  230. package/dist/types/native-capability.d.ts +46 -0
  231. package/dist/types/native-capability.js +1 -0
  232. package/dist/types/native-feature-registry.d.ts +70 -0
  233. package/dist/types/native-feature-registry.js +14 -0
  234. package/dist/types/native-material-binding.d.ts +56 -0
  235. package/dist/types/native-material-binding.js +1 -0
  236. package/dist/types/native-runtime-parameters.d.ts +55 -0
  237. package/dist/types/native-runtime-parameters.js +1 -0
  238. package/dist/types/node-fragment.d.ts +51 -0
  239. package/dist/types/node-fragment.js +1 -0
  240. package/dist/types/output-binding-source.d.ts +27 -0
  241. package/dist/types/output-binding-source.js +1 -0
  242. package/dist/types/request-deployment.d.ts +17 -0
  243. package/dist/types/request-deployment.js +1 -0
  244. package/dist/types/request-materialization.d.ts +30 -0
  245. package/dist/types/request-materialization.js +1 -0
  246. package/dist/types/request-node-configuration.d.ts +13 -0
  247. package/dist/types/request-node-configuration.js +1 -0
  248. package/dist/types/response-check-compilation.d.ts +11 -0
  249. package/dist/types/response-check-compilation.js +1 -0
  250. package/dist/types/response-check-guard.d.ts +6 -0
  251. package/dist/types/response-check-guard.js +1 -0
  252. package/dist/types/response-collection.d.ts +7 -0
  253. package/dist/types/response-collection.js +1 -0
  254. package/dist/types/reviewable-workflow.d.ts +29 -0
  255. package/dist/types/reviewable-workflow.js +1 -0
  256. package/dist/types/schema-compilation.d.ts +5 -0
  257. package/dist/types/schema-compilation.js +1 -0
  258. package/dist/types/serialized-http-request.d.ts +4 -0
  259. package/dist/types/serialized-http-request.js +1 -0
  260. package/dist/types/workflow-compilation.d.ts +39 -0
  261. package/dist/types/workflow-compilation.js +1 -0
  262. package/dist/types/workflow-template.d.ts +121 -0
  263. package/dist/types/workflow-template.js +1 -0
  264. package/dist/utils/bundled-license-banner.d.ts +3 -0
  265. package/dist/utils/bundled-license-banner.js +32 -0
  266. package/dist/utils/javascript-json-literal.d.ts +2 -0
  267. package/dist/utils/javascript-json-literal.js +10 -0
  268. package/dist/utils/json-values-equal.cjs +24 -0
  269. package/dist/utils/json-values-equal.d.cts +1 -0
  270. package/dist/workflow/assemble-n8n-workflow.d.ts +2 -0
  271. package/dist/workflow/assemble-n8n-workflow.js +11 -0
  272. package/dist/workflow/batch/compile-batched-n8n-workflow.d.ts +3 -0
  273. package/dist/workflow/batch/compile-batched-n8n-workflow.js +36 -0
  274. package/dist/workflow/batch/create-batch-execution-scopes.d.ts +3 -0
  275. package/dist/workflow/batch/create-batch-execution-scopes.js +59 -0
  276. package/dist/workflow/batch/validate-batch-exclusive-rejoin.d.ts +3 -0
  277. package/dist/workflow/batch/validate-batch-exclusive-rejoin.js +49 -0
  278. package/dist/workflow/batch/validate-batch-item-flow.d.ts +3 -0
  279. package/dist/workflow/batch/validate-batch-item-flow.js +98 -0
  280. package/dist/workflow/build-n8n-workflow.d.ts +2 -0
  281. package/dist/workflow/build-n8n-workflow.js +140 -0
  282. package/dist/workflow/compile-native-material-fragments.d.ts +3 -0
  283. package/dist/workflow/compile-native-material-fragments.js +76 -0
  284. package/dist/workflow/compile-native-workflow-nodes.d.ts +3 -0
  285. package/dist/workflow/compile-native-workflow-nodes.js +25 -0
  286. package/dist/workflow/compile-planned-n8n-workflow.d.ts +3 -0
  287. package/dist/workflow/compile-planned-n8n-workflow.js +42 -0
  288. package/dist/workflow/compile-reviewable-n8n-workflow.d.ts +3 -0
  289. package/dist/workflow/compile-reviewable-n8n-workflow.js +92 -0
  290. package/dist/workflow/compile-validated-workflow-fragments.d.ts +3 -0
  291. package/dist/workflow/compile-validated-workflow-fragments.js +20 -0
  292. package/dist/workflow/compile-workflow-material-fragments.d.ts +4 -0
  293. package/dist/workflow/compile-workflow-material-fragments.js +18 -0
  294. package/dist/workflow/create-n8n-native-output-sources.d.ts +3 -0
  295. package/dist/workflow/create-n8n-native-output-sources.js +58 -0
  296. package/dist/workflow/entrypoint/manual-trigger.d.ts +4 -0
  297. package/dist/workflow/entrypoint/manual-trigger.js +16 -0
  298. package/dist/workflow/find-singleton-api-responses.d.ts +3 -0
  299. package/dist/workflow/find-singleton-api-responses.js +22 -0
  300. package/dist/workflow/inputs/compile-native-runtime-inputs.d.ts +5 -0
  301. package/dist/workflow/inputs/compile-native-runtime-inputs.js +129 -0
  302. package/dist/workflow/inputs/create-runtime-input-native-capabilities.d.ts +4 -0
  303. package/dist/workflow/inputs/create-runtime-input-native-capabilities.js +36 -0
  304. package/dist/workflow/resolve-n8n-native-materials.d.ts +2 -0
  305. package/dist/workflow/resolve-n8n-native-materials.js +16 -0
  306. package/dist/workflow/review/create-gap-review-content.d.ts +2 -0
  307. package/dist/workflow/review/create-gap-review-content.js +28 -0
  308. package/dist/workflow/review/create-gap-review-region.d.ts +2 -0
  309. package/dist/workflow/review/create-gap-review-region.js +23 -0
  310. package/dist/workflow/review/escape-review-markdown.d.ts +1 -0
  311. package/dist/workflow/review/escape-review-markdown.js +7 -0
  312. package/dist/workflow/review/gap-review-region-layout.d.ts +4 -0
  313. package/dist/workflow/review/gap-review-region-layout.js +21 -0
  314. package/dist/workflow/templates/compile-n8n-workflow-template.d.ts +3 -0
  315. package/dist/workflow/templates/compile-n8n-workflow-template.js +211 -0
  316. package/dist/workflow/templates/create-template-artifact-mapping.d.ts +2 -0
  317. package/dist/workflow/templates/create-template-artifact-mapping.js +58 -0
  318. package/dist/workflow/templates/create-template-gap-regions.d.ts +5 -0
  319. package/dist/workflow/templates/create-template-gap-regions.js +22 -0
  320. package/dist/workflow/templates/create-workflow-template-guide.d.ts +3 -0
  321. package/dist/workflow/templates/create-workflow-template-guide.js +44 -0
  322. package/dist/workflow/templates/prepare-template-api-fragments.d.ts +3 -0
  323. package/dist/workflow/templates/prepare-template-api-fragments.js +74 -0
  324. package/dist/workflow/templates/select-n8n-template-deployments.d.ts +3 -0
  325. package/dist/workflow/templates/select-n8n-template-deployments.js +12 -0
  326. package/dist/workflow/templates/workflow-template-identities.d.ts +5 -0
  327. package/dist/workflow/templates/workflow-template-identities.js +5 -0
  328. package/dist/workflow/validate-compiled-binding-sources.d.ts +4 -0
  329. package/dist/workflow/validate-compiled-binding-sources.js +40 -0
  330. package/dist/workflow/validate-node-fragments.d.ts +3 -0
  331. package/dist/workflow/validate-node-fragments.js +58 -0
  332. package/package.json +59 -4
@@ -0,0 +1,42 @@
1
+ import { assembleN8nWorkflow } from './assemble-n8n-workflow.js';
2
+ import { compileValidatedWorkflowFragments } from './compile-validated-workflow-fragments.js';
3
+ import { prepareNativeRuntimeInputs, assembleNativeRuntimeInputs, } from './inputs/compile-native-runtime-inputs.js';
4
+ export function compilePlannedN8nWorkflow(input) {
5
+ const nativeInputs = prepareNativeRuntimeInputs({
6
+ nativeInputs: input.nativeInputs,
7
+ nativeNodes: input.plan.nativeNodes,
8
+ capabilities: input.capabilities,
9
+ apiMaterials: input.materials.map((item) => ({
10
+ callId: item.arguments.callId,
11
+ operation: item.operation,
12
+ requestMediaType: item.arguments.requestMediaType,
13
+ })),
14
+ nativeOutputs: [],
15
+ });
16
+ const nodes = compileValidatedWorkflowFragments(nativeInputs === undefined
17
+ ? input
18
+ : { ...input, capabilities: nativeInputs.capabilities });
19
+ const graph = {
20
+ id: input.id,
21
+ name: input.name,
22
+ nodes,
23
+ edges: input.plan.edges,
24
+ starts: input.plan.starts,
25
+ };
26
+ const result = nativeInputs === undefined
27
+ ? assembleN8nWorkflow(graph)
28
+ : {
29
+ status: 'complete',
30
+ ...assembleNativeRuntimeInputs({
31
+ ...graph,
32
+ nativeInputs,
33
+ triggerConnections: 'connected',
34
+ annotations: [],
35
+ }),
36
+ };
37
+ result.workflow.settings = {
38
+ ...result.workflow.settings,
39
+ executionOrder: 'v1',
40
+ };
41
+ return result;
42
+ }
@@ -0,0 +1,3 @@
1
+ import type { CompileReviewableN8nWorkflowInput } from '../types/reviewable-workflow.js';
2
+ import type { N8nWorkflowResult } from '../types/workflow-compilation.js';
3
+ export declare function compileReviewableN8nWorkflow(input: CompileReviewableN8nWorkflowInput): N8nWorkflowResult;
@@ -0,0 +1,92 @@
1
+ import { validateReviewableWorkflowGraphPlan, createNativeOutputContracts, } from '@openapi-flow/core';
2
+ import { createGapReviewRegion } from './review/create-gap-review-region.js';
3
+ import { GAP_REVIEW_REGION_WIDTH, GAP_REVIEW_REGION_SPACING, } from './review/gap-review-region-layout.js';
4
+ import { compilePlannedN8nWorkflow } from './compile-planned-n8n-workflow.js';
5
+ import { compileNativeWorkflowNodes } from './compile-native-workflow-nodes.js';
6
+ import { buildN8nWorkflow } from './build-n8n-workflow.js';
7
+ import { validateCompiledBindingSources } from './validate-compiled-binding-sources.js';
8
+ import { prepareNativeRuntimeInputs, assembleNativeRuntimeInputs, } from './inputs/compile-native-runtime-inputs.js';
9
+ export function compileReviewableN8nWorkflow(input) {
10
+ validateReviewableWorkflowGraphPlan(input);
11
+ const blocked = new Set(input.plan.blockedCalls.map((item) => item.callId));
12
+ const ready = input.materials.filter((item) => item.status === 'ready' && !blocked.has(item.arguments.callId));
13
+ const expected = ready.map((item) => item.arguments.callId).sort();
14
+ const actual = input.apiNodes.map((item) => item.nodeId).sort();
15
+ if (JSON.stringify(expected) !== JSON.stringify(actual))
16
+ throw new Error('review apiNodes must exactly match unblocked ready calls');
17
+ if (!input.plan.gaps.length)
18
+ return compilePlannedN8nWorkflow({ ...input, materials: ready });
19
+ const nativeInputs = prepareNativeRuntimeInputs({
20
+ nativeInputs: input.nativeInputs,
21
+ nativeNodes: input.plan.nativeNodes,
22
+ capabilities: input.capabilities,
23
+ apiMaterials: ready.map((item) => ({
24
+ callId: item.arguments.callId,
25
+ operation: item.operation,
26
+ requestMediaType: item.arguments.requestMediaType,
27
+ })),
28
+ nativeOutputs: [],
29
+ });
30
+ const nativeNodes = compileNativeWorkflowNodes({
31
+ ...input,
32
+ materials: ready,
33
+ capabilities: nativeInputs === undefined
34
+ ? input.capabilities
35
+ : nativeInputs.capabilities,
36
+ });
37
+ validateCompiledBindingSources(input.apiNodes, nativeNodes, createNativeOutputContracts({
38
+ nativeNodes: input.plan.nativeNodes,
39
+ capabilities: input.capabilities,
40
+ }), ready);
41
+ const occupiedPositions = [...input.apiNodes, ...nativeNodes].flatMap((fragment) => fragment.nodes.flatMap((node) => node.config.position === undefined ? [] : [node.config.position]));
42
+ const regionTop = Math.max(0, ...occupiedPositions.map((point) => point[1])) + 240;
43
+ const regionStep = GAP_REVIEW_REGION_WIDTH + GAP_REVIEW_REGION_SPACING;
44
+ const placeholders = input.plan.gaps.map((gap, index) => ({
45
+ nodeId: gap.id,
46
+ gaps: [gap],
47
+ position: [600 + index * regionStep, regionTop],
48
+ }));
49
+ for (const [index, item] of input.plan.blockedCalls.entries()) {
50
+ const material = input.materials.find((material) => (material.status === 'ready'
51
+ ? material.arguments.callId
52
+ : material.callId) === item.callId);
53
+ if (!material)
54
+ throw new Error('review placeholder material is missing');
55
+ placeholders.push({
56
+ nodeId: item.callId,
57
+ gaps: input.plan.gaps.filter((gap) => item.gapIds.includes(gap.id)),
58
+ operation: material.operation,
59
+ position: [
60
+ 600 + (input.plan.gaps.length + index) * regionStep,
61
+ regionTop,
62
+ ],
63
+ });
64
+ }
65
+ const regions = placeholders.map(createGapReviewRegion);
66
+ const graph = {
67
+ id: input.id,
68
+ name: input.name,
69
+ nodes: [
70
+ ...input.apiNodes,
71
+ ...nativeNodes,
72
+ ...regions.map((region) => region.fragment),
73
+ ],
74
+ edges: input.plan.edges,
75
+ starts: input.plan.starts,
76
+ triggerConnections: 'detached',
77
+ annotations: regions.map((region) => region.annotation),
78
+ };
79
+ const compiled = nativeInputs === undefined
80
+ ? undefined
81
+ : assembleNativeRuntimeInputs({ ...graph, nativeInputs });
82
+ const result = compiled === undefined ? buildN8nWorkflow(graph) : compiled.workflow;
83
+ result.settings = { ...result.settings, executionOrder: 'v1' };
84
+ return {
85
+ status: 'needs-review',
86
+ workflow: result,
87
+ diagnostics: input.plan.gaps,
88
+ ...(compiled === undefined
89
+ ? {}
90
+ : { nativeInputTemplate: compiled.nativeInputTemplate }),
91
+ };
92
+ }
@@ -0,0 +1,3 @@
1
+ import type { CompilePlannedN8nWorkflowInput } from '../types/native-capability.js';
2
+ import type { N8nNodeFragment } from '../types/node-fragment.js';
3
+ export declare function compileValidatedWorkflowFragments(input: CompilePlannedN8nWorkflowInput): N8nNodeFragment[];
@@ -0,0 +1,20 @@
1
+ import { validateWorkflowGraphPlan } from '@openapi-flow/core';
2
+ import { compileWorkflowMaterialFragments } from './compile-workflow-material-fragments.js';
3
+ import { resolveN8nNativeMaterials } from './resolve-n8n-native-materials.js';
4
+ export function compileValidatedWorkflowFragments(input) {
5
+ if (input.plan.gaps.length)
6
+ throw new Error(`Workflow needs review: ${JSON.stringify(input.plan.gaps)}`);
7
+ const materialSnapshot = resolveN8nNativeMaterials({
8
+ apiMaterials: input.materials.map((material) => ({
9
+ callId: material.arguments.callId,
10
+ operation: material.operation,
11
+ requestMediaType: material.arguments.requestMediaType,
12
+ })),
13
+ nativeOutputs: [],
14
+ nativeNodes: input.plan.nativeNodes,
15
+ capabilities: input.capabilities,
16
+ });
17
+ const current = { ...input, capabilities: materialSnapshot.capabilities };
18
+ validateWorkflowGraphPlan(current);
19
+ return compileWorkflowMaterialFragments(current);
20
+ }
@@ -0,0 +1,4 @@
1
+ import type { CompileNativeWorkflowNodesInput } from '../types/native-capability.js';
2
+ import type { N8nNodeFragment } from '../types/node-fragment.js';
3
+ /** Shared SDK material lowering. The owning strict/draft boundary validates the whole topology first. */
4
+ export declare function compileWorkflowMaterialFragments(input: CompileNativeWorkflowNodesInput): N8nNodeFragment[];
@@ -0,0 +1,18 @@
1
+ import { createNativeOutputContracts } from '@openapi-flow/core';
2
+ import { compileNativeWorkflowNodes } from './compile-native-workflow-nodes.js';
3
+ import { validateCompiledBindingSources } from './validate-compiled-binding-sources.js';
4
+ /** Shared SDK material lowering. The owning strict/draft boundary validates the whole topology first. */
5
+ export function compileWorkflowMaterialFragments(input) {
6
+ const expected = input.materials
7
+ .map((material) => material.arguments.callId)
8
+ .sort();
9
+ const actual = input.apiNodes.map((fragment) => fragment.nodeId).sort();
10
+ if (JSON.stringify(expected) !== JSON.stringify(actual))
11
+ throw new Error('apiNodes must match material callIds exactly');
12
+ const nativeNodes = compileNativeWorkflowNodes(input);
13
+ validateCompiledBindingSources(input.apiNodes, nativeNodes, createNativeOutputContracts({
14
+ nativeNodes: input.plan.nativeNodes,
15
+ capabilities: input.capabilities,
16
+ }), input.materials);
17
+ return [...input.apiNodes, ...nativeNodes];
18
+ }
@@ -0,0 +1,3 @@
1
+ import type { CreateN8nNativeOutputSourcesInput, N8nNativeOutputSource } from '../types/output-binding-source.js';
2
+ /** Resolve runtime names from the actual SDK producer, not an ID/name guess. */
3
+ export declare function createN8nNativeOutputSources(input: CreateN8nNativeOutputSourcesInput): N8nNativeOutputSource[];
@@ -0,0 +1,58 @@
1
+ import { inspectNativeReferenceStructure, resolveNativeStructureParameters, } from '@openapi-flow/core';
2
+ import { resolveN8nNativeMaterials } from './resolve-n8n-native-materials.js';
3
+ import { compileNativeMaterialFragments } from './compile-native-material-fragments.js';
4
+ import { prepareNativeRuntimeInputs } from './inputs/compile-native-runtime-inputs.js';
5
+ /** Resolve runtime names from the actual SDK producer, not an ID/name guess. */
6
+ export function createN8nNativeOutputSources(input) {
7
+ const references = input.nativeNodes.flatMap((node) => {
8
+ const capability = input.capabilities.find((capability) => capability.name === node.capability);
9
+ if (!capability)
10
+ throw new Error('Missing native compiler ' + node.capability);
11
+ if (capability.referenceStructureSchema)
12
+ return inspectNativeReferenceStructure({ node, capability }).map((binding) => binding.reference);
13
+ const parameters = resolveNativeStructureParameters(node, capability);
14
+ return [
15
+ ...capability.responseReferences(parameters),
16
+ ...Object.values(capability.inputReferences
17
+ ? capability.inputReferences(parameters)
18
+ : {}).flat(),
19
+ ];
20
+ });
21
+ for (const reference of references)
22
+ if (reference.source === 'response' &&
23
+ (!input.apiResponseContracts ||
24
+ !Object.hasOwn(input.apiResponseContracts, reference.nodeId)))
25
+ throw new Error('createN8nNativeOutputSources.apiResponseContracts is missing ' +
26
+ reference.nodeId);
27
+ const apiMaterials = input.apiResponseContracts === undefined
28
+ ? []
29
+ : Object.entries(input.apiResponseContracts).map(([callId, operation]) => ({ callId, operation }));
30
+ const externalNativeOutputSources = input.externalNativeOutputSources === undefined
31
+ ? []
32
+ : input.externalNativeOutputSources;
33
+ const nativeInputs = input.nativeInputs === undefined
34
+ ? undefined
35
+ : prepareNativeRuntimeInputs({
36
+ nativeInputs: input.nativeInputs,
37
+ nativeNodes: input.nativeNodes,
38
+ capabilities: input.capabilities,
39
+ apiMaterials,
40
+ nativeOutputs: externalNativeOutputSources,
41
+ });
42
+ const materials = resolveN8nNativeMaterials({
43
+ apiMaterials,
44
+ nativeOutputs: externalNativeOutputSources,
45
+ nativeNodes: input.nativeNodes,
46
+ capabilities: nativeInputs === undefined
47
+ ? input.capabilities
48
+ : nativeInputs.capabilities,
49
+ });
50
+ return compileNativeMaterialFragments({
51
+ nativeNodes: input.nativeNodes,
52
+ materials,
53
+ apiMaterials,
54
+ apiNodeNames: input.apiNodeNames,
55
+ externalNativeOutputSources,
56
+ nodeIds: materials.outputs.map((output) => output.nodeId),
57
+ }).outputSources;
58
+ }
@@ -0,0 +1,4 @@
1
+ import type { WorkflowEntryPointContract } from '@openapi-flow/core';
2
+ /** The same compiler-owned start is described to planning and built by the SDK. */
3
+ export declare function describeN8nManualTrigger(): WorkflowEntryPointContract;
4
+ export declare function createN8nManualTrigger(): import("@n8n/workflow-sdk").TriggerInstance<string, `${number}`, unknown>;
@@ -0,0 +1,16 @@
1
+ import { trigger } from '@n8n/workflow-sdk';
2
+ const nodeType = 'n8n-nodes-base.manualTrigger';
3
+ /** The same compiler-owned start is described to planning and built by the SDK. */
4
+ export function describeN8nManualTrigger() {
5
+ return {
6
+ kind: nodeType,
7
+ description: 'The n8n compiler supplies one Manual Trigger start. Users run the workflow manually; this entrypoint is not a selectable native capability and requires no extra planned trigger instance.',
8
+ };
9
+ }
10
+ export function createN8nManualTrigger() {
11
+ return trigger({
12
+ type: nodeType,
13
+ version: 1,
14
+ config: { id: 'openapi-flow-start', name: 'Start', position: [0, 0] },
15
+ });
16
+ }
@@ -0,0 +1,3 @@
1
+ import type { CompileNativeWorkflowNodesInput } from '../types/native-capability.js';
2
+ /** Prove at-most-one output from the single Manual Trigger item; unknown native streams are not singleton evidence. */
3
+ export declare function findSingletonApiResponses(input: CompileNativeWorkflowNodesInput): string[];
@@ -0,0 +1,22 @@
1
+ /** Prove at-most-one output from the single Manual Trigger item; unknown native streams are not singleton evidence. */
2
+ export function findSingletonApiResponses(input) {
3
+ const proven = new Set();
4
+ const pending = input.apiNodes.filter((fragment) => fragment.preservesInputItems === true);
5
+ let changed = true;
6
+ while (pending.length && changed) {
7
+ changed = false;
8
+ for (let index = 0; index < pending.length;) {
9
+ const node = pending[index];
10
+ const incoming = input.plan.edges.filter((edge) => edge.to === node.nodeId);
11
+ const isRoot = incoming.length === 0 && input.plan.starts.includes(node.nodeId);
12
+ if (isRoot || (incoming.length === 1 && proven.has(incoming[0].from))) {
13
+ proven.add(node.nodeId);
14
+ pending.splice(index, 1);
15
+ changed = true;
16
+ }
17
+ else
18
+ index++;
19
+ }
20
+ }
21
+ return [...proven];
22
+ }
@@ -0,0 +1,5 @@
1
+ import type { PrepareNativeRuntimeInputsInput, PreparedNativeRuntimeInputs, AssembleNativeRuntimeInputsInput, N8nNativeInputCompilationResult } from '../../types/native-runtime-parameters.js';
2
+ /** One explicit execution-input protocol, shared by strict and review compilation. */
3
+ export declare function prepareNativeRuntimeInputs(input: PrepareNativeRuntimeInputsInput): PreparedNativeRuntimeInputs | undefined;
4
+ /** Preserve every original DAG edge; only explicit system roots precede the graph. */
5
+ export declare function assembleNativeRuntimeInputs(input: AssembleNativeRuntimeInputsInput): N8nNativeInputCompilationResult;
@@ -0,0 +1,129 @@
1
+ import { sticky } from '@n8n/workflow-sdk';
2
+ import { inspectNativeRuntimeInputs, createNativeRuntimeParameterMaterializations, } from '@openapi-flow/core';
3
+ import { n8nNativeInputConfigurationSchema } from '../../schemas/native-runtime-input-schema.js';
4
+ import { resolveN8nNativeMaterials } from '../resolve-n8n-native-materials.js';
5
+ import { createRuntimeInputNativeCapabilities } from './create-runtime-input-native-capabilities.js';
6
+ import { createTemplateInputNodes } from '../../nodes/inputs/create-template-input-nodes.js';
7
+ import { buildN8nWorkflow } from '../build-n8n-workflow.js';
8
+ import { TEMPLATE_INPUT_ID, TEMPLATE_INPUT_NAME, TEMPLATE_PREFLIGHT_ID, TEMPLATE_PREFLIGHT_NAME, TEMPLATE_GUIDE_ID, } from '../templates/workflow-template-identities.js';
9
+ /** One explicit execution-input protocol, shared by strict and review compilation. */
10
+ export function prepareNativeRuntimeInputs(input) {
11
+ if (input.nativeInputs === undefined) {
12
+ if (input.nativeNodes.some((node) => node.runtimeParameters !== undefined))
13
+ throw new Error('nativeInputs.revision is required when the plan declares native runtime parameters');
14
+ return undefined;
15
+ }
16
+ const configuration = n8nNativeInputConfigurationSchema.parse(input.nativeInputs);
17
+ const snapshot = resolveN8nNativeMaterials({
18
+ apiMaterials: input.apiMaterials,
19
+ nativeOutputs: input.nativeOutputs,
20
+ nativeNodes: input.nativeNodes,
21
+ capabilities: input.capabilities,
22
+ });
23
+ const inputValues = configuration.inputValues === undefined ? {} : configuration.inputValues;
24
+ const inspection = inspectNativeRuntimeInputs({
25
+ nativeNodes: input.nativeNodes,
26
+ capabilities: snapshot.capabilities,
27
+ inputValues,
28
+ });
29
+ if (inspection.status === 'invalid-input')
30
+ throw new Error(`nativeInputs.inputValues: ${inspection.issues.map((issue) => issue.message).join('; ')}`);
31
+ if (!inspection.slots.length)
32
+ return undefined;
33
+ return {
34
+ revision: configuration.revision,
35
+ inputValues: structuredClone(inputValues),
36
+ inputsReady: inspection.status === 'ready',
37
+ slots: inspection.slots,
38
+ nativeParameters: createNativeRuntimeParameterMaterializations({
39
+ nativeNodes: input.nativeNodes,
40
+ capabilities: snapshot.capabilities,
41
+ }),
42
+ capabilities: createRuntimeInputNativeCapabilities({
43
+ capabilities: snapshot.capabilities,
44
+ slots: inspection.slots,
45
+ revision: configuration.revision,
46
+ inputNodeName: TEMPLATE_PREFLIGHT_NAME,
47
+ }),
48
+ };
49
+ }
50
+ /** Preserve every original DAG edge; only explicit system roots precede the graph. */
51
+ export function assembleNativeRuntimeInputs(input) {
52
+ const prepared = input.nativeInputs;
53
+ const inputSlots = prepared.slots.map((slot) => {
54
+ const fragment = input.nodes.find((node) => node.nodeId === slot.nodeId);
55
+ if (!fragment)
56
+ throw new Error(`Native input ${slot.id} has no compiled node ${slot.nodeId}`);
57
+ return {
58
+ ...slot,
59
+ editNodeId: TEMPLATE_INPUT_ID,
60
+ editNodeName: TEMPLATE_INPUT_NAME,
61
+ editParameter: 'jsCode',
62
+ materializerNodeName: fragment.entry.name,
63
+ };
64
+ });
65
+ const guide = [
66
+ '# Native 실행 입력 안내',
67
+ `입력 버전: ${prepared.revision}`,
68
+ '입력 설정 노드의 inputValues 객체에 아래 슬롯 ID와 실제 JSON 값을 넣으세요. 미입력 값에 임시 값을 넣지 마세요. 인증 비밀값은 n8n credential에 설정하세요.',
69
+ `입력 준비: ${prepared.inputsReady ? '완료' : '미입력 값 있음'}`,
70
+ ...(input.triggerConnections === 'detached'
71
+ ? [
72
+ '결손이 있어 Start 연결을 끊었습니다. 경고 영역을 해결한 뒤 연결을 검토하세요.',
73
+ ]
74
+ : []),
75
+ ...inputSlots.map((slot) => `\n## ${slot.nodeId}${slot.targetPointer}\n슬롯 ID: ${slot.id}\n입력 위치: ${slot.editNodeName}\n실행 직전 검사: ${slot.materializerNodeName}\n원래 형식:\n\`\`\`json\n${JSON.stringify(slot.schema, null, 2)}\n\`\`\``),
76
+ '입력 사전 검사는 모든 초기 native 값을 외부 호출 전에 확인합니다. 각 native 노드는 실행 직전에도 원래 전체 스키마와 버전을 검사합니다. 부분 실행이나 pinning은 검사를 우회할 수 있으므로 보안 경계로 사용하지 마세요.',
77
+ ].join('\n\n');
78
+ const system = createTemplateInputNodes({
79
+ revision: prepared.revision,
80
+ slots: prepared.slots,
81
+ inputValues: prepared.inputValues,
82
+ requests: [],
83
+ nativeParameters: prepared.nativeParameters,
84
+ });
85
+ const height = 160 +
86
+ guide
87
+ .split('\n')
88
+ .reduce((total, line) => total + Math.max(1, Math.ceil(line.length / 90)) * 24, 0);
89
+ const workflow = buildN8nWorkflow({
90
+ ...input,
91
+ nodes: [...system, ...input.nodes],
92
+ edges: [
93
+ {
94
+ from: TEMPLATE_INPUT_ID,
95
+ output: 'main',
96
+ to: TEMPLATE_PREFLIGHT_ID,
97
+ input: 'main',
98
+ },
99
+ ...input.starts.map((to) => ({
100
+ from: TEMPLATE_PREFLIGHT_ID,
101
+ output: 'main',
102
+ to,
103
+ input: 'main',
104
+ })),
105
+ ...input.edges,
106
+ ],
107
+ starts: [TEMPLATE_INPUT_ID],
108
+ annotations: [
109
+ ...input.annotations,
110
+ sticky(guide, [], {
111
+ id: TEMPLATE_GUIDE_ID,
112
+ name: 'Native 실행 입력 안내',
113
+ position: [0, -height - 100],
114
+ width: 1000,
115
+ height,
116
+ color: prepared.inputsReady ? 5 : 3,
117
+ }),
118
+ ],
119
+ });
120
+ return {
121
+ workflow,
122
+ nativeInputTemplate: {
123
+ revision: prepared.revision,
124
+ inputsReady: prepared.inputsReady,
125
+ inputSlots,
126
+ guide,
127
+ },
128
+ };
129
+ }
@@ -0,0 +1,4 @@
1
+ import type { CreateRuntimeInputNativeCapabilitiesInput } from '../../types/native-runtime-parameters.js';
2
+ import type { N8nNativeCapability } from '../../types/native-capability.js';
3
+ /** Runtime ownership remains explicit; the original schema and metadata are never replaced. */
4
+ export declare function createRuntimeInputNativeCapabilities(input: CreateRuntimeInputNativeCapabilitiesInput): N8nNativeCapability[];
@@ -0,0 +1,36 @@
1
+ import { createNativeRuntimeParameterMaterializations, captureNativePlanningCapability, } from '@openapi-flow/core';
2
+ /** Runtime ownership remains explicit; the original schema and metadata are never replaced. */
3
+ export function createRuntimeInputNativeCapabilities(input) {
4
+ function wrap(capability) {
5
+ if (capability.supportsRuntimeParameters !== true)
6
+ return capability;
7
+ const bind = capability.bindMaterialContracts;
8
+ return {
9
+ ...capability,
10
+ ...captureNativePlanningCapability(capability),
11
+ bindMaterialContracts: bind === undefined
12
+ ? undefined
13
+ : (sources) => wrap(bind.call(capability, sources)),
14
+ compile(source) {
15
+ if (source.planned.runtimeParameters === undefined)
16
+ return capability.compile(source);
17
+ const [materialization] = createNativeRuntimeParameterMaterializations({
18
+ nativeNodes: [source.planned],
19
+ capabilities: [capability],
20
+ });
21
+ if (!materialization ||
22
+ materialization.inputs.some((source) => !input.slots.some((slot) => slot.id === source.id)))
23
+ throw new Error(`node ${source.planned.id}: template has no declared native runtime input slot`);
24
+ return capability.compile({
25
+ ...source,
26
+ runtimeInput: {
27
+ materialization,
28
+ revision: input.revision,
29
+ inputNodeName: input.inputNodeName,
30
+ },
31
+ });
32
+ },
33
+ };
34
+ }
35
+ return input.capabilities.map(wrap);
36
+ }
@@ -0,0 +1,2 @@
1
+ import type { ResolveN8nNativeMaterialsInput, ResolvedN8nNativeMaterials } from '../types/native-material-binding.js';
2
+ export declare function resolveN8nNativeMaterials(input: ResolveN8nNativeMaterialsInput): ResolvedN8nNativeMaterials;
@@ -0,0 +1,16 @@
1
+ import { resolveNativeMaterialSnapshot, NativeMaterialResolutionError, } from '@openapi-flow/core';
2
+ export function resolveN8nNativeMaterials(input) {
3
+ const snapshot = resolveNativeMaterialSnapshot({
4
+ ...input,
5
+ deferredNodeIds: [],
6
+ });
7
+ if (snapshot.status !== 'ready')
8
+ throw new NativeMaterialResolutionError(snapshot.pending);
9
+ for (const capability of snapshot.capabilities)
10
+ if (!('compile' in capability) || typeof capability.compile !== 'function')
11
+ throw new Error(`Native material binding ${capability.name} did not retain its n8n compiler`);
12
+ return {
13
+ capabilities: snapshot.capabilities,
14
+ outputs: snapshot.outputs,
15
+ };
16
+ }
@@ -0,0 +1,2 @@
1
+ import type { CreateGapNodeInput } from '../../types/reviewable-workflow.js';
2
+ export declare function createGapReviewContent(input: CreateGapNodeInput): string[];
@@ -0,0 +1,28 @@
1
+ import { escapeReviewMarkdown } from './escape-review-markdown.js';
2
+ const stageLabels = {
3
+ 'api-selection': 'API 선택',
4
+ 'api-bindings': '요청값 연결',
5
+ 'workflow-graph': '워크플로 구성',
6
+ };
7
+ export function createGapReviewContent(input) {
8
+ const content = [
9
+ '# 확인 필요',
10
+ '미해결 단계: ' + escapeReviewMarkdown(input.nodeId),
11
+ ...input.gaps.map((gap) => escapeReviewMarkdown(`${stageLabels[gap.stage]} — ${gap.description}`)),
12
+ '아래 노드는 미해결 작업의 위치를 표시하는 대역입니다. 실제 API를 호출하거나 응답을 만들지 않습니다.',
13
+ '실수로 실행하지 않도록 Start의 연결을 끊어 두었습니다. 이 대역을 직접 실행하거나 다시 연결하면 오류로 중단됩니다.',
14
+ '필요한 API·입력값·연결을 확인한 뒤 대역을 실제 구현으로 교체하고 검증하세요. 교체 전에는 Start를 연결하지 마세요.',
15
+ ];
16
+ for (const gap of input.gaps)
17
+ if (gap.callId !== undefined && gap.targetPointer !== undefined)
18
+ content.push('확인할 요청값: ' +
19
+ escapeReviewMarkdown(gap.callId + gap.targetPointer));
20
+ if (input.operation)
21
+ content.push('대상 OAS 작업: ' +
22
+ escapeReviewMarkdown(input.operation.key.documentId +
23
+ ' ' +
24
+ input.operation.method +
25
+ ' ' +
26
+ input.operation.path));
27
+ return content;
28
+ }
@@ -0,0 +1,2 @@
1
+ import type { CreateGapNodeInput, GapReviewRegion } from '../../types/reviewable-workflow.js';
2
+ export declare function createGapReviewRegion(input: CreateGapNodeInput): GapReviewRegion;
@@ -0,0 +1,23 @@
1
+ import { sticky } from '@n8n/workflow-sdk';
2
+ import { createGapNode } from '../../nodes/gap/create-gap-node.js';
3
+ import { createGapReviewContent } from './create-gap-review-content.js';
4
+ import { gapReviewRegionLayout } from './gap-review-region-layout.js';
5
+ export function createGapReviewRegion(input) {
6
+ const content = createGapReviewContent(input);
7
+ const layout = gapReviewRegionLayout(input.position, content);
8
+ const fragment = createGapNode({
9
+ ...input,
10
+ position: layout.nodePosition,
11
+ });
12
+ return {
13
+ fragment,
14
+ annotation: sticky(content.join('\n\n'), fragment.nodes, {
15
+ id: 'openapi-flow-gap-note-' + input.nodeId,
16
+ name: '확인 안내 · ' + input.nodeId,
17
+ position: layout.notePosition,
18
+ color: 3,
19
+ width: layout.width,
20
+ height: layout.height,
21
+ }),
22
+ };
23
+ }
@@ -0,0 +1 @@
1
+ export declare function escapeReviewMarkdown(value: string): string;
@@ -0,0 +1,7 @@
1
+ export function escapeReviewMarkdown(value) {
2
+ return value
3
+ .replace(/&/g, '&amp;')
4
+ .replace(/</g, '&lt;')
5
+ .replace(/>/g, '&gt;')
6
+ .replace(/([\\`*_{}[\]()#+.!|~-])/g, '\\$1');
7
+ }
@@ -0,0 +1,4 @@
1
+ import type { GapReviewRegionLayout } from '../../types/reviewable-workflow.js';
2
+ export declare const GAP_REVIEW_REGION_WIDTH = 560;
3
+ export declare const GAP_REVIEW_REGION_SPACING = 64;
4
+ export declare function gapReviewRegionLayout(origin: [number, number], content: string[]): GapReviewRegionLayout;
@@ -0,0 +1,21 @@
1
+ export const GAP_REVIEW_REGION_WIDTH = 560;
2
+ export const GAP_REVIEW_REGION_SPACING = 64;
3
+ // Reserve the upper area for wrapped Markdown, then place the node below it.
4
+ // These are canvas spacing metrics, not limits on diagnostic text or OAS data.
5
+ export function gapReviewRegionLayout(origin, content) {
6
+ const textHeight = 96 +
7
+ content
8
+ .slice(1)
9
+ .reduce((height, paragraph) => height +
10
+ paragraph
11
+ .split('\n')
12
+ .reduce((lines, line) => lines + Math.max(1, Math.ceil(Array.from(line).length / 34)), 0) *
13
+ 28 +
14
+ 16, 0);
15
+ return {
16
+ notePosition: origin,
17
+ nodePosition: [origin[0] + 232, origin[1] + textHeight + 32],
18
+ width: GAP_REVIEW_REGION_WIDTH,
19
+ height: textHeight + 272,
20
+ };
21
+ }
@@ -0,0 +1,3 @@
1
+ import type { CompileN8nWorkflowTemplateInput, N8nWorkflowTemplateResult } from '../../types/workflow-template.js';
2
+ /** An explicit template boundary, never a false fully-resolved strict request. */
3
+ export declare function compileN8nWorkflowTemplate(source: CompileN8nWorkflowTemplateInput): N8nWorkflowTemplateResult;