@outlit/tools 0.2.0 → 0.3.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/dist/index.js CHANGED
@@ -2,11 +2,13 @@
2
2
  var customerToolNames = [
3
3
  "outlit_list_customers",
4
4
  "outlit_list_users",
5
+ "outlit_list_workspace_users",
5
6
  "outlit_get_customer",
6
7
  "outlit_get_timeline",
7
8
  "outlit_list_facts",
8
9
  "outlit_get_fact",
9
10
  "outlit_get_source",
11
+ "outlit_list_sources",
10
12
  "outlit_search_customer_context",
11
13
  "outlit_query",
12
14
  "outlit_schema",
@@ -17,7 +19,8 @@ var customerSourceTypes = [
17
19
  "CALL",
18
20
  "CALENDAR_EVENT",
19
21
  "SUPPORT_TICKET",
20
- "OPPORTUNITY"
22
+ "OPPORTUNITY",
23
+ "SLACK"
21
24
  ];
22
25
  var customerSourceTypeAliases = ["CRM", "CRM_OPPORTUNITY"];
23
26
  var customerSourceTypeInputs = [
@@ -26,18 +29,25 @@ var customerSourceTypeInputs = [
26
29
  "CALENDAR_EVENT",
27
30
  "SUPPORT_TICKET",
28
31
  "OPPORTUNITY",
32
+ "SLACK",
29
33
  "CRM",
30
34
  "CRM_OPPORTUNITY"
31
35
  ];
32
- var notificationProviderValues = ["slack"];
33
36
  var customerToolContracts = {
34
37
  outlit_list_customers: {
35
38
  toolName: "outlit_list_customers",
39
+ title: "List Customers",
36
40
  description: "Browse and filter customers. Use this to find customers by billing status, activity recency, revenue, or name. Returns a paginated list with summary info (MRR, last activity, status).",
37
41
  inputSchema: {
38
42
  $schema: "https://json-schema.org/draft/2020-12/schema",
39
43
  type: "object",
40
44
  properties: {
45
+ activatedSince: {
46
+ description: "Filter customers activated at or after this ISO-8601 datetime",
47
+ type: "string",
48
+ format: "date-time",
49
+ pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
50
+ },
41
51
  billingStatus: {
42
52
  description: "Filter by billing status",
43
53
  type: "string",
@@ -90,6 +100,20 @@ var customerToolContracts = {
90
100
  type: "string",
91
101
  maxLength: 500
92
102
  },
103
+ ownerId: {
104
+ description: "Filter customers by internal owner user ID",
105
+ type: "string",
106
+ maxLength: 500
107
+ },
108
+ ownerEmail: {
109
+ description: "Filter customers by internal owner email address",
110
+ type: "string",
111
+ maxLength: 500
112
+ },
113
+ hasOwner: {
114
+ description: "Filter customers by whether they have an owner",
115
+ type: "boolean"
116
+ },
93
117
  limit: {
94
118
  description: "Results per page (max 1000)",
95
119
  default: 50,
@@ -119,6 +143,7 @@ var customerToolContracts = {
119
143
  },
120
144
  outlit_list_users: {
121
145
  toolName: "outlit_list_users",
146
+ title: "List Users",
122
147
  description: "Browse and filter users. Use this to find users by journey stage, activity recency, customer, or email/name. Returns a paginated list with activity info.",
123
148
  inputSchema: {
124
149
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -198,8 +223,63 @@ var customerToolContracts = {
198
223
  additionalProperties: false
199
224
  }
200
225
  },
226
+ outlit_list_workspace_users: {
227
+ toolName: "outlit_list_workspace_users",
228
+ title: "List Workspace Users",
229
+ description: "Browse internal workspace users such as CSMs, managers, account owners, and admins. Use this to discover who owns customers before composing dynamic reports across account books.",
230
+ inputSchema: {
231
+ $schema: "https://json-schema.org/draft/2020-12/schema",
232
+ type: "object",
233
+ properties: {
234
+ search: {
235
+ description: "Search internal workspace users by name, email, title, role, or territory",
236
+ type: "string",
237
+ maxLength: 500
238
+ },
239
+ role: {
240
+ description: "Filter internal workspace users by role metadata when available",
241
+ type: "string",
242
+ maxLength: 100
243
+ },
244
+ managerEmail: {
245
+ description: "Filter internal workspace users by manager email metadata when available",
246
+ type: "string",
247
+ maxLength: 500
248
+ },
249
+ hasOwnedCustomers: {
250
+ description: "When true, return only workspace users who own at least one customer",
251
+ type: "boolean"
252
+ },
253
+ limit: {
254
+ description: "Results per page (max 1000)",
255
+ default: 50,
256
+ type: "number",
257
+ minimum: 1,
258
+ maximum: 1e3
259
+ },
260
+ cursor: {
261
+ description: "Pagination cursor from previous response",
262
+ type: "string"
263
+ },
264
+ orderBy: {
265
+ description: "Field to order workspace users by",
266
+ default: "owned_customer_count",
267
+ type: "string",
268
+ enum: ["name", "email", "owned_customer_count"]
269
+ },
270
+ orderDirection: {
271
+ description: "Sort direction",
272
+ default: "desc",
273
+ type: "string",
274
+ enum: ["asc", "desc"]
275
+ }
276
+ },
277
+ additionalProperties: false
278
+ }
279
+ },
201
280
  outlit_get_customer: {
202
281
  toolName: "outlit_get_customer",
282
+ title: "Get Customer",
203
283
  description: "Get full details for a single customer. Use this when you already know which customer you want to inspect. Optionally include related data (users, revenue, recent activity, engagement metrics).",
204
284
  inputSchema: {
205
285
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -230,6 +310,7 @@ var customerToolContracts = {
230
310
  },
231
311
  outlit_get_timeline: {
232
312
  toolName: "outlit_get_timeline",
313
+ title: "Get Customer Timeline",
233
314
  description: "Get the chronological activity timeline for a customer. Use this to see what happened and when \u2014 emails, calls, Slack messages, billing events, etc. Supports channel and date filtering.",
234
315
  inputSchema: {
235
316
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -240,20 +321,20 @@ var customerToolContracts = {
240
321
  description: "Customer ID or domain"
241
322
  },
242
323
  channels: {
243
- description: "Filter by event channel (e.g., EMAIL, SLACK, CALL, CALENDAR)",
324
+ description: "Filter by event channel. Use values such as PRODUCT, COMMUNICATION, MEETING, CRM, BILLING, SUPPORT, IDENTITY, DOCUMENT, or SYSTEM.",
244
325
  type: "array",
245
326
  items: {
246
327
  type: "string",
247
328
  enum: [
248
- "SDK",
249
- "EMAIL",
250
- "SLACK",
251
- "CALL",
252
- "CALENDAR",
329
+ "PRODUCT",
330
+ "COMMUNICATION",
331
+ "MEETING",
253
332
  "CRM",
254
333
  "BILLING",
255
334
  "SUPPORT",
256
- "INTERNAL"
335
+ "IDENTITY",
336
+ "DOCUMENT",
337
+ "SYSTEM"
257
338
  ]
258
339
  }
259
340
  },
@@ -299,6 +380,7 @@ var customerToolContracts = {
299
380
  },
300
381
  outlit_list_facts: {
301
382
  toolName: "outlit_list_facts",
383
+ title: "List Customer Facts",
302
384
  description: "List structured facts known about a customer. Use filters like status, sourceTypes, factTypes, factCategories, and date bounds to narrow the result set. For topic-specific retrieval, use outlit_search_customer_context instead.",
303
385
  inputSchema: {
304
386
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -388,6 +470,7 @@ var customerToolContracts = {
388
470
  },
389
471
  outlit_get_fact: {
390
472
  toolName: "outlit_get_fact",
473
+ title: "Get Customer Fact",
391
474
  description: "Get one exact fact by ID. Returns the canonical fact shape and optionally expands requested related data such as evidence.",
392
475
  inputSchema: {
393
476
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -415,6 +498,7 @@ var customerToolContracts = {
415
498
  },
416
499
  outlit_get_source: {
417
500
  toolName: "outlit_get_source",
501
+ title: "Get Source",
418
502
  description: "Get one exact source record by generic sourceType and sourceId. Use this when you already know the concrete underlying source you want to inspect.",
419
503
  inputSchema: {
420
504
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -434,9 +518,74 @@ var customerToolContracts = {
434
518
  additionalProperties: false
435
519
  }
436
520
  },
521
+ outlit_list_sources: {
522
+ toolName: "outlit_list_sources",
523
+ title: "List Sources",
524
+ description: "List concrete source records deterministically. Use this instead of semantic search when you need enumerated calls, emails, calendar events, support tickets, or opportunities.",
525
+ inputSchema: {
526
+ $schema: "https://json-schema.org/draft/2020-12/schema",
527
+ type: "object",
528
+ properties: {
529
+ sourceType: {
530
+ description: "Generic source type to list.",
531
+ type: "string",
532
+ enum: customerSourceTypeInputs
533
+ },
534
+ customer: {
535
+ description: "Customer ID, domain, or name to scope source listing.",
536
+ type: "string",
537
+ minLength: 1,
538
+ maxLength: 200
539
+ },
540
+ after: {
541
+ description: "ISO 8601 datetime lower bound.",
542
+ type: "string",
543
+ format: "date-time",
544
+ pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
545
+ },
546
+ before: {
547
+ description: "ISO 8601 datetime upper bound.",
548
+ type: "string",
549
+ format: "date-time",
550
+ pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
551
+ },
552
+ participant: {
553
+ description: "Participant email or name to filter source records.",
554
+ type: "string",
555
+ minLength: 1,
556
+ maxLength: 500
557
+ },
558
+ provider: {
559
+ description: "Provider identifier such as gmail, gong, or google-calendar.",
560
+ type: "string",
561
+ minLength: 1,
562
+ maxLength: 200
563
+ },
564
+ hasTranscript: {
565
+ description: "Filter call sources by transcript presence.",
566
+ type: "boolean"
567
+ },
568
+ limit: {
569
+ description: "Results per page.",
570
+ default: 50,
571
+ type: "integer",
572
+ minimum: 1,
573
+ maximum: 100
574
+ },
575
+ cursor: {
576
+ description: "Pagination cursor.",
577
+ type: "string",
578
+ minLength: 1,
579
+ maxLength: 2e3
580
+ }
581
+ },
582
+ additionalProperties: false
583
+ }
584
+ },
437
585
  outlit_search_customer_context: {
438
586
  toolName: "outlit_search_customer_context",
439
- description: "Search across all known customer context using a natural-language query. Returns grouped artifact-level results for matching sources and facts. Omit customer to search across all customers in the organization.",
587
+ title: "Search Customer Context",
588
+ description: "Search across all known customer context using a natural-language query. Returns ranked artifact-level discovery previews with at most two matching excerpts per source or fact. Use outlit_get_source with a returned sourceType and sourceId when you need the canonical source contents. Omit customer to search across all customers in the organization.",
440
589
  inputSchema: {
441
590
  $schema: "https://json-schema.org/draft/2020-12/schema",
442
591
  type: "object",
@@ -493,6 +642,7 @@ var customerToolContracts = {
493
642
  },
494
643
  outlit_query: {
495
644
  toolName: "outlit_query",
645
+ title: "Run SQL Query",
496
646
  description: "Execute read-only SQL queries against your analytics views.\n\nAvailable views:\n- activity: Customer activity events (event_name, event_type, event_channel, customer_id, occurred_at, properties, ...)\n- customers: Customer attributes (customer_id, domain, name, billing_status, plan, mrr_cents, traits, ...)\n- users: User attributes (user_id, email, name, customer_id, traits, ...)\n- revenue: Revenue snapshots over time (customer_id, snapshot_date, mrr_cents, ...)\n\nAll queries are automatically filtered to your organization's data.\nOnly SELECT queries are allowed.\nProperties and traits are JSON strings; inspect schemas and examples before filtering nested values.\n\nExample queries:\n- SELECT event_name, count(*) FROM activity GROUP BY 1 ORDER BY 2 DESC LIMIT 10\n- SELECT billing_status, sum(mrr_cents)/100 as mrr FROM customers GROUP BY 1\n- SELECT * FROM activity WHERE customer_id = 'cust_123' ORDER BY occurred_at DESC LIMIT 50",
497
647
  inputSchema: {
498
648
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -516,6 +666,7 @@ var customerToolContracts = {
516
666
  },
517
667
  outlit_schema: {
518
668
  toolName: "outlit_schema",
669
+ title: "Get SQL Schema",
519
670
  description: "Get schemas for available analytics views.\n\nUse this to discover column names, types, and descriptions before writing SQL queries.\nReturns column definitions and example queries for each view.",
520
671
  inputSchema: {
521
672
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -532,6 +683,7 @@ var customerToolContracts = {
532
683
  },
533
684
  outlit_send_notification: {
534
685
  toolName: "outlit_send_notification",
686
+ title: "Send Notification",
535
687
  description: "Send or post a notification. Use only when the user explicitly asks you to send, post, or notify. Slack is the default notifier when destinations are omitted.",
536
688
  inputSchema: {
537
689
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -576,34 +728,15 @@ var customerToolContracts = {
576
728
  minLength: 1,
577
729
  maxLength: 240
578
730
  },
579
- destinations: {
580
- description: "Optional explicit notification destinations. Omit to use the default notifier.",
731
+ destinationIds: {
732
+ description: "Optional NotificationDestination ids. Omit to use the default notifier.",
581
733
  minItems: 1,
582
734
  maxItems: 10,
583
735
  type: "array",
584
736
  items: {
585
- type: "object",
586
- properties: {
587
- provider: {
588
- description: "Notification provider",
589
- type: "string",
590
- enum: notificationProviderValues
591
- },
592
- channelId: {
593
- description: "Provider-specific destination channel ID",
594
- type: "string",
595
- minLength: 1,
596
- maxLength: 240
597
- },
598
- label: {
599
- description: "Optional destination label",
600
- type: "string",
601
- minLength: 1,
602
- maxLength: 120
603
- }
604
- },
605
- required: ["provider"],
606
- additionalProperties: false
737
+ type: "string",
738
+ format: "uuid",
739
+ pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
607
740
  }
608
741
  }
609
742
  },
@@ -706,17 +839,18 @@ var customerIncludeSections = [
706
839
  "behaviorMetrics"
707
840
  ];
708
841
  var customerTimeframes = ["7d", "14d", "30d", "90d"];
842
+ var notificationProviderValues = ["slack"];
709
843
  var notificationSeverityValues = ["low", "medium", "high"];
710
844
  var timelineChannels = [
711
- "SDK",
712
- "EMAIL",
713
- "SLACK",
714
- "CALL",
715
- "CALENDAR",
845
+ "PRODUCT",
846
+ "COMMUNICATION",
847
+ "MEETING",
716
848
  "CRM",
717
849
  "BILLING",
718
850
  "SUPPORT",
719
- "INTERNAL"
851
+ "IDENTITY",
852
+ "DOCUMENT",
853
+ "SYSTEM"
720
854
  ];
721
855
  var timelineTimeframes = ["7d", "14d", "30d", "90d", "all"];
722
856
  var userJourneyStages = [
@@ -727,8 +861,9 @@ var userJourneyStages = [
727
861
  "INACTIVE"
728
862
  ];
729
863
  var userListOrderFields = ["last_activity_at", "first_seen_at", "email"];
864
+ var workspaceUserListOrderFields = ["name", "email", "owned_customer_count"];
730
865
  var schemaTables = ["activity", "customers", "users", "revenue"];
731
- var customerToolContractHash = "006ce091382509c3224815c4f6ead4c5e78e34f54df281fe8f143811890b04af";
866
+ var customerToolContractHash = "f1f06ac1d3fb5131095ac7047f5871f47942b0f5efcb1229151b52475bf93816";
732
867
  var customerToolNameSet = new Set(customerToolNames);
733
868
  var customerSourceTypeSet = new Set(customerSourceTypes);
734
869
  var customerSourceTypeAliasMap = /* @__PURE__ */ new Map([
@@ -852,7 +987,7 @@ function createOutlitClient(options) {
852
987
  const text = await response.text();
853
988
  throw new Error(`API error (${response.status}): ${text}`);
854
989
  }
855
- return response.json();
990
+ return await response.json();
856
991
  }
857
992
  };
858
993
  }
@@ -864,6 +999,7 @@ var actionToolNames = [
864
999
  var defaultAgentToolNames = [
865
1000
  "outlit_list_customers",
866
1001
  "outlit_list_users",
1002
+ "outlit_list_workspace_users",
867
1003
  "outlit_get_customer",
868
1004
  "outlit_get_timeline",
869
1005
  "outlit_list_facts",
@@ -915,6 +1051,7 @@ export {
915
1051
  timelineTimeframes,
916
1052
  unsupportedCustomerFactTypes,
917
1053
  userJourneyStages,
918
- userListOrderFields
1054
+ userListOrderFields,
1055
+ workspaceUserListOrderFields
919
1056
  };
920
1057
  //# sourceMappingURL=index.js.map