@orbytautomation/engine 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/AdapterRegistry.d.ts.map +1 -1
- package/dist/adapters/AdapterRegistry.js +6 -0
- package/dist/adapters/AdapterRegistry.js.map +1 -1
- package/dist/automation/BackoffStrategy.d.ts +1 -19
- package/dist/automation/BackoffStrategy.d.ts.map +1 -1
- package/dist/automation/BackoffStrategy.js.map +1 -1
- package/dist/automation/FailureStrategy.d.ts +1 -34
- package/dist/automation/FailureStrategy.d.ts.map +1 -1
- package/dist/automation/FailureStrategy.js.map +1 -1
- package/dist/automation/RetryPolicy.d.ts +2 -22
- package/dist/automation/RetryPolicy.d.ts.map +1 -1
- package/dist/automation/RetryPolicy.js.map +1 -1
- package/dist/automation/TimeoutManager.d.ts +1 -26
- package/dist/automation/TimeoutManager.d.ts.map +1 -1
- package/dist/automation/TimeoutManager.js.map +1 -1
- package/dist/automation/runtime/FailureHandler.d.ts +2 -57
- package/dist/automation/runtime/FailureHandler.d.ts.map +1 -1
- package/dist/automation/runtime/FailureHandler.js.map +1 -1
- package/dist/context/ContextStore.d.ts +1 -36
- package/dist/context/ContextStore.d.ts.map +1 -1
- package/dist/context/ContextStore.js.map +1 -1
- package/dist/context/VariableResolver.d.ts +1 -44
- package/dist/context/VariableResolver.d.ts.map +1 -1
- package/dist/context/VariableResolver.js +7 -0
- package/dist/context/VariableResolver.js.map +1 -1
- package/dist/core/EngineConfig.d.ts +1 -138
- package/dist/core/EngineConfig.d.ts.map +1 -1
- package/dist/core/EngineConfig.js.map +1 -1
- package/dist/core/EngineContext.d.ts +1 -62
- package/dist/core/EngineContext.d.ts.map +1 -1
- package/dist/core/EngineContext.js.map +1 -1
- package/dist/core/OrbytEngine.d.ts +19 -6
- package/dist/core/OrbytEngine.d.ts.map +1 -1
- package/dist/core/OrbytEngine.js +81 -4
- package/dist/core/OrbytEngine.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/errors/ErrorDebugger.d.ts.map +1 -1
- package/dist/errors/ErrorDebugger.js +7 -0
- package/dist/errors/ErrorDebugger.js.map +1 -1
- package/dist/errors/ErrorDetector.d.ts.map +1 -1
- package/dist/errors/ErrorDetector.js +12 -0
- package/dist/errors/ErrorDetector.js.map +1 -1
- package/dist/errors/ErrorFormatter.d.ts +1 -1
- package/dist/errors/ErrorFormatter.d.ts.map +1 -1
- package/dist/errors/OrbytError.d.ts +1 -20
- package/dist/errors/OrbytError.d.ts.map +1 -1
- package/dist/errors/OrbytError.js.map +1 -1
- package/dist/errors/SecurityErrors.d.ts +2 -38
- package/dist/errors/SecurityErrors.d.ts.map +1 -1
- package/dist/errors/SecurityErrors.js +0 -20
- package/dist/errors/SecurityErrors.js.map +1 -1
- package/dist/errors/WorkflowError.d.ts +2 -1
- package/dist/errors/WorkflowError.d.ts.map +1 -1
- package/dist/errors/WorkflowError.js.map +1 -1
- package/dist/events/EngineEvents.d.ts +1 -123
- package/dist/events/EngineEvents.d.ts.map +1 -1
- package/dist/events/EngineEvents.js +0 -35
- package/dist/events/EngineEvents.js.map +1 -1
- package/dist/events/EventBus.d.ts +1 -1
- package/dist/events/EventBus.d.ts.map +1 -1
- package/dist/events/EventBus.js.map +1 -1
- package/dist/execution/ExecutionEngine.d.ts +1 -68
- package/dist/execution/ExecutionEngine.d.ts.map +1 -1
- package/dist/execution/ExecutionEngine.js +43 -11
- package/dist/execution/ExecutionEngine.js.map +1 -1
- package/dist/execution/ExecutionLimits.d.ts +1 -47
- package/dist/execution/ExecutionLimits.d.ts.map +1 -1
- package/dist/execution/ExecutionLimits.js +1 -60
- package/dist/execution/ExecutionLimits.js.map +1 -1
- package/dist/execution/ExecutionNode.d.ts +1 -64
- package/dist/execution/ExecutionNode.d.ts.map +1 -1
- package/dist/execution/ExecutionNode.js.map +1 -1
- package/dist/execution/ExecutionPlan.d.ts +1 -31
- package/dist/execution/ExecutionPlan.d.ts.map +1 -1
- package/dist/execution/ExecutionPlan.js +21 -1
- package/dist/execution/ExecutionPlan.js.map +1 -1
- package/dist/execution/ExecutionStrategyResolver.d.ts +1 -54
- package/dist/execution/ExecutionStrategyResolver.d.ts.map +1 -1
- package/dist/execution/ExecutionStrategyResolver.js.map +1 -1
- package/dist/execution/IntentAnalyzer.d.ts +1 -37
- package/dist/execution/IntentAnalyzer.d.ts.map +1 -1
- package/dist/execution/IntentAnalyzer.js +20 -0
- package/dist/execution/IntentAnalyzer.js.map +1 -1
- package/dist/execution/InternalExecutionContext.d.ts +1 -196
- package/dist/execution/InternalExecutionContext.d.ts.map +1 -1
- package/dist/execution/InternalExecutionContext.js.map +1 -1
- package/dist/execution/StepExecutor.d.ts +1 -39
- package/dist/execution/StepExecutor.d.ts.map +1 -1
- package/dist/execution/StepExecutor.js +111 -30
- package/dist/execution/StepExecutor.js.map +1 -1
- package/dist/execution/WorkflowExecutor.d.ts +1 -48
- package/dist/execution/WorkflowExecutor.d.ts.map +1 -1
- package/dist/execution/WorkflowExecutor.js +33 -1
- package/dist/execution/WorkflowExecutor.js.map +1 -1
- package/dist/execution/drivers/AdapterDriver.d.ts +2 -1
- package/dist/execution/drivers/AdapterDriver.d.ts.map +1 -1
- package/dist/execution/drivers/AdapterDriver.js.map +1 -1
- package/dist/execution/drivers/DriverResolver.d.ts +1 -1
- package/dist/execution/drivers/DriverResolver.d.ts.map +1 -1
- package/dist/execution/drivers/DriverResolver.js.map +1 -1
- package/dist/execution/drivers/ExecutionDriver.d.ts +1 -94
- package/dist/execution/drivers/ExecutionDriver.d.ts.map +1 -1
- package/dist/execution/drivers/ExecutionDriver.js.map +1 -1
- package/dist/explanation/ExplanationGenerator.d.ts +104 -0
- package/dist/explanation/ExplanationGenerator.d.ts.map +1 -0
- package/dist/explanation/ExplanationGenerator.js +814 -0
- package/dist/explanation/ExplanationGenerator.js.map +1 -0
- package/dist/explanation/ExplanationLogger.d.ts +50 -0
- package/dist/explanation/ExplanationLogger.d.ts.map +1 -0
- package/dist/explanation/ExplanationLogger.js +284 -0
- package/dist/explanation/ExplanationLogger.js.map +1 -0
- package/dist/explanation/index.d.ts +11 -0
- package/dist/explanation/index.d.ts.map +1 -0
- package/dist/explanation/index.js +11 -0
- package/dist/explanation/index.js.map +1 -0
- package/dist/graph/CycleDetector.d.ts +1 -10
- package/dist/graph/CycleDetector.d.ts.map +1 -1
- package/dist/graph/CycleDetector.js +1 -12
- package/dist/graph/CycleDetector.js.map +1 -1
- package/dist/graph/DependencyGraph.d.ts +3 -3
- package/dist/graph/DependencyGraph.d.ts.map +1 -1
- package/dist/graph/DependencyGraph.js +1 -1
- package/dist/graph/DependencyGraph.js.map +1 -1
- package/dist/graph/DependencyResolver.d.ts +1 -23
- package/dist/graph/DependencyResolver.d.ts.map +1 -1
- package/dist/graph/DependencyResolver.js.map +1 -1
- package/dist/graph/TopologicalSorter.d.ts +1 -34
- package/dist/graph/TopologicalSorter.d.ts.map +1 -1
- package/dist/graph/TopologicalSorter.js.map +1 -1
- package/dist/guards/ResourceGuard.d.ts +1 -20
- package/dist/guards/ResourceGuard.d.ts.map +1 -1
- package/dist/guards/ResourceGuard.js.map +1 -1
- package/dist/guards/StepGuard.d.ts +1 -1
- package/dist/guards/StepGuard.d.ts.map +1 -1
- package/dist/guards/StepGuard.js.map +1 -1
- package/dist/guards/WorkflowGuard.d.ts +1 -1
- package/dist/guards/WorkflowGuard.d.ts.map +1 -1
- package/dist/guards/WorkflowGuard.js.map +1 -1
- package/dist/hooks/HookManager.d.ts.map +1 -1
- package/dist/hooks/HookManager.js +8 -0
- package/dist/hooks/HookManager.js.map +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/lifecycle/ShutdownManager.d.ts.map +1 -1
- package/dist/lifecycle/ShutdownManager.js +22 -9
- package/dist/lifecycle/ShutdownManager.js.map +1 -1
- package/dist/lifecycle/StartupManager.d.ts.map +1 -1
- package/dist/lifecycle/StartupManager.js +16 -5
- package/dist/lifecycle/StartupManager.js.map +1 -1
- package/dist/loader/WorkflowLoader.d.ts +2 -25
- package/dist/loader/WorkflowLoader.d.ts.map +1 -1
- package/dist/loader/WorkflowLoader.js.map +1 -1
- package/dist/loader/index.d.ts +0 -8
- package/dist/loader/index.d.ts.map +1 -1
- package/dist/loader/index.js +0 -8
- package/dist/loader/index.js.map +1 -1
- package/dist/logging/EngineLogger.d.ts +492 -0
- package/dist/logging/EngineLogger.d.ts.map +1 -0
- package/dist/logging/EngineLogger.js +1170 -0
- package/dist/logging/EngineLogger.js.map +1 -0
- package/dist/logging/LoggerManager.d.ts +49 -0
- package/dist/logging/LoggerManager.d.ts.map +1 -0
- package/dist/logging/LoggerManager.js +94 -0
- package/dist/logging/LoggerManager.js.map +1 -0
- package/dist/logging/index.d.ts +2 -1
- package/dist/logging/index.d.ts.map +1 -1
- package/dist/logging/index.js +2 -3
- package/dist/logging/index.js.map +1 -1
- package/dist/parser/SchemaValidator.d.ts.map +1 -1
- package/dist/parser/SchemaValidator.js +6 -0
- package/dist/parser/SchemaValidator.js.map +1 -1
- package/dist/parser/StepParser.d.ts +1 -33
- package/dist/parser/StepParser.d.ts.map +1 -1
- package/dist/parser/StepParser.js +14 -1
- package/dist/parser/StepParser.js.map +1 -1
- package/dist/parser/WorkflowParser.d.ts +1 -68
- package/dist/parser/WorkflowParser.d.ts.map +1 -1
- package/dist/parser/WorkflowParser.js +53 -28
- package/dist/parser/WorkflowParser.js.map +1 -1
- package/dist/queue/InMemoryQueue.d.ts +1 -1
- package/dist/queue/InMemoryQueue.d.ts.map +1 -1
- package/dist/queue/InMemoryQueue.js.map +1 -1
- package/dist/queue/JobQueue.d.ts +1 -186
- package/dist/queue/JobQueue.d.ts.map +1 -1
- package/dist/queue/JobQueue.js +1 -10
- package/dist/queue/JobQueue.js.map +1 -1
- package/dist/scheduling/CronScheduler.d.ts +1 -31
- package/dist/scheduling/CronScheduler.d.ts.map +1 -1
- package/dist/scheduling/CronScheduler.js +1 -1
- package/dist/scheduling/CronScheduler.js.map +1 -1
- package/dist/scheduling/JobScheduler.d.ts +2 -3
- package/dist/scheduling/JobScheduler.d.ts.map +1 -1
- package/dist/scheduling/JobScheduler.js +2 -1
- package/dist/scheduling/JobScheduler.js.map +1 -1
- package/dist/scheduling/ScheduleParser.d.ts.map +1 -1
- package/dist/scheduling/ScheduleParser.js +7 -0
- package/dist/scheduling/ScheduleParser.js.map +1 -1
- package/dist/scheduling/ScheduleTypes.d.ts +1 -131
- package/dist/scheduling/ScheduleTypes.d.ts.map +1 -1
- package/dist/scheduling/ScheduleTypes.js.map +1 -1
- package/dist/scheduling/Scheduler.d.ts +2 -3
- package/dist/scheduling/Scheduler.d.ts.map +1 -1
- package/dist/scheduling/Scheduler.js +13 -0
- package/dist/scheduling/Scheduler.js.map +1 -1
- package/dist/security/PermissionPolicy.d.ts +1 -13
- package/dist/security/PermissionPolicy.d.ts.map +1 -1
- package/dist/security/PermissionPolicy.js +1 -14
- package/dist/security/PermissionPolicy.js.map +1 -1
- package/dist/security/ReservedFields.d.ts +0 -20
- package/dist/security/ReservedFields.d.ts.map +1 -1
- package/dist/security/ReservedFields.js +2 -71
- package/dist/security/ReservedFields.js.map +1 -1
- package/dist/security/SandboxManager.d.ts +1 -29
- package/dist/security/SandboxManager.d.ts.map +1 -1
- package/dist/security/SandboxManager.js.map +1 -1
- package/dist/state/ExecutionState.d.ts +1 -123
- package/dist/state/ExecutionState.d.ts.map +1 -1
- package/dist/state/ExecutionState.js +1 -51
- package/dist/state/ExecutionState.js.map +1 -1
- package/dist/state/StateMachine.d.ts +1 -25
- package/dist/state/StateMachine.d.ts.map +1 -1
- package/dist/state/StateMachine.js +1 -1
- package/dist/state/StateMachine.js.map +1 -1
- package/dist/testing/EngineTestHarness.d.ts +1 -1
- package/dist/testing/EngineTestHarness.d.ts.map +1 -1
- package/dist/types/core-types.d.ts +2306 -4
- package/dist/types/core-types.d.ts.map +1 -1
- package/dist/types/core-types.js +272 -1
- package/dist/types/core-types.js.map +1 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/log-types.d.ts +105 -0
- package/dist/types/log-types.d.ts.map +1 -0
- package/dist/types/log-types.js +42 -0
- package/dist/types/log-types.js.map +1 -0
- package/package.json +2 -2
- package/dist/core/EngineLogger.d.ts +0 -182
- package/dist/core/EngineLogger.d.ts.map +0 -1
- package/dist/core/EngineLogger.js +0 -293
- package/dist/core/EngineLogger.js.map +0 -1
- package/dist/logging/LogLevel.d.ts +0 -2
- package/dist/logging/LogLevel.d.ts.map +0 -1
- package/dist/logging/LogLevel.js +0 -2
- package/dist/logging/LogLevel.js.map +0 -1
- package/dist/logging/Logger.d.ts +0 -2
- package/dist/logging/Logger.d.ts.map +0 -1
- package/dist/logging/Logger.js +0 -2
- package/dist/logging/Logger.js.map +0 -1
|
@@ -7,100 +7,7 @@
|
|
|
7
7
|
* @module execution/drivers
|
|
8
8
|
*/
|
|
9
9
|
import type { AdapterResult } from '@dev-ecosystem/core';
|
|
10
|
-
|
|
11
|
-
* Step execution context for drivers
|
|
12
|
-
*/
|
|
13
|
-
export interface DriverContext {
|
|
14
|
-
/** Current step ID */
|
|
15
|
-
stepId: string;
|
|
16
|
-
/** Workflow execution ID */
|
|
17
|
-
executionId: string;
|
|
18
|
-
/** Workflow name */
|
|
19
|
-
workflowName: string;
|
|
20
|
-
/** Logger function */
|
|
21
|
-
log: (message: string, level?: 'info' | 'warn' | 'error' | 'debug') => void;
|
|
22
|
-
/** Abort signal for cancellation */
|
|
23
|
-
signal?: AbortSignal;
|
|
24
|
-
/** Step timeout in milliseconds */
|
|
25
|
-
timeout?: number;
|
|
26
|
-
/** Working directory */
|
|
27
|
-
cwd?: string;
|
|
28
|
-
/** Environment variables */
|
|
29
|
-
env?: Record<string, string>;
|
|
30
|
-
/** Secrets access */
|
|
31
|
-
secrets?: Record<string, string>;
|
|
32
|
-
/** Temporary directory */
|
|
33
|
-
tempDir?: string;
|
|
34
|
-
/** Previous step outputs */
|
|
35
|
-
stepOutputs?: Record<string, any>;
|
|
36
|
-
/** Workflow inputs */
|
|
37
|
-
inputs?: Record<string, any>;
|
|
38
|
-
/** Workflow context */
|
|
39
|
-
workflowContext?: Record<string, any>;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Step definition for driver execution
|
|
43
|
-
*/
|
|
44
|
-
export interface DriverStep {
|
|
45
|
-
/** Step ID */
|
|
46
|
-
id: string;
|
|
47
|
-
/** Step name (optional) */
|
|
48
|
-
name?: string;
|
|
49
|
-
/** Action to execute (e.g., 'http.request.get', 'cli.run') */
|
|
50
|
-
uses: string;
|
|
51
|
-
/** Input parameters */
|
|
52
|
-
with?: Record<string, any>;
|
|
53
|
-
/** Conditional execution */
|
|
54
|
-
when?: string;
|
|
55
|
-
/** Environment variables */
|
|
56
|
-
env?: Record<string, string>;
|
|
57
|
-
/** Retry configuration */
|
|
58
|
-
retry?: {
|
|
59
|
-
max: number;
|
|
60
|
-
backoff?: 'linear' | 'exponential';
|
|
61
|
-
delay?: number;
|
|
62
|
-
};
|
|
63
|
-
/** Timeout */
|
|
64
|
-
timeout?: string;
|
|
65
|
-
/** Continue on error */
|
|
66
|
-
continueOnError?: boolean;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Base execution driver interface
|
|
70
|
-
*/
|
|
71
|
-
export interface ExecutionDriver {
|
|
72
|
-
/** Driver type identifier */
|
|
73
|
-
readonly type: string;
|
|
74
|
-
/** Driver name */
|
|
75
|
-
readonly name: string;
|
|
76
|
-
/** Driver version */
|
|
77
|
-
readonly version: string;
|
|
78
|
-
/** Driver description */
|
|
79
|
-
readonly description?: string;
|
|
80
|
-
/**
|
|
81
|
-
* Check if this driver can handle a step
|
|
82
|
-
*
|
|
83
|
-
* @param step - Step to check
|
|
84
|
-
* @returns True if driver can handle this step
|
|
85
|
-
*/
|
|
86
|
-
canHandle(step: DriverStep): boolean;
|
|
87
|
-
/**
|
|
88
|
-
* Execute a step
|
|
89
|
-
*
|
|
90
|
-
* @param step - Step to execute
|
|
91
|
-
* @param context - Execution context
|
|
92
|
-
* @returns Execution result
|
|
93
|
-
*/
|
|
94
|
-
execute(step: DriverStep, context: DriverContext): Promise<AdapterResult>;
|
|
95
|
-
/**
|
|
96
|
-
* Optional: Initialize driver
|
|
97
|
-
*/
|
|
98
|
-
initialize?(): Promise<void>;
|
|
99
|
-
/**
|
|
100
|
-
* Optional: Cleanup driver
|
|
101
|
-
*/
|
|
102
|
-
cleanup?(): Promise<void>;
|
|
103
|
-
}
|
|
10
|
+
import { DriverContext, DriverStep, ExecutionDriver } from '../../types/core-types.js';
|
|
104
11
|
/**
|
|
105
12
|
* Base driver implementation with common logic
|
|
106
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionDriver.d.ts","sourceRoot":"","sources":["../../../src/execution/drivers/ExecutionDriver.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ExecutionDriver.d.ts","sourceRoot":"","sources":["../../../src/execution/drivers/ExecutionDriver.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEvF;;GAEG;AACH,8BAAsB,UAAW,YAAW,eAAe;IACzD,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAEvC,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO;IAE7C,QAAQ,CAAC,OAAO,CACd,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC;IAEzB;;OAEG;IACH,SAAS,CAAC,YAAY,CAAC,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI;IAUlE;;OAEG;IACH,SAAS,CAAC,YAAY,CAAC,CAAC,EACtB,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,MAAM,EACX,YAAY,EAAE,CAAC,GACd,CAAC;IAIJ;;OAEG;IACH,SAAS,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;CAmB7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExecutionDriver.js","sourceRoot":"","sources":["../../../src/execution/drivers/ExecutionDriver.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"ExecutionDriver.js","sourceRoot":"","sources":["../../../src/execution/drivers/ExecutionDriver.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;GAEG;AACH,MAAM,OAAgB,UAAU;IAa9B;;OAEG;IACO,YAAY,CAAC,IAAgB,EAAE,QAAkB;QACzD,KAAK,MAAM,KAAK,IAAI,QAAQ,EAAE,CAAC;YAC7B,IAAI,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,EAAE,CAAC;gBACrB,MAAM,IAAI,KAAK,CACb,GAAG,IAAI,CAAC,IAAI,yCAAyC,KAAK,GAAG,CAC9D,CAAC;YACJ,CAAC;QACH,CAAC;IACH,CAAC;IAED;;OAEG;IACO,YAAY,CACpB,IAAgB,EAChB,GAAW,EACX,YAAe;QAEf,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC;IACxE,CAAC;IAED;;OAEG;IACO,YAAY,CAAC,OAAgB;QACrC,IAAI,CAAC,OAAO;YAAE,OAAO,SAAS,CAAC;QAE/B,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,2BAA2B,OAAO,EAAE,CAAC,CAAC;QACxD,CAAC;QAED,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACrC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAEtB,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,IAAI,CAAC,CAAC,OAAO,KAAK,CAAC;YACxB,KAAK,GAAG,CAAC,CAAC,OAAO,KAAK,GAAG,IAAI,CAAC;YAC9B,KAAK,GAAG,CAAC,CAAC,OAAO,KAAK,GAAG,EAAE,GAAG,IAAI,CAAC;YACnC,KAAK,GAAG,CAAC,CAAC,OAAO,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;YACxC,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC;QACxB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Explanation Generator
|
|
3
|
+
*
|
|
4
|
+
* Generates comprehensive execution explanations for workflows.
|
|
5
|
+
* This module is ALWAYS invoked before workflow execution to provide
|
|
6
|
+
* full transparency into what the engine will do.
|
|
7
|
+
*
|
|
8
|
+
* @module explanation
|
|
9
|
+
*/
|
|
10
|
+
import { ExecutionExplanation, ParsedWorkflow } from "../types/core-types.js";
|
|
11
|
+
/**
|
|
12
|
+
* Explanation Generator
|
|
13
|
+
*
|
|
14
|
+
* Always generates explanations before workflow execution.
|
|
15
|
+
* Integrates with EngineLogger to provide full transparency.
|
|
16
|
+
*/
|
|
17
|
+
export declare class ExplanationGenerator {
|
|
18
|
+
/**
|
|
19
|
+
* Generate a complete execution explanation
|
|
20
|
+
*
|
|
21
|
+
* This method analyzes the workflow and generates a comprehensive
|
|
22
|
+
* explanation of what will happen during execution. This is always
|
|
23
|
+
* called before workflow execution begins.
|
|
24
|
+
*
|
|
25
|
+
* @param workflow - Parsed workflow to explain
|
|
26
|
+
* @returns Complete execution explanation
|
|
27
|
+
*/
|
|
28
|
+
static generate(workflow: ParsedWorkflow): ExecutionExplanation;
|
|
29
|
+
/**
|
|
30
|
+
* Build an explained step from a parsed step
|
|
31
|
+
*
|
|
32
|
+
* @param step - Parsed step
|
|
33
|
+
* @param _workflow - Full workflow (reserved for future cross-step reference analysis)
|
|
34
|
+
* @returns Explained step
|
|
35
|
+
*/
|
|
36
|
+
private static buildExplainedStep;
|
|
37
|
+
/**
|
|
38
|
+
* Detect circular dependencies in workflow steps
|
|
39
|
+
*/
|
|
40
|
+
private static detectCycles;
|
|
41
|
+
/**
|
|
42
|
+
* Calculate maximum dependency depth in the workflow
|
|
43
|
+
*/
|
|
44
|
+
private static calculateMaxDepth;
|
|
45
|
+
/**
|
|
46
|
+
* Extract variable references from an object
|
|
47
|
+
*/
|
|
48
|
+
private static extractVariableReferences;
|
|
49
|
+
/**
|
|
50
|
+
* Filter out internal fields (those starting with _)
|
|
51
|
+
*/
|
|
52
|
+
private static filterInternalFields;
|
|
53
|
+
/**
|
|
54
|
+
* Analyze data flow throughout the workflow
|
|
55
|
+
* HIGH PRIORITY: Runtime Data Prediction
|
|
56
|
+
*
|
|
57
|
+
* Predicts what data flows through each step by analyzing:
|
|
58
|
+
* - Workflow inputs referenced
|
|
59
|
+
* - Step outputs consumed by other steps
|
|
60
|
+
* - Context and environment variables
|
|
61
|
+
* - Secrets usage
|
|
62
|
+
*/
|
|
63
|
+
private static analyzeDataFlow;
|
|
64
|
+
/**
|
|
65
|
+
* Analyze all possible conditional execution paths
|
|
66
|
+
* HIGH PRIORITY: Conditional Path Analysis
|
|
67
|
+
*
|
|
68
|
+
* Analyzes workflow to determine:
|
|
69
|
+
* - All possible execution paths based on conditions
|
|
70
|
+
* - Steps that may be skipped
|
|
71
|
+
* - Unreachable code
|
|
72
|
+
*/
|
|
73
|
+
private static analyzeConditionalPaths;
|
|
74
|
+
/**
|
|
75
|
+
* Estimate execution time for the workflow
|
|
76
|
+
* HIGH PRIORITY: Execution Time Estimation
|
|
77
|
+
*
|
|
78
|
+
* Predicts workflow execution duration by:
|
|
79
|
+
* - Analyzing dependency chains
|
|
80
|
+
* - Finding critical path
|
|
81
|
+
* - Estimating per-step execution time
|
|
82
|
+
* - Identifying bottlenecks
|
|
83
|
+
*/
|
|
84
|
+
private static estimateExecutionTime;
|
|
85
|
+
/**
|
|
86
|
+
* Infer type from workflow value definition
|
|
87
|
+
*/
|
|
88
|
+
private static inferType;
|
|
89
|
+
/**
|
|
90
|
+
* Generate human-readable sentences from structured logs
|
|
91
|
+
*
|
|
92
|
+
* This method converts the JSON-formatted explanation logs into
|
|
93
|
+
* natural language sentences that describe the workflow execution plan.
|
|
94
|
+
*
|
|
95
|
+
* @param explanation - The execution explanation to convert
|
|
96
|
+
* @returns Array of human-readable sentences
|
|
97
|
+
*/
|
|
98
|
+
static generateSentencesFromLogs(explanation: ExecutionExplanation): string[];
|
|
99
|
+
/**
|
|
100
|
+
* Infer workflow type from explanation
|
|
101
|
+
*/
|
|
102
|
+
private static inferWorkflowType;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=ExplanationGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExplanationGenerator.d.ts","sourceRoot":"","sources":["../../src/explanation/ExplanationGenerator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA+C,oBAAoB,EAAsD,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAI/K;;;;;GAKG;AACH,qBAAa,oBAAoB;IAC7B;;;;;;;;;OASG;IACH,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,oBAAoB;IAiK/D;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,kBAAkB;IA0DjC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,YAAY;IAsD3B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IA6ChC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAuBxC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;IAWnC;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IA4I9B;;;;;;;;OAQG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;IA0EtC;;;;;;;;;OASG;IACH,OAAO,CAAC,MAAM,CAAC,qBAAqB;IAiKpC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,SAAS;IAQxB;;;;;;;;OAQG;IACH,MAAM,CAAC,yBAAyB,CAAC,WAAW,EAAE,oBAAoB,GAAG,MAAM,EAAE;IAmI7E;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;CAqCnC"}
|