@exaudeus/workrail 0.8.5 → 0.9.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/README.md +157 -403
- package/dist/application/services/enhanced-loop-validator.d.ts +2 -2
- package/dist/application/services/enhanced-loop-validator.js +12 -2
- package/dist/application/services/validation-engine.d.ts +8 -29
- package/dist/application/services/validation-engine.js +38 -21
- package/dist/application/services/workflow-compiler.d.ts +18 -0
- package/dist/application/services/workflow-compiler.js +79 -0
- package/dist/application/services/workflow-interpreter.d.ts +31 -0
- package/dist/application/services/workflow-interpreter.js +280 -0
- package/dist/application/services/workflow-service.d.ts +34 -32
- package/dist/application/services/workflow-service.js +93 -425
- package/dist/application/use-cases/get-next-step.d.ts +6 -10
- package/dist/application/use-cases/get-next-step.js +2 -6
- package/dist/application/use-cases/get-workflow.d.ts +8 -6
- package/dist/application/use-cases/get-workflow.js +42 -33
- package/dist/application/use-cases/list-workflows.d.ts +3 -3
- package/dist/application/use-cases/validate-step-output.d.ts +4 -4
- package/dist/application/use-cases/validate-workflow-file.d.ts +46 -0
- package/dist/application/use-cases/validate-workflow-file.js +57 -0
- package/dist/cli/commands/cleanup.d.ts +8 -0
- package/dist/cli/commands/cleanup.js +20 -0
- package/dist/cli/commands/index.d.ts +7 -0
- package/dist/cli/commands/index.js +21 -0
- package/dist/cli/commands/init.d.ts +11 -0
- package/dist/cli/commands/init.js +49 -0
- package/dist/cli/commands/list.d.ts +9 -0
- package/dist/cli/commands/list.js +34 -0
- package/dist/cli/commands/migrate.d.ts +78 -0
- package/dist/cli/commands/migrate.js +248 -0
- package/dist/cli/commands/sources.d.ts +21 -0
- package/dist/cli/commands/sources.js +87 -0
- package/dist/cli/commands/start.d.ts +8 -0
- package/dist/cli/commands/start.js +16 -0
- package/dist/cli/commands/validate.d.ts +6 -0
- package/dist/cli/commands/validate.js +55 -0
- package/dist/cli/interpret-result.d.ts +4 -0
- package/dist/cli/interpret-result.js +24 -0
- package/dist/cli/output-formatter.d.ts +10 -0
- package/dist/cli/output-formatter.js +97 -0
- package/dist/cli/types/cli-result.d.ts +23 -0
- package/dist/cli/types/cli-result.js +30 -0
- package/dist/cli/types/exit-code.d.ts +13 -0
- package/dist/cli/types/exit-code.js +23 -0
- package/dist/cli/types/index.d.ts +4 -0
- package/dist/cli/types/index.js +11 -0
- package/dist/cli.js +84 -278
- package/dist/config/app-config.d.ts +40 -0
- package/dist/config/app-config.js +58 -0
- package/dist/config/feature-flags.d.ts +10 -2
- package/dist/config/feature-flags.js +74 -12
- package/dist/core/error-handler.d.ts +18 -27
- package/dist/core/error-handler.js +24 -218
- package/dist/di/container.d.ts +12 -0
- package/dist/di/container.js +244 -0
- package/dist/di/tokens.d.ts +40 -0
- package/dist/di/tokens.js +42 -0
- package/dist/domain/execution/error.d.ts +32 -0
- package/dist/domain/execution/error.js +24 -0
- package/dist/domain/execution/event.d.ts +7 -0
- package/dist/domain/execution/event.js +11 -0
- package/dist/domain/execution/ids.d.ts +9 -0
- package/dist/domain/execution/ids.js +9 -0
- package/dist/domain/execution/result.d.ts +3 -0
- package/dist/domain/execution/result.js +10 -0
- package/dist/domain/execution/state.d.ts +57 -0
- package/dist/domain/execution/state.js +28 -0
- package/dist/errors/app-error.d.ts +23 -0
- package/dist/errors/factories.d.ts +6 -0
- package/dist/errors/factories.js +21 -0
- package/dist/errors/formatter.d.ts +2 -0
- package/dist/errors/formatter.js +32 -0
- package/dist/errors/index.d.ts +3 -0
- package/dist/errors/index.js +7 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.js +10 -25
- package/dist/infrastructure/index.d.ts +0 -1
- package/dist/infrastructure/index.js +0 -1
- package/dist/infrastructure/session/DashboardHeartbeat.d.ts +8 -0
- package/dist/infrastructure/session/DashboardHeartbeat.js +39 -0
- package/dist/infrastructure/session/DashboardLockRelease.d.ts +2 -0
- package/dist/infrastructure/session/DashboardLockRelease.js +29 -0
- package/dist/infrastructure/session/HttpServer.d.ts +25 -6
- package/dist/infrastructure/session/HttpServer.js +245 -90
- package/dist/infrastructure/session/SessionDataNormalizer.js +12 -2
- package/dist/infrastructure/session/SessionDataValidator.js +12 -2
- package/dist/infrastructure/session/SessionManager.d.ts +5 -3
- package/dist/infrastructure/session/SessionManager.js +52 -6
- package/dist/infrastructure/storage/caching-workflow-storage.d.ts +30 -6
- package/dist/infrastructure/storage/caching-workflow-storage.js +105 -23
- package/dist/infrastructure/storage/enhanced-multi-source-workflow-storage.d.ts +13 -9
- package/dist/infrastructure/storage/enhanced-multi-source-workflow-storage.js +80 -54
- package/dist/infrastructure/storage/file-workflow-storage.d.ts +10 -8
- package/dist/infrastructure/storage/file-workflow-storage.js +48 -56
- package/dist/infrastructure/storage/git-workflow-storage.d.ts +7 -22
- package/dist/infrastructure/storage/git-workflow-storage.js +48 -103
- package/dist/infrastructure/storage/in-memory-storage.d.ts +10 -6
- package/dist/infrastructure/storage/in-memory-storage.js +18 -13
- package/dist/infrastructure/storage/plugin-workflow-storage.d.ts +6 -18
- package/dist/infrastructure/storage/plugin-workflow-storage.js +29 -51
- package/dist/infrastructure/storage/remote-workflow-storage.d.ts +8 -17
- package/dist/infrastructure/storage/remote-workflow-storage.js +33 -156
- package/dist/infrastructure/storage/schema-validating-workflow-storage.d.ts +21 -13
- package/dist/infrastructure/storage/schema-validating-workflow-storage.js +86 -24
- package/dist/infrastructure/storage/storage.d.ts +7 -5
- package/dist/infrastructure/storage/storage.js +7 -6
- package/dist/manifest.json +1093 -0
- package/dist/mcp/error-mapper.d.ts +9 -0
- package/dist/mcp/error-mapper.js +66 -0
- package/dist/mcp/handlers/session.d.ts +34 -0
- package/dist/mcp/handlers/session.js +135 -0
- package/dist/mcp/handlers/v2-workflow.d.ts +4 -0
- package/dist/mcp/handlers/v2-workflow.js +112 -0
- package/dist/mcp/handlers/workflow.d.ts +45 -0
- package/dist/mcp/handlers/workflow.js +167 -0
- package/dist/mcp/index.d.ts +16 -0
- package/dist/mcp/index.js +51 -0
- package/dist/mcp/output-schemas.d.ts +317 -0
- package/dist/mcp/output-schemas.js +91 -0
- package/dist/mcp/server.d.ts +3 -0
- package/dist/mcp/server.js +258 -0
- package/dist/mcp/tool-description-provider.d.ts +16 -0
- package/dist/mcp/tool-description-provider.js +43 -0
- package/dist/mcp/tool-descriptions.d.ts +2 -0
- package/dist/mcp/tool-descriptions.js +109 -0
- package/dist/mcp/tool-factory.d.ts +23 -0
- package/dist/mcp/tool-factory.js +14 -0
- package/dist/mcp/tools.d.ts +156 -0
- package/dist/mcp/tools.js +196 -0
- package/dist/mcp/types/tool-description-types.d.ts +8 -0
- package/dist/mcp/types/tool-description-types.js +24 -0
- package/dist/mcp/types.d.ts +25 -0
- package/dist/mcp/types.js +15 -0
- package/dist/mcp/v2/tool-registry.d.ts +11 -0
- package/dist/mcp/v2/tool-registry.js +26 -0
- package/dist/mcp/v2/tools.d.ts +20 -0
- package/dist/mcp/v2/tools.js +17 -0
- package/dist/mcp/validation/bounded-json.d.ts +3 -0
- package/dist/mcp/validation/bounded-json.js +22 -0
- package/dist/mcp/validation/workflow-next-prevalidate.d.ts +9 -0
- package/dist/mcp/validation/workflow-next-prevalidate.js +83 -0
- package/dist/mcp/zod-to-json-schema.d.ts +17 -0
- package/dist/mcp/zod-to-json-schema.js +134 -0
- package/dist/mcp-server.d.ts +1 -1
- package/dist/mcp-server.js +6 -424
- package/dist/runtime/adapters/in-memory-shutdown-events.d.ts +6 -0
- package/dist/runtime/adapters/in-memory-shutdown-events.js +20 -0
- package/dist/runtime/adapters/node-process-signals.d.ts +4 -0
- package/dist/runtime/adapters/node-process-signals.js +11 -0
- package/dist/runtime/adapters/node-process-terminator.d.ts +4 -0
- package/dist/runtime/adapters/node-process-terminator.js +17 -0
- package/dist/runtime/adapters/noop-process-signals.d.ts +4 -0
- package/dist/runtime/adapters/noop-process-signals.js +8 -0
- package/dist/runtime/adapters/throwing-process-terminator.d.ts +4 -0
- package/dist/runtime/adapters/throwing-process-terminator.js +9 -0
- package/dist/runtime/assert-never.d.ts +1 -0
- package/dist/runtime/assert-never.js +6 -0
- package/dist/runtime/brand.d.ts +5 -0
- package/dist/runtime/ports/process-signals.d.ts +4 -0
- package/dist/runtime/ports/process-signals.js +2 -0
- package/dist/runtime/ports/process-terminator.d.ts +8 -0
- package/dist/runtime/ports/process-terminator.js +2 -0
- package/dist/runtime/ports/shutdown-events.d.ts +11 -0
- package/dist/runtime/ports/shutdown-events.js +2 -0
- package/dist/runtime/process-lifecycle-policy.d.ts +5 -0
- package/dist/runtime/process-lifecycle-policy.js +2 -0
- package/dist/runtime/result.d.ts +17 -0
- package/dist/runtime/result.js +31 -0
- package/dist/runtime/runtime-mode.d.ts +9 -0
- package/dist/runtime/runtime-mode.js +2 -0
- package/dist/types/storage.d.ts +16 -5
- package/dist/types/storage.js +8 -0
- package/dist/types/validation.d.ts +27 -0
- package/dist/types/validation.js +10 -0
- package/dist/types/workflow-definition.d.ts +63 -0
- package/dist/types/workflow-definition.js +33 -0
- package/dist/types/workflow-source.d.ts +51 -0
- package/dist/types/workflow-source.js +128 -0
- package/dist/types/workflow.d.ts +28 -0
- package/dist/types/workflow.js +96 -0
- package/dist/utils/workflow-init.d.ts +1 -0
- package/dist/utils/workflow-init.js +38 -0
- package/dist/v2/durable-core/canonical/hashing.d.ts +11 -0
- package/dist/v2/durable-core/canonical/hashing.js +13 -0
- package/dist/v2/durable-core/canonical/jcs.d.ts +11 -0
- package/dist/v2/durable-core/canonical/jcs.js +65 -0
- package/dist/v2/durable-core/canonical/json-types.d.ts +6 -0
- package/dist/v2/durable-core/canonical/json-types.js +2 -0
- package/dist/v2/durable-core/canonical/json-zod.d.ts +2 -0
- package/dist/v2/durable-core/canonical/json-zod.js +7 -0
- package/dist/v2/durable-core/canonical/jsonl.d.ts +4 -0
- package/dist/v2/durable-core/canonical/jsonl.js +13 -0
- package/dist/v2/durable-core/ids/index.d.ts +23 -0
- package/dist/v2/durable-core/ids/index.js +46 -0
- package/dist/v2/durable-core/schemas/compiled-workflow/index.d.ts +47 -0
- package/dist/v2/durable-core/schemas/compiled-workflow/index.js +17 -0
- package/dist/v2/durable-core/schemas/session/events.d.ts +1812 -0
- package/dist/v2/durable-core/schemas/session/events.js +328 -0
- package/dist/v2/durable-core/schemas/session/index.d.ts +2 -0
- package/dist/v2/durable-core/schemas/session/index.js +8 -0
- package/dist/v2/durable-core/schemas/session/manifest.d.ts +57 -0
- package/dist/v2/durable-core/schemas/session/manifest.js +30 -0
- package/dist/v2/infra/local/crypto/index.d.ts +5 -0
- package/dist/v2/infra/local/crypto/index.js +12 -0
- package/dist/v2/infra/local/data-dir/index.d.ts +13 -0
- package/dist/v2/infra/local/data-dir/index.js +69 -0
- package/dist/v2/infra/local/fs/index.d.ts +26 -0
- package/dist/v2/infra/local/fs/index.js +156 -0
- package/dist/v2/infra/local/pinned-workflow-store/index.d.ts +11 -0
- package/dist/v2/infra/local/pinned-workflow-store/index.js +85 -0
- package/dist/v2/infra/local/session-lock/index.d.ts +12 -0
- package/dist/v2/infra/local/session-lock/index.js +44 -0
- package/dist/v2/infra/local/session-store/index.d.ts +22 -0
- package/dist/v2/infra/local/session-store/index.js +358 -0
- package/dist/v2/infra/local/sha256/index.d.ts +5 -0
- package/dist/v2/infra/local/sha256/index.js +12 -0
- package/dist/v2/ports/data-dir.port.d.ts +9 -0
- package/dist/v2/ports/data-dir.port.js +2 -0
- package/dist/v2/ports/fs.port.d.ts +41 -0
- package/dist/v2/ports/fs.port.js +2 -0
- package/dist/v2/ports/pinned-workflow-store.port.d.ts +11 -0
- package/dist/v2/ports/pinned-workflow-store.port.js +2 -0
- package/dist/v2/ports/session-event-log-store.port.d.ts +37 -0
- package/dist/v2/ports/session-event-log-store.port.js +2 -0
- package/dist/v2/ports/session-lock.port.d.ts +23 -0
- package/dist/v2/ports/session-lock.port.js +2 -0
- package/dist/v2/ports/sha256.port.d.ts +4 -0
- package/dist/v2/ports/sha256.port.js +2 -0
- package/dist/v2/projections/advance-outcomes.d.ts +23 -0
- package/dist/v2/projections/advance-outcomes.js +23 -0
- package/dist/v2/projections/capabilities.d.ts +27 -0
- package/dist/v2/projections/capabilities.js +33 -0
- package/dist/v2/projections/gaps.d.ts +29 -0
- package/dist/v2/projections/gaps.js +49 -0
- package/dist/v2/projections/node-outputs.d.ts +34 -0
- package/dist/v2/projections/node-outputs.js +73 -0
- package/dist/v2/projections/preferences.d.ts +28 -0
- package/dist/v2/projections/preferences.js +50 -0
- package/dist/v2/projections/run-dag.d.ts +42 -0
- package/dist/v2/projections/run-dag.js +186 -0
- package/dist/v2/projections/run-status-signals.d.ts +26 -0
- package/dist/v2/projections/run-status-signals.js +49 -0
- package/dist/v2/projections/session-health.d.ts +18 -0
- package/dist/v2/projections/session-health.js +15 -0
- package/dist/v2/read-only/v1-to-v2-shim.d.ts +3 -0
- package/dist/v2/read-only/v1-to-v2-shim.js +38 -0
- package/package.json +35 -10
- package/spec/mcp-api-v1.0.md +5 -5
- package/web/assets/services/data-normalizer.js +17 -2
- package/web/assets/services/pattern-recognizer.js +3 -1
- package/web/assets/services/session-data.js +13 -8
- package/web/assets/utils/formatters.js +34 -23
- package/workflows/CHANGELOG-bug-investigation.md +4 -4
- package/workflows/bug-investigation.agentic.json +156 -56
- package/workflows/coding-task-workflow-agentic.json +262 -0
- package/workflows/design-thinking-workflow-autonomous.agentic.json +215 -0
- package/workflows/design-thinking-workflow.json +198 -0
- package/workflows/mr-review-workflow.agentic.json +538 -0
- package/workflows/routines/context-gathering.json +0 -4
- package/workflows/routines/ideation.json +73 -0
- package/dist/application/app.d.ts +0 -29
- package/dist/application/app.d.ts.map +0 -1
- package/dist/application/app.js +0 -114
- package/dist/application/app.js.map +0 -1
- package/dist/application/decorators/simple-output-decorator.d.ts +0 -8
- package/dist/application/decorators/simple-output-decorator.js +0 -89
- package/dist/application/services/classification-engine.d.ts +0 -33
- package/dist/application/services/classification-engine.js +0 -258
- package/dist/application/services/compression-service.d.ts +0 -20
- package/dist/application/services/compression-service.js +0 -312
- package/dist/application/services/context-management-service.d.ts +0 -38
- package/dist/application/services/context-management-service.js +0 -301
- package/dist/application/services/context-optimizer.d.ts +0 -11
- package/dist/application/services/context-optimizer.js +0 -62
- package/dist/application/services/context-persistence-service.d.ts +0 -45
- package/dist/application/services/context-persistence-service.js +0 -273
- package/dist/application/services/documentation-service.d.ts +0 -20
- package/dist/application/services/documentation-service.js +0 -155
- package/dist/application/services/enhanced-error-service.d.ts.map +0 -1
- package/dist/application/services/enhanced-error-service.js.map +0 -1
- package/dist/application/services/loop-context-optimizer.d.ts +0 -8
- package/dist/application/services/loop-context-optimizer.js +0 -114
- package/dist/application/services/loop-execution-context.d.ts +0 -23
- package/dist/application/services/loop-execution-context.js +0 -188
- package/dist/application/services/loop-step-resolver.d.ts +0 -11
- package/dist/application/services/loop-step-resolver.js +0 -70
- package/dist/application/services/validation-engine.d.ts.map +0 -1
- package/dist/application/services/validation-engine.js.map +0 -1
- package/dist/application/services/workflow-service.d.ts.map +0 -1
- package/dist/application/services/workflow-service.js.map +0 -1
- package/dist/application/use-cases/get-next-step.d.ts.map +0 -1
- package/dist/application/use-cases/get-next-step.js.map +0 -1
- package/dist/application/use-cases/get-workflow-docs.d.ts +0 -4
- package/dist/application/use-cases/get-workflow-docs.js +0 -12
- package/dist/application/use-cases/get-workflow.d.ts.map +0 -1
- package/dist/application/use-cases/get-workflow.js.map +0 -1
- package/dist/application/use-cases/get-workrail-help.d.ts +0 -4
- package/dist/application/use-cases/get-workrail-help.js +0 -12
- package/dist/application/use-cases/list-workflows.d.ts.map +0 -1
- package/dist/application/use-cases/list-workflows.js.map +0 -1
- package/dist/application/use-cases/validate-step-output.d.ts.map +0 -1
- package/dist/application/use-cases/validate-step-output.js.map +0 -1
- package/dist/application/use-cases/validate-workflow-json.d.ts.map +0 -1
- package/dist/application/use-cases/validate-workflow-json.js.map +0 -1
- package/dist/application/validation.d.ts.map +0 -1
- package/dist/application/validation.js.map +0 -1
- package/dist/cli/migrate-workflow.d.ts +0 -22
- package/dist/cli/migrate-workflow.js +0 -196
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/container.d.ts +0 -15
- package/dist/container.d.ts.map +0 -1
- package/dist/container.js +0 -25
- package/dist/container.js.map +0 -1
- package/dist/core/error-handler.d.ts.map +0 -1
- package/dist/core/error-handler.js.map +0 -1
- package/dist/domain/index.d.ts +0 -2
- package/dist/domain/index.d.ts.map +0 -1
- package/dist/domain/index.js +0 -18
- package/dist/domain/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/infrastructure/index.d.ts.map +0 -1
- package/dist/infrastructure/index.js.map +0 -1
- package/dist/infrastructure/rpc/handler.d.ts +0 -17
- package/dist/infrastructure/rpc/handler.d.ts.map +0 -1
- package/dist/infrastructure/rpc/handler.js +0 -78
- package/dist/infrastructure/rpc/handler.js.map +0 -1
- package/dist/infrastructure/rpc/index.d.ts +0 -1
- package/dist/infrastructure/rpc/index.d.ts.map +0 -1
- package/dist/infrastructure/rpc/index.js +0 -17
- package/dist/infrastructure/rpc/index.js.map +0 -1
- package/dist/infrastructure/rpc/server.d.ts +0 -3
- package/dist/infrastructure/rpc/server.d.ts.map +0 -1
- package/dist/infrastructure/rpc/server.js +0 -37
- package/dist/infrastructure/rpc/server.js.map +0 -1
- package/dist/infrastructure/storage/caching-workflow-storage.d.ts.map +0 -1
- package/dist/infrastructure/storage/caching-workflow-storage.js.map +0 -1
- package/dist/infrastructure/storage/context-storage.d.ts +0 -150
- package/dist/infrastructure/storage/context-storage.js +0 -40
- package/dist/infrastructure/storage/file-workflow-storage.d.ts.map +0 -1
- package/dist/infrastructure/storage/file-workflow-storage.js.map +0 -1
- package/dist/infrastructure/storage/filesystem-blob-storage.d.ts +0 -27
- package/dist/infrastructure/storage/filesystem-blob-storage.js +0 -363
- package/dist/infrastructure/storage/git-workflow-storage.d.ts.map +0 -1
- package/dist/infrastructure/storage/git-workflow-storage.js.map +0 -1
- package/dist/infrastructure/storage/hybrid-context-storage.d.ts +0 -29
- package/dist/infrastructure/storage/hybrid-context-storage.js +0 -400
- package/dist/infrastructure/storage/in-memory-storage.d.ts.map +0 -1
- package/dist/infrastructure/storage/in-memory-storage.js.map +0 -1
- package/dist/infrastructure/storage/index.d.ts.map +0 -1
- package/dist/infrastructure/storage/index.js.map +0 -1
- package/dist/infrastructure/storage/migrations/001_initial_schema.sql +0 -38
- package/dist/infrastructure/storage/migrations/002_context_concurrency_enhancements.sql +0 -234
- package/dist/infrastructure/storage/migrations/003_classification_overrides.sql +0 -20
- package/dist/infrastructure/storage/multi-directory-workflow-storage.d.ts +0 -32
- package/dist/infrastructure/storage/multi-directory-workflow-storage.d.ts.map +0 -1
- package/dist/infrastructure/storage/multi-directory-workflow-storage.js +0 -184
- package/dist/infrastructure/storage/multi-directory-workflow-storage.js.map +0 -1
- package/dist/infrastructure/storage/plugin-workflow-storage.d.ts.map +0 -1
- package/dist/infrastructure/storage/plugin-workflow-storage.js.map +0 -1
- package/dist/infrastructure/storage/remote-workflow-storage.d.ts.map +0 -1
- package/dist/infrastructure/storage/remote-workflow-storage.js.map +0 -1
- package/dist/infrastructure/storage/schema-validating-workflow-storage.d.ts.map +0 -1
- package/dist/infrastructure/storage/schema-validating-workflow-storage.js.map +0 -1
- package/dist/infrastructure/storage/sqlite-metadata-storage.d.ts +0 -35
- package/dist/infrastructure/storage/sqlite-metadata-storage.js +0 -410
- package/dist/infrastructure/storage/sqlite-migrator.d.ts +0 -46
- package/dist/infrastructure/storage/sqlite-migrator.js +0 -293
- package/dist/infrastructure/storage/storage.d.ts.map +0 -1
- package/dist/infrastructure/storage/storage.js.map +0 -1
- package/dist/mcp-server.d.ts.map +0 -1
- package/dist/mcp-server.js.map +0 -1
- package/dist/tools/mcp_initialize.d.ts +0 -2
- package/dist/tools/mcp_initialize.d.ts.map +0 -1
- package/dist/tools/mcp_initialize.js +0 -45
- package/dist/tools/mcp_initialize.js.map +0 -1
- package/dist/tools/mcp_shutdown.d.ts +0 -2
- package/dist/tools/mcp_shutdown.d.ts.map +0 -1
- package/dist/tools/mcp_shutdown.js +0 -10
- package/dist/tools/mcp_shutdown.js.map +0 -1
- package/dist/tools/mcp_tools_list.d.ts +0 -2
- package/dist/tools/mcp_tools_list.d.ts.map +0 -1
- package/dist/tools/mcp_tools_list.js +0 -60
- package/dist/tools/mcp_tools_list.js.map +0 -1
- package/dist/tools/session-tools.d.ts +0 -5
- package/dist/tools/session-tools.js +0 -270
- package/dist/types/context-types.d.ts +0 -236
- package/dist/types/context-types.js +0 -10
- package/dist/types/documentation-types.d.ts +0 -37
- package/dist/types/loop-context-optimizer.d.ts +0 -7
- package/dist/types/mcp-types.d.ts +0 -273
- package/dist/types/mcp-types.d.ts.map +0 -1
- package/dist/types/mcp-types.js +0 -19
- package/dist/types/mcp-types.js.map +0 -1
- package/dist/types/server.d.ts.map +0 -1
- package/dist/types/server.js.map +0 -1
- package/dist/types/storage.d.ts.map +0 -1
- package/dist/types/storage.js.map +0 -1
- package/dist/types/workflow-types.d.ts +0 -336
- package/dist/types/workflow-types.d.ts.map +0 -1
- package/dist/types/workflow-types.js +0 -20
- package/dist/types/workflow-types.js.map +0 -1
- package/dist/utils/condition-evaluator.d.ts.map +0 -1
- package/dist/utils/condition-evaluator.js.map +0 -1
- package/dist/utils/config.d.ts +0 -149
- package/dist/utils/config.d.ts.map +0 -1
- package/dist/utils/config.js +0 -251
- package/dist/utils/config.js.map +0 -1
- package/dist/utils/storage-security.d.ts.map +0 -1
- package/dist/utils/storage-security.js.map +0 -1
- package/dist/validation/request-validator.d.ts +0 -8
- package/dist/validation/request-validator.d.ts.map +0 -1
- package/dist/validation/request-validator.js +0 -32
- package/dist/validation/request-validator.js.map +0 -1
- package/dist/validation/response-validator.d.ts +0 -8
- package/dist/validation/response-validator.d.ts.map +0 -1
- package/dist/validation/response-validator.js +0 -110
- package/dist/validation/response-validator.js.map +0 -1
- package/dist/validation/schemas.d.ts +0 -1
- package/dist/validation/schemas.d.ts.map +0 -1
- package/dist/validation/schemas.js +0 -53
- package/dist/validation/schemas.js.map +0 -1
- /package/dist/{types/documentation-types.js → errors/app-error.js} +0 -0
- /package/dist/{types/loop-context-optimizer.js → runtime/brand.js} +0 -0
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
2
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
9
|
exports.SessionDataValidator = void 0;
|
|
4
|
-
|
|
10
|
+
const tsyringe_1 = require("tsyringe");
|
|
11
|
+
let SessionDataValidator = class SessionDataValidator {
|
|
5
12
|
validate(workflowId, data, sessionId) {
|
|
6
13
|
const warnings = [];
|
|
7
14
|
switch (workflowId) {
|
|
@@ -267,5 +274,8 @@ class SessionDataValidator {
|
|
|
267
274
|
});
|
|
268
275
|
}
|
|
269
276
|
}
|
|
270
|
-
}
|
|
277
|
+
};
|
|
271
278
|
exports.SessionDataValidator = SessionDataValidator;
|
|
279
|
+
exports.SessionDataValidator = SessionDataValidator = __decorate([
|
|
280
|
+
(0, tsyringe_1.singleton)()
|
|
281
|
+
], SessionDataValidator);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
+
import { SessionDataNormalizer } from './SessionDataNormalizer';
|
|
3
|
+
import { SessionDataValidator } from './SessionDataValidator';
|
|
2
4
|
export interface Session {
|
|
3
5
|
id: string;
|
|
4
6
|
workflowId: string;
|
|
@@ -16,13 +18,13 @@ export interface ProjectMetadata {
|
|
|
16
18
|
workflows: string[];
|
|
17
19
|
}
|
|
18
20
|
export declare class SessionManager extends EventEmitter {
|
|
21
|
+
private normalizer;
|
|
22
|
+
private validator;
|
|
19
23
|
private sessionsRoot;
|
|
20
24
|
private projectId;
|
|
21
25
|
private projectPath;
|
|
22
26
|
private watchers;
|
|
23
|
-
|
|
24
|
-
private validator;
|
|
25
|
-
constructor(projectPath?: string);
|
|
27
|
+
constructor(normalizer: SessionDataNormalizer, validator: SessionDataValidator, projectPath: string);
|
|
26
28
|
private hashProjectPath;
|
|
27
29
|
private resolveProjectPath;
|
|
28
30
|
private findGitRepoRoot;
|
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
2
14
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
15
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
16
|
};
|
|
@@ -11,18 +23,20 @@ const crypto_1 = require("crypto");
|
|
|
11
23
|
const child_process_1 = require("child_process");
|
|
12
24
|
const os_1 = __importDefault(require("os"));
|
|
13
25
|
const events_1 = require("events");
|
|
26
|
+
const tsyringe_1 = require("tsyringe");
|
|
27
|
+
const tokens_js_1 = require("../../di/tokens.js");
|
|
14
28
|
const SessionDataNormalizer_1 = require("./SessionDataNormalizer");
|
|
15
29
|
const SessionDataValidator_1 = require("./SessionDataValidator");
|
|
16
|
-
class SessionManager extends events_1.EventEmitter {
|
|
17
|
-
constructor(
|
|
30
|
+
let SessionManager = class SessionManager extends events_1.EventEmitter {
|
|
31
|
+
constructor(normalizer, validator, projectPath) {
|
|
18
32
|
super();
|
|
33
|
+
this.normalizer = normalizer;
|
|
34
|
+
this.validator = validator;
|
|
19
35
|
this.watchers = new Map();
|
|
20
36
|
this.sessionsRoot = path_1.default.join(os_1.default.homedir(), '.workrail', 'sessions');
|
|
21
37
|
const resolvedPath = this.resolveProjectPath(projectPath);
|
|
22
38
|
this.projectPath = resolvedPath;
|
|
23
39
|
this.projectId = this.hashProjectPath(resolvedPath);
|
|
24
|
-
this.normalizer = new SessionDataNormalizer_1.SessionDataNormalizer();
|
|
25
|
-
this.validator = new SessionDataValidator_1.SessionDataValidator();
|
|
26
40
|
}
|
|
27
41
|
hashProjectPath(projectPath) {
|
|
28
42
|
return (0, crypto_1.createHash)('sha256')
|
|
@@ -347,10 +361,17 @@ class SessionManager extends events_1.EventEmitter {
|
|
|
347
361
|
if (this.watchers.has(watchKey)) {
|
|
348
362
|
return;
|
|
349
363
|
}
|
|
364
|
+
const MAX_CONSECUTIVE_ERRORS = 5;
|
|
365
|
+
let consecutiveErrorCount = 0;
|
|
366
|
+
let debounceTimer = null;
|
|
350
367
|
try {
|
|
351
368
|
const watcher = fs_1.default.watch(sessionPath, (eventType) => {
|
|
352
369
|
if (eventType === 'change') {
|
|
353
|
-
|
|
370
|
+
if (debounceTimer) {
|
|
371
|
+
clearTimeout(debounceTimer);
|
|
372
|
+
}
|
|
373
|
+
debounceTimer = setTimeout(async () => {
|
|
374
|
+
debounceTimer = null;
|
|
354
375
|
try {
|
|
355
376
|
const session = await this.getSession(workflowId, sessionId);
|
|
356
377
|
if (session) {
|
|
@@ -360,15 +381,32 @@ class SessionManager extends events_1.EventEmitter {
|
|
|
360
381
|
session
|
|
361
382
|
});
|
|
362
383
|
}
|
|
384
|
+
consecutiveErrorCount = 0;
|
|
363
385
|
}
|
|
364
386
|
catch (error) {
|
|
387
|
+
if (error.code === 'EBUSY') {
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
consecutiveErrorCount++;
|
|
391
|
+
console.error(`[SessionManager] Watch error for ${watchKey} (${consecutiveErrorCount}/${MAX_CONSECUTIVE_ERRORS}):`, error.message || error);
|
|
392
|
+
if (consecutiveErrorCount >= MAX_CONSECUTIVE_ERRORS) {
|
|
393
|
+
console.error(`[SessionManager] Too many errors, closing watcher for ${watchKey}`);
|
|
394
|
+
this.unwatchSession(workflowId, sessionId);
|
|
395
|
+
}
|
|
365
396
|
}
|
|
366
397
|
}, 100);
|
|
367
398
|
}
|
|
368
399
|
});
|
|
400
|
+
watcher.on('error', (error) => {
|
|
401
|
+
console.error(`[SessionManager] Watcher error for ${watchKey}:`, error);
|
|
402
|
+
this.unwatchSession(workflowId, sessionId);
|
|
403
|
+
});
|
|
369
404
|
this.watchers.set(watchKey, watcher);
|
|
370
405
|
}
|
|
371
406
|
catch (error) {
|
|
407
|
+
if (error.code !== 'ENOENT') {
|
|
408
|
+
console.error(`[SessionManager] Failed to start watcher for ${watchKey}:`, error.message || error);
|
|
409
|
+
}
|
|
372
410
|
}
|
|
373
411
|
}
|
|
374
412
|
unwatchSession(workflowId, sessionId) {
|
|
@@ -415,5 +453,13 @@ class SessionManager extends events_1.EventEmitter {
|
|
|
415
453
|
console.error('[SessionManager] Failed to log validation warnings:', error);
|
|
416
454
|
}
|
|
417
455
|
}
|
|
418
|
-
}
|
|
456
|
+
};
|
|
419
457
|
exports.SessionManager = SessionManager;
|
|
458
|
+
exports.SessionManager = SessionManager = __decorate([
|
|
459
|
+
(0, tsyringe_1.singleton)(),
|
|
460
|
+
__param(0, (0, tsyringe_1.inject)(SessionDataNormalizer_1.SessionDataNormalizer)),
|
|
461
|
+
__param(1, (0, tsyringe_1.inject)(SessionDataValidator_1.SessionDataValidator)),
|
|
462
|
+
__param(2, (0, tsyringe_1.inject)(tokens_js_1.DI.Config.ProjectPath)),
|
|
463
|
+
__metadata("design:paramtypes", [SessionDataNormalizer_1.SessionDataNormalizer,
|
|
464
|
+
SessionDataValidator_1.SessionDataValidator, String])
|
|
465
|
+
], SessionManager);
|
|
@@ -1,18 +1,42 @@
|
|
|
1
|
-
import { IWorkflowStorage } from '../../types/storage';
|
|
2
|
-
import { Workflow, WorkflowSummary } from '../../types/
|
|
1
|
+
import { IWorkflowStorage, ICompositeWorkflowStorage } from '../../types/storage';
|
|
2
|
+
import { Workflow, WorkflowSummary, WorkflowDefinition, WorkflowSource } from '../../types/workflow';
|
|
3
3
|
export declare class CachingWorkflowStorage implements IWorkflowStorage {
|
|
4
4
|
private readonly inner;
|
|
5
5
|
private readonly ttlMs;
|
|
6
|
-
|
|
6
|
+
readonly kind: "single";
|
|
7
|
+
private workflowCache;
|
|
8
|
+
private summaryCache;
|
|
7
9
|
private stats;
|
|
8
10
|
constructor(inner: IWorkflowStorage, ttlMs: number);
|
|
11
|
+
get source(): WorkflowSource;
|
|
9
12
|
getCacheStats(): {
|
|
10
13
|
hits: number;
|
|
11
14
|
misses: number;
|
|
12
15
|
};
|
|
16
|
+
clearCache(): void;
|
|
13
17
|
private isFresh;
|
|
14
|
-
loadAllWorkflows(): Promise<Workflow[]>;
|
|
18
|
+
loadAllWorkflows(): Promise<readonly Workflow[]>;
|
|
15
19
|
getWorkflowById(id: string): Promise<Workflow | null>;
|
|
16
|
-
listWorkflowSummaries(): Promise<WorkflowSummary[]>;
|
|
17
|
-
save
|
|
20
|
+
listWorkflowSummaries(): Promise<readonly WorkflowSummary[]>;
|
|
21
|
+
save(definition: WorkflowDefinition): Promise<void>;
|
|
22
|
+
}
|
|
23
|
+
export declare class CachingCompositeWorkflowStorage implements ICompositeWorkflowStorage {
|
|
24
|
+
private readonly inner;
|
|
25
|
+
private readonly ttlMs;
|
|
26
|
+
readonly kind: "composite";
|
|
27
|
+
private workflowCache;
|
|
28
|
+
private summaryCache;
|
|
29
|
+
private stats;
|
|
30
|
+
constructor(inner: ICompositeWorkflowStorage, ttlMs: number);
|
|
31
|
+
private isFresh;
|
|
32
|
+
getSources(): readonly WorkflowSource[];
|
|
33
|
+
loadAllWorkflows(): Promise<readonly Workflow[]>;
|
|
34
|
+
getWorkflowById(id: string): Promise<Workflow | null>;
|
|
35
|
+
listWorkflowSummaries(): Promise<readonly WorkflowSummary[]>;
|
|
36
|
+
save(definition: WorkflowDefinition): Promise<void>;
|
|
37
|
+
getCacheStats(): {
|
|
38
|
+
hits: number;
|
|
39
|
+
misses: number;
|
|
40
|
+
};
|
|
41
|
+
clearCache(): void;
|
|
18
42
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CachingWorkflowStorage = void 0;
|
|
3
|
+
exports.CachingCompositeWorkflowStorage = exports.CachingWorkflowStorage = void 0;
|
|
4
4
|
const deepClone = (obj) => {
|
|
5
|
-
if (typeof
|
|
6
|
-
return
|
|
5
|
+
if (typeof globalThis.structuredClone === 'function') {
|
|
6
|
+
return globalThis.structuredClone(obj);
|
|
7
7
|
}
|
|
8
8
|
return JSON.parse(JSON.stringify(obj));
|
|
9
9
|
};
|
|
@@ -11,44 +11,126 @@ class CachingWorkflowStorage {
|
|
|
11
11
|
constructor(inner, ttlMs) {
|
|
12
12
|
this.inner = inner;
|
|
13
13
|
this.ttlMs = ttlMs;
|
|
14
|
-
this.
|
|
14
|
+
this.kind = 'single';
|
|
15
|
+
this.workflowCache = null;
|
|
16
|
+
this.summaryCache = null;
|
|
15
17
|
this.stats = { hits: 0, misses: 0 };
|
|
16
18
|
}
|
|
19
|
+
get source() {
|
|
20
|
+
return this.inner.source;
|
|
21
|
+
}
|
|
17
22
|
getCacheStats() {
|
|
18
23
|
return { ...this.stats };
|
|
19
24
|
}
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
clearCache() {
|
|
26
|
+
this.workflowCache = null;
|
|
27
|
+
this.summaryCache = null;
|
|
28
|
+
}
|
|
29
|
+
isFresh(cache) {
|
|
30
|
+
return cache !== null && Date.now() - cache.timestamp < this.ttlMs;
|
|
22
31
|
}
|
|
23
32
|
async loadAllWorkflows() {
|
|
24
|
-
if (this.isFresh()) {
|
|
33
|
+
if (this.isFresh(this.workflowCache)) {
|
|
25
34
|
this.stats.hits += 1;
|
|
26
|
-
return deepClone(this.
|
|
35
|
+
return deepClone(this.workflowCache.value);
|
|
27
36
|
}
|
|
28
37
|
this.stats.misses += 1;
|
|
29
38
|
const workflows = await this.inner.loadAllWorkflows();
|
|
30
|
-
this.
|
|
39
|
+
this.workflowCache = { value: workflows, timestamp: Date.now() };
|
|
40
|
+
this.summaryCache = null;
|
|
31
41
|
return deepClone(workflows);
|
|
32
42
|
}
|
|
33
43
|
async getWorkflowById(id) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
44
|
+
if (this.isFresh(this.workflowCache)) {
|
|
45
|
+
const wf = this.workflowCache.value.find((w) => w.definition.id === id);
|
|
46
|
+
if (wf) {
|
|
47
|
+
this.stats.hits += 1;
|
|
48
|
+
return deepClone(wf);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
this.stats.misses += 1;
|
|
52
|
+
const workflow = await this.inner.getWorkflowById(id);
|
|
53
|
+
return workflow ? deepClone(workflow) : null;
|
|
37
54
|
}
|
|
38
55
|
async listWorkflowSummaries() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
async save(
|
|
56
|
+
if (this.isFresh(this.summaryCache)) {
|
|
57
|
+
this.stats.hits += 1;
|
|
58
|
+
return deepClone(this.summaryCache.value);
|
|
59
|
+
}
|
|
60
|
+
this.stats.misses += 1;
|
|
61
|
+
const summaries = await this.inner.listWorkflowSummaries();
|
|
62
|
+
this.summaryCache = { value: summaries, timestamp: Date.now() };
|
|
63
|
+
return deepClone(summaries);
|
|
64
|
+
}
|
|
65
|
+
async save(definition) {
|
|
49
66
|
if (typeof this.inner.save === 'function') {
|
|
50
|
-
|
|
67
|
+
await this.inner.save(definition);
|
|
68
|
+
this.clearCache();
|
|
51
69
|
}
|
|
52
70
|
}
|
|
53
71
|
}
|
|
54
72
|
exports.CachingWorkflowStorage = CachingWorkflowStorage;
|
|
73
|
+
class CachingCompositeWorkflowStorage {
|
|
74
|
+
constructor(inner, ttlMs) {
|
|
75
|
+
this.inner = inner;
|
|
76
|
+
this.ttlMs = ttlMs;
|
|
77
|
+
this.kind = 'composite';
|
|
78
|
+
this.workflowCache = null;
|
|
79
|
+
this.summaryCache = null;
|
|
80
|
+
this.stats = { hits: 0, misses: 0 };
|
|
81
|
+
}
|
|
82
|
+
isFresh(cache) {
|
|
83
|
+
return cache !== null && Date.now() - cache.timestamp < this.ttlMs;
|
|
84
|
+
}
|
|
85
|
+
getSources() {
|
|
86
|
+
return this.inner.getSources();
|
|
87
|
+
}
|
|
88
|
+
async loadAllWorkflows() {
|
|
89
|
+
if (this.isFresh(this.workflowCache)) {
|
|
90
|
+
this.stats.hits += 1;
|
|
91
|
+
return deepClone(this.workflowCache.value);
|
|
92
|
+
}
|
|
93
|
+
this.stats.misses += 1;
|
|
94
|
+
const workflows = await this.inner.loadAllWorkflows();
|
|
95
|
+
this.workflowCache = { value: workflows, timestamp: Date.now() };
|
|
96
|
+
this.summaryCache = null;
|
|
97
|
+
return deepClone(workflows);
|
|
98
|
+
}
|
|
99
|
+
async getWorkflowById(id) {
|
|
100
|
+
if (this.isFresh(this.workflowCache)) {
|
|
101
|
+
const wf = this.workflowCache.value.find((w) => w.definition.id === id);
|
|
102
|
+
if (wf) {
|
|
103
|
+
this.stats.hits += 1;
|
|
104
|
+
return deepClone(wf);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
this.stats.misses += 1;
|
|
108
|
+
const workflow = await this.inner.getWorkflowById(id);
|
|
109
|
+
return workflow ? deepClone(workflow) : null;
|
|
110
|
+
}
|
|
111
|
+
async listWorkflowSummaries() {
|
|
112
|
+
if (this.isFresh(this.summaryCache)) {
|
|
113
|
+
this.stats.hits += 1;
|
|
114
|
+
return deepClone(this.summaryCache.value);
|
|
115
|
+
}
|
|
116
|
+
this.stats.misses += 1;
|
|
117
|
+
const summaries = await this.inner.listWorkflowSummaries();
|
|
118
|
+
this.summaryCache = { value: summaries, timestamp: Date.now() };
|
|
119
|
+
return deepClone(summaries);
|
|
120
|
+
}
|
|
121
|
+
async save(definition) {
|
|
122
|
+
if (typeof this.inner.save === 'function') {
|
|
123
|
+
await this.inner.save(definition);
|
|
124
|
+
this.workflowCache = null;
|
|
125
|
+
this.summaryCache = null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
getCacheStats() {
|
|
129
|
+
return { ...this.stats };
|
|
130
|
+
}
|
|
131
|
+
clearCache() {
|
|
132
|
+
this.workflowCache = null;
|
|
133
|
+
this.summaryCache = null;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
exports.CachingCompositeWorkflowStorage = CachingCompositeWorkflowStorage;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Workflow, WorkflowSummary } from '../../types/
|
|
1
|
+
import { ICompositeWorkflowStorage } from '../../types/storage';
|
|
2
|
+
import { Workflow, WorkflowSummary, WorkflowDefinition, WorkflowSource } from '../../types/workflow';
|
|
3
3
|
import { GitWorkflowConfig } from './git-workflow-storage';
|
|
4
4
|
import { RemoteWorkflowRegistryConfig } from './remote-workflow-storage';
|
|
5
5
|
import { PluginWorkflowConfig } from './plugin-workflow-storage';
|
|
6
|
+
import type { IFeatureFlagProvider } from '../../config/feature-flags';
|
|
6
7
|
interface FileWorkflowStorageOptions {
|
|
7
8
|
maxFileSizeBytes?: number;
|
|
8
9
|
cacheTTLms?: number;
|
|
@@ -23,19 +24,22 @@ export interface EnhancedMultiSourceConfig {
|
|
|
23
24
|
warnOnSourceFailure?: boolean;
|
|
24
25
|
gracefulDegradation?: boolean;
|
|
25
26
|
}
|
|
26
|
-
export declare class EnhancedMultiSourceWorkflowStorage implements
|
|
27
|
+
export declare class EnhancedMultiSourceWorkflowStorage implements ICompositeWorkflowStorage {
|
|
28
|
+
private readonly featureFlagProvider;
|
|
29
|
+
readonly kind: "composite";
|
|
27
30
|
private readonly storageInstances;
|
|
28
31
|
private readonly config;
|
|
29
|
-
|
|
30
|
-
|
|
32
|
+
constructor(config?: EnhancedMultiSourceConfig, featureFlagProvider?: IFeatureFlagProvider | null);
|
|
33
|
+
getSources(): readonly WorkflowSource[];
|
|
31
34
|
private initializeStorageSources;
|
|
32
|
-
loadAllWorkflows(): Promise<Workflow[]>;
|
|
35
|
+
loadAllWorkflows(): Promise<readonly Workflow[]>;
|
|
33
36
|
getWorkflowById(id: string): Promise<Workflow | null>;
|
|
34
|
-
listWorkflowSummaries(): Promise<WorkflowSummary[]>;
|
|
35
|
-
save(
|
|
37
|
+
listWorkflowSummaries(): Promise<readonly WorkflowSummary[]>;
|
|
38
|
+
save(definition: WorkflowDefinition): Promise<void>;
|
|
36
39
|
getSourceInfo(): Array<{
|
|
37
40
|
name: string;
|
|
38
41
|
type: string;
|
|
42
|
+
source: WorkflowSource;
|
|
39
43
|
}>;
|
|
40
44
|
private handleSourceError;
|
|
41
45
|
private getBundledWorkflowsPath;
|
|
@@ -44,5 +48,5 @@ export declare class EnhancedMultiSourceWorkflowStorage implements IWorkflowStor
|
|
|
44
48
|
private extractRepoName;
|
|
45
49
|
private getStorageType;
|
|
46
50
|
}
|
|
47
|
-
export declare function createEnhancedMultiSourceWorkflowStorage(overrides?: EnhancedMultiSourceConfig): EnhancedMultiSourceWorkflowStorage;
|
|
51
|
+
export declare function createEnhancedMultiSourceWorkflowStorage(overrides?: EnhancedMultiSourceConfig, featureFlagProvider?: IFeatureFlagProvider): EnhancedMultiSourceWorkflowStorage;
|
|
48
52
|
export {};
|