@rstreamlabs/webtty 1.11.2 → 1.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +100 -28
- package/dist/{chunk-2XNLPDKP.mjs → chunk-BSMXY5EO.mjs} +1097 -130
- package/dist/index.d.mts +188 -7
- package/dist/index.d.ts +188 -7
- package/dist/index.js +1099 -130
- package/dist/index.mjs +5 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/node.js +1099 -130
- package/dist/node.mjs +5 -1
- package/examples/filesystem-sidecar/package.json +3 -3
- package/examples/remote-command/README.md +15 -0
- package/examples/remote-command/package.json +3 -3
- package/examples/remote-command/src/main.ts +3 -1
- package/package.json +8 -8
package/dist/index.d.mts
CHANGED
|
@@ -2429,6 +2429,16 @@ declare namespace rstream {
|
|
|
2429
2429
|
type $Shape = rstream.webtty.protobuf.Attach.$Properties;
|
|
2430
2430
|
}
|
|
2431
2431
|
|
|
2432
|
+
/** SessionCapability enum. */
|
|
2433
|
+
enum SessionCapability {
|
|
2434
|
+
|
|
2435
|
+
/** SESSION_CAPABILITY_UNSPECIFIED value */
|
|
2436
|
+
SESSION_CAPABILITY_UNSPECIFIED = 0,
|
|
2437
|
+
|
|
2438
|
+
/** SESSION_CAPABILITY_TERMINATE value */
|
|
2439
|
+
SESSION_CAPABILITY_TERMINATE = 1
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2432
2442
|
/**
|
|
2433
2443
|
* Properties of an Ack.
|
|
2434
2444
|
* @deprecated Use rstream.webtty.protobuf.Ack.$Properties instead.
|
|
@@ -2448,6 +2458,12 @@ declare namespace rstream {
|
|
|
2448
2458
|
/** Unknown fields preserved while decoding when enabled */
|
|
2449
2459
|
$unknowns?: Uint8Array[];
|
|
2450
2460
|
|
|
2461
|
+
/** Ack capabilities. */
|
|
2462
|
+
capabilities: rstream.webtty.protobuf.SessionCapability[];
|
|
2463
|
+
|
|
2464
|
+
/** Ack managedSessionId. */
|
|
2465
|
+
managedSessionId: string;
|
|
2466
|
+
|
|
2451
2467
|
/**
|
|
2452
2468
|
* Creates a new Ack instance using the specified properties.
|
|
2453
2469
|
* @param [properties] Properties to set
|
|
@@ -2532,6 +2548,12 @@ declare namespace rstream {
|
|
|
2532
2548
|
/** Properties of an Ack. */
|
|
2533
2549
|
interface $Properties {
|
|
2534
2550
|
|
|
2551
|
+
/** Ack capabilities */
|
|
2552
|
+
capabilities?: (rstream.webtty.protobuf.SessionCapability[]|null);
|
|
2553
|
+
|
|
2554
|
+
/** Ack managedSessionId */
|
|
2555
|
+
managedSessionId?: (string|null);
|
|
2556
|
+
|
|
2535
2557
|
/** Unknown fields preserved while decoding when enabled */
|
|
2536
2558
|
$unknowns?: Uint8Array[];
|
|
2537
2559
|
}
|
|
@@ -2540,6 +2562,117 @@ declare namespace rstream {
|
|
|
2540
2562
|
type $Shape = rstream.webtty.protobuf.Ack.$Properties;
|
|
2541
2563
|
}
|
|
2542
2564
|
|
|
2565
|
+
/**
|
|
2566
|
+
* Properties of a Terminate.
|
|
2567
|
+
* @deprecated Use rstream.webtty.protobuf.Terminate.$Properties instead.
|
|
2568
|
+
*/
|
|
2569
|
+
interface ITerminate extends rstream.webtty.protobuf.Terminate.$Properties {
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
/** Represents a Terminate. */
|
|
2573
|
+
class Terminate {
|
|
2574
|
+
|
|
2575
|
+
/**
|
|
2576
|
+
* Constructs a new Terminate.
|
|
2577
|
+
* @param [properties] Properties to set
|
|
2578
|
+
*/
|
|
2579
|
+
constructor(properties?: rstream.webtty.protobuf.Terminate.$Properties);
|
|
2580
|
+
|
|
2581
|
+
/** Unknown fields preserved while decoding when enabled */
|
|
2582
|
+
$unknowns?: Uint8Array[];
|
|
2583
|
+
|
|
2584
|
+
/**
|
|
2585
|
+
* Creates a new Terminate instance using the specified properties.
|
|
2586
|
+
* @param [properties] Properties to set
|
|
2587
|
+
* @returns Terminate instance
|
|
2588
|
+
*/
|
|
2589
|
+
static create(properties: rstream.webtty.protobuf.Terminate.$Shape): rstream.webtty.protobuf.Terminate & rstream.webtty.protobuf.Terminate.$Shape;
|
|
2590
|
+
static create(properties?: rstream.webtty.protobuf.Terminate.$Properties): rstream.webtty.protobuf.Terminate;
|
|
2591
|
+
|
|
2592
|
+
/**
|
|
2593
|
+
* Encodes the specified Terminate message. Does not implicitly {@link rstream.webtty.protobuf.Terminate.verify|verify} messages.
|
|
2594
|
+
* @param message Terminate message or plain object to encode
|
|
2595
|
+
* @param [writer] Writer to encode to
|
|
2596
|
+
* @returns Writer
|
|
2597
|
+
*/
|
|
2598
|
+
static encode(message: rstream.webtty.protobuf.Terminate.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
2599
|
+
|
|
2600
|
+
/**
|
|
2601
|
+
* Encodes the specified Terminate message, length delimited. Does not implicitly {@link rstream.webtty.protobuf.Terminate.verify|verify} messages.
|
|
2602
|
+
* @param message Terminate message or plain object to encode
|
|
2603
|
+
* @param [writer] Writer to encode to
|
|
2604
|
+
* @returns Writer
|
|
2605
|
+
*/
|
|
2606
|
+
static encodeDelimited(message: rstream.webtty.protobuf.Terminate.$Properties, writer?: $protobuf.Writer): $protobuf.Writer;
|
|
2607
|
+
|
|
2608
|
+
/**
|
|
2609
|
+
* Decodes a Terminate message from the specified reader or buffer.
|
|
2610
|
+
* @param reader Reader or buffer to decode from
|
|
2611
|
+
* @param [length] Message length if known beforehand
|
|
2612
|
+
* @returns {rstream.webtty.protobuf.Terminate & rstream.webtty.protobuf.Terminate.$Shape} Terminate
|
|
2613
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2614
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2615
|
+
*/
|
|
2616
|
+
static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): rstream.webtty.protobuf.Terminate & rstream.webtty.protobuf.Terminate.$Shape;
|
|
2617
|
+
|
|
2618
|
+
/**
|
|
2619
|
+
* Decodes a Terminate message from the specified reader or buffer, length delimited.
|
|
2620
|
+
* @param reader Reader or buffer to decode from
|
|
2621
|
+
* @returns {rstream.webtty.protobuf.Terminate & rstream.webtty.protobuf.Terminate.$Shape} Terminate
|
|
2622
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
2623
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
2624
|
+
*/
|
|
2625
|
+
static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): rstream.webtty.protobuf.Terminate & rstream.webtty.protobuf.Terminate.$Shape;
|
|
2626
|
+
|
|
2627
|
+
/**
|
|
2628
|
+
* Verifies a Terminate message.
|
|
2629
|
+
* @param message Plain object to verify
|
|
2630
|
+
* @returns `null` if valid, otherwise the reason why it is not
|
|
2631
|
+
*/
|
|
2632
|
+
static verify(message: { [k: string]: any }): (string|null);
|
|
2633
|
+
|
|
2634
|
+
/**
|
|
2635
|
+
* Creates a Terminate message from a plain object. Also converts values to their respective internal types.
|
|
2636
|
+
* @param object Plain object
|
|
2637
|
+
* @returns Terminate
|
|
2638
|
+
*/
|
|
2639
|
+
static fromObject(object: { [k: string]: any }): rstream.webtty.protobuf.Terminate;
|
|
2640
|
+
|
|
2641
|
+
/**
|
|
2642
|
+
* Creates a plain object from a Terminate message. Also converts values to other types if specified.
|
|
2643
|
+
* @param message Terminate
|
|
2644
|
+
* @param [options] Conversion options
|
|
2645
|
+
* @returns Plain object
|
|
2646
|
+
*/
|
|
2647
|
+
static toObject(message: rstream.webtty.protobuf.Terminate, options?: $protobuf.IConversionOptions): { [k: string]: any };
|
|
2648
|
+
|
|
2649
|
+
/**
|
|
2650
|
+
* Converts this Terminate to JSON.
|
|
2651
|
+
* @returns JSON object
|
|
2652
|
+
*/
|
|
2653
|
+
toJSON(): { [k: string]: any };
|
|
2654
|
+
|
|
2655
|
+
/**
|
|
2656
|
+
* Gets the type url for Terminate
|
|
2657
|
+
* @param [prefix] Custom type url prefix, defaults to `"type.googleapis.com"`
|
|
2658
|
+
* @returns The type url
|
|
2659
|
+
*/
|
|
2660
|
+
static getTypeUrl(prefix?: string): string;
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2663
|
+
namespace Terminate {
|
|
2664
|
+
|
|
2665
|
+
/** Properties of a Terminate. */
|
|
2666
|
+
interface $Properties {
|
|
2667
|
+
|
|
2668
|
+
/** Unknown fields preserved while decoding when enabled */
|
|
2669
|
+
$unknowns?: Uint8Array[];
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2672
|
+
/** Shape of a Terminate. */
|
|
2673
|
+
type $Shape = rstream.webtty.protobuf.Terminate.$Properties;
|
|
2674
|
+
}
|
|
2675
|
+
|
|
2543
2676
|
/**
|
|
2544
2677
|
* Properties of an Error.
|
|
2545
2678
|
* @deprecated Use rstream.webtty.protobuf.Error.$Properties instead.
|
|
@@ -3602,8 +3735,11 @@ declare namespace rstream {
|
|
|
3602
3735
|
/** Message clientHello. */
|
|
3603
3736
|
clientHello?: (rstream.webtty.protobuf.ClientHello.$Properties|null);
|
|
3604
3737
|
|
|
3738
|
+
/** Message terminate. */
|
|
3739
|
+
terminate?: (rstream.webtty.protobuf.Terminate.$Properties|null);
|
|
3740
|
+
|
|
3605
3741
|
/** Message payload. */
|
|
3606
|
-
payload?: ("open"|"ack"|"error"|"close"|"data"|"parameter"|"heartbeat"|"attach"|"serverHello"|"protocolError"|"clientHello");
|
|
3742
|
+
payload?: ("open"|"ack"|"error"|"close"|"data"|"parameter"|"heartbeat"|"attach"|"serverHello"|"protocolError"|"clientHello"|"terminate");
|
|
3607
3743
|
|
|
3608
3744
|
/**
|
|
3609
3745
|
* Creates a new Message instance using the specified properties.
|
|
@@ -3722,8 +3858,11 @@ declare namespace rstream {
|
|
|
3722
3858
|
/** Message clientHello */
|
|
3723
3859
|
clientHello?: (rstream.webtty.protobuf.ClientHello.$Properties|null);
|
|
3724
3860
|
|
|
3861
|
+
/** Message terminate */
|
|
3862
|
+
terminate?: (rstream.webtty.protobuf.Terminate.$Properties|null);
|
|
3863
|
+
|
|
3725
3864
|
/** Message payload */
|
|
3726
|
-
payload?: ("open"|"ack"|"error"|"close"|"data"|"parameter"|"heartbeat"|"attach"|"serverHello"|"protocolError"|"clientHello");
|
|
3865
|
+
payload?: ("open"|"ack"|"error"|"close"|"data"|"parameter"|"heartbeat"|"attach"|"serverHello"|"protocolError"|"clientHello"|"terminate");
|
|
3727
3866
|
|
|
3728
3867
|
/** Unknown fields preserved while decoding when enabled */
|
|
3729
3868
|
$unknowns?: Uint8Array[];
|
|
@@ -3742,9 +3881,10 @@ declare namespace rstream {
|
|
|
3742
3881
|
serverHello?: rstream.webtty.protobuf.ServerHello.$Shape|null;
|
|
3743
3882
|
protocolError?: rstream.webtty.protobuf.ProtocolError.$Shape|null;
|
|
3744
3883
|
clientHello?: rstream.webtty.protobuf.ClientHello.$Shape|null;
|
|
3884
|
+
terminate?: rstream.webtty.protobuf.Terminate.$Shape|null;
|
|
3745
3885
|
$unknowns?: Uint8Array[];
|
|
3746
3886
|
} & (
|
|
3747
|
-
({ payload?: undefined; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null }|{ payload?: "open"; open: rstream.webtty.protobuf.Open.$Shape; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null }|{ payload?: "ack"; open?: null; ack: rstream.webtty.protobuf.Ack.$Shape; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null }|{ payload?: "error"; open?: null; ack?: null; error: rstream.webtty.protobuf.Error.$Shape; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null }|{ payload?: "close"; open?: null; ack?: null; error?: null; close: rstream.webtty.protobuf.Close.$Shape; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null }|{ payload?: "data"; open?: null; ack?: null; error?: null; close?: null; data: rstream.webtty.protobuf.Data.$Shape; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null }|{ payload?: "parameter"; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter: rstream.webtty.protobuf.Parameter.$Shape; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null }|{ payload?: "heartbeat"; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat: rstream.webtty.protobuf.Heartbeat.$Shape; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null }|{ payload?: "attach"; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach: rstream.webtty.protobuf.Attach.$Shape; serverHello?: null; protocolError?: null; clientHello?: null }|{ payload?: "serverHello"; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello: rstream.webtty.protobuf.ServerHello.$Shape; protocolError?: null; clientHello?: null }|{ payload?: "protocolError"; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError: rstream.webtty.protobuf.ProtocolError.$Shape; clientHello?: null }|{ payload?: "clientHello"; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello: rstream.webtty.protobuf.ClientHello.$Shape })
|
|
3887
|
+
({ payload?: undefined; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null; terminate?: null }|{ payload?: "open"; open: rstream.webtty.protobuf.Open.$Shape; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null; terminate?: null }|{ payload?: "ack"; open?: null; ack: rstream.webtty.protobuf.Ack.$Shape; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null; terminate?: null }|{ payload?: "error"; open?: null; ack?: null; error: rstream.webtty.protobuf.Error.$Shape; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null; terminate?: null }|{ payload?: "close"; open?: null; ack?: null; error?: null; close: rstream.webtty.protobuf.Close.$Shape; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null; terminate?: null }|{ payload?: "data"; open?: null; ack?: null; error?: null; close?: null; data: rstream.webtty.protobuf.Data.$Shape; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null; terminate?: null }|{ payload?: "parameter"; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter: rstream.webtty.protobuf.Parameter.$Shape; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null; terminate?: null }|{ payload?: "heartbeat"; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat: rstream.webtty.protobuf.Heartbeat.$Shape; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null; terminate?: null }|{ payload?: "attach"; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach: rstream.webtty.protobuf.Attach.$Shape; serverHello?: null; protocolError?: null; clientHello?: null; terminate?: null }|{ payload?: "serverHello"; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello: rstream.webtty.protobuf.ServerHello.$Shape; protocolError?: null; clientHello?: null; terminate?: null }|{ payload?: "protocolError"; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError: rstream.webtty.protobuf.ProtocolError.$Shape; clientHello?: null; terminate?: null }|{ payload?: "clientHello"; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello: rstream.webtty.protobuf.ClientHello.$Shape; terminate?: null }|{ payload?: "terminate"; open?: null; ack?: null; error?: null; close?: null; data?: null; parameter?: null; heartbeat?: null; attach?: null; serverHello?: null; protocolError?: null; clientHello?: null; terminate: rstream.webtty.protobuf.Terminate.$Shape })
|
|
3748
3888
|
);
|
|
3749
3889
|
}
|
|
3750
3890
|
}
|
|
@@ -4812,6 +4952,20 @@ declare namespace google {
|
|
|
4812
4952
|
}
|
|
4813
4953
|
}
|
|
4814
4954
|
|
|
4955
|
+
interface WebTTYManagedCapabilities {
|
|
4956
|
+
managed_protocol: boolean;
|
|
4957
|
+
detached_execution?: boolean;
|
|
4958
|
+
explicit_termination?: boolean;
|
|
4959
|
+
execution_transports?: readonly (WebTTYClientTransport | "plain")[];
|
|
4960
|
+
max_execution_seconds?: number;
|
|
4961
|
+
}
|
|
4962
|
+
interface WebTTYManagedSessionConfig {
|
|
4963
|
+
/** Fetch from the same Engine's WebTTY capabilities API before connecting. */
|
|
4964
|
+
capabilities: WebTTYManagedCapabilities;
|
|
4965
|
+
/** Positive seconds opt a new non-interactive command into detached execution. */
|
|
4966
|
+
executionSeconds?: number;
|
|
4967
|
+
}
|
|
4968
|
+
|
|
4815
4969
|
type MaybePromise<T> = T | Promise<T>;
|
|
4816
4970
|
/**
|
|
4817
4971
|
* Client-level configuration for WebTTY.
|
|
@@ -4845,6 +4999,8 @@ interface WebTTYClientConfig {
|
|
|
4845
4999
|
* terminal bytes still flow through the WebTTY protobuf stream.
|
|
4846
5000
|
*/
|
|
4847
5001
|
attach?: WebTTYAttachConfig;
|
|
5002
|
+
/** Engine capabilities and optional detached execution budget. */
|
|
5003
|
+
managed?: WebTTYManagedSessionConfig;
|
|
4848
5004
|
/**
|
|
4849
5005
|
* Whether to send heartbeats to keep the session alive.
|
|
4850
5006
|
*
|
|
@@ -5105,6 +5261,9 @@ declare class WebTTY {
|
|
|
5105
5261
|
private stdinClosed;
|
|
5106
5262
|
private stderrClosed;
|
|
5107
5263
|
private stdoutClosed;
|
|
5264
|
+
private terminationSupported;
|
|
5265
|
+
private terminationRequested;
|
|
5266
|
+
private confirmedManagedSessionId;
|
|
5108
5267
|
/**
|
|
5109
5268
|
* Creates a new WebTTY instance.
|
|
5110
5269
|
*
|
|
@@ -5140,9 +5299,12 @@ declare class WebTTY {
|
|
|
5140
5299
|
*/
|
|
5141
5300
|
resize(rows: number, cols: number, xpixel?: number, ypixel?: number): void;
|
|
5142
5301
|
/**
|
|
5143
|
-
*
|
|
5302
|
+
* Disconnects this reader. Managed detached execution continues remotely.
|
|
5144
5303
|
*/
|
|
5145
5304
|
disconnect(): void;
|
|
5305
|
+
get managedSessionId(): string | undefined;
|
|
5306
|
+
canTerminate(): boolean;
|
|
5307
|
+
requestTermination(): void;
|
|
5146
5308
|
private handleOpen;
|
|
5147
5309
|
private sendClientHello;
|
|
5148
5310
|
private sendAttach;
|
|
@@ -5290,7 +5452,9 @@ type WebTTYURLProvider = string | URL | (() => Promise<string | URL> | string |
|
|
|
5290
5452
|
type WebTTYCommandOutput = "both" | "stderr" | "stdout";
|
|
5291
5453
|
type WebTTYCommandStream = "stderr" | "stdout";
|
|
5292
5454
|
interface WebTTYRemoteExecutorConfig {
|
|
5455
|
+
webSocketFactory?: WebTTYWebSocketFactory;
|
|
5293
5456
|
execPath?: string;
|
|
5457
|
+
managed?: WebTTYManagedSessionConfig;
|
|
5294
5458
|
heartbeatIntervalMs?: number;
|
|
5295
5459
|
sendHeartbeat?: boolean;
|
|
5296
5460
|
url: WebTTYURLProvider;
|
|
@@ -5298,12 +5462,19 @@ interface WebTTYRemoteExecutorConfig {
|
|
|
5298
5462
|
interface WebTTYCommandReadOptions {
|
|
5299
5463
|
signal?: AbortSignal;
|
|
5300
5464
|
}
|
|
5465
|
+
interface WebTTYCommandTerminationOptions extends WebTTYCommandReadOptions {
|
|
5466
|
+
timeoutMs?: number;
|
|
5467
|
+
}
|
|
5301
5468
|
interface ExecuteWebTTYCommandOptions extends WebTTYExecutionConfig {
|
|
5302
5469
|
execPath?: string;
|
|
5303
5470
|
input?: string | Uint8Array;
|
|
5471
|
+
maxOutputBytes?: number;
|
|
5304
5472
|
signal?: AbortSignal;
|
|
5305
5473
|
timeoutMs?: number;
|
|
5306
5474
|
}
|
|
5475
|
+
declare class WebTTYCommandOutputLimitError extends Error {
|
|
5476
|
+
constructor(message: string);
|
|
5477
|
+
}
|
|
5307
5478
|
interface WebTTYRunCommandOptions extends Omit<ExecuteWebTTYCommandOptions, "cmdArgs" | "envVars" | "input" | "workdir"> {
|
|
5308
5479
|
cwd?: string;
|
|
5309
5480
|
env?: Record<string, string | undefined>;
|
|
@@ -5337,13 +5508,19 @@ declare class WebTTYCommand {
|
|
|
5337
5508
|
private readonly stdoutChannel;
|
|
5338
5509
|
private readonly timer;
|
|
5339
5510
|
private readonly webtty;
|
|
5511
|
+
private readonly maxOutputBytes;
|
|
5512
|
+
private capturedBytes;
|
|
5513
|
+
private capturedChunks;
|
|
5514
|
+
private outputLimitReached;
|
|
5340
5515
|
private settled;
|
|
5341
5516
|
exitCode: number | null;
|
|
5342
5517
|
readonly stdin: WritableStream<Uint8Array> | undefined;
|
|
5343
5518
|
constructor(client: WebTTYClientConfig, options: ExecuteWebTTYCommandOptions);
|
|
5344
5519
|
closeStdin(): Promise<void>;
|
|
5345
5520
|
disconnect(): void;
|
|
5346
|
-
|
|
5521
|
+
get managedSessionId(): string | undefined;
|
|
5522
|
+
ready(options?: WebTTYCommandReadOptions): Promise<void>;
|
|
5523
|
+
kill(options?: WebTTYCommandTerminationOptions): Promise<void>;
|
|
5347
5524
|
logBytes(): AsyncGenerator<WebTTYCommandLogBytes, void, void>;
|
|
5348
5525
|
logs(): AsyncGenerator<WebTTYCommandLog, void, void>;
|
|
5349
5526
|
output(stream?: WebTTYCommandOutput, options?: WebTTYCommandReadOptions): Promise<string>;
|
|
@@ -5354,9 +5531,11 @@ declare class WebTTYCommand {
|
|
|
5354
5531
|
stdoutBytes(options?: WebTTYCommandReadOptions): Promise<Uint8Array>;
|
|
5355
5532
|
stdoutStream(): ReadableStream<Uint8Array>;
|
|
5356
5533
|
wait(options?: WebTTYCommandReadOptions): Promise<WebTTYCommandStatus>;
|
|
5357
|
-
terminate(): Promise<void>;
|
|
5534
|
+
terminate(options?: WebTTYCommandTerminationOptions): Promise<void>;
|
|
5358
5535
|
writeStdin(input: string | Uint8Array): Promise<void>;
|
|
5359
5536
|
private append;
|
|
5537
|
+
private outputLimit;
|
|
5538
|
+
private terminateAfterConnect;
|
|
5360
5539
|
private clearTimer;
|
|
5361
5540
|
private complete;
|
|
5362
5541
|
private connect;
|
|
@@ -5446,4 +5625,6 @@ declare function decryptWebTTYRecordedTextLog(events: readonly WebTTYRecordedSes
|
|
|
5446
5625
|
declare function createWebTTYE2EReplayPayloadCryptoFromKeyGrant(grant: WebTTYRecordedKeyGrantDecryptMaterial, identity: WebTTYE2EIdentity): Promise<WebTTYE2EPayloadCrypto>;
|
|
5447
5626
|
declare function renderWebTTYRecordedTextLog(events: readonly WebTTYRecordedSessionEvent[], chunks: readonly WebTTYReplayChunk[], options?: WebTTYRecordedTextLogOptions): WebTTYRecordedTextLog;
|
|
5448
5627
|
|
|
5449
|
-
|
|
5628
|
+
declare function redactEndpointCredentials(message: string, endpoint: string | URL): string;
|
|
5629
|
+
|
|
5630
|
+
export { type ExecuteWebTTYCommandOptions, WebTTY, type WebTTYAttachCapability, type WebTTYAttachConfig, type WebTTYAttachRole, type WebTTYAuthRequirement, type WebTTYClientConfig, type WebTTYClientEndpointIdentity, type WebTTYClientProofTranscript, type WebTTYClientTransport, WebTTYCommand, type WebTTYCommandLog, type WebTTYCommandLogBytes, type WebTTYCommandOutput, WebTTYCommandOutputLimitError, type WebTTYCommandReadOptions, type WebTTYCommandResult, type WebTTYCommandStatus, type WebTTYCommandStream, type WebTTYCommandTerminationOptions, type WebTTYE2EIdentity, type WebTTYE2EKeyContextConfig, type WebTTYE2EKeyContextRecipient, type WebTTYE2EKeyEnvelopeSuite, type WebTTYE2EKeyMaterial, type WebTTYE2EPayloadCipherSuite, type WebTTYE2EPayloadCrypto, type WebTTYE2EPayloadCryptoConfig, type WebTTYE2ERecipient, type WebTTYE2ERecipientKind, type WebTTYEncryptedPayload, type WebTTYEvents, type WebTTYExecutionConfig, type WebTTYExpectedServerIdentity, WebTTYFileSystem, type WebTTYFileSystemConfig, WebTTYFileSystemError, type WebTTYFileSystemItem, type WebTTYFileSystemMkdirOptions, type WebTTYFileSystemReadFileOptions, type WebTTYFileSystemReaddirOptions, type WebTTYFileSystemRequestOptions, type WebTTYFileSystemRmOptions, type WebTTYFileSystemWriteData, type WebTTYFileSystemWriteFileOptions, type WebTTYFileSystemWriteStreamOptions, type WebTTYKeyEnvelope, type WebTTYKeyEnvelopeSuite, type WebTTYManagedCapabilities, type WebTTYManagedSessionConfig, type WebTTYOpenCapability, type WebTTYPayloadCipherSuite, type WebTTYPayloadCrypto, type WebTTYPayloadCryptoInfo, type WebTTYPayloadCryptoMetadata, type WebTTYProofSignature, type WebTTYRecordedCryptoMetadata, type WebTTYRecordedKeyGrantDecryptMaterial, type WebTTYRecordedSessionEvent, type WebTTYRecordedStreamType, type WebTTYRecordedTextLog, type WebTTYRecordedTextLogOptions, WebTTYRemoteExecutor, type WebTTYRemoteExecutorConfig, type WebTTYReplayChunk, type WebTTYRunCommandOptions, type WebTTYServerProofTranscript, type WebTTYSessionKeyGrant, type WebTTYSignatureSuite, type WebTTYSigningIdentity, type WebTTYURLProvider, type WebTTYWebSocket, type WebTTYWebSocketEvents, type WebTTYWebSocketFactory, type WebTTYWebTransportCertificateHash, type WebTTYWebTransportOptions, createWebTTYE2EClientPayloadCrypto, createWebTTYE2EKeyContext, createWebTTYE2EReplayPayloadCryptoFromKeyGrant, createWebTTYE2EServerPayloadCrypto, decodeWebTTYE2EKeyMaterial, decryptWebTTYRecordedEvent, decryptWebTTYRecordedTextLog, encodeWebTTYE2EKeyMaterial, executeWebTTYCommand, generateWebTTYE2EIdentity, generateWebTTYSigningIdentity, hashWebTTYAttachGrant, hashWebTTYClientCredential, hashWebTTYClientProofTranscript, hashWebTTYConfig, hashWebTTYServerProofTranscript, hashWebTTYSessionKeyGrant, openWebTTYCommand, redactEndpointCredentials, renderWebTTYRecordedTextLog, resolveWebTTYExecutionURL, resolveWebTTYFileSystemURL, runWebTTYCommand, signWebTTYClientProofTranscript, signWebTTYServerProofTranscript, verifyWebTTYClientProofTranscript, verifyWebTTYServerProofTranscript, webTTYClientProofTranscriptBytes, webTTYE2EKeyID, webTTYFIPSCompatibleKeyEnvelopeSuite, webTTYFIPSCompatiblePayloadSuite, webTTYRecordedEventEncryptedPayload, webTTYServerProofTranscriptBytes, webTTYSigningKeyID };
|