@outlit/tools 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -44,6 +44,7 @@ __export(src_exports, {
44
44
  getCustomerToolContract: () => getCustomerToolContract,
45
45
  isCustomerToolName: () => isCustomerToolName,
46
46
  normalizeCustomerSourceType: () => normalizeCustomerSourceType,
47
+ notificationProviderValues: () => notificationProviderValues,
47
48
  notificationSeverityValues: () => notificationSeverityValues,
48
49
  resolveCustomerContextSearchInput: () => resolveCustomerContextSearchInput,
49
50
  schemaTables: () => schemaTables,
@@ -87,6 +88,7 @@ var customerSourceTypeInputs = [
87
88
  "CRM",
88
89
  "CRM_OPPORTUNITY"
89
90
  ];
91
+ var notificationProviderValues = ["slack"];
90
92
  var customerToolContracts = {
91
93
  outlit_list_customers: {
92
94
  toolName: "outlit_list_customers",
@@ -589,7 +591,7 @@ var customerToolContracts = {
589
591
  },
590
592
  outlit_send_notification: {
591
593
  toolName: "outlit_send_notification",
592
- description: "Send or post a Slack notification. Use only when the user explicitly asks you to send, post, or notify. The payload is rendered as a Slack code block.",
594
+ 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.",
593
595
  inputSchema: {
594
596
  $schema: "https://json-schema.org/draft/2020-12/schema",
595
597
  type: "object",
@@ -600,41 +602,18 @@ var customerToolContracts = {
600
602
  maxLength: 160,
601
603
  description: "Notification title"
602
604
  },
605
+ markdown: {
606
+ description: "Markdown notification body rendered for the target provider",
607
+ type: "string",
608
+ minLength: 1,
609
+ maxLength: 1e5
610
+ },
603
611
  payload: {
604
- description: "JSON-compatible payload rendered in Slack as a code block. Serialized size must be 100,000 characters or fewer.",
605
- anyOf: [
606
- {
607
- type: "string"
608
- },
609
- {
610
- type: "number"
611
- },
612
- {
613
- type: "boolean"
614
- },
615
- {
616
- type: "null"
617
- },
618
- {
619
- type: "array",
620
- items: {
621
- $ref: "#/$defs/__schema0"
622
- }
623
- },
624
- {
625
- type: "object",
626
- propertyNames: {
627
- type: "string"
628
- },
629
- additionalProperties: {
630
- $ref: "#/$defs/__schema0"
631
- }
632
- }
633
- ],
612
+ description: "Optional JSON-compatible payload. Serialized size must be 100,000 characters or fewer.",
634
613
  $ref: "#/$defs/__schema0"
635
614
  },
636
615
  message: {
637
- description: "Optional Slack message",
616
+ description: "Optional summary message",
638
617
  type: "string",
639
618
  minLength: 1,
640
619
  maxLength: 1200
@@ -655,9 +634,39 @@ var customerToolContracts = {
655
634
  type: "string",
656
635
  minLength: 1,
657
636
  maxLength: 240
637
+ },
638
+ destinations: {
639
+ description: "Optional explicit notification destinations. Omit to use the default notifier.",
640
+ minItems: 1,
641
+ maxItems: 10,
642
+ type: "array",
643
+ items: {
644
+ type: "object",
645
+ properties: {
646
+ provider: {
647
+ description: "Notification provider",
648
+ type: "string",
649
+ enum: notificationProviderValues
650
+ },
651
+ channelId: {
652
+ description: "Provider-specific destination channel ID",
653
+ type: "string",
654
+ minLength: 1,
655
+ maxLength: 240
656
+ },
657
+ label: {
658
+ description: "Optional destination label",
659
+ type: "string",
660
+ minLength: 1,
661
+ maxLength: 120
662
+ }
663
+ },
664
+ required: ["provider"],
665
+ additionalProperties: false
666
+ }
658
667
  }
659
668
  },
660
- required: ["title", "payload"],
669
+ required: ["title"],
661
670
  additionalProperties: false,
662
671
  $defs: {
663
672
  __schema0: {
@@ -778,7 +787,7 @@ var userJourneyStages = [
778
787
  ];
779
788
  var userListOrderFields = ["last_activity_at", "first_seen_at", "email"];
780
789
  var schemaTables = ["activity", "customers", "users", "revenue"];
781
- var customerToolContractHash = "f619a7dcc1845bc494a193d11e76c6fcee66ecaa2ea60a9a30b51750feb8b11a";
790
+ var customerToolContractHash = "006ce091382509c3224815c4f6ead4c5e78e34f54df281fe8f143811890b04af";
782
791
  var customerToolNameSet = new Set(customerToolNames);
783
792
  var customerSourceTypeSet = new Set(customerSourceTypes);
784
793
  var customerSourceTypeAliasMap = /* @__PURE__ */ new Map([
@@ -793,11 +802,11 @@ function getCustomerToolContract(name) {
793
802
  return customerToolContracts[name];
794
803
  }
795
804
  function normalizeCustomerSourceType(value) {
796
- const normalizedValue = value.trim().toUpperCase();
797
- if (customerSourceTypeSet.has(normalizedValue)) {
798
- return normalizedValue;
805
+ const normalized = value.trim().toUpperCase();
806
+ if (customerSourceTypeSet.has(normalized)) {
807
+ return normalized;
799
808
  }
800
- return customerSourceTypeAliasMap.get(normalizedValue) ?? null;
809
+ return customerSourceTypeAliasMap.get(normalized) ?? null;
801
810
  }
802
811
  function resolveCustomerContextSearchInput(value) {
803
812
  if (!value.query) {
@@ -957,6 +966,7 @@ var allCustomerToolNames = customerToolNames;
957
966
  getCustomerToolContract,
958
967
  isCustomerToolName,
959
968
  normalizeCustomerSourceType,
969
+ notificationProviderValues,
960
970
  notificationSeverityValues,
961
971
  resolveCustomerContextSearchInput,
962
972
  schemaTables,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/contracts.ts","../src/client.ts","../src/toolsets.ts"],"sourcesContent":["export type { OutlitToolsClient, OutlitToolsClientOptions, OutlitToolsFetch } from \"./client.js\"\nexport { createOutlitClient, DEFAULT_OUTLIT_API_URL } from \"./client.js\"\nexport type {\n CustomerContextSearchInput,\n CustomerSourceType,\n CustomerSourceTypeInput,\n CustomerToolContract,\n CustomerToolName,\n JsonSchema,\n SearchArgsLike,\n} from \"./contracts.js\"\nexport {\n customerActivityWindows,\n customerBillingStatuses,\n customerFactCategories,\n customerFactIncludes,\n customerFactStatuses,\n customerFactTypes,\n customerIncludeSections,\n customerListOrderFields,\n customerSourceTypeAliases,\n customerSourceTypeInputs,\n customerSourceTypes,\n customerTimeframes,\n customerToolContractHash,\n customerToolContracts,\n customerToolNames,\n getCustomerToolContract,\n isCustomerToolName,\n normalizeCustomerSourceType,\n notificationSeverityValues,\n resolveCustomerContextSearchInput,\n schemaTables,\n timelineChannels,\n timelineTimeframes,\n unsupportedCustomerFactTypes,\n userJourneyStages,\n userListOrderFields,\n} from \"./contracts.js\"\n\nexport {\n actionToolNames,\n allCustomerToolNames,\n analyticalAgentToolNames,\n defaultAgentToolNames,\n sqlToolNames,\n} from \"./toolsets.js\"\n","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_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_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 Slack notification. Use only when the user explicitly asks you to send, post, or notify. The payload is rendered as a Slack code block.\",\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 payload: {\n description:\n \"JSON-compatible payload rendered in Slack as a code block. Serialized size must be 100,000 characters or fewer.\",\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 $ref: \"#/$defs/__schema0\",\n },\n message: {\n description: \"Optional Slack 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 },\n required: [\"title\", \"payload\"],\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 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 \"f619a7dcc1845bc494a193d11e76c6fcee66ecaa2ea60a9a30b51750feb8b11a\" 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 normalizedValue = value.trim().toUpperCase()\n\n if (customerSourceTypeSet.has(normalizedValue)) {\n return normalizedValue as CustomerSourceType\n }\n\n return (\n customerSourceTypeAliasMap.get(normalizedValue as (typeof customerSourceTypeAliases)[number]) ??\n 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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACIO,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;AACF;AAEO,IAAM,sBAAsB;AAAA,EACjC;AAAA,E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sourcesContent":["export type { OutlitToolsClient, OutlitToolsClientOptions, OutlitToolsFetch } from \"./client.js\"\nexport { createOutlitClient, DEFAULT_OUTLIT_API_URL } from \"./client.js\"\nexport type {\n CustomerContextSearchInput,\n CustomerSourceType,\n CustomerSourceTypeInput,\n CustomerToolContract,\n CustomerToolName,\n JsonSchema,\n SearchArgsLike,\n} from \"./contracts.js\"\nexport {\n customerActivityWindows,\n customerBillingStatuses,\n customerFactCategories,\n customerFactIncludes,\n customerFactStatuses,\n customerFactTypes,\n customerIncludeSections,\n customerListOrderFields,\n customerSourceTypeAliases,\n customerSourceTypeInputs,\n customerSourceTypes,\n customerTimeframes,\n customerToolContractHash,\n customerToolContracts,\n customerToolNames,\n getCustomerToolContract,\n isCustomerToolName,\n normalizeCustomerSourceType,\n notificationProviderValues,\n notificationSeverityValues,\n resolveCustomerContextSearchInput,\n schemaTables,\n timelineChannels,\n timelineTimeframes,\n unsupportedCustomerFactTypes,\n userJourneyStages,\n userListOrderFields,\n} from \"./contracts.js\"\n\nexport {\n actionToolNames,\n allCustomerToolNames,\n analyticalAgentToolNames,\n defaultAgentToolNames,\n sqlToolNames,\n} from \"./toolsets.js\"\n","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_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 notificationProviderValues = [\"slack\"] 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_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: notificationProviderValues,\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 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 \"006ce091382509c3224815c4f6ead4c5e78e34f54df281fe8f143811890b04af\" 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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACIO,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;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,6BAA6B,CAAC,OAAO;AAE3C,IAAM,wBAAwB;AAAA,EACnC,uBAAuB;AAAA,IACrB,UAAU;AAAA,IACV,aACE;AAAA,IACF,aAAa;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,YAAY;AAAA,QACV,eAAe;AAAA,UACb,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM,CAAC,QAAQ,YAAY,UAAU,YAAY,SAAS;AAAA,QAC5D;AAAA,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AAM,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":[]}
package/dist/index.d.cts CHANGED
@@ -5,6 +5,7 @@ declare const customerToolNames: readonly ["outlit_list_customers", "outlit_list
5
5
  declare const customerSourceTypes: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET", "OPPORTUNITY"];
6
6
  declare const customerSourceTypeAliases: readonly ["CRM", "CRM_OPPORTUNITY"];
7
7
  declare const customerSourceTypeInputs: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET", "OPPORTUNITY", "CRM", "CRM_OPPORTUNITY"];
8
+ declare const notificationProviderValues: readonly ["slack"];
8
9
  declare const customerToolContracts: {
9
10
  readonly outlit_list_customers: {
10
11
  readonly toolName: "outlit_list_customers";
@@ -468,7 +469,7 @@ declare const customerToolContracts: {
468
469
  };
469
470
  readonly outlit_send_notification: {
470
471
  readonly toolName: "outlit_send_notification";
471
- readonly description: "Send or post a Slack notification. Use only when the user explicitly asks you to send, post, or notify. The payload is rendered as a Slack code block.";
472
+ readonly 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.";
472
473
  readonly inputSchema: {
473
474
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
474
475
  readonly type: "object";
@@ -479,34 +480,18 @@ declare const customerToolContracts: {
479
480
  readonly maxLength: 160;
480
481
  readonly description: "Notification title";
481
482
  };
483
+ readonly markdown: {
484
+ readonly description: "Markdown notification body rendered for the target provider";
485
+ readonly type: "string";
486
+ readonly minLength: 1;
487
+ readonly maxLength: 100000;
488
+ };
482
489
  readonly payload: {
483
- readonly description: "JSON-compatible payload rendered in Slack as a code block. Serialized size must be 100,000 characters or fewer.";
484
- readonly anyOf: readonly [{
485
- readonly type: "string";
486
- }, {
487
- readonly type: "number";
488
- }, {
489
- readonly type: "boolean";
490
- }, {
491
- readonly type: "null";
492
- }, {
493
- readonly type: "array";
494
- readonly items: {
495
- readonly $ref: "#/$defs/__schema0";
496
- };
497
- }, {
498
- readonly type: "object";
499
- readonly propertyNames: {
500
- readonly type: "string";
501
- };
502
- readonly additionalProperties: {
503
- readonly $ref: "#/$defs/__schema0";
504
- };
505
- }];
490
+ readonly description: "Optional JSON-compatible payload. Serialized size must be 100,000 characters or fewer.";
506
491
  readonly $ref: "#/$defs/__schema0";
507
492
  };
508
493
  readonly message: {
509
- readonly description: "Optional Slack message";
494
+ readonly description: "Optional summary message";
510
495
  readonly type: "string";
511
496
  readonly minLength: 1;
512
497
  readonly maxLength: 1200;
@@ -528,8 +513,38 @@ declare const customerToolContracts: {
528
513
  readonly minLength: 1;
529
514
  readonly maxLength: 240;
530
515
  };
516
+ readonly destinations: {
517
+ readonly description: "Optional explicit notification destinations. Omit to use the default notifier.";
518
+ readonly minItems: 1;
519
+ readonly maxItems: 10;
520
+ readonly type: "array";
521
+ readonly items: {
522
+ readonly type: "object";
523
+ readonly properties: {
524
+ readonly provider: {
525
+ readonly description: "Notification provider";
526
+ readonly type: "string";
527
+ readonly enum: readonly ["slack"];
528
+ };
529
+ readonly channelId: {
530
+ readonly description: "Provider-specific destination channel ID";
531
+ readonly type: "string";
532
+ readonly minLength: 1;
533
+ readonly maxLength: 240;
534
+ };
535
+ readonly label: {
536
+ readonly description: "Optional destination label";
537
+ readonly type: "string";
538
+ readonly minLength: 1;
539
+ readonly maxLength: 120;
540
+ };
541
+ };
542
+ readonly required: readonly ["provider"];
543
+ readonly additionalProperties: false;
544
+ };
545
+ };
531
546
  };
532
- readonly required: readonly ["title", "payload"];
547
+ readonly required: readonly ["title"];
533
548
  readonly additionalProperties: false;
534
549
  readonly $defs: {
535
550
  readonly __schema0: {
@@ -576,7 +591,7 @@ declare const timelineTimeframes: readonly ["7d", "14d", "30d", "90d", "all"];
576
591
  declare const userJourneyStages: readonly ["DISCOVERED", "SIGNED_UP", "ACTIVATED", "ENGAGED", "INACTIVE"];
577
592
  declare const userListOrderFields: readonly ["last_activity_at", "first_seen_at", "email"];
578
593
  declare const schemaTables: readonly ["activity", "customers", "users", "revenue"];
579
- declare const customerToolContractHash: "f619a7dcc1845bc494a193d11e76c6fcee66ecaa2ea60a9a30b51750feb8b11a";
594
+ declare const customerToolContractHash: "006ce091382509c3224815c4f6ead4c5e78e34f54df281fe8f143811890b04af";
580
595
  type CustomerToolName = (typeof customerToolNames)[number];
581
596
  type CustomerSourceType = (typeof customerSourceTypes)[number];
582
597
  type CustomerSourceTypeInput = (typeof customerSourceTypeInputs)[number];
@@ -632,4 +647,4 @@ declare const sqlToolNames: readonly ["outlit_schema", "outlit_query"];
632
647
  declare const analyticalAgentToolNames: readonly ["outlit_list_customers", "outlit_list_users", "outlit_get_customer", "outlit_get_timeline", "outlit_list_facts", "outlit_get_fact", "outlit_get_source", "outlit_search_customer_context", "outlit_send_notification", "outlit_schema", "outlit_query"];
633
648
  declare const allCustomerToolNames: readonly ["outlit_list_customers", "outlit_list_users", "outlit_get_customer", "outlit_get_timeline", "outlit_list_facts", "outlit_get_fact", "outlit_get_source", "outlit_search_customer_context", "outlit_query", "outlit_schema", "outlit_send_notification"];
634
649
 
635
- export { type CustomerContextSearchInput, type CustomerSourceType, type CustomerSourceTypeInput, type CustomerToolContract, type CustomerToolName, DEFAULT_OUTLIT_API_URL, type JsonSchema, type OutlitToolsClient, type OutlitToolsClientOptions, type OutlitToolsFetch, type SearchArgsLike, actionToolNames, allCustomerToolNames, analyticalAgentToolNames, createOutlitClient, customerActivityWindows, customerBillingStatuses, customerFactCategories, customerFactIncludes, customerFactStatuses, customerFactTypes, customerIncludeSections, customerListOrderFields, customerSourceTypeAliases, customerSourceTypeInputs, customerSourceTypes, customerTimeframes, customerToolContractHash, customerToolContracts, customerToolNames, defaultAgentToolNames, getCustomerToolContract, isCustomerToolName, normalizeCustomerSourceType, notificationSeverityValues, resolveCustomerContextSearchInput, schemaTables, sqlToolNames, timelineChannels, timelineTimeframes, unsupportedCustomerFactTypes, userJourneyStages, userListOrderFields };
650
+ export { type CustomerContextSearchInput, type CustomerSourceType, type CustomerSourceTypeInput, type CustomerToolContract, type CustomerToolName, DEFAULT_OUTLIT_API_URL, type JsonSchema, type OutlitToolsClient, type OutlitToolsClientOptions, type OutlitToolsFetch, type SearchArgsLike, actionToolNames, allCustomerToolNames, analyticalAgentToolNames, createOutlitClient, customerActivityWindows, customerBillingStatuses, customerFactCategories, customerFactIncludes, customerFactStatuses, customerFactTypes, customerIncludeSections, customerListOrderFields, customerSourceTypeAliases, customerSourceTypeInputs, customerSourceTypes, customerTimeframes, customerToolContractHash, customerToolContracts, customerToolNames, defaultAgentToolNames, getCustomerToolContract, isCustomerToolName, normalizeCustomerSourceType, notificationProviderValues, notificationSeverityValues, resolveCustomerContextSearchInput, schemaTables, sqlToolNames, timelineChannels, timelineTimeframes, unsupportedCustomerFactTypes, userJourneyStages, userListOrderFields };
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ declare const customerToolNames: readonly ["outlit_list_customers", "outlit_list
5
5
  declare const customerSourceTypes: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET", "OPPORTUNITY"];
6
6
  declare const customerSourceTypeAliases: readonly ["CRM", "CRM_OPPORTUNITY"];
7
7
  declare const customerSourceTypeInputs: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET", "OPPORTUNITY", "CRM", "CRM_OPPORTUNITY"];
8
+ declare const notificationProviderValues: readonly ["slack"];
8
9
  declare const customerToolContracts: {
9
10
  readonly outlit_list_customers: {
10
11
  readonly toolName: "outlit_list_customers";
@@ -468,7 +469,7 @@ declare const customerToolContracts: {
468
469
  };
469
470
  readonly outlit_send_notification: {
470
471
  readonly toolName: "outlit_send_notification";
471
- readonly description: "Send or post a Slack notification. Use only when the user explicitly asks you to send, post, or notify. The payload is rendered as a Slack code block.";
472
+ readonly 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.";
472
473
  readonly inputSchema: {
473
474
  readonly $schema: "https://json-schema.org/draft/2020-12/schema";
474
475
  readonly type: "object";
@@ -479,34 +480,18 @@ declare const customerToolContracts: {
479
480
  readonly maxLength: 160;
480
481
  readonly description: "Notification title";
481
482
  };
483
+ readonly markdown: {
484
+ readonly description: "Markdown notification body rendered for the target provider";
485
+ readonly type: "string";
486
+ readonly minLength: 1;
487
+ readonly maxLength: 100000;
488
+ };
482
489
  readonly payload: {
483
- readonly description: "JSON-compatible payload rendered in Slack as a code block. Serialized size must be 100,000 characters or fewer.";
484
- readonly anyOf: readonly [{
485
- readonly type: "string";
486
- }, {
487
- readonly type: "number";
488
- }, {
489
- readonly type: "boolean";
490
- }, {
491
- readonly type: "null";
492
- }, {
493
- readonly type: "array";
494
- readonly items: {
495
- readonly $ref: "#/$defs/__schema0";
496
- };
497
- }, {
498
- readonly type: "object";
499
- readonly propertyNames: {
500
- readonly type: "string";
501
- };
502
- readonly additionalProperties: {
503
- readonly $ref: "#/$defs/__schema0";
504
- };
505
- }];
490
+ readonly description: "Optional JSON-compatible payload. Serialized size must be 100,000 characters or fewer.";
506
491
  readonly $ref: "#/$defs/__schema0";
507
492
  };
508
493
  readonly message: {
509
- readonly description: "Optional Slack message";
494
+ readonly description: "Optional summary message";
510
495
  readonly type: "string";
511
496
  readonly minLength: 1;
512
497
  readonly maxLength: 1200;
@@ -528,8 +513,38 @@ declare const customerToolContracts: {
528
513
  readonly minLength: 1;
529
514
  readonly maxLength: 240;
530
515
  };
516
+ readonly destinations: {
517
+ readonly description: "Optional explicit notification destinations. Omit to use the default notifier.";
518
+ readonly minItems: 1;
519
+ readonly maxItems: 10;
520
+ readonly type: "array";
521
+ readonly items: {
522
+ readonly type: "object";
523
+ readonly properties: {
524
+ readonly provider: {
525
+ readonly description: "Notification provider";
526
+ readonly type: "string";
527
+ readonly enum: readonly ["slack"];
528
+ };
529
+ readonly channelId: {
530
+ readonly description: "Provider-specific destination channel ID";
531
+ readonly type: "string";
532
+ readonly minLength: 1;
533
+ readonly maxLength: 240;
534
+ };
535
+ readonly label: {
536
+ readonly description: "Optional destination label";
537
+ readonly type: "string";
538
+ readonly minLength: 1;
539
+ readonly maxLength: 120;
540
+ };
541
+ };
542
+ readonly required: readonly ["provider"];
543
+ readonly additionalProperties: false;
544
+ };
545
+ };
531
546
  };
532
- readonly required: readonly ["title", "payload"];
547
+ readonly required: readonly ["title"];
533
548
  readonly additionalProperties: false;
534
549
  readonly $defs: {
535
550
  readonly __schema0: {
@@ -576,7 +591,7 @@ declare const timelineTimeframes: readonly ["7d", "14d", "30d", "90d", "all"];
576
591
  declare const userJourneyStages: readonly ["DISCOVERED", "SIGNED_UP", "ACTIVATED", "ENGAGED", "INACTIVE"];
577
592
  declare const userListOrderFields: readonly ["last_activity_at", "first_seen_at", "email"];
578
593
  declare const schemaTables: readonly ["activity", "customers", "users", "revenue"];
579
- declare const customerToolContractHash: "f619a7dcc1845bc494a193d11e76c6fcee66ecaa2ea60a9a30b51750feb8b11a";
594
+ declare const customerToolContractHash: "006ce091382509c3224815c4f6ead4c5e78e34f54df281fe8f143811890b04af";
580
595
  type CustomerToolName = (typeof customerToolNames)[number];
581
596
  type CustomerSourceType = (typeof customerSourceTypes)[number];
582
597
  type CustomerSourceTypeInput = (typeof customerSourceTypeInputs)[number];
@@ -632,4 +647,4 @@ declare const sqlToolNames: readonly ["outlit_schema", "outlit_query"];
632
647
  declare const analyticalAgentToolNames: readonly ["outlit_list_customers", "outlit_list_users", "outlit_get_customer", "outlit_get_timeline", "outlit_list_facts", "outlit_get_fact", "outlit_get_source", "outlit_search_customer_context", "outlit_send_notification", "outlit_schema", "outlit_query"];
633
648
  declare const allCustomerToolNames: readonly ["outlit_list_customers", "outlit_list_users", "outlit_get_customer", "outlit_get_timeline", "outlit_list_facts", "outlit_get_fact", "outlit_get_source", "outlit_search_customer_context", "outlit_query", "outlit_schema", "outlit_send_notification"];
634
649
 
635
- export { type CustomerContextSearchInput, type CustomerSourceType, type CustomerSourceTypeInput, type CustomerToolContract, type CustomerToolName, DEFAULT_OUTLIT_API_URL, type JsonSchema, type OutlitToolsClient, type OutlitToolsClientOptions, type OutlitToolsFetch, type SearchArgsLike, actionToolNames, allCustomerToolNames, analyticalAgentToolNames, createOutlitClient, customerActivityWindows, customerBillingStatuses, customerFactCategories, customerFactIncludes, customerFactStatuses, customerFactTypes, customerIncludeSections, customerListOrderFields, customerSourceTypeAliases, customerSourceTypeInputs, customerSourceTypes, customerTimeframes, customerToolContractHash, customerToolContracts, customerToolNames, defaultAgentToolNames, getCustomerToolContract, isCustomerToolName, normalizeCustomerSourceType, notificationSeverityValues, resolveCustomerContextSearchInput, schemaTables, sqlToolNames, timelineChannels, timelineTimeframes, unsupportedCustomerFactTypes, userJourneyStages, userListOrderFields };
650
+ export { type CustomerContextSearchInput, type CustomerSourceType, type CustomerSourceTypeInput, type CustomerToolContract, type CustomerToolName, DEFAULT_OUTLIT_API_URL, type JsonSchema, type OutlitToolsClient, type OutlitToolsClientOptions, type OutlitToolsFetch, type SearchArgsLike, actionToolNames, allCustomerToolNames, analyticalAgentToolNames, createOutlitClient, customerActivityWindows, customerBillingStatuses, customerFactCategories, customerFactIncludes, customerFactStatuses, customerFactTypes, customerIncludeSections, customerListOrderFields, customerSourceTypeAliases, customerSourceTypeInputs, customerSourceTypes, customerTimeframes, customerToolContractHash, customerToolContracts, customerToolNames, defaultAgentToolNames, getCustomerToolContract, isCustomerToolName, normalizeCustomerSourceType, notificationProviderValues, notificationSeverityValues, resolveCustomerContextSearchInput, schemaTables, sqlToolNames, timelineChannels, timelineTimeframes, unsupportedCustomerFactTypes, userJourneyStages, userListOrderFields };
package/dist/index.js CHANGED
@@ -29,6 +29,7 @@ var customerSourceTypeInputs = [
29
29
  "CRM",
30
30
  "CRM_OPPORTUNITY"
31
31
  ];
32
+ var notificationProviderValues = ["slack"];
32
33
  var customerToolContracts = {
33
34
  outlit_list_customers: {
34
35
  toolName: "outlit_list_customers",
@@ -531,7 +532,7 @@ var customerToolContracts = {
531
532
  },
532
533
  outlit_send_notification: {
533
534
  toolName: "outlit_send_notification",
534
- description: "Send or post a Slack notification. Use only when the user explicitly asks you to send, post, or notify. The payload is rendered as a Slack code block.",
535
+ 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.",
535
536
  inputSchema: {
536
537
  $schema: "https://json-schema.org/draft/2020-12/schema",
537
538
  type: "object",
@@ -542,41 +543,18 @@ var customerToolContracts = {
542
543
  maxLength: 160,
543
544
  description: "Notification title"
544
545
  },
546
+ markdown: {
547
+ description: "Markdown notification body rendered for the target provider",
548
+ type: "string",
549
+ minLength: 1,
550
+ maxLength: 1e5
551
+ },
545
552
  payload: {
546
- description: "JSON-compatible payload rendered in Slack as a code block. Serialized size must be 100,000 characters or fewer.",
547
- anyOf: [
548
- {
549
- type: "string"
550
- },
551
- {
552
- type: "number"
553
- },
554
- {
555
- type: "boolean"
556
- },
557
- {
558
- type: "null"
559
- },
560
- {
561
- type: "array",
562
- items: {
563
- $ref: "#/$defs/__schema0"
564
- }
565
- },
566
- {
567
- type: "object",
568
- propertyNames: {
569
- type: "string"
570
- },
571
- additionalProperties: {
572
- $ref: "#/$defs/__schema0"
573
- }
574
- }
575
- ],
553
+ description: "Optional JSON-compatible payload. Serialized size must be 100,000 characters or fewer.",
576
554
  $ref: "#/$defs/__schema0"
577
555
  },
578
556
  message: {
579
- description: "Optional Slack message",
557
+ description: "Optional summary message",
580
558
  type: "string",
581
559
  minLength: 1,
582
560
  maxLength: 1200
@@ -597,9 +575,39 @@ var customerToolContracts = {
597
575
  type: "string",
598
576
  minLength: 1,
599
577
  maxLength: 240
578
+ },
579
+ destinations: {
580
+ description: "Optional explicit notification destinations. Omit to use the default notifier.",
581
+ minItems: 1,
582
+ maxItems: 10,
583
+ type: "array",
584
+ 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
607
+ }
600
608
  }
601
609
  },
602
- required: ["title", "payload"],
610
+ required: ["title"],
603
611
  additionalProperties: false,
604
612
  $defs: {
605
613
  __schema0: {
@@ -720,7 +728,7 @@ var userJourneyStages = [
720
728
  ];
721
729
  var userListOrderFields = ["last_activity_at", "first_seen_at", "email"];
722
730
  var schemaTables = ["activity", "customers", "users", "revenue"];
723
- var customerToolContractHash = "f619a7dcc1845bc494a193d11e76c6fcee66ecaa2ea60a9a30b51750feb8b11a";
731
+ var customerToolContractHash = "006ce091382509c3224815c4f6ead4c5e78e34f54df281fe8f143811890b04af";
724
732
  var customerToolNameSet = new Set(customerToolNames);
725
733
  var customerSourceTypeSet = new Set(customerSourceTypes);
726
734
  var customerSourceTypeAliasMap = /* @__PURE__ */ new Map([
@@ -735,11 +743,11 @@ function getCustomerToolContract(name) {
735
743
  return customerToolContracts[name];
736
744
  }
737
745
  function normalizeCustomerSourceType(value) {
738
- const normalizedValue = value.trim().toUpperCase();
739
- if (customerSourceTypeSet.has(normalizedValue)) {
740
- return normalizedValue;
746
+ const normalized = value.trim().toUpperCase();
747
+ if (customerSourceTypeSet.has(normalized)) {
748
+ return normalized;
741
749
  }
742
- return customerSourceTypeAliasMap.get(normalizedValue) ?? null;
750
+ return customerSourceTypeAliasMap.get(normalized) ?? null;
743
751
  }
744
752
  function resolveCustomerContextSearchInput(value) {
745
753
  if (!value.query) {
@@ -898,6 +906,7 @@ export {
898
906
  getCustomerToolContract,
899
907
  isCustomerToolName,
900
908
  normalizeCustomerSourceType,
909
+ notificationProviderValues,
901
910
  notificationSeverityValues,
902
911
  resolveCustomerContextSearchInput,
903
912
  schemaTables,
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_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_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 Slack notification. Use only when the user explicitly asks you to send, post, or notify. The payload is rendered as a Slack code block.\",\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 payload: {\n description:\n \"JSON-compatible payload rendered in Slack as a code block. Serialized size must be 100,000 characters or fewer.\",\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 $ref: \"#/$defs/__schema0\",\n },\n message: {\n description: \"Optional Slack 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 },\n required: [\"title\", \"payload\"],\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 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 \"f619a7dcc1845bc494a193d11e76c6fcee66ecaa2ea60a9a30b51750feb8b11a\" 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 normalizedValue = value.trim().toUpperCase()\n\n if (customerSourceTypeSet.has(normalizedValue)) {\n return normalizedValue as CustomerSourceType\n }\n\n return (\n customerSourceTypeAliasMap.get(normalizedValue as (typeof customerSourceTypeAliases)[number]) ??\n 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;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;AAAA,IACrB,UAAU;AAAA,IACV,aACE;AAAA,IACF,aAAa;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,YAAY;AAAA,QACV,eAAe;AAAA,UACb,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM,CAAC,QAAQ,YAAY,UAAU,YAAY,SAAS;AAAA,QAC5D;AAAA,QACA,mBAAmB;AAAA,UACjB,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM,CAAC,MAAM,OAAO,OAAO,KAAK;AAAA,QAClC;AAAA,QACA,kBAAkB;AAAA,UAChB,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM,CAAC,MAAM,OAAO,OAAO,KAAK;AAAA,QAClC;AAAA,QACA,UAAU;AAAA,UACR,aAAa;AAAA,UACb,MAAM;AAAA,UACN,SAAS;AAAA,QACX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AI,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_get_customer\",\n \"outlit_get_timeline\",\n \"outlit_list_facts\",\n \"outlit_get_fact\",\n \"outlit_get_source\",\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 notificationProviderValues = [\"slack\"] 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_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: notificationProviderValues,\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 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 \"006ce091382509c3224815c4f6ead4c5e78e34f54df281fe8f143811890b04af\" 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;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,6BAA6B,CAAC,OAAO;AAE3C,IAAM,wBAAwB;AAAA,EACnC,uBAAuB;AAAA,IACrB,UAAU;AAAA,IACV,aACE;AAAA,IACF,aAAa;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,YAAY;AAAA,QACV,eAAe;AAAA,UACb,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM,CAAC,QAAQ,YAAY,UAAU,YAAY,SAAS;AAAA,QAC5D;AAAA,QACA,mBAAmB;AAAA,UACjB,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM,CAAC,MAAM,OAAO,OAAO,KAAK;AAAA,QAClC;AAAA,QACA,kBAAkB;AAAA,UAChB,aAAa;AAAA,UACb,MAAM;AAAA,UACN,MAAM,CAAC,MAAM,OAAO,OAAO,KAAK;AAAA,QAClC;AAAA,QACA,UAAU;AAAA,UACR,aAAa;AAAA,UACb,MAAM;AAAA,UACN,SAAS;AAAA,QACX;AAAA,QACA,UAAU;AAAA,UACR,aAAa;AAAA,UACb,MAAM;AAAA,UACN,SAAS;AAAA,QACX;AAAA,QACA,cAAc;AAAA,UACZ,aAAa;AAAA,UACb,MAAM;AAAA,UACN,eAAe;AAAA,YACb,MAAM;AAAA,YACN,SAAS;AAAA,UACX;AAAA,UACA,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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":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@outlit/tools",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "description": "Outlit customer intelligence tool contracts and client helpers",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Outlit AI",