@novu/framework 2.13.1-rc.852194fa77 → 2.13.1
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/dist/cjs/{agent.types-CQKSD7NC.d.cts → agent.types-crcJBtCy.d.cts} +119 -3
- package/dist/cjs/ai-sdk/index.d.cts +1 -1
- package/dist/cjs/{health-check.types-B6RuXNc8.d.cts → health-check.types-C2XZ-Tpt.d.cts} +2 -2
- package/dist/cjs/{index-phn3kJ9H.d.cts → index-DVSB455a.d.cts} +3 -3
- package/dist/cjs/index.cjs +96 -96
- package/dist/cjs/index.d.cts +4 -4
- package/dist/cjs/internal/index.cjs +36 -36
- package/dist/cjs/internal/index.d.cts +29 -14
- package/dist/cjs/langchain/index.d.cts +1 -1
- package/dist/cjs/servers/express.cjs +97 -97
- package/dist/cjs/servers/express.d.cts +5 -5
- package/dist/cjs/servers/h3.cjs +106 -106
- package/dist/cjs/servers/h3.d.cts +5 -5
- package/dist/cjs/servers/hono.cjs +103 -103
- package/dist/cjs/servers/hono.d.cts +5 -5
- package/dist/cjs/servers/lambda.cjs +97 -97
- package/dist/cjs/servers/lambda.d.cts +5 -5
- package/dist/cjs/servers/nest.cjs +99 -99
- package/dist/cjs/servers/nest.d.cts +7 -7
- package/dist/cjs/servers/next.cjs +116 -116
- package/dist/cjs/servers/next.d.cts +5 -5
- package/dist/cjs/servers/nuxt.cjs +106 -106
- package/dist/cjs/servers/nuxt.d.cts +5 -5
- package/dist/cjs/servers/remix.cjs +110 -110
- package/dist/cjs/servers/remix.d.cts +5 -5
- package/dist/cjs/servers/sveltekit.cjs +110 -110
- package/dist/cjs/servers/sveltekit.d.cts +5 -5
- package/dist/cjs/step-resolver.cjs +1 -1
- package/dist/cjs/step-resolver.d.cts +2 -2
- package/dist/cjs/{subscriber.types-_eHz1E0m.d.cts → subscriber.types-BanvmGul.d.cts} +1 -1
- package/dist/esm/{agent.types-C17NUGxY.d.ts → agent.types-DFLG1_vb.d.ts} +119 -3
- package/dist/esm/ai-sdk/index.d.ts +1 -1
- package/dist/esm/chunk-4ETX7FIT.js +1 -0
- package/dist/esm/{chunk-UXO4RWZV.js → chunk-IREH6K2M.js} +2 -2
- package/dist/esm/{chunk-WJUYDVXH.js → chunk-PBC7WR2R.js} +46 -46
- package/dist/esm/{health-check.types-CL5-B_D4.d.ts → health-check.types-DORn4djx.d.ts} +2 -2
- package/dist/esm/{index-CYtGHJJu.d.ts → index-BvRGmHFw.d.ts} +3 -3
- package/dist/esm/index.d.ts +4 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal/index.d.ts +20 -5
- package/dist/esm/internal/index.js +1 -1
- package/dist/esm/langchain/index.d.ts +1 -1
- package/dist/esm/servers/express.d.ts +5 -5
- package/dist/esm/servers/express.js +1 -1
- package/dist/esm/servers/h3.d.ts +5 -5
- package/dist/esm/servers/h3.js +1 -1
- package/dist/esm/servers/hono.d.ts +5 -5
- package/dist/esm/servers/hono.js +1 -1
- package/dist/esm/servers/lambda.d.ts +5 -5
- package/dist/esm/servers/lambda.js +1 -1
- package/dist/esm/servers/nest.d.ts +7 -7
- package/dist/esm/servers/nest.js +1 -1
- package/dist/esm/servers/next.d.ts +5 -5
- package/dist/esm/servers/next.js +1 -1
- package/dist/esm/servers/nuxt.d.ts +5 -5
- package/dist/esm/servers/nuxt.js +1 -1
- package/dist/esm/servers/remix.d.ts +5 -5
- package/dist/esm/servers/remix.js +1 -1
- package/dist/esm/servers/sveltekit.d.ts +5 -5
- package/dist/esm/servers/sveltekit.js +1 -1
- package/dist/esm/step-resolver.d.ts +2 -2
- package/dist/esm/step-resolver.js +1 -1
- package/dist/esm/{subscriber.types-D4PvRIKR.d.ts → subscriber.types-Drf26WPA.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/esm/chunk-Q3ALQWIF.js +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { P as PostActionEnum } from '../health-check.types-
|
|
2
|
-
export { b as CancelEventTriggerResponse, c as ChannelPreference, C as ClientOptions, d as CodeResult, a as CronExpression, D as DiscoverAgentOutput, e as DiscoverOutput, f as DiscoverProviderOutput, g as DiscoverStepOutput, h as DiscoverWorkflowOutput, i as Event, j as EventTriggerParams, k as EventTriggerResponse, l as EventTriggerResult, m as Execute, E as ExecuteInput, n as ExecuteOutput, o as ExecuteOutputMetadata, p as ExecuteOutputOptions, G as GetActionEnum, H as HealthCheck, L as Logger, S as SeverityLevelEnum, q as State, r as StepType, W as Workflow, s as WorkflowChannelEnum, t as WorkflowOptions, u as WorkflowPreference, v as WorkflowPreferences } from '../health-check.types-
|
|
3
|
-
export { e as ActionStep, A as ActionStepEnum, f as ChannelStep, c as ChannelStepEnum, g as ChatOutput, h as ChatOutputUnvalidated, i as ChatResult, a as ContextPayload, C as ContextResolved, j as ContextValue, k as CustomStep, D as DelayDynamicOutput, l as DelayDynamicOutputUnvalidated, m as DelayOutput, n as DelayOutputUnvalidated, o as DelayRegularOutput, q as DelayRegularOutputUnvalidated, r as DelayResult, s as DelayTimedOutput, t as DelayTimedOutputUnvalidated, u as DigestOutput, v as DigestOutputUnvalidated, w as DigestRegularOutput, x as DigestRegularOutputUnvalidated, y as DigestResult, z as DigestTimedOutput, B as DigestTimedOutputUnvalidated, F as EmailOutput, G as EmailOutputUnvalidated, H as EmailResult, E as EnvironmentSystemVariables, I as InAppOutput, J as InAppOutputUnvalidated, K as InAppResult, L as JobStatusEnum, P as PushOutput, M as PushOutputUnvalidated, N as PushResult, O as Skip, Q as SmsOutput, R as SmsOutputUnvalidated, T as SmsResult, b as Step, U as StepContext, d as StepOptions, V as StepOutput, S as Subscriber, X as ThrottleOutput, Y as ThrottleOutputUnvalidated, Z as ThrottleResult, _ as ToolOutput, $ as ToolOutputUnvalidated, a0 as actionStepSchemas, a1 as channelStepSchemas } from '../subscriber.types-
|
|
1
|
+
import { P as PostActionEnum } from '../health-check.types-C2XZ-Tpt.cjs';
|
|
2
|
+
export { b as CancelEventTriggerResponse, c as ChannelPreference, C as ClientOptions, d as CodeResult, a as CronExpression, D as DiscoverAgentOutput, e as DiscoverOutput, f as DiscoverProviderOutput, g as DiscoverStepOutput, h as DiscoverWorkflowOutput, i as Event, j as EventTriggerParams, k as EventTriggerResponse, l as EventTriggerResult, m as Execute, E as ExecuteInput, n as ExecuteOutput, o as ExecuteOutputMetadata, p as ExecuteOutputOptions, G as GetActionEnum, H as HealthCheck, L as Logger, S as SeverityLevelEnum, q as State, r as StepType, W as Workflow, s as WorkflowChannelEnum, t as WorkflowOptions, u as WorkflowPreference, v as WorkflowPreferences } from '../health-check.types-C2XZ-Tpt.cjs';
|
|
3
|
+
export { e as ActionStep, A as ActionStepEnum, f as ChannelStep, c as ChannelStepEnum, g as ChatOutput, h as ChatOutputUnvalidated, i as ChatResult, a as ContextPayload, C as ContextResolved, j as ContextValue, k as CustomStep, D as DelayDynamicOutput, l as DelayDynamicOutputUnvalidated, m as DelayOutput, n as DelayOutputUnvalidated, o as DelayRegularOutput, q as DelayRegularOutputUnvalidated, r as DelayResult, s as DelayTimedOutput, t as DelayTimedOutputUnvalidated, u as DigestOutput, v as DigestOutputUnvalidated, w as DigestRegularOutput, x as DigestRegularOutputUnvalidated, y as DigestResult, z as DigestTimedOutput, B as DigestTimedOutputUnvalidated, F as EmailOutput, G as EmailOutputUnvalidated, H as EmailResult, E as EnvironmentSystemVariables, I as InAppOutput, J as InAppOutputUnvalidated, K as InAppResult, L as JobStatusEnum, P as PushOutput, M as PushOutputUnvalidated, N as PushResult, O as Skip, Q as SmsOutput, R as SmsOutputUnvalidated, T as SmsResult, b as Step, U as StepContext, d as StepOptions, V as StepOutput, S as Subscriber, X as ThrottleOutput, Y as ThrottleOutputUnvalidated, Z as ThrottleResult, _ as ToolOutput, $ as ToolOutputUnvalidated, a0 as actionStepSchemas, a1 as channelStepSchemas } from '../subscriber.types-BanvmGul.cjs';
|
|
4
4
|
import { Filter, LiquidOptions, Liquid } from 'liquidjs';
|
|
5
5
|
import { Emoji } from 'chat';
|
|
6
|
-
import { j as AgentHandlerContext,
|
|
7
|
-
export {
|
|
6
|
+
import { j as AgentHandlerContext, L as ToolResult, N as ToolApprovalRequestPayload, T as ToolApprovalCard, R as ReplyHandle, p as AgentMessageContext, O as AgentEventEnum, a as AgentAction, n as AgentMessage, s as AgentReaction, g as AgentConversation, v as AgentSubscriber, e as AgentContextPayload, q as AgentNotification, l as AgentHistoryEntry, r as AgentPlatformContext, m as AgentHumanResponse, P as TypingControl, Q as ToolApprovalControl, S as AgentBridgeRequest, C as ToolApprovalConfig, M as MessageContent, F as FileRef, U as ReplyContent, V as Signal, X as AddReactionPayload, Y as DeleteMessagePayload, Z as SentMessageInfo, _ as TypingOp, G as TriggerRecipientsPayload, H as HumanAskApproveOptions, y as HumanChooseOptions, B as HumanTellOptions } from '../agent.types-crcJBtCy.cjs';
|
|
7
|
+
export { $ as AgentReplyPayload, a0 as EditPayload, a1 as HumanSignal, a2 as MetadataSignal, a3 as ParsedApprovalAction, a4 as TriggerSignal, a5 as buildApprovalActionId, a6 as parseApprovalActionId } from '../agent.types-crcJBtCy.cjs';
|
|
8
8
|
export { a as FromSchema, F as FromSchemaUnvalidated, J as JsonSchema, S as Schema, Z as ZodSchema, b as ZodSchemaMinimal } from '../base.schema.types-BApIn9jr.cjs';
|
|
9
9
|
export { S as SupportedFrameworkName } from '../server.types-Cc6o5eYH.cjs';
|
|
10
10
|
export { A as Awaitable, C as ConditionalPartial, D as DeepPartial, b as DeepRequired, E as Either, I as Indexable, c as PickOptional, d as PickOptionalKeys, e as PickRequired, P as PickRequiredKeys, a as Prettify } from '../util.types-DaFfsxgy.cjs';
|
|
@@ -137,15 +137,6 @@ declare enum ResourceEnum {
|
|
|
137
137
|
STEP = "step"
|
|
138
138
|
}
|
|
139
139
|
|
|
140
|
-
declare const RUNTIME_CONTEXT_BRAND: unique symbol;
|
|
141
|
-
interface AgentRuntimeContext extends AgentHandlerContext {
|
|
142
|
-
readonly [RUNTIME_CONTEXT_BRAND]: true;
|
|
143
|
-
emitToolResult(result: ToolResult): void;
|
|
144
|
-
emitToolApprovalRequest(request: ToolApprovalRequestPayload): void;
|
|
145
|
-
replyApprovalCard(card: ToolApprovalCard): Promise<ReplyHandle>;
|
|
146
|
-
asMessageContext(): AgentMessageContext;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
140
|
type AgentMessageRole = 'user' | 'assistant';
|
|
150
141
|
type AgentToolSource = {
|
|
151
142
|
type: 'builtin';
|
|
@@ -233,6 +224,15 @@ type AgentSignal = {
|
|
|
233
224
|
workflowId: string;
|
|
234
225
|
to?: unknown;
|
|
235
226
|
payload?: Record<string, unknown>;
|
|
227
|
+
} | {
|
|
228
|
+
type: 'human';
|
|
229
|
+
kind: 'ask' | 'approve' | 'choose' | 'tell';
|
|
230
|
+
prompt: string;
|
|
231
|
+
requestId: string;
|
|
232
|
+
options?: string[];
|
|
233
|
+
from?: string;
|
|
234
|
+
ttlSeconds?: number;
|
|
235
|
+
to?: string | string[];
|
|
236
236
|
};
|
|
237
237
|
type AgentEvent = {
|
|
238
238
|
type: 'run-start';
|
|
@@ -673,6 +673,15 @@ type FilterValidators = {
|
|
|
673
673
|
};
|
|
674
674
|
declare const FILTER_VALIDATORS: FilterValidators;
|
|
675
675
|
|
|
676
|
+
declare const RUNTIME_CONTEXT_BRAND: unique symbol;
|
|
677
|
+
interface AgentRuntimeContext extends AgentHandlerContext {
|
|
678
|
+
readonly [RUNTIME_CONTEXT_BRAND]: true;
|
|
679
|
+
emitToolResult(result: ToolResult): void;
|
|
680
|
+
emitToolApprovalRequest(request: ToolApprovalRequestPayload): void;
|
|
681
|
+
replyApprovalCard(card: ToolApprovalCard): Promise<ReplyHandle>;
|
|
682
|
+
asMessageContext(): AgentMessageContext;
|
|
683
|
+
}
|
|
684
|
+
|
|
676
685
|
/** Pending side effects queued between replies, drained atomically before each turn action. */
|
|
677
686
|
interface SideEffectsSnapshot {
|
|
678
687
|
toolApprovalRequest: ToolApprovalRequestPayload | null;
|
|
@@ -731,6 +740,7 @@ declare class AgentContextImpl implements AgentRuntimeContext {
|
|
|
731
740
|
readonly history: AgentHistoryEntry[];
|
|
732
741
|
readonly platform: string;
|
|
733
742
|
readonly platformContext: AgentPlatformContext;
|
|
743
|
+
readonly humanResponse: AgentHumanResponse | null;
|
|
734
744
|
readonly typing: TypingControl;
|
|
735
745
|
readonly toolApproval: ToolApprovalControl;
|
|
736
746
|
readonly metadata: {
|
|
@@ -766,6 +776,11 @@ declare class AgentContextImpl implements AgentRuntimeContext {
|
|
|
766
776
|
to?: TriggerRecipientsPayload;
|
|
767
777
|
payload?: Record<string, unknown>;
|
|
768
778
|
}): void;
|
|
779
|
+
ask(question: string, opts?: HumanAskApproveOptions): string;
|
|
780
|
+
approve(action: string, opts?: HumanAskApproveOptions): string;
|
|
781
|
+
choose(question: string, options: string[], opts?: HumanChooseOptions): string;
|
|
782
|
+
tell(message: string, opts?: HumanTellOptions): string;
|
|
783
|
+
private queueHumanSignal;
|
|
769
784
|
/** @internal Queue a gated tool call for the ledger; flushed with the next reply. */
|
|
770
785
|
emitToolApprovalRequest(request: ToolApprovalRequestPayload): void;
|
|
771
786
|
/** @internal Queue a tool-call outcome to be recorded in history; flushed with the next reply. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseMessage } from '@langchain/core/messages';
|
|
2
|
-
import { l as AgentHistoryEntry, j as AgentHandlerContext, M as MessageContent, k as AgentHandlers,
|
|
2
|
+
import { l as AgentHistoryEntry, j as AgentHandlerContext, M as MessageContent, k as AgentHandlers, n as AgentMessage, p as AgentMessageContext, D as ToolApprovalDecision, b as AgentActionContext, R as ReplyHandle, A as Agent } from '../agent.types-crcJBtCy.cjs';
|
|
3
3
|
import { LanguageModelLike } from '@langchain/core/language_models/base';
|
|
4
4
|
import { RunnableConfig } from '@langchain/core/runnables';
|
|
5
5
|
import { StructuredToolInterface } from '@langchain/core/tools';
|