@outlit/tools 0.2.1 → 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,6 +2,7 @@
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",
@@ -18,7 +19,8 @@ var customerSourceTypes = [
18
19
  "CALL",
19
20
  "CALENDAR_EVENT",
20
21
  "SUPPORT_TICKET",
21
- "OPPORTUNITY"
22
+ "OPPORTUNITY",
23
+ "SLACK"
22
24
  ];
23
25
  var customerSourceTypeAliases = ["CRM", "CRM_OPPORTUNITY"];
24
26
  var customerSourceTypeInputs = [
@@ -27,17 +29,25 @@ var customerSourceTypeInputs = [
27
29
  "CALENDAR_EVENT",
28
30
  "SUPPORT_TICKET",
29
31
  "OPPORTUNITY",
32
+ "SLACK",
30
33
  "CRM",
31
34
  "CRM_OPPORTUNITY"
32
35
  ];
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",
@@ -436,6 +520,7 @@ var customerToolContracts = {
436
520
  },
437
521
  outlit_list_sources: {
438
522
  toolName: "outlit_list_sources",
523
+ title: "List Sources",
439
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.",
440
525
  inputSchema: {
441
526
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -499,7 +584,8 @@ var customerToolContracts = {
499
584
  },
500
585
  outlit_search_customer_context: {
501
586
  toolName: "outlit_search_customer_context",
502
- 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.",
503
589
  inputSchema: {
504
590
  $schema: "https://json-schema.org/draft/2020-12/schema",
505
591
  type: "object",
@@ -556,6 +642,7 @@ var customerToolContracts = {
556
642
  },
557
643
  outlit_query: {
558
644
  toolName: "outlit_query",
645
+ title: "Run SQL Query",
559
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",
560
647
  inputSchema: {
561
648
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -579,6 +666,7 @@ var customerToolContracts = {
579
666
  },
580
667
  outlit_schema: {
581
668
  toolName: "outlit_schema",
669
+ title: "Get SQL Schema",
582
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.",
583
671
  inputSchema: {
584
672
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -595,6 +683,7 @@ var customerToolContracts = {
595
683
  },
596
684
  outlit_send_notification: {
597
685
  toolName: "outlit_send_notification",
686
+ title: "Send Notification",
598
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.",
599
688
  inputSchema: {
600
689
  $schema: "https://json-schema.org/draft/2020-12/schema",
@@ -639,34 +728,15 @@ var customerToolContracts = {
639
728
  minLength: 1,
640
729
  maxLength: 240
641
730
  },
642
- destinations: {
643
- description: "Optional explicit notification destinations. Omit to use the default notifier.",
731
+ destinationIds: {
732
+ description: "Optional NotificationDestination ids. Omit to use the default notifier.",
644
733
  minItems: 1,
645
734
  maxItems: 10,
646
735
  type: "array",
647
736
  items: {
648
- type: "object",
649
- properties: {
650
- provider: {
651
- description: "Notification provider",
652
- type: "string",
653
- enum: ["slack"]
654
- },
655
- channelId: {
656
- description: "Provider-specific destination channel ID",
657
- type: "string",
658
- minLength: 1,
659
- maxLength: 240
660
- },
661
- label: {
662
- description: "Optional destination label",
663
- type: "string",
664
- minLength: 1,
665
- maxLength: 120
666
- }
667
- },
668
- required: ["provider"],
669
- 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)$"
670
740
  }
671
741
  }
672
742
  },
@@ -772,15 +842,15 @@ var customerTimeframes = ["7d", "14d", "30d", "90d"];
772
842
  var notificationProviderValues = ["slack"];
773
843
  var notificationSeverityValues = ["low", "medium", "high"];
774
844
  var timelineChannels = [
775
- "SDK",
776
- "EMAIL",
777
- "SLACK",
778
- "CALL",
779
- "CALENDAR",
845
+ "PRODUCT",
846
+ "COMMUNICATION",
847
+ "MEETING",
780
848
  "CRM",
781
849
  "BILLING",
782
850
  "SUPPORT",
783
- "INTERNAL"
851
+ "IDENTITY",
852
+ "DOCUMENT",
853
+ "SYSTEM"
784
854
  ];
785
855
  var timelineTimeframes = ["7d", "14d", "30d", "90d", "all"];
786
856
  var userJourneyStages = [
@@ -791,8 +861,9 @@ var userJourneyStages = [
791
861
  "INACTIVE"
792
862
  ];
793
863
  var userListOrderFields = ["last_activity_at", "first_seen_at", "email"];
864
+ var workspaceUserListOrderFields = ["name", "email", "owned_customer_count"];
794
865
  var schemaTables = ["activity", "customers", "users", "revenue"];
795
- var customerToolContractHash = "5016d146842452855bfdd9ecc8f6be1a122125d0c392ceff315aeb2e44fefc7f";
866
+ var customerToolContractHash = "f1f06ac1d3fb5131095ac7047f5871f47942b0f5efcb1229151b52475bf93816";
796
867
  var customerToolNameSet = new Set(customerToolNames);
797
868
  var customerSourceTypeSet = new Set(customerSourceTypes);
798
869
  var customerSourceTypeAliasMap = /* @__PURE__ */ new Map([
@@ -916,7 +987,7 @@ function createOutlitClient(options) {
916
987
  const text = await response.text();
917
988
  throw new Error(`API error (${response.status}): ${text}`);
918
989
  }
919
- return response.json();
990
+ return await response.json();
920
991
  }
921
992
  };
922
993
  }
@@ -928,6 +999,7 @@ var actionToolNames = [
928
999
  var defaultAgentToolNames = [
929
1000
  "outlit_list_customers",
930
1001
  "outlit_list_users",
1002
+ "outlit_list_workspace_users",
931
1003
  "outlit_get_customer",
932
1004
  "outlit_get_timeline",
933
1005
  "outlit_list_facts",
@@ -979,6 +1051,7 @@ export {
979
1051
  timelineTimeframes,
980
1052
  unsupportedCustomerFactTypes,
981
1053
  userJourneyStages,
982
- userListOrderFields
1054
+ userListOrderFields,
1055
+ workspaceUserListOrderFields
983
1056
  };
984
1057
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contracts.ts","../src/client.ts","../src/toolsets.ts"],"sourcesContent":["export type JsonSchema = {\n readonly [key: string]: unknown\n}\n\nexport const customerToolNames = [\n \"outlit_list_customers\",\n \"outlit_list_users\",\n \"outlit_get_customer\",\n \"outlit_get_timeline\",\n \"outlit_list_facts\",\n \"outlit_get_fact\",\n \"outlit_get_source\",\n \"outlit_list_sources\",\n \"outlit_search_customer_context\",\n \"outlit_query\",\n \"outlit_schema\",\n \"outlit_send_notification\",\n] as const\n\nexport const customerSourceTypes = [\n \"EMAIL\",\n \"CALL\",\n \"CALENDAR_EVENT\",\n \"SUPPORT_TICKET\",\n \"OPPORTUNITY\",\n] as const\n\nexport const customerSourceTypeAliases = [\"CRM\", \"CRM_OPPORTUNITY\"] as const\n\nexport const customerSourceTypeInputs = [\n \"EMAIL\",\n \"CALL\",\n \"CALENDAR_EVENT\",\n \"SUPPORT_TICKET\",\n \"OPPORTUNITY\",\n \"CRM\",\n \"CRM_OPPORTUNITY\",\n] as const\n\nexport const customerToolContracts = {\n outlit_list_customers: {\n toolName: \"outlit_list_customers\",\n description:\n \"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).\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n billingStatus: {\n description: \"Filter by billing status\",\n type: \"string\",\n enum: [\"NONE\", \"TRIALING\", \"PAYING\", \"PAST_DUE\", \"CHURNED\"],\n },\n hasActivityInLast: {\n description: \"Filter customers with activity in the last N days\",\n type: \"string\",\n enum: [\"7d\", \"14d\", \"30d\", \"90d\"],\n },\n noActivityInLast: {\n description: \"Filter customers with NO activity in the last N days\",\n type: \"string\",\n enum: [\"7d\", \"14d\", \"30d\", \"90d\"],\n },\n mrrAbove: {\n description: \"Minimum MRR in cents (e.g., 10000 = $100)\",\n type: \"number\",\n minimum: 0,\n },\n mrrBelow: {\n description: \"Maximum MRR in cents\",\n type: \"number\",\n minimum: 0,\n },\n traitFilters: {\n description: \"Filter by exact trait values using key/value pairs\",\n type: \"object\",\n propertyNames: {\n type: \"string\",\n pattern: \"^[A-Za-z0-9_-]{1,100}$\",\n },\n additionalProperties: {\n anyOf: [\n {\n type: \"string\",\n maxLength: 500,\n },\n {\n type: \"number\",\n },\n {\n type: \"boolean\",\n },\n ],\n },\n },\n search: {\n description: \"Search by customer name or domain (case-insensitive)\",\n type: \"string\",\n maxLength: 500,\n },\n limit: {\n description: \"Results per page (max 1000)\",\n default: 50,\n type: \"number\",\n minimum: 1,\n maximum: 1000,\n },\n cursor: {\n description: \"Pagination cursor from previous response\",\n type: \"string\",\n },\n orderBy: {\n description: \"Field to order results by\",\n default: \"last_activity_at\",\n type: \"string\",\n enum: [\"last_activity_at\", \"first_seen_at\", \"name\", \"mrr_cents\"],\n },\n orderDirection: {\n description: \"Sort direction\",\n default: \"desc\",\n type: \"string\",\n enum: [\"asc\", \"desc\"],\n },\n },\n additionalProperties: false,\n },\n },\n outlit_list_users: {\n toolName: \"outlit_list_users\",\n description:\n \"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.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n journeyStage: {\n description: \"Filter by user journey stage\",\n type: \"string\",\n enum: [\"DISCOVERED\", \"SIGNED_UP\", \"ACTIVATED\", \"ENGAGED\", \"INACTIVE\"],\n },\n customerId: {\n description: \"Filter users by customer ID\",\n type: \"string\",\n maxLength: 500,\n },\n traitFilters: {\n description: \"Filter by exact trait values using key/value pairs\",\n type: \"object\",\n propertyNames: {\n type: \"string\",\n pattern: \"^[A-Za-z0-9_-]{1,100}$\",\n },\n additionalProperties: {\n anyOf: [\n {\n type: \"string\",\n maxLength: 500,\n },\n {\n type: \"number\",\n },\n {\n type: \"boolean\",\n },\n ],\n },\n },\n hasActivityInLast: {\n description:\n \"Filter users active within this window. Format: Nd, Nh, or Nm (e.g., '7d', '24h', '90m')\",\n type: \"string\",\n pattern: \"^\\\\d+(d|h|m)$\",\n },\n noActivityInLast: {\n description:\n \"Filter users NOT active within this window. Format: Nd, Nh, or Nm (e.g., '30d', '2h')\",\n type: \"string\",\n pattern: \"^\\\\d+(d|h|m)$\",\n },\n search: {\n description: \"Search by user email or name (case-insensitive)\",\n type: \"string\",\n maxLength: 500,\n },\n limit: {\n description: \"Results per page (max 1000)\",\n default: 50,\n type: \"number\",\n minimum: 1,\n maximum: 1000,\n },\n cursor: {\n description: \"Pagination cursor from previous response\",\n type: \"string\",\n },\n orderBy: {\n description: \"Field to order by\",\n default: \"last_activity_at\",\n type: \"string\",\n enum: [\"last_activity_at\", \"first_seen_at\", \"email\"],\n },\n orderDirection: {\n description: \"Sort direction\",\n default: \"desc\",\n type: \"string\",\n enum: [\"asc\", \"desc\"],\n },\n },\n additionalProperties: false,\n },\n },\n outlit_get_customer: {\n toolName: \"outlit_get_customer\",\n description:\n \"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).\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n customer: {\n type: \"string\",\n description: \"Customer ID, domain, or name to look up\",\n },\n include: {\n description: \"Additional data sections to include in the response\",\n type: \"array\",\n items: {\n type: \"string\",\n enum: [\"users\", \"revenue\", \"recentTimeline\", \"behaviorMetrics\"],\n },\n },\n timeframe: {\n description: \"Timeframe for timeline and behavior metrics (default: 30d)\",\n default: \"30d\",\n type: \"string\",\n enum: [\"7d\", \"14d\", \"30d\", \"90d\"],\n },\n },\n required: [\"customer\"],\n additionalProperties: false,\n },\n },\n outlit_get_timeline: {\n toolName: \"outlit_get_timeline\",\n description:\n \"Get the chronological activity timeline for a customer. Use this to see what happened and when — emails, calls, Slack messages, billing events, etc. Supports channel and date filtering.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n customer: {\n type: \"string\",\n description: \"Customer ID or domain\",\n },\n channels: {\n description: \"Filter by event channel (e.g., EMAIL, SLACK, CALL, CALENDAR)\",\n type: \"array\",\n items: {\n type: \"string\",\n enum: [\n \"SDK\",\n \"EMAIL\",\n \"SLACK\",\n \"CALL\",\n \"CALENDAR\",\n \"CRM\",\n \"BILLING\",\n \"SUPPORT\",\n \"INTERNAL\",\n ],\n },\n },\n eventTypes: {\n description: \"Filter by event type\",\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n timeframe: {\n description:\n \"Relative time window (default: 30d). Cannot be used with startDate/endDate.\",\n type: \"string\",\n enum: [\"7d\", \"14d\", \"30d\", \"90d\", \"all\"],\n },\n startDate: {\n description:\n \"Start of time window (ISO 8601, e.g. '2025-01-01T00:00:00Z'). Cannot be used with timeframe.\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n endDate: {\n description:\n \"End of time window (ISO 8601, e.g. '2025-01-31T23:59:59Z'). Cannot be used with timeframe.\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n limit: {\n description: \"Results per page (max 1000)\",\n default: 50,\n type: \"number\",\n minimum: 1,\n maximum: 1000,\n },\n cursor: {\n description: \"Pagination cursor from previous response\",\n type: \"string\",\n },\n },\n required: [\"customer\"],\n additionalProperties: false,\n },\n },\n outlit_list_facts: {\n toolName: \"outlit_list_facts\",\n description:\n \"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.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n customer: {\n type: \"string\",\n description: \"Customer ID or domain\",\n },\n status: {\n description: \"Optional fact status filter\",\n type: \"array\",\n items: {\n type: \"string\",\n enum: [\"ACTIVE\", \"ACKNOWLEDGED\", \"RESOLVED\", \"SNOOZED\", \"CANDIDATE\"],\n },\n },\n sourceTypes: {\n description: \"Optional generic source types to restrict fact results to.\",\n type: \"array\",\n items: {\n type: \"string\",\n enum: customerSourceTypeInputs,\n },\n },\n factTypes: {\n description:\n \"Optional customer-memory fact type filters, such as CHURN_RISK, EXPANSION, SENTIMENT, or BUDGET. Anomaly detector fact types are not supported.\",\n type: \"array\",\n items: {\n type: \"string\",\n enum: [\n \"CUSTOM\",\n \"COMPANY_CHANGE\",\n \"FUNDING_REVENUE\",\n \"TECHNOLOGY\",\n \"STRATEGY\",\n \"COMPETITIVE\",\n \"SENTIMENT\",\n \"CHAMPION_RISK\",\n \"EXPANSION\",\n \"CHURN_RISK\",\n \"TIMELINE\",\n \"BUDGET\",\n \"DECISION_MAKER\",\n \"REQUIREMENTS\",\n \"PRODUCT_USAGE\",\n \"CONTACT_INFO\",\n \"CONTACT_PREFERENCE\",\n ],\n },\n },\n factCategories: {\n description: \"Optional public fact category filters. Supported values: MEMORY, CUSTOM.\",\n type: \"array\",\n items: {\n type: \"string\",\n enum: [\"MEMORY\", \"CUSTOM\"],\n },\n },\n after: {\n description: \"ISO 8601 datetime lower bound\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n before: {\n description: \"ISO 8601 datetime upper bound\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n limit: {\n description: \"Results per page (max 100)\",\n default: 50,\n type: \"number\",\n minimum: 1,\n maximum: 100,\n },\n cursor: {\n description: \"Pagination cursor from previous response\",\n type: \"string\",\n },\n },\n required: [\"customer\"],\n additionalProperties: false,\n },\n },\n outlit_get_fact: {\n toolName: \"outlit_get_fact\",\n description:\n \"Get one exact fact by ID. Returns the canonical fact shape and optionally expands requested related data such as evidence.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n factId: {\n type: \"string\",\n minLength: 1,\n maxLength: 500,\n description: \"Exact fact ID to retrieve\",\n },\n include: {\n description:\n \"Optional best-effort expansions. Use include=['evidence'] to request evidence when available; unsupported include values are ignored.\",\n type: \"array\",\n items: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n },\n },\n },\n required: [\"factId\"],\n additionalProperties: false,\n },\n },\n outlit_get_source: {\n toolName: \"outlit_get_source\",\n description:\n \"Get one exact source record by generic sourceType and sourceId. Use this when you already know the concrete underlying source you want to inspect.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n sourceType: {\n type: \"string\",\n enum: customerSourceTypeInputs,\n },\n sourceId: {\n type: \"string\",\n minLength: 1,\n maxLength: 500,\n },\n },\n required: [\"sourceType\", \"sourceId\"],\n additionalProperties: false,\n },\n },\n outlit_list_sources: {\n toolName: \"outlit_list_sources\",\n description:\n \"List concrete source records deterministically. Use this instead of semantic search when you need enumerated calls, emails, calendar events, support tickets, or opportunities.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n sourceType: {\n description: \"Generic source type to list.\",\n type: \"string\",\n enum: customerSourceTypeInputs,\n },\n customer: {\n description: \"Customer ID, domain, or name to scope source listing.\",\n type: \"string\",\n minLength: 1,\n maxLength: 200,\n },\n after: {\n description: \"ISO 8601 datetime lower bound.\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n before: {\n description: \"ISO 8601 datetime upper bound.\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n participant: {\n description: \"Participant email or name to filter source records.\",\n type: \"string\",\n minLength: 1,\n maxLength: 500,\n },\n provider: {\n description: \"Provider identifier such as gmail, gong, or google-calendar.\",\n type: \"string\",\n minLength: 1,\n maxLength: 200,\n },\n hasTranscript: {\n description: \"Filter call sources by transcript presence.\",\n type: \"boolean\",\n },\n limit: {\n description: \"Results per page.\",\n default: 50,\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n },\n cursor: {\n description: \"Pagination cursor.\",\n type: \"string\",\n minLength: 1,\n maxLength: 2000,\n },\n },\n additionalProperties: false,\n },\n },\n outlit_search_customer_context: {\n toolName: \"outlit_search_customer_context\",\n description:\n \"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.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n customer: {\n description: \"Customer ID, domain, or name. Omit to search across all customers.\",\n anyOf: [\n {\n type: \"string\",\n minLength: 1,\n maxLength: 500,\n },\n {\n type: \"null\",\n },\n ],\n },\n query: {\n type: \"string\",\n minLength: 2,\n maxLength: 2000,\n description: \"Natural language query or topic to search for.\",\n },\n topK: {\n description: \"Maximum number of artifact results to return (default 20).\",\n type: \"integer\",\n minimum: 1,\n maximum: 50,\n },\n after: {\n description: \"ISO 8601 datetime lower bound\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n before: {\n description: \"ISO 8601 datetime upper bound\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n sourceTypes: {\n description: \"Optional generic source types to restrict the search to.\",\n type: \"array\",\n items: {\n type: \"string\",\n enum: customerSourceTypeInputs,\n },\n },\n },\n required: [\"query\"],\n additionalProperties: false,\n },\n },\n outlit_query: {\n toolName: \"outlit_query\",\n description:\n \"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\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n sql: {\n type: \"string\",\n description: \"SQL SELECT query to execute\",\n },\n limit: {\n description: \"Max rows to return (default 1000, max 10000)\",\n default: 1000,\n type: \"integer\",\n minimum: 1,\n maximum: 10000,\n },\n },\n required: [\"sql\"],\n additionalProperties: false,\n },\n },\n outlit_schema: {\n toolName: \"outlit_schema\",\n description:\n \"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.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n table: {\n description: \"Specific analytics view to describe. Omit to list all views.\",\n type: \"string\",\n enum: [\"activity\", \"customers\", \"users\", \"revenue\"],\n },\n },\n additionalProperties: false,\n },\n },\n outlit_send_notification: {\n toolName: \"outlit_send_notification\",\n description:\n \"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.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n title: {\n type: \"string\",\n minLength: 1,\n maxLength: 160,\n description: \"Notification title\",\n },\n markdown: {\n description: \"Markdown notification body rendered for the target provider\",\n type: \"string\",\n minLength: 1,\n maxLength: 100000,\n },\n payload: {\n description:\n \"Optional JSON-compatible payload. Serialized size must be 100,000 characters or fewer.\",\n $ref: \"#/$defs/__schema0\",\n },\n message: {\n description: \"Optional summary message\",\n type: \"string\",\n minLength: 1,\n maxLength: 1200,\n },\n severity: {\n description: \"Optional notification severity\",\n type: \"string\",\n enum: [\"low\", \"medium\", \"high\"],\n },\n source: {\n description: \"Optional source label\",\n type: \"string\",\n minLength: 1,\n maxLength: 120,\n },\n subject: {\n description: \"Optional subject line\",\n type: \"string\",\n minLength: 1,\n maxLength: 240,\n },\n destinations: {\n description:\n \"Optional explicit notification destinations. Omit to use the default notifier.\",\n minItems: 1,\n maxItems: 10,\n type: \"array\",\n items: {\n type: \"object\",\n properties: {\n provider: {\n description: \"Notification provider\",\n type: \"string\",\n enum: [\"slack\"],\n },\n channelId: {\n description: \"Provider-specific destination channel ID\",\n type: \"string\",\n minLength: 1,\n maxLength: 240,\n },\n label: {\n description: \"Optional destination label\",\n type: \"string\",\n minLength: 1,\n maxLength: 120,\n },\n },\n required: [\"provider\"],\n additionalProperties: false,\n },\n },\n },\n required: [\"title\"],\n additionalProperties: false,\n $defs: {\n __schema0: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"number\",\n },\n {\n type: \"boolean\",\n },\n {\n type: \"null\",\n },\n {\n type: \"array\",\n items: {\n $ref: \"#/$defs/__schema0\",\n },\n },\n {\n type: \"object\",\n propertyNames: {\n type: \"string\",\n },\n additionalProperties: {\n $ref: \"#/$defs/__schema0\",\n },\n },\n ],\n },\n },\n },\n },\n} as const\n\nexport const customerBillingStatuses = [\n \"NONE\",\n \"TRIALING\",\n \"PAYING\",\n \"PAST_DUE\",\n \"CHURNED\",\n] as const\n\nexport const customerActivityWindows = [\"7d\", \"14d\", \"30d\", \"90d\"] as const\n\nexport const customerFactStatuses = [\n \"ACTIVE\",\n \"ACKNOWLEDGED\",\n \"RESOLVED\",\n \"SNOOZED\",\n \"CANDIDATE\",\n] as const\n\nexport const customerFactIncludes = [\"evidence\"] as const\n\nexport const customerFactTypes = [\n \"CUSTOM\",\n \"COMPANY_CHANGE\",\n \"FUNDING_REVENUE\",\n \"TECHNOLOGY\",\n \"STRATEGY\",\n \"COMPETITIVE\",\n \"SENTIMENT\",\n \"CHAMPION_RISK\",\n \"EXPANSION\",\n \"CHURN_RISK\",\n \"TIMELINE\",\n \"BUDGET\",\n \"DECISION_MAKER\",\n \"REQUIREMENTS\",\n \"PRODUCT_USAGE\",\n \"CONTACT_INFO\",\n \"CONTACT_PREFERENCE\",\n] as const\n\nexport const unsupportedCustomerFactTypes = [\n \"TRACKING_GAP\",\n \"SCHEMA_DRIFT\",\n \"INGESTION_LAG\",\n \"ACTIVATION_RATE_DROP\",\n \"FUNNEL_DROPOFF\",\n \"CORE_ACTION_DECAY\",\n \"CADENCE_BREAK\",\n \"QUIET_ACCOUNT\",\n \"CHAMPION_AT_RISK\",\n \"SEGMENT_DIVERGENCE\",\n] as const\n\nexport const customerFactCategories = [\"MEMORY\", \"CUSTOM\"] as const\n\nexport const customerListOrderFields = [\n \"last_activity_at\",\n \"first_seen_at\",\n \"name\",\n \"mrr_cents\",\n] as const\n\nexport const customerIncludeSections = [\n \"users\",\n \"revenue\",\n \"recentTimeline\",\n \"behaviorMetrics\",\n] as const\n\nexport const customerTimeframes = [\"7d\", \"14d\", \"30d\", \"90d\"] as const\n\nexport const notificationProviderValues = [\"slack\"] as const\n\nexport const notificationSeverityValues = [\"low\", \"medium\", \"high\"] as const\n\nexport const timelineChannels = [\n \"SDK\",\n \"EMAIL\",\n \"SLACK\",\n \"CALL\",\n \"CALENDAR\",\n \"CRM\",\n \"BILLING\",\n \"SUPPORT\",\n \"INTERNAL\",\n] as const\n\nexport const timelineTimeframes = [\"7d\", \"14d\", \"30d\", \"90d\", \"all\"] as const\n\nexport const userJourneyStages = [\n \"DISCOVERED\",\n \"SIGNED_UP\",\n \"ACTIVATED\",\n \"ENGAGED\",\n \"INACTIVE\",\n] as const\n\nexport const userListOrderFields = [\"last_activity_at\", \"first_seen_at\", \"email\"] as const\n\nexport const schemaTables = [\"activity\", \"customers\", \"users\", \"revenue\"] as const\n\nexport const customerToolContractHash =\n \"5016d146842452855bfdd9ecc8f6be1a122125d0c392ceff315aeb2e44fefc7f\" as const\n\nexport type CustomerToolName = (typeof customerToolNames)[number]\nexport type CustomerSourceType = (typeof customerSourceTypes)[number]\nexport type CustomerSourceTypeInput = (typeof customerSourceTypeInputs)[number]\n\nexport type CustomerToolContract = {\n toolName: CustomerToolName\n description: string\n inputSchema: JsonSchema\n}\n\nconst customerToolNameSet = new Set<string>(customerToolNames)\nconst customerSourceTypeSet = new Set<string>(customerSourceTypes)\nconst customerSourceTypeAliasMap = new Map<\n (typeof customerSourceTypeAliases)[number],\n CustomerSourceType\n>([\n [\"CRM\", \"OPPORTUNITY\"],\n [\"CRM_OPPORTUNITY\", \"OPPORTUNITY\"],\n])\nconst iso8601UtcDateTimeRegex =\n /^(?:(?:\\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))$/\n\nexport function isCustomerToolName(value: string): value is CustomerToolName {\n return customerToolNameSet.has(value)\n}\n\nexport function getCustomerToolContract(name: CustomerToolName): CustomerToolContract {\n return customerToolContracts[name]\n}\n\nexport function normalizeCustomerSourceType(value: string): CustomerSourceType | null {\n const normalized = value.trim().toUpperCase()\n if (customerSourceTypeSet.has(normalized)) {\n return normalized as CustomerSourceType\n }\n\n return (\n customerSourceTypeAliasMap.get(normalized as (typeof customerSourceTypeAliases)[number]) ?? null\n )\n}\n\nexport type SearchArgsLike = {\n query?: string\n customer?: string | null\n topK?: number\n after?: string\n before?: string\n sourceTypes?: string[]\n}\n\nexport type CustomerContextSearchInput = {\n query: string\n customer?: string | null\n topK?: number\n after?: string\n before?: string\n sourceTypes?: CustomerSourceType[]\n}\n\nexport function resolveCustomerContextSearchInput(value: SearchArgsLike):\n | { ok: true; request: CustomerContextSearchInput }\n | {\n ok: false\n message: string\n } {\n if (!value.query) {\n return {\n ok: false,\n message: \"A query argument is required\",\n }\n }\n\n const normalizedQuery = value.query.trim()\n if (normalizedQuery.length < 2) {\n return {\n ok: false,\n message: \"Query must be at least 2 non-whitespace characters\",\n }\n }\n\n if (value.after !== undefined && !iso8601UtcDateTimeRegex.test(value.after)) {\n return {\n ok: false,\n message: \"--after must be a valid ISO 8601 datetime\",\n }\n }\n\n const afterTime = value.after === undefined ? undefined : new Date(value.after).getTime()\n if (afterTime !== undefined && Number.isNaN(afterTime)) {\n return {\n ok: false,\n message: \"--after must be a valid ISO 8601 datetime\",\n }\n }\n\n if (value.before !== undefined && !iso8601UtcDateTimeRegex.test(value.before)) {\n return {\n ok: false,\n message: \"--before must be a valid ISO 8601 datetime\",\n }\n }\n\n const beforeTime = value.before === undefined ? undefined : new Date(value.before).getTime()\n if (beforeTime !== undefined && Number.isNaN(beforeTime)) {\n return {\n ok: false,\n message: \"--before must be a valid ISO 8601 datetime\",\n }\n }\n\n if (afterTime !== undefined && beforeTime !== undefined && afterTime > beforeTime) {\n return {\n ok: false,\n message: \"--after must be before or equal to --before\",\n }\n }\n\n const invalidSourceTypes =\n value.sourceTypes?.filter((sourceType) => !normalizeCustomerSourceType(sourceType)) ?? []\n if (invalidSourceTypes.length > 0) {\n return {\n ok: false,\n message: `Unknown source types: ${invalidSourceTypes.join(\", \")}. Allowed: ${customerSourceTypeInputs.join(\", \")}`,\n }\n }\n\n const normalizedSourceTypes = value.sourceTypes\n ? Array.from(\n new Set(value.sourceTypes.map((sourceType) => normalizeCustomerSourceType(sourceType))),\n ).filter((sourceType): sourceType is CustomerSourceType => sourceType !== null)\n : undefined\n\n return {\n ok: true,\n request: {\n query: normalizedQuery,\n customer: value.customer,\n topK: value.topK,\n after: value.after,\n before: value.before,\n sourceTypes: normalizedSourceTypes,\n },\n }\n}\n","import { type CustomerToolName, isCustomerToolName } from \"./contracts.js\"\n\nexport const DEFAULT_OUTLIT_API_URL = \"https://app.outlit.ai\"\n\nexport type OutlitToolsFetch = (\n input: string | URL | Request,\n init?: RequestInit,\n) => Promise<Response>\n\nexport type OutlitToolsClientOptions = {\n apiKey: string\n baseUrl?: string\n fetch?: OutlitToolsFetch\n}\n\nexport type OutlitToolsClient = {\n key: string\n baseUrl: string\n callTool(toolName: CustomerToolName, input?: Record<string, unknown>): Promise<unknown>\n}\n\nexport function createOutlitClient(options: OutlitToolsClientOptions): OutlitToolsClient {\n const key = options.apiKey.trim()\n const baseUrl = options.baseUrl ?? DEFAULT_OUTLIT_API_URL\n const fetchImpl = options.fetch ?? globalThis.fetch\n\n if (!key) {\n throw new Error(\"apiKey is required\")\n }\n\n if (!fetchImpl) {\n throw new Error(\"fetch is not available\")\n }\n\n return {\n key,\n baseUrl,\n async callTool(toolName, input = {}) {\n if (!isCustomerToolName(toolName)) {\n throw new Error(`Unknown customer tool: ${toolName}`)\n }\n\n const response = await fetchImpl(new URL(\"/api/tools/call\", baseUrl).toString(), {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${key}`,\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n tool: toolName,\n input,\n }),\n })\n\n if (!response.ok) {\n const text = await response.text()\n throw new Error(`API error (${response.status}): ${text}`)\n }\n\n return response.json()\n },\n }\n}\n","import { type CustomerToolName, customerToolNames } from \"./contracts.js\"\n\nexport const actionToolNames = [\n \"outlit_send_notification\",\n] as const satisfies readonly CustomerToolName[]\n\nexport const defaultAgentToolNames = [\n \"outlit_list_customers\",\n \"outlit_list_users\",\n \"outlit_get_customer\",\n \"outlit_get_timeline\",\n \"outlit_list_facts\",\n \"outlit_get_fact\",\n \"outlit_get_source\",\n \"outlit_search_customer_context\",\n ...actionToolNames,\n] as const satisfies readonly CustomerToolName[]\n\nexport const sqlToolNames = [\n \"outlit_schema\",\n \"outlit_query\",\n] as const satisfies readonly CustomerToolName[]\n\nexport const analyticalAgentToolNames = [\n ...defaultAgentToolNames,\n ...sqlToolNames,\n] as const satisfies readonly CustomerToolName[]\n\nexport const allCustomerToolNames = customerToolNames\n"],"mappings":";AAIO,IAAM,oBAAoB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,sBAAsB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,4BAA4B,CAAC,OAAO,iBAAiB;AAE3D,IAAM,2BAA2B;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,wBAAwB;AAAA,EACnC,uBAAuB;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,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,MAAM,SAAS,UAAU,QAAQ,CAAC,GAAG;AACnC,UAAI,CAAC,mBAAmB,QAAQ,GAAG;AACjC,cAAM,IAAI,MAAM,0BAA0B,QAAQ,EAAE;AAAA,MACtD;AAEA,YAAM,WAAW,MAAM,UAAU,IAAI,IAAI,mBAAmB,OAAO,EAAE,SAAS,GAAG;AAAA,QAC/E,QAAQ;AAAA,QACR,SAAS;AAAA,UACP,eAAe,UAAU,GAAG;AAAA,UAC5B,gBAAgB;AAAA,QAClB;AAAA,QACA,MAAM,KAAK,UAAU;AAAA,UACnB,MAAM;AAAA,UACN;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAED,UAAI,CAAC,SAAS,IAAI;AAChB,cAAM,OAAO,MAAM,SAAS,KAAK;AACjC,cAAM,IAAI,MAAM,cAAc,SAAS,MAAM,MAAM,IAAI,EAAE;AAAA,MAC3D;AAEA,aAAO,SAAS,KAAK;AAAA,IACvB;AAAA,EACF;AACF;;;AC5DO,IAAM,kBAAkB;AAAA,EAC7B;AACF;AAEO,IAAM,wBAAwB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL;AAEO,IAAM,eAAe;AAAA,EAC1B;AAAA,EACA;AACF;AAEO,IAAM,2BAA2B;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AACL;AAEO,IAAM,uBAAuB;","names":[]}
1
+ {"version":3,"sources":["../src/contracts.ts","../src/client.ts","../src/toolsets.ts"],"sourcesContent":["export type JsonSchema = {\n readonly [key: string]: unknown\n}\n\nexport const customerToolNames = [\n \"outlit_list_customers\",\n \"outlit_list_users\",\n \"outlit_list_workspace_users\",\n \"outlit_get_customer\",\n \"outlit_get_timeline\",\n \"outlit_list_facts\",\n \"outlit_get_fact\",\n \"outlit_get_source\",\n \"outlit_list_sources\",\n \"outlit_search_customer_context\",\n \"outlit_query\",\n \"outlit_schema\",\n \"outlit_send_notification\",\n] as const\n\nexport const customerSourceTypes = [\n \"EMAIL\",\n \"CALL\",\n \"CALENDAR_EVENT\",\n \"SUPPORT_TICKET\",\n \"OPPORTUNITY\",\n \"SLACK\",\n] as const\n\nexport const customerSourceTypeAliases = [\"CRM\", \"CRM_OPPORTUNITY\"] as const\n\nexport const customerSourceTypeInputs = [\n \"EMAIL\",\n \"CALL\",\n \"CALENDAR_EVENT\",\n \"SUPPORT_TICKET\",\n \"OPPORTUNITY\",\n \"SLACK\",\n \"CRM\",\n \"CRM_OPPORTUNITY\",\n] as const\n\nexport const customerToolContracts = {\n outlit_list_customers: {\n toolName: \"outlit_list_customers\",\n title: \"List Customers\",\n description:\n \"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).\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n activatedSince: {\n description: \"Filter customers activated at or after this ISO-8601 datetime\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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)))$\",\n },\n billingStatus: {\n description: \"Filter by billing status\",\n type: \"string\",\n enum: [\"NONE\", \"TRIALING\", \"PAYING\", \"PAST_DUE\", \"CHURNED\"],\n },\n hasActivityInLast: {\n description: \"Filter customers with activity in the last N days\",\n type: \"string\",\n enum: [\"7d\", \"14d\", \"30d\", \"90d\"],\n },\n noActivityInLast: {\n description: \"Filter customers with NO activity in the last N days\",\n type: \"string\",\n enum: [\"7d\", \"14d\", \"30d\", \"90d\"],\n },\n mrrAbove: {\n description: \"Minimum MRR in cents (e.g., 10000 = $100)\",\n type: \"number\",\n minimum: 0,\n },\n mrrBelow: {\n description: \"Maximum MRR in cents\",\n type: \"number\",\n minimum: 0,\n },\n traitFilters: {\n description: \"Filter by exact trait values using key/value pairs\",\n type: \"object\",\n propertyNames: {\n type: \"string\",\n pattern: \"^[A-Za-z0-9_-]{1,100}$\",\n },\n additionalProperties: {\n anyOf: [\n {\n type: \"string\",\n maxLength: 500,\n },\n {\n type: \"number\",\n },\n {\n type: \"boolean\",\n },\n ],\n },\n },\n search: {\n description: \"Search by customer name or domain (case-insensitive)\",\n type: \"string\",\n maxLength: 500,\n },\n ownerId: {\n description: \"Filter customers by internal owner user ID\",\n type: \"string\",\n maxLength: 500,\n },\n ownerEmail: {\n description: \"Filter customers by internal owner email address\",\n type: \"string\",\n maxLength: 500,\n },\n hasOwner: {\n description: \"Filter customers by whether they have an owner\",\n type: \"boolean\",\n },\n limit: {\n description: \"Results per page (max 1000)\",\n default: 50,\n type: \"number\",\n minimum: 1,\n maximum: 1000,\n },\n cursor: {\n description: \"Pagination cursor from previous response\",\n type: \"string\",\n },\n orderBy: {\n description: \"Field to order results by\",\n default: \"last_activity_at\",\n type: \"string\",\n enum: [\"last_activity_at\", \"first_seen_at\", \"name\", \"mrr_cents\"],\n },\n orderDirection: {\n description: \"Sort direction\",\n default: \"desc\",\n type: \"string\",\n enum: [\"asc\", \"desc\"],\n },\n },\n additionalProperties: false,\n },\n },\n outlit_list_users: {\n toolName: \"outlit_list_users\",\n title: \"List Users\",\n description:\n \"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.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n journeyStage: {\n description: \"Filter by user journey stage\",\n type: \"string\",\n enum: [\"DISCOVERED\", \"SIGNED_UP\", \"ACTIVATED\", \"ENGAGED\", \"INACTIVE\"],\n },\n customerId: {\n description: \"Filter users by customer ID\",\n type: \"string\",\n maxLength: 500,\n },\n traitFilters: {\n description: \"Filter by exact trait values using key/value pairs\",\n type: \"object\",\n propertyNames: {\n type: \"string\",\n pattern: \"^[A-Za-z0-9_-]{1,100}$\",\n },\n additionalProperties: {\n anyOf: [\n {\n type: \"string\",\n maxLength: 500,\n },\n {\n type: \"number\",\n },\n {\n type: \"boolean\",\n },\n ],\n },\n },\n hasActivityInLast: {\n description:\n \"Filter users active within this window. Format: Nd, Nh, or Nm (e.g., '7d', '24h', '90m')\",\n type: \"string\",\n pattern: \"^\\\\d+(d|h|m)$\",\n },\n noActivityInLast: {\n description:\n \"Filter users NOT active within this window. Format: Nd, Nh, or Nm (e.g., '30d', '2h')\",\n type: \"string\",\n pattern: \"^\\\\d+(d|h|m)$\",\n },\n search: {\n description: \"Search by user email or name (case-insensitive)\",\n type: \"string\",\n maxLength: 500,\n },\n limit: {\n description: \"Results per page (max 1000)\",\n default: 50,\n type: \"number\",\n minimum: 1,\n maximum: 1000,\n },\n cursor: {\n description: \"Pagination cursor from previous response\",\n type: \"string\",\n },\n orderBy: {\n description: \"Field to order by\",\n default: \"last_activity_at\",\n type: \"string\",\n enum: [\"last_activity_at\", \"first_seen_at\", \"email\"],\n },\n orderDirection: {\n description: \"Sort direction\",\n default: \"desc\",\n type: \"string\",\n enum: [\"asc\", \"desc\"],\n },\n },\n additionalProperties: false,\n },\n },\n outlit_list_workspace_users: {\n toolName: \"outlit_list_workspace_users\",\n title: \"List Workspace Users\",\n description:\n \"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.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n search: {\n description: \"Search internal workspace users by name, email, title, role, or territory\",\n type: \"string\",\n maxLength: 500,\n },\n role: {\n description: \"Filter internal workspace users by role metadata when available\",\n type: \"string\",\n maxLength: 100,\n },\n managerEmail: {\n description: \"Filter internal workspace users by manager email metadata when available\",\n type: \"string\",\n maxLength: 500,\n },\n hasOwnedCustomers: {\n description: \"When true, return only workspace users who own at least one customer\",\n type: \"boolean\",\n },\n limit: {\n description: \"Results per page (max 1000)\",\n default: 50,\n type: \"number\",\n minimum: 1,\n maximum: 1000,\n },\n cursor: {\n description: \"Pagination cursor from previous response\",\n type: \"string\",\n },\n orderBy: {\n description: \"Field to order workspace users by\",\n default: \"owned_customer_count\",\n type: \"string\",\n enum: [\"name\", \"email\", \"owned_customer_count\"],\n },\n orderDirection: {\n description: \"Sort direction\",\n default: \"desc\",\n type: \"string\",\n enum: [\"asc\", \"desc\"],\n },\n },\n additionalProperties: false,\n },\n },\n outlit_get_customer: {\n toolName: \"outlit_get_customer\",\n title: \"Get Customer\",\n description:\n \"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).\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n customer: {\n type: \"string\",\n description: \"Customer ID, domain, or name to look up\",\n },\n include: {\n description: \"Additional data sections to include in the response\",\n type: \"array\",\n items: {\n type: \"string\",\n enum: [\"users\", \"revenue\", \"recentTimeline\", \"behaviorMetrics\"],\n },\n },\n timeframe: {\n description: \"Timeframe for timeline and behavior metrics (default: 30d)\",\n default: \"30d\",\n type: \"string\",\n enum: [\"7d\", \"14d\", \"30d\", \"90d\"],\n },\n },\n required: [\"customer\"],\n additionalProperties: false,\n },\n },\n outlit_get_timeline: {\n toolName: \"outlit_get_timeline\",\n title: \"Get Customer Timeline\",\n description:\n \"Get the chronological activity timeline for a customer. Use this to see what happened and when — emails, calls, Slack messages, billing events, etc. Supports channel and date filtering.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n customer: {\n type: \"string\",\n description: \"Customer ID or domain\",\n },\n channels: {\n description:\n \"Filter by event channel. Use values such as PRODUCT, COMMUNICATION, MEETING, CRM, BILLING, SUPPORT, IDENTITY, DOCUMENT, or SYSTEM.\",\n type: \"array\",\n items: {\n type: \"string\",\n enum: [\n \"PRODUCT\",\n \"COMMUNICATION\",\n \"MEETING\",\n \"CRM\",\n \"BILLING\",\n \"SUPPORT\",\n \"IDENTITY\",\n \"DOCUMENT\",\n \"SYSTEM\",\n ],\n },\n },\n eventTypes: {\n description: \"Filter by event type\",\n type: \"array\",\n items: {\n type: \"string\",\n },\n },\n timeframe: {\n description:\n \"Relative time window (default: 30d). Cannot be used with startDate/endDate.\",\n type: \"string\",\n enum: [\"7d\", \"14d\", \"30d\", \"90d\", \"all\"],\n },\n startDate: {\n description:\n \"Start of time window (ISO 8601, e.g. '2025-01-01T00:00:00Z'). Cannot be used with timeframe.\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n endDate: {\n description:\n \"End of time window (ISO 8601, e.g. '2025-01-31T23:59:59Z'). Cannot be used with timeframe.\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n limit: {\n description: \"Results per page (max 1000)\",\n default: 50,\n type: \"number\",\n minimum: 1,\n maximum: 1000,\n },\n cursor: {\n description: \"Pagination cursor from previous response\",\n type: \"string\",\n },\n },\n required: [\"customer\"],\n additionalProperties: false,\n },\n },\n outlit_list_facts: {\n toolName: \"outlit_list_facts\",\n title: \"List Customer Facts\",\n description:\n \"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.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n customer: {\n type: \"string\",\n description: \"Customer ID or domain\",\n },\n status: {\n description: \"Optional fact status filter\",\n type: \"array\",\n items: {\n type: \"string\",\n enum: [\"ACTIVE\", \"ACKNOWLEDGED\", \"RESOLVED\", \"SNOOZED\", \"CANDIDATE\"],\n },\n },\n sourceTypes: {\n description: \"Optional generic source types to restrict fact results to.\",\n type: \"array\",\n items: {\n type: \"string\",\n enum: customerSourceTypeInputs,\n },\n },\n factTypes: {\n description:\n \"Optional customer-memory fact type filters, such as CHURN_RISK, EXPANSION, SENTIMENT, or BUDGET. Anomaly detector fact types are not supported.\",\n type: \"array\",\n items: {\n type: \"string\",\n enum: [\n \"CUSTOM\",\n \"COMPANY_CHANGE\",\n \"FUNDING_REVENUE\",\n \"TECHNOLOGY\",\n \"STRATEGY\",\n \"COMPETITIVE\",\n \"SENTIMENT\",\n \"CHAMPION_RISK\",\n \"EXPANSION\",\n \"CHURN_RISK\",\n \"TIMELINE\",\n \"BUDGET\",\n \"DECISION_MAKER\",\n \"REQUIREMENTS\",\n \"PRODUCT_USAGE\",\n \"CONTACT_INFO\",\n \"CONTACT_PREFERENCE\",\n ],\n },\n },\n factCategories: {\n description: \"Optional public fact category filters. Supported values: MEMORY, CUSTOM.\",\n type: \"array\",\n items: {\n type: \"string\",\n enum: [\"MEMORY\", \"CUSTOM\"],\n },\n },\n after: {\n description: \"ISO 8601 datetime lower bound\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n before: {\n description: \"ISO 8601 datetime upper bound\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n limit: {\n description: \"Results per page (max 100)\",\n default: 50,\n type: \"number\",\n minimum: 1,\n maximum: 100,\n },\n cursor: {\n description: \"Pagination cursor from previous response\",\n type: \"string\",\n },\n },\n required: [\"customer\"],\n additionalProperties: false,\n },\n },\n outlit_get_fact: {\n toolName: \"outlit_get_fact\",\n title: \"Get Customer Fact\",\n description:\n \"Get one exact fact by ID. Returns the canonical fact shape and optionally expands requested related data such as evidence.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n factId: {\n type: \"string\",\n minLength: 1,\n maxLength: 500,\n description: \"Exact fact ID to retrieve\",\n },\n include: {\n description:\n \"Optional best-effort expansions. Use include=['evidence'] to request evidence when available; unsupported include values are ignored.\",\n type: \"array\",\n items: {\n type: \"string\",\n minLength: 1,\n maxLength: 100,\n },\n },\n },\n required: [\"factId\"],\n additionalProperties: false,\n },\n },\n outlit_get_source: {\n toolName: \"outlit_get_source\",\n title: \"Get Source\",\n description:\n \"Get one exact source record by generic sourceType and sourceId. Use this when you already know the concrete underlying source you want to inspect.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n sourceType: {\n type: \"string\",\n enum: customerSourceTypeInputs,\n },\n sourceId: {\n type: \"string\",\n minLength: 1,\n maxLength: 500,\n },\n },\n required: [\"sourceType\", \"sourceId\"],\n additionalProperties: false,\n },\n },\n outlit_list_sources: {\n toolName: \"outlit_list_sources\",\n title: \"List Sources\",\n description:\n \"List concrete source records deterministically. Use this instead of semantic search when you need enumerated calls, emails, calendar events, support tickets, or opportunities.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n sourceType: {\n description: \"Generic source type to list.\",\n type: \"string\",\n enum: customerSourceTypeInputs,\n },\n customer: {\n description: \"Customer ID, domain, or name to scope source listing.\",\n type: \"string\",\n minLength: 1,\n maxLength: 200,\n },\n after: {\n description: \"ISO 8601 datetime lower bound.\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n before: {\n description: \"ISO 8601 datetime upper bound.\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n participant: {\n description: \"Participant email or name to filter source records.\",\n type: \"string\",\n minLength: 1,\n maxLength: 500,\n },\n provider: {\n description: \"Provider identifier such as gmail, gong, or google-calendar.\",\n type: \"string\",\n minLength: 1,\n maxLength: 200,\n },\n hasTranscript: {\n description: \"Filter call sources by transcript presence.\",\n type: \"boolean\",\n },\n limit: {\n description: \"Results per page.\",\n default: 50,\n type: \"integer\",\n minimum: 1,\n maximum: 100,\n },\n cursor: {\n description: \"Pagination cursor.\",\n type: \"string\",\n minLength: 1,\n maxLength: 2000,\n },\n },\n additionalProperties: false,\n },\n },\n outlit_search_customer_context: {\n toolName: \"outlit_search_customer_context\",\n title: \"Search Customer Context\",\n description:\n \"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.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n customer: {\n description: \"Customer ID, domain, or name. Omit to search across all customers.\",\n anyOf: [\n {\n type: \"string\",\n minLength: 1,\n maxLength: 500,\n },\n {\n type: \"null\",\n },\n ],\n },\n query: {\n type: \"string\",\n minLength: 2,\n maxLength: 2000,\n description: \"Natural language query or topic to search for.\",\n },\n topK: {\n description: \"Maximum number of artifact results to return (default 20).\",\n type: \"integer\",\n minimum: 1,\n maximum: 50,\n },\n after: {\n description: \"ISO 8601 datetime lower bound\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n before: {\n description: \"ISO 8601 datetime upper bound\",\n type: \"string\",\n format: \"date-time\",\n pattern:\n \"^(?:(?:\\\\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))$\",\n },\n sourceTypes: {\n description: \"Optional generic source types to restrict the search to.\",\n type: \"array\",\n items: {\n type: \"string\",\n enum: customerSourceTypeInputs,\n },\n },\n },\n required: [\"query\"],\n additionalProperties: false,\n },\n },\n outlit_query: {\n toolName: \"outlit_query\",\n title: \"Run SQL Query\",\n description:\n \"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\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n sql: {\n type: \"string\",\n description: \"SQL SELECT query to execute\",\n },\n limit: {\n description: \"Max rows to return (default 1000, max 10000)\",\n default: 1000,\n type: \"integer\",\n minimum: 1,\n maximum: 10000,\n },\n },\n required: [\"sql\"],\n additionalProperties: false,\n },\n },\n outlit_schema: {\n toolName: \"outlit_schema\",\n title: \"Get SQL Schema\",\n description:\n \"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.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n table: {\n description: \"Specific analytics view to describe. Omit to list all views.\",\n type: \"string\",\n enum: [\"activity\", \"customers\", \"users\", \"revenue\"],\n },\n },\n additionalProperties: false,\n },\n },\n outlit_send_notification: {\n toolName: \"outlit_send_notification\",\n title: \"Send Notification\",\n description:\n \"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.\",\n inputSchema: {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n type: \"object\",\n properties: {\n title: {\n type: \"string\",\n minLength: 1,\n maxLength: 160,\n description: \"Notification title\",\n },\n markdown: {\n description: \"Markdown notification body rendered for the target provider\",\n type: \"string\",\n minLength: 1,\n maxLength: 100000,\n },\n payload: {\n description:\n \"Optional JSON-compatible payload. Serialized size must be 100,000 characters or fewer.\",\n $ref: \"#/$defs/__schema0\",\n },\n message: {\n description: \"Optional summary message\",\n type: \"string\",\n minLength: 1,\n maxLength: 1200,\n },\n severity: {\n description: \"Optional notification severity\",\n type: \"string\",\n enum: [\"low\", \"medium\", \"high\"],\n },\n source: {\n description: \"Optional source label\",\n type: \"string\",\n minLength: 1,\n maxLength: 120,\n },\n subject: {\n description: \"Optional subject line\",\n type: \"string\",\n minLength: 1,\n maxLength: 240,\n },\n destinationIds: {\n description: \"Optional NotificationDestination ids. Omit to use the default notifier.\",\n minItems: 1,\n maxItems: 10,\n type: \"array\",\n items: {\n type: \"string\",\n format: \"uuid\",\n pattern:\n \"^([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)$\",\n },\n },\n },\n required: [\"title\"],\n additionalProperties: false,\n $defs: {\n __schema0: {\n anyOf: [\n {\n type: \"string\",\n },\n {\n type: \"number\",\n },\n {\n type: \"boolean\",\n },\n {\n type: \"null\",\n },\n {\n type: \"array\",\n items: {\n $ref: \"#/$defs/__schema0\",\n },\n },\n {\n type: \"object\",\n propertyNames: {\n type: \"string\",\n },\n additionalProperties: {\n $ref: \"#/$defs/__schema0\",\n },\n },\n ],\n },\n },\n },\n },\n} as const\n\nexport const customerBillingStatuses = [\n \"NONE\",\n \"TRIALING\",\n \"PAYING\",\n \"PAST_DUE\",\n \"CHURNED\",\n] as const\n\nexport const customerActivityWindows = [\"7d\", \"14d\", \"30d\", \"90d\"] as const\n\nexport const customerFactStatuses = [\n \"ACTIVE\",\n \"ACKNOWLEDGED\",\n \"RESOLVED\",\n \"SNOOZED\",\n \"CANDIDATE\",\n] as const\n\nexport const customerFactIncludes = [\"evidence\"] as const\n\nexport const customerFactTypes = [\n \"CUSTOM\",\n \"COMPANY_CHANGE\",\n \"FUNDING_REVENUE\",\n \"TECHNOLOGY\",\n \"STRATEGY\",\n \"COMPETITIVE\",\n \"SENTIMENT\",\n \"CHAMPION_RISK\",\n \"EXPANSION\",\n \"CHURN_RISK\",\n \"TIMELINE\",\n \"BUDGET\",\n \"DECISION_MAKER\",\n \"REQUIREMENTS\",\n \"PRODUCT_USAGE\",\n \"CONTACT_INFO\",\n \"CONTACT_PREFERENCE\",\n] as const\n\nexport const unsupportedCustomerFactTypes = [\n \"TRACKING_GAP\",\n \"SCHEMA_DRIFT\",\n \"INGESTION_LAG\",\n \"ACTIVATION_RATE_DROP\",\n \"FUNNEL_DROPOFF\",\n \"CORE_ACTION_DECAY\",\n \"CADENCE_BREAK\",\n \"QUIET_ACCOUNT\",\n \"CHAMPION_AT_RISK\",\n \"SEGMENT_DIVERGENCE\",\n] as const\n\nexport const customerFactCategories = [\"MEMORY\", \"CUSTOM\"] as const\n\nexport const customerListOrderFields = [\n \"last_activity_at\",\n \"first_seen_at\",\n \"name\",\n \"mrr_cents\",\n] as const\n\nexport const customerIncludeSections = [\n \"users\",\n \"revenue\",\n \"recentTimeline\",\n \"behaviorMetrics\",\n] as const\n\nexport const customerTimeframes = [\"7d\", \"14d\", \"30d\", \"90d\"] as const\n\nexport const notificationProviderValues = [\"slack\"] as const\n\nexport const notificationSeverityValues = [\"low\", \"medium\", \"high\"] as const\n\nexport const timelineChannels = [\n \"PRODUCT\",\n \"COMMUNICATION\",\n \"MEETING\",\n \"CRM\",\n \"BILLING\",\n \"SUPPORT\",\n \"IDENTITY\",\n \"DOCUMENT\",\n \"SYSTEM\",\n] as const\n\nexport const timelineTimeframes = [\"7d\", \"14d\", \"30d\", \"90d\", \"all\"] as const\n\nexport const userJourneyStages = [\n \"DISCOVERED\",\n \"SIGNED_UP\",\n \"ACTIVATED\",\n \"ENGAGED\",\n \"INACTIVE\",\n] as const\n\nexport const userListOrderFields = [\"last_activity_at\", \"first_seen_at\", \"email\"] as const\n\nexport const workspaceUserListOrderFields = [\"name\", \"email\", \"owned_customer_count\"] as const\n\nexport const schemaTables = [\"activity\", \"customers\", \"users\", \"revenue\"] as const\n\nexport const customerToolContractHash =\n \"f1f06ac1d3fb5131095ac7047f5871f47942b0f5efcb1229151b52475bf93816\" as const\n\nexport type CustomerToolName = (typeof customerToolNames)[number]\nexport type CustomerSourceType = (typeof customerSourceTypes)[number]\nexport type CustomerSourceTypeInput = (typeof customerSourceTypeInputs)[number]\n\nexport type CustomerToolContract = {\n toolName: CustomerToolName\n title: string\n description: string\n inputSchema: JsonSchema\n}\n\nconst customerToolNameSet = new Set<string>(customerToolNames)\nconst customerSourceTypeSet = new Set<string>(customerSourceTypes)\nconst customerSourceTypeAliasMap = new Map<\n (typeof customerSourceTypeAliases)[number],\n CustomerSourceType\n>([\n [\"CRM\", \"OPPORTUNITY\"],\n [\"CRM_OPPORTUNITY\", \"OPPORTUNITY\"],\n])\nconst iso8601UtcDateTimeRegex =\n /^(?:(?:\\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))$/\n\nexport function isCustomerToolName(value: string): value is CustomerToolName {\n return customerToolNameSet.has(value)\n}\n\nexport function getCustomerToolContract(name: CustomerToolName): CustomerToolContract {\n return customerToolContracts[name]\n}\n\nexport function normalizeCustomerSourceType(value: string): CustomerSourceType | null {\n const normalized = value.trim().toUpperCase()\n if (customerSourceTypeSet.has(normalized)) {\n return normalized as CustomerSourceType\n }\n\n return (\n customerSourceTypeAliasMap.get(normalized as (typeof customerSourceTypeAliases)[number]) ?? null\n )\n}\n\nexport type SearchArgsLike = {\n query?: string\n customer?: string | null\n topK?: number\n after?: string\n before?: string\n sourceTypes?: string[]\n}\n\nexport type CustomerContextSearchInput = {\n query: string\n customer?: string | null\n topK?: number\n after?: string\n before?: string\n sourceTypes?: CustomerSourceType[]\n}\n\nexport function resolveCustomerContextSearchInput(value: SearchArgsLike):\n | { ok: true; request: CustomerContextSearchInput }\n | {\n ok: false\n message: string\n } {\n if (!value.query) {\n return {\n ok: false,\n message: \"A query argument is required\",\n }\n }\n\n const normalizedQuery = value.query.trim()\n if (normalizedQuery.length < 2) {\n return {\n ok: false,\n message: \"Query must be at least 2 non-whitespace characters\",\n }\n }\n\n if (value.after !== undefined && !iso8601UtcDateTimeRegex.test(value.after)) {\n return {\n ok: false,\n message: \"--after must be a valid ISO 8601 datetime\",\n }\n }\n\n const afterTime = value.after === undefined ? undefined : new Date(value.after).getTime()\n if (afterTime !== undefined && Number.isNaN(afterTime)) {\n return {\n ok: false,\n message: \"--after must be a valid ISO 8601 datetime\",\n }\n }\n\n if (value.before !== undefined && !iso8601UtcDateTimeRegex.test(value.before)) {\n return {\n ok: false,\n message: \"--before must be a valid ISO 8601 datetime\",\n }\n }\n\n const beforeTime = value.before === undefined ? undefined : new Date(value.before).getTime()\n if (beforeTime !== undefined && Number.isNaN(beforeTime)) {\n return {\n ok: false,\n message: \"--before must be a valid ISO 8601 datetime\",\n }\n }\n\n if (afterTime !== undefined && beforeTime !== undefined && afterTime > beforeTime) {\n return {\n ok: false,\n message: \"--after must be before or equal to --before\",\n }\n }\n\n const invalidSourceTypes =\n value.sourceTypes?.filter((sourceType) => !normalizeCustomerSourceType(sourceType)) ?? []\n if (invalidSourceTypes.length > 0) {\n return {\n ok: false,\n message: `Unknown source types: ${invalidSourceTypes.join(\", \")}. Allowed: ${customerSourceTypeInputs.join(\", \")}`,\n }\n }\n\n const normalizedSourceTypes = value.sourceTypes\n ? Array.from(\n new Set(value.sourceTypes.map((sourceType) => normalizeCustomerSourceType(sourceType))),\n ).filter((sourceType): sourceType is CustomerSourceType => sourceType !== null)\n : undefined\n\n return {\n ok: true,\n request: {\n query: normalizedQuery,\n customer: value.customer,\n topK: value.topK,\n after: value.after,\n before: value.before,\n sourceTypes: normalizedSourceTypes,\n },\n }\n}\n","import { type CustomerToolName, isCustomerToolName } from \"./contracts.js\"\nimport type { CustomerDetailResult, CustomerListResult } from \"./results.js\"\n\nexport const DEFAULT_OUTLIT_API_URL = \"https://app.outlit.ai\"\n\nexport type OutlitToolsFetch = (\n input: string | URL | Request,\n init?: RequestInit,\n) => Promise<Response>\n\nexport type OutlitToolsClientOptions = {\n apiKey: string\n baseUrl?: string\n fetch?: OutlitToolsFetch\n}\n\nexport type CustomerToolResult<TToolName extends CustomerToolName> =\n TToolName extends \"outlit_list_customers\"\n ? CustomerListResult\n : TToolName extends \"outlit_get_customer\"\n ? CustomerDetailResult\n : unknown\n\nexport type OutlitToolsClient = {\n key: string\n baseUrl: string\n callTool<TToolName extends CustomerToolName>(\n toolName: TToolName,\n input?: Record<string, unknown>,\n ): Promise<CustomerToolResult<TToolName>>\n}\n\nexport function createOutlitClient(options: OutlitToolsClientOptions): OutlitToolsClient {\n const key = options.apiKey.trim()\n const baseUrl = options.baseUrl ?? DEFAULT_OUTLIT_API_URL\n const fetchImpl = options.fetch ?? globalThis.fetch\n\n if (!key) {\n throw new Error(\"apiKey is required\")\n }\n\n if (!fetchImpl) {\n throw new Error(\"fetch is not available\")\n }\n\n return {\n key,\n baseUrl,\n async callTool<TToolName extends CustomerToolName>(\n toolName: TToolName,\n input: Record<string, unknown> = {},\n ): Promise<CustomerToolResult<TToolName>> {\n if (!isCustomerToolName(toolName)) {\n throw new Error(`Unknown customer tool: ${toolName}`)\n }\n\n const response = await fetchImpl(new URL(\"/api/tools/call\", baseUrl).toString(), {\n method: \"POST\",\n headers: {\n Authorization: `Bearer ${key}`,\n \"Content-Type\": \"application/json\",\n },\n body: JSON.stringify({\n tool: toolName,\n input,\n }),\n })\n\n if (!response.ok) {\n const text = await response.text()\n throw new Error(`API error (${response.status}): ${text}`)\n }\n\n return (await response.json()) as CustomerToolResult<TToolName>\n },\n }\n}\n","import { type CustomerToolName, customerToolNames } from \"./contracts.js\"\n\nexport const actionToolNames = [\n \"outlit_send_notification\",\n] as const satisfies readonly CustomerToolName[]\n\nexport const defaultAgentToolNames = [\n \"outlit_list_customers\",\n \"outlit_list_users\",\n \"outlit_list_workspace_users\",\n \"outlit_get_customer\",\n \"outlit_get_timeline\",\n \"outlit_list_facts\",\n \"outlit_get_fact\",\n \"outlit_get_source\",\n \"outlit_search_customer_context\",\n ...actionToolNames,\n] as const satisfies readonly CustomerToolName[]\n\nexport const sqlToolNames = [\n \"outlit_schema\",\n \"outlit_query\",\n] as const satisfies readonly CustomerToolName[]\n\nexport const analyticalAgentToolNames = [\n ...defaultAgentToolNames,\n ...sqlToolNames,\n] as const satisfies readonly CustomerToolName[]\n\nexport const allCustomerToolNames = customerToolNames\n"],"mappings":";AAIO,IAAM,oBAAoB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,sBAAsB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,4BAA4B,CAAC,OAAO,iBAAiB;AAE3D,IAAM,2BAA2B;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,wBAAwB;AAAA,EACnC,uBAAuB;AAAA,IACrB,UAAU;AAAA,IACV,OAAO;AAAA,IACP,aACE;AAAA,IACF,aAAa;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,YAAY;AAAA,QACV,gBAAgB;AAAA,UACd,aAAa;AAAA,UACb,MAAM;AAAA,UACN,QAAQ;AAAA,UACR,SACE;AAAA,QACJ;AAAA,QACA,eAAe;AAAA,UACb,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM,CAAC,QAAQ,YAAY,UAAU,YAAY,SAAS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ACF,CAAC;AAAA,MACH,CAAC;AAED,UAAI,CAAC,SAAS,IAAI;AAChB,cAAM,OAAO,MAAM,SAAS,KAAK;AACjC,cAAM,IAAI,MAAM,cAAc,SAAS,MAAM,MAAM,IAAI,EAAE;AAAA,MAC3D;AAEA,aAAQ,MAAM,SAAS,KAAK;AAAA,IAC9B;AAAA,EACF;AACF;;;AC1EO,IAAM,kBAAkB;AAAA,EAC7B;AACF;AAEO,IAAM,wBAAwB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL;AAEO,IAAM,eAAe;AAAA,EAC1B;AAAA,EACA;AACF;AAEO,IAAM,2BAA2B;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AACL;AAEO,IAAM,uBAAuB;","names":[]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@outlit/tools",
3
- "version": "0.2.1",
4
- "description": "Outlit customer intelligence tool contracts and client helpers",
3
+ "version": "0.3.0",
4
+ "description": "Customer intelligence tool contracts and API client helpers for Outlit agents",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Outlit AI",
7
7
  "repository": {
@@ -12,11 +12,14 @@
12
12
  "bugs": {
13
13
  "url": "https://github.com/OutlitAI/outlit-sdk/issues"
14
14
  },
15
- "homepage": "https://github.com/OutlitAI/outlit-sdk#readme",
15
+ "homepage": "https://docs.outlit.ai/api-reference/tools",
16
16
  "keywords": [
17
17
  "outlit",
18
18
  "tools",
19
19
  "agents",
20
+ "ai-agents",
21
+ "mcp",
22
+ "customer-context",
20
23
  "customer-intelligence"
21
24
  ],
22
25
  "publishConfig": {