agents 0.10.2 → 0.11.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/browser/ai.d.ts +31 -0
- package/dist/browser/ai.js +54 -0
- package/dist/browser/ai.js.map +1 -0
- package/dist/browser/index.d.ts +51 -0
- package/dist/browser/index.js +2 -0
- package/dist/browser/tanstack-ai.d.ts +31 -0
- package/dist/browser/tanstack-ai.js +51 -0
- package/dist/browser/tanstack-ai.js.map +1 -0
- package/dist/classPrivateFieldGet2-BVdP0e3Z.js +27 -0
- package/dist/client.d.ts +2 -2
- package/dist/{compaction-helpers-BPE1_ziA.js → compaction-helpers-C_cN3z55.js} +1 -1
- package/dist/{compaction-helpers-BPE1_ziA.js.map → compaction-helpers-C_cN3z55.js.map} +1 -1
- package/dist/{compaction-helpers-BdQbZiML.d.ts → compaction-helpers-YzCLvunJ.d.ts} +1 -1
- package/dist/{do-oauth-client-provider-31gqR33H.d.ts → do-oauth-client-provider-C38aWbFV.d.ts} +1 -1
- package/dist/{email-Cql45SKP.d.ts → email-X72-zjuq.d.ts} +1 -1
- package/dist/email.d.ts +2 -2
- package/dist/experimental/memory/session/index.d.ts +1 -1
- package/dist/experimental/memory/session/index.js +1 -1
- package/dist/experimental/memory/utils/index.d.ts +1 -1
- package/dist/experimental/memory/utils/index.js +1 -1
- package/dist/{index-DDSX-g7W.d.ts → index-Biv6K70p.d.ts} +9 -1
- package/dist/{index-D2lfljd3.d.ts → index-C_XD19E3.d.ts} +144 -62
- package/dist/index.d.ts +32 -28
- package/dist/index.js +3245 -2
- package/dist/index.js.map +1 -0
- package/dist/{internal_context-DuQZFvWI.d.ts → internal_context-BvuGZieY.d.ts} +1 -1
- package/dist/internal_context.d.ts +1 -1
- package/dist/mcp/client.d.ts +1 -1
- package/dist/mcp/do-oauth-client-provider.d.ts +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/observability/index.d.ts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/{retries-B_CN5KM9.d.ts → retries-JlwH9mnV.d.ts} +1 -1
- package/dist/retries.d.ts +1 -1
- package/dist/{serializable-DGdO8CDh.d.ts → serializable-Bg8ARWlN.d.ts} +1 -1
- package/dist/serializable.d.ts +1 -1
- package/dist/shared-BUHZFGTk.d.ts +34 -0
- package/dist/shared-BtPEbm_U.js +437 -0
- package/dist/shared-BtPEbm_U.js.map +1 -0
- package/dist/{types-B9A8AU7B.d.ts → types-DAHCZC_W.d.ts} +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{workflow-types-XmOkuI7A.d.ts → workflow-types-DHs0L0KP.d.ts} +1 -1
- package/dist/workflow-types.d.ts +1 -1
- package/dist/workflows.d.ts +2 -2
- package/dist/workflows.js +1 -1
- package/package.json +30 -13
- package/dist/src-f7-4oW_C.js +0 -3217
- package/dist/src-f7-4oW_C.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as AgentEmail } from "./internal_context-
|
|
2
|
-
import { t as RetryOptions } from "./retries-
|
|
1
|
+
import { n as AgentEmail } from "./internal_context-BvuGZieY.js";
|
|
2
|
+
import { t as RetryOptions } from "./retries-JlwH9mnV.js";
|
|
3
3
|
import {
|
|
4
4
|
n as Observability,
|
|
5
5
|
r as ObservabilityEvent,
|
|
6
6
|
s as MCPObservabilityEvent
|
|
7
|
-
} from "./index-
|
|
8
|
-
import { t as AgentMcpOAuthProvider } from "./do-oauth-client-provider-
|
|
7
|
+
} from "./index-Biv6K70p.js";
|
|
8
|
+
import { t as AgentMcpOAuthProvider } from "./do-oauth-client-provider-C38aWbFV.js";
|
|
9
9
|
import {
|
|
10
10
|
_ as WorkflowPage,
|
|
11
11
|
g as WorkflowInfo,
|
|
@@ -13,9 +13,9 @@ import {
|
|
|
13
13
|
l as WorkflowCallback,
|
|
14
14
|
s as RunWorkflowOptions,
|
|
15
15
|
y as WorkflowQueryCriteria
|
|
16
|
-
} from "./workflow-types-
|
|
17
|
-
import { t as MessageType } from "./types-
|
|
18
|
-
import { r as EmailResolver } from "./email-
|
|
16
|
+
} from "./workflow-types-DHs0L0KP.js";
|
|
17
|
+
import { t as MessageType } from "./types-DAHCZC_W.js";
|
|
18
|
+
import { r as EmailResolver } from "./email-X72-zjuq.js";
|
|
19
19
|
import { RpcTarget } from "cloudflare:workers";
|
|
20
20
|
import {
|
|
21
21
|
Connection,
|
|
@@ -729,7 +729,7 @@ declare class MCPClientConnection {
|
|
|
729
729
|
*/
|
|
730
730
|
getTransport(
|
|
731
731
|
transportType: BaseTransportType
|
|
732
|
-
):
|
|
732
|
+
): RPCClientTransport | SSEClientTransport | StreamableHTTPClientTransport;
|
|
733
733
|
private tryConnect;
|
|
734
734
|
private _capabilityErrorHandler;
|
|
735
735
|
}
|
|
@@ -1420,6 +1420,64 @@ declare function getNamespacedData<T extends keyof NamespacedData>(
|
|
|
1420
1420
|
): NamespacedData[T];
|
|
1421
1421
|
//#endregion
|
|
1422
1422
|
//#region src/index.d.ts
|
|
1423
|
+
/**
|
|
1424
|
+
* Structural type for Cloudflare's `send_email` binding.
|
|
1425
|
+
* Accepts both raw MIME messages and structured builder objects.
|
|
1426
|
+
*/
|
|
1427
|
+
type EmailSendBinding = {
|
|
1428
|
+
send(
|
|
1429
|
+
message:
|
|
1430
|
+
| EmailMessage
|
|
1431
|
+
| {
|
|
1432
|
+
from:
|
|
1433
|
+
| string
|
|
1434
|
+
| {
|
|
1435
|
+
email: string;
|
|
1436
|
+
name?: string;
|
|
1437
|
+
};
|
|
1438
|
+
to: string | string[];
|
|
1439
|
+
subject: string;
|
|
1440
|
+
replyTo?:
|
|
1441
|
+
| string
|
|
1442
|
+
| {
|
|
1443
|
+
email: string;
|
|
1444
|
+
name?: string;
|
|
1445
|
+
};
|
|
1446
|
+
cc?: string | string[];
|
|
1447
|
+
bcc?: string | string[];
|
|
1448
|
+
headers?: Record<string, string>;
|
|
1449
|
+
text?: string;
|
|
1450
|
+
html?: string;
|
|
1451
|
+
}
|
|
1452
|
+
): Promise<EmailSendResult>;
|
|
1453
|
+
};
|
|
1454
|
+
/**
|
|
1455
|
+
* Options for Agent.sendEmail()
|
|
1456
|
+
*/
|
|
1457
|
+
type SendEmailOptions = {
|
|
1458
|
+
binding: EmailSendBinding;
|
|
1459
|
+
to: string | string[];
|
|
1460
|
+
from:
|
|
1461
|
+
| string
|
|
1462
|
+
| {
|
|
1463
|
+
email: string;
|
|
1464
|
+
name?: string;
|
|
1465
|
+
};
|
|
1466
|
+
subject: string;
|
|
1467
|
+
text?: string;
|
|
1468
|
+
html?: string;
|
|
1469
|
+
replyTo?:
|
|
1470
|
+
| string
|
|
1471
|
+
| {
|
|
1472
|
+
email: string;
|
|
1473
|
+
name?: string;
|
|
1474
|
+
};
|
|
1475
|
+
cc?: string | string[];
|
|
1476
|
+
bcc?: string | string[];
|
|
1477
|
+
inReplyTo?: string;
|
|
1478
|
+
headers?: Record<string, string>;
|
|
1479
|
+
secret?: string;
|
|
1480
|
+
};
|
|
1423
1481
|
/**
|
|
1424
1482
|
* RPC request message from client
|
|
1425
1483
|
*/
|
|
@@ -2015,6 +2073,28 @@ declare class Agent<
|
|
|
2015
2073
|
secret?: string | null;
|
|
2016
2074
|
}
|
|
2017
2075
|
): Promise<void>;
|
|
2076
|
+
/**
|
|
2077
|
+
* Send an outbound email via an Email Service binding.
|
|
2078
|
+
*
|
|
2079
|
+
* Automatically injects agent routing headers (X-Agent-Name, X-Agent-ID).
|
|
2080
|
+
* When `secret` is provided, signs headers with HMAC-SHA256 so that replies
|
|
2081
|
+
* can be routed back to this agent instance via createSecureReplyEmailResolver.
|
|
2082
|
+
*
|
|
2083
|
+
* @param options.binding The send_email binding (e.g. this.env.EMAIL)
|
|
2084
|
+
* @param options.to Recipient address(es)
|
|
2085
|
+
* @param options.from Sender address or {email, name} object
|
|
2086
|
+
* @param options.subject Email subject line
|
|
2087
|
+
* @param options.text Plain text body (at least one of text/html required)
|
|
2088
|
+
* @param options.html HTML body (at least one of text/html required)
|
|
2089
|
+
* @param options.replyTo Reply-to address
|
|
2090
|
+
* @param options.cc CC recipient(s)
|
|
2091
|
+
* @param options.bcc BCC recipient(s)
|
|
2092
|
+
* @param options.inReplyTo Message-ID of the email this is replying to (for threading)
|
|
2093
|
+
* @param options.headers Additional custom headers
|
|
2094
|
+
* @param options.secret Secret for signing agent routing headers
|
|
2095
|
+
* @returns The messageId from Email Service
|
|
2096
|
+
*/
|
|
2097
|
+
sendEmail(options: SendEmailOptions): Promise<EmailSendResult>;
|
|
2018
2098
|
private _tryCatch;
|
|
2019
2099
|
/**
|
|
2020
2100
|
* Automatically wrap custom methods with agent context
|
|
@@ -2932,70 +3012,72 @@ declare class StreamingResponse {
|
|
|
2932
3012
|
}
|
|
2933
3013
|
//#endregion
|
|
2934
3014
|
export {
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
3015
|
+
ElicitRequestSchema$1 as $,
|
|
3016
|
+
callable as A,
|
|
3017
|
+
MCPConnectionResult as B,
|
|
3018
|
+
SendEmailOptions as C,
|
|
3019
|
+
SubAgentClass as D,
|
|
3020
|
+
StreamingResponse as E,
|
|
3021
|
+
unstable_callable as F,
|
|
3022
|
+
RegisterServerOptions as G,
|
|
3023
|
+
MCPOAuthCallbackResult as H,
|
|
3024
|
+
MCPClientManager as I,
|
|
3025
|
+
RPCClientTransportOptions as J,
|
|
3026
|
+
getNamespacedData as K,
|
|
3027
|
+
MCPClientManagerOptions as L,
|
|
3028
|
+
getCurrentAgent as M,
|
|
3029
|
+
routeAgentEmail as N,
|
|
3030
|
+
SubAgentStub as O,
|
|
3031
|
+
routeAgentRequest as P,
|
|
3032
|
+
ElicitRequest$1 as Q,
|
|
3033
|
+
MCPClientOAuthCallbackConfig as R,
|
|
3034
|
+
Schedule as S,
|
|
3035
|
+
StateUpdateMessage as T,
|
|
3036
|
+
MCPServerFilter as U,
|
|
3037
|
+
MCPDiscoverResult as V,
|
|
3038
|
+
MCPServerOptions as W,
|
|
3039
|
+
RPCServerTransportOptions as X,
|
|
3040
|
+
RPCServerTransport as Y,
|
|
3041
|
+
RPC_DO_PREFIX as Z,
|
|
3042
|
+
MCPServerMessage as _,
|
|
2963
3043
|
AgentNamespace as a,
|
|
2964
|
-
|
|
2965
|
-
|
|
3044
|
+
McpAuthContext as at,
|
|
3045
|
+
RPCRequest as b,
|
|
2966
3046
|
CallableMetadata as c,
|
|
2967
|
-
|
|
3047
|
+
WorkerTransport as ct,
|
|
2968
3048
|
DEFAULT_AGENT_STATIC_OPTIONS as d,
|
|
2969
|
-
|
|
2970
|
-
|
|
3049
|
+
StreamableHTTPEdgeClientTransport as dt,
|
|
3050
|
+
ElicitResult$1 as et,
|
|
2971
3051
|
EmailRoutingOptions as f,
|
|
2972
|
-
|
|
2973
|
-
MCPServer as
|
|
3052
|
+
McpClientOptions as ft,
|
|
3053
|
+
MCPServer as g,
|
|
3054
|
+
FiberRecoveryContext as h,
|
|
2974
3055
|
AgentContext as i,
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
3056
|
+
experimental_createMcpHandler as it,
|
|
3057
|
+
getAgentByName as j,
|
|
3058
|
+
WSMessage as k,
|
|
2978
3059
|
Connection$1 as l,
|
|
2979
|
-
|
|
2980
|
-
|
|
3060
|
+
WorkerTransportOptions as lt,
|
|
3061
|
+
FiberContext as m,
|
|
2981
3062
|
AddRpcMcpServerOptions as n,
|
|
2982
|
-
|
|
3063
|
+
CreateMcpHandlerOptions as nt,
|
|
2983
3064
|
AgentOptions as o,
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
3065
|
+
getMcpAuthContext as ot,
|
|
3066
|
+
EmailSendBinding as p,
|
|
3067
|
+
TransportType as pt,
|
|
3068
|
+
RPCClientTransport as q,
|
|
2987
3069
|
Agent as r,
|
|
2988
|
-
|
|
3070
|
+
createMcpHandler as rt,
|
|
2989
3071
|
AgentStaticOptions as s,
|
|
2990
|
-
|
|
3072
|
+
TransportState as st,
|
|
2991
3073
|
AddMcpServerOptions as t,
|
|
2992
|
-
|
|
3074
|
+
McpAgent as tt,
|
|
2993
3075
|
ConnectionContext$1 as u,
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3076
|
+
SSEEdgeClientTransport as ut,
|
|
3077
|
+
MCPServersState as v,
|
|
3078
|
+
SqlError as w,
|
|
3079
|
+
RPCResponse as x,
|
|
3080
|
+
QueueItem as y,
|
|
3081
|
+
MCPClientOAuthResult as z
|
|
3000
3082
|
};
|
|
3001
|
-
//# sourceMappingURL=index-
|
|
3083
|
+
//# sourceMappingURL=index-C_XD19E3.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,48 +1,50 @@
|
|
|
1
|
-
import { r as __DO_NOT_USE_WILL_BREAK__agentContext } from "./internal_context-
|
|
2
|
-
import { t as RetryOptions } from "./retries-
|
|
1
|
+
import { r as __DO_NOT_USE_WILL_BREAK__agentContext } from "./internal_context-BvuGZieY.js";
|
|
2
|
+
import { t as RetryOptions } from "./retries-JlwH9mnV.js";
|
|
3
3
|
import {
|
|
4
|
-
A as
|
|
5
|
-
C as
|
|
6
|
-
D as
|
|
7
|
-
E as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
A as callable,
|
|
5
|
+
C as SendEmailOptions,
|
|
6
|
+
D as SubAgentClass,
|
|
7
|
+
E as StreamingResponse,
|
|
8
|
+
F as unstable_callable,
|
|
9
|
+
M as getCurrentAgent,
|
|
10
|
+
N as routeAgentEmail,
|
|
11
|
+
O as SubAgentStub,
|
|
12
|
+
P as routeAgentRequest,
|
|
13
|
+
S as Schedule,
|
|
14
|
+
T as StateUpdateMessage,
|
|
15
|
+
_ as MCPServerMessage,
|
|
14
16
|
a as AgentNamespace,
|
|
15
|
-
b as
|
|
17
|
+
b as RPCRequest,
|
|
16
18
|
c as CallableMetadata,
|
|
17
19
|
d as DEFAULT_AGENT_STATIC_OPTIONS,
|
|
18
|
-
dt as TransportType,
|
|
19
20
|
f as EmailRoutingOptions,
|
|
20
|
-
g as
|
|
21
|
-
h as
|
|
21
|
+
g as MCPServer,
|
|
22
|
+
h as FiberRecoveryContext,
|
|
22
23
|
i as AgentContext,
|
|
23
|
-
j as
|
|
24
|
-
k as
|
|
24
|
+
j as getAgentByName,
|
|
25
|
+
k as WSMessage,
|
|
25
26
|
l as Connection,
|
|
26
|
-
m as
|
|
27
|
+
m as FiberContext,
|
|
27
28
|
n as AddRpcMcpServerOptions,
|
|
28
29
|
o as AgentOptions,
|
|
29
|
-
p as
|
|
30
|
+
p as EmailSendBinding,
|
|
31
|
+
pt as TransportType,
|
|
30
32
|
r as Agent,
|
|
31
33
|
s as AgentStaticOptions,
|
|
32
34
|
t as AddMcpServerOptions,
|
|
33
35
|
u as ConnectionContext,
|
|
34
|
-
v as
|
|
35
|
-
w as
|
|
36
|
-
x as
|
|
37
|
-
y as
|
|
38
|
-
} from "./index-
|
|
36
|
+
v as MCPServersState,
|
|
37
|
+
w as SqlError,
|
|
38
|
+
x as RPCResponse,
|
|
39
|
+
y as QueueItem
|
|
40
|
+
} from "./index-C_XD19E3.js";
|
|
39
41
|
import {
|
|
40
42
|
n as AgentsOAuthProvider,
|
|
41
43
|
r as DurableObjectOAuthClientProvider,
|
|
42
44
|
t as AgentMcpOAuthProvider
|
|
43
|
-
} from "./do-oauth-client-provider-
|
|
44
|
-
import { t as MessageType } from "./types-
|
|
45
|
-
import { l as createHeaderBasedEmailResolver } from "./email-
|
|
45
|
+
} from "./do-oauth-client-provider-C38aWbFV.js";
|
|
46
|
+
import { t as MessageType } from "./types-DAHCZC_W.js";
|
|
47
|
+
import { l as createHeaderBasedEmailResolver } from "./email-X72-zjuq.js";
|
|
46
48
|
export {
|
|
47
49
|
AddMcpServerOptions,
|
|
48
50
|
AddRpcMcpServerOptions,
|
|
@@ -59,6 +61,7 @@ export {
|
|
|
59
61
|
DEFAULT_AGENT_STATIC_OPTIONS,
|
|
60
62
|
DurableObjectOAuthClientProvider,
|
|
61
63
|
EmailRoutingOptions,
|
|
64
|
+
EmailSendBinding,
|
|
62
65
|
FiberContext,
|
|
63
66
|
FiberRecoveryContext,
|
|
64
67
|
MCPServer,
|
|
@@ -70,6 +73,7 @@ export {
|
|
|
70
73
|
RPCResponse,
|
|
71
74
|
RetryOptions,
|
|
72
75
|
Schedule,
|
|
76
|
+
SendEmailOptions,
|
|
73
77
|
SqlError,
|
|
74
78
|
StateUpdateMessage,
|
|
75
79
|
StreamingResponse,
|