@outlit/tools 0.1.0 → 0.1.2
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 +188 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +121 -20
- package/dist/index.d.ts +121 -20
- package/dist/index.js +183 -21
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
type JsonSchema = {
|
|
2
2
|
readonly [key: string]: unknown;
|
|
3
3
|
};
|
|
4
|
-
declare const customerToolNames: 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"];
|
|
4
|
+
declare const customerToolNames: 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"];
|
|
5
|
+
declare const customerSourceTypes: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET", "OPPORTUNITY"];
|
|
6
|
+
declare const customerSourceTypeAliases: readonly ["CRM", "CRM_OPPORTUNITY"];
|
|
7
|
+
declare const customerSourceTypeInputs: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET", "OPPORTUNITY", "CRM", "CRM_OPPORTUNITY"];
|
|
5
8
|
declare const customerToolContracts: {
|
|
6
9
|
readonly outlit_list_customers: {
|
|
7
10
|
readonly toolName: "outlit_list_customers";
|
|
@@ -204,11 +207,11 @@ declare const customerToolContracts: {
|
|
|
204
207
|
readonly description: "Customer ID or domain";
|
|
205
208
|
};
|
|
206
209
|
readonly channels: {
|
|
207
|
-
readonly description: "Filter by event channel (e.g., EMAIL, SLACK, CALL)";
|
|
210
|
+
readonly description: "Filter by event channel (e.g., EMAIL, SLACK, CALL, CALENDAR)";
|
|
208
211
|
readonly type: "array";
|
|
209
212
|
readonly items: {
|
|
210
213
|
readonly type: "string";
|
|
211
|
-
readonly enum: readonly ["SDK", "EMAIL", "SLACK", "CALL", "CRM", "BILLING", "SUPPORT", "INTERNAL"];
|
|
214
|
+
readonly enum: readonly ["SDK", "EMAIL", "SLACK", "CALL", "CALENDAR", "CRM", "BILLING", "SUPPORT", "INTERNAL"];
|
|
212
215
|
};
|
|
213
216
|
};
|
|
214
217
|
readonly eventTypes: {
|
|
@@ -275,7 +278,7 @@ declare const customerToolContracts: {
|
|
|
275
278
|
readonly type: "array";
|
|
276
279
|
readonly items: {
|
|
277
280
|
readonly type: "string";
|
|
278
|
-
readonly enum: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET"];
|
|
281
|
+
readonly enum: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET", "OPPORTUNITY", "CRM", "CRM_OPPORTUNITY"];
|
|
279
282
|
};
|
|
280
283
|
};
|
|
281
284
|
readonly factTypes: {
|
|
@@ -358,7 +361,7 @@ declare const customerToolContracts: {
|
|
|
358
361
|
readonly properties: {
|
|
359
362
|
readonly sourceType: {
|
|
360
363
|
readonly type: "string";
|
|
361
|
-
readonly enum: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET"];
|
|
364
|
+
readonly enum: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET", "OPPORTUNITY", "CRM", "CRM_OPPORTUNITY"];
|
|
362
365
|
};
|
|
363
366
|
readonly sourceId: {
|
|
364
367
|
readonly type: "string";
|
|
@@ -416,7 +419,7 @@ declare const customerToolContracts: {
|
|
|
416
419
|
readonly type: "array";
|
|
417
420
|
readonly items: {
|
|
418
421
|
readonly type: "string";
|
|
419
|
-
readonly enum: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET"];
|
|
422
|
+
readonly enum: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET", "OPPORTUNITY", "CRM", "CRM_OPPORTUNITY"];
|
|
420
423
|
};
|
|
421
424
|
};
|
|
422
425
|
};
|
|
@@ -426,7 +429,7 @@ declare const customerToolContracts: {
|
|
|
426
429
|
};
|
|
427
430
|
readonly outlit_query: {
|
|
428
431
|
readonly toolName: "outlit_query";
|
|
429
|
-
readonly description: "Execute
|
|
432
|
+
readonly description: "Execute read-only SQL queries against your analytics views.\n\nAvailable views:\n- activity: Customer activity events (event_name, event_type, event_channel, customer_id, occurred_at, properties, ...)\n- customers: Customer attributes (customer_id, domain, name, billing_status, plan, mrr_cents, traits, ...)\n- users: User attributes (user_id, email, name, customer_id, traits, ...)\n- revenue: Revenue snapshots over time (customer_id, snapshot_date, mrr_cents, ...)\n\nAll queries are automatically filtered to your organization's data.\nOnly SELECT queries are allowed.\nProperties and traits are JSON strings; inspect schemas and examples before filtering nested values.\n\nExample queries:\n- SELECT event_name, count(*) FROM activity GROUP BY 1 ORDER BY 2 DESC LIMIT 10\n- SELECT billing_status, sum(mrr_cents)/100 as mrr FROM customers GROUP BY 1\n- SELECT * FROM activity WHERE customer_id = 'cust_123' ORDER BY occurred_at DESC LIMIT 50";
|
|
430
433
|
readonly inputSchema: {
|
|
431
434
|
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
432
435
|
readonly type: "object";
|
|
@@ -438,7 +441,8 @@ declare const customerToolContracts: {
|
|
|
438
441
|
readonly limit: {
|
|
439
442
|
readonly description: "Max rows to return (default 1000, max 10000)";
|
|
440
443
|
readonly default: 1000;
|
|
441
|
-
readonly type: "
|
|
444
|
+
readonly type: "integer";
|
|
445
|
+
readonly minimum: 1;
|
|
442
446
|
readonly maximum: 10000;
|
|
443
447
|
};
|
|
444
448
|
};
|
|
@@ -448,20 +452,113 @@ declare const customerToolContracts: {
|
|
|
448
452
|
};
|
|
449
453
|
readonly outlit_schema: {
|
|
450
454
|
readonly toolName: "outlit_schema";
|
|
451
|
-
readonly description: "Get
|
|
455
|
+
readonly description: "Get schemas for available analytics views.\n\nUse this to discover column names, types, and descriptions before writing SQL queries.\nReturns column definitions and example queries for each view.";
|
|
452
456
|
readonly inputSchema: {
|
|
453
457
|
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
454
458
|
readonly type: "object";
|
|
455
459
|
readonly properties: {
|
|
456
460
|
readonly table: {
|
|
457
|
-
readonly description: "Specific
|
|
461
|
+
readonly description: "Specific analytics view to describe. Omit to list all views.";
|
|
458
462
|
readonly type: "string";
|
|
459
|
-
readonly enum: readonly ["
|
|
463
|
+
readonly enum: readonly ["activity", "customers", "users", "revenue"];
|
|
460
464
|
};
|
|
461
465
|
};
|
|
462
466
|
readonly additionalProperties: false;
|
|
463
467
|
};
|
|
464
468
|
};
|
|
469
|
+
readonly outlit_send_notification: {
|
|
470
|
+
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 inputSchema: {
|
|
473
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
474
|
+
readonly type: "object";
|
|
475
|
+
readonly properties: {
|
|
476
|
+
readonly title: {
|
|
477
|
+
readonly type: "string";
|
|
478
|
+
readonly minLength: 1;
|
|
479
|
+
readonly maxLength: 160;
|
|
480
|
+
readonly description: "Notification title";
|
|
481
|
+
};
|
|
482
|
+
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
|
+
}];
|
|
506
|
+
readonly $ref: "#/$defs/__schema0";
|
|
507
|
+
};
|
|
508
|
+
readonly message: {
|
|
509
|
+
readonly description: "Optional Slack message";
|
|
510
|
+
readonly type: "string";
|
|
511
|
+
readonly minLength: 1;
|
|
512
|
+
readonly maxLength: 1200;
|
|
513
|
+
};
|
|
514
|
+
readonly severity: {
|
|
515
|
+
readonly description: "Optional notification severity";
|
|
516
|
+
readonly type: "string";
|
|
517
|
+
readonly enum: readonly ["low", "medium", "high"];
|
|
518
|
+
};
|
|
519
|
+
readonly source: {
|
|
520
|
+
readonly description: "Optional source label";
|
|
521
|
+
readonly type: "string";
|
|
522
|
+
readonly minLength: 1;
|
|
523
|
+
readonly maxLength: 120;
|
|
524
|
+
};
|
|
525
|
+
readonly subject: {
|
|
526
|
+
readonly description: "Optional subject line";
|
|
527
|
+
readonly type: "string";
|
|
528
|
+
readonly minLength: 1;
|
|
529
|
+
readonly maxLength: 240;
|
|
530
|
+
};
|
|
531
|
+
};
|
|
532
|
+
readonly required: readonly ["title", "payload"];
|
|
533
|
+
readonly additionalProperties: false;
|
|
534
|
+
readonly $defs: {
|
|
535
|
+
readonly __schema0: {
|
|
536
|
+
readonly anyOf: readonly [{
|
|
537
|
+
readonly type: "string";
|
|
538
|
+
}, {
|
|
539
|
+
readonly type: "number";
|
|
540
|
+
}, {
|
|
541
|
+
readonly type: "boolean";
|
|
542
|
+
}, {
|
|
543
|
+
readonly type: "null";
|
|
544
|
+
}, {
|
|
545
|
+
readonly type: "array";
|
|
546
|
+
readonly items: {
|
|
547
|
+
readonly $ref: "#/$defs/__schema0";
|
|
548
|
+
};
|
|
549
|
+
}, {
|
|
550
|
+
readonly type: "object";
|
|
551
|
+
readonly propertyNames: {
|
|
552
|
+
readonly type: "string";
|
|
553
|
+
};
|
|
554
|
+
readonly additionalProperties: {
|
|
555
|
+
readonly $ref: "#/$defs/__schema0";
|
|
556
|
+
};
|
|
557
|
+
}];
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
};
|
|
465
562
|
};
|
|
466
563
|
declare const customerBillingStatuses: readonly ["NONE", "TRIALING", "PAYING", "PAST_DUE", "CHURNED"];
|
|
467
564
|
declare const customerActivityWindows: readonly ["7d", "14d", "30d", "90d"];
|
|
@@ -472,15 +569,17 @@ declare const unsupportedCustomerFactTypes: readonly ["TRACKING_GAP", "SCHEMA_DR
|
|
|
472
569
|
declare const customerFactCategories: readonly ["MEMORY", "CUSTOM"];
|
|
473
570
|
declare const customerListOrderFields: readonly ["last_activity_at", "first_seen_at", "name", "mrr_cents"];
|
|
474
571
|
declare const customerIncludeSections: readonly ["users", "revenue", "recentTimeline", "behaviorMetrics"];
|
|
475
|
-
declare const customerSourceTypes: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET"];
|
|
476
572
|
declare const customerTimeframes: readonly ["7d", "14d", "30d", "90d"];
|
|
477
|
-
declare const
|
|
573
|
+
declare const notificationSeverityValues: readonly ["low", "medium", "high"];
|
|
574
|
+
declare const timelineChannels: readonly ["SDK", "EMAIL", "SLACK", "CALL", "CALENDAR", "CRM", "BILLING", "SUPPORT", "INTERNAL"];
|
|
478
575
|
declare const timelineTimeframes: readonly ["7d", "14d", "30d", "90d", "all"];
|
|
479
576
|
declare const userJourneyStages: readonly ["DISCOVERED", "SIGNED_UP", "ACTIVATED", "ENGAGED", "INACTIVE"];
|
|
480
577
|
declare const userListOrderFields: readonly ["last_activity_at", "first_seen_at", "email"];
|
|
481
|
-
declare const schemaTables: readonly ["
|
|
482
|
-
declare const customerToolContractHash: "
|
|
578
|
+
declare const schemaTables: readonly ["activity", "customers", "users", "revenue"];
|
|
579
|
+
declare const customerToolContractHash: "f619a7dcc1845bc494a193d11e76c6fcee66ecaa2ea60a9a30b51750feb8b11a";
|
|
483
580
|
type CustomerToolName = (typeof customerToolNames)[number];
|
|
581
|
+
type CustomerSourceType = (typeof customerSourceTypes)[number];
|
|
582
|
+
type CustomerSourceTypeInput = (typeof customerSourceTypeInputs)[number];
|
|
484
583
|
type CustomerToolContract = {
|
|
485
584
|
toolName: CustomerToolName;
|
|
486
585
|
description: string;
|
|
@@ -488,6 +587,7 @@ type CustomerToolContract = {
|
|
|
488
587
|
};
|
|
489
588
|
declare function isCustomerToolName(value: string): value is CustomerToolName;
|
|
490
589
|
declare function getCustomerToolContract(name: CustomerToolName): CustomerToolContract;
|
|
590
|
+
declare function normalizeCustomerSourceType(value: string): CustomerSourceType | null;
|
|
491
591
|
type SearchArgsLike = {
|
|
492
592
|
query?: string;
|
|
493
593
|
customer?: string | null;
|
|
@@ -502,7 +602,7 @@ type CustomerContextSearchInput = {
|
|
|
502
602
|
topK?: number;
|
|
503
603
|
after?: string;
|
|
504
604
|
before?: string;
|
|
505
|
-
sourceTypes?:
|
|
605
|
+
sourceTypes?: CustomerSourceType[];
|
|
506
606
|
};
|
|
507
607
|
declare function resolveCustomerContextSearchInput(value: SearchArgsLike): {
|
|
508
608
|
ok: true;
|
|
@@ -526,9 +626,10 @@ type OutlitToolsClient = {
|
|
|
526
626
|
};
|
|
527
627
|
declare function createOutlitClient(options: OutlitToolsClientOptions): OutlitToolsClient;
|
|
528
628
|
|
|
529
|
-
declare const
|
|
629
|
+
declare const actionToolNames: readonly ["outlit_send_notification"];
|
|
630
|
+
declare const defaultAgentToolNames: 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"];
|
|
530
631
|
declare const sqlToolNames: readonly ["outlit_schema", "outlit_query"];
|
|
531
|
-
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_schema", "outlit_query"];
|
|
532
|
-
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"];
|
|
632
|
+
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
|
+
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"];
|
|
533
634
|
|
|
534
|
-
export { type CustomerContextSearchInput, type CustomerToolContract, type CustomerToolName, DEFAULT_OUTLIT_API_URL, type JsonSchema, type OutlitToolsClient, type OutlitToolsClientOptions, type OutlitToolsFetch, type SearchArgsLike, allCustomerToolNames, analyticalAgentToolNames, createOutlitClient, customerActivityWindows, customerBillingStatuses, customerFactCategories, customerFactIncludes, customerFactStatuses, customerFactTypes, customerIncludeSections, customerListOrderFields, customerSourceTypes, customerTimeframes, customerToolContractHash, customerToolContracts, customerToolNames, defaultAgentToolNames, getCustomerToolContract, isCustomerToolName, resolveCustomerContextSearchInput, schemaTables, sqlToolNames, timelineChannels, timelineTimeframes, unsupportedCustomerFactTypes, userJourneyStages, userListOrderFields };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
type JsonSchema = {
|
|
2
2
|
readonly [key: string]: unknown;
|
|
3
3
|
};
|
|
4
|
-
declare const customerToolNames: 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"];
|
|
4
|
+
declare const customerToolNames: 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"];
|
|
5
|
+
declare const customerSourceTypes: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET", "OPPORTUNITY"];
|
|
6
|
+
declare const customerSourceTypeAliases: readonly ["CRM", "CRM_OPPORTUNITY"];
|
|
7
|
+
declare const customerSourceTypeInputs: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET", "OPPORTUNITY", "CRM", "CRM_OPPORTUNITY"];
|
|
5
8
|
declare const customerToolContracts: {
|
|
6
9
|
readonly outlit_list_customers: {
|
|
7
10
|
readonly toolName: "outlit_list_customers";
|
|
@@ -204,11 +207,11 @@ declare const customerToolContracts: {
|
|
|
204
207
|
readonly description: "Customer ID or domain";
|
|
205
208
|
};
|
|
206
209
|
readonly channels: {
|
|
207
|
-
readonly description: "Filter by event channel (e.g., EMAIL, SLACK, CALL)";
|
|
210
|
+
readonly description: "Filter by event channel (e.g., EMAIL, SLACK, CALL, CALENDAR)";
|
|
208
211
|
readonly type: "array";
|
|
209
212
|
readonly items: {
|
|
210
213
|
readonly type: "string";
|
|
211
|
-
readonly enum: readonly ["SDK", "EMAIL", "SLACK", "CALL", "CRM", "BILLING", "SUPPORT", "INTERNAL"];
|
|
214
|
+
readonly enum: readonly ["SDK", "EMAIL", "SLACK", "CALL", "CALENDAR", "CRM", "BILLING", "SUPPORT", "INTERNAL"];
|
|
212
215
|
};
|
|
213
216
|
};
|
|
214
217
|
readonly eventTypes: {
|
|
@@ -275,7 +278,7 @@ declare const customerToolContracts: {
|
|
|
275
278
|
readonly type: "array";
|
|
276
279
|
readonly items: {
|
|
277
280
|
readonly type: "string";
|
|
278
|
-
readonly enum: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET"];
|
|
281
|
+
readonly enum: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET", "OPPORTUNITY", "CRM", "CRM_OPPORTUNITY"];
|
|
279
282
|
};
|
|
280
283
|
};
|
|
281
284
|
readonly factTypes: {
|
|
@@ -358,7 +361,7 @@ declare const customerToolContracts: {
|
|
|
358
361
|
readonly properties: {
|
|
359
362
|
readonly sourceType: {
|
|
360
363
|
readonly type: "string";
|
|
361
|
-
readonly enum: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET"];
|
|
364
|
+
readonly enum: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET", "OPPORTUNITY", "CRM", "CRM_OPPORTUNITY"];
|
|
362
365
|
};
|
|
363
366
|
readonly sourceId: {
|
|
364
367
|
readonly type: "string";
|
|
@@ -416,7 +419,7 @@ declare const customerToolContracts: {
|
|
|
416
419
|
readonly type: "array";
|
|
417
420
|
readonly items: {
|
|
418
421
|
readonly type: "string";
|
|
419
|
-
readonly enum: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET"];
|
|
422
|
+
readonly enum: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET", "OPPORTUNITY", "CRM", "CRM_OPPORTUNITY"];
|
|
420
423
|
};
|
|
421
424
|
};
|
|
422
425
|
};
|
|
@@ -426,7 +429,7 @@ declare const customerToolContracts: {
|
|
|
426
429
|
};
|
|
427
430
|
readonly outlit_query: {
|
|
428
431
|
readonly toolName: "outlit_query";
|
|
429
|
-
readonly description: "Execute
|
|
432
|
+
readonly description: "Execute read-only SQL queries against your analytics views.\n\nAvailable views:\n- activity: Customer activity events (event_name, event_type, event_channel, customer_id, occurred_at, properties, ...)\n- customers: Customer attributes (customer_id, domain, name, billing_status, plan, mrr_cents, traits, ...)\n- users: User attributes (user_id, email, name, customer_id, traits, ...)\n- revenue: Revenue snapshots over time (customer_id, snapshot_date, mrr_cents, ...)\n\nAll queries are automatically filtered to your organization's data.\nOnly SELECT queries are allowed.\nProperties and traits are JSON strings; inspect schemas and examples before filtering nested values.\n\nExample queries:\n- SELECT event_name, count(*) FROM activity GROUP BY 1 ORDER BY 2 DESC LIMIT 10\n- SELECT billing_status, sum(mrr_cents)/100 as mrr FROM customers GROUP BY 1\n- SELECT * FROM activity WHERE customer_id = 'cust_123' ORDER BY occurred_at DESC LIMIT 50";
|
|
430
433
|
readonly inputSchema: {
|
|
431
434
|
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
432
435
|
readonly type: "object";
|
|
@@ -438,7 +441,8 @@ declare const customerToolContracts: {
|
|
|
438
441
|
readonly limit: {
|
|
439
442
|
readonly description: "Max rows to return (default 1000, max 10000)";
|
|
440
443
|
readonly default: 1000;
|
|
441
|
-
readonly type: "
|
|
444
|
+
readonly type: "integer";
|
|
445
|
+
readonly minimum: 1;
|
|
442
446
|
readonly maximum: 10000;
|
|
443
447
|
};
|
|
444
448
|
};
|
|
@@ -448,20 +452,113 @@ declare const customerToolContracts: {
|
|
|
448
452
|
};
|
|
449
453
|
readonly outlit_schema: {
|
|
450
454
|
readonly toolName: "outlit_schema";
|
|
451
|
-
readonly description: "Get
|
|
455
|
+
readonly description: "Get schemas for available analytics views.\n\nUse this to discover column names, types, and descriptions before writing SQL queries.\nReturns column definitions and example queries for each view.";
|
|
452
456
|
readonly inputSchema: {
|
|
453
457
|
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
454
458
|
readonly type: "object";
|
|
455
459
|
readonly properties: {
|
|
456
460
|
readonly table: {
|
|
457
|
-
readonly description: "Specific
|
|
461
|
+
readonly description: "Specific analytics view to describe. Omit to list all views.";
|
|
458
462
|
readonly type: "string";
|
|
459
|
-
readonly enum: readonly ["
|
|
463
|
+
readonly enum: readonly ["activity", "customers", "users", "revenue"];
|
|
460
464
|
};
|
|
461
465
|
};
|
|
462
466
|
readonly additionalProperties: false;
|
|
463
467
|
};
|
|
464
468
|
};
|
|
469
|
+
readonly outlit_send_notification: {
|
|
470
|
+
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 inputSchema: {
|
|
473
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
474
|
+
readonly type: "object";
|
|
475
|
+
readonly properties: {
|
|
476
|
+
readonly title: {
|
|
477
|
+
readonly type: "string";
|
|
478
|
+
readonly minLength: 1;
|
|
479
|
+
readonly maxLength: 160;
|
|
480
|
+
readonly description: "Notification title";
|
|
481
|
+
};
|
|
482
|
+
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
|
+
}];
|
|
506
|
+
readonly $ref: "#/$defs/__schema0";
|
|
507
|
+
};
|
|
508
|
+
readonly message: {
|
|
509
|
+
readonly description: "Optional Slack message";
|
|
510
|
+
readonly type: "string";
|
|
511
|
+
readonly minLength: 1;
|
|
512
|
+
readonly maxLength: 1200;
|
|
513
|
+
};
|
|
514
|
+
readonly severity: {
|
|
515
|
+
readonly description: "Optional notification severity";
|
|
516
|
+
readonly type: "string";
|
|
517
|
+
readonly enum: readonly ["low", "medium", "high"];
|
|
518
|
+
};
|
|
519
|
+
readonly source: {
|
|
520
|
+
readonly description: "Optional source label";
|
|
521
|
+
readonly type: "string";
|
|
522
|
+
readonly minLength: 1;
|
|
523
|
+
readonly maxLength: 120;
|
|
524
|
+
};
|
|
525
|
+
readonly subject: {
|
|
526
|
+
readonly description: "Optional subject line";
|
|
527
|
+
readonly type: "string";
|
|
528
|
+
readonly minLength: 1;
|
|
529
|
+
readonly maxLength: 240;
|
|
530
|
+
};
|
|
531
|
+
};
|
|
532
|
+
readonly required: readonly ["title", "payload"];
|
|
533
|
+
readonly additionalProperties: false;
|
|
534
|
+
readonly $defs: {
|
|
535
|
+
readonly __schema0: {
|
|
536
|
+
readonly anyOf: readonly [{
|
|
537
|
+
readonly type: "string";
|
|
538
|
+
}, {
|
|
539
|
+
readonly type: "number";
|
|
540
|
+
}, {
|
|
541
|
+
readonly type: "boolean";
|
|
542
|
+
}, {
|
|
543
|
+
readonly type: "null";
|
|
544
|
+
}, {
|
|
545
|
+
readonly type: "array";
|
|
546
|
+
readonly items: {
|
|
547
|
+
readonly $ref: "#/$defs/__schema0";
|
|
548
|
+
};
|
|
549
|
+
}, {
|
|
550
|
+
readonly type: "object";
|
|
551
|
+
readonly propertyNames: {
|
|
552
|
+
readonly type: "string";
|
|
553
|
+
};
|
|
554
|
+
readonly additionalProperties: {
|
|
555
|
+
readonly $ref: "#/$defs/__schema0";
|
|
556
|
+
};
|
|
557
|
+
}];
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
};
|
|
465
562
|
};
|
|
466
563
|
declare const customerBillingStatuses: readonly ["NONE", "TRIALING", "PAYING", "PAST_DUE", "CHURNED"];
|
|
467
564
|
declare const customerActivityWindows: readonly ["7d", "14d", "30d", "90d"];
|
|
@@ -472,15 +569,17 @@ declare const unsupportedCustomerFactTypes: readonly ["TRACKING_GAP", "SCHEMA_DR
|
|
|
472
569
|
declare const customerFactCategories: readonly ["MEMORY", "CUSTOM"];
|
|
473
570
|
declare const customerListOrderFields: readonly ["last_activity_at", "first_seen_at", "name", "mrr_cents"];
|
|
474
571
|
declare const customerIncludeSections: readonly ["users", "revenue", "recentTimeline", "behaviorMetrics"];
|
|
475
|
-
declare const customerSourceTypes: readonly ["EMAIL", "CALL", "CALENDAR_EVENT", "SUPPORT_TICKET"];
|
|
476
572
|
declare const customerTimeframes: readonly ["7d", "14d", "30d", "90d"];
|
|
477
|
-
declare const
|
|
573
|
+
declare const notificationSeverityValues: readonly ["low", "medium", "high"];
|
|
574
|
+
declare const timelineChannels: readonly ["SDK", "EMAIL", "SLACK", "CALL", "CALENDAR", "CRM", "BILLING", "SUPPORT", "INTERNAL"];
|
|
478
575
|
declare const timelineTimeframes: readonly ["7d", "14d", "30d", "90d", "all"];
|
|
479
576
|
declare const userJourneyStages: readonly ["DISCOVERED", "SIGNED_UP", "ACTIVATED", "ENGAGED", "INACTIVE"];
|
|
480
577
|
declare const userListOrderFields: readonly ["last_activity_at", "first_seen_at", "email"];
|
|
481
|
-
declare const schemaTables: readonly ["
|
|
482
|
-
declare const customerToolContractHash: "
|
|
578
|
+
declare const schemaTables: readonly ["activity", "customers", "users", "revenue"];
|
|
579
|
+
declare const customerToolContractHash: "f619a7dcc1845bc494a193d11e76c6fcee66ecaa2ea60a9a30b51750feb8b11a";
|
|
483
580
|
type CustomerToolName = (typeof customerToolNames)[number];
|
|
581
|
+
type CustomerSourceType = (typeof customerSourceTypes)[number];
|
|
582
|
+
type CustomerSourceTypeInput = (typeof customerSourceTypeInputs)[number];
|
|
484
583
|
type CustomerToolContract = {
|
|
485
584
|
toolName: CustomerToolName;
|
|
486
585
|
description: string;
|
|
@@ -488,6 +587,7 @@ type CustomerToolContract = {
|
|
|
488
587
|
};
|
|
489
588
|
declare function isCustomerToolName(value: string): value is CustomerToolName;
|
|
490
589
|
declare function getCustomerToolContract(name: CustomerToolName): CustomerToolContract;
|
|
590
|
+
declare function normalizeCustomerSourceType(value: string): CustomerSourceType | null;
|
|
491
591
|
type SearchArgsLike = {
|
|
492
592
|
query?: string;
|
|
493
593
|
customer?: string | null;
|
|
@@ -502,7 +602,7 @@ type CustomerContextSearchInput = {
|
|
|
502
602
|
topK?: number;
|
|
503
603
|
after?: string;
|
|
504
604
|
before?: string;
|
|
505
|
-
sourceTypes?:
|
|
605
|
+
sourceTypes?: CustomerSourceType[];
|
|
506
606
|
};
|
|
507
607
|
declare function resolveCustomerContextSearchInput(value: SearchArgsLike): {
|
|
508
608
|
ok: true;
|
|
@@ -526,9 +626,10 @@ type OutlitToolsClient = {
|
|
|
526
626
|
};
|
|
527
627
|
declare function createOutlitClient(options: OutlitToolsClientOptions): OutlitToolsClient;
|
|
528
628
|
|
|
529
|
-
declare const
|
|
629
|
+
declare const actionToolNames: readonly ["outlit_send_notification"];
|
|
630
|
+
declare const defaultAgentToolNames: 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"];
|
|
530
631
|
declare const sqlToolNames: readonly ["outlit_schema", "outlit_query"];
|
|
531
|
-
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_schema", "outlit_query"];
|
|
532
|
-
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"];
|
|
632
|
+
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
|
+
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"];
|
|
533
634
|
|
|
534
|
-
export { type CustomerContextSearchInput, type CustomerToolContract, type CustomerToolName, DEFAULT_OUTLIT_API_URL, type JsonSchema, type OutlitToolsClient, type OutlitToolsClientOptions, type OutlitToolsFetch, type SearchArgsLike, allCustomerToolNames, analyticalAgentToolNames, createOutlitClient, customerActivityWindows, customerBillingStatuses, customerFactCategories, customerFactIncludes, customerFactStatuses, customerFactTypes, customerIncludeSections, customerListOrderFields, customerSourceTypes, customerTimeframes, customerToolContractHash, customerToolContracts, customerToolNames, defaultAgentToolNames, getCustomerToolContract, isCustomerToolName, resolveCustomerContextSearchInput, schemaTables, sqlToolNames, timelineChannels, timelineTimeframes, unsupportedCustomerFactTypes, userJourneyStages, userListOrderFields };
|
|
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 };
|