eve 0.13.2 → 0.13.4

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/src/chunks/use-eve-agent-BLv-Mj5g.js +1512 -0
  3. package/dist/src/chunks/use-eve-agent-C8UVUMA4.js +1542 -0
  4. package/dist/src/client/agent-info-schema.d.ts +1 -1
  5. package/dist/src/client/agent-info-schema.js +1 -1
  6. package/dist/src/compiled/.vendor-stamp.json +6 -6
  7. package/dist/src/compiled/@ai-sdk/anthropic/index.js +2 -2
  8. package/dist/src/compiled/@ai-sdk/google/index.js +6 -6
  9. package/dist/src/compiled/@ai-sdk/mcp/index.js +1 -1
  10. package/dist/src/compiled/@ai-sdk/openai/index.js +2 -2
  11. package/dist/src/compiled/@chat-adapter/slack/_slack-web-api.d.ts +1 -0
  12. package/dist/src/compiled/@chat-adapter/slack/blocks.d.ts +160 -0
  13. package/dist/src/compiled/@chat-adapter/slack/blocks.js +8 -0
  14. package/dist/src/compiled/@chat-adapter/slack/index.d.ts +28 -3
  15. package/dist/src/compiled/@chat-adapter/slack/index.js +26 -26
  16. package/dist/src/compiled/@workflow/core/create-hook.d.ts +3 -1
  17. package/dist/src/compiled/@workflow/core/events-consumer.d.ts +9 -0
  18. package/dist/src/compiled/@workflow/core/index.js +2 -2
  19. package/dist/src/compiled/@workflow/core/logger.d.ts +1 -0
  20. package/dist/src/compiled/@workflow/core/private.d.ts +35 -2
  21. package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +73 -0
  22. package/dist/src/compiled/@workflow/core/runtime/get-port-lazy.d.ts +15 -0
  23. package/dist/src/compiled/@workflow/core/runtime/run-id-time.d.ts +10 -0
  24. package/dist/src/compiled/@workflow/core/runtime/step-executor.d.ts +61 -1
  25. package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +38 -2
  26. package/dist/src/compiled/@workflow/core/runtime.d.ts +1 -0
  27. package/dist/src/compiled/@workflow/core/runtime.js +28 -28
  28. package/dist/src/compiled/@workflow/core/source-map.d.ts +5 -0
  29. package/dist/src/compiled/@workflow/core/step/context-storage.d.ts +27 -0
  30. package/dist/src/compiled/@workflow/core/step-hydration-cache.d.ts +148 -0
  31. package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +28 -0
  32. package/dist/src/compiled/@workflow/core/telemetry.d.ts +9 -6
  33. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  34. package/dist/src/compiled/@workflow/core/vm/script-cache.d.ts +28 -0
  35. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  36. package/dist/src/compiled/@workflow/world/events.d.ts +78 -3
  37. package/dist/src/compiled/@workflow/world/index.d.ts +1 -1
  38. package/dist/src/compiled/@workflow/world/spec-version.d.ts +11 -1
  39. package/dist/src/compiled/_chunks/{workflow/core-CXJbIkCL.js → client/core-Bm8azZA6.js} +5 -5
  40. package/dist/src/compiled/_chunks/node/chunk-AYN7QRWH-Csu8sG38.js +1 -0
  41. package/dist/src/compiled/_chunks/node/{dist-BQYUcBqu.js → dist-W8yle6rh.js} +3 -3
  42. package/dist/src/compiled/_chunks/workflow/{attribute-changes-Bi5DLT8S.js → attribute-changes-DUxG-Gic.js} +3 -3
  43. package/dist/src/compiled/_chunks/workflow/dist-C9PV_vnE.js +77 -0
  44. package/dist/src/compiled/_chunks/workflow/resume-hook-CUCPW67D.js +1 -0
  45. package/dist/src/compiled/_chunks/workflow/{run-XM8dTRAo.js → run-CVlF84yI.js} +1 -1
  46. package/dist/src/compiled/_chunks/workflow/sleep-Dxuzj5to.js +1 -0
  47. package/dist/src/compiled/chat/index.d.ts +4 -4
  48. package/dist/src/compiled/chat/index.js +1 -1
  49. package/dist/src/compiled/chat/{jsx-runtime-CFq1K_Ve.d.ts → jsx-runtime-CzthIo1o.d.ts} +6 -1
  50. package/dist/src/compiled/zod/index.js +1 -1
  51. package/dist/src/compiled/zod-validation-error/index.js +1 -1
  52. package/dist/src/execution/workflow-steps.js +1 -1
  53. package/dist/src/harness/authorization.d.ts +1 -0
  54. package/dist/src/harness/authorization.js +1 -1
  55. package/dist/src/internal/application/optional-package-install.js +15 -1
  56. package/dist/src/internal/application/package.js +1 -1
  57. package/dist/src/public/channels/slack/blocks.d.ts +3 -41
  58. package/dist/src/public/channels/slack/blocks.js +2 -3
  59. package/dist/src/public/channels/slack/defaults.js +3 -3
  60. package/dist/src/setup/scaffold/create/project.js +1 -1
  61. package/dist/src/svelte/index.js +1 -1
  62. package/dist/src/svelte/use-eve-agent.js +1 -1
  63. package/dist/src/vue/index.js +1 -1
  64. package/dist/src/vue/use-eve-agent.js +1 -1
  65. package/docs/guides/instrumentation.md +1 -1
  66. package/package.json +7 -7
  67. package/dist/src/chunks/use-eve-agent-B18LYpfZ.js +0 -5765
  68. package/dist/src/chunks/use-eve-agent-BPI1nbo5.js +0 -5795
  69. package/dist/src/compiled/_chunks/workflow/coerce-B-Ro4Nfe.js +0 -1
  70. package/dist/src/compiled/_chunks/workflow/compat-DLpWymPP.js +0 -1
  71. package/dist/src/compiled/_chunks/workflow/dist-DTchiX0N.js +0 -14
  72. package/dist/src/compiled/_chunks/workflow/resume-hook-CKTw-lb5.js +0 -1
  73. package/dist/src/compiled/_chunks/workflow/schemas-iG9Z4s4o.js +0 -1
  74. package/dist/src/compiled/_chunks/workflow/sleep-DPjVkRY-.js +0 -1
@@ -0,0 +1,160 @@
1
+ type SlackButtonStyle = "danger" | "default" | "primary";
2
+ type SlackTextStyle = "bold" | "muted" | "plain";
3
+ type SlackTableAlignment = "center" | "left" | "right";
4
+ interface SlackCardElement {
5
+ children: SlackCardChild[];
6
+ imageUrl?: string;
7
+ subtitle?: string;
8
+ title?: string;
9
+ type: "card";
10
+ }
11
+ type SlackCardChild = SlackActionsElement | SlackDividerElement | SlackFieldsElement | SlackImageElement | SlackLinkElement | SlackSectionElement | SlackTableElement | SlackTextElement;
12
+ interface SlackTextElement {
13
+ content: string;
14
+ style?: SlackTextStyle;
15
+ type: "text";
16
+ }
17
+ interface SlackImageElement {
18
+ alt?: string;
19
+ type: "image";
20
+ url: string;
21
+ }
22
+ interface SlackDividerElement {
23
+ type: "divider";
24
+ }
25
+ interface SlackActionsElement {
26
+ children: (SlackButtonElement | SlackLinkButtonElement | SlackRadioSelectElement | SlackSelectElement)[];
27
+ type: "actions";
28
+ }
29
+ interface SlackButtonElement {
30
+ callbackUrl?: string;
31
+ disabled?: boolean;
32
+ id: string;
33
+ label: string;
34
+ style?: SlackButtonStyle;
35
+ type: "button";
36
+ value?: string;
37
+ }
38
+ interface SlackLinkButtonElement {
39
+ id?: string;
40
+ label: string;
41
+ style?: SlackButtonStyle;
42
+ type: "link-button";
43
+ url: string;
44
+ }
45
+ interface SlackSelectOptionElement {
46
+ description?: string;
47
+ label: string;
48
+ value: string;
49
+ }
50
+ interface SlackSelectElement {
51
+ id: string;
52
+ initialOption?: string;
53
+ label: string;
54
+ options: SlackSelectOptionElement[];
55
+ placeholder?: string;
56
+ type: "select";
57
+ }
58
+ interface SlackRadioSelectElement {
59
+ id: string;
60
+ initialOption?: string;
61
+ label: string;
62
+ options: SlackSelectOptionElement[];
63
+ type: "radio_select";
64
+ }
65
+ interface SlackSectionElement {
66
+ children: SlackCardChild[];
67
+ type: "section";
68
+ }
69
+ interface SlackLinkElement {
70
+ label: string;
71
+ type: "link";
72
+ url: string;
73
+ }
74
+ interface SlackFieldElement {
75
+ label: string;
76
+ type: "field";
77
+ value: string;
78
+ }
79
+ interface SlackFieldsElement {
80
+ children: SlackFieldElement[];
81
+ type: "fields";
82
+ }
83
+ interface SlackTableElement {
84
+ align?: SlackTableAlignment[];
85
+ headers: string[];
86
+ rows: string[][];
87
+ type: "table";
88
+ }
89
+ interface SlackTextObject {
90
+ emoji?: boolean;
91
+ text: string;
92
+ type: "mrkdwn" | "plain_text";
93
+ }
94
+ interface SlackBlock {
95
+ block_id?: string;
96
+ type: string;
97
+ [key: string]: unknown;
98
+ }
99
+ interface SlackBlocksOptions {
100
+ convertEmoji?: (text: string) => string;
101
+ maxBlocks?: number;
102
+ }
103
+
104
+ declare class SlackBlockError extends Error {
105
+ constructor(message: string);
106
+ }
107
+
108
+ declare const SLACK_INPUT_ACTION_PREFIX = "input:";
109
+ declare const SLACK_FREEFORM_ACTION_PREFIX = "input-freeform:";
110
+ declare const SLACK_FREEFORM_CALLBACK_ID = "input-freeform-submit";
111
+ declare const SLACK_FREEFORM_BLOCK_ID = "input-freeform-block";
112
+ declare const SLACK_FREEFORM_ACTION_ID = "input-freeform-text";
113
+ interface SlackInputOption {
114
+ description?: string;
115
+ id: string;
116
+ label: string;
117
+ style?: SlackButtonStyle;
118
+ }
119
+ interface SlackInputRequest {
120
+ allowFreeform?: boolean;
121
+ display?: "buttons" | "radio" | "select";
122
+ options?: readonly SlackInputOption[];
123
+ prompt: string;
124
+ requestId: string;
125
+ }
126
+ interface SlackInputAction {
127
+ actionId: string;
128
+ selectedOptionValue?: string;
129
+ value?: string;
130
+ }
131
+ interface SlackInputResponse {
132
+ optionId?: string;
133
+ requestId: string;
134
+ }
135
+ interface SlackFreeformViewOptions {
136
+ metadata: unknown;
137
+ prompt?: string;
138
+ title?: string;
139
+ }
140
+ declare function inputRequestToSlackBlocks(request: SlackInputRequest): SlackBlock[];
141
+ declare function parseSlackInputResponse(action: SlackInputAction): SlackInputResponse | null;
142
+ declare function buildSlackFreeformView(options: SlackFreeformViewOptions): Record<string, unknown>;
143
+ declare function parseSlackFreeformValue(values: readonly {
144
+ actionId: string;
145
+ blockId: string;
146
+ value?: string;
147
+ }[]): string | undefined;
148
+ declare function answeredSlackInputBlocks(input: {
149
+ answer: string;
150
+ promptBlock?: unknown;
151
+ userId?: string;
152
+ }): SlackBlock[];
153
+
154
+ declare function cardToSlackBlocks(card: SlackCardElement, options?: SlackBlocksOptions): SlackBlock[];
155
+ declare const cardToBlockKit: typeof cardToSlackBlocks;
156
+ declare function cardToSlackFallbackText(card: SlackCardElement, options?: Pick<SlackBlocksOptions, "convertEmoji">): string;
157
+ declare const cardToFallbackText: typeof cardToSlackFallbackText;
158
+ declare function convertSlackEmojiPlaceholders(text: string): string;
159
+
160
+ export { SLACK_FREEFORM_ACTION_ID, SLACK_FREEFORM_ACTION_PREFIX, SLACK_FREEFORM_BLOCK_ID, SLACK_FREEFORM_CALLBACK_ID, SLACK_INPUT_ACTION_PREFIX, type SlackActionsElement, type SlackBlock, SlackBlockError, type SlackBlocksOptions, type SlackButtonElement, type SlackButtonStyle, type SlackCardChild, type SlackCardElement, type SlackDividerElement, type SlackFieldElement, type SlackFieldsElement, type SlackFreeformViewOptions, type SlackImageElement, type SlackInputAction, type SlackInputOption, type SlackInputRequest, type SlackInputResponse, type SlackLinkButtonElement, type SlackLinkElement, type SlackRadioSelectElement, type SlackSectionElement, type SlackSelectElement, type SlackSelectOptionElement, type SlackTableAlignment, type SlackTableElement, type SlackTextElement, type SlackTextObject, type SlackTextStyle, answeredSlackInputBlocks, buildSlackFreeformView, cardToBlockKit, cardToFallbackText, cardToSlackBlocks, cardToSlackFallbackText, convertSlackEmojiPlaceholders, inputRequestToSlackBlocks, parseSlackFreeformValue, parseSlackInputResponse };
@@ -0,0 +1,8 @@
1
+ import{n as e}from"../../_chunks/node/chunk-AYN7QRWH-Csu8sG38.js";var t=class extends Error{constructor(e){super(e),this.name=`SlackBlockError`}},n={actionId:255,actionsElements:25,blockId:255,blocks:50,buttonText:75,buttonUrl:3e3,buttonValue:2e3,fields:10,fieldText:2e3,headerText:150,imageAlt:2e3,imageUrl:3e3,optionDescription:75,optionText:75,optionValue:150,options:100,placeholder:150,radioOptions:10,sectionText:3e3,tableColumns:20,tableRows:100,textObject:3e3},r=`input:`,i=`input-freeform:`,a=`input-freeform-submit`,o=`input-freeform-block`,s=`input-freeform-text`,c=/^(?<requestId>.+):button:\d+$/u;function l(e){let t={text:{text:v(e.prompt,n.sectionText),type:`mrkdwn`},type:`section`},r=e.options??[];if(r.length===0)return[t,{elements:[m(e.requestId)],type:`actions`}];let i=e.allowFreeform?[m(e.requestId)]:[];if(e.display===`radio`)return[t,{elements:[_(e),...i],type:`actions`}];if(e.display===`select`)return[t,{elements:[g(e),...i],type:`actions`}];let a=i.length>0?n.actionsElements-1:n.actionsElements;return[t,{elements:r.slice(0,a).map((t,n)=>h(e.requestId,t,n)).concat(i),type:`actions`}]}function u(e){if(!e.actionId.startsWith(`input:`))return null;let t=e.actionId.slice(r.length);if(e.selectedOptionValue!==void 0)return t?{optionId:e.selectedOptionValue,requestId:t}:null;let n=c.exec(t)?.groups?.requestId;return n&&e.value!==void 0?{optionId:e.value,requestId:n}:null}function d(e){let t=v(e.title??e.prompt??`Your answer`,24),r=[];return e.prompt&&r.push({text:{text:v(e.prompt,n.sectionText),type:`mrkdwn`},type:`section`}),r.push({block_id:o,element:{action_id:s,multiline:!0,type:`plain_text_input`},label:{text:`Answer`,type:`plain_text`},type:`input`}),{blocks:r,callback_id:a,close:{text:`Cancel`,type:`plain_text`},private_metadata:typeof e.metadata==`string`?e.metadata:JSON.stringify(e.metadata),submit:{text:`Submit`,type:`plain_text`},title:{text:t,type:`plain_text`},type:`modal`}}function f(e){return e.find(e=>e.blockId===`input-freeform-block`&&e.actionId===`input-freeform-text`)?.value}function p(e){let t=[];return e.promptBlock&&typeof e.promptBlock==`object`&&t.push(e.promptBlock),t.push({text:{text:`:white_check_mark: *${e.answer}*`,type:`mrkdwn`},type:`section`}),e.userId&&t.push({elements:[{text:`Answered by <@${e.userId}>`,type:`mrkdwn`}],type:`context`}),t}function m(e){return{action_id:`${i}${e}`,style:`primary`,text:{text:`Type your answer`,type:`plain_text`},type:`button`,value:e}}function h(e,t,i){return y({action_id:`${r}${e}:button:${i}`,style:t.style===`primary`||t.style===`danger`?t.style:void 0,text:{text:v(t.label,n.buttonText),type:`plain_text`},type:`button`,value:v(t.id,n.buttonValue)})}function g(e){let t=(e.options??[]).map(e=>({text:{text:v(e.label,n.optionText),type:`plain_text`},value:v(e.id,n.optionValue)}));return{action_id:`${r}${e.requestId}`,options:t.slice(0,n.options),placeholder:{text:`Choose an option`,type:`plain_text`},type:`static_select`}}function _(e){let t=(e.options??[]).map(e=>({text:{text:v(e.label,n.optionText),type:`plain_text`},value:v(e.id,n.optionValue)}));return t.length>n.radioOptions?g(e):{action_id:`${r}${e.requestId}`,options:t,type:`radio_buttons`}}function v(e,t){return e.length>t?e.slice(0,t):e}function y(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}var b=` `,x=/\{\{emoji:([a-zA-Z0-9_+-]+)\}\}/g;function S(e,t={}){let r=[],i={convertEmoji:t.convertEmoji??E,maxBlocks:t.maxBlocks??n.blocks,usedTable:!1};e.title&&r.push({text:U(e.title,i.convertEmoji,n.headerText),type:`header`}),e.subtitle&&r.push({elements:[H(e.subtitle,i.convertEmoji,n.textObject)],type:`context`}),e.imageUrl&&r.push({alt_text:K(i.convertEmoji(e.title||`Card image`),n.imageAlt),image_url:K(e.imageUrl,n.imageUrl),type:`image`});for(let t of e.children)r.push(...D(t,i));return r.slice(0,i.maxBlocks)}var C=S;function w(e,t={}){let n=t.convertEmoji??E,r=[];e.title&&r.push(`*${n(e.title)}*`),e.subtitle&&r.push(n(e.subtitle));for(let t of e.children){let e=V(t,n);e&&r.push(e)}return r.join(`
2
+ `)}var T=w;function E(e){return e.replace(x,`:$1:`)}function D(e,t){switch(e.type){case`actions`:return[j(e,t.convertEmoji)];case`divider`:return[{type:`divider`}];case`fields`:return[z(e,t.convertEmoji)];case`image`:return[k(e,t.convertEmoji)];case`link`:return[A(e,t.convertEmoji)];case`section`:return e.children.flatMap(e=>D(e,t));case`table`:return B(e,t);case`text`:return[O(e,t.convertEmoji)];default:return J(e)}}function O(t,r){let i=e(r(t.content));return t.style===`muted`?{elements:[H(i,e=>e,n.textObject)],type:`context`}:{text:H(t.style===`bold`?`*${i}*`:i,e=>e,n.sectionText),type:`section`}}function k(e,t){return{alt_text:K(t(e.alt||`Image`),n.imageAlt),image_url:K(e.url,n.imageUrl),type:`image`}}function A(e,t){return{text:H(`<${e.url}|${t(e.label)}>`,e=>e,n.sectionText),type:`section`}}function j(e,t){return{elements:e.children.slice(0,n.actionsElements).map(e=>M(e,t)),type:`actions`}}function M(e,t){switch(e.type){case`button`:return N(e,t);case`link-button`:return P(e,t);case`radio_select`:return I(e,t);case`select`:return F(e,t);default:return J(e)}}function N(e,t){return Y({action_id:K(e.id,n.actionId),style:G(e.style),text:U(e.label,t,n.buttonText),type:`button`,value:e.value===void 0?void 0:K(e.value,n.buttonValue)})}function P(e,t){return Y({action_id:K(e.id??`link-${e.url}`,n.actionId),style:G(e.style),text:U(e.label,t,n.buttonText),type:`button`,url:K(e.url,n.buttonUrl)})}function F(e,t){let r=e.options.slice(0,n.options).map(e=>R(e,t,`plain_text`));return Y({action_id:K(e.id,n.actionId),initial_option:L(r,e.initialOption),options:r,placeholder:e.placeholder?U(e.placeholder,t,n.placeholder):void 0,type:`static_select`})}function I(e,t){let r=e.options.slice(0,n.radioOptions).map(e=>R(e,t,`mrkdwn`));return Y({action_id:K(e.id,n.actionId),initial_option:L(r,e.initialOption),options:r,type:`radio_buttons`})}function L(e,t){if(t===void 0)return;let r=K(t,n.optionValue);return e.find(e=>e.value===r)}function R(e,t,r){return Y({description:e.description?{text:K(t(e.description),n.optionDescription),type:r}:void 0,text:{text:K(t(e.label),n.optionText),type:r},value:K(e.value,n.optionValue)})}function z(t,r){return{fields:t.children.slice(0,n.fields).map(t=>H(`*${e(r(t.label))}*
3
+ ${e(r(t.value))}`,e=>e,n.fieldText)),type:`section`}}function B(e,t){return t.usedTable||e.rows.length+1>n.tableRows||e.headers.length>n.tableColumns?[{text:H(`\`\`\`
4
+ ${X(e)}
5
+ \`\`\``,e=>e,n.sectionText),type:`section`}]:(t.usedTable=!0,[Y({column_settings:e.align?.slice(0,n.tableColumns).map(e=>e?{align:e}:null),rows:[e.headers.map(e=>W(e,t.convertEmoji)),...e.rows.map(e=>e.map(e=>W(e,t.convertEmoji)))],type:`table`})])}function V(e,t){switch(e.type){case`actions`:return;case`divider`:return`---`;case`fields`:return e.children.map(e=>`${t(e.label)}: ${t(e.value)}`).join(`
6
+ `);case`image`:return e.alt?t(e.alt):void 0;case`link`:return`${t(e.label)} (${e.url})`;case`section`:return e.children.map(e=>V(e,t)).filter(e=>!!e).join(`
7
+ `);case`table`:return X(e);case`text`:return t(e.content);default:return J(e)}}function H(e,t,n){return{text:q(K(t(e),n)),type:`mrkdwn`}}function U(e,t,n){return{emoji:!0,text:q(K(t(e),n)),type:`plain_text`}}function W(e,t){return{text:q(t(e)),type:`raw_text`}}function G(e){return e===`danger`||e===`primary`?e:void 0}function K(e,t){return e.length>t?e.slice(0,t):e}function q(e){return e.length>0?e:b}function J(e){throw new t(`Unsupported Slack card element: ${String(e)}`)}function Y(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=r);return t}function X(e){let t=[e.headers,...e.rows],n=e.headers.map((e,n)=>Math.max(...t.map(e=>e[n]?.length??0)));return t.map(e=>e.map((e,t)=>(e??``).padEnd(n[t]??0)).join(` | `).trimEnd()).join(`
8
+ `)}export{s as SLACK_FREEFORM_ACTION_ID,i as SLACK_FREEFORM_ACTION_PREFIX,o as SLACK_FREEFORM_BLOCK_ID,a as SLACK_FREEFORM_CALLBACK_ID,r as SLACK_INPUT_ACTION_PREFIX,t as SlackBlockError,p as answeredSlackInputBlocks,d as buildSlackFreeformView,C as cardToBlockKit,T as cardToFallbackText,S as cardToSlackBlocks,w as cardToSlackFallbackText,E as convertSlackEmojiPlaceholders,l as inputRequestToSlackBlocks,f as parseSlackFreeformValue,u as parseSlackInputResponse};
@@ -1,6 +1,7 @@
1
1
  import { AsyncLocalStorage } from 'node:async_hooks';
2
- import { WebClient } from './_slack-web-api.js';
2
+ import { WebClientOptions, WebClient } from './_slack-web-api.js';
3
3
  import { BaseFormatConverter, Root, AdapterPostableMessage, CardElement, Logger, Adapter, ChatInstance, UserInfo, WebhookOptions, OptionsLoadResult, ModalResponse, ModalElement, LinkPreview, Message, Attachment, RawMessage, EphemeralMessage, ScheduledMessage, FileUpload, PlanModel, PlanContent, EmojiValue, StreamChunk, StreamOptions, FetchOptions, FetchResult, ThreadInfo, ChannelVisibility, ListThreadsOptions, ListThreadsResult, ChannelInfo, FormattedContent } from '#compiled/chat/index.js';
4
+ import { y as SlackWebhookVerifier } from './types-AntsVifS.js';
4
5
  export { EncryptedTokenData, decodeKey } from './_chat-adapter-shared.js';
5
6
 
6
7
  /**
@@ -172,6 +173,30 @@ interface SlackAdapterConfig {
172
173
  socketForwardingSecret?: string;
173
174
  /** Override bot username (optional) */
174
175
  userName?: string;
176
+ /**
177
+ * Options forwarded to the underlying `@slack/web-api` `WebClient` instances, both the
178
+ * default client and the per-token clients used for multi-workspace requests.
179
+ *
180
+ * Use this to tune Web API behavior the adapter does not otherwise expose, most
181
+ * notably `retryConfig` and `timeout`. By default the WebClient retries rate-limited
182
+ * (429) requests with `retryPolicies.tenRetriesInAboutThirtyMinutes`, so a single
183
+ * `chat.update`/`chat.postMessage` can block for ~30 minutes under sustained rate
184
+ * limiting. Callers that stream frequent edits (where a hung call can stall a whole
185
+ * turn) will typically want a bounded policy and/or a timeout. `timeout` applies to
186
+ * each HTTP request attempt, not the total retry period. Set
187
+ * `rejectRateLimitedCalls` to reject 429 responses without waiting for `Retry-After`.
188
+ *
189
+ * ```ts
190
+ * import { retryPolicies } from "./_slack-web-api.js";
191
+ * createSlackAdapter({
192
+ * signingSecret,
193
+ * webClientOptions: { retryConfig: retryPolicies.fiveRetriesInFiveMinutes, timeout: 15_000 },
194
+ * });
195
+ * ```
196
+ *
197
+ * Use `apiUrl` to override the Slack Web API base URL.
198
+ */
199
+ webClientOptions?: Omit<WebClientOptions, "slackApiUrl">;
175
200
  /**
176
201
  * Custom webhook verifier. Used in place of `signingSecret`.
177
202
  * Receives the incoming `Request` and the raw body text already
@@ -191,7 +216,7 @@ interface SlackAdapterConfig {
191
216
  * equivalent freshness signal) to prevent replay of captured signed
192
217
  * requests.
193
218
  */
194
- webhookVerifier?: (request: Request, body: string) => unknown | Promise<unknown>;
219
+ webhookVerifier?: SlackWebhookVerifier;
195
220
  }
196
221
 
197
222
  /** Envelope for events forwarded from a socket mode listener via HTTP POST */
@@ -465,6 +490,7 @@ declare class SlackAdapter implements Adapter<SlackThreadId, unknown> {
465
490
  protected readonly _client: WebClient;
466
491
  protected readonly tokenClientCache: Map<string, WebClient>;
467
492
  protected readonly slackApiUrl: string | undefined;
493
+ protected readonly webClientOptions: SlackAdapterConfig["webClientOptions"];
468
494
  protected readonly signingSecret: string | undefined;
469
495
  protected readonly webhookVerifier: ((request: Request, body: string) => unknown | Promise<unknown>) | undefined;
470
496
  protected readonly defaultBotTokenProvider: (() => string | Promise<string>) | undefined;
@@ -671,7 +697,6 @@ declare class SlackAdapter implements Adapter<SlackThreadId, unknown> {
671
697
  * No-op if not connected.
672
698
  */
673
699
  disconnect(): Promise<void>;
674
- protected verifySignature(body: string, timestamp: string | null, signature: string | null): boolean;
675
700
  /**
676
701
  * Handle message events from Slack.
677
702
  * Bot message filtering (isMe) is handled centrally by the Chat class.