@activepieces/shared 0.10.170 → 0.10.171
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/package.json +1 -1
- package/src/lib/common/activepieces-error.d.ts +10 -4
- package/src/lib/common/activepieces-error.js +2 -1
- package/src/lib/common/activepieces-error.js.map +1 -1
- package/src/lib/mcp/dto/mcp.dto.d.ts +20 -0
- package/src/lib/mcp/dto/mcp.dto.js +23 -0
- package/src/lib/mcp/dto/mcp.dto.js.map +1 -0
- package/src/lib/mcp/index.d.ts +2 -44
- package/src/lib/mcp/index.js +3 -30
- package/src/lib/mcp/index.js.map +1 -1
- package/src/lib/mcp/mcp.d.ts +141 -0
- package/src/lib/mcp/mcp.js +52 -0
- package/src/lib/mcp/mcp.js.map +1 -0
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ export declare class ActivepiecesError extends Error {
|
|
|
11
11
|
error: ApErrorParams;
|
|
12
12
|
constructor(error: ApErrorParams, message?: string);
|
|
13
13
|
}
|
|
14
|
-
export type ApErrorParams = AuthenticationParams | AuthorizationErrorParams | ConfigNotFoundErrorParams | EmailIsNotVerifiedErrorParams | EngineOperationFailureParams | EntityNotFoundErrorParams | ExecutionTimeoutErrorParams | ExistingUserErrorParams | FileNotFoundErrorParams | FlowFormNotFoundError | FlowNotFoundErrorParams | FlowIsLockedErrorParams | FlowOperationErrorParams | FlowRunNotFoundErrorParams | InvalidApiKeyParams | InvalidAppConnectionParams | InvalidBearerTokenParams | InvalidClaimParams | InvalidCloudClaimParams | InvalidCredentialsErrorParams | InvalidJwtTokenErrorParams | InvalidOtpParams | InvalidSAMLResponseParams | InvitationOnlySignUpParams | JobRemovalFailureErrorParams | OpenAiFailedErrorParams | PauseMetadataMissingErrorParams | PermissionDeniedErrorParams | PieceNotFoundErrorParams | PieceTriggerNotFoundErrorParams | QuotaExceededParams | FeatureDisabledErrorParams | SignUpDisabledParams | StepNotFoundErrorParams | SystemInvalidErrorParams | SystemPropNotDefinedErrorParams | TestTriggerFailedErrorParams | TriggerDisableErrorParams | TriggerEnableErrorParams | TriggerFailedErrorParams | ValidationErrorParams | InvitationOnlySignUpParams | UserIsInActiveErrorParams | DomainIsNotAllowedErrorParams | EmailAuthIsDisabledParams | ExistingAlertChannelErrorParams | EmailAlreadyHasActivationKey | ProviderProxyConfigNotFoundParams | AITokenLimitExceededParams | SessionExpiredParams | InvalidLicenseKeyParams | NoChatResponseParams | InvalidSmtpCredentialsErrorParams | InvalidGitCredentialsParams | InvalidReleaseTypeParams | CopilotFailedErrorParams | ProjectExternalIdAlreadyExistsParams | MemoryIssueParams | InvalidCustomDomainErrorParams |
|
|
14
|
+
export type ApErrorParams = AuthenticationParams | AuthorizationErrorParams | ConfigNotFoundErrorParams | EmailIsNotVerifiedErrorParams | EngineOperationFailureParams | EntityNotFoundErrorParams | ExecutionTimeoutErrorParams | ExistingUserErrorParams | FileNotFoundErrorParams | FlowFormNotFoundError | FlowNotFoundErrorParams | FlowIsLockedErrorParams | FlowOperationErrorParams | FlowRunNotFoundErrorParams | InvalidApiKeyParams | InvalidAppConnectionParams | InvalidBearerTokenParams | InvalidClaimParams | InvalidCloudClaimParams | InvalidCredentialsErrorParams | InvalidJwtTokenErrorParams | InvalidOtpParams | InvalidSAMLResponseParams | InvitationOnlySignUpParams | JobRemovalFailureErrorParams | OpenAiFailedErrorParams | PauseMetadataMissingErrorParams | PermissionDeniedErrorParams | PieceNotFoundErrorParams | PieceTriggerNotFoundErrorParams | QuotaExceededParams | FeatureDisabledErrorParams | SignUpDisabledParams | StepNotFoundErrorParams | SystemInvalidErrorParams | SystemPropNotDefinedErrorParams | TestTriggerFailedErrorParams | TriggerDisableErrorParams | TriggerEnableErrorParams | TriggerFailedErrorParams | ValidationErrorParams | InvitationOnlySignUpParams | UserIsInActiveErrorParams | DomainIsNotAllowedErrorParams | EmailAuthIsDisabledParams | ExistingAlertChannelErrorParams | EmailAlreadyHasActivationKey | ProviderProxyConfigNotFoundParams | AITokenLimitExceededParams | SessionExpiredParams | InvalidLicenseKeyParams | NoChatResponseParams | InvalidSmtpCredentialsErrorParams | InvalidGitCredentialsParams | InvalidReleaseTypeParams | CopilotFailedErrorParams | ProjectExternalIdAlreadyExistsParams | MemoryIssueParams | InvalidCustomDomainErrorParams | McpPieceRequiresConnectionParams | McpPieceConnectionMismatchParams;
|
|
15
15
|
export type BaseErrorParams<T, V> = {
|
|
16
16
|
code: T;
|
|
17
17
|
params: V;
|
|
@@ -197,8 +197,13 @@ export type CopilotFailedErrorParams = BaseErrorParams<ErrorCode.COPILOT_FAILED,
|
|
|
197
197
|
export type ProjectExternalIdAlreadyExistsParams = BaseErrorParams<ErrorCode.PROJECT_EXTERNAL_ID_ALREADY_EXISTS, {
|
|
198
198
|
externalId: string;
|
|
199
199
|
}>;
|
|
200
|
-
export type
|
|
201
|
-
|
|
200
|
+
export type McpPieceRequiresConnectionParams = BaseErrorParams<ErrorCode.MCP_PIECE_REQUIRES_CONNECTION, {
|
|
201
|
+
pieceName: string;
|
|
202
|
+
}>;
|
|
203
|
+
export type McpPieceConnectionMismatchParams = BaseErrorParams<ErrorCode.MCP_PIECE_CONNECTION_MISMATCH, {
|
|
204
|
+
pieceName: string;
|
|
205
|
+
connectionPieceName: string;
|
|
206
|
+
connectionId: string;
|
|
202
207
|
}>;
|
|
203
208
|
export declare enum ErrorCode {
|
|
204
209
|
INVALID_CUSTOM_DOMAIN = "INVALID_CUSTOM_DOMAIN",
|
|
@@ -260,5 +265,6 @@ export declare enum ErrorCode {
|
|
|
260
265
|
INVALID_GIT_CREDENTIALS = "INVALID_GIT_CREDENTIALS",
|
|
261
266
|
INVALID_RELEASE_TYPE = "INVALID_RELEASE_TYPE",
|
|
262
267
|
COPILOT_FAILED = "COPILOT_FAILED",
|
|
263
|
-
|
|
268
|
+
MCP_PIECE_REQUIRES_CONNECTION = "MCP_PIECE_REQUIRES_CONNECTION",
|
|
269
|
+
MCP_PIECE_CONNECTION_MISMATCH = "MCP_PIECE_CONNECTION_MISMATCH"
|
|
264
270
|
}
|
|
@@ -69,6 +69,7 @@ var ErrorCode;
|
|
|
69
69
|
ErrorCode["INVALID_GIT_CREDENTIALS"] = "INVALID_GIT_CREDENTIALS";
|
|
70
70
|
ErrorCode["INVALID_RELEASE_TYPE"] = "INVALID_RELEASE_TYPE";
|
|
71
71
|
ErrorCode["COPILOT_FAILED"] = "COPILOT_FAILED";
|
|
72
|
-
ErrorCode["
|
|
72
|
+
ErrorCode["MCP_PIECE_REQUIRES_CONNECTION"] = "MCP_PIECE_REQUIRES_CONNECTION";
|
|
73
|
+
ErrorCode["MCP_PIECE_CONNECTION_MISMATCH"] = "MCP_PIECE_CONNECTION_MISMATCH";
|
|
73
74
|
})(ErrorCode || (exports.ErrorCode = ErrorCode = {}));
|
|
74
75
|
//# sourceMappingURL=activepieces-error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activepieces-error.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/common/activepieces-error.ts"],"names":[],"mappings":";;;AAUA,MAAa,iBAAkB,SAAQ,KAAK;IACxC,YAAmB,KAAoB,EAAE,OAAgB;QACrD,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QADpC,UAAK,GAAL,KAAK,CAAe;IAEvC,CAAC;CACJ;AAJD,8CAIC;
|
|
1
|
+
{"version":3,"file":"activepieces-error.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/common/activepieces-error.ts"],"names":[],"mappings":";;;AAUA,MAAa,iBAAkB,SAAQ,KAAK;IACxC,YAAmB,KAAoB,EAAE,OAAgB;QACrD,KAAK,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QADpC,UAAK,GAAL,KAAK,CAAe;IAEvC,CAAC;CACJ;AAJD,8CAIC;AAibD,IAAY,SA8DX;AA9DD,WAAY,SAAS;IACjB,4DAA+C,CAAA;IAC/C,kDAAqC,CAAA;IACrC,8CAAiC,CAAA;IACjC,4CAA+B,CAAA;IAC/B,0GAA6F,CAAA;IAC7F,kDAAqC,CAAA;IACrC,sDAAyC,CAAA;IACzC,4DAA+C,CAAA;IAC/C,kEAAqD,CAAA;IACrD,kDAAqC,CAAA;IACrC,oDAAuC,CAAA;IACvC,0CAA6B,CAAA;IAC7B,wDAA2C,CAAA;IAC3C,4CAA+B,CAAA;IAC/B,8DAAiD,CAAA;IACjD,sFAAyE,CAAA;IACzE,wDAA2C,CAAA;IAC3C,8CAAiC,CAAA;IACjC,2DAA8C,CAAA;IAC9C,8CAAiC,CAAA;IACjC,8DAAiD,CAAA;IACjD,wCAA2B,CAAA;IAC3B,sDAAyC,CAAA;IACzC,gDAAmC,CAAA;IACnC,8DAAiD,CAAA;IACjD,0DAA6C,CAAA;IAC7C,gDAAmC,CAAA;IACnC,4CAA+B,CAAA;IAC/B,wDAA2C,CAAA;IAC3C,wDAA2C,CAAA;IAC3C,0EAA6D,CAAA;IAC7D,wCAA2B,CAAA;IAC3B,4DAA+C,CAAA;IAC/C,gEAAmD,CAAA;IACnD,wDAA2C,CAAA;IAC3C,8CAAiC,CAAA;IACjC,8DAAiD,CAAA;IACjD,oDAAuC,CAAA;IACvC,gDAAmC,CAAA;IACnC,gEAAmD,CAAA;IACnD,8CAAiC,CAAA;IACjC,kDAAqC,CAAA;IACrC,gEAAmD,CAAA;IACnD,kDAAqC,CAAA;IACrC,8CAAiC,CAAA;IACjC,wDAA2C,CAAA;IAC3C,gEAAmD,CAAA;IACnD,wDAA2C,CAAA;IAC3C,gDAAmC,CAAA;IACnC,8CAAiC,CAAA;IACjC,8CAAiC,CAAA;IACjC,kDAAqC,CAAA;IACrC,sCAAyB,CAAA;IACzB,wDAA2C,CAAA;IAC3C,kFAAqE,CAAA;IACrE,kEAAqD,CAAA;IACrD,gEAAmD,CAAA;IACnD,0DAA6C,CAAA;IAC7C,8CAAiC,CAAA;IACjC,4EAA+D,CAAA;IAC/D,4EAA+D,CAAA;AACnE,CAAC,EA9DW,SAAS,yBAAT,SAAS,QA8DpB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Static } from '@sinclair/typebox';
|
|
2
|
+
import { McpPieceStatus } from '../mcp';
|
|
3
|
+
export declare const ListMcpsRequest: import("@sinclair/typebox").TObject<{
|
|
4
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
5
|
+
cursor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
6
|
+
projectId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
7
|
+
}>;
|
|
8
|
+
export type ListMcpsRequest = Static<typeof ListMcpsRequest>;
|
|
9
|
+
export declare const AddMcpPieceRequestBody: import("@sinclair/typebox").TObject<{
|
|
10
|
+
mcpId: import("@sinclair/typebox").TString;
|
|
11
|
+
pieceName: import("@sinclair/typebox").TString;
|
|
12
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof McpPieceStatus>>;
|
|
13
|
+
connectionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string | null>>;
|
|
14
|
+
}>;
|
|
15
|
+
export type AddMcpPieceRequestBody = Static<typeof AddMcpPieceRequestBody>;
|
|
16
|
+
export declare const UpdateMcpPieceRequestBody: import("@sinclair/typebox").TObject<{
|
|
17
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof McpPieceStatus>>;
|
|
18
|
+
connectionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string | null>>;
|
|
19
|
+
}>;
|
|
20
|
+
export type UpdateMcpPieceRequestBody = Static<typeof UpdateMcpPieceRequestBody>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateMcpPieceRequestBody = exports.AddMcpPieceRequestBody = exports.ListMcpsRequest = void 0;
|
|
4
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
const id_generator_1 = require("../../common/id-generator");
|
|
7
|
+
const mcp_1 = require("../mcp");
|
|
8
|
+
exports.ListMcpsRequest = typebox_1.Type.Object({
|
|
9
|
+
limit: typebox_1.Type.Optional(typebox_1.Type.Number({})),
|
|
10
|
+
cursor: typebox_1.Type.Optional(typebox_1.Type.String({})),
|
|
11
|
+
projectId: typebox_1.Type.Optional(typebox_1.Type.String({})),
|
|
12
|
+
});
|
|
13
|
+
exports.AddMcpPieceRequestBody = typebox_1.Type.Object({
|
|
14
|
+
mcpId: id_generator_1.ApId,
|
|
15
|
+
pieceName: typebox_1.Type.String(),
|
|
16
|
+
status: typebox_1.Type.Optional(typebox_1.Type.Enum(mcp_1.McpPieceStatus)),
|
|
17
|
+
connectionId: (0, common_1.Nullable)(typebox_1.Type.String()),
|
|
18
|
+
});
|
|
19
|
+
exports.UpdateMcpPieceRequestBody = typebox_1.Type.Object({
|
|
20
|
+
status: typebox_1.Type.Optional(typebox_1.Type.Enum(mcp_1.McpPieceStatus)),
|
|
21
|
+
connectionId: (0, common_1.Nullable)(typebox_1.Type.String()),
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=mcp.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.dto.js","sourceRoot":"","sources":["../../../../../../../packages/shared/src/lib/mcp/dto/mcp.dto.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAChD,yCAAuC;AACvC,4DAAgD;AAChD,gCAAuC;AAE1B,QAAA,eAAe,GAAG,cAAI,CAAC,MAAM,CAAC;IACvC,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACrC,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACtC,SAAS,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;CAC5C,CAAC,CAAA;AAGW,QAAA,sBAAsB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,mBAAI;IACX,SAAS,EAAE,cAAI,CAAC,MAAM,EAAE;IACxB,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,oBAAc,CAAC,CAAC;IAChD,YAAY,EAAE,IAAA,iBAAQ,EAAC,cAAI,CAAC,MAAM,EAAE,CAAC;CACxC,CAAC,CAAA;AAIW,QAAA,yBAAyB,GAAG,cAAI,CAAC,MAAM,CAAC;IACjD,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,oBAAc,CAAC,CAAC;IAChD,YAAY,EAAE,IAAA,iBAAQ,EAAC,cAAI,CAAC,MAAM,EAAE,CAAC;CACxC,CAAC,CAAA"}
|
package/src/lib/mcp/index.d.ts
CHANGED
|
@@ -1,44 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare enum MCPProperyType {
|
|
4
|
-
TEXT = "Text",
|
|
5
|
-
BOOLEAN = "Boolean",
|
|
6
|
-
DATE = "Date",
|
|
7
|
-
NUMBER = "Number",
|
|
8
|
-
ARRAY = "Array",
|
|
9
|
-
OBJECT = "Object"
|
|
10
|
-
}
|
|
11
|
-
export declare const MCPProperty: import("@sinclair/typebox").TObject<{
|
|
12
|
-
name: import("@sinclair/typebox").TString;
|
|
13
|
-
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
14
|
-
type: import("@sinclair/typebox").TString;
|
|
15
|
-
required: import("@sinclair/typebox").TBoolean;
|
|
16
|
-
}>;
|
|
17
|
-
export type MCPProperty = Static<typeof MCPProperty>;
|
|
18
|
-
export declare const MCP: import("@sinclair/typebox").TObject<{
|
|
19
|
-
projectId: import("@sinclair/typebox").TString;
|
|
20
|
-
token: import("@sinclair/typebox").TString;
|
|
21
|
-
id: import("@sinclair/typebox").TString;
|
|
22
|
-
created: import("@sinclair/typebox").TString;
|
|
23
|
-
updated: import("@sinclair/typebox").TString;
|
|
24
|
-
}>;
|
|
25
|
-
export type MCP = Static<typeof MCP>;
|
|
26
|
-
export type MCPSchema = MCP & {
|
|
27
|
-
connections: AppConnectionWithoutSensitiveData[];
|
|
28
|
-
};
|
|
29
|
-
export declare const MCPTrigger: import("@sinclair/typebox").TObject<{
|
|
30
|
-
pieceName: import("@sinclair/typebox").TString;
|
|
31
|
-
triggerName: import("@sinclair/typebox").TString;
|
|
32
|
-
input: import("@sinclair/typebox").TObject<{
|
|
33
|
-
toolName: import("@sinclair/typebox").TString;
|
|
34
|
-
toolDescription: import("@sinclair/typebox").TString;
|
|
35
|
-
inputSchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
36
|
-
name: import("@sinclair/typebox").TString;
|
|
37
|
-
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
38
|
-
type: import("@sinclair/typebox").TString;
|
|
39
|
-
required: import("@sinclair/typebox").TBoolean;
|
|
40
|
-
}>>;
|
|
41
|
-
returnsResponse: import("@sinclair/typebox").TBoolean;
|
|
42
|
-
}>;
|
|
43
|
-
}>;
|
|
44
|
-
export type MCPTrigger = Static<typeof MCPTrigger>;
|
|
1
|
+
export * from './mcp';
|
|
2
|
+
export * from './dto/mcp.dto';
|
package/src/lib/mcp/index.js
CHANGED
|
@@ -1,33 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const id_generator_1 = require("../common/id-generator");
|
|
7
|
-
var MCPProperyType;
|
|
8
|
-
(function (MCPProperyType) {
|
|
9
|
-
MCPProperyType["TEXT"] = "Text";
|
|
10
|
-
MCPProperyType["BOOLEAN"] = "Boolean";
|
|
11
|
-
MCPProperyType["DATE"] = "Date";
|
|
12
|
-
MCPProperyType["NUMBER"] = "Number";
|
|
13
|
-
MCPProperyType["ARRAY"] = "Array";
|
|
14
|
-
MCPProperyType["OBJECT"] = "Object";
|
|
15
|
-
})(MCPProperyType || (exports.MCPProperyType = MCPProperyType = {}));
|
|
16
|
-
exports.MCPProperty = typebox_1.Type.Object({
|
|
17
|
-
name: typebox_1.Type.String(),
|
|
18
|
-
description: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
19
|
-
type: typebox_1.Type.String(),
|
|
20
|
-
required: typebox_1.Type.Boolean(),
|
|
21
|
-
});
|
|
22
|
-
exports.MCP = typebox_1.Type.Object(Object.assign(Object.assign({}, common_1.BaseModelSchema), { projectId: id_generator_1.ApId, token: id_generator_1.ApId }));
|
|
23
|
-
exports.MCPTrigger = typebox_1.Type.Object({
|
|
24
|
-
pieceName: typebox_1.Type.String(),
|
|
25
|
-
triggerName: typebox_1.Type.String(),
|
|
26
|
-
input: typebox_1.Type.Object({
|
|
27
|
-
toolName: typebox_1.Type.String(),
|
|
28
|
-
toolDescription: typebox_1.Type.String(),
|
|
29
|
-
inputSchema: typebox_1.Type.Array(exports.MCPProperty),
|
|
30
|
-
returnsResponse: typebox_1.Type.Boolean(),
|
|
31
|
-
}),
|
|
32
|
-
});
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./mcp"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./dto/mcp.dto"), exports);
|
|
33
6
|
//# sourceMappingURL=index.js.map
|
package/src/lib/mcp/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/mcp/index.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/mcp/index.ts"],"names":[],"mappings":";;;AAAA,gDAAqB;AACrB,wDAA6B"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { Static } from '@sinclair/typebox';
|
|
2
|
+
export declare enum McpPropertyType {
|
|
3
|
+
TEXT = "Text",
|
|
4
|
+
BOOLEAN = "Boolean",
|
|
5
|
+
DATE = "Date",
|
|
6
|
+
NUMBER = "Number",
|
|
7
|
+
ARRAY = "Array",
|
|
8
|
+
OBJECT = "Object"
|
|
9
|
+
}
|
|
10
|
+
export declare enum McpPieceStatus {
|
|
11
|
+
ENABLED = "ENABLED",
|
|
12
|
+
DISABLED = "DISABLED"
|
|
13
|
+
}
|
|
14
|
+
export declare const McpProperty: import("@sinclair/typebox").TObject<{
|
|
15
|
+
name: import("@sinclair/typebox").TString;
|
|
16
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
17
|
+
type: import("@sinclair/typebox").TString;
|
|
18
|
+
required: import("@sinclair/typebox").TBoolean;
|
|
19
|
+
}>;
|
|
20
|
+
export type McpProperty = Static<typeof McpProperty>;
|
|
21
|
+
export declare const McpPiece: import("@sinclair/typebox").TObject<{
|
|
22
|
+
pieceName: import("@sinclair/typebox").TString;
|
|
23
|
+
connectionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
24
|
+
mcpId: import("@sinclair/typebox").TString;
|
|
25
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof McpPieceStatus>>;
|
|
26
|
+
id: import("@sinclair/typebox").TString;
|
|
27
|
+
created: import("@sinclair/typebox").TString;
|
|
28
|
+
updated: import("@sinclair/typebox").TString;
|
|
29
|
+
}>;
|
|
30
|
+
export type McpPiece = Static<typeof McpPiece>;
|
|
31
|
+
export declare const McpPieceWithConnection: import("@sinclair/typebox").TObject<{
|
|
32
|
+
pieceName: import("@sinclair/typebox").TString;
|
|
33
|
+
id: import("@sinclair/typebox").TString;
|
|
34
|
+
created: import("@sinclair/typebox").TString;
|
|
35
|
+
updated: import("@sinclair/typebox").TString;
|
|
36
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof McpPieceStatus>>;
|
|
37
|
+
connectionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
38
|
+
mcpId: import("@sinclair/typebox").TString;
|
|
39
|
+
connection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
40
|
+
externalId: import("@sinclair/typebox").TString;
|
|
41
|
+
displayName: import("@sinclair/typebox").TString;
|
|
42
|
+
type: import("@sinclair/typebox").TEnum<typeof import("../app-connection/app-connection").AppConnectionType>;
|
|
43
|
+
pieceName: import("@sinclair/typebox").TString;
|
|
44
|
+
projectIds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
45
|
+
platformId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string | null>>;
|
|
46
|
+
scope: import("@sinclair/typebox").TEnum<typeof import("../app-connection/app-connection").AppConnectionScope>;
|
|
47
|
+
status: import("@sinclair/typebox").TEnum<typeof import("../app-connection/app-connection").AppConnectionStatus>;
|
|
48
|
+
ownerId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string | null>>;
|
|
49
|
+
owner: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<{
|
|
50
|
+
platformId?: string | null | undefined;
|
|
51
|
+
externalId?: string | null | undefined;
|
|
52
|
+
lastChangelogDismissed?: string | null | undefined;
|
|
53
|
+
id: string;
|
|
54
|
+
created: string;
|
|
55
|
+
updated: string;
|
|
56
|
+
email: string;
|
|
57
|
+
platformRole: import("../user").PlatformRole;
|
|
58
|
+
status: import("../user").UserStatus;
|
|
59
|
+
firstName: string;
|
|
60
|
+
lastName: string;
|
|
61
|
+
} | null>>;
|
|
62
|
+
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<{
|
|
63
|
+
[x: string]: unknown;
|
|
64
|
+
} | null>>;
|
|
65
|
+
id: import("@sinclair/typebox").TString;
|
|
66
|
+
created: import("@sinclair/typebox").TString;
|
|
67
|
+
updated: import("@sinclair/typebox").TString;
|
|
68
|
+
}>>;
|
|
69
|
+
}>;
|
|
70
|
+
export type McpPieceWithConnection = Static<typeof McpPieceWithConnection>;
|
|
71
|
+
export declare const Mcp: import("@sinclair/typebox").TObject<{
|
|
72
|
+
projectId: import("@sinclair/typebox").TString;
|
|
73
|
+
token: import("@sinclair/typebox").TString;
|
|
74
|
+
id: import("@sinclair/typebox").TString;
|
|
75
|
+
created: import("@sinclair/typebox").TString;
|
|
76
|
+
updated: import("@sinclair/typebox").TString;
|
|
77
|
+
}>;
|
|
78
|
+
export type Mcp = Static<typeof Mcp>;
|
|
79
|
+
export declare const McpWithPieces: import("@sinclair/typebox").TObject<{
|
|
80
|
+
id: import("@sinclair/typebox").TString;
|
|
81
|
+
created: import("@sinclair/typebox").TString;
|
|
82
|
+
updated: import("@sinclair/typebox").TString;
|
|
83
|
+
projectId: import("@sinclair/typebox").TString;
|
|
84
|
+
token: import("@sinclair/typebox").TString;
|
|
85
|
+
pieces: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
86
|
+
pieceName: import("@sinclair/typebox").TString;
|
|
87
|
+
id: import("@sinclair/typebox").TString;
|
|
88
|
+
created: import("@sinclair/typebox").TString;
|
|
89
|
+
updated: import("@sinclair/typebox").TString;
|
|
90
|
+
status: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof McpPieceStatus>>;
|
|
91
|
+
connectionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
92
|
+
mcpId: import("@sinclair/typebox").TString;
|
|
93
|
+
connection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
94
|
+
externalId: import("@sinclair/typebox").TString;
|
|
95
|
+
displayName: import("@sinclair/typebox").TString;
|
|
96
|
+
type: import("@sinclair/typebox").TEnum<typeof import("../app-connection/app-connection").AppConnectionType>;
|
|
97
|
+
pieceName: import("@sinclair/typebox").TString;
|
|
98
|
+
projectIds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
99
|
+
platformId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string | null>>;
|
|
100
|
+
scope: import("@sinclair/typebox").TEnum<typeof import("../app-connection/app-connection").AppConnectionScope>;
|
|
101
|
+
status: import("@sinclair/typebox").TEnum<typeof import("../app-connection/app-connection").AppConnectionStatus>;
|
|
102
|
+
ownerId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string | null>>;
|
|
103
|
+
owner: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<{
|
|
104
|
+
platformId?: string | null | undefined;
|
|
105
|
+
externalId?: string | null | undefined;
|
|
106
|
+
lastChangelogDismissed?: string | null | undefined;
|
|
107
|
+
id: string;
|
|
108
|
+
created: string;
|
|
109
|
+
updated: string;
|
|
110
|
+
email: string;
|
|
111
|
+
platformRole: import("../user").PlatformRole;
|
|
112
|
+
status: import("../user").UserStatus;
|
|
113
|
+
firstName: string;
|
|
114
|
+
lastName: string;
|
|
115
|
+
} | null>>;
|
|
116
|
+
metadata: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<{
|
|
117
|
+
[x: string]: unknown;
|
|
118
|
+
} | null>>;
|
|
119
|
+
id: import("@sinclair/typebox").TString;
|
|
120
|
+
created: import("@sinclair/typebox").TString;
|
|
121
|
+
updated: import("@sinclair/typebox").TString;
|
|
122
|
+
}>>;
|
|
123
|
+
}>>;
|
|
124
|
+
}>;
|
|
125
|
+
export type McpWithPieces = Static<typeof McpWithPieces>;
|
|
126
|
+
export declare const McpTrigger: import("@sinclair/typebox").TObject<{
|
|
127
|
+
pieceName: import("@sinclair/typebox").TString;
|
|
128
|
+
triggerName: import("@sinclair/typebox").TString;
|
|
129
|
+
input: import("@sinclair/typebox").TObject<{
|
|
130
|
+
toolName: import("@sinclair/typebox").TString;
|
|
131
|
+
toolDescription: import("@sinclair/typebox").TString;
|
|
132
|
+
inputSchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
133
|
+
name: import("@sinclair/typebox").TString;
|
|
134
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
135
|
+
type: import("@sinclair/typebox").TString;
|
|
136
|
+
required: import("@sinclair/typebox").TBoolean;
|
|
137
|
+
}>>;
|
|
138
|
+
returnsResponse: import("@sinclair/typebox").TBoolean;
|
|
139
|
+
}>;
|
|
140
|
+
}>;
|
|
141
|
+
export type McpTrigger = Static<typeof McpTrigger>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.McpTrigger = exports.McpWithPieces = exports.Mcp = exports.McpPieceWithConnection = exports.McpPiece = exports.McpProperty = exports.McpPieceStatus = exports.McpPropertyType = void 0;
|
|
4
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
5
|
+
const app_connection_1 = require("../app-connection/app-connection");
|
|
6
|
+
const common_1 = require("../common");
|
|
7
|
+
const id_generator_1 = require("../common/id-generator");
|
|
8
|
+
var McpPropertyType;
|
|
9
|
+
(function (McpPropertyType) {
|
|
10
|
+
McpPropertyType["TEXT"] = "Text";
|
|
11
|
+
McpPropertyType["BOOLEAN"] = "Boolean";
|
|
12
|
+
McpPropertyType["DATE"] = "Date";
|
|
13
|
+
McpPropertyType["NUMBER"] = "Number";
|
|
14
|
+
McpPropertyType["ARRAY"] = "Array";
|
|
15
|
+
McpPropertyType["OBJECT"] = "Object";
|
|
16
|
+
})(McpPropertyType || (exports.McpPropertyType = McpPropertyType = {}));
|
|
17
|
+
var McpPieceStatus;
|
|
18
|
+
(function (McpPieceStatus) {
|
|
19
|
+
McpPieceStatus["ENABLED"] = "ENABLED";
|
|
20
|
+
McpPieceStatus["DISABLED"] = "DISABLED";
|
|
21
|
+
})(McpPieceStatus || (exports.McpPieceStatus = McpPieceStatus = {}));
|
|
22
|
+
exports.McpProperty = typebox_1.Type.Object({
|
|
23
|
+
name: typebox_1.Type.String(),
|
|
24
|
+
description: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
25
|
+
type: typebox_1.Type.String(),
|
|
26
|
+
required: typebox_1.Type.Boolean(),
|
|
27
|
+
});
|
|
28
|
+
exports.McpPiece = typebox_1.Type.Object(Object.assign(Object.assign({}, common_1.BaseModelSchema), { pieceName: typebox_1.Type.String(), connectionId: typebox_1.Type.Optional(id_generator_1.ApId), mcpId: id_generator_1.ApId, status: typebox_1.Type.Optional(typebox_1.Type.Enum(McpPieceStatus)) }));
|
|
29
|
+
exports.McpPieceWithConnection = typebox_1.Type.Composite([
|
|
30
|
+
exports.McpPiece,
|
|
31
|
+
typebox_1.Type.Object({
|
|
32
|
+
connection: typebox_1.Type.Optional(app_connection_1.AppConnectionWithoutSensitiveData),
|
|
33
|
+
}),
|
|
34
|
+
]);
|
|
35
|
+
exports.Mcp = typebox_1.Type.Object(Object.assign(Object.assign({}, common_1.BaseModelSchema), { projectId: id_generator_1.ApId, token: id_generator_1.ApId }));
|
|
36
|
+
exports.McpWithPieces = typebox_1.Type.Composite([
|
|
37
|
+
exports.Mcp,
|
|
38
|
+
typebox_1.Type.Object({
|
|
39
|
+
pieces: typebox_1.Type.Array(exports.McpPieceWithConnection),
|
|
40
|
+
}),
|
|
41
|
+
]);
|
|
42
|
+
exports.McpTrigger = typebox_1.Type.Object({
|
|
43
|
+
pieceName: typebox_1.Type.String(),
|
|
44
|
+
triggerName: typebox_1.Type.String(),
|
|
45
|
+
input: typebox_1.Type.Object({
|
|
46
|
+
toolName: typebox_1.Type.String(),
|
|
47
|
+
toolDescription: typebox_1.Type.String(),
|
|
48
|
+
inputSchema: typebox_1.Type.Array(exports.McpProperty),
|
|
49
|
+
returnsResponse: typebox_1.Type.Boolean(),
|
|
50
|
+
}),
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=mcp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../../../../../packages/shared/src/lib/mcp/mcp.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAChD,qEAAoF;AACpF,sCAA2C;AAC3C,yDAA6C;AAE7C,IAAY,eAOX;AAPD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,sCAAmB,CAAA;IACnB,gCAAa,CAAA;IACb,oCAAiB,CAAA;IACjB,kCAAe,CAAA;IACf,oCAAiB,CAAA;AACrB,CAAC,EAPW,eAAe,+BAAf,eAAe,QAO1B;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,qCAAmB,CAAA;IACnB,uCAAqB,CAAA;AACzB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAEY,QAAA,WAAW,GAAG,cAAI,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,cAAI,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;IACzC,IAAI,EAAE,cAAI,CAAC,MAAM,EAAE;IACnB,QAAQ,EAAE,cAAI,CAAC,OAAO,EAAE;CAC3B,CAAC,CAAA;AAKW,QAAA,QAAQ,GAAG,cAAI,CAAC,MAAM,iCAC5B,wBAAe,KAClB,SAAS,EAAE,cAAI,CAAC,MAAM,EAAE,EACxB,YAAY,EAAE,cAAI,CAAC,QAAQ,CAAC,mBAAI,CAAC,EACjC,KAAK,EAAE,mBAAI,EACX,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,IAClD,CAAA;AAIW,QAAA,sBAAsB,GAAG,cAAI,CAAC,SAAS,CAAC;IACjD,gBAAQ;IACR,cAAI,CAAC,MAAM,CAAC;QACR,UAAU,EAAE,cAAI,CAAC,QAAQ,CAAC,kDAAiC,CAAC;KAC/D,CAAC;CACL,CAAC,CAAA;AAMW,QAAA,GAAG,GAAG,cAAI,CAAC,MAAM,iCACvB,wBAAe,KAClB,SAAS,EAAE,mBAAI,EACf,KAAK,EAAE,mBAAI,IACb,CAAA;AAIW,QAAA,aAAa,GAAG,cAAI,CAAC,SAAS,CAAC;IACxC,WAAG;IACH,cAAI,CAAC,MAAM,CAAC;QACR,MAAM,EAAE,cAAI,CAAC,KAAK,CAAC,8BAAsB,CAAC;KAC7C,CAAC;CACL,CAAC,CAAA;AAKW,QAAA,UAAU,GAAG,cAAI,CAAC,MAAM,CAAC;IAClC,SAAS,EAAE,cAAI,CAAC,MAAM,EAAE;IACxB,WAAW,EAAE,cAAI,CAAC,MAAM,EAAE;IAC1B,KAAK,EAAE,cAAI,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,cAAI,CAAC,MAAM,EAAE;QACvB,eAAe,EAAE,cAAI,CAAC,MAAM,EAAE;QAC9B,WAAW,EAAE,cAAI,CAAC,KAAK,CAAC,mBAAW,CAAC;QACpC,eAAe,EAAE,cAAI,CAAC,OAAO,EAAE;KAClC,CAAC;CACL,CAAC,CAAA"}
|