@novu/framework 2.11.0 → 2.11.2-alpha.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 (85) hide show
  1. package/README.md +114 -9
  2. package/ai-sdk/package.json +4 -0
  3. package/cards/package.json +4 -0
  4. package/dist/{esm/index-dylq0Kmx.d.ts → cjs/agent.types-DdgaVUb7.d.cts} +356 -192
  5. package/dist/cjs/ai-sdk/index.cjs +1 -0
  6. package/dist/cjs/ai-sdk/index.d.cts +39 -0
  7. package/dist/cjs/cards.cjs +57 -0
  8. package/dist/cjs/cards.d.cts +2 -0
  9. package/dist/cjs/{health-check.types-uaDLF5bo.d.cts → health-check.types-CkUmYLNG.d.cts} +34 -140
  10. package/dist/cjs/index-BCp3U0UG.d.cts +189 -0
  11. package/dist/cjs/index.cjs +138 -135
  12. package/dist/cjs/index.d.cts +5 -3
  13. package/dist/cjs/internal/index.cjs +1 -1
  14. package/dist/cjs/internal/index.d.cts +96 -4
  15. package/dist/cjs/jsx-dev-runtime.cjs +1 -1
  16. package/dist/cjs/jsx-runtime.cjs +1 -1
  17. package/dist/cjs/langchain/index.cjs +1 -0
  18. package/dist/cjs/langchain/index.d.cts +105 -0
  19. package/dist/cjs/servers/express.cjs +137 -134
  20. package/dist/cjs/servers/express.d.cts +6 -4
  21. package/dist/cjs/servers/h3.cjs +136 -133
  22. package/dist/cjs/servers/h3.d.cts +6 -4
  23. package/dist/cjs/servers/lambda.cjs +138 -135
  24. package/dist/cjs/servers/lambda.d.cts +6 -5
  25. package/dist/cjs/servers/nest.cjs +136 -133
  26. package/dist/cjs/servers/nest.d.cts +21 -7
  27. package/dist/cjs/servers/next.cjs +138 -135
  28. package/dist/cjs/servers/next.d.cts +6 -4
  29. package/dist/cjs/servers/nuxt.cjs +136 -133
  30. package/dist/cjs/servers/nuxt.d.cts +6 -4
  31. package/dist/cjs/servers/remix.cjs +138 -135
  32. package/dist/cjs/servers/remix.d.cts +6 -4
  33. package/dist/cjs/servers/sveltekit.cjs +136 -133
  34. package/dist/cjs/servers/sveltekit.d.cts +6 -4
  35. package/dist/cjs/step-resolver.d.cts +3 -2
  36. package/dist/cjs/{subscriber.types-PRaHFLJu.d.cts → subscriber.types-DxMMRBIi.d.cts} +2 -78
  37. package/dist/cjs/util.types-DaFfsxgy.d.cts +78 -0
  38. package/dist/{cjs/index-D-SLxj--.d.cts → esm/agent.types-Bu3DhlVb.d.ts} +356 -192
  39. package/dist/esm/ai-sdk/index.d.ts +39 -0
  40. package/dist/esm/ai-sdk/index.js +1 -0
  41. package/dist/esm/cards.d.ts +2 -0
  42. package/dist/esm/cards.js +1 -0
  43. package/dist/esm/{chunk-K7PM3FEJ.js → chunk-3XT6S7TZ.js} +14 -14
  44. package/dist/esm/chunk-3ZWME5KT.js +0 -0
  45. package/dist/esm/chunk-C3P3ZH2I.js +36 -0
  46. package/dist/esm/chunk-FHYMHX3T.js +1 -0
  47. package/dist/esm/chunk-KLIOXJR3.js +1 -0
  48. package/dist/esm/chunk-W6DIBD4Z.js +1 -0
  49. package/dist/esm/chunk-YF62BBGH.js +98 -0
  50. package/dist/esm/{health-check.types-XZwesagD.d.ts → health-check.types-nDCnGlmX.d.ts} +34 -140
  51. package/dist/esm/index-DEehllqa.d.ts +189 -0
  52. package/dist/esm/index.d.ts +5 -3
  53. package/dist/esm/index.js +1 -1
  54. package/dist/esm/internal/index.d.ts +96 -4
  55. package/dist/esm/internal/index.js +1 -1
  56. package/dist/esm/jsx-dev-runtime.js +1 -1
  57. package/dist/esm/jsx-runtime-7EPQR56T.js +1 -0
  58. package/dist/esm/jsx-runtime.js +1 -1
  59. package/dist/esm/langchain/index.d.ts +105 -0
  60. package/dist/esm/langchain/index.js +1 -0
  61. package/dist/esm/servers/express.d.ts +6 -4
  62. package/dist/esm/servers/express.js +1 -1
  63. package/dist/esm/servers/h3.d.ts +6 -4
  64. package/dist/esm/servers/h3.js +1 -1
  65. package/dist/esm/servers/lambda.d.ts +6 -5
  66. package/dist/esm/servers/lambda.js +1 -1
  67. package/dist/esm/servers/nest.d.ts +21 -7
  68. package/dist/esm/servers/nest.js +1 -1
  69. package/dist/esm/servers/next.d.ts +6 -4
  70. package/dist/esm/servers/next.js +1 -1
  71. package/dist/esm/servers/nuxt.d.ts +6 -4
  72. package/dist/esm/servers/nuxt.js +1 -1
  73. package/dist/esm/servers/remix.d.ts +6 -4
  74. package/dist/esm/servers/remix.js +1 -1
  75. package/dist/esm/servers/sveltekit.d.ts +6 -4
  76. package/dist/esm/servers/sveltekit.js +1 -1
  77. package/dist/esm/step-resolver.d.ts +3 -2
  78. package/dist/esm/step-resolver.js +1 -1
  79. package/dist/esm/{subscriber.types-CC7F0JO_.d.ts → subscriber.types-BbyO_Cz6.d.ts} +2 -78
  80. package/dist/esm/util.types-DaFfsxgy.d.ts +78 -0
  81. package/dist/esm/validators.js +1 -1
  82. package/package.json +55 -7
  83. package/dist/esm/chunk-52LSX2V5.js +0 -1
  84. package/dist/esm/chunk-LJUUDK2J.js +0 -130
  85. package/dist/esm/chunk-N4PZBM53.js +0 -1
@@ -1,14 +1,16 @@
1
- import { I as INovuRequestHandlerOptions, N as NovuRequestHandler, S as ServeHandlerOptions, C as Client, A as Agent } from '../index-dylq0Kmx.js';
2
- export { a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, i as AgentHandlers, j as AgentHistoryEntry, k as AgentMessage, l as AgentMessageAuthor, m as AgentMessageContext, n as AgentPlatformContext, o as AgentReaction, p as AgentReactionContext, q as AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-dylq0Kmx.js';
3
- import { W as Workflow } from '../health-check.types-XZwesagD.js';
4
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum } from '../health-check.types-XZwesagD.js';
1
+ import { I as INovuRequestHandlerOptions, N as NovuRequestHandler, S as ServeHandlerOptions, C as Client } from '../index-DEehllqa.js';
2
+ export { A as AgentDeliveryError, a as agent, w as workflow } from '../index-DEehllqa.js';
3
+ import { W as Workflow } from '../health-check.types-nDCnGlmX.js';
4
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum } from '../health-check.types-nDCnGlmX.js';
5
5
  export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
6
+ import { A as Agent } from '../agent.types-Bu3DhlVb.js';
7
+ export { a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentConversation, f as AgentHandlerContext, g as AgentHandlers, h as AgentHistoryEntry, i as AgentMessage, j as AgentMessageAuthor, k as AgentMessageContext, l as AgentPlatformContext, m as AgentReaction, n as AgentReactionContext, o as AgentResolveContext, p as AgentSubscriber, q as AgentToolCall, F as FileRef, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, r as ToolApprovalConfig, s as ToolApprovalDecision } from '../agent.types-Bu3DhlVb.js';
6
8
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
7
- import { a as Either } from '../subscriber.types-CC7F0JO_.js';
8
- export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CC7F0JO_.js';
9
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-BbyO_Cz6.js';
9
10
  import { Request, Response } from 'express';
10
11
  import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
11
12
  import { VercelRequest, VercelResponse } from '@vercel/node';
13
+ import { E as Either } from '../util.types-DaFfsxgy.js';
12
14
  import * as _nestjs_common from '@nestjs/common';
13
15
  import { Provider, FactoryProvider } from '@nestjs/common';
14
16
  import '../base.schema.types-BApIn9jr.js';
@@ -63,6 +65,7 @@ declare const ASYNC_OPTIONS_TYPE: _nestjs_common.ConfigurableModuleAsyncOptions<
63
65
  }>;
64
66
 
65
67
  declare const REGISTER_API_PATH = "REGISTER_API_PATH";
68
+ declare const REGISTER_CONTROLLER_DECORATORS = "REGISTER_CONTROLLER_DECORATORS";
66
69
 
67
70
  declare class NovuController {
68
71
  private novuService;
@@ -128,4 +131,15 @@ declare class NovuModule extends NovuBaseModule {
128
131
  */
129
132
  declare const registerApiPath: FactoryProvider;
130
133
 
131
- export { Agent, Client, NOVU_OPTIONS, NovuClient, NovuController, NovuHandler, NovuModule, type NovuModuleOptions, NovuRequestHandler, REGISTER_API_PATH, ServeHandlerOptions, Workflow, frameworkName, registerApiPath };
134
+ /**
135
+ * Apply controller decorators resolved from async module options.
136
+ *
137
+ * A custom provider is necessary because `controllerDecorators` are only
138
+ * available after the async options factory runs, while NestJS requires
139
+ * controllers to be declared when the dynamic module is created.
140
+ *
141
+ * This mirrors the `registerApiPath` pattern used for dynamic controller paths.
142
+ */
143
+ declare const registerControllerDecorators: FactoryProvider;
144
+
145
+ export { Agent, Client, NOVU_OPTIONS, NovuClient, NovuController, NovuHandler, NovuModule, type NovuModuleOptions, NovuRequestHandler, REGISTER_API_PATH, REGISTER_CONTROLLER_DECORATORS, ServeHandlerOptions, Workflow, frameworkName, registerApiPath, registerControllerDecorators };
@@ -1 +1 @@
1
- import{b as g,c as G,d as U,e as j,f as C,g as D,h as F,i as k,j as B,k as L,l as $,m as K,n as z,o as y,p as W}from"../chunk-LJUUDK2J.js";import{O as Q}from"../chunk-N4PZBM53.js";import"../chunk-K7PM3FEJ.js";import{a as X}from"../chunk-2M25EATE.js";import{a as J}from"../chunk-QTWEINJ4.js";import"../chunk-DKQLYSZS.js";import{f as V}from"../chunk-FRWG7YTE.js";import{d as a,e as n}from"../chunk-52LSX2V5.js";import{Inject as R,Injectable as E}from"@nestjs/common";import{ConfigurableModuleBuilder as x}from"@nestjs/common";var{ConfigurableModuleClass:d,MODULE_OPTIONS_TOKEN:m,OPTIONS_TYPE:ee,ASYNC_OPTIONS_TYPE:re}=new x().setClassMethodName("register").setFactoryMethodName("createNovuModuleOptions").setExtras(l=>({...l,isGlobal:!0})).build();var P="REGISTER_API_PATH";import{Injectable as I}from"@nestjs/common";var i=class{handler(e,r){return{body:()=>e.body,headers:t=>{let p=e.headers[t.toLowerCase()];return Array.isArray(p)?p[0]:p},method:()=>e.method||"GET",queryString:t=>{let p=e.query[t];return Array.isArray(p)?p[0]:p},url:()=>{let t=e.headers.host||"",p=t!=null&&t.includes("://")?"":`${e.protocol||"https"}://`;return new URL(e.originalUrl||e.url||"",`${p}${t||""}`)},transformResponse:({body:t,headers:p,status:T})=>(Object.entries(p).forEach(([N,S])=>{r.setHeader(N,S)}),r.status(T).send(t))}}};i=a([I()],i);var _="nest",u=class{constructor(e,r){this.options=e;this.novuHandler=r;this.novuRequestHandler=new y({frameworkName:_,...this.options,handler:this.novuHandler.handler})}async handleRequest(e,r){await this.novuRequestHandler.createHandler()(e,r)}};u=a([E(),n(0,R(m)),n(1,R(i))],u);import{Controller as A,Get as H,Inject as q,Options as b,Post as w,Req as f,Res as O}from"@nestjs/common";var s=class{constructor(e){this.novuService=e}async handleGet(e,r){await this.novuService.handleRequest(e,r)}async handlePost(e,r){await this.novuService.handleRequest(e,r)}async handleOptions(e,r){await this.novuService.handleRequest(e,r)}};a([H(),n(0,f()),n(1,O())],s.prototype,"handleGet",1),a([w(),n(0,f()),n(1,O())],s.prototype,"handlePost",1),a([b(),n(0,f()),n(1,O())],s.prototype,"handleOptions",1),s=a([A(),n(0,q(u))],s);import{Module as Y}from"@nestjs/common";import{PATH_METADATA as M}from"@nestjs/common/constants";var h={provide:P,useFactory:l=>{if(!l.apiPath)throw new Error("`apiPath` must be provided to set the controller path");Reflect.defineMetadata(M,l.apiPath,s)},inject:[m]};function v(l,e=[]){return e.reduce((r,o)=>o(r),l)}var c=class extends d{static register(e,r){var t;let o=d.register(e);return o.controllers=[v(s,e.controllerDecorators||[])],(t=o.providers)==null||t.push(h,u,i,...r||[]),o.exports=[u,i],o}static registerAsync(e,r){var t;let o=d.registerAsync(e);return o.controllers=[s],(t=o.providers)==null||t.push(h,u,i,...r||[]),o.exports=[u,i],o}};c=a([Y({})],c);export{G as Actions,$ as AgentDeliveryError,z as AgentEventEnum,U as Button,j as Card,C as CardLink,D as CardText,g as Client,V as CronExpression,F as Divider,m as NOVU_OPTIONS,u as NovuClient,s as NovuController,i as NovuHandler,c as NovuModule,y as NovuRequestHandler,P as REGISTER_API_PATH,k as Select,B as SelectOption,Q as SeverityLevelEnum,L as TextInput,K as agent,_ as frameworkName,J as providerSchemas,h as registerApiPath,X as step,W as workflow};
1
+ import{b as J,c as P,d as W,e as ee}from"../chunk-YF62BBGH.js";import{a as j,b as F,c as L,d as V,e as U,f as k,g as B,h as $,i as K}from"../chunk-C3P3ZH2I.js";import"../chunk-3XT6S7TZ.js";import{a as re}from"../chunk-2M25EATE.js";import"../chunk-DKQLYSZS.js";import{M as Q,S as Z}from"../chunk-KLIOXJR3.js";import{a as X}from"../chunk-QTWEINJ4.js";import{f as z}from"../chunk-FRWG7YTE.js";import"../chunk-W6DIBD4Z.js";import{d as n,e as i}from"../chunk-FHYMHX3T.js";import{Inject as N,Injectable as H}from"@nestjs/common";import{ConfigurableModuleBuilder as x}from"@nestjs/common";var{ConfigurableModuleClass:u,MODULE_OPTIONS_TOKEN:m,OPTIONS_TYPE:oe,ASYNC_OPTIONS_TYPE:se}=new x().setClassMethodName("register").setFactoryMethodName("createNovuModuleOptions").setExtras(o=>({...o,isGlobal:!0})).build();var h="REGISTER_API_PATH",E="REGISTER_CONTROLLER_DECORATORS";import{Injectable as A}from"@nestjs/common";var c=class{handler(e,r){return{body:()=>e.body,headers:t=>{let a=e.headers[t.toLowerCase()];return Array.isArray(a)?a[0]:a},method:()=>e.method||"GET",queryString:t=>{let a=e.query[t];return Array.isArray(a)?a[0]:a},url:()=>{let t=e.headers.host||"",a=t!=null&&t.includes("://")?"":`${e.protocol||"https"}://`;return new URL(e.originalUrl||e.url||"",`${a}${t||""}`)},transformResponse:({body:t,headers:a,status:y})=>(Object.entries(a).forEach(([I,_])=>{r.setHeader(I,_)}),r.status(y).send(t))}}};c=n([A()],c);var q="nest",l=class{constructor(e,r){this.options=e;this.novuHandler=r;this.novuRequestHandler=new P({frameworkName:q,...this.options,handler:this.novuHandler.handler})}async handleRequest(e,r){await this.novuRequestHandler.createHandler()(e,r)}};l=n([H(),i(0,N(m)),i(1,N(c))],l);import{Controller as M,Get as D,Inject as C,Options as b,Post as w,Req as f,Res as O}from"@nestjs/common";var p=class{constructor(e){this.novuService=e}async handleGet(e,r){await this.novuService.handleRequest(e,r)}async handlePost(e,r){await this.novuService.handleRequest(e,r)}async handleOptions(e,r){await this.novuService.handleRequest(e,r)}};n([D(),i(0,f()),i(1,O())],p.prototype,"handleGet",1),n([w(),i(0,f()),i(1,O())],p.prototype,"handlePost",1),n([b(),i(0,f()),i(1,O())],p.prototype,"handleOptions",1),p=n([M(),i(0,C(l))],p);import{Module as G}from"@nestjs/common";import{PATH_METADATA as Y}from"@nestjs/common/constants";var R={provide:h,useFactory:o=>{if(!o.apiPath)throw new Error("`apiPath` must be provided to set the controller path");Reflect.defineMetadata(Y,o.apiPath,p)},inject:[m]};function T(o,e=[]){return e.reduce((r,s)=>{let t=s(r);return t!=null?t:r},o)}function g(o,e){var r;for(let s of(r=Reflect.getMetadataKeys(o))!=null?r:[])Reflect.defineMetadata(s,Reflect.getMetadata(s,o),e)}function S(o,e=[]){let r=T(o,e);r!==o&&g(r,o)}var v={provide:E,useFactory:o=>{var e;S(p,(e=o.controllerDecorators)!=null?e:[])},inject:[m]};var d=class extends u{static register(e,r){var t;let s=u.register(e);return s.controllers=[T(p,e.controllerDecorators||[])],(t=s.providers)==null||t.push(R,l,c,...r||[]),s.exports=[l,c],s}static registerAsync(e,r){var t;let s=u.registerAsync(e);return s.controllers=[p],(t=s.providers)==null||t.push(R,v,l,c,...r||[]),s.exports=[l,c],s}};d=n([G({})],d);export{j as Actions,Q as AgentDeliveryError,F as Button,L as Card,V as CardLink,U as CardText,J as Client,z as CronExpression,k as Divider,m as NOVU_OPTIONS,l as NovuClient,p as NovuController,c as NovuHandler,d as NovuModule,P as NovuRequestHandler,h as REGISTER_API_PATH,E as REGISTER_CONTROLLER_DECORATORS,B as Select,$ as SelectOption,Z as SeverityLevelEnum,K as TextInput,W as agent,q as frameworkName,X as providerSchemas,R as registerApiPath,v as registerControllerDecorators,re as step,ee as workflow};
@@ -1,11 +1,13 @@
1
1
  import { NextRequest } from 'next/server';
2
- import { S as ServeHandlerOptions } from '../index-dylq0Kmx.js';
3
- export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, i as AgentHandlers, j as AgentHistoryEntry, k as AgentMessage, l as AgentMessageAuthor, m as AgentMessageContext, n as AgentPlatformContext, o as AgentReaction, p as AgentReactionContext, q as AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-dylq0Kmx.js';
4
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-XZwesagD.js';
5
- export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CC7F0JO_.js';
2
+ import { S as ServeHandlerOptions } from '../index-DEehllqa.js';
3
+ export { A as AgentDeliveryError, C as Client, N as NovuRequestHandler, a as agent, w as workflow } from '../index-DEehllqa.js';
4
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-nDCnGlmX.js';
5
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-BbyO_Cz6.js';
6
6
  import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
7
7
  export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
8
+ export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentConversation, f as AgentHandlerContext, g as AgentHandlers, h as AgentHistoryEntry, i as AgentMessage, j as AgentMessageAuthor, k as AgentMessageContext, l as AgentPlatformContext, m as AgentReaction, n as AgentReactionContext, o as AgentResolveContext, p as AgentSubscriber, q as AgentToolCall, F as FileRef, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, r as ToolApprovalConfig, s as ToolApprovalDecision } from '../agent.types-Bu3DhlVb.js';
8
9
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
10
+ import '../util.types-DaFfsxgy.js';
9
11
  import '../base.schema.types-BApIn9jr.js';
10
12
  import 'json-schema-to-ts';
11
13
  import 'zod';
@@ -1 +1 @@
1
- import{a as l,b as x,c as q,d as S,e as T,f as w,g as P,h as A,i as E,j as b,k as v,l as g,m as F,n as j,o as c,p as I}from"../chunk-LJUUDK2J.js";import{O as G}from"../chunk-N4PZBM53.js";import"../chunk-K7PM3FEJ.js";import{a as U}from"../chunk-2M25EATE.js";import{a as k}from"../chunk-QTWEINJ4.js";import"../chunk-DKQLYSZS.js";import{f as O}from"../chunk-FRWG7YTE.js";import"../chunk-52LSX2V5.js";var m="next",N=o=>typeof o=="object"&&o!==null&&typeof o.setHeader=="function"&&typeof o.status=="function"&&typeof o.send=="function",D=o=>{let p=new c({frameworkName:m,...o,handler:(h,R,d)=>{let n=R,i=e=>{let t=typeof n.headers.get=="function"?n.headers.get(e):n.headers[e];return Array.isArray(t)?t[0]:t};return{body:()=>typeof n.json=="function"?n.json():n.body,headers:i,method:()=>h||n.method||"",queryString:(e,t)=>{var a;let r=((a=n.query)==null?void 0:a[e])||t.searchParams.get(e);return Array.isArray(r)?r[0]:r},url:()=>{let e;try{e=new URL(n.url)}catch{}if(e){let s=i("host");if(s){let u=new URL(s.includes("://")?s:`${e.protocol}//${s}`);e.protocol=u.protocol,e.host=u.host,e.port=u.port,e.username=u.username,e.password=u.password}return e}let t="https",r=i("host")||"";try{(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev")&&(t="http")}catch{}return new URL(n.url,`${t}://${r}`)},transformResponse:({body:e,headers:t,status:r})=>{if(N(d)){Object.entries(t).forEach(([s,u])=>{d.setHeader(s,u)}),d.status(r).send(e);return}let a=l();return new a(e,{status:r,headers:t})}}}}).createHandler(),f=p.bind(null,void 0);return Object.defineProperties(f,{GET:{value:p.bind(null,"GET")},POST:{value:p.bind(null,"POST")},OPTIONS:{value:p.bind(null,"OPTIONS")}})};export{q as Actions,g as AgentDeliveryError,j as AgentEventEnum,S as Button,T as Card,w as CardLink,P as CardText,x as Client,O as CronExpression,A as Divider,c as NovuRequestHandler,E as Select,b as SelectOption,G as SeverityLevelEnum,v as TextInput,F as agent,m as frameworkName,k as providerSchemas,D as serve,U as step,I as workflow};
1
+ import{a as l,b as v,c,d as F,e as G}from"../chunk-YF62BBGH.js";import{a as O,b as x,c as q,d as S,e as T,f as w,g as P,h as A,i as E}from"../chunk-C3P3ZH2I.js";import"../chunk-3XT6S7TZ.js";import{a as I}from"../chunk-2M25EATE.js";import"../chunk-DKQLYSZS.js";import{M as g,S as k}from"../chunk-KLIOXJR3.js";import{a as j}from"../chunk-QTWEINJ4.js";import{f as b}from"../chunk-FRWG7YTE.js";import"../chunk-W6DIBD4Z.js";import"../chunk-FHYMHX3T.js";var m="next",N=o=>typeof o=="object"&&o!==null&&typeof o.setHeader=="function"&&typeof o.status=="function"&&typeof o.send=="function",$=o=>{let p=new c({frameworkName:m,...o,handler:(h,R,d)=>{let n=R,i=e=>{let t=typeof n.headers.get=="function"?n.headers.get(e):n.headers[e];return Array.isArray(t)?t[0]:t};return{body:()=>typeof n.json=="function"?n.json():n.body,headers:i,method:()=>h||n.method||"",queryString:(e,t)=>{var a;let r=((a=n.query)==null?void 0:a[e])||t.searchParams.get(e);return Array.isArray(r)?r[0]:r},url:()=>{let e;try{e=new URL(n.url)}catch{}if(e){let s=i("host");if(s){let u=new URL(s.includes("://")?s:`${e.protocol}//${s}`);e.protocol=u.protocol,e.host=u.host,e.port=u.port,e.username=u.username,e.password=u.password}return e}let t="https",r=i("host")||"";try{(process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev")&&(t="http")}catch{}return new URL(n.url,`${t}://${r}`)},transformResponse:({body:e,headers:t,status:r})=>{if(N(d)){Object.entries(t).forEach(([s,u])=>{d.setHeader(s,u)}),d.status(r).send(e);return}let a=l();return new a(e,{status:r,headers:t})}}}}).createHandler(),f=p.bind(null,void 0);return Object.defineProperties(f,{GET:{value:p.bind(null,"GET")},POST:{value:p.bind(null,"POST")},OPTIONS:{value:p.bind(null,"OPTIONS")}})};export{O as Actions,g as AgentDeliveryError,x as Button,q as Card,S as CardLink,T as CardText,v as Client,b as CronExpression,w as Divider,c as NovuRequestHandler,P as Select,A as SelectOption,k as SeverityLevelEnum,E as TextInput,F as agent,m as frameworkName,j as providerSchemas,$ as serve,I as step,G as workflow};
@@ -1,12 +1,14 @@
1
1
  import * as h3 from 'h3';
2
2
  import { H3Event } from 'h3';
3
- import { S as ServeHandlerOptions } from '../index-dylq0Kmx.js';
4
- export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, i as AgentHandlers, j as AgentHistoryEntry, k as AgentMessage, l as AgentMessageAuthor, m as AgentMessageContext, n as AgentPlatformContext, o as AgentReaction, p as AgentReactionContext, q as AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-dylq0Kmx.js';
5
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-XZwesagD.js';
6
- export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CC7F0JO_.js';
3
+ import { S as ServeHandlerOptions } from '../index-DEehllqa.js';
4
+ export { A as AgentDeliveryError, C as Client, N as NovuRequestHandler, a as agent, w as workflow } from '../index-DEehllqa.js';
5
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-nDCnGlmX.js';
6
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-BbyO_Cz6.js';
7
7
  import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
8
8
  export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
9
+ export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentConversation, f as AgentHandlerContext, g as AgentHandlers, h as AgentHistoryEntry, i as AgentMessage, j as AgentMessageAuthor, k as AgentMessageContext, l as AgentPlatformContext, m as AgentReaction, n as AgentReactionContext, o as AgentResolveContext, p as AgentSubscriber, q as AgentToolCall, F as FileRef, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, r as ToolApprovalConfig, s as ToolApprovalDecision } from '../agent.types-Bu3DhlVb.js';
9
10
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
11
+ import '../util.types-DaFfsxgy.js';
10
12
  import '../base.schema.types-BApIn9jr.js';
11
13
  import 'json-schema-to-ts';
12
14
  import 'zod';
@@ -1 +1 @@
1
- import{b as H,c as S,d as i,e as y,f,g,h as N,i as w,j as c,k as x,l as E,m as k,n as O,o as t,p as F}from"../chunk-LJUUDK2J.js";import{O as q}from"../chunk-N4PZBM53.js";import"../chunk-K7PM3FEJ.js";import{a as $}from"../chunk-2M25EATE.js";import{a as b}from"../chunk-QTWEINJ4.js";import"../chunk-DKQLYSZS.js";import{f as l}from"../chunk-FRWG7YTE.js";import"../chunk-52LSX2V5.js";import{getHeader as o,getQuery as a,readBody as n,send as p,setHeaders as m}from"h3";var u="nuxt",L=d=>new t({frameworkName:u,...d,handler:r=>({queryString:e=>String(a(r)[e]),body:()=>n(r),headers:e=>o(r,e),url:()=>new URL(String(r.path),`${process.env.NODE_ENV==="development"?"http":"https"}://${String(o(r,"host"))}`),method:()=>r.method,transformResponse:e=>{let{res:s}=r.node;return s.statusCode=e.status,m(r,e.headers),p(r,e.body)}})}).createHandler();export{S as Actions,E as AgentDeliveryError,O as AgentEventEnum,i as Button,y as Card,f as CardLink,g as CardText,H as Client,l as CronExpression,N as Divider,t as NovuRequestHandler,w as Select,c as SelectOption,q as SeverityLevelEnum,x as TextInput,k as agent,u as frameworkName,b as providerSchemas,L as serve,$ as step,F as workflow};
1
+ import{b as x,c as t,d as k,e as q}from"../chunk-YF62BBGH.js";import{a as l,b as H,c as S,d as i,e as y,f,g,h as N,i as w}from"../chunk-C3P3ZH2I.js";import"../chunk-3XT6S7TZ.js";import{a as F}from"../chunk-2M25EATE.js";import"../chunk-DKQLYSZS.js";import{M as E,S as b}from"../chunk-KLIOXJR3.js";import{a as O}from"../chunk-QTWEINJ4.js";import{f as c}from"../chunk-FRWG7YTE.js";import"../chunk-W6DIBD4Z.js";import"../chunk-FHYMHX3T.js";import{getHeader as o,getQuery as a,readBody as n,send as p,setHeaders as m}from"h3";var u="nuxt",D=d=>new t({frameworkName:u,...d,handler:r=>({queryString:e=>String(a(r)[e]),body:()=>n(r),headers:e=>o(r,e),url:()=>new URL(String(r.path),`${process.env.NODE_ENV==="development"?"http":"https"}://${String(o(r,"host"))}`),method:()=>r.method,transformResponse:e=>{let{res:s}=r.node;return s.statusCode=e.status,m(r,e.headers),p(r,e.body)}})}).createHandler();export{l as Actions,E as AgentDeliveryError,H as Button,S as Card,i as CardLink,y as CardText,x as Client,c as CronExpression,f as Divider,t as NovuRequestHandler,g as Select,N as SelectOption,b as SeverityLevelEnum,w as TextInput,k as agent,u as frameworkName,O as providerSchemas,D as serve,F as step,q as workflow};
@@ -1,10 +1,12 @@
1
- import { S as ServeHandlerOptions } from '../index-dylq0Kmx.js';
2
- export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, i as AgentHandlers, j as AgentHistoryEntry, k as AgentMessage, l as AgentMessageAuthor, m as AgentMessageContext, n as AgentPlatformContext, o as AgentReaction, p as AgentReactionContext, q as AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-dylq0Kmx.js';
3
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-XZwesagD.js';
4
- export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CC7F0JO_.js';
1
+ import { S as ServeHandlerOptions } from '../index-DEehllqa.js';
2
+ export { A as AgentDeliveryError, C as Client, N as NovuRequestHandler, a as agent, w as workflow } from '../index-DEehllqa.js';
3
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-nDCnGlmX.js';
4
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-BbyO_Cz6.js';
5
5
  import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
6
6
  export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
7
+ export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentConversation, f as AgentHandlerContext, g as AgentHandlers, h as AgentHistoryEntry, i as AgentMessage, j as AgentMessageAuthor, k as AgentMessageContext, l as AgentPlatformContext, m as AgentReaction, n as AgentReactionContext, o as AgentResolveContext, p as AgentSubscriber, q as AgentToolCall, F as FileRef, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, r as ToolApprovalConfig, s as ToolApprovalDecision } from '../agent.types-Bu3DhlVb.js';
7
8
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
9
+ import '../util.types-DaFfsxgy.js';
8
10
  import '../base.schema.types-BApIn9jr.js';
9
11
  import 'json-schema-to-ts';
10
12
  import 'zod';
@@ -1 +1 @@
1
- import{a as t,b as h,c as l,d as R,e as c,f as i,g as w,h as f,i as x,j as k,k as v,l as H,m as N,n as S,o,p as q}from"../chunk-LJUUDK2J.js";import{O as y}from"../chunk-N4PZBM53.js";import"../chunk-K7PM3FEJ.js";import{a as F}from"../chunk-2M25EATE.js";import{a as g}from"../chunk-QTWEINJ4.js";import"../chunk-DKQLYSZS.js";import{f as u}from"../chunk-FRWG7YTE.js";import"../chunk-52LSX2V5.js";var m="remix",j=s=>new o({frameworkName:m,...s,handler:({request:e})=>({body:()=>e.json(),headers:r=>e.headers.get(r),method:()=>e.method,url:()=>new URL(e.url,`https://${e.headers.get("host")||""}`),transformResponse:({body:r,status:n,headers:p})=>{let a=t();return new a(r,{status:n,headers:p})}})}).createHandler();export{l as Actions,H as AgentDeliveryError,S as AgentEventEnum,R as Button,c as Card,i as CardLink,w as CardText,h as Client,u as CronExpression,f as Divider,o as NovuRequestHandler,x as Select,k as SelectOption,y as SeverityLevelEnum,v as TextInput,N as agent,m as frameworkName,g as providerSchemas,j as serve,F as step,q as workflow};
1
+ import{a as t,b as v,c as o,d as N,e as y}from"../chunk-YF62BBGH.js";import{a as u,b as h,c as l,d as R,e as c,f as i,g as w,h as f,i as x}from"../chunk-C3P3ZH2I.js";import"../chunk-3XT6S7TZ.js";import{a as q}from"../chunk-2M25EATE.js";import"../chunk-DKQLYSZS.js";import{M as H,S as g}from"../chunk-KLIOXJR3.js";import{a as S}from"../chunk-QTWEINJ4.js";import{f as k}from"../chunk-FRWG7YTE.js";import"../chunk-W6DIBD4Z.js";import"../chunk-FHYMHX3T.js";var m="remix",b=s=>new o({frameworkName:m,...s,handler:({request:e})=>({body:()=>e.json(),headers:r=>e.headers.get(r),method:()=>e.method,url:()=>new URL(e.url,`https://${e.headers.get("host")||""}`),transformResponse:({body:r,status:n,headers:p})=>{let a=t();return new a(r,{status:n,headers:p})}})}).createHandler();export{u as Actions,H as AgentDeliveryError,h as Button,l as Card,R as CardLink,c as CardText,v as Client,k as CronExpression,i as Divider,o as NovuRequestHandler,w as Select,f as SelectOption,g as SeverityLevelEnum,x as TextInput,N as agent,m as frameworkName,S as providerSchemas,b as serve,q as step,y as workflow};
@@ -1,11 +1,13 @@
1
1
  import { RequestEvent } from '@sveltejs/kit';
2
- import { S as ServeHandlerOptions } from '../index-dylq0Kmx.js';
3
- export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentBridgeRequest, e as AgentContext, f as AgentConversation, g as AgentDeliveryError, h as AgentEventEnum, i as AgentHandlers, j as AgentHistoryEntry, k as AgentMessage, l as AgentMessageAuthor, m as AgentMessageContext, n as AgentPlatformContext, o as AgentReaction, p as AgentReactionContext, q as AgentReplyPayload, r as AgentResolveContext, s as AgentSubscriber, C as Client, E as EditPayload, F as FileRef, M as MessageContent, t as MetadataSignal, N as NovuRequestHandler, R as ReplyContent, u as ReplyHandle, v as SentMessageInfo, w as Signal, T as TriggerSignal, x as agent, y as workflow } from '../index-dylq0Kmx.js';
4
- export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-XZwesagD.js';
5
- export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-CC7F0JO_.js';
2
+ import { S as ServeHandlerOptions } from '../index-DEehllqa.js';
3
+ export { A as AgentDeliveryError, C as Client, N as NovuRequestHandler, a as agent, w as workflow } from '../index-DEehllqa.js';
4
+ export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-nDCnGlmX.js';
5
+ export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-BbyO_Cz6.js';
6
6
  import { S as SupportedFrameworkName } from '../server.types-BRWsA1CA.js';
7
7
  export { Actions, Button, Card, CardChild, CardElement, CardLink, CardText, Divider, Select, SelectOption, TextInput } from 'chat';
8
+ export { A as Agent, a as AgentAction, b as AgentActionContext, c as AgentAttachment, d as AgentContext, e as AgentConversation, f as AgentHandlerContext, g as AgentHandlers, h as AgentHistoryEntry, i as AgentMessage, j as AgentMessageAuthor, k as AgentMessageContext, l as AgentPlatformContext, m as AgentReaction, n as AgentReactionContext, o as AgentResolveContext, p as AgentSubscriber, q as AgentToolCall, F as FileRef, M as MessageContent, R as ReplyHandle, T as ToolApprovalCard, r as ToolApprovalConfig, s as ToolApprovalDecision } from '../agent.types-Bu3DhlVb.js';
8
9
  export { AnyStepResolver, ChatStepResolver, EmailStepResolver, InAppStepResolver, PushStepResolver, SmsStepResolver, StepResolverContext, step } from '../step-resolver.js';
10
+ import '../util.types-DaFfsxgy.js';
9
11
  import '../base.schema.types-BApIn9jr.js';
10
12
  import 'json-schema-to-ts';
11
13
  import 'zod';
@@ -1 +1 @@
1
- import{a as r,b as E,c as P,d as R,e as T,f as S,g as c,h as f,i as h,j as N,k as q,l as F,m as b,n as w,o as s,p as I}from"../chunk-LJUUDK2J.js";import{O as G}from"../chunk-N4PZBM53.js";import"../chunk-K7PM3FEJ.js";import{a as k}from"../chunk-2M25EATE.js";import{a as y}from"../chunk-QTWEINJ4.js";import"../chunk-DKQLYSZS.js";import{f as v}from"../chunk-FRWG7YTE.js";import"../chunk-52LSX2V5.js";var m="sveltekit",x=o=>{let t=new s({frameworkName:m,...o,handler:(u,e)=>({method:()=>u||e.request.method||"",body:()=>e.request.json(),headers:n=>e.request.headers.get(n),url:()=>{let n=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev"?"http":"https";return new URL(e.request.url,`${n}://${e.request.headers.get("host")||""}`)},transformResponse:({body:n,headers:d,status:a})=>{let l=r();return new l(n,{status:a,headers:d})}})}).createHandler(),p=t.bind(null,void 0);return Object.defineProperties(p,{GET:{value:t.bind(null,"GET")},POST:{value:t.bind(null,"POST")},OPTIONS:{value:t.bind(null,"OPTIONS")}})};export{P as Actions,F as AgentDeliveryError,w as AgentEventEnum,R as Button,T as Card,S as CardLink,c as CardText,E as Client,v as CronExpression,f as Divider,s as NovuRequestHandler,h as Select,N as SelectOption,G as SeverityLevelEnum,q as TextInput,b as agent,m as frameworkName,y as providerSchemas,x as serve,k as step,I as workflow};
1
+ import{a as r,b as q,c as s,d as b,e as G}from"../chunk-YF62BBGH.js";import{a as v,b as E,c as P,d as R,e as T,f as S,g as c,h as f,i as h}from"../chunk-C3P3ZH2I.js";import"../chunk-3XT6S7TZ.js";import{a as I}from"../chunk-2M25EATE.js";import"../chunk-DKQLYSZS.js";import{M as F,S as y}from"../chunk-KLIOXJR3.js";import{a as w}from"../chunk-QTWEINJ4.js";import{f as N}from"../chunk-FRWG7YTE.js";import"../chunk-W6DIBD4Z.js";import"../chunk-FHYMHX3T.js";var m="sveltekit",g=o=>{let t=new s({frameworkName:m,...o,handler:(u,e)=>({method:()=>u||e.request.method||"",body:()=>e.request.json(),headers:n=>e.request.headers.get(n),url:()=>{let n=process.env.NODE_ENV==="development"||process.env.NODE_ENV==="dev"?"http":"https";return new URL(e.request.url,`${n}://${e.request.headers.get("host")||""}`)},transformResponse:({body:n,headers:d,status:a})=>{let l=r();return new l(n,{status:a,headers:d})}})}).createHandler(),p=t.bind(null,void 0);return Object.defineProperties(p,{GET:{value:t.bind(null,"GET")},POST:{value:t.bind(null,"POST")},OPTIONS:{value:t.bind(null,"OPTIONS")}})};export{v as Actions,F as AgentDeliveryError,E as Button,P as Card,R as CardLink,T as CardText,q as Client,N as CronExpression,S as Divider,s as NovuRequestHandler,c as Select,f as SelectOption,y as SeverityLevelEnum,h as TextInput,b as agent,m as frameworkName,w as providerSchemas,g as serve,I as step,G as workflow};
@@ -1,5 +1,6 @@
1
- import { S as Subscriber, C as ContextResolved, E as EnvironmentSystemVariables, M as EmailOutputUnvalidated, g as Awaitable, p as providerSchemas, W as WithPassthrough, a2 as SmsOutputUnvalidated, l as ChatOutputUnvalidated, _ as PushOutputUnvalidated, Q as InAppOutputUnvalidated, u as DelayOutputUnvalidated, F as DigestOutputUnvalidated, a7 as ThrottleOutputUnvalidated } from './subscriber.types-CC7F0JO_.js';
2
- export { a9 as actionStepSchemas, aa as channelStepSchemas } from './subscriber.types-CC7F0JO_.js';
1
+ import { S as Subscriber, C as ContextResolved, E as EnvironmentSystemVariables, G as EmailOutputUnvalidated, p as providerSchemas, W as WithPassthrough, R as SmsOutputUnvalidated, h as ChatOutputUnvalidated, M as PushOutputUnvalidated, J as InAppOutputUnvalidated, n as DelayOutputUnvalidated, v as DigestOutputUnvalidated, Y as ThrottleOutputUnvalidated } from './subscriber.types-BbyO_Cz6.js';
2
+ export { _ as actionStepSchemas, $ as channelStepSchemas } from './subscriber.types-BbyO_Cz6.js';
3
+ import { A as Awaitable } from './util.types-DaFfsxgy.js';
3
4
  import { S as Schema, a as FromSchema } from './base.schema.types-BApIn9jr.js';
4
5
  import 'json-schema-to-ts';
5
6
  import 'zod';
@@ -1 +1 @@
1
- import{a as o}from"./chunk-2M25EATE.js";import{a as e,e as t,f as r}from"./chunk-QTWEINJ4.js";import"./chunk-52LSX2V5.js";export{t as actionStepSchemas,r as channelStepSchemas,e as providerSchemas,o as step};
1
+ import{a as o}from"./chunk-2M25EATE.js";import{a as e,e as t,f as r}from"./chunk-QTWEINJ4.js";import"./chunk-FHYMHX3T.js";export{t as actionStepSchemas,r as channelStepSchemas,e as providerSchemas,o as step};
@@ -1,81 +1,5 @@
1
1
  import { F as FromSchemaUnvalidated, S as Schema, a as FromSchema } from './base.schema.types-BApIn9jr.js';
2
-
3
- /**
4
- * A type that represents either `A` or `B`. Shared properties retain their
5
- * types and unique properties are marked as optional.
6
- */
7
- type Either<A, B> = Partial<A> & Partial<B> & (A | B);
8
- /**
9
- * A type that represents a value that may be a promise or a regular value.
10
- */
11
- type Awaitable<T> = T | Promise<T>;
12
- /**
13
- * A type that represents a type that is a prettified version of the original type.
14
- * The prettified type has all generics removed from intellisense and displays a flat object.
15
- */
16
- type Prettify<T> = {
17
- [K in keyof T]: T[K];
18
- } & {};
19
- /**
20
- * Mark properties of T as optional if Condition is true
21
- */
22
- type ConditionalPartial<T extends Obj, Condition extends boolean> = Condition extends true ? Partial<T> : T;
23
- /**
24
- * Same as Nullable except without `null`.
25
- */
26
- type Optional<T> = T | undefined;
27
- /**
28
- * Types that can be used to index native JavaScript types, (Object, Array, etc.).
29
- */
30
- type IndexSignature = string | number | symbol;
31
- /**
32
- * An object of any index-able type to avoid conflicts between `{}`, `Record`, `object`, etc.
33
- */
34
- type Obj<O extends Record<IndexSignature, unknown> | object = Record<IndexSignature, unknown> | object> = {
35
- [K in keyof O as K extends never ? never : K]: K extends never ? never : O[K] extends never ? never : O[K];
36
- } & Omit<O, never>;
37
- /**
38
- * Any type that is indexable using `string`, `number`, or `symbol`.
39
- */
40
- type Indexable<ValueTypes = unknown> = {
41
- [K: IndexSignature]: ValueTypes;
42
- } | Obj;
43
- /**
44
- * Picks only the optional properties from a type, removing the required ones.
45
- * Optionally, recurses through nested objects if `DEEP` is true.
46
- */
47
- type PickOptional<T, DEEP extends boolean = true> = {
48
- [K in keyof T as undefined extends T[K] ? K : never]: DEEP extends false ? T[K] : T[K] extends Optional<Indexable> ? PickOptional<T[K], DEEP> : T[K];
49
- };
50
- /**
51
- * Picks only the required fields out of a type, removing the optional ones.
52
- * Optionally, recurses through nested objects if `DEEP` is true.
53
- */
54
- type PickRequired<T, DEEP extends boolean = true> = {
55
- [K in keyof T as K extends keyof PickOptional<T, DEEP> ? never : K]: T[K] extends Indexable ? PickRequired<T[K], DEEP> : T[K];
56
- };
57
- /**
58
- * Picks only the required keys out of a type, removing the optional ones.
59
- * Optionally, recurses through nested objects if `DEEP` is true.
60
- */
61
- type PickRequiredKeys<T, DEEP extends boolean = true> = keyof PickRequired<T, DEEP>;
62
- /**
63
- * Picks only the optional keys out of a type, removing the required ones.
64
- * Optionally, recurses through nested objects if `DEEP` is true.
65
- */
66
- type PickOptionalKeys<T, DEEP extends boolean = true> = keyof PickOptional<T, DEEP>;
67
- /**
68
- * Recursively make all properties of type `T` optional.
69
- */
70
- type DeepPartial<T> = T extends object ? {
71
- [P in keyof T]?: DeepPartial<T[P]>;
72
- } : T;
73
- /**
74
- * Recursively make all properties of type `T` required.
75
- */
76
- type DeepRequired<T> = T extends object ? {
77
- [P in keyof T]-?: DeepRequired<T[P]>;
78
- } : T;
2
+ import { a as Prettify, A as Awaitable } from './util.types-DaFfsxgy.js';
79
3
 
80
4
  type ContextType = string;
81
5
  type ContextId = string;
@@ -4589,4 +4513,4 @@ type Subscriber = {
4589
4513
  data?: Record<string, unknown> | null;
4590
4514
  };
4591
4515
 
4592
- export { type PushResult as $, ActionStepEnum as A, type DigestOutput as B, type ContextResolved as C, type DeepPartial as D, type EnvironmentSystemVariables as E, type DigestOutputUnvalidated as F, type DigestRegularOutput as G, type DigestRegularOutputUnvalidated as H, type DigestResult as I, type DigestTimedOutput as J, type DigestTimedOutputUnvalidated as K, type EmailOutput as L, type EmailOutputUnvalidated as M, type EmailResult as N, type InAppOutput as O, type PickRequiredKeys as P, type InAppOutputUnvalidated as Q, type InAppResult as R, type Subscriber as S, type Indexable as T, JobStatusEnum as U, type PickOptional as V, type WithPassthrough as W, type PickOptionalKeys as X, type PickRequired as Y, type PushOutput as Z, type PushOutputUnvalidated as _, type Either as a, type Skip as a0, type SmsOutput as a1, type SmsOutputUnvalidated as a2, type SmsResult as a3, type StepContext as a4, type StepOutput as a5, type ThrottleOutput as a6, type ThrottleOutputUnvalidated as a7, type ThrottleResult as a8, actionStepSchemas as a9, channelStepSchemas as aa, type ContextPayload as b, type ConditionalPartial as c, type Step as d, type Prettify as e, ChannelStepEnum as f, type Awaitable as g, type StepOptions as h, type ActionStep as i, type ChannelStep as j, type ChatOutput as k, type ChatOutputUnvalidated as l, type ChatResult as m, type ContextValue as n, type CustomStep as o, providerSchemas as p, type DeepRequired as q, type DelayDynamicOutput as r, type DelayDynamicOutputUnvalidated as s, type DelayOutput as t, type DelayOutputUnvalidated as u, type DelayRegularOutput as v, type DelayRegularOutputUnvalidated as w, type DelayResult as x, type DelayTimedOutput as y, type DelayTimedOutputUnvalidated as z };
4516
+ export { channelStepSchemas as $, ActionStepEnum as A, type DigestTimedOutputUnvalidated as B, type ContextResolved as C, type DelayDynamicOutput as D, type EnvironmentSystemVariables as E, type EmailOutput as F, type EmailOutputUnvalidated as G, type EmailResult as H, type InAppOutput as I, type InAppOutputUnvalidated as J, type InAppResult as K, JobStatusEnum as L, type PushOutputUnvalidated as M, type PushResult as N, type Skip as O, type PushOutput as P, type SmsOutput as Q, type SmsOutputUnvalidated as R, type Subscriber as S, type SmsResult as T, type StepContext as U, type StepOutput as V, type WithPassthrough as W, type ThrottleOutput as X, type ThrottleOutputUnvalidated as Y, type ThrottleResult as Z, actionStepSchemas as _, type ContextPayload as a, type Step as b, ChannelStepEnum as c, type StepOptions as d, type ActionStep as e, type ChannelStep as f, type ChatOutput as g, type ChatOutputUnvalidated as h, type ChatResult as i, type ContextValue as j, type CustomStep as k, type DelayDynamicOutputUnvalidated as l, type DelayOutput as m, type DelayOutputUnvalidated as n, type DelayRegularOutput as o, providerSchemas as p, type DelayRegularOutputUnvalidated as q, type DelayResult as r, type DelayTimedOutput as s, type DelayTimedOutputUnvalidated as t, type DigestOutput as u, type DigestOutputUnvalidated as v, type DigestRegularOutput as w, type DigestRegularOutputUnvalidated as x, type DigestResult as y, type DigestTimedOutput as z };
@@ -0,0 +1,78 @@
1
+ /**
2
+ * A type that represents either `A` or `B`. Shared properties retain their
3
+ * types and unique properties are marked as optional.
4
+ */
5
+ type Either<A, B> = Partial<A> & Partial<B> & (A | B);
6
+ /**
7
+ * A type that represents a value that may be a promise or a regular value.
8
+ */
9
+ type Awaitable<T> = T | Promise<T>;
10
+ /**
11
+ * A type that represents a type that is a prettified version of the original type.
12
+ * The prettified type has all generics removed from intellisense and displays a flat object.
13
+ */
14
+ type Prettify<T> = {
15
+ [K in keyof T]: T[K];
16
+ } & {};
17
+ /**
18
+ * Mark properties of T as optional if Condition is true
19
+ */
20
+ type ConditionalPartial<T extends Obj, Condition extends boolean> = Condition extends true ? Partial<T> : T;
21
+ /**
22
+ * Same as Nullable except without `null`.
23
+ */
24
+ type Optional<T> = T | undefined;
25
+ /**
26
+ * Types that can be used to index native JavaScript types, (Object, Array, etc.).
27
+ */
28
+ type IndexSignature = string | number | symbol;
29
+ /**
30
+ * An object of any index-able type to avoid conflicts between `{}`, `Record`, `object`, etc.
31
+ */
32
+ type Obj<O extends Record<IndexSignature, unknown> | object = Record<IndexSignature, unknown> | object> = {
33
+ [K in keyof O as K extends never ? never : K]: K extends never ? never : O[K] extends never ? never : O[K];
34
+ } & Omit<O, never>;
35
+ /**
36
+ * Any type that is indexable using `string`, `number`, or `symbol`.
37
+ */
38
+ type Indexable<ValueTypes = unknown> = {
39
+ [K: IndexSignature]: ValueTypes;
40
+ } | Obj;
41
+ /**
42
+ * Picks only the optional properties from a type, removing the required ones.
43
+ * Optionally, recurses through nested objects if `DEEP` is true.
44
+ */
45
+ type PickOptional<T, DEEP extends boolean = true> = {
46
+ [K in keyof T as undefined extends T[K] ? K : never]: DEEP extends false ? T[K] : T[K] extends Optional<Indexable> ? PickOptional<T[K], DEEP> : T[K];
47
+ };
48
+ /**
49
+ * Picks only the required fields out of a type, removing the optional ones.
50
+ * Optionally, recurses through nested objects if `DEEP` is true.
51
+ */
52
+ type PickRequired<T, DEEP extends boolean = true> = {
53
+ [K in keyof T as K extends keyof PickOptional<T, DEEP> ? never : K]: T[K] extends Indexable ? PickRequired<T[K], DEEP> : T[K];
54
+ };
55
+ /**
56
+ * Picks only the required keys out of a type, removing the optional ones.
57
+ * Optionally, recurses through nested objects if `DEEP` is true.
58
+ */
59
+ type PickRequiredKeys<T, DEEP extends boolean = true> = keyof PickRequired<T, DEEP>;
60
+ /**
61
+ * Picks only the optional keys out of a type, removing the required ones.
62
+ * Optionally, recurses through nested objects if `DEEP` is true.
63
+ */
64
+ type PickOptionalKeys<T, DEEP extends boolean = true> = keyof PickOptional<T, DEEP>;
65
+ /**
66
+ * Recursively make all properties of type `T` optional.
67
+ */
68
+ type DeepPartial<T> = T extends object ? {
69
+ [P in keyof T]?: DeepPartial<T[P]>;
70
+ } : T;
71
+ /**
72
+ * Recursively make all properties of type `T` required.
73
+ */
74
+ type DeepRequired<T> = T extends object ? {
75
+ [P in keyof T]-?: DeepRequired<T[P]>;
76
+ } : T;
77
+
78
+ export type { Awaitable as A, ConditionalPartial as C, DeepPartial as D, Either as E, Indexable as I, PickRequiredKeys as P, Prettify as a, DeepRequired as b, PickOptional as c, PickOptionalKeys as d, PickRequired as e };
@@ -1 +1 @@
1
- import{a,b}from"./chunk-DKQLYSZS.js";import"./chunk-FRWG7YTE.js";import"./chunk-52LSX2V5.js";export{b as transformSchema,a as validateData};
1
+ import{a,b}from"./chunk-DKQLYSZS.js";import"./chunk-FRWG7YTE.js";import"./chunk-FHYMHX3T.js";export{b as transformSchema,a as validateData};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novu/framework",
3
- "version": "2.11.0",
3
+ "version": "2.11.2-alpha.0",
4
4
  "description": "The Code-First Notifications Workflow SDK.",
5
5
  "main": "./dist/cjs/index.cjs",
6
6
  "types": "./dist/cjs/index.d.cts",
@@ -29,6 +29,9 @@
29
29
  "jsx-runtime",
30
30
  "jsx-dev-runtime",
31
31
  "validators",
32
+ "ai-sdk",
33
+ "langchain",
34
+ "cards",
32
35
  "README.md"
33
36
  ],
34
37
  "keywords": [
@@ -189,20 +192,59 @@
189
192
  "types": "./dist/esm/validators.d.ts",
190
193
  "default": "./dist/esm/validators.js"
191
194
  }
195
+ },
196
+ "./ai-sdk": {
197
+ "require": {
198
+ "types": "./dist/cjs/ai-sdk/index.d.cts",
199
+ "default": "./dist/cjs/ai-sdk/index.cjs"
200
+ },
201
+ "import": {
202
+ "types": "./dist/esm/ai-sdk/index.d.ts",
203
+ "default": "./dist/esm/ai-sdk/index.js"
204
+ }
205
+ },
206
+ "./langchain": {
207
+ "require": {
208
+ "types": "./dist/cjs/langchain/index.d.cts",
209
+ "default": "./dist/cjs/langchain/index.cjs"
210
+ },
211
+ "import": {
212
+ "types": "./dist/esm/langchain/index.d.ts",
213
+ "default": "./dist/esm/langchain/index.js"
214
+ }
215
+ },
216
+ "./cards": {
217
+ "require": {
218
+ "types": "./dist/cjs/cards.d.cts",
219
+ "default": "./dist/cjs/cards.cjs"
220
+ },
221
+ "import": {
222
+ "types": "./dist/esm/cards.d.ts",
223
+ "default": "./dist/esm/cards.js"
224
+ }
192
225
  }
193
226
  },
194
227
  "peerDependencies": {
228
+ "@langchain/core": ">=1.0.0",
195
229
  "@nestjs/common": ">=10.0.0",
196
230
  "@sveltejs/kit": ">=1.27.3",
197
231
  "@vercel/node": ">=2.15.9",
232
+ "ai": ">=7.0.0",
198
233
  "aws-lambda": ">=1.0.7",
199
234
  "express": ">=4.19.2",
200
235
  "h3": ">=1.8.1",
236
+ "langchain": ">=1.0.0",
201
237
  "next": ">=12.0.0",
202
238
  "zod": ">=3.0.0",
203
239
  "zod-to-json-schema": ">=3.0.0"
204
240
  },
205
241
  "peerDependenciesMeta": {
242
+ "@langchain/core": {
243
+ "optional": true
244
+ },
245
+ "langchain": {
246
+ "optional": true
247
+ },
206
248
  "@nestjs/common": {
207
249
  "optional": true
208
250
  },
@@ -227,6 +269,9 @@
227
269
  "next": {
228
270
  "optional": true
229
271
  },
272
+ "ai": {
273
+ "optional": true
274
+ },
230
275
  "zod": {
231
276
  "optional": true
232
277
  },
@@ -237,7 +282,8 @@
237
282
  "devDependencies": {
238
283
  "@apidevtools/json-schema-ref-parser": "11.6.4",
239
284
  "@arethetypeswrong/cli": "^0.17.4",
240
- "@nestjs/common": "11.1.21",
285
+ "@langchain/core": "^1.1.44",
286
+ "@nestjs/common": "11.1.27",
241
287
  "@sveltejs/kit": "^1.27.3",
242
288
  "@types/aws-lambda": "^8.10.141",
243
289
  "@types/express": "^4.17.13",
@@ -245,31 +291,33 @@
245
291
  "@types/pluralize": "^0.0.33",
246
292
  "@types/sanitize-html": "2.11.0",
247
293
  "@vercel/node": "^2.15.9",
294
+ "ai": "^7.0.0",
248
295
  "aws-lambda": "^1.0.7",
249
296
  "express": "^4.19.2",
250
297
  "h3": "^1.11.1",
298
+ "langchain": "^1.2.16",
251
299
  "madge": "^8.0.0",
252
300
  "next": "^16.2.1",
253
301
  "ts-node": "^10.9.2",
254
302
  "tsup": "^8.0.2",
255
303
  "tsx": "4.16.2",
256
304
  "typescript": "5.6.2",
257
- "vitest": "^1.2.1",
305
+ "vitest": "^4.1.0",
258
306
  "zod": "^3.23.8",
259
307
  "zod-to-json-schema": "^3.23.3"
260
308
  },
261
309
  "dependencies": {
262
- "chat": "4.28.1",
263
310
  "ajv": "^8.20.0",
264
311
  "ajv-formats": "^2.1.1",
265
312
  "better-ajv-errors": "^1.2.0",
266
313
  "chalk": "^4.1.2",
314
+ "chat": "4.31.0",
267
315
  "cross-fetch": "^4.0.0",
268
316
  "json-schema-to-ts": "^3.0.0",
269
317
  "jsonrepair": "^3.13.1",
270
- "liquidjs": "^10.27.0",
318
+ "liquidjs": "^10.27.1",
271
319
  "pluralize": "^8.0.0",
272
- "sanitize-html": "^2.13.0"
320
+ "sanitize-html": "^2.17.5"
273
321
  },
274
322
  "nx": {
275
323
  "tags": [
@@ -285,7 +333,7 @@
285
333
  "debug": "NODE_ENV=production tsup --config tsup-debug.config.ts",
286
334
  "build:watch": "tsup --watch",
287
335
  "postbuild": "pnpm run check:exports && pnpm check:circulars",
288
- "check:exports": "attw --pack .",
336
+ "check:exports": "attw --pack . --exclude-entrypoints ./langchain && attw --pack . --entrypoints ./langchain --ignore-rules no-resolution",
289
337
  "check:circulars": "madge --circular --extensions ts ./src",
290
338
  "bump:prerelease": "npm version prerelease --preid=alpha & PID=$!; (sleep 1 && kill -9 $PID) & wait $PID",
291
339
  "release:alpha": "pnpm bump:prerelease || pnpm build && npm publish",
@@ -1 +0,0 @@
1
- var j=Object.create;var f=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var n=(b,a,c)=>a in b?f(b,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[a]=c;var p=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),q=(b,a)=>{for(var c in a)f(b,c,{get:a[c],enumerable:!0})},o=(b,a,c,e)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of k(a))!m.call(b,d)&&d!==c&&f(b,d,{get:()=>a[d],enumerable:!(e=i(a,d))||e.enumerable});return b};var r=(b,a,c)=>(c=b!=null?j(l(b)):{},o(a||!b||!b.__esModule?f(c,"default",{value:b,enumerable:!0}):c,b));var s=(b,a,c,e)=>{for(var d=e>1?void 0:e?i(a,c):a,g=b.length-1,h;g>=0;g--)(h=b[g])&&(d=(e?h(a,c,d):h(d))||d);return e&&d&&f(a,c,d),d},t=(b,a)=>(c,e)=>a(c,e,b);var u=(b,a,c)=>n(b,typeof a!="symbol"?a+"":a,c);export{p as a,q as b,r as c,s as d,t as e,u as f};