@hexabot-ai/api 3.2.2-alpha.14 → 3.2.2-alpha.16
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/static/assets/{browser-ponyfill-D3QB7SUD.js → browser-ponyfill-CBXq65SP.js} +1 -1
- package/dist/static/assets/{cssMode-Bk0-m_Ij.js → cssMode-CN8f6H-j.js} +1 -1
- package/dist/static/assets/{freemarker2-D1tTqqt8.js → freemarker2-Dfrb95Lt.js} +1 -1
- package/dist/static/assets/{handlebars-D3VQYLDj.js → handlebars-B2cershf.js} +1 -1
- package/dist/static/assets/{html-Cmhr3-6_.js → html-CfjuUmTR.js} +1 -1
- package/dist/static/assets/{htmlMode-Bb5Kynv_.js → htmlMode-pl8CUTaA.js} +1 -1
- package/dist/static/assets/{index-JPQj6OiL.js → index-Cq8K5Poc.js} +2131 -2131
- package/dist/static/assets/{index-BI1BtkYv.css → index-D-b9KTZd.css} +1 -1
- package/dist/static/assets/{javascript-BkQdNyFT.js → javascript-Be45wN2i.js} +1 -1
- package/dist/static/assets/{jsonMode-CS1296LF.js → jsonMode-yPU1rg8t.js} +1 -1
- package/dist/static/assets/{liquid-C9ufUE-r.js → liquid-BMJibvBr.js} +1 -1
- package/dist/static/assets/{lspLanguageFeatures-Dxd2SsrE.js → lspLanguageFeatures-Cxz6b29K.js} +1 -1
- package/dist/static/assets/{mdx-Dm4bC48D.js → mdx-DpvXygi3.js} +1 -1
- package/dist/static/assets/{python-ZvBWpr_q.js → python-BHEnNcMm.js} +1 -1
- package/dist/static/assets/{razor-DBj-LyWR.js → razor-B6-tNhh_.js} +1 -1
- package/dist/static/assets/{tsMode-DzMlJB2i.js → tsMode-J4SJIY5C.js} +1 -1
- package/dist/static/assets/{typescript-Cfo3bzpy.js → typescript-Df82IAgp.js} +1 -1
- package/dist/static/assets/{xml-ZyceR0L3.js → xml-C8jr31yy.js} +1 -1
- package/dist/static/assets/{yaml-oyu_gOar.js → yaml-BEd1RzBW.js} +1 -1
- package/dist/static/index.html +2 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/websocket/websocket.gateway.d.ts +2 -1
- package/dist/websocket/websocket.gateway.js.map +1 -1
- package/dist/workflow/services/workflow.service.d.ts +9 -8
- package/dist/workflow/services/workflow.service.js +50 -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/websocket/websocket.gateway.ts +2 -1
- package/src/workflow/services/workflow.service.ts +58 -30
|
@@ -23,7 +23,7 @@ const hexabot_mcp_token_guard_1 = require("./guards/hexabot-mcp-token.guard");
|
|
|
23
23
|
const mcp_permission_guard_1 = require("./guards/mcp-permission.guard");
|
|
24
24
|
const mcp_token_repository_1 = require("./repositories/mcp-token.repository");
|
|
25
25
|
const mcp_token_service_1 = require("./services/mcp-token.service");
|
|
26
|
-
const
|
|
26
|
+
const tools_1 = require("./tools");
|
|
27
27
|
let McpApiModule = class McpApiModule {
|
|
28
28
|
};
|
|
29
29
|
exports.McpApiModule = McpApiModule;
|
|
@@ -57,7 +57,7 @@ exports.McpApiModule = McpApiModule = __decorate([
|
|
|
57
57
|
mcp_permission_guard_1.McpPermissionGuard,
|
|
58
58
|
mcp_token_repository_1.McpTokenRepository,
|
|
59
59
|
mcp_token_service_1.McpTokenService,
|
|
60
|
-
|
|
60
|
+
...tools_1.HEXABOT_MCP_TOOL_PROVIDERS,
|
|
61
61
|
],
|
|
62
62
|
controllers: [mcp_token_controller_1.McpTokenController],
|
|
63
63
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-api.module.js","sourceRoot":"","sources":["../../src/mcp/mcp-api.module.ts"],"names":[],"mappings":";;;;;;;;;AAMA,mCAAoC;AAEpC,2CAAwC;AACxC,6CAAgD;AAChD,8CAA8D;AAE9D,8DAAyD;AACzD,iEAA4D;AAC5D,kDAA6C;AAC7C,sCAAkC;AAClC,qDAAgD;AAChD,iEAA4D;AAE5D,6EAAwE;AACxE,kEAAgE;AAChE,8EAAwE;AACxE,wEAAmE;AACnE,8EAAyE;AACzE,oEAA+D;AAC/D,
|
|
1
|
+
{"version":3,"file":"mcp-api.module.js","sourceRoot":"","sources":["../../src/mcp/mcp-api.module.ts"],"names":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@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ActionService } from "../../actions/actions.service";
|
|
2
|
+
import { RuntimeBindingsService } from "../../bindings/runtime-bindings.service";
|
|
3
|
+
import { WorkflowType } from "../../workflow/types";
|
|
4
|
+
export declare class HexabotCatalogMcpTools {
|
|
5
|
+
private readonly actionService;
|
|
6
|
+
private readonly runtimeBindingsService;
|
|
7
|
+
constructor(actionService: ActionService, runtimeBindingsService: RuntimeBindingsService);
|
|
8
|
+
searchActions(args: {
|
|
9
|
+
query?: string;
|
|
10
|
+
workflowType?: WorkflowType;
|
|
11
|
+
}): Promise<{
|
|
12
|
+
items: {
|
|
13
|
+
name: `${string}_${string}`;
|
|
14
|
+
description: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
color: string;
|
|
17
|
+
group: string;
|
|
18
|
+
workflowTypes: WorkflowType[];
|
|
19
|
+
supportedBindings: readonly string[];
|
|
20
|
+
inputSchema: import("json-schema").JSONSchema7;
|
|
21
|
+
outputSchema: import("json-schema").JSONSchema7;
|
|
22
|
+
settingSchema: import("json-schema").JSONSchema7;
|
|
23
|
+
}[];
|
|
24
|
+
}>;
|
|
25
|
+
getAction(args: {
|
|
26
|
+
name: string;
|
|
27
|
+
}): Promise<{
|
|
28
|
+
name: `${string}_${string}`;
|
|
29
|
+
description: string;
|
|
30
|
+
icon: string;
|
|
31
|
+
color: string;
|
|
32
|
+
group: string;
|
|
33
|
+
workflowTypes: WorkflowType[];
|
|
34
|
+
supportedBindings: readonly string[];
|
|
35
|
+
inputSchema: import("json-schema").JSONSchema7;
|
|
36
|
+
outputSchema: import("json-schema").JSONSchema7;
|
|
37
|
+
settingSchema: import("json-schema").JSONSchema7;
|
|
38
|
+
}>;
|
|
39
|
+
searchBindings(args: {
|
|
40
|
+
query?: string;
|
|
41
|
+
}): Promise<{
|
|
42
|
+
items: {
|
|
43
|
+
schema: import("json-schema").JSONSchema7;
|
|
44
|
+
multiple: boolean;
|
|
45
|
+
color: string;
|
|
46
|
+
icon: string;
|
|
47
|
+
supportedBindings: readonly string[];
|
|
48
|
+
actionPolicy: import("@hexabot-ai/agentic/dist/types/bindings/base-binding").BindingActionPolicy;
|
|
49
|
+
kind: string;
|
|
50
|
+
}[];
|
|
51
|
+
}>;
|
|
52
|
+
getBinding(args: {
|
|
53
|
+
kind: string;
|
|
54
|
+
}): Promise<{
|
|
55
|
+
schema: import("json-schema").JSONSchema7;
|
|
56
|
+
multiple: boolean;
|
|
57
|
+
color: string;
|
|
58
|
+
icon: string;
|
|
59
|
+
supportedBindings: readonly string[];
|
|
60
|
+
actionPolicy: import("@hexabot-ai/agentic/dist/types/bindings/base-binding").BindingActionPolicy;
|
|
61
|
+
kind: string;
|
|
62
|
+
}>;
|
|
63
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
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.HexabotCatalogMcpTools = void 0;
|
|
13
|
+
const types_1 = require("@hexabot-ai/types");
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const mcp_nest_1 = require("@rekog/mcp-nest");
|
|
16
|
+
const zod_1 = require("zod");
|
|
17
|
+
const actions_service_1 = require("../../actions/actions.service");
|
|
18
|
+
const runtime_bindings_service_1 = require("../../bindings/runtime-bindings.service");
|
|
19
|
+
const types_2 = require("../../workflow/types");
|
|
20
|
+
const mcp_permission_decorator_1 = require("../decorators/mcp-permission.decorator");
|
|
21
|
+
const mcp_permission_guard_1 = require("../guards/mcp-permission.guard");
|
|
22
|
+
let HexabotCatalogMcpTools = class HexabotCatalogMcpTools {
|
|
23
|
+
constructor(actionService, runtimeBindingsService) {
|
|
24
|
+
this.actionService = actionService;
|
|
25
|
+
this.runtimeBindingsService = runtimeBindingsService;
|
|
26
|
+
}
|
|
27
|
+
async searchActions(args) {
|
|
28
|
+
const query = args.query?.toLowerCase();
|
|
29
|
+
const actions = this.actionService.getAllSchemaDefinitions(args.workflowType);
|
|
30
|
+
return {
|
|
31
|
+
items: query
|
|
32
|
+
? actions.filter((action) => [
|
|
33
|
+
action.name,
|
|
34
|
+
action.description,
|
|
35
|
+
action.group,
|
|
36
|
+
...(action.workflowTypes ?? []),
|
|
37
|
+
]
|
|
38
|
+
.filter(Boolean)
|
|
39
|
+
.some((value) => `${value}`.toLowerCase().includes(query)))
|
|
40
|
+
: actions,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
async getAction(args) {
|
|
44
|
+
const action = this.actionService
|
|
45
|
+
.getAllSchemaDefinitions()
|
|
46
|
+
.find((entry) => entry.name === args.name);
|
|
47
|
+
if (!action) {
|
|
48
|
+
throw new common_1.NotFoundException(`Action ${args.name} not found`);
|
|
49
|
+
}
|
|
50
|
+
return action;
|
|
51
|
+
}
|
|
52
|
+
async searchBindings(args) {
|
|
53
|
+
const query = args.query?.toLowerCase();
|
|
54
|
+
const entries = Object.entries(this.runtimeBindingsService.getAllSchemaDefinitions()).map(([kind, definition]) => ({ kind, ...definition }));
|
|
55
|
+
return {
|
|
56
|
+
items: query
|
|
57
|
+
? entries.filter((entry) => [entry.kind, entry.icon, entry.color]
|
|
58
|
+
.filter(Boolean)
|
|
59
|
+
.some((value) => `${value}`.toLowerCase().includes(query)))
|
|
60
|
+
: entries,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
async getBinding(args) {
|
|
64
|
+
const bindings = this.runtimeBindingsService.getAllSchemaDefinitions();
|
|
65
|
+
const binding = bindings[args.kind];
|
|
66
|
+
if (!binding) {
|
|
67
|
+
throw new common_1.NotFoundException(`Binding kind ${args.kind} not found`);
|
|
68
|
+
}
|
|
69
|
+
return { kind: args.kind, ...binding };
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports.HexabotCatalogMcpTools = HexabotCatalogMcpTools;
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, mcp_permission_decorator_1.McpPermission)('workflow', types_1.Action.READ),
|
|
75
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
76
|
+
(0, mcp_nest_1.Tool)({
|
|
77
|
+
name: 'hexabot_action_search',
|
|
78
|
+
description: 'Search available workflow actions and their schemas.',
|
|
79
|
+
parameters: zod_1.z.object({
|
|
80
|
+
query: zod_1.z.string().optional(),
|
|
81
|
+
workflowType: zod_1.z.enum(types_2.WorkflowType).optional(),
|
|
82
|
+
}),
|
|
83
|
+
}),
|
|
84
|
+
__metadata("design:type", Function),
|
|
85
|
+
__metadata("design:paramtypes", [Object]),
|
|
86
|
+
__metadata("design:returntype", Promise)
|
|
87
|
+
], HexabotCatalogMcpTools.prototype, "searchActions", null);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, mcp_permission_decorator_1.McpPermission)('workflow', types_1.Action.READ),
|
|
90
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
91
|
+
(0, mcp_nest_1.Tool)({
|
|
92
|
+
name: 'hexabot_action_get',
|
|
93
|
+
description: 'Read schema metadata for one workflow action.',
|
|
94
|
+
parameters: zod_1.z.object({
|
|
95
|
+
name: zod_1.z.string().min(1),
|
|
96
|
+
}),
|
|
97
|
+
}),
|
|
98
|
+
__metadata("design:type", Function),
|
|
99
|
+
__metadata("design:paramtypes", [Object]),
|
|
100
|
+
__metadata("design:returntype", Promise)
|
|
101
|
+
], HexabotCatalogMcpTools.prototype, "getAction", null);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, mcp_permission_decorator_1.McpPermission)('workflow', types_1.Action.READ),
|
|
104
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
105
|
+
(0, mcp_nest_1.Tool)({
|
|
106
|
+
name: 'hexabot_binding_search',
|
|
107
|
+
description: 'Search workflow runtime binding kind schemas.',
|
|
108
|
+
parameters: zod_1.z.object({
|
|
109
|
+
query: zod_1.z.string().optional(),
|
|
110
|
+
}),
|
|
111
|
+
}),
|
|
112
|
+
__metadata("design:type", Function),
|
|
113
|
+
__metadata("design:paramtypes", [Object]),
|
|
114
|
+
__metadata("design:returntype", Promise)
|
|
115
|
+
], HexabotCatalogMcpTools.prototype, "searchBindings", null);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, mcp_permission_decorator_1.McpPermission)('workflow', types_1.Action.READ),
|
|
118
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
119
|
+
(0, mcp_nest_1.Tool)({
|
|
120
|
+
name: 'hexabot_binding_get',
|
|
121
|
+
description: 'Read schema metadata for one workflow runtime binding kind.',
|
|
122
|
+
parameters: zod_1.z.object({
|
|
123
|
+
kind: zod_1.z.string().min(1),
|
|
124
|
+
}),
|
|
125
|
+
}),
|
|
126
|
+
__metadata("design:type", Function),
|
|
127
|
+
__metadata("design:paramtypes", [Object]),
|
|
128
|
+
__metadata("design:returntype", Promise)
|
|
129
|
+
], HexabotCatalogMcpTools.prototype, "getBinding", null);
|
|
130
|
+
exports.HexabotCatalogMcpTools = HexabotCatalogMcpTools = __decorate([
|
|
131
|
+
(0, common_1.Injectable)(),
|
|
132
|
+
__metadata("design:paramtypes", [actions_service_1.ActionService,
|
|
133
|
+
runtime_bindings_service_1.RuntimeBindingsService])
|
|
134
|
+
], HexabotCatalogMcpTools);
|
|
135
|
+
//# sourceMappingURL=catalog-mcp.tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-mcp.tools.js","sourceRoot":"","sources":["../../../src/mcp/tools/catalog-mcp.tools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,6CAA2C;AAC3C,2CAA+D;AAC/D,8CAAmD;AACnD,6BAAwB;AAExB,mEAA0D;AAC1D,sFAA6E;AAC7E,gDAAgD;AAEhD,qFAAuE;AACvE,yEAAoE;AAG7D,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YACmB,aAA4B,EAC5B,sBAA8C;QAD9C,kBAAa,GAAb,aAAa,CAAe;QAC5B,2BAAsB,GAAtB,sBAAsB,CAAwB;IAC9D,CAAC;IAYE,AAAN,KAAK,CAAC,aAAa,CAAC,IAAqD;QACvE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,CAAC;QACxC,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,uBAAuB,CACxD,IAAI,CAAC,YAAY,CAClB,CAAC;QAEF,OAAO;YACL,KAAK,EAAE,KAAK;gBACV,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CACxB;oBACE,MAAM,CAAC,IAAI;oBACX,MAAM,CAAC,WAAW;oBAClB,MAAM,CAAC,KAAK;oBACZ,GAAG,CAAC,MAAM,CAAC,aAAa,IAAI,EAAE,CAAC;iBAChC;qBACE,MAAM,CAAC,OAAO,CAAC;qBACf,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAC7D;gBACH,CAAC,CAAC,OAAO;SACZ,CAAC;IACJ,CAAC;IAWK,AAAN,KAAK,CAAC,SAAS,CAAC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E,OAAC,CAAC,MAAM,CAAC;YACnB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC7B,CAAC;KACH,CAAC;;;;4DAgBD;AAWK;IATL,IAAA,wCAAa,EAAC,UAAU,EAAE,cAAM,CAAC,IAAI,CAAC;IACtC,IAAA,qBAAU,EAAC,CAAC,yCAAkB,CAAC,CAAC;IAChC,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,6DAA6D;QAC1E,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC;YACnB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;SACxB,CAAC;KACH,CAAC;;;;wDASD;iCArGU,sBAAsB;IADlC,IAAA,mBAAU,GAAE;qCAGuB,+BAAa;QACJ,iDAAsB;GAHtD,sBAAsB,CAsGlC"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { ContentTypeService } from "../../cms/services/content-type.service";
|
|
2
|
+
import { ContentService } from "../../cms/services/content.service";
|
|
3
|
+
import { HexabotMcpToolBase } from './hexabot-mcp-tool.base';
|
|
4
|
+
import { PaginationArgs } from './hexabot-mcp.schemas';
|
|
5
|
+
export declare class HexabotCmsMcpTools extends HexabotMcpToolBase {
|
|
6
|
+
private readonly contentTypeService;
|
|
7
|
+
private readonly contentService;
|
|
8
|
+
constructor(contentTypeService: ContentTypeService, contentService: ContentService);
|
|
9
|
+
searchContentTypes(args: {
|
|
10
|
+
query?: string;
|
|
11
|
+
} & PaginationArgs): Promise<{
|
|
12
|
+
items: unknown[];
|
|
13
|
+
total: number;
|
|
14
|
+
limit: number | undefined;
|
|
15
|
+
skip: number | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
getContentType(args: {
|
|
18
|
+
id: string;
|
|
19
|
+
}): Promise<{
|
|
20
|
+
id: string;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
updatedAt: Date;
|
|
23
|
+
name: string;
|
|
24
|
+
schema: any;
|
|
25
|
+
}>;
|
|
26
|
+
createContentType(args: {
|
|
27
|
+
name: string;
|
|
28
|
+
schema: Record<string, unknown>;
|
|
29
|
+
}): Promise<{
|
|
30
|
+
id: string;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
updatedAt: Date;
|
|
33
|
+
name: string;
|
|
34
|
+
schema: any;
|
|
35
|
+
}>;
|
|
36
|
+
updateContentType(args: {
|
|
37
|
+
id: string;
|
|
38
|
+
} & Record<string, unknown>): Promise<{
|
|
39
|
+
id: string;
|
|
40
|
+
createdAt: Date;
|
|
41
|
+
updatedAt: Date;
|
|
42
|
+
name: string;
|
|
43
|
+
schema: any;
|
|
44
|
+
}>;
|
|
45
|
+
searchContent(args: {
|
|
46
|
+
query?: string;
|
|
47
|
+
contentTypeId?: string;
|
|
48
|
+
status?: boolean;
|
|
49
|
+
} & PaginationArgs): Promise<{
|
|
50
|
+
items: unknown[];
|
|
51
|
+
total: number;
|
|
52
|
+
limit: number | undefined;
|
|
53
|
+
skip: number | undefined;
|
|
54
|
+
} | {
|
|
55
|
+
items: {
|
|
56
|
+
id: string;
|
|
57
|
+
createdAt: Date;
|
|
58
|
+
updatedAt: Date;
|
|
59
|
+
title: string;
|
|
60
|
+
status: boolean;
|
|
61
|
+
properties: Record<string, unknown> | null;
|
|
62
|
+
searchText: string;
|
|
63
|
+
contentType: {
|
|
64
|
+
id: string;
|
|
65
|
+
createdAt: Date;
|
|
66
|
+
updatedAt: Date;
|
|
67
|
+
name: string;
|
|
68
|
+
schema: any;
|
|
69
|
+
};
|
|
70
|
+
}[];
|
|
71
|
+
limit: number;
|
|
72
|
+
skip: number;
|
|
73
|
+
}>;
|
|
74
|
+
getContent(args: {
|
|
75
|
+
id: string;
|
|
76
|
+
}): Promise<{
|
|
77
|
+
id: string;
|
|
78
|
+
createdAt: Date;
|
|
79
|
+
updatedAt: Date;
|
|
80
|
+
title: string;
|
|
81
|
+
status: boolean;
|
|
82
|
+
properties: Record<string, unknown> | null;
|
|
83
|
+
searchText: string;
|
|
84
|
+
contentType: {
|
|
85
|
+
id: string;
|
|
86
|
+
createdAt: Date;
|
|
87
|
+
updatedAt: Date;
|
|
88
|
+
name: string;
|
|
89
|
+
schema: any;
|
|
90
|
+
};
|
|
91
|
+
}>;
|
|
92
|
+
createContent(args: {
|
|
93
|
+
contentType: string;
|
|
94
|
+
title: string;
|
|
95
|
+
status?: boolean;
|
|
96
|
+
properties?: Record<string, unknown>;
|
|
97
|
+
}): Promise<{
|
|
98
|
+
id: string;
|
|
99
|
+
createdAt: Date;
|
|
100
|
+
updatedAt: Date;
|
|
101
|
+
title: string;
|
|
102
|
+
status: boolean;
|
|
103
|
+
properties: Record<string, unknown> | null;
|
|
104
|
+
searchText: string;
|
|
105
|
+
contentType: string;
|
|
106
|
+
}>;
|
|
107
|
+
updateContent(args: {
|
|
108
|
+
id: string;
|
|
109
|
+
} & Record<string, unknown>): Promise<{
|
|
110
|
+
id: string;
|
|
111
|
+
createdAt: Date;
|
|
112
|
+
updatedAt: Date;
|
|
113
|
+
title: string;
|
|
114
|
+
status: boolean;
|
|
115
|
+
properties: Record<string, unknown> | null;
|
|
116
|
+
searchText: string;
|
|
117
|
+
contentType: string;
|
|
118
|
+
}>;
|
|
119
|
+
searchRagContent(args: {
|
|
120
|
+
query: string;
|
|
121
|
+
mode?: 'embedding' | 'lexical';
|
|
122
|
+
limit: number;
|
|
123
|
+
contentTypeId?: string;
|
|
124
|
+
includeInactive?: boolean;
|
|
125
|
+
}): Promise<{
|
|
126
|
+
items: import("../..").RagHit[];
|
|
127
|
+
}>;
|
|
128
|
+
}
|
|
@@ -0,0 +1,242 @@
|
|
|
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.HexabotCmsMcpTools = void 0;
|
|
13
|
+
const types_1 = require("@hexabot-ai/types");
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const mcp_nest_1 = require("@rekog/mcp-nest");
|
|
16
|
+
const zod_1 = require("zod");
|
|
17
|
+
const content_type_service_1 = require("../../cms/services/content-type.service");
|
|
18
|
+
const content_service_1 = require("../../cms/services/content.service");
|
|
19
|
+
const mcp_permission_decorator_1 = require("../decorators/mcp-permission.decorator");
|
|
20
|
+
const mcp_permission_guard_1 = require("../guards/mcp-permission.guard");
|
|
21
|
+
const hexabot_mcp_tool_base_1 = require("./hexabot-mcp-tool.base");
|
|
22
|
+
const hexabot_mcp_schemas_1 = require("./hexabot-mcp.schemas");
|
|
23
|
+
let HexabotCmsMcpTools = class HexabotCmsMcpTools extends hexabot_mcp_tool_base_1.HexabotMcpToolBase {
|
|
24
|
+
constructor(contentTypeService, contentService) {
|
|
25
|
+
super();
|
|
26
|
+
this.contentTypeService = contentTypeService;
|
|
27
|
+
this.contentService = contentService;
|
|
28
|
+
}
|
|
29
|
+
async searchContentTypes(args) {
|
|
30
|
+
const where = args.query ? { name: this.contains(args.query) } : {};
|
|
31
|
+
return await this.listWithCount(this.contentTypeService, this.findOptions(args, where));
|
|
32
|
+
}
|
|
33
|
+
async getContentType(args) {
|
|
34
|
+
const contentType = await this.contentTypeService.findOne(args.id);
|
|
35
|
+
if (!contentType) {
|
|
36
|
+
throw new common_1.NotFoundException(`Content type ${args.id} not found`);
|
|
37
|
+
}
|
|
38
|
+
return contentType;
|
|
39
|
+
}
|
|
40
|
+
async createContentType(args) {
|
|
41
|
+
return await this.contentTypeService.create(args);
|
|
42
|
+
}
|
|
43
|
+
async updateContentType(args) {
|
|
44
|
+
const { id, ...updates } = args;
|
|
45
|
+
return await this.contentTypeService.updateOne(id, updates);
|
|
46
|
+
}
|
|
47
|
+
async searchContent(args) {
|
|
48
|
+
if (args.query) {
|
|
49
|
+
return {
|
|
50
|
+
items: await this.contentService.textSearch(args.query, {
|
|
51
|
+
status: args.status,
|
|
52
|
+
contentTypeId: args.contentTypeId,
|
|
53
|
+
limit: args.limit,
|
|
54
|
+
}),
|
|
55
|
+
limit: args.limit,
|
|
56
|
+
skip: 0,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
const where = {
|
|
60
|
+
...(args.contentTypeId
|
|
61
|
+
? { contentType: { id: args.contentTypeId } }
|
|
62
|
+
: {}),
|
|
63
|
+
...(args.status !== undefined ? { status: args.status } : {}),
|
|
64
|
+
};
|
|
65
|
+
return await this.listWithCount(this.contentService, this.findOptions(args, where));
|
|
66
|
+
}
|
|
67
|
+
async getContent(args) {
|
|
68
|
+
const content = await this.contentService.findOneAndPopulate(args.id);
|
|
69
|
+
if (!content) {
|
|
70
|
+
throw new common_1.NotFoundException(`Content ${args.id} not found`);
|
|
71
|
+
}
|
|
72
|
+
return content;
|
|
73
|
+
}
|
|
74
|
+
async createContent(args) {
|
|
75
|
+
return await this.contentService.create(args);
|
|
76
|
+
}
|
|
77
|
+
async updateContent(args) {
|
|
78
|
+
const { id, ...updates } = args;
|
|
79
|
+
return await this.contentService.updateOne(id, updates);
|
|
80
|
+
}
|
|
81
|
+
async searchRagContent(args) {
|
|
82
|
+
return {
|
|
83
|
+
items: await this.contentService.retrieve(args.query, {
|
|
84
|
+
mode: args.mode,
|
|
85
|
+
limit: args.limit,
|
|
86
|
+
contentTypeId: args.contentTypeId,
|
|
87
|
+
includeInactive: args.includeInactive,
|
|
88
|
+
}),
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
exports.HexabotCmsMcpTools = HexabotCmsMcpTools;
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, mcp_permission_decorator_1.McpPermission)('contenttype', types_1.Action.READ),
|
|
95
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
96
|
+
(0, mcp_nest_1.Tool)({
|
|
97
|
+
name: 'hexabot_content_type_search',
|
|
98
|
+
description: 'Search CMS content types.',
|
|
99
|
+
parameters: zod_1.z.object({
|
|
100
|
+
query: zod_1.z.string().optional(),
|
|
101
|
+
...hexabot_mcp_schemas_1.paginationSchema,
|
|
102
|
+
}),
|
|
103
|
+
}),
|
|
104
|
+
__metadata("design:type", Function),
|
|
105
|
+
__metadata("design:paramtypes", [Object]),
|
|
106
|
+
__metadata("design:returntype", Promise)
|
|
107
|
+
], HexabotCmsMcpTools.prototype, "searchContentTypes", null);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, mcp_permission_decorator_1.McpPermission)('contenttype', types_1.Action.READ),
|
|
110
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
111
|
+
(0, mcp_nest_1.Tool)({
|
|
112
|
+
name: 'hexabot_content_type_get',
|
|
113
|
+
description: 'Read one CMS content type.',
|
|
114
|
+
parameters: zod_1.z.object({
|
|
115
|
+
id: hexabot_mcp_schemas_1.uuidSchema,
|
|
116
|
+
}),
|
|
117
|
+
}),
|
|
118
|
+
__metadata("design:type", Function),
|
|
119
|
+
__metadata("design:paramtypes", [Object]),
|
|
120
|
+
__metadata("design:returntype", Promise)
|
|
121
|
+
], HexabotCmsMcpTools.prototype, "getContentType", null);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, mcp_permission_decorator_1.McpPermission)('contenttype', types_1.Action.CREATE),
|
|
124
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
125
|
+
(0, mcp_nest_1.Tool)({
|
|
126
|
+
name: 'hexabot_content_type_create',
|
|
127
|
+
description: 'Create a CMS content type.',
|
|
128
|
+
parameters: zod_1.z.object({
|
|
129
|
+
name: zod_1.z.string().min(1),
|
|
130
|
+
schema: hexabot_mcp_schemas_1.jsonObjectSchema,
|
|
131
|
+
}),
|
|
132
|
+
}),
|
|
133
|
+
__metadata("design:type", Function),
|
|
134
|
+
__metadata("design:paramtypes", [Object]),
|
|
135
|
+
__metadata("design:returntype", Promise)
|
|
136
|
+
], HexabotCmsMcpTools.prototype, "createContentType", null);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, mcp_permission_decorator_1.McpPermission)('contenttype', types_1.Action.UPDATE),
|
|
139
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
140
|
+
(0, mcp_nest_1.Tool)({
|
|
141
|
+
name: 'hexabot_content_type_update',
|
|
142
|
+
description: 'Update a CMS content type.',
|
|
143
|
+
parameters: zod_1.z.object({
|
|
144
|
+
id: hexabot_mcp_schemas_1.uuidSchema,
|
|
145
|
+
name: zod_1.z.string().min(1).optional(),
|
|
146
|
+
schema: hexabot_mcp_schemas_1.jsonObjectSchema.optional(),
|
|
147
|
+
}),
|
|
148
|
+
}),
|
|
149
|
+
__metadata("design:type", Function),
|
|
150
|
+
__metadata("design:paramtypes", [Object]),
|
|
151
|
+
__metadata("design:returntype", Promise)
|
|
152
|
+
], HexabotCmsMcpTools.prototype, "updateContentType", null);
|
|
153
|
+
__decorate([
|
|
154
|
+
(0, mcp_permission_decorator_1.McpPermission)('content', types_1.Action.READ),
|
|
155
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
156
|
+
(0, mcp_nest_1.Tool)({
|
|
157
|
+
name: 'hexabot_content_search',
|
|
158
|
+
description: 'Search CMS content records.',
|
|
159
|
+
parameters: zod_1.z.object({
|
|
160
|
+
query: zod_1.z.string().optional(),
|
|
161
|
+
contentTypeId: hexabot_mcp_schemas_1.uuidSchema.optional(),
|
|
162
|
+
status: zod_1.z.boolean().optional(),
|
|
163
|
+
...hexabot_mcp_schemas_1.paginationSchema,
|
|
164
|
+
}),
|
|
165
|
+
}),
|
|
166
|
+
__metadata("design:type", Function),
|
|
167
|
+
__metadata("design:paramtypes", [Object]),
|
|
168
|
+
__metadata("design:returntype", Promise)
|
|
169
|
+
], HexabotCmsMcpTools.prototype, "searchContent", null);
|
|
170
|
+
__decorate([
|
|
171
|
+
(0, mcp_permission_decorator_1.McpPermission)('content', types_1.Action.READ),
|
|
172
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
173
|
+
(0, mcp_nest_1.Tool)({
|
|
174
|
+
name: 'hexabot_content_get',
|
|
175
|
+
description: 'Read one CMS content record.',
|
|
176
|
+
parameters: zod_1.z.object({
|
|
177
|
+
id: hexabot_mcp_schemas_1.uuidSchema,
|
|
178
|
+
}),
|
|
179
|
+
}),
|
|
180
|
+
__metadata("design:type", Function),
|
|
181
|
+
__metadata("design:paramtypes", [Object]),
|
|
182
|
+
__metadata("design:returntype", Promise)
|
|
183
|
+
], HexabotCmsMcpTools.prototype, "getContent", null);
|
|
184
|
+
__decorate([
|
|
185
|
+
(0, mcp_permission_decorator_1.McpPermission)('content', types_1.Action.CREATE),
|
|
186
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
187
|
+
(0, mcp_nest_1.Tool)({
|
|
188
|
+
name: 'hexabot_content_create',
|
|
189
|
+
description: 'Create a CMS content record.',
|
|
190
|
+
parameters: zod_1.z.object({
|
|
191
|
+
contentType: hexabot_mcp_schemas_1.uuidSchema,
|
|
192
|
+
title: zod_1.z.string().min(1),
|
|
193
|
+
status: zod_1.z.boolean().optional(),
|
|
194
|
+
properties: hexabot_mcp_schemas_1.jsonObjectSchema.optional(),
|
|
195
|
+
}),
|
|
196
|
+
}),
|
|
197
|
+
__metadata("design:type", Function),
|
|
198
|
+
__metadata("design:paramtypes", [Object]),
|
|
199
|
+
__metadata("design:returntype", Promise)
|
|
200
|
+
], HexabotCmsMcpTools.prototype, "createContent", null);
|
|
201
|
+
__decorate([
|
|
202
|
+
(0, mcp_permission_decorator_1.McpPermission)('content', types_1.Action.UPDATE),
|
|
203
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
204
|
+
(0, mcp_nest_1.Tool)({
|
|
205
|
+
name: 'hexabot_content_update',
|
|
206
|
+
description: 'Update a CMS content record.',
|
|
207
|
+
parameters: zod_1.z.object({
|
|
208
|
+
id: hexabot_mcp_schemas_1.uuidSchema,
|
|
209
|
+
contentType: hexabot_mcp_schemas_1.uuidSchema.optional(),
|
|
210
|
+
title: zod_1.z.string().min(1).optional(),
|
|
211
|
+
status: zod_1.z.boolean().optional(),
|
|
212
|
+
properties: hexabot_mcp_schemas_1.jsonObjectSchema.optional(),
|
|
213
|
+
}),
|
|
214
|
+
}),
|
|
215
|
+
__metadata("design:type", Function),
|
|
216
|
+
__metadata("design:paramtypes", [Object]),
|
|
217
|
+
__metadata("design:returntype", Promise)
|
|
218
|
+
], HexabotCmsMcpTools.prototype, "updateContent", null);
|
|
219
|
+
__decorate([
|
|
220
|
+
(0, mcp_permission_decorator_1.McpPermission)('content', types_1.Action.READ),
|
|
221
|
+
(0, mcp_nest_1.ToolGuards)([mcp_permission_guard_1.McpPermissionGuard]),
|
|
222
|
+
(0, mcp_nest_1.Tool)({
|
|
223
|
+
name: 'hexabot_rag_content_search',
|
|
224
|
+
description: 'Search indexed CMS content through Hexabot RAG retrieval.',
|
|
225
|
+
parameters: zod_1.z.object({
|
|
226
|
+
query: zod_1.z.string().min(1),
|
|
227
|
+
mode: zod_1.z.enum(['embedding', 'lexical']).optional(),
|
|
228
|
+
limit: zod_1.z.number().int().min(1).max(50).default(10),
|
|
229
|
+
contentTypeId: hexabot_mcp_schemas_1.uuidSchema.optional(),
|
|
230
|
+
includeInactive: zod_1.z.boolean().optional(),
|
|
231
|
+
}),
|
|
232
|
+
}),
|
|
233
|
+
__metadata("design:type", Function),
|
|
234
|
+
__metadata("design:paramtypes", [Object]),
|
|
235
|
+
__metadata("design:returntype", Promise)
|
|
236
|
+
], HexabotCmsMcpTools.prototype, "searchRagContent", null);
|
|
237
|
+
exports.HexabotCmsMcpTools = HexabotCmsMcpTools = __decorate([
|
|
238
|
+
(0, common_1.Injectable)(),
|
|
239
|
+
__metadata("design:paramtypes", [content_type_service_1.ContentTypeService,
|
|
240
|
+
content_service_1.ContentService])
|
|
241
|
+
], HexabotCmsMcpTools);
|
|
242
|
+
//# sourceMappingURL=cms-mcp.tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cms-mcp.tools.js","sourceRoot":"","sources":["../../../src/mcp/tools/cms-mcp.tools.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,6CAA2C;AAC3C,2CAA+D;AAC/D,8CAAmD;AACnD,6BAAwB;AAIxB,kFAAyE;AACzE,wEAAgE;AAEhE,qFAAuE;AACvE,yEAAoE;AAEpE,mEAA6D;AAC7D,+DAK+B;AAGxB,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,0CAAkB;IACxD,YACmB,kBAAsC,EACtC,cAA8B;QAE/C,KAAK,EAAE,CAAC;QAHS,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,mBAAc,GAAd,cAAc,CAAgB;IAGjD,CAAC;IAYK,AAAN,KAAK,CAAC,kBAAkB,CAAC,IAAyC;QAChE,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAEpE,OAAO,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AC,CAAC;YACxB,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;YACjD,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;YAClD,aAAa,EAAE,gCAAU,CAAC,QAAQ,EAAE;YACpC,eAAe,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;SACxC,CAAC;KACH,CAAC;;;;0DAgBD;6BAjNU,kBAAkB;IAD9B,IAAA,mBAAU,GAAE;qCAG4B,yCAAkB;QACtB,gCAAc;GAHtC,kBAAkB,CAkN9B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CredentialService } from "../../user/services/credential.service";
|
|
2
|
+
import { HexabotMcpToolBase } from './hexabot-mcp-tool.base';
|
|
3
|
+
import { PaginationArgs } from './hexabot-mcp.schemas';
|
|
4
|
+
export declare class HexabotCredentialMcpTools extends HexabotMcpToolBase {
|
|
5
|
+
private readonly credentialService;
|
|
6
|
+
constructor(credentialService: CredentialService);
|
|
7
|
+
searchCredentials(args: {
|
|
8
|
+
query?: string;
|
|
9
|
+
ownerId?: string;
|
|
10
|
+
} & PaginationArgs): Promise<{
|
|
11
|
+
items: Record<string, unknown>[];
|
|
12
|
+
total: number;
|
|
13
|
+
limit: number | undefined;
|
|
14
|
+
skip: number | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
getCredential(args: {
|
|
17
|
+
id: string;
|
|
18
|
+
}): Promise<Record<string, unknown>>;
|
|
19
|
+
}
|