eve 0.86.0 → 0.87.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/README.md +1 -1
  3. package/dist/src/acp/adapter.d.ts +2 -26
  4. package/dist/src/acp/adapter.js +1 -1
  5. package/dist/src/acp/server.d.ts +0 -3
  6. package/dist/src/ai/decision-adapter.d.ts +5 -3
  7. package/dist/src/ai/decision-adapter.js +1 -1
  8. package/dist/src/ai/decision-types.d.ts +4 -3
  9. package/dist/src/channel/adapter.d.ts +0 -14
  10. package/dist/src/channel/auth/definitions.d.ts +0 -4
  11. package/dist/src/channel/channel-address.d.ts +1 -1
  12. package/dist/src/channel/channel-address.js +1 -1
  13. package/dist/src/channel/channel-operations.d.ts +2 -2
  14. package/dist/src/channel/channel-operations.js +1 -1
  15. package/dist/src/channel/prompt-queue.d.ts +0 -2
  16. package/dist/src/channel/session-not-active-error.d.ts +10 -5
  17. package/dist/src/channel/session-not-active-error.js +1 -1
  18. package/dist/src/channel/session-stranded-error.d.ts +1 -1
  19. package/dist/src/channel/session.d.ts +3 -4
  20. package/dist/src/channel/session.js +1 -1
  21. package/dist/src/channel/types.d.ts +5 -14
  22. package/dist/src/chunks/{use-eve-agent-B2jCfcnG.js → use-eve-agent-BExXjBv6.js} +82 -72
  23. package/dist/src/chunks/{use-eve-agent-DCLFi26P.js → use-eve-agent-C0KHCyb9.js} +82 -72
  24. package/dist/src/cli/dev/command-options.d.ts +4 -4
  25. package/dist/src/cli/dev/command.js +1 -1
  26. package/dist/src/cli/dev/tui/runner.js +1 -1
  27. package/dist/src/cli/dev/tui/test/fake-eve-server.js +1 -1
  28. package/dist/src/cli/dev/tui/tool-format.d.ts +2 -2
  29. package/dist/src/cli/dev/ui-options.d.ts +4 -4
  30. package/dist/src/cli/dev/ui-options.js +1 -1
  31. package/dist/src/client/agent-info-error.d.ts +4 -1
  32. package/dist/src/client/agent-info-error.js +1 -1
  33. package/dist/src/client/agent-session.d.ts +1 -4
  34. package/dist/src/client/agent-session.js +1 -1
  35. package/dist/src/client/agent-stream-follower.js +1 -1
  36. package/dist/src/client/client-error.d.ts +13 -4
  37. package/dist/src/client/client-error.js +1 -1
  38. package/dist/src/client/delivery.d.ts +2 -17
  39. package/dist/src/client/health-response-error.d.ts +4 -1
  40. package/dist/src/client/health-response-error.js +1 -1
  41. package/dist/src/client/index.d.ts +5 -3
  42. package/dist/src/client/index.js +1 -1
  43. package/dist/src/client/open-stream.d.ts +7 -12
  44. package/dist/src/client/open-stream.js +1 -1
  45. package/dist/src/client/session-controls.d.ts +2 -2
  46. package/dist/src/client/session-controls.js +1 -1
  47. package/dist/src/client/session-event-stream.d.ts +2 -2
  48. package/dist/src/client/session-event-stream.js +1 -1
  49. package/dist/src/client/session-store.d.ts +2 -6
  50. package/dist/src/client/session-store.js +1 -1
  51. package/dist/src/client/session.d.ts +4 -13
  52. package/dist/src/client/session.js +1 -1
  53. package/dist/src/client/sessions.d.ts +3 -6
  54. package/dist/src/client/types.d.ts +23 -32
  55. package/dist/src/compiled/.vendor-stamp.json +3 -3
  56. package/dist/src/compiled/@vercel/agent-runs/LICENSE +202 -0
  57. package/dist/src/compiler/manifest.js +1 -1
  58. package/dist/src/compiler/normalize-agent-config.js +1 -1
  59. package/dist/src/compiler/normalize-connection.d.ts +1 -1
  60. package/dist/src/compiler/normalize-connection.js +1 -1
  61. package/dist/src/compiler/normalize-instructions.js +1 -1
  62. package/dist/src/compiler/normalize-skill.js +1 -1
  63. package/dist/src/compiler/resolve-workspace-subagent.js +1 -1
  64. package/dist/src/context/memory-tools.d.ts +9 -5
  65. package/dist/src/discover/sandbox.js +1 -1
  66. package/dist/src/dynamic/definition.d.ts +11 -5
  67. package/dist/src/dynamic/definition.js +1 -1
  68. package/dist/src/evals/mock-model.d.ts +1 -1
  69. package/dist/src/evals/session-manager.d.ts +0 -2
  70. package/dist/src/evals/session.d.ts +1 -11
  71. package/dist/src/evals/session.js +1 -1
  72. package/dist/src/eve-channel/index.js +1 -1
  73. package/dist/src/eve-channel/support.js +1 -1
  74. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  75. package/dist/src/execution/effective-agent-config.js +1 -1
  76. package/dist/src/execution/sandbox/bindings/just-bash-runtime.d.ts +1 -2
  77. package/dist/src/execution/sandbox/bindings/just-bash-runtime.js +1 -1
  78. package/dist/src/execution/sandbox/bindings/just-bash.js +1 -1
  79. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  80. package/dist/src/instrumentation/ai-sdk-telemetry.d.ts +0 -2
  81. package/dist/src/instrumentation/providers.d.ts +1 -38
  82. package/dist/src/instrumentation/providers.js +1 -1
  83. package/dist/src/instrumentation/setup-context.d.ts +1 -7
  84. package/dist/src/internal/application/package.d.ts +1 -0
  85. package/dist/src/internal/application/package.js +1 -1
  86. package/dist/src/internal/application/stamped-package-version.js +1 -1
  87. package/dist/src/internal/authored-definition/core.js +1 -1
  88. package/dist/src/internal/authored-definition/schema-backed.js +1 -1
  89. package/dist/src/internal/classify-model-routing.d.ts +2 -3
  90. package/dist/src/internal/nitro/host/create-application-nitro.js +1 -1
  91. package/dist/src/internal/runtime-model.d.ts +9 -4
  92. package/dist/src/internal/runtime-model.js +1 -1
  93. package/dist/src/internal/workflow-bundle/authored-workflow-directives.js +1 -1
  94. package/dist/src/internal/workflow-bundle/builder-support.d.ts +1 -1
  95. package/dist/src/internal/workflow-bundle/builder-support.js +1 -1
  96. package/dist/src/internal/workflow-bundle/workflow-transformer.js +1 -1
  97. package/dist/src/models/auto.js +1 -1
  98. package/dist/src/protocol/delivery.d.ts +1 -0
  99. package/dist/src/protocol/reset-session.d.ts +0 -2
  100. package/dist/src/protocol/routes.d.ts +9 -2
  101. package/dist/src/protocol/routes.js +1 -1
  102. package/dist/src/public/channels/chat-sdk/chatSdkChannel.d.ts +1 -22
  103. package/dist/src/public/channels/discord/discordChannel.d.ts +3 -12
  104. package/dist/src/public/channels/discord/gateway/{index.d.ts → relay.d.ts} +2 -2
  105. package/dist/src/public/channels/discord/gateway/relay.js +1 -0
  106. package/dist/src/public/channels/discord/messages.d.ts +4 -4
  107. package/dist/src/public/channels/github/state.d.ts +0 -2
  108. package/dist/src/public/channels/index.d.ts +1 -2
  109. package/dist/src/public/channels/index.js +1 -1
  110. package/dist/src/public/channels/linear/index.d.ts +1 -1
  111. package/dist/src/public/channels/linear/index.js +1 -1
  112. package/dist/src/public/channels/linear/linearChannel.d.ts +0 -5
  113. package/dist/src/public/channels/linq/index.d.ts +1 -1
  114. package/dist/src/public/channels/linq/linqChannel.d.ts +7 -5
  115. package/dist/src/public/channels/photon/index.d.ts +1 -1
  116. package/dist/src/public/channels/photon/photonIMessageChannel.d.ts +15 -4
  117. package/dist/src/public/channels/slack/api.d.ts +1 -1
  118. package/dist/src/public/channels/slack/api.js +1 -1
  119. package/dist/src/public/channels/slack/blocks.d.ts +1 -1
  120. package/dist/src/public/channels/slack/blocks.js +2 -2
  121. package/dist/src/public/channels/slack/cards.d.ts +2 -297
  122. package/dist/src/public/channels/slack/cards.js +1 -1
  123. package/dist/src/public/channels/slack/index.d.ts +2 -2
  124. package/dist/src/public/channels/slack/index.js +1 -1
  125. package/dist/src/public/channels/slack/session-operations.d.ts +2 -2
  126. package/dist/src/public/channels/slack/session-operations.js +1 -1
  127. package/dist/src/public/channels/slack/slackChannel.d.ts +11 -72
  128. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  129. package/dist/src/public/channels/teams/teamsChannel.d.ts +4 -3
  130. package/dist/src/public/channels/telegram/hitl.d.ts +2 -9
  131. package/dist/src/public/channels/telegram/index.d.ts +1 -1
  132. package/dist/src/public/channels/telegram/telegramChannel.d.ts +0 -2
  133. package/dist/src/public/channels/twilio/twilioChannel.d.ts +0 -2
  134. package/dist/src/public/channels/undelivered-reply.d.ts +0 -5
  135. package/dist/src/public/definitions/agent.d.ts +15 -7
  136. package/dist/src/public/definitions/agent.js +1 -1
  137. package/dist/src/public/definitions/channel.d.ts +7 -5
  138. package/dist/src/public/definitions/channel.js +1 -1
  139. package/dist/src/public/definitions/connections/protocol.d.ts +1 -7
  140. package/dist/src/public/definitions/connections/protocol.js +1 -1
  141. package/dist/src/public/experimental/channels/discord/gateway.d.ts +1 -0
  142. package/dist/src/public/experimental/channels/discord/gateway.js +1 -0
  143. package/dist/src/public/experimental/sandbox/just-bash.d.ts +1 -0
  144. package/dist/src/public/experimental/sandbox/just-bash.js +1 -0
  145. package/dist/src/public/experimental/workspace/index.d.ts +1 -0
  146. package/dist/src/public/experimental/workspace/index.js +1 -0
  147. package/dist/src/public/index.d.ts +2 -2
  148. package/dist/src/public/index.js +1 -1
  149. package/dist/src/public/instrumentation/otel.d.ts +1 -1
  150. package/dist/src/public/instrumentation/provider.d.ts +1 -1
  151. package/dist/src/public/instrumentation/provider.js +1 -1
  152. package/dist/src/public/memory/file/backend.d.ts +1 -1
  153. package/dist/src/public/memory/file/backends/in-memory.js +1 -1
  154. package/dist/src/public/memory/file/backends/vercel-blob.js +1 -1
  155. package/dist/src/public/memory/file/provider.js +1 -1
  156. package/dist/src/public/memory/index.d.ts +3 -11
  157. package/dist/src/public/models/anthropic/index.d.ts +1 -1
  158. package/dist/src/public/models/index.d.ts +1 -0
  159. package/dist/src/public/models/openai/index.d.ts +2 -2
  160. package/dist/src/public/next/index.d.ts +2 -2
  161. package/dist/src/public/sandbox/just-bash-sandbox.d.ts +27 -20
  162. package/dist/src/public/sandbox/just-bash.d.ts +0 -1
  163. package/dist/src/public/sessions/index.d.ts +1 -0
  164. package/dist/src/public/sessions/index.js +1 -1
  165. package/dist/src/public/tools/index.d.ts +1 -1
  166. package/dist/src/public/tools/index.js +1 -1
  167. package/dist/src/public/workflow/api.d.ts +25 -0
  168. package/dist/src/public/workflow/api.js +1 -0
  169. package/dist/src/public/workflow/index.d.ts +76 -0
  170. package/dist/src/public/workflow/index.js +1 -0
  171. package/dist/src/public/workflow-modules.d.ts +2 -17
  172. package/dist/src/react/use-eve-agent.d.ts +3 -2
  173. package/dist/src/react/use-eve-agent.js +1 -1
  174. package/dist/src/reactions/kinds/model.js +1 -1
  175. package/dist/src/runtime/agent/resolve-model.js +1 -1
  176. package/dist/src/runtime/resolve-agent.js +1 -1
  177. package/dist/src/runtime/resolve-dynamic.js +1 -1
  178. package/dist/src/runtime/subagents/dynamic-agent-config.js +1 -1
  179. package/dist/src/runtime/subagents/workflow.js +1 -1
  180. package/dist/src/sandbox/providers/default.js +1 -1
  181. package/dist/src/self-modification/extension/subagents/agent/agent.d.ts +2 -2
  182. package/dist/src/self-modification/sandbox.js +1 -1
  183. package/dist/src/setup/integrations/discord/daemon.js +2 -2
  184. package/dist/src/setup/scaffold/create/project.js +2 -2
  185. package/dist/src/setup/scaffold/create/web-template.d.ts +2 -2
  186. package/dist/src/setup/scaffold/create/web-template.js +2 -2
  187. package/dist/src/setup/verified-remote-agent.d.ts +1 -3
  188. package/dist/src/shared/agent-definition.d.ts +18 -9
  189. package/dist/src/shared/eve-error.d.ts +22 -0
  190. package/dist/src/shared/eve-error.js +1 -0
  191. package/dist/src/shared/session.d.ts +2 -2
  192. package/dist/src/shared/token-usage.d.ts +7 -1
  193. package/dist/src/svelte/index.js +1 -1
  194. package/dist/src/svelte/use-eve-agent.d.ts +2 -1
  195. package/dist/src/svelte/use-eve-agent.js +1 -1
  196. package/dist/src/tools/definition.d.ts +7 -5
  197. package/dist/src/tools/definition.js +1 -1
  198. package/dist/src/tools/provided/ask-question-workflow.js +1 -1
  199. package/dist/src/tools/provided/sleep-workflow.js +1 -1
  200. package/dist/src/tracing/eve/batch-span-processor.d.ts +1 -1
  201. package/dist/src/tracing/eve/content-span-processor.d.ts +1 -19
  202. package/dist/src/tracing/eve/otel-configuration.d.ts +6 -0
  203. package/dist/src/tracing/eve/otel-declaration.d.ts +6 -19
  204. package/dist/src/tracing/eve/span-export-policy.d.ts +0 -2
  205. package/dist/src/tracing/local/instrumentation-runtime.d.ts +0 -3
  206. package/dist/src/tracing/local/traces.d.ts +0 -13
  207. package/dist/src/vue/index.js +1 -1
  208. package/dist/src/vue/use-eve-agent.d.ts +3 -2
  209. package/dist/src/vue/use-eve-agent.js +1 -1
  210. package/docs/agent-config.md +15 -11
  211. package/docs/channels/custom.mdx +26 -10
  212. package/docs/channels/discord.mdx +10 -10
  213. package/docs/channels/eve.mdx +14 -8
  214. package/docs/channels/linear.mdx +11 -0
  215. package/docs/channels/linq.mdx +5 -1
  216. package/docs/channels/photon.mdx +6 -1
  217. package/docs/channels/slack.mdx +73 -14
  218. package/docs/channels/telegram.mdx +6 -0
  219. package/docs/code-extension.mdx +25 -0
  220. package/docs/concepts/default-harness.md +2 -2
  221. package/docs/concepts/execution-model-and-durability.mdx +11 -11
  222. package/docs/concepts/security-model.md +2 -2
  223. package/docs/concepts/sessions-runs-and-streaming.md +23 -10
  224. package/docs/concepts/upgrade-to-v27-events.md +2 -1
  225. package/docs/connections/overview.mdx +4 -0
  226. package/docs/evals/reporters.mdx +21 -0
  227. package/docs/extensions.md +12 -0
  228. package/docs/getting-started.mdx +5 -1
  229. package/docs/guides/auth-and-route-protection.md +1 -1
  230. package/docs/guides/client/continuations.mdx +12 -10
  231. package/docs/guides/client/messages.mdx +24 -1
  232. package/docs/guides/client/overview.mdx +8 -6
  233. package/docs/guides/client/streaming.mdx +24 -6
  234. package/docs/guides/decide.md +3 -3
  235. package/docs/guides/deployment/vercel.mdx +1 -1
  236. package/docs/guides/dev-tui.md +2 -2
  237. package/docs/guides/frontend/overview.mdx +1 -1
  238. package/docs/guides/frontend/use-eve-agent-svelte.mdx +13 -11
  239. package/docs/guides/frontend/use-eve-agent-vue.mdx +13 -11
  240. package/docs/guides/frontend/use-eve-agent.mdx +4 -4
  241. package/docs/guides/instrumentation/otel.mdx +3 -1
  242. package/docs/guides/prepare-for-1-0.md +255 -0
  243. package/docs/guides/remote-agents.md +22 -20
  244. package/docs/instructions.mdx +1 -1
  245. package/docs/memory/custom-provider.md +1 -1
  246. package/docs/memory/file.md +11 -2
  247. package/docs/meta.json +1 -0
  248. package/docs/reference/agent-files.md +17 -17
  249. package/docs/reference/cli.md +14 -9
  250. package/docs/reference/typescript-api.md +46 -20
  251. package/docs/sandbox/custom-providers.mdx +2 -0
  252. package/docs/sandbox/default.mdx +6 -6
  253. package/docs/sandbox/index.mdx +5 -5
  254. package/docs/sandbox/just-bash.mdx +30 -21
  255. package/docs/subagents/index.mdx +4 -4
  256. package/docs/tools/human-in-the-loop.md +1 -1
  257. package/docs/tools/workflows.mdx +52 -8
  258. package/docs/tutorial/first-agent.mdx +1 -1
  259. package/package.json +36 -9
  260. package/dist/CHANGELOG.md +0 -38
  261. package/dist/src/public/channels/discord/gateway/index.js +0 -1
@@ -1,7 +1,6 @@
1
1
  declare const _Actions: ActionsComponent;
2
2
  interface ActionsComponent {
3
3
  (children: (ButtonElement | LinkButtonElement | SelectElement | RadioSelectElement)[]): ActionsElement;
4
- (props: ContainerProps): ChatElement;
5
4
  }
6
5
  interface ButtonElement {
7
6
  actionType?: "action" | "modal";
@@ -53,127 +52,8 @@ interface ActionsElement {
53
52
  children: (ButtonElement | LinkButtonElement | SelectElement | RadioSelectElement)[];
54
53
  type: "actions";
55
54
  }
56
- interface ContainerProps {
57
- children?: unknown;
58
- }
59
- type ChatElement = CardJSXElement | CardElement | TextElement | ButtonElement | LinkButtonElement | LinkElement | ImageElement | DividerElement | ActionsElement | SectionElement | FieldsElement | FieldElement | ModalElement | TextInputElement | DateInputElement | NumberInputElement | SelectElement | ExternalSelectElement | SelectOptionElement | RadioSelectElement | TableElement | ChartElement;
60
- interface CardJSXElement<P extends CardJSXProps = CardJSXProps> {
61
- $typeof: symbol;
62
- children: unknown[];
63
- props: P;
64
- type: CardComponentFunction;
65
- }
66
- type CardJSXProps = CardProps | TextProps | ButtonProps | LinkButtonProps | CardLinkProps | ImageProps | FieldProps | ContainerProps | DividerProps | ModalProps | TextInputProps | DateInputProps | NumberInputProps | SelectProps | ExternalSelectProps | SelectOptionProps | TableProps | ChartProps;
67
- interface CardProps {
68
- children?: unknown;
69
- imageUrl?: string;
70
- subtitle?: string;
71
- title?: string;
72
- width?: CardWidth;
73
- }
74
55
  type CardWidth = "default" | "full";
75
- interface TextProps {
76
- children?: string | number | (string | number | undefined)[];
77
- style?: TextStyle;
78
- }
79
56
  type TextStyle = "plain" | "bold" | "muted";
80
- interface ButtonProps {
81
- actionType?: "action" | "modal";
82
- callbackUrl?: string;
83
- children?: string | number | (string | number | undefined)[];
84
- disabled?: boolean;
85
- id: string;
86
- label?: string;
87
- style?: ButtonStyle;
88
- tooltip?: string;
89
- value?: string;
90
- visibleTo?: string[];
91
- }
92
- interface LinkButtonProps {
93
- children?: string | number | (string | number | undefined)[];
94
- id?: string;
95
- label?: string;
96
- style?: ButtonStyle;
97
- tooltip?: string;
98
- url: string;
99
- visibleTo?: string[];
100
- }
101
- interface CardLinkProps {
102
- children?: string | number | (string | number | undefined)[];
103
- label?: string;
104
- url: string;
105
- }
106
- interface ImageProps {
107
- alt?: string;
108
- url: string;
109
- }
110
- interface FieldProps {
111
- label: string;
112
- value: string;
113
- }
114
- type DividerProps = Record<string, never>;
115
- interface ModalProps {
116
- callbackId: string;
117
- callbackUrl?: string;
118
- children?: unknown;
119
- closeLabel?: string;
120
- notifyOnClose?: boolean;
121
- privateMetadata?: string;
122
- submitLabel?: string;
123
- title: string;
124
- }
125
- interface TextInputProps {
126
- id: string;
127
- initialValue?: string;
128
- label: string;
129
- maxLength?: number;
130
- multiline?: boolean;
131
- optional?: boolean;
132
- placeholder?: string;
133
- }
134
- interface DateInputProps {
135
- id: string;
136
- initialValue?: string;
137
- label: string;
138
- optional?: boolean;
139
- placeholder?: string;
140
- }
141
- interface NumberInputProps {
142
- decimal?: boolean;
143
- id: string;
144
- initialValue?: number;
145
- label: string;
146
- max?: number;
147
- min?: number;
148
- optional?: boolean;
149
- placeholder?: string;
150
- }
151
- interface SelectProps {
152
- children?: unknown;
153
- dispatchAction?: boolean;
154
- id: string;
155
- initialOption?: string;
156
- label: string;
157
- optional?: boolean;
158
- placeholder?: string;
159
- }
160
- interface ExternalSelectProps {
161
- id: string;
162
- initialOption?: {
163
- label: string;
164
- value: string;
165
- };
166
- label: string;
167
- minQueryLength?: number;
168
- optional?: boolean;
169
- placeholder?: string;
170
- }
171
- interface SelectOptionProps {
172
- description?: string;
173
- label: string;
174
- value: string;
175
- }
176
- type TableProps = TableOptions;
177
57
  interface TableOptions {
178
58
  align?: TableAlignment[];
179
59
  caption?: string;
@@ -188,10 +68,6 @@ interface TableOptions {
188
68
  type TableAlignment = "left" | "center" | "right";
189
69
  type TableGridStyle = "default" | "emphasis" | "accent" | "good" | "attention" | "warning";
190
70
  type TableVerticalAlignment = "top" | "center" | "bottom";
191
- interface ChartProps {
192
- chart: ChartDefinition;
193
- title: string;
194
- }
195
71
  type ChartDefinition = PieChartDefinition | SeriesChartDefinition;
196
72
  interface PieChartDefinition {
197
73
  segments: ChartSegment[];
@@ -216,8 +92,6 @@ interface ChartDataPoint {
216
92
  label: string;
217
93
  value: number;
218
94
  }
219
- type CardComponentFunction = typeof _Card | typeof Text | typeof _Button | typeof _LinkButton | typeof _CardLink | typeof _Image | typeof _Field | typeof _Divider | typeof _Section | typeof _ActionsInternal | typeof _Fields | typeof _Modal | typeof _TextInput | typeof DateInput | typeof NumberInput | typeof _Select | typeof _ExternalSelect | typeof _RadioSelect | typeof _SelectOption | typeof _Table | typeof Chart;
220
- declare function _Card(options?: CardOptions): CardElement;
221
95
  interface CardOptions {
222
96
  children?: CardChild[];
223
97
  imageUrl?: string;
@@ -225,7 +99,7 @@ interface CardOptions {
225
99
  title?: string;
226
100
  width?: CardWidth;
227
101
  }
228
- type CardChild = TextElement | ImageElement | DividerElement | ActionsElement | SectionElement | FieldsElement | LinkElement | TableElement | ChartElement | TextInputElement;
102
+ type CardChild = TextElement | ImageElement | DividerElement | ActionsElement | SectionElement | FieldsElement | LinkElement | TableElement | ChartElement;
229
103
  interface TextElement {
230
104
  content: string;
231
105
  style?: TextStyle;
@@ -265,16 +139,6 @@ interface ChartElement {
265
139
  title: string;
266
140
  type: "chart";
267
141
  }
268
- interface TextInputElement {
269
- id: string;
270
- initialValue?: string;
271
- label: string;
272
- maxLength?: number;
273
- multiline?: boolean;
274
- optional?: boolean;
275
- placeholder?: string;
276
- type: "text_input";
277
- }
278
142
  interface CardElement {
279
143
  children: CardChild[];
280
144
  imageUrl?: string;
@@ -283,10 +147,6 @@ interface CardElement {
283
147
  type: "card";
284
148
  width?: CardWidth;
285
149
  }
286
- declare function Text(content: string, options?: {
287
- style?: TextStyle;
288
- }): TextElement;
289
- declare function _Button(options: ButtonOptions): ButtonElement;
290
150
  interface ButtonOptions {
291
151
  actionType?: "action" | "modal";
292
152
  callbackUrl?: string;
@@ -298,7 +158,6 @@ interface ButtonOptions {
298
158
  value?: string;
299
159
  visibleTo?: string[];
300
160
  }
301
- declare function _LinkButton(options: LinkButtonOptions): LinkButtonElement;
302
161
  interface LinkButtonOptions {
303
162
  id?: string;
304
163
  label: string;
@@ -307,103 +166,6 @@ interface LinkButtonOptions {
307
166
  url: string;
308
167
  visibleTo?: string[];
309
168
  }
310
- declare function _CardLink(options: {
311
- url: string;
312
- label: string;
313
- }): LinkElement;
314
- declare function _Image(options: {
315
- url: string;
316
- alt?: string;
317
- }): ImageElement;
318
- declare function _Field(options: {
319
- label: string;
320
- value: string;
321
- }): FieldElement;
322
- declare function _Divider(): DividerElement;
323
- declare function _Section(children: CardChild[]): SectionElement;
324
- declare function _ActionsInternal(children: (ButtonElement | LinkButtonElement | SelectElement | RadioSelectElement)[]): ActionsElement;
325
- declare function _Fields(children: FieldElement[]): FieldsElement;
326
- declare function _Modal(options: ModalOptions): ModalElement;
327
- interface ModalOptions {
328
- callbackId: string;
329
- callbackUrl?: string;
330
- children?: ModalChild[];
331
- closeLabel?: string;
332
- notifyOnClose?: boolean;
333
- privateMetadata?: string;
334
- submitLabel?: string;
335
- title: string;
336
- }
337
- type ModalChild = TextInputElement | DateInputElement | NumberInputElement | SelectElement | ExternalSelectElement | RadioSelectElement | TextElement | FieldsElement;
338
- interface DateInputElement {
339
- id: string;
340
- initialValue?: string;
341
- label: string;
342
- optional?: boolean;
343
- placeholder?: string;
344
- type: "date_input";
345
- }
346
- interface NumberInputElement {
347
- decimal?: boolean;
348
- id: string;
349
- initialValue?: number;
350
- label: string;
351
- max?: number;
352
- min?: number;
353
- optional?: boolean;
354
- placeholder?: string;
355
- type: "number_input";
356
- }
357
- interface ExternalSelectElement {
358
- id: string;
359
- initialOption?: SelectOptionElement;
360
- label: string;
361
- minQueryLength?: number;
362
- optional?: boolean;
363
- placeholder?: string;
364
- type: "external_select";
365
- }
366
- interface ModalElement {
367
- callbackId: string;
368
- callbackUrl?: string;
369
- children: ModalChild[];
370
- closeLabel?: string;
371
- notifyOnClose?: boolean;
372
- privateMetadata?: string;
373
- submitLabel?: string;
374
- title: string;
375
- type: "modal";
376
- }
377
- declare function _TextInput(options: TextInputOptions): TextInputElement;
378
- interface TextInputOptions {
379
- id: string;
380
- initialValue?: string;
381
- label: string;
382
- maxLength?: number;
383
- multiline?: boolean;
384
- optional?: boolean;
385
- placeholder?: string;
386
- }
387
- declare function DateInput(options: DateInputOptions): DateInputElement;
388
- interface DateInputOptions {
389
- id: string;
390
- initialValue?: string;
391
- label: string;
392
- optional?: boolean;
393
- placeholder?: string;
394
- }
395
- declare function NumberInput(options: NumberInputOptions): NumberInputElement;
396
- interface NumberInputOptions {
397
- decimal?: boolean;
398
- id: string;
399
- initialValue?: number;
400
- label: string;
401
- max?: number;
402
- min?: number;
403
- optional?: boolean;
404
- placeholder?: string;
405
- }
406
- declare function _Select(options: SelectOptions): SelectElement;
407
169
  interface SelectOptions {
408
170
  dispatchAction?: boolean;
409
171
  id: string;
@@ -413,16 +175,6 @@ interface SelectOptions {
413
175
  options: SelectOptionElement[];
414
176
  placeholder?: string;
415
177
  }
416
- declare function _ExternalSelect(options: ExternalSelectOptions): ExternalSelectElement;
417
- interface ExternalSelectOptions {
418
- id: string;
419
- initialOption?: SelectOptionElement;
420
- label: string;
421
- minQueryLength?: number;
422
- optional?: boolean;
423
- placeholder?: string;
424
- }
425
- declare function _RadioSelect(options: RadioSelectOptions): RadioSelectElement;
426
178
  interface RadioSelectOptions {
427
179
  dispatchAction?: boolean;
428
180
  id: string;
@@ -431,26 +183,14 @@ interface RadioSelectOptions {
431
183
  optional?: boolean;
432
184
  options: SelectOptionElement[];
433
185
  }
434
- declare function _SelectOption(options: {
435
- label: string;
436
- value: string;
437
- description?: string;
438
- }): SelectOptionElement;
439
186
  declare function _Table(options: TableOptions): TableElement;
440
- declare function Chart(options: ChartOptions): ChartElement;
441
- interface ChartOptions {
442
- chart: ChartDefinition;
443
- title: string;
444
- }
445
187
  declare const _ButtonInternal: ButtonComponent;
446
188
  interface ButtonComponent {
447
189
  (options: ButtonOptions): ButtonElement;
448
- (props: ButtonProps): ChatElement;
449
190
  }
450
191
  declare const _CardInternal: CardComponent;
451
192
  interface CardComponent {
452
193
  (options?: CardOptions): CardElement;
453
- (props: CardProps): ChatElement;
454
194
  }
455
195
  declare const _CardLinkInternal: CardLinkComponent;
456
196
  interface CardLinkComponent {
@@ -458,24 +198,16 @@ interface CardLinkComponent {
458
198
  url: string;
459
199
  label: string;
460
200
  }): LinkElement;
461
- (props: CardLinkProps): ChatElement;
462
201
  }
463
202
  declare const _CardText: TextComponent;
464
203
  interface TextComponent {
465
204
  (content: string, options?: {
466
205
  style?: TextStyle;
467
206
  }): TextElement;
468
- (props: TextProps): ChatElement;
469
207
  }
470
208
  declare const _DividerInternal: DividerComponent;
471
209
  interface DividerComponent {
472
210
  (): DividerElement;
473
- (props: DividerProps): ChatElement;
474
- }
475
- declare const _ExternalSelectInternal: ExternalSelectComponent;
476
- interface ExternalSelectComponent {
477
- (options: ExternalSelectOptions): ExternalSelectElement;
478
- (props: ExternalSelectProps): ChatElement;
479
211
  }
480
212
  declare const _FieldInternal: FieldComponent;
481
213
  interface FieldComponent {
@@ -483,12 +215,10 @@ interface FieldComponent {
483
215
  label: string;
484
216
  value: string;
485
217
  }): FieldElement;
486
- (props: FieldProps): ChatElement;
487
218
  }
488
219
  declare const _FieldsInternal: FieldsComponent;
489
220
  interface FieldsComponent {
490
221
  (children: FieldElement[]): FieldsElement;
491
- (props: ContainerProps): ChatElement;
492
222
  }
493
223
  declare const _ImageInternal: ImageComponent;
494
224
  interface ImageComponent {
@@ -496,32 +226,22 @@ interface ImageComponent {
496
226
  url: string;
497
227
  alt?: string;
498
228
  }): ImageElement;
499
- (props: ImageProps): ChatElement;
500
229
  }
501
230
  declare const _LinkButtonInternal: LinkButtonComponent;
502
231
  interface LinkButtonComponent {
503
232
  (options: LinkButtonOptions): LinkButtonElement;
504
- (props: LinkButtonProps): ChatElement;
505
- }
506
- declare const _ModalInternal: ModalComponent;
507
- interface ModalComponent {
508
- (options: ModalOptions): ModalElement;
509
- (props: ModalProps): ChatElement;
510
233
  }
511
234
  declare const _RadioSelectInternal: RadioSelectComponent;
512
235
  interface RadioSelectComponent {
513
236
  (options: RadioSelectOptions): RadioSelectElement;
514
- (props: SelectProps): ChatElement;
515
237
  }
516
238
  declare const _SectionInternal: SectionComponent;
517
239
  interface SectionComponent {
518
240
  (children: CardChild[]): SectionElement;
519
- (props: ContainerProps): ChatElement;
520
241
  }
521
242
  declare const _SelectInternal: SelectComponent;
522
243
  interface SelectComponent {
523
244
  (options: SelectOptions): SelectElement;
524
- (props: SelectProps): ChatElement;
525
245
  }
526
246
  declare const _SelectOptionInternal: SelectOptionComponent;
527
247
  interface SelectOptionComponent {
@@ -530,18 +250,8 @@ interface SelectOptionComponent {
530
250
  value: string;
531
251
  description?: string;
532
252
  }): SelectOptionElement;
533
- (props: SelectOptionProps): ChatElement;
534
253
  }
535
254
  declare const _TableInternal: typeof _Table;
536
- declare const _TextInputInternal: TextInputComponent;
537
- interface TextInputComponent {
538
- (options: TextInputOptions): TextInputElement;
539
- (props: TextInputProps): ChatElement;
540
- }
541
- declare const _cardChildToFallbackText: typeof _cardChildToFallbackTextInternal;
542
- declare function _cardChildToFallbackTextInternal(child: CardChild): string | null;
543
- declare const _isCardElement: typeof _isCardElementInternal;
544
- declare function _isCardElementInternal(value: unknown): value is CardElement;
545
255
  interface FileUpload {
546
256
  data: Buffer | Blob | ArrayBuffer;
547
257
  filename: string;
@@ -553,24 +263,19 @@ interface PostableCard {
553
263
  fallbackText?: string;
554
264
  files?: FileUpload[];
555
265
  }
556
- export type { ActionsElement, ButtonElement, ButtonOptions, ButtonProps, ButtonStyle, CardChild, CardElement, CardJSXElement, CardJSXProps, CardLinkProps, CardOptions, CardProps, ChatElement, ContainerProps, DividerElement, DividerProps, ExternalSelectElement, ExternalSelectOptions, ExternalSelectProps, FieldElement, FieldProps, FieldsElement, FileUpload, ImageElement, ImageProps, LinkButtonElement, LinkButtonOptions, LinkButtonProps, LinkElement, ModalChild, ModalElement, ModalOptions, ModalProps, PostableCard, RadioSelectElement, RadioSelectOptions, SectionElement, SelectElement, SelectOptionElement, SelectOptionProps, SelectOptions, SelectProps, TableAlignment, TableElement, TableOptions, TextElement, TextInputElement, TextInputOptions, TextInputProps, TextProps, TextStyle, };
266
+ export type { ActionsElement, ButtonElement, ButtonOptions, ButtonStyle, CardChild, CardElement, CardOptions, DividerElement, FieldElement, FieldsElement, FileUpload, ImageElement, LinkButtonElement, LinkButtonOptions, LinkElement, PostableCard, RadioSelectElement, RadioSelectOptions, SectionElement, SelectElement, SelectOptionElement, SelectOptions, TableAlignment, TableElement, TableOptions, TextElement, TextStyle, };
557
267
  export declare const Actions: typeof _Actions;
558
268
  export declare const Button: typeof _ButtonInternal;
559
269
  export declare const Card: typeof _CardInternal;
560
270
  export declare const CardLink: typeof _CardLinkInternal;
561
271
  export declare const CardText: typeof _CardText;
562
272
  export declare const Divider: typeof _DividerInternal;
563
- export declare const ExternalSelect: typeof _ExternalSelectInternal;
564
273
  export declare const Field: typeof _FieldInternal;
565
274
  export declare const Fields: typeof _FieldsInternal;
566
275
  export declare const Image: typeof _ImageInternal;
567
276
  export declare const LinkButton: typeof _LinkButtonInternal;
568
- export declare const Modal: typeof _ModalInternal;
569
277
  export declare const RadioSelect: typeof _RadioSelectInternal;
570
278
  export declare const Section: typeof _SectionInternal;
571
279
  export declare const Select: typeof _SelectInternal;
572
280
  export declare const SelectOption: typeof _SelectOptionInternal;
573
281
  export declare const Table: typeof _TableInternal;
574
- export declare const TextInput: typeof _TextInputInternal;
575
- export declare const cardChildToFallbackText: typeof _cardChildToFallbackText;
576
- export declare const isCardElement: typeof _isCardElement;
@@ -1 +1 @@
1
- import*as chat from"#compiled/chat/index.js";const Actions=chat.Actions,Button=chat.Button,Card=chat.Card,CardLink=chat.CardLink,CardText=chat.CardText,Divider=chat.Divider,ExternalSelect=chat.ExternalSelect,Field=chat.Field,Fields=chat.Fields,Image=chat.Image,LinkButton=chat.LinkButton,Modal=chat.Modal,RadioSelect=chat.RadioSelect,Section=chat.Section,Select=chat.Select,SelectOption=chat.SelectOption,Table=chat.Table,TextInput=chat.TextInput,cardChildToFallbackText=chat.cardChildToFallbackText,isCardElement=chat.isCardElement;export{Actions,Button,Card,CardLink,CardText,Divider,ExternalSelect,Field,Fields,Image,LinkButton,Modal,RadioSelect,Section,Select,SelectOption,Table,TextInput,cardChildToFallbackText,isCardElement};
1
+ import*as chat from"#compiled/chat/index.js";const Actions=chat.Actions,Button=chat.Button,Card=chat.Card,CardLink=chat.CardLink,CardText=chat.CardText,Divider=chat.Divider,Field=chat.Field,Fields=chat.Fields,Image=chat.Image,LinkButton=chat.LinkButton,RadioSelect=chat.RadioSelect,Section=chat.Section,Select=chat.Select,SelectOption=chat.SelectOption,Table=chat.Table;export{Actions,Button,Card,CardLink,CardText,Divider,Field,Fields,Image,LinkButton,RadioSelect,Section,Select,SelectOption,Table};
@@ -17,5 +17,5 @@ export { answerFromSlackAction, ANSWER_ACTION_PREFIX, renderInteractionBlocks, t
17
17
  * The chat SDK runtime (`Chat`, `Thread`, `Adapter`, etc.) is not
18
18
  * imported and not reachable through this entry point.
19
19
  */
20
- export { Actions, Button, Card, CardLink, CardText, Divider, ExternalSelect, Field, Fields, Image, LinkButton, Modal, RadioSelect, Section, Select, SelectOption, Table, TextInput, cardChildToFallbackText, isCardElement, } from "#public/channels/slack/cards.js";
21
- export type { ActionsElement, ButtonElement, ButtonOptions, ButtonProps, ButtonStyle, CardChild, CardElement, CardJSXElement, CardJSXProps, CardLinkProps, CardOptions, CardProps, ChatElement, ContainerProps, DividerElement, DividerProps, ExternalSelectElement, ExternalSelectOptions, ExternalSelectProps, FieldElement, FieldProps, FieldsElement, FileUpload, ImageElement, ImageProps, LinkButtonElement, LinkButtonOptions, LinkButtonProps, LinkElement, ModalChild, ModalElement, ModalOptions, ModalProps, PostableCard, RadioSelectElement, RadioSelectOptions, SectionElement, SelectElement, SelectOptionElement, SelectOptionProps, SelectOptions, SelectProps, TableAlignment, TableElement, TableOptions, TextElement, TextInputElement, TextInputOptions, TextInputProps, TextProps, TextStyle, } from "#public/channels/slack/cards.js";
20
+ export { Actions, Button, Card, CardLink, CardText, Divider, Field, Fields, Image, LinkButton, RadioSelect, Section, Select, SelectOption, Table, } from "#public/channels/slack/cards.js";
21
+ export type { ActionsElement, ButtonElement, ButtonOptions, ButtonStyle, CardChild, CardElement, CardOptions, DividerElement, FieldElement, FieldsElement, FileUpload, ImageElement, LinkButtonElement, LinkButtonOptions, LinkElement, PostableCard, RadioSelectElement, RadioSelectOptions, SectionElement, SelectElement, SelectOptionElement, SelectOptions, TableAlignment, TableElement, TableOptions, TextElement, TextStyle, } from "#public/channels/slack/cards.js";
@@ -1 +1 @@
1
- import{callSlackApi,resolveSlackBotToken,slackCodeChannelContinuationToken,slackContinuationToken}from"#public/channels/slack/api.js";import{Actions,Button,Card,CardLink,CardText,Divider,ExternalSelect,Field,Fields,Image,LinkButton,Modal,RadioSelect,Section,Select,SelectOption,Table,TextInput,cardChildToFallbackText,isCardElement}from"#public/channels/slack/cards.js";import{cardToBlocks,cardToFallbackText}from"#public/channels/slack/blocks.js";import{postCompletedSlackReply}from"#public/channels/slack/reply-delivery.js";import{openCodeChannel}from"#public/channels/slack/open-code-channel.js";import{slackChannel}from"#public/channels/slack/slackChannel.js";import{defaultSlackAuth}from"#public/channels/slack/defaults.js";import{defineSlackRenderer}from"#public/channels/slack/renderers.js";import{loadThreadContextMessages}from"#public/channels/slack/thread.js";import{ANSWER_ACTION_PREFIX,answerFromSlackAction,renderInteractionBlocks}from"#public/channels/slack/hitl.js";export{ANSWER_ACTION_PREFIX,Actions,Button,Card,CardLink,CardText,Divider,ExternalSelect,Field,Fields,Image,LinkButton,Modal,RadioSelect,Section,Select,SelectOption,Table,TextInput,answerFromSlackAction,callSlackApi,cardChildToFallbackText,cardToBlocks,cardToFallbackText,defaultSlackAuth,defineSlackRenderer,isCardElement,loadThreadContextMessages,openCodeChannel,postCompletedSlackReply,renderInteractionBlocks,resolveSlackBotToken,slackChannel,slackCodeChannelContinuationToken,slackContinuationToken};
1
+ import{callSlackApi,resolveSlackBotToken,slackCodeChannelContinuationToken,slackContinuationToken}from"#public/channels/slack/api.js";import{cardToBlocks,cardToFallbackText}from"#public/channels/slack/blocks.js";import{postCompletedSlackReply}from"#public/channels/slack/reply-delivery.js";import{openCodeChannel}from"#public/channels/slack/open-code-channel.js";import{slackChannel}from"#public/channels/slack/slackChannel.js";import{defaultSlackAuth}from"#public/channels/slack/defaults.js";import{defineSlackRenderer}from"#public/channels/slack/renderers.js";import{loadThreadContextMessages}from"#public/channels/slack/thread.js";import{ANSWER_ACTION_PREFIX,answerFromSlackAction,renderInteractionBlocks}from"#public/channels/slack/hitl.js";import{Actions,Button,Card,CardLink,CardText,Divider,Field,Fields,Image,LinkButton,RadioSelect,Section,Select,SelectOption,Table}from"#public/channels/slack/cards.js";export{ANSWER_ACTION_PREFIX,Actions,Button,Card,CardLink,CardText,Divider,Field,Fields,Image,LinkButton,RadioSelect,Section,Select,SelectOption,Table,answerFromSlackAction,callSlackApi,cardToBlocks,cardToFallbackText,defaultSlackAuth,defineSlackRenderer,loadThreadContextMessages,openCodeChannel,postCompletedSlackReply,renderInteractionBlocks,resolveSlackBotToken,slackChannel,slackCodeChannelContinuationToken,slackContinuationToken};
@@ -21,9 +21,9 @@ export interface SlackSessionOperations {
21
21
  }): ReturnType<SlackSource["cancel"]>;
22
22
  compact(): ReturnType<SlackSource["compact"]>;
23
23
  clear(): ReturnType<SlackSource["clear"]>;
24
- reset(options?: {
24
+ end(options?: {
25
25
  readonly reason?: string;
26
- }): ReturnType<SlackSource["reset"]>;
26
+ }): ReturnType<SlackSource["end"]>;
27
27
  resolveSession(): ReturnType<ChannelResolveSession>;
28
28
  }
29
29
  /** Binds Slack state and default auth needed only when a message creates a session. */
@@ -1 +1 @@
1
- function bindSlackSessionOperations(e){let t=e.from(e.address),auth=t=>t===void 0?e.defaultAuth:t;return{async send(n,r={}){return await t.send(n,{...r,auth:auth(r.auth),state:e.state})},async respond(n,r={}){return await t.respond(n,{...r,auth:auth(r.auth),state:withSlackResponder(r.state,e.state.triggeringUserId)})},async cancel(e){return await t.cancel(e)},async compact(){return await t.compact()},async clear(){return await t.clear()},async reset(e){return await t.reset(e)},async resolveSession(){return await e.resolveSession(e.address)}}}function withSlackResponder(e,t){return t?{...e,triggeringUserId:t}:e}export{bindSlackSessionOperations,withSlackResponder};
1
+ function bindSlackSessionOperations(e){let t=e.from(e.address),auth=t=>t===void 0?e.defaultAuth:t;return{async send(n,r={}){return await t.send(n,{...r,auth:auth(r.auth),state:e.state})},async respond(n,r={}){return await t.respond(n,{...r,auth:auth(r.auth),state:withSlackResponder(r.state,e.state.triggeringUserId)})},async cancel(e){return await t.cancel(e)},async compact(){return await t.compact()},async clear(){return await t.clear()},async end(e){return await t.end(e)},async resolveSession(){return await e.resolveSession(e.address)}}}function withSlackResponder(e,t){return t?{...e,triggeringUserId:t}:e}export{bindSlackSessionOperations,withSlackResponder};
@@ -6,7 +6,6 @@ import type { ChannelResolveSession, ChannelSource } from "#channel/channel-oper
6
6
  import type { Delivery } from "#shared/delivery.js";
7
7
  import type { SessionAuthContext, TurnPolicy } from "#channel/types.js";
8
8
  import type { VercelConnectMetadata } from "#shared/vercel-connect-metadata.js";
9
- import type { CardElement } from "#public/channels/slack/cards.js";
10
9
  import type { BlockKitBlock } from "#public/channels/slack/blocks.js";
11
10
  import type { SlackHitlRoute } from "#public/channels/slack/hitl.js";
12
11
  import type { SessionContext } from "#public/definitions/callback-context.js";
@@ -14,11 +13,9 @@ import type { SessionHistoryMessage } from "#shared/session-history.js";
14
13
  import type { ChannelContinuationOps } from "#public/definitions/channel.js";
15
14
  import type { Answer, StrictAnswers, ValidatedAnswer } from "#shared/input.js";
16
15
  import type { Interaction } from "#channel/interaction-prompts.js";
17
- import { type SlackBotToken, type SlackHandle, type SlackThread, type SlackWorkspaceHandle } from "#public/channels/slack/api.js";
16
+ import { type SlackBotToken, type SlackHandle, type SlackThread, type SlackPostInput, type SlackWorkspaceHandle } from "#public/channels/slack/api.js";
18
17
  import { type SlackTransportOptions } from "#public/channels/slack/transport.js";
19
18
  import { type SlackRenderedEvent, type SlackRenderer } from "#public/channels/slack/renderers.js";
20
- import { type SlackTaskCardState } from "#public/channels/slack/task-card.js";
21
- import type { SlackThreadStatus } from "#public/channels/slack/thread-status.js";
22
19
  import { type SlackEvent, type SlackEventEnvelope, type SlackMessage } from "#public/channels/slack/inbound.js";
23
20
  import { type LoadThreadContextMessagesOptions } from "#public/channels/slack/thread.js";
24
21
  import { type SlackSessionOperations } from "#public/channels/slack/session-operations.js";
@@ -125,18 +122,6 @@ export interface SlackChannelState extends UndeliveredReplyState {
125
122
  threadTs: string | null;
126
123
  /** Whether this session serves a Slack code channel. */
127
124
  codeChannel?: boolean;
128
- /**
129
- * In a code channel, the thread of the message the current turn answers;
130
- * `null` posts top-level.
131
- * @internal
132
- */
133
- replyThreadTs?: string | null;
134
- /**
135
- * In a code channel, the thread of the latest delivered message, which the
136
- * next turn replies in.
137
- * @internal
138
- */
139
- pendingReplyThreadTs?: string | null;
140
125
  /** Slack team id, when the inbound event carried one. */
141
126
  teamId: string | null;
142
127
  /** Slack message ts that triggered the active turn. */
@@ -149,59 +134,12 @@ export interface SlackChannelState extends UndeliveredReplyState {
149
134
  * recipients through `slackUsersByPrincipal` instead.
150
135
  */
151
136
  triggeringUserId?: string | null;
152
- /**
153
- * Buffered narration from a `content.completed` event (`phase: "narration"`). The default `call.requested` handler uses the
154
- * first non-empty line as the next typing indicator, surfacing the
155
- * model's pre-tool narration instead of the action label. Cleared at
156
- * `turn.started` and after use.
157
- */
158
- pendingToolCallMessage?: string | null;
159
- /**
160
- * The thread status the default renderer last set. A later model step shows
161
- * it again, as does a new task card, which Slack clears the status for.
162
- */
163
- threadStatus?: SlackThreadStatus | null;
164
- /**
165
- * Connection name to Slack message ts. Each entry is the public
166
- * link-free status post created by the default
167
- * sign-in `interaction.opened` handler; the matching
168
- * sign-in `interaction.settled` handler edits it in place to surface the
169
- * resolution outcome.
170
- */
171
- pendingAuthMessageTs?: Record<string, string>;
172
- /**
173
- * The messages holding open or recently answered approvals, questions, and budget prompts.
174
- * Each is updated as its requests change and forgotten once all of them settle. eve ignores
175
- * the `pendingApprovalCards` field that earlier versions wrote, so cards posted before an
176
- * upgrade keep their buttons.
177
- */
178
- interactionCards?: readonly SlackInteractionCardRecord[];
179
- /**
180
- * Each recent turn's tool calls and the task card eve last wrote for it, by
181
- * turn id. The default `turn.paused` handler names the working tasks.
182
- */
183
- taskCards?: Record<string, SlackTaskCardState> | null;
184
- /**
185
- * Tasks that settled since the turn's last model step: each named agent, or
186
- * `null` for another task. The default `step.started` handler shows
187
- * `Reviewing results...` for the step that reads them.
188
- */
189
- pendingTaskResults?: {
190
- readonly names: readonly (string | null)[];
191
- readonly turnId: string;
192
- } | null;
193
137
  /**
194
138
  * Principal id to Slack user id, recorded as each message or input response
195
139
  * is delivered. Default handlers use it to address the principal named on
196
140
  * sign-in `interaction.opened` and approval events.
197
141
  */
198
142
  slackUsersByPrincipal?: Record<string, string>;
199
- /**
200
- * Whether eve has posted in this thread. Once it has, deleting the root
201
- * leaves a tombstone that keeps the thread, so the final reply skips the
202
- * deleted-root check.
203
- */
204
- postedInThread?: boolean;
205
143
  }
206
144
  /**
207
145
  * Per-session metadata attached to tracing spans, projected by the
@@ -285,13 +223,14 @@ export interface SlackCodeChannelTarget {
285
223
  }
286
224
  /**
287
225
  * Pre-agent post issued by `slackChannel().receive` when the caller
288
- * provides `target.initialMessage`. Mirrors `ctx.thread.post`'s card
289
- * variant so the same `Card({...})` construction can be reused.
226
+ * provides `target.initialMessage`. Accepts the same explicit message forms
227
+ * as `ctx.thread.post`: Markdown, text, blocks, or a card, plus optional files.
228
+ *
229
+ * Unlike `thread.post({ text, files })`, which sends one message with the files
230
+ * attached, this posts the root message first and then uploads files as a
231
+ * threaded reply. Upload failures are logged, not thrown, so the run still starts.
290
232
  */
291
- export interface SlackInitialMessage {
292
- readonly card: CardElement;
293
- readonly fallbackText?: string;
294
- }
233
+ export type SlackInitialMessage = SlackPostInput;
295
234
  /**
296
235
  * Options for one turn requested by a generic Slack event handler.
297
236
  */
@@ -347,11 +286,11 @@ export interface SlackInboundEventContext {
347
286
  clear(input: {
348
287
  readonly target: SlackSessionTarget;
349
288
  }): ReturnType<ChannelSource<SlackChannelState>["clear"]>;
350
- /** Resets the current session for one Slack thread. */
351
- reset(input: {
289
+ /** Retires the current session for one Slack thread without creating a replacement. */
290
+ end(input: {
352
291
  readonly reason?: string;
353
292
  readonly target: SlackSessionTarget;
354
- }): ReturnType<ChannelSource<SlackChannelState>["reset"]>;
293
+ }): ReturnType<ChannelSource<SlackChannelState>["end"]>;
355
294
  /** Resolves the current session for one Slack thread. */
356
295
  resolveSession(input: {
357
296
  readonly target: SlackSessionTarget;