@hexabot-ai/api 3.2.2-alpha.14 → 3.2.2-alpha.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/dist/mcp/mcp-api.module.js +2 -2
- package/dist/mcp/mcp-api.module.js.map +1 -1
- package/dist/mcp/tools/catalog-mcp.tools.d.ts +63 -0
- package/dist/mcp/tools/catalog-mcp.tools.js +135 -0
- package/dist/mcp/tools/catalog-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/cms-mcp.tools.d.ts +128 -0
- package/dist/mcp/tools/cms-mcp.tools.js +242 -0
- package/dist/mcp/tools/cms-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/credential-mcp.tools.d.ts +19 -0
- package/dist/mcp/tools/credential-mcp.tools.js +82 -0
- package/dist/mcp/tools/credential-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/hexabot-mcp-tool.base.d.ts +22 -0
- package/dist/mcp/tools/hexabot-mcp-tool.base.js +48 -0
- package/dist/mcp/tools/hexabot-mcp-tool.base.js.map +1 -0
- package/dist/mcp/tools/hexabot-mcp.schemas.d.ts +41 -0
- package/dist/mcp/tools/hexabot-mcp.schemas.js +36 -0
- package/dist/mcp/tools/hexabot-mcp.schemas.js.map +1 -0
- package/dist/mcp/tools/hexabot-mcp.tools.d.ts +1 -1329
- package/dist/mcp/tools/hexabot-mcp.tools.js +14 -1097
- package/dist/mcp/tools/hexabot-mcp.tools.js.map +1 -1
- package/dist/mcp/tools/hexabot-mcp.utils.d.ts +1 -0
- package/dist/mcp/tools/hexabot-mcp.utils.js +9 -0
- package/dist/mcp/tools/hexabot-mcp.utils.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +22 -0
- package/dist/mcp/tools/index.js +50 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/mcp-server-mcp.tools.d.ts +77 -0
- package/dist/mcp/tools/mcp-server-mcp.tools.js +130 -0
- package/dist/mcp/tools/mcp-server-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/memory-definition-mcp.tools.d.ts +57 -0
- package/dist/mcp/tools/memory-definition-mcp.tools.js +128 -0
- package/dist/mcp/tools/memory-definition-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/workflow-mcp.helper.d.ts +141 -0
- package/dist/mcp/tools/workflow-mcp.helper.js +108 -0
- package/dist/mcp/tools/workflow-mcp.helper.js.map +1 -0
- package/dist/mcp/tools/workflow-mcp.tools.d.ts +468 -0
- package/dist/mcp/tools/workflow-mcp.tools.js +222 -0
- package/dist/mcp/tools/workflow-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/workflow-run-mcp.tools.d.ts +347 -0
- package/dist/mcp/tools/workflow-run-mcp.tools.js +229 -0
- package/dist/mcp/tools/workflow-run-mcp.tools.js.map +1 -0
- package/dist/mcp/tools/workflow-version-mcp.tools.d.ts +230 -0
- package/dist/mcp/tools/workflow-version-mcp.tools.js +211 -0
- package/dist/mcp/tools/workflow-version-mcp.tools.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/workflow/services/workflow.service.d.ts +7 -7
- package/dist/workflow/services/workflow.service.js +40 -35
- package/dist/workflow/services/workflow.service.js.map +1 -1
- package/package.json +4 -4
- package/src/mcp/README.md +12 -2
- package/src/mcp/mcp-api.module.ts +2 -2
- package/src/mcp/tools/catalog-mcp.tools.ts +122 -0
- package/src/mcp/tools/cms-mcp.tools.ts +239 -0
- package/src/mcp/tools/credential-mcp.tools.ts +81 -0
- package/src/mcp/tools/hexabot-mcp-tool.base.ts +74 -0
- package/src/mcp/tools/hexabot-mcp.schemas.ts +55 -0
- package/src/mcp/tools/hexabot-mcp.tools.ts +1 -1194
- package/src/mcp/tools/hexabot-mcp.utils.ts +13 -0
- package/src/mcp/tools/index.ts +51 -0
- package/src/mcp/tools/mcp-server-mcp.tools.ts +135 -0
- package/src/mcp/tools/memory-definition-mcp.tools.ts +125 -0
- package/src/mcp/tools/workflow-mcp.helper.ts +166 -0
- package/src/mcp/tools/workflow-mcp.tools.ts +254 -0
- package/src/mcp/tools/workflow-run-mcp.tools.ts +274 -0
- package/src/mcp/tools/workflow-version-mcp.tools.ts +226 -0
- package/src/workflow/services/workflow.service.ts +49 -29
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import { ActionService } from "../../actions/actions.service";
|
|
2
|
+
import { RuntimeBindingsService } from "../../bindings/runtime-bindings.service";
|
|
3
|
+
import { WorkflowVersionService } from "../../workflow/services/workflow-version.service";
|
|
4
|
+
import { WorkflowVersionAction } from "../../workflow/types";
|
|
5
|
+
import { HexabotMcpRequest } from '../types';
|
|
6
|
+
import { HexabotMcpToolBase } from './hexabot-mcp-tool.base';
|
|
7
|
+
import { PaginationArgs } from './hexabot-mcp.schemas';
|
|
8
|
+
import { HexabotWorkflowMcpHelper } from './workflow-mcp.helper';
|
|
9
|
+
export declare class HexabotWorkflowVersionMcpTools extends HexabotMcpToolBase {
|
|
10
|
+
private readonly workflowVersionService;
|
|
11
|
+
private readonly actionService;
|
|
12
|
+
private readonly runtimeBindingsService;
|
|
13
|
+
private readonly workflowHelper;
|
|
14
|
+
constructor(workflowVersionService: WorkflowVersionService, actionService: ActionService, runtimeBindingsService: RuntimeBindingsService, workflowHelper: HexabotWorkflowMcpHelper);
|
|
15
|
+
commitWorkflowYaml(args: {
|
|
16
|
+
workflowId: string;
|
|
17
|
+
definitionYml: string;
|
|
18
|
+
message?: string;
|
|
19
|
+
parentVersion?: string | null;
|
|
20
|
+
action: WorkflowVersionAction;
|
|
21
|
+
}, _context: unknown, request?: HexabotMcpRequest): Promise<{
|
|
22
|
+
id: string;
|
|
23
|
+
createdAt: Date;
|
|
24
|
+
updatedAt: Date;
|
|
25
|
+
version: number;
|
|
26
|
+
definitionYml: string;
|
|
27
|
+
checksum: string;
|
|
28
|
+
message: string | null;
|
|
29
|
+
action: import("@hexabot-ai/types/dist/types/workflow/domain").WorkflowVersionAction | null;
|
|
30
|
+
parentVersion: string | null;
|
|
31
|
+
workflow: string;
|
|
32
|
+
createdBy: string | null;
|
|
33
|
+
}>;
|
|
34
|
+
validateWorkflowYaml(args: {
|
|
35
|
+
definitionYml: string;
|
|
36
|
+
validateActions?: boolean;
|
|
37
|
+
}): Promise<{
|
|
38
|
+
valid: boolean;
|
|
39
|
+
errors: string[];
|
|
40
|
+
definition?: undefined;
|
|
41
|
+
} | {
|
|
42
|
+
valid: boolean;
|
|
43
|
+
errors: never[];
|
|
44
|
+
definition: {
|
|
45
|
+
defs: Record<string, {
|
|
46
|
+
kind: "task";
|
|
47
|
+
action: string;
|
|
48
|
+
description?: string | undefined;
|
|
49
|
+
inputs?: Record<string, import("@hexabot-ai/agentic").JsonValue> | undefined;
|
|
50
|
+
bindings?: Record<string, string | string[]> | undefined;
|
|
51
|
+
settings?: {
|
|
52
|
+
[x: string]: import("@hexabot-ai/agentic").JsonValue;
|
|
53
|
+
timeout_ms?: number | undefined;
|
|
54
|
+
retries?: {
|
|
55
|
+
max_attempts: number;
|
|
56
|
+
backoff_ms: number;
|
|
57
|
+
max_delay_ms: number;
|
|
58
|
+
jitter: number;
|
|
59
|
+
multiplier: number;
|
|
60
|
+
enabled?: boolean | undefined;
|
|
61
|
+
} | undefined;
|
|
62
|
+
} | undefined;
|
|
63
|
+
} | {
|
|
64
|
+
kind: string;
|
|
65
|
+
settings: Record<string, unknown>;
|
|
66
|
+
description?: string | undefined;
|
|
67
|
+
action?: string | undefined;
|
|
68
|
+
bindings?: Record<string, string | string[]> | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
flow: import("@hexabot-ai/agentic").FlowStep[];
|
|
71
|
+
outputs: Record<string, string>;
|
|
72
|
+
inputs?: {
|
|
73
|
+
schema?: Record<string, import("@hexabot-ai/agentic").InputField> | undefined;
|
|
74
|
+
} | undefined;
|
|
75
|
+
context?: Record<string, import("@hexabot-ai/agentic").JsonValue> | undefined;
|
|
76
|
+
defaults?: {
|
|
77
|
+
settings?: {
|
|
78
|
+
[x: string]: import("@hexabot-ai/agentic").JsonValue;
|
|
79
|
+
timeout_ms?: number | undefined;
|
|
80
|
+
retries?: {
|
|
81
|
+
max_attempts: number;
|
|
82
|
+
backoff_ms: number;
|
|
83
|
+
max_delay_ms: number;
|
|
84
|
+
jitter: number;
|
|
85
|
+
multiplier: number;
|
|
86
|
+
enabled?: boolean | undefined;
|
|
87
|
+
} | undefined;
|
|
88
|
+
} | undefined;
|
|
89
|
+
} | undefined;
|
|
90
|
+
};
|
|
91
|
+
}>;
|
|
92
|
+
searchWorkflowVersions(args: {
|
|
93
|
+
workflowId: string;
|
|
94
|
+
} & PaginationArgs): Promise<{
|
|
95
|
+
items: unknown[];
|
|
96
|
+
total: number;
|
|
97
|
+
limit: number | undefined;
|
|
98
|
+
skip: number | undefined;
|
|
99
|
+
}>;
|
|
100
|
+
getWorkflowVersion(args: {
|
|
101
|
+
id: string;
|
|
102
|
+
workflowId?: string;
|
|
103
|
+
}): Promise<{
|
|
104
|
+
id: string;
|
|
105
|
+
createdAt: Date;
|
|
106
|
+
updatedAt: Date;
|
|
107
|
+
version: number;
|
|
108
|
+
definitionYml: string;
|
|
109
|
+
checksum: string;
|
|
110
|
+
message: string | null;
|
|
111
|
+
action: WorkflowVersionAction | null;
|
|
112
|
+
parentVersion: {
|
|
113
|
+
id: string;
|
|
114
|
+
createdAt: Date;
|
|
115
|
+
updatedAt: Date;
|
|
116
|
+
version: number;
|
|
117
|
+
definitionYml: string;
|
|
118
|
+
checksum: string;
|
|
119
|
+
message: string | null;
|
|
120
|
+
action: import("@hexabot-ai/types/dist/types/workflow/domain").WorkflowVersionAction | null;
|
|
121
|
+
parentVersion: string | null;
|
|
122
|
+
workflow: string;
|
|
123
|
+
createdBy: string | null;
|
|
124
|
+
} | null;
|
|
125
|
+
workflow: {
|
|
126
|
+
id: string;
|
|
127
|
+
createdAt: Date;
|
|
128
|
+
updatedAt: Date;
|
|
129
|
+
name: string;
|
|
130
|
+
description: string | null;
|
|
131
|
+
type: import("@hexabot-ai/types").WorkflowType;
|
|
132
|
+
schedule: string | null;
|
|
133
|
+
inputSchema: any;
|
|
134
|
+
builtin: boolean;
|
|
135
|
+
x: number;
|
|
136
|
+
y: number;
|
|
137
|
+
zoom: number;
|
|
138
|
+
direction: import("@hexabot-ai/types").DirectionType;
|
|
139
|
+
createdBy: string | null;
|
|
140
|
+
runAfterMs: number;
|
|
141
|
+
currentVersion?: string | null | undefined;
|
|
142
|
+
publishedVersion?: string | null | undefined;
|
|
143
|
+
};
|
|
144
|
+
createdBy: {
|
|
145
|
+
id: string;
|
|
146
|
+
createdAt: Date;
|
|
147
|
+
updatedAt: Date;
|
|
148
|
+
firstName: string;
|
|
149
|
+
lastName: string;
|
|
150
|
+
language: string | null;
|
|
151
|
+
timezone: number;
|
|
152
|
+
locale: string | null;
|
|
153
|
+
gender: string | null;
|
|
154
|
+
country: string | null;
|
|
155
|
+
foreignId: string | null;
|
|
156
|
+
assignedAt: Date | null;
|
|
157
|
+
lastvisit: Date | null;
|
|
158
|
+
retainedFrom: Date | null;
|
|
159
|
+
channel: {
|
|
160
|
+
name: string | null;
|
|
161
|
+
data?: Record<string, any> | null | undefined;
|
|
162
|
+
};
|
|
163
|
+
username: string;
|
|
164
|
+
email: string;
|
|
165
|
+
sendEmail: boolean;
|
|
166
|
+
state: boolean;
|
|
167
|
+
resetCount: number;
|
|
168
|
+
resetToken: string | null;
|
|
169
|
+
labels: string[];
|
|
170
|
+
assignedTo: string | null;
|
|
171
|
+
roles: string[];
|
|
172
|
+
avatar: string | null;
|
|
173
|
+
provider?: {
|
|
174
|
+
strategy: "local";
|
|
175
|
+
sub?: string | undefined;
|
|
176
|
+
} | undefined;
|
|
177
|
+
} | null;
|
|
178
|
+
}>;
|
|
179
|
+
updateWorkflowVersion(args: {
|
|
180
|
+
id: string;
|
|
181
|
+
message?: string | null;
|
|
182
|
+
}): Promise<{
|
|
183
|
+
id: string;
|
|
184
|
+
createdAt: Date;
|
|
185
|
+
updatedAt: Date;
|
|
186
|
+
version: number;
|
|
187
|
+
definitionYml: string;
|
|
188
|
+
checksum: string;
|
|
189
|
+
message: string | null;
|
|
190
|
+
action: import("@hexabot-ai/types/dist/types/workflow/domain").WorkflowVersionAction | null;
|
|
191
|
+
parentVersion: string | null;
|
|
192
|
+
workflow: string;
|
|
193
|
+
createdBy: string | null;
|
|
194
|
+
}>;
|
|
195
|
+
restoreWorkflowVersion(args: {
|
|
196
|
+
workflowId: string;
|
|
197
|
+
versionId: string;
|
|
198
|
+
message?: string;
|
|
199
|
+
}, _context: unknown, request?: HexabotMcpRequest): Promise<{
|
|
200
|
+
id: string;
|
|
201
|
+
createdAt: Date;
|
|
202
|
+
updatedAt: Date;
|
|
203
|
+
version: number;
|
|
204
|
+
definitionYml: string;
|
|
205
|
+
checksum: string;
|
|
206
|
+
message: string | null;
|
|
207
|
+
action: import("@hexabot-ai/types/dist/types/workflow/domain").WorkflowVersionAction | null;
|
|
208
|
+
parentVersion: string | null;
|
|
209
|
+
workflow: string;
|
|
210
|
+
createdBy: string | null;
|
|
211
|
+
}>;
|
|
212
|
+
rollbackWorkflowVersion(args: {
|
|
213
|
+
workflowId: string;
|
|
214
|
+
versionId: string;
|
|
215
|
+
message?: string;
|
|
216
|
+
}, _context: unknown, request?: HexabotMcpRequest): Promise<{
|
|
217
|
+
id: string;
|
|
218
|
+
createdAt: Date;
|
|
219
|
+
updatedAt: Date;
|
|
220
|
+
version: number;
|
|
221
|
+
definitionYml: string;
|
|
222
|
+
checksum: string;
|
|
223
|
+
message: string | null;
|
|
224
|
+
action: import("@hexabot-ai/types/dist/types/workflow/domain").WorkflowVersionAction | null;
|
|
225
|
+
parentVersion: string | null;
|
|
226
|
+
workflow: string;
|
|
227
|
+
createdBy: string | null;
|
|
228
|
+
}>;
|
|
229
|
+
private getWorkflowValidationActions;
|
|
230
|
+
}
|
|
@@ -0,0 +1,211 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.HexabotWorkflowVersionMcpTools = void 0;
|
|
13
|
+
const agentic_1 = require("@hexabot-ai/agentic");
|
|
14
|
+
const types_1 = require("@hexabot-ai/types");
|
|
15
|
+
const common_1 = require("@nestjs/common");
|
|
16
|
+
const mcp_nest_1 = require("@rekog/mcp-nest");
|
|
17
|
+
const zod_1 = require("zod");
|
|
18
|
+
const actions_service_1 = require("../../actions/actions.service");
|
|
19
|
+
const runtime_bindings_service_1 = require("../../bindings/runtime-bindings.service");
|
|
20
|
+
const workflow_version_service_1 = require("../../workflow/services/workflow-version.service");
|
|
21
|
+
const types_2 = require("../../workflow/types");
|
|
22
|
+
const mcp_permission_decorator_1 = require("../decorators/mcp-permission.decorator");
|
|
23
|
+
const mcp_permission_guard_1 = require("../guards/mcp-permission.guard");
|
|
24
|
+
const hexabot_mcp_tool_base_1 = require("./hexabot-mcp-tool.base");
|
|
25
|
+
const hexabot_mcp_schemas_1 = require("./hexabot-mcp.schemas");
|
|
26
|
+
const workflow_mcp_helper_1 = require("./workflow-mcp.helper");
|
|
27
|
+
let HexabotWorkflowVersionMcpTools = class HexabotWorkflowVersionMcpTools extends hexabot_mcp_tool_base_1.HexabotMcpToolBase {
|
|
28
|
+
constructor(workflowVersionService, actionService, runtimeBindingsService, workflowHelper) {
|
|
29
|
+
super();
|
|
30
|
+
this.workflowVersionService = workflowVersionService;
|
|
31
|
+
this.actionService = actionService;
|
|
32
|
+
this.runtimeBindingsService = runtimeBindingsService;
|
|
33
|
+
this.workflowHelper = workflowHelper;
|
|
34
|
+
}
|
|
35
|
+
async commitWorkflowYaml(args, _context, request) {
|
|
36
|
+
const actorId = this.getActorId(request);
|
|
37
|
+
return await this.workflowHelper.commitWorkflowDefinition({
|
|
38
|
+
...args,
|
|
39
|
+
createdBy: actorId,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
async validateWorkflowYaml(args) {
|
|
43
|
+
const validateActions = args.validateActions ?? true;
|
|
44
|
+
const validation = (0, agentic_1.validateWorkflow)(args.definitionYml, {
|
|
45
|
+
bindingKinds: this.runtimeBindingsService.getRegistry(),
|
|
46
|
+
...(validateActions
|
|
47
|
+
? { actions: this.getWorkflowValidationActions() }
|
|
48
|
+
: {}),
|
|
49
|
+
});
|
|
50
|
+
if (!validation.success) {
|
|
51
|
+
return { valid: false, errors: validation.errors };
|
|
52
|
+
}
|
|
53
|
+
return { valid: true, errors: [], definition: validation.data };
|
|
54
|
+
}
|
|
55
|
+
async searchWorkflowVersions(args) {
|
|
56
|
+
const where = { workflow: { id: args.workflowId } };
|
|
57
|
+
return await this.listWithCount(this.workflowVersionService, this.findOptions(args, where));
|
|
58
|
+
}
|
|
59
|
+
async getWorkflowVersion(args) {
|
|
60
|
+
const version = await this.workflowVersionService.findOneAndPopulate({
|
|
61
|
+
where: {
|
|
62
|
+
id: args.id,
|
|
63
|
+
...(args.workflowId ? { workflow: { id: args.workflowId } } : {}),
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
if (!version) {
|
|
67
|
+
throw new common_1.NotFoundException(`Workflow version ${args.id} not found`);
|
|
68
|
+
}
|
|
69
|
+
return version;
|
|
70
|
+
}
|
|
71
|
+
async updateWorkflowVersion(args) {
|
|
72
|
+
return await this.workflowVersionService.updateOne(args.id, {
|
|
73
|
+
message: args.message ?? undefined,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
async restoreWorkflowVersion(args, _context, request) {
|
|
77
|
+
return await this.workflowHelper.restoreWorkflowVersionSnapshot(args, this.getActorId(request));
|
|
78
|
+
}
|
|
79
|
+
async rollbackWorkflowVersion(args, _context, request) {
|
|
80
|
+
return await this.workflowHelper.restoreWorkflowVersionSnapshot(args, this.getActorId(request));
|
|
81
|
+
}
|
|
82
|
+
getWorkflowValidationActions() {
|
|
83
|
+
return Object.fromEntries(Object.entries(this.actionService.getRegistry()).map(([actionName, action]) => [
|
|
84
|
+
actionName,
|
|
85
|
+
{ supportedBindings: action.supportedBindings ?? [] },
|
|
86
|
+
]));
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
exports.HexabotWorkflowVersionMcpTools = HexabotWorkflowVersionMcpTools;
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, mcp_permission_decorator_1.McpPermission)('workflowversion', types_1.Action.CREATE),
|
|
92
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
93
|
+
(0, mcp_nest_1.Tool)({
|
|
94
|
+
name: 'hexabot_workflow_yaml_commit',
|
|
95
|
+
description: 'Validate and commit workflow definition YAML as a new version.',
|
|
96
|
+
parameters: zod_1.z.object({
|
|
97
|
+
workflowId: hexabot_mcp_schemas_1.uuidSchema,
|
|
98
|
+
definitionYml: zod_1.z.string().min(1),
|
|
99
|
+
message: zod_1.z.string().optional(),
|
|
100
|
+
parentVersion: hexabot_mcp_schemas_1.uuidSchema.nullable().optional(),
|
|
101
|
+
action: zod_1.z
|
|
102
|
+
.enum(types_2.WorkflowVersionAction)
|
|
103
|
+
.default(types_2.WorkflowVersionAction.update),
|
|
104
|
+
}),
|
|
105
|
+
}),
|
|
106
|
+
__metadata("design:type", Function),
|
|
107
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
108
|
+
__metadata("design:returntype", Promise)
|
|
109
|
+
], HexabotWorkflowVersionMcpTools.prototype, "commitWorkflowYaml", null);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, mcp_permission_decorator_1.McpPermission)('workflow', types_1.Action.READ),
|
|
112
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
113
|
+
(0, mcp_nest_1.Tool)({
|
|
114
|
+
name: 'hexabot_workflow_yaml_validate',
|
|
115
|
+
description: 'Validate workflow definition YAML without creating a workflow version.',
|
|
116
|
+
parameters: zod_1.z.object({
|
|
117
|
+
definitionYml: zod_1.z.string().min(1),
|
|
118
|
+
validateActions: zod_1.z.boolean().default(true),
|
|
119
|
+
}),
|
|
120
|
+
}),
|
|
121
|
+
__metadata("design:type", Function),
|
|
122
|
+
__metadata("design:paramtypes", [Object]),
|
|
123
|
+
__metadata("design:returntype", Promise)
|
|
124
|
+
], HexabotWorkflowVersionMcpTools.prototype, "validateWorkflowYaml", null);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, mcp_permission_decorator_1.McpPermission)('workflowversion', types_1.Action.READ),
|
|
127
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
128
|
+
(0, mcp_nest_1.Tool)({
|
|
129
|
+
name: 'hexabot_workflow_version_search',
|
|
130
|
+
description: 'List workflow definition YAML versions for a workflow.',
|
|
131
|
+
parameters: zod_1.z.object({
|
|
132
|
+
workflowId: hexabot_mcp_schemas_1.uuidSchema,
|
|
133
|
+
...hexabot_mcp_schemas_1.paginationSchema,
|
|
134
|
+
sortBy: zod_1.z.string().default('version'),
|
|
135
|
+
sortDirection: zod_1.z.enum(['ASC', 'DESC']).default('DESC'),
|
|
136
|
+
}),
|
|
137
|
+
}),
|
|
138
|
+
__metadata("design:type", Function),
|
|
139
|
+
__metadata("design:paramtypes", [Object]),
|
|
140
|
+
__metadata("design:returntype", Promise)
|
|
141
|
+
], HexabotWorkflowVersionMcpTools.prototype, "searchWorkflowVersions", null);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, mcp_permission_decorator_1.McpPermission)('workflowversion', types_1.Action.READ),
|
|
144
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
145
|
+
(0, mcp_nest_1.Tool)({
|
|
146
|
+
name: 'hexabot_workflow_version_get',
|
|
147
|
+
description: 'Read one workflow definition YAML version.',
|
|
148
|
+
parameters: zod_1.z.object({
|
|
149
|
+
id: hexabot_mcp_schemas_1.uuidSchema,
|
|
150
|
+
workflowId: hexabot_mcp_schemas_1.uuidSchema.optional(),
|
|
151
|
+
}),
|
|
152
|
+
}),
|
|
153
|
+
__metadata("design:type", Function),
|
|
154
|
+
__metadata("design:paramtypes", [Object]),
|
|
155
|
+
__metadata("design:returntype", Promise)
|
|
156
|
+
], HexabotWorkflowVersionMcpTools.prototype, "getWorkflowVersion", null);
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, mcp_permission_decorator_1.McpPermission)('workflowversion', types_1.Action.UPDATE),
|
|
159
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
160
|
+
(0, mcp_nest_1.Tool)({
|
|
161
|
+
name: 'hexabot_workflow_version_update',
|
|
162
|
+
description: 'Update workflow version metadata such as the version message.',
|
|
163
|
+
parameters: zod_1.z.object({
|
|
164
|
+
id: hexabot_mcp_schemas_1.uuidSchema,
|
|
165
|
+
message: zod_1.z.string().nullable().optional(),
|
|
166
|
+
}),
|
|
167
|
+
}),
|
|
168
|
+
__metadata("design:type", Function),
|
|
169
|
+
__metadata("design:paramtypes", [Object]),
|
|
170
|
+
__metadata("design:returntype", Promise)
|
|
171
|
+
], HexabotWorkflowVersionMcpTools.prototype, "updateWorkflowVersion", null);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, mcp_permission_decorator_1.McpPermission)('workflowversion', types_1.Action.CREATE),
|
|
174
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
175
|
+
(0, mcp_nest_1.Tool)({
|
|
176
|
+
name: 'hexabot_workflow_version_restore',
|
|
177
|
+
description: 'Restore a workflow to a previous YAML version by creating a new restore snapshot.',
|
|
178
|
+
parameters: zod_1.z.object({
|
|
179
|
+
workflowId: hexabot_mcp_schemas_1.uuidSchema,
|
|
180
|
+
versionId: hexabot_mcp_schemas_1.uuidSchema,
|
|
181
|
+
message: zod_1.z.string().optional(),
|
|
182
|
+
}),
|
|
183
|
+
}),
|
|
184
|
+
__metadata("design:type", Function),
|
|
185
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
186
|
+
__metadata("design:returntype", Promise)
|
|
187
|
+
], HexabotWorkflowVersionMcpTools.prototype, "restoreWorkflowVersion", null);
|
|
188
|
+
__decorate([
|
|
189
|
+
(0, mcp_permission_decorator_1.McpPermission)('workflowversion', types_1.Action.CREATE),
|
|
190
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
191
|
+
(0, mcp_nest_1.Tool)({
|
|
192
|
+
name: 'hexabot_workflow_rollback',
|
|
193
|
+
description: 'Rollback a workflow to a previous YAML version by creating a new current restore snapshot.',
|
|
194
|
+
parameters: zod_1.z.object({
|
|
195
|
+
workflowId: hexabot_mcp_schemas_1.uuidSchema,
|
|
196
|
+
versionId: hexabot_mcp_schemas_1.uuidSchema,
|
|
197
|
+
message: zod_1.z.string().optional(),
|
|
198
|
+
}),
|
|
199
|
+
}),
|
|
200
|
+
__metadata("design:type", Function),
|
|
201
|
+
__metadata("design:paramtypes", [Object, Object, Object]),
|
|
202
|
+
__metadata("design:returntype", Promise)
|
|
203
|
+
], HexabotWorkflowVersionMcpTools.prototype, "rollbackWorkflowVersion", null);
|
|
204
|
+
exports.HexabotWorkflowVersionMcpTools = HexabotWorkflowVersionMcpTools = __decorate([
|
|
205
|
+
(0, common_1.Injectable)(),
|
|
206
|
+
__metadata("design:paramtypes", [workflow_version_service_1.WorkflowVersionService,
|
|
207
|
+
actions_service_1.ActionService,
|
|
208
|
+
runtime_bindings_service_1.RuntimeBindingsService,
|
|
209
|
+
workflow_mcp_helper_1.HexabotWorkflowMcpHelper])
|
|
210
|
+
], HexabotWorkflowVersionMcpTools);
|
|
211
|
+
//# sourceMappingURL=workflow-version-mcp.tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-version-mcp.tools.js","sourceRoot":"","sources":["../../../src/mcp/tools/workflow-version-mcp.tools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,iDAAuD;AACvD,6CAA2C;AAC3C,2CAA+D;AAC/D,8CAAmD;AACnD,6BAAwB;AAExB,mEAA0D;AAC1D,sFAA6E;AAE7E,+FAAsF;AACtF,gDAAyD;AAEzD,qFAAuE;AACvE,yEAAoE;AAGpE,mEAA6D;AAC7D,+DAI+B;AAC/B,+DAAiE;AAG1D,IAAM,8BAA8B,GAApC,MAAM,8BAA+B,SAAQ,0CAAkB;IACpE,YACmB,sBAA8C,EAC9C,aAA4B,EAC5B,sBAA8C,EAC9C,cAAwC;QAEzD,KAAK,EAAE,CAAC;QALS,2BAAsB,GAAtB,sBAAsB,CAAwB;QAC9C,kBAAa,GAAb,aAAa,CAAe;QAC5B,2BAAsB,GAAtB,sBAAsB,CAAwB;QAC9C,mBAAc,GAAd,cAAc,CAA0B;IAG3D,CAAC;IAkBK,AAAN,KAAK,CAAC,kBAAkB,CACtB,IAMC,EACD,QAAiB,EACjB,OAA2B;QAE3B,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAEzC,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,wBAAwB,CAAC;YACxD,GAAG,IAAI;YACP,SAAS,EAAE,OAAO;SACnB,CAAC,CAAC;IACL,CAAC;IAaK,AAAN,KAAK,CAAC,oBAAoB,CAAC,IAG1B;QACC,MAAM,eAAe,GAAG,IAAI,CAAC,e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