@relaycast/mcp 0.2.2 → 0.2.4
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/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +45 -12
- package/dist/server.js.map +1 -1
- package/dist/smithery.d.ts +55 -0
- package/dist/smithery.d.ts.map +1 -0
- package/dist/smithery.js +34 -0
- package/dist/smithery.js.map +1 -0
- package/dist/tools/channels.d.ts.map +1 -1
- package/dist/tools/channels.js +79 -30
- package/dist/tools/channels.js.map +1 -1
- package/dist/tools/features.d.ts.map +1 -1
- package/dist/tools/features.js +87 -27
- package/dist/tools/features.js.map +1 -1
- package/dist/tools/messaging.d.ts.map +1 -1
- package/dist/tools/messaging.js +81 -30
- package/dist/tools/messaging.js.map +1 -1
- package/dist/tools/programmability.d.ts.map +1 -1
- package/dist/tools/programmability.js +148 -50
- package/dist/tools/programmability.js.map +1 -1
- package/dist/tools/registration.d.ts.map +1 -1
- package/dist/tools/registration.js +36 -18
- package/dist/tools/registration.js.map +1 -1
- package/dist/transports.d.ts +11 -1
- package/dist/transports.d.ts.map +1 -1
- package/dist/transports.js +9 -3
- package/dist/transports.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +8 -1
- package/dist/types.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { createRelayMcpServer, MCP_VERSION } from './server.js';
|
|
2
2
|
export type { McpServerOptions } from './server.js';
|
|
3
3
|
export { startStdio, createHttpHandler } from './transports.js';
|
|
4
|
+
export type { SessionLifecycle } from './transports.js';
|
|
4
5
|
export { DEFAULT_SYSTEM_PROMPT } from './prompts.js';
|
|
5
6
|
export type { SessionState } from './types.js';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAChE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAChE,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAChE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAcpE,OAAO,EAAsB,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEvE,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACtC,SAAS,CAAC,EAAE,YAAY,CAAC;CAC1B;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,CA8IzE"}
|
package/dist/server.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
2
3
|
import { Relay, WsClient } from '@relaycast/sdk';
|
|
3
4
|
import { registerRegistrationTools } from './tools/registration.js';
|
|
4
5
|
import { registerChannelTools } from './tools/channels.js';
|
|
@@ -45,20 +46,38 @@ export function createRelayMcpServer(options) {
|
|
|
45
46
|
session.wsBridge = null;
|
|
46
47
|
session.subscriptions = null;
|
|
47
48
|
}
|
|
49
|
+
if (shouldResetBridge) {
|
|
50
|
+
session.wsInitAttempted = false;
|
|
51
|
+
}
|
|
48
52
|
// When an agent token is set, initialize the WebSocket bridge.
|
|
49
|
-
if (nextAgentToken && !session.wsBridge) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
const wsBridge = new WsBridge(wsClient, subscriptions, (uri) => {
|
|
56
|
-
mcpServer.server.sendResourceUpdated({ uri }).catch(() => {
|
|
57
|
-
// Silently ignore notification failures
|
|
53
|
+
if (nextAgentToken && !session.wsBridge && !session.wsInitAttempted) {
|
|
54
|
+
try {
|
|
55
|
+
const subscriptions = new SubscriptionManager();
|
|
56
|
+
const wsClient = new WsClient({
|
|
57
|
+
token: nextAgentToken,
|
|
58
|
+
baseUrl: options.baseUrl,
|
|
58
59
|
});
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
const wsBridge = new WsBridge(wsClient, subscriptions, (uri) => {
|
|
61
|
+
mcpServer.server.sendResourceUpdated({ uri }).catch(() => {
|
|
62
|
+
// Silently ignore notification failures
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
wsBridge.start();
|
|
66
|
+
Object.assign(session, partial, {
|
|
67
|
+
wsBridge,
|
|
68
|
+
subscriptions,
|
|
69
|
+
wsInitAttempted: true,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
// In non-WS runtimes (e.g. some test environments), keep session usable
|
|
74
|
+
// without real-time resource updates.
|
|
75
|
+
Object.assign(session, partial, {
|
|
76
|
+
wsBridge: null,
|
|
77
|
+
subscriptions: null,
|
|
78
|
+
wsInitAttempted: true,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
62
81
|
telemetry.capture('relaycast_mcp_session_authenticated', {
|
|
63
82
|
source_surface: 'mcp',
|
|
64
83
|
agent_name: nextAgentName,
|
|
@@ -86,6 +105,20 @@ export function createRelayMcpServer(options) {
|
|
|
86
105
|
registerProgrammabilityTools(mcpServer, getRelay, getAgentClient);
|
|
87
106
|
// Register system prompt
|
|
88
107
|
registerSystemPrompt(mcpServer);
|
|
108
|
+
const handlers = mcpServer.server._requestHandlers;
|
|
109
|
+
const origToolsListHandler = handlers.get('tools/list');
|
|
110
|
+
if (origToolsListHandler) {
|
|
111
|
+
mcpServer.server.setRequestHandler(ListToolsRequestSchema, async (req, extra) => {
|
|
112
|
+
const result = (await origToolsListHandler(req, extra));
|
|
113
|
+
if (result?.tools) {
|
|
114
|
+
result.tools = result.tools.map(t => {
|
|
115
|
+
const { execution, outputSchema, _meta, ...clean } = t;
|
|
116
|
+
return clean;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return result;
|
|
120
|
+
});
|
|
121
|
+
}
|
|
89
122
|
return mcpServer;
|
|
90
123
|
}
|
|
91
124
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAe,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAqB,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EA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AoB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAChD,sBAAsB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAClD,oBAAoB,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IAChD,4BAA4B,CAAC,SAAS,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IAElE,yBAAyB;IACzB,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAShC,MAAM,QAAQ,GAAI,SAAS,CAAC,MAA6D,CAAC,gBAAgB,CAAC;IAC3G,MAAM,oBAAoB,GAAG,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACxD,IAAI,oBAAoB,EAAE,CAAC;QACzB,SAAS,CAAC,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE;YAC9E,MAAM,MAAM,GAAG,CAAC,MAAM,oBAAoB,CAAC,GAAG,EAAE,KAAK,CAAC,CAA0C,CAAC;YACjG,IAAI,MAAM,EAAE,KAAK,EAAE,CAAC;gBAClB,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;oBAClC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,GAAG,CAAC,CAAC;oBACvD,OAAO,KAAK,CAAC;gBACf,CAAC,CAAC,CAAC;YACL,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Smithery config schema – exposed to the Smithery registry so it can
|
|
4
|
+
* auto-generate a configuration form and validate user input.
|
|
5
|
+
*
|
|
6
|
+
* Both fields are optional: callers can set a workspace key at runtime
|
|
7
|
+
* via the `set_workspace_key` / `create_workspace` tools instead.
|
|
8
|
+
*/
|
|
9
|
+
export declare const configSchema: z.ZodObject<{
|
|
10
|
+
relayApiKey: z.ZodOptional<z.ZodString>;
|
|
11
|
+
relayBaseUrl: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
/**
|
|
14
|
+
* Smithery entry point.
|
|
15
|
+
*
|
|
16
|
+
* Smithery calls this function with validated config and expects a
|
|
17
|
+
* low-level `Server` instance from @modelcontextprotocol/sdk.
|
|
18
|
+
*/
|
|
19
|
+
export default function createServer(context: {
|
|
20
|
+
config: z.infer<typeof configSchema>;
|
|
21
|
+
}): import("@modelcontextprotocol/sdk/server").Server<{
|
|
22
|
+
method: string;
|
|
23
|
+
params?: {
|
|
24
|
+
[x: string]: unknown;
|
|
25
|
+
_meta?: {
|
|
26
|
+
[x: string]: unknown;
|
|
27
|
+
progressToken?: string | number | undefined;
|
|
28
|
+
"io.modelcontextprotocol/related-task"?: {
|
|
29
|
+
taskId: string;
|
|
30
|
+
} | undefined;
|
|
31
|
+
} | undefined;
|
|
32
|
+
} | undefined;
|
|
33
|
+
}, {
|
|
34
|
+
method: string;
|
|
35
|
+
params?: {
|
|
36
|
+
[x: string]: unknown;
|
|
37
|
+
_meta?: {
|
|
38
|
+
[x: string]: unknown;
|
|
39
|
+
progressToken?: string | number | undefined;
|
|
40
|
+
"io.modelcontextprotocol/related-task"?: {
|
|
41
|
+
taskId: string;
|
|
42
|
+
} | undefined;
|
|
43
|
+
} | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
}, {
|
|
46
|
+
[x: string]: unknown;
|
|
47
|
+
_meta?: {
|
|
48
|
+
[x: string]: unknown;
|
|
49
|
+
progressToken?: string | number | undefined;
|
|
50
|
+
"io.modelcontextprotocol/related-task"?: {
|
|
51
|
+
taskId: string;
|
|
52
|
+
} | undefined;
|
|
53
|
+
} | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
//# sourceMappingURL=smithery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smithery.d.ts","sourceRoot":"","sources":["../src/smithery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;GAMG;AACH,eAAO,MAAM,YAAY;;;iBAavB,CAAC;AAEH;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,OAAO,EAAE;IAC5C,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;CACtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQA"}
|
package/dist/smithery.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { createRelayMcpServer } from './server.js';
|
|
3
|
+
/**
|
|
4
|
+
* Smithery config schema – exposed to the Smithery registry so it can
|
|
5
|
+
* auto-generate a configuration form and validate user input.
|
|
6
|
+
*
|
|
7
|
+
* Both fields are optional: callers can set a workspace key at runtime
|
|
8
|
+
* via the `set_workspace_key` / `create_workspace` tools instead.
|
|
9
|
+
*/
|
|
10
|
+
export const configSchema = z.object({
|
|
11
|
+
relayApiKey: z
|
|
12
|
+
.string()
|
|
13
|
+
.optional()
|
|
14
|
+
.describe('Workspace API key (rk_live_...) used to pre-authenticate the MCP session.'),
|
|
15
|
+
relayBaseUrl: z
|
|
16
|
+
.string()
|
|
17
|
+
.optional()
|
|
18
|
+
.describe('Override API base URL for self-hosted Relaycast deployments (defaults to https://api.relaycast.dev).'),
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Smithery entry point.
|
|
22
|
+
*
|
|
23
|
+
* Smithery calls this function with validated config and expects a
|
|
24
|
+
* low-level `Server` instance from @modelcontextprotocol/sdk.
|
|
25
|
+
*/
|
|
26
|
+
export default function createServer(context) {
|
|
27
|
+
const mcpServer = createRelayMcpServer({
|
|
28
|
+
apiKey: context.config.relayApiKey,
|
|
29
|
+
baseUrl: context.config.relayBaseUrl,
|
|
30
|
+
telemetryTransport: 'stdio',
|
|
31
|
+
});
|
|
32
|
+
return mcpServer.server;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=smithery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smithery.js","sourceRoot":"","sources":["../src/smithery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,2EAA2E,CAC5E;IACH,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,sGAAsG,CACvG;CACJ,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,OAEpC;IACC,MAAM,SAAS,GAAG,oBAAoB,CAAC;QACrC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW;QAClC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,YAAY;QACpC,kBAAkB,EAAE,OAAO;KAC5B,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC,MAAM,CAAC;AAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../src/tools/channels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../src/tools/channels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAK7C,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,cAAc,EAAE,MAAM,WAAW,GAChC,IAAI,CAsKN"}
|
package/dist/tools/channels.js
CHANGED
|
@@ -1,86 +1,135 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
/** Passthrough object schema for dynamic API responses. */
|
|
3
|
+
const jsonResult = z.object({}).passthrough();
|
|
2
4
|
export function registerChannelTools(server, getAgentClient) {
|
|
3
|
-
// Tool 3: create_channel
|
|
4
5
|
server.registerTool('create_channel', {
|
|
5
|
-
|
|
6
|
+
title: 'Create Channel',
|
|
7
|
+
description: 'Create a new communication channel in the workspace. Channels are the primary way for agents to broadcast and receive messages in a shared context. Channel names must be lowercase with no spaces, similar to Slack channel naming conventions. Optionally set an initial topic to describe the channel\'s purpose.',
|
|
6
8
|
inputSchema: {
|
|
7
|
-
name: z.string().describe('
|
|
8
|
-
topic: z.string().optional().describe('
|
|
9
|
+
name: z.string().describe('Unique channel name using lowercase letters, numbers, and hyphens (e.g. "build-alerts", "team-chat")'),
|
|
10
|
+
topic: z.string().optional().describe('Short description of the channel\'s purpose, visible to all members when they view channel details'),
|
|
9
11
|
},
|
|
12
|
+
outputSchema: jsonResult,
|
|
13
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
10
14
|
}, async ({ name, topic }) => {
|
|
11
15
|
const client = getAgentClient();
|
|
12
16
|
const channel = await client.channels.create({ name, topic });
|
|
13
|
-
return {
|
|
17
|
+
return {
|
|
18
|
+
content: [{ type: 'text', text: JSON.stringify(channel, null, 2) }],
|
|
19
|
+
structuredContent: channel,
|
|
20
|
+
};
|
|
14
21
|
});
|
|
15
|
-
// Tool 4: list_channels
|
|
16
22
|
server.registerTool('list_channels', {
|
|
17
|
-
|
|
23
|
+
title: 'List Channels',
|
|
24
|
+
description: 'List all channels available in the workspace. Returns each channel\'s name, topic, member count, and creation date. By default only active channels are shown; set include_archived to true to also see archived channels.',
|
|
18
25
|
inputSchema: {
|
|
19
|
-
include_archived: z.boolean().optional().describe('
|
|
26
|
+
include_archived: z.boolean().optional().describe('When true, include archived channels in the response alongside active ones'),
|
|
27
|
+
},
|
|
28
|
+
outputSchema: {
|
|
29
|
+
channels: z.array(z.object({}).passthrough()).describe('Array of channel objects with name, topic, and member details'),
|
|
20
30
|
},
|
|
31
|
+
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
21
32
|
}, async ({ include_archived }) => {
|
|
22
33
|
const client = getAgentClient();
|
|
23
34
|
const channels = await client.channels.list(include_archived ? { include_archived } : undefined);
|
|
24
35
|
return {
|
|
25
36
|
content: [{ type: 'text', text: JSON.stringify(channels, null, 2) }],
|
|
37
|
+
structuredContent: { channels: channels },
|
|
26
38
|
};
|
|
27
39
|
});
|
|
28
|
-
// Tool 5: join_channel
|
|
29
40
|
server.registerTool('join_channel', {
|
|
30
|
-
|
|
41
|
+
title: 'Join Channel',
|
|
42
|
+
description: 'Join an existing channel to start receiving its messages. The agent will appear in the channel\'s member list and can post messages after joining. This operation is idempotent — joining a channel you are already a member of has no effect.',
|
|
31
43
|
inputSchema: {
|
|
32
|
-
channel: z.string().describe('
|
|
44
|
+
channel: z.string().describe('Name of the channel to join (e.g. "general", "build-alerts")'),
|
|
33
45
|
},
|
|
46
|
+
outputSchema: {
|
|
47
|
+
message: z.string().describe('Confirmation message indicating the channel was joined'),
|
|
48
|
+
},
|
|
49
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
34
50
|
}, async ({ channel }) => {
|
|
35
51
|
const client = getAgentClient();
|
|
36
52
|
await client.channels.join(channel);
|
|
37
|
-
|
|
53
|
+
const message = `Joined channel #${channel}`;
|
|
54
|
+
return {
|
|
55
|
+
content: [{ type: 'text', text: message }],
|
|
56
|
+
structuredContent: { message },
|
|
57
|
+
};
|
|
38
58
|
});
|
|
39
|
-
// Tool 6: leave_channel
|
|
40
59
|
server.registerTool('leave_channel', {
|
|
41
|
-
|
|
60
|
+
title: 'Leave Channel',
|
|
61
|
+
description: 'Leave a channel to stop receiving its messages. The agent is removed from the channel\'s member list but the channel and its history are preserved. You can rejoin at any time. This operation is idempotent — leaving a channel you are not a member of has no effect.',
|
|
42
62
|
inputSchema: {
|
|
43
|
-
channel: z.string().describe('
|
|
63
|
+
channel: z.string().describe('Name of the channel to leave (e.g. "general", "build-alerts")'),
|
|
64
|
+
},
|
|
65
|
+
outputSchema: {
|
|
66
|
+
message: z.string().describe('Confirmation message indicating the channel was left'),
|
|
44
67
|
},
|
|
68
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
45
69
|
}, async ({ channel }) => {
|
|
46
70
|
const client = getAgentClient();
|
|
47
71
|
await client.channels.leave(channel);
|
|
48
|
-
|
|
72
|
+
const message = `Left channel #${channel}`;
|
|
73
|
+
return {
|
|
74
|
+
content: [{ type: 'text', text: message }],
|
|
75
|
+
structuredContent: { message },
|
|
76
|
+
};
|
|
49
77
|
});
|
|
50
|
-
// Tool 7: invite_to_channel
|
|
51
78
|
server.registerTool('invite_to_channel', {
|
|
52
|
-
|
|
79
|
+
title: 'Invite to Channel',
|
|
80
|
+
description: 'Invite another agent to join a channel. The invited agent is automatically added as a member and will begin receiving messages from the channel. This is useful for onboarding new agents into specific conversations or workflows.',
|
|
53
81
|
inputSchema: {
|
|
54
|
-
channel: z.string().describe('
|
|
55
|
-
agent: z.string().describe('
|
|
82
|
+
channel: z.string().describe('Name of the channel to invite the agent to (e.g. "general", "build-alerts")'),
|
|
83
|
+
agent: z.string().describe('Name of the registered agent to invite into the channel'),
|
|
56
84
|
},
|
|
85
|
+
outputSchema: {
|
|
86
|
+
message: z.string().describe('Confirmation message indicating the agent was invited'),
|
|
87
|
+
},
|
|
88
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
57
89
|
}, async ({ channel, agent }) => {
|
|
58
90
|
const client = getAgentClient();
|
|
59
91
|
await client.channels.invite(channel, agent);
|
|
60
|
-
|
|
92
|
+
const message = `Invited ${agent} to #${channel}`;
|
|
93
|
+
return {
|
|
94
|
+
content: [{ type: 'text', text: message }],
|
|
95
|
+
structuredContent: { message },
|
|
96
|
+
};
|
|
61
97
|
});
|
|
62
|
-
// Tool 8: set_channel_topic
|
|
63
98
|
server.registerTool('set_channel_topic', {
|
|
64
|
-
|
|
99
|
+
title: 'Set Channel Topic',
|
|
100
|
+
description: 'Update the topic description for a channel. The topic is a short text visible to all members that describes the channel\'s current purpose or focus. Changing the topic does not send a notification to channel members.',
|
|
65
101
|
inputSchema: {
|
|
66
|
-
channel: z.string().describe('
|
|
67
|
-
topic: z.string().describe('New topic text'),
|
|
102
|
+
channel: z.string().describe('Name of the channel whose topic should be updated'),
|
|
103
|
+
topic: z.string().describe('New topic text describing the channel\'s purpose or current focus'),
|
|
68
104
|
},
|
|
105
|
+
outputSchema: jsonResult,
|
|
106
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
69
107
|
}, async ({ channel, topic }) => {
|
|
70
108
|
const client = getAgentClient();
|
|
71
109
|
const updated = await client.channels.setTopic(channel, topic);
|
|
72
|
-
return {
|
|
110
|
+
return {
|
|
111
|
+
content: [{ type: 'text', text: JSON.stringify(updated, null, 2) }],
|
|
112
|
+
structuredContent: updated,
|
|
113
|
+
};
|
|
73
114
|
});
|
|
74
|
-
// Tool 9: archive_channel
|
|
75
115
|
server.registerTool('archive_channel', {
|
|
76
|
-
|
|
116
|
+
title: 'Archive Channel',
|
|
117
|
+
description: 'Archive a channel to remove it from the active channel list. Archived channels preserve their full message history but no new messages can be posted. This is a soft delete — the channel can be restored later if needed. Use this to clean up channels that are no longer in use.',
|
|
77
118
|
inputSchema: {
|
|
78
|
-
channel: z.string().describe('
|
|
119
|
+
channel: z.string().describe('Name of the channel to archive (e.g. "old-project", "temp-discussion")'),
|
|
120
|
+
},
|
|
121
|
+
outputSchema: {
|
|
122
|
+
message: z.string().describe('Confirmation message indicating the channel was archived'),
|
|
79
123
|
},
|
|
124
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
|
|
80
125
|
}, async ({ channel }) => {
|
|
81
126
|
const client = getAgentClient();
|
|
82
127
|
await client.channels.archive(channel);
|
|
83
|
-
|
|
128
|
+
const message = `Archived channel #${channel}`;
|
|
129
|
+
return {
|
|
130
|
+
content: [{ type: 'text', text: message }],
|
|
131
|
+
structuredContent: { message },
|
|
132
|
+
};
|
|
84
133
|
});
|
|
85
134
|
}
|
|
86
135
|
//# sourceMappingURL=channels.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channels.js","sourceRoot":"","sources":["../../src/tools/channels.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,cAAiC;IAEjC,
|
|
1
|
+
{"version":3,"file":"channels.js","sourceRoot":"","sources":["../../src/tools/channels.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,2DAA2D;AAC3D,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAE9C,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,cAAiC;IAEjC,MAAM,CAAC,YAAY,CACjB,gBAAgB,EAChB;QACE,KAAK,EAAE,gBAAgB;QACvB,WAAW,EAAE,sTAAsT;QACnU,WAAW,EAAE;YACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sGAAsG,CAAC;YACjI,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oGAAoG,CAAC;SAC5I;Q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;QACxB,WAAW,EAAE,qRAAqR;QAClS,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wEAAwE,CAAC;SACvG;QACD,YAAY,EAAE;YACZ,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;SACzF;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;KACvG,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QACpB,MAAM,MAAM,GAAG,cAAc,EAAE,CAAC;QAChC,MAAM,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvC,MAAM,OAAO,GAAG,qBAAqB,OAAO,EAAE,CAAC;QAC/C,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;YAC1C,iBAAiB,EAAE,EAAE,OAAO,EAAE;SAC/B,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/tools/features.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/tools/features.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKlD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,cAAc,EAAE,MAAM,WAAW,GAChC,IAAI,CA2IN"}
|
package/dist/tools/features.js
CHANGED
|
@@ -1,78 +1,138 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
/** Passthrough object schema for dynamic API responses. */
|
|
3
|
+
const jsonResult = z.object({}).passthrough();
|
|
2
4
|
export function registerFeatureTools(server, getAgentClient) {
|
|
3
5
|
server.registerTool('add_reaction', {
|
|
4
|
-
|
|
6
|
+
title: 'Add Reaction',
|
|
7
|
+
description: 'Add an emoji reaction to a message. Reactions are a lightweight way for agents to acknowledge, vote on, or express sentiment about messages without posting a reply. Each agent can add multiple different emoji reactions to the same message. Adding a reaction that already exists from the same agent has no effect.',
|
|
5
8
|
inputSchema: {
|
|
6
|
-
message_id: z.string().describe('
|
|
7
|
-
emoji: z.string().describe('Emoji to react with'),
|
|
9
|
+
message_id: z.string().describe('ID of the message to react to'),
|
|
10
|
+
emoji: z.string().describe('Emoji character or shortcode to react with (e.g. "thumbsup", "rocket", "check")'),
|
|
8
11
|
},
|
|
12
|
+
outputSchema: {
|
|
13
|
+
message: z.string().describe('Confirmation message indicating the reaction was added'),
|
|
14
|
+
},
|
|
15
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
9
16
|
}, async ({ message_id, emoji }) => {
|
|
10
17
|
const client = getAgentClient();
|
|
11
18
|
await client.react(message_id, emoji);
|
|
12
|
-
|
|
19
|
+
const message = `Reacted with ${emoji}`;
|
|
20
|
+
return {
|
|
21
|
+
content: [{ type: 'text', text: message }],
|
|
22
|
+
structuredContent: { message },
|
|
23
|
+
};
|
|
13
24
|
});
|
|
14
25
|
server.registerTool('remove_reaction', {
|
|
15
|
-
|
|
26
|
+
title: 'Remove Reaction',
|
|
27
|
+
description: 'Remove a previously added emoji reaction from a message. Only reactions added by the current agent can be removed. This is useful for correcting accidental reactions or changing your response to a message.',
|
|
16
28
|
inputSchema: {
|
|
17
|
-
message_id: z.string().describe('
|
|
18
|
-
emoji: z.string().describe('Emoji to remove'),
|
|
29
|
+
message_id: z.string().describe('ID of the message to remove the reaction from'),
|
|
30
|
+
emoji: z.string().describe('Emoji character or shortcode to remove (must match a reaction previously added by this agent)'),
|
|
31
|
+
},
|
|
32
|
+
outputSchema: {
|
|
33
|
+
message: z.string().describe('Confirmation message indicating the reaction was removed'),
|
|
19
34
|
},
|
|
35
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
20
36
|
}, async ({ message_id, emoji }) => {
|
|
21
37
|
const client = getAgentClient();
|
|
22
38
|
await client.unreact(message_id, emoji);
|
|
23
|
-
|
|
39
|
+
const message = `Removed reaction ${emoji}`;
|
|
40
|
+
return {
|
|
41
|
+
content: [{ type: 'text', text: message }],
|
|
42
|
+
structuredContent: { message },
|
|
43
|
+
};
|
|
24
44
|
});
|
|
25
45
|
server.registerTool('search_messages', {
|
|
26
|
-
|
|
46
|
+
title: 'Search Messages',
|
|
47
|
+
description: 'Search for messages across all channels in the workspace using a text query. Results can be filtered by channel name or sender agent to narrow down matches. Returns matching messages with their channel, author, text content, and timestamp.',
|
|
27
48
|
inputSchema: {
|
|
28
|
-
query: z.string().describe('
|
|
29
|
-
channel: z.string().optional().describe('
|
|
30
|
-
from: z.string().optional().describe('
|
|
31
|
-
limit: z.number().optional().describe('
|
|
49
|
+
query: z.string().describe('Text search query to match against message content'),
|
|
50
|
+
channel: z.string().optional().describe('Restrict search results to messages in this channel only'),
|
|
51
|
+
from: z.string().optional().describe('Restrict search results to messages sent by this agent name'),
|
|
52
|
+
limit: z.number().optional().describe('Maximum number of search results to return'),
|
|
32
53
|
},
|
|
54
|
+
outputSchema: {
|
|
55
|
+
results: z.array(z.object({}).passthrough()).describe('Array of matching message objects'),
|
|
56
|
+
},
|
|
57
|
+
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
33
58
|
}, async ({ query, channel, from, limit }) => {
|
|
34
59
|
const client = getAgentClient();
|
|
35
60
|
const results = await client.search(query, { channel, from, limit });
|
|
36
|
-
return {
|
|
61
|
+
return {
|
|
62
|
+
content: [{ type: 'text', text: JSON.stringify(results, null, 2) }],
|
|
63
|
+
structuredContent: { results: results },
|
|
64
|
+
};
|
|
37
65
|
});
|
|
38
66
|
server.registerTool('check_inbox', {
|
|
39
|
-
|
|
67
|
+
title: 'Check Inbox',
|
|
68
|
+
description: 'Check the current agent\'s inbox for unread messages, @mentions, and direct messages. The inbox aggregates all notifications across channels and DMs into a single view. Use this to stay up-to-date on conversations that require your attention.',
|
|
69
|
+
inputSchema: {
|
|
70
|
+
limit: z.number().optional().describe('Maximum number of inbox items to return'),
|
|
71
|
+
},
|
|
72
|
+
outputSchema: jsonResult,
|
|
73
|
+
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
40
74
|
}, async () => {
|
|
41
75
|
const client = getAgentClient();
|
|
42
76
|
const inbox = await client.inbox();
|
|
43
|
-
return {
|
|
77
|
+
return {
|
|
78
|
+
content: [{ type: 'text', text: JSON.stringify(inbox, null, 2) }],
|
|
79
|
+
structuredContent: inbox,
|
|
80
|
+
};
|
|
44
81
|
});
|
|
45
82
|
server.registerTool('mark_read', {
|
|
46
|
-
|
|
83
|
+
title: 'Mark as Read',
|
|
84
|
+
description: 'Mark a specific message as read by the current agent. This updates the agent\'s read receipt for the message, which other agents can query using get_readers. Marking a message as read also clears it from the agent\'s inbox notifications.',
|
|
47
85
|
inputSchema: {
|
|
48
|
-
message_id: z.string().describe('
|
|
86
|
+
message_id: z.string().describe('ID of the message to mark as read by the current agent'),
|
|
87
|
+
},
|
|
88
|
+
outputSchema: {
|
|
89
|
+
message: z.string().describe('Confirmation message indicating the message was marked as read'),
|
|
49
90
|
},
|
|
91
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
50
92
|
}, async ({ message_id }) => {
|
|
51
93
|
const client = getAgentClient();
|
|
52
94
|
await client.markRead(message_id);
|
|
53
|
-
|
|
95
|
+
const message = `Marked message ${message_id} as read`;
|
|
96
|
+
return {
|
|
97
|
+
content: [{ type: 'text', text: message }],
|
|
98
|
+
structuredContent: { message },
|
|
99
|
+
};
|
|
54
100
|
});
|
|
55
101
|
server.registerTool('get_readers', {
|
|
56
|
-
|
|
102
|
+
title: 'Get Readers',
|
|
103
|
+
description: 'Get the list of agents who have read a specific message. Returns each reader\'s agent name and the timestamp when they marked the message as read. This is useful for confirming that important messages have been seen by their intended audience.',
|
|
57
104
|
inputSchema: {
|
|
58
|
-
message_id: z.string().describe('
|
|
105
|
+
message_id: z.string().describe('ID of the message to check read receipts for'),
|
|
106
|
+
},
|
|
107
|
+
outputSchema: {
|
|
108
|
+
readers: z.array(z.object({}).passthrough()).describe('Array of reader objects with agent name and read timestamp'),
|
|
59
109
|
},
|
|
110
|
+
annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: true },
|
|
60
111
|
}, async ({ message_id }) => {
|
|
61
112
|
const client = getAgentClient();
|
|
62
113
|
const readers = await client.readers(message_id);
|
|
63
|
-
return {
|
|
114
|
+
return {
|
|
115
|
+
content: [{ type: 'text', text: JSON.stringify(readers, null, 2) }],
|
|
116
|
+
structuredContent: { readers: readers },
|
|
117
|
+
};
|
|
64
118
|
});
|
|
65
119
|
server.registerTool('upload_file', {
|
|
66
|
-
|
|
120
|
+
title: 'Upload File',
|
|
121
|
+
description: 'Upload a file to the workspace and receive an attachment ID that can be used when posting messages. Files are stored securely and can be shared across channels and DMs. Provide the filename, MIME type, and size in bytes to initiate the upload. The returned attachment ID should be passed to post_message or send_dm to attach the file.',
|
|
67
122
|
inputSchema: {
|
|
68
|
-
filename: z.string().describe('
|
|
69
|
-
content_type: z.string().describe('MIME type (e.g. text/plain, image/png)'),
|
|
70
|
-
size_bytes: z.number().describe('
|
|
123
|
+
filename: z.string().describe('Name of the file including extension (e.g. "report.pdf", "screenshot.png")'),
|
|
124
|
+
content_type: z.string().describe('MIME type of the file content (e.g. "text/plain", "image/png", "application/pdf")'),
|
|
125
|
+
size_bytes: z.number().describe('Size of the file in bytes, used for upload validation and storage allocation'),
|
|
71
126
|
},
|
|
127
|
+
outputSchema: jsonResult,
|
|
128
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
72
129
|
}, async ({ filename, content_type, size_bytes }) => {
|
|
73
130
|
const client = getAgentClient();
|
|
74
131
|
const upload = await client.files.upload({ filename, content_type, size_bytes });
|
|
75
|
-
return {
|
|
132
|
+
return {
|
|
133
|
+
content: [{ type: 'text', text: JSON.stringify(upload, null, 2) }],
|
|
134
|
+
structuredContent: upload,
|
|
135
|
+
};
|
|
76
136
|
});
|
|
77
137
|
}
|
|
78
138
|
//# sourceMappingURL=features.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features.js","sourceRoot":"","sources":["../../src/tools/features.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,cAAiC;IAEjC,MAAM,CAAC,YAAY,CAAC,cAAc,EAAE;QAClC,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"features.js","sourceRoot":"","sources":["../../src/tools/features.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,2DAA2D;AAC3D,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AAE9C,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,cAAiC;IAEjC,MAAM,CAAC,YAAY,CAAC,cAAc,EAAE;QAClC,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,0TAA0T;QACvU,WAAW,EAAE;YACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,+BAA+B,CAAC;YAChE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iFAAiF,CAAC;SAC9G;QACD,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