@vertesia/workflow 0.78.0-dev-28b447d → 0.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/activities/advanced/createDocumentTypeFromInteractionRun.js +34 -0
- package/lib/cjs/activities/advanced/createDocumentTypeFromInteractionRun.js.map +1 -0
- package/lib/cjs/activities/advanced/createOrUpdateDocumentFromInteractionRun.js +67 -0
- package/lib/cjs/activities/advanced/createOrUpdateDocumentFromInteractionRun.js.map +1 -0
- package/lib/cjs/activities/advanced/updateDocumentFromInteractionRun.js +20 -0
- package/lib/cjs/activities/advanced/updateDocumentFromInteractionRun.js.map +1 -0
- package/lib/cjs/activities/chunkDocument.js +86 -0
- package/lib/cjs/activities/chunkDocument.js.map +1 -0
- package/lib/cjs/activities/createDocumentFromOther.js +64 -0
- package/lib/cjs/activities/createDocumentFromOther.js.map +1 -0
- package/lib/cjs/activities/executeInteraction.js +189 -0
- package/lib/cjs/activities/executeInteraction.js.map +1 -0
- package/lib/cjs/activities/extractDocumentText.js +156 -0
- package/lib/cjs/activities/extractDocumentText.js.map +1 -0
- package/lib/cjs/activities/generateDocumentProperties.js +84 -0
- package/lib/cjs/activities/generateDocumentProperties.js.map +1 -0
- package/lib/cjs/activities/generateEmbeddings.js +358 -0
- package/lib/cjs/activities/generateEmbeddings.js.map +1 -0
- package/lib/cjs/activities/generateOrAssignContentType.js +126 -0
- package/lib/cjs/activities/generateOrAssignContentType.js.map +1 -0
- package/lib/cjs/activities/getObjectFromStore.js +20 -0
- package/lib/cjs/activities/getObjectFromStore.js.map +1 -0
- package/lib/cjs/activities/handleError.js +22 -0
- package/lib/cjs/activities/handleError.js.map +1 -0
- package/lib/cjs/activities/index-dsl.js +43 -0
- package/lib/cjs/activities/index-dsl.js.map +1 -0
- package/lib/cjs/activities/index.js +21 -0
- package/lib/cjs/activities/index.js.map +1 -0
- package/lib/cjs/activities/media/processPdfWithTextract.js +103 -0
- package/lib/cjs/activities/media/processPdfWithTextract.js.map +1 -0
- package/lib/cjs/activities/media/transcribeMediaWithGladia.js +51 -0
- package/lib/cjs/activities/media/transcribeMediaWithGladia.js.map +1 -0
- package/lib/cjs/activities/notifyWebhook.js +157 -0
- package/lib/cjs/activities/notifyWebhook.js.map +1 -0
- package/lib/cjs/activities/rateLimiter.js +30 -0
- package/lib/cjs/activities/rateLimiter.js.map +1 -0
- package/lib/cjs/activities/renditions/generateImageRendition.js +66 -0
- package/lib/cjs/activities/renditions/generateImageRendition.js.map +1 -0
- package/lib/cjs/activities/renditions/generateVideoRendition.js +200 -0
- package/lib/cjs/activities/renditions/generateVideoRendition.js.map +1 -0
- package/lib/cjs/activities/setDocumentStatus.js +15 -0
- package/lib/cjs/activities/setDocumentStatus.js.map +1 -0
- package/lib/cjs/conversion/TextractProcessor.js +417 -0
- package/lib/cjs/conversion/TextractProcessor.js.map +1 -0
- package/lib/cjs/conversion/image.js +149 -0
- package/lib/cjs/conversion/image.js.map +1 -0
- package/lib/cjs/conversion/markitdown.js +42 -0
- package/lib/cjs/conversion/markitdown.js.map +1 -0
- package/lib/cjs/conversion/mutool.js +147 -0
- package/lib/cjs/conversion/mutool.js.map +1 -0
- package/lib/cjs/conversion/pandoc.js +39 -0
- package/lib/cjs/conversion/pandoc.js.map +1 -0
- package/lib/cjs/dsl/conditions.js +81 -0
- package/lib/cjs/dsl/conditions.js.map +1 -0
- package/lib/cjs/dsl/dsl-workflow.js +338 -0
- package/lib/cjs/dsl/dsl-workflow.js.map +1 -0
- package/lib/cjs/dsl/dslProxyActivities.js +23 -0
- package/lib/cjs/dsl/dslProxyActivities.js.map +1 -0
- package/lib/cjs/dsl/projections.js +59 -0
- package/lib/cjs/dsl/projections.js.map +1 -0
- package/lib/cjs/dsl/setup/ActivityContext.js +120 -0
- package/lib/cjs/dsl/setup/ActivityContext.js.map +1 -0
- package/lib/cjs/dsl/setup/fetch/DataProvider.js +51 -0
- package/lib/cjs/dsl/setup/fetch/DataProvider.js.map +1 -0
- package/lib/cjs/dsl/setup/fetch/index.js +16 -0
- package/lib/cjs/dsl/setup/fetch/index.js.map +1 -0
- package/lib/cjs/dsl/setup/fetch/providers.js +67 -0
- package/lib/cjs/dsl/setup/fetch/providers.js.map +1 -0
- package/lib/cjs/dsl/test/test-child-workflow.js +10 -0
- package/lib/cjs/dsl/test/test-child-workflow.js.map +1 -0
- package/lib/cjs/dsl/validation.js +122 -0
- package/lib/cjs/dsl/validation.js.map +1 -0
- package/lib/cjs/dsl/vars.js +341 -0
- package/lib/cjs/dsl/vars.js.map +1 -0
- package/lib/cjs/dsl/walk.js +100 -0
- package/lib/cjs/dsl/walk.js.map +1 -0
- package/lib/cjs/dsl.js +20 -0
- package/lib/cjs/dsl.js.map +1 -0
- package/lib/cjs/errors.js +57 -0
- package/lib/cjs/errors.js.map +1 -0
- package/lib/cjs/index.js +54 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/iterative-generation/activities/extractToc.js +47 -0
- package/lib/cjs/iterative-generation/activities/extractToc.js.map +1 -0
- package/lib/cjs/iterative-generation/activities/finalizeOutput.js +69 -0
- package/lib/cjs/iterative-generation/activities/finalizeOutput.js.map +1 -0
- package/lib/cjs/iterative-generation/activities/generatePart.js +74 -0
- package/lib/cjs/iterative-generation/activities/generatePart.js.map +1 -0
- package/lib/cjs/iterative-generation/activities/generateToc.js +96 -0
- package/lib/cjs/iterative-generation/activities/generateToc.js.map +1 -0
- package/lib/cjs/iterative-generation/activities/index.js +12 -0
- package/lib/cjs/iterative-generation/activities/index.js.map +1 -0
- package/lib/cjs/iterative-generation/iterativeGenerationWorkflow.js +56 -0
- package/lib/cjs/iterative-generation/iterativeGenerationWorkflow.js.map +1 -0
- package/lib/cjs/iterative-generation/types.js +5 -0
- package/lib/cjs/iterative-generation/types.js.map +1 -0
- package/lib/cjs/iterative-generation/utils.js +121 -0
- package/lib/cjs/iterative-generation/utils.js.map +1 -0
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/result-types.js +10 -0
- package/lib/cjs/result-types.js.map +1 -0
- package/lib/cjs/system/notifyWebhookWorkflow.js +53 -0
- package/lib/cjs/system/notifyWebhookWorkflow.js.map +1 -0
- package/lib/cjs/system/recalculateEmbeddingsWorkflow.js +33 -0
- package/lib/cjs/system/recalculateEmbeddingsWorkflow.js.map +1 -0
- package/lib/cjs/utils/auth.js +15 -0
- package/lib/cjs/utils/auth.js.map +1 -0
- package/lib/cjs/utils/blobs.js +61 -0
- package/lib/cjs/utils/blobs.js.map +1 -0
- package/lib/cjs/utils/chunks.js +14 -0
- package/lib/cjs/utils/chunks.js.map +1 -0
- package/lib/cjs/utils/client.js +29 -0
- package/lib/cjs/utils/client.js.map +1 -0
- package/lib/cjs/utils/expand-vars.js +33 -0
- package/lib/cjs/utils/expand-vars.js.map +1 -0
- package/lib/cjs/utils/memory.js +65 -0
- package/lib/cjs/utils/memory.js.map +1 -0
- package/lib/cjs/utils/renditions.js +88 -0
- package/lib/cjs/utils/renditions.js.map +1 -0
- package/lib/cjs/utils/storage.js +55 -0
- package/lib/cjs/utils/storage.js.map +1 -0
- package/lib/cjs/utils/tokens.js +38 -0
- package/lib/cjs/utils/tokens.js.map +1 -0
- package/lib/cjs/vars.js +20 -0
- package/lib/cjs/vars.js.map +1 -0
- package/lib/cjs/workflows.js +15 -0
- package/lib/cjs/workflows.js.map +1 -0
- package/lib/esm/activities/advanced/createDocumentTypeFromInteractionRun.js +31 -0
- package/lib/esm/activities/advanced/createDocumentTypeFromInteractionRun.js.map +1 -0
- package/lib/esm/activities/advanced/createOrUpdateDocumentFromInteractionRun.js +64 -0
- package/lib/esm/activities/advanced/createOrUpdateDocumentFromInteractionRun.js.map +1 -0
- package/lib/esm/activities/advanced/updateDocumentFromInteractionRun.js +17 -0
- package/lib/esm/activities/advanced/updateDocumentFromInteractionRun.js.map +1 -0
- package/lib/esm/activities/chunkDocument.js +83 -0
- package/lib/esm/activities/chunkDocument.js.map +1 -0
- package/lib/esm/activities/createDocumentFromOther.js +58 -0
- package/lib/esm/activities/createDocumentFromOther.js.map +1 -0
- package/lib/esm/activities/executeInteraction.js +185 -0
- package/lib/esm/activities/executeInteraction.js.map +1 -0
- package/lib/esm/activities/extractDocumentText.js +153 -0
- package/lib/esm/activities/extractDocumentText.js.map +1 -0
- package/lib/esm/activities/generateDocumentProperties.js +81 -0
- package/lib/esm/activities/generateDocumentProperties.js.map +1 -0
- package/lib/esm/activities/generateEmbeddings.js +355 -0
- package/lib/esm/activities/generateEmbeddings.js.map +1 -0
- package/lib/esm/activities/generateOrAssignContentType.js +123 -0
- package/lib/esm/activities/generateOrAssignContentType.js.map +1 -0
- package/lib/esm/activities/getObjectFromStore.js +17 -0
- package/lib/esm/activities/getObjectFromStore.js.map +1 -0
- package/lib/esm/activities/handleError.js +19 -0
- package/lib/esm/activities/handleError.js.map +1 -0
- package/lib/esm/activities/index-dsl.js +21 -0
- package/lib/esm/activities/index-dsl.js.map +1 -0
- package/lib/esm/activities/index.js +5 -0
- package/lib/esm/activities/index.js.map +1 -0
- package/lib/esm/activities/media/processPdfWithTextract.js +99 -0
- package/lib/esm/activities/media/processPdfWithTextract.js.map +1 -0
- package/lib/esm/activities/media/transcribeMediaWithGladia.js +48 -0
- package/lib/esm/activities/media/transcribeMediaWithGladia.js.map +1 -0
- package/lib/esm/activities/notifyWebhook.js +154 -0
- package/lib/esm/activities/notifyWebhook.js.map +1 -0
- package/lib/esm/activities/rateLimiter.js +27 -0
- package/lib/esm/activities/rateLimiter.js.map +1 -0
- package/lib/esm/activities/renditions/generateImageRendition.js +63 -0
- package/lib/esm/activities/renditions/generateImageRendition.js.map +1 -0
- package/lib/esm/activities/renditions/generateVideoRendition.js +194 -0
- package/lib/esm/activities/renditions/generateVideoRendition.js.map +1 -0
- package/lib/esm/activities/setDocumentStatus.js +12 -0
- package/lib/esm/activities/setDocumentStatus.js.map +1 -0
- package/lib/esm/conversion/TextractProcessor.js +410 -0
- package/lib/esm/conversion/TextractProcessor.js.map +1 -0
- package/lib/esm/conversion/image.js +143 -0
- package/lib/esm/conversion/image.js.map +1 -0
- package/lib/esm/conversion/markitdown.js +36 -0
- package/lib/esm/conversion/markitdown.js.map +1 -0
- package/lib/esm/conversion/mutool.js +139 -0
- package/lib/esm/conversion/mutool.js.map +1 -0
- package/lib/esm/conversion/pandoc.js +36 -0
- package/lib/esm/conversion/pandoc.js.map +1 -0
- package/lib/esm/dsl/conditions.js +75 -0
- package/lib/esm/dsl/conditions.js.map +1 -0
- package/lib/esm/dsl/dsl-workflow.js +331 -0
- package/lib/esm/dsl/dsl-workflow.js.map +1 -0
- package/lib/esm/dsl/dslProxyActivities.js +20 -0
- package/lib/esm/dsl/dslProxyActivities.js.map +1 -0
- package/lib/esm/dsl/projections.js +55 -0
- package/lib/esm/dsl/projections.js.map +1 -0
- package/lib/esm/dsl/setup/ActivityContext.js +115 -0
- package/lib/esm/dsl/setup/ActivityContext.js.map +1 -0
- package/lib/esm/dsl/setup/fetch/DataProvider.js +47 -0
- package/lib/esm/dsl/setup/fetch/DataProvider.js.map +1 -0
- package/lib/esm/dsl/setup/fetch/index.js +12 -0
- package/lib/esm/dsl/setup/fetch/index.js.map +1 -0
- package/lib/esm/dsl/setup/fetch/providers.js +61 -0
- package/lib/esm/dsl/setup/fetch/providers.js.map +1 -0
- package/lib/esm/dsl/test/test-child-workflow.js +5 -0
- package/lib/esm/dsl/test/test-child-workflow.js.map +1 -0
- package/lib/esm/dsl/validation.js +118 -0
- package/lib/esm/dsl/validation.js.map +1 -0
- package/lib/esm/dsl/vars.js +335 -0
- package/lib/esm/dsl/vars.js.map +1 -0
- package/lib/esm/dsl/walk.js +96 -0
- package/lib/esm/dsl/walk.js.map +1 -0
- package/lib/esm/dsl.js +4 -0
- package/lib/esm/dsl.js.map +1 -0
- package/lib/esm/errors.js +49 -0
- package/lib/esm/errors.js.map +1 -0
- package/lib/esm/index.js +36 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/iterative-generation/activities/extractToc.js +44 -0
- package/lib/esm/iterative-generation/activities/extractToc.js.map +1 -0
- package/lib/esm/iterative-generation/activities/finalizeOutput.js +66 -0
- package/lib/esm/iterative-generation/activities/finalizeOutput.js.map +1 -0
- package/lib/esm/iterative-generation/activities/generatePart.js +71 -0
- package/lib/esm/iterative-generation/activities/generatePart.js.map +1 -0
- package/lib/esm/iterative-generation/activities/generateToc.js +93 -0
- package/lib/esm/iterative-generation/activities/generateToc.js.map +1 -0
- package/lib/esm/iterative-generation/activities/index.js +5 -0
- package/lib/esm/iterative-generation/activities/index.js.map +1 -0
- package/lib/esm/iterative-generation/iterativeGenerationWorkflow.js +53 -0
- package/lib/esm/iterative-generation/iterativeGenerationWorkflow.js.map +1 -0
- package/lib/esm/iterative-generation/types.js +2 -0
- package/lib/esm/iterative-generation/types.js.map +1 -0
- package/lib/esm/iterative-generation/utils.js +112 -0
- package/lib/esm/iterative-generation/utils.js.map +1 -0
- package/lib/esm/result-types.js +7 -0
- package/lib/esm/result-types.js.map +1 -0
- package/lib/esm/system/notifyWebhookWorkflow.js +50 -0
- package/lib/esm/system/notifyWebhookWorkflow.js.map +1 -0
- package/lib/esm/system/recalculateEmbeddingsWorkflow.js +30 -0
- package/lib/esm/system/recalculateEmbeddingsWorkflow.js.map +1 -0
- package/lib/esm/utils/auth.js +8 -0
- package/lib/esm/utils/auth.js.map +1 -0
- package/lib/esm/utils/blobs.js +51 -0
- package/lib/esm/utils/blobs.js.map +1 -0
- package/lib/esm/utils/chunks.js +9 -0
- package/lib/esm/utils/chunks.js.map +1 -0
- package/lib/esm/utils/client.js +25 -0
- package/lib/esm/utils/client.js.map +1 -0
- package/lib/esm/utils/expand-vars.js +30 -0
- package/lib/esm/utils/expand-vars.js.map +1 -0
- package/lib/esm/utils/memory.js +55 -0
- package/lib/esm/utils/memory.js.map +1 -0
- package/lib/esm/utils/renditions.js +80 -0
- package/lib/esm/utils/renditions.js.map +1 -0
- package/lib/esm/utils/storage.js +46 -0
- package/lib/esm/utils/storage.js.map +1 -0
- package/lib/esm/utils/tokens.js +34 -0
- package/lib/esm/utils/tokens.js.map +1 -0
- package/lib/esm/vars.js +4 -0
- package/lib/esm/vars.js.map +1 -0
- package/lib/esm/workflows.js +8 -0
- package/lib/esm/workflows.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/lib/types/activities/advanced/createDocumentTypeFromInteractionRun.d.ts +17 -0
- package/lib/types/activities/advanced/createDocumentTypeFromInteractionRun.d.ts.map +1 -0
- package/lib/types/activities/advanced/createOrUpdateDocumentFromInteractionRun.d.ts +39 -0
- package/lib/types/activities/advanced/createOrUpdateDocumentFromInteractionRun.d.ts.map +1 -0
- package/lib/types/activities/advanced/updateDocumentFromInteractionRun.d.ts +19 -0
- package/lib/types/activities/advanced/updateDocumentFromInteractionRun.d.ts.map +1 -0
- package/lib/types/activities/chunkDocument.d.ts +33 -0
- package/lib/types/activities/chunkDocument.d.ts.map +1 -0
- package/lib/types/activities/createDocumentFromOther.d.ts +21 -0
- package/lib/types/activities/createDocumentFromOther.d.ts.map +1 -0
- package/lib/types/activities/executeInteraction.d.ts +61 -0
- package/lib/types/activities/executeInteraction.d.ts.map +1 -0
- package/lib/types/activities/extractDocumentText.d.ts +10 -0
- package/lib/types/activities/extractDocumentText.d.ts.map +1 -0
- package/lib/types/activities/generateDocumentProperties.d.ts +32 -0
- package/lib/types/activities/generateDocumentProperties.d.ts.map +1 -0
- package/lib/types/activities/generateEmbeddings.d.ts +53 -0
- package/lib/types/activities/generateEmbeddings.d.ts.map +1 -0
- package/lib/types/activities/generateOrAssignContentType.d.ts +44 -0
- package/lib/types/activities/generateOrAssignContentType.d.ts.map +1 -0
- package/lib/types/activities/getObjectFromStore.d.ts +14 -0
- package/lib/types/activities/getObjectFromStore.d.ts.map +1 -0
- package/lib/types/activities/handleError.d.ts +6 -0
- package/lib/types/activities/handleError.d.ts.map +1 -0
- package/lib/types/activities/index-dsl.d.ts +20 -0
- package/lib/types/activities/index-dsl.d.ts.map +1 -0
- package/lib/types/activities/index.d.ts +5 -0
- package/lib/types/activities/index.d.ts.map +1 -0
- package/lib/types/activities/media/processPdfWithTextract.d.ts +26 -0
- package/lib/types/activities/media/processPdfWithTextract.d.ts.map +1 -0
- package/lib/types/activities/media/transcribeMediaWithGladia.d.ts +14 -0
- package/lib/types/activities/media/transcribeMediaWithGladia.d.ts.map +1 -0
- package/lib/types/activities/notifyWebhook.d.ts +27 -0
- package/lib/types/activities/notifyWebhook.d.ts.map +1 -0
- package/lib/types/activities/rateLimiter.d.ts +11 -0
- package/lib/types/activities/rateLimiter.d.ts.map +1 -0
- package/lib/types/activities/renditions/generateImageRendition.d.ts +14 -0
- package/lib/types/activities/renditions/generateImageRendition.d.ts.map +1 -0
- package/lib/types/activities/renditions/generateVideoRendition.d.ts +15 -0
- package/lib/types/activities/renditions/generateVideoRendition.d.ts.map +1 -0
- package/lib/types/activities/setDocumentStatus.d.ts +15 -0
- package/lib/types/activities/setDocumentStatus.d.ts.map +1 -0
- package/lib/types/conversion/TextractProcessor.d.ts +45 -0
- package/lib/types/conversion/TextractProcessor.d.ts.map +1 -0
- package/lib/types/conversion/image.d.ts +13 -0
- package/lib/types/conversion/image.d.ts.map +1 -0
- package/lib/types/conversion/markitdown.d.ts +2 -0
- package/lib/types/conversion/markitdown.d.ts.map +1 -0
- package/lib/types/conversion/mutool.d.ts +19 -0
- package/lib/types/conversion/mutool.d.ts.map +1 -0
- package/lib/types/conversion/pandoc.d.ts +2 -0
- package/lib/types/conversion/pandoc.d.ts.map +1 -0
- package/lib/types/dsl/conditions.d.ts +2 -0
- package/lib/types/dsl/conditions.d.ts.map +1 -0
- package/lib/types/dsl/dsl-workflow.d.ts +5 -0
- package/lib/types/dsl/dsl-workflow.d.ts.map +1 -0
- package/lib/types/dsl/dslProxyActivities.d.ts +10 -0
- package/lib/types/dsl/dslProxyActivities.d.ts.map +1 -0
- package/lib/types/dsl/projections.d.ts +4 -0
- package/lib/types/dsl/projections.d.ts.map +1 -0
- package/lib/types/dsl/setup/ActivityContext.d.ts +17 -0
- package/lib/types/dsl/setup/ActivityContext.d.ts.map +1 -0
- package/lib/types/dsl/setup/fetch/DataProvider.d.ts +9 -0
- package/lib/types/dsl/setup/fetch/DataProvider.d.ts.map +1 -0
- package/lib/types/dsl/setup/fetch/index.d.ts +6 -0
- package/lib/types/dsl/setup/fetch/index.d.ts.map +1 -0
- package/lib/types/dsl/setup/fetch/providers.d.ts +25 -0
- package/lib/types/dsl/setup/fetch/providers.d.ts.map +1 -0
- package/lib/types/dsl/test/test-child-workflow.d.ts +4 -0
- package/lib/types/dsl/test/test-child-workflow.d.ts.map +1 -0
- package/lib/types/dsl/validation.d.ts +4 -0
- package/lib/types/dsl/validation.d.ts.map +1 -0
- package/lib/types/dsl/vars.d.ts +48 -0
- package/lib/types/dsl/vars.d.ts.map +1 -0
- package/lib/types/dsl/walk.d.ts +18 -0
- package/lib/types/dsl/walk.d.ts.map +1 -0
- package/lib/types/dsl.d.ts +4 -0
- package/lib/types/dsl.d.ts.map +1 -0
- package/lib/types/errors.d.ts +27 -0
- package/lib/types/errors.d.ts.map +1 -0
- package/lib/types/index.d.ts +35 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/iterative-generation/activities/extractToc.d.ts +10 -0
- package/lib/types/iterative-generation/activities/extractToc.d.ts.map +1 -0
- package/lib/types/iterative-generation/activities/finalizeOutput.d.ts +3 -0
- package/lib/types/iterative-generation/activities/finalizeOutput.d.ts.map +1 -0
- package/lib/types/iterative-generation/activities/generatePart.d.ts +3 -0
- package/lib/types/iterative-generation/activities/generatePart.d.ts.map +1 -0
- package/lib/types/iterative-generation/activities/generateToc.d.ts +4 -0
- package/lib/types/iterative-generation/activities/generateToc.d.ts.map +1 -0
- package/lib/types/iterative-generation/activities/index.d.ts +5 -0
- package/lib/types/iterative-generation/activities/index.d.ts.map +1 -0
- package/lib/types/iterative-generation/iterativeGenerationWorkflow.d.ts +3 -0
- package/lib/types/iterative-generation/iterativeGenerationWorkflow.d.ts.map +1 -0
- package/lib/types/iterative-generation/types.d.ts +79 -0
- package/lib/types/iterative-generation/types.d.ts.map +1 -0
- package/lib/types/iterative-generation/utils.d.ts +27 -0
- package/lib/types/iterative-generation/utils.d.ts.map +1 -0
- package/lib/types/result-types.d.ts +22 -0
- package/lib/types/result-types.d.ts.map +1 -0
- package/lib/types/system/notifyWebhookWorkflow.d.ts +8 -0
- package/lib/types/system/notifyWebhookWorkflow.d.ts.map +1 -0
- package/lib/types/system/recalculateEmbeddingsWorkflow.d.ts +25 -0
- package/lib/types/system/recalculateEmbeddingsWorkflow.d.ts.map +1 -0
- package/lib/types/utils/auth.d.ts +4 -0
- package/lib/types/utils/auth.d.ts.map +1 -0
- package/lib/types/utils/blobs.d.ts +7 -0
- package/lib/types/utils/blobs.d.ts.map +1 -0
- package/lib/types/utils/chunks.d.ts +9 -0
- package/lib/types/utils/chunks.d.ts.map +1 -0
- package/lib/types/utils/client.d.ts +12 -0
- package/lib/types/utils/client.d.ts.map +1 -0
- package/lib/types/utils/expand-vars.d.ts +8 -0
- package/lib/types/utils/expand-vars.d.ts.map +1 -0
- package/lib/types/utils/memory.d.ts +8 -0
- package/lib/types/utils/memory.d.ts.map +1 -0
- package/lib/types/utils/renditions.d.ts +23 -0
- package/lib/types/utils/renditions.d.ts.map +1 -0
- package/lib/types/utils/storage.d.ts +16 -0
- package/lib/types/utils/storage.d.ts.map +1 -0
- package/lib/types/utils/tokens.d.ts +11 -0
- package/lib/types/utils/tokens.d.ts.map +1 -0
- package/lib/types/vars.d.ts +3 -0
- package/lib/types/vars.d.ts.map +1 -0
- package/lib/types/workflows.d.ts +8 -0
- package/lib/types/workflows.d.ts.map +1 -0
- package/lib/workflows-bundle.js +13145 -0
- package/package.json +127 -127
- package/src/activities/notifyWebhook.test.ts +18 -14
- package/src/activities/notifyWebhook.ts +149 -14
- package/src/dsl/setup/ActivityContext.ts +12 -45
- package/src/dsl/workflow-exec-child.test.ts +3 -3
- package/src/dsl/workflow-fetch.test.ts +1 -1
- package/src/dsl/workflow-import.test.ts +1 -1
- package/src/dsl/workflow.test.ts +1 -1
- package/src/iterative-generation/activities/extractToc.ts +12 -26
- package/src/iterative-generation/activities/finalizeOutput.ts +29 -52
- package/src/iterative-generation/activities/generatePart.ts +23 -64
- package/src/iterative-generation/activities/generateToc.ts +65 -78
- package/src/system/notifyWebhookWorkflow.ts +15 -6
- package/src/utils/blobs.ts +1 -3
- package/src/utils/client.ts +8 -22
|
@@ -1,98 +1,89 @@
|
|
|
1
1
|
import { WorkflowExecutionPayload } from "@vertesia/common";
|
|
2
2
|
import { getVertesiaClient } from "../../utils/client.js";
|
|
3
3
|
import { buildAndPublishMemoryPack } from "../../utils/memory.js";
|
|
4
|
-
import {
|
|
5
|
-
IterativeGenerationPayload,
|
|
6
|
-
OutputMemoryMeta,
|
|
7
|
-
Toc,
|
|
8
|
-
TocIndex,
|
|
9
|
-
} from "../types.js";
|
|
4
|
+
import { IterativeGenerationPayload, OutputMemoryMeta, Toc, TocIndex } from "../types.js";
|
|
10
5
|
import { executeWithVars, tocIndex } from "../utils.js";
|
|
11
6
|
import { parseCompletionResultsToJson } from "@llumiverse/common";
|
|
12
7
|
|
|
13
8
|
const defaultTocSchema = {
|
|
14
|
-
type: "object",
|
|
15
|
-
properties: {
|
|
16
|
-
sections: {
|
|
17
|
-
type: "array",
|
|
18
|
-
items: {
|
|
19
|
-
type: "object",
|
|
20
|
-
properties: {
|
|
21
|
-
id: {
|
|
22
|
-
type: "string",
|
|
23
|
-
description:
|
|
24
|
-
"the id of the section, can be a filename if working on a file, a slug if working on a document or path, or a unique identifier if working on a model.",
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"sections": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"id": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "the id of the section, can be a filename if working on a file, a slug if working on a document or path, or a unique identifier if working on a model."
|
|
25
19
|
},
|
|
26
|
-
operation: {
|
|
27
|
-
type: "string",
|
|
28
|
-
enum: ["create", "update", "delete"],
|
|
29
|
-
description:
|
|
30
|
-
"The operation to perform on the section, create, update or delete. If update, you will be requested later to provide the list of change operation to perform.",
|
|
20
|
+
"operation": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": ["create", "update", "delete"],
|
|
23
|
+
"description": "The operation to perform on the section, create, update or delete. If update, you will be requested later to provide the list of change operation to perform."
|
|
31
24
|
},
|
|
32
|
-
name: {
|
|
33
|
-
type: "string",
|
|
34
|
-
description:
|
|
35
|
-
"The name or title of the section, should be the path in the OpenAPI spec, of the title of the section/part.",
|
|
25
|
+
"name": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "The name or title of the section, should be the path in the OpenAPI spec, of the title of the section/part."
|
|
36
28
|
},
|
|
37
|
-
description: {
|
|
38
|
-
type: "string"
|
|
29
|
+
"description": {
|
|
30
|
+
"type": "string"
|
|
39
31
|
},
|
|
40
|
-
instructions: {
|
|
41
|
-
type: "string"
|
|
32
|
+
"instructions": {
|
|
33
|
+
"type": "string"
|
|
42
34
|
},
|
|
43
|
-
parts:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
items: {
|
|
48
|
-
type: "object",
|
|
49
|
-
properties: {
|
|
50
|
-
id: {
|
|
51
|
-
type: "string",
|
|
52
|
-
description:
|
|
53
|
-
"the id of the part, can be a filename if working on a file, a slug if working on a document or path, or a unique identifier if working on a model.",
|
|
35
|
+
"parts":
|
|
36
|
+
{
|
|
37
|
+
"type": "array",
|
|
38
|
+
"description": "when the section is too large, you can split it into parts, each part should have a title and description. Use it to split the section into subsection. When doing an API documentation, you can do one part for each path. When generating code, you can do one part for each method. When generating an OpenAPI spec, you can do one part for each operation.",
|
|
39
|
+
"items": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"id": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "the id of the part, can be a filename if working on a file, a slug if working on a document or path, or a unique identifier if working on a model."
|
|
54
45
|
},
|
|
55
|
-
name: {
|
|
56
|
-
type: "string",
|
|
57
|
-
description:
|
|
58
|
-
"The name or title of the part, should be the path in the OpenAPI spec, of the title of the section/part.",
|
|
46
|
+
"name": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "The name or title of the part, should be the path in the OpenAPI spec, of the title of the section/part."
|
|
59
49
|
},
|
|
60
50
|
/*
|
|
61
51
|
"description": {
|
|
62
52
|
"type": "string"
|
|
63
53
|
},
|
|
64
54
|
*/
|
|
65
|
-
instructions: {
|
|
66
|
-
type: "string"
|
|
67
|
-
}
|
|
55
|
+
"instructions": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
}
|
|
68
58
|
},
|
|
69
|
-
required: [
|
|
70
|
-
|
|
71
|
-
|
|
59
|
+
"required": [
|
|
60
|
+
"id",
|
|
61
|
+
"name",
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
}
|
|
72
65
|
},
|
|
73
|
-
required: [
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
"required": [
|
|
67
|
+
"id",
|
|
68
|
+
"name",
|
|
69
|
+
"operation"
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
}
|
|
76
73
|
},
|
|
77
|
-
required: [
|
|
78
|
-
|
|
74
|
+
"required": [
|
|
75
|
+
"sections"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
79
78
|
|
|
80
|
-
export async function it_gen_generateToc(
|
|
81
|
-
payload: WorkflowExecutionPayload,
|
|
82
|
-
): Promise<TocIndex> {
|
|
79
|
+
export async function it_gen_generateToc(payload: WorkflowExecutionPayload): Promise<TocIndex> {
|
|
83
80
|
const vars = payload.vars as IterativeGenerationPayload;
|
|
84
81
|
|
|
85
82
|
const schema = vars.toc_schema || defaultTocSchema;
|
|
86
83
|
|
|
87
|
-
const client =
|
|
84
|
+
const client = getVertesiaClient(payload);
|
|
88
85
|
|
|
89
|
-
const run = await executeWithVars(
|
|
90
|
-
client,
|
|
91
|
-
vars.interaction,
|
|
92
|
-
vars,
|
|
93
|
-
undefined,
|
|
94
|
-
schema,
|
|
95
|
-
);
|
|
86
|
+
const run = await executeWithVars(client, vars.interaction, vars, undefined, schema);
|
|
96
87
|
|
|
97
88
|
//Parse the CompletionResult[] to get a Toc object
|
|
98
89
|
const jsonResults = parseCompletionResultsToJson(run.result);
|
|
@@ -101,17 +92,13 @@ export async function it_gen_generateToc(
|
|
|
101
92
|
sections: jsonResults.sections
|
|
102
93
|
};
|
|
103
94
|
|
|
104
|
-
await buildAndPublishMemoryPack(
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
previouslyGenerated: "",
|
|
112
|
-
} satisfies OutputMemoryMeta;
|
|
113
|
-
},
|
|
114
|
-
);
|
|
95
|
+
await buildAndPublishMemoryPack(client, `${vars.memory}/output`, async () => {
|
|
96
|
+
return {
|
|
97
|
+
toc,
|
|
98
|
+
lastProcessedPart: undefined, // the part index (a number array)
|
|
99
|
+
previouslyGenerated: ""
|
|
100
|
+
} satisfies OutputMemoryMeta
|
|
101
|
+
});
|
|
115
102
|
|
|
116
103
|
return tocIndex(toc);
|
|
117
104
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { log } from "@temporalio/workflow";
|
|
3
|
-
import { WorkflowExecutionPayload } from "@vertesia/common";
|
|
2
|
+
import { log, workflowInfo } from "@temporalio/workflow";
|
|
3
|
+
import { WebHookSpec, WorkflowExecutionPayload } from "@vertesia/common";
|
|
4
4
|
import * as activities from "../activities/notifyWebhook.js";
|
|
5
5
|
import { dslProxyActivities } from "../dsl/dslProxyActivities.js";
|
|
6
6
|
import { WF_NON_RETRYABLE_ERRORS } from "../errors.js";
|
|
@@ -19,19 +19,25 @@ const {
|
|
|
19
19
|
});
|
|
20
20
|
|
|
21
21
|
export interface NotifyWebhookWorfklowParams {
|
|
22
|
-
|
|
22
|
+
workflow_type: string;
|
|
23
|
+
endpoints: (string | WebHookSpec)[],
|
|
23
24
|
data: Record<string, any>
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
export async function notifyWebhookWorkflow(payload: WorkflowExecutionPayload<NotifyWebhookWorfklowParams>): Promise<any> {
|
|
28
29
|
|
|
30
|
+
const info = workflowInfo();
|
|
29
31
|
const { objectIds, vars } = payload;
|
|
30
32
|
const notifications = [];
|
|
31
33
|
const endpoints = vars.endpoints ?? (vars as any).webhooks ?? [];
|
|
32
34
|
const data = vars.data ?? (vars as any).webhook_data ?? undefined;
|
|
35
|
+
const workflow_type = vars.workflow_type ?? info.workflowType;
|
|
33
36
|
const eventName = payload.event;
|
|
34
37
|
|
|
38
|
+
const workflowId = info.parent?.workflowId || info.workflowId;
|
|
39
|
+
const workflowRunId = info.parent?.runId || info.runId;
|
|
40
|
+
|
|
35
41
|
if (!endpoints.length) {
|
|
36
42
|
log.info(`No webhooks to notify`);
|
|
37
43
|
return { notifications: [], message: "No webhooks to notify" };
|
|
@@ -39,11 +45,14 @@ export async function notifyWebhookWorkflow(payload: WorkflowExecutionPayload<No
|
|
|
39
45
|
|
|
40
46
|
for (const ep of endpoints) {
|
|
41
47
|
const n = notifyWebhook(payload, {
|
|
42
|
-
|
|
48
|
+
webhook: ep,
|
|
43
49
|
method: 'POST',
|
|
44
|
-
|
|
50
|
+
workflow_type,
|
|
51
|
+
workflow_id: workflowId,
|
|
52
|
+
workflow_run_id: workflowRunId,
|
|
53
|
+
event_name: eventName,
|
|
54
|
+
detail: {
|
|
45
55
|
object_ids: objectIds,
|
|
46
|
-
event: eventName,
|
|
47
56
|
data
|
|
48
57
|
}
|
|
49
58
|
}).then(res => {
|
package/src/utils/blobs.ts
CHANGED
|
@@ -14,9 +14,7 @@ export async function fetchBlobAsStream(client: VertesiaClient, blobUri: string)
|
|
|
14
14
|
} catch (err: any) {
|
|
15
15
|
if (err.message.includes("not found")) {
|
|
16
16
|
//TODO improve error handling with a fetch fail error class in the client
|
|
17
|
-
throw new DocumentNotFoundError(`
|
|
18
|
-
} else if (err.message.includes("forbidden")) {
|
|
19
|
-
throw new DocumentNotFoundError(`Forbidden at ${blobUri}: ${err.message}`);
|
|
17
|
+
throw new DocumentNotFoundError(`Failed to download blob ${blobUri}: ${err.message}`, []);
|
|
20
18
|
} else {
|
|
21
19
|
throw new Error(`Failed to download blob ${blobUri}: ${err.message}`);
|
|
22
20
|
}
|
package/src/utils/client.ts
CHANGED
|
@@ -2,45 +2,31 @@
|
|
|
2
2
|
* get a zeno client for a given token
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
decodeJWT,
|
|
7
|
-
VertesiaClient,
|
|
8
|
-
VertesiaClientProps,
|
|
9
|
-
} from "@vertesia/client";
|
|
5
|
+
import { VertesiaClient } from "@vertesia/client";
|
|
10
6
|
import { WorkflowExecutionBaseParams } from "@vertesia/common";
|
|
11
7
|
import { WorkflowParamNotFoundError } from "../errors.js";
|
|
12
8
|
|
|
9
|
+
|
|
13
10
|
export function getVertesiaClient(payload: WorkflowExecutionBaseParams) {
|
|
14
11
|
return new VertesiaClient(getVertesiaClientOptions(payload));
|
|
15
12
|
}
|
|
16
13
|
|
|
17
|
-
export function getVertesiaClientOptions(
|
|
18
|
-
payload: WorkflowExecutionBaseParams,
|
|
19
|
-
): VertesiaClientProps {
|
|
14
|
+
export function getVertesiaClientOptions(payload: WorkflowExecutionBaseParams) {
|
|
20
15
|
if (!payload.auth_token) {
|
|
21
|
-
throw new WorkflowParamNotFoundError(
|
|
22
|
-
"Authentication Token is missing from WorkflowExecutionPayload.authToken",
|
|
23
|
-
);
|
|
16
|
+
throw new WorkflowParamNotFoundError("Authentication Token is missing from WorkflowExecutionPayload.authToken");
|
|
24
17
|
}
|
|
25
18
|
|
|
26
19
|
if (!payload.config?.studio_url) {
|
|
27
|
-
throw new WorkflowParamNotFoundError(
|
|
28
|
-
"Content Store URL is missing from WorkflowExecutionPayload.servers.storeUrl",
|
|
29
|
-
);
|
|
20
|
+
throw new WorkflowParamNotFoundError("Content Store URL is missing from WorkflowExecutionPayload.servers.storeUrl");
|
|
30
21
|
}
|
|
31
22
|
|
|
32
23
|
if (!payload.config?.store_url) {
|
|
33
|
-
throw new WorkflowParamNotFoundError(
|
|
34
|
-
"Content Store URL is missing from WorkflowExecutionPayload.servers.storeUrl",
|
|
35
|
-
);
|
|
24
|
+
throw new WorkflowParamNotFoundError("Content Store URL is missing from WorkflowExecutionPayload.servers.storeUrl");
|
|
36
25
|
}
|
|
37
26
|
|
|
38
|
-
const token = decodeJWT(payload.auth_token);
|
|
39
|
-
|
|
40
27
|
return {
|
|
41
28
|
serverUrl: payload.config.studio_url,
|
|
42
29
|
storeUrl: payload.config.store_url,
|
|
43
|
-
|
|
44
|
-
apikey: payload.auth_token,
|
|
30
|
+
apikey: payload.auth_token
|
|
45
31
|
};
|
|
46
|
-
}
|
|
32
|
+
}
|