stitchkit 0.109.4 → 0.110.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/agent-runtime/store-conformance-support.d.ts +5 -5
- package/dist/application/process-lifecycle-transitions.d.ts +10 -2
- package/dist/application/process-lifecycle-transitions.d.ts.map +1 -1
- package/dist/browser/http.d.ts.map +1 -1
- package/dist/browser/socket-io-client.d.ts +6 -0
- package/dist/browser/socket-io-client.d.ts.map +1 -0
- package/dist/browser/socket-io-contract.d.ts +183 -0
- package/dist/browser/socket-io-contract.d.ts.map +1 -0
- package/dist/browser/socket-io-default-peer.d.ts +3 -0
- package/dist/browser/socket-io-default-peer.d.ts.map +1 -0
- package/dist/browser/socket-io-explicit-peer.d.ts +12 -0
- package/dist/browser/socket-io-explicit-peer.d.ts.map +1 -0
- package/dist/browser/socket-io-peer.d.ts +2 -11
- package/dist/browser/socket-io-peer.d.ts.map +1 -1
- package/dist/browser/socket-io.d.ts +5 -224
- package/dist/browser/socket-io.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/coding-tools.js +3 -3
- package/dist/entrypoints/agent-runtime/harness.js +6 -6
- package/dist/entrypoints/agent-runtime/realtime.js +4 -4
- package/dist/entrypoints/agent-runtime/sandbox.js +3 -3
- package/dist/entrypoints/agent-runtime.js +6 -6
- package/dist/entrypoints/application/directory-inbox.js +6 -6
- package/dist/entrypoints/application.js +17 -9
- package/dist/entrypoints/cli/publish.js +2 -2
- package/dist/entrypoints/cli.js +9 -9
- package/dist/entrypoints/contract.js +2 -2
- package/dist/entrypoints/files.js +1 -1
- package/dist/entrypoints/http.d.ts +6 -0
- package/dist/entrypoints/http.d.ts.map +1 -0
- package/dist/entrypoints/http.js +32 -0
- package/dist/entrypoints/index.js +21 -412
- package/dist/entrypoints/node.js +3 -3
- package/dist/entrypoints/observability.js +1 -1
- package/dist/entrypoints/process/owner-loss.js +1 -1
- package/dist/entrypoints/process.js +2 -2
- package/dist/entrypoints/react.js +1 -1
- package/dist/entrypoints/realtime.d.ts +6 -0
- package/dist/entrypoints/realtime.d.ts.map +1 -0
- package/dist/entrypoints/realtime.js +25 -0
- package/dist/entrypoints/remote.js +2 -2
- package/dist/entrypoints/server.js +8 -8
- package/dist/entrypoints/telegram/screens.js +6 -6
- package/dist/entrypoints/telegram.js +3 -3
- package/dist/entrypoints/testing.js +3 -3
- package/dist/entrypoints/tools/connections.js +3 -3
- package/dist/entrypoints/tools/invoker.js +3 -3
- package/dist/entrypoints/tools/mcp.js +4 -4
- package/dist/entrypoints/tools.js +24 -24
- package/dist/{index-3wm2xp2a.js → index-0d8m0kee.js} +1 -1
- package/dist/{index-5cw390s6.js → index-2tazbwhv.js} +6 -6
- package/dist/{index-hjvje0pf.js → index-506kd458.js} +1 -1
- package/dist/{index-dj1aycxw.js → index-84bf5spd.js} +0 -1
- package/dist/index-86sxnvpr.js +336 -0
- package/dist/{index-68y3n9j3.js → index-8rstkvcf.js} +3 -3
- package/dist/{index-tpk71wqn.js → index-924500c3.js} +1 -1
- package/dist/{index-kvvpw1kq.js → index-dd1z5kxb.js} +2 -2
- package/dist/{index-k3ty2b88.js → index-e1sjcjfy.js} +95 -20
- package/dist/{index-ryv32myz.js → index-ghwntn9n.js} +1 -1
- package/dist/index-hqsbtvta.js +92 -0
- package/dist/{index-e32vy8jw.js → index-jk44mbqb.js} +1 -1
- package/dist/{index-k4v2kq4q.js → index-mha6b4vk.js} +6 -6
- package/dist/{index-00v1qz76.js → index-p6apg0jg.js} +1 -1
- package/dist/{index-x5xs71dw.js → index-s2eybn7b.js} +8 -8
- package/dist/{index-njs9gvrh.js → index-s6d8zsha.js} +6 -6
- package/dist/{index-kc3jqqew.js → index-tjdsyrys.js} +2 -2
- package/dist/process/command-owner.d.ts.map +1 -1
- package/dist/process/group-presence.d.ts +3 -0
- package/dist/process/group-presence.d.ts.map +1 -0
- package/dist/process/group-settlement.d.ts +5 -0
- package/dist/process/group-settlement.d.ts.map +1 -0
- package/dist/process/group.d.ts.map +1 -1
- package/dist/process/output-drain.d.ts +1 -1
- package/dist/process/output-drain.d.ts.map +1 -1
- package/dist/process/owner-loss-control.d.ts.map +1 -1
- package/llms/application.2.txt +8 -5
- package/llms/application.3.txt +3 -0
- package/llms/http.txt +19 -0
- package/llms/realtime.txt +31 -0
- package/llms/stitchkit.txt +5 -3
- package/llms/{upgrading-0.101.0-0.109.0.txt → upgrading-0.101.0-0.110.0.txt} +13 -3
- package/llms/upgrading.txt +1 -1
- package/llms-full.txt +57 -8
- package/llms.txt +5 -3
- package/package.json +9 -1
- package/dist/{index-9j2atjte.js → index-2f9r0jgr.js} +3 -3
- package/dist/{index-299sm5tr.js → index-616xh7f2.js} +0 -0
- package/dist/{index-y70v24cw.js → index-8asb62xn.js} +0 -0
- package/dist/{index-k7qdkh3n.js → index-h1spd9kv.js} +3 -3
- package/dist/{index-qd8x73e8.js → index-k8fbzggr.js} +0 -0
- package/dist/{index-85qve8mq.js → index-pzw0fpek.js} +0 -0
- package/dist/{index-y3nemndz.js → index-r6v4mc67.js} +3 -3
- package/dist/{index-ktjmgq9p.js → index-s0xbnpfh.js} +3 -3
|
@@ -1,227 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Typed Socket.IO client — the family WebSocket client.
|
|
3
|
-
*
|
|
4
|
-
* The whole family runs on Socket.IO (`polling` fallback, heartbeat, acks,
|
|
5
|
-
* mature reconnection) — not a hand-rolled WebSocket. Every project copied the
|
|
6
|
-
* same ~150-line client: `io()` config, connection-state machine, a typed
|
|
7
|
-
* `on/emit`, a connection-change subscription. `createSocketIOClient` is that
|
|
8
|
-
* shared kernel.
|
|
9
|
-
*
|
|
10
|
-
* Subscriptions are durable: `on()` registers a handler once and the client
|
|
11
|
-
* re-attaches it onto every socket it builds — so a handler survives an
|
|
12
|
-
* explicit `disconnect()` / `connect()` cycle, and (because re-attach happens
|
|
13
|
-
* before `socket.connect()`) no handshake-time event is ever missed. A thin
|
|
14
|
-
* per-project layer can therefore subscribe once at construction.
|
|
15
|
-
*
|
|
16
|
-
* Auth identity (`userId`, `clientId`) is project-specific — it arrives in an
|
|
17
|
-
* app `authenticated` event — so it stays in that per-project layer on top.
|
|
18
|
-
* This client owns only the transport: connection lifecycle + typed events.
|
|
19
|
-
*
|
|
20
|
-
* The returned client satisfies `CacheBridgeSocket` (`on()` returns an
|
|
21
|
-
* unsubscribe), so it plugs straight into `createCacheBridge`.
|
|
22
|
-
*/
|
|
23
1
|
import type { RealtimeContract, RealtimeEventRegistry } from '../realtime/contract.js';
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* The mirror of `SocketIOPeerLoaders` on the server, and for the same reason.
|
|
30
|
-
* The specifier above is a variable, so no bundler can follow it — by
|
|
31
|
-
* construction, not by accident. A consumer who ships one self-contained file
|
|
32
|
-
* to a machine with no `node_modules` therefore had no way to get
|
|
33
|
-
* `socket.io-client` into the artifact, and learned about it at the first
|
|
34
|
-
* `connect()` rather than at build time. The only workaround was patching
|
|
35
|
-
* stitchkit's built `dist`, which breaks whenever its internal layout moves —
|
|
36
|
-
* exactly the dead end the server half was added to close.
|
|
37
|
-
*
|
|
38
|
-
* Passing a loader puts the literal in the CONSUMER's source, where their own
|
|
39
|
-
* bundler sees it statically and includes the package:
|
|
40
|
-
*
|
|
41
|
-
* ```ts
|
|
42
|
-
* createSocketIOClient({
|
|
43
|
-
* url,
|
|
44
|
-
* peers: { client: () => import('socket.io-client') },
|
|
45
|
-
* })
|
|
46
|
-
* ```
|
|
47
|
-
*
|
|
48
|
-
* A function rather than an already-resolved module, so laziness is unchanged:
|
|
49
|
-
* a project that never opens a socket still never loads it.
|
|
50
|
-
*/
|
|
51
|
-
export interface SocketIOClientPeerLoaders {
|
|
52
|
-
/**
|
|
53
|
-
* `() => import('socket.io-client')`.
|
|
54
|
-
*
|
|
55
|
-
* Typed as `unknown` and shape-checked where it is used — the same reason
|
|
56
|
-
* `SocketIOPeerLoaders.bunEngine` is. The root `stitchkit` entry is the
|
|
57
|
-
* browser-safe one, and its declarations must not name `socket.io-client`:
|
|
58
|
-
* a consumer who imports `createClient` and never opens a socket would then
|
|
59
|
-
* need the package installed just to TYPECHECK, which the consumer-lane peer
|
|
60
|
-
* budget refuses by name. The loader is still written the obvious way; only
|
|
61
|
-
* the type of what it returns is checked at the boundary rather than here,
|
|
62
|
-
* and a loader that returns the wrong module is refused by name at runtime.
|
|
63
|
-
*/
|
|
64
|
-
client?: () => Promise<unknown>;
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Socket.IO event map — `{ event: (...args) => void }`. Aliases Socket.IO's
|
|
68
|
-
* own event-map constraint, which intentionally maps to `any`: that is what
|
|
69
|
-
* lets a plain `interface ServerToClientEvents { … }` (no index signature) be
|
|
70
|
-
* passed as a type argument. The constraint lives here instead of importing
|
|
71
|
-
* Socket.IO's equivalent: the root HTTP client declarations must remain usable
|
|
72
|
-
* when no optional Socket.IO peer is installed. Per-event typing is fully
|
|
73
|
-
* preserved on the public `on` / `emit` signatures.
|
|
74
|
-
*/
|
|
75
|
-
export interface SocketEventMap {
|
|
76
|
-
[event: string]: any;
|
|
77
|
-
}
|
|
78
|
-
export interface SocketIOClientConfig<TServerEvents extends SocketEventMap = SocketEventMap> {
|
|
79
|
-
/** Server origin, e.g. `https://api.example.com`. */
|
|
80
|
-
url: string;
|
|
81
|
-
/** Socket.IO endpoint path. Default `/socket.io/`. */
|
|
82
|
-
path?: string;
|
|
83
|
-
/** Send cookies on the handshake (cookie-based auth). Default `true`. */
|
|
84
|
-
withCredentials?: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Handshake auth payload — token-based auth, the alternative to cookie auth
|
|
87
|
-
* (`withCredentials`). Reaches the server as `socket.handshake.auth`. A
|
|
88
|
-
* **function** is re-read on every (re)connect, so a rotated token is picked
|
|
89
|
-
* up automatically — no need to recreate the client (and lose durable
|
|
90
|
-
* subscriptions). The function may be async.
|
|
91
|
-
*/
|
|
92
|
-
auth?: Record<string, unknown> | (() => Record<string, unknown> | Promise<Record<string, unknown>>);
|
|
93
|
-
/** Extra query params on the handshake URL — reaches `socket.handshake.query`. */
|
|
94
|
-
query?: Record<string, string | number | boolean>;
|
|
95
|
-
/**
|
|
96
|
-
* Extra handshake headers. In a browser these apply to the **polling**
|
|
97
|
-
* transport only — a WebSocket upgrade cannot set request headers, so for
|
|
98
|
-
* browser WebSocket auth use `auth` instead. Useful from non-browser clients
|
|
99
|
-
* (Node/Bun server-to-server) where headers are honoured on every transport.
|
|
100
|
-
*/
|
|
101
|
-
extraHeaders?: Record<string, string>;
|
|
102
|
-
/** Transports, in preference order. Default `['websocket', 'polling']`. */
|
|
103
|
-
transports?: Array<'websocket' | 'polling'>;
|
|
104
|
-
/** Reconnection attempts. Default `Infinity`. */
|
|
105
|
-
reconnectionAttempts?: number;
|
|
106
|
-
/** Initial reconnection delay (ms). Default `1000`. */
|
|
107
|
-
reconnectionDelay?: number;
|
|
108
|
-
/** Max reconnection delay (ms). Default `5000`. */
|
|
109
|
-
reconnectionDelayMax?: number;
|
|
110
|
-
/** Connection timeout (ms). Default `20000`. */
|
|
111
|
-
timeout?: number;
|
|
112
|
-
/**
|
|
113
|
-
* Survive a **server-initiated** disconnect. When the server drops the socket
|
|
114
|
-
* (`socket.disconnect()` server-side, reason `io server disconnect`) Socket.IO
|
|
115
|
-
* does **not** auto-reconnect — by design the client is meant to stay down.
|
|
116
|
-
* That silently kills a long-lived client after a backend restart or an
|
|
117
|
-
* auth-gate drop: the WebSocket is gone for good and nothing recovers it.
|
|
118
|
-
*
|
|
119
|
-
* With this set, the client recycles itself instead — after the given delay it
|
|
120
|
-
* reconnects on the same socket, which re-reads the `auth` function (so a
|
|
121
|
-
* rotated token is picked up automatically, exactly like an ordinary
|
|
122
|
-
* reconnect). Other disconnect reasons (`transport close`, `ping timeout`, …)
|
|
123
|
-
* are untouched — Socket.IO's own reconnection already handles those.
|
|
124
|
-
*
|
|
125
|
-
* Set `false` to keep Socket.IO's default (stay disconnected). Default `1000` ms.
|
|
126
|
-
*/
|
|
127
|
-
reconnectOnServerDisconnect?: number | false;
|
|
128
|
-
/**
|
|
129
|
-
* Server → client events to **retain** ("sticky events"). The client keeps the
|
|
130
|
-
* last payload of each listed event and replays it to any handler subscribed
|
|
131
|
-
* afterwards (and on the next subscribe after a re-render), so a late
|
|
132
|
-
* subscriber catches up to the current state at once instead of waiting for the
|
|
133
|
-
* next emission. The retained value survives a `disconnect()` / `connect()`
|
|
134
|
-
* cycle. Only the first emitted argument of an event is retained.
|
|
135
|
-
*/
|
|
136
|
-
retain?: Array<keyof TServerEvents & string>;
|
|
137
|
-
/**
|
|
138
|
-
* Observe handshake/connection failures (`connect_error`). `terminal: true`
|
|
139
|
-
* means socket.io will NOT retry on its own — that is how a server-side
|
|
140
|
-
* handshake gate rejection (`io.use` middleware / the stitchkit `handshake`
|
|
141
|
-
* option, `data.code === 'handshake_rejected'`) arrives, unlike a
|
|
142
|
-
* transport-level failure which keeps retrying. On a terminal error the
|
|
143
|
-
* client resets its connection intent, so a later `connect()` starts a fresh
|
|
144
|
-
* attempt and re-reads a function-form `auth` — the recovery path after
|
|
145
|
-
* rotating a rejected token. For transport-level failures (server down) the
|
|
146
|
-
* hook fires once **per retry attempt** — debounce before wiring it to
|
|
147
|
-
* user-facing alerts.
|
|
148
|
-
*/
|
|
149
|
-
onConnectError?: (error: {
|
|
150
|
-
message: string;
|
|
151
|
-
data?: unknown;
|
|
152
|
-
terminal: boolean;
|
|
153
|
-
}) => void;
|
|
154
|
-
/**
|
|
155
|
-
* Observe every emit dropped because the socket was disconnected (the
|
|
156
|
-
* central alternative to guarding each call with `connected`). Receives the
|
|
157
|
-
* **wire** arguments — for a validated `RealtimeClient` that is the
|
|
158
|
-
* Zod-parsed values plus the wrapped ack callback, not the caller's original
|
|
159
|
-
* arguments. The drop itself is also reported by `emit` returning `false`.
|
|
160
|
-
*/
|
|
161
|
-
onDroppedEmit?: (dropped: {
|
|
162
|
-
event: string;
|
|
163
|
-
args: unknown[];
|
|
164
|
-
}) => void;
|
|
165
|
-
/**
|
|
166
|
-
* How to load the optional `socket.io-client` peer. Omit it and the peer is
|
|
167
|
-
* resolved lazily, exactly as before — this exists for a consumer who ships
|
|
168
|
-
* one self-contained artifact and needs the specifier to be a literal their
|
|
169
|
-
* own bundler can follow. → `SocketIOClientPeerLoaders`
|
|
170
|
-
*/
|
|
171
|
-
peers?: SocketIOClientPeerLoaders;
|
|
172
|
-
}
|
|
173
|
-
export interface SocketIOClient<TServerEvents extends SocketEventMap, TClientEvents extends SocketEventMap> {
|
|
174
|
-
/** Create the socket (if absent) and connect. Idempotent. */
|
|
175
|
-
connect(): void;
|
|
176
|
-
/** Disconnect and drop the socket instance. */
|
|
177
|
-
disconnect(): void;
|
|
178
|
-
/** True while the underlying socket is connected. */
|
|
179
|
-
readonly connected: boolean;
|
|
180
|
-
/**
|
|
181
|
-
* Subscribe to a server → client event. Returns an unsubscribe. The handler
|
|
182
|
-
* is durable — it is re-attached onto every socket the client builds, so it
|
|
183
|
-
* survives a `disconnect()` / `connect()` cycle.
|
|
184
|
-
*/
|
|
185
|
-
on<E extends keyof TServerEvents & string>(event: E, handler: TServerEvents[E]): () => void;
|
|
186
|
-
/**
|
|
187
|
-
* Emit a client → server event. Returns `true` when the event was handed to
|
|
188
|
-
* the transport (not a delivery guarantee) and `false` when it was dropped
|
|
189
|
-
* because the socket is disconnected — including the window while the lazy
|
|
190
|
-
* peer is still loading right after `connect()`. A drop also fires the
|
|
191
|
-
* `onDroppedEmit` hook. The default stays a drop (no buffering): after a
|
|
192
|
-
* reconnect the durable subscriptions replay state deterministically instead
|
|
193
|
-
* of an unordered backlog of stale emits.
|
|
194
|
-
*/
|
|
195
|
-
emit<E extends keyof TClientEvents & string>(event: E, ...args: Parameters<TClientEvents[E]>): boolean;
|
|
196
|
-
/**
|
|
197
|
-
* Low-level native Socket.IO acknowledgement request. Contract-aware callers
|
|
198
|
-
* should use `createRealtimeClient().request()`, which validates both sides.
|
|
199
|
-
*/
|
|
200
|
-
emitWithAck(event: string, args: unknown[], options: RealtimeRequestOptions): Promise<unknown>;
|
|
201
|
-
/**
|
|
202
|
-
* Subscribe to connection up/down changes. Returns an unsubscribe. On a
|
|
203
|
-
* disconnect the listener also receives the Socket.IO **reason** (e.g.
|
|
204
|
-
* `io server disconnect`, `transport close`, `ping timeout`) as a second
|
|
205
|
-
* argument — `undefined` on connect. The extra argument is additive: a
|
|
206
|
-
* `(connected: boolean) => void` listener keeps working unchanged.
|
|
207
|
-
*/
|
|
208
|
-
onConnectionChange(listener: (connected: boolean, reason?: string) => void): () => void;
|
|
209
|
-
}
|
|
210
|
-
/** Minimal Stitchkit client transport required by a validated realtime binding. */
|
|
211
|
-
export interface RealtimeClient<TServerToClient extends RealtimeEventRegistry, TClientToServer extends RealtimeEventRegistry> extends BoundRealtimeClient<TServerToClient, TClientToServer> {
|
|
212
|
-
connect(): void;
|
|
213
|
-
disconnect(): void;
|
|
214
|
-
}
|
|
215
|
-
export interface RealtimeClientOptions<TServerToClient extends RealtimeEventRegistry> extends BindRealtimeClientOptions, SocketIOClientConfig<{
|
|
216
|
-
[TEvent in keyof TServerToClient]: (...args: unknown[]) => void;
|
|
217
|
-
}> {
|
|
218
|
-
/**
|
|
219
|
-
* Observe bounded metadata-only phases of acknowledged requests. Engine.IO
|
|
220
|
-
* phases are local encoder/decoder boundaries, not remote send time or RTT.
|
|
221
|
-
* Observer failures are isolated from request lifecycle.
|
|
222
|
-
*/
|
|
223
|
-
onRequestPhase?: RealtimeRequestPhaseHook;
|
|
224
|
-
}
|
|
225
|
-
export declare function createRealtimeClient<const TServerToClient extends RealtimeEventRegistry, const TClientToServer extends RealtimeEventRegistry>(contract: RealtimeContract<TServerToClient, TClientToServer>, { onRejected, logger, onRequestPhase, ...config }: RealtimeClientOptions<TServerToClient>): RealtimeClient<TServerToClient, TClientToServer>;
|
|
2
|
+
import type { RealtimeClient, RealtimeClientOptions, SocketEventMap, SocketIOClient, SocketIOClientConfig } from './socket-io-contract.js';
|
|
3
|
+
export type { RealtimeClient, RealtimeClientOptions, SocketEventMap, SocketIOClient, SocketIOClientConfig, SocketIOClientPeerLoaders, } from './socket-io-contract.js';
|
|
4
|
+
/** Create a validated realtime client with durable subscriptions and typed requests. */
|
|
5
|
+
export declare function createRealtimeClient<const TServerToClient extends RealtimeEventRegistry, const TClientToServer extends RealtimeEventRegistry>(contract: RealtimeContract<TServerToClient, TClientToServer>, config: RealtimeClientOptions<TServerToClient>): RealtimeClient<TServerToClient, TClientToServer>;
|
|
6
|
+
/** Create the shared Socket.IO transport with durable subscriptions and explicit connection intent. */
|
|
226
7
|
export declare function createSocketIOClient<TServerEvents extends SocketEventMap, TClientEvents extends SocketEventMap>(config: SocketIOClientConfig<TServerEvents>): SocketIOClient<TServerEvents, TClientEvents>;
|
|
227
8
|
//# sourceMappingURL=socket-io.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"socket-io.d.ts","sourceRoot":"","sources":["../../src/browser/socket-io.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"socket-io.d.ts","sourceRoot":"","sources":["../../src/browser/socket-io.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAKpF,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAI9B,wFAAwF;AACxF,wBAAgB,oBAAoB,CAClC,KAAK,CAAC,eAAe,SAAS,qBAAqB,EACnD,KAAK,CAAC,eAAe,SAAS,qBAAqB,EAEnD,QAAQ,EAAE,gBAAgB,CAAC,eAAe,EAAE,eAAe,CAAC,EAC5D,MAAM,EAAE,qBAAqB,CAAC,eAAe,CAAC,GAC7C,cAAc,CAAC,eAAe,EAAE,eAAe,CAAC,CAElD;AAED,uGAAuG;AACvG,wBAAgB,oBAAoB,CAClC,aAAa,SAAS,cAAc,EACpC,aAAa,SAAS,cAAc,EACpC,MAAM,EAAE,oBAAoB,CAAC,aAAa,CAAC,GAAG,cAAc,CAAC,aAAa,EAAE,aAAa,CAAC,CAE3F"}
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
AgentCodingToolAuthorizationSchema2,
|
|
7
7
|
AgentCodingToolPathAuthorizationSchema2,
|
|
8
8
|
createAgentCodingTools2
|
|
9
|
-
} from "../../index-
|
|
9
|
+
} from "../../index-tjdsyrys.js";
|
|
10
10
|
import"../../index-2kbysk9s.js";
|
|
11
|
-
import"../../index-
|
|
11
|
+
import"../../index-84bf5spd.js";
|
|
12
12
|
import"../../index-8ks9b85e.js";
|
|
13
|
-
import"../../index-
|
|
13
|
+
import"../../index-e1sjcjfy.js";
|
|
14
14
|
import"../../index-zrtrjkbf.js";
|
|
15
15
|
import"../../index-636mggad.js";
|
|
16
16
|
export {
|
|
@@ -5,7 +5,7 @@ import"../../index-8kzct1d6.js";
|
|
|
5
5
|
import {
|
|
6
6
|
composeAgentPrompt2,
|
|
7
7
|
createAgentRuntime2
|
|
8
|
-
} from "../../index-
|
|
8
|
+
} from "../../index-924500c3.js";
|
|
9
9
|
import"../../index-qaet40b2.js";
|
|
10
10
|
import"../../index-mnkk1ffz.js";
|
|
11
11
|
import"../../index-fynr93w4.js";
|
|
@@ -13,19 +13,19 @@ import"../../index-t5sjh517.js";
|
|
|
13
13
|
import"../../index-cykxpxz5.js";
|
|
14
14
|
import"../../index-ct75c3at.js";
|
|
15
15
|
import"../../index-q6crhe1n.js";
|
|
16
|
-
import"../../index-
|
|
16
|
+
import"../../index-mha6b4vk.js";
|
|
17
17
|
import"../../index-c17xcx4k.js";
|
|
18
18
|
import"../../index-0gs4ymfj.js";
|
|
19
19
|
import"../../index-5w6t91ze.js";
|
|
20
20
|
import"../../index-2kbysk9s.js";
|
|
21
21
|
import"../../index-b0w7rbpt.js";
|
|
22
|
+
import {
|
|
23
|
+
createAgentHarnessControlServer2
|
|
24
|
+
} from "../../index-506kd458.js";
|
|
25
|
+
import"../../index-616xh7f2.js";
|
|
22
26
|
import {
|
|
23
27
|
walkContainedFiles
|
|
24
28
|
} from "../../index-zrtrjkbf.js";
|
|
25
|
-
import {
|
|
26
|
-
createAgentHarnessControlServer2
|
|
27
|
-
} from "../../index-hjvje0pf.js";
|
|
28
|
-
import"../../index-299sm5tr.js";
|
|
29
29
|
import {
|
|
30
30
|
defineRuntimeTool2
|
|
31
31
|
} from "../../index-636mggad.js";
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
agentControlRealtimeContract2
|
|
9
9
|
} from "../../index-yt7gyg5x.js";
|
|
10
10
|
import"../../index-qaet40b2.js";
|
|
11
|
-
import {
|
|
12
|
-
createAgentHarnessControlServer2
|
|
13
|
-
} from "../../index-hjvje0pf.js";
|
|
14
|
-
import"../../index-299sm5tr.js";
|
|
15
11
|
import {
|
|
16
12
|
bindRealtimeServer2
|
|
17
13
|
} from "../../index-xmgjtkvr.js";
|
|
14
|
+
import {
|
|
15
|
+
createAgentHarnessControlServer2
|
|
16
|
+
} from "../../index-506kd458.js";
|
|
17
|
+
import"../../index-616xh7f2.js";
|
|
18
18
|
import {
|
|
19
19
|
withSignalDeadline
|
|
20
20
|
} from "../../index-9tqbxv5p.js";
|
|
@@ -8,18 +8,18 @@ import"../../index-q6crhe1n.js";
|
|
|
8
8
|
import"../../index-fynr93w4.js";
|
|
9
9
|
import {
|
|
10
10
|
createAgentCodingTools2
|
|
11
|
-
} from "../../index-
|
|
11
|
+
} from "../../index-tjdsyrys.js";
|
|
12
12
|
import"../../index-2kbysk9s.js";
|
|
13
13
|
import {
|
|
14
14
|
COMMAND_CLEANUP_TIMEOUT_MS,
|
|
15
15
|
NativeCommandError2
|
|
16
|
-
} from "../../index-
|
|
16
|
+
} from "../../index-84bf5spd.js";
|
|
17
17
|
import {
|
|
18
18
|
spawnOwnedCommand,
|
|
19
19
|
nativeCommandOwner,
|
|
20
20
|
terminateOwnedGroup,
|
|
21
21
|
startNativeCommand
|
|
22
|
-
} from "../../index-
|
|
22
|
+
} from "../../index-e1sjcjfy.js";
|
|
23
23
|
import"../../index-zrtrjkbf.js";
|
|
24
24
|
import {
|
|
25
25
|
MAX_TIMER_MS
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
agentGoalStateSlot2,
|
|
112
112
|
agentTodoStateSlot2,
|
|
113
113
|
createAgentRuntime2
|
|
114
|
-
} from "../index-
|
|
114
|
+
} from "../index-924500c3.js";
|
|
115
115
|
import {
|
|
116
116
|
AgentConversationSummarySchema2,
|
|
117
117
|
AgentConversationPageSchema2,
|
|
@@ -122,12 +122,12 @@ import"../index-t5sjh517.js";
|
|
|
122
122
|
import"../index-cykxpxz5.js";
|
|
123
123
|
import"../index-ct75c3at.js";
|
|
124
124
|
import"../index-q6crhe1n.js";
|
|
125
|
-
import"../index-
|
|
126
|
-
import"../index-
|
|
125
|
+
import"../index-mha6b4vk.js";
|
|
126
|
+
import"../index-ghwntn9n.js";
|
|
127
127
|
import {
|
|
128
128
|
mountAgent2,
|
|
129
129
|
buildToolManifest2
|
|
130
|
-
} from "../index-
|
|
130
|
+
} from "../index-8rstkvcf.js";
|
|
131
131
|
import {
|
|
132
132
|
createBoundedSinkManager
|
|
133
133
|
} from "../index-qaet40b2.js";
|
|
@@ -186,14 +186,14 @@ import {
|
|
|
186
186
|
} from "../index-5p55xreg.js";
|
|
187
187
|
import {
|
|
188
188
|
createAgentRuntimeEventSink2
|
|
189
|
-
} from "../index-
|
|
189
|
+
} from "../index-616xh7f2.js";
|
|
190
190
|
import {
|
|
191
191
|
MAX_TIMER_MS
|
|
192
192
|
} from "../index-eemvahkc.js";
|
|
193
193
|
import {
|
|
194
194
|
assertPositiveSafeInteger
|
|
195
195
|
} from "../index-0s4xebbg.js";
|
|
196
|
-
import"../index-
|
|
196
|
+
import"../index-0d8m0kee.js";
|
|
197
197
|
import {
|
|
198
198
|
defineRuntimeTool2,
|
|
199
199
|
executableAgentRuntimeTools
|
|
@@ -23,12 +23,6 @@ import {
|
|
|
23
23
|
createFileStateStore2
|
|
24
24
|
} from "../../index-nx49x0tw.js";
|
|
25
25
|
import"../../index-w9mqgnz9.js";
|
|
26
|
-
import {
|
|
27
|
-
raceAbort
|
|
28
|
-
} from "../../index-b0kddvzw.js";
|
|
29
|
-
import {
|
|
30
|
-
isJsonData
|
|
31
|
-
} from "../../index-m6w6jtda.js";
|
|
32
26
|
import {
|
|
33
27
|
BoundedFileReadError,
|
|
34
28
|
openRegularFile,
|
|
@@ -41,6 +35,12 @@ import {
|
|
|
41
35
|
closeAfter,
|
|
42
36
|
publishAtomicFile
|
|
43
37
|
} from "../../index-b56nnscm.js";
|
|
38
|
+
import {
|
|
39
|
+
raceAbort
|
|
40
|
+
} from "../../index-b0kddvzw.js";
|
|
41
|
+
import {
|
|
42
|
+
isJsonData
|
|
43
|
+
} from "../../index-m6w6jtda.js";
|
|
44
44
|
import {
|
|
45
45
|
MAX_TIMER_MS
|
|
46
46
|
} from "../../index-eemvahkc.js";
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
ApplicationRestartResultSchema2,
|
|
78
78
|
ApplicationAdmissionError2,
|
|
79
79
|
createApplication2
|
|
80
|
-
} from "../index-
|
|
80
|
+
} from "../index-8asb62xn.js";
|
|
81
81
|
import"../index-rfkh44ss.js";
|
|
82
82
|
import {
|
|
83
83
|
diff,
|
|
@@ -98,12 +98,12 @@ import {
|
|
|
98
98
|
import {
|
|
99
99
|
measureSize2
|
|
100
100
|
} from "../index-e6c2spsd.js";
|
|
101
|
-
import {
|
|
102
|
-
argumentsDigest
|
|
103
|
-
} from "../index-r7a7r7ha.js";
|
|
104
101
|
import {
|
|
105
102
|
AppError2
|
|
106
103
|
} from "../index-j9gxbztg.js";
|
|
104
|
+
import {
|
|
105
|
+
argumentsDigest
|
|
106
|
+
} from "../index-r7a7r7ha.js";
|
|
107
107
|
import {
|
|
108
108
|
serializeCanonicalJson
|
|
109
109
|
} from "../index-zsvzhjtk.js";
|
|
@@ -1569,7 +1569,8 @@ var LifecycleTerminationSchema = z9.enum([
|
|
|
1569
1569
|
"forced",
|
|
1570
1570
|
"startup-failed",
|
|
1571
1571
|
"hot-reload",
|
|
1572
|
-
"abnormal"
|
|
1572
|
+
"abnormal",
|
|
1573
|
+
"interrupted"
|
|
1573
1574
|
]);
|
|
1574
1575
|
var timestamp = z9.string().datetime({ offset: true });
|
|
1575
1576
|
var LifecycleRunSchema = z9.object({
|
|
@@ -1593,7 +1594,8 @@ var PreviousExitSchema = z9.enum([
|
|
|
1593
1594
|
"forced",
|
|
1594
1595
|
"startup-failed",
|
|
1595
1596
|
"handoff",
|
|
1596
|
-
"abnormal"
|
|
1597
|
+
"abnormal",
|
|
1598
|
+
"interrupted"
|
|
1597
1599
|
]);
|
|
1598
1600
|
var emptyState = () => ({ schemaVersion: 1, runs: [] });
|
|
1599
1601
|
var epoch = (value) => Date.parse(value);
|
|
@@ -1625,7 +1627,12 @@ function previousExitOf(previous, run, overlap) {
|
|
|
1625
1627
|
const declared = isVersionChange(previous.version, run.version) ? overlap.versionChange : overlap.sameVersion;
|
|
1626
1628
|
if (declared === "handoff")
|
|
1627
1629
|
return "handoff";
|
|
1628
|
-
return previous
|
|
1630
|
+
return abandonedTermination(previous);
|
|
1631
|
+
}
|
|
1632
|
+
function abandonedTermination(run) {
|
|
1633
|
+
if (run.termination === "draining")
|
|
1634
|
+
return "interrupted";
|
|
1635
|
+
return run.readyAt === null ? "startup-failed" : "abnormal";
|
|
1629
1636
|
}
|
|
1630
1637
|
function closeAbandoned(candidate, previous, previousExit, run, overlap) {
|
|
1631
1638
|
if (!isOpenRun(candidate))
|
|
@@ -1640,7 +1647,7 @@ function closeAbandoned(candidate, previous, previousExit, run, overlap) {
|
|
|
1640
1647
|
return candidate;
|
|
1641
1648
|
return {
|
|
1642
1649
|
...closed,
|
|
1643
|
-
termination: candidate
|
|
1650
|
+
termination: abandonedTermination(candidate)
|
|
1644
1651
|
};
|
|
1645
1652
|
}
|
|
1646
1653
|
function transitionProcessStart(source, input) {
|
|
@@ -1681,7 +1688,8 @@ function transitionProcessStart(source, input) {
|
|
|
1681
1688
|
previousPid: previous?.pid ?? null,
|
|
1682
1689
|
previousVersion: previous?.version ?? null,
|
|
1683
1690
|
versionChanged: previous !== null && isVersionChange(previous.version, run.version),
|
|
1684
|
-
processGapMs
|
|
1691
|
+
processGapMs,
|
|
1692
|
+
previousDrainUpperBoundMs: previousExit === "interrupted" && previous?.unavailableAt !== null && previous?.unavailableAt !== undefined && epoch(run.startedAt) >= epoch(previous.unavailableAt) ? elapsed(run.startedAt, previous.unavailableAt) : null
|
|
1685
1693
|
}
|
|
1686
1694
|
};
|
|
1687
1695
|
}
|
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
gzipCliAsset,
|
|
16
16
|
decodeCliAsset,
|
|
17
17
|
compareCliVersions2
|
|
18
|
-
} from "../../index-
|
|
18
|
+
} from "../../index-s0xbnpfh.js";
|
|
19
19
|
import {
|
|
20
20
|
withExclusiveLock2
|
|
21
21
|
} from "../../index-w9mqgnz9.js";
|
|
22
22
|
import {
|
|
23
23
|
ManagedFileError2,
|
|
24
24
|
createManagedFileBoundary2
|
|
25
|
-
} from "../../index-
|
|
25
|
+
} from "../../index-2f9r0jgr.js";
|
|
26
26
|
import {
|
|
27
27
|
writeFileAtomic2
|
|
28
28
|
} from "../../index-07dcf2yn.js";
|
package/dist/entrypoints/cli.js
CHANGED
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
renderCliView2,
|
|
17
17
|
pollUntilDone2,
|
|
18
18
|
createCli2
|
|
19
|
-
} from "../index-
|
|
19
|
+
} from "../index-2tazbwhv.js";
|
|
20
20
|
import"../index-fynr93w4.js";
|
|
21
21
|
import"../index-ct75c3at.js";
|
|
22
22
|
import"../index-q6crhe1n.js";
|
|
23
|
-
import"../index-
|
|
24
|
-
import"../index-
|
|
23
|
+
import"../index-mha6b4vk.js";
|
|
24
|
+
import"../index-ghwntn9n.js";
|
|
25
25
|
import {
|
|
26
26
|
CliBuildSignatureSchema2,
|
|
27
27
|
cliManifestSigningPayload2,
|
|
@@ -40,21 +40,21 @@ import {
|
|
|
40
40
|
checkCliUpdate2,
|
|
41
41
|
applyCliUpdate2,
|
|
42
42
|
rollbackCliUpdate2
|
|
43
|
-
} from "../index-
|
|
43
|
+
} from "../index-s0xbnpfh.js";
|
|
44
44
|
import {
|
|
45
45
|
writeFileAtomicSync2
|
|
46
46
|
} from "../index-07dcf2yn.js";
|
|
47
|
-
import"../index-
|
|
47
|
+
import"../index-0d8m0kee.js";
|
|
48
48
|
import"../index-636mggad.js";
|
|
49
49
|
import {
|
|
50
|
-
|
|
51
|
-
} from "../index-
|
|
50
|
+
safeJsonParse
|
|
51
|
+
} from "../index-zsarb5xp.js";
|
|
52
52
|
import {
|
|
53
53
|
AppError2
|
|
54
54
|
} from "../index-j9gxbztg.js";
|
|
55
55
|
import {
|
|
56
|
-
|
|
57
|
-
} from "../index-
|
|
56
|
+
argumentsDigest
|
|
57
|
+
} from "../index-r7a7r7ha.js";
|
|
58
58
|
import {
|
|
59
59
|
isRecord
|
|
60
60
|
} from "../index-9jfdm5tg.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
paginatedSchema2,
|
|
5
5
|
encodeCursor2,
|
|
6
6
|
decodeCursor2
|
|
7
|
-
} from "../index-
|
|
7
|
+
} from "../index-k8fbzggr.js";
|
|
8
8
|
import {
|
|
9
9
|
DEFAULT_CONTRACT_STREAM_FRAME_BYTES2,
|
|
10
10
|
ContractStreamFrameSchema2
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
TOOL_TRANSPORTS2,
|
|
16
16
|
defineContract2
|
|
17
17
|
} from "../index-fsw1ybf3.js";
|
|
18
|
-
import"../index-m38ej7e5.js";
|
|
19
18
|
import {
|
|
20
19
|
ManagedFilePathSchema2,
|
|
21
20
|
ManagedFileRefSchema2
|
|
22
21
|
} from "../index-xqhede6x.js";
|
|
22
|
+
import"../index-m38ej7e5.js";
|
|
23
23
|
import {
|
|
24
24
|
AppError2,
|
|
25
25
|
notFound2,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** HTTP clients without the optional realtime peer graph; usable in React Native/Hermes. */
|
|
2
|
+
export { ApiError } from '../browser/api-error.js';
|
|
3
|
+
export { type ChunkedUploadConfig, type ChunkedUploadPart, type ChunkedUploadProgress, type ChunkedUploadStart, type ChunkSource, uploadInChunks, } from '../browser/chunked-upload.js';
|
|
4
|
+
export { type ClientConfig, type ClientContract, type ClientFetch, type ClientRegistryValue, type ContractClientConfig, contractEndpointMatchers, createClient, createClients, createScopedClients, createScopedUrlBuilders, createUrlBuilder, createUrlBuilders, type PathPrefixArgs, type RegistryScope, type ScopeClientConfigs, type ScopedClientRegistry, type ScopedUrlBuilderRegistry, type UrlBuilderConfig, } from '../browser/client.js';
|
|
5
|
+
export { type ApiEvent, type ApiEventListener, type ConfiguredHttpClient, createHttpClient, type HeaderProvider, type HttpClient, type HttpClientConfig, type RequestOptions, type UnauthorizedMatcher, } from '../browser/http.js';
|
|
6
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/entrypoints/http.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAChB,cAAc,GACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,wBAAwB,EACxB,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import"../index-m38ej7e5.js";
|
|
2
|
+
import"../index-h2fhjqy7.js";
|
|
3
|
+
import {
|
|
4
|
+
createHttpClient2
|
|
5
|
+
} from "../index-p6apg0jg.js";
|
|
6
|
+
import {
|
|
7
|
+
uploadInChunks2
|
|
8
|
+
} from "../index-hqsbtvta.js";
|
|
9
|
+
import {
|
|
10
|
+
contractEndpointMatchers2,
|
|
11
|
+
createClient2,
|
|
12
|
+
createClients2,
|
|
13
|
+
createScopedClients2,
|
|
14
|
+
createUrlBuilder2,
|
|
15
|
+
createUrlBuilders2,
|
|
16
|
+
createScopedUrlBuilders2
|
|
17
|
+
} from "../index-jk44mbqb.js";
|
|
18
|
+
import {
|
|
19
|
+
ApiError2
|
|
20
|
+
} from "../index-kfjkb396.js";
|
|
21
|
+
export {
|
|
22
|
+
ApiError2 as ApiError,
|
|
23
|
+
contractEndpointMatchers2 as contractEndpointMatchers,
|
|
24
|
+
createClient2 as createClient,
|
|
25
|
+
createClients2 as createClients,
|
|
26
|
+
createHttpClient2 as createHttpClient,
|
|
27
|
+
createScopedClients2 as createScopedClients,
|
|
28
|
+
createScopedUrlBuilders2 as createScopedUrlBuilders,
|
|
29
|
+
createUrlBuilder2 as createUrlBuilder,
|
|
30
|
+
createUrlBuilders2 as createUrlBuilders,
|
|
31
|
+
uploadInChunks2 as uploadInChunks
|
|
32
|
+
};
|