@sudocode-ai/local-server 0.1.6 → 0.1.7

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.
Files changed (116) hide show
  1. package/dist/execution/process/builders/claude.d.ts +1 -1
  2. package/dist/execution/process/builders/claude.d.ts.map +1 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +70 -11
  5. package/dist/index.js.map +1 -1
  6. package/dist/public/assets/index-B3SEMufD.js +580 -0
  7. package/dist/public/assets/{index-BvlblDHK.js.map → index-B3SEMufD.js.map} +1 -1
  8. package/dist/public/assets/index-D2YGL3gX.css +1 -0
  9. package/dist/public/index.html +2 -2
  10. package/dist/routes/feedback.d.ts.map +1 -1
  11. package/dist/routes/feedback.js +20 -12
  12. package/dist/routes/feedback.js.map +1 -1
  13. package/dist/services/db.d.ts.map +1 -1
  14. package/dist/services/db.js +19 -14
  15. package/dist/services/db.js.map +1 -1
  16. package/dist/services/execution-service.d.ts.map +1 -1
  17. package/dist/services/execution-service.js +43 -22
  18. package/dist/services/execution-service.js.map +1 -1
  19. package/dist/services/executions.d.ts.map +1 -1
  20. package/dist/services/executions.js +15 -0
  21. package/dist/services/executions.js.map +1 -1
  22. package/dist/services/feedback.d.ts +16 -0
  23. package/dist/services/feedback.d.ts.map +1 -1
  24. package/dist/services/feedback.js +25 -1
  25. package/dist/services/feedback.js.map +1 -1
  26. package/dist/services/repo-info.d.ts +17 -0
  27. package/dist/services/repo-info.d.ts.map +1 -0
  28. package/dist/services/repo-info.js +53 -0
  29. package/dist/services/repo-info.js.map +1 -0
  30. package/dist/services/websocket.d.ts +25 -3
  31. package/dist/services/websocket.d.ts.map +1 -1
  32. package/dist/services/websocket.js +71 -7
  33. package/dist/services/websocket.js.map +1 -1
  34. package/package.json +4 -3
  35. package/dist/execution/engine/engine.d.ts +0 -103
  36. package/dist/execution/engine/engine.d.ts.map +0 -1
  37. package/dist/execution/engine/engine.js +0 -10
  38. package/dist/execution/engine/engine.js.map +0 -1
  39. package/dist/execution/engine/simple-engine.d.ts +0 -190
  40. package/dist/execution/engine/simple-engine.d.ts.map +0 -1
  41. package/dist/execution/engine/simple-engine.js +0 -611
  42. package/dist/execution/engine/simple-engine.js.map +0 -1
  43. package/dist/execution/engine/types.d.ts +0 -116
  44. package/dist/execution/engine/types.d.ts.map +0 -1
  45. package/dist/execution/engine/types.js +0 -10
  46. package/dist/execution/engine/types.js.map +0 -1
  47. package/dist/execution/process/index.d.ts +0 -15
  48. package/dist/execution/process/index.d.ts.map +0 -1
  49. package/dist/execution/process/index.js +0 -15
  50. package/dist/execution/process/index.js.map +0 -1
  51. package/dist/execution/process/manager.d.ts +0 -133
  52. package/dist/execution/process/manager.d.ts.map +0 -1
  53. package/dist/execution/process/manager.js +0 -10
  54. package/dist/execution/process/manager.js.map +0 -1
  55. package/dist/execution/process/simple-manager.d.ts +0 -102
  56. package/dist/execution/process/simple-manager.d.ts.map +0 -1
  57. package/dist/execution/process/simple-manager.js +0 -336
  58. package/dist/execution/process/simple-manager.js.map +0 -1
  59. package/dist/execution/process/types.d.ts +0 -105
  60. package/dist/execution/process/types.d.ts.map +0 -1
  61. package/dist/execution/process/types.js +0 -10
  62. package/dist/execution/process/types.js.map +0 -1
  63. package/dist/execution/process/utils.d.ts +0 -53
  64. package/dist/execution/process/utils.d.ts.map +0 -1
  65. package/dist/execution/process/utils.js +0 -97
  66. package/dist/execution/process/utils.js.map +0 -1
  67. package/dist/execution/resilience/circuit-breaker.d.ts +0 -170
  68. package/dist/execution/resilience/circuit-breaker.d.ts.map +0 -1
  69. package/dist/execution/resilience/circuit-breaker.js +0 -291
  70. package/dist/execution/resilience/circuit-breaker.js.map +0 -1
  71. package/dist/execution/resilience/executor.d.ts +0 -109
  72. package/dist/execution/resilience/executor.d.ts.map +0 -1
  73. package/dist/execution/resilience/executor.js +0 -10
  74. package/dist/execution/resilience/executor.js.map +0 -1
  75. package/dist/execution/resilience/index.d.ts +0 -14
  76. package/dist/execution/resilience/index.d.ts.map +0 -1
  77. package/dist/execution/resilience/index.js +0 -15
  78. package/dist/execution/resilience/index.js.map +0 -1
  79. package/dist/execution/resilience/resilient-executor.d.ts +0 -86
  80. package/dist/execution/resilience/resilient-executor.d.ts.map +0 -1
  81. package/dist/execution/resilience/resilient-executor.js +0 -261
  82. package/dist/execution/resilience/resilient-executor.js.map +0 -1
  83. package/dist/execution/resilience/retry.d.ts +0 -161
  84. package/dist/execution/resilience/retry.d.ts.map +0 -1
  85. package/dist/execution/resilience/retry.js +0 -234
  86. package/dist/execution/resilience/retry.js.map +0 -1
  87. package/dist/execution/resilience/types.d.ts +0 -226
  88. package/dist/execution/resilience/types.d.ts.map +0 -1
  89. package/dist/execution/resilience/types.js +0 -30
  90. package/dist/execution/resilience/types.js.map +0 -1
  91. package/dist/execution/workflow/index.d.ts +0 -13
  92. package/dist/execution/workflow/index.d.ts.map +0 -1
  93. package/dist/execution/workflow/index.js +0 -13
  94. package/dist/execution/workflow/index.js.map +0 -1
  95. package/dist/execution/workflow/linear-orchestrator.d.ts +0 -216
  96. package/dist/execution/workflow/linear-orchestrator.d.ts.map +0 -1
  97. package/dist/execution/workflow/linear-orchestrator.js +0 -683
  98. package/dist/execution/workflow/linear-orchestrator.js.map +0 -1
  99. package/dist/execution/workflow/memory-storage.d.ts +0 -54
  100. package/dist/execution/workflow/memory-storage.d.ts.map +0 -1
  101. package/dist/execution/workflow/memory-storage.js +0 -68
  102. package/dist/execution/workflow/memory-storage.js.map +0 -1
  103. package/dist/execution/workflow/orchestrator.d.ts +0 -158
  104. package/dist/execution/workflow/orchestrator.d.ts.map +0 -1
  105. package/dist/execution/workflow/orchestrator.js +0 -9
  106. package/dist/execution/workflow/orchestrator.js.map +0 -1
  107. package/dist/execution/workflow/types.d.ts +0 -172
  108. package/dist/execution/workflow/types.d.ts.map +0 -1
  109. package/dist/execution/workflow/types.js +0 -9
  110. package/dist/execution/workflow/types.js.map +0 -1
  111. package/dist/execution/workflow/utils.d.ts +0 -89
  112. package/dist/execution/workflow/utils.d.ts.map +0 -1
  113. package/dist/execution/workflow/utils.js +0 -152
  114. package/dist/execution/workflow/utils.js.map +0 -1
  115. package/dist/public/assets/index-BvlblDHK.js +0 -570
  116. package/dist/public/assets/index-BwuKdLgN.css +0 -1
@@ -1,216 +0,0 @@
1
- /**
2
- * Linear Workflow Orchestrator Implementation
3
- *
4
- * Executes workflow steps sequentially with state management and checkpointing.
5
- *
6
- * @module execution/workflow/linear-orchestrator
7
- */
8
- import type { IWorkflowOrchestrator, IWorkflowStorage } from "./orchestrator.js";
9
- import type { IResilientExecutor } from "../resilience/executor.js";
10
- import type { WorkflowDefinition, WorkflowExecution, WorkflowCheckpoint, StepStatus, WorkflowStartHandler, WorkflowCompleteHandler, WorkflowFailedHandler, StepStartHandler, StepCompleteHandler, StepFailedHandler, WorkflowCheckpointHandler, WorkflowResumeHandler, WorkflowPauseHandler, WorkflowCancelHandler } from "./types.js";
11
- import type { AgUiEventAdapter } from "../output/ag-ui-adapter.js";
12
- import type { ExecutionLifecycleService } from "../../services/execution-lifecycle.js";
13
- /**
14
- * LinearOrchestrator - Sequential workflow execution with state management
15
- *
16
- * Implements the IWorkflowOrchestrator interface to provide:
17
- * - Sequential step execution
18
- * - State persistence via checkpoints
19
- * - Crash recovery and resumption
20
- * - Event-driven monitoring
21
- */
22
- export declare class LinearOrchestrator implements IWorkflowOrchestrator {
23
- private _executions;
24
- private _cleanedUpExecutions;
25
- private _storage?;
26
- private _executor;
27
- private _agUiAdapter?;
28
- private _lifecycleService?;
29
- private _workflowStartHandlers;
30
- private _workflowCompleteHandlers;
31
- private _workflowFailedHandlers;
32
- private _stepStartHandlers;
33
- private _stepCompleteHandlers;
34
- private _stepFailedHandlers;
35
- private _checkpointHandlers;
36
- private _resumeHandlers;
37
- private _pauseHandlers;
38
- private _cancelHandlers;
39
- /**
40
- * Create a new LinearOrchestrator
41
- *
42
- * @param executor - Resilient executor for running tasks
43
- * @param storage - Optional storage for checkpoints
44
- * @param agUiAdapter - Optional AG-UI event adapter for real-time event streaming
45
- * @param lifecycleService - Optional execution lifecycle service for worktree management
46
- */
47
- constructor(executor: IResilientExecutor, storage?: IWorkflowStorage, agUiAdapter?: AgUiEventAdapter, lifecycleService?: ExecutionLifecycleService);
48
- /**
49
- * Start a new workflow execution
50
- *
51
- * @param workflow - Workflow definition to execute
52
- * @param workDir - Working directory for task execution
53
- * @param options - Execution options (executionId is required)
54
- * @returns Promise resolving to execution ID
55
- */
56
- startWorkflow(workflow: WorkflowDefinition, workDir: string, options: {
57
- executionId: string;
58
- checkpointInterval?: number;
59
- initialContext?: Record<string, any>;
60
- }): Promise<string>;
61
- /**
62
- * Resume a workflow from a checkpoint
63
- *
64
- * @param executionId - Execution ID to resume
65
- * @param options - Resume options
66
- * @returns Promise resolving to execution ID
67
- */
68
- resumeWorkflow(executionId: string, options?: {
69
- checkpointInterval?: number;
70
- }): Promise<string>;
71
- /**
72
- * Pause a running workflow
73
- *
74
- * @param executionId - Execution ID to pause
75
- */
76
- pauseWorkflow(executionId: string): Promise<void>;
77
- /**
78
- * Cancel a running workflow
79
- *
80
- * @param executionId - Execution ID to cancel
81
- */
82
- cancelWorkflow(executionId: string): Promise<void>;
83
- /**
84
- * Get current execution state
85
- *
86
- * @param executionId - Execution ID to query
87
- * @returns Execution state or null if not found
88
- */
89
- getExecution(executionId: string): WorkflowExecution | null;
90
- /**
91
- * Get status of a specific step
92
- *
93
- * @param executionId - Execution ID
94
- * @param stepId - Step ID to query
95
- * @returns Step status or null if not found
96
- */
97
- getStepStatus(executionId: string, stepId: string): StepStatus | null;
98
- /**
99
- * Wait for workflow to complete
100
- *
101
- * @param executionId - Execution ID to wait for
102
- * @returns Promise resolving to workflow execution
103
- */
104
- waitForWorkflow(executionId: string): Promise<WorkflowExecution>;
105
- /**
106
- * List all checkpoints for a workflow
107
- *
108
- * @param workflowId - Optional workflow ID to filter by
109
- * @returns Promise resolving to list of checkpoints
110
- */
111
- listCheckpoints(workflowId?: string): Promise<WorkflowCheckpoint[]>;
112
- /**
113
- * Register handler for workflow start events
114
- */
115
- onWorkflowStart(handler: WorkflowStartHandler): void;
116
- /**
117
- * Register handler for workflow completion events
118
- */
119
- onWorkflowComplete(handler: WorkflowCompleteHandler): void;
120
- /**
121
- * Register handler for workflow failure events
122
- */
123
- onWorkflowFailed(handler: WorkflowFailedHandler): void;
124
- /**
125
- * Register handler for step start events
126
- */
127
- onStepStart(handler: StepStartHandler): void;
128
- /**
129
- * Register handler for step completion events
130
- */
131
- onStepComplete(handler: StepCompleteHandler): void;
132
- /**
133
- * Register handler for step failure events
134
- */
135
- onStepFailed(handler: StepFailedHandler): void;
136
- /**
137
- * Register handler for checkpoint events
138
- */
139
- onCheckpoint(handler: WorkflowCheckpointHandler): void;
140
- /**
141
- * Register handler for resume events
142
- */
143
- onResume(handler: WorkflowResumeHandler): void;
144
- /**
145
- * Register handler for pause events
146
- */
147
- onPause(handler: WorkflowPauseHandler): void;
148
- /**
149
- * Register handler for cancel events
150
- */
151
- onCancel(handler: WorkflowCancelHandler): void;
152
- /**
153
- * Execute workflow (main execution loop)
154
- *
155
- * @param workflow - Workflow definition
156
- * @param execution - Workflow execution state
157
- * @param workDir - Working directory for task execution
158
- * @param checkpointInterval - Optional checkpoint interval (in steps)
159
- * @returns Promise that resolves when workflow completes
160
- * @private
161
- */
162
- private _executeWorkflow;
163
- /**
164
- * Save checkpoint to storage
165
- *
166
- * @param execution - Workflow execution to checkpoint
167
- * @private
168
- */
169
- private _saveCheckpoint;
170
- /**
171
- * Clean up execution resources (worktree)
172
- * Ensures cleanup is called only once per execution
173
- *
174
- * @param execution - Workflow execution to cleanup
175
- * @private
176
- */
177
- private _cleanupExecution;
178
- /**
179
- * Execute a single workflow step
180
- *
181
- * @param step - Workflow step to execute
182
- * @param execution - Current workflow execution state
183
- * @param workDir - Working directory for task execution
184
- * @returns Promise resolving to execution result
185
- * @private
186
- */
187
- private _executeStep;
188
- /**
189
- * Apply output mapping from step result to workflow context
190
- *
191
- * @param step - Workflow step with output mapping
192
- * @param result - Execution result from step
193
- * @param context - Workflow context to update
194
- * @private
195
- */
196
- private _applyOutputMapping;
197
- /**
198
- * Check if all step dependencies are met
199
- *
200
- * @param step - Workflow step to check
201
- * @param execution - Current workflow execution state
202
- * @returns True if all dependencies are met, false otherwise
203
- * @private
204
- */
205
- private _areDependenciesMet;
206
- /**
207
- * Evaluate a step condition
208
- *
209
- * @param step - Workflow step with condition
210
- * @param context - Workflow context
211
- * @returns True if condition evaluates to true or no condition exists
212
- * @private
213
- */
214
- private _shouldExecuteStep;
215
- }
216
- //# sourceMappingURL=linear-orchestrator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"linear-orchestrator.d.ts","sourceRoot":"","sources":["../../../src/execution/workflow/linear-orchestrator.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAGpE,OAAO,KAAK,EACV,kBAAkB,EAElB,iBAAiB,EACjB,kBAAkB,EAElB,UAAU,EACV,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAOpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAEvF;;;;;;;;GAQG;AACH,qBAAa,kBAAmB,YAAW,qBAAqB;IAE9D,OAAO,CAAC,WAAW,CAAwC;IAC3D,OAAO,CAAC,oBAAoB,CAAqB;IACjD,OAAO,CAAC,QAAQ,CAAC,CAAmB;IACpC,OAAO,CAAC,SAAS,CAAqB;IACtC,OAAO,CA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