@abyss-project/main 13.1.0 → 13.2.0
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/api/index.d.ts +4 -0
- package/dist/api/index.js +4 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/mcp-connection.admin.api.d.ts +4 -0
- package/dist/api/mcp-connection.admin.api.js +13 -0
- package/dist/api/mcp-connection.admin.api.js.map +1 -0
- package/dist/api/mcp-connection.api.d.ts +8 -0
- package/dist/api/mcp-connection.api.js +31 -0
- package/dist/api/mcp-connection.api.js.map +1 -0
- package/dist/api/mcp-tool.admin.api.d.ts +2 -0
- package/dist/api/mcp-tool.admin.api.js +9 -0
- package/dist/api/mcp-tool.admin.api.js.map +1 -0
- package/dist/api/organization-mcp-connection.api.d.ts +6 -0
- package/dist/api/organization-mcp-connection.api.js +21 -0
- package/dist/api/organization-mcp-connection.api.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/mcp.constants.d.ts +6 -0
- package/dist/constants/mcp.constants.js +59 -0
- package/dist/constants/mcp.constants.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -1
- package/dist/translate/en.translate.d.ts +8 -0
- package/dist/translate/en.translate.js +8 -0
- package/dist/translate/en.translate.js.map +1 -1
- package/dist/translate/fr.translate.d.ts +8 -0
- package/dist/translate/fr.translate.js +8 -0
- package/dist/translate/fr.translate.js.map +1 -1
- package/dist/translate/tests/mcp-connection-notifications.spec.d.ts +1 -0
- package/dist/translate/tests/mcp-connection-notifications.spec.js +50 -0
- package/dist/translate/tests/mcp-connection-notifications.spec.js.map +1 -0
- package/dist/types/enum/api-error.enum.d.ts +8 -1
- package/dist/types/enum/api-error.enum.js +7 -0
- package/dist/types/enum/api-error.enum.js.map +1 -1
- package/dist/types/enum/index.d.ts +1 -0
- package/dist/types/enum/index.js +1 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/mcp.enum.d.ts +46 -0
- package/dist/types/enum/mcp.enum.js +59 -0
- package/dist/types/enum/mcp.enum.js.map +1 -0
- package/dist/types/enum/user-notification-category.enum.js +2 -0
- package/dist/types/enum/user-notification-category.enum.js.map +1 -1
- package/dist/types/enum/user-notification-content-type.enum.d.ts +15 -0
- package/dist/types/enum/user-notification-content-type.enum.js +3 -1
- package/dist/types/enum/user-notification-content-type.enum.js.map +1 -1
- package/dist/types/interface/api/index.d.ts +2 -0
- package/dist/types/interface/api/index.js +2 -0
- package/dist/types/interface/api/index.js.map +1 -1
- package/dist/types/interface/api/requests/index.d.ts +1 -0
- package/dist/types/interface/api/requests/index.js +1 -0
- package/dist/types/interface/api/requests/index.js.map +1 -1
- package/dist/types/interface/api/requests/mcp-connection.request.d.ts +55 -0
- package/dist/types/interface/api/requests/mcp-connection.request.js +3 -0
- package/dist/types/interface/api/requests/mcp-connection.request.js.map +1 -0
- package/dist/types/interface/api/responses/index.d.ts +1 -0
- package/dist/types/interface/api/responses/index.js +1 -0
- package/dist/types/interface/api/responses/index.js.map +1 -1
- package/dist/types/interface/api/responses/mcp-connection.response.d.ts +99 -0
- package/dist/types/interface/api/responses/mcp-connection.response.js +3 -0
- package/dist/types/interface/api/responses/mcp-connection.response.js.map +1 -0
- package/dist/types/interface/index.d.ts +3 -0
- package/dist/types/interface/index.js +3 -0
- package/dist/types/interface/index.js.map +1 -1
- package/dist/types/interface/mcp/abyss-mcp-tool.types.d.ts +15 -0
- package/dist/types/interface/mcp/abyss-mcp-tool.types.js +3 -0
- package/dist/types/interface/mcp/abyss-mcp-tool.types.js.map +1 -0
- package/dist/types/interface/mcp/index.d.ts +3 -0
- package/dist/types/interface/mcp/index.js +20 -0
- package/dist/types/interface/mcp/index.js.map +1 -0
- package/dist/types/interface/mcp/mcp-tool-call.d.ts +26 -0
- package/dist/types/interface/mcp/mcp-tool-call.js +3 -0
- package/dist/types/interface/mcp/mcp-tool-call.js.map +1 -0
- package/dist/types/interface/mcp/mcp-tool-descriptor.d.ts +15 -0
- package/dist/types/interface/mcp/mcp-tool-descriptor.js +3 -0
- package/dist/types/interface/mcp/mcp-tool-descriptor.js.map +1 -0
- package/dist/types/interface/models/index.d.ts +2 -0
- package/dist/types/interface/models/index.js +2 -0
- package/dist/types/interface/models/index.js.map +1 -1
- package/dist/types/interface/models/mcp-connection-read.model.d.ts +15 -0
- package/dist/types/interface/models/mcp-connection-read.model.js +3 -0
- package/dist/types/interface/models/mcp-connection-read.model.js.map +1 -0
- package/dist/types/interface/models/mcp-connection.model.d.ts +28 -0
- package/dist/types/interface/models/mcp-connection.model.js +3 -0
- package/dist/types/interface/models/mcp-connection.model.js.map +1 -0
- package/dist/types/tests/mcp-contract.spec.d.ts +1 -0
- package/dist/types/tests/mcp-contract.spec.js +80 -0
- package/dist/types/tests/mcp-contract.spec.js.map +1 -0
- package/package.json +2 -1
|
@@ -72,3 +72,6 @@ export * from './models/admin-audit-log.model';
|
|
|
72
72
|
export * from './quota-reservation-event';
|
|
73
73
|
export * from './models/session.model';
|
|
74
74
|
export * from './models/passkey.model';
|
|
75
|
+
export * from './models/mcp-connection.model';
|
|
76
|
+
export * from './models/mcp-connection-read.model';
|
|
77
|
+
export * from './mcp';
|
|
@@ -88,4 +88,7 @@ __exportStar(require("./models/admin-audit-log.model"), exports);
|
|
|
88
88
|
__exportStar(require("./quota-reservation-event"), exports);
|
|
89
89
|
__exportStar(require("./models/session.model"), exports);
|
|
90
90
|
__exportStar(require("./models/passkey.model"), exports);
|
|
91
|
+
__exportStar(require("./models/mcp-connection.model"), exports);
|
|
92
|
+
__exportStar(require("./models/mcp-connection-read.model"), exports);
|
|
93
|
+
__exportStar(require("./mcp"), exports);
|
|
91
94
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/interface/index.ts"],"names":[],"mappings":";;;;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../enum/mcp.enum';
|
|
2
|
+
export type IAbyssListScopesArguments = Record<string, never>;
|
|
3
|
+
export interface IAbyssListScopesProject {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
services: McpService[];
|
|
7
|
+
}
|
|
8
|
+
export interface IAbyssListScopesResult {
|
|
9
|
+
scope: {
|
|
10
|
+
type: McpScopeType;
|
|
11
|
+
id: string | null;
|
|
12
|
+
name: string | null;
|
|
13
|
+
};
|
|
14
|
+
projects: IAbyssListScopesProject[];
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abyss-mcp-tool.types.js","sourceRoot":"","sources":["../../../../src/types/interface/mcp/abyss-mcp-tool.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./mcp-tool-descriptor"), exports);
|
|
18
|
+
__exportStar(require("./mcp-tool-call"), exports);
|
|
19
|
+
__exportStar(require("./abyss-mcp-tool.types"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/mcp/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,kDAAgC;AAChC,yDAAuC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { McpScopeType } from '../../enum/mcp.enum';
|
|
2
|
+
import type { IResponse } from '../api/type-message/response';
|
|
3
|
+
export interface IMcpToolCallContext {
|
|
4
|
+
userId: string;
|
|
5
|
+
connectionId: string;
|
|
6
|
+
requestId: string;
|
|
7
|
+
locale: 'fr' | 'en';
|
|
8
|
+
scope: {
|
|
9
|
+
type: McpScopeType;
|
|
10
|
+
id: string | null;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface IMcpToolCallBody<A> {
|
|
14
|
+
context: IMcpToolCallContext;
|
|
15
|
+
arguments: A;
|
|
16
|
+
}
|
|
17
|
+
export interface ICallMcpToolAdminParams {
|
|
18
|
+
name: string;
|
|
19
|
+
}
|
|
20
|
+
export interface IMcpToolCallResponse<R> {
|
|
21
|
+
result: R;
|
|
22
|
+
itemCount: number | null;
|
|
23
|
+
truncated: boolean;
|
|
24
|
+
nextCursor: string | null;
|
|
25
|
+
}
|
|
26
|
+
export type ICallMcpToolAdminResponse<R> = IResponse<IMcpToolCallResponse<R>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-tool-call.js","sourceRoot":"","sources":["../../../../src/types/interface/mcp/mcp-tool-call.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { JSONSchema7 } from 'json-schema';
|
|
2
|
+
import type { McpFunctionalScope, McpService } from '../../enum/mcp.enum';
|
|
3
|
+
export interface IMcpToolDescriptor {
|
|
4
|
+
name: string;
|
|
5
|
+
service: `${McpService}`;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
inputSchema: JSONSchema7;
|
|
9
|
+
outputSchema: JSONSchema7;
|
|
10
|
+
requiredScope: `${McpFunctionalScope}`;
|
|
11
|
+
annotations: {
|
|
12
|
+
readOnlyHint: true;
|
|
13
|
+
openWorldHint: false;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-tool-descriptor.js","sourceRoot":"","sources":["../../../../src/types/interface/mcp/mcp-tool-descriptor.ts"],"names":[],"mappings":""}
|
|
@@ -78,4 +78,6 @@ __exportStar(require("./user-sidebar-pin.model"), exports);
|
|
|
78
78
|
__exportStar(require("./admin-audit-log.model"), exports);
|
|
79
79
|
__exportStar(require("./session.model"), exports);
|
|
80
80
|
__exportStar(require("./passkey.model"), exports);
|
|
81
|
+
__exportStar(require("./mcp-connection.model"), exports);
|
|
82
|
+
__exportStar(require("./mcp-connection-read.model"), exports);
|
|
81
83
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,kDAAgC;AAChC,yDAAuC;AACvC,qEAAmD;AACnD,sDAAoC;AACpC,4DAA0C;AAC1C,wDAAsC;AACtC,wDAAsC;AACtC,uDAAqC;AACrC,4DAA0C;AAC1C,6DAA2C;AAG3C,oDAAkC;AAClC,+DAA6C;AAG7C,gDAA8B;AAG9B,iDAA+B;AAG/B,uDAAqC;AACrC,mEAAiD;AACjD,8DAA4C;AAG5C,wDAAsC;AACtC,0DAAwC;AACxC,gEAA8C;AAC9C,qEAAmD;AACnD,qEAAmD;AACnD,uDAAqC;AACrC,kDAAgC;AAChC,uDAAqC;AACrC,6DAA2C;AAC3C,sDAAoC;AACpC,6DAA2C;AAC3C,0DAAwC;AACxC,mEAAiD;AACjD,sDAAoC;AACpC,+DAA6C;AAC7C,4DAA0C;AAC1C,4DAA0C;AAC1C,2DAAyC;AACzC,8DAA4C;AAC5C,iEAA+C;AAC/C,wDAAsC;AACtC,uDAAqC;AACrC,8DAA4C;AAC5C,+CAA6B;AAC7B,sDAAoC;AACpC,8DAA4C;AAC5C,0EAAwD;AACxD,0DAAwC;AACxC,6EAA2D;AAG3D,2DAAyC;AAGzC,4DAA0C;AAG1C,wDAAsC;AAGtC,yDAAuC;AACvC,iEAA+C;AAC/C,oEAAkD;AAClD,yDAAuC;AACvC,6DAA2C;AAC3C,kEAAgD;AAGhD,qDAAmC;AAGnC,qDAAmC;AAGnC,8DAA4C;AAG5C,8DAA4C;AAG5C,2DAAyC;AAGzC,0DAAwC;AAGxC,kDAAgC;AAChC,kDAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/interface/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,kDAAgC;AAChC,yDAAuC;AACvC,qEAAmD;AACnD,sDAAoC;AACpC,4DAA0C;AAC1C,wDAAsC;AACtC,wDAAsC;AACtC,uDAAqC;AACrC,4DAA0C;AAC1C,6DAA2C;AAG3C,oDAAkC;AAClC,+DAA6C;AAG7C,gDAA8B;AAG9B,iDAA+B;AAG/B,uDAAqC;AACrC,mEAAiD;AACjD,8DAA4C;AAG5C,wDAAsC;AACtC,0DAAwC;AACxC,gEAA8C;AAC9C,qEAAmD;AACnD,qEAAmD;AACnD,uDAAqC;AACrC,kDAAgC;AAChC,uDAAqC;AACrC,6DAA2C;AAC3C,sDAAoC;AACpC,6DAA2C;AAC3C,0DAAwC;AACxC,mEAAiD;AACjD,sDAAoC;AACpC,+DAA6C;AAC7C,4DAA0C;AAC1C,4DAA0C;AAC1C,2DAAyC;AACzC,8DAA4C;AAC5C,iEAA+C;AAC/C,wDAAsC;AACtC,uDAAqC;AACrC,8DAA4C;AAC5C,+CAA6B;AAC7B,sDAAoC;AACpC,8DAA4C;AAC5C,0EAAwD;AACxD,0DAAwC;AACxC,6EAA2D;AAG3D,2DAAyC;AAGzC,4DAA0C;AAG1C,wDAAsC;AAGtC,yDAAuC;AACvC,iEAA+C;AAC/C,oEAAkD;AAClD,yDAAuC;AACvC,6DAA2C;AAC3C,kEAAgD;AAGhD,qDAAmC;AAGnC,qDAAmC;AAGnC,8DAA4C;AAG5C,8DAA4C;AAG5C,2DAAyC;AAGzC,0DAAwC;AAGxC,kDAAgC;AAChC,kDAAgC;AAGhC,yDAAuC;AACvC,8DAA4C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { McpReadOutcome, McpService } from '../../enum/mcp.enum';
|
|
2
|
+
import type { IMcpConnection } from './mcp-connection.model';
|
|
3
|
+
export interface IMcpConnectionRead {
|
|
4
|
+
id?: string;
|
|
5
|
+
connectionId: string;
|
|
6
|
+
service: McpService;
|
|
7
|
+
tool: string;
|
|
8
|
+
arguments: Record<string, unknown>;
|
|
9
|
+
outcome: McpReadOutcome;
|
|
10
|
+
itemCount: number | null;
|
|
11
|
+
durationMs: number;
|
|
12
|
+
requestId: string;
|
|
13
|
+
createdAt?: Date;
|
|
14
|
+
connection?: IMcpConnection;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-connection-read.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/mcp-connection-read.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { McpApprovalStatus, McpConnectionKind, McpFunctionalScope, McpRevokedReason, McpScopeType } from '../../enum/mcp.enum';
|
|
2
|
+
import type { IMcpConnectionRead } from './mcp-connection-read.model';
|
|
3
|
+
import type { IUser } from './user.model';
|
|
4
|
+
export interface IMcpConnection {
|
|
5
|
+
id?: string;
|
|
6
|
+
userId: string;
|
|
7
|
+
name: string;
|
|
8
|
+
kind: McpConnectionKind;
|
|
9
|
+
scopeType: McpScopeType;
|
|
10
|
+
scopeId: string | null;
|
|
11
|
+
functionalScopes: McpFunctionalScope[] | null;
|
|
12
|
+
tokenHash?: string | null;
|
|
13
|
+
tokenLast4: string | null;
|
|
14
|
+
approvalStatus: McpApprovalStatus;
|
|
15
|
+
approvedByUserId: string | null;
|
|
16
|
+
approvedAt: Date | null;
|
|
17
|
+
firstUsedAt: Date | null;
|
|
18
|
+
lastUsedAt: Date | null;
|
|
19
|
+
lastClientName: string | null;
|
|
20
|
+
lastClientVersion: string | null;
|
|
21
|
+
revokedAt: Date | null;
|
|
22
|
+
revokedByUserId: string | null;
|
|
23
|
+
revokedReason: McpRevokedReason | null;
|
|
24
|
+
createdAt?: Date;
|
|
25
|
+
updatedAt?: Date;
|
|
26
|
+
user?: IUser;
|
|
27
|
+
reads?: IMcpConnectionRead[];
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-connection.model.js","sourceRoot":"","sources":["../../../../src/types/interface/models/mcp-connection.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mcp_constants_1 = require("../../constants/mcp.constants");
|
|
4
|
+
const mcp_enum_1 = require("../enum/mcp.enum");
|
|
5
|
+
const MCP_SPEC_TOOL_NAME = /^[a-zA-Z0-9_-]{1,64}$/;
|
|
6
|
+
describe('ABYSS_MCP_TOOLS contract', () => {
|
|
7
|
+
it('declares one descriptor per AbyssMcpToolName, each name once', () => {
|
|
8
|
+
const names = mcp_constants_1.ABYSS_MCP_TOOLS.map((tool) => tool.name);
|
|
9
|
+
expect(new Set(names).size).toBe(names.length);
|
|
10
|
+
expect([...names].sort()).toEqual(Object.values(mcp_enum_1.AbyssMcpToolName).sort());
|
|
11
|
+
});
|
|
12
|
+
it.each(mcp_constants_1.ABYSS_MCP_TOOLS.map((tool) => [tool.name, tool]))('%s has a name both our pattern and the MCP specification accept, prefixed abyss_', (name) => {
|
|
13
|
+
expect(name).toMatch(mcp_constants_1.MCP_TOOL_NAME_PATTERN);
|
|
14
|
+
expect(name).toMatch(MCP_SPEC_TOOL_NAME);
|
|
15
|
+
expect(name.startsWith('abyss_')).toBe(true);
|
|
16
|
+
});
|
|
17
|
+
it.each(mcp_constants_1.ABYSS_MCP_TOOLS.map((tool) => [tool.name, tool]))('%s takes a closed object, is read-only and closed-world, under the abyss service', (_, tool) => {
|
|
18
|
+
expect(tool.inputSchema.type).toBe('object');
|
|
19
|
+
expect(tool.inputSchema.additionalProperties).toBe(false);
|
|
20
|
+
expect(tool.outputSchema.type).toBe('object');
|
|
21
|
+
expect(tool.annotations.readOnlyHint).toBe(true);
|
|
22
|
+
expect(tool.annotations.openWorldHint).toBe(false);
|
|
23
|
+
expect(tool.service).toBe(mcp_enum_1.McpService.ABYSS);
|
|
24
|
+
expect(tool.requiredScope).toBe(mcp_enum_1.McpFunctionalScope.ABYSS_READ);
|
|
25
|
+
expect(tool.title.trim().length).toBeGreaterThan(0);
|
|
26
|
+
expect(tool.description.trim().length).toBeGreaterThan(0);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
describe('MCP_TOOL_NAME_PATTERN', () => {
|
|
30
|
+
it('refuses a name without service prefix, with an upper-case letter, or longer than 64', () => {
|
|
31
|
+
expect('listscopes').not.toMatch(mcp_constants_1.MCP_TOOL_NAME_PATTERN);
|
|
32
|
+
expect('abyss_List').not.toMatch(mcp_constants_1.MCP_TOOL_NAME_PATTERN);
|
|
33
|
+
expect('abyss-list').not.toMatch(mcp_constants_1.MCP_TOOL_NAME_PATTERN);
|
|
34
|
+
expect(`abyss_${'a'.repeat(57)}`).not.toMatch(mcp_constants_1.MCP_TOOL_NAME_PATTERN);
|
|
35
|
+
});
|
|
36
|
+
it('accepts the longest name it allows, still within the MCP specification', () => {
|
|
37
|
+
const longest = `monitor_${'a'.repeat(56)}`;
|
|
38
|
+
expect(longest).toMatch(mcp_constants_1.MCP_TOOL_NAME_PATTERN);
|
|
39
|
+
expect(longest.length).toBe(64);
|
|
40
|
+
expect(longest).toMatch(MCP_SPEC_TOOL_NAME);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
describe('MCP connection constants', () => {
|
|
44
|
+
it('keeps the static token prefix and the active connection ceiling of the spec', () => {
|
|
45
|
+
expect(mcp_constants_1.MCP_STATIC_TOKEN_PREFIX).toBe('abys_mcp_');
|
|
46
|
+
expect(mcp_constants_1.MCP_CONNECTION_MAX_ACTIVE).toBe(20);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
const literalDescriptor = {
|
|
50
|
+
name: 'monitor_list_applications',
|
|
51
|
+
service: 'monitor',
|
|
52
|
+
title: 'List applications',
|
|
53
|
+
description: 'Lists the applications of a project.',
|
|
54
|
+
inputSchema: { type: 'object', additionalProperties: false, properties: {} },
|
|
55
|
+
outputSchema: { type: 'object' },
|
|
56
|
+
requiredScope: 'monitor:read',
|
|
57
|
+
annotations: { readOnlyHint: true, openWorldHint: false },
|
|
58
|
+
};
|
|
59
|
+
const acceptedDescriptor = literalDescriptor;
|
|
60
|
+
const unknownServiceDescriptor = {
|
|
61
|
+
...literalDescriptor,
|
|
62
|
+
service: 'billing',
|
|
63
|
+
};
|
|
64
|
+
const refusedService = unknownServiceDescriptor;
|
|
65
|
+
const unknownScopeDescriptor = {
|
|
66
|
+
...literalDescriptor,
|
|
67
|
+
requiredScope: 'monitor:write',
|
|
68
|
+
};
|
|
69
|
+
const refusedScope = unknownScopeDescriptor;
|
|
70
|
+
describe('IMcpToolDescriptor typing', () => {
|
|
71
|
+
it('accepts a descriptor written with string literals, as the monitor core writes them', () => {
|
|
72
|
+
expect(acceptedDescriptor.service).toBe(mcp_enum_1.McpService.MONITOR);
|
|
73
|
+
expect(acceptedDescriptor.requiredScope).toBe(mcp_enum_1.McpFunctionalScope.MONITOR_READ);
|
|
74
|
+
expect([refusedService.service, refusedScope.requiredScope]).toEqual([
|
|
75
|
+
'billing',
|
|
76
|
+
'monitor:write',
|
|
77
|
+
]);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=mcp-contract.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-contract.spec.js","sourceRoot":"","sources":["../../../src/types/tests/mcp-contract.spec.ts"],"names":[],"mappings":";;AAAA,iEAKuC;AACvC,+CAAoF;AAIpF,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,0BAA0B,EAAE,GAAG,EAAE;IACxC,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACtE,MAAM,KAAK,GAAG,+BAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC/C,MAAM,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,2BAAgB,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,IAAI,CAAC,+BAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAU,CAAC,CAAC,CAChE,kFAAkF,EAClF,CAAC,IAAI,EAAE,EAAE;QACP,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,qCAAqB,CAAC,CAAC;QAC5C,MAAM,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;QACzC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC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AAE,UAAU,EAAE,EAAE,EAAE;IAC5E,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAChC,aAAa,EAAE,cAAc;IAC7B,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE;CACjD,CAAC;AACX,MAAM,kBAAkB,GAAuB,iBAAiB,CAAC;AAEjE,MAAM,wBAAwB,GAAG;IAC/B,GAAG,iBAAiB;IACpB,OAAO,EAAE,SAAS;CACV,CAAC;AAEX,MAAM,cAAc,GAAuB,wBAAwB,CAAC;AAEpE,MAAM,sBAAsB,GAAG;IAC7B,GAAG,iBAAiB;IACpB,aAAa,EAAE,eAAe;CACtB,CAAC;AAEX,MAAM,YAAY,GAAuB,sBAAsB,CAAC;AAEhE,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,oFAAoF,EAAE,GAAG,EAAE;QAC5F,MAAM,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,qBAAU,CAAC,OAAO,CAAC,CAAC;QAC5D,MAAM,CAAC,kBAAkB,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,6BAAkB,CAAC,YAAY,CAAC,CAAC;QAC/E,MAAM,CAAC,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC;YACnE,SAAS;YACT,eAAe;SAChB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abyss-project/main",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.2.0",
|
|
4
4
|
"description": "Core package to interact with Abyss-Project",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"homepage": "https://gitlab.com/abyss-group",
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@casl/ability": "^6.8.0",
|
|
51
|
+
"@types/json-schema": "^7.0.15",
|
|
51
52
|
"axios": "^1.6.0",
|
|
52
53
|
"axios-retry": "^4.5.0",
|
|
53
54
|
"byte-size": "^8.1.0",
|