agents 0.22.0 → 0.23.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 +20 -1
- package/dist/{agent-routing-CnkaHb-v.d.ts → agent-routing-DE5zmCQ8.d.ts} +1038 -394
- package/dist/agent-routing.d.ts +1 -1
- package/dist/agent-tool-types.d.ts +26 -26
- package/dist/{agent-tools-C0XJqWzB.d.ts → agent-tools-DtXMTDGM.d.ts} +7 -7
- package/dist/agent-tools.d.ts +21 -21
- package/dist/browser/ai.js +4 -1
- package/dist/browser/ai.js.map +1 -1
- package/dist/browser/tanstack-ai.js.map +1 -1
- package/dist/callable-decorator-DP__HhBA.d.ts +72 -0
- package/dist/callable-decorator.d.ts +18 -0
- package/dist/callable-decorator.js +71 -0
- package/dist/callable-decorator.js.map +1 -0
- package/dist/capability-BjSKYpzg.js.map +1 -1
- package/dist/capability-runner-Be_-PLR1.d.ts +459 -0
- package/dist/channel-Bnm4S7T2.d.ts +491 -0
- package/dist/channels/ai-sdk.d.ts +46 -0
- package/dist/channels/ai-sdk.js +120 -0
- package/dist/channels/ai-sdk.js.map +1 -0
- package/dist/channels/email.d.ts +95 -0
- package/dist/channels/email.js +323 -0
- package/dist/channels/email.js.map +1 -0
- package/dist/channels/index.d.ts +233 -0
- package/dist/channels/index.js +608 -0
- package/dist/channels/index.js.map +1 -0
- package/dist/channels/slack.d.ts +140 -0
- package/dist/channels/slack.js +614 -0
- package/dist/channels/slack.js.map +1 -0
- package/dist/channels/tanstack-ai.d.ts +39 -0
- package/dist/channels/tanstack-ai.js +17 -0
- package/dist/channels/tanstack-ai.js.map +1 -0
- package/dist/channels/telegram.d.ts +106 -0
- package/dist/channels/telegram.js +427 -0
- package/dist/channels/telegram.js.map +1 -0
- package/dist/channels/voice.d.ts +45 -0
- package/dist/channels/voice.js +122 -0
- package/dist/channels/voice.js.map +1 -0
- package/dist/chat/index.d.ts +2325 -2019
- package/dist/chat/index.js +888 -518
- package/dist/chat/index.js.map +1 -1
- package/dist/chat-sdk/index.d.ts +7 -7
- package/dist/chat-sdk/index.js +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/context/index.d.ts +216 -0
- package/dist/context/index.js +454 -0
- package/dist/context/index.js.map +1 -0
- package/dist/{current-agent-CuMErtly.d.ts → current-agent-Da_C9a3b.d.ts} +90 -107
- package/dist/current-agent-DhoDkSnH.js.map +1 -1
- package/dist/{diagnostics-CaBjfz4J.js → diagnostics-BzvaX2UT.js} +5 -1
- package/dist/diagnostics-BzvaX2UT.js.map +1 -0
- package/dist/diagnostics-C4jcz3VK.js +360 -0
- package/dist/diagnostics-C4jcz3VK.js.map +1 -0
- package/dist/index-BB0kqhIz.d.ts +101 -0
- package/dist/index-BVVgDSdq.d.ts +1 -0
- package/dist/index-XDkuQ7zm.d.ts +89 -0
- package/dist/{index-DcSAZKsB.d.ts → index-YSKgfgg9.d.ts} +3 -1
- package/dist/index.d.ts +91 -82
- package/dist/index.js +3 -2
- package/dist/ingress-BfetZbMO.js +83 -0
- package/dist/ingress-BfetZbMO.js.map +1 -0
- package/dist/internal-CYlgHl1l.js +59 -0
- package/dist/internal-CYlgHl1l.js.map +1 -0
- package/dist/internal_context.d.ts +1 -1
- package/dist/lifecycle/index.d.ts +35 -17
- package/dist/lifecycle/index.js +1 -1
- package/dist/lifecycle-CMRGjZdw.js +1299 -0
- package/dist/lifecycle-CMRGjZdw.js.map +1 -0
- package/dist/mcp/client/index.d.ts +20 -20
- package/dist/mcp/index.d.ts +35 -35
- package/dist/mcp/index.js +1 -1
- package/dist/observability/index.d.ts +1 -1
- package/dist/observability/index.js +1 -1
- package/dist/react.d.ts +4 -4
- package/dist/{retries-CAvxtG9d.d.ts → retries-D9Ds-1lz.d.ts} +17 -6
- package/dist/retries.d.ts +8 -6
- package/dist/retries.js +13 -1
- package/dist/retries.js.map +1 -1
- package/dist/routing/index.d.ts +137 -0
- package/dist/routing/index.js +244 -0
- package/dist/routing/index.js.map +1 -0
- package/dist/sanitize-D9TujEK8.js +79 -0
- package/dist/sanitize-D9TujEK8.js.map +1 -0
- package/dist/scheduler-DD9NdYbF.js +665 -0
- package/dist/scheduler-DD9NdYbF.js.map +1 -0
- package/dist/{scheduler-DQoTGoAW.d.ts → scheduler-Dwh85ZGl.d.ts} +21 -22
- package/dist/schedules/index.d.ts +1 -1
- package/dist/schedules/index.js +1 -1
- package/dist/sentence-chunker-BAidJ4DA.d.ts +68 -0
- package/dist/serializable.d.ts +1 -1
- package/dist/sessions/index.d.ts +441 -0
- package/dist/sessions/index.js +2063 -0
- package/dist/sessions/index.js.map +1 -0
- package/dist/skills/index.d.ts +99 -0
- package/dist/skills/index.js +254 -5
- package/dist/skills/index.js.map +1 -1
- package/dist/{src-5W6JNKVb.js → src-DlSHshb2.js} +1460 -1110
- package/dist/src-DlSHshb2.js.map +1 -0
- package/dist/streams/index.d.ts +120 -0
- package/dist/streams/index.js +107 -0
- package/dist/streams/index.js.map +1 -0
- package/dist/streams-D6tJ0NN9.d.ts +370 -0
- package/dist/streams-DZKgAj9b.js +709 -0
- package/dist/streams-DZKgAj9b.js.map +1 -0
- package/dist/sub-routing.d.ts +12 -12
- package/dist/surface-bZZJqBka.js +17 -0
- package/dist/surface-bZZJqBka.js.map +1 -0
- package/dist/tasks/index.d.ts +64 -0
- package/dist/tasks/index.js +2 -0
- package/dist/tasks-BRJ5zgya.d.ts +517 -0
- package/dist/tasks-ylZgBjhj.js +1656 -0
- package/dist/tasks-ylZgBjhj.js.map +1 -0
- package/dist/text-segment-joiner-BtAFQSA_.js +57 -0
- package/dist/text-segment-joiner-BtAFQSA_.js.map +1 -0
- package/dist/text-stream-CpdiKrJB.js +272 -0
- package/dist/text-stream-CpdiKrJB.js.map +1 -0
- package/dist/tokens-nHAKcN6M.js +52 -0
- package/dist/tokens-nHAKcN6M.js.map +1 -0
- package/dist/tool-schema-CBjGPrsQ.js +31 -0
- package/dist/tool-schema-CBjGPrsQ.js.map +1 -0
- package/dist/types-B7LojTe4.d.ts +202 -0
- package/dist/types-_Faxb570.d.ts +439 -0
- package/dist/voice/client.d.ts +226 -0
- package/dist/voice/client.js +932 -0
- package/dist/voice/client.js.map +1 -0
- package/dist/voice/errors.d.ts +43 -0
- package/dist/voice/errors.js +41 -0
- package/dist/voice/errors.js.map +1 -0
- package/dist/voice/index.d.ts +271 -0
- package/dist/voice/index.js +1812 -0
- package/dist/voice/index.js.map +1 -0
- package/dist/voice/react.d.ts +167 -0
- package/dist/voice/react.js +234 -0
- package/dist/voice/react.js.map +1 -0
- package/dist/voice/sfu.d.ts +71 -0
- package/dist/voice/sfu.js +157 -0
- package/dist/voice/sfu.js.map +1 -0
- package/dist/voice/text.d.ts +6 -0
- package/dist/voice/text.js +2 -0
- package/dist/voice/types.d.ts +58 -0
- package/dist/voice/types.js +18 -0
- package/dist/voice/types.js.map +1 -0
- package/dist/voice/workers-ai.d.ts +136 -0
- package/dist/voice/workers-ai.js +568 -0
- package/dist/voice/workers-ai.js.map +1 -0
- package/dist/websockets/index.d.ts +192 -0
- package/dist/websockets/index.js +2 -0
- package/dist/websockets-DUfRHPRq.js +502 -0
- package/dist/websockets-DUfRHPRq.js.map +1 -0
- package/dist/workflow-types.d.ts +25 -25
- package/dist/workflows.d.ts +21 -21
- package/dist/workflows.js +1 -1
- package/docs/agent-class.md +2 -2
- package/docs/agent-tools.md +2 -1
- package/docs/channels.md +323 -0
- package/docs/chat-agents.md +6 -13
- package/docs/context.md +131 -0
- package/docs/index.md +15 -12
- package/docs/lifecycle.md +102 -55
- package/docs/long-running-agents.md +2 -2
- package/docs/mcp-servers.md +5 -1
- package/docs/resumable-streaming.md +1 -1
- package/docs/routing.md +105 -0
- package/docs/sessions.md +237 -871
- package/docs/streams.md +213 -0
- package/docs/sub-agents.md +184 -124
- package/docs/tasks.md +246 -0
- package/docs/voice.md +745 -0
- package/package.json +115 -13
- package/dist/capability-runner-CvHGZqUu.d.ts +0 -150
- package/dist/compaction-helpers-iiKMr2TQ.js +0 -340
- package/dist/compaction-helpers-iiKMr2TQ.js.map +0 -1
- package/dist/compaction-helpers-wUz6M3us.d.ts +0 -621
- package/dist/diagnostics-CaBjfz4J.js.map +0 -1
- package/dist/durable-object-lifecycle-D6nNQJJd.js +0 -862
- package/dist/durable-object-lifecycle-D6nNQJJd.js.map +0 -1
- package/dist/experimental/memory/session/index.d.ts +0 -671
- package/dist/experimental/memory/session/index.js +0 -2379
- package/dist/experimental/memory/session/index.js.map +0 -1
- package/dist/experimental/memory/utils/index.d.ts +0 -96
- package/dist/experimental/memory/utils/index.js +0 -79
- package/dist/experimental/memory/utils/index.js.map +0 -1
- package/dist/scheduler-CR9RHGos.js +0 -857
- package/dist/scheduler-CR9RHGos.js.map +0 -1
- package/dist/src-5W6JNKVb.js.map +0 -1
- package/dist/tool-output-truncation-CNnnGZQ3.js +0 -98
- package/dist/tool-output-truncation-CNnnGZQ3.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,101 +1,98 @@
|
|
|
1
1
|
/// <reference path="../skills-module.d.ts" />
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "./current-agent-CuMErtly.js";
|
|
3
|
+
b as Connection,
|
|
4
|
+
w as WSMessage,
|
|
5
|
+
x as ConnectionContext
|
|
6
|
+
} from "./capability-runner-Be_-PLR1.js";
|
|
8
7
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
8
|
+
i as isDurableObjectStorageReset,
|
|
9
|
+
n as isDurableObjectCodeUpdateReset,
|
|
10
|
+
r as isDurableObjectMemoryLimitReset,
|
|
11
|
+
s as isPlatformTransientError,
|
|
12
|
+
t as RetryOptions
|
|
13
|
+
} from "./retries-D9Ds-1lz.js";
|
|
14
|
+
import { i as __DO_NOT_USE_WILL_BREAK__agentContext } from "./current-agent-Da_C9a3b.js";
|
|
15
|
+
import {
|
|
16
|
+
$ as ChatCapableAgentClass,
|
|
17
|
+
A as StreamingResponse,
|
|
18
|
+
An as routeSubAgentRequest,
|
|
19
|
+
At as MCPAITool,
|
|
20
|
+
B as AgentToolFailure,
|
|
21
|
+
C as MCPServersState,
|
|
22
|
+
Cn as SubAgentPathMatch,
|
|
23
|
+
D as StartFiberOptions,
|
|
24
|
+
E as RPCResponse,
|
|
25
|
+
F as AgentToolChildAdapter,
|
|
26
|
+
G as AgentToolProgressSnapshot,
|
|
27
|
+
H as AgentToolLifecycleResult,
|
|
28
|
+
I as AgentToolDisplayMetadata,
|
|
29
|
+
J as AgentToolRunPart,
|
|
30
|
+
K as AgentToolRunInfo,
|
|
31
|
+
Kt as normalizeServerId,
|
|
32
|
+
L as AgentToolEvent,
|
|
33
|
+
M as routeAgentEmail,
|
|
34
|
+
N as AGENT_TOOL_MILESTONE_PART,
|
|
35
|
+
O as StartFiberResult,
|
|
36
|
+
On as getSubAgentByName,
|
|
37
|
+
P as AGENT_TOOL_PROGRESS_PART,
|
|
38
|
+
Q as AgentToolTerminalStatus,
|
|
39
|
+
R as AgentToolEventMessage,
|
|
40
|
+
S as MCPServerMessage,
|
|
41
|
+
Sn as SUB_PREFIX,
|
|
42
|
+
T as RPCRequest,
|
|
43
|
+
Tn as buildAgentUrl,
|
|
44
|
+
U as AgentToolMilestone,
|
|
45
|
+
Ut as MCP_SERVER_ID_MAX_LENGTH,
|
|
46
|
+
V as AgentToolInterruptedReason,
|
|
47
|
+
W as AgentToolProgress,
|
|
48
|
+
X as AgentToolRunStatus,
|
|
49
|
+
Y as AgentToolRunState,
|
|
50
|
+
Z as AgentToolStoredChunk,
|
|
51
|
+
_ as FiberRecoveryContext,
|
|
49
52
|
a as routeAgentRequest,
|
|
50
|
-
|
|
51
|
-
|
|
53
|
+
b as ListFibersOptions,
|
|
54
|
+
bn as AgentPathStep,
|
|
52
55
|
c as Agent,
|
|
53
|
-
ct as RunAgentToolResult,
|
|
54
56
|
d as AgentStaticOptions,
|
|
55
|
-
et as
|
|
56
|
-
f as
|
|
57
|
-
g as
|
|
58
|
-
h as
|
|
57
|
+
et as DetachedAgentToolConfig,
|
|
58
|
+
f as DEFAULT_AGENT_STATIC_OPTIONS,
|
|
59
|
+
g as FiberInspection,
|
|
60
|
+
h as FiberContext,
|
|
59
61
|
i as getAgentByName,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
k as
|
|
62
|
+
j as getCurrentAgent,
|
|
63
|
+
jn as withInvocationScope,
|
|
64
|
+
jt as MCPAIToolSet,
|
|
65
|
+
k as StateUpdateMessage,
|
|
66
|
+
kn as parseSubAgentPath,
|
|
64
67
|
l as AgentContext,
|
|
65
|
-
m as
|
|
68
|
+
m as EmailRoutingOptions,
|
|
66
69
|
n as AgentOptions,
|
|
67
|
-
nt as
|
|
70
|
+
nt as RunAgentToolOptions,
|
|
68
71
|
o as AddMcpServerOptions,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
q as AgentToolLifecycleResult,
|
|
72
|
+
p as DeleteFibersOptions,
|
|
73
|
+
q as AgentToolRunInspection,
|
|
72
74
|
r as RoutingRetryOptions,
|
|
73
|
-
rt as
|
|
75
|
+
rt as RunAgentToolResult,
|
|
74
76
|
s as AddRpcMcpServerOptions,
|
|
75
|
-
st as RunAgentToolOptions,
|
|
76
77
|
t as AgentGetOptions,
|
|
77
|
-
tt as
|
|
78
|
+
tt as DetachedRunAgentToolResult,
|
|
78
79
|
u as AgentNamespace,
|
|
79
|
-
v as
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
v as FiberRecoveryResult,
|
|
81
|
+
vn as DynamicAgentClass,
|
|
82
|
+
w as QueueItem,
|
|
83
|
+
wn as buildAgentPath,
|
|
84
|
+
x as MCPServer,
|
|
85
|
+
xn as BuildAgentPathOptions,
|
|
86
|
+
y as FiberStatus,
|
|
87
|
+
yn as DynamicAgentStub,
|
|
88
|
+
z as AgentToolEventState
|
|
89
|
+
} from "./agent-routing-DE5zmCQ8.js";
|
|
86
90
|
import {
|
|
87
91
|
a as EmailSendBinding,
|
|
88
92
|
d as createHeaderBasedEmailResolver,
|
|
89
93
|
s as SendEmailOptions
|
|
90
94
|
} from "./email-7TatiTnl.js";
|
|
91
95
|
import { n as camelCaseToKebabCase } from "./utils-CGtGDSgA.js";
|
|
92
|
-
import {
|
|
93
|
-
i as isDurableObjectStorageReset,
|
|
94
|
-
n as isDurableObjectCodeUpdateReset,
|
|
95
|
-
o as isPlatformTransientError,
|
|
96
|
-
r as isDurableObjectMemoryLimitReset,
|
|
97
|
-
t as RetryOptions
|
|
98
|
-
} from "./retries-CAvxtG9d.js";
|
|
99
96
|
import {
|
|
100
97
|
n as AgentsOAuthProvider,
|
|
101
98
|
r as DurableObjectOAuthClientProvider,
|
|
@@ -103,7 +100,16 @@ import {
|
|
|
103
100
|
} from "./do-oauth-client-provider-Tmf1vgKz.js";
|
|
104
101
|
import { f as TransportType } from "./handler-stateless-DxYpJ_XF.js";
|
|
105
102
|
import { t as MessageType } from "./types-6Zo2zfoO.js";
|
|
106
|
-
import {
|
|
103
|
+
import {
|
|
104
|
+
a as ScheduleCriteria,
|
|
105
|
+
i as Schedule,
|
|
106
|
+
o as ScheduleOptions
|
|
107
|
+
} from "./scheduler-Dwh85ZGl.js";
|
|
108
|
+
import {
|
|
109
|
+
n as callable,
|
|
110
|
+
s as unstable_callable,
|
|
111
|
+
t as CallableMetadata
|
|
112
|
+
} from "./callable-decorator-DP__HhBA.js";
|
|
107
113
|
import { t as SqlError } from "./sql-error-CPY-GXyI.js";
|
|
108
114
|
export {
|
|
109
115
|
AGENT_TOOL_MILESTONE_PART,
|
|
@@ -138,7 +144,7 @@ export {
|
|
|
138
144
|
type AgentToolTerminalStatus,
|
|
139
145
|
type AgentsOAuthProvider,
|
|
140
146
|
type BuildAgentPathOptions,
|
|
141
|
-
CallableMetadata,
|
|
147
|
+
type CallableMetadata,
|
|
142
148
|
type ChatCapableAgentClass,
|
|
143
149
|
type Connection,
|
|
144
150
|
type ConnectionContext,
|
|
@@ -147,6 +153,10 @@ export {
|
|
|
147
153
|
type DetachedAgentToolConfig,
|
|
148
154
|
type DetachedRunAgentToolResult,
|
|
149
155
|
DurableObjectOAuthClientProvider,
|
|
156
|
+
type DynamicAgentClass,
|
|
157
|
+
type DynamicAgentClass as SubAgentClass,
|
|
158
|
+
type DynamicAgentStub,
|
|
159
|
+
type DynamicAgentStub as SubAgentStub,
|
|
150
160
|
EmailRoutingOptions,
|
|
151
161
|
type EmailSendBinding,
|
|
152
162
|
FiberContext,
|
|
@@ -172,15 +182,14 @@ export {
|
|
|
172
182
|
SUB_PREFIX,
|
|
173
183
|
type Schedule,
|
|
174
184
|
type ScheduleCriteria,
|
|
185
|
+
type ScheduleOptions,
|
|
175
186
|
type SendEmailOptions,
|
|
176
187
|
SqlError,
|
|
177
188
|
StartFiberOptions,
|
|
178
189
|
StartFiberResult,
|
|
179
190
|
StateUpdateMessage,
|
|
180
191
|
StreamingResponse,
|
|
181
|
-
SubAgentClass,
|
|
182
192
|
type SubAgentPathMatch,
|
|
183
|
-
SubAgentStub,
|
|
184
193
|
type TransportType,
|
|
185
194
|
type WSMessage,
|
|
186
195
|
__DO_NOT_USE_WILL_BREAK__agentContext,
|
package/dist/index.js
CHANGED
|
@@ -2,13 +2,14 @@ import { camelCaseToKebabCase } from "./utils.js";
|
|
|
2
2
|
import { getAgentByName, routeAgentRequest } from "./agent-routing.js";
|
|
3
3
|
import { AGENT_TOOL_MILESTONE_PART, AGENT_TOOL_PROGRESS_PART } from "./agent-tool-types.js";
|
|
4
4
|
import { t as __DO_NOT_USE_WILL_BREAK__agentContext } from "./current-agent-DhoDkSnH.js";
|
|
5
|
+
import { callable, unstable_callable } from "./callable-decorator.js";
|
|
5
6
|
import { MessageType } from "./types.js";
|
|
6
7
|
import { createHeaderBasedEmailResolver } from "./email.js";
|
|
7
8
|
import { n as withInvocationScope } from "./cloudflare-Dzvc7V2N.js";
|
|
8
9
|
import { SUB_PREFIX, buildAgentPath, buildAgentUrl, getSubAgentByName, parseSubAgentPath, routeSubAgentRequest } from "./sub-routing.js";
|
|
9
|
-
import {
|
|
10
|
+
import { a as routeAgentEmail, i as getCurrentAgent, n as DEFAULT_AGENT_STATIC_OPTIONS, r as StreamingResponse, t as Agent } from "./src-DlSHshb2.js";
|
|
10
11
|
import { isDurableObjectCodeUpdateReset, isDurableObjectMemoryLimitReset, isDurableObjectStorageReset, isPlatformTransientError } from "./retries.js";
|
|
12
|
+
import { SqlError } from "./sql-error.js";
|
|
11
13
|
import { i as normalizeServerId, n as MCP_SERVER_ID_MAX_LENGTH } from "./client-jagG8a9_.js";
|
|
12
14
|
import { DurableObjectOAuthClientProvider } from "./mcp/client/do-oauth-client-provider.js";
|
|
13
|
-
import { a as getCurrentAgent, i as callable, n as DEFAULT_AGENT_STATIC_OPTIONS, o as routeAgentEmail, r as StreamingResponse, s as unstable_callable, t as Agent } from "./src-5W6JNKVb.js";
|
|
14
15
|
export { AGENT_TOOL_MILESTONE_PART, AGENT_TOOL_PROGRESS_PART, Agent, DEFAULT_AGENT_STATIC_OPTIONS, DurableObjectOAuthClientProvider, MCP_SERVER_ID_MAX_LENGTH, MessageType, SUB_PREFIX, SqlError, StreamingResponse, __DO_NOT_USE_WILL_BREAK__agentContext, withInvocationScope as __DO_NOT_USE_WILL_BREAK__withInvocationScope, buildAgentPath, buildAgentUrl, callable, camelCaseToKebabCase, createHeaderBasedEmailResolver, getAgentByName, getCurrentAgent, getSubAgentByName, isDurableObjectCodeUpdateReset, isDurableObjectMemoryLimitReset, isDurableObjectStorageReset, isPlatformTransientError, normalizeServerId, parseSubAgentPath, routeAgentEmail, routeAgentRequest, routeSubAgentRequest, unstable_callable };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { t as TextSegmentJoiner } from "./text-segment-joiner-BtAFQSA_.js";
|
|
2
|
+
//#region src/channels/stream.ts
|
|
3
|
+
/**
|
|
4
|
+
* Read a stream to completion, then finalize exactly once.
|
|
5
|
+
*
|
|
6
|
+
* `onFinish` runs whether the stream closed normally, errored because the
|
|
7
|
+
* generation failed, or stopped because `onChunk` threw. A Channel that
|
|
8
|
+
* finalizes here cannot lose a terminal provider call to an early ending.
|
|
9
|
+
*/
|
|
10
|
+
async function consumeChunks(chunks, consumer) {
|
|
11
|
+
const reader = chunks.getReader();
|
|
12
|
+
let outcome = { interrupted: false };
|
|
13
|
+
let cancellation;
|
|
14
|
+
try {
|
|
15
|
+
while (true) {
|
|
16
|
+
const { done, value } = await reader.read();
|
|
17
|
+
if (done) break;
|
|
18
|
+
await consumer.onChunk(value);
|
|
19
|
+
}
|
|
20
|
+
} catch (error) {
|
|
21
|
+
outcome = {
|
|
22
|
+
interrupted: true,
|
|
23
|
+
error
|
|
24
|
+
};
|
|
25
|
+
cancellation = reader.cancel().catch(() => {});
|
|
26
|
+
} finally {
|
|
27
|
+
reader.releaseLock();
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
return await consumer.onFinish(outcome);
|
|
31
|
+
} finally {
|
|
32
|
+
await cancellation;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Collect every `text` chunk into one Markdown answer.
|
|
37
|
+
*
|
|
38
|
+
* The result reports interruption instead of throwing, because a Channel that
|
|
39
|
+
* has partial text still has to decide what to deliver.
|
|
40
|
+
*/
|
|
41
|
+
function collectText(chunks) {
|
|
42
|
+
let text = "";
|
|
43
|
+
const joiner = new TextSegmentJoiner();
|
|
44
|
+
return consumeChunks(chunks, {
|
|
45
|
+
onChunk(chunk) {
|
|
46
|
+
for (const event of joiner.pushChunk(chunk.type === "text" ? {
|
|
47
|
+
type: "text-delta",
|
|
48
|
+
text: chunk.text
|
|
49
|
+
} : { type: chunk.type })) if (event.type === "text") text += event.text;
|
|
50
|
+
},
|
|
51
|
+
onFinish: (outcome) => ({
|
|
52
|
+
text,
|
|
53
|
+
interrupted: outcome.interrupted
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Pace repeated provider calls without dropping anything.
|
|
59
|
+
*
|
|
60
|
+
* A Channel accumulates into its own buffer and asks whether enough time has
|
|
61
|
+
* passed to flush. Keeping the buffer in the Channel means an interrupted
|
|
62
|
+
* stream leaves its tail in hand, ready for the terminal provider call, rather
|
|
63
|
+
* than stranded inside a transform.
|
|
64
|
+
*/
|
|
65
|
+
function createPacer(intervalMs) {
|
|
66
|
+
let lastFlushAt = Number.NEGATIVE_INFINITY;
|
|
67
|
+
return () => {
|
|
68
|
+
const now = Date.now();
|
|
69
|
+
if (now - lastFlushAt < intervalMs) return false;
|
|
70
|
+
lastFlushAt = now;
|
|
71
|
+
return true;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/channels/ingress.ts
|
|
76
|
+
/** Match an HTTP request to one exact URL pathname. */
|
|
77
|
+
function matchesPath(request, path) {
|
|
78
|
+
return new URL(request.url).pathname === path;
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
export { createPacer as i, collectText as n, consumeChunks as r, matchesPath as t };
|
|
82
|
+
|
|
83
|
+
//# sourceMappingURL=ingress-BfetZbMO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ingress-BfetZbMO.js","names":[],"sources":["../src/channels/stream.ts","../src/channels/ingress.ts"],"sourcesContent":["import { TextSegmentJoiner } from \"../chat/text-segment-joiner\";\nimport type { Awaitable, ChannelChunk } from \"./channel\";\n\n/** Why a consumption loop stopped reading. */\nexport type StreamOutcome =\n | { interrupted: false }\n | { interrupted: true; error: unknown };\n\nexport type ChunkConsumer<TChunk, TResult> = {\n onChunk(chunk: TChunk): Awaitable<void>;\n /** Runs exactly once, whether the stream closed or ended abnormally. */\n onFinish(outcome: StreamOutcome): Awaitable<TResult>;\n};\n\n/** The complete text of a stream, and whether it ended before its answer did. */\nexport type CollectedText = {\n text: string;\n interrupted: boolean;\n};\n\n/**\n * Read a stream to completion, then finalize exactly once.\n *\n * `onFinish` runs whether the stream closed normally, errored because the\n * generation failed, or stopped because `onChunk` threw. A Channel that\n * finalizes here cannot lose a terminal provider call to an early ending.\n */\nexport async function consumeChunks<TChunk, TResult>(\n chunks: ReadableStream<TChunk>,\n consumer: ChunkConsumer<TChunk, TResult>\n): Promise<TResult> {\n const reader = chunks.getReader();\n let outcome: StreamOutcome = { interrupted: false };\n let cancellation: Promise<void> | undefined;\n try {\n while (true) {\n const { done, value } = await reader.read();\n if (done) break;\n await consumer.onChunk(value);\n }\n } catch (error) {\n outcome = { interrupted: true, error };\n // Start cancellation before finalizing, but do not block the terminal\n // provider call on sibling tee branches. Await cleanup only afterward.\n cancellation = reader.cancel().catch(() => {});\n } finally {\n reader.releaseLock();\n }\n try {\n return await consumer.onFinish(outcome);\n } finally {\n await cancellation;\n }\n}\n\n/**\n * Collect every `text` chunk into one Markdown answer.\n *\n * The result reports interruption instead of throwing, because a Channel that\n * has partial text still has to decide what to deliver.\n */\nexport function collectText(\n chunks: ReadableStream<ChannelChunk>\n): Promise<CollectedText> {\n let text = \"\";\n const joiner = new TextSegmentJoiner();\n return consumeChunks(chunks, {\n onChunk(chunk) {\n for (const event of joiner.pushChunk(\n chunk.type === \"text\"\n ? { type: \"text-delta\", text: chunk.text }\n : { type: chunk.type }\n )) {\n if (event.type === \"text\") text += event.text;\n }\n },\n onFinish: (outcome) => ({ text, interrupted: outcome.interrupted })\n });\n}\n\n/**\n * Pace repeated provider calls without dropping anything.\n *\n * A Channel accumulates into its own buffer and asks whether enough time has\n * passed to flush. Keeping the buffer in the Channel means an interrupted\n * stream leaves its tail in hand, ready for the terminal provider call, rather\n * than stranded inside a transform.\n */\nexport function createPacer(intervalMs: number): () => boolean {\n let lastFlushAt = Number.NEGATIVE_INFINITY;\n return () => {\n const now = Date.now();\n if (now - lastFlushAt < intervalMs) return false;\n lastFlushAt = now;\n return true;\n };\n}\n","import type { ChannelIdentity, ChannelIdentityInput } from \"./identity\";\nimport type {\n ChannelMessageSurface,\n ChannelMessageSurfaceInput\n} from \"./surface\";\n\n/** Serializable provider attachment facts available after ingress returns. */\nexport type ChannelAttachment = {\n id?: string;\n mediaType?: string;\n name?: string;\n size?: number;\n text?: string;\n url?: string;\n};\n\nexport type ChannelActor = {\n readonly id: string;\n /** Stable Channel identity suitable for explicit application linking. */\n readonly identity?: ChannelIdentity;\n readonly username?: string;\n readonly fullName?: string;\n readonly isBot?: boolean | \"unknown\";\n readonly isSelf?: boolean;\n};\n\n/** An actor before the Host stamps its configured Channel key. */\nexport type ChannelActorInput = Omit<ChannelActor, \"identity\"> & {\n readonly identity?: ChannelIdentityInput;\n};\n\nexport type ChannelEventContext = {\n /** Immutable Channel-scoped identity, independent of application routing. */\n readonly eventId: string;\n readonly thread: {\n readonly id: string;\n readonly isDirectMessage: boolean | \"unknown\";\n };\n /** Exact provider destination for responding to this inbound event. */\n readonly replySurface?: ChannelMessageSurface;\n readonly actor?: ChannelActor;\n};\n\n/** A normalized inbound message from a Channel adapter. */\nexport type ChannelInboundMessage = ChannelEventContext & {\n readonly type: \"message\";\n readonly message: {\n readonly id: string;\n readonly text: string;\n readonly title?: string;\n readonly markdown?: string;\n readonly attachments?: readonly ChannelAttachment[];\n readonly isMention?: boolean;\n readonly reply?: {\n readonly id: string;\n readonly text?: string;\n };\n readonly metadata?: {\n /** ISO 8601 timestamp supplied by the provider. */\n readonly sentAt?: string;\n readonly edited?: boolean;\n /** ISO 8601 timestamp supplied by the provider. */\n readonly editedAt?: string;\n readonly autoReply?: boolean;\n };\n };\n};\n\n/** A provider-normalized response to an external approval request. */\nexport type ChannelApprovalResponse = ChannelEventContext & {\n readonly type: \"approval-response\";\n readonly interactionId: string;\n readonly decision: \"approve\" | \"reject\";\n /** Provider reference for this inbound response. */\n readonly reference: string;\n};\n\nexport type ChannelIngressEvent =\n | ChannelInboundMessage\n | ChannelApprovalResponse;\n\n/** A normalized message before the Host stamps its configured Channel key. */\nexport type ChannelEventContextInput = Omit<\n ChannelEventContext,\n \"replySurface\" | \"actor\"\n> & {\n readonly replySurface?: ChannelMessageSurfaceInput;\n readonly actor?: ChannelActorInput;\n};\n\nexport type ChannelInboundMessageInput = Omit<\n ChannelInboundMessage,\n \"replySurface\" | \"actor\"\n> & {\n readonly replySurface?: ChannelMessageSurfaceInput;\n readonly actor?: ChannelActorInput;\n};\n\n/** A normalized approval before the Host stamps its configured Channel key. */\nexport type ChannelApprovalResponseInput = Omit<\n ChannelApprovalResponse,\n \"replySurface\" | \"actor\"\n> & {\n readonly replySurface?: ChannelMessageSurfaceInput;\n readonly actor?: ChannelActorInput;\n};\n\n/** Authenticated event produced by a Channel before Host dispatch. */\nexport type ChannelIngressEventInput =\n | ChannelInboundMessageInput\n | ChannelApprovalResponseInput;\n\n/** Authenticated adapter output retained only until Host routing completes. */\nexport type ChannelIngressEnvelope<TRaw = unknown> = {\n event: ChannelIngressEventInput;\n raw: TRaw;\n};\n\n/** The normalized envelopes and provider acknowledgement produced by ingress. */\nexport type ChannelIngressResult<TRaw = unknown> = {\n events: readonly ChannelIngressEnvelope<TRaw>[];\n response: Response;\n};\n\n/** Match an HTTP request to one exact URL pathname. */\nexport function matchesPath(request: Request, path: string): boolean {\n return new URL(request.url).pathname === path;\n}\n\n/** Webhook-shaped inbound support owned by a Channel. */\nexport interface ChannelIngress<TRaw = unknown> {\n /** Return null when this Channel does not own the request. */\n receive(request: Request): Promise<ChannelIngressResult<TRaw> | null>;\n}\n\n/** Structural input supported by Workers Email and Agent email handlers. */\nexport type ChannelEmailInput = {\n from: string;\n to: string;\n headers: Headers;\n raw?: ReadableStream<Uint8Array>;\n getRaw?: () => Promise<Uint8Array>;\n};\n\nexport type ChannelEmailIngressResult<TRaw = unknown> = {\n events: readonly ChannelIngressEnvelope<TRaw>[];\n};\n\n/** Non-HTTP ingress for a Workers Email event. */\nexport interface ChannelEmailIngress<TRaw = unknown> {\n /** Return null when this Channel does not own the email. */\n receive(\n email: ChannelEmailInput\n ): Promise<ChannelEmailIngressResult<TRaw> | null>;\n}\n"],"mappings":";;;;;;;;;AA2BA,eAAsB,cACpB,QACA,UACkB;CAClB,MAAM,SAAS,OAAO,UAAU;CAChC,IAAI,UAAyB,EAAE,aAAa,MAAM;CAClD,IAAI;CACJ,IAAI;EACF,OAAO,MAAM;GACX,MAAM,EAAE,MAAM,UAAU,MAAM,OAAO,KAAK;GAC1C,IAAI,MAAM;GACV,MAAM,SAAS,QAAQ,KAAK;EAC9B;CACF,SAAS,OAAO;EACd,UAAU;GAAE,aAAa;GAAM;EAAM;EAGrC,eAAe,OAAO,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC;CAC/C,UAAU;EACR,OAAO,YAAY;CACrB;CACA,IAAI;EACF,OAAO,MAAM,SAAS,SAAS,OAAO;CACxC,UAAU;EACR,MAAM;CACR;AACF;;;;;;;AAQA,SAAgB,YACd,QACwB;CACxB,IAAI,OAAO;CACX,MAAM,SAAS,IAAI,kBAAkB;CACrC,OAAO,cAAc,QAAQ;EAC3B,QAAQ,OAAO;GACb,KAAK,MAAM,SAAS,OAAO,UACzB,MAAM,SAAS,SACX;IAAE,MAAM;IAAc,MAAM,MAAM;GAAK,IACvC,EAAE,MAAM,MAAM,KAAK,CACzB,GACE,IAAI,MAAM,SAAS,QAAQ,QAAQ,MAAM;EAE7C;EACA,WAAW,aAAa;GAAE;GAAM,aAAa,QAAQ;EAAY;CACnE,CAAC;AACH;;;;;;;;;AAUA,SAAgB,YAAY,YAAmC;CAC7D,IAAI,cAAc,OAAO;CACzB,aAAa;EACX,MAAM,MAAM,KAAK,IAAI;EACrB,IAAI,MAAM,cAAc,YAAY,OAAO;EAC3C,cAAc;EACd,OAAO;CACT;AACF;;;;AC6BA,SAAgB,YAAY,SAAkB,MAAuB;CACnE,OAAO,IAAI,IAAI,QAAQ,GAAG,CAAC,CAAC,aAAa;AAC3C"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { t as isChannelMessageSurface } from "./surface-bZZJqBka.js";
|
|
2
|
+
//#region src/channels/internal.ts
|
|
3
|
+
const textEncoder = new TextEncoder();
|
|
4
|
+
function encodeUtf8(value) {
|
|
5
|
+
return textEncoder.encode(value);
|
|
6
|
+
}
|
|
7
|
+
function utf8ByteLength(value) {
|
|
8
|
+
return encodeUtf8(value).byteLength;
|
|
9
|
+
}
|
|
10
|
+
function isRecord(value) {
|
|
11
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
12
|
+
}
|
|
13
|
+
function defaultText(message) {
|
|
14
|
+
return message.title ? `${message.title}\n\n${message.markdown}` : message.markdown;
|
|
15
|
+
}
|
|
16
|
+
function renderInput(input) {
|
|
17
|
+
if (typeof input === "string") return input;
|
|
18
|
+
try {
|
|
19
|
+
return JSON.stringify(input, null, 2) ?? String(input);
|
|
20
|
+
} catch {
|
|
21
|
+
return String(input);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function uncertain(code, message, reference) {
|
|
25
|
+
return {
|
|
26
|
+
status: "uncertain",
|
|
27
|
+
...reference !== void 0 && { reference },
|
|
28
|
+
error: {
|
|
29
|
+
code,
|
|
30
|
+
message
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function emptyIngressResponse(status = 200) {
|
|
35
|
+
return {
|
|
36
|
+
events: [],
|
|
37
|
+
response: new Response(null, { status })
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function compositeDestinations(surface) {
|
|
41
|
+
if (surface.address === null || typeof surface.address !== "object" || Array.isArray(surface.address)) return;
|
|
42
|
+
const destinations = surface.address.surfaces;
|
|
43
|
+
if (!Array.isArray(destinations) || destinations.length === 0 || !destinations.every(isChannelMessageSurface)) return;
|
|
44
|
+
return destinations;
|
|
45
|
+
}
|
|
46
|
+
function unsupported(code, message) {
|
|
47
|
+
return {
|
|
48
|
+
status: "failed",
|
|
49
|
+
retryable: false,
|
|
50
|
+
error: {
|
|
51
|
+
code,
|
|
52
|
+
message
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { isRecord as a, unsupported as c, encodeUtf8 as i, utf8ByteLength as l, defaultText as n, renderInput as o, emptyIngressResponse as r, uncertain as s, compositeDestinations as t };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=internal-CYlgHl1l.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-CYlgHl1l.js","names":[],"sources":["../src/channels/internal.ts"],"sourcesContent":["import type { ChannelMessage, DeliveryResult } from \"./channel\";\nimport type { ChannelIngressResult } from \"./ingress\";\nimport { isChannelMessageSurface, type ChannelMessageSurface } from \"./surface\";\n\nconst textEncoder = new TextEncoder();\n\nexport function encodeUtf8(value: string): Uint8Array<ArrayBuffer> {\n return textEncoder.encode(value);\n}\n\nexport function utf8ByteLength(value: string): number {\n return encodeUtf8(value).byteLength;\n}\n\nexport function isRecord(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n\nexport function defaultText(message: ChannelMessage): string {\n return message.title\n ? `${message.title}\\n\\n${message.markdown}`\n : message.markdown;\n}\n\nexport function renderInput(input: unknown): string {\n if (typeof input === \"string\") return input;\n try {\n return JSON.stringify(input, null, 2) ?? String(input);\n } catch {\n return String(input);\n }\n}\n\nexport function uncertain(\n code: string,\n message: string,\n reference?: string\n): Extract<DeliveryResult, { status: \"uncertain\" }> {\n return {\n status: \"uncertain\",\n ...(reference !== undefined && { reference }),\n error: { code, message }\n };\n}\n\nexport function emptyIngressResponse<TRaw>(\n status = 200\n): ChannelIngressResult<TRaw> {\n return { events: [], response: new Response(null, { status }) };\n}\n\nexport function compositeDestinations(\n surface: ChannelMessageSurface\n): readonly ChannelMessageSurface[] | undefined {\n if (\n surface.address === null ||\n typeof surface.address !== \"object\" ||\n Array.isArray(surface.address)\n ) {\n return undefined;\n }\n const destinations = (surface.address as Record<string, unknown>).surfaces;\n if (\n !Array.isArray(destinations) ||\n destinations.length === 0 ||\n !destinations.every(isChannelMessageSurface)\n ) {\n return undefined;\n }\n return destinations;\n}\n\nexport function unsupported(\n code: string,\n message: string\n): Extract<DeliveryResult, { status: \"failed\" }> {\n return {\n status: \"failed\",\n retryable: false,\n error: { code, message }\n };\n}\n"],"mappings":";;AAIA,MAAM,cAAc,IAAI,YAAY;AAEpC,SAAgB,WAAW,OAAwC;CACjE,OAAO,YAAY,OAAO,KAAK;AACjC;AAEA,SAAgB,eAAe,OAAuB;CACpD,OAAO,WAAW,KAAK,CAAC,CAAC;AAC3B;AAEA,SAAgB,SAAS,OAAkD;CACzE,OAAO,UAAU,QAAQ,OAAO,UAAU,YAAY,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAgB,YAAY,SAAiC;CAC3D,OAAO,QAAQ,QACX,GAAG,QAAQ,MAAM,MAAM,QAAQ,aAC/B,QAAQ;AACd;AAEA,SAAgB,YAAY,OAAwB;CAClD,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,IAAI;EACF,OAAO,KAAK,UAAU,OAAO,MAAM,CAAC,KAAK,OAAO,KAAK;CACvD,QAAQ;EACN,OAAO,OAAO,KAAK;CACrB;AACF;AAEA,SAAgB,UACd,MACA,SACA,WACkD;CAClD,OAAO;EACL,QAAQ;EACR,GAAI,cAAc,KAAA,KAAa,EAAE,UAAU;EAC3C,OAAO;GAAE;GAAM;EAAQ;CACzB;AACF;AAEA,SAAgB,qBACd,SAAS,KACmB;CAC5B,OAAO;EAAE,QAAQ,CAAC;EAAG,UAAU,IAAI,SAAS,MAAM,EAAE,OAAO,CAAC;CAAE;AAChE;AAEA,SAAgB,sBACd,SAC8C;CAC9C,IACE,QAAQ,YAAY,QACpB,OAAO,QAAQ,YAAY,YAC3B,MAAM,QAAQ,QAAQ,OAAO,GAE7B;CAEF,MAAM,eAAgB,QAAQ,QAAoC;CAClE,IACE,CAAC,MAAM,QAAQ,YAAY,KAC3B,aAAa,WAAW,KACxB,CAAC,aAAa,MAAM,uBAAuB,GAE3C;CAEF,OAAO;AACT;AAEA,SAAgB,YACd,MACA,SAC+C;CAC/C,OAAO;EACL,QAAQ;EACR,WAAW;EACX,OAAO;GAAE;GAAM;EAAQ;CACzB;AACF"}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
i as __DO_NOT_USE_WILL_BREAK__agentContext,
|
|
3
3
|
n as CurrentAgentContext,
|
|
4
4
|
t as AgentContextStore
|
|
5
|
-
} from "./current-agent-
|
|
5
|
+
} from "./current-agent-Da_C9a3b.js";
|
|
6
6
|
import { t as AgentEmail } from "./internal_context-BlxFEWfn.js";
|
|
7
7
|
export {
|
|
8
8
|
type AgentContextStore,
|
|
@@ -1,32 +1,41 @@
|
|
|
1
1
|
import {
|
|
2
|
+
C as ConnectionState,
|
|
3
|
+
S as ConnectionSetStateFn,
|
|
4
|
+
_ as LifecycleJobOutcome,
|
|
2
5
|
a as LifecycleEvent,
|
|
6
|
+
b as Connection,
|
|
3
7
|
c as LifecycleEvents,
|
|
4
|
-
d as
|
|
5
|
-
f as
|
|
8
|
+
d as LifecycleRouteContext,
|
|
9
|
+
f as LifecycleRoutes,
|
|
10
|
+
g as LifecycleJobContext,
|
|
11
|
+
h as LifecycleJob,
|
|
6
12
|
i as DurableObjectCapability,
|
|
7
|
-
l as
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
13
|
+
l as LifecycleHostContextScope,
|
|
14
|
+
m as LifecycleSockets,
|
|
15
|
+
n as CapabilityStartContext,
|
|
16
|
+
o as MemoryLimitContext,
|
|
17
|
+
p as LifecycleServices,
|
|
18
|
+
r as CapabilityWebSocketUpgradeContext,
|
|
11
19
|
s as LifecycleCapability,
|
|
12
|
-
t as
|
|
13
|
-
u as
|
|
14
|
-
|
|
20
|
+
t as CapabilityRequestContext,
|
|
21
|
+
u as LifecycleRouteAddress,
|
|
22
|
+
v as LifecycleJobPushOptions,
|
|
23
|
+
w as WSMessage,
|
|
24
|
+
x as ConnectionContext,
|
|
25
|
+
y as LifecycleJobs
|
|
26
|
+
} from "../capability-runner-Be_-PLR1.js";
|
|
15
27
|
import {
|
|
16
28
|
a as getCurrentAgent,
|
|
17
|
-
|
|
18
|
-
d as ConnectionSetStateFn,
|
|
19
|
-
f as ConnectionState,
|
|
20
|
-
l as Connection,
|
|
29
|
+
l as LifecycleUseOptions,
|
|
21
30
|
n as CurrentAgentContext,
|
|
22
31
|
o as Lifecycle,
|
|
23
32
|
r as LifecycleObject,
|
|
24
|
-
|
|
25
|
-
} from "../current-agent-
|
|
33
|
+
s as LifecycleOptions
|
|
34
|
+
} from "../current-agent-Da_C9a3b.js";
|
|
26
35
|
export {
|
|
27
|
-
type AlarmContribution,
|
|
28
36
|
type CapabilityRequestContext,
|
|
29
37
|
type CapabilityStartContext,
|
|
38
|
+
type CapabilityWebSocketUpgradeContext,
|
|
30
39
|
type Connection,
|
|
31
40
|
type ConnectionContext,
|
|
32
41
|
type ConnectionSetStateFn,
|
|
@@ -34,15 +43,24 @@ export {
|
|
|
34
43
|
type CurrentAgentContext,
|
|
35
44
|
type DurableObjectCapability,
|
|
36
45
|
Lifecycle,
|
|
37
|
-
type LifecycleAlarms,
|
|
38
46
|
LifecycleCapability,
|
|
39
47
|
type LifecycleEvent,
|
|
40
48
|
type LifecycleEvents,
|
|
49
|
+
type LifecycleHostContextScope,
|
|
50
|
+
type LifecycleJob,
|
|
51
|
+
type LifecycleJobContext,
|
|
52
|
+
type LifecycleJobOutcome,
|
|
53
|
+
type LifecycleJobPushOptions,
|
|
54
|
+
type LifecycleJobs,
|
|
41
55
|
type LifecycleObject,
|
|
56
|
+
type LifecycleOptions,
|
|
42
57
|
type LifecycleRouteAddress,
|
|
43
58
|
type LifecycleRouteContext,
|
|
44
59
|
type LifecycleRoutes,
|
|
45
60
|
type LifecycleServices,
|
|
61
|
+
type LifecycleSockets,
|
|
62
|
+
type LifecycleUseOptions,
|
|
63
|
+
type MemoryLimitContext,
|
|
46
64
|
type WSMessage,
|
|
47
65
|
getCurrentAgent
|
|
48
66
|
};
|
package/dist/lifecycle/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as getCurrentAgent } from "../current-agent-DhoDkSnH.js";
|
|
2
2
|
import { t as LifecycleCapability } from "../capability-BjSKYpzg.js";
|
|
3
|
-
import { t as Lifecycle } from "../
|
|
3
|
+
import { t as Lifecycle } from "../lifecycle-CMRGjZdw.js";
|
|
4
4
|
export { Lifecycle, LifecycleCapability, getCurrentAgent };
|