@ganju/utils 0.0.10 → 0.0.12

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.d.ts CHANGED
@@ -18,7 +18,7 @@ import type { SyncableResource, ResourceSyncProvider } from './syncableResource'
18
18
  import type { CustomCodeProject, ProjectPathIssue } from './customCodeProject';
19
19
  import type { AttachmentResource, ResolvedAttachment, ResolveAttachmentResult } from './attachment';
20
20
  import type { MintedAccessToken } from './accessToken';
21
- import type { CatalogGroup, CatalogTool, CatalogToolDescriptor, ToolGroupKey, ToolKey } from './toolCatalog';
21
+ import type { CatalogGroup, CatalogTool, CatalogToolDescriptor, ToolAnnotations, ToolGroupKey, ToolKey } from './toolCatalog';
22
22
  import type { Separator, ChunkMetadata, PreparedChunk } from './chunking';
23
23
  import type { RerankAiBinding } from './resourceRerank';
24
24
  import type { RateLimitRetryOptions } from './retry';
@@ -26,6 +26,8 @@ import type { QueueBatchLike, QueueMessageLike, ProcessQueueBatchHandlers } from
26
26
  import type { ExtractedDocument, ExtractedDocumentMetadata, ExtractedDocumentSource } from './extractedDocument';
27
27
  import type { ChannelNotifier, ToolStatusEvent } from './channelNotifier';
28
28
  import type { BufferedChannelMessage, BufferedChannelCommand, ChannelBufferEnvelope, ChannelBufferFlush } from './channelDebounce';
29
+ import type { PendingToolConfirmation, PendingToolConfirmations, ToolEffect } from './toolConfirmation';
30
+ import type { LintableTool, ToolLintFinding, ToolLintOptions, ToolLintRule } from './toolLint';
29
31
  import type { Source, ResourceUrlContext, SourceButton } from './sources';
30
32
  import { OAuthReauthRequiredError } from './oauth';
31
33
  import type { RefreshOAuthTokenInput, RefreshedOAuthToken } from './oauth';
@@ -54,7 +56,8 @@ export declare const utils: {
54
56
  ORGANIZATION_UPDATE: import("zod").ZodObject<{
55
57
  id: import("zod").ZodUUID;
56
58
  userId: import("zod").ZodUUID;
57
- name: import("zod").ZodString;
59
+ name: import("zod").ZodOptional<import("zod").ZodString>;
60
+ requireToolConfirmation: import("zod").ZodOptional<import("zod").ZodBoolean>;
58
61
  }, import("zod/v4/core").$strip>;
59
62
  ORGANIZATION_GET: import("zod").ZodObject<{
60
63
  id: import("zod").ZodUUID;
@@ -1067,6 +1070,11 @@ export declare const utils: {
1067
1070
  jsonPath: import("zod").ZodOptional<import("zod").ZodString>;
1068
1071
  successStatus: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber>>;
1069
1072
  }, import("zod/v4/core").$strip>>;
1073
+ effect: import("zod").ZodOptional<import("zod").ZodEnum<{
1074
+ read: "read";
1075
+ write: "write";
1076
+ sensitive: "sensitive";
1077
+ }>>;
1070
1078
  auth: import("zod").ZodDefault<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1071
1079
  kind: import("zod").ZodLiteral<"none">;
1072
1080
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
@@ -1155,6 +1163,7 @@ export declare const utils: {
1155
1163
  pattern?: string | undefined;
1156
1164
  enum?: any[] | undefined;
1157
1165
  } | undefined;
1166
+ effect?: "read" | "write" | "sensitive" | undefined;
1158
1167
  allowedHosts?: string[] | undefined;
1159
1168
  }, {
1160
1169
  name: string;
@@ -1222,6 +1231,7 @@ export declare const utils: {
1222
1231
  pattern?: string | undefined;
1223
1232
  enum?: any[] | undefined;
1224
1233
  } | undefined;
1234
+ effect?: "read" | "write" | "sensitive" | undefined;
1225
1235
  allowedHosts?: string[] | undefined;
1226
1236
  }>>;
1227
1237
  HTTP_ENDPOINT_CONFIG_WRITE: import("zod").ZodPipe<import("zod").ZodObject<{
@@ -1291,6 +1301,11 @@ export declare const utils: {
1291
1301
  jsonPath: import("zod").ZodOptional<import("zod").ZodString>;
1292
1302
  successStatus: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber>>;
1293
1303
  }, import("zod/v4/core").$strip>>;
1304
+ effect: import("zod").ZodOptional<import("zod").ZodEnum<{
1305
+ read: "read";
1306
+ write: "write";
1307
+ sensitive: "sensitive";
1308
+ }>>;
1294
1309
  auth: import("zod").ZodDefault<import("zod").ZodDiscriminatedUnion<[import("zod").ZodObject<{
1295
1310
  kind: import("zod").ZodLiteral<"none">;
1296
1311
  }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
@@ -1379,6 +1394,7 @@ export declare const utils: {
1379
1394
  pattern?: string | undefined;
1380
1395
  enum?: any[] | undefined;
1381
1396
  } | undefined;
1397
+ effect?: "read" | "write" | "sensitive" | undefined;
1382
1398
  allowedHosts?: string[] | undefined;
1383
1399
  }, {
1384
1400
  name: string;
@@ -1446,6 +1462,7 @@ export declare const utils: {
1446
1462
  pattern?: string | undefined;
1447
1463
  enum?: any[] | undefined;
1448
1464
  } | undefined;
1465
+ effect?: "read" | "write" | "sensitive" | undefined;
1449
1466
  allowedHosts?: string[] | undefined;
1450
1467
  }>>;
1451
1468
  MCP_PROXY_CONFIG: import("zod").ZodObject<{
@@ -1528,7 +1545,19 @@ export declare const utils: {
1528
1545
  pattern: import("zod").ZodOptional<import("zod").ZodString>;
1529
1546
  enum: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodAny>>;
1530
1547
  }, import("zod/v4/core").$strip>>;
1531
- }, import("zod/v4/core").$strip>;
1548
+ annotations: import("zod").ZodOptional<import("zod").ZodObject<{
1549
+ readOnlyHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1550
+ destructiveHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1551
+ idempotentHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1552
+ openWorldHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1553
+ }, import("zod/v4/core").$strict>>;
1554
+ }, import("zod/v4/core").$strip>;
1555
+ TOOL_ANNOTATIONS: import("zod").ZodObject<{
1556
+ readOnlyHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1557
+ destructiveHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1558
+ idempotentHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1559
+ openWorldHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1560
+ }, import("zod/v4/core").$strict>;
1532
1561
  CUSTOM_CODE_MANIFEST: import("zod").ZodObject<{
1533
1562
  tools: import("zod").ZodArray<import("zod").ZodObject<{
1534
1563
  name: import("zod").ZodString;
@@ -1562,6 +1591,12 @@ export declare const utils: {
1562
1591
  pattern: import("zod").ZodOptional<import("zod").ZodString>;
1563
1592
  enum: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodAny>>;
1564
1593
  }, import("zod/v4/core").$strip>>;
1594
+ annotations: import("zod").ZodOptional<import("zod").ZodObject<{
1595
+ readOnlyHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1596
+ destructiveHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1597
+ idempotentHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1598
+ openWorldHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1599
+ }, import("zod/v4/core").$strict>>;
1565
1600
  }, import("zod/v4/core").$strip>>;
1566
1601
  }, import("zod/v4/core").$strip>;
1567
1602
  ARTIFACT_CUSTOM_CODE_CREATE_VERSION: import("zod").ZodObject<{
@@ -1598,6 +1633,12 @@ export declare const utils: {
1598
1633
  pattern: import("zod").ZodOptional<import("zod").ZodString>;
1599
1634
  enum: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodAny>>;
1600
1635
  }, import("zod/v4/core").$strip>>;
1636
+ annotations: import("zod").ZodOptional<import("zod").ZodObject<{
1637
+ readOnlyHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1638
+ destructiveHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1639
+ idempotentHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1640
+ openWorldHint: import("zod").ZodOptional<import("zod").ZodBoolean>;
1641
+ }, import("zod/v4/core").$strict>>;
1601
1642
  }, import("zod/v4/core").$strip>>;
1602
1643
  }, import("zod/v4/core").$strip>;
1603
1644
  config: import("zod").ZodOptional<import("zod").ZodObject<{
@@ -2049,6 +2090,7 @@ export declare const utils: {
2049
2090
  };
2050
2091
  RESOURCE_SYNC_BATCH_SIZE: number;
2051
2092
  RESOURCE_SYNC_MANUAL_COOLDOWN_MS: number;
2093
+ RESOURCE_SYNC_STALE_MS: number;
2052
2094
  CRAWL_RENDERER_CHEERIO: "cheerio";
2053
2095
  CRAWL_RENDERER_PLAYWRIGHT: "playwright";
2054
2096
  CRAWL_RENDERERS: ("cheerio" | "playwright")[];
@@ -2111,6 +2153,14 @@ export declare const utils: {
2111
2153
  SHARED_KEY_HISTORY_LIMIT: number;
2112
2154
  SHARED_KEY_MAX_TOOL_LOOPS: number;
2113
2155
  CHANNEL_MAX_TOOLS: number;
2156
+ TOOL_CONFIRMATION_TTL_MS: number;
2157
+ TOOL_CONFIRMATION_REQUIRED_RESULT: string;
2158
+ TOOL_CONFIRMATION_FALLBACK_QUESTION: string;
2159
+ TOOL_CONFIRMATION_ASK_INSTRUCTION: string;
2160
+ TOOL_CONFIRMATION_SYSTEM_NOTE: string;
2161
+ MCP_TOOL_CONFIRMATION_TTL_MS: number;
2162
+ MCP_TOOL_CONFIRMATION_ARG: string;
2163
+ MCP_TOOL_CONFIRMATION_ARG_DESCRIPTION: string;
2114
2164
  CHANNEL_DEBOUNCE_DEFAULT_MS: number;
2115
2165
  CHANNEL_DEBOUNCE_MIN_MS: number;
2116
2166
  CHANNEL_DEBOUNCE_MAX_MS: number;
@@ -2143,8 +2193,10 @@ export declare const utils: {
2143
2193
  DISCORD_TIMESTAMP_HEADER: string;
2144
2194
  DISCORD_INTERACTION_TYPE_PING: number;
2145
2195
  DISCORD_INTERACTION_TYPE_APPLICATION_COMMAND: number;
2196
+ DISCORD_INTERACTION_TYPE_MESSAGE_COMPONENT: number;
2146
2197
  DISCORD_INTERACTION_RESPONSE_PONG: number;
2147
2198
  DISCORD_INTERACTION_RESPONSE_DEFERRED: number;
2199
+ DISCORD_INTERACTION_RESPONSE_UPDATE_MESSAGE: number;
2148
2200
  DISCORD_CHANNEL_TYPE_DM: number;
2149
2201
  DISCORD_CHANNEL_TYPE_GROUP_DM: number;
2150
2202
  DISCORD_GATEWAY_OP_DISPATCH: number;
@@ -2159,6 +2211,7 @@ export declare const utils: {
2159
2211
  WHATSAPP_API_BASE: string;
2160
2212
  WHATSAPP_API_VERSION: string;
2161
2213
  WHATSAPP_MESSAGE_LIMIT: number;
2214
+ WHATSAPP_INTERACTIVE_BODY_LIMIT: number;
2162
2215
  WHATSAPP_SIGNATURE_HEADER: string;
2163
2216
  WHATSAPP_SIGNATURE_PREFIX: string;
2164
2217
  WHATSAPP_HUB_MODE_PARAM: string;
@@ -2458,6 +2511,11 @@ export declare const utils: {
2458
2511
  resolveAttachment: (resource: AttachmentResource, readObject: (key: string) => Promise<ArrayBuffer | null>, verb?: "attach" | "upload") => Promise<ResolveAttachmentResult>;
2459
2512
  isExposedResource: (resource: ExposableResource) => boolean;
2460
2513
  isSyncableResource: (resource: SyncableResource) => boolean;
2514
+ isResourceSyncInProgress: (resource: {
2515
+ status: string;
2516
+ syncStartedAt?: Date | string | null;
2517
+ createdAt: Date | string;
2518
+ }, now?: number) => boolean;
2461
2519
  resourceSyncProvider: (resource: SyncableResource) => ResourceSyncProvider | null;
2462
2520
  describeVendorError: (body: unknown, fallback: string) => string;
2463
2521
  withDeadline: <T>(work: Promise<T>, ms: number) => Promise<T>;
@@ -2501,91 +2559,109 @@ export declare const utils: {
2501
2559
  readonly title: "Batch Modify Labels";
2502
2560
  readonly description: "Add or remove labels on many emails at once (archive, mark read, etc.).";
2503
2561
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.modify";
2562
+ readonly annotations: ToolAnnotations;
2504
2563
  }, {
2505
2564
  readonly key: "gmail-create-draft";
2506
2565
  readonly title: "Create Draft";
2507
2566
  readonly description: "Save a new draft in Gmail without sending it yet.";
2508
2567
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.compose";
2568
+ readonly annotations: ToolAnnotations;
2509
2569
  }, {
2510
2570
  readonly key: "gmail-delete-draft";
2511
2571
  readonly title: "Delete Draft";
2512
2572
  readonly description: "Permanently delete a draft.";
2513
2573
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.compose";
2574
+ readonly annotations: ToolAnnotations;
2514
2575
  }, {
2515
2576
  readonly key: "gmail-forward-email";
2516
2577
  readonly title: "Forward Email";
2517
2578
  readonly description: "Forward an email to a new recipient.";
2518
2579
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.send";
2580
+ readonly annotations: ToolAnnotations;
2519
2581
  }, {
2520
2582
  readonly key: "gmail-get-draft";
2521
2583
  readonly title: "Get Draft";
2522
2584
  readonly description: "Open a saved draft to review its contents.";
2523
2585
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.compose";
2586
+ readonly annotations: ToolAnnotations;
2524
2587
  }, {
2525
2588
  readonly key: "gmail-get-profile";
2526
2589
  readonly title: "Get Profile";
2527
2590
  readonly description: "Show the email address and inbox stats for the connected Gmail account.";
2528
2591
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.readonly";
2592
+ readonly annotations: ToolAnnotations;
2529
2593
  }, {
2530
2594
  readonly key: "gmail-get-thread";
2531
2595
  readonly title: "Get Thread";
2532
2596
  readonly description: "See every message inside one conversation.";
2533
2597
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.readonly";
2598
+ readonly annotations: ToolAnnotations;
2534
2599
  }, {
2535
2600
  readonly key: "gmail-list-drafts";
2536
2601
  readonly title: "List Drafts";
2537
2602
  readonly description: "Browse your saved drafts.";
2538
2603
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.compose";
2604
+ readonly annotations: ToolAnnotations;
2539
2605
  }, {
2540
2606
  readonly key: "gmail-list-emails";
2541
2607
  readonly title: "List Emails";
2542
2608
  readonly description: "Browse your Gmail inbox, with optional search filters.";
2543
2609
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.readonly";
2610
+ readonly annotations: ToolAnnotations;
2544
2611
  }, {
2545
2612
  readonly key: "gmail-list-labels";
2546
2613
  readonly title: "List Labels";
2547
2614
  readonly description: "See all of your Gmail labels and folders.";
2548
2615
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.labels";
2616
+ readonly annotations: ToolAnnotations;
2549
2617
  }, {
2550
2618
  readonly key: "gmail-list-threads";
2551
2619
  readonly title: "List Threads";
2552
2620
  readonly description: "List your Gmail conversations.";
2553
2621
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.readonly";
2622
+ readonly annotations: ToolAnnotations;
2554
2623
  }, {
2555
2624
  readonly key: "gmail-modify-labels";
2556
2625
  readonly title: "Modify Labels";
2557
2626
  readonly description: "Add or remove labels on a single email — archive it, mark it read, star it, and more.";
2558
2627
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.modify";
2628
+ readonly annotations: ToolAnnotations;
2559
2629
  }, {
2560
2630
  readonly key: "gmail-read-email";
2561
2631
  readonly title: "Read Email";
2562
2632
  readonly description: "Open and read a specific email.";
2563
2633
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.readonly";
2634
+ readonly annotations: ToolAnnotations;
2564
2635
  }, {
2565
2636
  readonly key: "gmail-reply-email";
2566
2637
  readonly title: "Reply Email";
2567
2638
  readonly description: "Reply to an email so the response stays in the same conversation.";
2568
2639
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.send";
2640
+ readonly annotations: ToolAnnotations;
2569
2641
  }, {
2570
2642
  readonly key: "gmail-send-draft";
2571
2643
  readonly title: "Send Draft";
2572
2644
  readonly description: "Send a draft you've already saved.";
2573
2645
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.send";
2646
+ readonly annotations: ToolAnnotations;
2574
2647
  }, {
2575
2648
  readonly key: "gmail-send-email";
2576
2649
  readonly title: "Send Email";
2577
2650
  readonly description: "Compose and send a new email from your connected Gmail account.";
2578
2651
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.send";
2652
+ readonly annotations: ToolAnnotations;
2579
2653
  }, {
2580
2654
  readonly key: "gmail-trash-email";
2581
2655
  readonly title: "Move to Trash";
2582
2656
  readonly description: "Move an email to Trash. It stays recoverable for 30 days.";
2583
2657
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.modify";
2658
+ readonly annotations: ToolAnnotations;
2584
2659
  }, {
2585
2660
  readonly key: "gmail-update-draft";
2586
2661
  readonly title: "Update Draft";
2587
2662
  readonly description: "Edit the contents of a saved draft.";
2588
2663
  readonly requiredScopes: "https://www.googleapis.com/auth/gmail.compose";
2664
+ readonly annotations: ToolAnnotations;
2589
2665
  }];
2590
2666
  }, {
2591
2667
  readonly key: "outlook";
@@ -2598,91 +2674,109 @@ export declare const utils: {
2598
2674
  readonly title: "Batch Move Messages";
2599
2675
  readonly description: "Move up to 20 messages to the same folder.";
2600
2676
  readonly requiredScopes: "https://graph.microsoft.com/Mail.ReadWrite";
2677
+ readonly annotations: ToolAnnotations;
2601
2678
  }, {
2602
2679
  readonly key: "outlook-create-draft";
2603
2680
  readonly title: "Create Draft";
2604
2681
  readonly description: "Create a draft email saved in Drafts.";
2605
2682
  readonly requiredScopes: "https://graph.microsoft.com/Mail.ReadWrite";
2683
+ readonly annotations: ToolAnnotations;
2606
2684
  }, {
2607
2685
  readonly key: "outlook-delete-draft";
2608
2686
  readonly title: "Delete Draft";
2609
2687
  readonly description: "Permanently delete a draft.";
2610
2688
  readonly requiredScopes: "https://graph.microsoft.com/Mail.ReadWrite";
2689
+ readonly annotations: ToolAnnotations;
2611
2690
  }, {
2612
2691
  readonly key: "outlook-forward-email";
2613
2692
  readonly title: "Forward";
2614
2693
  readonly description: "Forward an existing message to a new recipient.";
2615
2694
  readonly requiredScopes: "https://graph.microsoft.com/Mail.Send";
2695
+ readonly annotations: ToolAnnotations;
2616
2696
  }, {
2617
2697
  readonly key: "outlook-get-draft";
2618
2698
  readonly title: "Get Draft";
2619
2699
  readonly description: "Read the full contents of a draft.";
2620
2700
  readonly requiredScopes: "https://graph.microsoft.com/Mail.Read";
2701
+ readonly annotations: ToolAnnotations;
2621
2702
  }, {
2622
2703
  readonly key: "outlook-get-profile";
2623
2704
  readonly title: "Get Profile";
2624
2705
  readonly description: "Get the connected account's profile and inbox totals.";
2625
2706
  readonly requiredScopes: "https://graph.microsoft.com/User.Read";
2707
+ readonly annotations: ToolAnnotations;
2626
2708
  }, {
2627
2709
  readonly key: "outlook-get-thread";
2628
2710
  readonly title: "Get Thread";
2629
2711
  readonly description: "Get summaries of every message in a conversation.";
2630
2712
  readonly requiredScopes: "https://graph.microsoft.com/Mail.Read";
2713
+ readonly annotations: ToolAnnotations;
2631
2714
  }, {
2632
2715
  readonly key: "outlook-list-drafts";
2633
2716
  readonly title: "List Drafts";
2634
2717
  readonly description: "List drafts in the Drafts folder.";
2635
2718
  readonly requiredScopes: "https://graph.microsoft.com/Mail.Read";
2719
+ readonly annotations: ToolAnnotations;
2636
2720
  }, {
2637
2721
  readonly key: "outlook-list-emails";
2638
2722
  readonly title: "List Emails";
2639
2723
  readonly description: "List inbox messages, optionally filtered by search.";
2640
2724
  readonly requiredScopes: "https://graph.microsoft.com/Mail.Read";
2725
+ readonly annotations: ToolAnnotations;
2641
2726
  }, {
2642
2727
  readonly key: "outlook-list-folders";
2643
2728
  readonly title: "List Folders";
2644
2729
  readonly description: "List every mail folder on the account.";
2645
2730
  readonly requiredScopes: "https://graph.microsoft.com/Mail.Read";
2731
+ readonly annotations: ToolAnnotations;
2646
2732
  }, {
2647
2733
  readonly key: "outlook-list-threads";
2648
2734
  readonly title: "List Threads";
2649
2735
  readonly description: "List inbox conversation threads.";
2650
2736
  readonly requiredScopes: "https://graph.microsoft.com/Mail.Read";
2737
+ readonly annotations: ToolAnnotations;
2651
2738
  }, {
2652
2739
  readonly key: "outlook-move-message";
2653
2740
  readonly title: "Move Message";
2654
2741
  readonly description: "Move a message to a different folder.";
2655
2742
  readonly requiredScopes: "https://graph.microsoft.com/Mail.ReadWrite";
2743
+ readonly annotations: ToolAnnotations;
2656
2744
  }, {
2657
2745
  readonly key: "outlook-read-email";
2658
2746
  readonly title: "Read Email";
2659
2747
  readonly description: "Read the full contents of one message by ID.";
2660
2748
  readonly requiredScopes: "https://graph.microsoft.com/Mail.Read";
2749
+ readonly annotations: ToolAnnotations;
2661
2750
  }, {
2662
2751
  readonly key: "outlook-reply-email";
2663
2752
  readonly title: "Reply";
2664
2753
  readonly description: "Reply to an existing message, preserving the conversation.";
2665
2754
  readonly requiredScopes: "https://graph.microsoft.com/Mail.Send";
2755
+ readonly annotations: ToolAnnotations;
2666
2756
  }, {
2667
2757
  readonly key: "outlook-send-draft";
2668
2758
  readonly title: "Send Draft";
2669
2759
  readonly description: "Send an existing draft as-is.";
2670
2760
  readonly requiredScopes: "https://graph.microsoft.com/Mail.Send";
2761
+ readonly annotations: ToolAnnotations;
2671
2762
  }, {
2672
2763
  readonly key: "outlook-send-email";
2673
2764
  readonly title: "Send Email";
2674
2765
  readonly description: "Send a brand-new email from the connected account.";
2675
2766
  readonly requiredScopes: "https://graph.microsoft.com/Mail.Send";
2767
+ readonly annotations: ToolAnnotations;
2676
2768
  }, {
2677
2769
  readonly key: "outlook-trash-email";
2678
2770
  readonly title: "Move to Trash";
2679
2771
  readonly description: "Move a message to the Deleted Items folder.";
2680
2772
  readonly requiredScopes: "https://graph.microsoft.com/Mail.ReadWrite";
2773
+ readonly annotations: ToolAnnotations;
2681
2774
  }, {
2682
2775
  readonly key: "outlook-update-draft";
2683
2776
  readonly title: "Update Draft";
2684
2777
  readonly description: "Replace the contents of an existing draft.";
2685
2778
  readonly requiredScopes: "https://graph.microsoft.com/Mail.ReadWrite";
2779
+ readonly annotations: ToolAnnotations;
2686
2780
  }];
2687
2781
  }, {
2688
2782
  readonly key: "slack";
@@ -2695,21 +2789,25 @@ export declare const utils: {
2695
2789
  readonly title: "Get User";
2696
2790
  readonly description: "Look up a Slack user by ID or email.";
2697
2791
  readonly requiredScopes: "users:read,users:read.email";
2792
+ readonly annotations: ToolAnnotations;
2698
2793
  }, {
2699
2794
  readonly key: "slack-list-channels";
2700
2795
  readonly title: "List Channels";
2701
2796
  readonly description: "Browse the channels and DMs the agent can see.";
2702
2797
  readonly requiredScopes: "channels:read,groups:read,mpim:read,im:read";
2798
+ readonly annotations: ToolAnnotations;
2703
2799
  }, {
2704
2800
  readonly key: "slack-send-message";
2705
2801
  readonly title: "Send Message";
2706
2802
  readonly description: "Post a message to a Slack channel, DM, or thread.";
2707
2803
  readonly requiredScopes: "chat:write";
2804
+ readonly annotations: ToolAnnotations;
2708
2805
  }, {
2709
2806
  readonly key: "slack-upload-file";
2710
2807
  readonly title: "Upload File";
2711
2808
  readonly description: "Upload a stored resource into a Slack channel.";
2712
2809
  readonly requiredScopes: "files:write,chat:write";
2810
+ readonly annotations: ToolAnnotations;
2713
2811
  }];
2714
2812
  }, {
2715
2813
  readonly key: "slack-user";
@@ -2722,6 +2820,7 @@ export declare const utils: {
2722
2820
  readonly title: "Search Messages";
2723
2821
  readonly description: "Search messages across the workspace. Requires a Slack user token (xoxp).";
2724
2822
  readonly requiredScopes: "search:read";
2823
+ readonly annotations: ToolAnnotations;
2725
2824
  }];
2726
2825
  }, {
2727
2826
  readonly key: "google-calendar";
@@ -2734,31 +2833,37 @@ export declare const utils: {
2734
2833
  readonly title: "Create Event";
2735
2834
  readonly description: "Add a new event to a calendar.";
2736
2835
  readonly requiredScopes: "https://www.googleapis.com/auth/calendar.events";
2836
+ readonly annotations: ToolAnnotations;
2737
2837
  }, {
2738
2838
  readonly key: "calendar-delete-event";
2739
2839
  readonly title: "Delete Event";
2740
2840
  readonly description: "Permanently remove an event from a calendar.";
2741
2841
  readonly requiredScopes: "https://www.googleapis.com/auth/calendar.events";
2842
+ readonly annotations: ToolAnnotations;
2742
2843
  }, {
2743
2844
  readonly key: "calendar-find-free-slots";
2744
2845
  readonly title: "Find Free Slots";
2745
2846
  readonly description: "Find open time gaps on a calendar.";
2746
2847
  readonly requiredScopes: "https://www.googleapis.com/auth/calendar.readonly";
2848
+ readonly annotations: ToolAnnotations;
2747
2849
  }, {
2748
2850
  readonly key: "calendar-list-calendars";
2749
2851
  readonly title: "List Calendars";
2750
2852
  readonly description: "See all calendars on the connected Google account.";
2751
2853
  readonly requiredScopes: "https://www.googleapis.com/auth/calendar.readonly";
2854
+ readonly annotations: ToolAnnotations;
2752
2855
  }, {
2753
2856
  readonly key: "calendar-list-events";
2754
2857
  readonly title: "List Events";
2755
2858
  readonly description: "Browse events on a calendar within a time range.";
2756
2859
  readonly requiredScopes: "https://www.googleapis.com/auth/calendar.readonly";
2860
+ readonly annotations: ToolAnnotations;
2757
2861
  }, {
2758
2862
  readonly key: "calendar-update-event";
2759
2863
  readonly title: "Update Event";
2760
2864
  readonly description: "Change the details of an existing event.";
2761
2865
  readonly requiredScopes: "https://www.googleapis.com/auth/calendar.events";
2866
+ readonly annotations: ToolAnnotations;
2762
2867
  }];
2763
2868
  }, {
2764
2869
  readonly key: "calcom";
@@ -2771,21 +2876,25 @@ export declare const utils: {
2771
2876
  readonly title: "Cancel Booking";
2772
2877
  readonly description: "Cancel an existing booking by its UID.";
2773
2878
  readonly requiredScopes: null;
2879
+ readonly annotations: ToolAnnotations;
2774
2880
  }, {
2775
2881
  readonly key: "calcom-create-booking";
2776
2882
  readonly title: "Create Booking";
2777
2883
  readonly description: "Book an available slot for an attendee.";
2778
2884
  readonly requiredScopes: null;
2885
+ readonly annotations: ToolAnnotations;
2779
2886
  }, {
2780
2887
  readonly key: "calcom-list-available-slots";
2781
2888
  readonly title: "List Available Slots";
2782
2889
  readonly description: "Find open booking times for an event type in a date range.";
2783
2890
  readonly requiredScopes: null;
2891
+ readonly annotations: ToolAnnotations;
2784
2892
  }, {
2785
2893
  readonly key: "calcom-list-event-types";
2786
2894
  readonly title: "List Event Types";
2787
2895
  readonly description: "See the bookable meeting types on the connected Cal.com account.";
2788
2896
  readonly requiredScopes: null;
2897
+ readonly annotations: ToolAnnotations;
2789
2898
  }];
2790
2899
  }, {
2791
2900
  readonly key: "web";
@@ -2798,11 +2907,13 @@ export declare const utils: {
2798
2907
  readonly title: "Web Extract";
2799
2908
  readonly description: "Fetch the full cleaned text of specific web pages by URL for in-depth reading.";
2800
2909
  readonly requiredScopes: null;
2910
+ readonly annotations: ToolAnnotations;
2801
2911
  }, {
2802
2912
  readonly key: "web-search";
2803
2913
  readonly title: "Web Search";
2804
2914
  readonly description: "Search the live web and return the top results plus a synthesized answer so the model can cite sources.";
2805
2915
  readonly requiredScopes: null;
2916
+ readonly annotations: ToolAnnotations;
2806
2917
  }];
2807
2918
  }, {
2808
2919
  readonly key: "builtin";
@@ -2815,26 +2926,31 @@ export declare const utils: {
2815
2926
  readonly title: "List Prompts";
2816
2927
  readonly description: "List the prompts and commands this assistant exposes, and how to run them on the current channel.";
2817
2928
  readonly requiredScopes: null;
2929
+ readonly annotations: ToolAnnotations;
2818
2930
  }, {
2819
2931
  readonly key: "list-resources";
2820
2932
  readonly title: "List Resources";
2821
2933
  readonly description: "List every resource available to this assistant.";
2822
2934
  readonly requiredScopes: null;
2935
+ readonly annotations: ToolAnnotations;
2823
2936
  }, {
2824
2937
  readonly key: "read-resource";
2825
2938
  readonly title: "Read Resource";
2826
2939
  readonly description: "Read the contents of a stored resource.";
2827
2940
  readonly requiredScopes: null;
2941
+ readonly annotations: ToolAnnotations;
2828
2942
  }, {
2829
2943
  readonly key: "search-resources";
2830
2944
  readonly title: "Search Resources";
2831
2945
  readonly description: "Find the resources most relevant to a question, by meaning and by exact keywords.";
2832
2946
  readonly requiredScopes: null;
2947
+ readonly annotations: ToolAnnotations;
2833
2948
  }, {
2834
2949
  readonly key: "send-resource";
2835
2950
  readonly title: "Send Resource";
2836
2951
  readonly description: "Deliver a resource to the user as a chat attachment.";
2837
2952
  readonly requiredScopes: null;
2953
+ readonly annotations: ToolAnnotations;
2838
2954
  }];
2839
2955
  }, {
2840
2956
  readonly key: "greeting";
@@ -2847,6 +2963,7 @@ export declare const utils: {
2847
2963
  readonly title: "Greeting";
2848
2964
  readonly description: "Reply with a friendly hello in English or Spanish (demo tool).";
2849
2965
  readonly requiredScopes: null;
2966
+ readonly annotations: ToolAnnotations;
2850
2967
  }];
2851
2968
  }, {
2852
2969
  readonly key: "http-endpoint";
@@ -2859,6 +2976,7 @@ export declare const utils: {
2859
2976
  readonly title: "HTTP Endpoint";
2860
2977
  readonly description: "A user-configured HTTP request exposed to the agent as its own named tool.";
2861
2978
  readonly requiredScopes: null;
2979
+ readonly annotations: null;
2862
2980
  }];
2863
2981
  }, {
2864
2982
  readonly key: "mcp-proxy";
@@ -2871,6 +2989,7 @@ export declare const utils: {
2871
2989
  readonly title: "MCP Server";
2872
2990
  readonly description: "A connected remote MCP server. Each server you add exposes its tools to the agent under a vendor prefix.";
2873
2991
  readonly requiredScopes: null;
2992
+ readonly annotations: null;
2874
2993
  }];
2875
2994
  }, {
2876
2995
  readonly key: "custom-code";
@@ -2883,6 +3002,7 @@ export declare const utils: {
2883
3002
  readonly title: "Custom code";
2884
3003
  readonly description: "Tools implemented by your own code. One script per artifact; names and schemas come from the published version.";
2885
3004
  readonly requiredScopes: null;
3005
+ readonly annotations: null;
2886
3006
  }];
2887
3007
  }];
2888
3008
  TOOL_KEYS: ("custom-code" | "list-resources" | "search-resources" | "read-resource" | "send-resource" | "list-prompts" | "calendar-list-calendars" | "calendar-create-event" | "calendar-find-free-slots" | "http-endpoint" | "mcp-proxy" | "web-search" | "web-extract" | "greeting" | "gmail-send-email" | "gmail-reply-email" | "gmail-forward-email" | "gmail-send-draft" | "gmail-create-draft" | "gmail-update-draft" | "gmail-delete-draft" | "gmail-trash-email" | "gmail-modify-labels" | "gmail-batch-modify-labels" | "outlook-send-email" | "outlook-reply-email" | "outlook-forward-email" | "outlook-send-draft" | "outlook-create-draft" | "outlook-update-draft" | "outlook-delete-draft" | "outlook-trash-email" | "outlook-move-message" | "outlook-batch-move-messages" | "gmail-get-draft" | "gmail-get-profile" | "gmail-get-thread" | "gmail-list-drafts" | "gmail-list-emails" | "gmail-list-labels" | "gmail-list-threads" | "gmail-read-email" | "outlook-get-draft" | "outlook-get-profile" | "outlook-get-thread" | "outlook-list-drafts" | "outlook-list-emails" | "outlook-list-folders" | "outlook-list-threads" | "outlook-read-email" | "slack-get-user" | "slack-list-channels" | "slack-send-message" | "slack-upload-file" | "slack-search-messages" | "calendar-delete-event" | "calendar-list-events" | "calendar-update-event" | "calcom-cancel-booking" | "calcom-create-booking" | "calcom-list-available-slots" | "calcom-list-event-types")[];
@@ -2935,6 +3055,35 @@ export declare const utils: {
2935
3055
  joinBufferedMessages: (messages: Array<{
2936
3056
  text: string;
2937
3057
  }>) => string;
3058
+ isConfirmationReply: (text: string) => boolean;
3059
+ confirmationButtonLabels: (locale?: string | null) => {
3060
+ yes: string;
3061
+ no: string;
3062
+ };
3063
+ confirmationButtonId: (answer: "yes" | "no", externalParticipantId: string) => string;
3064
+ parseConfirmationButton: (id: string) => {
3065
+ text: "yes" | "no";
3066
+ externalParticipantId: string;
3067
+ } | null;
3068
+ languageFromPhoneNumber: (phone: string) => string | null;
3069
+ formatConfirmationSummary: (calls: Array<{
3070
+ name: string;
3071
+ arguments: Record<string, unknown>;
3072
+ }>, titleOf: (name: string) => string) => string;
3073
+ annotationsForEffect: (effect: ToolEffect) => {
3074
+ readOnlyHint: boolean;
3075
+ destructiveHint: boolean;
3076
+ };
3077
+ TOOL_EFFECTS: readonly ["read", "write", "sensitive"];
3078
+ isSensitiveTool: (annotations: {
3079
+ readOnlyHint?: boolean;
3080
+ destructiveHint?: boolean;
3081
+ } | null | undefined) => boolean;
3082
+ stableJson: (value: unknown) => string;
3083
+ lintTools: (tools: LintableTool[], options?: ToolLintOptions) => ToolLintFinding[];
3084
+ TOOL_LINT_RULES: readonly ["missing-description", "short-description", "no-usage-guidance", "missing-annotations", "undescribed-input", "overlapping-tools", "too-many-tools"];
3085
+ TOOL_LINT_MAX_TOOLS: number;
3086
+ TOOL_LINT_MIN_DESCRIPTION_LENGTH: number;
2938
3087
  isResourceSourceEnabled: (resource: {
2939
3088
  showSource?: string | null;
2940
3089
  } | null | undefined) => boolean;
@@ -2959,5 +3108,5 @@ export declare const utils: {
2959
3108
  PlanLimitError: typeof PlanLimitError;
2960
3109
  isPlanLimitError: (error: unknown) => error is PlanLimitError;
2961
3110
  };
2962
- export type { MintedAccessToken, CustomCodeProject, ProjectPathIssue, CatalogGroup, CatalogTool, CatalogToolDescriptor, ToolGroupKey, ToolKey, CalendarConfigField, JsonSchema, SchemaViolation, MimeAttachment, MimeMessageInput, GmailOperation, GmailSendRequest, GmailSendResponse, OutlookOperation, OutlookSendRequest, OutlookSendResponse, SlackOperation, SlackSendRequest, SlackSendResponse, SlackSendRemoteResourceRequest, TelegramSendRequest, TelegramSendResponse, TelegramSendRemoteResourceRequest, DiscordSendRequest, DiscordSendResponse, DiscordSendRemoteResourceRequest, WhatsappSendRequest, WhatsappSendResponse, WhatsappSendRemoteResourceRequest, EnvSource, Separator, ChunkMetadata, PreparedChunk, ExtractedDocument, ExtractedDocumentMetadata, ExtractedDocumentSource, RateLimitRetryOptions, RerankAiBinding, QueueBatchLike, QueueMessageLike, ProcessQueueBatchHandlers, ChannelNotifier, ToolStatusEvent, BufferedChannelMessage, BufferedChannelCommand, ChannelBufferEnvelope, ChannelBufferFlush, Source, ResourceUrlContext, SourceButton, RefreshOAuthTokenInput, RefreshedOAuthToken, HttpEndpointToolConfig, McpProxyToolConfig, McpProxyDiscoveredTool, McpProxyDiscoveredResource, McpProxyDiscoveredPrompt, McpProxyDiscovery, CustomCodeToolConfig, CustomCodeToolManifest, CustomCodeManifest, CustomCodeSendFile, CustomCodeCreateResource, CustomCodeTokenPayload, ContainmentTokenPayload, OAuthProviderConfig, AttachmentResource, ResolvedAttachment, ResolveAttachmentResult, ExposableResource, SyncableResource, ResourceSyncProvider, PlanLimitDetails, PlanLimits };
3111
+ export type { MintedAccessToken, CustomCodeProject, ProjectPathIssue, CatalogGroup, CatalogTool, CatalogToolDescriptor, ToolAnnotations, PendingToolConfirmation, PendingToolConfirmations, ToolEffect, LintableTool, ToolLintFinding, ToolLintOptions, ToolLintRule, ToolGroupKey, ToolKey, CalendarConfigField, JsonSchema, SchemaViolation, MimeAttachment, MimeMessageInput, GmailOperation, GmailSendRequest, GmailSendResponse, OutlookOperation, OutlookSendRequest, OutlookSendResponse, SlackOperation, SlackSendRequest, SlackSendResponse, SlackSendRemoteResourceRequest, TelegramSendRequest, TelegramSendResponse, TelegramSendRemoteResourceRequest, DiscordSendRequest, DiscordSendResponse, DiscordSendRemoteResourceRequest, WhatsappSendRequest, WhatsappSendResponse, WhatsappSendRemoteResourceRequest, EnvSource, Separator, ChunkMetadata, PreparedChunk, ExtractedDocument, ExtractedDocumentMetadata, ExtractedDocumentSource, RateLimitRetryOptions, RerankAiBinding, QueueBatchLike, QueueMessageLike, ProcessQueueBatchHandlers, ChannelNotifier, ToolStatusEvent, BufferedChannelMessage, BufferedChannelCommand, ChannelBufferEnvelope, ChannelBufferFlush, Source, ResourceUrlContext, SourceButton, RefreshOAuthTokenInput, RefreshedOAuthToken, HttpEndpointToolConfig, McpProxyToolConfig, McpProxyDiscoveredTool, McpProxyDiscoveredResource, McpProxyDiscoveredPrompt, McpProxyDiscovery, CustomCodeToolConfig, CustomCodeToolManifest, CustomCodeManifest, CustomCodeSendFile, CustomCodeCreateResource, CustomCodeTokenPayload, ContainmentTokenPayload, OAuthProviderConfig, AttachmentResource, ResolvedAttachment, ResolveAttachmentResult, ExposableResource, SyncableResource, ResourceSyncProvider, PlanLimitDetails, PlanLimits };
2963
3112
  //# sourceMappingURL=index.d.ts.map