@circleback/cli 0.6.0 → 0.7.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 +5 -4
- package/dist/commands/meetings.js +56 -1
- package/dist/commands/registry.js +6 -2
- package/dist/helpers/formatter.js +19 -0
- package/dist/types.js +8 -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, and manage your action items.
|
|
3
|
+
Search and access your meetings, transcripts, emails, calendar events, and more from the terminal, and manage your action items, tags, and meeting access.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -22,8 +22,8 @@ cb meetings
|
|
|
22
22
|
# Search by keyword
|
|
23
23
|
cb meetings "product review"
|
|
24
24
|
|
|
25
|
-
# Read by ID (from the meeting URL, e.g. circleback.ai/meetings/
|
|
26
|
-
cb meetings read
|
|
25
|
+
# Read by ID (from the meeting URL, e.g. circleback.ai/meetings/abc123)
|
|
26
|
+
cb meetings read abc123
|
|
27
27
|
|
|
28
28
|
# Search transcripts
|
|
29
29
|
cb transcripts "pricing discussion"
|
|
@@ -48,6 +48,7 @@ cb meetings --json
|
|
|
48
48
|
| `cb update` | Update CLI to the latest version |
|
|
49
49
|
| `cb meetings [search]` | Search meetings |
|
|
50
50
|
| `cb meetings read <ids...>` | Read detailed meeting info, notes, and action items (max 50) |
|
|
51
|
+
| `cb meetings share <id>` | Share a meeting or remove access |
|
|
51
52
|
| `cb transcripts <search>` | Search transcript content |
|
|
52
53
|
| `cb transcripts read <ids...>` | Read full transcripts (max 50) |
|
|
53
54
|
| `cb calendar` | Search calendar events |
|
|
@@ -115,7 +116,7 @@ For stateless automation, set `CIRCLEBACK_API_KEY` instead of logging in:
|
|
|
115
116
|
CIRCLEBACK_API_KEY=cb_your_api_key cb meetings --json
|
|
116
117
|
```
|
|
117
118
|
|
|
118
|
-
Changing action items or
|
|
119
|
+
Changing action items, tags, or meeting access needs write access. Browser logins from before v0.5.0 don't include it, so run `cb auth login` again; read-only API keys can't make changes.
|
|
119
120
|
|
|
120
121
|
`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.
|
|
121
122
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readMeetingsCommand = exports.searchMeetingsCommand = void 0;
|
|
3
|
+
exports.shareMeetingCommand = exports.readMeetingsCommand = exports.searchMeetingsCommand = void 0;
|
|
4
4
|
const commander_1 = require("commander");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const command_1 = require("../helpers/command");
|
|
@@ -43,3 +43,58 @@ exports.readMeetingsCommand = (0, command_1.defineToolCommand)(new commander_1.C
|
|
|
43
43
|
meetingIds,
|
|
44
44
|
};
|
|
45
45
|
});
|
|
46
|
+
const ACCESS_LEVELS = [...Object.values(types_1.ShareableMeetingAccess), 'none'];
|
|
47
|
+
const getAccess = (access) => access === 'none' ? null : access;
|
|
48
|
+
exports.shareMeetingCommand = (0, command_1.defineToolCommand)(new commander_1.Command('share')
|
|
49
|
+
.description('Share a meeting, or remove access with --access none.')
|
|
50
|
+
.argument('<id>', 'Meeting ID')
|
|
51
|
+
.option('--email <emails>', 'Share with email addresses (comma-separated)')
|
|
52
|
+
.option('--profile <ids>', 'Share with people (comma-separated)')
|
|
53
|
+
.option('--workspace <ids>', 'Share with workspaces (comma-separated)')
|
|
54
|
+
.option('--team <ids>', 'Share with teams (comma-separated)')
|
|
55
|
+
.addOption(new commander_1.Option('--access <access>', 'Set the access level, or none to remove access (required with --email or --profile)').choices(ACCESS_LEVELS))
|
|
56
|
+
.addOption(new commander_1.Option('--link <access>', 'Set the meeting link access, or none to turn it off').choices(ACCESS_LEVELS))
|
|
57
|
+
.option('--send-email', 'Email the people the meeting is shared with'), types_1.ToolName.ShareMeeting, (meetingId, options) => {
|
|
58
|
+
const targets = [
|
|
59
|
+
options.email,
|
|
60
|
+
options.profile,
|
|
61
|
+
options.team,
|
|
62
|
+
options.workspace,
|
|
63
|
+
options.link,
|
|
64
|
+
];
|
|
65
|
+
if (targets.every((target) => target === undefined)) {
|
|
66
|
+
throw new Error('Set at least one of --email, --profile, --team, --workspace, or --link.');
|
|
67
|
+
}
|
|
68
|
+
if ((options.email || options.profile) && !options.access) {
|
|
69
|
+
throw new Error('--access is required with --email or --profile.');
|
|
70
|
+
}
|
|
71
|
+
const access = getAccess(options.access);
|
|
72
|
+
const sendEmail = options.sendEmail;
|
|
73
|
+
const parseIds = (value, label) => value ? (0, parse_1.parseNumericIds)(value, label) : [];
|
|
74
|
+
return {
|
|
75
|
+
meetingId,
|
|
76
|
+
shares: [
|
|
77
|
+
...(options.email?.split(',') ?? []).map((email) => ({
|
|
78
|
+
email: email.trim(),
|
|
79
|
+
access,
|
|
80
|
+
sendEmail,
|
|
81
|
+
})),
|
|
82
|
+
...parseIds(options.profile, 'profile ID').map((profileId) => ({
|
|
83
|
+
profileId,
|
|
84
|
+
access,
|
|
85
|
+
sendEmail,
|
|
86
|
+
})),
|
|
87
|
+
...parseIds(options.team, 'team ID').map((teamId) => ({
|
|
88
|
+
teamId,
|
|
89
|
+
access,
|
|
90
|
+
sendEmail,
|
|
91
|
+
})),
|
|
92
|
+
...parseIds(options.workspace, 'workspace ID').map((workspaceId) => ({
|
|
93
|
+
workspaceId,
|
|
94
|
+
access,
|
|
95
|
+
sendEmail,
|
|
96
|
+
})),
|
|
97
|
+
...(options.link ? [{ linkAccess: getAccess(options.link) }] : []),
|
|
98
|
+
],
|
|
99
|
+
};
|
|
100
|
+
});
|
|
@@ -17,8 +17,12 @@ const standaloneCommands = [auth_1.authCommand, update_1.updateCommand];
|
|
|
17
17
|
const commandGroups = [
|
|
18
18
|
{
|
|
19
19
|
name: 'meetings',
|
|
20
|
-
description: 'Find
|
|
21
|
-
subcommands: [
|
|
20
|
+
description: 'Find, read, and share meetings.',
|
|
21
|
+
subcommands: [
|
|
22
|
+
meetings_1.searchMeetingsCommand,
|
|
23
|
+
meetings_1.readMeetingsCommand,
|
|
24
|
+
meetings_1.shareMeetingCommand,
|
|
25
|
+
],
|
|
22
26
|
},
|
|
23
27
|
{
|
|
24
28
|
name: 'transcripts',
|
|
@@ -27,6 +27,23 @@ const formatTagChange = (verb, data) => {
|
|
|
27
27
|
const { id, name } = result.data;
|
|
28
28
|
return `${verb} tag ${id}: ${name}`;
|
|
29
29
|
};
|
|
30
|
+
const MeetingShareChangeSchema = zod_1.z.object({
|
|
31
|
+
id: zod_1.z.string(),
|
|
32
|
+
name: zod_1.z.string().nullable(),
|
|
33
|
+
errors: zod_1.z
|
|
34
|
+
.array(zod_1.z.object({ index: zod_1.z.number(), error: zod_1.z.string() }))
|
|
35
|
+
.optional(),
|
|
36
|
+
});
|
|
37
|
+
const formatMeetingShareChange = (data) => {
|
|
38
|
+
const result = MeetingShareChangeSchema.safeParse(data);
|
|
39
|
+
if (!result.success)
|
|
40
|
+
return;
|
|
41
|
+
const { id, name, errors = [] } = result.data;
|
|
42
|
+
return [
|
|
43
|
+
`Updated sharing for meeting ${id}${name ? `: ${name}` : ''}`,
|
|
44
|
+
...errors.map(({ index, error }) => `Could not share target ${index + 1}: ${error}`),
|
|
45
|
+
].join('\n');
|
|
46
|
+
};
|
|
30
47
|
const formatForTool = (toolName, data) => {
|
|
31
48
|
switch (toolName) {
|
|
32
49
|
case types_1.ToolName.CreateActionItem:
|
|
@@ -41,6 +58,8 @@ const formatForTool = (toolName, data) => {
|
|
|
41
58
|
return formatTagChange('Updated', data);
|
|
42
59
|
case types_1.ToolName.DeleteTag:
|
|
43
60
|
return formatTagChange('Deleted', data);
|
|
61
|
+
case types_1.ToolName.ShareMeeting:
|
|
62
|
+
return formatMeetingShareChange(data);
|
|
44
63
|
}
|
|
45
64
|
if (!Array.isArray(data))
|
|
46
65
|
return;
|
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.ActionItemStatus = exports.ToolName = exports.CredentialSource = exports.CredentialType = void 0;
|
|
3
|
+
exports.isJsonRpcResponse = exports.jsonRpcResultSchema = exports.isOAuthTokenResponse = exports.isStoredApiKey = exports.parseStoredCredentials = exports.ShareableMeetingAccess = 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) {
|
|
@@ -33,12 +33,19 @@ var ToolName;
|
|
|
33
33
|
ToolName["DeleteTag"] = "DeleteTag";
|
|
34
34
|
ToolName["AddTagToMeetings"] = "AddTagToMeetings";
|
|
35
35
|
ToolName["RemoveTagFromMeetings"] = "RemoveTagFromMeetings";
|
|
36
|
+
ToolName["ShareMeeting"] = "ShareMeeting";
|
|
36
37
|
})(ToolName || (exports.ToolName = ToolName = {}));
|
|
37
38
|
var ActionItemStatus;
|
|
38
39
|
(function (ActionItemStatus) {
|
|
39
40
|
ActionItemStatus["Pending"] = "PENDING";
|
|
40
41
|
ActionItemStatus["Done"] = "DONE";
|
|
41
42
|
})(ActionItemStatus || (exports.ActionItemStatus = ActionItemStatus = {}));
|
|
43
|
+
var ShareableMeetingAccess;
|
|
44
|
+
(function (ShareableMeetingAccess) {
|
|
45
|
+
ShareableMeetingAccess["Editor"] = "Editor";
|
|
46
|
+
ShareableMeetingAccess["Viewer"] = "Viewer";
|
|
47
|
+
ShareableMeetingAccess["LimitedViewer"] = "LimitedViewer";
|
|
48
|
+
})(ShareableMeetingAccess || (exports.ShareableMeetingAccess = ShareableMeetingAccess = {}));
|
|
42
49
|
const storedTokensSchema = zod_1.z.object({
|
|
43
50
|
accessToken: zod_1.z.string(),
|
|
44
51
|
refreshToken: zod_1.z.string(),
|
package/package.json
CHANGED