@sealant/sdk 0.20.0 → 0.21.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.
|
@@ -758,6 +758,7 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
|
|
|
758
758
|
readonly cwd?: string | undefined;
|
|
759
759
|
readonly cols: number;
|
|
760
760
|
readonly rows: number;
|
|
761
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
761
762
|
readonly exitCode?: number | undefined;
|
|
762
763
|
readonly exitSignal?: number | undefined;
|
|
763
764
|
readonly errorMessage?: string | undefined;
|
|
@@ -783,6 +784,7 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
|
|
|
783
784
|
readonly cols?: number | undefined;
|
|
784
785
|
readonly rows?: number | undefined;
|
|
785
786
|
readonly term?: string | undefined;
|
|
787
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
786
788
|
readonly metadata?: {
|
|
787
789
|
readonly [x: string]: unknown;
|
|
788
790
|
} | undefined;
|
|
@@ -798,6 +800,7 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
|
|
|
798
800
|
readonly cwd?: string | undefined;
|
|
799
801
|
readonly cols: number;
|
|
800
802
|
readonly rows: number;
|
|
803
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
801
804
|
readonly exitCode?: number | undefined;
|
|
802
805
|
readonly exitSignal?: number | undefined;
|
|
803
806
|
readonly errorMessage?: string | undefined;
|
|
@@ -829,6 +832,7 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
|
|
|
829
832
|
readonly cwd?: string | undefined;
|
|
830
833
|
readonly cols: number;
|
|
831
834
|
readonly rows: number;
|
|
835
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
832
836
|
readonly exitCode?: number | undefined;
|
|
833
837
|
readonly exitSignal?: number | undefined;
|
|
834
838
|
readonly errorMessage?: string | undefined;
|
|
@@ -883,6 +887,7 @@ declare const buildControlPlaneClient: (config: SealantInternalConfig) => Effect
|
|
|
883
887
|
readonly cwd?: string | undefined;
|
|
884
888
|
readonly cols: number;
|
|
885
889
|
readonly rows: number;
|
|
890
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
886
891
|
readonly exitCode?: number | undefined;
|
|
887
892
|
readonly exitSignal?: number | undefined;
|
|
888
893
|
readonly errorMessage?: string | undefined;
|
|
@@ -2079,6 +2084,7 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
|
|
|
2079
2084
|
readonly cwd?: string | undefined;
|
|
2080
2085
|
readonly cols: number;
|
|
2081
2086
|
readonly rows: number;
|
|
2087
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
2082
2088
|
readonly exitCode?: number | undefined;
|
|
2083
2089
|
readonly exitSignal?: number | undefined;
|
|
2084
2090
|
readonly errorMessage?: string | undefined;
|
|
@@ -2104,6 +2110,7 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
|
|
|
2104
2110
|
readonly cols?: number | undefined;
|
|
2105
2111
|
readonly rows?: number | undefined;
|
|
2106
2112
|
readonly term?: string | undefined;
|
|
2113
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
2107
2114
|
readonly metadata?: {
|
|
2108
2115
|
readonly [x: string]: unknown;
|
|
2109
2116
|
} | undefined;
|
|
@@ -2119,6 +2126,7 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
|
|
|
2119
2126
|
readonly cwd?: string | undefined;
|
|
2120
2127
|
readonly cols: number;
|
|
2121
2128
|
readonly rows: number;
|
|
2129
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
2122
2130
|
readonly exitCode?: number | undefined;
|
|
2123
2131
|
readonly exitSignal?: number | undefined;
|
|
2124
2132
|
readonly errorMessage?: string | undefined;
|
|
@@ -2150,6 +2158,7 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
|
|
|
2150
2158
|
readonly cwd?: string | undefined;
|
|
2151
2159
|
readonly cols: number;
|
|
2152
2160
|
readonly rows: number;
|
|
2161
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
2153
2162
|
readonly exitCode?: number | undefined;
|
|
2154
2163
|
readonly exitSignal?: number | undefined;
|
|
2155
2164
|
readonly errorMessage?: string | undefined;
|
|
@@ -2204,6 +2213,7 @@ declare const SealantApiClient_base: Context.ServiceClass<SealantApiClient, "@se
|
|
|
2204
2213
|
readonly cwd?: string | undefined;
|
|
2205
2214
|
readonly cols: number;
|
|
2206
2215
|
readonly rows: number;
|
|
2216
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
2207
2217
|
readonly exitCode?: number | undefined;
|
|
2208
2218
|
readonly exitSignal?: number | undefined;
|
|
2209
2219
|
readonly errorMessage?: string | undefined;
|
|
@@ -345,6 +345,7 @@ export declare const createSessionOp: (payload: {
|
|
|
345
345
|
readonly cols?: number | undefined;
|
|
346
346
|
readonly rows?: number | undefined;
|
|
347
347
|
readonly term?: string | undefined;
|
|
348
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
348
349
|
readonly metadata?: {
|
|
349
350
|
readonly [x: string]: unknown;
|
|
350
351
|
} | undefined;
|
|
@@ -358,6 +359,7 @@ export declare const createSessionOp: (payload: {
|
|
|
358
359
|
readonly cwd?: string | undefined;
|
|
359
360
|
readonly cols: number;
|
|
360
361
|
readonly rows: number;
|
|
362
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
361
363
|
readonly exitCode?: number | undefined;
|
|
362
364
|
readonly exitSignal?: number | undefined;
|
|
363
365
|
readonly errorMessage?: string | undefined;
|
|
@@ -378,6 +380,7 @@ export declare const getSessionOp: (sessionId: string, ownerUserId?: string | un
|
|
|
378
380
|
readonly cwd?: string | undefined;
|
|
379
381
|
readonly cols: number;
|
|
380
382
|
readonly rows: number;
|
|
383
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
381
384
|
readonly exitCode?: number | undefined;
|
|
382
385
|
readonly exitSignal?: number | undefined;
|
|
383
386
|
readonly errorMessage?: string | undefined;
|
|
@@ -404,6 +407,7 @@ export declare const listSessionsOp: (query: {
|
|
|
404
407
|
readonly cwd?: string | undefined;
|
|
405
408
|
readonly cols: number;
|
|
406
409
|
readonly rows: number;
|
|
410
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
407
411
|
readonly exitCode?: number | undefined;
|
|
408
412
|
readonly exitSignal?: number | undefined;
|
|
409
413
|
readonly errorMessage?: string | undefined;
|
|
@@ -459,6 +463,7 @@ export declare const closeSessionOp: (sessionId: string, payload: {
|
|
|
459
463
|
readonly cwd?: string | undefined;
|
|
460
464
|
readonly cols: number;
|
|
461
465
|
readonly rows: number;
|
|
466
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
462
467
|
readonly exitCode?: number | undefined;
|
|
463
468
|
readonly exitSignal?: number | undefined;
|
|
464
469
|
readonly errorMessage?: string | undefined;
|
package/dist/facade/session.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare const makeInteractiveSession: (ctx: SdkContext, wire: {
|
|
|
10
10
|
readonly cwd?: string | undefined;
|
|
11
11
|
readonly cols: number;
|
|
12
12
|
readonly rows: number;
|
|
13
|
+
readonly mode?: "pipe" | "pty" | undefined;
|
|
13
14
|
readonly exitCode?: number | undefined;
|
|
14
15
|
readonly exitSignal?: number | undefined;
|
|
15
16
|
readonly errorMessage?: string | undefined;
|
package/dist/facade/session.js
CHANGED
|
@@ -202,6 +202,7 @@ export const makeInteractiveSession = (ctx, wire) => {
|
|
|
202
202
|
id: sessionId,
|
|
203
203
|
workspaceId: wire.workspaceId,
|
|
204
204
|
runId: wire.runId,
|
|
205
|
+
mode: wire.mode ?? "pty",
|
|
205
206
|
send: async (input) => {
|
|
206
207
|
const bytes = typeof input === "string" ? new TextEncoder().encode(input) : input;
|
|
207
208
|
await ctx.runtime.run(sendSessionInputOp(sessionId, {
|
package/dist/facade/workspace.js
CHANGED
|
@@ -34,6 +34,7 @@ export const makeWorkspace = (ctx, init) => {
|
|
|
34
34
|
...(options?.cols === undefined ? {} : { cols: options.cols }),
|
|
35
35
|
...(options?.rows === undefined ? {} : { rows: options.rows }),
|
|
36
36
|
...(options?.term === undefined ? {} : { term: options.term }),
|
|
37
|
+
...(options?.mode === undefined ? {} : { mode: options.mode }),
|
|
37
38
|
...(options?.metadata === undefined ? {} : { metadata: { ...options.metadata } }),
|
|
38
39
|
}));
|
|
39
40
|
return makeInteractiveSession(ctx, created);
|
package/dist/types.d.ts
CHANGED
|
@@ -367,14 +367,24 @@ export interface RunOptions {
|
|
|
367
367
|
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
368
368
|
}
|
|
369
369
|
/** Options for opening an interactive PTY session. */
|
|
370
|
+
/**
|
|
371
|
+
* How a session's leader is wired. `pty` (default) allocates a pseudoterminal — interactive
|
|
372
|
+
* shells and TUIs. `pipe` gives the leader plain stdio pipes and no tty — the shape for processes
|
|
373
|
+
* that speak a byte protocol over stdin/stdout (JSON-RPC / NDJSON servers such as
|
|
374
|
+
* `codex app-server`): `send` feeds stdin, `output`/`attach` carry stdout byte-exact, stderr is
|
|
375
|
+
* recorded as diagnostics only, and `resize` is rejected.
|
|
376
|
+
*/
|
|
377
|
+
export type SessionMode = "pty" | "pipe";
|
|
370
378
|
export interface SessionOptions {
|
|
371
379
|
/** Working directory inside the workspace (defaults to the repository root). */
|
|
372
380
|
readonly cwd?: string;
|
|
373
|
-
/** Extra environment for the
|
|
381
|
+
/** Extra environment for the session process (not for secrets — use `credentials`). */
|
|
374
382
|
readonly env?: Readonly<Record<string, string>>;
|
|
375
383
|
readonly cols?: number;
|
|
376
384
|
readonly rows?: number;
|
|
377
385
|
readonly term?: string;
|
|
386
|
+
/** Leader wiring; defaults to `pty`. `cols`/`rows`/`term` are ignored for `pipe`. */
|
|
387
|
+
readonly mode?: SessionMode;
|
|
378
388
|
/** Opaque correlation bag, stored verbatim and echoed on reads. */
|
|
379
389
|
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
380
390
|
}
|
|
@@ -705,7 +715,9 @@ export interface InteractiveSession {
|
|
|
705
715
|
readonly workspaceId: string;
|
|
706
716
|
/** The run recording this session — its record is the durable, replayable evidence. */
|
|
707
717
|
readonly runId: string;
|
|
708
|
-
/**
|
|
718
|
+
/** Leader wiring: a pseudoterminal or plain stdio pipes. */
|
|
719
|
+
readonly mode: SessionMode;
|
|
720
|
+
/** Send input: keystrokes to a PTY, bytes to a pipe leader's stdin. Strings are UTF-8-encoded. */
|
|
709
721
|
send(input: string | Uint8Array): Promise<void>;
|
|
710
722
|
/**
|
|
711
723
|
* Byte-exact output as a RESUMABLE stream: recorded history from `from` (inclusive; default the
|
|
@@ -716,7 +728,7 @@ export interface InteractiveSession {
|
|
|
716
728
|
readonly from?: bigint;
|
|
717
729
|
readonly signal?: AbortSignal;
|
|
718
730
|
}): AsyncIterable<SessionOutputChunk>;
|
|
719
|
-
/** Resize the PTY. */
|
|
731
|
+
/** Resize the PTY. Rejected for `pipe` sessions, which have no terminal. */
|
|
720
732
|
resize(cols: number, rows: number): Promise<void>;
|
|
721
733
|
/** Deliver a POSIX signal to the session's process (e.g. 2 = SIGINT). */
|
|
722
734
|
signal(signal: number): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sealant/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.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.
|
|
29
|
+
"@sealant/api-contracts": "^0.21.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@effect/vitest": "4.0.0-beta.85",
|