@circleback/cli 0.1.12 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -51,7 +51,7 @@ cb meetings --json
51
51
  | `cb transcripts read <ids...>` | Read full transcripts (numeric IDs or linkIds, max 50) |
52
52
  | `cb calendar` | Search calendar events |
53
53
  | `cb people <names...>` | Search people by name |
54
- | `cb companies <terms...>` | Search companies by domain |
54
+ | `cb companies <terms...>` | Search companies by name or domain |
55
55
  | `cb emails [search]` | Search connected email accounts |
56
56
  | `cb support [search]` | Search Circleback support articles |
57
57
 
@@ -35,6 +35,7 @@ const sendRequest = async (method, params, accessToken) => fetch(`${constants_1.
35
35
  'Content-Type': 'application/json',
36
36
  Accept: 'application/json, text/event-stream',
37
37
  Authorization: `Bearer ${accessToken}`,
38
+ [constants_1.CLIENT_VERSION_HEADER]: constants_1.CLIENT_VERSION,
38
39
  },
39
40
  body: JSON.stringify({
40
41
  jsonrpc: '2.0',
@@ -3,22 +3,22 @@ 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.searchDomainsCommand = void 0;
6
+ exports.searchCompaniesCommand = void 0;
7
7
  const commander_1 = require("commander");
8
8
  const chalk_1 = __importDefault(require("chalk"));
9
9
  const jsonRpc_1 = require("../client/jsonRpc");
10
10
  const error_1 = require("../helpers/error");
11
11
  const formatter_1 = require("../helpers/formatter");
12
- exports.searchDomainsCommand = new commander_1.Command('search')
12
+ exports.searchCompaniesCommand = new commander_1.Command('search')
13
13
  .description('Search companies.')
14
- .argument('<terms...>', 'Search terms for domains')
14
+ .argument('<terms...>', 'Search terms for company names or domains')
15
15
  .action(async (terms) => {
16
16
  try {
17
- const jsonMode = exports.searchDomainsCommand.parent?.parent?.opts().json ?? false;
18
- const result = await (0, jsonRpc_1.callTool)('FindDomains', {
17
+ const jsonMode = exports.searchCompaniesCommand.parent?.parent?.opts().json ?? false;
18
+ const result = await (0, jsonRpc_1.callTool)('FindCompanies', {
19
19
  searchTerms: terms,
20
20
  });
21
- (0, formatter_1.formatOutput)('FindDomains', result, jsonMode);
21
+ (0, formatter_1.formatOutput)('FindCompanies', result, jsonMode);
22
22
  }
23
23
  catch (error) {
24
24
  const message = error instanceof Error ? error.message : 'Company search failed.';
@@ -5,7 +5,7 @@ const commander_1 = require("commander");
5
5
  const actionItems_1 = require("./actionItems");
6
6
  const auth_1 = require("./auth");
7
7
  const calendar_1 = require("./calendar");
8
- const domains_1 = require("./domains");
8
+ const companies_1 = require("./companies");
9
9
  const emails_1 = require("./emails");
10
10
  const meetings_1 = require("./meetings");
11
11
  const profiles_1 = require("./profiles");
@@ -42,7 +42,7 @@ const commandGroups = [
42
42
  {
43
43
  name: 'companies',
44
44
  description: 'Search companies.',
45
- subcommands: [domains_1.searchDomainsCommand],
45
+ subcommands: [companies_1.searchCompaniesCommand],
46
46
  },
47
47
  {
48
48
  name: 'support',
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.READ_FAILED_ERROR = exports.SEARCH_FAILED_ERROR = exports.LAST_AND_FROM_CONFLICT_ERROR = 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.CALLBACK_TIMEOUT_MILLISECONDS = exports.OAUTH_SCOPE = exports.TOKENS_FILE = exports.CONFIG_DIRECTORY = exports.ASCII_LOGO = exports.SECONDARY_COLOR = exports.BRAND_COLOR = exports.CLIENT_VERSION = exports.CLIENT_PACKAGE_NAME = exports.CLIENT_NAME = exports.BASE_URL = void 0;
6
+ exports.READ_FAILED_ERROR = exports.SEARCH_FAILED_ERROR = exports.LAST_AND_FROM_CONFLICT_ERROR = 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.CALLBACK_TIMEOUT_MILLISECONDS = exports.OAUTH_SCOPE = exports.TOKENS_FILE = exports.CONFIG_DIRECTORY = exports.ASCII_LOGO = exports.SECONDARY_COLOR = exports.BRAND_COLOR = 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"));
@@ -14,6 +14,8 @@ exports.BASE_URL = 'https://circleback.ai';
14
14
  exports.CLIENT_NAME = 'Circleback CLI';
15
15
  exports.CLIENT_PACKAGE_NAME = '@circleback/cli';
16
16
  exports.CLIENT_VERSION = packageJson.version;
17
+ // Must match CIRCLEBACK_CLI_VERSION_HEADER in apps/web/helpers/api/mcp/version.ts.
18
+ exports.CLIENT_VERSION_HEADER = 'x-circleback-cli-version';
17
19
  exports.BRAND_COLOR = '#F24E1D';
18
20
  exports.SECONDARY_COLOR = '#4262FF';
19
21
  exports.ASCII_LOGO = `
@@ -10,7 +10,7 @@ const TOOL_EXAMPLES = {
10
10
  GetTranscriptsForMeetings: 'cb transcripts read 123',
11
11
  SearchEmails: 'cb emails search "invoice"',
12
12
  FindProfiles: 'cb people search "John"',
13
- FindDomains: 'cb companies search "acme"',
13
+ FindCompanies: 'cb companies search "acme"',
14
14
  SearchSupportArticles: 'cb support "recording"',
15
15
  };
16
16
  const isValidationIssue = (value) => {
@@ -21,8 +21,8 @@ const formatForTool = (toolName, data) => {
21
21
  return (0, table_1.formatCalendarEvents)(data);
22
22
  case 'FindProfiles':
23
23
  return (0, table_1.formatProfiles)(data);
24
- case 'FindDomains':
25
- return (0, table_1.formatDomains)(data);
24
+ case 'FindCompanies':
25
+ return (0, table_1.formatCompanies)(data);
26
26
  case 'SearchSupportArticles':
27
27
  return (0, table_1.formatSupportArticles)(data);
28
28
  case 'SearchEmails':
@@ -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.formatEmails = exports.formatTags = exports.formatActionItems = exports.formatSupportArticles = exports.formatDomains = exports.formatProfiles = exports.formatCalendarEvents = exports.formatTranscriptReadResults = exports.formatTranscriptSearchResults = exports.formatMeetingDetails = exports.formatMeetingsList = void 0;
6
+ exports.formatEmails = exports.formatTags = exports.formatActionItems = exports.formatSupportArticles = exports.formatCompanies = exports.formatProfiles = exports.formatCalendarEvents = exports.formatTranscriptReadResults = exports.formatTranscriptSearchResults = exports.formatMeetingDetails = exports.formatMeetingsList = void 0;
7
7
  const chalk_1 = __importDefault(require("chalk"));
8
8
  const cli_table3_1 = __importDefault(require("cli-table3"));
9
9
  const date_1 = require("./date");
@@ -189,12 +189,17 @@ const formatProfiles = (profiles) => {
189
189
  return `${chalk_1.default.bold(`${(0, string_1.pluralize)(profiles.length, 'person', 'people')} found`)}\n${table.toString()}`;
190
190
  };
191
191
  exports.formatProfiles = formatProfiles;
192
- const formatDomains = (domains) => {
193
- if (domains.length === 0)
192
+ const formatCompanies = (companies) => {
193
+ if (companies.length === 0)
194
194
  return chalk_1.default.yellow('No companies found.');
195
- return `${chalk_1.default.bold(`${(0, string_1.pluralize)(domains.length, 'company', 'companies')} found`)}\n${domains.map((domain) => ` ${domain}`).join('\n')}`;
195
+ const table = new cli_table3_1.default({
196
+ head: [style_1.brand.bold('Company'), style_1.brand.bold('Domain')],
197
+ style: style_1.tableStyle,
198
+ });
199
+ table.push(...companies.map((company) => [company.name ?? '-', company.domain]));
200
+ return `${chalk_1.default.bold(`${(0, string_1.pluralize)(companies.length, 'company', 'companies')} found`)}\n${table.toString()}`;
196
201
  };
197
- exports.formatDomains = formatDomains;
202
+ exports.formatCompanies = formatCompanies;
198
203
  const formatSupportArticles = (articles) => {
199
204
  if (articles.length === 0)
200
205
  return chalk_1.default.yellow('No articles found.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@circleback/cli",
3
- "version": "0.1.12",
3
+ "version": "0.2.0",
4
4
  "description": "Circleback CLI. Search and access meetings, emails, calendar events, and more.",
5
5
  "license": "MIT",
6
6
  "author": "Circleback <support@circleback.ai> (https://circleback.ai)",
@@ -39,7 +39,7 @@
39
39
  "cli-table3": "^0.6.5",
40
40
  "commander": "^13.1.0",
41
41
  "lodash": "^4.17.23",
42
- "zod": "^4.0.0"
42
+ "zod": "^4.4.3"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/lodash": "^4.17.24",