codika 3.0.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/LICENSE +21 -0
- package/README.md +68 -0
- package/dist/cli/commands/completion.d.ts +15 -0
- package/dist/cli/commands/completion.d.ts.map +1 -0
- package/dist/cli/commands/completion.js +810 -0
- package/dist/cli/commands/completion.js.map +1 -0
- package/dist/cli/commands/config/clear.d.ts +12 -0
- package/dist/cli/commands/config/clear.d.ts.map +1 -0
- package/dist/cli/commands/config/clear.js +35 -0
- package/dist/cli/commands/config/clear.js.map +1 -0
- package/dist/cli/commands/config/index.d.ts +15 -0
- package/dist/cli/commands/config/index.d.ts.map +1 -0
- package/dist/cli/commands/config/index.js +21 -0
- package/dist/cli/commands/config/index.js.map +1 -0
- package/dist/cli/commands/config/set.d.ts +41 -0
- package/dist/cli/commands/config/set.d.ts.map +1 -0
- package/dist/cli/commands/config/set.js +185 -0
- package/dist/cli/commands/config/set.js.map +1 -0
- package/dist/cli/commands/config/show.d.ts +12 -0
- package/dist/cli/commands/config/show.d.ts.map +1 -0
- package/dist/cli/commands/config/show.js +45 -0
- package/dist/cli/commands/config/show.js.map +1 -0
- package/dist/cli/commands/deploy/documents.d.ts +12 -0
- package/dist/cli/commands/deploy/documents.d.ts.map +1 -0
- package/dist/cli/commands/deploy/documents.js +217 -0
- package/dist/cli/commands/deploy/documents.js.map +1 -0
- package/dist/cli/commands/deploy/index.d.ts +14 -0
- package/dist/cli/commands/deploy/index.d.ts.map +1 -0
- package/dist/cli/commands/deploy/index.js +21 -0
- package/dist/cli/commands/deploy/index.js.map +1 -0
- package/dist/cli/commands/deploy/process-data-ingestion.d.ts +13 -0
- package/dist/cli/commands/deploy/process-data-ingestion.d.ts.map +1 -0
- package/dist/cli/commands/deploy/process-data-ingestion.js +226 -0
- package/dist/cli/commands/deploy/process-data-ingestion.js.map +1 -0
- package/dist/cli/commands/deploy/use-case.d.ts +9 -0
- package/dist/cli/commands/deploy/use-case.d.ts.map +1 -0
- package/dist/cli/commands/deploy/use-case.js +212 -0
- package/dist/cli/commands/deploy/use-case.js.map +1 -0
- package/dist/cli/commands/get/execution.d.ts +9 -0
- package/dist/cli/commands/get/execution.d.ts.map +1 -0
- package/dist/cli/commands/get/execution.js +159 -0
- package/dist/cli/commands/get/execution.js.map +1 -0
- package/dist/cli/commands/get/index.d.ts +13 -0
- package/dist/cli/commands/get/index.d.ts.map +1 -0
- package/dist/cli/commands/get/index.js +20 -0
- package/dist/cli/commands/get/index.js.map +1 -0
- package/dist/cli/commands/get/skills.d.ts +15 -0
- package/dist/cli/commands/get/skills.d.ts.map +1 -0
- package/dist/cli/commands/get/skills.js +135 -0
- package/dist/cli/commands/get/skills.js.map +1 -0
- package/dist/cli/commands/get/use-case.d.ts +9 -0
- package/dist/cli/commands/get/use-case.d.ts.map +1 -0
- package/dist/cli/commands/get/use-case.js +186 -0
- package/dist/cli/commands/get/use-case.js.map +1 -0
- package/dist/cli/commands/init.d.ts +14 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +347 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/integration/delete.d.ts +13 -0
- package/dist/cli/commands/integration/delete.d.ts.map +1 -0
- package/dist/cli/commands/integration/delete.js +140 -0
- package/dist/cli/commands/integration/delete.js.map +1 -0
- package/dist/cli/commands/integration/index.d.ts +13 -0
- package/dist/cli/commands/integration/index.d.ts.map +1 -0
- package/dist/cli/commands/integration/index.js +20 -0
- package/dist/cli/commands/integration/index.js.map +1 -0
- package/dist/cli/commands/integration/list.d.ts +13 -0
- package/dist/cli/commands/integration/list.d.ts.map +1 -0
- package/dist/cli/commands/integration/list.js +129 -0
- package/dist/cli/commands/integration/list.js.map +1 -0
- package/dist/cli/commands/integration/set.d.ts +13 -0
- package/dist/cli/commands/integration/set.d.ts.map +1 -0
- package/dist/cli/commands/integration/set.js +253 -0
- package/dist/cli/commands/integration/set.js.map +1 -0
- package/dist/cli/commands/list/executions.d.ts +12 -0
- package/dist/cli/commands/list/executions.d.ts.map +1 -0
- package/dist/cli/commands/list/executions.js +168 -0
- package/dist/cli/commands/list/executions.js.map +1 -0
- package/dist/cli/commands/list/index.d.ts +11 -0
- package/dist/cli/commands/list/index.d.ts.map +1 -0
- package/dist/cli/commands/list/index.js +14 -0
- package/dist/cli/commands/list/index.js.map +1 -0
- package/dist/cli/commands/logout.d.ts +12 -0
- package/dist/cli/commands/logout.d.ts.map +1 -0
- package/dist/cli/commands/logout.js +58 -0
- package/dist/cli/commands/logout.js.map +1 -0
- package/dist/cli/commands/project/create.d.ts +8 -0
- package/dist/cli/commands/project/create.d.ts.map +1 -0
- package/dist/cli/commands/project/create.js +109 -0
- package/dist/cli/commands/project/create.js.map +1 -0
- package/dist/cli/commands/project/index.d.ts +12 -0
- package/dist/cli/commands/project/index.d.ts.map +1 -0
- package/dist/cli/commands/project/index.js +15 -0
- package/dist/cli/commands/project/index.js.map +1 -0
- package/dist/cli/commands/publish.d.ts +12 -0
- package/dist/cli/commands/publish.d.ts.map +1 -0
- package/dist/cli/commands/publish.js +152 -0
- package/dist/cli/commands/publish.js.map +1 -0
- package/dist/cli/commands/redeploy.d.ts +11 -0
- package/dist/cli/commands/redeploy.d.ts.map +1 -0
- package/dist/cli/commands/redeploy.js +166 -0
- package/dist/cli/commands/redeploy.js.map +1 -0
- package/dist/cli/commands/status.d.ts +63 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +290 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/trigger.d.ts +8 -0
- package/dist/cli/commands/trigger.d.ts.map +1 -0
- package/dist/cli/commands/trigger.js +247 -0
- package/dist/cli/commands/trigger.js.map +1 -0
- package/dist/cli/commands/use.d.ts +13 -0
- package/dist/cli/commands/use.d.ts.map +1 -0
- package/dist/cli/commands/use.js +92 -0
- package/dist/cli/commands/use.js.map +1 -0
- package/dist/cli/commands/verify/index.d.ts +13 -0
- package/dist/cli/commands/verify/index.d.ts.map +1 -0
- package/dist/cli/commands/verify/index.js +18 -0
- package/dist/cli/commands/verify/index.js.map +1 -0
- package/dist/cli/commands/verify/use-case.d.ts +23 -0
- package/dist/cli/commands/verify/use-case.d.ts.map +1 -0
- package/dist/cli/commands/verify/use-case.js +94 -0
- package/dist/cli/commands/verify/use-case.js.map +1 -0
- package/dist/cli/commands/verify/workflow.d.ts +22 -0
- package/dist/cli/commands/verify/workflow.d.ts.map +1 -0
- package/dist/cli/commands/verify/workflow.js +82 -0
- package/dist/cli/commands/verify/workflow.js.map +1 -0
- package/dist/cli/commands/whoami.d.ts +13 -0
- package/dist/cli/commands/whoami.d.ts.map +1 -0
- package/dist/cli/commands/whoami.js +126 -0
- package/dist/cli/commands/whoami.js.map +1 -0
- package/dist/cli/index.d.ts +24 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +90 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/templates/claude-md-template.d.ts +12 -0
- package/dist/cli/templates/claude-md-template.d.ts.map +1 -0
- package/dist/cli/templates/claude-md-template.js +162 -0
- package/dist/cli/templates/claude-md-template.js.map +1 -0
- package/dist/cli/templates/config-template.d.ts +18 -0
- package/dist/cli/templates/config-template.d.ts.map +1 -0
- package/dist/cli/templates/config-template.js +350 -0
- package/dist/cli/templates/config-template.js.map +1 -0
- package/dist/cli/templates/skill-templates.d.ts +24 -0
- package/dist/cli/templates/skill-templates.d.ts.map +1 -0
- package/dist/cli/templates/skill-templates.js +117 -0
- package/dist/cli/templates/skill-templates.js.map +1 -0
- package/dist/cli/templates/slug.d.ts +9 -0
- package/dist/cli/templates/slug.d.ts.map +1 -0
- package/dist/cli/templates/slug.js +17 -0
- package/dist/cli/templates/slug.js.map +1 -0
- package/dist/cli/templates/workflow-templates.d.ts +693 -0
- package/dist/cli/templates/workflow-templates.d.ts.map +1 -0
- package/dist/cli/templates/workflow-templates.js +516 -0
- package/dist/cli/templates/workflow-templates.js.map +1 -0
- package/dist/cli/utils/output.d.ts +65 -0
- package/dist/cli/utils/output.d.ts.map +1 -0
- package/dist/cli/utils/output.js +188 -0
- package/dist/cli/utils/output.js.map +1 -0
- package/dist/cli/utils/validation-output.d.ts +21 -0
- package/dist/cli/utils/validation-output.d.ts.map +1 -0
- package/dist/cli/utils/validation-output.js +204 -0
- package/dist/cli/utils/validation-output.js.map +1 -0
- package/dist/data/integration-fields.d.ts +27 -0
- package/dist/data/integration-fields.d.ts.map +1 -0
- package/dist/data/integration-fields.js +361 -0
- package/dist/data/integration-fields.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -0
- package/dist/types/process-types.d.ts +740 -0
- package/dist/types/process-types.d.ts.map +1 -0
- package/dist/types/process-types.js +22 -0
- package/dist/types/process-types.js.map +1 -0
- package/dist/utils/config.d.ts +127 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +315 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/data-ingestion-deploy-client.d.ts +53 -0
- package/dist/utils/data-ingestion-deploy-client.d.ts.map +1 -0
- package/dist/utils/data-ingestion-deploy-client.js +63 -0
- package/dist/utils/data-ingestion-deploy-client.js.map +1 -0
- package/dist/utils/data-ingestion-deployer.d.ts +78 -0
- package/dist/utils/data-ingestion-deployer.d.ts.map +1 -0
- package/dist/utils/data-ingestion-deployer.js +119 -0
- package/dist/utils/data-ingestion-deployer.js.map +1 -0
- package/dist/utils/deploy-client.d.ts +55 -0
- package/dist/utils/deploy-client.d.ts.map +1 -0
- package/dist/utils/deploy-client.js +73 -0
- package/dist/utils/deploy-client.js.map +1 -0
- package/dist/utils/deployment-archiver.d.ts +110 -0
- package/dist/utils/deployment-archiver.d.ts.map +1 -0
- package/dist/utils/deployment-archiver.js +158 -0
- package/dist/utils/deployment-archiver.js.map +1 -0
- package/dist/utils/document-deploy-client.d.ts +41 -0
- package/dist/utils/document-deploy-client.d.ts.map +1 -0
- package/dist/utils/document-deploy-client.js +46 -0
- package/dist/utils/document-deploy-client.js.map +1 -0
- package/dist/utils/encryption.d.ts +85 -0
- package/dist/utils/encryption.d.ts.map +1 -0
- package/dist/utils/encryption.js +162 -0
- package/dist/utils/encryption.js.map +1 -0
- package/dist/utils/execution-client.d.ts +71 -0
- package/dist/utils/execution-client.d.ts.map +1 -0
- package/dist/utils/execution-client.js +56 -0
- package/dist/utils/execution-client.js.map +1 -0
- package/dist/utils/integration-client.d.ts +134 -0
- package/dist/utils/integration-client.d.ts.map +1 -0
- package/dist/utils/integration-client.js +109 -0
- package/dist/utils/integration-client.js.map +1 -0
- package/dist/utils/list-executions-client.d.ts +47 -0
- package/dist/utils/list-executions-client.d.ts.map +1 -0
- package/dist/utils/list-executions-client.js +50 -0
- package/dist/utils/list-executions-client.js.map +1 -0
- package/dist/utils/metadata-client.d.ts +90 -0
- package/dist/utils/metadata-client.d.ts.map +1 -0
- package/dist/utils/metadata-client.js +66 -0
- package/dist/utils/metadata-client.js.map +1 -0
- package/dist/utils/project-client.d.ts +70 -0
- package/dist/utils/project-client.d.ts.map +1 -0
- package/dist/utils/project-client.js +63 -0
- package/dist/utils/project-client.js.map +1 -0
- package/dist/utils/project-json.d.ts +71 -0
- package/dist/utils/project-json.d.ts.map +1 -0
- package/dist/utils/project-json.js +129 -0
- package/dist/utils/project-json.js.map +1 -0
- package/dist/utils/publish-client.d.ts +53 -0
- package/dist/utils/publish-client.d.ts.map +1 -0
- package/dist/utils/publish-client.js +64 -0
- package/dist/utils/publish-client.js.map +1 -0
- package/dist/utils/redeploy-client.d.ts +39 -0
- package/dist/utils/redeploy-client.d.ts.map +1 -0
- package/dist/utils/redeploy-client.js +51 -0
- package/dist/utils/redeploy-client.js.map +1 -0
- package/dist/utils/skill-parser.d.ts +52 -0
- package/dist/utils/skill-parser.d.ts.map +1 -0
- package/dist/utils/skill-parser.js +127 -0
- package/dist/utils/skill-parser.js.map +1 -0
- package/dist/utils/skills-client.d.ts +39 -0
- package/dist/utils/skills-client.d.ts.map +1 -0
- package/dist/utils/skills-client.js +32 -0
- package/dist/utils/skills-client.js.map +1 -0
- package/dist/utils/trigger-client.d.ts +78 -0
- package/dist/utils/trigger-client.d.ts.map +1 -0
- package/dist/utils/trigger-client.js +81 -0
- package/dist/utils/trigger-client.js.map +1 -0
- package/dist/utils/use-case-deployer.d.ts +93 -0
- package/dist/utils/use-case-deployer.d.ts.map +1 -0
- package/dist/utils/use-case-deployer.js +270 -0
- package/dist/utils/use-case-deployer.js.map +1 -0
- package/dist/utils/version-manager.d.ts +63 -0
- package/dist/utils/version-manager.d.ts.map +1 -0
- package/dist/utils/version-manager.js +91 -0
- package/dist/utils/version-manager.js.map +1 -0
- package/dist/utils/workflow-encoding.d.ts +26 -0
- package/dist/utils/workflow-encoding.d.ts.map +1 -0
- package/dist/utils/workflow-encoding.js +41 -0
- package/dist/utils/workflow-encoding.js.map +1 -0
- package/dist/validation/fixer.d.ts +56 -0
- package/dist/validation/fixer.d.ts.map +1 -0
- package/dist/validation/fixer.js +168 -0
- package/dist/validation/fixer.js.map +1 -0
- package/dist/validation/rules/codika-init-required.d.ts +18 -0
- package/dist/validation/rules/codika-init-required.d.ts.map +1 -0
- package/dist/validation/rules/codika-init-required.js +70 -0
- package/dist/validation/rules/codika-init-required.js.map +1 -0
- package/dist/validation/rules/codika-submit-result.d.ts +22 -0
- package/dist/validation/rules/codika-submit-result.d.ts.map +1 -0
- package/dist/validation/rules/codika-submit-result.js +144 -0
- package/dist/validation/rules/codika-submit-result.js.map +1 -0
- package/dist/validation/rules/error-branch-required.d.ts +24 -0
- package/dist/validation/rules/error-branch-required.d.ts.map +1 -0
- package/dist/validation/rules/error-branch-required.js +103 -0
- package/dist/validation/rules/error-branch-required.js.map +1 -0
- package/dist/validation/rules/index.d.ts +18 -0
- package/dist/validation/rules/index.d.ts.map +1 -0
- package/dist/validation/rules/index.js +28 -0
- package/dist/validation/rules/index.js.map +1 -0
- package/dist/validation/rules/schedule-webhook-convergence.d.ts +24 -0
- package/dist/validation/rules/schedule-webhook-convergence.d.ts.map +1 -0
- package/dist/validation/rules/schedule-webhook-convergence.js +129 -0
- package/dist/validation/rules/schedule-webhook-convergence.js.map +1 -0
- package/dist/validation/rules/subworkflow-min-params.d.ts +21 -0
- package/dist/validation/rules/subworkflow-min-params.d.ts.map +1 -0
- package/dist/validation/rules/subworkflow-min-params.js +84 -0
- package/dist/validation/rules/subworkflow-min-params.js.map +1 -0
- package/dist/validation/runner.d.ts +43 -0
- package/dist/validation/runner.d.ts.map +1 -0
- package/dist/validation/runner.js +335 -0
- package/dist/validation/runner.js.map +1 -0
- package/dist/validation/types.d.ts +155 -0
- package/dist/validation/types.d.ts.map +1 -0
- package/dist/validation/types.js +8 -0
- package/dist/validation/types.js.map +1 -0
- package/dist/validation/use-case-scripts/calledby-consistency.d.ts +23 -0
- package/dist/validation/use-case-scripts/calledby-consistency.d.ts.map +1 -0
- package/dist/validation/use-case-scripts/calledby-consistency.js +236 -0
- package/dist/validation/use-case-scripts/calledby-consistency.js.map +1 -0
- package/dist/validation/use-case-scripts/config-exports.d.ts +17 -0
- package/dist/validation/use-case-scripts/config-exports.d.ts.map +1 -0
- package/dist/validation/use-case-scripts/config-exports.js +93 -0
- package/dist/validation/use-case-scripts/config-exports.js.map +1 -0
- package/dist/validation/use-case-scripts/custom-integration-schema.d.ts +21 -0
- package/dist/validation/use-case-scripts/custom-integration-schema.d.ts.map +1 -0
- package/dist/validation/use-case-scripts/custom-integration-schema.js +378 -0
- package/dist/validation/use-case-scripts/custom-integration-schema.js.map +1 -0
- package/dist/validation/use-case-scripts/index.d.ts +27 -0
- package/dist/validation/use-case-scripts/index.d.ts.map +1 -0
- package/dist/validation/use-case-scripts/index.js +52 -0
- package/dist/validation/use-case-scripts/index.js.map +1 -0
- package/dist/validation/use-case-scripts/integration-inheritance.d.ts +35 -0
- package/dist/validation/use-case-scripts/integration-inheritance.d.ts.map +1 -0
- package/dist/validation/use-case-scripts/integration-inheritance.js +348 -0
- package/dist/validation/use-case-scripts/integration-inheritance.js.map +1 -0
- package/dist/validation/use-case-scripts/schema-types.d.ts +21 -0
- package/dist/validation/use-case-scripts/schema-types.d.ts.map +1 -0
- package/dist/validation/use-case-scripts/schema-types.js +134 -0
- package/dist/validation/use-case-scripts/schema-types.js.map +1 -0
- package/dist/validation/use-case-scripts/skill-consistency.d.ts +21 -0
- package/dist/validation/use-case-scripts/skill-consistency.d.ts.map +1 -0
- package/dist/validation/use-case-scripts/skill-consistency.js +180 -0
- package/dist/validation/use-case-scripts/skill-consistency.js.map +1 -0
- package/dist/validation/use-case-scripts/subworkflow-references.d.ts +22 -0
- package/dist/validation/use-case-scripts/subworkflow-references.d.ts.map +1 -0
- package/dist/validation/use-case-scripts/subworkflow-references.js +139 -0
- package/dist/validation/use-case-scripts/subworkflow-references.js.map +1 -0
- package/dist/validation/use-case-scripts/trigger-type-consistency.d.ts +25 -0
- package/dist/validation/use-case-scripts/trigger-type-consistency.d.ts.map +1 -0
- package/dist/validation/use-case-scripts/trigger-type-consistency.js +265 -0
- package/dist/validation/use-case-scripts/trigger-type-consistency.js.map +1 -0
- package/dist/validation/use-case-scripts/trigger-types.d.ts +20 -0
- package/dist/validation/use-case-scripts/trigger-types.d.ts.map +1 -0
- package/dist/validation/use-case-scripts/trigger-types.js +177 -0
- package/dist/validation/use-case-scripts/trigger-types.js.map +1 -0
- package/dist/validation/use-case-scripts/triggers-required.d.ts +23 -0
- package/dist/validation/use-case-scripts/triggers-required.d.ts.map +1 -0
- package/dist/validation/use-case-scripts/triggers-required.js +111 -0
- package/dist/validation/use-case-scripts/triggers-required.js.map +1 -0
- package/dist/validation/use-case-scripts/webhook-path-consistency.d.ts +28 -0
- package/dist/validation/use-case-scripts/webhook-path-consistency.d.ts.map +1 -0
- package/dist/validation/use-case-scripts/webhook-path-consistency.js +288 -0
- package/dist/validation/use-case-scripts/webhook-path-consistency.js.map +1 -0
- package/dist/validation/use-case-scripts/workflow-imports.d.ts +16 -0
- package/dist/validation/use-case-scripts/workflow-imports.d.ts.map +1 -0
- package/dist/validation/use-case-scripts/workflow-imports.js +206 -0
- package/dist/validation/use-case-scripts/workflow-imports.js.map +1 -0
- package/dist/validation/workflow-scripts/credential-placeholders.d.ts +21 -0
- package/dist/validation/workflow-scripts/credential-placeholders.d.ts.map +1 -0
- package/dist/validation/workflow-scripts/credential-placeholders.js +278 -0
- package/dist/validation/workflow-scripts/credential-placeholders.js.map +1 -0
- package/dist/validation/workflow-scripts/db-always-output.d.ts +16 -0
- package/dist/validation/workflow-scripts/db-always-output.d.ts.map +1 -0
- package/dist/validation/workflow-scripts/db-always-output.js +95 -0
- package/dist/validation/workflow-scripts/db-always-output.js.map +1 -0
- package/dist/validation/workflow-scripts/exec-workflow-wait.d.ts +15 -0
- package/dist/validation/workflow-scripts/exec-workflow-wait.d.ts.map +1 -0
- package/dist/validation/workflow-scripts/exec-workflow-wait.js +85 -0
- package/dist/validation/workflow-scripts/exec-workflow-wait.js.map +1 -0
- package/dist/validation/workflow-scripts/index.d.ts +31 -0
- package/dist/validation/workflow-scripts/index.d.ts.map +1 -0
- package/dist/validation/workflow-scripts/index.js +58 -0
- package/dist/validation/workflow-scripts/index.js.map +1 -0
- package/dist/validation/workflow-scripts/instparm-quoting.d.ts +21 -0
- package/dist/validation/workflow-scripts/instparm-quoting.d.ts.map +1 -0
- package/dist/validation/workflow-scripts/instparm-quoting.js +59 -0
- package/dist/validation/workflow-scripts/instparm-quoting.js.map +1 -0
- package/dist/validation/workflow-scripts/llm-model-id.d.ts +17 -0
- package/dist/validation/workflow-scripts/llm-model-id.d.ts.map +1 -0
- package/dist/validation/workflow-scripts/llm-model-id.js +171 -0
- package/dist/validation/workflow-scripts/llm-model-id.js.map +1 -0
- package/dist/validation/workflow-scripts/llm-output-access.d.ts +23 -0
- package/dist/validation/workflow-scripts/llm-output-access.d.ts.map +1 -0
- package/dist/validation/workflow-scripts/llm-output-access.js +274 -0
- package/dist/validation/workflow-scripts/llm-output-access.js.map +1 -0
- package/dist/validation/workflow-scripts/merge-before-terminal.d.ts +20 -0
- package/dist/validation/workflow-scripts/merge-before-terminal.d.ts.map +1 -0
- package/dist/validation/workflow-scripts/merge-before-terminal.js +87 -0
- package/dist/validation/workflow-scripts/merge-before-terminal.js.map +1 -0
- package/dist/validation/workflow-scripts/placeholder-syntax.d.ts +29 -0
- package/dist/validation/workflow-scripts/placeholder-syntax.d.ts.map +1 -0
- package/dist/validation/workflow-scripts/placeholder-syntax.js +154 -0
- package/dist/validation/workflow-scripts/placeholder-syntax.js.map +1 -0
- package/dist/validation/workflow-scripts/retry-backoff.d.ts +16 -0
- package/dist/validation/workflow-scripts/retry-backoff.d.ts.map +1 -0
- package/dist/validation/workflow-scripts/retry-backoff.js +197 -0
- package/dist/validation/workflow-scripts/retry-backoff.js.map +1 -0
- package/dist/validation/workflow-scripts/webhook-id.d.ts +17 -0
- package/dist/validation/workflow-scripts/webhook-id.d.ts.map +1 -0
- package/dist/validation/workflow-scripts/webhook-id.js +79 -0
- package/dist/validation/workflow-scripts/webhook-id.js.map +1 -0
- package/dist/validation/workflow-scripts/workflow-format.d.ts +16 -0
- package/dist/validation/workflow-scripts/workflow-format.d.ts.map +1 -0
- package/dist/validation/workflow-scripts/workflow-format.js +51 -0
- package/dist/validation/workflow-scripts/workflow-format.js.map +1 -0
- package/dist/validation/workflow-scripts/workflow-sanitization.d.ts +21 -0
- package/dist/validation/workflow-scripts/workflow-sanitization.d.ts.map +1 -0
- package/dist/validation/workflow-scripts/workflow-sanitization.js +78 -0
- package/dist/validation/workflow-scripts/workflow-sanitization.js.map +1 -0
- package/dist/validation/workflow-scripts/workflow-settings.d.ts +19 -0
- package/dist/validation/workflow-scripts/workflow-settings.d.ts.map +1 -0
- package/dist/validation/workflow-scripts/workflow-settings.js +131 -0
- package/dist/validation/workflow-scripts/workflow-settings.js.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation Runner
|
|
3
|
+
*
|
|
4
|
+
* Central orchestrator that runs all validation:
|
|
5
|
+
* - Flowlint core rules (static analysis)
|
|
6
|
+
* - Custom Codika rules (graph-based)
|
|
7
|
+
* - Workflow scripts (content-based checks)
|
|
8
|
+
* - Use-case scripts (folder-based checks)
|
|
9
|
+
*/
|
|
10
|
+
import type { ValidationResult, WorkflowValidationOptions, UseCaseValidationOptions } from './types.js';
|
|
11
|
+
/**
|
|
12
|
+
* Default rules to exclude from validation.
|
|
13
|
+
* These are Flowlint rules that produce false positives for Codika workflows.
|
|
14
|
+
*
|
|
15
|
+
* R3 - Idempotency guard: False positive for LangChain parser/transform nodes
|
|
16
|
+
* that don't perform mutations (e.g., outputParserStructured)
|
|
17
|
+
*
|
|
18
|
+
* Add more rules here as needed:
|
|
19
|
+
* R5 - No outgoing connections: Expected for terminal nodes (Submit/Error)
|
|
20
|
+
* R8 - Data never reaches consumer: False positive for LangChain sub-nodes
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Override severity for specific rules.
|
|
24
|
+
* Flowlint-core rules have hardcoded severity we can't change at source.
|
|
25
|
+
*/
|
|
26
|
+
export declare const SEVERITY_OVERRIDES: Record<string, 'must' | 'should' | 'nit'>;
|
|
27
|
+
export declare const DEFAULT_EXCLUDED_RULES: string[];
|
|
28
|
+
/**
|
|
29
|
+
* Validate a single workflow JSON file
|
|
30
|
+
*/
|
|
31
|
+
export declare function validateWorkflow(options: WorkflowValidationOptions): Promise<ValidationResult>;
|
|
32
|
+
/**
|
|
33
|
+
* Validate an entire use-case folder
|
|
34
|
+
*/
|
|
35
|
+
export declare function validateUseCase(options: UseCaseValidationOptions): Promise<ValidationResult>;
|
|
36
|
+
/**
|
|
37
|
+
* Get list of all available rules (for --rules flag help)
|
|
38
|
+
*/
|
|
39
|
+
export declare function getAvailableRules(): {
|
|
40
|
+
id: string;
|
|
41
|
+
description: string;
|
|
42
|
+
}[];
|
|
43
|
+
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/validation/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH,OAAO,KAAK,EAEV,gBAAgB,EAEhB,yBAAyB,EACzB,wBAAwB,EAEzB,MAAM,YAAY,CAAC;AAMpB;;;;;;;;;;GAUG;AACH;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAExE,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,MAAM,EAW1C,CAAC;AA4CF;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,gBAAgB,CAAC,CAgJ3B;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,gBAAgB,CAAC,CAyH3B;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,EAAE,CAQzE"}
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation Runner
|
|
3
|
+
*
|
|
4
|
+
* Central orchestrator that runs all validation:
|
|
5
|
+
* - Flowlint core rules (static analysis)
|
|
6
|
+
* - Custom Codika rules (graph-based)
|
|
7
|
+
* - Workflow scripts (content-based checks)
|
|
8
|
+
* - Use-case scripts (folder-based checks)
|
|
9
|
+
*/
|
|
10
|
+
import { readFileSync, existsSync, readdirSync } from 'fs';
|
|
11
|
+
import { join, resolve, basename } from 'path';
|
|
12
|
+
import { parseN8n, runAllRules as runFlowlintRules, defaultConfig, } from '@replikanti/flowlint-core';
|
|
13
|
+
import { customRules } from './rules/index.js';
|
|
14
|
+
import { workflowScripts } from './workflow-scripts/index.js';
|
|
15
|
+
import { useCaseScripts } from './use-case-scripts/index.js';
|
|
16
|
+
import { applyFixes, groupFindingsByFile } from './fixer.js';
|
|
17
|
+
/**
|
|
18
|
+
* Default rules to exclude from validation.
|
|
19
|
+
* These are Flowlint rules that produce false positives for Codika workflows.
|
|
20
|
+
*
|
|
21
|
+
* R3 - Idempotency guard: False positive for LangChain parser/transform nodes
|
|
22
|
+
* that don't perform mutations (e.g., outputParserStructured)
|
|
23
|
+
*
|
|
24
|
+
* Add more rules here as needed:
|
|
25
|
+
* R5 - No outgoing connections: Expected for terminal nodes (Submit/Error)
|
|
26
|
+
* R8 - Data never reaches consumer: False positive for LangChain sub-nodes
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* Override severity for specific rules.
|
|
30
|
+
* Flowlint-core rules have hardcoded severity we can't change at source.
|
|
31
|
+
*/
|
|
32
|
+
export const SEVERITY_OVERRIDES = {
|
|
33
|
+
// Add severity overrides here as needed
|
|
34
|
+
};
|
|
35
|
+
export const DEFAULT_EXCLUDED_RULES = [
|
|
36
|
+
'R1', // Retry/backoff - replaced by custom RETRY-BACKOFF script with auto-fix
|
|
37
|
+
'R2', // continueOnFail - legitimate pattern for non-critical nodes (logging, analytics)
|
|
38
|
+
'R3', // Idempotency guard - false positive for parser nodes
|
|
39
|
+
'R4', // Hardcoded secrets - false positives on param names; CRED-PLACEHOLDER handles this properly
|
|
40
|
+
'R5', // No outgoing connections - false positive for Codika Submit/Report Error terminal nodes
|
|
41
|
+
'R7', // Error path audit - global errorWorkflow handles this
|
|
42
|
+
'R9', // Env-specific literals - false positives on JS comments, workflow names; CRED-PLACEHOLDER + PLACEHOLDER-SYNTAX cover real cases
|
|
43
|
+
'R8', // Data never reaches consumer - false positive for Codika Init/Submit/Report data sinks
|
|
44
|
+
'R11', // Deprecated node type - false positive for executeWorkflow v1.3 which is current
|
|
45
|
+
'R12', // Unhandled error path - Codika workflows use a global errorWorkflow for error handling
|
|
46
|
+
];
|
|
47
|
+
/**
|
|
48
|
+
* Calculate summary from findings
|
|
49
|
+
*/
|
|
50
|
+
function calculateSummary(findings) {
|
|
51
|
+
return {
|
|
52
|
+
must: findings.filter(f => f.severity === 'must').length,
|
|
53
|
+
should: findings.filter(f => f.severity === 'should').length,
|
|
54
|
+
nit: findings.filter(f => f.severity === 'nit').length,
|
|
55
|
+
fixable: findings.filter(f => f.fixable).length,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Filter findings by rule IDs if specified (include list)
|
|
60
|
+
*/
|
|
61
|
+
function filterByRules(findings, rules) {
|
|
62
|
+
if (!rules || rules.length === 0) {
|
|
63
|
+
return findings;
|
|
64
|
+
}
|
|
65
|
+
const ruleSet = new Set(rules.map(r => r.toUpperCase()));
|
|
66
|
+
return findings.filter(f => ruleSet.has(f.rule.toUpperCase()));
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Filter out findings by rule IDs (exclude list)
|
|
70
|
+
* Combines user-provided excludeRules with DEFAULT_EXCLUDED_RULES
|
|
71
|
+
*/
|
|
72
|
+
function excludeByRules(findings, excludeRules) {
|
|
73
|
+
// Combine default excluded rules with user-provided ones
|
|
74
|
+
const allExcluded = [
|
|
75
|
+
...DEFAULT_EXCLUDED_RULES,
|
|
76
|
+
...(excludeRules || []),
|
|
77
|
+
];
|
|
78
|
+
if (allExcluded.length === 0) {
|
|
79
|
+
return findings;
|
|
80
|
+
}
|
|
81
|
+
const excludeSet = new Set(allExcluded.map(r => r.toUpperCase()));
|
|
82
|
+
return findings.filter(f => !excludeSet.has(f.rule.toUpperCase()));
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Validate a single workflow JSON file
|
|
86
|
+
*/
|
|
87
|
+
export async function validateWorkflow(options) {
|
|
88
|
+
const absolutePath = resolve(options.path);
|
|
89
|
+
const findings = [];
|
|
90
|
+
const filesValidated = [absolutePath];
|
|
91
|
+
// Check file exists
|
|
92
|
+
if (!existsSync(absolutePath)) {
|
|
93
|
+
findings.push({
|
|
94
|
+
rule: 'FILE-001',
|
|
95
|
+
severity: 'must',
|
|
96
|
+
path: absolutePath,
|
|
97
|
+
message: `Workflow file does not exist: ${absolutePath}`,
|
|
98
|
+
raw_details: 'Check the file path is correct.',
|
|
99
|
+
});
|
|
100
|
+
return {
|
|
101
|
+
valid: false,
|
|
102
|
+
findings,
|
|
103
|
+
summary: calculateSummary(findings),
|
|
104
|
+
filesValidated,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
// Read file content
|
|
108
|
+
let content;
|
|
109
|
+
try {
|
|
110
|
+
content = readFileSync(absolutePath, 'utf-8');
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
findings.push({
|
|
114
|
+
rule: 'FILE-002',
|
|
115
|
+
severity: 'must',
|
|
116
|
+
path: absolutePath,
|
|
117
|
+
message: `Failed to read workflow file: ${error.message}`,
|
|
118
|
+
raw_details: 'Check file permissions and encoding.',
|
|
119
|
+
});
|
|
120
|
+
return {
|
|
121
|
+
valid: false,
|
|
122
|
+
findings,
|
|
123
|
+
summary: calculateSummary(findings),
|
|
124
|
+
filesValidated,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
// Parse and validate JSON
|
|
128
|
+
let graph;
|
|
129
|
+
try {
|
|
130
|
+
graph = parseN8n(content);
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
findings.push({
|
|
134
|
+
rule: 'JSON-001',
|
|
135
|
+
severity: 'must',
|
|
136
|
+
path: absolutePath,
|
|
137
|
+
message: `Invalid workflow JSON: ${error.message}`,
|
|
138
|
+
raw_details: 'Ensure the file contains valid JSON with proper n8n workflow structure.',
|
|
139
|
+
});
|
|
140
|
+
return {
|
|
141
|
+
valid: false,
|
|
142
|
+
findings,
|
|
143
|
+
summary: calculateSummary(findings),
|
|
144
|
+
filesValidated,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
// Run Flowlint core rules
|
|
148
|
+
const coreFindings = runFlowlintRules(graph, { cfg: defaultConfig, path: absolutePath });
|
|
149
|
+
findings.push(...coreFindings);
|
|
150
|
+
// Run custom Codika rules
|
|
151
|
+
for (const rule of customRules) {
|
|
152
|
+
try {
|
|
153
|
+
const ruleFindings = rule(graph, { cfg: defaultConfig, path: absolutePath });
|
|
154
|
+
findings.push(...ruleFindings);
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
findings.push({
|
|
158
|
+
rule: 'RULE-ERR',
|
|
159
|
+
severity: 'nit',
|
|
160
|
+
path: absolutePath,
|
|
161
|
+
message: `Custom rule error: ${error.message}`,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
// Run workflow scripts (content-based checks)
|
|
166
|
+
for (const script of workflowScripts) {
|
|
167
|
+
try {
|
|
168
|
+
const scriptFindings = script(content, absolutePath);
|
|
169
|
+
findings.push(...scriptFindings);
|
|
170
|
+
}
|
|
171
|
+
catch (error) {
|
|
172
|
+
findings.push({
|
|
173
|
+
rule: 'SCRIPT-ERR',
|
|
174
|
+
severity: 'nit',
|
|
175
|
+
path: absolutePath,
|
|
176
|
+
message: `Workflow script error: ${error.message}`,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
// Filter by rules if specified (include list)
|
|
181
|
+
let filteredFindings = filterByRules(findings, options.rules);
|
|
182
|
+
// Exclude rules if specified (exclude list)
|
|
183
|
+
filteredFindings = excludeByRules(filteredFindings, options.excludeRules);
|
|
184
|
+
// Apply severity overrides (before strict mode so --strict can re-promote)
|
|
185
|
+
filteredFindings = filteredFindings.map(f => {
|
|
186
|
+
const override = SEVERITY_OVERRIDES[f.rule.toUpperCase()];
|
|
187
|
+
return override ? { ...f, severity: override } : f;
|
|
188
|
+
});
|
|
189
|
+
// Apply strict mode
|
|
190
|
+
if (options.strict) {
|
|
191
|
+
filteredFindings = filteredFindings.map(f => f.severity === 'should' ? { ...f, severity: 'must' } : f);
|
|
192
|
+
}
|
|
193
|
+
// Handle auto-fix
|
|
194
|
+
if (options.fix || options.dryRun) {
|
|
195
|
+
const fixResult = applyFixes(absolutePath, filteredFindings, {
|
|
196
|
+
dryRun: options.dryRun,
|
|
197
|
+
});
|
|
198
|
+
if (fixResult.applied > 0 && !options.dryRun) {
|
|
199
|
+
// Remove fixed findings from the list
|
|
200
|
+
const fixedRules = new Set(filteredFindings.filter(f => f.fixable && f.fix).map(f => f.rule));
|
|
201
|
+
filteredFindings = filteredFindings.filter(f => !f.fixable || !fixedRules.has(f.rule));
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
const summary = calculateSummary(filteredFindings);
|
|
205
|
+
const valid = summary.must === 0;
|
|
206
|
+
return {
|
|
207
|
+
valid,
|
|
208
|
+
findings: filteredFindings,
|
|
209
|
+
summary,
|
|
210
|
+
filesValidated,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Validate an entire use-case folder
|
|
215
|
+
*/
|
|
216
|
+
export async function validateUseCase(options) {
|
|
217
|
+
const absolutePath = resolve(options.path);
|
|
218
|
+
const findings = [];
|
|
219
|
+
const filesValidated = [];
|
|
220
|
+
// Check folder exists
|
|
221
|
+
if (!existsSync(absolutePath)) {
|
|
222
|
+
findings.push({
|
|
223
|
+
rule: 'FOLDER-001',
|
|
224
|
+
severity: 'must',
|
|
225
|
+
path: absolutePath,
|
|
226
|
+
message: `Use-case folder does not exist: ${absolutePath}`,
|
|
227
|
+
raw_details: 'Check the folder path is correct.',
|
|
228
|
+
});
|
|
229
|
+
return {
|
|
230
|
+
valid: false,
|
|
231
|
+
findings,
|
|
232
|
+
summary: calculateSummary(findings),
|
|
233
|
+
filesValidated,
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
// Run use-case scripts
|
|
237
|
+
for (const script of useCaseScripts) {
|
|
238
|
+
try {
|
|
239
|
+
const scriptFindings = await script(absolutePath);
|
|
240
|
+
findings.push(...scriptFindings);
|
|
241
|
+
}
|
|
242
|
+
catch (error) {
|
|
243
|
+
findings.push({
|
|
244
|
+
rule: 'SCRIPT-ERR',
|
|
245
|
+
severity: 'nit',
|
|
246
|
+
path: absolutePath,
|
|
247
|
+
message: `Use-case script error: ${error.message}`,
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
// Apply fixes to use-case-level findings (e.g., INTEGRATION-INHERITANCE modifies config.ts)
|
|
252
|
+
if (options.fix) {
|
|
253
|
+
const useCaseFixable = findings.filter(f => f.fixable && f.fix);
|
|
254
|
+
if (useCaseFixable.length > 0) {
|
|
255
|
+
const grouped = groupFindingsByFile(useCaseFixable);
|
|
256
|
+
for (const [filePath, fileFindings] of grouped) {
|
|
257
|
+
const fixResult = applyFixes(filePath, fileFindings, {
|
|
258
|
+
dryRun: options.dryRun,
|
|
259
|
+
});
|
|
260
|
+
if (fixResult.applied > 0) {
|
|
261
|
+
// Remove fixed findings from the list
|
|
262
|
+
const fixedRules = new Set(fileFindings.filter(f => f.fixable).map(f => `${f.rule}:${f.path}:${f.message}`));
|
|
263
|
+
const before = findings.length;
|
|
264
|
+
for (let i = findings.length - 1; i >= 0; i--) {
|
|
265
|
+
const key = `${findings[i].rule}:${findings[i].path}:${findings[i].message}`;
|
|
266
|
+
if (fixedRules.has(key)) {
|
|
267
|
+
findings.splice(i, 1);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
// Validate individual workflows unless skipped
|
|
275
|
+
if (!options.skipWorkflows) {
|
|
276
|
+
const workflowsPath = join(absolutePath, 'workflows');
|
|
277
|
+
if (existsSync(workflowsPath)) {
|
|
278
|
+
const workflowFiles = readdirSync(workflowsPath)
|
|
279
|
+
.filter(f => f.endsWith('.json'));
|
|
280
|
+
for (const workflowFile of workflowFiles) {
|
|
281
|
+
const workflowPath = join(workflowsPath, workflowFile);
|
|
282
|
+
filesValidated.push(workflowPath);
|
|
283
|
+
const workflowResult = await validateWorkflow({
|
|
284
|
+
path: workflowPath,
|
|
285
|
+
strict: options.strict,
|
|
286
|
+
fix: options.fix,
|
|
287
|
+
dryRun: options.dryRun,
|
|
288
|
+
rules: options.rules,
|
|
289
|
+
excludeRules: options.excludeRules,
|
|
290
|
+
});
|
|
291
|
+
// Add workflow findings with context
|
|
292
|
+
for (const finding of workflowResult.findings) {
|
|
293
|
+
findings.push({
|
|
294
|
+
...finding,
|
|
295
|
+
message: `[${basename(workflowFile)}] ${finding.message}`,
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
// Filter by rules if specified (include list)
|
|
302
|
+
let filteredFindings = filterByRules(findings, options.rules);
|
|
303
|
+
// Exclude rules if specified (exclude list)
|
|
304
|
+
filteredFindings = excludeByRules(filteredFindings, options.excludeRules);
|
|
305
|
+
// Apply severity overrides (before strict mode so --strict can re-promote)
|
|
306
|
+
filteredFindings = filteredFindings.map(f => {
|
|
307
|
+
const override = SEVERITY_OVERRIDES[f.rule.toUpperCase()];
|
|
308
|
+
return override ? { ...f, severity: override } : f;
|
|
309
|
+
});
|
|
310
|
+
// Apply strict mode
|
|
311
|
+
if (options.strict) {
|
|
312
|
+
filteredFindings = filteredFindings.map(f => f.severity === 'should' ? { ...f, severity: 'must' } : f);
|
|
313
|
+
}
|
|
314
|
+
const summary = calculateSummary(filteredFindings);
|
|
315
|
+
const valid = summary.must === 0;
|
|
316
|
+
return {
|
|
317
|
+
valid,
|
|
318
|
+
findings: filteredFindings,
|
|
319
|
+
summary,
|
|
320
|
+
filesValidated: [absolutePath, ...filesValidated],
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Get list of all available rules (for --rules flag help)
|
|
325
|
+
*/
|
|
326
|
+
export function getAvailableRules() {
|
|
327
|
+
// This could be expanded to include metadata from all rules
|
|
328
|
+
return [
|
|
329
|
+
{ id: 'CODIKA-INIT', description: 'Parent workflows must have Codika Init node' },
|
|
330
|
+
{ id: 'CODIKA-SUBMIT', description: 'Workflows must end with Submit Result or Report Error' },
|
|
331
|
+
{ id: 'RETRY-BACKOFF', description: 'API/HTTP nodes should have retry configuration (fixable)' },
|
|
332
|
+
// Add more as rules are implemented
|
|
333
|
+
];
|
|
334
|
+
}
|
|
335
|
+
//# sourceMappingURL=runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/validation/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,EACL,QAAQ,EACR,WAAW,IAAI,gBAAgB,EAC/B,aAAa,GACd,MAAM,2BAA2B,CAAC;AASnC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAE7D;;;;;;;;;;GAUG;AACH;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA8C;AAC3E,wCAAwC;CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAa;IAC9C,IAAI,EAAG,wEAAwE;IAC/E,IAAI,EAAG,kFAAkF;IACzF,IAAI,EAAG,sDAAsD;IAC7D,IAAI,EAAG,6FAA6F;IACpG,IAAI,EAAG,yFAAyF;IAChG,IAAI,EAAG,uDAAuD;IAC9D,IAAI,EAAG,iIAAiI;IACxI,IAAI,EAAG,wFAAwF;IAC/F,KAAK,EAAE,kFAAkF;IACzF,KAAK,EAAE,wFAAwF;CACh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oB;IACpB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,gBAAgB,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAC1C,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAe,EAAE,CAAC,CAAC,CAAC,CAAC,CAClE,CAAC;IACJ,CAAC;IAED,MAAM,OAAO,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACnD,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,KAAK,CAAC,CAAC;IAEjC,OAAO;QACL,KAAK;QACL,QAAQ,EAAE,gBAAgB;QAC1B,OAAO;QACP,cAAc,EAAE,CAAC,YAAY,EAAE,GAAG,cAAc,CAAC;KAClD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,4DAA4D;IAC5D,OAAO;QACL,EAAE,EAAE,EAAE,aAAa,EAAE,WAAW,EAAE,6CAA6C,EAAE;QACjF,EAAE,EAAE,EAAE,eAAe,EAAE,WAAW,EAAE,uDAAuD,EAAE;QAC7F,EAAE,EAAE,EAAE,eAAe,EAAE,WAAW,EAAE,0DAA0D,EAAE;QAChG,oCAAoC;KACrC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation Types
|
|
3
|
+
*
|
|
4
|
+
* Unified types for all validation rules, scripts, and results.
|
|
5
|
+
* Extends the Flowlint Finding type with auto-fix support.
|
|
6
|
+
*/
|
|
7
|
+
export type { Graph, RuleRunner, RuleContext, NodeRef, Edge, FlowLintConfig, } from '@replikanti/flowlint-core';
|
|
8
|
+
/**
|
|
9
|
+
* Extended Finding type with auto-fix support
|
|
10
|
+
*
|
|
11
|
+
* Compatible with flowlint-core Finding, but adds optional fix capabilities.
|
|
12
|
+
*/
|
|
13
|
+
export interface Finding {
|
|
14
|
+
/** Rule ID (e.g., "CODIKA-INIT", "CRED-001", "R1") */
|
|
15
|
+
rule: string;
|
|
16
|
+
/** Severity level - determines exit code behavior */
|
|
17
|
+
severity: 'must' | 'should' | 'nit';
|
|
18
|
+
/** File path where the issue was found */
|
|
19
|
+
path: string;
|
|
20
|
+
/** Human-readable description of the issue */
|
|
21
|
+
message: string;
|
|
22
|
+
/** Detailed instructions on how to fix the issue manually */
|
|
23
|
+
raw_details?: string;
|
|
24
|
+
/** Node ID for workflow node-specific issues */
|
|
25
|
+
nodeId?: string;
|
|
26
|
+
/** Line number in the file where the issue was found */
|
|
27
|
+
line?: number;
|
|
28
|
+
/** URL to documentation about this rule */
|
|
29
|
+
documentationUrl?: string;
|
|
30
|
+
/** Reference to the guide section explaining this rule */
|
|
31
|
+
guideRef?: {
|
|
32
|
+
/** Path relative to .guides/ folder (e.g., 'specific/codika-nodes.md') */
|
|
33
|
+
path: string;
|
|
34
|
+
/** Section title within the guide (e.g., 'Critical Workflow Rules') */
|
|
35
|
+
section?: string;
|
|
36
|
+
};
|
|
37
|
+
/** Quick check if an auto-fix is available */
|
|
38
|
+
fixable?: boolean;
|
|
39
|
+
/** Auto-fix function (ESLint-style) */
|
|
40
|
+
fix?: {
|
|
41
|
+
/** Description of what the fix does */
|
|
42
|
+
description: string;
|
|
43
|
+
/** Transform function that applies the fix to file content */
|
|
44
|
+
apply: (content: string) => string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Result of applying auto-fixes to a file
|
|
49
|
+
*/
|
|
50
|
+
export interface FixResult {
|
|
51
|
+
/** Path to the file that was fixed */
|
|
52
|
+
filePath: string;
|
|
53
|
+
/** Number of fixes successfully applied */
|
|
54
|
+
applied: number;
|
|
55
|
+
/** New file content after fixes (empty if dry-run) */
|
|
56
|
+
content: string;
|
|
57
|
+
/** Findings that would be fixed (populated in dry-run mode) */
|
|
58
|
+
wouldFix?: Finding[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Summary of validation findings by severity
|
|
62
|
+
*/
|
|
63
|
+
export interface FindingSummary {
|
|
64
|
+
/** Number of 'must' severity violations (cause exit code 1) */
|
|
65
|
+
must: number;
|
|
66
|
+
/** Number of 'should' severity warnings */
|
|
67
|
+
should: number;
|
|
68
|
+
/** Number of 'nit' severity suggestions */
|
|
69
|
+
nit: number;
|
|
70
|
+
/** Number of issues that can be auto-fixed */
|
|
71
|
+
fixable: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Complete validation result
|
|
75
|
+
*/
|
|
76
|
+
export interface ValidationResult {
|
|
77
|
+
/** True if no 'must' severity violations (validation passed) */
|
|
78
|
+
valid: boolean;
|
|
79
|
+
/** All findings from all validators */
|
|
80
|
+
findings: Finding[];
|
|
81
|
+
/** Summary counts by severity */
|
|
82
|
+
summary: FindingSummary;
|
|
83
|
+
/** Files that were validated */
|
|
84
|
+
filesValidated: string[];
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Options for workflow validation
|
|
88
|
+
*/
|
|
89
|
+
export interface WorkflowValidationOptions {
|
|
90
|
+
/** Path to the workflow JSON file */
|
|
91
|
+
path: string;
|
|
92
|
+
/** Treat 'should' severity as 'must' (stricter validation) */
|
|
93
|
+
strict?: boolean;
|
|
94
|
+
/** Apply available auto-fixes */
|
|
95
|
+
fix?: boolean;
|
|
96
|
+
/** Show what would be fixed without applying changes */
|
|
97
|
+
dryRun?: boolean;
|
|
98
|
+
/** Only run specific rules (by rule ID) */
|
|
99
|
+
rules?: string[];
|
|
100
|
+
/** Exclude specific rules (by rule ID) */
|
|
101
|
+
excludeRules?: string[];
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Options for use-case validation
|
|
105
|
+
*/
|
|
106
|
+
export interface UseCaseValidationOptions {
|
|
107
|
+
/** Path to the use-case folder */
|
|
108
|
+
path: string;
|
|
109
|
+
/** Treat 'should' severity as 'must' (stricter validation) */
|
|
110
|
+
strict?: boolean;
|
|
111
|
+
/** Skip validation of individual workflow files */
|
|
112
|
+
skipWorkflows?: boolean;
|
|
113
|
+
/** Apply available auto-fixes */
|
|
114
|
+
fix?: boolean;
|
|
115
|
+
/** Show what would be fixed without applying changes */
|
|
116
|
+
dryRun?: boolean;
|
|
117
|
+
/** Only run specific rules (by rule ID) */
|
|
118
|
+
rules?: string[];
|
|
119
|
+
/** Exclude specific rules (by rule ID) */
|
|
120
|
+
excludeRules?: string[];
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Type for a workflow validation script (non-Flowlint check)
|
|
124
|
+
*
|
|
125
|
+
* Scripts receive the raw file content and path, and return findings.
|
|
126
|
+
* This is different from Flowlint rules which receive a parsed Graph.
|
|
127
|
+
*/
|
|
128
|
+
export type WorkflowScript = (content: string, path: string) => Finding[];
|
|
129
|
+
/**
|
|
130
|
+
* Type for a use-case validation script
|
|
131
|
+
*
|
|
132
|
+
* Scripts receive the use-case folder path and return findings.
|
|
133
|
+
* They can access config.ts, workflows/, and other files as needed.
|
|
134
|
+
*/
|
|
135
|
+
export type UseCaseScript = (useCasePath: string) => Finding[] | Promise<Finding[]>;
|
|
136
|
+
/**
|
|
137
|
+
* Rule/script metadata for documentation and filtering
|
|
138
|
+
*/
|
|
139
|
+
export interface RuleMetadata {
|
|
140
|
+
/** Unique rule ID (e.g., "CODIKA-INIT") */
|
|
141
|
+
id: string;
|
|
142
|
+
/** Human-readable rule name (e.g., "codika_init_required") */
|
|
143
|
+
name: string;
|
|
144
|
+
/** Default severity */
|
|
145
|
+
severity: 'must' | 'should' | 'nit';
|
|
146
|
+
/** Short description of what the rule checks */
|
|
147
|
+
description: string;
|
|
148
|
+
/** Detailed explanation and fix instructions */
|
|
149
|
+
details: string;
|
|
150
|
+
/** Whether this rule can auto-fix issues */
|
|
151
|
+
fixable?: boolean;
|
|
152
|
+
/** Category for grouping (e.g., "codika", "security", "style") */
|
|
153
|
+
category?: string;
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=types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E,CAAC;IAEjB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,EAAE,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;AAEpF;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,2CAA2C;IAC3C,EAAE,EAAE,MAAM,CAAC;IAEX,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IAEb,uBAAuB;IACvB,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IAEpC,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IAEpB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAC;IAEhB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/validation/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CALLEDBY-CONSISTENCY Validation Script
|
|
3
|
+
*
|
|
4
|
+
* Validates that subworkflows have their callers correctly listed in calledBy.
|
|
5
|
+
* When workflow A calls subworkflow B via SUBWKFL placeholder,
|
|
6
|
+
* B's trigger config must include A in its calledBy array.
|
|
7
|
+
*
|
|
8
|
+
* @see .guides/specific/sub-workflows.md - "calledBy Array"
|
|
9
|
+
*/
|
|
10
|
+
import type { Finding, RuleMetadata } from '../types.js';
|
|
11
|
+
export declare const RULE_ID = "CALLEDBY-CONSISTENCY";
|
|
12
|
+
export declare const metadata: RuleMetadata & {
|
|
13
|
+
guideRef: {
|
|
14
|
+
path: string;
|
|
15
|
+
section: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Validates that all workflow callers are listed in subworkflow calledBy arrays
|
|
20
|
+
*/
|
|
21
|
+
export declare function checkCalledByConsistency(useCasePath: string): Promise<Finding[]>;
|
|
22
|
+
export default checkCalledByConsistency;
|
|
23
|
+
//# sourceMappingURL=calledby-consistency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calledby-consistency.d.ts","sourceRoot":"","sources":["../../../src/validation/use-case-scripts/calledby-consistency.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEzD,eAAO,MAAM,OAAO,yBAAyB,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,YAAY,GAAG;IAAE,QAAQ,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAYlF,CAAC;AAoJF;;GAEG;AACH,wBAAsB,wBAAwB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAuGtF;AAED,eAAe,wBAAwB,CAAC"}
|