@invect/core 0.0.1
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.
- package/LICENSE +21 -0
- package/README.md +103 -0
- package/dist/_virtual/_rolldown/runtime.cjs +33 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/actions/action-executor.cjs +166 -0
- package/dist/actions/action-executor.cjs.map +1 -0
- package/dist/actions/action-executor.d.cts +33 -0
- package/dist/actions/action-executor.d.cts.map +1 -0
- package/dist/actions/action-executor.d.ts +33 -0
- package/dist/actions/action-executor.d.ts.map +1 -0
- package/dist/actions/action-executor.js +164 -0
- package/dist/actions/action-executor.js.map +1 -0
- package/dist/actions/action-registry.cjs +236 -0
- package/dist/actions/action-registry.cjs.map +1 -0
- package/dist/actions/action-registry.d.cts +58 -0
- package/dist/actions/action-registry.d.cts.map +1 -0
- package/dist/actions/action-registry.d.ts +58 -0
- package/dist/actions/action-registry.d.ts.map +1 -0
- package/dist/actions/action-registry.js +233 -0
- package/dist/actions/action-registry.js.map +1 -0
- package/dist/actions/core/if-else.cjs +111 -0
- package/dist/actions/core/if-else.cjs.map +1 -0
- package/dist/actions/core/if-else.d.cts +1 -0
- package/dist/actions/core/if-else.d.ts +1 -0
- package/dist/actions/core/if-else.js +98 -0
- package/dist/actions/core/if-else.js.map +1 -0
- package/dist/actions/core/index.cjs +20 -0
- package/dist/actions/core/index.cjs.map +1 -0
- package/dist/actions/core/index.d.cts +7 -0
- package/dist/actions/core/index.d.cts.map +1 -0
- package/dist/actions/core/index.d.ts +7 -0
- package/dist/actions/core/index.d.ts.map +1 -0
- package/dist/actions/core/index.js +20 -0
- package/dist/actions/core/index.js.map +1 -0
- package/dist/actions/core/input.cjs +73 -0
- package/dist/actions/core/input.cjs.map +1 -0
- package/dist/actions/core/input.d.cts +1 -0
- package/dist/actions/core/input.d.ts +1 -0
- package/dist/actions/core/input.js +72 -0
- package/dist/actions/core/input.js.map +1 -0
- package/dist/actions/core/javascript.cjs +77 -0
- package/dist/actions/core/javascript.cjs.map +1 -0
- package/dist/actions/core/javascript.d.cts +1 -0
- package/dist/actions/core/javascript.d.ts +1 -0
- package/dist/actions/core/javascript.js +62 -0
- package/dist/actions/core/javascript.js.map +1 -0
- package/dist/actions/core/model.cjs +285 -0
- package/dist/actions/core/model.cjs.map +1 -0
- package/dist/actions/core/model.d.cts +1 -0
- package/dist/actions/core/model.d.ts +1 -0
- package/dist/actions/core/model.js +276 -0
- package/dist/actions/core/model.js.map +1 -0
- package/dist/actions/core/output.cjs +66 -0
- package/dist/actions/core/output.cjs.map +1 -0
- package/dist/actions/core/output.d.cts +1 -0
- package/dist/actions/core/output.d.ts +1 -0
- package/dist/actions/core/output.js +57 -0
- package/dist/actions/core/output.js.map +1 -0
- package/dist/actions/core/template-string.cjs +85 -0
- package/dist/actions/core/template-string.cjs.map +1 -0
- package/dist/actions/core/template-string.d.cts +1 -0
- package/dist/actions/core/template-string.d.ts +1 -0
- package/dist/actions/core/template-string.js +76 -0
- package/dist/actions/core/template-string.js.map +1 -0
- package/dist/actions/define-action.cjs +14 -0
- package/dist/actions/define-action.cjs.map +1 -0
- package/dist/actions/define-action.d.cts +13 -0
- package/dist/actions/define-action.d.cts.map +1 -0
- package/dist/actions/define-action.d.ts +13 -0
- package/dist/actions/define-action.d.ts.map +1 -0
- package/dist/actions/define-action.js +14 -0
- package/dist/actions/define-action.js.map +1 -0
- package/dist/actions/github/add-issue-comment.cjs +152 -0
- package/dist/actions/github/add-issue-comment.cjs.map +1 -0
- package/dist/actions/github/add-issue-comment.d.cts +1 -0
- package/dist/actions/github/add-issue-comment.d.ts +1 -0
- package/dist/actions/github/add-issue-comment.js +150 -0
- package/dist/actions/github/add-issue-comment.js.map +1 -0
- package/dist/actions/github/create-branch.cjs +201 -0
- package/dist/actions/github/create-branch.cjs.map +1 -0
- package/dist/actions/github/create-branch.d.cts +1 -0
- package/dist/actions/github/create-branch.d.ts +1 -0
- package/dist/actions/github/create-branch.js +199 -0
- package/dist/actions/github/create-branch.js.map +1 -0
- package/dist/actions/github/create-issue.cjs +190 -0
- package/dist/actions/github/create-issue.cjs.map +1 -0
- package/dist/actions/github/create-issue.d.cts +1 -0
- package/dist/actions/github/create-issue.d.ts +1 -0
- package/dist/actions/github/create-issue.js +188 -0
- package/dist/actions/github/create-issue.js.map +1 -0
- package/dist/actions/github/create-or-update-file.cjs +216 -0
- package/dist/actions/github/create-or-update-file.cjs.map +1 -0
- package/dist/actions/github/create-or-update-file.d.cts +1 -0
- package/dist/actions/github/create-or-update-file.d.ts +1 -0
- package/dist/actions/github/create-or-update-file.js +214 -0
- package/dist/actions/github/create-or-update-file.js.map +1 -0
- package/dist/actions/github/create-pull-request.cjs +206 -0
- package/dist/actions/github/create-pull-request.cjs.map +1 -0
- package/dist/actions/github/create-pull-request.d.cts +1 -0
- package/dist/actions/github/create-pull-request.d.ts +1 -0
- package/dist/actions/github/create-pull-request.js +204 -0
- package/dist/actions/github/create-pull-request.js.map +1 -0
- package/dist/actions/github/create-release.cjs +218 -0
- package/dist/actions/github/create-release.cjs.map +1 -0
- package/dist/actions/github/create-release.d.cts +1 -0
- package/dist/actions/github/create-release.d.ts +1 -0
- package/dist/actions/github/create-release.js +216 -0
- package/dist/actions/github/create-release.js.map +1 -0
- package/dist/actions/github/get-file-content.cjs +164 -0
- package/dist/actions/github/get-file-content.cjs.map +1 -0
- package/dist/actions/github/get-file-content.d.cts +1 -0
- package/dist/actions/github/get-file-content.d.ts +1 -0
- package/dist/actions/github/get-file-content.js +162 -0
- package/dist/actions/github/get-file-content.js.map +1 -0
- package/dist/actions/github/get-issue.cjs +149 -0
- package/dist/actions/github/get-issue.cjs.map +1 -0
- package/dist/actions/github/get-issue.d.cts +1 -0
- package/dist/actions/github/get-issue.d.ts +1 -0
- package/dist/actions/github/get-issue.js +147 -0
- package/dist/actions/github/get-issue.js.map +1 -0
- package/dist/actions/github/get-pull-request.cjs +160 -0
- package/dist/actions/github/get-pull-request.cjs.map +1 -0
- package/dist/actions/github/get-pull-request.d.cts +1 -0
- package/dist/actions/github/get-pull-request.d.ts +1 -0
- package/dist/actions/github/get-pull-request.js +158 -0
- package/dist/actions/github/get-pull-request.js.map +1 -0
- package/dist/actions/github/get-repo.cjs +144 -0
- package/dist/actions/github/get-repo.cjs.map +1 -0
- package/dist/actions/github/get-repo.d.cts +1 -0
- package/dist/actions/github/get-repo.d.ts +1 -0
- package/dist/actions/github/get-repo.js +142 -0
- package/dist/actions/github/get-repo.js.map +1 -0
- package/dist/actions/github/index.cjs +48 -0
- package/dist/actions/github/index.cjs.map +1 -0
- package/dist/actions/github/index.d.cts +7 -0
- package/dist/actions/github/index.d.cts.map +1 -0
- package/dist/actions/github/index.d.ts +7 -0
- package/dist/actions/github/index.d.ts.map +1 -0
- package/dist/actions/github/index.js +48 -0
- package/dist/actions/github/index.js.map +1 -0
- package/dist/actions/github/list-branches.cjs +149 -0
- package/dist/actions/github/list-branches.cjs.map +1 -0
- package/dist/actions/github/list-branches.d.cts +1 -0
- package/dist/actions/github/list-branches.d.ts +1 -0
- package/dist/actions/github/list-branches.js +147 -0
- package/dist/actions/github/list-branches.js.map +1 -0
- package/dist/actions/github/list-commits.cjs +200 -0
- package/dist/actions/github/list-commits.cjs.map +1 -0
- package/dist/actions/github/list-commits.d.cts +1 -0
- package/dist/actions/github/list-commits.d.ts +1 -0
- package/dist/actions/github/list-commits.js +198 -0
- package/dist/actions/github/list-commits.js.map +1 -0
- package/dist/actions/github/list-issue-comments.cjs +153 -0
- package/dist/actions/github/list-issue-comments.cjs.map +1 -0
- package/dist/actions/github/list-issue-comments.d.cts +1 -0
- package/dist/actions/github/list-issue-comments.d.ts +1 -0
- package/dist/actions/github/list-issue-comments.js +151 -0
- package/dist/actions/github/list-issue-comments.js.map +1 -0
- package/dist/actions/github/list-issues.cjs +244 -0
- package/dist/actions/github/list-issues.cjs.map +1 -0
- package/dist/actions/github/list-issues.d.cts +1 -0
- package/dist/actions/github/list-issues.d.ts +1 -0
- package/dist/actions/github/list-issues.js +242 -0
- package/dist/actions/github/list-issues.js.map +1 -0
- package/dist/actions/github/list-pull-requests.cjs +252 -0
- package/dist/actions/github/list-pull-requests.cjs.map +1 -0
- package/dist/actions/github/list-pull-requests.d.cts +1 -0
- package/dist/actions/github/list-pull-requests.d.ts +1 -0
- package/dist/actions/github/list-pull-requests.js +250 -0
- package/dist/actions/github/list-pull-requests.js.map +1 -0
- package/dist/actions/github/list-releases.cjs +152 -0
- package/dist/actions/github/list-releases.cjs.map +1 -0
- package/dist/actions/github/list-releases.d.cts +1 -0
- package/dist/actions/github/list-releases.d.ts +1 -0
- package/dist/actions/github/list-releases.js +150 -0
- package/dist/actions/github/list-releases.js.map +1 -0
- package/dist/actions/github/list-repos.cjs +227 -0
- package/dist/actions/github/list-repos.cjs.map +1 -0
- package/dist/actions/github/list-repos.d.cts +1 -0
- package/dist/actions/github/list-repos.d.ts +1 -0
- package/dist/actions/github/list-repos.js +225 -0
- package/dist/actions/github/list-repos.js.map +1 -0
- package/dist/actions/github/merge-pull-request.cjs +204 -0
- package/dist/actions/github/merge-pull-request.cjs.map +1 -0
- package/dist/actions/github/merge-pull-request.d.cts +1 -0
- package/dist/actions/github/merge-pull-request.d.ts +1 -0
- package/dist/actions/github/merge-pull-request.js +202 -0
- package/dist/actions/github/merge-pull-request.js.map +1 -0
- package/dist/actions/github/search-issues.cjs +200 -0
- package/dist/actions/github/search-issues.cjs.map +1 -0
- package/dist/actions/github/search-issues.d.cts +1 -0
- package/dist/actions/github/search-issues.d.ts +1 -0
- package/dist/actions/github/search-issues.js +198 -0
- package/dist/actions/github/search-issues.js.map +1 -0
- package/dist/actions/github/update-issue.cjs +243 -0
- package/dist/actions/github/update-issue.cjs.map +1 -0
- package/dist/actions/github/update-issue.d.cts +1 -0
- package/dist/actions/github/update-issue.d.ts +1 -0
- package/dist/actions/github/update-issue.js +241 -0
- package/dist/actions/github/update-issue.js.map +1 -0
- package/dist/actions/gmail/create-draft.cjs +228 -0
- package/dist/actions/gmail/create-draft.cjs.map +1 -0
- package/dist/actions/gmail/create-draft.d.cts +1 -0
- package/dist/actions/gmail/create-draft.d.ts +1 -0
- package/dist/actions/gmail/create-draft.js +226 -0
- package/dist/actions/gmail/create-draft.js.map +1 -0
- package/dist/actions/gmail/get-message.cjs +205 -0
- package/dist/actions/gmail/get-message.cjs.map +1 -0
- package/dist/actions/gmail/get-message.d.cts +1 -0
- package/dist/actions/gmail/get-message.d.ts +1 -0
- package/dist/actions/gmail/get-message.js +203 -0
- package/dist/actions/gmail/get-message.js.map +1 -0
- package/dist/actions/gmail/index.cjs +18 -0
- package/dist/actions/gmail/index.cjs.map +1 -0
- package/dist/actions/gmail/index.d.cts +7 -0
- package/dist/actions/gmail/index.d.cts.map +1 -0
- package/dist/actions/gmail/index.d.ts +7 -0
- package/dist/actions/gmail/index.d.ts.map +1 -0
- package/dist/actions/gmail/index.js +18 -0
- package/dist/actions/gmail/index.js.map +1 -0
- package/dist/actions/gmail/list-messages.cjs +195 -0
- package/dist/actions/gmail/list-messages.cjs.map +1 -0
- package/dist/actions/gmail/list-messages.d.cts +1 -0
- package/dist/actions/gmail/list-messages.d.ts +1 -0
- package/dist/actions/gmail/list-messages.js +193 -0
- package/dist/actions/gmail/list-messages.js.map +1 -0
- package/dist/actions/gmail/modify-labels.cjs +163 -0
- package/dist/actions/gmail/modify-labels.cjs.map +1 -0
- package/dist/actions/gmail/modify-labels.d.cts +1 -0
- package/dist/actions/gmail/modify-labels.d.ts +1 -0
- package/dist/actions/gmail/modify-labels.js +161 -0
- package/dist/actions/gmail/modify-labels.js.map +1 -0
- package/dist/actions/gmail/send-message.cjs +233 -0
- package/dist/actions/gmail/send-message.cjs.map +1 -0
- package/dist/actions/gmail/send-message.d.cts +1 -0
- package/dist/actions/gmail/send-message.d.ts +1 -0
- package/dist/actions/gmail/send-message.js +231 -0
- package/dist/actions/gmail/send-message.js.map +1 -0
- package/dist/actions/google-calendar/create-event.cjs +274 -0
- package/dist/actions/google-calendar/create-event.cjs.map +1 -0
- package/dist/actions/google-calendar/create-event.d.cts +1 -0
- package/dist/actions/google-calendar/create-event.d.ts +1 -0
- package/dist/actions/google-calendar/create-event.js +272 -0
- package/dist/actions/google-calendar/create-event.js.map +1 -0
- package/dist/actions/google-calendar/delete-event.cjs +145 -0
- package/dist/actions/google-calendar/delete-event.cjs.map +1 -0
- package/dist/actions/google-calendar/delete-event.d.cts +1 -0
- package/dist/actions/google-calendar/delete-event.d.ts +1 -0
- package/dist/actions/google-calendar/delete-event.js +143 -0
- package/dist/actions/google-calendar/delete-event.js.map +1 -0
- package/dist/actions/google-calendar/get-event.cjs +128 -0
- package/dist/actions/google-calendar/get-event.cjs.map +1 -0
- package/dist/actions/google-calendar/get-event.d.cts +1 -0
- package/dist/actions/google-calendar/get-event.d.ts +1 -0
- package/dist/actions/google-calendar/get-event.js +126 -0
- package/dist/actions/google-calendar/get-event.js.map +1 -0
- package/dist/actions/google-calendar/index.cjs +20 -0
- package/dist/actions/google-calendar/index.cjs.map +1 -0
- package/dist/actions/google-calendar/index.d.cts +7 -0
- package/dist/actions/google-calendar/index.d.cts.map +1 -0
- package/dist/actions/google-calendar/index.d.ts +7 -0
- package/dist/actions/google-calendar/index.d.ts.map +1 -0
- package/dist/actions/google-calendar/index.js +20 -0
- package/dist/actions/google-calendar/index.js.map +1 -0
- package/dist/actions/google-calendar/list-events.cjs +193 -0
- package/dist/actions/google-calendar/list-events.cjs.map +1 -0
- package/dist/actions/google-calendar/list-events.d.cts +1 -0
- package/dist/actions/google-calendar/list-events.d.ts +1 -0
- package/dist/actions/google-calendar/list-events.js +191 -0
- package/dist/actions/google-calendar/list-events.js.map +1 -0
- package/dist/actions/google-calendar/query-freebusy.cjs +160 -0
- package/dist/actions/google-calendar/query-freebusy.cjs.map +1 -0
- package/dist/actions/google-calendar/query-freebusy.d.cts +1 -0
- package/dist/actions/google-calendar/query-freebusy.d.ts +1 -0
- package/dist/actions/google-calendar/query-freebusy.js +158 -0
- package/dist/actions/google-calendar/query-freebusy.js.map +1 -0
- package/dist/actions/google-calendar/update-event.cjs +221 -0
- package/dist/actions/google-calendar/update-event.cjs.map +1 -0
- package/dist/actions/google-calendar/update-event.d.cts +1 -0
- package/dist/actions/google-calendar/update-event.d.ts +1 -0
- package/dist/actions/google-calendar/update-event.js +219 -0
- package/dist/actions/google-calendar/update-event.js.map +1 -0
- package/dist/actions/google-docs/append-text.cjs +138 -0
- package/dist/actions/google-docs/append-text.cjs.map +1 -0
- package/dist/actions/google-docs/append-text.d.cts +1 -0
- package/dist/actions/google-docs/append-text.d.ts +1 -0
- package/dist/actions/google-docs/append-text.js +136 -0
- package/dist/actions/google-docs/append-text.js.map +1 -0
- package/dist/actions/google-docs/create-document.cjs +138 -0
- package/dist/actions/google-docs/create-document.cjs.map +1 -0
- package/dist/actions/google-docs/create-document.d.cts +1 -0
- package/dist/actions/google-docs/create-document.d.ts +1 -0
- package/dist/actions/google-docs/create-document.js +136 -0
- package/dist/actions/google-docs/create-document.js.map +1 -0
- package/dist/actions/google-docs/get-document.cjs +118 -0
- package/dist/actions/google-docs/get-document.cjs.map +1 -0
- package/dist/actions/google-docs/get-document.d.cts +1 -0
- package/dist/actions/google-docs/get-document.d.ts +1 -0
- package/dist/actions/google-docs/get-document.js +116 -0
- package/dist/actions/google-docs/get-document.js.map +1 -0
- package/dist/actions/google-docs/index.cjs +18 -0
- package/dist/actions/google-docs/index.cjs.map +1 -0
- package/dist/actions/google-docs/index.d.cts +7 -0
- package/dist/actions/google-docs/index.d.cts.map +1 -0
- package/dist/actions/google-docs/index.d.ts +7 -0
- package/dist/actions/google-docs/index.d.ts.map +1 -0
- package/dist/actions/google-docs/index.js +18 -0
- package/dist/actions/google-docs/index.js.map +1 -0
- package/dist/actions/google-docs/insert-text.cjs +136 -0
- package/dist/actions/google-docs/insert-text.cjs.map +1 -0
- package/dist/actions/google-docs/insert-text.d.cts +1 -0
- package/dist/actions/google-docs/insert-text.d.ts +1 -0
- package/dist/actions/google-docs/insert-text.js +134 -0
- package/dist/actions/google-docs/insert-text.js.map +1 -0
- package/dist/actions/google-docs/replace-text.cjs +152 -0
- package/dist/actions/google-docs/replace-text.cjs.map +1 -0
- package/dist/actions/google-docs/replace-text.d.cts +1 -0
- package/dist/actions/google-docs/replace-text.d.ts +1 -0
- package/dist/actions/google-docs/replace-text.js +150 -0
- package/dist/actions/google-docs/replace-text.js.map +1 -0
- package/dist/actions/google-drive/create-file.cjs +155 -0
- package/dist/actions/google-drive/create-file.cjs.map +1 -0
- package/dist/actions/google-drive/create-file.d.cts +1 -0
- package/dist/actions/google-drive/create-file.d.ts +1 -0
- package/dist/actions/google-drive/create-file.js +153 -0
- package/dist/actions/google-drive/create-file.js.map +1 -0
- package/dist/actions/google-drive/create-folder.cjs +130 -0
- package/dist/actions/google-drive/create-folder.cjs.map +1 -0
- package/dist/actions/google-drive/create-folder.d.cts +1 -0
- package/dist/actions/google-drive/create-folder.d.ts +1 -0
- package/dist/actions/google-drive/create-folder.js +128 -0
- package/dist/actions/google-drive/create-folder.js.map +1 -0
- package/dist/actions/google-drive/delete-file.cjs +98 -0
- package/dist/actions/google-drive/delete-file.cjs.map +1 -0
- package/dist/actions/google-drive/delete-file.d.cts +1 -0
- package/dist/actions/google-drive/delete-file.d.ts +1 -0
- package/dist/actions/google-drive/delete-file.js +96 -0
- package/dist/actions/google-drive/delete-file.js.map +1 -0
- package/dist/actions/google-drive/get-file.cjs +103 -0
- package/dist/actions/google-drive/get-file.cjs.map +1 -0
- package/dist/actions/google-drive/get-file.d.cts +1 -0
- package/dist/actions/google-drive/get-file.d.ts +1 -0
- package/dist/actions/google-drive/get-file.js +101 -0
- package/dist/actions/google-drive/get-file.js.map +1 -0
- package/dist/actions/google-drive/index.cjs +22 -0
- package/dist/actions/google-drive/index.cjs.map +1 -0
- package/dist/actions/google-drive/index.d.cts +7 -0
- package/dist/actions/google-drive/index.d.cts.map +1 -0
- package/dist/actions/google-drive/index.d.ts +7 -0
- package/dist/actions/google-drive/index.d.ts.map +1 -0
- package/dist/actions/google-drive/index.js +22 -0
- package/dist/actions/google-drive/index.js.map +1 -0
- package/dist/actions/google-drive/list-files.cjs +156 -0
- package/dist/actions/google-drive/list-files.cjs.map +1 -0
- package/dist/actions/google-drive/list-files.d.cts +1 -0
- package/dist/actions/google-drive/list-files.d.ts +1 -0
- package/dist/actions/google-drive/list-files.js +154 -0
- package/dist/actions/google-drive/list-files.js.map +1 -0
- package/dist/actions/google-drive/search-files.cjs +138 -0
- package/dist/actions/google-drive/search-files.cjs.map +1 -0
- package/dist/actions/google-drive/search-files.d.cts +1 -0
- package/dist/actions/google-drive/search-files.d.ts +1 -0
- package/dist/actions/google-drive/search-files.js +136 -0
- package/dist/actions/google-drive/search-files.js.map +1 -0
- package/dist/actions/google-drive/share-file.cjs +226 -0
- package/dist/actions/google-drive/share-file.cjs.map +1 -0
- package/dist/actions/google-drive/share-file.d.cts +1 -0
- package/dist/actions/google-drive/share-file.d.ts +1 -0
- package/dist/actions/google-drive/share-file.js +224 -0
- package/dist/actions/google-drive/share-file.js.map +1 -0
- package/dist/actions/google-sheets/append-values.cjs +175 -0
- package/dist/actions/google-sheets/append-values.cjs.map +1 -0
- package/dist/actions/google-sheets/append-values.d.cts +1 -0
- package/dist/actions/google-sheets/append-values.d.ts +1 -0
- package/dist/actions/google-sheets/append-values.js +173 -0
- package/dist/actions/google-sheets/append-values.js.map +1 -0
- package/dist/actions/google-sheets/clear-values.cjs +118 -0
- package/dist/actions/google-sheets/clear-values.cjs.map +1 -0
- package/dist/actions/google-sheets/clear-values.d.cts +1 -0
- package/dist/actions/google-sheets/clear-values.d.ts +1 -0
- package/dist/actions/google-sheets/clear-values.js +116 -0
- package/dist/actions/google-sheets/clear-values.js.map +1 -0
- package/dist/actions/google-sheets/create-spreadsheet.cjs +128 -0
- package/dist/actions/google-sheets/create-spreadsheet.cjs.map +1 -0
- package/dist/actions/google-sheets/create-spreadsheet.d.cts +1 -0
- package/dist/actions/google-sheets/create-spreadsheet.d.ts +1 -0
- package/dist/actions/google-sheets/create-spreadsheet.js +126 -0
- package/dist/actions/google-sheets/create-spreadsheet.js.map +1 -0
- package/dist/actions/google-sheets/get-values.cjs +168 -0
- package/dist/actions/google-sheets/get-values.cjs.map +1 -0
- package/dist/actions/google-sheets/get-values.d.cts +1 -0
- package/dist/actions/google-sheets/get-values.d.ts +1 -0
- package/dist/actions/google-sheets/get-values.js +166 -0
- package/dist/actions/google-sheets/get-values.js.map +1 -0
- package/dist/actions/google-sheets/index.cjs +18 -0
- package/dist/actions/google-sheets/index.cjs.map +1 -0
- package/dist/actions/google-sheets/index.d.cts +7 -0
- package/dist/actions/google-sheets/index.d.cts.map +1 -0
- package/dist/actions/google-sheets/index.d.ts +7 -0
- package/dist/actions/google-sheets/index.d.ts.map +1 -0
- package/dist/actions/google-sheets/index.js +18 -0
- package/dist/actions/google-sheets/index.js.map +1 -0
- package/dist/actions/google-sheets/update-values.cjs +158 -0
- package/dist/actions/google-sheets/update-values.cjs.map +1 -0
- package/dist/actions/google-sheets/update-values.d.cts +1 -0
- package/dist/actions/google-sheets/update-values.d.ts +1 -0
- package/dist/actions/google-sheets/update-values.js +156 -0
- package/dist/actions/google-sheets/update-values.js.map +1 -0
- package/dist/actions/http/index.cjs +7 -0
- package/dist/actions/http/index.cjs.map +1 -0
- package/dist/actions/http/index.d.cts +7 -0
- package/dist/actions/http/index.d.cts.map +1 -0
- package/dist/actions/http/index.d.ts +7 -0
- package/dist/actions/http/index.d.ts.map +1 -0
- package/dist/actions/http/index.js +8 -0
- package/dist/actions/http/index.js.map +1 -0
- package/dist/actions/http/request.cjs +223 -0
- package/dist/actions/http/request.cjs.map +1 -0
- package/dist/actions/http/request.d.cts +1 -0
- package/dist/actions/http/request.d.ts +1 -0
- package/dist/actions/http/request.js +222 -0
- package/dist/actions/http/request.js.map +1 -0
- package/dist/actions/index.cjs +46 -0
- package/dist/actions/index.cjs.map +1 -0
- package/dist/actions/index.d.cts +27 -0
- package/dist/actions/index.d.cts.map +1 -0
- package/dist/actions/index.d.ts +27 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +45 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/linear/create-issue.cjs +296 -0
- package/dist/actions/linear/create-issue.cjs.map +1 -0
- package/dist/actions/linear/create-issue.d.cts +1 -0
- package/dist/actions/linear/create-issue.d.ts +1 -0
- package/dist/actions/linear/create-issue.js +294 -0
- package/dist/actions/linear/create-issue.js.map +1 -0
- package/dist/actions/linear/index.cjs +16 -0
- package/dist/actions/linear/index.cjs.map +1 -0
- package/dist/actions/linear/index.d.cts +7 -0
- package/dist/actions/linear/index.d.cts.map +1 -0
- package/dist/actions/linear/index.d.ts +7 -0
- package/dist/actions/linear/index.d.ts.map +1 -0
- package/dist/actions/linear/index.js +16 -0
- package/dist/actions/linear/index.js.map +1 -0
- package/dist/actions/linear/list-issues.cjs +239 -0
- package/dist/actions/linear/list-issues.cjs.map +1 -0
- package/dist/actions/linear/list-issues.d.cts +1 -0
- package/dist/actions/linear/list-issues.d.ts +1 -0
- package/dist/actions/linear/list-issues.js +237 -0
- package/dist/actions/linear/list-issues.js.map +1 -0
- package/dist/actions/linear/list-teams.cjs +183 -0
- package/dist/actions/linear/list-teams.cjs.map +1 -0
- package/dist/actions/linear/list-teams.d.cts +1 -0
- package/dist/actions/linear/list-teams.d.ts +1 -0
- package/dist/actions/linear/list-teams.js +181 -0
- package/dist/actions/linear/list-teams.js.map +1 -0
- package/dist/actions/linear/update-issue.cjs +282 -0
- package/dist/actions/linear/update-issue.cjs.map +1 -0
- package/dist/actions/linear/update-issue.d.cts +1 -0
- package/dist/actions/linear/update-issue.d.ts +1 -0
- package/dist/actions/linear/update-issue.js +280 -0
- package/dist/actions/linear/update-issue.js.map +1 -0
- package/dist/actions/microsoft/get-calendar-event.cjs +139 -0
- package/dist/actions/microsoft/get-calendar-event.cjs.map +1 -0
- package/dist/actions/microsoft/get-calendar-event.d.cts +1 -0
- package/dist/actions/microsoft/get-calendar-event.d.ts +1 -0
- package/dist/actions/microsoft/get-calendar-event.js +137 -0
- package/dist/actions/microsoft/get-calendar-event.js.map +1 -0
- package/dist/actions/microsoft/get-meeting-transcript.cjs +221 -0
- package/dist/actions/microsoft/get-meeting-transcript.cjs.map +1 -0
- package/dist/actions/microsoft/get-meeting-transcript.d.cts +1 -0
- package/dist/actions/microsoft/get-meeting-transcript.d.ts +1 -0
- package/dist/actions/microsoft/get-meeting-transcript.js +219 -0
- package/dist/actions/microsoft/get-meeting-transcript.js.map +1 -0
- package/dist/actions/microsoft/get-message.cjs +173 -0
- package/dist/actions/microsoft/get-message.cjs.map +1 -0
- package/dist/actions/microsoft/get-message.d.cts +1 -0
- package/dist/actions/microsoft/get-message.d.ts +1 -0
- package/dist/actions/microsoft/get-message.js +171 -0
- package/dist/actions/microsoft/get-message.js.map +1 -0
- package/dist/actions/microsoft/index.cjs +22 -0
- package/dist/actions/microsoft/index.cjs.map +1 -0
- package/dist/actions/microsoft/index.d.cts +1 -0
- package/dist/actions/microsoft/index.d.ts +1 -0
- package/dist/actions/microsoft/index.js +22 -0
- package/dist/actions/microsoft/index.js.map +1 -0
- package/dist/actions/microsoft/list-calendar-events.cjs +202 -0
- package/dist/actions/microsoft/list-calendar-events.cjs.map +1 -0
- package/dist/actions/microsoft/list-calendar-events.d.cts +1 -0
- package/dist/actions/microsoft/list-calendar-events.d.ts +1 -0
- package/dist/actions/microsoft/list-calendar-events.js +200 -0
- package/dist/actions/microsoft/list-calendar-events.js.map +1 -0
- package/dist/actions/microsoft/list-calendars.cjs +99 -0
- package/dist/actions/microsoft/list-calendars.cjs.map +1 -0
- package/dist/actions/microsoft/list-calendars.d.cts +1 -0
- package/dist/actions/microsoft/list-calendars.d.ts +1 -0
- package/dist/actions/microsoft/list-calendars.js +97 -0
- package/dist/actions/microsoft/list-calendars.js.map +1 -0
- package/dist/actions/microsoft/list-messages.cjs +223 -0
- package/dist/actions/microsoft/list-messages.cjs.map +1 -0
- package/dist/actions/microsoft/list-messages.d.cts +1 -0
- package/dist/actions/microsoft/list-messages.d.ts +1 -0
- package/dist/actions/microsoft/list-messages.js +221 -0
- package/dist/actions/microsoft/list-messages.js.map +1 -0
- package/dist/actions/microsoft/list-online-meetings.cjs +132 -0
- package/dist/actions/microsoft/list-online-meetings.cjs.map +1 -0
- package/dist/actions/microsoft/list-online-meetings.d.cts +1 -0
- package/dist/actions/microsoft/list-online-meetings.d.ts +1 -0
- package/dist/actions/microsoft/list-online-meetings.js +130 -0
- package/dist/actions/microsoft/list-online-meetings.js.map +1 -0
- package/dist/actions/postgres/describe-table.cjs +175 -0
- package/dist/actions/postgres/describe-table.cjs.map +1 -0
- package/dist/actions/postgres/describe-table.d.cts +1 -0
- package/dist/actions/postgres/describe-table.d.ts +1 -0
- package/dist/actions/postgres/describe-table.js +165 -0
- package/dist/actions/postgres/describe-table.js.map +1 -0
- package/dist/actions/postgres/execute-query.cjs +120 -0
- package/dist/actions/postgres/execute-query.cjs.map +1 -0
- package/dist/actions/postgres/execute-query.d.cts +1 -0
- package/dist/actions/postgres/execute-query.d.ts +1 -0
- package/dist/actions/postgres/execute-query.js +110 -0
- package/dist/actions/postgres/execute-query.js.map +1 -0
- package/dist/actions/postgres/index.cjs +16 -0
- package/dist/actions/postgres/index.cjs.map +1 -0
- package/dist/actions/postgres/index.d.cts +7 -0
- package/dist/actions/postgres/index.d.cts.map +1 -0
- package/dist/actions/postgres/index.d.ts +7 -0
- package/dist/actions/postgres/index.d.ts.map +1 -0
- package/dist/actions/postgres/index.js +16 -0
- package/dist/actions/postgres/index.js.map +1 -0
- package/dist/actions/postgres/insert-rows.cjs +168 -0
- package/dist/actions/postgres/insert-rows.cjs.map +1 -0
- package/dist/actions/postgres/insert-rows.d.cts +1 -0
- package/dist/actions/postgres/insert-rows.d.ts +1 -0
- package/dist/actions/postgres/insert-rows.js +158 -0
- package/dist/actions/postgres/insert-rows.js.map +1 -0
- package/dist/actions/postgres/list-tables.cjs +133 -0
- package/dist/actions/postgres/list-tables.cjs.map +1 -0
- package/dist/actions/postgres/list-tables.d.cts +1 -0
- package/dist/actions/postgres/list-tables.d.ts +1 -0
- package/dist/actions/postgres/list-tables.js +123 -0
- package/dist/actions/postgres/list-tables.js.map +1 -0
- package/dist/actions/providers.cjs +128 -0
- package/dist/actions/providers.cjs.map +1 -0
- package/dist/actions/providers.d.cts +22 -0
- package/dist/actions/providers.d.cts.map +1 -0
- package/dist/actions/providers.d.ts +22 -0
- package/dist/actions/providers.d.ts.map +1 -0
- package/dist/actions/providers.js +116 -0
- package/dist/actions/providers.js.map +1 -0
- package/dist/actions/slack/index.cjs +9 -0
- package/dist/actions/slack/index.cjs.map +1 -0
- package/dist/actions/slack/index.d.cts +7 -0
- package/dist/actions/slack/index.d.cts.map +1 -0
- package/dist/actions/slack/index.d.ts +7 -0
- package/dist/actions/slack/index.d.ts.map +1 -0
- package/dist/actions/slack/index.js +9 -0
- package/dist/actions/slack/index.js.map +1 -0
- package/dist/actions/slack/list-channels.cjs +157 -0
- package/dist/actions/slack/list-channels.cjs.map +1 -0
- package/dist/actions/slack/list-channels.d.cts +1 -0
- package/dist/actions/slack/list-channels.d.ts +1 -0
- package/dist/actions/slack/list-channels.js +155 -0
- package/dist/actions/slack/list-channels.js.map +1 -0
- package/dist/actions/slack/send-message.cjs +157 -0
- package/dist/actions/slack/send-message.cjs.map +1 -0
- package/dist/actions/slack/send-message.d.cts +1 -0
- package/dist/actions/slack/send-message.d.ts +1 -0
- package/dist/actions/slack/send-message.js +155 -0
- package/dist/actions/slack/send-message.js.map +1 -0
- package/dist/actions/triggers/cron.cjs +95 -0
- package/dist/actions/triggers/cron.cjs.map +1 -0
- package/dist/actions/triggers/cron.d.cts +1 -0
- package/dist/actions/triggers/cron.d.ts +1 -0
- package/dist/actions/triggers/cron.js +83 -0
- package/dist/actions/triggers/cron.js.map +1 -0
- package/dist/actions/triggers/index.cjs +9 -0
- package/dist/actions/triggers/index.cjs.map +1 -0
- package/dist/actions/triggers/index.d.cts +1 -0
- package/dist/actions/triggers/index.d.ts +1 -0
- package/dist/actions/triggers/index.js +9 -0
- package/dist/actions/triggers/index.js.map +1 -0
- package/dist/actions/triggers/manual.cjs +105 -0
- package/dist/actions/triggers/manual.cjs.map +1 -0
- package/dist/actions/triggers/manual.d.cts +1 -0
- package/dist/actions/triggers/manual.d.ts +1 -0
- package/dist/actions/triggers/manual.js +103 -0
- package/dist/actions/triggers/manual.js.map +1 -0
- package/dist/actions/types.d.cts +373 -0
- package/dist/actions/types.d.cts.map +1 -0
- package/dist/actions/types.d.ts +373 -0
- package/dist/actions/types.d.ts.map +1 -0
- package/dist/database/adapter-factory.cjs +188 -0
- package/dist/database/adapter-factory.cjs.map +1 -0
- package/dist/database/adapter-factory.js +187 -0
- package/dist/database/adapter-factory.js.map +1 -0
- package/dist/database/adapter.cjs +33 -0
- package/dist/database/adapter.cjs.map +1 -0
- package/dist/database/adapter.d.cts +76 -0
- package/dist/database/adapter.d.cts.map +1 -0
- package/dist/database/adapter.d.ts +76 -0
- package/dist/database/adapter.d.ts.map +1 -0
- package/dist/database/adapter.js +33 -0
- package/dist/database/adapter.js.map +1 -0
- package/dist/database/adapters/connection-bridge.cjs +119 -0
- package/dist/database/adapters/connection-bridge.cjs.map +1 -0
- package/dist/database/adapters/connection-bridge.js +118 -0
- package/dist/database/adapters/connection-bridge.js.map +1 -0
- package/dist/database/adapters/kysely-adapter.cjs +138 -0
- package/dist/database/adapters/kysely-adapter.cjs.map +1 -0
- package/dist/database/adapters/kysely-adapter.js +137 -0
- package/dist/database/adapters/kysely-adapter.js.map +1 -0
- package/dist/database/connection.cjs +277 -0
- package/dist/database/connection.cjs.map +1 -0
- package/dist/database/connection.d.cts +115 -0
- package/dist/database/connection.d.cts.map +1 -0
- package/dist/database/connection.d.ts +115 -0
- package/dist/database/connection.d.ts.map +1 -0
- package/dist/database/connection.js +271 -0
- package/dist/database/connection.js.map +1 -0
- package/dist/database/core-schema.cjs +644 -0
- package/dist/database/core-schema.cjs.map +1 -0
- package/dist/database/core-schema.d.cts +22 -0
- package/dist/database/core-schema.d.cts.map +1 -0
- package/dist/database/core-schema.d.ts +22 -0
- package/dist/database/core-schema.d.ts.map +1 -0
- package/dist/database/core-schema.js +642 -0
- package/dist/database/core-schema.js.map +1 -0
- package/dist/database/index.cjs +4 -0
- package/dist/database/index.d.cts +10 -0
- package/dist/database/index.d.cts.map +1 -0
- package/dist/database/index.d.ts +10 -0
- package/dist/database/index.d.ts.map +1 -0
- package/dist/database/index.js +5 -0
- package/dist/database/prisma-schema-generator.cjs +219 -0
- package/dist/database/prisma-schema-generator.cjs.map +1 -0
- package/dist/database/prisma-schema-generator.d.cts +19 -0
- package/dist/database/prisma-schema-generator.d.cts.map +1 -0
- package/dist/database/prisma-schema-generator.d.ts +19 -0
- package/dist/database/prisma-schema-generator.d.ts.map +1 -0
- package/dist/database/prisma-schema-generator.js +218 -0
- package/dist/database/prisma-schema-generator.js.map +1 -0
- package/dist/database/schema-generator.cjs +576 -0
- package/dist/database/schema-generator.cjs.map +1 -0
- package/dist/database/schema-generator.d.cts +18 -0
- package/dist/database/schema-generator.d.cts.map +1 -0
- package/dist/database/schema-generator.d.ts +18 -0
- package/dist/database/schema-generator.d.ts.map +1 -0
- package/dist/database/schema-generator.js +571 -0
- package/dist/database/schema-generator.js.map +1 -0
- package/dist/database/schema-merger.cjs +153 -0
- package/dist/database/schema-merger.cjs.map +1 -0
- package/dist/database/schema-merger.d.cts +53 -0
- package/dist/database/schema-merger.d.cts.map +1 -0
- package/dist/database/schema-merger.d.ts +53 -0
- package/dist/database/schema-merger.d.ts.map +1 -0
- package/dist/database/schema-merger.js +152 -0
- package/dist/database/schema-merger.js.map +1 -0
- package/dist/database/schema-metadata.cjs +98 -0
- package/dist/database/schema-metadata.cjs.map +1 -0
- package/dist/database/schema-metadata.js +98 -0
- package/dist/database/schema-metadata.js.map +1 -0
- package/dist/database/schema-mysql.cjs +288 -0
- package/dist/database/schema-mysql.cjs.map +1 -0
- package/dist/database/schema-mysql.d.cts +2117 -0
- package/dist/database/schema-mysql.d.cts.map +1 -0
- package/dist/database/schema-mysql.d.ts +2117 -0
- package/dist/database/schema-mysql.d.ts.map +1 -0
- package/dist/database/schema-mysql.js +263 -0
- package/dist/database/schema-mysql.js.map +1 -0
- package/dist/database/schema-postgres.cjs +312 -0
- package/dist/database/schema-postgres.cjs.map +1 -0
- package/dist/database/schema-postgres.d.cts +2127 -0
- package/dist/database/schema-postgres.d.cts.map +1 -0
- package/dist/database/schema-postgres.d.ts +2127 -0
- package/dist/database/schema-postgres.d.ts.map +1 -0
- package/dist/database/schema-postgres.js +280 -0
- package/dist/database/schema-postgres.js.map +1 -0
- package/dist/database/schema-sqlite.cjs +247 -0
- package/dist/database/schema-sqlite.cjs.map +1 -0
- package/dist/database/schema-sqlite.d.cts +2294 -0
- package/dist/database/schema-sqlite.d.cts.map +1 -0
- package/dist/database/schema-sqlite.d.ts +2294 -0
- package/dist/database/schema-sqlite.d.ts.map +1 -0
- package/dist/database/schema-sqlite.js +222 -0
- package/dist/database/schema-sqlite.js.map +1 -0
- package/dist/database/schema-verification.cjs +123 -0
- package/dist/database/schema-verification.cjs.map +1 -0
- package/dist/database/schema-verification.d.cts +40 -0
- package/dist/database/schema-verification.d.cts.map +1 -0
- package/dist/database/schema-verification.d.ts +40 -0
- package/dist/database/schema-verification.d.ts.map +1 -0
- package/dist/database/schema-verification.js +123 -0
- package/dist/database/schema-verification.js.map +1 -0
- package/dist/database/schema.cjs +3 -0
- package/dist/database/schema.d.cts +3 -0
- package/dist/database/schema.d.ts +3 -0
- package/dist/database/schema.js +4 -0
- package/dist/index.cjs +199 -0
- package/dist/index.d.cts +70 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.js +56 -0
- package/dist/invect-core.cjs +1688 -0
- package/dist/invect-core.cjs.map +1 -0
- package/dist/invect-core.d.cts +846 -0
- package/dist/invect-core.d.cts.map +1 -0
- package/dist/invect-core.d.ts +846 -0
- package/dist/invect-core.d.ts.map +1 -0
- package/dist/invect-core.js +1688 -0
- package/dist/invect-core.js.map +1 -0
- package/dist/nodes/agent-executor.cjs +881 -0
- package/dist/nodes/agent-executor.cjs.map +1 -0
- package/dist/nodes/agent-executor.d.cts +243 -0
- package/dist/nodes/agent-executor.d.cts.map +1 -0
- package/dist/nodes/agent-executor.d.ts +243 -0
- package/dist/nodes/agent-executor.d.ts.map +1 -0
- package/dist/nodes/agent-executor.js +877 -0
- package/dist/nodes/agent-executor.js.map +1 -0
- package/dist/nodes/base-node.cjs +174 -0
- package/dist/nodes/base-node.cjs.map +1 -0
- package/dist/nodes/base-node.d.cts +125 -0
- package/dist/nodes/base-node.d.cts.map +1 -0
- package/dist/nodes/base-node.d.ts +125 -0
- package/dist/nodes/base-node.d.ts.map +1 -0
- package/dist/nodes/base-node.js +170 -0
- package/dist/nodes/base-node.js.map +1 -0
- package/dist/nodes/executor-registry.cjs +46 -0
- package/dist/nodes/executor-registry.cjs.map +1 -0
- package/dist/nodes/executor-registry.d.cts +18 -0
- package/dist/nodes/executor-registry.d.cts.map +1 -0
- package/dist/nodes/executor-registry.d.ts +18 -0
- package/dist/nodes/executor-registry.d.ts.map +1 -0
- package/dist/nodes/executor-registry.js +46 -0
- package/dist/nodes/executor-registry.js.map +1 -0
- package/dist/nodes/index.cjs +2 -0
- package/dist/nodes/index.d.cts +3 -0
- package/dist/nodes/index.d.ts +3 -0
- package/dist/nodes/index.js +3 -0
- package/dist/services/agent-tool-executions/agent-tool-execution.service.cjs +110 -0
- package/dist/services/agent-tool-executions/agent-tool-execution.service.cjs.map +1 -0
- package/dist/services/agent-tool-executions/agent-tool-execution.service.d.cts +42 -0
- package/dist/services/agent-tool-executions/agent-tool-execution.service.d.cts.map +1 -0
- package/dist/services/agent-tool-executions/agent-tool-execution.service.d.ts +42 -0
- package/dist/services/agent-tool-executions/agent-tool-execution.service.d.ts.map +1 -0
- package/dist/services/agent-tool-executions/agent-tool-execution.service.js +110 -0
- package/dist/services/agent-tool-executions/agent-tool-execution.service.js.map +1 -0
- package/dist/services/agent-tool-executions/agent-tool-executions.model.cjs +152 -0
- package/dist/services/agent-tool-executions/agent-tool-executions.model.cjs.map +1 -0
- package/dist/services/agent-tool-executions/agent-tool-executions.model.d.cts +71 -0
- package/dist/services/agent-tool-executions/agent-tool-executions.model.d.cts.map +1 -0
- package/dist/services/agent-tool-executions/agent-tool-executions.model.d.ts +71 -0
- package/dist/services/agent-tool-executions/agent-tool-executions.model.d.ts.map +1 -0
- package/dist/services/agent-tool-executions/agent-tool-executions.model.js +152 -0
- package/dist/services/agent-tool-executions/agent-tool-executions.model.js.map +1 -0
- package/dist/services/agent-tools/agent-tool-registry.cjs +101 -0
- package/dist/services/agent-tools/agent-tool-registry.cjs.map +1 -0
- package/dist/services/agent-tools/agent-tool-registry.d.cts +51 -0
- package/dist/services/agent-tools/agent-tool-registry.d.cts.map +1 -0
- package/dist/services/agent-tools/agent-tool-registry.d.ts +51 -0
- package/dist/services/agent-tools/agent-tool-registry.d.ts.map +1 -0
- package/dist/services/agent-tools/agent-tool-registry.js +98 -0
- package/dist/services/agent-tools/agent-tool-registry.js.map +1 -0
- package/dist/services/agent-tools/builtin/index.cjs +17 -0
- package/dist/services/agent-tools/builtin/index.cjs.map +1 -0
- package/dist/services/agent-tools/builtin/index.js +17 -0
- package/dist/services/agent-tools/builtin/index.js.map +1 -0
- package/dist/services/agent-tools/builtin/json-logic-tool.cjs +73 -0
- package/dist/services/agent-tools/builtin/json-logic-tool.cjs.map +1 -0
- package/dist/services/agent-tools/builtin/json-logic-tool.js +70 -0
- package/dist/services/agent-tools/builtin/json-logic-tool.js.map +1 -0
- package/dist/services/agent-tools/builtin/math-tool.cjs +117 -0
- package/dist/services/agent-tools/builtin/math-tool.cjs.map +1 -0
- package/dist/services/agent-tools/builtin/math-tool.js +116 -0
- package/dist/services/agent-tools/builtin/math-tool.js.map +1 -0
- package/dist/services/agent-tools/index.cjs +2 -0
- package/dist/services/agent-tools/index.js +3 -0
- package/dist/services/ai/ai-types.cjs +37 -0
- package/dist/services/ai/ai-types.cjs.map +1 -0
- package/dist/services/ai/ai-types.d.cts +105 -0
- package/dist/services/ai/ai-types.d.cts.map +1 -0
- package/dist/services/ai/ai-types.d.ts +105 -0
- package/dist/services/ai/ai-types.d.ts.map +1 -0
- package/dist/services/ai/ai-types.js +35 -0
- package/dist/services/ai/ai-types.js.map +1 -0
- package/dist/services/ai/anthropic-adapter.cjs +411 -0
- package/dist/services/ai/anthropic-adapter.cjs.map +1 -0
- package/dist/services/ai/anthropic-adapter.d.cts +1 -0
- package/dist/services/ai/anthropic-adapter.d.ts +1 -0
- package/dist/services/ai/anthropic-adapter.js +409 -0
- package/dist/services/ai/anthropic-adapter.js.map +1 -0
- package/dist/services/ai/base-client.cjs +345 -0
- package/dist/services/ai/base-client.cjs.map +1 -0
- package/dist/services/ai/base-client.d.cts +138 -0
- package/dist/services/ai/base-client.d.cts.map +1 -0
- package/dist/services/ai/base-client.d.ts +138 -0
- package/dist/services/ai/base-client.d.ts.map +1 -0
- package/dist/services/ai/base-client.js +345 -0
- package/dist/services/ai/base-client.js.map +1 -0
- package/dist/services/ai/openai-adapter.cjs +460 -0
- package/dist/services/ai/openai-adapter.cjs.map +1 -0
- package/dist/services/ai/openai-adapter.d.cts +1 -0
- package/dist/services/ai/openai-adapter.d.ts +1 -0
- package/dist/services/ai/openai-adapter.js +458 -0
- package/dist/services/ai/openai-adapter.js.map +1 -0
- package/dist/services/ai/openrouter-adapter.cjs +124 -0
- package/dist/services/ai/openrouter-adapter.cjs.map +1 -0
- package/dist/services/ai/openrouter-adapter.d.cts +1 -0
- package/dist/services/ai/openrouter-adapter.d.ts +1 -0
- package/dist/services/ai/openrouter-adapter.js +122 -0
- package/dist/services/ai/openrouter-adapter.js.map +1 -0
- package/dist/services/ai/provider-adapter.cjs +72 -0
- package/dist/services/ai/provider-adapter.cjs.map +1 -0
- package/dist/services/ai/provider-adapter.d.cts +81 -0
- package/dist/services/ai/provider-adapter.d.cts.map +1 -0
- package/dist/services/ai/provider-adapter.d.ts +81 -0
- package/dist/services/ai/provider-adapter.d.ts.map +1 -0
- package/dist/services/ai/provider-adapter.js +72 -0
- package/dist/services/ai/provider-adapter.js.map +1 -0
- package/dist/services/auth/authorization.service.cjs +259 -0
- package/dist/services/auth/authorization.service.cjs.map +1 -0
- package/dist/services/auth/authorization.service.d.cts +102 -0
- package/dist/services/auth/authorization.service.d.cts.map +1 -0
- package/dist/services/auth/authorization.service.d.ts +102 -0
- package/dist/services/auth/authorization.service.d.ts.map +1 -0
- package/dist/services/auth/authorization.service.js +257 -0
- package/dist/services/auth/authorization.service.js.map +1 -0
- package/dist/services/auth/flow-access.service.cjs +259 -0
- package/dist/services/auth/flow-access.service.cjs.map +1 -0
- package/dist/services/auth/flow-access.service.d.cts +89 -0
- package/dist/services/auth/flow-access.service.d.cts.map +1 -0
- package/dist/services/auth/flow-access.service.d.ts +89 -0
- package/dist/services/auth/flow-access.service.d.ts.map +1 -0
- package/dist/services/auth/flow-access.service.js +259 -0
- package/dist/services/auth/flow-access.service.js.map +1 -0
- package/dist/services/auth/index.d.ts +2 -0
- package/dist/services/batch-jobs/batch-jobs.model.cjs +213 -0
- package/dist/services/batch-jobs/batch-jobs.model.cjs.map +1 -0
- package/dist/services/batch-jobs/batch-jobs.model.d.cts +79 -0
- package/dist/services/batch-jobs/batch-jobs.model.d.cts.map +1 -0
- package/dist/services/batch-jobs/batch-jobs.model.d.ts +79 -0
- package/dist/services/batch-jobs/batch-jobs.model.d.ts.map +1 -0
- package/dist/services/batch-jobs/batch-jobs.model.js +213 -0
- package/dist/services/batch-jobs/batch-jobs.model.js.map +1 -0
- package/dist/services/batch-jobs/batch-jobs.service.cjs +178 -0
- package/dist/services/batch-jobs/batch-jobs.service.cjs.map +1 -0
- package/dist/services/batch-jobs/batch-jobs.service.d.cts +83 -0
- package/dist/services/batch-jobs/batch-jobs.service.d.cts.map +1 -0
- package/dist/services/batch-jobs/batch-jobs.service.d.ts +83 -0
- package/dist/services/batch-jobs/batch-jobs.service.d.ts.map +1 -0
- package/dist/services/batch-jobs/batch-jobs.service.js +178 -0
- package/dist/services/batch-jobs/batch-jobs.service.js.map +1 -0
- package/dist/services/chat/chat-messages.model.cjs +143 -0
- package/dist/services/chat/chat-messages.model.cjs.map +1 -0
- package/dist/services/chat/chat-messages.model.d.cts +43 -0
- package/dist/services/chat/chat-messages.model.d.cts.map +1 -0
- package/dist/services/chat/chat-messages.model.d.ts +43 -0
- package/dist/services/chat/chat-messages.model.d.ts.map +1 -0
- package/dist/services/chat/chat-messages.model.js +142 -0
- package/dist/services/chat/chat-messages.model.js.map +1 -0
- package/dist/services/chat/chat-stream-session.cjs +181 -0
- package/dist/services/chat/chat-stream-session.cjs.map +1 -0
- package/dist/services/chat/chat-stream-session.d.cts +1 -0
- package/dist/services/chat/chat-stream-session.d.ts +1 -0
- package/dist/services/chat/chat-stream-session.js +181 -0
- package/dist/services/chat/chat-stream-session.js.map +1 -0
- package/dist/services/chat/chat-stream.service.cjs +205 -0
- package/dist/services/chat/chat-stream.service.cjs.map +1 -0
- package/dist/services/chat/chat-stream.service.d.cts +84 -0
- package/dist/services/chat/chat-stream.service.d.cts.map +1 -0
- package/dist/services/chat/chat-stream.service.d.ts +84 -0
- package/dist/services/chat/chat-stream.service.d.ts.map +1 -0
- package/dist/services/chat/chat-stream.service.js +205 -0
- package/dist/services/chat/chat-stream.service.js.map +1 -0
- package/dist/services/chat/chat-toolkit.cjs +125 -0
- package/dist/services/chat/chat-toolkit.cjs.map +1 -0
- package/dist/services/chat/chat-toolkit.d.cts +58 -0
- package/dist/services/chat/chat-toolkit.d.cts.map +1 -0
- package/dist/services/chat/chat-toolkit.d.ts +58 -0
- package/dist/services/chat/chat-toolkit.d.ts.map +1 -0
- package/dist/services/chat/chat-toolkit.js +124 -0
- package/dist/services/chat/chat-toolkit.js.map +1 -0
- package/dist/services/chat/chat-types.cjs +24 -0
- package/dist/services/chat/chat-types.cjs.map +1 -0
- package/dist/services/chat/chat-types.d.cts +134 -0
- package/dist/services/chat/chat-types.d.cts.map +1 -0
- package/dist/services/chat/chat-types.d.ts +134 -0
- package/dist/services/chat/chat-types.d.ts.map +1 -0
- package/dist/services/chat/chat-types.js +23 -0
- package/dist/services/chat/chat-types.js.map +1 -0
- package/dist/services/chat/index.cjs +5 -0
- package/dist/services/chat/index.d.cts +3 -0
- package/dist/services/chat/index.d.ts +3 -0
- package/dist/services/chat/index.js +6 -0
- package/dist/services/chat/system-prompt.cjs +223 -0
- package/dist/services/chat/system-prompt.cjs.map +1 -0
- package/dist/services/chat/system-prompt.d.cts +1 -0
- package/dist/services/chat/system-prompt.d.ts +1 -0
- package/dist/services/chat/system-prompt.js +223 -0
- package/dist/services/chat/system-prompt.js.map +1 -0
- package/dist/services/chat/tools/agent-tools.cjs +472 -0
- package/dist/services/chat/tools/agent-tools.cjs.map +1 -0
- package/dist/services/chat/tools/agent-tools.js +471 -0
- package/dist/services/chat/tools/agent-tools.js.map +1 -0
- package/dist/services/chat/tools/context-tools.cjs +252 -0
- package/dist/services/chat/tools/context-tools.cjs.map +1 -0
- package/dist/services/chat/tools/context-tools.js +251 -0
- package/dist/services/chat/tools/context-tools.js.map +1 -0
- package/dist/services/chat/tools/flow-tools.cjs +244 -0
- package/dist/services/chat/tools/flow-tools.cjs.map +1 -0
- package/dist/services/chat/tools/flow-tools.js +243 -0
- package/dist/services/chat/tools/flow-tools.js.map +1 -0
- package/dist/services/chat/tools/index.cjs +22 -0
- package/dist/services/chat/tools/index.cjs.map +1 -0
- package/dist/services/chat/tools/index.js +22 -0
- package/dist/services/chat/tools/index.js.map +1 -0
- package/dist/services/chat/tools/node-tools.cjs +323 -0
- package/dist/services/chat/tools/node-tools.cjs.map +1 -0
- package/dist/services/chat/tools/node-tools.js +322 -0
- package/dist/services/chat/tools/node-tools.js.map +1 -0
- package/dist/services/chat/tools/plan-tools.cjs +94 -0
- package/dist/services/chat/tools/plan-tools.cjs.map +1 -0
- package/dist/services/chat/tools/plan-tools.js +93 -0
- package/dist/services/chat/tools/plan-tools.js.map +1 -0
- package/dist/services/chat/tools/run-tools.cjs +121 -0
- package/dist/services/chat/tools/run-tools.cjs.map +1 -0
- package/dist/services/chat/tools/run-tools.js +120 -0
- package/dist/services/chat/tools/run-tools.js.map +1 -0
- package/dist/services/credentials/credentials.model.cjs +313 -0
- package/dist/services/credentials/credentials.model.cjs.map +1 -0
- package/dist/services/credentials/credentials.model.d.cts +27 -0
- package/dist/services/credentials/credentials.model.d.cts.map +1 -0
- package/dist/services/credentials/credentials.model.d.ts +27 -0
- package/dist/services/credentials/credentials.model.d.ts.map +1 -0
- package/dist/services/credentials/credentials.model.js +312 -0
- package/dist/services/credentials/credentials.model.js.map +1 -0
- package/dist/services/credentials/credentials.service.cjs +358 -0
- package/dist/services/credentials/credentials.service.cjs.map +1 -0
- package/dist/services/credentials/credentials.service.d.cts +156 -0
- package/dist/services/credentials/credentials.service.d.cts.map +1 -0
- package/dist/services/credentials/credentials.service.d.ts +156 -0
- package/dist/services/credentials/credentials.service.d.ts.map +1 -0
- package/dist/services/credentials/credentials.service.js +357 -0
- package/dist/services/credentials/credentials.service.js.map +1 -0
- package/dist/services/credentials/encryption.service.cjs +121 -0
- package/dist/services/credentials/encryption.service.cjs.map +1 -0
- package/dist/services/credentials/encryption.service.d.cts +70 -0
- package/dist/services/credentials/encryption.service.d.cts.map +1 -0
- package/dist/services/credentials/encryption.service.d.ts +70 -0
- package/dist/services/credentials/encryption.service.d.ts.map +1 -0
- package/dist/services/credentials/encryption.service.js +119 -0
- package/dist/services/credentials/encryption.service.js.map +1 -0
- package/dist/services/credentials/index.d.cts +4 -0
- package/dist/services/credentials/index.d.ts +4 -0
- package/dist/services/credentials/oauth2-providers.cjs +668 -0
- package/dist/services/credentials/oauth2-providers.cjs.map +1 -0
- package/dist/services/credentials/oauth2-providers.d.cts +39 -0
- package/dist/services/credentials/oauth2-providers.d.cts.map +1 -0
- package/dist/services/credentials/oauth2-providers.d.ts +39 -0
- package/dist/services/credentials/oauth2-providers.d.ts.map +1 -0
- package/dist/services/credentials/oauth2-providers.js +667 -0
- package/dist/services/credentials/oauth2-providers.js.map +1 -0
- package/dist/services/credentials/oauth2.service.cjs +252 -0
- package/dist/services/credentials/oauth2.service.cjs.map +1 -0
- package/dist/services/credentials/oauth2.service.d.cts +132 -0
- package/dist/services/credentials/oauth2.service.d.cts.map +1 -0
- package/dist/services/credentials/oauth2.service.d.ts +132 -0
- package/dist/services/credentials/oauth2.service.d.ts.map +1 -0
- package/dist/services/credentials/oauth2.service.js +251 -0
- package/dist/services/credentials/oauth2.service.js.map +1 -0
- package/dist/services/database/database.service.cjs +469 -0
- package/dist/services/database/database.service.cjs.map +1 -0
- package/dist/services/database/database.service.d.cts +162 -0
- package/dist/services/database/database.service.d.cts.map +1 -0
- package/dist/services/database/database.service.d.ts +162 -0
- package/dist/services/database/database.service.d.ts.map +1 -0
- package/dist/services/database/database.service.js +469 -0
- package/dist/services/database/database.service.js.map +1 -0
- package/dist/services/execution-event-bus.cjs +80 -0
- package/dist/services/execution-event-bus.cjs.map +1 -0
- package/dist/services/execution-event-bus.d.cts +57 -0
- package/dist/services/execution-event-bus.d.cts.map +1 -0
- package/dist/services/execution-event-bus.d.ts +57 -0
- package/dist/services/execution-event-bus.d.ts.map +1 -0
- package/dist/services/execution-event-bus.js +77 -0
- package/dist/services/execution-event-bus.js.map +1 -0
- package/dist/services/flow-orchestration/flow-run-coordinator.cjs +499 -0
- package/dist/services/flow-orchestration/flow-run-coordinator.cjs.map +1 -0
- package/dist/services/flow-orchestration/flow-run-coordinator.js +499 -0
- package/dist/services/flow-orchestration/flow-run-coordinator.js.map +1 -0
- package/dist/services/flow-orchestration/node-execution-coordinator.cjs +657 -0
- package/dist/services/flow-orchestration/node-execution-coordinator.cjs.map +1 -0
- package/dist/services/flow-orchestration/node-execution-coordinator.js +657 -0
- package/dist/services/flow-orchestration/node-execution-coordinator.js.map +1 -0
- package/dist/services/flow-orchestration.service.cjs +493 -0
- package/dist/services/flow-orchestration.service.cjs.map +1 -0
- package/dist/services/flow-orchestration.service.d.cts +149 -0
- package/dist/services/flow-orchestration.service.d.cts.map +1 -0
- package/dist/services/flow-orchestration.service.d.ts +149 -0
- package/dist/services/flow-orchestration.service.d.ts.map +1 -0
- package/dist/services/flow-orchestration.service.js +493 -0
- package/dist/services/flow-orchestration.service.js.map +1 -0
- package/dist/services/flow-runs/flow-runs.model.cjs +403 -0
- package/dist/services/flow-runs/flow-runs.model.cjs.map +1 -0
- package/dist/services/flow-runs/flow-runs.model.d.cts +113 -0
- package/dist/services/flow-runs/flow-runs.model.d.cts.map +1 -0
- package/dist/services/flow-runs/flow-runs.model.d.ts +113 -0
- package/dist/services/flow-runs/flow-runs.model.d.ts.map +1 -0
- package/dist/services/flow-runs/flow-runs.model.js +403 -0
- package/dist/services/flow-runs/flow-runs.model.js.map +1 -0
- package/dist/services/flow-runs/flow-runs.service.cjs +273 -0
- package/dist/services/flow-runs/flow-runs.service.cjs.map +1 -0
- package/dist/services/flow-runs/flow-runs.service.d.cts +129 -0
- package/dist/services/flow-runs/flow-runs.service.d.cts.map +1 -0
- package/dist/services/flow-runs/flow-runs.service.d.ts +129 -0
- package/dist/services/flow-runs/flow-runs.service.d.ts.map +1 -0
- package/dist/services/flow-runs/flow-runs.service.js +273 -0
- package/dist/services/flow-runs/flow-runs.service.js.map +1 -0
- package/dist/services/flow-validator.cjs +149 -0
- package/dist/services/flow-validator.cjs.map +1 -0
- package/dist/services/flow-validator.js +149 -0
- package/dist/services/flow-validator.js.map +1 -0
- package/dist/services/flow-versions/flow-versions.model.cjs +231 -0
- package/dist/services/flow-versions/flow-versions.model.cjs.map +1 -0
- package/dist/services/flow-versions/flow-versions.model.d.cts +55 -0
- package/dist/services/flow-versions/flow-versions.model.d.cts.map +1 -0
- package/dist/services/flow-versions/flow-versions.model.d.ts +55 -0
- package/dist/services/flow-versions/flow-versions.model.d.ts.map +1 -0
- package/dist/services/flow-versions/flow-versions.model.js +231 -0
- package/dist/services/flow-versions/flow-versions.model.js.map +1 -0
- package/dist/services/flow-versions/flow-versions.service.cjs +72 -0
- package/dist/services/flow-versions/flow-versions.service.cjs.map +1 -0
- package/dist/services/flow-versions/flow-versions.service.d.cts +63 -0
- package/dist/services/flow-versions/flow-versions.service.d.cts.map +1 -0
- package/dist/services/flow-versions/flow-versions.service.d.ts +63 -0
- package/dist/services/flow-versions/flow-versions.service.d.ts.map +1 -0
- package/dist/services/flow-versions/flow-versions.service.js +72 -0
- package/dist/services/flow-versions/flow-versions.service.js.map +1 -0
- package/dist/services/flow-versions/schemas-fresh.cjs +90 -0
- package/dist/services/flow-versions/schemas-fresh.cjs.map +1 -0
- package/dist/services/flow-versions/schemas-fresh.d.cts +201 -0
- package/dist/services/flow-versions/schemas-fresh.d.cts.map +1 -0
- package/dist/services/flow-versions/schemas-fresh.d.ts +201 -0
- package/dist/services/flow-versions/schemas-fresh.d.ts.map +1 -0
- package/dist/services/flow-versions/schemas-fresh.js +85 -0
- package/dist/services/flow-versions/schemas-fresh.js.map +1 -0
- package/dist/services/flows/flows.model.cjs +273 -0
- package/dist/services/flows/flows.model.cjs.map +1 -0
- package/dist/services/flows/flows.model.d.cts +105 -0
- package/dist/services/flows/flows.model.d.cts.map +1 -0
- package/dist/services/flows/flows.model.d.ts +105 -0
- package/dist/services/flows/flows.model.d.ts.map +1 -0
- package/dist/services/flows/flows.model.js +273 -0
- package/dist/services/flows/flows.model.js.map +1 -0
- package/dist/services/flows/flows.service.cjs +134 -0
- package/dist/services/flows/flows.service.cjs.map +1 -0
- package/dist/services/flows/flows.service.d.cts +105 -0
- package/dist/services/flows/flows.service.d.cts.map +1 -0
- package/dist/services/flows/flows.service.d.ts +105 -0
- package/dist/services/flows/flows.service.d.ts.map +1 -0
- package/dist/services/flows/flows.service.js +134 -0
- package/dist/services/flows/flows.service.js.map +1 -0
- package/dist/services/graph.service.cjs +375 -0
- package/dist/services/graph.service.cjs.map +1 -0
- package/dist/services/graph.service.d.cts +90 -0
- package/dist/services/graph.service.d.cts.map +1 -0
- package/dist/services/graph.service.d.ts +90 -0
- package/dist/services/graph.service.d.ts.map +1 -0
- package/dist/services/graph.service.js +375 -0
- package/dist/services/graph.service.js.map +1 -0
- package/dist/services/node-data.service.cjs +232 -0
- package/dist/services/node-data.service.cjs.map +1 -0
- package/dist/services/node-data.service.d.cts +119 -0
- package/dist/services/node-data.service.d.cts.map +1 -0
- package/dist/services/node-data.service.d.ts +119 -0
- package/dist/services/node-data.service.d.ts.map +1 -0
- package/dist/services/node-data.service.js +230 -0
- package/dist/services/node-data.service.js.map +1 -0
- package/dist/services/node-executions/node-execution.service.cjs +236 -0
- package/dist/services/node-executions/node-execution.service.cjs.map +1 -0
- package/dist/services/node-executions/node-execution.service.d.cts +126 -0
- package/dist/services/node-executions/node-execution.service.d.cts.map +1 -0
- package/dist/services/node-executions/node-execution.service.d.ts +126 -0
- package/dist/services/node-executions/node-execution.service.d.ts.map +1 -0
- package/dist/services/node-executions/node-execution.service.js +236 -0
- package/dist/services/node-executions/node-execution.service.js.map +1 -0
- package/dist/services/node-executions/node-executions.model.cjs +300 -0
- package/dist/services/node-executions/node-executions.model.cjs.map +1 -0
- package/dist/services/node-executions/node-executions.model.d.cts +102 -0
- package/dist/services/node-executions/node-executions.model.d.cts.map +1 -0
- package/dist/services/node-executions/node-executions.model.d.ts +102 -0
- package/dist/services/node-executions/node-executions.model.d.ts.map +1 -0
- package/dist/services/node-executions/node-executions.model.js +300 -0
- package/dist/services/node-executions/node-executions.model.js.map +1 -0
- package/dist/services/plugin-manager.cjs +205 -0
- package/dist/services/plugin-manager.cjs.map +1 -0
- package/dist/services/plugin-manager.js +205 -0
- package/dist/services/plugin-manager.js.map +1 -0
- package/dist/services/react-flow-renderer.service.cjs +236 -0
- package/dist/services/react-flow-renderer.service.cjs.map +1 -0
- package/dist/services/react-flow-renderer.service.d.cts +149 -0
- package/dist/services/react-flow-renderer.service.d.cts.map +1 -0
- package/dist/services/react-flow-renderer.service.d.ts +149 -0
- package/dist/services/react-flow-renderer.service.d.ts.map +1 -0
- package/dist/services/react-flow-renderer.service.js +235 -0
- package/dist/services/react-flow-renderer.service.js.map +1 -0
- package/dist/services/service-factory.cjs +301 -0
- package/dist/services/service-factory.cjs.map +1 -0
- package/dist/services/service-factory.d.cts +172 -0
- package/dist/services/service-factory.d.cts.map +1 -0
- package/dist/services/service-factory.d.ts +172 -0
- package/dist/services/service-factory.d.ts.map +1 -0
- package/dist/services/service-factory.js +301 -0
- package/dist/services/service-factory.js.map +1 -0
- package/dist/services/templating/index.cjs +2 -0
- package/dist/services/templating/index.d.ts +2 -0
- package/dist/services/templating/index.js +3 -0
- package/dist/services/templating/js-expression.service.cjs +148 -0
- package/dist/services/templating/js-expression.service.cjs.map +1 -0
- package/dist/services/templating/js-expression.service.d.cts +61 -0
- package/dist/services/templating/js-expression.service.d.cts.map +1 -0
- package/dist/services/templating/js-expression.service.d.ts +60 -0
- package/dist/services/templating/js-expression.service.d.ts.map +1 -0
- package/dist/services/templating/js-expression.service.js +143 -0
- package/dist/services/templating/js-expression.service.js.map +1 -0
- package/dist/services/templating/template.service.cjs +182 -0
- package/dist/services/templating/template.service.cjs.map +1 -0
- package/dist/services/templating/template.service.d.cts +62 -0
- package/dist/services/templating/template.service.d.cts.map +1 -0
- package/dist/services/templating/template.service.d.ts +62 -0
- package/dist/services/templating/template.service.d.ts.map +1 -0
- package/dist/services/templating/template.service.js +180 -0
- package/dist/services/templating/template.service.js.map +1 -0
- package/dist/services/triggers/cron-scheduler.service.cjs +141 -0
- package/dist/services/triggers/cron-scheduler.service.cjs.map +1 -0
- package/dist/services/triggers/cron-scheduler.service.d.cts +36 -0
- package/dist/services/triggers/cron-scheduler.service.d.cts.map +1 -0
- package/dist/services/triggers/cron-scheduler.service.d.ts +36 -0
- package/dist/services/triggers/cron-scheduler.service.d.ts.map +1 -0
- package/dist/services/triggers/cron-scheduler.service.js +140 -0
- package/dist/services/triggers/cron-scheduler.service.js.map +1 -0
- package/dist/services/triggers/flow-triggers.model.cjs +241 -0
- package/dist/services/triggers/flow-triggers.model.cjs.map +1 -0
- package/dist/services/triggers/flow-triggers.model.d.cts +53 -0
- package/dist/services/triggers/flow-triggers.model.d.cts.map +1 -0
- package/dist/services/triggers/flow-triggers.model.d.ts +53 -0
- package/dist/services/triggers/flow-triggers.model.d.ts.map +1 -0
- package/dist/services/triggers/flow-triggers.model.js +241 -0
- package/dist/services/triggers/flow-triggers.model.js.map +1 -0
- package/dist/services/triggers/flow-triggers.service.cjs +218 -0
- package/dist/services/triggers/flow-triggers.service.cjs.map +1 -0
- package/dist/services/triggers/flow-triggers.service.d.cts +77 -0
- package/dist/services/triggers/flow-triggers.service.d.cts.map +1 -0
- package/dist/services/triggers/flow-triggers.service.d.ts +77 -0
- package/dist/services/triggers/flow-triggers.service.d.ts.map +1 -0
- package/dist/services/triggers/flow-triggers.service.js +217 -0
- package/dist/services/triggers/flow-triggers.service.js.map +1 -0
- package/dist/services/triggers/index.cjs +3 -0
- package/dist/services/triggers/index.d.cts +4 -0
- package/dist/services/triggers/index.d.ts +4 -0
- package/dist/services/triggers/index.js +4 -0
- package/dist/services/triggers/trigger.types.d.cts +63 -0
- package/dist/services/triggers/trigger.types.d.cts.map +1 -0
- package/dist/services/triggers/trigger.types.d.ts +63 -0
- package/dist/services/triggers/trigger.types.d.ts.map +1 -0
- package/dist/types/agent-tool.types.cjs +20 -0
- package/dist/types/agent-tool.types.cjs.map +1 -0
- package/dist/types/agent-tool.types.d.cts +211 -0
- package/dist/types/agent-tool.types.d.cts.map +1 -0
- package/dist/types/agent-tool.types.d.ts +211 -0
- package/dist/types/agent-tool.types.d.ts.map +1 -0
- package/dist/types/agent-tool.types.js +18 -0
- package/dist/types/agent-tool.types.js.map +1 -0
- package/dist/types/auth.types.cjs +76 -0
- package/dist/types/auth.types.cjs.map +1 -0
- package/dist/types/auth.types.d.cts +235 -0
- package/dist/types/auth.types.d.cts.map +1 -0
- package/dist/types/auth.types.d.ts +235 -0
- package/dist/types/auth.types.d.ts.map +1 -0
- package/dist/types/auth.types.js +75 -0
- package/dist/types/auth.types.js.map +1 -0
- package/dist/types/base.cjs +25 -0
- package/dist/types/base.cjs.map +1 -0
- package/dist/types/base.d.cts +21 -0
- package/dist/types/base.d.cts.map +1 -0
- package/dist/types/base.d.ts +21 -0
- package/dist/types/base.d.ts.map +1 -0
- package/dist/types/base.js +24 -0
- package/dist/types/base.js.map +1 -0
- package/dist/types/common/errors.types.cjs +46 -0
- package/dist/types/common/errors.types.cjs.map +1 -0
- package/dist/types/common/errors.types.js +44 -0
- package/dist/types/common/errors.types.js.map +1 -0
- package/dist/types/graph-node-types.cjs +46 -0
- package/dist/types/graph-node-types.cjs.map +1 -0
- package/dist/types/graph-node-types.d.cts +32 -0
- package/dist/types/graph-node-types.d.cts.map +1 -0
- package/dist/types/graph-node-types.d.ts +32 -0
- package/dist/types/graph-node-types.d.ts.map +1 -0
- package/dist/types/graph-node-types.js +45 -0
- package/dist/types/graph-node-types.js.map +1 -0
- package/dist/types/node-config-update.types.d.cts +33 -0
- package/dist/types/node-config-update.types.d.cts.map +1 -0
- package/dist/types/node-config-update.types.d.ts +33 -0
- package/dist/types/node-config-update.types.d.ts.map +1 -0
- package/dist/types/node-definition.types.d.cts +88 -0
- package/dist/types/node-definition.types.d.cts.map +1 -0
- package/dist/types/node-definition.types.d.ts +88 -0
- package/dist/types/node-definition.types.d.ts.map +1 -0
- package/dist/types/node-execution.types.d.cts +39 -0
- package/dist/types/node-execution.types.d.cts.map +1 -0
- package/dist/types/node-execution.types.d.ts +39 -0
- package/dist/types/node-execution.types.d.ts.map +1 -0
- package/dist/types/node-io-types.cjs +19 -0
- package/dist/types/node-io-types.cjs.map +1 -0
- package/dist/types/node-io-types.d.cts +65 -0
- package/dist/types/node-io-types.d.cts.map +1 -0
- package/dist/types/node-io-types.d.ts +65 -0
- package/dist/types/node-io-types.d.ts.map +1 -0
- package/dist/types/node-io-types.js +18 -0
- package/dist/types/node-io-types.js.map +1 -0
- package/dist/types/node-output-schemas.cjs +51 -0
- package/dist/types/node-output-schemas.cjs.map +1 -0
- package/dist/types/node-output-schemas.js +50 -0
- package/dist/types/node-output-schemas.js.map +1 -0
- package/dist/types/plugin.types.d.cts +654 -0
- package/dist/types/plugin.types.d.cts.map +1 -0
- package/dist/types/plugin.types.d.ts +654 -0
- package/dist/types/plugin.types.d.ts.map +1 -0
- package/dist/types/schemas/flow/create-flow-version.schema.cjs +1 -0
- package/dist/types/schemas/flow/create-flow-version.schema.d.ts +1 -0
- package/dist/types/schemas/flow/create-flow-version.schema.js +2 -0
- package/dist/types/schemas/flow/create-flow.schema.cjs +9 -0
- package/dist/types/schemas/flow/create-flow.schema.cjs.map +1 -0
- package/dist/types/schemas/flow/create-flow.schema.d.cts +14 -0
- package/dist/types/schemas/flow/create-flow.schema.d.cts.map +1 -0
- package/dist/types/schemas/flow/create-flow.schema.d.ts +14 -0
- package/dist/types/schemas/flow/create-flow.schema.d.ts.map +1 -0
- package/dist/types/schemas/flow/create-flow.schema.js +10 -0
- package/dist/types/schemas/flow/create-flow.schema.js.map +1 -0
- package/dist/types/schemas/flow/delete-flow.schema.cjs +11 -0
- package/dist/types/schemas/flow/delete-flow.schema.cjs.map +1 -0
- package/dist/types/schemas/flow/delete-flow.schema.d.ts +1 -0
- package/dist/types/schemas/flow/delete-flow.schema.js +11 -0
- package/dist/types/schemas/flow/delete-flow.schema.js.map +1 -0
- package/dist/types/schemas/flow/flow-executions.schema.cjs +36 -0
- package/dist/types/schemas/flow/flow-executions.schema.cjs.map +1 -0
- package/dist/types/schemas/flow/flow-executions.schema.d.ts +1 -0
- package/dist/types/schemas/flow/flow-executions.schema.js +35 -0
- package/dist/types/schemas/flow/flow-executions.schema.js.map +1 -0
- package/dist/types/schemas/flow/get-flow-by-id-response.schema.cjs +7 -0
- package/dist/types/schemas/flow/get-flow-by-id-response.schema.cjs.map +1 -0
- package/dist/types/schemas/flow/get-flow-by-id-response.schema.d.ts +1 -0
- package/dist/types/schemas/flow/get-flow-by-id-response.schema.js +7 -0
- package/dist/types/schemas/flow/get-flow-by-id-response.schema.js.map +1 -0
- package/dist/types/schemas/flow/get-flow-versions-response.schema.cjs +1 -0
- package/dist/types/schemas/flow/get-flow-versions-response.schema.d.ts +1 -0
- package/dist/types/schemas/flow/get-flow-versions-response.schema.js +2 -0
- package/dist/types/schemas/flow/get-flows-response.schema.cjs +6 -0
- package/dist/types/schemas/flow/get-flows-response.schema.cjs.map +1 -0
- package/dist/types/schemas/flow/get-flows-response.schema.d.ts +1 -0
- package/dist/types/schemas/flow/get-flows-response.schema.js +7 -0
- package/dist/types/schemas/flow/get-flows-response.schema.js.map +1 -0
- package/dist/types/schemas/flow/index.cjs +9 -0
- package/dist/types/schemas/flow/index.d.ts +1 -0
- package/dist/types/schemas/flow/index.js +10 -0
- package/dist/types/schemas/flow/update-flow.schema.cjs +1 -0
- package/dist/types/schemas/flow/update-flow.schema.d.ts +1 -0
- package/dist/types/schemas/flow/update-flow.schema.js +2 -0
- package/dist/types/schemas/flow/validate-flow.schema.cjs +19 -0
- package/dist/types/schemas/flow/validate-flow.schema.cjs.map +1 -0
- package/dist/types/schemas/flow/validate-flow.schema.d.ts +1 -0
- package/dist/types/schemas/flow/validate-flow.schema.js +19 -0
- package/dist/types/schemas/flow/validate-flow.schema.js.map +1 -0
- package/dist/types/schemas/index.cjs +3 -0
- package/dist/types/schemas/index.d.ts +2 -0
- package/dist/types/schemas/index.js +4 -0
- package/dist/types/schemas/pagination-sort-filter.cjs +56 -0
- package/dist/types/schemas/pagination-sort-filter.cjs.map +1 -0
- package/dist/types/schemas/pagination-sort-filter.d.cts +38 -0
- package/dist/types/schemas/pagination-sort-filter.d.cts.map +1 -0
- package/dist/types/schemas/pagination-sort-filter.d.ts +38 -0
- package/dist/types/schemas/pagination-sort-filter.d.ts.map +1 -0
- package/dist/types/schemas/pagination-sort-filter.js +50 -0
- package/dist/types/schemas/pagination-sort-filter.js.map +1 -0
- package/dist/types/schemas-fresh/invect-config.cjs +181 -0
- package/dist/types/schemas-fresh/invect-config.cjs.map +1 -0
- package/dist/types/schemas-fresh/invect-config.d.cts +207 -0
- package/dist/types/schemas-fresh/invect-config.d.cts.map +1 -0
- package/dist/types/schemas-fresh/invect-config.d.ts +207 -0
- package/dist/types/schemas-fresh/invect-config.d.ts.map +1 -0
- package/dist/types/schemas-fresh/invect-config.js +174 -0
- package/dist/types/schemas-fresh/invect-config.js.map +1 -0
- package/dist/types/validation/common.schemas.cjs +41 -0
- package/dist/types/validation/common.schemas.cjs.map +1 -0
- package/dist/types/validation/common.schemas.js +39 -0
- package/dist/types/validation/common.schemas.js.map +1 -0
- package/dist/types/validation/flow.schemas.cjs +49 -0
- package/dist/types/validation/flow.schemas.cjs.map +1 -0
- package/dist/types/validation/flow.schemas.js +46 -0
- package/dist/types/validation/flow.schemas.js.map +1 -0
- package/dist/types/validation.cjs +49 -0
- package/dist/types/validation.cjs.map +1 -0
- package/dist/types/validation.d.cts +49 -0
- package/dist/types/validation.d.cts.map +1 -0
- package/dist/types/validation.d.ts +49 -0
- package/dist/types/validation.d.ts.map +1 -0
- package/dist/types/validation.js +48 -0
- package/dist/types/validation.js.map +1 -0
- package/dist/types-export.cjs +11 -0
- package/dist/types-export.d.cts +25 -0
- package/dist/types-export.d.ts +25 -0
- package/dist/types-export.js +5 -0
- package/dist/types-fresh.cjs +9 -0
- package/dist/types-fresh.cjs.map +1 -0
- package/dist/types-fresh.d.cts +129 -0
- package/dist/types-fresh.d.cts.map +1 -0
- package/dist/types-fresh.d.ts +129 -0
- package/dist/types-fresh.d.ts.map +1 -0
- package/dist/types-fresh.js +8 -0
- package/dist/types-fresh.js.map +1 -0
- package/dist/utils/id-generator.cjs +34 -0
- package/dist/utils/id-generator.cjs.map +1 -0
- package/dist/utils/id-generator.js +34 -0
- package/dist/utils/id-generator.js.map +1 -0
- package/dist/utils/logger.cjs +285 -0
- package/dist/utils/logger.cjs.map +1 -0
- package/dist/utils/logger.d.cts +161 -0
- package/dist/utils/logger.d.cts.map +1 -0
- package/dist/utils/logger.d.ts +160 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +282 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/node-slug.cjs +13 -0
- package/dist/utils/node-slug.cjs.map +1 -0
- package/dist/utils/node-slug.d.cts +8 -0
- package/dist/utils/node-slug.d.cts.map +1 -0
- package/dist/utils/node-slug.d.ts +8 -0
- package/dist/utils/node-slug.d.ts.map +1 -0
- package/dist/utils/node-slug.js +13 -0
- package/dist/utils/node-slug.js.map +1 -0
- package/dist/utils/provider-detection.cjs +72 -0
- package/dist/utils/provider-detection.cjs.map +1 -0
- package/dist/utils/provider-detection.js +72 -0
- package/dist/utils/provider-detection.js.map +1 -0
- package/dist/utils/url-safe-id.cjs +52 -0
- package/dist/utils/url-safe-id.cjs.map +1 -0
- package/dist/utils/url-safe-id.js +52 -0
- package/dist/utils/url-safe-id.js.map +1 -0
- package/package.json +121 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { DatabaseError, FlowNotFoundError } from "../../types/common/errors.types.js";
|
|
2
|
+
//#region src/services/flow-runs/flow-runs.service.ts
|
|
3
|
+
/**
|
|
4
|
+
* Core Execution Service implementation using database models
|
|
5
|
+
*/
|
|
6
|
+
var FlowRunsService = class {
|
|
7
|
+
initialized = false;
|
|
8
|
+
eventBus = null;
|
|
9
|
+
constructor(logger, databaseService, flowService) {
|
|
10
|
+
this.logger = logger;
|
|
11
|
+
this.databaseService = databaseService;
|
|
12
|
+
this.flowService = flowService;
|
|
13
|
+
}
|
|
14
|
+
/** Attach the event bus so state changes are broadcast to SSE subscribers. */
|
|
15
|
+
setEventBus(bus) {
|
|
16
|
+
this.eventBus = bus;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Initialize the service
|
|
20
|
+
*/
|
|
21
|
+
async initialize() {
|
|
22
|
+
if (this.initialized) {
|
|
23
|
+
this.logger.debug("Execution service already initialized");
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
try {
|
|
27
|
+
await this.flowService.initialize();
|
|
28
|
+
this.initialized = true;
|
|
29
|
+
this.logger.info("Execution service initialized successfully");
|
|
30
|
+
} catch (error) {
|
|
31
|
+
this.logger.error("Failed to initialize execution service", { error });
|
|
32
|
+
throw new DatabaseError("Failed to initialize execution service", { error });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Create a new flow run record
|
|
37
|
+
*/
|
|
38
|
+
async createFlowRun(data) {
|
|
39
|
+
this.logger.debug("Creating flow run record", {
|
|
40
|
+
flowId: data.flowId,
|
|
41
|
+
flowVersion: data.flowVersion
|
|
42
|
+
});
|
|
43
|
+
try {
|
|
44
|
+
const flowRun = await this.databaseService.flowRuns.create({
|
|
45
|
+
flowId: data.flowId,
|
|
46
|
+
flowVersion: data.flowVersion,
|
|
47
|
+
inputs: data.inputs,
|
|
48
|
+
createdBy: data.createdBy,
|
|
49
|
+
triggerType: data.triggerType,
|
|
50
|
+
triggerId: data.triggerId,
|
|
51
|
+
triggerNodeId: data.triggerNodeId,
|
|
52
|
+
triggerData: data.triggerData
|
|
53
|
+
});
|
|
54
|
+
this.logger.debug("Flow run created successfully", { flowRunId: flowRun.id });
|
|
55
|
+
this.eventBus?.emitFlowRunUpdate(flowRun);
|
|
56
|
+
return flowRun;
|
|
57
|
+
} catch (error) {
|
|
58
|
+
this.logger.error("Failed to create flow run", { error });
|
|
59
|
+
throw new DatabaseError("Failed to create flow run", { error });
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get execution by ID
|
|
64
|
+
*/
|
|
65
|
+
async getRunById(flowRunId) {
|
|
66
|
+
this.logger.debug("Retrieving execution by ID", { flowRunId });
|
|
67
|
+
try {
|
|
68
|
+
const execution = await this.databaseService.flowRuns.findById(flowRunId);
|
|
69
|
+
if (!execution) {
|
|
70
|
+
this.logger.warn("Execution not found", { flowRunId });
|
|
71
|
+
throw new FlowNotFoundError(`Execution with ID ${flowRunId} not found`);
|
|
72
|
+
}
|
|
73
|
+
this.logger.debug("Execution retrieved successfully", { flowRunId });
|
|
74
|
+
return execution;
|
|
75
|
+
} catch (error) {
|
|
76
|
+
if (error instanceof FlowNotFoundError) throw error;
|
|
77
|
+
this.logger.error("Failed to retrieve execution", {
|
|
78
|
+
flowRunId,
|
|
79
|
+
error
|
|
80
|
+
});
|
|
81
|
+
throw new DatabaseError("Failed to retrieve execution", { error });
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Get flow executions
|
|
86
|
+
*/
|
|
87
|
+
async listRunsByFlowId(flowId) {
|
|
88
|
+
try {
|
|
89
|
+
return await this.databaseService.flowRuns.listRunsByFlowId(flowId);
|
|
90
|
+
} catch (error) {
|
|
91
|
+
this.logger.error("Failed to get flow executions", {
|
|
92
|
+
flowId,
|
|
93
|
+
error
|
|
94
|
+
});
|
|
95
|
+
throw new DatabaseError("Failed to get flow executions", { error });
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Retry execution
|
|
100
|
+
*/
|
|
101
|
+
async retryRun(flowRunId) {
|
|
102
|
+
try {
|
|
103
|
+
await this.getRunById(flowRunId);
|
|
104
|
+
throw new DatabaseError("Retry execution not implemented - should be handled by orchestration service");
|
|
105
|
+
} catch (error) {
|
|
106
|
+
this.logger.error("Failed to retry execution", {
|
|
107
|
+
flowRunId,
|
|
108
|
+
error
|
|
109
|
+
});
|
|
110
|
+
throw new DatabaseError("Failed to retry execution", { error });
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Get all executions with optional filtering and pagination
|
|
115
|
+
*/
|
|
116
|
+
async listRuns(options) {
|
|
117
|
+
try {
|
|
118
|
+
return await this.databaseService.flowRuns.findAll(options);
|
|
119
|
+
} catch (error) {
|
|
120
|
+
this.logger.error("Failed to retrieve executions", { error });
|
|
121
|
+
throw new DatabaseError("Failed to retrieve executions", { error });
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Cancel execution
|
|
126
|
+
*/
|
|
127
|
+
async cancelRun(flowRunId) {
|
|
128
|
+
this.logger.info("Cancelling execution", { flowRunId });
|
|
129
|
+
try {
|
|
130
|
+
const execution = await this.getRunById(flowRunId);
|
|
131
|
+
if (execution.status === "SUCCESS" || execution.status === "FAILED" || execution.status === "CANCELLED") throw new DatabaseError(`Cannot cancel execution in ${execution.status} state`);
|
|
132
|
+
await this.databaseService.flowRuns.update(flowRunId, {
|
|
133
|
+
status: "CANCELLED",
|
|
134
|
+
completedAt: /* @__PURE__ */ new Date()
|
|
135
|
+
});
|
|
136
|
+
this.logger.info("Execution cancelled successfully", { flowRunId });
|
|
137
|
+
return {
|
|
138
|
+
message: "Execution cancelled",
|
|
139
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
140
|
+
};
|
|
141
|
+
} catch (error) {
|
|
142
|
+
if (error instanceof FlowNotFoundError || error instanceof DatabaseError) throw error;
|
|
143
|
+
this.logger.error("Failed to cancel execution", {
|
|
144
|
+
flowRunId,
|
|
145
|
+
error
|
|
146
|
+
});
|
|
147
|
+
throw new DatabaseError("Failed to cancel execution", { error });
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Pause execution
|
|
152
|
+
*/
|
|
153
|
+
async pauseRun(flowRunId, reason = "USER") {
|
|
154
|
+
this.logger.info("Pausing execution", {
|
|
155
|
+
flowRunId,
|
|
156
|
+
reason
|
|
157
|
+
});
|
|
158
|
+
try {
|
|
159
|
+
const execution = await this.getRunById(flowRunId);
|
|
160
|
+
if (execution.status !== "RUNNING") throw new DatabaseError(`Cannot pause execution in ${execution.status} state`);
|
|
161
|
+
await this.databaseService.flowRuns.update(flowRunId, { status: "PAUSED" });
|
|
162
|
+
this.logger.info("Execution paused successfully", {
|
|
163
|
+
flowRunId,
|
|
164
|
+
reason
|
|
165
|
+
});
|
|
166
|
+
return {
|
|
167
|
+
message: "Execution paused",
|
|
168
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
169
|
+
};
|
|
170
|
+
} catch (error) {
|
|
171
|
+
if (error instanceof FlowNotFoundError || error instanceof DatabaseError) throw error;
|
|
172
|
+
this.logger.error("Failed to pause execution", {
|
|
173
|
+
flowRunId,
|
|
174
|
+
error
|
|
175
|
+
});
|
|
176
|
+
throw new DatabaseError("Failed to pause execution", { error });
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Resume execution - COMPLETE IMPLEMENTATION
|
|
181
|
+
*/
|
|
182
|
+
async resumeRun(flowRunId) {
|
|
183
|
+
this.logger.info("Resuming execution", { flowRunId });
|
|
184
|
+
try {
|
|
185
|
+
const execution = await this.getRunById(flowRunId);
|
|
186
|
+
if (!["PAUSED", "PAUSED_FOR_BATCH"].includes(execution.status)) throw new DatabaseError(`Cannot resume execution in ${execution.status} state`);
|
|
187
|
+
await this.databaseService.flowRuns.update(flowRunId, { status: "RUNNING" });
|
|
188
|
+
if (execution.status === "PAUSED") {
|
|
189
|
+
if (!(await this.flowService.getFlowById(execution.flowId))?.flowVersion?.invectDefinition) throw new DatabaseError("Flow definition not found for resume");
|
|
190
|
+
this.logger.warn("Manual resume not fully implemented - requires orchestration service injection");
|
|
191
|
+
}
|
|
192
|
+
this.logger.info("Execution resumed successfully", { flowRunId });
|
|
193
|
+
return {
|
|
194
|
+
message: "Execution resumed",
|
|
195
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
196
|
+
};
|
|
197
|
+
} catch (error) {
|
|
198
|
+
if (error instanceof FlowNotFoundError || error instanceof DatabaseError) throw error;
|
|
199
|
+
this.logger.error("Failed to resume execution", {
|
|
200
|
+
flowRunId,
|
|
201
|
+
error
|
|
202
|
+
});
|
|
203
|
+
throw new DatabaseError("Failed to resume execution", { error });
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Update execution status
|
|
208
|
+
*/
|
|
209
|
+
async updateRunStatus(flowRunId, status, data) {
|
|
210
|
+
try {
|
|
211
|
+
this.logger.debug("Updating execution status", {
|
|
212
|
+
flowRunId,
|
|
213
|
+
status,
|
|
214
|
+
data
|
|
215
|
+
});
|
|
216
|
+
const updateInput = {
|
|
217
|
+
status,
|
|
218
|
+
completedAt: status !== "PENDING" && status !== "RUNNING" && status !== "PAUSED" ? /* @__PURE__ */ new Date() : void 0,
|
|
219
|
+
...data
|
|
220
|
+
};
|
|
221
|
+
const updatedExecution = await this.databaseService.flowRuns.update(flowRunId, updateInput);
|
|
222
|
+
this.logger.debug("Execution status updated successfully", {
|
|
223
|
+
flowRunId,
|
|
224
|
+
status: updatedExecution.status
|
|
225
|
+
});
|
|
226
|
+
this.eventBus?.emitFlowRunUpdate(updatedExecution);
|
|
227
|
+
return updatedExecution;
|
|
228
|
+
} catch (error) {
|
|
229
|
+
this.logger.error("Failed to update execution status", {
|
|
230
|
+
flowRunId,
|
|
231
|
+
status,
|
|
232
|
+
error
|
|
233
|
+
});
|
|
234
|
+
throw new DatabaseError("Failed to update execution status", { error });
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Update heartbeat timestamp for a running flow.
|
|
239
|
+
* Called periodically by the execution coordinator.
|
|
240
|
+
*/
|
|
241
|
+
async updateHeartbeat(flowRunId) {
|
|
242
|
+
await this.databaseService.flowRuns.updateHeartbeat(flowRunId);
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Find and fail stale flow runs whose heartbeat is older than the threshold.
|
|
246
|
+
* Returns the count of runs that were marked as FAILED.
|
|
247
|
+
*/
|
|
248
|
+
async failStaleRuns(thresholdMs) {
|
|
249
|
+
return this.databaseService.flowRuns.failStaleRuns(thresholdMs);
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Get dashboard statistics: run counts by status, both total and within a time window.
|
|
253
|
+
*/
|
|
254
|
+
async getStats() {
|
|
255
|
+
const twentyFourHoursAgo = /* @__PURE__ */ new Date(Date.now() - 1440 * 60 * 1e3);
|
|
256
|
+
const [totalRuns, recentRuns] = await Promise.all([this.databaseService.flowRuns.countByStatus(), this.databaseService.flowRuns.countByStatus(twentyFourHoursAgo)]);
|
|
257
|
+
return {
|
|
258
|
+
totalRuns,
|
|
259
|
+
recentRuns
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Close the service
|
|
264
|
+
*/
|
|
265
|
+
async close() {
|
|
266
|
+
this.logger.debug("Closing execution service");
|
|
267
|
+
this.initialized = false;
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
//#endregion
|
|
271
|
+
export { FlowRunsService };
|
|
272
|
+
|
|
273
|
+
//# sourceMappingURL=flow-runs.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-runs.service.js","names":[],"sources":["../../../src/services/flow-runs/flow-runs.service.ts"],"sourcesContent":["import type { FlowsService } from '../flows/flows.service';\nimport type { DatabaseService } from '../database/database.service';\nimport { Logger, PaginatedResponse, QueryOptions } from 'src/types/schemas';\nimport { DatabaseError, FlowNotFoundError } from 'src/types/common/errors.types';\nimport { FlowRunStatus } from 'src/types/base';\n\nimport { NodeExecution } from '../node-executions/node-executions.model';\nimport { FlowRun, UpdateFlowRunInput } from './flow-runs.model';\nimport type { ExecutionEventBus } from '../execution-event-bus';\n\nexport interface FlowInputs {\n [key: string]: unknown;\n}\n\nexport type FlowRunResult = {\n status: FlowRunStatus;\n flowRunId: string;\n startedAt: Date;\n error?: string;\n metadata?: Record<string, unknown>;\n completedAt?: Date;\n duration?: number;\n outputs?: Record<string, unknown>;\n /** Per-node error messages keyed by nodeId (only present when nodes failed) */\n nodeErrors?: Record<string, string>;\n inputs?: Record<string, unknown>;\n traces: NodeExecution[];\n};\n\nexport type ExecuteFlowOptions = {\n version?: number | 'latest';\n initiatedBy?: string;\n useBatchProcessing?: boolean;\n};\n\n/**\n * Core Execution Service implementation using database models\n */\nexport class FlowRunsService {\n private initialized: boolean = false;\n\n private eventBus: ExecutionEventBus | null = null;\n\n constructor(\n private readonly logger: Logger,\n private readonly databaseService: DatabaseService,\n private readonly flowService: FlowsService,\n ) {}\n\n /** Attach the event bus so state changes are broadcast to SSE subscribers. */\n setEventBus(bus: ExecutionEventBus): void {\n this.eventBus = bus;\n }\n\n /**\n * Initialize the service\n */\n async initialize(): Promise<void> {\n if (this.initialized) {\n this.logger.debug('Execution service already initialized');\n return;\n }\n\n try {\n // Ensure database service is initialized\n await this.flowService.initialize();\n this.initialized = true;\n this.logger.info('Execution service initialized successfully');\n } catch (error) {\n this.logger.error('Failed to initialize execution service', { error });\n throw new DatabaseError('Failed to initialize execution service', { error });\n }\n }\n\n /**\n * Create a new flow run record\n */\n async createFlowRun(data: {\n flowId: string;\n flowVersion: number;\n inputs: FlowInputs;\n createdBy?: string;\n // Trigger provenance (populated when started via webhook/cron)\n triggerType?: string;\n triggerId?: string;\n triggerNodeId?: string;\n triggerData?: Record<string, unknown>;\n }): Promise<FlowRun> {\n this.logger.debug('Creating flow run record', {\n flowId: data.flowId,\n flowVersion: data.flowVersion,\n });\n\n try {\n const flowRun = await this.databaseService.flowRuns.create({\n flowId: data.flowId,\n flowVersion: data.flowVersion,\n inputs: data.inputs,\n createdBy: data.createdBy,\n triggerType: data.triggerType,\n triggerId: data.triggerId,\n triggerNodeId: data.triggerNodeId,\n triggerData: data.triggerData,\n });\n\n this.logger.debug('Flow run created successfully', { flowRunId: flowRun.id });\n this.eventBus?.emitFlowRunUpdate(flowRun);\n return flowRun;\n } catch (error) {\n this.logger.error('Failed to create flow run', { error });\n throw new DatabaseError('Failed to create flow run', { error });\n }\n }\n\n /**\n * Get execution by ID\n */\n async getRunById(flowRunId: string): Promise<FlowRun> {\n this.logger.debug('Retrieving execution by ID', { flowRunId });\n\n try {\n const execution = await this.databaseService.flowRuns.findById(flowRunId);\n\n if (!execution) {\n this.logger.warn('Execution not found', { flowRunId });\n throw new FlowNotFoundError(`Execution with ID ${flowRunId} not found`);\n }\n\n this.logger.debug('Execution retrieved successfully', { flowRunId });\n return execution;\n } catch (error) {\n if (error instanceof FlowNotFoundError) {\n throw error;\n }\n this.logger.error('Failed to retrieve execution', { flowRunId, error });\n throw new DatabaseError('Failed to retrieve execution', { error });\n }\n }\n\n /**\n * Get flow executions\n */\n async listRunsByFlowId(flowId: string): Promise<FlowRun[]> {\n try {\n const executions = await this.databaseService.flowRuns.listRunsByFlowId(flowId);\n return executions;\n } catch (error) {\n this.logger.error('Failed to get flow executions', { flowId, error });\n throw new DatabaseError('Failed to get flow executions', { error });\n }\n }\n\n /**\n * Retry execution\n */\n async retryRun(flowRunId: string) {\n try {\n const _execution = await this.getRunById(flowRunId);\n\n // TODO: This should delegate to the orchestration service\n // For now, return the execution as-is\n throw new DatabaseError(\n 'Retry execution not implemented - should be handled by orchestration service',\n );\n } catch (error) {\n this.logger.error('Failed to retry execution', { flowRunId, error });\n throw new DatabaseError('Failed to retry execution', { error });\n }\n }\n\n /**\n * Get all executions with optional filtering and pagination\n */\n async listRuns(options?: QueryOptions<FlowRun>): Promise<PaginatedResponse<FlowRun>> {\n try {\n return await this.databaseService.flowRuns.findAll(options);\n } catch (error) {\n this.logger.error('Failed to retrieve executions', { error });\n throw new DatabaseError('Failed to retrieve executions', { error });\n }\n }\n\n /**\n * Cancel execution\n */\n async cancelRun(flowRunId: string): Promise<{ message: string; timestamp: string }> {\n this.logger.info('Cancelling execution', { flowRunId });\n\n try {\n // First check if execution exists and can be cancelled\n const execution = await this.getRunById(flowRunId);\n\n if (\n execution.status === 'SUCCESS' ||\n execution.status === 'FAILED' ||\n execution.status === 'CANCELLED'\n ) {\n throw new DatabaseError(`Cannot cancel execution in ${execution.status} state`);\n }\n\n await this.databaseService.flowRuns.update(flowRunId, {\n status: 'CANCELLED' as FlowRunStatus,\n completedAt: new Date(),\n } as UpdateFlowRunInput);\n\n this.logger.info('Execution cancelled successfully', { flowRunId });\n\n return {\n message: 'Execution cancelled',\n timestamp: new Date().toISOString(),\n };\n } catch (error) {\n if (error instanceof FlowNotFoundError || error instanceof DatabaseError) {\n throw error;\n }\n this.logger.error('Failed to cancel execution', { flowRunId, error });\n throw new DatabaseError('Failed to cancel execution', { error });\n }\n }\n\n /**\n * Pause execution\n */\n async pauseRun(\n flowRunId: string,\n reason: string = 'USER',\n ): Promise<{ message: string; timestamp: string }> {\n this.logger.info('Pausing execution', { flowRunId, reason });\n\n try {\n // First check if execution exists and can be paused\n const execution = await this.getRunById(flowRunId);\n\n if (execution.status !== 'RUNNING') {\n throw new DatabaseError(`Cannot pause execution in ${execution.status} state`);\n }\n\n await this.databaseService.flowRuns.update(flowRunId, {\n status: 'PAUSED' as FlowRunStatus,\n // Note: pausedAt and pauseReason would need to be added to schema if needed\n } as UpdateFlowRunInput);\n\n this.logger.info('Execution paused successfully', { flowRunId, reason });\n\n return {\n message: 'Execution paused',\n timestamp: new Date().toISOString(),\n };\n } catch (error) {\n if (error instanceof FlowNotFoundError || error instanceof DatabaseError) {\n throw error;\n }\n this.logger.error('Failed to pause execution', { flowRunId, error });\n throw new DatabaseError('Failed to pause execution', { error });\n }\n }\n\n /**\n * Resume execution - COMPLETE IMPLEMENTATION\n */\n async resumeRun(flowRunId: string): Promise<{ message: string; timestamp: string }> {\n this.logger.info('Resuming execution', { flowRunId });\n\n try {\n // Get execution and validate state\n const execution = await this.getRunById(flowRunId);\n\n // Check if execution can be resumed\n if (!['PAUSED', 'PAUSED_FOR_BATCH'].includes(execution.status)) {\n throw new DatabaseError(`Cannot resume execution in ${execution.status} state`);\n }\n\n // Update database status to RUNNING\n await this.databaseService.flowRuns.update(flowRunId, {\n status: 'RUNNING' as FlowRunStatus,\n } as UpdateFlowRunInput);\n\n // For manual pause, restart orchestration (PAUSED_FOR_BATCH handled automatically)\n if (execution.status === 'PAUSED') {\n // Get flow definition for resumption\n const flow = await this.flowService.getFlowById(execution.flowId);\n\n if (!flow?.flowVersion?.invectDefinition) {\n throw new DatabaseError('Flow definition not found for resume');\n }\n\n // Resume execution through orchestration\n // TODO: Need to inject orchestration service or implement resume logic differently\n this.logger.warn(\n 'Manual resume not fully implemented - requires orchestration service injection',\n );\n }\n\n // Log successful resume\n this.logger.info('Execution resumed successfully', { flowRunId });\n\n // Return success response\n return {\n message: 'Execution resumed',\n timestamp: new Date().toISOString(),\n };\n } catch (error) {\n // Handle resume errors\n if (error instanceof FlowNotFoundError || error instanceof DatabaseError) {\n throw error;\n }\n this.logger.error('Failed to resume execution', { flowRunId, error });\n throw new DatabaseError('Failed to resume execution', { error });\n }\n }\n\n /**\n * Update execution status\n */\n async updateRunStatus(\n flowRunId: string,\n status: FlowRunStatus,\n data?: {\n outputs?: Record<string, unknown>;\n error?: string;\n },\n ): Promise<FlowRun> {\n try {\n this.logger.debug('Updating execution status', { flowRunId, status, data });\n\n const updateInput: UpdateFlowRunInput = {\n status,\n completedAt:\n status !== 'PENDING' && status !== 'RUNNING' && status !== 'PAUSED'\n ? new Date()\n : undefined,\n ...data,\n };\n\n const updatedExecution = await this.databaseService.flowRuns.update(flowRunId, updateInput);\n\n this.logger.debug('Execution status updated successfully', {\n flowRunId,\n status: updatedExecution.status,\n });\n this.eventBus?.emitFlowRunUpdate(updatedExecution);\n return updatedExecution;\n } catch (error) {\n this.logger.error('Failed to update execution status', { flowRunId, status, error });\n throw new DatabaseError('Failed to update execution status', { error });\n }\n }\n\n /**\n * Update heartbeat timestamp for a running flow.\n * Called periodically by the execution coordinator.\n */\n async updateHeartbeat(flowRunId: string): Promise<void> {\n await this.databaseService.flowRuns.updateHeartbeat(flowRunId);\n }\n\n /**\n * Find and fail stale flow runs whose heartbeat is older than the threshold.\n * Returns the count of runs that were marked as FAILED.\n */\n async failStaleRuns(thresholdMs: number): Promise<number> {\n return this.databaseService.flowRuns.failStaleRuns(thresholdMs);\n }\n\n /**\n * Get dashboard statistics: run counts by status, both total and within a time window.\n */\n async getStats(): Promise<{\n totalRuns: Record<string, number>;\n recentRuns: Record<string, number>;\n }> {\n const twentyFourHoursAgo = new Date(Date.now() - 24 * 60 * 60 * 1000);\n const [totalRuns, recentRuns] = await Promise.all([\n this.databaseService.flowRuns.countByStatus(),\n this.databaseService.flowRuns.countByStatus(twentyFourHoursAgo),\n ]);\n return { totalRuns, recentRuns };\n }\n\n /**\n * Close the service\n */\n async close(): Promise<void> {\n this.logger.debug('Closing execution service');\n this.initialized = false;\n // Database service lifecycle is managed externally\n }\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
const require_graph_service = require("./graph.service.cjs");
|
|
2
|
+
const require_validation = require("../types/validation.cjs");
|
|
3
|
+
//#region src/services/flow-validator.ts
|
|
4
|
+
/**
|
|
5
|
+
* Checks whether a node type is an entry point (receives external data, not flow data).
|
|
6
|
+
* Entry points: trigger actions and legacy core.input / INPUT nodes.
|
|
7
|
+
*/
|
|
8
|
+
function isEntryPointNode(nodeType) {
|
|
9
|
+
return nodeType === "INPUT" || nodeType === "core.input" || nodeType.startsWith("trigger.");
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Static flow validator.
|
|
13
|
+
*
|
|
14
|
+
* Designed to help an agent (or user) verify that a flow definition will
|
|
15
|
+
* execute correctly. This does NOT prevent saving — it only reports issues.
|
|
16
|
+
*
|
|
17
|
+
* Errors = the flow WILL fail at execution time (topological sort throws, etc.)
|
|
18
|
+
* Warnings = the flow will run but something looks unintentional.
|
|
19
|
+
*/
|
|
20
|
+
var FlowValidator = class {
|
|
21
|
+
static validateFlowDefinition(flowDefinition) {
|
|
22
|
+
try {
|
|
23
|
+
const context = new require_validation.ValidationContext(flowDefinition, this.analyzeGraph(flowDefinition.nodes, flowDefinition.edges));
|
|
24
|
+
this.validateNotEmpty(context);
|
|
25
|
+
this.validateEdgeReferences(context);
|
|
26
|
+
this.validateNoSelfReferences(context);
|
|
27
|
+
this.validateNoDuplicateEdges(context);
|
|
28
|
+
this.validateNoCycles(context);
|
|
29
|
+
this.validateEntryPoints(context);
|
|
30
|
+
this.validateNoDisconnectedNodes(context);
|
|
31
|
+
this.validateSingleManualTrigger(context);
|
|
32
|
+
return this.buildResult(context);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
return {
|
|
35
|
+
isValid: false,
|
|
36
|
+
errors: [{
|
|
37
|
+
severity: "error",
|
|
38
|
+
type: "VALIDATION_SYSTEM_ERROR",
|
|
39
|
+
message: `Validation system error: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
40
|
+
}],
|
|
41
|
+
warnings: []
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
static analyzeGraph(nodes, edges) {
|
|
46
|
+
const nodeMap = new Map(nodes.map((n) => [n.id, n]));
|
|
47
|
+
const edgeMap = new Map(edges.map((e) => [e.id, e]));
|
|
48
|
+
const incomingEdges = /* @__PURE__ */ new Map();
|
|
49
|
+
const outgoingEdges = /* @__PURE__ */ new Map();
|
|
50
|
+
for (const node of nodes) {
|
|
51
|
+
incomingEdges.set(node.id, require_graph_service.GraphService.getIncomingEdges(node.id, edges));
|
|
52
|
+
outgoingEdges.set(node.id, require_graph_service.GraphService.getOutgoingEdges(node.id, edges));
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
nodeMap,
|
|
56
|
+
edgeMap,
|
|
57
|
+
incomingEdges,
|
|
58
|
+
outgoingEdges
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
static validateNotEmpty(context) {
|
|
62
|
+
if (context.definition.nodes.length === 0) context.addWarning("EMPTY_FLOW", "Flow has no nodes");
|
|
63
|
+
}
|
|
64
|
+
static validateEdgeReferences(context) {
|
|
65
|
+
const { nodeMap } = context.analysis;
|
|
66
|
+
for (const edge of context.definition.edges) {
|
|
67
|
+
if (!nodeMap.has(edge.source)) context.addError("INVALID_EDGE_REFERENCE", "Edge references non-existent source node", {
|
|
68
|
+
edgeId: edge.id,
|
|
69
|
+
sourceNodeId: edge.source,
|
|
70
|
+
targetNodeId: edge.target
|
|
71
|
+
});
|
|
72
|
+
if (!nodeMap.has(edge.target)) context.addError("INVALID_EDGE_REFERENCE", "Edge references non-existent target node", {
|
|
73
|
+
edgeId: edge.id,
|
|
74
|
+
sourceNodeId: edge.source,
|
|
75
|
+
targetNodeId: edge.target
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
static validateNoSelfReferences(context) {
|
|
80
|
+
for (const edge of context.definition.edges) if (edge.source === edge.target) context.addError("SELF_REFERENCING_EDGE", "Edge connects a node to itself", {
|
|
81
|
+
edgeId: edge.id,
|
|
82
|
+
nodeId: edge.source
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
static validateNoDuplicateEdges(context) {
|
|
86
|
+
const seen = /* @__PURE__ */ new Set();
|
|
87
|
+
for (const edge of context.definition.edges) {
|
|
88
|
+
const key = `${edge.source}:${edge.sourceHandle ?? ""}→${edge.target}:${edge.targetHandle ?? ""}`;
|
|
89
|
+
if (seen.has(key)) context.addWarning("DUPLICATE_EDGE", "Duplicate connection between the same nodes", {
|
|
90
|
+
edgeId: edge.id,
|
|
91
|
+
sourceNodeId: edge.source,
|
|
92
|
+
targetNodeId: edge.target
|
|
93
|
+
});
|
|
94
|
+
seen.add(key);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
static validateNoCycles(context) {
|
|
98
|
+
const { nodes, edges } = context.definition;
|
|
99
|
+
const result = require_graph_service.GraphService.hasCycleDetection(nodes, edges);
|
|
100
|
+
if (result.hasCycle && result.cyclePath) context.addError("CIRCULAR_DEPENDENCY", "Flow contains a cycle and cannot be executed", { additionalContext: {
|
|
101
|
+
cyclePath: result.cyclePath,
|
|
102
|
+
involvedNodeIds: result.cyclePath.slice(0, -1)
|
|
103
|
+
} });
|
|
104
|
+
}
|
|
105
|
+
static validateEntryPoints(context) {
|
|
106
|
+
const { incomingEdges } = context.analysis;
|
|
107
|
+
for (const node of context.definition.nodes) {
|
|
108
|
+
if (!isEntryPointNode(node.type)) continue;
|
|
109
|
+
const incoming = incomingEdges.get(node.id) || [];
|
|
110
|
+
if (incoming.length > 0) context.addWarning("ENTRY_NODE_HAS_INCOMING_EDGES", `${node.label || node.type} is an entry-point node and should not have incoming connections`, {
|
|
111
|
+
nodeId: node.id,
|
|
112
|
+
sourceNodeType: node.type,
|
|
113
|
+
additionalContext: { incomingEdgeCount: incoming.length }
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
static validateNoDisconnectedNodes(context) {
|
|
118
|
+
const { incomingEdges, outgoingEdges } = context.analysis;
|
|
119
|
+
if (context.definition.nodes.length < 2) return;
|
|
120
|
+
for (const node of context.definition.nodes) {
|
|
121
|
+
const incoming = incomingEdges.get(node.id) || [];
|
|
122
|
+
const outgoing = outgoingEdges.get(node.id) || [];
|
|
123
|
+
if (incoming.length === 0 && outgoing.length === 0) context.addWarning("DISCONNECTED_NODE", "Node has no connections to other nodes", {
|
|
124
|
+
nodeId: node.id,
|
|
125
|
+
sourceNodeType: node.type
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
static validateSingleManualTrigger(context) {
|
|
130
|
+
const manualTriggers = context.definition.nodes.filter((n) => n.type === "trigger.manual");
|
|
131
|
+
if (manualTriggers.length > 1) context.addError("MULTIPLE_MANUAL_TRIGGERS", `Only one Manual Trigger is allowed per flow, but ${manualTriggers.length} were found`, { additionalContext: { triggerNodeIds: manualTriggers.map((n) => n.id) } });
|
|
132
|
+
}
|
|
133
|
+
static buildResult(context) {
|
|
134
|
+
const warnings = context.issues.filter((i) => i.severity === "warning");
|
|
135
|
+
if (context.hasErrors()) return {
|
|
136
|
+
isValid: false,
|
|
137
|
+
errors: context.issues.filter((i) => i.severity === "error"),
|
|
138
|
+
warnings
|
|
139
|
+
};
|
|
140
|
+
return {
|
|
141
|
+
isValid: true,
|
|
142
|
+
warnings: warnings.length > 0 ? warnings : void 0
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
//#endregion
|
|
147
|
+
exports.FlowValidator = FlowValidator;
|
|
148
|
+
|
|
149
|
+
//# sourceMappingURL=flow-validator.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow-validator.cjs","names":["ValidationContext","GraphService"],"sources":["../../src/services/flow-validator.ts"],"sourcesContent":["import {\n FlowValidationResult,\n ValidationContext,\n GraphAnalysis,\n FlowValidationError,\n FlowValidationWarning,\n} from '../types/validation';\nimport { InvectDefinition, FlowNodeDefinitions, FlowEdge } from './flow-versions/schemas-fresh';\nimport { GraphService } from './graph.service';\n\n/**\n * Checks whether a node type is an entry point (receives external data, not flow data).\n * Entry points: trigger actions and legacy core.input / INPUT nodes.\n */\nfunction isEntryPointNode(nodeType: string): boolean {\n return nodeType === 'INPUT' || nodeType === 'core.input' || nodeType.startsWith('trigger.');\n}\n\n/**\n * Static flow validator.\n *\n * Designed to help an agent (or user) verify that a flow definition will\n * execute correctly. This does NOT prevent saving — it only reports issues.\n *\n * Errors = the flow WILL fail at execution time (topological sort throws, etc.)\n * Warnings = the flow will run but something looks unintentional.\n */\nexport class FlowValidator {\n static validateFlowDefinition(flowDefinition: InvectDefinition): FlowValidationResult {\n try {\n const context = new ValidationContext(\n flowDefinition,\n this.analyzeGraph(flowDefinition.nodes, flowDefinition.edges),\n );\n\n // Phase 1: Empty flow\n this.validateNotEmpty(context);\n\n // Phase 2: Edge integrity — edges must reference existing nodes\n this.validateEdgeReferences(context);\n\n // Phase 3: Self-referencing edges (source === target)\n this.validateNoSelfReferences(context);\n\n // Phase 4: Duplicate edges (same source→target on same handles)\n this.validateNoDuplicateEdges(context);\n\n // Phase 5: Cycle detection — cycles make topological sort throw\n this.validateNoCycles(context);\n\n // Phase 6: Entry-point nodes should not have incoming edges\n this.validateEntryPoints(context);\n\n // Phase 7: Completely disconnected nodes (zero edges)\n this.validateNoDisconnectedNodes(context);\n\n // Phase 8: Single manual trigger per flow\n this.validateSingleManualTrigger(context);\n\n return this.buildResult(context);\n } catch (error) {\n return {\n isValid: false,\n errors: [\n {\n severity: 'error' as const,\n type: 'VALIDATION_SYSTEM_ERROR',\n message: `Validation system error: ${error instanceof Error ? error.message : 'Unknown error'}`,\n },\n ],\n warnings: [],\n };\n }\n }\n\n // ─── Graph analysis ──────────────────────────────────────────────────────────\n\n private static analyzeGraph(\n nodes: readonly FlowNodeDefinitions[],\n edges: readonly FlowEdge[],\n ): GraphAnalysis {\n const nodeMap = new Map(nodes.map((n) => [n.id, n]));\n const edgeMap = new Map(edges.map((e) => [e.id, e]));\n const incomingEdges = new Map<string, FlowEdge[]>();\n const outgoingEdges = new Map<string, FlowEdge[]>();\n\n for (const node of nodes) {\n incomingEdges.set(node.id, GraphService.getIncomingEdges(node.id, edges));\n outgoingEdges.set(node.id, GraphService.getOutgoingEdges(node.id, edges));\n }\n\n return { nodeMap, edgeMap, incomingEdges, outgoingEdges };\n }\n\n // ─── Phase 1: Empty flow ────────────────────────────────────────────────────\n\n private static validateNotEmpty(context: ValidationContext): void {\n if (context.definition.nodes.length === 0) {\n context.addWarning('EMPTY_FLOW', 'Flow has no nodes');\n }\n }\n\n // ─── Phase 2: Edge references ───────────────────────────────────────────────\n\n private static validateEdgeReferences(context: ValidationContext): void {\n const { nodeMap } = context.analysis;\n\n for (const edge of context.definition.edges) {\n if (!nodeMap.has(edge.source)) {\n context.addError('INVALID_EDGE_REFERENCE', 'Edge references non-existent source node', {\n edgeId: edge.id,\n sourceNodeId: edge.source,\n targetNodeId: edge.target,\n });\n }\n if (!nodeMap.has(edge.target)) {\n context.addError('INVALID_EDGE_REFERENCE', 'Edge references non-existent target node', {\n edgeId: edge.id,\n sourceNodeId: edge.source,\n targetNodeId: edge.target,\n });\n }\n }\n }\n\n // ─── Phase 3: Self-referencing edges ────────────────────────────────────────\n\n private static validateNoSelfReferences(context: ValidationContext): void {\n for (const edge of context.definition.edges) {\n if (edge.source === edge.target) {\n context.addError('SELF_REFERENCING_EDGE', 'Edge connects a node to itself', {\n edgeId: edge.id,\n nodeId: edge.source,\n });\n }\n }\n }\n\n // ─── Phase 4: Duplicate edges ───────────────────────────────────────────────\n\n private static validateNoDuplicateEdges(context: ValidationContext): void {\n const seen = new Set<string>();\n\n for (const edge of context.definition.edges) {\n // Include handles so parallel edges on different output ports are allowed\n const key = `${edge.source}:${edge.sourceHandle ?? ''}→${edge.target}:${edge.targetHandle ?? ''}`;\n if (seen.has(key)) {\n context.addWarning('DUPLICATE_EDGE', 'Duplicate connection between the same nodes', {\n edgeId: edge.id,\n sourceNodeId: edge.source,\n targetNodeId: edge.target,\n });\n }\n seen.add(key);\n }\n }\n\n // ─── Phase 5: Cycle detection ───────────────────────────────────────────────\n\n private static validateNoCycles(context: ValidationContext): void {\n const { nodes, edges } = context.definition;\n const result = GraphService.hasCycleDetection(nodes, edges);\n\n if (result.hasCycle && result.cyclePath) {\n context.addError('CIRCULAR_DEPENDENCY', 'Flow contains a cycle and cannot be executed', {\n additionalContext: {\n cyclePath: result.cyclePath,\n involvedNodeIds: result.cyclePath.slice(0, -1),\n },\n });\n }\n }\n\n // ─── Phase 6: Entry-point nodes ─────────────────────────────────────────────\n\n private static validateEntryPoints(context: ValidationContext): void {\n const { incomingEdges } = context.analysis;\n\n for (const node of context.definition.nodes) {\n if (!isEntryPointNode(node.type)) {\n continue;\n }\n\n const incoming = incomingEdges.get(node.id) || [];\n if (incoming.length > 0) {\n context.addWarning(\n 'ENTRY_NODE_HAS_INCOMING_EDGES',\n `${node.label || node.type} is an entry-point node and should not have incoming connections`,\n {\n nodeId: node.id,\n sourceNodeType: node.type,\n additionalContext: {\n incomingEdgeCount: incoming.length,\n },\n },\n );\n }\n }\n }\n\n // ─── Phase 7: Disconnected nodes ────────────────────────────────────────────\n\n private static validateNoDisconnectedNodes(context: ValidationContext): void {\n const { incomingEdges, outgoingEdges } = context.analysis;\n\n // Only meaningful when there are at least 2 nodes\n if (context.definition.nodes.length < 2) {\n return;\n }\n\n for (const node of context.definition.nodes) {\n const incoming = incomingEdges.get(node.id) || [];\n const outgoing = outgoingEdges.get(node.id) || [];\n\n if (incoming.length === 0 && outgoing.length === 0) {\n context.addWarning('DISCONNECTED_NODE', 'Node has no connections to other nodes', {\n nodeId: node.id,\n sourceNodeType: node.type,\n });\n }\n }\n }\n\n // ─── Phase 8: Single manual trigger ─────────────────────────────────────────\n\n private static validateSingleManualTrigger(context: ValidationContext): void {\n const manualTriggers = context.definition.nodes.filter((n) => n.type === 'trigger.manual');\n\n if (manualTriggers.length > 1) {\n context.addError(\n 'MULTIPLE_MANUAL_TRIGGERS',\n `Only one Manual Trigger is allowed per flow, but ${manualTriggers.length} were found`,\n {\n additionalContext: {\n triggerNodeIds: manualTriggers.map((n) => n.id),\n },\n },\n );\n }\n }\n\n // ─── Result builder ─────────────────────────────────────────────────────────\n\n private static buildResult(context: ValidationContext): FlowValidationResult {\n const warnings = context.issues.filter(\n (i) => i.severity === 'warning',\n ) as FlowValidationWarning[];\n\n if (context.hasErrors()) {\n return {\n isValid: false,\n errors: context.issues.filter((i) => i.severity === 'error') as FlowValidationError[],\n warnings,\n };\n }\n\n return {\n isValid: true,\n warnings: warnings.length > 0 ? warnings : undefined,\n };\n }\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { GraphService } from "./graph.service.js";
|
|
2
|
+
import { ValidationContext } from "../types/validation.js";
|
|
3
|
+
//#region src/services/flow-validator.ts
|
|
4
|
+
/**
|
|
5
|
+
* Checks whether a node type is an entry point (receives external data, not flow data).
|
|
6
|
+
* Entry points: trigger actions and legacy core.input / INPUT nodes.
|
|
7
|
+
*/
|
|
8
|
+
function isEntryPointNode(nodeType) {
|
|
9
|
+
return nodeType === "INPUT" || nodeType === "core.input" || nodeType.startsWith("trigger.");
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Static flow validator.
|
|
13
|
+
*
|
|
14
|
+
* Designed to help an agent (or user) verify that a flow definition will
|
|
15
|
+
* execute correctly. This does NOT prevent saving — it only reports issues.
|
|
16
|
+
*
|
|
17
|
+
* Errors = the flow WILL fail at execution time (topological sort throws, etc.)
|
|
18
|
+
* Warnings = the flow will run but something looks unintentional.
|
|
19
|
+
*/
|
|
20
|
+
var FlowValidator = class {
|
|
21
|
+
static validateFlowDefinition(flowDefinition) {
|
|
22
|
+
try {
|
|
23
|
+
const context = new ValidationContext(flowDefinition, this.analyzeGraph(flowDefinition.nodes, flowDefinition.edges));
|
|
24
|
+
this.validateNotEmpty(context);
|
|
25
|
+
this.validateEdgeReferences(context);
|
|
26
|
+
this.validateNoSelfReferences(context);
|
|
27
|
+
this.validateNoDuplicateEdges(context);
|
|
28
|
+
this.validateNoCycles(context);
|
|
29
|
+
this.validateEntryPoints(context);
|
|
30
|
+
this.validateNoDisconnectedNodes(context);
|
|
31
|
+
this.validateSingleManualTrigger(context);
|
|
32
|
+
return this.buildResult(context);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
return {
|
|
35
|
+
isValid: false,
|
|
36
|
+
errors: [{
|
|
37
|
+
severity: "error",
|
|
38
|
+
type: "VALIDATION_SYSTEM_ERROR",
|
|
39
|
+
message: `Validation system error: ${error instanceof Error ? error.message : "Unknown error"}`
|
|
40
|
+
}],
|
|
41
|
+
warnings: []
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
static analyzeGraph(nodes, edges) {
|
|
46
|
+
const nodeMap = new Map(nodes.map((n) => [n.id, n]));
|
|
47
|
+
const edgeMap = new Map(edges.map((e) => [e.id, e]));
|
|
48
|
+
const incomingEdges = /* @__PURE__ */ new Map();
|
|
49
|
+
const outgoingEdges = /* @__PURE__ */ new Map();
|
|
50
|
+
for (const node of nodes) {
|
|
51
|
+
incomingEdges.set(node.id, GraphService.getIncomingEdges(node.id, edges));
|
|
52
|
+
outgoingEdges.set(node.id, GraphService.getOutgoingEdges(node.id, edges));
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
nodeMap,
|
|
56
|
+
edgeMap,
|
|
57
|
+
incomingEdges,
|
|
58
|
+
outgoingEdges
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
static validateNotEmpty(context) {
|
|
62
|
+
if (context.definition.nodes.length === 0) context.addWarning("EMPTY_FLOW", "Flow has no nodes");
|
|
63
|
+
}
|
|
64
|
+
static validateEdgeReferences(context) {
|
|
65
|
+
const { nodeMap } = context.analysis;
|
|
66
|
+
for (const edge of context.definition.edges) {
|
|
67
|
+
if (!nodeMap.has(edge.source)) context.addError("INVALID_EDGE_REFERENCE", "Edge references non-existent source node", {
|
|
68
|
+
edgeId: edge.id,
|
|
69
|
+
sourceNodeId: edge.source,
|
|
70
|
+
targetNodeId: edge.target
|
|
71
|
+
});
|
|
72
|
+
if (!nodeMap.has(edge.target)) context.addError("INVALID_EDGE_REFERENCE", "Edge references non-existent target node", {
|
|
73
|
+
edgeId: edge.id,
|
|
74
|
+
sourceNodeId: edge.source,
|
|
75
|
+
targetNodeId: edge.target
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
static validateNoSelfReferences(context) {
|
|
80
|
+
for (const edge of context.definition.edges) if (edge.source === edge.target) context.addError("SELF_REFERENCING_EDGE", "Edge connects a node to itself", {
|
|
81
|
+
edgeId: edge.id,
|
|
82
|
+
nodeId: edge.source
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
static validateNoDuplicateEdges(context) {
|
|
86
|
+
const seen = /* @__PURE__ */ new Set();
|
|
87
|
+
for (const edge of context.definition.edges) {
|
|
88
|
+
const key = `${edge.source}:${edge.sourceHandle ?? ""}→${edge.target}:${edge.targetHandle ?? ""}`;
|
|
89
|
+
if (seen.has(key)) context.addWarning("DUPLICATE_EDGE", "Duplicate connection between the same nodes", {
|
|
90
|
+
edgeId: edge.id,
|
|
91
|
+
sourceNodeId: edge.source,
|
|
92
|
+
targetNodeId: edge.target
|
|
93
|
+
});
|
|
94
|
+
seen.add(key);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
static validateNoCycles(context) {
|
|
98
|
+
const { nodes, edges } = context.definition;
|
|
99
|
+
const result = GraphService.hasCycleDetection(nodes, edges);
|
|
100
|
+
if (result.hasCycle && result.cyclePath) context.addError("CIRCULAR_DEPENDENCY", "Flow contains a cycle and cannot be executed", { additionalContext: {
|
|
101
|
+
cyclePath: result.cyclePath,
|
|
102
|
+
involvedNodeIds: result.cyclePath.slice(0, -1)
|
|
103
|
+
} });
|
|
104
|
+
}
|
|
105
|
+
static validateEntryPoints(context) {
|
|
106
|
+
const { incomingEdges } = context.analysis;
|
|
107
|
+
for (const node of context.definition.nodes) {
|
|
108
|
+
if (!isEntryPointNode(node.type)) continue;
|
|
109
|
+
const incoming = incomingEdges.get(node.id) || [];
|
|
110
|
+
if (incoming.length > 0) context.addWarning("ENTRY_NODE_HAS_INCOMING_EDGES", `${node.label || node.type} is an entry-point node and should not have incoming connections`, {
|
|
111
|
+
nodeId: node.id,
|
|
112
|
+
sourceNodeType: node.type,
|
|
113
|
+
additionalContext: { incomingEdgeCount: incoming.length }
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
static validateNoDisconnectedNodes(context) {
|
|
118
|
+
const { incomingEdges, outgoingEdges } = context.analysis;
|
|
119
|
+
if (context.definition.nodes.length < 2) return;
|
|
120
|
+
for (const node of context.definition.nodes) {
|
|
121
|
+
const incoming = incomingEdges.get(node.id) || [];
|
|
122
|
+
const outgoing = outgoingEdges.get(node.id) || [];
|
|
123
|
+
if (incoming.length === 0 && outgoing.length === 0) context.addWarning("DISCONNECTED_NODE", "Node has no connections to other nodes", {
|
|
124
|
+
nodeId: node.id,
|
|
125
|
+
sourceNodeType: node.type
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
static validateSingleManualTrigger(context) {
|
|
130
|
+
const manualTriggers = context.definition.nodes.filter((n) => n.type === "trigger.manual");
|
|
131
|
+
if (manualTriggers.length > 1) context.addError("MULTIPLE_MANUAL_TRIGGERS", `Only one Manual Trigger is allowed per flow, but ${manualTriggers.length} were found`, { additionalContext: { triggerNodeIds: manualTriggers.map((n) => n.id) } });
|
|
132
|
+
}
|
|
133
|
+
static buildResult(context) {
|
|
134
|
+
const warnings = context.issues.filter((i) => i.severity === "warning");
|
|
135
|
+
if (context.hasErrors()) return {
|
|
136
|
+
isValid: false,
|
|
137
|
+
errors: context.issues.filter((i) => i.severity === "error"),
|
|
138
|
+
warnings
|
|
139
|
+
};
|
|
140
|
+
return {
|
|
141
|
+
isValid: true,
|
|
142
|
+
warnings: warnings.length > 0 ? warnings : void 0
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
//#endregion
|
|
147
|
+
export { FlowValidator };
|
|
148
|
+
|
|
149
|
+
//# sourceMappingURL=flow-validator.js.map
|