@novu/framework 2.13.2 → 2.14.0-rc.5ea799b171

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 (86) hide show
  1. package/dist/cjs/{agent.types-crcJBtCy.d.cts → agent.types-ButmIWLf.d.cts} +260 -22
  2. package/dist/cjs/ai-sdk/index.cjs +2 -2
  3. package/dist/cjs/ai-sdk/index.d.cts +4 -2
  4. package/dist/cjs/cards.cjs +60 -52
  5. package/dist/cjs/cards.d.cts +1 -1
  6. package/dist/cjs/{health-check.types-C2XZ-Tpt.d.cts → health-check.types-w3F_4NHh.d.cts} +2 -2
  7. package/dist/cjs/{index-DVSB455a.d.cts → index-tLP27-lJ.d.cts} +3 -3
  8. package/dist/cjs/index.cjs +134 -126
  9. package/dist/cjs/index.d.cts +5 -5
  10. package/dist/cjs/internal/index.cjs +52 -44
  11. package/dist/cjs/internal/index.d.cts +163 -36
  12. package/dist/cjs/jsx-dev-runtime.cjs +1 -1
  13. package/dist/cjs/jsx-runtime.cjs +1 -1
  14. package/dist/cjs/langchain/index.cjs +2 -2
  15. package/dist/cjs/langchain/index.d.cts +4 -2
  16. package/dist/cjs/servers/express.cjs +138 -130
  17. package/dist/cjs/servers/express.d.cts +6 -6
  18. package/dist/cjs/servers/h3.cjs +137 -129
  19. package/dist/cjs/servers/h3.d.cts +6 -6
  20. package/dist/cjs/servers/hono.cjs +138 -130
  21. package/dist/cjs/servers/hono.d.cts +6 -6
  22. package/dist/cjs/servers/lambda.cjs +138 -130
  23. package/dist/cjs/servers/lambda.d.cts +6 -6
  24. package/dist/cjs/servers/nest.cjs +131 -123
  25. package/dist/cjs/servers/nest.d.cts +8 -8
  26. package/dist/cjs/servers/next.cjs +137 -129
  27. package/dist/cjs/servers/next.d.cts +6 -6
  28. package/dist/cjs/servers/nuxt.cjs +137 -129
  29. package/dist/cjs/servers/nuxt.d.cts +6 -6
  30. package/dist/cjs/servers/remix.cjs +138 -130
  31. package/dist/cjs/servers/remix.d.cts +6 -6
  32. package/dist/cjs/servers/sveltekit.cjs +138 -130
  33. package/dist/cjs/servers/sveltekit.d.cts +6 -6
  34. package/dist/cjs/step-resolver.cjs +4 -4
  35. package/dist/cjs/step-resolver.d.cts +2 -2
  36. package/dist/cjs/{subscriber.types-BanvmGul.d.cts → subscriber.types-PYzkmyuf.d.cts} +248 -0
  37. package/dist/esm/{agent.types-DFLG1_vb.d.ts → agent.types-C9T8i5SY.d.ts} +260 -22
  38. package/dist/esm/ai-sdk/index.d.ts +4 -2
  39. package/dist/esm/ai-sdk/index.js +1 -1
  40. package/dist/esm/cards.d.ts +1 -1
  41. package/dist/esm/cards.js +1 -1
  42. package/dist/esm/chunk-2ANSU3EI.js +1 -0
  43. package/dist/esm/chunk-5DVHK5DS.js +1 -0
  44. package/dist/esm/{chunk-IREH6K2M.js → chunk-E54LXWY3.js} +4 -4
  45. package/dist/esm/chunk-H3BQFYPR.js +0 -0
  46. package/dist/esm/{chunk-RBTQQ5IZ.js → chunk-ICOHH7TO.js} +23 -15
  47. package/dist/esm/chunk-IHERFGZC.js +36 -0
  48. package/dist/esm/chunk-JWRKOFAS.js +98 -0
  49. package/dist/esm/{health-check.types-DORn4djx.d.ts → health-check.types-Dp-fsCai.d.ts} +2 -2
  50. package/dist/esm/{index-BvRGmHFw.d.ts → index-DBKGOU-x.d.ts} +3 -3
  51. package/dist/esm/index.d.ts +5 -5
  52. package/dist/esm/index.js +1 -1
  53. package/dist/esm/internal/index.d.ts +154 -27
  54. package/dist/esm/internal/index.js +1 -1
  55. package/dist/esm/jsx-dev-runtime.js +1 -1
  56. package/dist/esm/{jsx-runtime-5ZWEWA4A.js → jsx-runtime-MFTS7BPV.js} +1 -1
  57. package/dist/esm/jsx-runtime.js +1 -1
  58. package/dist/esm/langchain/index.d.ts +4 -2
  59. package/dist/esm/langchain/index.js +1 -1
  60. package/dist/esm/servers/express.d.ts +6 -6
  61. package/dist/esm/servers/express.js +1 -1
  62. package/dist/esm/servers/h3.d.ts +6 -6
  63. package/dist/esm/servers/h3.js +1 -1
  64. package/dist/esm/servers/hono.d.ts +6 -6
  65. package/dist/esm/servers/hono.js +1 -1
  66. package/dist/esm/servers/lambda.d.ts +6 -6
  67. package/dist/esm/servers/lambda.js +1 -1
  68. package/dist/esm/servers/nest.d.ts +8 -8
  69. package/dist/esm/servers/nest.js +1 -1
  70. package/dist/esm/servers/next.d.ts +6 -6
  71. package/dist/esm/servers/next.js +1 -1
  72. package/dist/esm/servers/nuxt.d.ts +6 -6
  73. package/dist/esm/servers/nuxt.js +1 -1
  74. package/dist/esm/servers/remix.d.ts +6 -6
  75. package/dist/esm/servers/remix.js +1 -1
  76. package/dist/esm/servers/sveltekit.d.ts +6 -6
  77. package/dist/esm/servers/sveltekit.js +1 -1
  78. package/dist/esm/step-resolver.d.ts +2 -2
  79. package/dist/esm/step-resolver.js +1 -1
  80. package/dist/esm/{subscriber.types-Drf26WPA.d.ts → subscriber.types-UA_2pkYJ.d.ts} +248 -0
  81. package/package.json +2 -2
  82. package/dist/esm/chunk-4ETX7FIT.js +0 -1
  83. package/dist/esm/chunk-JLKEQIWC.js +0 -98
  84. package/dist/esm/chunk-PU74XQ2P.js +0 -1
  85. package/dist/esm/chunk-X5AZIKIR.js +0 -36
  86. /package/dist/esm/{chunk-7C3QBYLB.js → chunk-FOODV6YZ.js} +0 -0
@@ -1,9 +1,9 @@
1
- export { C as Client, N as NovuRequestHandler, S as ServeHandlerOptions, a as agent, i as isFromWorkflow, w as workflow } from './index-BvRGmHFw.js';
2
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from './health-check.types-DORn4djx.js';
3
- export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Image, ImageElement, Select, SelectOption, TextInput } from 'chat';
4
- export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentContextPayload, f as AgentContextValue, g as AgentConversation, h as AgentDeliveryError, i as AgentError, j as AgentHandlerContext, k as AgentHandlers, l as AgentHistoryEntry, m as AgentHumanResponse, n as AgentMessage, o as AgentMessageAuthor, p as AgentMessageContext, q as AgentNotification, r as AgentPlatformContext, s as AgentReaction, t as AgentReactionContext, u as AgentResolveContext, v as AgentSubscriber, w as AgentSubscriberAccess, x as AgentToolCall, F as FileRef, H as HumanAskApproveOptions, y as HumanChooseOptions, z as HumanInteractionKind, B as HumanTellOptions, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, C as ToolApprovalConfig, D as ToolApprovalDecision, E as toAgentError } from './agent.types-DFLG1_vb.js';
1
+ export { C as Client, N as NovuRequestHandler, S as ServeHandlerOptions, a as agent, i as isFromWorkflow, w as workflow } from './index-DBKGOU-x.js';
2
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from './health-check.types-Dp-fsCai.js';
3
+ export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Chart, ChartElement, Divider, Image, ImageElement, LinkButton, LinkButtonElement, Select, SelectOption, Table, TableElement, TextInput } from 'chat';
4
+ export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentContextPayload, f as AgentContextValue, g as AgentConversation, h as AgentDeliveryError, i as AgentError, j as AgentHandlerContext, k as AgentHandlers, l as AgentHistoryEntry, m as AgentHumanResponse, n as AgentMessage, o as AgentMessageAuthor, p as AgentMessageContext, q as AgentMessageDeletedContext, r as AgentMessageUpdatedContext, s as AgentNotification, t as AgentPlatformContext, u as AgentReaction, v as AgentReactionContext, w as AgentResolveContext, x as AgentSubscriber, y as AgentSubscriberAccess, z as AgentToolCall, F as FileRef, H as HumanAskApproveOptions, B as HumanChooseOptions, C as HumanInteractionKind, D as HumanTellOptions, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, E as ToolApprovalConfig, G as ToolApprovalDecision, I as toAgentError } from './agent.types-C9T8i5SY.js';
5
5
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, ToolStepResolver, step } from './step-resolver.js';
6
- export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from './subscriber.types-Drf26WPA.js';
6
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from './subscriber.types-UA_2pkYJ.js';
7
7
  import './util.types-DaFfsxgy.js';
8
8
  import './base.schema.types-BApIn9jr.js';
9
9
  import 'json-schema-to-ts';
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{b as m,c as q,d as r,e as u}from"./chunk-JLKEQIWC.js";import{a as v}from"./chunk-YLCLZVYS.js";import"./chunk-XIVU4VDS.js";import{N as n,O as o,P as p,W as t}from"./chunk-4ETX7FIT.js";import{a,b,c,d,e,f,i as g,p as h,q as i,r as j}from"./chunk-X5AZIKIR.js";import"./chunk-RBTQQ5IZ.js";import{a as s}from"./chunk-IREH6K2M.js";import{f as k}from"./chunk-VY27ZAO7.js";import{b as l}from"./chunk-PU74XQ2P.js";import"./chunk-FHYMHX3T.js";export{a as Actions,o as AgentDeliveryError,n as AgentError,b as Button,c as Card,d as CardLink,e as CardText,m as Client,k as CronExpression,f as Divider,g as Image,q as NovuRequestHandler,h as Select,i as SelectOption,t as SeverityLevelEnum,j as TextInput,r as agent,l as isFromWorkflow,s as providerSchemas,v as step,p as toAgentError,u as workflow};
1
+ import{b as p,c as t,d as u,e as x}from"./chunk-JWRKOFAS.js";import"./chunk-H3BQFYPR.js";import{a as y}from"./chunk-YLCLZVYS.js";import"./chunk-XIVU4VDS.js";import{R as q,S as r,T as s,X as w}from"./chunk-2ANSU3EI.js";import{a,b,c,d,e,f,g,j as h,k as i,m as j,q as k,r as l,s as m}from"./chunk-IHERFGZC.js";import"./chunk-ICOHH7TO.js";import{a as v}from"./chunk-E54LXWY3.js";import{f as n}from"./chunk-VY27ZAO7.js";import{c as o}from"./chunk-5DVHK5DS.js";import"./chunk-FHYMHX3T.js";export{a as Actions,r as AgentDeliveryError,q as AgentError,b as Button,c as Card,d as CardLink,e as CardText,f as Chart,p as Client,n as CronExpression,g as Divider,h as Image,i as LinkButton,t as NovuRequestHandler,k as Select,l as SelectOption,w as SeverityLevelEnum,j as Table,m as TextInput,u as agent,o as isFromWorkflow,v as providerSchemas,y as step,s as toAgentError,x as workflow};
@@ -1,10 +1,10 @@
1
- import { P as PostActionEnum } from '../health-check.types-DORn4djx.js';
2
- export { b as CancelEventTriggerResponse, c as ChannelPreference, C as ClientOptions, d as CodeResult, a as CronExpression, D as DiscoverAgentOutput, e as DiscoverOutput, f as DiscoverProviderOutput, g as DiscoverStepOutput, h as DiscoverWorkflowOutput, i as Event, j as EventTriggerParams, k as EventTriggerResponse, l as EventTriggerResult, m as Execute, E as ExecuteInput, n as ExecuteOutput, o as ExecuteOutputMetadata, p as ExecuteOutputOptions, G as GetActionEnum, H as HealthCheck, L as Logger, S as SeverityLevelEnum, q as State, r as StepType, W as Workflow, s as WorkflowChannelEnum, t as WorkflowOptions, u as WorkflowPreference, v as WorkflowPreferences } from '../health-check.types-DORn4djx.js';
3
- export { e as ActionStep, A as ActionStepEnum, f as ChannelStep, c as ChannelStepEnum, g as ChatOutput, h as ChatOutputUnvalidated, i as ChatResult, a as ContextPayload, C as ContextResolved, j as ContextValue, k as CustomStep, D as DelayDynamicOutput, l as DelayDynamicOutputUnvalidated, m as DelayOutput, n as DelayOutputUnvalidated, o as DelayRegularOutput, q as DelayRegularOutputUnvalidated, r as DelayResult, s as DelayTimedOutput, t as DelayTimedOutputUnvalidated, u as DigestOutput, v as DigestOutputUnvalidated, w as DigestRegularOutput, x as DigestRegularOutputUnvalidated, y as DigestResult, z as DigestTimedOutput, B as DigestTimedOutputUnvalidated, F as EmailOutput, G as EmailOutputUnvalidated, H as EmailResult, E as EnvironmentSystemVariables, I as InAppOutput, J as InAppOutputUnvalidated, K as InAppResult, L as JobStatusEnum, P as PushOutput, M as PushOutputUnvalidated, N as PushResult, O as Skip, Q as SmsOutput, R as SmsOutputUnvalidated, T as SmsResult, b as Step, U as StepContext, d as StepOptions, V as StepOutput, S as Subscriber, X as ThrottleOutput, Y as ThrottleOutputUnvalidated, Z as ThrottleResult, _ as ToolOutput, $ as ToolOutputUnvalidated, a0 as actionStepSchemas, a1 as channelStepSchemas } from '../subscriber.types-Drf26WPA.js';
1
+ import { P as PostActionEnum } from '../health-check.types-Dp-fsCai.js';
2
+ export { b as CancelEventTriggerResponse, c as ChannelPreference, C as ClientOptions, d as CodeResult, a as CronExpression, D as DiscoverAgentOutput, e as DiscoverOutput, f as DiscoverProviderOutput, g as DiscoverStepOutput, h as DiscoverWorkflowOutput, i as Event, j as EventTriggerParams, k as EventTriggerResponse, l as EventTriggerResult, m as Execute, E as ExecuteInput, n as ExecuteOutput, o as ExecuteOutputMetadata, p as ExecuteOutputOptions, G as GetActionEnum, H as HealthCheck, L as Logger, S as SeverityLevelEnum, q as State, r as StepType, W as Workflow, s as WorkflowChannelEnum, t as WorkflowOptions, u as WorkflowPreference, v as WorkflowPreferences } from '../health-check.types-Dp-fsCai.js';
3
+ export { e as ActionStep, A as ActionStepEnum, f as ChannelStep, c as ChannelStepEnum, g as ChatOutput, h as ChatOutputUnvalidated, i as ChatResult, a as ContextPayload, C as ContextResolved, j as ContextValue, k as CustomStep, D as DelayDynamicOutput, l as DelayDynamicOutputUnvalidated, m as DelayOutput, n as DelayOutputUnvalidated, o as DelayRegularOutput, q as DelayRegularOutputUnvalidated, r as DelayResult, s as DelayTimedOutput, t as DelayTimedOutputUnvalidated, u as DigestOutput, v as DigestOutputUnvalidated, w as DigestRegularOutput, x as DigestRegularOutputUnvalidated, y as DigestResult, z as DigestTimedOutput, B as DigestTimedOutputUnvalidated, F as EmailOutput, G as EmailOutputUnvalidated, H as EmailResult, E as EnvironmentSystemVariables, I as InAppOutput, J as InAppOutputUnvalidated, K as InAppResult, L as JobStatusEnum, P as PushOutput, M as PushOutputUnvalidated, N as PushResult, O as Skip, Q as SmsOutput, R as SmsOutputUnvalidated, T as SmsResult, b as Step, U as StepContext, d as StepOptions, V as StepOutput, S as Subscriber, X as ThrottleOutput, Y as ThrottleOutputUnvalidated, Z as ThrottleResult, _ as ToolOutput, $ as ToolOutputUnvalidated, a0 as actionStepSchemas, a1 as channelStepSchemas } from '../subscriber.types-UA_2pkYJ.js';
4
4
  import { Filter, LiquidOptions, Liquid } from 'liquidjs';
5
5
  import { Emoji } from 'chat';
6
- import { j as AgentHandlerContext, L as ToolResult, N as ToolApprovalRequestPayload, T as ToolApprovalCard, R as ReplyHandle, p as AgentMessageContext, O as AgentEventEnum, a as AgentAction, n as AgentMessage, s as AgentReaction, g as AgentConversation, v as AgentSubscriber, e as AgentContextPayload, q as AgentNotification, l as AgentHistoryEntry, r as AgentPlatformContext, m as AgentHumanResponse, P as TypingControl, Q as ToolApprovalControl, S as AgentBridgeRequest, C as ToolApprovalConfig, M as MessageContent, F as FileRef, U as ReplyContent, V as Signal, X as AddReactionPayload, Y as DeleteMessagePayload, Z as SentMessageInfo, _ as TypingOp, G as TriggerRecipientsPayload, H as HumanAskApproveOptions, y as HumanChooseOptions, B as HumanTellOptions } from '../agent.types-DFLG1_vb.js';
7
- export { $ as AgentReplyPayload, a0 as EditPayload, a1 as HumanSignal, a2 as MetadataSignal, a3 as ParsedApprovalAction, a4 as TriggerSignal, a5 as buildApprovalActionId, a6 as parseApprovalActionId } from '../agent.types-DFLG1_vb.js';
6
+ import { j as AgentHandlerContext, O as ToolResult, P as ToolApprovalRequestPayload, T as ToolApprovalCard, R as ReplyHandle, p as AgentMessageContext, Q as AgentEventEnum, a as AgentAction, n as AgentMessage, u as AgentReaction, g as AgentConversation, x as AgentSubscriber, e as AgentContextPayload, s as AgentNotification, l as AgentHistoryEntry, t as AgentPlatformContext, m as AgentHumanResponse, S as TypingControl, U as ToolApprovalControl, V as AgentBridgeRequest, E as ToolApprovalConfig, M as MessageContent, X as AgentReplyOptions, Y as ReplyContent, Z as Signal, _ as AddReactionPayload, $ as DeleteMessagePayload, a0 as SentMessageInfo, a1 as TypingOp, F as FileRef, K as TriggerRecipientsPayload, a2 as HumanAskOptions, a3 as HumanAskRenderOptions, H as HumanAskApproveOptions, a4 as HumanAskApproveRenderOptions, a5 as HumanOptionInput, B as HumanChooseOptions, a6 as HumanChooseRenderOptions, D as HumanTellOptions, a7 as HumanTellRenderOptions } from '../agent.types-C9T8i5SY.js';
7
+ export { a8 as AgentReplyPayload, a9 as EditPayload, aa as HumanSignal, ab as MetadataSignal, ac as ParsedApprovalAction, ad as TriggerSignal, ae as buildApprovalActionId, af as parseApprovalActionId } from '../agent.types-C9T8i5SY.js';
8
8
  export { a as FromSchema, F as FromSchemaUnvalidated, J as JsonSchema, S as Schema, Z as ZodSchema, b as ZodSchemaMinimal } from '../base.schema.types-BApIn9jr.js';
9
9
  export { S as SupportedFrameworkName } from '../server.types-Cc6o5eYH.js';
10
10
  export { A as Awaitable, C as ConditionalPartial, D as DeepPartial, b as DeepRequired, E as Either, I as Indexable, c as PickOptional, d as PickOptionalKeys, e as PickRequired, P as PickRequiredKeys, a as Prettify } from '../util.types-DaFfsxgy.js';
@@ -177,6 +177,8 @@ type CardElementLinkButtonElement = {
177
177
  style?: 'primary' | 'danger' | 'default';
178
178
  /** Optional author-provided id; platform serializers use it (e.g. Slack `action_id`). */
179
179
  id?: string;
180
+ /** Hover text; Teams renders it; other platforms ignore it. */
181
+ tooltip?: string;
180
182
  };
181
183
  /** Interactive action button (Chat SDK `Button`). Drives `sendAction` in web chat. */
182
184
  type CardElementButtonElement = {
@@ -188,6 +190,8 @@ type CardElementButtonElement = {
188
190
  callbackUrl?: string;
189
191
  value?: string;
190
192
  disabled?: boolean;
193
+ /** Hover text; Teams renders it; other platforms ignore it. */
194
+ tooltip?: string;
191
195
  };
192
196
  type CardElementSelectOptionElement = {
193
197
  label: string;
@@ -232,19 +236,53 @@ type CardElementTableElement = {
232
236
  headers: string[];
233
237
  rows: string[][];
234
238
  align?: Array<'left' | 'center' | 'right'>;
239
+ caption?: string;
240
+ pageSize?: number;
241
+ };
242
+ type CardElementChartSegment = {
243
+ label: string;
244
+ value: number;
245
+ };
246
+ type CardElementChartDataPoint = {
247
+ label: string;
248
+ value: number;
249
+ };
250
+ type CardElementChartSeries = {
251
+ name: string;
252
+ data: CardElementChartDataPoint[];
253
+ };
254
+ type CardElementPieChartDefinition = {
255
+ type: 'pie';
256
+ segments: CardElementChartSegment[];
257
+ };
258
+ type CardElementSeriesChartDefinition = {
259
+ type: 'area' | 'bar' | 'line';
260
+ categories: string[];
261
+ series: CardElementChartSeries[];
262
+ xLabel?: string;
263
+ yLabel?: string;
264
+ };
265
+ type CardElementChartDefinition = CardElementPieChartDefinition | CardElementSeriesChartDefinition;
266
+ /** Chat SDK `Chart`. */
267
+ type CardElementChartElement = {
268
+ type: 'chart';
269
+ title: string;
270
+ chart: CardElementChartDefinition;
235
271
  };
236
272
  type CardElementSectionElement = {
237
273
  type: 'section';
238
274
  children: CardElementChild[];
239
275
  };
240
276
  /** Includes top-level `button` — agents emit that shape, not only `actions` wrappers. */
241
- type CardElementChild = CardElementTextElement | CardElementImageElement | CardElementDividerElement | CardElementLinkElement | CardElementButtonElement | CardElementActionsElement | CardElementSectionElement | CardElementFieldsElement | CardElementTableElement;
277
+ type CardElementChild = CardElementTextElement | CardElementImageElement | CardElementDividerElement | CardElementLinkElement | CardElementButtonElement | CardElementActionsElement | CardElementSectionElement | CardElementFieldsElement | CardElementTableElement | CardElementChartElement;
242
278
  type CardElement = {
243
279
  type: 'card';
244
280
  title?: string;
245
281
  subtitle?: string;
246
282
  imageUrl?: string;
247
283
  children: CardElementChild[];
284
+ /** Width hint for Teams full-width cards; other platforms ignore it. */
285
+ width?: 'default' | 'full';
248
286
  };
249
287
 
250
288
  type AgentMessageRole = 'user' | 'assistant';
@@ -293,6 +331,9 @@ interface AgentFileRef {
293
331
  }
294
332
 
295
333
  declare const AGENT_EVENT_PROTOCOL_VERSION: 1;
334
+ interface AgentQuoteReplyContext {
335
+ messageId: string;
336
+ }
296
337
  interface AgentEventUsage {
297
338
  inputTokens?: number;
298
339
  outputTokens?: number;
@@ -317,6 +358,33 @@ interface AgentApprovalRequest {
317
358
  /** Server-minted always-allow-MCP-server action id (MCP tools only). */
318
359
  trustServerActionId?: string;
319
360
  }
361
+ type AgentHumanOptionInput = string | {
362
+ id: string;
363
+ label: string;
364
+ };
365
+ /** Chrome presentation built from the simple args or the `card` arg. */
366
+ type AgentHumanChromeCard = {
367
+ title?: string;
368
+ icon?: string;
369
+ subtitle?: string;
370
+ body?: string;
371
+ approveLabel?: string;
372
+ denyLabel?: string;
373
+ extraActions?: AgentHumanOptionInput[];
374
+ options?: AgentHumanOptionInput[];
375
+ };
376
+ /**
377
+ * Posted `Card` element from `{ render }`. Structural only — this package cannot
378
+ * depend on the `chat` SDK's `CardElement`.
379
+ */
380
+ type AgentHumanCardElement = {
381
+ type: 'card';
382
+ title?: string;
383
+ subtitle?: string;
384
+ imageUrl?: string;
385
+ children: unknown[];
386
+ };
387
+ type AgentHumanCard = AgentHumanChromeCard | AgentHumanCardElement;
320
388
  type AgentSignal = {
321
389
  type: 'metadata';
322
390
  action: 'set';
@@ -337,12 +405,16 @@ type AgentSignal = {
337
405
  } | {
338
406
  type: 'human';
339
407
  kind: 'ask' | 'approve' | 'choose' | 'tell';
340
- prompt: string;
341
408
  requestId: string;
342
- options?: string[];
409
+ /**
410
+ * The only content carrier: chrome, or a posted Card element (`type: 'card'`).
411
+ * Title lives on `card.title`; choose options on `card.options` / option buttons.
412
+ */
413
+ card: AgentHumanCard;
343
414
  from?: string;
344
415
  ttlSeconds?: number;
345
416
  to?: string | string[];
417
+ actionIdentifier?: string;
346
418
  };
347
419
  type AgentEvent = {
348
420
  type: 'run-start';
@@ -372,6 +444,7 @@ type AgentEvent = {
372
444
  role: AgentMessageRole;
373
445
  content: AgentMessageContent;
374
446
  files?: AgentFileRef[];
447
+ quoteReply?: AgentQuoteReplyContext;
375
448
  } | {
376
449
  type: 'message-start';
377
450
  messageId: string;
@@ -427,6 +500,12 @@ type AgentEvent = {
427
500
  messageId?: string;
428
501
  /** When true, no companion message carries the approval UI. The consumer should render its default approval card. */
429
502
  deliverCard?: boolean;
503
+ /** HITL: seconds until the tool gate expires. Server defaults when omitted. */
504
+ ttlSeconds?: number;
505
+ /** HITL: Novu subscriberId(s) allowed to settle the gate. Defaults to the conversation subscriber. */
506
+ to?: string | string[];
507
+ /** HITL: attribution label shown on the approval card. */
508
+ from?: string;
430
509
  } & AgentApprovalRequest) | {
431
510
  type: 'tool-approval-response';
432
511
  approvalId: string;
@@ -792,6 +871,36 @@ interface AgentRuntimeContext extends AgentHandlerContext {
792
871
  asMessageContext(): AgentMessageContext;
793
872
  }
794
873
 
874
+ interface AgentEventOutboxOptions {
875
+ eventsUrl: string;
876
+ secretKey: string;
877
+ conversationId: string;
878
+ agentId: string;
879
+ /** From bridge deliveryId; not guaranteed stable across approval resumes (v1 acceptable). */
880
+ turnId: string;
881
+ fetchFn?: typeof fetch;
882
+ maxRetries?: number;
883
+ }
884
+ declare class AgentEventOutbox {
885
+ readonly runId: string;
886
+ private sequence;
887
+ private buffer;
888
+ private chain;
889
+ private readonly eventsUrl;
890
+ private readonly secretKey;
891
+ private readonly conversationId;
892
+ private readonly agentId;
893
+ private readonly turnId;
894
+ private readonly fetchFn;
895
+ private readonly maxRetries;
896
+ constructor(options: AgentEventOutboxOptions);
897
+ enqueue(event: AgentEvent): void;
898
+ flush(): Promise<void>;
899
+ emit(event: AgentEvent): Promise<void>;
900
+ private postBatchWithRetry;
901
+ private postBatch;
902
+ }
903
+
795
904
  /** Pending side effects queued between replies, drained atomically before each turn action. */
796
905
  interface SideEffectsSnapshot {
797
906
  toolApprovalRequest: ToolApprovalRequestPayload | null;
@@ -803,19 +912,12 @@ interface SideEffectsSnapshot {
803
912
  summary?: string;
804
913
  } | null;
805
914
  }
806
- /**
807
- * A turn's delivery mechanism. Legacy bridges POST a single `AgentReplyPayload` per action;
808
- * SDK-native runs emit one or more `AgentEvent`s to the outbox. `AgentContextImpl` selects one
809
- * implementation per run and delegates to it, instead of branching on the mode at every call site.
810
- */
811
- interface TurnTransport {
812
- sendReply(reply: ReplyContent, sideEffects: SideEffectsSnapshot): Promise<SentMessageInfo | null>;
813
- /**
814
- * Returns `'unaddressable'` when the card was rendered but there is no client-addressable
815
- * message handle for it (event mode: the sink owns approval-card rendering, so there is no
816
- * id it could later resolve an edit/delete against).
817
- */
818
- sendApprovalCard(card: ToolApprovalCard, sideEffects: SideEffectsSnapshot): Promise<SentMessageInfo | null | 'unaddressable'>;
915
+ /** Maps handler delivery calls onto `AgentEvent`s and flushes them through the run outbox. */
916
+ declare class EventOutboxTransport {
917
+ private readonly outbox;
918
+ constructor(outbox: AgentEventOutbox);
919
+ sendReply(reply: ReplyContent, sideEffects: SideEffectsSnapshot, quoteReply?: AgentQuoteReplyContext): Promise<SentMessageInfo | null>;
920
+ sendApprovalCard(_card: ToolApprovalCard, sideEffects: SideEffectsSnapshot): Promise<'unaddressable'>;
819
921
  editMessage(messageId: string, reply: ReplyContent): Promise<SentMessageInfo | null>;
820
922
  deleteMessage(messageId: string): Promise<void>;
821
923
  setTyping(op: TypingOp): Promise<void>;
@@ -824,6 +926,7 @@ interface TurnTransport {
824
926
  queueRunStart(): void;
825
927
  emitRunFinish(outcome: AgentRunOutcome): Promise<void>;
826
928
  reportTurnError(message?: string): Promise<void>;
929
+ private _emitAndFlush;
827
930
  }
828
931
  declare class ReplyHandleImpl implements ReplyHandle {
829
932
  private readonly transport;
@@ -831,7 +934,7 @@ declare class ReplyHandleImpl implements ReplyHandle {
831
934
  platformThreadId: string;
832
935
  /** @internal set when the handler calls `edit()`; dispatch skips default approval card cleanup. */
833
936
  editedByHandler: boolean;
834
- constructor(messageId: string, platformThreadId: string, transport: TurnTransport);
937
+ constructor(messageId: string, platformThreadId: string, transport: EventOutboxTransport);
835
938
  edit(content: MessageContent, options?: {
836
939
  files?: FileRef[];
837
940
  }): Promise<ReplyHandle>;
@@ -842,6 +945,7 @@ declare class AgentContextImpl implements AgentRuntimeContext {
842
945
  readonly event: AgentEventEnum;
843
946
  readonly action: AgentAction | null;
844
947
  readonly message: AgentMessage | null;
948
+ readonly previousMessage: AgentMessage | null;
845
949
  readonly reaction: AgentReaction | null;
846
950
  readonly conversation: AgentConversation;
847
951
  readonly subscriber: AgentSubscriber | null;
@@ -869,11 +973,10 @@ declare class AgentContextImpl implements AgentRuntimeContext {
869
973
  private _metadataState;
870
974
  private readonly _toolApprovalConfig?;
871
975
  private readonly _transport;
976
+ private _pendingHumanRenders;
872
977
  constructor(request: AgentBridgeRequest, secretKey: string, toolApprovalConfig?: ToolApprovalConfig);
873
978
  asMessageContext(): AgentMessageContext;
874
- reply(content: MessageContent, options?: {
875
- files?: FileRef[];
876
- }): Promise<ReplyHandle>;
979
+ reply(content: MessageContent, options?: AgentReplyOptions): Promise<ReplyHandle>;
877
980
  replyApprovalCard(card: ToolApprovalCard): Promise<ReplyHandle>;
878
981
  /** @internal Build a handle to an already-posted message (used to resume an approval). */
879
982
  createReplyHandle(messageId: string): ReplyHandleImpl;
@@ -886,11 +989,34 @@ declare class AgentContextImpl implements AgentRuntimeContext {
886
989
  to?: TriggerRecipientsPayload;
887
990
  payload?: Record<string, unknown>;
888
991
  }): void;
889
- ask(question: string, opts?: HumanAskApproveOptions): string;
992
+ ask(question: string, opts?: HumanAskOptions): string;
993
+ ask(opts: HumanAskOptions & {
994
+ card: {
995
+ title: string;
996
+ };
997
+ }): string;
998
+ ask(opts: HumanAskRenderOptions): string;
890
999
  approve(action: string, opts?: HumanAskApproveOptions): string;
891
- choose(question: string, options: string[], opts?: HumanChooseOptions): string;
1000
+ approve(opts: HumanAskApproveOptions & {
1001
+ card: {
1002
+ title: string;
1003
+ };
1004
+ }): string;
1005
+ approve(opts: HumanAskApproveRenderOptions): string;
1006
+ choose(question: string, options: HumanOptionInput[], opts?: HumanChooseOptions): string;
1007
+ choose(opts: HumanChooseOptions & {
1008
+ card: {
1009
+ title: string;
1010
+ };
1011
+ }): string;
1012
+ choose(opts: HumanChooseRenderOptions): string;
892
1013
  tell(message: string, opts?: HumanTellOptions): string;
1014
+ tell(opts: HumanTellRenderOptions): string;
893
1015
  private queueHumanSignal;
1016
+ private queueRendered;
1017
+ private invokeHumanRender;
1018
+ private pushRenderedChrome;
1019
+ private pushRenderedContent;
894
1020
  /** @internal Queue a gated tool call for the ledger; flushed with the next reply. */
895
1021
  emitToolApprovalRequest(request: ToolApprovalRequestPayload): void;
896
1022
  /** @internal Queue a tool-call outcome to be recorded in history; flushed with the next reply. */
@@ -910,6 +1036,7 @@ declare class AgentContextImpl implements AgentRuntimeContext {
910
1036
  * Called internally after onResolve returns.
911
1037
  */
912
1038
  flush(): Promise<void>;
1039
+ private materializePendingHumanRenders;
913
1040
  private _hasPendingSideEffects;
914
1041
  /** Atomically drains all queued side effects into a snapshot for the transport to deliver. */
915
1042
  private _drainSideEffectsSnapshot;
@@ -1 +1 @@
1
- import{A as ue,B as ce,C as de,D as fe,E as xe,F as Ae,I as ye,J as Re,K as Se,L as r,M as o,Q as a,T as m,V as ve,W as Ee,a as j,b as D,c as H,d as B,e as G,f as K,g as X,h as z,i as Q,j as U,k as Y,m as Z,n as $,o as ee,p as oe,q as re,r as te,s as ne,t as ie,u as pe,v as ae,w as se,x as le,y as me,z as ge}from"../chunk-4ETX7FIT.js";import"../chunk-X5AZIKIR.js";import"../chunk-RBTQQ5IZ.js";import{e as g,f as u}from"../chunk-IREH6K2M.js";import{a as y,b as R,c as S,d as v,e as E,f as I,g as L,h as w,i as O,j as k,k as q,l as J,m as C,n as F,o as P,p as T,q as V,r as h,s as N,t as _,u as M,v as W,w as b}from"../chunk-VY27ZAO7.js";import{a as c,b as d,c as f}from"../chunk-QZ6TSYCK.js";import{e as s,f as l}from"../chunk-PU74XQ2P.js";import"../chunk-FHYMHX3T.js";var Le={toSentence:r};import{jsonrepair as t}from"jsonrepair";function x(e){return t(e)}async function A(e,n,i=o()){let p=await i.parseAndRender(JSON.stringify(e),n);try{return JSON.parse(t(p))}catch{throw new Error("Rendered template output is not valid JSON")}}export{F as ActionStepEnum,m as AgentContextImpl,a as AgentEventEnum,N as BadRequestError,j as BridgeError,C as ChannelStepEnum,W as ConflictError,I as CronExpression,L as ErrorCodeEnum,B as ExecutionEventControlsInvalidError,H as ExecutionEventPayloadInvalidError,Q as ExecutionProviderOutputInvalidError,G as ExecutionStateControlsInvalidError,D as ExecutionStateCorruptError,K as ExecutionStateOutputInvalidError,X as ExecutionStateResultInvalidError,Le as FILTER_VALIDATORS,b as ForbiddenError,V as FrameworkError,R as GetActionEnum,w as HttpHeaderKeysEnum,O as HttpMethodEnum,k as HttpQueryKeysEnum,q as HttpStatusEnum,$ as InvalidActionError,ve as JobStatusEnum,Z as MethodNotAllowedError,ee as MissingSecretKeyError,h as NotFoundError,S as NovuApiEndpointsEnum,oe as PlatformError,y as PostActionEnum,pe as ProviderExecutionFailedError,ie as ProviderNotFoundError,re as ResourceConflictError,J as ResourceEnum,ne as ResourceExecutionFailed,te as ResourceNotFoundError,E as SIGNATURE_TIMESTAMP_TOLERANCE,v as SIGNATURE_TIMESTAMP_TOLERANCE_MINUTES,M as ServerError,Ee as SeverityLevelEnum,me as SignatureExpiredError,le as SignatureInvalidError,ae as SignatureMismatchError,se as SignatureNotFoundError,ue as SignatureVersionInvalidError,ge as SigningKeyNotFoundError,de as StepAlreadyExistsError,z as StepControlCompilationFailedError,fe as StepExecutionFailedError,ce as StepNotFoundError,_ as UnauthorizedError,c as WORKFLOW_ORIGIN_LINE_MAX_CHARS,Ae as WorkflowAlreadyExistsError,P as WorkflowChannelEnum,xe as WorkflowNotFoundError,U as WorkflowPayloadInvalidError,g as actionStepSchemas,s as buildApprovalActionId,f as buildWorkflowOriginInjection,d as buildWorkflowOriginLine,u as channelStepSchemas,A as compileJsonControlValues,o as createLiquidEngine,ye as digest,Y as isFrameworkError,T as isNativeError,l as parseApprovalActionId,Re as pluralize,x as repairJsonString,Se as toSentence,r as toSentenceArgsValidator};
1
+ import{A as ue,B as ce,C as de,D as fe,E as xe,F as Ae,I as ye,J as Re,K as Se,L as r,M as o,N as a,U as m,W as ve,X as Ee,a as j,b as D,c as H,d as B,e as G,f as K,g as X,h as z,i as Q,j as U,k as Y,m as Z,n as $,o as ee,p as oe,q as re,r as te,s as ne,t as ie,u as pe,v as ae,w as se,x as le,y as me,z as ge}from"../chunk-2ANSU3EI.js";import"../chunk-IHERFGZC.js";import"../chunk-ICOHH7TO.js";import{e as g,f as u}from"../chunk-E54LXWY3.js";import{a as y,b as R,c as S,d as v,e as E,f as I,g as L,h as w,i as O,j as k,k as q,l as J,m as C,n as F,o as P,p as T,q as V,r as h,s as N,t as _,u as M,v as W,w as b}from"../chunk-VY27ZAO7.js";import{a as c,b as d,c as f}from"../chunk-QZ6TSYCK.js";import{f as s,g as l}from"../chunk-5DVHK5DS.js";import"../chunk-FHYMHX3T.js";var Le={toSentence:r};import{jsonrepair as t}from"jsonrepair";function x(e){return t(e)}async function A(e,n,i=o()){let p=await i.parseAndRender(JSON.stringify(e),n);try{return JSON.parse(t(p))}catch{throw new Error("Rendered template output is not valid JSON")}}export{F as ActionStepEnum,m as AgentContextImpl,a as AgentEventEnum,N as BadRequestError,j as BridgeError,C as ChannelStepEnum,W as ConflictError,I as CronExpression,L as ErrorCodeEnum,B as ExecutionEventControlsInvalidError,H as ExecutionEventPayloadInvalidError,Q as ExecutionProviderOutputInvalidError,G as ExecutionStateControlsInvalidError,D as ExecutionStateCorruptError,K as ExecutionStateOutputInvalidError,X as ExecutionStateResultInvalidError,Le as FILTER_VALIDATORS,b as ForbiddenError,V as FrameworkError,R as GetActionEnum,w as HttpHeaderKeysEnum,O as HttpMethodEnum,k as HttpQueryKeysEnum,q as HttpStatusEnum,$ as InvalidActionError,ve as JobStatusEnum,Z as MethodNotAllowedError,ee as MissingSecretKeyError,h as NotFoundError,S as NovuApiEndpointsEnum,oe as PlatformError,y as PostActionEnum,pe as ProviderExecutionFailedError,ie as ProviderNotFoundError,re as ResourceConflictError,J as ResourceEnum,ne as ResourceExecutionFailed,te as ResourceNotFoundError,E as SIGNATURE_TIMESTAMP_TOLERANCE,v as SIGNATURE_TIMESTAMP_TOLERANCE_MINUTES,M as ServerError,Ee as SeverityLevelEnum,me as SignatureExpiredError,le as SignatureInvalidError,ae as SignatureMismatchError,se as SignatureNotFoundError,ue as SignatureVersionInvalidError,ge as SigningKeyNotFoundError,de as StepAlreadyExistsError,z as StepControlCompilationFailedError,fe as StepExecutionFailedError,ce as StepNotFoundError,_ as UnauthorizedError,c as WORKFLOW_ORIGIN_LINE_MAX_CHARS,Ae as WorkflowAlreadyExistsError,P as WorkflowChannelEnum,xe as WorkflowNotFoundError,U as WorkflowPayloadInvalidError,g as actionStepSchemas,s as buildApprovalActionId,f as buildWorkflowOriginInjection,d as buildWorkflowOriginLine,u as channelStepSchemas,A as compileJsonControlValues,o as createLiquidEngine,ye as digest,Y as isFrameworkError,T as isNativeError,l as parseApprovalActionId,Re as pluralize,x as repairJsonString,Se as toSentence,r as toSentenceArgsValidator};
@@ -1 +1 @@
1
- import"./chunk-2GCKOQK4.js";import"./chunk-7C3QBYLB.js";import{A as x,B as e,C as j,z as s}from"./chunk-RBTQQ5IZ.js";import"./chunk-FHYMHX3T.js";export{j as Fragment,s as jsx,e as jsxDEV,x as jsxs};
1
+ import"./chunk-2GCKOQK4.js";import"./chunk-FOODV6YZ.js";import{A as s,B as x,C as e,D as j}from"./chunk-ICOHH7TO.js";import"./chunk-FHYMHX3T.js";export{j as Fragment,s as jsx,e as jsxDEV,x as jsxs};
@@ -1 +1 @@
1
- import"./chunk-7C3QBYLB.js";import{A as c,B as d,C as e,D as f,E as g,F as h,y as a,z as b}from"./chunk-RBTQQ5IZ.js";import"./chunk-FHYMHX3T.js";export{e as Fragment,a as isCardLinkProps,h as isJSX,b as jsx,d as jsxDEV,c as jsxs,f as toCardElement,g as toModalElement};
1
+ import"./chunk-FOODV6YZ.js";import{A as b,B as c,C as d,D as e,E as f,F as g,G as h,z as a}from"./chunk-ICOHH7TO.js";import"./chunk-FHYMHX3T.js";export{e as Fragment,a as isCardLinkProps,h as isJSX,b as jsx,d as jsxDEV,c as jsxs,f as toCardElement,g as toModalElement};
@@ -1 +1 @@
1
- import"./chunk-2GCKOQK4.js";import"./chunk-7C3QBYLB.js";import{A as b,B as c,C as d,z as a}from"./chunk-RBTQQ5IZ.js";import"./chunk-FHYMHX3T.js";export{d as Fragment,a as jsx,c as jsxDEV,b as jsxs};
1
+ import"./chunk-2GCKOQK4.js";import"./chunk-FOODV6YZ.js";import{A as a,B as b,C as c,D as d}from"./chunk-ICOHH7TO.js";import"./chunk-FHYMHX3T.js";export{d as Fragment,a as jsx,c as jsxDEV,b as jsxs};
@@ -1,5 +1,5 @@
1
1
  import { BaseMessage } from '@langchain/core/messages';
2
- import { l as AgentHistoryEntry, j as AgentHandlerContext, M as MessageContent, k as AgentHandlers, n as AgentMessage, p as AgentMessageContext, D as ToolApprovalDecision, b as AgentActionContext, R as ReplyHandle, A as Agent } from '../agent.types-DFLG1_vb.js';
2
+ import { l as AgentHistoryEntry, j as AgentHandlerContext, M as MessageContent, k as AgentHandlers, n as AgentMessage, p as AgentMessageContext, r as AgentMessageUpdatedContext, q as AgentMessageDeletedContext, G as ToolApprovalDecision, b as AgentActionContext, R as ReplyHandle, A as Agent } from '../agent.types-C9T8i5SY.js';
3
3
  import { LanguageModelLike } from '@langchain/core/language_models/base';
4
4
  import { RunnableConfig } from '@langchain/core/runnables';
5
5
  import { StructuredToolInterface } from '@langchain/core/tools';
@@ -98,8 +98,10 @@ type LangChainResult = LangChainAgentConfig | LangChainInvokeResult | BaseMessag
98
98
  * but `onMessage` and `onToolApproval` may return a {@link LangChainResult} for
99
99
  * automatic delivery.
100
100
  */
101
- type LangChainAgentHandlers = Omit<AgentHandlers, 'onMessage' | 'onToolApproval'> & {
101
+ type LangChainAgentHandlers = Omit<AgentHandlers, 'onMessage' | 'onToolApproval' | 'onMessageUpdated' | 'onMessageDeleted'> & {
102
102
  onMessage: (message: AgentMessage, ctx: AgentMessageContext) => Awaitable<MessageContent | LangChainResult | void>;
103
+ onMessageUpdated?: (message: AgentMessage, ctx: AgentMessageUpdatedContext) => Awaitable<MessageContent | LangChainResult | void>;
104
+ onMessageDeleted?: (message: AgentMessage, ctx: AgentMessageDeletedContext) => Awaitable<MessageContent | LangChainResult | void>;
103
105
  /**
104
106
  * Optional. Auto-resumes `onMessage` after approve/deny unless you return a
105
107
  * `LangChainResult` to drive the resume yourself.
@@ -1 +1 @@
1
- import{a as R,b as M,c as x,d as P,f as L}from"../chunk-YZ3P3MMZ.js";import{c as w}from"../chunk-QZ6TSYCK.js";import{a as I,d as g,g as T}from"../chunk-PU74XQ2P.js";import"../chunk-FHYMHX3T.js";import{AIMessage as j,HumanMessage as D,SystemMessage as te}from"@langchain/core/messages";import{AIMessage as Q,ToolMessage as H}from"@langchain/core/messages";var S="tool_approval_request",k="tool_approval_decision",N="tool_result",X=JSON.stringify({type:"execution-denied"});function m(e){var o;let t=e.toolData;if(!(!t||typeof t.approvalId!="string"||typeof t.toolCallId!="string"))return{approvalId:t.approvalId,toolCallId:t.toolCallId,name:(o=t.toolName)!=null?o:"tool",input:t.input}}function _(e){let t=e.toolData;if(!(!t||typeof t.approvalId!="string"||typeof t.approved!="boolean"))return{approvalId:t.approvalId,approved:t.approved}}function B(e){let t=e.toolData;if(!(!t||typeof t.toolCallId!="string"))return{toolCallId:t.toolCallId,toolName:t.toolName,output:t.output}}function b(e,t){let o=new Set,n=new Map,a=new Map;for(let r of e)if(r.type===S){let s=m(r);s&&a.set(s.approvalId,s.toolCallId)}else if(r.type===k){let s=_(r);s&&!s.approved&&o.add(s.approvalId)}else if(r.type===N){let s=B(r);s&&n.set(s.toolCallId,s)}if(t)for(let[r,s]of t)n.set(r,s);return{deniedApprovalIds:o,toolResults:n,approvalIdToToolCallId:a}}function W(e,t){return t.deniedApprovalIds.has(e.approvalId)?"denied":t.toolResults.has(e.toolCallId)?"resolved":"in-flight"}function E(e){var t;return new Q({content:"",tool_calls:[{id:e.toolCallId,name:e.name,args:(t=e.input)!=null?t:{},type:"tool_call"}]})}function K(e){return typeof e=="string"?e:JSON.stringify(e)}function Z(e){var t;return new H({content:K(e.output),tool_call_id:e.toolCallId,name:(t=e.toolName)!=null?t:"tool"})}function ee(e){return new H({content:X,tool_call_id:e.toolCallId,name:e.name,status:"error"})}function O(e,t){let o=m(e);if(!o)return[];let n=W(o,t);switch(n){case"denied":return[E(o),ee(o)];case"resolved":{let a=t.toolResults.get(o.toolCallId);return a?[E(o),Z(a)]:[]}case"in-flight":return[];default:return n}}function U(e){let t=new Set,o=new Set,n=[];for(let a of e)if(a.type===S){let r=m(a);r&&n.push({approvalId:r.approvalId,toolCallId:r.toolCallId,toolName:r.name,input:r.input})}else if(a.type===k){let r=_(a);r!=null&&r.approved&&t.add(r.approvalId)}else if(a.type===N){let r=B(a);r&&o.add(r.toolCallId)}return n.filter(a=>t.has(a.approvalId)&&!o.has(a.toolCallId)).map(({toolCallId:a,toolName:r,input:s})=>({toolCallId:a,toolName:r,input:s}))}function q(e){return x(e).map(t=>M(t.mediaType)?{type:"image",url:t.url,mimeType:t.mediaType}:{type:"file",url:t.url,mimeType:t.mediaType,...t.name?{metadata:{title:t.name}}:{}})}var oe="message",ne="tool_approval_request";function $(e){return e==="agent"||e==="assistant"}function ae(e){let t=new Set;for(let o of e)!$(o.role)&&o.role!=="system"&&o.senderName&&t.add(o.senderName);return t.size}function re(e,t){let o=$(e.role),n=!!e.content.trim(),a=o?[]:q(e);if(!n&&a.length===0)return;if(o)return new j(e.content);let r=t&&e.senderName?`${e.senderName}: ${e.content}`:e.content;if(a.length===0)return new D(r);let s=n?[...a,{type:"text",text:r}]:a;return new D({content:s})}function se(e,t,o){switch(e.type){case oe:{let n=re(e,t);return n?[n]:[]}case ne:return O(e,o);default:return[]}}function y(e,t,o){let{history:n,notification:a}=R(e),r=ae(n)>1,s=b(n,o),l=n.flatMap(p=>se(p,r,s)),i=a?[new j(w(a.workflowId,a.body,a.payload)),...l]:l;return t?[new te(t),...i]:i}import{HumanMessage as le,isHumanMessage as ie}from"@langchain/core/messages";async function pe(e){if(!e||typeof e!="object")return e;let t=e;if(t.type!=="image"&&t.type!=="file"||typeof t.url!="string"||P(t.url))return e;let o=await L(t.url);if(!o)return null;let{url:n,...a}=t;return{...a,data:o}}async function A(e){return Promise.all(e.map(async t=>{if(!ie(t)||!Array.isArray(t.content))return t;let o=(await Promise.all(t.content.map(n=>pe(n)))).filter(n=>n!=null);return new le({content:o})}))}import{isAIMessage as ve,isBaseMessage as V}from"@langchain/core/messages";import{createAgent as he}from"langchain";import{isBaseMessage as ue}from"@langchain/core/messages";import{createMiddleware as de}from"langchain";var d=class extends Error{constructor(t){super(`Tool "${t.toolName}" requires approval`),this.name="NovuToolApprovalRequired",this.toolCallId=t.toolCallId,this.toolName=t.toolName,this.input=t.input}},ge=10;function Y(e){let t=e;for(let o=0;o<ge&&t!=null;o+=1){if(t instanceof d)return t;t=t.cause}}function z(e){return de({name:"novu-tool-approval",wrapToolCall:async(t,o)=>{let{id:n,name:a,args:r}=t.toolCall,s=r!=null?r:{};if(e({id:n,name:a,args:s}))throw new d({toolCallId:n!=null?n:a,toolName:a,input:s});return o(t)}})}async function F(e,t,o){let n={id:t.toolCallId,name:t.toolName,input:t.input};await T(e,n,o)}function ce(e){return ue(e)?e.content:e}function fe(e){let t=new Map;for(let o of e!=null?e:[])t.set(o.name,o);return t}async function J(e,t){var r;let o=U(t.history),n=new Map;if(o.length===0)return n;let a=fe(e);for(let s of o){let l=a.get(s.toolName);if(!l)continue;let i=ce(await l.invoke((r=s.input)!=null?r:{}));n.set(s.toolCallId,{toolCallId:s.toolCallId,toolName:s.toolName,output:i}),t.emitToolResult({toolCallId:s.toolCallId,toolName:s.toolName,output:i,preview:`Tool "${s.toolName}" result`})}return n}import{isToolMessage as me}from"@langchain/core/messages";function ye(e){var o;let t=new Set;for(let n of e.history)n.type==="tool_approval_request"&&((o=n.toolData)!=null&&o.toolCallId)&&t.add(n.toolData.toolCallId);return t}function Ae(e,t){var n;let o=new Set(t);for(let a of e.history)a.type==="tool_result"&&((n=a.toolData)!=null&&n.toolCallId)&&o.add(a.toolData.toolCallId);return o}function Ce(e){return typeof e=="string"?e:JSON.stringify(e)}function C(e,t,o=new Set){var r;let n=ye(t);if(n.size===0)return;let a=Ae(t,o);for(let s of e){if(!me(s))continue;let l=s.tool_call_id;!n.has(l)||a.has(l)||(a.add(l),t.emitToolResult({toolCallId:l,toolName:s.name,output:Ce(s.content),preview:`Tool "${(r=s.name)!=null?r:l}" result`}))}}function G(e){if(typeof e!="object"||e===null)return!1;let t=e.model;return typeof t=="string"||typeof t=="object"&&t!==null}function Ie(e){return typeof e=="object"&&e!==null&&Array.isArray(e.messages)}function c(e){return typeof e!="object"||e===null||I(e)?!1:V(e)||G(e)||Ie(e)}function Te(e){return typeof e=="string"?e:e.map(t=>{let o=t;return o.type==="text"&&typeof o.text=="string"?o.text:""}).join("")}function v(e){for(let t=e.length-1;t>=0;t-=1){let o=e[t];if(ve(o))return Te(o.content).trim()}return""}async function h(e,t,o){var a;if(!e){await t.typing.stop();return}let n=o&&(a=await o(e))!=null?a:e;await t.reply(n)}async function Re(e,t,o){var i;let n=await J(e.tools,t),a=await A(y(t,void 0,n)),r=[];e.needsApproval&&r.push(z(e.needsApproval)),e.middleware&&r.push(...e.middleware);let s=he({model:e.model,tools:(i=e.tools)!=null?i:[],...e.system?{prompt:e.system}:{},...r.length>0?{middleware:r}:{}}),l;try{l=await s.invoke({messages:a},e.invokeConfig)}catch(p){let u=Y(p);if(u){await F(t,u,o);return}throw p}C(l.messages,t,new Set(n.keys())),await h(v(l.messages),t,e.formatReply)}async function f(e,t,o){if(G(e)){await Re(e,t,o);return}if(V(e)){await h(v([e]),t);return}C(e.messages,t),await h(v(e.messages),t)}var we={text:"",platformMessageId:"",author:{userId:"",fullName:"",userName:"",isBot:!1},timestamp:""};function Me(e){return typeof e=="object"&&e!==null&&"messageId"in e&&"platformThreadId"in e}function xe(e,t){let o=typeof t=="function"?{onMessage:t}:t;if(typeof o.onMessage!="function")throw new Error(`agent('${e}') requires an onMessage handler`);return o}function Pe(e,t){if(!e)throw new Error("agent() requires a non-empty agentId");let o=xe(e,t),n=o.toolApproval,a=typeof o.onToolApproval=="function",r=async l=>{let i=g(l),p=await o.onMessage(we,i.asMessageContext());c(p)&&await f(p,i,n)},s={onMessage:async(l,i)=>{let p=await o.onMessage(l,i);if(c(p)){await f(p,g(i),n);return}return p},onToolApproval:async(l,i)=>{let p=g(i);if(o.onToolApproval){let u=await o.onToolApproval(l,i);if(c(u)){await f(u,p,n);return}u!=null&&!Me(u)&&await p.reply(u)}await r(i)},...n&&{toolApproval:n},...o.onAction&&{onAction:o.onAction},...o.onReaction&&{onReaction:o.onReaction},...o.onResolve&&{onResolve:o.onResolve},...o.onError&&{onError:o.onError}};return{id:e,handlers:s,userOnToolApproval:a}}export{d as NovuToolApprovalRequired,Pe as agent,A as hydrateUnreachableAttachmentUrls,y as toLangChainMessages};
1
+ import{a as w,b as R,c as x,d as P,f as L}from"../chunk-YZ3P3MMZ.js";import{c as M}from"../chunk-QZ6TSYCK.js";import{a as T,e as d,h}from"../chunk-5DVHK5DS.js";import"../chunk-FHYMHX3T.js";import{AIMessage as j,HumanMessage as D,SystemMessage as te}from"@langchain/core/messages";import{AIMessage as Q,ToolMessage as H}from"@langchain/core/messages";var S="tool_approval_request",k="tool_approval_decision",N="tool_result",X=JSON.stringify({type:"execution-denied"});function m(e){var o;let t=e.toolData;if(!(!t||typeof t.approvalId!="string"||typeof t.toolCallId!="string"))return{approvalId:t.approvalId,toolCallId:t.toolCallId,name:(o=t.toolName)!=null?o:"tool",input:t.input}}function _(e){let t=e.toolData;if(!(!t||typeof t.approvalId!="string"||typeof t.approved!="boolean"))return{approvalId:t.approvalId,approved:t.approved}}function B(e){let t=e.toolData;if(!(!t||typeof t.toolCallId!="string"))return{toolCallId:t.toolCallId,toolName:t.toolName,output:t.output}}function b(e,t){let o=new Set,n=new Map,a=new Map;for(let r of e)if(r.type===S){let s=m(r);s&&a.set(s.approvalId,s.toolCallId)}else if(r.type===k){let s=_(r);s&&!s.approved&&o.add(s.approvalId)}else if(r.type===N){let s=B(r);s&&n.set(s.toolCallId,s)}if(t)for(let[r,s]of t)n.set(r,s);return{deniedApprovalIds:o,toolResults:n,approvalIdToToolCallId:a}}function W(e,t){return t.deniedApprovalIds.has(e.approvalId)?"denied":t.toolResults.has(e.toolCallId)?"resolved":"in-flight"}function E(e){var t;return new Q({content:"",tool_calls:[{id:e.toolCallId,name:e.name,args:(t=e.input)!=null?t:{},type:"tool_call"}]})}function K(e){return typeof e=="string"?e:JSON.stringify(e)}function Z(e){var t;return new H({content:K(e.output),tool_call_id:e.toolCallId,name:(t=e.toolName)!=null?t:"tool"})}function ee(e){return new H({content:X,tool_call_id:e.toolCallId,name:e.name,status:"error"})}function O(e,t){let o=m(e);if(!o)return[];let n=W(o,t);switch(n){case"denied":return[E(o),ee(o)];case"resolved":{let a=t.toolResults.get(o.toolCallId);return a?[E(o),Z(a)]:[]}case"in-flight":return[];default:return n}}function U(e){let t=new Set,o=new Set,n=[];for(let a of e)if(a.type===S){let r=m(a);r&&n.push({approvalId:r.approvalId,toolCallId:r.toolCallId,toolName:r.name,input:r.input})}else if(a.type===k){let r=_(a);r!=null&&r.approved&&t.add(r.approvalId)}else if(a.type===N){let r=B(a);r&&o.add(r.toolCallId)}return n.filter(a=>t.has(a.approvalId)&&!o.has(a.toolCallId)).map(({toolCallId:a,toolName:r,input:s})=>({toolCallId:a,toolName:r,input:s}))}function q(e){return x(e).map(t=>R(t.mediaType)?{type:"image",url:t.url,mimeType:t.mediaType}:{type:"file",url:t.url,mimeType:t.mediaType,...t.name?{metadata:{title:t.name}}:{}})}var oe="message",ne="tool_approval_request";function $(e){return e==="agent"||e==="assistant"}function ae(e){let t=new Set;for(let o of e)!$(o.role)&&o.role!=="system"&&o.senderName&&t.add(o.senderName);return t.size}function re(e,t){let o=$(e.role),n=!!e.content.trim(),a=o?[]:q(e);if(!n&&a.length===0)return;if(o)return new j(e.content);let r=t&&e.senderName?`${e.senderName}: ${e.content}`:e.content;if(a.length===0)return new D(r);let s=n?[...a,{type:"text",text:r}]:a;return new D({content:s})}function se(e,t,o){switch(e.type){case oe:{let n=re(e,t);return n?[n]:[]}case ne:return O(e,o);default:return[]}}function y(e,t,o){let{history:n,notification:a}=w(e),r=ae(n)>1,s=b(n,o),l=n.flatMap(p=>se(p,r,s)),i=a?[new j(M(a.workflowId,a.body,a.payload)),...l]:l;return t?[new te(t),...i]:i}import{HumanMessage as le,isHumanMessage as ie}from"@langchain/core/messages";async function pe(e){if(!e||typeof e!="object")return e;let t=e;if(t.type!=="image"&&t.type!=="file"||typeof t.url!="string"||P(t.url))return e;let o=await L(t.url);if(!o)return null;let{url:n,...a}=t;return{...a,data:o}}async function A(e){return Promise.all(e.map(async t=>{if(!ie(t)||!Array.isArray(t.content))return t;let o=(await Promise.all(t.content.map(n=>pe(n)))).filter(n=>n!=null);return new le({content:o})}))}import{isAIMessage as ve,isBaseMessage as V}from"@langchain/core/messages";import{createAgent as Ie}from"langchain";import{isBaseMessage as ue}from"@langchain/core/messages";import{createMiddleware as de}from"langchain";var f=class extends Error{constructor(t){super(`Tool "${t.toolName}" requires approval`),this.name="NovuToolApprovalRequired",this.toolCallId=t.toolCallId,this.toolName=t.toolName,this.input=t.input}},ge=10;function Y(e){let t=e;for(let o=0;o<ge&&t!=null;o+=1){if(t instanceof f)return t;t=t.cause}}function z(e){return de({name:"novu-tool-approval",wrapToolCall:async(t,o)=>{let{id:n,name:a,args:r}=t.toolCall,s=r!=null?r:{};if(e({id:n,name:a,args:s}))throw new f({toolCallId:n!=null?n:a,toolName:a,input:s});return o(t)}})}async function F(e,t,o){let n={id:t.toolCallId,name:t.toolName,input:t.input};await h(e,n,o)}function ce(e){return ue(e)?e.content:e}function fe(e){let t=new Map;for(let o of e!=null?e:[])t.set(o.name,o);return t}async function J(e,t){var r;let o=U(t.history),n=new Map;if(o.length===0)return n;let a=fe(e);for(let s of o){let l=a.get(s.toolName);if(!l)continue;let i=ce(await l.invoke((r=s.input)!=null?r:{}));n.set(s.toolCallId,{toolCallId:s.toolCallId,toolName:s.toolName,output:i}),t.emitToolResult({toolCallId:s.toolCallId,toolName:s.toolName,output:i,preview:`Tool "${s.toolName}" result`})}return n}import{isToolMessage as me}from"@langchain/core/messages";function ye(e){var o;let t=new Set;for(let n of e.history)n.type==="tool_approval_request"&&((o=n.toolData)!=null&&o.toolCallId)&&t.add(n.toolData.toolCallId);return t}function Ae(e,t){var n;let o=new Set(t);for(let a of e.history)a.type==="tool_result"&&((n=a.toolData)!=null&&n.toolCallId)&&o.add(a.toolData.toolCallId);return o}function Ce(e){return typeof e=="string"?e:JSON.stringify(e)}function C(e,t,o=new Set){var r;let n=ye(t);if(n.size===0)return;let a=Ae(t,o);for(let s of e){if(!me(s))continue;let l=s.tool_call_id;!n.has(l)||a.has(l)||(a.add(l),t.emitToolResult({toolCallId:l,toolName:s.name,output:Ce(s.content),preview:`Tool "${(r=s.name)!=null?r:l}" result`}))}}function G(e){if(typeof e!="object"||e===null)return!1;let t=e.model;return typeof t=="string"||typeof t=="object"&&t!==null}function Te(e){return typeof e=="object"&&e!==null&&Array.isArray(e.messages)}function g(e){return typeof e!="object"||e===null||T(e)?!1:V(e)||G(e)||Te(e)}function he(e){return typeof e=="string"?e:e.map(t=>{let o=t;return o.type==="text"&&typeof o.text=="string"?o.text:""}).join("")}function v(e){for(let t=e.length-1;t>=0;t-=1){let o=e[t];if(ve(o))return he(o.content).trim()}return""}async function I(e,t,o){var a;if(!e){await t.typing.stop();return}let n=o&&(a=await o(e))!=null?a:e;await t.reply(n)}async function we(e,t,o){var i;let n=await J(e.tools,t),a=await A(y(t,void 0,n)),r=[];e.needsApproval&&r.push(z(e.needsApproval)),e.middleware&&r.push(...e.middleware);let s=Ie({model:e.model,tools:(i=e.tools)!=null?i:[],...e.system?{prompt:e.system}:{},...r.length>0?{middleware:r}:{}}),l;try{l=await s.invoke({messages:a},e.invokeConfig)}catch(p){let u=Y(p);if(u){await F(t,u,o);return}throw p}C(l.messages,t,new Set(n.keys())),await I(v(l.messages),t,e.formatReply)}async function c(e,t,o){if(G(e)){await we(e,t,o);return}if(V(e)){await I(v([e]),t);return}C(e.messages,t),await I(v(e.messages),t)}var Me={text:"",platformMessageId:"",author:{userId:"",fullName:"",userName:"",isBot:!1},timestamp:""};function Re(e){return typeof e=="object"&&e!==null&&"messageId"in e&&"platformThreadId"in e}function xe(e,t){let o=typeof t=="function"?{onMessage:t}:t;if(typeof o.onMessage!="function")throw new Error(`agent('${e}') requires an onMessage handler`);return o}function Pe(e,t){if(!e)throw new Error("agent() requires a non-empty agentId");let o=xe(e,t),n=o.toolApproval,a=typeof o.onToolApproval=="function",r=async l=>{let i=d(l),p=await o.onMessage(Me,i.asMessageContext());g(p)&&await c(p,i,n)},s={onMessage:async(l,i)=>{let p=await o.onMessage(l,i);if(g(p)){await c(p,d(i),n);return}return p},onToolApproval:async(l,i)=>{let p=d(i);if(o.onToolApproval){let u=await o.onToolApproval(l,i);if(g(u)){await c(u,p,n);return}u!=null&&!Re(u)&&await p.reply(u)}await r(i)},...n&&{toolApproval:n},...o.onAction&&{onAction:o.onAction},...o.onReaction&&{onReaction:o.onReaction},...o.onResolve&&{onResolve:o.onResolve},...o.onMessageUpdated&&{onMessageUpdated:async(l,i)=>{var u;let p=await((u=o.onMessageUpdated)==null?void 0:u.call(o,l,i));if(g(p)){await c(p,d(i),n);return}return p}},...o.onMessageDeleted&&{onMessageDeleted:async(l,i)=>{var u;let p=await((u=o.onMessageDeleted)==null?void 0:u.call(o,l,i));if(g(p)){await c(p,d(i),n);return}return p}},...o.onError&&{onError:o.onError}};return{id:e,handlers:s,userOnToolApproval:a}}export{f as NovuToolApprovalRequired,Pe as agent,A as hydrateUnreachableAttachmentUrls,y as toLangChainMessages};
@@ -1,10 +1,10 @@
1
- import { S as ServeHandlerOptions } from '../index-BvRGmHFw.js';
2
- export { C as Client, N as NovuRequestHandler, a as agent, i as isFromWorkflow, w as workflow } from '../index-BvRGmHFw.js';
3
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-DORn4djx.js';
4
- export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-Drf26WPA.js';
1
+ import { S as ServeHandlerOptions } from '../index-DBKGOU-x.js';
2
+ export { C as Client, N as NovuRequestHandler, a as agent, i as isFromWorkflow, w as workflow } from '../index-DBKGOU-x.js';
3
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-Dp-fsCai.js';
4
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-UA_2pkYJ.js';
5
5
  import { S as SupportedFrameworkName } from '../server.types-Cc6o5eYH.js';
6
- export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Image, ImageElement, Select, SelectOption, TextInput } from 'chat';
7
- export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentContextPayload, f as AgentContextValue, g as AgentConversation, h as AgentDeliveryError, i as AgentError, j as AgentHandlerContext, k as AgentHandlers, l as AgentHistoryEntry, m as AgentHumanResponse, n as AgentMessage, o as AgentMessageAuthor, p as AgentMessageContext, q as AgentNotification, r as AgentPlatformContext, s as AgentReaction, t as AgentReactionContext, u as AgentResolveContext, v as AgentSubscriber, w as AgentSubscriberAccess, x as AgentToolCall, F as FileRef, H as HumanAskApproveOptions, y as HumanChooseOptions, z as HumanInteractionKind, B as HumanTellOptions, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, C as ToolApprovalConfig, D as ToolApprovalDecision, E as toAgentError } from '../agent.types-DFLG1_vb.js';
6
+ export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Chart, ChartElement, Divider, Image, ImageElement, LinkButton, LinkButtonElement, Select, SelectOption, Table, TableElement, TextInput } from 'chat';
7
+ export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentContextPayload, f as AgentContextValue, g as AgentConversation, h as AgentDeliveryError, i as AgentError, j as AgentHandlerContext, k as AgentHandlers, l as AgentHistoryEntry, m as AgentHumanResponse, n as AgentMessage, o as AgentMessageAuthor, p as AgentMessageContext, q as AgentMessageDeletedContext, r as AgentMessageUpdatedContext, s as AgentNotification, t as AgentPlatformContext, u as AgentReaction, v as AgentReactionContext, w as AgentResolveContext, x as AgentSubscriber, y as AgentSubscriberAccess, z as AgentToolCall, F as FileRef, H as HumanAskApproveOptions, B as HumanChooseOptions, C as HumanInteractionKind, D as HumanTellOptions, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, E as ToolApprovalConfig, G as ToolApprovalDecision, I as toAgentError } from '../agent.types-C9T8i5SY.js';
8
8
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, ToolStepResolver, step } from '../step-resolver.js';
9
9
  import '../util.types-DaFfsxgy.js';
10
10
  import '../base.schema.types-BApIn9jr.js';
@@ -1 +1 @@
1
- import{b as N,c as a,d as k,e as i}from"../chunk-JLKEQIWC.js";import{a as F}from"../chunk-YLCLZVYS.js";import"../chunk-XIVU4VDS.js";import{N as R,O as V,P as b,W as $}from"../chunk-4ETX7FIT.js";import{a as y,b as h,c,d as m,e as f,f as H,i as v,p as w,q as E,r as S}from"../chunk-X5AZIKIR.js";import"../chunk-RBTQQ5IZ.js";import{a as O}from"../chunk-IREH6K2M.js";import{f as x}from"../chunk-VY27ZAO7.js";import{b as A}from"../chunk-PU74XQ2P.js";import"../chunk-FHYMHX3T.js";var l="express",q=p=>new a({frameworkName:l,...p,handler:(t,o)=>({body:()=>t.body,headers:e=>{let r=t.headers[e];return Array.isArray(r)?r[0]:r},method:()=>t.method||"GET",url:()=>{let e=t.headers.host||"",r=e!=null&&e.includes("://")?"":`${t.protocol||"https"}://`;return new URL(t.originalUrl||t.url||"",`${r}${e||""}`)},queryString:e=>{let r=t.query[e];return Array.isArray(r)?r[0]:r},transformResponse:({body:e,headers:r,status:s})=>(Object.entries(r).forEach(([n,d])=>{o.setHeader(n,d)}),o.status(s).send(e))})}).createHandler();export{y as Actions,V as AgentDeliveryError,R as AgentError,h as Button,c as Card,m as CardLink,f as CardText,N as Client,x as CronExpression,H as Divider,v as Image,a as NovuRequestHandler,w as Select,E as SelectOption,$ as SeverityLevelEnum,S as TextInput,k as agent,l as frameworkName,A as isFromWorkflow,O as providerSchemas,q as serve,F as step,b as toAgentError,i as workflow};
1
+ import{b,c as a,d as i,e as j}from"../chunk-JWRKOFAS.js";import"../chunk-H3BQFYPR.js";import{a as q}from"../chunk-YLCLZVYS.js";import"../chunk-XIVU4VDS.js";import{R as k,S as O,T as $,X as U}from"../chunk-2ANSU3EI.js";import{a as y,b as h,c,d as m,e as f,f as H,g as v,j as w,k as E,m as S,q as x,r as A,s as N}from"../chunk-IHERFGZC.js";import"../chunk-ICOHH7TO.js";import{a as F}from"../chunk-E54LXWY3.js";import{f as R}from"../chunk-VY27ZAO7.js";import{c as V}from"../chunk-5DVHK5DS.js";import"../chunk-FHYMHX3T.js";var l="express",T=p=>new a({frameworkName:l,...p,handler:(t,o)=>({body:()=>t.body,headers:e=>{let r=t.headers[e];return Array.isArray(r)?r[0]:r},method:()=>t.method||"GET",url:()=>{let e=t.headers.host||"",r=e!=null&&e.includes("://")?"":`${t.protocol||"https"}://`;return new URL(t.originalUrl||t.url||"",`${r}${e||""}`)},queryString:e=>{let r=t.query[e];return Array.isArray(r)?r[0]:r},transformResponse:({body:e,headers:r,status:s})=>(Object.entries(r).forEach(([n,d])=>{o.setHeader(n,d)}),o.status(s).send(e))})}).createHandler();export{y as Actions,O as AgentDeliveryError,k as AgentError,h as Button,c as Card,m as CardLink,f as CardText,H as Chart,b as Client,R as CronExpression,v as Divider,w as Image,E as LinkButton,a as NovuRequestHandler,x as Select,A as SelectOption,U as SeverityLevelEnum,S as Table,N as TextInput,i as agent,l as frameworkName,V as isFromWorkflow,F as providerSchemas,T as serve,q as step,$ as toAgentError,j as workflow};
@@ -1,12 +1,12 @@
1
1
  import * as h3 from 'h3';
2
2
  import { H3Event } from 'h3';
3
- import { S as ServeHandlerOptions } from '../index-BvRGmHFw.js';
4
- export { C as Client, N as NovuRequestHandler, a as agent, i as isFromWorkflow, w as workflow } from '../index-BvRGmHFw.js';
5
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-DORn4djx.js';
6
- export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-Drf26WPA.js';
3
+ import { S as ServeHandlerOptions } from '../index-DBKGOU-x.js';
4
+ export { C as Client, N as NovuRequestHandler, a as agent, i as isFromWorkflow, w as workflow } from '../index-DBKGOU-x.js';
5
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-Dp-fsCai.js';
6
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-UA_2pkYJ.js';
7
7
  import { S as SupportedFrameworkName } from '../server.types-Cc6o5eYH.js';
8
- export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Image, ImageElement, Select, SelectOption, TextInput } from 'chat';
9
- export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentContextPayload, f as AgentContextValue, g as AgentConversation, h as AgentDeliveryError, i as AgentError, j as AgentHandlerContext, k as AgentHandlers, l as AgentHistoryEntry, m as AgentHumanResponse, n as AgentMessage, o as AgentMessageAuthor, p as AgentMessageContext, q as AgentNotification, r as AgentPlatformContext, s as AgentReaction, t as AgentReactionContext, u as AgentResolveContext, v as AgentSubscriber, w as AgentSubscriberAccess, x as AgentToolCall, F as FileRef, H as HumanAskApproveOptions, y as HumanChooseOptions, z as HumanInteractionKind, B as HumanTellOptions, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, C as ToolApprovalConfig, D as ToolApprovalDecision, E as toAgentError } from '../agent.types-DFLG1_vb.js';
8
+ export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Chart, ChartElement, Divider, Image, ImageElement, LinkButton, LinkButtonElement, Select, SelectOption, Table, TableElement, TextInput } from 'chat';
9
+ export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentContextPayload, f as AgentContextValue, g as AgentConversation, h as AgentDeliveryError, i as AgentError, j as AgentHandlerContext, k as AgentHandlers, l as AgentHistoryEntry, m as AgentHumanResponse, n as AgentMessage, o as AgentMessageAuthor, p as AgentMessageContext, q as AgentMessageDeletedContext, r as AgentMessageUpdatedContext, s as AgentNotification, t as AgentPlatformContext, u as AgentReaction, v as AgentReactionContext, w as AgentResolveContext, x as AgentSubscriber, y as AgentSubscriberAccess, z as AgentToolCall, F as FileRef, H as HumanAskApproveOptions, B as HumanChooseOptions, C as HumanInteractionKind, D as HumanTellOptions, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, E as ToolApprovalConfig, G as ToolApprovalDecision, I as toAgentError } from '../agent.types-C9T8i5SY.js';
10
10
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, ToolStepResolver, step } from '../step-resolver.js';
11
11
  import '../util.types-DaFfsxgy.js';
12
12
  import '../base.schema.types-BApIn9jr.js';
@@ -1 +1 @@
1
- import{b as x,c as t,d as F,e as C}from"../chunk-JLKEQIWC.js";import{a as D}from"../chunk-YLCLZVYS.js";import"../chunk-XIVU4VDS.js";import{N as O,O as b,P as q,W as B}from"../chunk-4ETX7FIT.js";import{a as l,b as y,c as H,d as S,e as i,f,i as g,p as N,q as w,r as c}from"../chunk-X5AZIKIR.js";import"../chunk-RBTQQ5IZ.js";import{a as $}from"../chunk-IREH6K2M.js";import{f as E}from"../chunk-VY27ZAO7.js";import{b as k}from"../chunk-PU74XQ2P.js";import"../chunk-FHYMHX3T.js";import{getHeader as o,getQuery as a,readBody as p,send as n,setHeaders as m}from"h3";var h="h3",R=d=>new t({frameworkName:h,...d,handler:r=>({body:()=>p(r),headers:e=>o(r,e),method:()=>r.method,url:()=>new URL(String(r.path),`${process.env.NODE_ENV==="development"?"http":"https"}://${String(o(r,"host"))}`),queryString:e=>String(a(r)[e]),transformResponse:e=>{let{res:s}=r.node;return s.statusCode=e.status,m(r,e.headers),n(r,e.body)}})}).createHandler();export{l as Actions,b as AgentDeliveryError,O as AgentError,y as Button,H as Card,S as CardLink,i as CardText,x as Client,E as CronExpression,f as Divider,g as Image,t as NovuRequestHandler,N as Select,w as SelectOption,B as SeverityLevelEnum,c as TextInput,F as agent,h as frameworkName,k as isFromWorkflow,$ as providerSchemas,R as serve,D as step,q as toAgentError,C as workflow};
1
+ import{b as q,c as t,d as C,e as Q}from"../chunk-JWRKOFAS.js";import"../chunk-H3BQFYPR.js";import{a as R}from"../chunk-YLCLZVYS.js";import"../chunk-XIVU4VDS.js";import{R as F,S as $,T as B,X as L}from"../chunk-2ANSU3EI.js";import{a as l,b as y,c as H,d as S,e as i,f,g,j as N,k as w,m as c,q as E,r as k,s as x}from"../chunk-IHERFGZC.js";import"../chunk-ICOHH7TO.js";import{a as D}from"../chunk-E54LXWY3.js";import{f as O}from"../chunk-VY27ZAO7.js";import{c as b}from"../chunk-5DVHK5DS.js";import"../chunk-FHYMHX3T.js";import{getHeader as o,getQuery as a,readBody as p,send as n,setHeaders as m}from"h3";var h="h3",_=d=>new t({frameworkName:h,...d,handler:r=>({body:()=>p(r),headers:e=>o(r,e),method:()=>r.method,url:()=>new URL(String(r.path),`${process.env.NODE_ENV==="development"?"http":"https"}://${String(o(r,"host"))}`),queryString:e=>String(a(r)[e]),transformResponse:e=>{let{res:s}=r.node;return s.statusCode=e.status,m(r,e.headers),n(r,e.body)}})}).createHandler();export{l as Actions,$ as AgentDeliveryError,F as AgentError,y as Button,H as Card,S as CardLink,i as CardText,f as Chart,q as Client,O as CronExpression,g as Divider,N as Image,w as LinkButton,t as NovuRequestHandler,E as Select,k as SelectOption,L as SeverityLevelEnum,c as Table,x as TextInput,C as agent,h as frameworkName,b as isFromWorkflow,D as providerSchemas,_ as serve,R as step,B as toAgentError,Q as workflow};
@@ -1,11 +1,11 @@
1
1
  import { Context } from 'hono';
2
- import { S as ServeHandlerOptions } from '../index-BvRGmHFw.js';
3
- export { C as Client, N as NovuRequestHandler, a as agent, i as isFromWorkflow, w as workflow } from '../index-BvRGmHFw.js';
4
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-DORn4djx.js';
5
- export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-Drf26WPA.js';
2
+ import { S as ServeHandlerOptions } from '../index-DBKGOU-x.js';
3
+ export { C as Client, N as NovuRequestHandler, a as agent, i as isFromWorkflow, w as workflow } from '../index-DBKGOU-x.js';
4
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-Dp-fsCai.js';
5
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-UA_2pkYJ.js';
6
6
  import { S as SupportedFrameworkName } from '../server.types-Cc6o5eYH.js';
7
- export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Image, ImageElement, Select, SelectOption, TextInput } from 'chat';
8
- export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentContextPayload, f as AgentContextValue, g as AgentConversation, h as AgentDeliveryError, i as AgentError, j as AgentHandlerContext, k as AgentHandlers, l as AgentHistoryEntry, m as AgentHumanResponse, n as AgentMessage, o as AgentMessageAuthor, p as AgentMessageContext, q as AgentNotification, r as AgentPlatformContext, s as AgentReaction, t as AgentReactionContext, u as AgentResolveContext, v as AgentSubscriber, w as AgentSubscriberAccess, x as AgentToolCall, F as FileRef, H as HumanAskApproveOptions, y as HumanChooseOptions, z as HumanInteractionKind, B as HumanTellOptions, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, C as ToolApprovalConfig, D as ToolApprovalDecision, E as toAgentError } from '../agent.types-DFLG1_vb.js';
7
+ export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Chart, ChartElement, Divider, Image, ImageElement, LinkButton, LinkButtonElement, Select, SelectOption, Table, TableElement, TextInput } from 'chat';
8
+ export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentContextPayload, f as AgentContextValue, g as AgentConversation, h as AgentDeliveryError, i as AgentError, j as AgentHandlerContext, k as AgentHandlers, l as AgentHistoryEntry, m as AgentHumanResponse, n as AgentMessage, o as AgentMessageAuthor, p as AgentMessageContext, q as AgentMessageDeletedContext, r as AgentMessageUpdatedContext, s as AgentNotification, t as AgentPlatformContext, u as AgentReaction, v as AgentReactionContext, w as AgentResolveContext, x as AgentSubscriber, y as AgentSubscriberAccess, z as AgentToolCall, F as FileRef, H as HumanAskApproveOptions, B as HumanChooseOptions, C as HumanInteractionKind, D as HumanTellOptions, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, E as ToolApprovalConfig, G as ToolApprovalDecision, I as toAgentError } from '../agent.types-C9T8i5SY.js';
9
9
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, ToolStepResolver, step } from '../step-resolver.js';
10
10
  import '../util.types-DaFfsxgy.js';
11
11
  import '../base.schema.types-BApIn9jr.js';
@@ -1 +1 @@
1
- import{a as s,b as C,c as p,d as k,e as g}from"../chunk-JLKEQIWC.js";import{a as D}from"../chunk-YLCLZVYS.js";import"../chunk-XIVU4VDS.js";import{N as U,O as E,P as S,W as O}from"../chunk-4ETX7FIT.js";import{a as m,b as h,c as l,d as c,e as f,f as x,i as w,p as y,q,r as v}from"../chunk-X5AZIKIR.js";import"../chunk-RBTQQ5IZ.js";import{a as H}from"../chunk-IREH6K2M.js";import{f as N}from"../chunk-VY27ZAO7.js";import{b as R}from"../chunk-PU74XQ2P.js";import"../chunk-FHYMHX3T.js";var u="hono",d=o=>{try{let n=o.executionCtx;if(typeof n.waitUntil=="function")return e=>n.waitUntil(e)}catch{}},P=o=>new p({frameworkName:u,...o,handler:e=>({body:()=>e.req.json(),waitUntil:d(e),headers:t=>e.req.header(t),method:()=>e.req.method,queryString:t=>e.req.query(t),url:()=>{try{return new URL(e.req.url)}catch{}let t=e.req.header("host")||"localhost",r="https";try{(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev")&&(r="http")}catch{}return new URL(e.req.url,`${r}://${t}`)},transformResponse:({body:t,status:r,headers:a})=>{let i=s();return new i(t,{status:r,headers:a})}})}).createHandler();export{m as Actions,E as AgentDeliveryError,U as AgentError,h as Button,l as Card,c as CardLink,f as CardText,C as Client,N as CronExpression,x as Divider,w as Image,p as NovuRequestHandler,y as Select,q as SelectOption,O as SeverityLevelEnum,v as TextInput,k as agent,u as frameworkName,R as isFromWorkflow,H as providerSchemas,P as serve,D as step,S as toAgentError,g as workflow};
1
+ import{a as s,b as S,c as p,d as g,e as L}from"../chunk-JWRKOFAS.js";import"../chunk-H3BQFYPR.js";import{a as P}from"../chunk-YLCLZVYS.js";import"../chunk-XIVU4VDS.js";import{R as k,S as H,T as O,X as F}from"../chunk-2ANSU3EI.js";import{a as m,b as h,c as l,d as c,e as f,f as x,g as w,j as y,k as q,m as v,q as N,r as R,s as C}from"../chunk-IHERFGZC.js";import"../chunk-ICOHH7TO.js";import{a as D}from"../chunk-E54LXWY3.js";import{f as U}from"../chunk-VY27ZAO7.js";import{c as E}from"../chunk-5DVHK5DS.js";import"../chunk-FHYMHX3T.js";var u="hono",d=o=>{try{let n=o.executionCtx;if(typeof n.waitUntil=="function")return e=>n.waitUntil(e)}catch{}},$=o=>new p({frameworkName:u,...o,handler:e=>({body:()=>e.req.json(),waitUntil:d(e),headers:t=>e.req.header(t),method:()=>e.req.method,queryString:t=>e.req.query(t),url:()=>{try{return new URL(e.req.url)}catch{}let t=e.req.header("host")||"localhost",r="https";try{(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev")&&(r="http")}catch{}return new URL(e.req.url,`${r}://${t}`)},transformResponse:({body:t,status:r,headers:a})=>{let i=s();return new i(t,{status:r,headers:a})}})}).createHandler();export{m as Actions,H as AgentDeliveryError,k as AgentError,h as Button,l as Card,c as CardLink,f as CardText,x as Chart,S as Client,U as CronExpression,w as Divider,y as Image,q as LinkButton,p as NovuRequestHandler,N as Select,R as SelectOption,F as SeverityLevelEnum,v as Table,C as TextInput,g as agent,u as frameworkName,E as isFromWorkflow,D as providerSchemas,$ as serve,P as step,O as toAgentError,L as workflow};
@@ -1,13 +1,13 @@
1
1
  import * as aws_lambda from 'aws-lambda';
2
2
  import { APIGatewayProxyEventV2, APIGatewayProxyResult } from 'aws-lambda';
3
- import { S as ServeHandlerOptions } from '../index-BvRGmHFw.js';
4
- export { C as Client, N as NovuRequestHandler, a as agent, i as isFromWorkflow, w as workflow } from '../index-BvRGmHFw.js';
5
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-DORn4djx.js';
6
- export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-Drf26WPA.js';
3
+ import { S as ServeHandlerOptions } from '../index-DBKGOU-x.js';
4
+ export { C as Client, N as NovuRequestHandler, a as agent, i as isFromWorkflow, w as workflow } from '../index-DBKGOU-x.js';
5
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-Dp-fsCai.js';
6
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-UA_2pkYJ.js';
7
7
  import { E as Either } from '../util.types-DaFfsxgy.js';
8
8
  import { S as SupportedFrameworkName } from '../server.types-Cc6o5eYH.js';
9
- export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Image, ImageElement, Select, SelectOption, TextInput } from 'chat';
10
- export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentContextPayload, f as AgentContextValue, g as AgentConversation, h as AgentDeliveryError, i as AgentError, j as AgentHandlerContext, k as AgentHandlers, l as AgentHistoryEntry, m as AgentHumanResponse, n as AgentMessage, o as AgentMessageAuthor, p as AgentMessageContext, q as AgentNotification, r as AgentPlatformContext, s as AgentReaction, t as AgentReactionContext, u as AgentResolveContext, v as AgentSubscriber, w as AgentSubscriberAccess, x as AgentToolCall, F as FileRef, H as HumanAskApproveOptions, y as HumanChooseOptions, z as HumanInteractionKind, B as HumanTellOptions, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, C as ToolApprovalConfig, D as ToolApprovalDecision, E as toAgentError } from '../agent.types-DFLG1_vb.js';
9
+ export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Chart, ChartElement, Divider, Image, ImageElement, LinkButton, LinkButtonElement, Select, SelectOption, Table, TableElement, TextInput } from 'chat';
10
+ export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentContextPayload, f as AgentContextValue, g as AgentConversation, h as AgentDeliveryError, i as AgentError, j as AgentHandlerContext, k as AgentHandlers, l as AgentHistoryEntry, m as AgentHumanResponse, n as AgentMessage, o as AgentMessageAuthor, p as AgentMessageContext, q as AgentMessageDeletedContext, r as AgentMessageUpdatedContext, s as AgentNotification, t as AgentPlatformContext, u as AgentReaction, v as AgentReactionContext, w as AgentResolveContext, x as AgentSubscriber, y as AgentSubscriberAccess, z as AgentToolCall, F as FileRef, H as HumanAskApproveOptions, B as HumanChooseOptions, C as HumanInteractionKind, D as HumanTellOptions, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, E as ToolApprovalConfig, G as ToolApprovalDecision, I as toAgentError } from '../agent.types-C9T8i5SY.js';
11
11
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, ToolStepResolver, step } from '../step-resolver.js';
12
12
  import '../base.schema.types-BApIn9jr.js';
13
13
  import 'json-schema-to-ts';
@@ -1 +1 @@
1
- import{b as A,c as n,d as q,e as H}from"../chunk-JLKEQIWC.js";import{a as N}from"../chunk-YLCLZVYS.js";import"../chunk-XIVU4VDS.js";import{N as G,O as S,P as b,W as V}from"../chunk-4ETX7FIT.js";import{a as m,b as u,c as P,d as h,e as i,f as w,i as l,p as f,q as x,r as c}from"../chunk-X5AZIKIR.js";import"../chunk-RBTQQ5IZ.js";import{a as g}from"../chunk-IREH6K2M.js";import{f as E}from"../chunk-VY27ZAO7.js";import{b as I}from"../chunk-PU74XQ2P.js";import"../chunk-FHYMHX3T.js";var p="lambda",k=y=>new n({frameworkName:p,...y,handler:r=>{let s=(e=>e.version==="2.0")(r);return{url:()=>{let e=s?r.requestContext.http.path:r.path,t=r.headers["x-forwarded-proto"]||"https",a=new URL(e,`${t}://${r.headers.host||r.headers.Host||""}`);for(let o in r.queryStringParameters)o&&a.searchParams.set(o,r.queryStringParameters[o]);return a},body:()=>{let e="{}";return r.body&&(e=r.isBase64Encoded?Buffer.from(r.body,"base64").toString():r.body),JSON.parse(e)},headers:e=>r.headers[e],queryString:e=>{var t;return(t=r.queryStringParameters)==null?void 0:t[e]},transformResponse:({body:e,status:t,headers:a})=>Promise.resolve({body:e,statusCode:t,headers:a}),method:()=>s?r.requestContext.http.method:r.httpMethod}}}).createHandler();export{m as Actions,S as AgentDeliveryError,G as AgentError,u as Button,P as Card,h as CardLink,i as CardText,A as Client,E as CronExpression,w as Divider,l as Image,n as NovuRequestHandler,f as Select,x as SelectOption,V as SeverityLevelEnum,c as TextInput,q as agent,p as frameworkName,I as isFromWorkflow,g as providerSchemas,k as serve,N as step,b as toAgentError,H as workflow};
1
+ import{b,c as n,d as H,e as k}from"../chunk-JWRKOFAS.js";import"../chunk-H3BQFYPR.js";import{a as C}from"../chunk-YLCLZVYS.js";import"../chunk-XIVU4VDS.js";import{R as q,S as g,T as V,X as R}from"../chunk-2ANSU3EI.js";import{a as m,b as u,c as P,d as h,e as i,f as w,g as l,j as f,k as x,m as c,q as E,r as I,s as A}from"../chunk-IHERFGZC.js";import"../chunk-ICOHH7TO.js";import{a as N}from"../chunk-E54LXWY3.js";import{f as G}from"../chunk-VY27ZAO7.js";import{c as S}from"../chunk-5DVHK5DS.js";import"../chunk-FHYMHX3T.js";var p="lambda",B=y=>new n({frameworkName:p,...y,handler:r=>{let s=(e=>e.version==="2.0")(r);return{url:()=>{let e=s?r.requestContext.http.path:r.path,t=r.headers["x-forwarded-proto"]||"https",a=new URL(e,`${t}://${r.headers.host||r.headers.Host||""}`);for(let o in r.queryStringParameters)o&&a.searchParams.set(o,r.queryStringParameters[o]);return a},body:()=>{let e="{}";return r.body&&(e=r.isBase64Encoded?Buffer.from(r.body,"base64").toString():r.body),JSON.parse(e)},headers:e=>r.headers[e],queryString:e=>{var t;return(t=r.queryStringParameters)==null?void 0:t[e]},transformResponse:({body:e,status:t,headers:a})=>Promise.resolve({body:e,statusCode:t,headers:a}),method:()=>s?r.requestContext.http.method:r.httpMethod}}}).createHandler();export{m as Actions,g as AgentDeliveryError,q as AgentError,u as Button,P as Card,h as CardLink,i as CardText,w as Chart,b as Client,G as CronExpression,l as Divider,f as Image,x as LinkButton,n as NovuRequestHandler,E as Select,I as SelectOption,R as SeverityLevelEnum,c as Table,A as TextInput,H as agent,p as frameworkName,S as isFromWorkflow,N as providerSchemas,B as serve,C as step,V as toAgentError,k as workflow};