@circleback/cli 0.4.0 → 0.5.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/README.md +27 -17
- package/dist/client/jsonRpc.js +4 -2
- package/dist/commands/actionItems.js +46 -46
- package/dist/commands/calendar.js +9 -35
- package/dist/commands/companies.js +4 -20
- package/dist/commands/emails.js +11 -26
- package/dist/commands/meetings.js +26 -65
- package/dist/commands/profiles.js +4 -20
- package/dist/commands/registry.js +7 -2
- package/dist/commands/support.js +7 -22
- package/dist/commands/tags.js +3 -20
- package/dist/commands/transcripts.js +19 -46
- package/dist/constants.js +2 -5
- package/dist/helpers/command.js +19 -0
- package/dist/helpers/date.js +10 -1
- package/dist/helpers/formatter.js +36 -13
- package/dist/helpers/parse.js +3 -1
- package/dist/helpers/tag.js +2 -1
- package/dist/types.js +23 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Circleback CLI
|
|
2
2
|
|
|
3
|
-
Search and access your meetings, transcripts, emails, calendar events, and more from the terminal.
|
|
3
|
+
Search and access your meetings, transcripts, emails, calendar events, and more from the terminal, and manage your action items.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -31,27 +31,35 @@ cb transcripts "pricing discussion"
|
|
|
31
31
|
# Search emails
|
|
32
32
|
cb emails "from:alice@example.com after:2026-01-01"
|
|
33
33
|
|
|
34
|
+
# Mark an action item done
|
|
35
|
+
cb action-items update 123 --status DONE
|
|
36
|
+
|
|
34
37
|
# Get raw JSON for scripting
|
|
35
38
|
cb meetings --json
|
|
36
39
|
```
|
|
37
40
|
|
|
38
41
|
## Commands
|
|
39
42
|
|
|
40
|
-
| Command
|
|
41
|
-
|
|
|
42
|
-
| `cb auth login`
|
|
43
|
-
| `cb auth login --api-key`
|
|
44
|
-
| `cb auth logout`
|
|
45
|
-
| `cb update`
|
|
46
|
-
| `cb meetings [search]`
|
|
47
|
-
| `cb meetings read <ids...>`
|
|
48
|
-
| `cb transcripts <search>`
|
|
49
|
-
| `cb transcripts read <ids...>`
|
|
50
|
-
| `cb calendar`
|
|
51
|
-
| `cb people <names...>`
|
|
52
|
-
| `cb companies <terms...>`
|
|
53
|
-
| `cb emails [search]`
|
|
54
|
-
| `cb support [search]`
|
|
43
|
+
| Command | Description |
|
|
44
|
+
| -------------------------------- | --------------------------------------------------------------- |
|
|
45
|
+
| `cb auth login` | Log in to Circleback with your browser |
|
|
46
|
+
| `cb auth login --api-key` | Log in with an API key |
|
|
47
|
+
| `cb auth logout` | Sign out on this device |
|
|
48
|
+
| `cb update` | Update CLI to the latest version |
|
|
49
|
+
| `cb meetings [search]` | Search meetings |
|
|
50
|
+
| `cb meetings read <ids...>` | Read detailed meeting info, notes, and action items (max 50) |
|
|
51
|
+
| `cb transcripts <search>` | Search transcript content |
|
|
52
|
+
| `cb transcripts read <ids...>` | Read full transcripts (max 50) |
|
|
53
|
+
| `cb calendar` | Search calendar events |
|
|
54
|
+
| `cb people <names...>` | Search people by name |
|
|
55
|
+
| `cb companies <terms...>` | Search companies by name or domain |
|
|
56
|
+
| `cb emails [search]` | Search connected email accounts |
|
|
57
|
+
| `cb support [search]` | Search Circleback support articles |
|
|
58
|
+
| `cb action-items [search]` | Search action items |
|
|
59
|
+
| `cb action-items create <title>` | Create an action item |
|
|
60
|
+
| `cb action-items update <id>` | Update an action item's title, description, status, or assignee |
|
|
61
|
+
| `cb action-items delete <id>` | Delete an action item |
|
|
62
|
+
| `cb tags` | List tags |
|
|
55
63
|
|
|
56
64
|
Run `cb --help` or `cb <command> --help` for full usage details.
|
|
57
65
|
|
|
@@ -102,6 +110,8 @@ For stateless automation, set `CIRCLEBACK_API_KEY` instead of logging in:
|
|
|
102
110
|
CIRCLEBACK_API_KEY=cb_your_api_key cb meetings --json
|
|
103
111
|
```
|
|
104
112
|
|
|
113
|
+
Creating, updating, and deleting action items needs write access. Browser logins from before v0.5.0 only granted read access, so run `cb auth login` again; read-only API keys can't make changes.
|
|
114
|
+
|
|
105
115
|
`CIRCLEBACK_API_KEY` takes precedence over stored credentials. Unset it before running `cb auth login`; `cb auth logout` cannot clear an environment variable from your shell.
|
|
106
116
|
|
|
107
117
|
## Agents
|
|
@@ -117,4 +127,4 @@ The CLI is designed to work well with AI agents and tool-use systems:
|
|
|
117
127
|
## Links
|
|
118
128
|
|
|
119
129
|
- [Circleback](https://circleback.ai)
|
|
120
|
-
- [Support](https://
|
|
130
|
+
- [Support](https://circleback.ai/docs/support)
|
package/dist/client/jsonRpc.js
CHANGED
|
@@ -25,6 +25,7 @@ const extractErrorMessage = async (response) => {
|
|
|
25
25
|
return text;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
+
const WRITE_ACCESS_HINT = 'Run `circleback auth login` again or use a write-enabled API key.';
|
|
28
29
|
const HTTP_ERROR_MESSAGES = {
|
|
29
30
|
401: 'Authentication expired. Run `circleback auth login` to re-authenticate.',
|
|
30
31
|
403: 'Permission denied.',
|
|
@@ -132,9 +133,10 @@ const callTool = async (toolName, toolArguments) => {
|
|
|
132
133
|
if (!response.ok) {
|
|
133
134
|
const fallback = HTTP_ERROR_MESSAGES[response.status];
|
|
134
135
|
const serverMessage = await extractErrorMessage(response);
|
|
135
|
-
|
|
136
|
+
const message = serverMessage ||
|
|
136
137
|
fallback ||
|
|
137
|
-
`Request failed with status ${response.status}
|
|
138
|
+
`Request failed with status ${response.status}.`;
|
|
139
|
+
throw new Error(response.status === 403 ? `${message} ${WRITE_ACCESS_HINT}` : message);
|
|
138
140
|
}
|
|
139
141
|
return parseResponse(response);
|
|
140
142
|
};
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.searchActionItemsCommand = void 0;
|
|
3
|
+
exports.deleteActionItemCommand = exports.updateActionItemCommand = exports.createActionItemCommand = exports.searchActionItemsCommand = void 0;
|
|
4
4
|
const commander_1 = require("commander");
|
|
5
|
-
const jsonRpc_1 = require("../client/jsonRpc");
|
|
6
5
|
const constants_1 = require("../constants");
|
|
6
|
+
const command_1 = require("../helpers/command");
|
|
7
7
|
const date_1 = require("../helpers/date");
|
|
8
|
-
const error_1 = require("../helpers/error");
|
|
9
|
-
const output_1 = require("../helpers/output");
|
|
10
|
-
const formatter_1 = require("../helpers/formatter");
|
|
11
8
|
const parse_1 = require("../helpers/parse");
|
|
12
9
|
const tag_1 = require("../helpers/tag");
|
|
10
|
+
const types_1 = require("../types");
|
|
13
11
|
const DEFAULT_ACTION_ITEMS_SEARCH_LAST_DAYS = 30;
|
|
14
|
-
exports.searchActionItemsCommand = new commander_1.Command('search')
|
|
12
|
+
exports.searchActionItemsCommand = (0, command_1.defineToolCommand)(new commander_1.Command('search')
|
|
15
13
|
.description('Search action items.')
|
|
16
14
|
.argument('[search]', 'Search term')
|
|
17
15
|
.option('-p, --page <index>', constants_1.PAGE_OPTION_DESCRIPTION, '0')
|
|
@@ -20,45 +18,47 @@ exports.searchActionItemsCommand = new commander_1.Command('search')
|
|
|
20
18
|
.option('--from <date>', constants_1.START_DATE_OPTION_DESCRIPTION)
|
|
21
19
|
.option('--to <date>', constants_1.END_DATE_OPTION_DESCRIPTION)
|
|
22
20
|
.option('--tags <tags>', constants_1.TAGS_OPTION_DESCRIPTION)
|
|
23
|
-
.option('--assignee <id>', 'Filter by assignee profile ID')
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
args['assigneeProfileId'] = (0, parse_1.parseIntOption)(options.assignee, '--assignee');
|
|
56
|
-
const result = await (0, jsonRpc_1.callTool)('SearchActionItems', args);
|
|
57
|
-
(0, formatter_1.formatOutput)('SearchActionItems', result, jsonMode);
|
|
58
|
-
}
|
|
59
|
-
catch (error) {
|
|
60
|
-
const message = error instanceof Error ? error.message : constants_1.SEARCH_FAILED_ERROR;
|
|
61
|
-
(0, output_1.printText)((0, error_1.formatMcpError)(message) ?? message, output_1.TextType.Error);
|
|
62
|
-
process.exit(1);
|
|
21
|
+
.option('--assignee <id>', 'Filter by assignee profile ID'), types_1.ToolName.SearchActionItems, async (query, options) => ({
|
|
22
|
+
intent: query ?? 'Listing recent action items.',
|
|
23
|
+
pageIndex: (0, parse_1.parseIntOption)(options.page, '--page'),
|
|
24
|
+
searchTerms: query ? [query] : undefined,
|
|
25
|
+
status: options.status || undefined,
|
|
26
|
+
startDate: (0, date_1.getStartDate)(options) ??
|
|
27
|
+
(query
|
|
28
|
+
? undefined
|
|
29
|
+
: (0, date_1.getStartDateFromDaysAgo)(DEFAULT_ACTION_ITEMS_SEARCH_LAST_DAYS)),
|
|
30
|
+
endDate: options.to || undefined,
|
|
31
|
+
tags: options.tags ? await (0, tag_1.resolveTagValues)(options.tags) : undefined,
|
|
32
|
+
assigneeProfileId: (0, parse_1.parseOptionalIntOption)(options.assignee, '--assignee'),
|
|
33
|
+
}));
|
|
34
|
+
exports.createActionItemCommand = (0, command_1.defineToolCommand)(new commander_1.Command('create')
|
|
35
|
+
.description('Create an action item.')
|
|
36
|
+
.argument('<title>', 'Action item title')
|
|
37
|
+
.option('--description <description>', 'Set the description')
|
|
38
|
+
.option('--assignee <id>', 'Assign to a profile ID'), types_1.ToolName.CreateActionItem, (title, options) => ({
|
|
39
|
+
title,
|
|
40
|
+
description: options.description,
|
|
41
|
+
assigneeProfileId: (0, parse_1.parseOptionalIntOption)(options.assignee, '--assignee'),
|
|
42
|
+
}));
|
|
43
|
+
exports.updateActionItemCommand = (0, command_1.defineToolCommand)(new commander_1.Command('update')
|
|
44
|
+
.description('Update an action item.')
|
|
45
|
+
.argument('<id>', 'Action item ID')
|
|
46
|
+
.option('--title <title>', 'Set the title')
|
|
47
|
+
.option('--description <description>', 'Set the description')
|
|
48
|
+
.addOption(new commander_1.Option('--status <status>', 'Set completion status').choices(Object.values(types_1.ActionItemStatus)))
|
|
49
|
+
.option('--assignee <id|none>', 'Set or remove the assignee'), types_1.ToolName.UpdateActionItem, (identifier, { assignee, ...fields }) => {
|
|
50
|
+
if (assignee === undefined &&
|
|
51
|
+
!Object.values(fields).some((value) => value !== undefined)) {
|
|
52
|
+
throw new Error('Provide at least one field to update.');
|
|
63
53
|
}
|
|
54
|
+
return {
|
|
55
|
+
actionItemId: (0, parse_1.parseIntOption)(identifier, 'id'),
|
|
56
|
+
...fields,
|
|
57
|
+
...(assignee !== undefined && {
|
|
58
|
+
assigneeProfileId: assignee === 'none' ? null : (0, parse_1.parseIntOption)(assignee, '--assignee'),
|
|
59
|
+
}),
|
|
60
|
+
};
|
|
64
61
|
});
|
|
62
|
+
exports.deleteActionItemCommand = (0, command_1.defineToolCommand)(new commander_1.Command('delete')
|
|
63
|
+
.description('Delete an action item.')
|
|
64
|
+
.argument('<id>', 'Action item ID'), types_1.ToolName.DeleteActionItem, (identifier) => ({ actionItemId: (0, parse_1.parseIntOption)(identifier, 'id') }));
|
|
@@ -2,43 +2,17 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.searchCalendarCommand = void 0;
|
|
4
4
|
const commander_1 = require("commander");
|
|
5
|
-
const jsonRpc_1 = require("../client/jsonRpc");
|
|
6
5
|
const constants_1 = require("../constants");
|
|
6
|
+
const command_1 = require("../helpers/command");
|
|
7
7
|
const date_1 = require("../helpers/date");
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const formatter_1 = require("../helpers/formatter");
|
|
11
|
-
const parse_1 = require("../helpers/parse");
|
|
12
|
-
exports.searchCalendarCommand = new commander_1.Command('search')
|
|
8
|
+
const types_1 = require("../types");
|
|
9
|
+
exports.searchCalendarCommand = (0, command_1.defineToolCommand)(new commander_1.Command('search')
|
|
13
10
|
.description('Search calendar events.')
|
|
14
11
|
.option('--last <days>', 'Show events from the last N days')
|
|
15
12
|
.option('--from <date>', constants_1.START_DATE_OPTION_DESCRIPTION)
|
|
16
|
-
.option('--to <date>', constants_1.END_DATE_OPTION_DESCRIPTION)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
const jsonMode = exports.searchCalendarCommand.parent?.parent?.opts().json ?? false;
|
|
24
|
-
const args = {
|
|
25
|
-
intent: 'Listing calendar events.',
|
|
26
|
-
pageIndex: 0,
|
|
27
|
-
};
|
|
28
|
-
if (options.last) {
|
|
29
|
-
args['startDate'] = (0, date_1.getStartDateFromDaysAgo)((0, parse_1.parseIntOption)(options.last, '--last'));
|
|
30
|
-
}
|
|
31
|
-
else if (options.from) {
|
|
32
|
-
args['startDate'] = options.from;
|
|
33
|
-
}
|
|
34
|
-
if (options.to)
|
|
35
|
-
args['endDate'] = options.to;
|
|
36
|
-
const result = await (0, jsonRpc_1.callTool)('SearchCalendarEvents', args);
|
|
37
|
-
(0, formatter_1.formatOutput)('SearchCalendarEvents', result, jsonMode);
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
const message = error instanceof Error ? error.message : 'Calendar search failed.';
|
|
41
|
-
(0, output_1.printText)((0, error_1.formatMcpError)(message) ?? message, output_1.TextType.Error);
|
|
42
|
-
process.exit(1);
|
|
43
|
-
}
|
|
44
|
-
});
|
|
13
|
+
.option('--to <date>', constants_1.END_DATE_OPTION_DESCRIPTION), types_1.ToolName.SearchCalendarEvents, (options) => ({
|
|
14
|
+
intent: 'Listing calendar events.',
|
|
15
|
+
pageIndex: 0,
|
|
16
|
+
startDate: (0, date_1.getStartDate)(options),
|
|
17
|
+
endDate: options.to || undefined,
|
|
18
|
+
}));
|
|
@@ -2,24 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.searchCompaniesCommand = void 0;
|
|
4
4
|
const commander_1 = require("commander");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const formatter_1 = require("../helpers/formatter");
|
|
9
|
-
exports.searchCompaniesCommand = new commander_1.Command('search')
|
|
5
|
+
const command_1 = require("../helpers/command");
|
|
6
|
+
const types_1 = require("../types");
|
|
7
|
+
exports.searchCompaniesCommand = (0, command_1.defineToolCommand)(new commander_1.Command('search')
|
|
10
8
|
.description('Search companies.')
|
|
11
|
-
.argument('<terms...>', 'Search terms for company names or domains')
|
|
12
|
-
.action(async (terms) => {
|
|
13
|
-
try {
|
|
14
|
-
const jsonMode = exports.searchCompaniesCommand.parent?.parent?.opts().json ?? false;
|
|
15
|
-
const result = await (0, jsonRpc_1.callTool)('FindCompanies', {
|
|
16
|
-
searchTerms: terms,
|
|
17
|
-
});
|
|
18
|
-
(0, formatter_1.formatOutput)('FindCompanies', result, jsonMode);
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
const message = error instanceof Error ? error.message : 'Company search failed.';
|
|
22
|
-
(0, output_1.printText)((0, error_1.formatMcpError)(message) ?? message, output_1.TextType.Error);
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
9
|
+
.argument('<terms...>', 'Search terms for company names or domains'), types_1.ToolName.FindCompanies, (terms) => ({ searchTerms: terms }));
|
package/dist/commands/emails.js
CHANGED
|
@@ -2,35 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.searchEmailsCommand = void 0;
|
|
4
4
|
const commander_1 = require("commander");
|
|
5
|
-
const jsonRpc_1 = require("../client/jsonRpc");
|
|
6
5
|
const constants_1 = require("../constants");
|
|
7
|
-
const
|
|
8
|
-
const output_1 = require("../helpers/output");
|
|
9
|
-
const formatter_1 = require("../helpers/formatter");
|
|
6
|
+
const command_1 = require("../helpers/command");
|
|
10
7
|
const parse_1 = require("../helpers/parse");
|
|
11
|
-
|
|
8
|
+
const types_1 = require("../types");
|
|
9
|
+
exports.searchEmailsCommand = (0, command_1.defineToolCommand)(new commander_1.Command('search')
|
|
12
10
|
.description('Search connected email accounts. Supports filters: from:email, to:email, participant:email, before:YYYY-MM-DD, after:YYYY-MM-DD.')
|
|
13
11
|
.argument('[search]', 'Search term')
|
|
14
|
-
.option('-p, --page <index>', constants_1.PAGE_OPTION_DESCRIPTION, '0')
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (query !== undefined && query.trim() === '') {
|
|
18
|
-
(0, output_1.printText)('Search term cannot be empty.', output_1.TextType.Error);
|
|
19
|
-
process.exit(1);
|
|
20
|
-
}
|
|
21
|
-
const jsonMode = exports.searchEmailsCommand.parent?.parent?.opts().json ?? false;
|
|
22
|
-
const pageIndex = (0, parse_1.parseIntOption)(options.page, '--page');
|
|
23
|
-
const args = {
|
|
24
|
-
intent: query ?? 'Listing recent emails.',
|
|
25
|
-
pageIndex,
|
|
26
|
-
};
|
|
27
|
-
args['searchTerm'] = query ?? '';
|
|
28
|
-
const result = await (0, jsonRpc_1.callTool)('SearchEmails', args);
|
|
29
|
-
(0, formatter_1.formatOutput)('SearchEmails', result, jsonMode);
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
const message = error instanceof Error ? error.message : 'Email search failed.';
|
|
33
|
-
(0, output_1.printText)((0, error_1.formatMcpError)(message) ?? message, output_1.TextType.Error);
|
|
34
|
-
process.exit(1);
|
|
12
|
+
.option('-p, --page <index>', constants_1.PAGE_OPTION_DESCRIPTION, '0'), types_1.ToolName.SearchEmails, (query, options) => {
|
|
13
|
+
if (query?.trim() === '') {
|
|
14
|
+
throw new Error('Search term cannot be empty.');
|
|
35
15
|
}
|
|
16
|
+
return {
|
|
17
|
+
intent: query ?? 'Listing recent emails.',
|
|
18
|
+
pageIndex: (0, parse_1.parseIntOption)(options.page, '--page'),
|
|
19
|
+
searchTerm: query ?? '',
|
|
20
|
+
};
|
|
36
21
|
});
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.readMeetingsCommand = exports.searchMeetingsCommand = void 0;
|
|
4
4
|
const commander_1 = require("commander");
|
|
5
|
-
const jsonRpc_1 = require("../client/jsonRpc");
|
|
6
5
|
const constants_1 = require("../constants");
|
|
6
|
+
const command_1 = require("../helpers/command");
|
|
7
7
|
const date_1 = require("../helpers/date");
|
|
8
|
-
const error_1 = require("../helpers/error");
|
|
9
|
-
const output_1 = require("../helpers/output");
|
|
10
|
-
const formatter_1 = require("../helpers/formatter");
|
|
11
8
|
const parse_1 = require("../helpers/parse");
|
|
12
9
|
const tag_1 = require("../helpers/tag");
|
|
10
|
+
const types_1 = require("../types");
|
|
13
11
|
const DEFAULT_MEETINGS_SEARCH_LAST_DAYS = 7;
|
|
14
|
-
exports.searchMeetingsCommand = new commander_1.Command('search')
|
|
12
|
+
exports.searchMeetingsCommand = (0, command_1.defineToolCommand)(new commander_1.Command('search')
|
|
15
13
|
.description('Search meetings.')
|
|
16
14
|
.argument('[search]', 'Search term')
|
|
17
15
|
.option('-p, --page <index>', constants_1.PAGE_OPTION_DESCRIPTION, '0')
|
|
@@ -20,65 +18,28 @@ exports.searchMeetingsCommand = new commander_1.Command('search')
|
|
|
20
18
|
.option('--to <date>', constants_1.END_DATE_OPTION_DESCRIPTION)
|
|
21
19
|
.option('--tags <tags>', constants_1.TAGS_OPTION_DESCRIPTION)
|
|
22
20
|
.option('--profiles <ids>', constants_1.PROFILES_OPTION_DESCRIPTION)
|
|
23
|
-
.option('--domains <domains>', constants_1.DOMAINS_OPTION_DESCRIPTION)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
args['startDate'] = (0, date_1.getStartDateFromDaysAgo)((0, parse_1.parseIntOption)(options.last, '--last'));
|
|
40
|
-
}
|
|
41
|
-
else if (options.from) {
|
|
42
|
-
args['startDate'] = options.from;
|
|
43
|
-
}
|
|
44
|
-
else if (!query) {
|
|
45
|
-
args['startDate'] = (0, date_1.getStartDateFromDaysAgo)(DEFAULT_MEETINGS_SEARCH_LAST_DAYS);
|
|
46
|
-
}
|
|
47
|
-
if (options.to)
|
|
48
|
-
args['endDate'] = options.to;
|
|
49
|
-
if (options.tags) {
|
|
50
|
-
args['tags'] = await (0, tag_1.resolveTagValues)(options.tags);
|
|
51
|
-
}
|
|
52
|
-
if (options.profiles)
|
|
53
|
-
args['profiles'] = (0, parse_1.parseNumericIds)(options.profiles, 'profile ID');
|
|
54
|
-
if (options.domains)
|
|
55
|
-
args['domains'] = options.domains.split(',');
|
|
56
|
-
const result = await (0, jsonRpc_1.callTool)('SearchMeetings', args);
|
|
57
|
-
(0, formatter_1.formatOutput)('SearchMeetings', result, jsonMode);
|
|
58
|
-
}
|
|
59
|
-
catch (error) {
|
|
60
|
-
const message = error instanceof Error ? error.message : constants_1.SEARCH_FAILED_ERROR;
|
|
61
|
-
(0, output_1.printText)((0, error_1.formatMcpError)(message) ?? message, output_1.TextType.Error);
|
|
62
|
-
process.exit(1);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
exports.readMeetingsCommand = new commander_1.Command('read')
|
|
21
|
+
.option('--domains <domains>', constants_1.DOMAINS_OPTION_DESCRIPTION), types_1.ToolName.SearchMeetings, async (query, options) => ({
|
|
22
|
+
intent: query ?? 'Listing recent meetings.',
|
|
23
|
+
pageIndex: (0, parse_1.parseIntOption)(options.page, '--page'),
|
|
24
|
+
searchTerm: query,
|
|
25
|
+
startDate: (0, date_1.getStartDate)(options) ??
|
|
26
|
+
(query
|
|
27
|
+
? undefined
|
|
28
|
+
: (0, date_1.getStartDateFromDaysAgo)(DEFAULT_MEETINGS_SEARCH_LAST_DAYS)),
|
|
29
|
+
endDate: options.to || undefined,
|
|
30
|
+
tags: options.tags ? await (0, tag_1.resolveTagValues)(options.tags) : undefined,
|
|
31
|
+
profiles: options.profiles
|
|
32
|
+
? (0, parse_1.parseNumericIds)(options.profiles, 'profile ID')
|
|
33
|
+
: undefined,
|
|
34
|
+
domains: options.domains ? options.domains.split(',') : undefined,
|
|
35
|
+
}));
|
|
36
|
+
exports.readMeetingsCommand = (0, command_1.defineToolCommand)(new commander_1.Command('read')
|
|
66
37
|
.description('Get detailed meeting information.')
|
|
67
|
-
.argument('<ids...>', `Meeting IDs (max ${constants_1.MAX_READ_MEETING_IDENTIFIERS})`)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
intent: `Reading meeting details for IDs: ${meetingIds.join(', ')}.`,
|
|
75
|
-
meetingIds,
|
|
76
|
-
});
|
|
77
|
-
(0, formatter_1.formatOutput)('ReadMeetings', result, jsonMode);
|
|
78
|
-
}
|
|
79
|
-
catch (error) {
|
|
80
|
-
const message = error instanceof Error ? error.message : constants_1.READ_FAILED_ERROR;
|
|
81
|
-
(0, output_1.printText)((0, error_1.formatMcpError)(message) ?? message, output_1.TextType.Error);
|
|
82
|
-
process.exit(1);
|
|
83
|
-
}
|
|
38
|
+
.argument('<ids...>', `Meeting IDs (max ${constants_1.MAX_READ_MEETING_IDENTIFIERS})`), types_1.ToolName.ReadMeetings, (ids) => {
|
|
39
|
+
const meetingIds = (0, parse_1.validateMeetingIdentifiers)(ids);
|
|
40
|
+
(0, parse_1.validateReadMeetingIdentifierLimit)(meetingIds);
|
|
41
|
+
return {
|
|
42
|
+
intent: `Reading meeting details for IDs: ${meetingIds.join(', ')}.`,
|
|
43
|
+
meetingIds,
|
|
44
|
+
};
|
|
84
45
|
});
|
|
@@ -2,24 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.searchProfilesCommand = void 0;
|
|
4
4
|
const commander_1 = require("commander");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const formatter_1 = require("../helpers/formatter");
|
|
9
|
-
exports.searchProfilesCommand = new commander_1.Command('search')
|
|
5
|
+
const command_1 = require("../helpers/command");
|
|
6
|
+
const types_1 = require("../types");
|
|
7
|
+
exports.searchProfilesCommand = (0, command_1.defineToolCommand)(new commander_1.Command('search')
|
|
10
8
|
.description('Search people by name.')
|
|
11
|
-
.argument('<names...>', 'Names to search for')
|
|
12
|
-
.action(async (names) => {
|
|
13
|
-
try {
|
|
14
|
-
const jsonMode = exports.searchProfilesCommand.parent?.parent?.opts().json ?? false;
|
|
15
|
-
const result = await (0, jsonRpc_1.callTool)('FindProfiles', {
|
|
16
|
-
searchTerms: names,
|
|
17
|
-
});
|
|
18
|
-
(0, formatter_1.formatOutput)('FindProfiles', result, jsonMode);
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
const message = error instanceof Error ? error.message : 'People search failed.';
|
|
22
|
-
(0, output_1.printText)((0, error_1.formatMcpError)(message) ?? message, output_1.TextType.Error);
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|
|
25
|
-
});
|
|
9
|
+
.argument('<names...>', 'Names to search for'), types_1.ToolName.FindProfiles, (names) => ({ searchTerms: names }));
|
|
@@ -52,8 +52,13 @@ const commandGroups = [
|
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
name: 'action-items',
|
|
55
|
-
description: 'Search action items.',
|
|
56
|
-
subcommands: [
|
|
55
|
+
description: 'Search, create, update, and delete action items.',
|
|
56
|
+
subcommands: [
|
|
57
|
+
actionItems_1.searchActionItemsCommand,
|
|
58
|
+
actionItems_1.createActionItemCommand,
|
|
59
|
+
actionItems_1.updateActionItemCommand,
|
|
60
|
+
actionItems_1.deleteActionItemCommand,
|
|
61
|
+
],
|
|
57
62
|
},
|
|
58
63
|
{
|
|
59
64
|
name: 'tags',
|
package/dist/commands/support.js
CHANGED
|
@@ -2,26 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.searchSupportCommand = void 0;
|
|
4
4
|
const commander_1 = require("commander");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const formatter_1 = require("../helpers/formatter");
|
|
9
|
-
exports.searchSupportCommand = new commander_1.Command('search')
|
|
5
|
+
const command_1 = require("../helpers/command");
|
|
6
|
+
const types_1 = require("../types");
|
|
7
|
+
exports.searchSupportCommand = (0, command_1.defineToolCommand)(new commander_1.Command('search')
|
|
10
8
|
.description('Search Circleback support articles.')
|
|
11
|
-
.argument('[search]', 'Search term')
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const args = {
|
|
16
|
-
intent: query ?? 'Listing support articles.',
|
|
17
|
-
};
|
|
18
|
-
args['searchTerm'] = query ?? '';
|
|
19
|
-
const result = await (0, jsonRpc_1.callTool)('SearchSupportArticles', args);
|
|
20
|
-
(0, formatter_1.formatOutput)('SearchSupportArticles', result, jsonMode);
|
|
21
|
-
}
|
|
22
|
-
catch (error) {
|
|
23
|
-
const message = error instanceof Error ? error.message : 'Support search failed.';
|
|
24
|
-
(0, output_1.printText)((0, error_1.formatMcpError)(message) ?? message, output_1.TextType.Error);
|
|
25
|
-
process.exit(1);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
9
|
+
.argument('[search]', 'Search term'), types_1.ToolName.SearchSupportArticles, (query) => ({
|
|
10
|
+
intent: query ?? 'Listing support articles.',
|
|
11
|
+
searchTerm: query ?? '',
|
|
12
|
+
}));
|
package/dist/commands/tags.js
CHANGED
|
@@ -2,23 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.listTagsCommand = void 0;
|
|
4
4
|
const commander_1 = require("commander");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const formatter_1 = require("../helpers/formatter");
|
|
9
|
-
exports.listTagsCommand = new commander_1.Command('list')
|
|
10
|
-
.description('List all tags.')
|
|
11
|
-
.action(async () => {
|
|
12
|
-
try {
|
|
13
|
-
const jsonMode = exports.listTagsCommand.parent?.parent?.opts().json ?? false;
|
|
14
|
-
const result = await (0, jsonRpc_1.callTool)('ListTags', {
|
|
15
|
-
intent: 'Listing all tags.',
|
|
16
|
-
});
|
|
17
|
-
(0, formatter_1.formatOutput)('ListTags', result, jsonMode);
|
|
18
|
-
}
|
|
19
|
-
catch (error) {
|
|
20
|
-
const message = error instanceof Error ? error.message : 'Failed to list tags.';
|
|
21
|
-
(0, output_1.printText)((0, error_1.formatMcpError)(message) ?? message, output_1.TextType.Error);
|
|
22
|
-
process.exit(1);
|
|
23
|
-
}
|
|
24
|
-
});
|
|
5
|
+
const command_1 = require("../helpers/command");
|
|
6
|
+
const types_1 = require("../types");
|
|
7
|
+
exports.listTagsCommand = (0, command_1.defineToolCommand)(new commander_1.Command('list').description('List all tags.'), types_1.ToolName.ListTags, () => ({ intent: 'Listing all tags.' }));
|
|
@@ -2,60 +2,33 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTranscriptsCommand = exports.searchTranscriptsCommand = void 0;
|
|
4
4
|
const commander_1 = require("commander");
|
|
5
|
-
const jsonRpc_1 = require("../client/jsonRpc");
|
|
6
5
|
const constants_1 = require("../constants");
|
|
7
|
-
const
|
|
8
|
-
const output_1 = require("../helpers/output");
|
|
9
|
-
const formatter_1 = require("../helpers/formatter");
|
|
6
|
+
const command_1 = require("../helpers/command");
|
|
10
7
|
const parse_1 = require("../helpers/parse");
|
|
11
8
|
const tag_1 = require("../helpers/tag");
|
|
12
|
-
|
|
9
|
+
const types_1 = require("../types");
|
|
10
|
+
exports.searchTranscriptsCommand = (0, command_1.defineToolCommand)(new commander_1.Command('search')
|
|
13
11
|
.description('Search meeting transcripts.')
|
|
14
12
|
.argument('<search>', 'Search term')
|
|
15
13
|
.option('--tags <tags>', constants_1.TAGS_OPTION_DESCRIPTION)
|
|
16
14
|
.option('--profiles <ids>', constants_1.PROFILES_OPTION_DESCRIPTION)
|
|
17
15
|
.option('--domains <domains>', constants_1.DOMAINS_OPTION_DESCRIPTION)
|
|
18
|
-
.showHelpAfterError(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
if (options.profiles)
|
|
30
|
-
args['profiles'] = (0, parse_1.parseNumericIds)(options.profiles, 'profile ID');
|
|
31
|
-
if (options.domains)
|
|
32
|
-
args['domains'] = options.domains.split(',');
|
|
33
|
-
const result = await (0, jsonRpc_1.callTool)('SearchTranscripts', args);
|
|
34
|
-
(0, formatter_1.formatOutput)('SearchTranscripts', result, jsonMode);
|
|
35
|
-
}
|
|
36
|
-
catch (error) {
|
|
37
|
-
const message = error instanceof Error ? error.message : 'Transcript search failed.';
|
|
38
|
-
(0, output_1.printText)((0, error_1.formatMcpError)(message) ?? message, output_1.TextType.Error);
|
|
39
|
-
process.exit(1);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
exports.getTranscriptsCommand = new commander_1.Command('read')
|
|
16
|
+
.showHelpAfterError(), types_1.ToolName.SearchTranscripts, async (query, options) => ({
|
|
17
|
+
intent: query,
|
|
18
|
+
searchTerm: query,
|
|
19
|
+
tags: options.tags ? await (0, tag_1.resolveTagValues)(options.tags) : undefined,
|
|
20
|
+
profiles: options.profiles
|
|
21
|
+
? (0, parse_1.parseNumericIds)(options.profiles, 'profile ID')
|
|
22
|
+
: undefined,
|
|
23
|
+
domains: options.domains ? options.domains.split(',') : undefined,
|
|
24
|
+
}));
|
|
25
|
+
exports.getTranscriptsCommand = (0, command_1.defineToolCommand)(new commander_1.Command('read')
|
|
43
26
|
.description('Get full meeting transcripts.')
|
|
44
27
|
.argument('<ids...>', 'Meeting IDs (max 50)')
|
|
45
|
-
.showHelpAfterError(
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
intent: `Getting transcripts for meetings with IDs: ${meetingIds.join(', ')}.`,
|
|
52
|
-
meetingIds,
|
|
53
|
-
});
|
|
54
|
-
(0, formatter_1.formatOutput)('GetTranscriptsForMeetings', result, jsonMode);
|
|
55
|
-
}
|
|
56
|
-
catch (error) {
|
|
57
|
-
const message = error instanceof Error ? error.message : 'Transcript retrieval failed.';
|
|
58
|
-
(0, output_1.printText)((0, error_1.formatMcpError)(message) ?? message, output_1.TextType.Error);
|
|
59
|
-
process.exit(1);
|
|
60
|
-
}
|
|
28
|
+
.showHelpAfterError(), types_1.ToolName.GetTranscriptsForMeetings, (ids) => {
|
|
29
|
+
const meetingIds = (0, parse_1.validateMeetingIdentifiers)(ids);
|
|
30
|
+
return {
|
|
31
|
+
intent: `Getting transcripts for meetings with IDs: ${meetingIds.join(', ')}.`,
|
|
32
|
+
meetingIds,
|
|
33
|
+
};
|
|
61
34
|
});
|
package/dist/constants.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.DOMAINS_OPTION_DESCRIPTION = exports.PROFILES_OPTION_DESCRIPTION = exports.TAGS_OPTION_DESCRIPTION = exports.END_DATE_OPTION_DESCRIPTION = exports.START_DATE_OPTION_DESCRIPTION = exports.PAGE_OPTION_DESCRIPTION = exports.UNASSIGNED_ACTION_ITEM_ASSIGNEE_LABEL = exports.DEFAULT_MEETING_NAME = exports.MAX_READ_MEETING_IDENTIFIERS = exports.CALLBACK_TIMEOUT_MILLISECONDS = exports.OAUTH_SCOPE = exports.TOKENS_FILE = exports.CONFIG_DIRECTORY = exports.ASCII_LOGO = exports.SECONDARY_COLOR = exports.BRAND_COLOR = exports.API_KEY_SETTINGS_URL = exports.API_KEY_ENVIRONMENT_VARIABLE = exports.API_KEY_PREFIX = exports.CLIENT_VERSION_HEADER = exports.CLIENT_VERSION = exports.CLIENT_PACKAGE_NAME = exports.CLIENT_NAME = exports.BASE_URL = void 0;
|
|
7
7
|
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
8
|
const node_path_1 = __importDefault(require("node:path"));
|
|
9
9
|
const node_os_1 = __importDefault(require("node:os"));
|
|
@@ -43,7 +43,7 @@ exports.ASCII_LOGO = `
|
|
|
43
43
|
============= +++++`;
|
|
44
44
|
exports.CONFIG_DIRECTORY = node_path_1.default.join(node_os_1.default.homedir(), '.config', 'circleback');
|
|
45
45
|
exports.TOKENS_FILE = node_path_1.default.join(exports.CONFIG_DIRECTORY, 'tokens.json');
|
|
46
|
-
exports.OAUTH_SCOPE = 'user';
|
|
46
|
+
exports.OAUTH_SCOPE = 'user user:write';
|
|
47
47
|
exports.CALLBACK_TIMEOUT_MILLISECONDS = 120_000;
|
|
48
48
|
exports.MAX_READ_MEETING_IDENTIFIERS = 50;
|
|
49
49
|
exports.DEFAULT_MEETING_NAME = 'New meeting';
|
|
@@ -54,6 +54,3 @@ exports.END_DATE_OPTION_DESCRIPTION = 'End date (YYYY-MM-DD)';
|
|
|
54
54
|
exports.TAGS_OPTION_DESCRIPTION = 'Comma-separated tag names or IDs';
|
|
55
55
|
exports.PROFILES_OPTION_DESCRIPTION = 'Comma-separated profile IDs';
|
|
56
56
|
exports.DOMAINS_OPTION_DESCRIPTION = 'Comma-separated domains';
|
|
57
|
-
exports.LAST_AND_FROM_CONFLICT_ERROR = 'Cannot use --last and --from together.';
|
|
58
|
-
exports.SEARCH_FAILED_ERROR = 'Search failed.';
|
|
59
|
-
exports.READ_FAILED_ERROR = 'Read failed.';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defineToolCommand = void 0;
|
|
4
|
+
const jsonRpc_1 = require("../client/jsonRpc");
|
|
5
|
+
const error_1 = require("./error");
|
|
6
|
+
const formatter_1 = require("./formatter");
|
|
7
|
+
const output_1 = require("./output");
|
|
8
|
+
const defineToolCommand = (command, toolName, getArguments) => command.action(async (...args) => {
|
|
9
|
+
try {
|
|
10
|
+
const result = await (0, jsonRpc_1.callTool)(toolName, await getArguments(...args));
|
|
11
|
+
(0, formatter_1.formatOutput)(toolName, result, Boolean(command.optsWithGlobals().json));
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
const message = error instanceof Error ? error.message : `${toolName} failed.`;
|
|
15
|
+
(0, output_1.printText)((0, error_1.formatMcpError)(message) ?? message, output_1.TextType.Error);
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
exports.defineToolCommand = defineToolCommand;
|
package/dist/helpers/date.js
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.formatDateTime = exports.formatDate = exports.getStartDateFromDaysAgo = void 0;
|
|
3
|
+
exports.formatDateTime = exports.formatDate = exports.getStartDate = exports.getStartDateFromDaysAgo = void 0;
|
|
4
|
+
const parse_1 = require("./parse");
|
|
4
5
|
const getStartDateFromDaysAgo = (days) => new Date(Date.now() - days * 86400000).toISOString().slice(0, 10);
|
|
5
6
|
exports.getStartDateFromDaysAgo = getStartDateFromDaysAgo;
|
|
7
|
+
const getStartDate = ({ last, from, }) => {
|
|
8
|
+
if (last && from)
|
|
9
|
+
throw new Error('Cannot use --last and --from together.');
|
|
10
|
+
return last
|
|
11
|
+
? (0, exports.getStartDateFromDaysAgo)((0, parse_1.parseIntOption)(last, '--last'))
|
|
12
|
+
: from || undefined;
|
|
13
|
+
};
|
|
14
|
+
exports.getStartDate = getStartDate;
|
|
6
15
|
const formatDate = (dateString) => {
|
|
7
16
|
const date = new Date(dateString);
|
|
8
17
|
return date.toLocaleDateString('en-US', {
|
|
@@ -5,35 +5,58 @@ const table_1 = require("./table");
|
|
|
5
5
|
const parse_1 = require("./parse");
|
|
6
6
|
const output_1 = require("./output");
|
|
7
7
|
const zod_1 = require("zod");
|
|
8
|
+
const types_1 = require("../types");
|
|
8
9
|
const stringify = (value) => typeof value === 'string' ? value : JSON.stringify(value, null, 2);
|
|
10
|
+
const ActionItemChangeSchema = zod_1.z.object({
|
|
11
|
+
id: zod_1.z.number(),
|
|
12
|
+
title: zod_1.z.string(),
|
|
13
|
+
status: zod_1.z.string(),
|
|
14
|
+
});
|
|
15
|
+
const formatActionItemChange = (verb, data) => {
|
|
16
|
+
const result = ActionItemChangeSchema.safeParse(data);
|
|
17
|
+
if (!result.success)
|
|
18
|
+
return;
|
|
19
|
+
const { id, title, status } = result.data;
|
|
20
|
+
return `${verb} action item ${id}: ${title} (${status})`;
|
|
21
|
+
};
|
|
9
22
|
const formatForTool = (toolName, data) => {
|
|
23
|
+
switch (toolName) {
|
|
24
|
+
case types_1.ToolName.CreateActionItem:
|
|
25
|
+
return formatActionItemChange('Created', data);
|
|
26
|
+
case types_1.ToolName.UpdateActionItem:
|
|
27
|
+
return formatActionItemChange('Updated', data);
|
|
28
|
+
case types_1.ToolName.DeleteActionItem:
|
|
29
|
+
return formatActionItemChange('Deleted', data);
|
|
30
|
+
}
|
|
10
31
|
if (!Array.isArray(data))
|
|
11
32
|
return;
|
|
12
33
|
switch (toolName) {
|
|
13
|
-
case
|
|
34
|
+
case types_1.ToolName.SearchMeetings:
|
|
14
35
|
return (0, table_1.formatMeetingsList)(data);
|
|
15
|
-
case
|
|
36
|
+
case types_1.ToolName.ReadMeetings:
|
|
16
37
|
return (0, table_1.formatMeetingDetails)(data);
|
|
17
|
-
case
|
|
38
|
+
case types_1.ToolName.GetTranscriptsForMeetings:
|
|
18
39
|
return (0, table_1.formatTranscriptReadResults)(data);
|
|
19
|
-
case
|
|
40
|
+
case types_1.ToolName.SearchTranscripts:
|
|
20
41
|
return (0, table_1.formatTranscriptSearchResults)(data);
|
|
21
|
-
case
|
|
42
|
+
case types_1.ToolName.SearchCalendarEvents:
|
|
22
43
|
return (0, table_1.formatCalendarEvents)(data);
|
|
23
|
-
case
|
|
44
|
+
case types_1.ToolName.FindProfiles:
|
|
24
45
|
return (0, table_1.formatProfiles)(data);
|
|
25
|
-
case
|
|
46
|
+
case types_1.ToolName.FindCompanies:
|
|
26
47
|
return (0, table_1.formatCompanies)(data);
|
|
27
|
-
case
|
|
48
|
+
case types_1.ToolName.SearchSupportArticles:
|
|
28
49
|
return (0, table_1.formatSupportArticles)(data);
|
|
29
|
-
case
|
|
50
|
+
case types_1.ToolName.SearchEmails:
|
|
30
51
|
return (0, table_1.formatEmails)(data);
|
|
31
|
-
case
|
|
52
|
+
case types_1.ToolName.SearchActionItems:
|
|
32
53
|
return (0, table_1.formatActionItems)(data);
|
|
33
|
-
case
|
|
54
|
+
case types_1.ToolName.ListTags:
|
|
34
55
|
return (0, table_1.formatTags)(data);
|
|
35
|
-
default:
|
|
36
|
-
|
|
56
|
+
default: {
|
|
57
|
+
const _absurd = toolName;
|
|
58
|
+
return _absurd;
|
|
59
|
+
}
|
|
37
60
|
}
|
|
38
61
|
};
|
|
39
62
|
const formatOutput = (toolName, rawText, jsonMode) => {
|
package/dist/helpers/parse.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateReadMeetingIdentifierLimit = exports.validateMeetingIdentifiers = exports.parseNumericIds = exports.parseIntOption = exports.extractAndValidateObjectFromString = void 0;
|
|
3
|
+
exports.validateReadMeetingIdentifierLimit = exports.validateMeetingIdentifiers = exports.parseNumericIds = exports.parseOptionalIntOption = exports.parseIntOption = exports.extractAndValidateObjectFromString = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const output_1 = require("./output");
|
|
@@ -29,6 +29,8 @@ const parseIntOption = (value, flagName) => {
|
|
|
29
29
|
return result.data;
|
|
30
30
|
};
|
|
31
31
|
exports.parseIntOption = parseIntOption;
|
|
32
|
+
const parseOptionalIntOption = (value, flagName) => (value ? (0, exports.parseIntOption)(value, flagName) : undefined);
|
|
33
|
+
exports.parseOptionalIntOption = parseOptionalIntOption;
|
|
32
34
|
const parseNumericIds = (value, label) => {
|
|
33
35
|
const result = numericIdsSchema.safeParse(value.split(','));
|
|
34
36
|
if (!result.success) {
|
package/dist/helpers/tag.js
CHANGED
|
@@ -5,13 +5,14 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const jsonRpc_1 = require("../client/jsonRpc");
|
|
6
6
|
const output_1 = require("./output");
|
|
7
7
|
const parse_1 = require("./parse");
|
|
8
|
+
const types_1 = require("../types");
|
|
8
9
|
const tagItemSchema = zod_1.z.object({
|
|
9
10
|
id: zod_1.z.number(),
|
|
10
11
|
name: zod_1.z.string(),
|
|
11
12
|
});
|
|
12
13
|
const tagsSchema = zod_1.z.array(tagItemSchema);
|
|
13
14
|
const fetchUserTags = async () => {
|
|
14
|
-
const rawResult = await (0, jsonRpc_1.callTool)(
|
|
15
|
+
const rawResult = await (0, jsonRpc_1.callTool)(types_1.ToolName.ListTags, {
|
|
15
16
|
intent: 'Resolving tag values.',
|
|
16
17
|
});
|
|
17
18
|
return (0, parse_1.extractAndValidateObjectFromString)(rawResult, tagsSchema);
|
package/dist/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isJsonRpcResponse = exports.jsonRpcResultSchema = exports.isOAuthTokenResponse = exports.isStoredApiKey = exports.parseStoredCredentials = exports.CredentialSource = exports.CredentialType = void 0;
|
|
3
|
+
exports.isJsonRpcResponse = exports.jsonRpcResultSchema = exports.isOAuthTokenResponse = exports.isStoredApiKey = exports.parseStoredCredentials = exports.ActionItemStatus = exports.ToolName = exports.CredentialSource = exports.CredentialType = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
var CredentialType;
|
|
6
6
|
(function (CredentialType) {
|
|
@@ -12,6 +12,28 @@ var CredentialSource;
|
|
|
12
12
|
CredentialSource["Environment"] = "environment";
|
|
13
13
|
CredentialSource["Stored"] = "stored";
|
|
14
14
|
})(CredentialSource || (exports.CredentialSource = CredentialSource = {}));
|
|
15
|
+
var ToolName;
|
|
16
|
+
(function (ToolName) {
|
|
17
|
+
ToolName["SearchMeetings"] = "SearchMeetings";
|
|
18
|
+
ToolName["ReadMeetings"] = "ReadMeetings";
|
|
19
|
+
ToolName["GetTranscriptsForMeetings"] = "GetTranscriptsForMeetings";
|
|
20
|
+
ToolName["SearchTranscripts"] = "SearchTranscripts";
|
|
21
|
+
ToolName["SearchCalendarEvents"] = "SearchCalendarEvents";
|
|
22
|
+
ToolName["FindProfiles"] = "FindProfiles";
|
|
23
|
+
ToolName["FindCompanies"] = "FindCompanies";
|
|
24
|
+
ToolName["SearchSupportArticles"] = "SearchSupportArticles";
|
|
25
|
+
ToolName["SearchEmails"] = "SearchEmails";
|
|
26
|
+
ToolName["SearchActionItems"] = "SearchActionItems";
|
|
27
|
+
ToolName["ListTags"] = "ListTags";
|
|
28
|
+
ToolName["CreateActionItem"] = "CreateActionItem";
|
|
29
|
+
ToolName["UpdateActionItem"] = "UpdateActionItem";
|
|
30
|
+
ToolName["DeleteActionItem"] = "DeleteActionItem";
|
|
31
|
+
})(ToolName || (exports.ToolName = ToolName = {}));
|
|
32
|
+
var ActionItemStatus;
|
|
33
|
+
(function (ActionItemStatus) {
|
|
34
|
+
ActionItemStatus["Pending"] = "PENDING";
|
|
35
|
+
ActionItemStatus["Done"] = "DONE";
|
|
36
|
+
})(ActionItemStatus || (exports.ActionItemStatus = ActionItemStatus = {}));
|
|
15
37
|
const storedTokensSchema = zod_1.z.object({
|
|
16
38
|
accessToken: zod_1.z.string(),
|
|
17
39
|
refreshToken: zod_1.z.string(),
|
package/package.json
CHANGED