@sealant/sdk 0.15.0 → 0.16.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.
@@ -210,6 +210,9 @@ const openForward = (ctx, workspaceId, port, options) => {
210
210
  if (options?.host !== undefined) {
211
211
  url.searchParams.set("host", options.host);
212
212
  }
213
+ if (options?.protocol === "udp") {
214
+ url.searchParams.set("protocol", "udp");
215
+ }
213
216
  if (config.apiKey === undefined) {
214
217
  url.searchParams.set("ownerUserId", config.hostLocal.ownerUserId);
215
218
  }
package/dist/types.d.ts CHANGED
@@ -221,7 +221,7 @@ export interface Workspace {
221
221
  readonly in?: string | null;
222
222
  }): Promise<void>;
223
223
  /**
224
- * Open a raw TCP byte pipe INSIDE the workspace — the primitive for
224
+ * Open a raw TCP byte pipe (or a UDP datagram pipe) INSIDE the workspace — the primitive for
225
225
  * reaching a dev server or database the workspace runs. Protocol-agnostic:
226
226
  * nothing inspects or records the payload. One held WebSocket per forward;
227
227
  * rejects when nothing accepts the connection. The target host is a CLOSED
@@ -235,6 +235,13 @@ export interface Workspace {
235
235
  export interface WorkspaceForwardOptions {
236
236
  /** Target inside the workspace: its loopback (default) or the Docker sidecar. */
237
237
  readonly host?: "127.0.0.1" | "localhost" | "docker";
238
+ /**
239
+ * Forward transport. TCP (default) is a byte stream; `"udp"` opens a
240
+ * connected UDP socket where one frame on this pipe is exactly one
241
+ * datagram, both directions. UDP has no connection handshake: opening
242
+ * succeeds even when nothing listens yet — datagrams simply drop.
243
+ */
244
+ readonly protocol?: "tcp" | "udp";
238
245
  }
239
246
  /**
240
247
  * A live port forward — one WebSocket, held until `close()` or the remote
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sealant/sdk",
3
- "version": "0.15.0",
3
+ "version": "0.16.0",
4
4
  "description": "The fluent public SDK for Sealant — create a workspace, run a harness, replay the record.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -26,7 +26,7 @@
26
26
  "access": "public"
27
27
  },
28
28
  "dependencies": {
29
- "@sealant/api-contracts": "^0.15.0"
29
+ "@sealant/api-contracts": "^0.16.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@effect/vitest": "4.0.0-beta.85",