agents 0.21.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 +21 -1
- package/dist/{agent-tool-types-CzGGB-20.d.ts → agent-routing-DE5zmCQ8.d.ts} +1844 -1336
- package/dist/agent-routing.d.ts +14 -0
- package/dist/agent-routing.js +187 -0
- package/dist/agent-routing.js.map +1 -0
- package/dist/agent-tool-types.d.ts +26 -26
- package/dist/{agent-tools-zR2d5uij.d.ts → agent-tools-DtXMTDGM.d.ts} +7 -7
- package/dist/agent-tools.d.ts +21 -21
- package/dist/agent-tools.js +2 -1
- package/dist/agent-tools.js.map +1 -1
- package/dist/browser/ai.js +6 -2
- 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 +42 -0
- package/dist/capability-BjSKYpzg.js.map +1 -0
- 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 +2328 -2015
- package/dist/chat/index.js +891 -521
- package/dist/chat/index.js.map +1 -1
- package/dist/chat/react.d.ts +14 -1
- package/dist/chat/react.js +82 -52
- package/dist/chat/react.js.map +1 -1
- package/dist/chat/transport.js +1 -1
- package/dist/chat-sdk/index.d.ts +7 -7
- package/dist/chat-sdk/index.js +1 -1
- package/dist/{client-zqKcsyFa.js → client-jagG8a9_.js} +129 -37
- package/dist/client-jagG8a9_.js.map +1 -0
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/{cloudflare-BduZwmYK.js → cloudflare-Dzvc7V2N.js} +10 -3
- package/dist/{cloudflare-BduZwmYK.js.map → cloudflare-Dzvc7V2N.js.map} +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-Da_C9a3b.d.ts +266 -0
- package/dist/current-agent-DhoDkSnH.js +51 -0
- package/dist/current-agent-DhoDkSnH.js.map +1 -0
- package/dist/diagnostics-BzvaX2UT.js +45 -0
- 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/{do-oauth-client-provider-VTZj2VtM.d.ts → do-oauth-client-provider-Tmf1vgKz.d.ts} +2 -2
- package/dist/{email-CL27preh.d.ts → email-7TatiTnl.d.ts} +38 -9
- package/dist/email-send.d.ts +15 -0
- package/dist/email-send.js +32 -0
- package/dist/email-send.js.map +1 -0
- package/dist/email.d.ts +14 -10
- package/dist/email.js.map +1 -1
- package/dist/{handler-stateless-C_bo-Ytq.d.ts → handler-stateless-DxYpJ_XF.d.ts} +3 -3
- package/dist/{handler-stateless-CIkKPETH.js → handler-stateless-VvrWSAVA.js} +5 -5
- package/dist/handler-stateless-VvrWSAVA.js.map +1 -0
- package/dist/index-BB0kqhIz.d.ts +101 -0
- package/dist/index-XDkuQ7zm.d.ts +89 -0
- package/dist/{index-BRnybD6X.d.ts → index-YSKgfgg9.d.ts} +21 -31
- package/dist/index.d.ts +113 -101
- package/dist/index.js +11 -7234
- 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-BlxFEWfn.d.ts +19 -0
- package/dist/internal_context.d.ts +10 -4
- package/dist/internal_context.js +1 -10
- package/dist/{client-invoker-BNSZxAkv.d.ts → invoker-CG0_p_Wq.d.ts} +2 -2
- package/dist/{client-invoker-VNZ7X0nn.js → invoker-CHMnoxIA.js} +2 -2
- package/dist/invoker-CHMnoxIA.js.map +1 -0
- package/dist/lifecycle/index.d.ts +66 -0
- package/dist/lifecycle/index.js +4 -0
- package/dist/lifecycle-CMRGjZdw.js +1299 -0
- package/dist/lifecycle-CMRGjZdw.js.map +1 -0
- package/dist/mcp/{do-oauth-client-provider.d.ts → client/do-oauth-client-provider.d.ts} +1 -1
- package/dist/mcp/{do-oauth-client-provider.js → client/do-oauth-client-provider.js} +1 -1
- package/dist/mcp/client/do-oauth-client-provider.js.map +1 -0
- package/dist/mcp/client/index.d.ts +42 -0
- package/dist/mcp/{client.js → client/index.js} +1 -1
- package/dist/mcp/{x402.d.ts → client/x402.d.ts} +2 -2
- package/dist/mcp/{x402.js → client/x402.js} +2 -2
- package/dist/mcp/client/x402.js.map +1 -0
- package/dist/mcp/index.d.ts +36 -36
- package/dist/mcp/index.js +14 -16
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/{server.d.ts → server/index.d.ts} +1 -1
- package/dist/mcp/{server.js → server/index.js} +1 -1
- package/dist/observability/ai/index.js +50 -35
- package/dist/observability/ai/index.js.map +1 -1
- package/dist/observability/index.d.ts +4 -4
- package/dist/observability/index.js +3 -50
- package/dist/observability/index.js.map +1 -1
- package/dist/{protocol-Dqc2MQxo.js → protocol-B0nh6KNf.js} +19 -21
- package/dist/protocol-B0nh6KNf.js.map +1 -0
- package/dist/react.d.ts +4 -4
- package/dist/react.js +1 -1
- 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/schedule.d.ts +25 -94
- package/dist/schedule.js +1 -98
- package/dist/schedule.js.map +1 -1
- package/dist/scheduler-DD9NdYbF.js +665 -0
- package/dist/scheduler-DD9NdYbF.js.map +1 -0
- package/dist/scheduler-Dwh85ZGl.d.ts +223 -0
- package/dist/schedules/index.d.ts +22 -0
- package/dist/schedules/index.js +2 -0
- package/dist/schedules/parser.d.ts +79 -0
- package/dist/schedules/parser.js +103 -0
- package/dist/schedules/parser.js.map +1 -0
- 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/sql-error-CPY-GXyI.d.ts +12 -0
- package/dist/sql-error.d.ts +2 -0
- package/dist/sql-error.js +16 -0
- package/dist/sql-error.js.map +1 -0
- package/dist/src-DlSHshb2.js +6963 -0
- 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 +22 -22
- package/dist/workflows.js +2 -1
- package/dist/workflows.js.map +1 -1
- package/dist/{ws-chat-transport-CIoOBbO7.js → ws-chat-transport-rWwta645.js} +152 -15
- package/dist/ws-chat-transport-rWwta645.js.map +1 -0
- package/docs/agent-class.md +29 -87
- package/docs/agent-tools.md +2 -1
- package/docs/channels.md +323 -0
- package/docs/chat-agents.md +19 -25
- package/docs/context.md +131 -0
- package/docs/durable-execution.md +1 -1
- package/docs/http-websockets.md +1 -11
- package/docs/human-in-the-loop.md +1 -1
- package/docs/index.md +16 -12
- package/docs/lifecycle.md +370 -0
- package/docs/long-running-agents.md +4 -6
- package/docs/mcp-client.md +55 -0
- package/docs/mcp-servers.md +5 -1
- package/docs/observability.md +11 -11
- package/docs/resumable-streaming.md +2 -2
- package/docs/routing.md +105 -0
- package/docs/scheduling.md +175 -15
- package/docs/server-driven-messages.md +1 -1
- package/docs/sessions.md +237 -871
- package/docs/streams.md +213 -0
- package/docs/sub-agents.md +185 -125
- package/docs/tasks.md +246 -0
- package/docs/voice.md +745 -0
- package/package.json +144 -33
- package/dist/cli/index.js +0 -26
- package/dist/cli/index.js.map +0 -1
- package/dist/client-invoker-VNZ7X0nn.js.map +0 -1
- package/dist/client-zqKcsyFa.js.map +0 -1
- 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/experimental/memory/session/index.d.ts +0 -670
- package/dist/experimental/memory/session/index.js +0 -2374
- 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/handler-stateless-CIkKPETH.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal_context-Dg4Cgjcu.d.ts +0 -37
- package/dist/internal_context.js.map +0 -1
- package/dist/mcp/client.d.ts +0 -42
- package/dist/mcp/do-oauth-client-provider.js.map +0 -1
- package/dist/mcp/x402.js.map +0 -1
- package/dist/protocol-Dqc2MQxo.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/ws-chat-transport-CIoOBbO7.js.map +0 -1
- /package/dist/{cli/index.d.ts → index-BVVgDSdq.d.ts} +0 -0
|
@@ -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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
//#region src/internal_context.d.ts
|
|
2
|
+
type AgentEmail = {
|
|
3
|
+
from: string;
|
|
4
|
+
to: string;
|
|
5
|
+
getRaw: () => Promise<Uint8Array>;
|
|
6
|
+
headers: Headers;
|
|
7
|
+
rawSize: number;
|
|
8
|
+
setReject: (reason: string) => void;
|
|
9
|
+
forward: (rcptTo: string, headers?: Headers) => Promise<EmailSendResult>;
|
|
10
|
+
reply: (options: {
|
|
11
|
+
from: string;
|
|
12
|
+
to: string;
|
|
13
|
+
raw: string;
|
|
14
|
+
}) => Promise<EmailSendResult> /** @internal Indicates email was routed via createSecureReplyEmailResolver */;
|
|
15
|
+
_secureRouted?: boolean;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
18
|
+
export { AgentEmail as t };
|
|
19
|
+
//# sourceMappingURL=internal_context-BlxFEWfn.d.ts.map
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
i as __DO_NOT_USE_WILL_BREAK__agentContext,
|
|
3
|
+
n as CurrentAgentContext,
|
|
4
4
|
t as AgentContextStore
|
|
5
|
-
} from "./
|
|
6
|
-
|
|
5
|
+
} from "./current-agent-Da_C9a3b.js";
|
|
6
|
+
import { t as AgentEmail } from "./internal_context-BlxFEWfn.js";
|
|
7
|
+
export {
|
|
8
|
+
type AgentContextStore,
|
|
9
|
+
AgentEmail,
|
|
10
|
+
type CurrentAgentContext,
|
|
11
|
+
__DO_NOT_USE_WILL_BREAK__agentContext
|
|
12
|
+
};
|
package/dist/internal_context.js
CHANGED
|
@@ -1,11 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/internal_context.ts
|
|
3
|
-
/**
|
|
4
|
-
* @internal — This is an internal implementation detail.
|
|
5
|
-
* Importing or relying on this symbol **will** break your code in a future release.
|
|
6
|
-
*/
|
|
7
|
-
const __DO_NOT_USE_WILL_BREAK__agentContext = new AsyncLocalStorage();
|
|
8
|
-
//#endregion
|
|
1
|
+
import { t as __DO_NOT_USE_WILL_BREAK__agentContext } from "./current-agent-DhoDkSnH.js";
|
|
9
2
|
export { __DO_NOT_USE_WILL_BREAK__agentContext };
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=internal_context.js.map
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
11
11
|
import { Client as Client$1 } from "@modelcontextprotocol/sdk/client/index.js";
|
|
12
12
|
|
|
13
|
-
//#region src/mcp/client
|
|
13
|
+
//#region src/mcp/client/invoker.d.ts
|
|
14
14
|
type LegacyCallToolResultSchema =
|
|
15
15
|
| typeof CallToolResultSchema
|
|
16
16
|
| typeof CompatibilityCallToolResultSchema;
|
|
17
17
|
type CompatibleMcpClient = Client | Client$1;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { LegacyCallToolResultSchema as n, CompatibleMcpClient as t };
|
|
20
|
-
//# sourceMappingURL=
|
|
20
|
+
//# sourceMappingURL=invoker-CG0_p_Wq.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/mcp/client
|
|
1
|
+
//#region src/mcp/client/invoker.ts
|
|
2
2
|
function isLegacyResultSchema(value) {
|
|
3
3
|
return typeof value?.parse === "function";
|
|
4
4
|
}
|
|
@@ -54,4 +54,4 @@ function bindMcpClient(client) {
|
|
|
54
54
|
//#endregion
|
|
55
55
|
export { callV2Tool as n, bindMcpClient as t };
|
|
56
56
|
|
|
57
|
-
//# sourceMappingURL=
|
|
57
|
+
//# sourceMappingURL=invoker-CHMnoxIA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoker-CHMnoxIA.js","names":[],"sources":["../src/mcp/client/invoker.ts"],"sourcesContent":["import type {\n CallToolRequest,\n CallToolRequestOptions,\n CallToolResult,\n Client,\n ListToolsResult\n} from \"@modelcontextprotocol/client\";\nimport type { Client as LegacyClient } from \"@modelcontextprotocol/sdk/client/index.js\";\nimport type {\n CallToolResult as LegacyCallToolResult,\n CallToolResultSchema,\n CompatibilityCallToolResultSchema,\n ListToolsRequest\n} from \"@modelcontextprotocol/sdk/types.js\";\nimport type { RequestOptions as LegacyRequestOptions } from \"@modelcontextprotocol/sdk/shared/protocol.js\";\n\nexport type LegacyCallToolResultSchema =\n | typeof CallToolResultSchema\n | typeof CompatibilityCallToolResultSchema;\n\nexport type CallToolSchemaOrOptions =\n | LegacyCallToolResultSchema\n | CallToolRequestOptions;\n\nexport type CompatibleMcpClient = Client | LegacyClient;\n\nexport interface BoundMcpClientInvoker {\n listTools(\n params?: ListToolsRequest[\"params\"],\n options?: CallToolRequestOptions\n ): Promise<ListToolsResult>;\n callTool(\n params: CallToolRequest[\"params\"],\n schemaOrOptions?: CallToolSchemaOrOptions,\n options?: CallToolRequestOptions\n ): Promise<LegacyCallToolResult>;\n}\n\nfunction isLegacyResultSchema(\n value: CallToolSchemaOrOptions | undefined\n): value is LegacyCallToolResultSchema {\n return (\n typeof (value as { parse?: unknown } | undefined)?.parse === \"function\"\n );\n}\n\nfunction normalizeCallToolArguments(\n schemaOrOptions?: CallToolSchemaOrOptions,\n options?: CallToolRequestOptions\n): {\n schema?: LegacyCallToolResultSchema;\n options?: CallToolRequestOptions;\n} {\n return isLegacyResultSchema(schemaOrOptions)\n ? { schema: schemaOrOptions, options }\n : { options: schemaOrOptions ?? options };\n}\n\n/**\n * Invoke SDK v2 while preserving the deprecated v1 result-schema overload.\n * The v2 request funnel still owns decoding and automatic MRTR.\n */\nexport function callV2Tool(\n client: Client,\n params: CallToolRequest[\"params\"],\n schemaOrOptions?: CallToolSchemaOrOptions,\n options?: CallToolRequestOptions\n): Promise<CallToolResult> {\n const normalized = normalizeCallToolArguments(schemaOrOptions, options);\n if (normalized.schema) {\n return client.request(\n { method: \"tools/call\", params },\n normalized.schema as never,\n normalized.options\n ) as Promise<CallToolResult>;\n }\n return client.callTool(params, normalized.options);\n}\n\n/**\n * Bind the original methods before decorators such as x402 replace them. All\n * generation-specific calling conventions stay behind this small interface.\n */\nexport function bindMcpClient(\n client: CompatibleMcpClient\n): BoundMcpClientInvoker {\n const isV2 =\n \"getProtocolEra\" in client &&\n typeof (client as { getProtocolEra?: unknown }).getProtocolEra ===\n \"function\";\n\n if (isV2) {\n const v2Client = client as Client;\n const listTools = v2Client.listTools.bind(v2Client);\n const callTool = v2Client.callTool.bind(v2Client);\n return {\n listTools: (params, options) => listTools(params, options),\n callTool: (params, schemaOrOptions, options) => {\n const normalized = normalizeCallToolArguments(schemaOrOptions, options);\n const pending = normalized.schema\n ? v2Client.request(\n { method: \"tools/call\", params },\n normalized.schema as never,\n normalized.options\n )\n : callTool(params, normalized.options);\n return pending as Promise<LegacyCallToolResult>;\n }\n };\n }\n\n const legacy = client as LegacyClient;\n const listTools = legacy.listTools.bind(legacy);\n const callTool = legacy.callTool.bind(legacy);\n return {\n listTools: (params, options) =>\n listTools(\n params,\n options as LegacyRequestOptions\n ) as Promise<ListToolsResult>,\n callTool: (params, schemaOrOptions, options) => {\n const normalized = normalizeCallToolArguments(schemaOrOptions, options);\n return callTool(\n params as Parameters<LegacyClient[\"callTool\"]>[0],\n normalized.schema,\n normalized.options as LegacyRequestOptions\n ) as Promise<LegacyCallToolResult>;\n }\n };\n}\n"],"mappings":";AAsCA,SAAS,qBACP,OACqC;CACrC,OACE,OAAQ,OAA2C,UAAU;AAEjE;AAEA,SAAS,2BACP,iBACA,SAIA;CACA,OAAO,qBAAqB,eAAe,IACvC;EAAE,QAAQ;EAAiB;CAAQ,IACnC,EAAE,SAAS,mBAAmB,QAAQ;AAC5C;;;;;AAMA,SAAgB,WACd,QACA,QACA,iBACA,SACyB;CACzB,MAAM,aAAa,2BAA2B,iBAAiB,OAAO;CACtE,IAAI,WAAW,QACb,OAAO,OAAO,QACZ;EAAE,QAAQ;EAAc;CAAO,GAC/B,WAAW,QACX,WAAW,OACb;CAEF,OAAO,OAAO,SAAS,QAAQ,WAAW,OAAO;AACnD;;;;;AAMA,SAAgB,cACd,QACuB;CAMvB,IAJE,oBAAoB,UACpB,OAAQ,OAAwC,mBAC9C,YAEM;EACR,MAAM,WAAW;EACjB,MAAM,YAAY,SAAS,UAAU,KAAK,QAAQ;EAClD,MAAM,WAAW,SAAS,SAAS,KAAK,QAAQ;EAChD,OAAO;GACL,YAAY,QAAQ,YAAY,UAAU,QAAQ,OAAO;GACzD,WAAW,QAAQ,iBAAiB,YAAY;IAC9C,MAAM,aAAa,2BAA2B,iBAAiB,OAAO;IAQtE,OAPgB,WAAW,SACvB,SAAS,QACP;KAAE,QAAQ;KAAc;IAAO,GAC/B,WAAW,QACX,WAAW,OACb,IACA,SAAS,QAAQ,WAAW,OAAO;GAEzC;EACF;CACF;CAEA,MAAM,SAAS;CACf,MAAM,YAAY,OAAO,UAAU,KAAK,MAAM;CAC9C,MAAM,WAAW,OAAO,SAAS,KAAK,MAAM;CAC5C,OAAO;EACL,YAAY,QAAQ,YAClB,UACE,QACA,OACF;EACF,WAAW,QAAQ,iBAAiB,YAAY;GAC9C,MAAM,aAAa,2BAA2B,iBAAiB,OAAO;GACtE,OAAO,SACL,QACA,WAAW,QACX,WAAW,OACb;EACF;CACF;AACF"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import {
|
|
2
|
+
C as ConnectionState,
|
|
3
|
+
S as ConnectionSetStateFn,
|
|
4
|
+
_ as LifecycleJobOutcome,
|
|
5
|
+
a as LifecycleEvent,
|
|
6
|
+
b as Connection,
|
|
7
|
+
c as LifecycleEvents,
|
|
8
|
+
d as LifecycleRouteContext,
|
|
9
|
+
f as LifecycleRoutes,
|
|
10
|
+
g as LifecycleJobContext,
|
|
11
|
+
h as LifecycleJob,
|
|
12
|
+
i as DurableObjectCapability,
|
|
13
|
+
l as LifecycleHostContextScope,
|
|
14
|
+
m as LifecycleSockets,
|
|
15
|
+
n as CapabilityStartContext,
|
|
16
|
+
o as MemoryLimitContext,
|
|
17
|
+
p as LifecycleServices,
|
|
18
|
+
r as CapabilityWebSocketUpgradeContext,
|
|
19
|
+
s as LifecycleCapability,
|
|
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";
|
|
27
|
+
import {
|
|
28
|
+
a as getCurrentAgent,
|
|
29
|
+
l as LifecycleUseOptions,
|
|
30
|
+
n as CurrentAgentContext,
|
|
31
|
+
o as Lifecycle,
|
|
32
|
+
r as LifecycleObject,
|
|
33
|
+
s as LifecycleOptions
|
|
34
|
+
} from "../current-agent-Da_C9a3b.js";
|
|
35
|
+
export {
|
|
36
|
+
type CapabilityRequestContext,
|
|
37
|
+
type CapabilityStartContext,
|
|
38
|
+
type CapabilityWebSocketUpgradeContext,
|
|
39
|
+
type Connection,
|
|
40
|
+
type ConnectionContext,
|
|
41
|
+
type ConnectionSetStateFn,
|
|
42
|
+
type ConnectionState,
|
|
43
|
+
type CurrentAgentContext,
|
|
44
|
+
type DurableObjectCapability,
|
|
45
|
+
Lifecycle,
|
|
46
|
+
LifecycleCapability,
|
|
47
|
+
type LifecycleEvent,
|
|
48
|
+
type LifecycleEvents,
|
|
49
|
+
type LifecycleHostContextScope,
|
|
50
|
+
type LifecycleJob,
|
|
51
|
+
type LifecycleJobContext,
|
|
52
|
+
type LifecycleJobOutcome,
|
|
53
|
+
type LifecycleJobPushOptions,
|
|
54
|
+
type LifecycleJobs,
|
|
55
|
+
type LifecycleObject,
|
|
56
|
+
type LifecycleOptions,
|
|
57
|
+
type LifecycleRouteAddress,
|
|
58
|
+
type LifecycleRouteContext,
|
|
59
|
+
type LifecycleRoutes,
|
|
60
|
+
type LifecycleServices,
|
|
61
|
+
type LifecycleSockets,
|
|
62
|
+
type LifecycleUseOptions,
|
|
63
|
+
type MemoryLimitContext,
|
|
64
|
+
type WSMessage,
|
|
65
|
+
getCurrentAgent
|
|
66
|
+
};
|