@beeper/desktop-mcp 4.2.3 → 4.6.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/LICENSE +1 -1
- package/README.md +18 -199
- package/auth.d.mts +6 -0
- package/auth.d.mts.map +1 -0
- package/auth.d.ts +6 -0
- package/auth.d.ts.map +1 -0
- package/auth.js +37 -0
- package/auth.js.map +1 -0
- package/auth.mjs +32 -0
- package/auth.mjs.map +1 -0
- package/code-tool-types.d.mts +7 -7
- package/code-tool-types.d.mts.map +1 -1
- package/code-tool-types.d.ts +7 -7
- package/code-tool-types.d.ts.map +1 -1
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +103 -19
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +103 -19
- package/code-tool-worker.mjs.map +1 -1
- package/code-tool.d.mts +12 -3
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts +12 -3
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +276 -95
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +273 -95
- package/code-tool.mjs.map +1 -1
- package/http.d.mts +6 -9
- package/http.d.mts.map +1 -1
- package/http.d.ts +6 -9
- package/http.d.ts.map +1 -1
- package/http.js +81 -47
- package/http.js.map +1 -1
- package/http.mjs +80 -43
- package/http.mjs.map +1 -1
- package/index.js +19 -50
- package/index.js.map +1 -1
- package/index.mjs +19 -50
- package/index.mjs.map +1 -1
- package/instructions.d.mts +2 -0
- package/instructions.d.mts.map +1 -0
- package/instructions.d.ts +2 -0
- package/instructions.d.ts.map +1 -0
- package/instructions.js +48 -0
- package/instructions.js.map +1 -0
- package/instructions.mjs +45 -0
- package/instructions.mjs.map +1 -0
- package/logger.d.mts +7 -0
- package/logger.d.mts.map +1 -0
- package/logger.d.ts +7 -0
- package/logger.d.ts.map +1 -0
- package/logger.js +29 -0
- package/logger.js.map +1 -0
- package/logger.mjs +22 -0
- package/logger.mjs.map +1 -0
- package/methods.d.mts +10 -0
- package/methods.d.mts.map +1 -0
- package/methods.d.ts +10 -0
- package/methods.d.ts.map +1 -0
- package/methods.js +203 -0
- package/methods.js.map +1 -0
- package/methods.mjs +199 -0
- package/methods.mjs.map +1 -0
- package/options.d.mts +9 -10
- package/options.d.mts.map +1 -1
- package/options.d.ts +9 -10
- package/options.d.ts.map +1 -1
- package/options.js +52 -363
- package/options.js.map +1 -1
- package/options.mjs +52 -363
- package/options.mjs.map +1 -1
- package/package.json +68 -82
- package/server.d.mts +10 -16
- package/server.d.mts.map +1 -1
- package/server.d.ts +10 -16
- package/server.d.ts.map +1 -1
- package/server.js +82 -105
- package/server.js.map +1 -1
- package/server.mjs +81 -100
- package/server.mjs.map +1 -1
- package/src/auth.ts +42 -0
- package/src/code-tool-types.ts +8 -5
- package/src/code-tool-worker.ts +118 -34
- package/src/code-tool.ts +359 -118
- package/src/http.ts +99 -50
- package/src/index.ts +22 -63
- package/src/instructions.ts +67 -0
- package/src/logger.ts +28 -0
- package/src/methods.ts +224 -0
- package/src/options.ts +69 -390
- package/src/server.ts +95 -121
- package/src/stdio.ts +6 -5
- package/src/{tools/types.ts → types.ts} +25 -5
- package/src/util.ts +25 -0
- package/stdio.d.mts +1 -1
- package/stdio.d.mts.map +1 -1
- package/stdio.d.ts +1 -1
- package/stdio.d.ts.map +1 -1
- package/stdio.js +5 -4
- package/stdio.js.map +1 -1
- package/stdio.mjs +5 -4
- package/stdio.mjs.map +1 -1
- package/{tools/types.d.mts → types.d.mts} +10 -2
- package/types.d.mts.map +1 -0
- package/{tools/types.d.ts → types.d.ts} +10 -2
- package/types.d.ts.map +1 -0
- package/{tools/types.js → types.js} +12 -0
- package/types.js.map +1 -0
- package/{tools/types.mjs → types.mjs} +11 -0
- package/types.mjs.map +1 -0
- package/util.d.mts +4 -0
- package/util.d.mts.map +1 -0
- package/util.d.ts +4 -0
- package/util.d.ts.map +1 -0
- package/util.js +30 -0
- package/util.js.map +1 -0
- package/util.mjs +24 -0
- package/util.mjs.map +1 -0
- package/compat.d.mts +0 -58
- package/compat.d.mts.map +0 -1
- package/compat.d.ts +0 -58
- package/compat.d.ts.map +0 -1
- package/compat.js +0 -387
- package/compat.js.map +0 -1
- package/compat.mjs +0 -378
- package/compat.mjs.map +0 -1
- package/docs-search-tool.d.mts +0 -44
- package/docs-search-tool.d.mts.map +0 -1
- package/docs-search-tool.d.ts +0 -44
- package/docs-search-tool.d.ts.map +0 -1
- package/docs-search-tool.js +0 -43
- package/docs-search-tool.js.map +0 -1
- package/docs-search-tool.mjs +0 -39
- package/docs-search-tool.mjs.map +0 -1
- package/dynamic-tools.d.mts +0 -12
- package/dynamic-tools.d.mts.map +0 -1
- package/dynamic-tools.d.ts +0 -12
- package/dynamic-tools.d.ts.map +0 -1
- package/dynamic-tools.js +0 -135
- package/dynamic-tools.js.map +0 -1
- package/dynamic-tools.mjs +0 -132
- package/dynamic-tools.mjs.map +0 -1
- package/filtering.d.mts +0 -2
- package/filtering.d.mts.map +0 -1
- package/filtering.d.ts +0 -2
- package/filtering.d.ts.map +0 -1
- package/filtering.js +0 -20
- package/filtering.js.map +0 -1
- package/filtering.mjs +0 -13
- package/filtering.mjs.map +0 -1
- package/handlers/get-accounts.d.mts +0 -3
- package/handlers/get-accounts.d.mts.map +0 -1
- package/handlers/get-accounts.d.ts +0 -3
- package/handlers/get-accounts.d.ts.map +0 -1
- package/handlers/get-accounts.js +0 -32
- package/handlers/get-accounts.js.map +0 -1
- package/handlers/get-accounts.mjs +0 -28
- package/handlers/get-accounts.mjs.map +0 -1
- package/handlers/get-chat.d.mts +0 -3
- package/handlers/get-chat.d.mts.map +0 -1
- package/handlers/get-chat.d.ts +0 -3
- package/handlers/get-chat.d.ts.map +0 -1
- package/handlers/get-chat.js +0 -20
- package/handlers/get-chat.js.map +0 -1
- package/handlers/get-chat.mjs +0 -16
- package/handlers/get-chat.mjs.map +0 -1
- package/handlers/index.d.mts +0 -3
- package/handlers/index.d.mts.map +0 -1
- package/handlers/index.d.ts +0 -3
- package/handlers/index.d.ts.map +0 -1
- package/handlers/index.js +0 -30
- package/handlers/index.js.map +0 -1
- package/handlers/index.mjs +0 -27
- package/handlers/index.mjs.map +0 -1
- package/handlers/list-chats.d.mts +0 -3
- package/handlers/list-chats.d.mts.map +0 -1
- package/handlers/list-chats.d.ts +0 -3
- package/handlers/list-chats.d.ts.map +0 -1
- package/handlers/list-chats.js +0 -46
- package/handlers/list-chats.js.map +0 -1
- package/handlers/list-chats.mjs +0 -42
- package/handlers/list-chats.mjs.map +0 -1
- package/handlers/list-messages.d.mts +0 -3
- package/handlers/list-messages.d.mts.map +0 -1
- package/handlers/list-messages.d.ts +0 -3
- package/handlers/list-messages.d.ts.map +0 -1
- package/handlers/list-messages.js +0 -34
- package/handlers/list-messages.js.map +0 -1
- package/handlers/list-messages.mjs +0 -30
- package/handlers/list-messages.mjs.map +0 -1
- package/handlers/open-app.d.mts +0 -3
- package/handlers/open-app.d.mts.map +0 -1
- package/handlers/open-app.d.ts +0 -3
- package/handlers/open-app.d.ts.map +0 -1
- package/handlers/open-app.js +0 -26
- package/handlers/open-app.js.map +0 -1
- package/handlers/open-app.mjs +0 -22
- package/handlers/open-app.mjs.map +0 -1
- package/handlers/search-chats.d.mts +0 -3
- package/handlers/search-chats.d.mts.map +0 -1
- package/handlers/search-chats.d.ts +0 -3
- package/handlers/search-chats.d.ts.map +0 -1
- package/handlers/search-chats.js +0 -38
- package/handlers/search-chats.js.map +0 -1
- package/handlers/search-chats.mjs +0 -34
- package/handlers/search-chats.mjs.map +0 -1
- package/handlers/search-messages.d.mts +0 -3
- package/handlers/search-messages.d.mts.map +0 -1
- package/handlers/search-messages.d.ts +0 -3
- package/handlers/search-messages.d.ts.map +0 -1
- package/handlers/search-messages.js +0 -11
- package/handlers/search-messages.js.map +0 -1
- package/handlers/search-messages.mjs +0 -7
- package/handlers/search-messages.mjs.map +0 -1
- package/handlers/search.d.mts +0 -3
- package/handlers/search.d.mts.map +0 -1
- package/handlers/search.d.ts +0 -3
- package/handlers/search.d.ts.map +0 -1
- package/handlers/search.js +0 -29
- package/handlers/search.js.map +0 -1
- package/handlers/search.mjs +0 -25
- package/handlers/search.mjs.map +0 -1
- package/handlers/send-message.d.mts +0 -3
- package/handlers/send-message.d.mts.map +0 -1
- package/handlers/send-message.d.ts +0 -3
- package/handlers/send-message.d.ts.map +0 -1
- package/handlers/send-message.js +0 -20
- package/handlers/send-message.js.map +0 -1
- package/handlers/send-message.mjs +0 -16
- package/handlers/send-message.mjs.map +0 -1
- package/handlers/utils.d.mts +0 -29
- package/handlers/utils.d.mts.map +0 -1
- package/handlers/utils.d.ts +0 -29
- package/handlers/utils.d.ts.map +0 -1
- package/handlers/utils.js +0 -296
- package/handlers/utils.js.map +0 -1
- package/handlers/utils.mjs +0 -282
- package/handlers/utils.mjs.map +0 -1
- package/headers.d.mts +0 -4
- package/headers.d.mts.map +0 -1
- package/headers.d.ts +0 -4
- package/headers.d.ts.map +0 -1
- package/headers.js +0 -22
- package/headers.js.map +0 -1
- package/headers.mjs +0 -18
- package/headers.mjs.map +0 -1
- package/src/compat.ts +0 -483
- package/src/docs-search-tool.ts +0 -48
- package/src/dynamic-tools.ts +0 -159
- package/src/filtering.ts +0 -14
- package/src/handlers/get-accounts.ts +0 -28
- package/src/handlers/get-chat.ts +0 -18
- package/src/handlers/index.ts +0 -29
- package/src/handlers/list-chats.ts +0 -47
- package/src/handlers/list-messages.ts +0 -33
- package/src/handlers/open-app.ts +0 -20
- package/src/handlers/search-chats.ts +0 -39
- package/src/handlers/search-messages.ts +0 -8
- package/src/handlers/search.ts +0 -24
- package/src/handlers/send-message.ts +0 -17
- package/src/handlers/utils.ts +0 -381
- package/src/headers.ts +0 -23
- package/src/tools/accounts/get-accounts.ts +0 -34
- package/src/tools/chats/archive-chat.ts +0 -43
- package/src/tools/chats/get-chat.ts +0 -45
- package/src/tools/chats/reminders/clear-chat-reminder.ts +0 -41
- package/src/tools/chats/reminders/set-chat-reminder.ts +0 -54
- package/src/tools/chats/search-chats.ts +0 -104
- package/src/tools/index.ts +0 -92
- package/src/tools/messages/list-messages.ts +0 -51
- package/src/tools/messages/search-messages.ts +0 -123
- package/src/tools/messages/send-message.ts +0 -47
- package/src/tools/top-level/focus-app.ts +0 -52
- package/src/tools/top-level/search.ts +0 -41
- package/src/tools.ts +0 -1
- package/tools/accounts/get-accounts.d.mts +0 -45
- package/tools/accounts/get-accounts.d.mts.map +0 -1
- package/tools/accounts/get-accounts.d.ts +0 -45
- package/tools/accounts/get-accounts.d.ts.map +0 -1
- package/tools/accounts/get-accounts.js +0 -31
- package/tools/accounts/get-accounts.js.map +0 -1
- package/tools/accounts/get-accounts.mjs +0 -27
- package/tools/accounts/get-accounts.mjs.map +0 -1
- package/tools/chats/archive-chat.d.mts +0 -45
- package/tools/chats/archive-chat.d.mts.map +0 -1
- package/tools/chats/archive-chat.d.ts +0 -45
- package/tools/chats/archive-chat.d.ts.map +0 -1
- package/tools/chats/archive-chat.js +0 -40
- package/tools/chats/archive-chat.js.map +0 -1
- package/tools/chats/archive-chat.mjs +0 -36
- package/tools/chats/archive-chat.mjs.map +0 -1
- package/tools/chats/get-chat.d.mts +0 -45
- package/tools/chats/get-chat.d.mts.map +0 -1
- package/tools/chats/get-chat.d.ts +0 -45
- package/tools/chats/get-chat.d.ts.map +0 -1
- package/tools/chats/get-chat.js +0 -41
- package/tools/chats/get-chat.js.map +0 -1
- package/tools/chats/get-chat.mjs +0 -37
- package/tools/chats/get-chat.mjs.map +0 -1
- package/tools/chats/reminders/clear-chat-reminder.d.mts +0 -45
- package/tools/chats/reminders/clear-chat-reminder.d.mts.map +0 -1
- package/tools/chats/reminders/clear-chat-reminder.d.ts +0 -45
- package/tools/chats/reminders/clear-chat-reminder.d.ts.map +0 -1
- package/tools/chats/reminders/clear-chat-reminder.js +0 -38
- package/tools/chats/reminders/clear-chat-reminder.js.map +0 -1
- package/tools/chats/reminders/clear-chat-reminder.mjs +0 -34
- package/tools/chats/reminders/clear-chat-reminder.mjs.map +0 -1
- package/tools/chats/reminders/set-chat-reminder.d.mts +0 -45
- package/tools/chats/reminders/set-chat-reminder.d.mts.map +0 -1
- package/tools/chats/reminders/set-chat-reminder.d.ts +0 -45
- package/tools/chats/reminders/set-chat-reminder.d.ts.map +0 -1
- package/tools/chats/reminders/set-chat-reminder.js +0 -51
- package/tools/chats/reminders/set-chat-reminder.js.map +0 -1
- package/tools/chats/reminders/set-chat-reminder.mjs +0 -47
- package/tools/chats/reminders/set-chat-reminder.mjs.map +0 -1
- package/tools/chats/search-chats.d.mts +0 -45
- package/tools/chats/search-chats.d.mts.map +0 -1
- package/tools/chats/search-chats.d.ts +0 -45
- package/tools/chats/search-chats.d.ts.map +0 -1
- package/tools/chats/search-chats.js +0 -92
- package/tools/chats/search-chats.js.map +0 -1
- package/tools/chats/search-chats.mjs +0 -88
- package/tools/chats/search-chats.mjs.map +0 -1
- package/tools/index.d.mts +0 -10
- package/tools/index.d.mts.map +0 -1
- package/tools/index.d.ts +0 -10
- package/tools/index.d.ts.map +0 -1
- package/tools/index.js +0 -76
- package/tools/index.js.map +0 -1
- package/tools/index.mjs +0 -69
- package/tools/index.mjs.map +0 -1
- package/tools/messages/list-messages.d.mts +0 -45
- package/tools/messages/list-messages.d.mts.map +0 -1
- package/tools/messages/list-messages.d.ts +0 -45
- package/tools/messages/list-messages.d.ts.map +0 -1
- package/tools/messages/list-messages.js +0 -47
- package/tools/messages/list-messages.js.map +0 -1
- package/tools/messages/list-messages.mjs +0 -43
- package/tools/messages/list-messages.mjs.map +0 -1
- package/tools/messages/search-messages.d.mts +0 -45
- package/tools/messages/search-messages.d.mts.map +0 -1
- package/tools/messages/search-messages.d.ts +0 -45
- package/tools/messages/search-messages.d.ts.map +0 -1
- package/tools/messages/search-messages.js +0 -110
- package/tools/messages/search-messages.js.map +0 -1
- package/tools/messages/search-messages.mjs +0 -106
- package/tools/messages/search-messages.mjs.map +0 -1
- package/tools/messages/send-message.d.mts +0 -45
- package/tools/messages/send-message.d.mts.map +0 -1
- package/tools/messages/send-message.d.ts +0 -45
- package/tools/messages/send-message.d.ts.map +0 -1
- package/tools/messages/send-message.js +0 -43
- package/tools/messages/send-message.js.map +0 -1
- package/tools/messages/send-message.mjs +0 -39
- package/tools/messages/send-message.mjs.map +0 -1
- package/tools/top-level/focus-app.d.mts +0 -45
- package/tools/top-level/focus-app.d.mts.map +0 -1
- package/tools/top-level/focus-app.d.ts +0 -45
- package/tools/top-level/focus-app.d.ts.map +0 -1
- package/tools/top-level/focus-app.js +0 -47
- package/tools/top-level/focus-app.js.map +0 -1
- package/tools/top-level/focus-app.mjs +0 -43
- package/tools/top-level/focus-app.mjs.map +0 -1
- package/tools/top-level/search.d.mts +0 -45
- package/tools/top-level/search.d.mts.map +0 -1
- package/tools/top-level/search.d.ts +0 -45
- package/tools/top-level/search.d.ts.map +0 -1
- package/tools/top-level/search.js +0 -37
- package/tools/top-level/search.js.map +0 -1
- package/tools/top-level/search.mjs +0 -33
- package/tools/top-level/search.mjs.map +0 -1
- package/tools/types.d.mts.map +0 -1
- package/tools/types.d.ts.map +0 -1
- package/tools/types.js.map +0 -1
- package/tools/types.mjs.map +0 -1
- package/tools.d.mts +0 -2
- package/tools.d.mts.map +0 -1
- package/tools.d.ts +0 -2
- package/tools.d.ts.map +0 -1
- package/tools.js +0 -18
- package/tools.js.map +0 -1
- package/tools.mjs +0 -2
- package/tools.mjs.map +0 -1
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Metadata } from '@beeper/desktop-mcp/tools/types';
|
|
2
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
-
import BeeperDesktop from '@beeper/desktop-api';
|
|
4
|
-
export declare const metadata: Metadata;
|
|
5
|
-
export declare const tool: Tool;
|
|
6
|
-
export declare const handler: (client: BeeperDesktop, args: Record<string, unknown> | undefined) => Promise<import("@beeper/desktop-mcp/tools/types").ToolCallResult>;
|
|
7
|
-
declare const _default: {
|
|
8
|
-
metadata: Metadata;
|
|
9
|
-
tool: {
|
|
10
|
-
[x: string]: unknown;
|
|
11
|
-
name: string;
|
|
12
|
-
inputSchema: {
|
|
13
|
-
[x: string]: unknown;
|
|
14
|
-
type: "object";
|
|
15
|
-
properties?: {
|
|
16
|
-
[x: string]: unknown;
|
|
17
|
-
} | undefined;
|
|
18
|
-
required?: string[] | undefined;
|
|
19
|
-
};
|
|
20
|
-
title?: string | undefined;
|
|
21
|
-
description?: string | undefined;
|
|
22
|
-
outputSchema?: {
|
|
23
|
-
[x: string]: unknown;
|
|
24
|
-
type: "object";
|
|
25
|
-
properties?: {
|
|
26
|
-
[x: string]: unknown;
|
|
27
|
-
} | undefined;
|
|
28
|
-
required?: string[] | undefined;
|
|
29
|
-
} | undefined;
|
|
30
|
-
annotations?: {
|
|
31
|
-
[x: string]: unknown;
|
|
32
|
-
title?: string | undefined;
|
|
33
|
-
readOnlyHint?: boolean | undefined;
|
|
34
|
-
destructiveHint?: boolean | undefined;
|
|
35
|
-
idempotentHint?: boolean | undefined;
|
|
36
|
-
openWorldHint?: boolean | undefined;
|
|
37
|
-
} | undefined;
|
|
38
|
-
_meta?: {
|
|
39
|
-
[x: string]: unknown;
|
|
40
|
-
} | undefined;
|
|
41
|
-
};
|
|
42
|
-
handler: (client: BeeperDesktop, args: Record<string, unknown> | undefined) => Promise<import("@beeper/desktop-mcp/tools/types").ToolCallResult>;
|
|
43
|
-
};
|
|
44
|
-
export default _default;
|
|
45
|
-
//# sourceMappingURL=set-chat-reminder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-chat-reminder.d.ts","sourceRoot":"","sources":["../../../src/tools/chats/reminders/set-chat-reminder.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB,MAAM,iCAAiC;OAExE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,aAAa,MAAM,qBAAqB;AAE/C,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA6BlB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,aAAa,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,sEAI7F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAJoC,aAAa,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAM9F,wBAA2C"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.handler = exports.tool = exports.metadata = void 0;
|
|
5
|
-
const types_1 = require("@beeper/desktop-mcp/tools/types");
|
|
6
|
-
exports.metadata = {
|
|
7
|
-
resource: 'chats.reminders',
|
|
8
|
-
operation: 'write',
|
|
9
|
-
tags: ['chats'],
|
|
10
|
-
httpMethod: 'post',
|
|
11
|
-
httpPath: '/v1/chats/{chatID}/reminders',
|
|
12
|
-
operationId: 'setChatReminder',
|
|
13
|
-
};
|
|
14
|
-
exports.tool = {
|
|
15
|
-
name: 'set_chat_reminder',
|
|
16
|
-
description: 'Set a reminder for a chat at a specific time.',
|
|
17
|
-
inputSchema: {
|
|
18
|
-
type: 'object',
|
|
19
|
-
properties: {
|
|
20
|
-
chatID: {
|
|
21
|
-
type: 'string',
|
|
22
|
-
description: 'Unique identifier of the chat.',
|
|
23
|
-
},
|
|
24
|
-
reminder: {
|
|
25
|
-
type: 'object',
|
|
26
|
-
description: 'Reminder configuration',
|
|
27
|
-
properties: {
|
|
28
|
-
remindAtMs: {
|
|
29
|
-
type: 'number',
|
|
30
|
-
description: 'Unix timestamp in milliseconds when reminder should trigger',
|
|
31
|
-
},
|
|
32
|
-
dismissOnIncomingMessage: {
|
|
33
|
-
type: 'boolean',
|
|
34
|
-
description: 'Cancel reminder if someone messages in the chat',
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
required: ['remindAtMs'],
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
required: ['chatID', 'reminder'],
|
|
41
|
-
},
|
|
42
|
-
annotations: {},
|
|
43
|
-
};
|
|
44
|
-
const handler = async (client, args) => {
|
|
45
|
-
const { chatID, ...body } = args;
|
|
46
|
-
const response = await client.chats.reminders.create(chatID, body).asResponse();
|
|
47
|
-
return (0, types_1.asTextContentResult)(await response.text());
|
|
48
|
-
};
|
|
49
|
-
exports.handler = handler;
|
|
50
|
-
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
51
|
-
//# sourceMappingURL=set-chat-reminder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-chat-reminder.js","sourceRoot":"","sources":["../../../src/tools/chats/reminders/set-chat-reminder.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAAgF;AAKnE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,iBAAiB;IAC3B,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,OAAO,CAAC;IACf,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,8BAA8B;IACxC,WAAW,EAAE,iBAAiB;CAC/B,CAAC;AAEW,QAAA,IAAI,GAAS;IACxB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,+CAA+C;IAC5D,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gCAAgC;aAC9C;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wBAAwB;gBACrC,UAAU,EAAE;oBACV,UAAU,EAAE;wBACV,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,6DAA6D;qBAC3E;oBACD,wBAAwB,EAAE;wBACxB,IAAI,EAAE,SAAS;wBACf,WAAW,EAAE,iDAAiD;qBAC/D;iBACF;gBACD,QAAQ,EAAE,CAAC,YAAY,CAAC;aACzB;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC;KACjC;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAqB,EAAE,IAAyC,EAAE,EAAE;IAChG,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACxC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;IAChF,OAAO,IAAA,2BAAmB,EAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AACpD,CAAC,CAAC;AAJW,QAAA,OAAO,WAIlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { asTextContentResult } from '@beeper/desktop-mcp/tools/types';
|
|
3
|
-
export const metadata = {
|
|
4
|
-
resource: 'chats.reminders',
|
|
5
|
-
operation: 'write',
|
|
6
|
-
tags: ['chats'],
|
|
7
|
-
httpMethod: 'post',
|
|
8
|
-
httpPath: '/v1/chats/{chatID}/reminders',
|
|
9
|
-
operationId: 'setChatReminder',
|
|
10
|
-
};
|
|
11
|
-
export const tool = {
|
|
12
|
-
name: 'set_chat_reminder',
|
|
13
|
-
description: 'Set a reminder for a chat at a specific time.',
|
|
14
|
-
inputSchema: {
|
|
15
|
-
type: 'object',
|
|
16
|
-
properties: {
|
|
17
|
-
chatID: {
|
|
18
|
-
type: 'string',
|
|
19
|
-
description: 'Unique identifier of the chat.',
|
|
20
|
-
},
|
|
21
|
-
reminder: {
|
|
22
|
-
type: 'object',
|
|
23
|
-
description: 'Reminder configuration',
|
|
24
|
-
properties: {
|
|
25
|
-
remindAtMs: {
|
|
26
|
-
type: 'number',
|
|
27
|
-
description: 'Unix timestamp in milliseconds when reminder should trigger',
|
|
28
|
-
},
|
|
29
|
-
dismissOnIncomingMessage: {
|
|
30
|
-
type: 'boolean',
|
|
31
|
-
description: 'Cancel reminder if someone messages in the chat',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
required: ['remindAtMs'],
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
required: ['chatID', 'reminder'],
|
|
38
|
-
},
|
|
39
|
-
annotations: {},
|
|
40
|
-
};
|
|
41
|
-
export const handler = async (client, args) => {
|
|
42
|
-
const { chatID, ...body } = args;
|
|
43
|
-
const response = await client.chats.reminders.create(chatID, body).asResponse();
|
|
44
|
-
return asTextContentResult(await response.text());
|
|
45
|
-
};
|
|
46
|
-
export default { metadata, tool, handler };
|
|
47
|
-
//# sourceMappingURL=set-chat-reminder.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"set-chat-reminder.mjs","sourceRoot":"","sources":["../../../src/tools/chats/reminders/set-chat-reminder.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAY,mBAAmB,EAAE,MAAM,iCAAiC;AAK/E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,iBAAiB;IAC3B,SAAS,EAAE,OAAO;IAClB,IAAI,EAAE,CAAC,OAAO,CAAC;IACf,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,8BAA8B;IACxC,WAAW,EAAE,iBAAiB;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,+CAA+C;IAC5D,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gCAAgC;aAC9C;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wBAAwB;gBACrC,UAAU,EAAE;oBACV,UAAU,EAAE;wBACV,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,6DAA6D;qBAC3E;oBACD,wBAAwB,EAAE;wBACxB,IAAI,EAAE,SAAS;wBACf,WAAW,EAAE,iDAAiD;qBAC/D;iBACF;gBACD,QAAQ,EAAE,CAAC,YAAY,CAAC;aACzB;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC;KACjC;IACD,WAAW,EAAE,EAAE;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAqB,EAAE,IAAyC,EAAE,EAAE;IAChG,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,GAAG,IAAW,CAAC;IACxC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;IAChF,OAAO,mBAAmB,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Metadata } from '@beeper/desktop-mcp/tools/types';
|
|
2
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
-
import BeeperDesktop from '@beeper/desktop-api';
|
|
4
|
-
export declare const metadata: Metadata;
|
|
5
|
-
export declare const tool: Tool;
|
|
6
|
-
export declare const handler: (client: BeeperDesktop, args: Record<string, unknown> | undefined) => Promise<import("@beeper/desktop-mcp/tools/types").ToolCallResult>;
|
|
7
|
-
declare const _default: {
|
|
8
|
-
metadata: Metadata;
|
|
9
|
-
tool: {
|
|
10
|
-
[x: string]: unknown;
|
|
11
|
-
name: string;
|
|
12
|
-
inputSchema: {
|
|
13
|
-
[x: string]: unknown;
|
|
14
|
-
type: "object";
|
|
15
|
-
properties?: {
|
|
16
|
-
[x: string]: unknown;
|
|
17
|
-
} | undefined;
|
|
18
|
-
required?: string[] | undefined;
|
|
19
|
-
};
|
|
20
|
-
title?: string | undefined;
|
|
21
|
-
description?: string | undefined;
|
|
22
|
-
outputSchema?: {
|
|
23
|
-
[x: string]: unknown;
|
|
24
|
-
type: "object";
|
|
25
|
-
properties?: {
|
|
26
|
-
[x: string]: unknown;
|
|
27
|
-
} | undefined;
|
|
28
|
-
required?: string[] | undefined;
|
|
29
|
-
} | undefined;
|
|
30
|
-
annotations?: {
|
|
31
|
-
[x: string]: unknown;
|
|
32
|
-
title?: string | undefined;
|
|
33
|
-
readOnlyHint?: boolean | undefined;
|
|
34
|
-
destructiveHint?: boolean | undefined;
|
|
35
|
-
idempotentHint?: boolean | undefined;
|
|
36
|
-
openWorldHint?: boolean | undefined;
|
|
37
|
-
} | undefined;
|
|
38
|
-
_meta?: {
|
|
39
|
-
[x: string]: unknown;
|
|
40
|
-
} | undefined;
|
|
41
|
-
};
|
|
42
|
-
handler: (client: BeeperDesktop, args: Record<string, unknown> | undefined) => Promise<import("@beeper/desktop-mcp/tools/types").ToolCallResult>;
|
|
43
|
-
};
|
|
44
|
-
export default _default;
|
|
45
|
-
//# sourceMappingURL=search-chats.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-chats.d.mts","sourceRoot":"","sources":["../../src/tools/chats/search-chats.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB,MAAM,iCAAiC;OAExE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,aAAa,MAAM,qBAAqB;AAE/C,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA+ElB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,aAAa,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,sEAI7F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAJoC,aAAa,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAM9F,wBAA2C"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Metadata } from '@beeper/desktop-mcp/tools/types';
|
|
2
|
-
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
-
import BeeperDesktop from '@beeper/desktop-api';
|
|
4
|
-
export declare const metadata: Metadata;
|
|
5
|
-
export declare const tool: Tool;
|
|
6
|
-
export declare const handler: (client: BeeperDesktop, args: Record<string, unknown> | undefined) => Promise<import("@beeper/desktop-mcp/tools/types").ToolCallResult>;
|
|
7
|
-
declare const _default: {
|
|
8
|
-
metadata: Metadata;
|
|
9
|
-
tool: {
|
|
10
|
-
[x: string]: unknown;
|
|
11
|
-
name: string;
|
|
12
|
-
inputSchema: {
|
|
13
|
-
[x: string]: unknown;
|
|
14
|
-
type: "object";
|
|
15
|
-
properties?: {
|
|
16
|
-
[x: string]: unknown;
|
|
17
|
-
} | undefined;
|
|
18
|
-
required?: string[] | undefined;
|
|
19
|
-
};
|
|
20
|
-
title?: string | undefined;
|
|
21
|
-
description?: string | undefined;
|
|
22
|
-
outputSchema?: {
|
|
23
|
-
[x: string]: unknown;
|
|
24
|
-
type: "object";
|
|
25
|
-
properties?: {
|
|
26
|
-
[x: string]: unknown;
|
|
27
|
-
} | undefined;
|
|
28
|
-
required?: string[] | undefined;
|
|
29
|
-
} | undefined;
|
|
30
|
-
annotations?: {
|
|
31
|
-
[x: string]: unknown;
|
|
32
|
-
title?: string | undefined;
|
|
33
|
-
readOnlyHint?: boolean | undefined;
|
|
34
|
-
destructiveHint?: boolean | undefined;
|
|
35
|
-
idempotentHint?: boolean | undefined;
|
|
36
|
-
openWorldHint?: boolean | undefined;
|
|
37
|
-
} | undefined;
|
|
38
|
-
_meta?: {
|
|
39
|
-
[x: string]: unknown;
|
|
40
|
-
} | undefined;
|
|
41
|
-
};
|
|
42
|
-
handler: (client: BeeperDesktop, args: Record<string, unknown> | undefined) => Promise<import("@beeper/desktop-mcp/tools/types").ToolCallResult>;
|
|
43
|
-
};
|
|
44
|
-
export default _default;
|
|
45
|
-
//# sourceMappingURL=search-chats.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-chats.d.ts","sourceRoot":"","sources":["../../src/tools/chats/search-chats.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAuB,MAAM,iCAAiC;OAExE,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,aAAa,MAAM,qBAAqB;AAE/C,eAAO,MAAM,QAAQ,EAAE,QAOtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA+ElB,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,QAAQ,aAAa,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,sEAI7F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAJoC,aAAa,QAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS;;AAM9F,wBAA2C"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.handler = exports.tool = exports.metadata = void 0;
|
|
5
|
-
const types_1 = require("@beeper/desktop-mcp/tools/types");
|
|
6
|
-
exports.metadata = {
|
|
7
|
-
resource: 'chats',
|
|
8
|
-
operation: 'read',
|
|
9
|
-
tags: ['chats'],
|
|
10
|
-
httpMethod: 'get',
|
|
11
|
-
httpPath: '/v1/chats/search',
|
|
12
|
-
operationId: 'searchChats',
|
|
13
|
-
};
|
|
14
|
-
exports.tool = {
|
|
15
|
-
name: 'search_chats',
|
|
16
|
-
description: "Search chats by title/network or participants using Beeper Desktop's renderer algorithm. Optional 'scope'.",
|
|
17
|
-
inputSchema: {
|
|
18
|
-
type: 'object',
|
|
19
|
-
properties: {
|
|
20
|
-
accountIDs: {
|
|
21
|
-
type: 'array',
|
|
22
|
-
description: 'Provide an array of account IDs to filter chats from specific messaging accounts only',
|
|
23
|
-
items: {
|
|
24
|
-
type: 'string',
|
|
25
|
-
description: 'Account ID this resource belongs to.',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
cursor: {
|
|
29
|
-
type: 'string',
|
|
30
|
-
description: "Opaque pagination cursor; do not inspect. Use together with 'direction'.",
|
|
31
|
-
},
|
|
32
|
-
direction: {
|
|
33
|
-
type: 'string',
|
|
34
|
-
description: "Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided.",
|
|
35
|
-
enum: ['after', 'before'],
|
|
36
|
-
},
|
|
37
|
-
inbox: {
|
|
38
|
-
type: 'string',
|
|
39
|
-
description: 'Filter by inbox type: "primary" (non-archived, non-low-priority), "low-priority", or "archive". If not specified, shows all chats.',
|
|
40
|
-
enum: ['primary', 'low-priority', 'archive'],
|
|
41
|
-
},
|
|
42
|
-
includeMuted: {
|
|
43
|
-
type: 'boolean',
|
|
44
|
-
description: 'Include chats marked as Muted by the user, which are usually less important. Default: true. Set to false if the user wants a more refined search.',
|
|
45
|
-
},
|
|
46
|
-
lastActivityAfter: {
|
|
47
|
-
type: 'string',
|
|
48
|
-
description: 'Provide an ISO datetime string to only retrieve chats with last activity after this time',
|
|
49
|
-
format: 'date-time',
|
|
50
|
-
},
|
|
51
|
-
lastActivityBefore: {
|
|
52
|
-
type: 'string',
|
|
53
|
-
description: 'Provide an ISO datetime string to only retrieve chats with last activity before this time',
|
|
54
|
-
format: 'date-time',
|
|
55
|
-
},
|
|
56
|
-
limit: {
|
|
57
|
-
type: 'integer',
|
|
58
|
-
description: 'Set the maximum number of chats to retrieve. Valid range: 1-200, default is 50',
|
|
59
|
-
},
|
|
60
|
-
query: {
|
|
61
|
-
type: 'string',
|
|
62
|
-
description: 'Literal token search (non-semantic). Use single words users type (e.g., "dinner"). When multiple words provided, ALL must match. Case-insensitive.',
|
|
63
|
-
},
|
|
64
|
-
scope: {
|
|
65
|
-
type: 'string',
|
|
66
|
-
description: "Search scope: 'titles' matches title + network; 'participants' matches participant names.",
|
|
67
|
-
enum: ['titles', 'participants'],
|
|
68
|
-
},
|
|
69
|
-
type: {
|
|
70
|
-
type: 'string',
|
|
71
|
-
description: 'Specify the type of chats to retrieve: use "single" for direct messages, "group" for group chats, or "any" to get all types',
|
|
72
|
-
enum: ['single', 'group', 'any'],
|
|
73
|
-
},
|
|
74
|
-
unreadOnly: {
|
|
75
|
-
type: 'boolean',
|
|
76
|
-
description: 'Set to true to only retrieve chats that have unread messages',
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
required: [],
|
|
80
|
-
},
|
|
81
|
-
annotations: {
|
|
82
|
-
readOnlyHint: true,
|
|
83
|
-
},
|
|
84
|
-
};
|
|
85
|
-
const handler = async (client, args) => {
|
|
86
|
-
const body = args;
|
|
87
|
-
const response = await client.chats.search(body).asResponse();
|
|
88
|
-
return (0, types_1.asTextContentResult)(await response.json());
|
|
89
|
-
};
|
|
90
|
-
exports.handler = handler;
|
|
91
|
-
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
92
|
-
//# sourceMappingURL=search-chats.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-chats.js","sourceRoot":"","sources":["../../src/tools/chats/search-chats.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,2DAAgF;AAKnE,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,OAAO;IACjB,SAAS,EAA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d,WAAW,EACT,2FAA2F;gBAC7F,IAAI,EAAE,CAAC,QAAQ,EAAE,cAAc,CAAC;aACjC;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,6HAA6H;gBAC/H,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC;aACjC;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,8DAA8D;aAC5E;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEK,MAAM,OAAO,GAAG,KAAK,EAAE,MAAqB,EAAE,IAAyC,EAAE,EAAE;IAChG,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;IAC9D,OAAO,IAAA,2BAAmB,EAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AACpD,CAAC,CAAC;AAJW,QAAA,OAAO,WAIlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { asTextContentResult } from '@beeper/desktop-mcp/tools/types';
|
|
3
|
-
export const metadata = {
|
|
4
|
-
resource: 'chats',
|
|
5
|
-
operation: 'read',
|
|
6
|
-
tags: ['chats'],
|
|
7
|
-
httpMethod: 'get',
|
|
8
|
-
httpPath: '/v1/chats/search',
|
|
9
|
-
operationId: 'searchChats',
|
|
10
|
-
};
|
|
11
|
-
export const tool = {
|
|
12
|
-
name: 'search_chats',
|
|
13
|
-
description: "Search chats by title/network or participants using Beeper Desktop's renderer algorithm. Optional 'scope'.",
|
|
14
|
-
inputSchema: {
|
|
15
|
-
type: 'object',
|
|
16
|
-
properties: {
|
|
17
|
-
accountIDs: {
|
|
18
|
-
type: 'array',
|
|
19
|
-
description: 'Provide an array of account IDs to filter chats from specific messaging accounts only',
|
|
20
|
-
items: {
|
|
21
|
-
type: 'string',
|
|
22
|
-
description: 'Account ID this resource belongs to.',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
cursor: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
description: "Opaque pagination cursor; do not inspect. Use together with 'direction'.",
|
|
28
|
-
},
|
|
29
|
-
direction: {
|
|
30
|
-
type: 'string',
|
|
31
|
-
description: "Pagination direction used with 'cursor': 'before' fetches older results, 'after' fetches newer results. Defaults to 'before' when only 'cursor' is provided.",
|
|
32
|
-
enum: ['after', 'before'],
|
|
33
|
-
},
|
|
34
|
-
inbox: {
|
|
35
|
-
type: 'string',
|
|
36
|
-
description: 'Filter by inbox type: "primary" (non-archived, non-low-priority), "low-priority", or "archive". If not specified, shows all chats.',
|
|
37
|
-
enum: ['primary', 'low-priority', 'archive'],
|
|
38
|
-
},
|
|
39
|
-
includeMuted: {
|
|
40
|
-
type: 'boolean',
|
|
41
|
-
description: 'Include chats marked as Muted by the user, which are usually less important. Default: true. Set to false if the user wants a more refined search.',
|
|
42
|
-
},
|
|
43
|
-
lastActivityAfter: {
|
|
44
|
-
type: 'string',
|
|
45
|
-
description: 'Provide an ISO datetime string to only retrieve chats with last activity after this time',
|
|
46
|
-
format: 'date-time',
|
|
47
|
-
},
|
|
48
|
-
lastActivityBefore: {
|
|
49
|
-
type: 'string',
|
|
50
|
-
description: 'Provide an ISO datetime string to only retrieve chats with last activity before this time',
|
|
51
|
-
format: 'date-time',
|
|
52
|
-
},
|
|
53
|
-
limit: {
|
|
54
|
-
type: 'integer',
|
|
55
|
-
description: 'Set the maximum number of chats to retrieve. Valid range: 1-200, default is 50',
|
|
56
|
-
},
|
|
57
|
-
query: {
|
|
58
|
-
type: 'string',
|
|
59
|
-
description: 'Literal token search (non-semantic). Use single words users type (e.g., "dinner"). When multiple words provided, ALL must match. Case-insensitive.',
|
|
60
|
-
},
|
|
61
|
-
scope: {
|
|
62
|
-
type: 'string',
|
|
63
|
-
description: "Search scope: 'titles' matches title + network; 'participants' matches participant names.",
|
|
64
|
-
enum: ['titles', 'participants'],
|
|
65
|
-
},
|
|
66
|
-
type: {
|
|
67
|
-
type: 'string',
|
|
68
|
-
description: 'Specify the type of chats to retrieve: use "single" for direct messages, "group" for group chats, or "any" to get all types',
|
|
69
|
-
enum: ['single', 'group', 'any'],
|
|
70
|
-
},
|
|
71
|
-
unreadOnly: {
|
|
72
|
-
type: 'boolean',
|
|
73
|
-
description: 'Set to true to only retrieve chats that have unread messages',
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
required: [],
|
|
77
|
-
},
|
|
78
|
-
annotations: {
|
|
79
|
-
readOnlyHint: true,
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
export const handler = async (client, args) => {
|
|
83
|
-
const body = args;
|
|
84
|
-
const response = await client.chats.search(body).asResponse();
|
|
85
|
-
return asTextContentResult(await response.json());
|
|
86
|
-
};
|
|
87
|
-
export default { metadata, tool, handler };
|
|
88
|
-
//# sourceMappingURL=search-chats.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-chats.mjs","sourceRoot":"","sources":["../../src/tools/chats/search-chats.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAY,mBAAmB,EAAE,MAAM,iCAAiC;AAK/E,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,OAAO;IACjB,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,CAAC,OAAO,CAAC;IACf,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,kBAAkB;IAC5B,WAAW,EAAE,aAAa;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,I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AE,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC;aACjC;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,8DAA8D;aAC5E;SACF;QACD,QAAQ,EAAE,EAAE;KACb;IACD,WAAW,EAAE;QACX,YAAY,EAAE,IAAI;KACnB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,KAAK,EAAE,MAAqB,EAAE,IAAyC,EAAE,EAAE;IAChG,MAAM,IAAI,GAAG,IAAW,CAAC;IACzB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;IAC9D,OAAO,mBAAmB,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
package/tools/index.d.mts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Metadata, Endpoint, HandlerFunction } from "./types.mjs";
|
|
2
|
-
export { Metadata, Endpoint, HandlerFunction };
|
|
3
|
-
export declare const endpoints: Endpoint[];
|
|
4
|
-
export type Filter = {
|
|
5
|
-
type: 'resource' | 'operation' | 'tag' | 'tool';
|
|
6
|
-
op: 'include' | 'exclude';
|
|
7
|
-
value: string;
|
|
8
|
-
};
|
|
9
|
-
export declare function query(filters: Filter[], endpoints: Endpoint[]): Endpoint[];
|
|
10
|
-
//# sourceMappingURL=index.d.mts.map
|
package/tools/index.d.mts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/tools/index.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE;AAE9C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;AAe/C,eAAO,MAAM,SAAS,EAAE,QAAQ,EAAO,CAAC;AAkBxC,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,KAAK,GAAG,MAAM,CAAC;IAChD,EAAE,EAAE,SAAS,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CA4B1E"}
|
package/tools/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Metadata, Endpoint, HandlerFunction } from "./types.js";
|
|
2
|
-
export { Metadata, Endpoint, HandlerFunction };
|
|
3
|
-
export declare const endpoints: Endpoint[];
|
|
4
|
-
export type Filter = {
|
|
5
|
-
type: 'resource' | 'operation' | 'tag' | 'tool';
|
|
6
|
-
op: 'include' | 'exclude';
|
|
7
|
-
value: string;
|
|
8
|
-
};
|
|
9
|
-
export declare function query(filters: Filter[], endpoints: Endpoint[]): Endpoint[];
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
package/tools/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/tools/index.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE;AAE9C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;AAe/C,eAAO,MAAM,SAAS,EAAE,QAAQ,EAAO,CAAC;AAkBxC,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,KAAK,GAAG,MAAM,CAAC;IAChD,EAAE,EAAE,SAAS,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,CA4B1E"}
|
package/tools/index.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
-
};
|
|
6
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.endpoints = void 0;
|
|
8
|
-
exports.query = query;
|
|
9
|
-
const focus_app_1 = __importDefault(require("./top-level/focus-app.js"));
|
|
10
|
-
const search_1 = __importDefault(require("./top-level/search.js"));
|
|
11
|
-
const get_accounts_1 = __importDefault(require("./accounts/get-accounts.js"));
|
|
12
|
-
const get_chat_1 = __importDefault(require("./chats/get-chat.js"));
|
|
13
|
-
const archive_chat_1 = __importDefault(require("./chats/archive-chat.js"));
|
|
14
|
-
const search_chats_1 = __importDefault(require("./chats/search-chats.js"));
|
|
15
|
-
const set_chat_reminder_1 = __importDefault(require("./chats/reminders/set-chat-reminder.js"));
|
|
16
|
-
const clear_chat_reminder_1 = __importDefault(require("./chats/reminders/clear-chat-reminder.js"));
|
|
17
|
-
const list_messages_1 = __importDefault(require("./messages/list-messages.js"));
|
|
18
|
-
const search_messages_1 = __importDefault(require("./messages/search-messages.js"));
|
|
19
|
-
const send_message_1 = __importDefault(require("./messages/send-message.js"));
|
|
20
|
-
const handlers_1 = require("../handlers/index.js");
|
|
21
|
-
exports.endpoints = [];
|
|
22
|
-
function addEndpoint(endpoint) {
|
|
23
|
-
exports.endpoints.push((0, handlers_1.mapEndpoint)(endpoint));
|
|
24
|
-
}
|
|
25
|
-
addEndpoint(focus_app_1.default);
|
|
26
|
-
addEndpoint(search_1.default);
|
|
27
|
-
addEndpoint(get_accounts_1.default);
|
|
28
|
-
addEndpoint(get_chat_1.default);
|
|
29
|
-
addEndpoint(archive_chat_1.default);
|
|
30
|
-
addEndpoint(search_chats_1.default);
|
|
31
|
-
addEndpoint(set_chat_reminder_1.default);
|
|
32
|
-
addEndpoint(clear_chat_reminder_1.default);
|
|
33
|
-
addEndpoint(list_messages_1.default);
|
|
34
|
-
addEndpoint(search_messages_1.default);
|
|
35
|
-
addEndpoint(send_message_1.default);
|
|
36
|
-
function query(filters, endpoints) {
|
|
37
|
-
const allExcludes = filters.length > 0 && filters.every((filter) => filter.op === 'exclude');
|
|
38
|
-
const unmatchedFilters = new Set(filters);
|
|
39
|
-
const filtered = endpoints.filter((endpoint) => {
|
|
40
|
-
let included = false || allExcludes;
|
|
41
|
-
for (const filter of filters) {
|
|
42
|
-
if (match(filter, endpoint)) {
|
|
43
|
-
unmatchedFilters.delete(filter);
|
|
44
|
-
included = filter.op === 'include';
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return included;
|
|
48
|
-
});
|
|
49
|
-
// Check if any filters didn't match
|
|
50
|
-
const unmatched = Array.from(unmatchedFilters).filter((f) => f.type === 'tool' || f.type === 'resource');
|
|
51
|
-
if (unmatched.length > 0) {
|
|
52
|
-
throw new Error(`The following filters did not match any endpoints: ${unmatched
|
|
53
|
-
.map((f) => `${f.type}=${f.value}`)
|
|
54
|
-
.join(', ')}`);
|
|
55
|
-
}
|
|
56
|
-
return filtered;
|
|
57
|
-
}
|
|
58
|
-
function match({ type, value }, endpoint) {
|
|
59
|
-
switch (type) {
|
|
60
|
-
case 'resource': {
|
|
61
|
-
const regexStr = '^' + normalizeResource(value).replace(/\*/g, '.*') + '$';
|
|
62
|
-
const regex = new RegExp(regexStr);
|
|
63
|
-
return regex.test(normalizeResource(endpoint.metadata.resource));
|
|
64
|
-
}
|
|
65
|
-
case 'operation':
|
|
66
|
-
return endpoint.metadata.operation === value;
|
|
67
|
-
case 'tag':
|
|
68
|
-
return endpoint.metadata.tags.includes(value);
|
|
69
|
-
case 'tool':
|
|
70
|
-
return endpoint.tool.name === value;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function normalizeResource(resource) {
|
|
74
|
-
return resource.toLowerCase().replace(/[^a-z.*\-_]*/g, '');
|
|
75
|
-
}
|
|
76
|
-
//# sourceMappingURL=index.js.map
|
package/tools/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/tools/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;AA2CtF,sBA4BC;AAjED,yEAA8C;AAC9C,mEAAwC;AACxC,8EAAmD;AACnD,mEAAwC;AACxC,2EAAgD;AAChD,2EAAgD;AAChD,+FAAoE;AACpE,mGAAwE;AACxE,gFAAqD;AACrD,oFAAyD;AACzD,8EAAmD;AACnD,mDAA0C;AAE7B,QAAA,SAAS,GAAe,EAAE,CAAC;AAExC,SAAS,WAAW,CAAC,QAAkB;IACrC,iBAAS,CAAC,IAAI,CAAC,IAAA,sBAAW,EAAC,QAAQ,CAAC,CAAC,CAAC;AACxC,CAAC;AAED,WAAW,CAAC,mBAAS,CAAC,CAAC;AACvB,WAAW,CAAC,gBAAM,CAAC,CAAC;AACpB,WAAW,CAAC,sBAAY,CAAC,CAAC;AAC1B,WAAW,CAAC,kBAAQ,CAAC,CAAC;AACtB,WAAW,CAAC,sBAAY,CAAC,CAAC;AAC1B,WAAW,CAAC,sBAAY,CAAC,CAAC;AAC1B,WAAW,CAAC,2BAAiB,CAAC,CAAC;AAC/B,WAAW,CAAC,6BAAmB,CAAC,CAAC;AACjC,WAAW,CAAC,uBAAa,CAAC,CAAC;AAC3B,WAAW,CAAC,yBAAe,CAAC,CAAC;AAC7B,WAAW,CAAC,sBAAY,CAAC,CAAC;AAQ1B,SAAgB,KAAK,CAAC,OAAiB,EAAE,SAAqB;IAC5D,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,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EAAE,IAAI,CAAC,GAAG,GAAG,CAAC;YAC3E,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC;YACnC,OAAO,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;QACnE,CAAC;QACD,KAAK,WAAW;YACd,OAAO,QAAQ,CAAC,QAAQ,CAAC,SAAS,KAAK,KAAK,CAAC;QAC/C,KAAK,KAAK;YACR,OAAO,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChD,KAAK,MAAM;YACT,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC;IACxC,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAgB;IACzC,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;AAC7D,CAAC"}
|
package/tools/index.mjs
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import focus_app from "./top-level/focus-app.mjs";
|
|
3
|
-
import search from "./top-level/search.mjs";
|
|
4
|
-
import get_accounts from "./accounts/get-accounts.mjs";
|
|
5
|
-
import get_chat from "./chats/get-chat.mjs";
|
|
6
|
-
import archive_chat from "./chats/archive-chat.mjs";
|
|
7
|
-
import search_chats from "./chats/search-chats.mjs";
|
|
8
|
-
import set_chat_reminder from "./chats/reminders/set-chat-reminder.mjs";
|
|
9
|
-
import clear_chat_reminder from "./chats/reminders/clear-chat-reminder.mjs";
|
|
10
|
-
import list_messages from "./messages/list-messages.mjs";
|
|
11
|
-
import search_messages from "./messages/search-messages.mjs";
|
|
12
|
-
import send_message from "./messages/send-message.mjs";
|
|
13
|
-
import { mapEndpoint } from "../handlers/index.mjs";
|
|
14
|
-
export const endpoints = [];
|
|
15
|
-
function addEndpoint(endpoint) {
|
|
16
|
-
endpoints.push(mapEndpoint(endpoint));
|
|
17
|
-
}
|
|
18
|
-
addEndpoint(focus_app);
|
|
19
|
-
addEndpoint(search);
|
|
20
|
-
addEndpoint(get_accounts);
|
|
21
|
-
addEndpoint(get_chat);
|
|
22
|
-
addEndpoint(archive_chat);
|
|
23
|
-
addEndpoint(search_chats);
|
|
24
|
-
addEndpoint(set_chat_reminder);
|
|
25
|
-
addEndpoint(clear_chat_reminder);
|
|
26
|
-
addEndpoint(list_messages);
|
|
27
|
-
addEndpoint(search_messages);
|
|
28
|
-
addEndpoint(send_message);
|
|
29
|
-
export function query(filters, endpoints) {
|
|
30
|
-
const allExcludes = filters.length > 0 && filters.every((filter) => filter.op === 'exclude');
|
|
31
|
-
const unmatchedFilters = new Set(filters);
|
|
32
|
-
const filtered = endpoints.filter((endpoint) => {
|
|
33
|
-
let included = false || allExcludes;
|
|
34
|
-
for (const filter of filters) {
|
|
35
|
-
if (match(filter, endpoint)) {
|
|
36
|
-
unmatchedFilters.delete(filter);
|
|
37
|
-
included = filter.op === 'include';
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
return included;
|
|
41
|
-
});
|
|
42
|
-
// Check if any filters didn't match
|
|
43
|
-
const unmatched = Array.from(unmatchedFilters).filter((f) => f.type === 'tool' || f.type === 'resource');
|
|
44
|
-
if (unmatched.length > 0) {
|
|
45
|
-
throw new Error(`The following filters did not match any endpoints: ${unmatched
|
|
46
|
-
.map((f) => `${f.type}=${f.value}`)
|
|
47
|
-
.join(', ')}`);
|
|
48
|
-
}
|
|
49
|
-
return filtered;
|
|
50
|
-
}
|
|
51
|
-
function match({ type, value }, endpoint) {
|
|
52
|
-
switch (type) {
|
|
53
|
-
case 'resource': {
|
|
54
|
-
const regexStr = '^' + normalizeResource(value).replace(/\*/g, '.*') + '$';
|
|
55
|
-
const regex = new RegExp(regexStr);
|
|
56
|
-
return regex.test(normalizeResource(endpoint.metadata.resource));
|
|
57
|
-
}
|
|
58
|
-
case 'operation':
|
|
59
|
-
return endpoint.metadata.operation === value;
|
|
60
|
-
case 'tag':
|
|
61
|
-
return endpoint.metadata.tags.includes(value);
|
|
62
|
-
case 'tool':
|
|
63
|
-
return endpoint.tool.name === value;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
function normalizeResource(resource) {
|
|
67
|
-
return resource.toLowerCase().replace(/[^a-z.*\-_]*/g, '');
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=index.mjs.map
|
package/tools/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/tools/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAM/E,SAAS;OACT,MAAM;OACN,YAAY;OACZ,QAAQ;OACR,YAAY;OACZ,YAAY;OACZ,iBAAiB;OACjB,mBAAmB;OACnB,aAAa;OACb,eAAe;OACf,YAAY;OACZ,EAAE,WAAW,EAAE;AAEtB,MAAM,CAAC,MAAM,SAAS,GAAe,EAAE,CAAC;AAExC,SAAS,WAAW,CAAC,QAAkB;IACrC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;AACxC,CAAC;AAED,WAAW,CAAC,SAAS,CAAC,CAAC;AACvB,WAAW,CAAC,MAAM,CAAC,CAAC;AACpB,WAAW,CAAC,YAAY,CAAC,CAAC;AAC1B,WAAW,CAAC,QAAQ,CAAC,CAAC;AACtB,WAAW,CAAC,YAAY,CAAC,CAAC;AAC1B,WAAW,CAAC,YAAY,CAAC,CAAC;AAC1B,WAAW,CAAC,iBAAiB,CAAC,CAAC;AAC/B,WAAW,CAAC,mBAAmB,CAAC,CAAC;AACjC,WAAW,CAAC,aAAa,CAAC,CAAC;AAC3B,WAAW,CAAC,eAAe,CAAC,CAAC;AAC7B,WAAW,CAAC,YAAY,CAAC,CAAC;AAQ1B,MAAM,UAAU,KAAK,CAAC,OAAiB,EA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