@novu/framework 2.11.1 → 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.
- package/README.md +114 -9
- package/ai-sdk/package.json +4 -0
- package/cards/package.json +4 -0
- package/dist/{esm/index-D6L0Yufw.d.ts → cjs/agent.types-DdgaVUb7.d.cts} +356 -193
- package/dist/cjs/ai-sdk/index.cjs +1 -0
- package/dist/cjs/ai-sdk/index.d.cts +39 -0
- package/dist/cjs/cards.cjs +57 -0
- package/dist/cjs/cards.d.cts +2 -0
- package/dist/cjs/{health-check.types-D4NEyjyC.d.cts → health-check.types-CkUmYLNG.d.cts} +6 -140
- package/dist/cjs/index-BCp3U0UG.d.cts +189 -0
- package/dist/cjs/index.cjs +138 -138
- package/dist/cjs/index.d.cts +5 -3
- package/dist/cjs/internal/index.cjs +1 -1
- package/dist/cjs/internal/index.d.cts +96 -4
- package/dist/cjs/jsx-dev-runtime.cjs +1 -1
- package/dist/cjs/jsx-runtime.cjs +1 -1
- package/dist/cjs/langchain/index.cjs +1 -0
- package/dist/cjs/langchain/index.d.cts +105 -0
- package/dist/cjs/servers/express.cjs +137 -137
- package/dist/cjs/servers/express.d.cts +6 -4
- package/dist/cjs/servers/h3.cjs +136 -136
- package/dist/cjs/servers/h3.d.cts +6 -4
- package/dist/cjs/servers/lambda.cjs +137 -137
- package/dist/cjs/servers/lambda.d.cts +6 -5
- package/dist/cjs/servers/nest.cjs +136 -136
- package/dist/cjs/servers/nest.d.cts +21 -7
- package/dist/cjs/servers/next.cjs +138 -138
- package/dist/cjs/servers/next.d.cts +6 -4
- package/dist/cjs/servers/nuxt.cjs +136 -136
- package/dist/cjs/servers/nuxt.d.cts +6 -4
- package/dist/cjs/servers/remix.cjs +138 -138
- package/dist/cjs/servers/remix.d.cts +6 -4
- package/dist/cjs/servers/sveltekit.cjs +136 -136
- package/dist/cjs/servers/sveltekit.d.cts +6 -4
- package/dist/cjs/step-resolver.d.cts +3 -2
- package/dist/cjs/{subscriber.types-PRaHFLJu.d.cts → subscriber.types-DxMMRBIi.d.cts} +2 -78
- package/dist/cjs/util.types-DaFfsxgy.d.cts +78 -0
- package/dist/{cjs/index-BNiIiOE-.d.cts → esm/agent.types-Bu3DhlVb.d.ts} +356 -193
- package/dist/esm/ai-sdk/index.d.ts +39 -0
- package/dist/esm/ai-sdk/index.js +1 -0
- package/dist/esm/cards.d.ts +2 -0
- package/dist/esm/cards.js +1 -0
- package/dist/esm/{chunk-KLCBNFAF.js → chunk-3XT6S7TZ.js} +14 -14
- package/dist/esm/chunk-3ZWME5KT.js +0 -0
- package/dist/esm/chunk-C3P3ZH2I.js +36 -0
- package/dist/esm/chunk-FHYMHX3T.js +1 -0
- package/dist/esm/chunk-KLIOXJR3.js +1 -0
- package/dist/esm/chunk-W6DIBD4Z.js +1 -0
- package/dist/esm/chunk-YF62BBGH.js +98 -0
- package/dist/esm/{health-check.types-C-81VaBO.d.ts → health-check.types-nDCnGlmX.d.ts} +6 -140
- package/dist/esm/index-DEehllqa.d.ts +189 -0
- package/dist/esm/index.d.ts +5 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal/index.d.ts +96 -4
- package/dist/esm/internal/index.js +1 -1
- package/dist/esm/jsx-dev-runtime.js +1 -1
- package/dist/esm/jsx-runtime-7EPQR56T.js +1 -0
- package/dist/esm/jsx-runtime.js +1 -1
- package/dist/esm/langchain/index.d.ts +105 -0
- package/dist/esm/langchain/index.js +1 -0
- package/dist/esm/servers/express.d.ts +6 -4
- package/dist/esm/servers/express.js +1 -1
- package/dist/esm/servers/h3.d.ts +6 -4
- package/dist/esm/servers/h3.js +1 -1
- package/dist/esm/servers/lambda.d.ts +6 -5
- package/dist/esm/servers/lambda.js +1 -1
- package/dist/esm/servers/nest.d.ts +21 -7
- package/dist/esm/servers/nest.js +1 -1
- package/dist/esm/servers/next.d.ts +6 -4
- package/dist/esm/servers/next.js +1 -1
- package/dist/esm/servers/nuxt.d.ts +6 -4
- package/dist/esm/servers/nuxt.js +1 -1
- package/dist/esm/servers/remix.d.ts +6 -4
- package/dist/esm/servers/remix.js +1 -1
- package/dist/esm/servers/sveltekit.d.ts +6 -4
- package/dist/esm/servers/sveltekit.js +1 -1
- package/dist/esm/step-resolver.d.ts +3 -2
- package/dist/esm/step-resolver.js +1 -1
- package/dist/esm/{subscriber.types-CC7F0JO_.d.ts → subscriber.types-BbyO_Cz6.d.ts} +2 -78
- package/dist/esm/util.types-DaFfsxgy.d.ts +78 -0
- package/dist/esm/validators.js +1 -1
- package/package.json +55 -7
- package/dist/esm/chunk-52LSX2V5.js +0 -1
- package/dist/esm/chunk-N4PZBM53.js +0 -1
- package/dist/esm/chunk-ND6IQFTA.js +0 -133
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { I as INovuRequestHandlerOptions, N as NovuRequestHandler, S as ServeHandlerOptions, C as Client
|
|
2
|
-
export {
|
|
3
|
-
import { W as Workflow } from '../health-check.types-
|
|
4
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum } from '../health-check.types-
|
|
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
|
-
|
|
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
|
-
|
|
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 };
|
package/dist/esm/servers/nest.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as
|
|
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-
|
|
3
|
-
export { A as
|
|
4
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-
|
|
5
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-
|
|
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';
|
package/dist/esm/servers/next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l,b as
|
|
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-
|
|
4
|
-
export { A as
|
|
5
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-
|
|
6
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-
|
|
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';
|
package/dist/esm/servers/nuxt.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as
|
|
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-
|
|
2
|
-
export { A as
|
|
3
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-
|
|
4
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-
|
|
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
|
|
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-
|
|
3
|
-
export { A as
|
|
4
|
-
export { C as ClientOptions, a as CronExpression, E as ExecuteInput, S as SeverityLevelEnum, W as Workflow } from '../health-check.types-
|
|
5
|
-
export { C as ContextResolved, E as EnvironmentSystemVariables, S as Subscriber, p as providerSchemas } from '../subscriber.types-
|
|
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
|
|
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,
|
|
2
|
-
export {
|
|
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-
|
|
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 {
|
|
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 };
|
package/dist/esm/validators.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"./chunk-DKQLYSZS.js";import"./chunk-FRWG7YTE.js";import"./chunk-
|
|
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.
|
|
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
|
-
"@
|
|
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.
|
|
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.30.0",
|
|
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.
|
|
318
|
+
"liquidjs": "^10.27.1",
|
|
271
319
|
"pluralize": "^8.0.0",
|
|
272
|
-
"sanitize-html": "^2.
|
|
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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as C,g as l,i as w,q as A,r as k,s as i,t as f,u as x,v}from"./chunk-FRWG7YTE.js";var N=class extends x{constructor(t){super("Unknown BridgeError",{cause:t});this.statusCode=500;this.code="BridgeError"}};var P=class extends i{constructor(t,n){super(`Workflow with id: \`${t}\` has a corrupt state. Step with id: \`${n}\` does not exist. Please provide the missing state.`);this.code="ExecutionStateCorruptError";this.data={workflowId:t,stepId:n}}},I=class extends i{constructor(t,n){super(`Workflow with id: \`${t}\` has invalid \`payload\`. Please provide the correct event payload.`);this.code="ExecutionEventPayloadInvalidError";this.data=n}},D=class extends i{constructor(t,n){super(`Workflow with id: \`${t}\` has invalid \`controls\`. Please provide the correct event controls.`);this.code="ExecutionEventControlInvalidError";this.data=n}},F=class extends i{constructor(t,n,r){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${n}\` has invalid \`controls\`. Please provide the correct step controls.`);this.code="ExecutionStateControlInvalidError";this.data=r}},b=class extends i{constructor(t,n,r){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${n}\` has invalid output. Please provide the correct step output.`);this.code="ExecutionStateOutputInvalidError";this.data=r}},$=class extends i{constructor(t,n,r){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${n}\` has invalid result. Please provide the correct step result.`);this.code="ExecutionStateResultInvalidError";this.data=r}},L=class extends i{constructor(t,n,r){super(`Workflow with id: \`${t}\` has invalid controls syntax in step with id: \`${n}\`. Please correct step control syntax.`);this.code="StepControlCompilationFailedError";this.data=r}},W=class extends i{constructor(t,n,r,p){super(`Workflow with id: \`${t}\` has an invalid state. Step with id: \`${n}\` and provider with id: \`${r}\` has invalid output. Please provide the correct provider output.`);this.code="ExecutionProviderOutputInvalidError";this.data=p}},V=class extends i{constructor(t,n){super(`Workflow with id: \`${t}\` has invalid \`payload\`. Please provide the correct payload.`);this.code="WorkflowPayloadInvalidError";this.data=n}};var j=e=>Object.values(l).includes(e==null?void 0:e.code),Ie=e=>!j(e)&&typeof e.statusCode=="number"&&e.statusCode>=400&&e.statusCode<500;var E=e=>Object.values(e).map(o=>`\`${o}\``).join(", "),O=e=>e.replaceAll(/(\w)(\w*)/g,(o,t,n)=>t.toUpperCase()+n.toLowerCase()).replaceAll(/[\s-]+/g,"");var G=class extends A{constructor(){super(...arguments);this.code="MethodNotAllowedError";this.statusCode=405;this.message=`Method not allowed. Please use one of ${E(w)}`}},q=class extends i{constructor(t,n){super(`Invalid query string: \`action\`=\`${t}\`. Please use one of ${E(n)}`);this.code="InvalidActionError"}},M=class extends i{constructor(){super("Missing secret key. Set the `NOVU_SECRET_KEY` environment variable or pass `secretKey` to the client options.");this.code="MissingSecretKeyError"}};var H=class extends Error{constructor(o,t,n){super(),this.data={message:n},this.statusCode=o,this.code=t}};var R=class extends v{constructor(o,t){super(`${O(o)} with id: \`${t}\` already exists. Please use a different id.`)}},d=class extends k{constructor(o,t){super(`${O(o)} with id: \`${t}\` does not exist. Please provide a valid id.`)}},y=class extends x{constructor(t,n,r,p){super(`Failed to ${r} ${O(t)} with id: \`${n}\``,{cause:p});this.statusCode=502}};var K=class extends d{constructor(t){super("provider",t);this.code="ProviderNotFoundError"}},X=class extends y{constructor(t,n,r){super("provider",t,n,r);this.code="ProviderExecutionFailedError"}};var z=class extends f{constructor(){super("Signature does not match the expected signature. Please ensure the signature provided in the `novu-signature` header is correct and try again.");this.code="SignatureMismatchError"}},Q=class extends f{constructor(){super("Signature not found. Please provide a signature in the `novu-signature` header");this.code="SignatureNotFoundError"}},B=class extends f{constructor(){super("Signature is invalid. Please provide a valid signature in the `novu-signature` header");this.code="SignatureInvalidError"}},Z=class extends f{constructor(){super(`Signature expired. Please provide a signature with a timestamp no older than ${5} minutes in the \`novu-signature\` header`);this.code="SignatureExpiredError"}},J=class extends f{constructor(){super("Signature key not found. Please provide a valid key in the Client constructor `config.secretKey`");this.code="SigningKeyNotFoundError"}},ee=class extends f{constructor(){super("Signature version is invalid. Please provide a signature version with version `v1` in the `novu-signature` header");this.code="SignatureVersionInvalidError"}};var te=class extends d{constructor(t){super("step",t);this.code="StepNotFoundError"}},oe=class extends R{constructor(t){super("step",t);this.code="StepAlreadyExistsError"}},re=class extends y{constructor(t,n,r){super("step",t,n,r);this.code="StepExecutionFailedError"}};var ne=class extends d{constructor(t){super("workflow",t);this.code="WorkflowNotFoundError"}},se=class extends R{constructor(t){super("workflow",t);this.code="WorkflowAlreadyExistsError"}};function ge(e,o){let t={...e};for(let n of Object.keys(o)){let r=o[n];r&&typeof r=="object"&&!Array.isArray(r)?t[n]=ge(t[n]||{},r):(Array.isArray(r),t[n]=r)}return t}function _(e,o){let t=o.split(".").reduce((n,r)=>{if(n&&typeof n=="object")return n[r]},e);if(t==null)return"";if(typeof t=="string")return t;if(typeof t=="number"||typeof t=="boolean")return String(t);if(typeof t=="object"){let n=JSON.stringify(t);return n==="{}"?"":n}return""}function ae(e,o=2,t,n=", "){if(!Array.isArray(e)||e.length===0)return"";let r=t?e.map(s=>typeof s!="object"||!s?"":_(s,t)):e;if(r.length===1)return r[0];if(r.length===2)return`${r[0]} and ${r[1]}`;if(r.length===3&&o>=3)return`${r[0]}, ${n}${r[1]} and ${r[2]}`;let p=r.slice(0,o),m=r.length-o;return`${p.join(n)} and ${m} ${m===1?"other":"others"}`}import xe from"pluralize";function pe(e,o="",t="",n="true"){if(e==null)return"";let r=0;if(Array.isArray(e)?r=e.length:typeof e=="object"?r=Object.keys(e).length:typeof e=="string"?r=+e:typeof e=="number"?r=e:r=Number(e),Number.isNaN(r)&&(r=0),r<=0)return"";let p;return t?p=r===1?o:t:p=xe(o,r),n==="true"?`${r} ${p}`:p}import{TokenKind as ie}from"liquidjs";import Oe from"pluralize";import{z as h}from"zod";var ce="",le=2,me="other",de=", ",he=" and ",Se=", and ",ue={0:"keyPath",1:"limit",2:"overflowSuffix",3:"wordsConnector",4:"twoWordsConnector",5:"lastWordConnector"};function fe(e,o=ce,t=le,n=me,r=de,p=he,m=Se){if(!Array.isArray(e)||e.length===0)return"";let s=o?e.map(c=>typeof c!="object"||!c?"":_(c,o)):e,u=s.length;if(u===1)return s[0];if(u===2)return`${s[0]}${p}${s[1]}`;if(t>=u){let c=s.slice(0,u-1),T=s[u-1];return`${c.join(r)}${m}${T}`}let a=s.slice(0,t),S=u-t,g=t===1?p:m;return`${a.join(r)}${g}${S} ${Oe(n,S)}`}function Nt(e={},...o){let{requireKeyPath:t=!1}=e,n=[];if(o.length<1)return n.push({message:"Expected at least 1 argument",begin:0,end:0,value:""}),n;let r=h.object({keyPath:t?h.string().min(1,"must be non-empty"):h.string().optional().default(ce),limit:h.number().optional().default(le).refine(s=>s>=0,"must be greater than or equal to 0"),overflowSuffix:h.string().optional().default(me),wordsConnector:h.string().optional().default(de),twoWordsConnector:h.string().optional().default(he),lastWordConnector:h.string().optional().default(Se)}),p={};o.forEach((s,u)=>{if(!Array.isArray(s)){let a=s.getText();(s.kind===ie.Quoted||s.kind===ie.Number)&&(a=s.content);let S=ue[u];p[S]=a}});let m=r.safeParse(p);if(!m.success)for(let s of m.error.issues){let u="string";"type"in s&&(u=s.type);let a=s.path[0],S=Object.entries(ue).find(([T,ye])=>ye===a),g=S?parseInt(S[0],10):null,c=typeof g=="number"?o[g]:null;c&&!Array.isArray(c)&&n.push({message:`"toSentence" expects a ${u}${s.message?` that ${s.message}`:""} for argument "${a}"`,begin:c.begin,end:c.end,value:c.getText()})}return n}import{Liquid as _e}from"liquidjs";function Ee(e){return Array.isArray(e)||typeof e=="object"&&e!==null?Re(e):typeof e=="string"?e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):e==null?"":String(e)}var Re=(e,o=0)=>Array.isArray(e)||typeof e=="object"&&e!==null?JSON.stringify(e,null,o).replace(/"/g,"'").replace(/\n/g,"\\n"):e==null?"":String(e);function $t(e){let o=new _e({outputEscape:Ee,...e});return o.registerFilter("json",(t,n)=>Re(t,n)),o.registerFilter("digest",ae),o.registerFilter("toSentence",fe),o.registerFilter("pluralize",pe),o}var Wt={type:"object",properties:{},required:[],additionalProperties:!1};var Te=(a=>(a.PENDING="pending",a.QUEUED="queued",a.RUNNING="running",a.COMPLETED="completed",a.FAILED="failed",a.DELAYED="delayed",a.CANCELED="canceled",a.MERGED="merged",a.SKIPPED="skipped",a))(Te||{});var Ce=(r=>(r.NONE="none",r.LOW="low",r.MEDIUM="medium",r.HIGH="high",r))(Ce||{});export{N as a,P as b,I as c,D as d,F as e,b as f,$ as g,L as h,W as i,V as j,j as k,Ie as l,G as m,q as n,M as o,H as p,R as q,d as r,y as s,K as t,X as u,z as v,Q as w,B as x,Z as y,J as z,ee as A,te as B,oe as C,re as D,ne as E,se as F,ge as G,ae as H,pe as I,fe as J,Nt as K,$t as L,Wt as M,Te as N,Ce as O};
|