agentfootprint 7.24.0 → 7.26.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/AGENTS.md +1 -1
- package/CLAUDE.md +5 -3
- package/ai-instructions/claude-code/SKILL.md +1 -1
- package/dist/adapters/hosting/agentcore.js +112 -1
- package/dist/adapters/hosting/agentcore.js.map +1 -1
- package/dist/adapters/llm/AnthropicProvider.js +10 -0
- package/dist/adapters/llm/AnthropicProvider.js.map +1 -1
- package/dist/adapters/llm/BedrockProvider.js +13 -1
- package/dist/adapters/llm/BedrockProvider.js.map +1 -1
- package/dist/adapters/llm/BrowserAnthropicProvider.js +6 -0
- package/dist/adapters/llm/BrowserAnthropicProvider.js.map +1 -1
- package/dist/adapters/llm/BrowserOpenAIProvider.js +18 -0
- package/dist/adapters/llm/BrowserOpenAIProvider.js.map +1 -1
- package/dist/adapters/llm/MockProvider.js +9 -0
- package/dist/adapters/llm/MockProvider.js.map +1 -1
- package/dist/adapters/llm/OpenAIProvider.js +21 -0
- package/dist/adapters/llm/OpenAIProvider.js.map +1 -1
- package/dist/conventions.js +12 -0
- package/dist/conventions.js.map +1 -1
- package/dist/core/Agent.js +56 -2
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/agent/AgentBuilder.js +98 -1
- package/dist/core/agent/AgentBuilder.js.map +1 -1
- package/dist/core/agent/buildAgentChart.js +12 -2
- package/dist/core/agent/buildAgentChart.js.map +1 -1
- package/dist/core/agent/buildDynamicAgentChart.js +12 -3
- package/dist/core/agent/buildDynamicAgentChart.js.map +1 -1
- package/dist/core/agent/outputEnforcement.js +192 -0
- package/dist/core/agent/outputEnforcement.js.map +1 -0
- package/dist/core/agent/stages/callLLM.js +31 -1
- package/dist/core/agent/stages/callLLM.js.map +1 -1
- package/dist/core/agent/stages/outputRetry.js +102 -0
- package/dist/core/agent/stages/outputRetry.js.map +1 -0
- package/dist/core/agent/stages/route.js +111 -6
- package/dist/core/agent/stages/route.js.map +1 -1
- package/dist/core/outputSchema.js.map +1 -1
- package/dist/esm/adapters/hosting/agentcore.d.ts +50 -1
- package/dist/esm/adapters/hosting/agentcore.js +110 -0
- package/dist/esm/adapters/hosting/agentcore.js.map +1 -1
- package/dist/esm/adapters/llm/AnthropicProvider.d.ts +10 -0
- package/dist/esm/adapters/llm/AnthropicProvider.js +10 -0
- package/dist/esm/adapters/llm/AnthropicProvider.js.map +1 -1
- package/dist/esm/adapters/llm/BedrockProvider.d.ts +9 -0
- package/dist/esm/adapters/llm/BedrockProvider.js +13 -1
- package/dist/esm/adapters/llm/BedrockProvider.js.map +1 -1
- package/dist/esm/adapters/llm/BrowserAnthropicProvider.d.ts +1 -0
- package/dist/esm/adapters/llm/BrowserAnthropicProvider.js +6 -0
- package/dist/esm/adapters/llm/BrowserAnthropicProvider.js.map +1 -1
- package/dist/esm/adapters/llm/BrowserOpenAIProvider.d.ts +4 -0
- package/dist/esm/adapters/llm/BrowserOpenAIProvider.js +18 -0
- package/dist/esm/adapters/llm/BrowserOpenAIProvider.js.map +1 -1
- package/dist/esm/adapters/llm/MockProvider.d.ts +9 -0
- package/dist/esm/adapters/llm/MockProvider.js +9 -0
- package/dist/esm/adapters/llm/MockProvider.js.map +1 -1
- package/dist/esm/adapters/llm/OpenAIProvider.d.ts +12 -0
- package/dist/esm/adapters/llm/OpenAIProvider.js +21 -0
- package/dist/esm/adapters/llm/OpenAIProvider.js.map +1 -1
- package/dist/esm/adapters/types.d.ts +46 -0
- package/dist/esm/conventions.d.ts +4 -0
- package/dist/esm/conventions.js +12 -0
- package/dist/esm/conventions.js.map +1 -1
- package/dist/esm/core/Agent.d.ts +26 -1
- package/dist/esm/core/Agent.js +56 -2
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/agent/AgentBuilder.d.ts +15 -0
- package/dist/esm/core/agent/AgentBuilder.js +98 -1
- package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
- package/dist/esm/core/agent/buildAgentChart.d.ts +13 -1
- package/dist/esm/core/agent/buildAgentChart.js +12 -2
- package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
- package/dist/esm/core/agent/buildDynamicAgentChart.js +12 -3
- package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -1
- package/dist/esm/core/agent/outputEnforcement.d.ts +173 -0
- package/dist/esm/core/agent/outputEnforcement.js +180 -0
- package/dist/esm/core/agent/outputEnforcement.js.map +1 -0
- package/dist/esm/core/agent/stages/callLLM.d.ts +15 -0
- package/dist/esm/core/agent/stages/callLLM.js +31 -1
- package/dist/esm/core/agent/stages/callLLM.js.map +1 -1
- package/dist/esm/core/agent/stages/outputRetry.d.ts +34 -0
- package/dist/esm/core/agent/stages/outputRetry.js +98 -0
- package/dist/esm/core/agent/stages/outputRetry.js.map +1 -0
- package/dist/esm/core/agent/stages/route.d.ts +18 -2
- package/dist/esm/core/agent/stages/route.js +111 -6
- package/dist/esm/core/agent/stages/route.js.map +1 -1
- package/dist/esm/core/agent/types.d.ts +18 -0
- package/dist/esm/core/outputSchema.d.ts +51 -0
- package/dist/esm/core/outputSchema.js.map +1 -1
- package/dist/esm/events/payloads.d.ts +47 -1
- package/dist/esm/events/registry.d.ts +3 -1
- package/dist/esm/events/registry.js +2 -0
- package/dist/esm/events/registry.js.map +1 -1
- package/dist/esm/hosting/errors.d.ts +44 -2
- package/dist/esm/hosting/errors.js +63 -0
- package/dist/esm/hosting/errors.js.map +1 -1
- package/dist/esm/hosting/headers.d.ts +16 -0
- package/dist/esm/hosting/headers.js +24 -0
- package/dist/esm/hosting/headers.js.map +1 -0
- package/dist/esm/hosting/httpHost.d.ts +70 -4
- package/dist/esm/hosting/httpHost.js +211 -47
- package/dist/esm/hosting/httpHost.js.map +1 -1
- package/dist/esm/hosting/index.d.ts +23 -8
- package/dist/esm/hosting/index.js +21 -6
- package/dist/esm/hosting/index.js.map +1 -1
- package/dist/esm/hosting/nodeHost.d.ts +23 -0
- package/dist/esm/hosting/nodeHost.js +21 -1
- package/dist/esm/hosting/nodeHost.js.map +1 -1
- package/dist/esm/hosting/types.d.ts +212 -6
- package/dist/esm/hosting/types.js +7 -5
- package/dist/esm/hosting/types.js.map +1 -1
- package/dist/esm/hosting/webSocketConversation.d.ts +101 -0
- package/dist/esm/hosting/webSocketConversation.js +341 -0
- package/dist/esm/hosting/webSocketConversation.js.map +1 -0
- package/dist/esm/hosting/webSocketFrames.d.ts +164 -0
- package/dist/esm/hosting/webSocketFrames.js +284 -0
- package/dist/esm/hosting/webSocketFrames.js.map +1 -0
- package/dist/esm/hosting-providers.d.ts +7 -2
- package/dist/esm/hosting-providers.js +7 -2
- package/dist/esm/hosting-providers.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/resilience/withCircuitBreaker.js +5 -0
- package/dist/esm/resilience/withCircuitBreaker.js.map +1 -1
- package/dist/esm/resilience/withFallback.js +5 -0
- package/dist/esm/resilience/withFallback.js.map +1 -1
- package/dist/esm/resilience/withRetry.js +6 -0
- package/dist/esm/resilience/withRetry.js.map +1 -1
- package/dist/events/registry.js +2 -0
- package/dist/events/registry.js.map +1 -1
- package/dist/hosting/errors.js +66 -1
- package/dist/hosting/errors.js.map +1 -1
- package/dist/hosting/headers.js +28 -0
- package/dist/hosting/headers.js.map +1 -0
- package/dist/hosting/httpHost.js +211 -47
- package/dist/hosting/httpHost.js.map +1 -1
- package/dist/hosting/index.js +23 -6
- package/dist/hosting/index.js.map +1 -1
- package/dist/hosting/nodeHost.js +20 -0
- package/dist/hosting/nodeHost.js.map +1 -1
- package/dist/hosting/types.js +7 -5
- package/dist/hosting/types.js.map +1 -1
- package/dist/hosting/webSocketConversation.js +345 -0
- package/dist/hosting/webSocketConversation.js.map +1 -0
- package/dist/hosting/webSocketFrames.js +297 -0
- package/dist/hosting/webSocketFrames.js.map +1 -0
- package/dist/hosting-providers.js +8 -2
- package/dist/hosting-providers.js.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/resilience/withCircuitBreaker.js +5 -0
- package/dist/resilience/withCircuitBreaker.js.map +1 -1
- package/dist/resilience/withFallback.js +5 -0
- package/dist/resilience/withFallback.js.map +1 -1
- package/dist/resilience/withRetry.js +6 -0
- package/dist/resilience/withRetry.js.map +1 -1
- package/dist/types/adapters/hosting/agentcore.d.ts +50 -1
- package/dist/types/adapters/hosting/agentcore.d.ts.map +1 -1
- package/dist/types/adapters/llm/AnthropicProvider.d.ts +10 -0
- package/dist/types/adapters/llm/AnthropicProvider.d.ts.map +1 -1
- package/dist/types/adapters/llm/BedrockProvider.d.ts +9 -0
- package/dist/types/adapters/llm/BedrockProvider.d.ts.map +1 -1
- package/dist/types/adapters/llm/BrowserAnthropicProvider.d.ts +1 -0
- package/dist/types/adapters/llm/BrowserAnthropicProvider.d.ts.map +1 -1
- package/dist/types/adapters/llm/BrowserOpenAIProvider.d.ts +4 -0
- package/dist/types/adapters/llm/BrowserOpenAIProvider.d.ts.map +1 -1
- package/dist/types/adapters/llm/MockProvider.d.ts +9 -0
- package/dist/types/adapters/llm/MockProvider.d.ts.map +1 -1
- package/dist/types/adapters/llm/OpenAIProvider.d.ts +12 -0
- package/dist/types/adapters/llm/OpenAIProvider.d.ts.map +1 -1
- package/dist/types/adapters/types.d.ts +46 -0
- package/dist/types/adapters/types.d.ts.map +1 -1
- package/dist/types/conventions.d.ts +4 -0
- package/dist/types/conventions.d.ts.map +1 -1
- package/dist/types/core/Agent.d.ts +26 -1
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/agent/AgentBuilder.d.ts +15 -0
- package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
- package/dist/types/core/agent/buildAgentChart.d.ts +13 -1
- package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
- package/dist/types/core/agent/buildDynamicAgentChart.d.ts.map +1 -1
- package/dist/types/core/agent/outputEnforcement.d.ts +174 -0
- package/dist/types/core/agent/outputEnforcement.d.ts.map +1 -0
- package/dist/types/core/agent/stages/callLLM.d.ts +15 -0
- package/dist/types/core/agent/stages/callLLM.d.ts.map +1 -1
- package/dist/types/core/agent/stages/outputRetry.d.ts +35 -0
- package/dist/types/core/agent/stages/outputRetry.d.ts.map +1 -0
- package/dist/types/core/agent/stages/route.d.ts +18 -2
- package/dist/types/core/agent/stages/route.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +18 -0
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/core/outputSchema.d.ts +51 -0
- package/dist/types/core/outputSchema.d.ts.map +1 -1
- package/dist/types/events/payloads.d.ts +47 -1
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/events/registry.d.ts +3 -1
- package/dist/types/events/registry.d.ts.map +1 -1
- package/dist/types/hosting/errors.d.ts +44 -2
- package/dist/types/hosting/errors.d.ts.map +1 -1
- package/dist/types/hosting/headers.d.ts +17 -0
- package/dist/types/hosting/headers.d.ts.map +1 -0
- package/dist/types/hosting/httpHost.d.ts +70 -4
- package/dist/types/hosting/httpHost.d.ts.map +1 -1
- package/dist/types/hosting/index.d.ts +23 -8
- package/dist/types/hosting/index.d.ts.map +1 -1
- package/dist/types/hosting/nodeHost.d.ts +23 -0
- package/dist/types/hosting/nodeHost.d.ts.map +1 -1
- package/dist/types/hosting/types.d.ts +212 -6
- package/dist/types/hosting/types.d.ts.map +1 -1
- package/dist/types/hosting/webSocketConversation.d.ts +102 -0
- package/dist/types/hosting/webSocketConversation.d.ts.map +1 -0
- package/dist/types/hosting/webSocketFrames.d.ts +165 -0
- package/dist/types/hosting/webSocketFrames.d.ts.map +1 -0
- package/dist/types/hosting-providers.d.ts +7 -2
- package/dist/types/hosting-providers.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/resilience/withCircuitBreaker.d.ts.map +1 -1
- package/dist/types/resilience/withFallback.d.ts.map +1 -1
- package/dist/types/resilience/withRetry.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeHost.d.ts","sourceRoot":"","sources":["../../../src/hosting/nodeHost.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"nodeHost.d.ts","sourceRoot":"","sources":["../../../src/hosting/nodeHost.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;;AAEH,OAAO,EAGL,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,QAAQ,EACd,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,oCAAoC;AACpC,MAAM,WAAW,eAAe;IAC9B,gGAAgG;IAChG,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,sDAAsD;IACtD,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,6DAA6D;IAC7D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACnC;;;;;;;OAOG;IACH,QAAQ,CAAC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACjD;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,WAAW,EAAE,MAAM,CAAC;CAC9C;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC;AAE5C,qDAAqD;AACrD,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC;AAIhC;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,EAAE,QAgCtB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,OAAO,GAAE,eAAoB,GAAG,QAAQ,CAoBhE"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* hosting/types — the
|
|
2
|
+
* hosting/types — the ports an agent needs to stand up and stay up.
|
|
3
3
|
*
|
|
4
|
-
* `AgentHost` is "something can call me". `
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* `AgentHost` is "something can call me". `ConversationHost` is "something can
|
|
5
|
+
* TALK to me" — a door that stays open, because `HostRequest → HostReply` is
|
|
6
|
+
* one exchange and some doors are not. `SessionLifecycle` is "the conversation
|
|
7
|
+
* outlives the request". All three are deliberately written in the vocabulary
|
|
8
|
+
* every transport and every store already has — an input, a reply, a frame, a
|
|
9
|
+
* session id, a stored blob — and in nothing else.
|
|
8
10
|
*
|
|
9
11
|
* **The rule these types are written under:** no runtime, product or protocol
|
|
10
12
|
* gets a field, a name or an assumption here. A port shaped around one
|
|
@@ -22,6 +24,8 @@ import type { Agent } from '../core/Agent.js';
|
|
|
22
24
|
import type { CheckInRequest } from '../core/checkin.js';
|
|
23
25
|
import type { MiddlewareAsk } from '../core/pause.js';
|
|
24
26
|
import type { AgentRunCheckpoint } from '../core/runCheckpoint.js';
|
|
27
|
+
import type { Unsubscribe } from '../events/dispatcher.js';
|
|
28
|
+
export type { Unsubscribe };
|
|
25
29
|
/**
|
|
26
30
|
* Something a host can do BEYOND the baseline of "accept a request, deliver one
|
|
27
31
|
* reply". Read it from {@link AgentHost.capabilities} and branch on it — never
|
|
@@ -32,8 +36,18 @@ import type { AgentRunCheckpoint } from '../core/runCheckpoint.js';
|
|
|
32
36
|
* of a transport that does not exist yet: a capability nobody implements is a
|
|
33
37
|
* promise the library cannot keep, and pre-minting one for an imagined future
|
|
34
38
|
* transport would bake that transport's assumptions in before it arrives.
|
|
39
|
+
*
|
|
40
|
+
* - `'streaming'` — the caller SEES `reply.emit(...)` pieces as they arrive.
|
|
41
|
+
* - `'conversation'` — this host can also carry a two-way channel that stays
|
|
42
|
+
* open ({@link ConversationHost.serveConversations}). It joined the union
|
|
43
|
+
* when two shipped adapters honoured it, not when it was imagined.
|
|
44
|
+
*
|
|
45
|
+
* Declared at CONSTRUCTION and static thereafter, which is a constraint worth
|
|
46
|
+
* knowing about: a capability whose truth depended on what happened to be
|
|
47
|
+
* installed at call time could not be declared here honestly, so an adapter
|
|
48
|
+
* that can only sometimes keep a promise does not make it.
|
|
35
49
|
*/
|
|
36
|
-
export type HostCapability = 'streaming';
|
|
50
|
+
export type HostCapability = 'streaming' | 'conversation';
|
|
37
51
|
/**
|
|
38
52
|
* One inbound request, as the transport described it.
|
|
39
53
|
*/
|
|
@@ -164,6 +178,198 @@ export interface AgentHost {
|
|
|
164
178
|
/** Start serving. Resolves once the host is actually live. */
|
|
165
179
|
serve(handler: HostHandler): Promise<HostHandle>;
|
|
166
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* A door that stays open: one session-scoped, two-way channel.
|
|
183
|
+
*
|
|
184
|
+
* The distinction this type exists for, in the words of the field report that
|
|
185
|
+
* bought it: **`HostRequest → HostReply` is one exchange, and this door is a
|
|
186
|
+
* conversation.** A request has one reply and then it is over. A conversation
|
|
187
|
+
* has neither side taking turns by rule, no reply count, and an end that either
|
|
188
|
+
* side can call.
|
|
189
|
+
*
|
|
190
|
+
* ── Frames are STRINGS here, deliberately ───────────────────────────────────
|
|
191
|
+
* What the frames MEAN is the consumer's contract, not this port's: one
|
|
192
|
+
* consumer pushes tool calls down the channel, another speaks a standardized
|
|
193
|
+
* agent↔UI protocol, a third exchanges long-running task updates. JSON is what
|
|
194
|
+
* all three happen to use and none of them agree on beyond that, so the port
|
|
195
|
+
* carries text and stays out of it. Binary is a capability question, deferred
|
|
196
|
+
* until a consumer needs it rather than guessed at now.
|
|
197
|
+
*
|
|
198
|
+
* ── What is NOT here ────────────────────────────────────────────────────────
|
|
199
|
+
* No authentication, no chunking, no heartbeat, no protocol framing. See
|
|
200
|
+
* {@link ConversationLimits} for why the last two are absences with a reason
|
|
201
|
+
* rather than gaps.
|
|
202
|
+
*/
|
|
203
|
+
export interface HostConversation {
|
|
204
|
+
/**
|
|
205
|
+
* The conversation this channel CLAIMS to belong to — caller data, exactly as
|
|
206
|
+
* the transport declared it, and **not identity**. The whole of
|
|
207
|
+
* {@link HostRequest.sessionId}'s warning applies here word for word: anyone
|
|
208
|
+
* who can reach the host can put any string here, including someone else's.
|
|
209
|
+
*
|
|
210
|
+
* A conversation and a request carrying the same string are the same
|
|
211
|
+
* session's, as far as this port is concerned. What that entitles either of
|
|
212
|
+
* them to is yours to decide, above the port.
|
|
213
|
+
*/
|
|
214
|
+
readonly sessionId?: string;
|
|
215
|
+
/**
|
|
216
|
+
* Transport headers with lower-cased names, as delivered — so a handler can
|
|
217
|
+
* map its own conventions without the port guessing which ones matter.
|
|
218
|
+
*
|
|
219
|
+
* This is also where an adapter puts credentials that its transport spells
|
|
220
|
+
* some other way: a bearer token a browser could only send as a subprotocol
|
|
221
|
+
* arrives here as an ordinary `authorization` header, because a port field
|
|
222
|
+
* spelled the way one vendor spells it is how a port stops being one.
|
|
223
|
+
*/
|
|
224
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
225
|
+
/**
|
|
226
|
+
* Host → far side. One frame, delivered whole.
|
|
227
|
+
*
|
|
228
|
+
* Refuses BY NAME rather than dropping quietly in two cases: a conversation
|
|
229
|
+
* that has ended (`ConversationClosedError`), and a frame past the ceiling the
|
|
230
|
+
* adapter declared (`FrameTooLargeError`). A dropped frame on a channel that
|
|
231
|
+
* looks open is the failure mode this port exists to make impossible.
|
|
232
|
+
*/
|
|
233
|
+
send(frame: string): void;
|
|
234
|
+
/**
|
|
235
|
+
* Far side → host. Returns an unsubscribe.
|
|
236
|
+
*
|
|
237
|
+
* Frames that arrive BEFORE the first subscriber are held and delivered to
|
|
238
|
+
* it, up to the bound the adapter declares
|
|
239
|
+
* ({@link ConversationLimits.maxPendingBytes}) — an `async` handler that
|
|
240
|
+
* awaits anything before subscribing would otherwise silently lose the far
|
|
241
|
+
* side's opening frame, which on a channel whose first frame is a greeting is
|
|
242
|
+
* every conversation.
|
|
243
|
+
*/
|
|
244
|
+
onFrame(cb: (frame: string) => void): Unsubscribe;
|
|
245
|
+
/**
|
|
246
|
+
* The end, delivered exactly once per subscriber — including to a subscriber
|
|
247
|
+
* that arrives after it already happened, which is answered immediately
|
|
248
|
+
* rather than never.
|
|
249
|
+
*/
|
|
250
|
+
onClose(cb: (reason: ConversationClose) => void): Unsubscribe;
|
|
251
|
+
/**
|
|
252
|
+
* End it politely: flush what is queued, tell the far side, then stop.
|
|
253
|
+
* Idempotent — the first call owns the ending and later ones do nothing.
|
|
254
|
+
*/
|
|
255
|
+
close(reason?: string): void;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* How a conversation ended, in terms every transport can answer.
|
|
259
|
+
*
|
|
260
|
+
* `by` is the fact a consumer branches on and the reason there is no numeric
|
|
261
|
+
* code here: what all three of "a browser-parked channel", "a UI protocol" and
|
|
262
|
+
* "a long-running task exchange" need to know is whether the far side said
|
|
263
|
+
* goodbye, whether we did, or whether it broke — and a transport's own numbers
|
|
264
|
+
* answer that only if you already know that transport. Adapters render their
|
|
265
|
+
* own vocabulary (a close code, a timeout, a ceiling) into {@link reason}.
|
|
266
|
+
*/
|
|
267
|
+
export interface ConversationClose {
|
|
268
|
+
/**
|
|
269
|
+
* - `'far-side'` — they ended it.
|
|
270
|
+
* - `'host'` — we did, through {@link HostConversation.close}.
|
|
271
|
+
* - `'transport'` — nobody ended it; it broke or timed out.
|
|
272
|
+
*/
|
|
273
|
+
readonly by: 'far-side' | 'host' | 'transport';
|
|
274
|
+
/** What was said about it, when anything was. */
|
|
275
|
+
readonly reason?: string;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* What you hand {@link ConversationHost.serveConversations} — called once per
|
|
279
|
+
* conversation, with that conversation.
|
|
280
|
+
*
|
|
281
|
+
* Throwing ends THAT conversation with a stated reason and never the host: one
|
|
282
|
+
* caller's bad frame is not an outage.
|
|
283
|
+
*/
|
|
284
|
+
export type ConversationHandler = (conversation: HostConversation) => void | Promise<void>;
|
|
285
|
+
/**
|
|
286
|
+
* The ceilings a door imposes, **declared rather than discovered**.
|
|
287
|
+
*
|
|
288
|
+
* ── Why the port does not just handle them ──────────────────────────────────
|
|
289
|
+
* A transport that caps frame size or idles out must SAY so, and then get out
|
|
290
|
+
* of the way. Hiding a 32KB cap inside auto-chunking would be the adapter
|
|
291
|
+
* deciding a protocol question for every consumer at once — how a message is
|
|
292
|
+
* split, how the pieces are numbered, how the far side knows the last one has
|
|
293
|
+
* landed — and those answers differ per consumer. Same for liveness: a
|
|
294
|
+
* heartbeat is frames on somebody's protocol, and inventing them puts bytes on
|
|
295
|
+
* the wire that the consumer's parser never agreed to.
|
|
296
|
+
*
|
|
297
|
+
* So the port's job is to make the ceiling VISIBLE and let the layer above act:
|
|
298
|
+
* chunk above the port, heartbeat above the port.
|
|
299
|
+
*
|
|
300
|
+
* ── Enforced vs reported ────────────────────────────────────────────────────
|
|
301
|
+
* A door enforces what it IS and reports what it SITS BEHIND, and the doc on
|
|
302
|
+
* each field says which. Absent means "no ceiling this adapter knows of", never
|
|
303
|
+
* "no ceiling" — the runtime in front of you may have one it never told us
|
|
304
|
+
* about.
|
|
305
|
+
*/
|
|
306
|
+
export interface ConversationLimits {
|
|
307
|
+
/**
|
|
308
|
+
* Largest single frame this door carries, in bytes of UTF-8.
|
|
309
|
+
*
|
|
310
|
+
* **Enforced, both directions**, by the door that declares it: an inbound
|
|
311
|
+
* frame past it ends the conversation with a stated reason, and
|
|
312
|
+
* {@link HostConversation.send} past it refuses by name instead of
|
|
313
|
+
* truncating or silently splitting.
|
|
314
|
+
*
|
|
315
|
+
* A frame the transport delivered in pieces counts in TOTAL — the port's
|
|
316
|
+
* frame is the whole message, not the transport's packet, so fragmentation
|
|
317
|
+
* cannot be used to walk around the ceiling.
|
|
318
|
+
*/
|
|
319
|
+
readonly maxFrameBytes?: number;
|
|
320
|
+
/**
|
|
321
|
+
* How long the transport tolerates silence before it closes the channel.
|
|
322
|
+
*
|
|
323
|
+
* **Reported, not imposed.** The door declaring it usually is not the thing
|
|
324
|
+
* enforcing it — a runtime's front door idles a socket out long before the
|
|
325
|
+
* process inside notices — and a consumer that needs the channel to stay up
|
|
326
|
+
* sends its own heartbeat frames on its own protocol. Making that possible is
|
|
327
|
+
* the whole reason this number is written down.
|
|
328
|
+
*/
|
|
329
|
+
readonly idleMs?: number;
|
|
330
|
+
/**
|
|
331
|
+
* How much the door holds for you before the first
|
|
332
|
+
* {@link HostConversation.onFrame} subscriber exists, in bytes.
|
|
333
|
+
*
|
|
334
|
+
* **Enforced**, and a ceiling on the DOOR rather than on the transport: the
|
|
335
|
+
* pre-subscribe buffer that stops an `async` handler from losing the opening
|
|
336
|
+
* frame is a queue somebody else fills and this process pays for, so it gets
|
|
337
|
+
* a number and a stated overflow instead of growing until the host dies. Past
|
|
338
|
+
* it, the conversation ends with a reason naming this bound.
|
|
339
|
+
*
|
|
340
|
+
* Bounded in BYTES rather than in frames on purpose: a frame count would
|
|
341
|
+
* still admit `count × maxFrameBytes` of memory, which is the same unbounded
|
|
342
|
+
* queue with an extra step.
|
|
343
|
+
*/
|
|
344
|
+
readonly maxPendingBytes?: number;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* The port: something that can carry conversations to one handler.
|
|
348
|
+
*
|
|
349
|
+
* It sits BESIDE {@link AgentHost} rather than inside it, because a transport
|
|
350
|
+
* that can carry a request cannot necessarily carry a conversation, and one
|
|
351
|
+
* that carries conversations need not answer requests at all. A host that does
|
|
352
|
+
* both implements both and declares `'conversation'` in
|
|
353
|
+
* {@link AgentHost.capabilities}.
|
|
354
|
+
*/
|
|
355
|
+
export interface ConversationHost {
|
|
356
|
+
/** Which adapter this is. Every refusal names it. */
|
|
357
|
+
readonly name: string;
|
|
358
|
+
/** What this adapter can do beyond the baseline. Feature-detect; never assume. */
|
|
359
|
+
readonly capabilities: readonly HostCapability[];
|
|
360
|
+
/**
|
|
361
|
+
* What this door caps, as declared facts. Absent means this adapter knows of
|
|
362
|
+
* no ceiling — never that there is none.
|
|
363
|
+
*/
|
|
364
|
+
readonly conversationLimits?: ConversationLimits;
|
|
365
|
+
/**
|
|
366
|
+
* Start taking conversations. Resolves once the door is actually open.
|
|
367
|
+
*
|
|
368
|
+
* The handle's `close()` ends every live conversation politely and then
|
|
369
|
+
* releases the door.
|
|
370
|
+
*/
|
|
371
|
+
serveConversations(handler: ConversationHandler): Promise<HostHandle>;
|
|
372
|
+
}
|
|
167
373
|
/**
|
|
168
374
|
* A session packed for storage.
|
|
169
375
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/hosting/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/hosting/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,YAAY,EAAE,WAAW,EAAE,CAAC;AAI5B;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,cAAc,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,iCAAiC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;;;;;;;;;;;;OAgBG;IACH,QA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OAAO,CAAC,EAAE,CAAC,CAAA;KAAE,CAAC;IACxE,8DAA8D;IAC9D,QAAQ,CAAC,kBAAkB,CAAC,EAAE,sBAAsB,CAAC;IACrD;;;;;;;;OAQG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC;CACtC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hosting/webSocketConversation — one upgraded socket, presented as a
|
|
3
|
+
* {@link HostConversation}.
|
|
4
|
+
*
|
|
5
|
+
* This is the whole adapter side of the conversation port: it takes the
|
|
6
|
+
* `'upgrade'` event a `node:http` server hands it, answers the handshake, and
|
|
7
|
+
* turns the frames flowing over the socket into the six-member port a handler
|
|
8
|
+
* sees. Everything protocol-shaped lives in `webSocketFrames.ts`; everything
|
|
9
|
+
* port-shaped lives in `types.ts`; this file is the join.
|
|
10
|
+
*
|
|
11
|
+
* ── The laws it keeps, all of them pinned by tests ───────────────────────────
|
|
12
|
+
* - **A path this door does not own is not touched.** `node:http` calls EVERY
|
|
13
|
+
* `'upgrade'` listener for every upgrade, exactly as it calls every
|
|
14
|
+
* `'request'` listener — so a caller's own protocol lives beside this one on
|
|
15
|
+
* the same socket. Whether an unclaimed path gets an answer is the caller's
|
|
16
|
+
* business on a server they own, and this door's only on a server it owns.
|
|
17
|
+
* - **Frames that arrive before the handler subscribes are held, up to a
|
|
18
|
+
* declared bound.** An `async` handler that awaits before calling `onFrame`
|
|
19
|
+
* would otherwise lose the far side's opening frame. The bound is in BYTES
|
|
20
|
+
* and overflow ends the conversation with a stated reason, because an
|
|
21
|
+
* unbounded queue somebody else fills is a way to kill this process, and an
|
|
22
|
+
* undeclared ceiling is the exact thing the declared-ceilings rule exists to
|
|
23
|
+
* forbid.
|
|
24
|
+
* - **`close()` ends every live conversation before the socket is released.**
|
|
25
|
+
* Measured, not assumed: an upgraded socket keeps `server.close()` waiting
|
|
26
|
+
* forever, so a door that let go of its conversations would hang the whole
|
|
27
|
+
* shutdown.
|
|
28
|
+
* - **The port's frame is the whole message.** A message the transport
|
|
29
|
+
* delivered in fragments counts against `maxFrameBytes` in total, so
|
|
30
|
+
* fragmentation cannot be used to walk around the ceiling.
|
|
31
|
+
*
|
|
32
|
+
* Pattern: Adapter. Role: outer ring, one transport.
|
|
33
|
+
*/
|
|
34
|
+
/// <reference types="node" />
|
|
35
|
+
/// <reference types="node" />
|
|
36
|
+
import type { IncomingMessage } from 'node:http';
|
|
37
|
+
import type { Duplex } from 'node:stream';
|
|
38
|
+
import type { ConversationHandler, ConversationLimits } from './types.js';
|
|
39
|
+
/**
|
|
40
|
+
* What a wire read out of one handshake — the conversation half of a
|
|
41
|
+
* deployment's dialect.
|
|
42
|
+
*
|
|
43
|
+
* There is no body to read here, which is the whole difference from a request:
|
|
44
|
+
* a handshake is a URL and some headers, so a dialect that wants a session id
|
|
45
|
+
* or a credential has to find it in those.
|
|
46
|
+
*/
|
|
47
|
+
export interface ConversationHandshake {
|
|
48
|
+
/** The session this conversation claims. Caller data; never identity. */
|
|
49
|
+
readonly sessionId?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Headers to merge OVER the raw lower-cased ones the transport delivered.
|
|
52
|
+
*
|
|
53
|
+
* This is how an adapter maps its own spelling into the port's vocabulary —
|
|
54
|
+
* a credential a browser could only send as a subprotocol becomes an ordinary
|
|
55
|
+
* `authorization` header here. The raw headers are never removed, so nothing
|
|
56
|
+
* a mapping did not understand is lost.
|
|
57
|
+
*/
|
|
58
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
59
|
+
/**
|
|
60
|
+
* The subprotocol to echo in the 101, when this dialect selects one.
|
|
61
|
+
*
|
|
62
|
+
* Selecting is the wire's job because only the wire read the offer. Echoing
|
|
63
|
+
* something the client did not offer makes the client fail the connection.
|
|
64
|
+
*/
|
|
65
|
+
readonly protocol?: string;
|
|
66
|
+
}
|
|
67
|
+
/** Everything the door needs to answer one upgrade. */
|
|
68
|
+
export interface ConversationDoorOptions {
|
|
69
|
+
/** The adapter's name — every refusal carries it. */
|
|
70
|
+
readonly hostName: string;
|
|
71
|
+
/** The path this door owns. Anything else is not ours. */
|
|
72
|
+
readonly path: string;
|
|
73
|
+
/** The ceilings this door declares, already defaulted. */
|
|
74
|
+
readonly limits: ConversationLimits;
|
|
75
|
+
/** This deployment's handshake dialect. Absent ⇒ raw headers and no session. */
|
|
76
|
+
readonly readConversation?: (facts: HandshakeFacts) => ConversationHandshake;
|
|
77
|
+
/** Where a new conversation goes. */
|
|
78
|
+
readonly handler: ConversationHandler;
|
|
79
|
+
/** Whether the host is still taking conversations — false after `close()`. */
|
|
80
|
+
readonly accepting: () => boolean;
|
|
81
|
+
}
|
|
82
|
+
/** What a handshake dialect may read. Deliberately the same shape a request wire gets, minus the body. */
|
|
83
|
+
export interface HandshakeFacts {
|
|
84
|
+
/** Header names lower-cased. */
|
|
85
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
86
|
+
/** The query string, already parsed — where a browser has to put things it cannot header. */
|
|
87
|
+
readonly query: URLSearchParams;
|
|
88
|
+
}
|
|
89
|
+
/** A door: hand it upgrades, close it when you are done. */
|
|
90
|
+
export interface ConversationDoor {
|
|
91
|
+
/**
|
|
92
|
+
* Take one upgrade, or decline it. Returns whether this door claimed the
|
|
93
|
+
* path — the caller decides what an unclaimed upgrade deserves.
|
|
94
|
+
*/
|
|
95
|
+
handleUpgrade(request: IncomingMessage, socket: Duplex): boolean;
|
|
96
|
+
/** End every live conversation politely, then resolve. */
|
|
97
|
+
closeAll(reason: string): Promise<void>;
|
|
98
|
+
/** How many conversations are open right now. */
|
|
99
|
+
readonly liveCount: number;
|
|
100
|
+
}
|
|
101
|
+
export declare function conversationDoor(options: ConversationDoorOptions): ConversationDoor;
|
|
102
|
+
//# sourceMappingURL=webSocketConversation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webSocketConversation.d.ts","sourceRoot":"","sources":["../../../src/hosting/webSocketConversation.ts"],"names":[],"mappings":"AA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AgB;IAC/B;;;OAGG;IACH,aAAa,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IACjE,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,iDAAiD;IACjD,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AASD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,gBAAgB,CA0EnF"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* hosting/webSocketFrames — the frame codec the conversation door speaks, and
|
|
3
|
+
* nothing else.
|
|
4
|
+
*
|
|
5
|
+
* Pure bytes in, pure bytes out: no socket, no session, no handler, no port
|
|
6
|
+
* vocabulary. That is what makes it testable the only way protocol code is
|
|
7
|
+
* worth testing — against the byte sequences the specification itself
|
|
8
|
+
* publishes, rather than against a client we also wrote.
|
|
9
|
+
*
|
|
10
|
+
* ── Why this file exists instead of a dependency ─────────────────────────────
|
|
11
|
+
* The alternative was an optional peer dependency carrying a complete
|
|
12
|
+
* implementation. It was rejected for a reason that is about honesty rather
|
|
13
|
+
* than about lines of code: `capabilities` is declared at CONSTRUCTION and is
|
|
14
|
+
* static thereafter, so a host whose conversation door only works when an
|
|
15
|
+
* optional package happens to be installed can only either claim
|
|
16
|
+
* `'conversation'` and then refuse to do it — the library declaring a promise
|
|
17
|
+
* it cannot keep, which is the one thing the capability union forbids — or
|
|
18
|
+
* probe `node_modules` and let feature detection depend on install state, so a
|
|
19
|
+
* deployment that forgot the dependency silently gets a host that quietly does
|
|
20
|
+
* not do conversations. The shipped adapter honours what it declares, always,
|
|
21
|
+
* with nothing to install. That was worth these bytes.
|
|
22
|
+
*
|
|
23
|
+
* ── What is implemented, exactly ─────────────────────────────────────────────
|
|
24
|
+
* The server half of RFC 6455 for a text channel: the handshake, text frames,
|
|
25
|
+
* continuation frames, ping/pong, and close. Payloads are unmasked on the way
|
|
26
|
+
* in (client frames MUST be masked) and written unmasked on the way out (server
|
|
27
|
+
* frames MUST NOT be), which is the asymmetry the RFC requires.
|
|
28
|
+
*
|
|
29
|
+
* ── What is NOT, and how far the verification goes ───────────────────────────
|
|
30
|
+
* No extensions and no compression: `permessage-deflate` is negotiated, and
|
|
31
|
+
* this door never negotiates it, so the RSV bits must always be zero and a peer
|
|
32
|
+
* that sets one is refused. No binary frames — the port carries text, and
|
|
33
|
+
* binary is a capability nobody has minted evidence for. No client role.
|
|
34
|
+
*
|
|
35
|
+
* Verification is: the byte vectors published in RFC 6455 §5.7, which were
|
|
36
|
+
* authored by the specification and not by this repository, plus a live
|
|
37
|
+
* exchange against the platform's own WebSocket client where the runtime has
|
|
38
|
+
* one, plus the conversation conformance suite over a real socket. It is **not**
|
|
39
|
+
* run against the Autobahn test suite, and this file does not claim more
|
|
40
|
+
* coverage than the tests beside it actually execute.
|
|
41
|
+
*
|
|
42
|
+
* Pattern: pure codec. Role: innermost ring — imports nothing from this package.
|
|
43
|
+
*/
|
|
44
|
+
/// <reference types="node" />
|
|
45
|
+
/// <reference types="node" />
|
|
46
|
+
/** The frame kinds this door speaks. Numbers, because the wire uses numbers. */
|
|
47
|
+
export declare const OPCODE: {
|
|
48
|
+
readonly continuation: 0;
|
|
49
|
+
readonly text: 1;
|
|
50
|
+
readonly binary: 2;
|
|
51
|
+
readonly close: 8;
|
|
52
|
+
readonly ping: 9;
|
|
53
|
+
readonly pong: 10;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Close codes this door produces. The RFC's own numbers, named — a bare `1009`
|
|
57
|
+
* in a branch is a fact nobody can check without opening the specification.
|
|
58
|
+
*/
|
|
59
|
+
export declare const CLOSE_CODE: {
|
|
60
|
+
/** Ordinary end: the work is done. */
|
|
61
|
+
readonly normal: 1000;
|
|
62
|
+
/** The host is shutting down. */
|
|
63
|
+
readonly goingAway: 1001;
|
|
64
|
+
/** The peer broke the protocol. */
|
|
65
|
+
readonly protocolError: 1002;
|
|
66
|
+
/** Data this endpoint cannot accept — a binary frame, here. */
|
|
67
|
+
readonly unsupportedData: 1003;
|
|
68
|
+
/** Reserved: never sent on the wire, used only as "we were not told". */
|
|
69
|
+
readonly noStatus: 1005;
|
|
70
|
+
/** Text that is not valid UTF-8. */
|
|
71
|
+
readonly invalidPayload: 1007;
|
|
72
|
+
/** Past a declared ceiling. */
|
|
73
|
+
readonly tooBig: 1009;
|
|
74
|
+
};
|
|
75
|
+
/** One frame, as it came off the wire, already unmasked. */
|
|
76
|
+
export interface WebSocketFrame {
|
|
77
|
+
/** Last frame of its message? */
|
|
78
|
+
readonly fin: boolean;
|
|
79
|
+
/** One of {@link OPCODE}. */
|
|
80
|
+
readonly opcode: number;
|
|
81
|
+
/** The unmasked payload. */
|
|
82
|
+
readonly payload: Buffer;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* A peer that broke the protocol, carrying the close code the RFC names for
|
|
86
|
+
* that breakage — so the caller does not have to re-derive which number means
|
|
87
|
+
* what at the point it has to write one.
|
|
88
|
+
*/
|
|
89
|
+
export declare class FrameProtocolError extends Error {
|
|
90
|
+
readonly closeCode: number;
|
|
91
|
+
constructor(closeCode: number, message: string);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* The `Sec-WebSocket-Accept` value for a client's `Sec-WebSocket-Key`:
|
|
95
|
+
* base64(sha1(key + GUID)). Deterministic, and pinned against the RFC's own
|
|
96
|
+
* worked example.
|
|
97
|
+
*/
|
|
98
|
+
export declare function acceptKey(clientKey: string): string;
|
|
99
|
+
/**
|
|
100
|
+
* The 101 response, as bytes.
|
|
101
|
+
*
|
|
102
|
+
* `protocol` is echoed only when the caller selected one. Echoing a subprotocol
|
|
103
|
+
* the client did not offer would make the client fail the connection, so
|
|
104
|
+
* choosing one is the wire's job (it read the offer) and not this function's.
|
|
105
|
+
*/
|
|
106
|
+
export declare function handshakeResponse(clientKey: string, protocol?: string): Buffer;
|
|
107
|
+
/**
|
|
108
|
+
* One frame, ready to write. **Never masked**: a server that masks its frames
|
|
109
|
+
* is a server the client closes on, per RFC 6455 §5.1.
|
|
110
|
+
*/
|
|
111
|
+
export declare function encodeFrame(opcode: number, payload: Buffer, fin?: boolean): Buffer;
|
|
112
|
+
/** A text frame carrying one whole message. */
|
|
113
|
+
export declare function encodeText(text: string): Buffer;
|
|
114
|
+
/**
|
|
115
|
+
* A close frame carrying a code and, when there is one, a reason.
|
|
116
|
+
*
|
|
117
|
+
* The reason is truncated to 123 bytes because a control frame's payload may
|
|
118
|
+
* not exceed 125 and the code takes two of them. Truncating a REASON is safe in
|
|
119
|
+
* a way truncating a message never is: it is diagnostic prose about an ending
|
|
120
|
+
* that has already been decided.
|
|
121
|
+
*/
|
|
122
|
+
export declare function encodeClose(code: number, reason?: string): Buffer;
|
|
123
|
+
/** What a close frame said, pulled apart. */
|
|
124
|
+
export interface CloseFramePayload {
|
|
125
|
+
/** The peer's code, or `noStatus` when it sent none — which is legal. */
|
|
126
|
+
readonly code: number;
|
|
127
|
+
/** The peer's words, when it sent any. */
|
|
128
|
+
readonly reason?: string;
|
|
129
|
+
}
|
|
130
|
+
/** Read a close frame's payload. An empty payload is "no status", never an error. */
|
|
131
|
+
export declare function decodeClose(payload: Buffer): CloseFramePayload;
|
|
132
|
+
/** Is this one of the three control opcodes? */
|
|
133
|
+
export declare function isControlFrame(opcode: number): boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Turns a stream of TCP chunks into whole frames.
|
|
136
|
+
*
|
|
137
|
+
* Stateful by necessity — a frame arrives in as many pieces as the network
|
|
138
|
+
* feels like, and two frames arrive in one piece just as often. Every branch
|
|
139
|
+
* that gives up does so by throwing a {@link FrameProtocolError} carrying the
|
|
140
|
+
* code to close with, so the layer above never has to invent one.
|
|
141
|
+
*/
|
|
142
|
+
export declare class FrameReader {
|
|
143
|
+
private buffered;
|
|
144
|
+
private readonly maxFrameBytes;
|
|
145
|
+
/**
|
|
146
|
+
* @param maxFrameBytes The declared ceiling, when there is one. Checked
|
|
147
|
+
* against the length in the HEADER — before the payload is buffered, so an
|
|
148
|
+
* announced 4GB frame costs nothing to refuse.
|
|
149
|
+
*/
|
|
150
|
+
constructor(maxFrameBytes?: number);
|
|
151
|
+
/** Feed one chunk; get back every frame that completed. */
|
|
152
|
+
push(chunk: Buffer): WebSocketFrame[];
|
|
153
|
+
/** One frame, or `undefined` when the bytes for a whole one are not here yet. */
|
|
154
|
+
private readOne;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Decode a whole message's bytes as UTF-8, refusing anything that is not.
|
|
158
|
+
*
|
|
159
|
+
* Strict on purpose (RFC 6455 §8.1): a text frame that is not valid UTF-8 is a
|
|
160
|
+
* protocol violation, and the lenient alternative silently replaces the bad
|
|
161
|
+
* bytes with `U+FFFD` — handing the consumer a string the far side never sent
|
|
162
|
+
* and no way to know it happened.
|
|
163
|
+
*/
|
|
164
|
+
export declare function decodeText(payload: Buffer): string;
|
|
165
|
+
//# sourceMappingURL=webSocketFrames.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webSocketFrames.d.ts","sourceRoot":"","sources":["../../../src/hosting/webSocketFrames.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;;;AAIH,gFAAgF;AAChF,eAAO,MAAM,MAAM;;;;;;;CAOT,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,UAAU;IACrB,sCAAsC;;IAEtC,iCAAiC;;IAEjC,mCAAmC;;IAEnC,+DAA+D;;IAE/D,yEAAyE;;IAEzE,oCAAoC;;IAEpC,+BAA+B;;CAEvB,CAAC;AAEX,4DAA4D;AAC5D,MAAM,WAAW,cAAc;IAC7B,iCAAiC;IACjC,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;IACtB,6BAA6B;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACx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,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE;IAUrC,iFAAiF;IACjF,OAAO,CAAC,OAAO;CA0EhB;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CASlD"}
|
|
@@ -19,7 +19,12 @@
|
|
|
19
19
|
* • `agentCoreRuntimeHost({ port?, hostname?, busy? })` — an `AgentHost` for
|
|
20
20
|
* AWS Bedrock AgentCore Runtime's container contract: `POST /invocations`,
|
|
21
21
|
* `GET /ping`, port 8080, and the conversation id read from the
|
|
22
|
-
* `X-Amzn-Bedrock-AgentCore-Runtime-Session-Id` header.
|
|
22
|
+
* `X-Amzn-Bedrock-AgentCore-Runtime-Session-Id` header. It is a
|
|
23
|
+
* `ConversationHost` too: `serveConversations(handler)` takes the runtime's
|
|
24
|
+
* `/ws` door on the SAME socket, with `{ maxFrameBytes: 32768,
|
|
25
|
+
* idleMs: 900000 }` declared, session affinity readable from header or
|
|
26
|
+
* query, and a `Sec-WebSocket-Protocol` bearer mapped into
|
|
27
|
+
* `headers.authorization`.
|
|
23
28
|
* • `agentCoreSessions({ store })` — a `SessionLifecycle` whose checkpoint
|
|
24
29
|
* home you choose at construction: a JSON file in the runtime's own session
|
|
25
30
|
* storage (survives a stop/resume, needs no SDK), or one AgentCore Memory
|
|
@@ -46,6 +51,6 @@
|
|
|
46
51
|
* });
|
|
47
52
|
* process.on('SIGTERM', () => void handle.close());
|
|
48
53
|
*/
|
|
49
|
-
export { agentCoreRuntimeHost, agentCoreRuntimeWire, agentCoreSessions, DEFAULT_SESSION_STORAGE_PATH, } from './adapters/hosting/agentcore.js';
|
|
54
|
+
export { agentCoreRuntimeHost, agentCoreRuntimeWire, readAgentCoreConversation, agentCoreSessions, DEFAULT_SESSION_STORAGE_PATH, } from './adapters/hosting/agentcore.js';
|
|
50
55
|
export type { AgentCoreRuntimeHostOptions, AgentCoreSessionsOptions, AgentCoreSessionStore, AgentCoreFileSessionsOptions, AgentCoreMemorySessionsOptions, AgentCoreSessionClientLike, AgentCoreSessionEvent, BedrockAgentCoreSessionSdkModule, } from './adapters/hosting/agentcore.js';
|
|
51
56
|
//# sourceMappingURL=hosting-providers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosting-providers.d.ts","sourceRoot":"","sources":["../../src/hosting-providers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"hosting-providers.d.ts","sourceRoot":"","sources":["../../src/hosting-providers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAEH,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,iBAAiB,EACjB,4BAA4B,GAC7B,MAAM,iCAAiC,CAAC;AAEzC,YAAY,EACV,2BAA2B,EAC3B,wBAAwB,EACxB,qBAAqB,EACrB,4BAA4B,EAC5B,8BAA8B,EAC9B,0BAA0B,EAC1B,qBAAqB,EACrB,gCAAgC,GACjC,MAAM,iCAAiC,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -36,7 +36,8 @@ export type { ObserverDrainResult, ObserverStats } from 'footprintjs';
|
|
|
36
36
|
export type { ToolArgValidationMode } from './core/agent/toolArgsValidation.js';
|
|
37
37
|
export type { ReadSummaryMarker, ReadTrackingMode } from 'footprintjs';
|
|
38
38
|
export type { WriteProvenanceMode } from './core/agent/types.js';
|
|
39
|
-
export { OutputSchemaError, applyOutputSchema, type OutputSchemaParser, type OutputSchemaOptions, } from './core/outputSchema.js';
|
|
39
|
+
export { OutputSchemaError, applyOutputSchema, type OutputSchemaParser, type OutputSchemaOptions, type OutputSchemaStrategy, } from './core/outputSchema.js';
|
|
40
|
+
export { SCHEMA_CHECK_FRAME_PREFIX, SCHEMA_TOOL_NAME, isSchemaCheckMessage, type OutputAttempt, } from './core/agent/outputEnforcement.js';
|
|
40
41
|
export { type OutputFallbackOptions, type OutputFallbackFn } from './core/outputFallback.js';
|
|
41
42
|
export { RunCheckpointError, type AgentRunCheckpoint } from './core/runCheckpoint.js';
|
|
42
43
|
export { flowchartAsTool, type FlowchartAsToolOptions, type FlowchartResultMapper, type FlowchartToolSnapshot, } from './core/flowchartAsTool.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,OAAO,8CAA8C,CAAC;AACtD,OAAO,2CAA2C,CAAC;AACnD,OAAO,4CAA4C,CAAC;AAOpD,YAAY,EAEV,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,YAAY,EAEZ,UAAU,EACV,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EAEV,cAAc,EACd,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,0BAA0B,EAC1B,aAAa,EACb,cAAc,EACd,cAAc,EACd,gBAAgB,EAEhB,SAAS,EAET,eAAe,EACf,eAAe,GAChB,MAAM,aAAa,CAAC;AAGrB,cAAc,qBAAqB,CAAC;AAIpC,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,KAAK,YAAY,EAKjB,SAAS,EACT,KAAK,SAAS,EAKd,YAAY,EACZ,KAAK,SAAS,EACd,KAAK,aAAa,GACnB,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EACL,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAWxD,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,oBAAo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AC;gBAChB,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM;CAYrE;AAYD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,WAAW,EAClB,OAAO,GAAE,yBAA8B,GACtC,WAAW,CAyIb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withFallback.d.ts","sourceRoot":"","sources":["../../../src/resilience/withFallback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAGV,WAAW,EAIZ,MAAM,sBAAsB,CAAC;AAc9B,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IACtD;;;;;;;;;OASG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAChD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,WAAW,EACrB,OAAO,GAAE,mBAAwB,GAChC,WAAW,
|
|
1
|
+
{"version":3,"file":"withFallback.d.ts","sourceRoot":"","sources":["../../../src/resilience/withFallback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAGV,WAAW,EAIZ,MAAM,sBAAsB,CAAC;AAc9B,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IACtD;;;;;;;;;OASG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAChD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,WAAW,EACrB,OAAO,GAAE,mBAAwB,GAChC,WAAW,CAiFb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withRetry.d.ts","sourceRoot":"","sources":["../../../src/resilience/withRetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAGV,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,gBAAgB;IAC/B,mEAAmE;IACnE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,+DAA+D;IAC/D,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,sEAAsE;IACtE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,+CAA+C;IAC/C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC;IACpE;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,GAAE,gBAAqB,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"withRetry.d.ts","sourceRoot":"","sources":["../../../src/resilience/withRetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAGV,WAAW,EAGZ,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,gBAAgB;IAC/B,mEAAmE;IACnE,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,+DAA+D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