@invect/mcp 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/backend/audit.d.ts +29 -0
- package/dist/backend/audit.d.ts.map +1 -0
- package/dist/backend/auth.d.ts +32 -0
- package/dist/backend/auth.d.ts.map +1 -0
- package/dist/backend/client/direct-client.d.ts +223 -0
- package/dist/backend/client/direct-client.d.ts.map +1 -0
- package/dist/backend/client/http-client.d.ts +74 -0
- package/dist/backend/client/http-client.d.ts.map +1 -0
- package/dist/backend/client/types.d.ts +83 -0
- package/dist/backend/client/types.d.ts.map +1 -0
- package/dist/backend/index.cjs +357 -0
- package/dist/backend/index.cjs.map +1 -0
- package/dist/backend/index.d.cts +29 -0
- package/dist/backend/index.d.cts.map +1 -0
- package/dist/backend/index.d.mts +29 -0
- package/dist/backend/index.d.mts.map +1 -0
- package/dist/backend/index.d.ts +32 -0
- package/dist/backend/index.d.ts.map +1 -0
- package/dist/backend/index.mjs +356 -0
- package/dist/backend/index.mjs.map +1 -0
- package/dist/backend/mcp-server.d.ts +8 -0
- package/dist/backend/mcp-server.d.ts.map +1 -0
- package/dist/backend/prompts/index.d.ts +7 -0
- package/dist/backend/prompts/index.d.ts.map +1 -0
- package/dist/backend/resources/index.d.ts +7 -0
- package/dist/backend/resources/index.d.ts.map +1 -0
- package/dist/backend/response-mappers.d.ts +26 -0
- package/dist/backend/response-mappers.d.ts.map +1 -0
- package/dist/backend/session-manager.d.ts +30 -0
- package/dist/backend/session-manager.d.ts.map +1 -0
- package/dist/backend/tools/credential-tools.d.ts +8 -0
- package/dist/backend/tools/credential-tools.d.ts.map +1 -0
- package/dist/backend/tools/debug-tools.d.ts +7 -0
- package/dist/backend/tools/debug-tools.d.ts.map +1 -0
- package/dist/backend/tools/flow-tools.d.ts +7 -0
- package/dist/backend/tools/flow-tools.d.ts.map +1 -0
- package/dist/backend/tools/node-tools.d.ts +7 -0
- package/dist/backend/tools/node-tools.d.ts.map +1 -0
- package/dist/backend/tools/run-tools.d.ts +7 -0
- package/dist/backend/tools/run-tools.d.ts.map +1 -0
- package/dist/backend/tools/trigger-tools.d.ts +7 -0
- package/dist/backend/tools/trigger-tools.d.ts.map +1 -0
- package/dist/backend/tools/version-tools.d.ts +7 -0
- package/dist/backend/tools/version-tools.d.ts.map +1 -0
- package/dist/cli/index.cjs +213 -0
- package/dist/cli/index.cjs.map +1 -0
- package/dist/cli/index.d.cts +151 -0
- package/dist/cli/index.d.cts.map +1 -0
- package/dist/cli/index.d.mts +151 -0
- package/dist/cli/index.d.mts.map +1 -0
- package/dist/cli/index.d.ts +17 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.mjs +211 -0
- package/dist/cli/index.mjs.map +1 -0
- package/dist/mcp-server-Brb4wc6I.mjs +671 -0
- package/dist/mcp-server-Brb4wc6I.mjs.map +1 -0
- package/dist/mcp-server-DzO5MpFJ.cjs +676 -0
- package/dist/mcp-server-DzO5MpFJ.cjs.map +1 -0
- package/dist/shared/types.cjs +39 -0
- package/dist/shared/types.cjs.map +1 -0
- package/dist/shared/types.d.cts +64 -0
- package/dist/shared/types.d.cts.map +1 -0
- package/dist/shared/types.d.mts +64 -0
- package/dist/shared/types.d.mts.map +1 -0
- package/dist/shared/types.d.ts +64 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.mjs +38 -0
- package/dist/shared/types.mjs.map +1 -0
- package/package.json +76 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 @robase
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audit logger for MCP tool invocations.
|
|
3
|
+
*/
|
|
4
|
+
import type { AuditEntry, McpPluginOptions } from '../shared/types';
|
|
5
|
+
type Logger = {
|
|
6
|
+
debug(message: string, ...args: unknown[]): void;
|
|
7
|
+
info(message: string, ...args: unknown[]): void;
|
|
8
|
+
warn(message: string, ...args: unknown[]): void;
|
|
9
|
+
};
|
|
10
|
+
export declare class AuditLogger {
|
|
11
|
+
private readonly logger;
|
|
12
|
+
private enabled;
|
|
13
|
+
private logLevel;
|
|
14
|
+
constructor(logger: Logger, options?: McpPluginOptions['audit']);
|
|
15
|
+
log(entry: AuditEntry): void;
|
|
16
|
+
/** Create an audit entry helper that tracks timing */
|
|
17
|
+
startTimer(tool: string, options?: {
|
|
18
|
+
sessionId?: string;
|
|
19
|
+
userId?: string;
|
|
20
|
+
userRole?: string;
|
|
21
|
+
}): {
|
|
22
|
+
finish: (result: {
|
|
23
|
+
status: 'success' | 'error';
|
|
24
|
+
error?: string;
|
|
25
|
+
}) => void;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/backend/audit.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEpE,KAAK,MAAM,GAAG;IACZ,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IACjD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;IAChD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;CACjD,CAAC;AAEF,qBAAa,WAAW;IAKpB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAJzB,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,QAAQ,CAA4B;gBAGzB,MAAM,EAAE,MAAM,EAC/B,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC;IAMrC,GAAG,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IA4B5B,sDAAsD;IACtD,UAAU,CACR,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GACnE;QAAE,MAAM,EAAE,CAAC,MAAM,EAAE;YAAE,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAA;SAAE,KAAK,IAAI,CAAA;KAAE;CAiBjF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth helpers for the MCP plugin.
|
|
3
|
+
*
|
|
4
|
+
* Handles identity extraction from MCP request context and RBAC enforcement.
|
|
5
|
+
*/
|
|
6
|
+
import type { InvectIdentity, InvectInstance } from '@invect/core';
|
|
7
|
+
/**
|
|
8
|
+
* Maps the MCP SDK's `authInfo` (from `ctx.http.authInfo`) to an InvectIdentity.
|
|
9
|
+
* The authInfo is populated by the framework adapter's middleware which resolves
|
|
10
|
+
* the session/API key before routing to the MCP plugin endpoint.
|
|
11
|
+
*/
|
|
12
|
+
export declare function mapAuthInfoToIdentity(authInfo: unknown): InvectIdentity | null;
|
|
13
|
+
/**
|
|
14
|
+
* Requires that the identity is present. Throws McpError if not.
|
|
15
|
+
*/
|
|
16
|
+
export declare function requireAuth(identity: InvectIdentity | null): InvectIdentity;
|
|
17
|
+
/**
|
|
18
|
+
* Extracts identity if available, returns null otherwise.
|
|
19
|
+
* Used by tool handlers — the underlying client (HttpClient/DirectClient)
|
|
20
|
+
* handles auth at its own layer, so a null identity is acceptable for
|
|
21
|
+
* transports like stdio where auth is pre-established.
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveIdentity(authInfo: unknown): InvectIdentity | null;
|
|
24
|
+
/**
|
|
25
|
+
* Authorize a specific action on a resource.
|
|
26
|
+
* Returns true if authorized, throws if denied.
|
|
27
|
+
*/
|
|
28
|
+
export declare function authorizeAction(invect: InvectInstance, identity: InvectIdentity, action: string, resource?: {
|
|
29
|
+
type: string;
|
|
30
|
+
id?: string;
|
|
31
|
+
}): Promise<void>;
|
|
32
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/backend/auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnE;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,OAAO,GAAG,cAAc,GAAG,IAAI,CAY9E;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,GAAG,cAAc,CAK3E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,OAAO,GAAG,cAAc,GAAG,IAAI,CAExE;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,GACvC,OAAO,CAAC,IAAI,CAAC,CAcf"}
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DirectClient — wraps InvectInstance for plugin mode (zero HTTP overhead).
|
|
3
|
+
*/
|
|
4
|
+
import type { InvectInstance, InvectIdentity } from '@invect/core';
|
|
5
|
+
import type { InvectClient, CredentialSummary } from './types';
|
|
6
|
+
export declare class DirectClient implements InvectClient {
|
|
7
|
+
private readonly invect;
|
|
8
|
+
constructor(invect: InvectInstance);
|
|
9
|
+
listFlows(_identity: InvectIdentity | null): Promise<import("@invect/core").PaginatedResponse<import("@invect/core").Flow>>;
|
|
10
|
+
getFlow(_identity: InvectIdentity | null, flowId: string): Promise<import("@invect/core").Flow>;
|
|
11
|
+
getFlowDefinition(_identity: InvectIdentity | null, flowId: string): Promise<{
|
|
12
|
+
flowId: string;
|
|
13
|
+
version: number;
|
|
14
|
+
invectDefinition: {
|
|
15
|
+
nodes: {
|
|
16
|
+
id: string;
|
|
17
|
+
type: string;
|
|
18
|
+
params: Record<string, unknown>;
|
|
19
|
+
position?: {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
} | undefined;
|
|
23
|
+
label?: string | undefined;
|
|
24
|
+
referenceId?: string | undefined;
|
|
25
|
+
_loop?: unknown;
|
|
26
|
+
mapper?: {
|
|
27
|
+
enabled: boolean;
|
|
28
|
+
expression: string;
|
|
29
|
+
mode: "auto" | "iterate" | "reshape";
|
|
30
|
+
outputMode: "object" | "array" | "concat" | "first" | "last";
|
|
31
|
+
concurrency: number;
|
|
32
|
+
onEmpty: "error" | "skip";
|
|
33
|
+
keyField?: string | undefined;
|
|
34
|
+
} | undefined;
|
|
35
|
+
}[];
|
|
36
|
+
edges: {
|
|
37
|
+
id: string;
|
|
38
|
+
source: string;
|
|
39
|
+
target: string;
|
|
40
|
+
sourceHandle?: string | undefined;
|
|
41
|
+
targetHandle?: string | undefined;
|
|
42
|
+
metadata?: Record<string, unknown> | undefined;
|
|
43
|
+
}[];
|
|
44
|
+
metadata?: Record<string, unknown> | undefined;
|
|
45
|
+
};
|
|
46
|
+
createdAt: string;
|
|
47
|
+
createdBy: string | null;
|
|
48
|
+
} | null>;
|
|
49
|
+
createFlow(_identity: InvectIdentity | null, data: {
|
|
50
|
+
name: string;
|
|
51
|
+
description?: string;
|
|
52
|
+
}): Promise<import("@invect/core").Flow>;
|
|
53
|
+
updateFlow(_identity: InvectIdentity | null, flowId: string, data: {
|
|
54
|
+
name?: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
}): Promise<import("@invect/core").Flow>;
|
|
57
|
+
deleteFlow(_identity: InvectIdentity | null, flowId: string): Promise<void>;
|
|
58
|
+
validateFlow(_identity: InvectIdentity | null, flowId: string, definition: unknown): Promise<{
|
|
59
|
+
valid: boolean;
|
|
60
|
+
errors: string[] | undefined;
|
|
61
|
+
}>;
|
|
62
|
+
listVersions(_identity: InvectIdentity | null, flowId: string): Promise<import("@invect/core").PaginatedResponse<{
|
|
63
|
+
flowId: string;
|
|
64
|
+
version: number;
|
|
65
|
+
invectDefinition: {
|
|
66
|
+
nodes: {
|
|
67
|
+
id: string;
|
|
68
|
+
type: string;
|
|
69
|
+
params: Record<string, unknown>;
|
|
70
|
+
position?: {
|
|
71
|
+
x: number;
|
|
72
|
+
y: number;
|
|
73
|
+
} | undefined;
|
|
74
|
+
label?: string | undefined;
|
|
75
|
+
referenceId?: string | undefined;
|
|
76
|
+
_loop?: unknown;
|
|
77
|
+
mapper?: {
|
|
78
|
+
enabled: boolean;
|
|
79
|
+
expression: string;
|
|
80
|
+
mode: "auto" | "iterate" | "reshape";
|
|
81
|
+
outputMode: "object" | "array" | "concat" | "first" | "last";
|
|
82
|
+
concurrency: number;
|
|
83
|
+
onEmpty: "error" | "skip";
|
|
84
|
+
keyField?: string | undefined;
|
|
85
|
+
} | undefined;
|
|
86
|
+
}[];
|
|
87
|
+
edges: {
|
|
88
|
+
id: string;
|
|
89
|
+
source: string;
|
|
90
|
+
target: string;
|
|
91
|
+
sourceHandle?: string | undefined;
|
|
92
|
+
targetHandle?: string | undefined;
|
|
93
|
+
metadata?: Record<string, unknown> | undefined;
|
|
94
|
+
}[];
|
|
95
|
+
metadata?: Record<string, unknown> | undefined;
|
|
96
|
+
};
|
|
97
|
+
createdAt: string;
|
|
98
|
+
createdBy: string | null;
|
|
99
|
+
}>>;
|
|
100
|
+
getVersion(_identity: InvectIdentity | null, flowId: string, version: string | number | 'latest'): Promise<{
|
|
101
|
+
flowId: string;
|
|
102
|
+
version: number;
|
|
103
|
+
invectDefinition: {
|
|
104
|
+
nodes: {
|
|
105
|
+
id: string;
|
|
106
|
+
type: string;
|
|
107
|
+
params: Record<string, unknown>;
|
|
108
|
+
position?: {
|
|
109
|
+
x: number;
|
|
110
|
+
y: number;
|
|
111
|
+
} | undefined;
|
|
112
|
+
label?: string | undefined;
|
|
113
|
+
referenceId?: string | undefined;
|
|
114
|
+
_loop?: unknown;
|
|
115
|
+
mapper?: {
|
|
116
|
+
enabled: boolean;
|
|
117
|
+
expression: string;
|
|
118
|
+
mode: "auto" | "iterate" | "reshape";
|
|
119
|
+
outputMode: "object" | "array" | "concat" | "first" | "last";
|
|
120
|
+
concurrency: number;
|
|
121
|
+
onEmpty: "error" | "skip";
|
|
122
|
+
keyField?: string | undefined;
|
|
123
|
+
} | undefined;
|
|
124
|
+
}[];
|
|
125
|
+
edges: {
|
|
126
|
+
id: string;
|
|
127
|
+
source: string;
|
|
128
|
+
target: string;
|
|
129
|
+
sourceHandle?: string | undefined;
|
|
130
|
+
targetHandle?: string | undefined;
|
|
131
|
+
metadata?: Record<string, unknown> | undefined;
|
|
132
|
+
}[];
|
|
133
|
+
metadata?: Record<string, unknown> | undefined;
|
|
134
|
+
};
|
|
135
|
+
createdAt: string;
|
|
136
|
+
createdBy: string | null;
|
|
137
|
+
} | null>;
|
|
138
|
+
publishVersion(_identity: InvectIdentity | null, flowId: string, data: unknown): Promise<{
|
|
139
|
+
flowId: string;
|
|
140
|
+
version: number;
|
|
141
|
+
invectDefinition: {
|
|
142
|
+
nodes: {
|
|
143
|
+
id: string;
|
|
144
|
+
type: string;
|
|
145
|
+
params: Record<string, unknown>;
|
|
146
|
+
position?: {
|
|
147
|
+
x: number;
|
|
148
|
+
y: number;
|
|
149
|
+
} | undefined;
|
|
150
|
+
label?: string | undefined;
|
|
151
|
+
referenceId?: string | undefined;
|
|
152
|
+
_loop?: unknown;
|
|
153
|
+
mapper?: {
|
|
154
|
+
enabled: boolean;
|
|
155
|
+
expression: string;
|
|
156
|
+
mode: "auto" | "iterate" | "reshape";
|
|
157
|
+
outputMode: "object" | "array" | "concat" | "first" | "last";
|
|
158
|
+
concurrency: number;
|
|
159
|
+
onEmpty: "error" | "skip";
|
|
160
|
+
keyField?: string | undefined;
|
|
161
|
+
} | undefined;
|
|
162
|
+
}[];
|
|
163
|
+
edges: {
|
|
164
|
+
id: string;
|
|
165
|
+
source: string;
|
|
166
|
+
target: string;
|
|
167
|
+
sourceHandle?: string | undefined;
|
|
168
|
+
targetHandle?: string | undefined;
|
|
169
|
+
metadata?: Record<string, unknown> | undefined;
|
|
170
|
+
}[];
|
|
171
|
+
metadata?: Record<string, unknown> | undefined;
|
|
172
|
+
};
|
|
173
|
+
createdAt: string;
|
|
174
|
+
createdBy: string | null;
|
|
175
|
+
}>;
|
|
176
|
+
startRun(_identity: InvectIdentity | null, flowId: string, inputs?: Record<string, unknown>): Promise<import("@invect/core").FlowRunResult>;
|
|
177
|
+
runToNode(_identity: InvectIdentity | null, flowId: string, nodeId: string, inputs?: Record<string, unknown>): Promise<import("@invect/core").FlowRunResult>;
|
|
178
|
+
listRuns(_identity: InvectIdentity | null, flowId: string): Promise<import("@invect/core").PaginatedResponse<import("@invect/core").FlowRun>>;
|
|
179
|
+
getRun(_identity: InvectIdentity | null, flowRunId: string): Promise<import("@invect/core").FlowRun>;
|
|
180
|
+
cancelRun(_identity: InvectIdentity | null, flowRunId: string): Promise<{
|
|
181
|
+
message: string;
|
|
182
|
+
timestamp: string;
|
|
183
|
+
}>;
|
|
184
|
+
pauseRun(_identity: InvectIdentity | null, flowRunId: string): Promise<{
|
|
185
|
+
message: string;
|
|
186
|
+
timestamp: string;
|
|
187
|
+
}>;
|
|
188
|
+
resumeRun(_identity: InvectIdentity | null, flowRunId: string): Promise<{
|
|
189
|
+
message: string;
|
|
190
|
+
timestamp: string;
|
|
191
|
+
}>;
|
|
192
|
+
getNodeExecutions(_identity: InvectIdentity | null, flowRunId: string): Promise<import("@invect/core").NodeExecution[]>;
|
|
193
|
+
testNode(_identity: InvectIdentity | null, nodeType: string, params: Record<string, unknown>, inputData?: Record<string, unknown>): Promise<{
|
|
194
|
+
success: boolean;
|
|
195
|
+
output?: Record<string, unknown>;
|
|
196
|
+
error?: string;
|
|
197
|
+
}>;
|
|
198
|
+
testJsExpression(_identity: InvectIdentity | null, expression: string, context: Record<string, unknown>): Promise<{
|
|
199
|
+
success: boolean;
|
|
200
|
+
result?: unknown;
|
|
201
|
+
error?: string;
|
|
202
|
+
}>;
|
|
203
|
+
testMapper(_identity: InvectIdentity | null, expression: string, incomingData: Record<string, unknown>): Promise<{
|
|
204
|
+
success: boolean;
|
|
205
|
+
result?: unknown;
|
|
206
|
+
resultType?: "array" | "object" | "primitive";
|
|
207
|
+
itemCount?: number;
|
|
208
|
+
error?: string;
|
|
209
|
+
}>;
|
|
210
|
+
listCredentials(_identity: InvectIdentity | null): Promise<CredentialSummary[]>;
|
|
211
|
+
testCredential(_identity: InvectIdentity | null, credentialId: string): Promise<{
|
|
212
|
+
success: boolean;
|
|
213
|
+
error?: string;
|
|
214
|
+
}>;
|
|
215
|
+
listTriggers(_identity: InvectIdentity | null, flowId: string): Promise<import("@invect/core").FlowTriggerRegistration[]>;
|
|
216
|
+
getTrigger(_identity: InvectIdentity | null, triggerId: string): Promise<import("@invect/core").FlowTriggerRegistration | null>;
|
|
217
|
+
createTrigger(_identity: InvectIdentity | null, input: unknown): Promise<import("@invect/core").FlowTriggerRegistration>;
|
|
218
|
+
updateTrigger(_identity: InvectIdentity | null, triggerId: string, input: unknown): Promise<import("@invect/core").FlowTriggerRegistration | null>;
|
|
219
|
+
deleteTrigger(_identity: InvectIdentity | null, triggerId: string): Promise<void>;
|
|
220
|
+
listProviders(_identity: InvectIdentity | null): Promise<import("@invect/core").ProviderDef[]>;
|
|
221
|
+
listAvailableNodes(_identity: InvectIdentity | null): Promise<import("@invect/core").NodeDefinition[]>;
|
|
222
|
+
}
|
|
223
|
+
//# sourceMappingURL=direct-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"direct-client.d.ts","sourceRoot":"","sources":["../../../src/backend/client/direct-client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE/D,qBAAa,YAAa,YAAW,YAAY;IACnC,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,cAAc;IAI7C,SAAS,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI;IAI1C,OAAO,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI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EAAE,OAAO,CAAC;;;;;IAK/B,gBAAgB,CACpB,SAAS,EAAE,cAAc,GAAG,IAAI,EAChC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;IAK5B,UAAU,CACd,SAAS,EAAE,cAAc,GAAG,IAAI,EAChC,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;IAOjC,eAAe,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAY/E,cAAc,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,EAAE,YAAY,EAAE,MAAM;;;;IAMrE,YAAY,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM;IAI7D,UAAU,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM;IAI9D,aAAa,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,EAAE,KAAK,EAAE,OAAO;IAM9D,aAAa,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;IAOjF,aAAa,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM;IAMjE,aAAa,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI;IAI9C,kBAAkB,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI;CAG1D"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HttpClient — wraps Invect HTTP API for CLI/stdio mode.
|
|
3
|
+
*/
|
|
4
|
+
import type { InvectIdentity } from '@invect/core';
|
|
5
|
+
import type { InvectClient, CredentialSummary } from './types';
|
|
6
|
+
export declare class HttpClient implements InvectClient {
|
|
7
|
+
private baseUrl;
|
|
8
|
+
private apiKey;
|
|
9
|
+
constructor(baseUrl: string, apiKey: string);
|
|
10
|
+
private request;
|
|
11
|
+
/** Health check — throws if API is unreachable */
|
|
12
|
+
healthCheck(): Promise<void>;
|
|
13
|
+
listFlows(_identity: InvectIdentity | null): Promise<unknown>;
|
|
14
|
+
getFlow(_identity: InvectIdentity | null, flowId: string): Promise<unknown>;
|
|
15
|
+
getFlowDefinition(_identity: InvectIdentity | null, flowId: string): Promise<unknown>;
|
|
16
|
+
createFlow(_identity: InvectIdentity | null, data: {
|
|
17
|
+
name: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
}): Promise<unknown>;
|
|
20
|
+
updateFlow(_identity: InvectIdentity | null, flowId: string, data: {
|
|
21
|
+
name?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
}): Promise<unknown>;
|
|
24
|
+
deleteFlow(_identity: InvectIdentity | null, flowId: string): Promise<void>;
|
|
25
|
+
validateFlow(_identity: InvectIdentity | null, flowId: string, definition: unknown): Promise<{
|
|
26
|
+
valid: boolean;
|
|
27
|
+
errors?: string[];
|
|
28
|
+
}>;
|
|
29
|
+
listVersions(_identity: InvectIdentity | null, flowId: string): Promise<unknown>;
|
|
30
|
+
getVersion(_identity: InvectIdentity | null, flowId: string, version: string | number | 'latest'): Promise<unknown>;
|
|
31
|
+
publishVersion(_identity: InvectIdentity | null, flowId: string, data: unknown): Promise<unknown>;
|
|
32
|
+
startRun(_identity: InvectIdentity | null, flowId: string, inputs?: Record<string, unknown>): Promise<unknown>;
|
|
33
|
+
runToNode(_identity: InvectIdentity | null, flowId: string, nodeId: string, inputs?: Record<string, unknown>): Promise<unknown>;
|
|
34
|
+
listRuns(_identity: InvectIdentity | null, flowId: string): Promise<unknown>;
|
|
35
|
+
getRun(_identity: InvectIdentity | null, flowRunId: string): Promise<unknown>;
|
|
36
|
+
cancelRun(_identity: InvectIdentity | null, flowRunId: string): Promise<{
|
|
37
|
+
message: string;
|
|
38
|
+
}>;
|
|
39
|
+
pauseRun(_identity: InvectIdentity | null, flowRunId: string): Promise<{
|
|
40
|
+
message: string;
|
|
41
|
+
}>;
|
|
42
|
+
resumeRun(_identity: InvectIdentity | null, flowRunId: string): Promise<{
|
|
43
|
+
message: string;
|
|
44
|
+
}>;
|
|
45
|
+
getNodeExecutions(_identity: InvectIdentity | null, flowRunId: string): Promise<unknown[]>;
|
|
46
|
+
testNode(_identity: InvectIdentity | null, nodeType: string, params: Record<string, unknown>, inputData?: Record<string, unknown>): Promise<{
|
|
47
|
+
success: boolean;
|
|
48
|
+
output?: unknown;
|
|
49
|
+
error?: string;
|
|
50
|
+
}>;
|
|
51
|
+
testJsExpression(_identity: InvectIdentity | null, expression: string, context: Record<string, unknown>): Promise<{
|
|
52
|
+
success: boolean;
|
|
53
|
+
result?: unknown;
|
|
54
|
+
error?: string;
|
|
55
|
+
}>;
|
|
56
|
+
testMapper(_identity: InvectIdentity | null, expression: string, incomingData: Record<string, unknown>): Promise<{
|
|
57
|
+
success: boolean;
|
|
58
|
+
result?: unknown;
|
|
59
|
+
error?: string;
|
|
60
|
+
}>;
|
|
61
|
+
listCredentials(_identity: InvectIdentity | null): Promise<CredentialSummary[]>;
|
|
62
|
+
testCredential(_identity: InvectIdentity | null, credentialId: string): Promise<{
|
|
63
|
+
success: boolean;
|
|
64
|
+
error?: string;
|
|
65
|
+
}>;
|
|
66
|
+
listTriggers(_identity: InvectIdentity | null, flowId: string): Promise<unknown[]>;
|
|
67
|
+
getTrigger(_identity: InvectIdentity | null, triggerId: string): Promise<unknown>;
|
|
68
|
+
createTrigger(_identity: InvectIdentity | null, input: unknown): Promise<unknown>;
|
|
69
|
+
updateTrigger(_identity: InvectIdentity | null, triggerId: string, input: unknown): Promise<unknown>;
|
|
70
|
+
deleteTrigger(_identity: InvectIdentity | null, triggerId: string): Promise<void>;
|
|
71
|
+
listProviders(_identity: InvectIdentity | null): Promise<Record<string, unknown>[]>;
|
|
72
|
+
listAvailableNodes(_identity: InvectIdentity | null): Promise<unknown[]>;
|
|
73
|
+
}
|
|
74
|
+
//# sour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AAO;iBAAW,OAAO;gBAAU,MAAM;;IAO1E,gBAAgB,CACpB,SAAS,EAAE,cAAc,GAAG,IAAI,EAChC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;iBAEK,OAAO;iBAAW,OAAO;gBAAU,MAAM;;IAO1E,UAAU,CACd,SAAS,EAAE,cAAc,GAAG,IAAI,EAChC,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;iBAEA,OAAO;iBAAW,OAAO;gBAAU,MAAM;;IAS1E,eAAe,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAa/E,cAAc,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,EAAE,YAAY,EAAE,MAAM;iBACpC,OAAO;gBAAU,MAAM;;IAQxD,YAAY,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM;IAI7D,UAAU,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM;IAI9D,aAAa,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,EAAE,KAAK,EAAE,OAAO;IAM9D,aAAa,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;IAIjF,aAAa,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM;IAMjE,aAAa,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI;IAc9C,kBAAkB,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI;CAG1D"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InvectClient — abstraction over Invect API access.
|
|
3
|
+
*
|
|
4
|
+
* Both DirectClient (plugin mode) and HttpClient (CLI mode) implement this
|
|
5
|
+
* interface so tool handlers remain transport-agnostic.
|
|
6
|
+
*
|
|
7
|
+
* Return types are intentionally `unknown` for most operations since the
|
|
8
|
+
* MCP layer JSON-stringifies everything. This avoids mapping internal
|
|
9
|
+
* types to a duplicated schema.
|
|
10
|
+
*/
|
|
11
|
+
import type { InvectIdentity } from '@invect/core';
|
|
12
|
+
/** Sanitized credential (no secrets) */
|
|
13
|
+
export interface CredentialSummary {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
type: string;
|
|
17
|
+
provider?: string;
|
|
18
|
+
lastUsedAt?: string;
|
|
19
|
+
createdAt?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface InvectClient {
|
|
22
|
+
listFlows(identity: InvectIdentity | null): Promise<unknown>;
|
|
23
|
+
getFlow(identity: InvectIdentity | null, flowId: string): Promise<unknown>;
|
|
24
|
+
getFlowDefinition(identity: InvectIdentity | null, flowId: string): Promise<unknown>;
|
|
25
|
+
createFlow(identity: InvectIdentity | null, data: {
|
|
26
|
+
name: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
}): Promise<unknown>;
|
|
29
|
+
updateFlow(identity: InvectIdentity | null, flowId: string, data: {
|
|
30
|
+
name?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
}): Promise<unknown>;
|
|
33
|
+
deleteFlow(identity: InvectIdentity | null, flowId: string): Promise<void>;
|
|
34
|
+
validateFlow(identity: InvectIdentity | null, flowId: string, definition: unknown): Promise<{
|
|
35
|
+
valid: boolean;
|
|
36
|
+
errors?: string[];
|
|
37
|
+
}>;
|
|
38
|
+
listVersions(identity: InvectIdentity | null, flowId: string): Promise<unknown>;
|
|
39
|
+
getVersion(identity: InvectIdentity | null, flowId: string, version: string | number | 'latest'): Promise<unknown>;
|
|
40
|
+
publishVersion(identity: InvectIdentity | null, flowId: string, data: unknown): Promise<unknown>;
|
|
41
|
+
startRun(identity: InvectIdentity | null, flowId: string, inputs?: Record<string, unknown>): Promise<unknown>;
|
|
42
|
+
runToNode(identity: InvectIdentity | null, flowId: string, nodeId: string, inputs?: Record<string, unknown>): Promise<unknown>;
|
|
43
|
+
listRuns(identity: InvectIdentity | null, flowId: string): Promise<unknown>;
|
|
44
|
+
getRun(identity: InvectIdentity | null, flowRunId: string): Promise<unknown>;
|
|
45
|
+
cancelRun(identity: InvectIdentity | null, flowRunId: string): Promise<{
|
|
46
|
+
message: string;
|
|
47
|
+
}>;
|
|
48
|
+
pauseRun(identity: InvectIdentity | null, flowRunId: string): Promise<{
|
|
49
|
+
message: string;
|
|
50
|
+
}>;
|
|
51
|
+
resumeRun(identity: InvectIdentity | null, flowRunId: string): Promise<{
|
|
52
|
+
message: string;
|
|
53
|
+
}>;
|
|
54
|
+
getNodeExecutions(identity: InvectIdentity | null, flowRunId: string): Promise<unknown[]>;
|
|
55
|
+
testNode(identity: InvectIdentity | null, nodeType: string, params: Record<string, unknown>, inputData?: Record<string, unknown>): Promise<{
|
|
56
|
+
success: boolean;
|
|
57
|
+
output?: unknown;
|
|
58
|
+
error?: string;
|
|
59
|
+
}>;
|
|
60
|
+
testJsExpression(identity: InvectIdentity | null, expression: string, context: Record<string, unknown>): Promise<{
|
|
61
|
+
success: boolean;
|
|
62
|
+
result?: unknown;
|
|
63
|
+
error?: string;
|
|
64
|
+
}>;
|
|
65
|
+
testMapper(identity: InvectIdentity | null, expression: string, incomingData: Record<string, unknown>): Promise<{
|
|
66
|
+
success: boolean;
|
|
67
|
+
result?: unknown;
|
|
68
|
+
error?: string;
|
|
69
|
+
}>;
|
|
70
|
+
listCredentials(identity: InvectIdentity | null): Promise<CredentialSummary[]>;
|
|
71
|
+
testCredential(identity: InvectIdentity | null, credentialId: string): Promise<{
|
|
72
|
+
success: boolean;
|
|
73
|
+
error?: string;
|
|
74
|
+
}>;
|
|
75
|
+
listTriggers(identity: InvectIdentity | null, flowId: string): Promise<unknown[]>;
|
|
76
|
+
getTrigger(identity: InvectIdentity | null, triggerId: string): Promise<unknown>;
|
|
77
|
+
createTrigger(identity: InvectIdentity | null, input: unknown): Promise<unknown>;
|
|
78
|
+
updateTrigger(identity: InvectIdentity | null, triggerId: string, input: unknown): Promise<unknown>;
|
|
79
|
+
deleteTrigger(identity: InvectIdentity | null, triggerId: string): Promise<void>;
|
|
80
|
+
listProviders(identity: InvectIdentity | null): Promise<unknown[]>;
|
|
81
|
+
listAvailableNodes(identity: InvectIdentity | null): Promise<unknown[]>;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/backend/client/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,wCAAwC;AACxC,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAE3B,SAAS,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7D,OAAO,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC3E,iBAAiB,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACrF,UAAU,CACR,QAAQ,EAAE,cAAc,GAAG,IAAI,EAC/B,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,GAC3C,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB,UAAU,CACR,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