@specverse/engines 4.1.13 → 4.1.15
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/assets/prompts/core/standard/v9/behavior.prompt.yaml +126 -0
- package/dist/ai/behavior-ai-service.d.ts +65 -0
- package/dist/ai/behavior-ai-service.d.ts.map +1 -0
- package/dist/ai/behavior-ai-service.js +205 -0
- package/dist/ai/behavior-ai-service.js.map +1 -0
- package/dist/ai/index.d.ts +27 -0
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +30 -0
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/prompt-loader.js +2 -2
- package/dist/inference/quint-transpiler.d.ts.map +1 -1
- package/dist/inference/quint-transpiler.js +204 -4
- package/dist/inference/quint-transpiler.js.map +1 -1
- package/dist/libs/instance-factories/applications/templates/generic/backend-package-json-generator.js +4 -1
- package/dist/libs/instance-factories/applications/templates/generic/backend-tsconfig-generator.js +2 -2
- package/dist/libs/instance-factories/applications/templates/react/runtime-package-json-generator.js +1 -0
- package/dist/libs/instance-factories/cli/templates/commander/command-generator.js +97 -22
- package/dist/libs/instance-factories/communication/templates/eventemitter/bus-generator.js +31 -31
- package/dist/libs/instance-factories/communication/templates/eventemitter/types-generator.js +79 -0
- package/dist/libs/instance-factories/communication/templates/eventemitter/websocket-bridge-generator.js +96 -0
- package/dist/libs/instance-factories/controllers/templates/fastify/routes-generator.js +45 -9
- package/dist/libs/instance-factories/controllers/templates/fastify/server-generator.js +20 -2
- package/dist/libs/instance-factories/scaffolding/templates/generic/tsconfig-generator.js +10 -2
- package/dist/libs/instance-factories/services/templates/prisma/ai-behaviors-generator.js +249 -0
- package/dist/libs/instance-factories/services/templates/prisma/behavior-generator.js +72 -45
- package/dist/libs/instance-factories/services/templates/prisma/controller-generator.js +61 -54
- package/dist/libs/instance-factories/services/templates/prisma/service-generator.js +31 -10
- package/dist/libs/instance-factories/services/templates/prisma/step-conventions.js +101 -84
- package/dist/libs/instance-factories/views/templates/react/components-generator.js +40 -10
- package/dist/realize/index.d.ts.map +1 -1
- package/dist/realize/index.js +192 -23
- package/dist/realize/index.js.map +1 -1
- package/libs/instance-factories/applications/templates/generic/backend-package-json-generator.ts +4 -1
- package/libs/instance-factories/applications/templates/generic/backend-tsconfig-generator.ts +2 -2
- package/libs/instance-factories/applications/templates/react/runtime-package-json-generator.ts +6 -1
- package/libs/instance-factories/cli/templates/commander/command-generator.ts +115 -22
- package/libs/instance-factories/communication/event-emitter.yaml +16 -12
- package/libs/instance-factories/communication/templates/eventemitter/bus-generator.ts +33 -36
- package/libs/instance-factories/communication/templates/eventemitter/types-generator.ts +95 -0
- package/libs/instance-factories/communication/templates/eventemitter/websocket-bridge-generator.ts +105 -0
- package/libs/instance-factories/controllers/templates/fastify/routes-generator.ts +57 -11
- package/libs/instance-factories/controllers/templates/fastify/server-generator.ts +23 -2
- package/libs/instance-factories/scaffolding/templates/generic/tsconfig-generator.ts +23 -2
- package/libs/instance-factories/services/templates/prisma/ai-behaviors-generator.ts +376 -0
- package/libs/instance-factories/services/templates/prisma/behavior-generator.ts +116 -45
- package/libs/instance-factories/services/templates/prisma/controller-generator.ts +83 -59
- package/libs/instance-factories/services/templates/prisma/service-generator.ts +40 -10
- package/libs/instance-factories/services/templates/prisma/step-conventions.ts +169 -85
- package/libs/instance-factories/views/templates/react/components-generator.ts +50 -10
- package/package.json +1 -1
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/controllers/MCPServerController.js +0 -232
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/events/EventEmitter.js +0 -49
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/index.js +0 -18
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/interfaces/ResourceProvider.js +0 -0
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/models/LibrarySuggestion.js +0 -97
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/models/SpecVerseResource.js +0 -64
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/server/mcp-server.js +0 -182
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/CLIProxyService.js +0 -1210
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/EmbeddedResourcesAdapter.js +0 -172
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/EntityModuleService.js +0 -240
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/HybridResourcesProvider.js +0 -147
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/LibraryToolsService.js +0 -281
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/OrchestratorBridge.js +0 -409
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/OrchestratorToolsService.js +0 -414
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/PromptToolsService.js +0 -467
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/services/ResourcesProviderService.js +0 -135
- package/dist/libs/instance-factories/tools/templates/mcp/static/src/types/index.js +0 -0
- package/dist/libs/instance-factories/tools/templates/vscode/static/extension.js +0 -965
|
@@ -1,414 +0,0 @@
|
|
|
1
|
-
class OrchestratorToolsService {
|
|
2
|
-
orchestratorBridge;
|
|
3
|
-
eventEmitter;
|
|
4
|
-
constructor(config) {
|
|
5
|
-
this.orchestratorBridge = config.orchestratorBridge;
|
|
6
|
-
this.eventEmitter = config.eventEmitter;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Analyze existing codebase and extract SpecVerse specifications
|
|
10
|
-
*/
|
|
11
|
-
async analyseCodebase(params) {
|
|
12
|
-
this.eventEmitter.emit("tool-called", {
|
|
13
|
-
toolName: "analyse_codebase",
|
|
14
|
-
arguments: params,
|
|
15
|
-
executionTime: 0
|
|
16
|
-
});
|
|
17
|
-
try {
|
|
18
|
-
const context = {
|
|
19
|
-
operation: "analyse",
|
|
20
|
-
inputPath: params.codePath,
|
|
21
|
-
inputType: "code",
|
|
22
|
-
outputPath: params.outputPath,
|
|
23
|
-
framework: params.framework,
|
|
24
|
-
interactive: params.interactive || false
|
|
25
|
-
};
|
|
26
|
-
const result = await this.orchestratorBridge.execute(context);
|
|
27
|
-
if (result.success) {
|
|
28
|
-
const response = {
|
|
29
|
-
operation: "analyse",
|
|
30
|
-
success: true,
|
|
31
|
-
result: result.content,
|
|
32
|
-
metadata: {
|
|
33
|
-
codePath: params.codePath,
|
|
34
|
-
framework: params.framework || "auto-detected",
|
|
35
|
-
outputPath: params.outputPath,
|
|
36
|
-
executionTime: result.executionTime,
|
|
37
|
-
provider: result.provider,
|
|
38
|
-
sessionId: result.sessionId
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
if (result.sessionId) {
|
|
42
|
-
response.metadata.sessionId = result.sessionId;
|
|
43
|
-
}
|
|
44
|
-
return JSON.stringify(response, null, 2);
|
|
45
|
-
} else {
|
|
46
|
-
const errorResponse = {
|
|
47
|
-
operation: "analyse",
|
|
48
|
-
success: false,
|
|
49
|
-
error: result.error,
|
|
50
|
-
metadata: {
|
|
51
|
-
codePath: params.codePath,
|
|
52
|
-
executionTime: result.executionTime
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
return JSON.stringify(errorResponse, null, 2);
|
|
56
|
-
}
|
|
57
|
-
} catch (error) {
|
|
58
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
59
|
-
this.eventEmitter.emit("error-occurred", {
|
|
60
|
-
operation: "analyse_codebase",
|
|
61
|
-
error: errorMessage,
|
|
62
|
-
context: params
|
|
63
|
-
});
|
|
64
|
-
const errorResponse = {
|
|
65
|
-
operation: "analyse",
|
|
66
|
-
success: false,
|
|
67
|
-
error: errorMessage,
|
|
68
|
-
metadata: {
|
|
69
|
-
codePath: params.codePath
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
return JSON.stringify(errorResponse, null, 2);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Create SpecVerse specifications from natural language requirements
|
|
77
|
-
*/
|
|
78
|
-
async createSpecification(params) {
|
|
79
|
-
this.eventEmitter.emit("tool-called", {
|
|
80
|
-
toolName: "create_specification",
|
|
81
|
-
arguments: params,
|
|
82
|
-
executionTime: 0
|
|
83
|
-
});
|
|
84
|
-
try {
|
|
85
|
-
const context = {
|
|
86
|
-
operation: "create",
|
|
87
|
-
input: params.requirements,
|
|
88
|
-
inputType: "requirements",
|
|
89
|
-
outputPath: params.outputPath,
|
|
90
|
-
framework: params.framework,
|
|
91
|
-
scale: params.scale || "business",
|
|
92
|
-
interactive: params.interactive || false
|
|
93
|
-
};
|
|
94
|
-
const result = await this.orchestratorBridge.execute(context);
|
|
95
|
-
if (result.success) {
|
|
96
|
-
const response = {
|
|
97
|
-
operation: "create",
|
|
98
|
-
success: true,
|
|
99
|
-
result: result.content,
|
|
100
|
-
metadata: {
|
|
101
|
-
requirements: params.requirements,
|
|
102
|
-
scale: params.scale || "business",
|
|
103
|
-
framework: params.framework,
|
|
104
|
-
outputPath: params.outputPath,
|
|
105
|
-
executionTime: result.executionTime,
|
|
106
|
-
provider: result.provider,
|
|
107
|
-
sessionId: result.sessionId
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
return JSON.stringify(response, null, 2);
|
|
111
|
-
} else {
|
|
112
|
-
const errorResponse = {
|
|
113
|
-
operation: "create",
|
|
114
|
-
success: false,
|
|
115
|
-
error: result.error,
|
|
116
|
-
metadata: {
|
|
117
|
-
requirements: params.requirements,
|
|
118
|
-
executionTime: result.executionTime
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
return JSON.stringify(errorResponse, null, 2);
|
|
122
|
-
}
|
|
123
|
-
} catch (error) {
|
|
124
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
125
|
-
this.eventEmitter.emit("error-occurred", {
|
|
126
|
-
operation: "create_specification",
|
|
127
|
-
error: errorMessage,
|
|
128
|
-
context: params
|
|
129
|
-
});
|
|
130
|
-
const errorResponse = {
|
|
131
|
-
operation: "create",
|
|
132
|
-
success: false,
|
|
133
|
-
error: errorMessage,
|
|
134
|
-
metadata: {
|
|
135
|
-
requirements: params.requirements
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
return JSON.stringify(errorResponse, null, 2);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* Infer expanded specifications using AI inference engine
|
|
143
|
-
*/
|
|
144
|
-
async inferSpecification(params) {
|
|
145
|
-
this.eventEmitter.emit("tool-called", {
|
|
146
|
-
toolName: "infer_specification",
|
|
147
|
-
arguments: params,
|
|
148
|
-
executionTime: 0
|
|
149
|
-
});
|
|
150
|
-
try {
|
|
151
|
-
const capabilities = this.orchestratorBridge.getCapabilities();
|
|
152
|
-
if (!capabilities.inferenceEngine) {
|
|
153
|
-
const fallbackResponse = {
|
|
154
|
-
operation: "infer",
|
|
155
|
-
success: false,
|
|
156
|
-
error: "Inference operation requires full SpecVerse orchestrator with inference engine",
|
|
157
|
-
suggestion: "Use get_creation_prompt or get_analysis_prompt tools for AI-assisted specification development",
|
|
158
|
-
metadata: {
|
|
159
|
-
specificationPath: params.specificationPath,
|
|
160
|
-
availableCapabilities: capabilities
|
|
161
|
-
}
|
|
162
|
-
};
|
|
163
|
-
return JSON.stringify(fallbackResponse, null, 2);
|
|
164
|
-
}
|
|
165
|
-
const context = {
|
|
166
|
-
operation: "infer",
|
|
167
|
-
inputPath: params.specificationPath,
|
|
168
|
-
inputType: "specification",
|
|
169
|
-
outputPath: params.outputPath,
|
|
170
|
-
framework: params.framework
|
|
171
|
-
};
|
|
172
|
-
const result = await this.orchestratorBridge.execute(context);
|
|
173
|
-
if (result.success) {
|
|
174
|
-
const response = {
|
|
175
|
-
operation: "infer",
|
|
176
|
-
success: true,
|
|
177
|
-
result: result.content,
|
|
178
|
-
metadata: {
|
|
179
|
-
specificationPath: params.specificationPath,
|
|
180
|
-
outputPath: params.outputPath,
|
|
181
|
-
framework: params.framework,
|
|
182
|
-
executionTime: result.executionTime,
|
|
183
|
-
inferenceRules: result.metadata?.inferenceRules,
|
|
184
|
-
provider: result.provider
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
return JSON.stringify(response, null, 2);
|
|
188
|
-
} else {
|
|
189
|
-
const errorResponse = {
|
|
190
|
-
operation: "infer",
|
|
191
|
-
success: false,
|
|
192
|
-
error: result.error,
|
|
193
|
-
metadata: {
|
|
194
|
-
specificationPath: params.specificationPath,
|
|
195
|
-
executionTime: result.executionTime
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
return JSON.stringify(errorResponse, null, 2);
|
|
199
|
-
}
|
|
200
|
-
} catch (error) {
|
|
201
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
202
|
-
this.eventEmitter.emit("error-occurred", {
|
|
203
|
-
operation: "infer_specification",
|
|
204
|
-
error: errorMessage,
|
|
205
|
-
context: params
|
|
206
|
-
});
|
|
207
|
-
const errorResponse = {
|
|
208
|
-
operation: "infer",
|
|
209
|
-
success: false,
|
|
210
|
-
error: errorMessage,
|
|
211
|
-
metadata: {
|
|
212
|
-
specificationPath: params.specificationPath
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
return JSON.stringify(errorResponse, null, 2);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Materialize clean implementation from specifications
|
|
220
|
-
*/
|
|
221
|
-
async materialiseImplementation(params) {
|
|
222
|
-
this.eventEmitter.emit("tool-called", {
|
|
223
|
-
toolName: "materialise_implementation",
|
|
224
|
-
arguments: params,
|
|
225
|
-
executionTime: 0
|
|
226
|
-
});
|
|
227
|
-
try {
|
|
228
|
-
const context = {
|
|
229
|
-
operation: "materialise",
|
|
230
|
-
inputPath: params.specificationPath,
|
|
231
|
-
inputType: "specification",
|
|
232
|
-
outputPath: params.outputPath,
|
|
233
|
-
framework: params.framework,
|
|
234
|
-
scale: params.scale || "business",
|
|
235
|
-
interactive: params.interactive || false
|
|
236
|
-
};
|
|
237
|
-
const result = await this.orchestratorBridge.execute(context);
|
|
238
|
-
if (result.success) {
|
|
239
|
-
const response = {
|
|
240
|
-
operation: "materialise",
|
|
241
|
-
success: true,
|
|
242
|
-
result: result.content,
|
|
243
|
-
metadata: {
|
|
244
|
-
specificationPath: params.specificationPath,
|
|
245
|
-
framework: params.framework,
|
|
246
|
-
scale: params.scale || "business",
|
|
247
|
-
outputPath: params.outputPath,
|
|
248
|
-
executionTime: result.executionTime,
|
|
249
|
-
provider: result.provider,
|
|
250
|
-
sessionId: result.sessionId
|
|
251
|
-
}
|
|
252
|
-
};
|
|
253
|
-
return JSON.stringify(response, null, 2);
|
|
254
|
-
} else {
|
|
255
|
-
const errorResponse = {
|
|
256
|
-
operation: "materialise",
|
|
257
|
-
success: false,
|
|
258
|
-
error: result.error,
|
|
259
|
-
metadata: {
|
|
260
|
-
specificationPath: params.specificationPath,
|
|
261
|
-
framework: params.framework,
|
|
262
|
-
executionTime: result.executionTime
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
return JSON.stringify(errorResponse, null, 2);
|
|
266
|
-
}
|
|
267
|
-
} catch (error) {
|
|
268
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
269
|
-
this.eventEmitter.emit("error-occurred", {
|
|
270
|
-
operation: "materialise_implementation",
|
|
271
|
-
error: errorMessage,
|
|
272
|
-
context: params
|
|
273
|
-
});
|
|
274
|
-
const errorResponse = {
|
|
275
|
-
operation: "materialise",
|
|
276
|
-
success: false,
|
|
277
|
-
error: errorMessage,
|
|
278
|
-
metadata: {
|
|
279
|
-
specificationPath: params.specificationPath,
|
|
280
|
-
framework: params.framework
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
return JSON.stringify(errorResponse, null, 2);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Realize complete application from specifications
|
|
288
|
-
*/
|
|
289
|
-
async realizeApplication(params) {
|
|
290
|
-
this.eventEmitter.emit("tool-called", {
|
|
291
|
-
toolName: "realize_application",
|
|
292
|
-
arguments: params,
|
|
293
|
-
executionTime: 0
|
|
294
|
-
});
|
|
295
|
-
try {
|
|
296
|
-
const context = {
|
|
297
|
-
operation: "realize",
|
|
298
|
-
inputPath: params.specificationPath,
|
|
299
|
-
inputType: "specification",
|
|
300
|
-
outputPath: params.outputPath,
|
|
301
|
-
framework: params.framework,
|
|
302
|
-
scale: params.scale || "business",
|
|
303
|
-
interactive: params.interactive || false
|
|
304
|
-
};
|
|
305
|
-
const result = await this.orchestratorBridge.execute(context);
|
|
306
|
-
if (result.success) {
|
|
307
|
-
const response = {
|
|
308
|
-
operation: "realize",
|
|
309
|
-
success: true,
|
|
310
|
-
result: result.content,
|
|
311
|
-
metadata: {
|
|
312
|
-
specificationPath: params.specificationPath,
|
|
313
|
-
framework: params.framework,
|
|
314
|
-
scale: params.scale || "business",
|
|
315
|
-
outputPath: params.outputPath,
|
|
316
|
-
executionTime: result.executionTime,
|
|
317
|
-
provider: result.provider,
|
|
318
|
-
sessionId: result.sessionId
|
|
319
|
-
}
|
|
320
|
-
};
|
|
321
|
-
return JSON.stringify(response, null, 2);
|
|
322
|
-
} else {
|
|
323
|
-
const errorResponse = {
|
|
324
|
-
operation: "realize",
|
|
325
|
-
success: false,
|
|
326
|
-
error: result.error,
|
|
327
|
-
metadata: {
|
|
328
|
-
specificationPath: params.specificationPath,
|
|
329
|
-
framework: params.framework,
|
|
330
|
-
executionTime: result.executionTime
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
return JSON.stringify(errorResponse, null, 2);
|
|
334
|
-
}
|
|
335
|
-
} catch (error) {
|
|
336
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
337
|
-
this.eventEmitter.emit("error-occurred", {
|
|
338
|
-
operation: "realize_application",
|
|
339
|
-
error: errorMessage,
|
|
340
|
-
context: params
|
|
341
|
-
});
|
|
342
|
-
const errorResponse = {
|
|
343
|
-
operation: "realize",
|
|
344
|
-
success: false,
|
|
345
|
-
error: errorMessage,
|
|
346
|
-
metadata: {
|
|
347
|
-
specificationPath: params.specificationPath,
|
|
348
|
-
framework: params.framework
|
|
349
|
-
}
|
|
350
|
-
};
|
|
351
|
-
return JSON.stringify(errorResponse, null, 2);
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* Get orchestrator workflow status and capabilities
|
|
356
|
-
*/
|
|
357
|
-
async getWorkflowStatus(params = {}) {
|
|
358
|
-
this.eventEmitter.emit("tool-called", {
|
|
359
|
-
toolName: "get_workflow_status",
|
|
360
|
-
arguments: params,
|
|
361
|
-
executionTime: 0
|
|
362
|
-
});
|
|
363
|
-
try {
|
|
364
|
-
const capabilities = this.orchestratorBridge.getCapabilities();
|
|
365
|
-
const isAvailable = this.orchestratorBridge.isAvailable();
|
|
366
|
-
const supportedOperations = this.orchestratorBridge.getSupportedOperations();
|
|
367
|
-
const status = {
|
|
368
|
-
orchestratorAvailable: isAvailable,
|
|
369
|
-
capabilities,
|
|
370
|
-
supportedOperations,
|
|
371
|
-
workflowInformation: {
|
|
372
|
-
fullWorkflowSupport: capabilities.hasFullOrchestrator,
|
|
373
|
-
sessionSupport: capabilities.sessionSupport,
|
|
374
|
-
inferenceEngine: capabilities.inferenceEngine,
|
|
375
|
-
workingDirectory: capabilities.workingDirectory,
|
|
376
|
-
...params.sessionId ? {
|
|
377
|
-
sessionId: params.sessionId,
|
|
378
|
-
sessionStatus: "Session support requires full orchestrator"
|
|
379
|
-
} : {}
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
const response = {
|
|
383
|
-
operation: "workflow_status",
|
|
384
|
-
success: true,
|
|
385
|
-
result: status,
|
|
386
|
-
metadata: {
|
|
387
|
-
queryTime: Date.now(),
|
|
388
|
-
hasFullOrchestrator: capabilities.hasFullOrchestrator,
|
|
389
|
-
availableOperations: supportedOperations.length
|
|
390
|
-
}
|
|
391
|
-
};
|
|
392
|
-
return JSON.stringify(response, null, 2);
|
|
393
|
-
} catch (error) {
|
|
394
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
395
|
-
this.eventEmitter.emit("error-occurred", {
|
|
396
|
-
operation: "get_workflow_status",
|
|
397
|
-
error: errorMessage,
|
|
398
|
-
context: params
|
|
399
|
-
});
|
|
400
|
-
const errorResponse = {
|
|
401
|
-
operation: "workflow_status",
|
|
402
|
-
success: false,
|
|
403
|
-
error: errorMessage,
|
|
404
|
-
metadata: {
|
|
405
|
-
queryTime: Date.now()
|
|
406
|
-
}
|
|
407
|
-
};
|
|
408
|
-
return JSON.stringify(errorResponse, null, 2);
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
export {
|
|
413
|
-
OrchestratorToolsService
|
|
414
|
-
};
|