@paperclipai/plugin-sdk 2026.824.0-canary.7 → 2026.824.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/dist/bundlers.js +2 -2
- package/dist/define-plugin.d.ts +7 -26
- package/dist/define-plugin.d.ts.map +1 -1
- package/dist/define-plugin.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/protocol.d.ts +23 -149
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +6 -14
- package/dist/protocol.js.map +1 -1
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +1 -9
- package/dist/testing.js.map +1 -1
- package/dist/types.d.ts +3 -38
- package/dist/types.d.ts.map +1 -1
- package/dist/worker-rpc-host.d.ts.map +1 -1
- package/dist/worker-rpc-host.js +36 -109
- package/dist/worker-rpc-host.js.map +1 -1
- package/package.json +5 -8
- package/dist/protocol.duplex-channel.test.d.ts +0 -2
- package/dist/protocol.duplex-channel.test.d.ts.map +0 -1
- package/dist/protocol.duplex-channel.test.js +0 -188
- package/dist/protocol.duplex-channel.test.js.map +0 -1
package/dist/bundlers.js
CHANGED
|
@@ -30,7 +30,7 @@ export function createPluginBundlerPresets(input = {}) {
|
|
|
30
30
|
bundle: true,
|
|
31
31
|
format: "esm",
|
|
32
32
|
platform: "node",
|
|
33
|
-
target: "
|
|
33
|
+
target: "node20",
|
|
34
34
|
sourcemap,
|
|
35
35
|
minify,
|
|
36
36
|
external: ["react", "react-dom"],
|
|
@@ -41,7 +41,7 @@ export function createPluginBundlerPresets(input = {}) {
|
|
|
41
41
|
bundle: true,
|
|
42
42
|
format: "esm",
|
|
43
43
|
platform: "node",
|
|
44
|
-
target: "
|
|
44
|
+
target: "node20",
|
|
45
45
|
sourcemap,
|
|
46
46
|
external: ["@paperclipai/plugin-sdk"],
|
|
47
47
|
};
|
package/dist/define-plugin.d.ts
CHANGED
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
51
|
import type { PluginContext } from "./types.js";
|
|
52
|
-
import type { PluginEnvironmentAcquireLeaseParams, PluginEnvironmentDestroyLeaseParams, PluginEnvironmentExecuteParams, PluginEnvironmentExecuteResult, PluginEnvironmentSyncInParams, PluginEnvironmentSyncOutParams, PluginEnvironmentSyncResult, PluginEnvironmentStartInteractiveSetupParams, PluginEnvironmentInteractiveSetupSession, PluginEnvironmentGetInteractiveSetupParams, PluginEnvironmentCaptureTemplateParams, PluginEnvironmentCaptureTemplateResult, PluginEnvironmentCancelInteractiveSetupParams, PluginEnvironmentCancelInteractiveSetupResult, PluginEnvironmentDeleteTemplateParams, PluginEnvironmentDeleteTemplateResult, PluginEnvironmentLease, PluginEnvironmentProbeParams, PluginEnvironmentProbeResult, PluginEnvironmentRealizeWorkspaceParams, PluginEnvironmentRealizeWorkspaceResult, PluginEnvironmentReleaseLeaseParams, PluginEnvironmentResumeLeaseParams, PluginEnvironmentValidateConfigParams, PluginEnvironmentValidationResult, DetectExternalObjectsParams, DetectExternalObjectsResult, ResolveExternalObjectParams, PluginExternalObjectResolveResult, RefreshExternalObjectsParams, RefreshExternalObjectsResult,
|
|
52
|
+
import type { PluginEnvironmentAcquireLeaseParams, PluginEnvironmentDestroyLeaseParams, PluginEnvironmentExecuteParams, PluginEnvironmentExecuteResult, PluginEnvironmentSyncInParams, PluginEnvironmentSyncOutParams, PluginEnvironmentSyncResult, PluginEnvironmentStartInteractiveSetupParams, PluginEnvironmentInteractiveSetupSession, PluginEnvironmentGetInteractiveSetupParams, PluginEnvironmentCaptureTemplateParams, PluginEnvironmentCaptureTemplateResult, PluginEnvironmentCancelInteractiveSetupParams, PluginEnvironmentCancelInteractiveSetupResult, PluginEnvironmentDeleteTemplateParams, PluginEnvironmentDeleteTemplateResult, PluginEnvironmentLease, PluginEnvironmentProbeParams, PluginEnvironmentProbeResult, PluginEnvironmentRealizeWorkspaceParams, PluginEnvironmentRealizeWorkspaceResult, PluginEnvironmentReleaseLeaseParams, PluginEnvironmentResumeLeaseParams, PluginEnvironmentValidateConfigParams, PluginEnvironmentValidationResult, DetectExternalObjectsParams, DetectExternalObjectsResult, ResolveExternalObjectParams, PluginExternalObjectResolveResult, RefreshExternalObjectsParams, RefreshExternalObjectsResult, PluginSetupTokenPtyOpenParams, PluginSetupTokenPtyOpenResult, PluginSetupTokenPtyInputParams, PluginSetupTokenPtyStopParams, PluginSetupTokenPtyCloseParams, PluginSetupTokenPtyCloseResult } from "./protocol.js";
|
|
53
53
|
/**
|
|
54
54
|
* Optional plugin-reported diagnostics returned from the `health()` RPC method.
|
|
55
55
|
*
|
|
@@ -312,39 +312,20 @@ export interface PluginDefinition {
|
|
|
312
312
|
* Called to open one live Claude `setup-token` login pseudo-terminal.
|
|
313
313
|
* The worker registers the terminal under the host route identifier and returns a
|
|
314
314
|
* worker session identifier for the output notification binding only. The worker
|
|
315
|
-
* streams output and the exit through `ctx.
|
|
316
|
-
* Defining the four `
|
|
315
|
+
* streams output and the exit through `ctx.setupTokenPty`, never as a reply.
|
|
316
|
+
* Defining the four `onSetupTokenPty*` hooks advertises the four methods.
|
|
317
317
|
*/
|
|
318
|
-
|
|
318
|
+
onSetupTokenPtyOpen?(params: PluginSetupTokenPtyOpenParams): Promise<PluginSetupTokenPtyOpenResult>;
|
|
319
319
|
/** Called to write delayed input to an open login pseudo-terminal, keyed by the worker session identifier. */
|
|
320
|
-
|
|
320
|
+
onSetupTokenPtyInput?(params: PluginSetupTokenPtyInputParams): Promise<void>;
|
|
321
321
|
/** Called to stop an open login pseudo-terminal child, keyed by the worker session identifier. */
|
|
322
|
-
|
|
322
|
+
onSetupTokenPtyStop?(params: PluginSetupTokenPtyStopParams): Promise<void>;
|
|
323
323
|
/**
|
|
324
324
|
* Called to close an open login pseudo-terminal by the host route identifier. The
|
|
325
325
|
* worker closes the exact terminal registered under that identifier and returns a
|
|
326
326
|
* close acknowledgement that carries the same identifier.
|
|
327
327
|
*/
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
* Called to open one persistent duplex channel. The worker registers the
|
|
331
|
-
* channel under the host route identifier and returns a worker session
|
|
332
|
-
* identifier for the data notification binding only. The worker streams data
|
|
333
|
-
* and the exit through worker→host notifications, never as a reply. Defining
|
|
334
|
-
* the four `onDuplexChannel*` hooks advertises the four methods. The host reads
|
|
335
|
-
* the open verb to gate the `duplexCommandStream` capability.
|
|
336
|
-
*/
|
|
337
|
-
onDuplexChannelOpen?(params: PluginDuplexChannelOpenParams): Promise<PluginDuplexChannelOpenResult>;
|
|
338
|
-
/** Called to write raw input to an open duplex channel, keyed by the worker session identifier. */
|
|
339
|
-
onDuplexChannelWrite?(params: PluginDuplexChannelWriteParams): Promise<void>;
|
|
340
|
-
/** Called to stop an open duplex channel child, keyed by the worker session identifier. */
|
|
341
|
-
onDuplexChannelStop?(params: PluginDuplexChannelStopParams): Promise<void>;
|
|
342
|
-
/**
|
|
343
|
-
* Called to close an open duplex channel by the host route identifier. The
|
|
344
|
-
* worker closes the exact channel registered under that identifier and returns
|
|
345
|
-
* a close acknowledgement that carries the same identifier.
|
|
346
|
-
*/
|
|
347
|
-
onDuplexChannelClose?(params: PluginDuplexChannelCloseParams): Promise<PluginDuplexChannelCloseResult>;
|
|
328
|
+
onSetupTokenPtyClose?(params: PluginSetupTokenPtyCloseParams): Promise<PluginSetupTokenPtyCloseResult>;
|
|
348
329
|
}
|
|
349
330
|
/**
|
|
350
331
|
* The sealed plugin object returned by `definePlugin()`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-plugin.d.ts","sourceRoot":"","sources":["../src/define-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EACV,mCAAmC,E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BAAgB,CAAC;CACvC;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,gBAAgB,GAAG,eAAe,CAE1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define-plugin.js","sourceRoot":"","sources":["../src/define-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;
|
|
1
|
+
{"version":3,"file":"define-plugin.js","sourceRoot":"","sources":["../src/define-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AAobH,8EAA8E;AAC9E,mCAAmC;AACnC,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,YAAY,CAAC,UAA4B;IACvD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;AACvC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export { createPluginBundlerPresets } from "./bundlers.js";
|
|
|
50
50
|
export { startPluginDevServer, getUiBuildSnapshot } from "./dev-server.js";
|
|
51
51
|
export { startWorkerRpcHost, runWorker } from "./worker-rpc-host.js";
|
|
52
52
|
export { createHostClientHandlers, getRequiredCapability, CapabilityDeniedError, InvocationScopeDeniedError, } from "./host-client-factory.js";
|
|
53
|
-
export { JSONRPC_VERSION, JSONRPC_ERROR_CODES, PLUGIN_RPC_ERROR_CODES, HOST_TO_WORKER_REQUIRED_METHODS, HOST_TO_WORKER_OPTIONAL_METHODS, MESSAGE_DELIMITER, createRequest, createSuccessResponse, createErrorResponse, createNotification, isJsonRpcRequest, isJsonRpcNotification, isJsonRpcResponse, isJsonRpcSuccessResponse, isJsonRpcErrorResponse, serializeMessage, parseMessage, JsonRpcParseError, JsonRpcCallError,
|
|
53
|
+
export { JSONRPC_VERSION, JSONRPC_ERROR_CODES, PLUGIN_RPC_ERROR_CODES, HOST_TO_WORKER_REQUIRED_METHODS, HOST_TO_WORKER_OPTIONAL_METHODS, MESSAGE_DELIMITER, createRequest, createSuccessResponse, createErrorResponse, createNotification, isJsonRpcRequest, isJsonRpcNotification, isJsonRpcResponse, isJsonRpcSuccessResponse, isJsonRpcErrorResponse, serializeMessage, parseMessage, JsonRpcParseError, JsonRpcCallError, SETUP_TOKEN_PTY_OUTPUT_NOTIFICATION, SETUP_TOKEN_PTY_EXIT_NOTIFICATION, _resetIdCounter, } from "./protocol.js";
|
|
54
54
|
export type { PluginDefinition, PaperclipPlugin, PluginHealthDiagnostics, PluginConfigChangeContext, PluginConfigValidationResult, PluginWebhookInput, PluginApiRequestInput, PluginApiResponse, } from "./define-plugin.js";
|
|
55
55
|
export type { TestHarness, TestHarnessOptions, TestHarnessLogEntry, EnvironmentTestHarness, EnvironmentTestHarnessOptions, EnvironmentEventRecord, FakeEnvironmentDriverOptions, } from "./testing.js";
|
|
56
56
|
export type { PluginBundlerPresetInput, PluginBundlerPresets, EsbuildLikeOptions, RollupLikeConfig, } from "./bundlers.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAMH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,mCAAmC,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC/Q,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAA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B,8BAA8B,EAC9B,6BAA6B,EAC7B,iCAAiC,EACjC,4BAA4B,EAC5B,YAAY,EACZ,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EACnB,+BAA+B,EAC/B,+BAA+B,EAC/B,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,+BAA+B,EAC/B,yBAAyB,EACzB,4BAA4B,EAC5B,qBAAqB,EACrB,kCAAkC,EAClC,wCAAwC,EACxC,YAAY,EACZ,6BAA6B,EAC7B,qBAAqB,EACrB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,+BAA+B,EAC/B,oBAAoB,EACpB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,6BAA6B,EAC7B,sBAAsB,EACtB,4BAA4B,EAC5B,oBAAoB,EACpB,eAAe,EACf,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAMpB;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,EAC3B,+CAA+C,EAC/C,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,gCAAgC,EAChC,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,8BAA8B,EAC9B,oCAAoC,EACpC,mBAAmB,EACnB,eAAe,GAChB,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -54,7 +54,7 @@ export { startPluginDevServer, getUiBuildSnapshot } from "./dev-server.js";
|
|
|
54
54
|
export { startWorkerRpcHost, runWorker } from "./worker-rpc-host.js";
|
|
55
55
|
export { createHostClientHandlers, getRequiredCapability, CapabilityDeniedError, InvocationScopeDeniedError, } from "./host-client-factory.js";
|
|
56
56
|
// JSON-RPC protocol helpers and constants
|
|
57
|
-
export { JSONRPC_VERSION, JSONRPC_ERROR_CODES, PLUGIN_RPC_ERROR_CODES, HOST_TO_WORKER_REQUIRED_METHODS, HOST_TO_WORKER_OPTIONAL_METHODS, MESSAGE_DELIMITER, createRequest, createSuccessResponse, createErrorResponse, createNotification, isJsonRpcRequest, isJsonRpcNotification, isJsonRpcResponse, isJsonRpcSuccessResponse, isJsonRpcErrorResponse, serializeMessage, parseMessage, JsonRpcParseError, JsonRpcCallError,
|
|
57
|
+
export { JSONRPC_VERSION, JSONRPC_ERROR_CODES, PLUGIN_RPC_ERROR_CODES, HOST_TO_WORKER_REQUIRED_METHODS, HOST_TO_WORKER_OPTIONAL_METHODS, MESSAGE_DELIMITER, createRequest, createSuccessResponse, createErrorResponse, createNotification, isJsonRpcRequest, isJsonRpcNotification, isJsonRpcResponse, isJsonRpcSuccessResponse, isJsonRpcErrorResponse, serializeMessage, parseMessage, JsonRpcParseError, JsonRpcCallError, SETUP_TOKEN_PTY_OUTPUT_NOTIFICATION, SETUP_TOKEN_PTY_EXIT_NOTIFICATION, _resetIdCounter, } from "./protocol.js";
|
|
58
58
|
// Tracer no-op default (a value, so it re-exports here, not in the type block).
|
|
59
59
|
export { NOOP_PLUGIN_TRACER, NOOP_PLUGIN_SPAN } from "./types.js";
|
|
60
60
|
// ---------------------------------------------------------------------------
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,8EAA8E;AAC9E,eAAe;AACf,8EAA8E;AAE9E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,E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MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EACL,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC;AAElC,0CAA0C;AAC1C,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,+BAA+B,EAC/B,+BAA+B,EAC/B,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,mCAAmC,EACnC,iCAAiC,EACjC,eAAe,GAChB,MAAM,eAAe,CAAC;AA2MvB,gFAAgF;AAChF,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAiGlE,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8EAA8E;AAC9E,+EAA+E;AAC/E,8EAA8E;AAE9E,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,EAC3B,+CAA+C,EAC/C,wBAAwB,EACxB,mBAAmB,EACnB,uBAAuB,EACvB,uBAAuB,EACvB,gCAAgC,EAChC,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,8BAA8B,EAC9B,oCAAoC,EACpC,mBAAmB,EACnB,eAAe,GAChB,MAAM,qBAAqB,CAAC"}
|
package/dist/protocol.d.ts
CHANGED
|
@@ -777,18 +777,11 @@ export interface PluginRenderCloseEvent {
|
|
|
777
777
|
reason: "escapeKey" | "backdrop" | "hostNavigation" | "programmatic" | "submit" | "unknown";
|
|
778
778
|
nativeEvent?: unknown;
|
|
779
779
|
}
|
|
780
|
-
/**
|
|
781
|
-
* The closed set of login command identities. The host resolves the key from the
|
|
782
|
-
* trusted adapter type and carries it in the open request. The worker maps the
|
|
783
|
-
* key to a compile-time command. The open request carries no command string, so a
|
|
784
|
-
* caller cannot select or override the command.
|
|
785
|
-
*/
|
|
786
|
-
export type PluginLoginCommandKey = "claude" | "codex";
|
|
787
780
|
/** The open request for one live login pseudo-terminal. The worker registers the terminal by `hostRouteId`. */
|
|
788
|
-
export interface
|
|
781
|
+
export interface PluginSetupTokenPtyOpenParams {
|
|
789
782
|
/** The host-owned opaque route identifier. The worker registers the terminal by it. */
|
|
790
783
|
hostRouteId: string;
|
|
791
|
-
/** The environment driver key, for the worker sandbox scope.
|
|
784
|
+
/** The environment driver key, for the worker sandbox scope. */
|
|
792
785
|
driverKey: string;
|
|
793
786
|
/** The company that owns the login session. */
|
|
794
787
|
companyId: string;
|
|
@@ -796,37 +789,28 @@ export interface PluginLoginPtyOpenParams {
|
|
|
796
789
|
environmentId: string;
|
|
797
790
|
/** The provider lease the sandbox is cached under. The worker resolves the sandbox by it. */
|
|
798
791
|
providerLeaseId: string;
|
|
799
|
-
/**
|
|
800
|
-
|
|
801
|
-
* compile-time command. The open request carries no command string.
|
|
802
|
-
*/
|
|
803
|
-
loginCommandKey: PluginLoginCommandKey;
|
|
804
|
-
/**
|
|
805
|
-
* The server-controlled, validated session home. The shape is exact:
|
|
806
|
-
* `/tmp/paperclip-adapter-login/<uuid>`. The worker revalidates the shape
|
|
807
|
-
* before it touches the filesystem.
|
|
808
|
-
*/
|
|
809
|
-
sessionHome: string;
|
|
792
|
+
/** The fixed login command. The worker runs only this command on the terminal. */
|
|
793
|
+
command: string;
|
|
810
794
|
}
|
|
811
795
|
/** The open reply. It returns the worker session identifier for output binding only. */
|
|
812
|
-
export interface
|
|
796
|
+
export interface PluginSetupTokenPtyOpenResult {
|
|
813
797
|
/** The worker session identifier. It binds the output and the exit notification only. */
|
|
814
798
|
workerSessionId: string;
|
|
815
799
|
}
|
|
816
800
|
/** The input request. It carries the worker session identifier and the raw input bytes. */
|
|
817
|
-
export interface
|
|
801
|
+
export interface PluginSetupTokenPtyInputParams {
|
|
818
802
|
/** The worker session identifier that the open reply returned. */
|
|
819
803
|
workerSessionId: string;
|
|
820
804
|
/** The raw input bytes to write to the terminal. */
|
|
821
805
|
data: string;
|
|
822
806
|
}
|
|
823
807
|
/** The stop request. It carries the worker session identifier. */
|
|
824
|
-
export interface
|
|
808
|
+
export interface PluginSetupTokenPtyStopParams {
|
|
825
809
|
/** The worker session identifier that the open reply returned. */
|
|
826
810
|
workerSessionId: string;
|
|
827
811
|
}
|
|
828
812
|
/** The close request. The host route identifier is the authoritative key. */
|
|
829
|
-
export interface
|
|
813
|
+
export interface PluginSetupTokenPtyCloseParams {
|
|
830
814
|
/**
|
|
831
815
|
* The host-owned opaque route identifier. This is the authoritative close key,
|
|
832
816
|
* so the host closes the terminal even when no worker session identifier
|
|
@@ -841,19 +825,19 @@ export interface PluginLoginPtyCloseParams {
|
|
|
841
825
|
workerSessionId?: string;
|
|
842
826
|
}
|
|
843
827
|
/** The close reply. It acknowledges the close and carries the same host route identifier. */
|
|
844
|
-
export interface
|
|
828
|
+
export interface PluginSetupTokenPtyCloseResult {
|
|
845
829
|
/** The close acknowledgement. It carries the same host route identifier the close sent. */
|
|
846
830
|
hostRouteId: string;
|
|
847
831
|
}
|
|
848
832
|
/** The worker→host pseudo-terminal output notification parameters. Modeled on `execute.log`. */
|
|
849
|
-
export interface
|
|
833
|
+
export interface PluginSetupTokenPtyOutputParams {
|
|
850
834
|
/** The worker session identifier that the open reply returned. */
|
|
851
835
|
workerSessionId: string;
|
|
852
836
|
/** The raw terminal output bytes. */
|
|
853
837
|
chunk: string;
|
|
854
838
|
}
|
|
855
839
|
/** The worker→host pseudo-terminal exit notification parameters. */
|
|
856
|
-
export interface
|
|
840
|
+
export interface PluginSetupTokenPtyExitParams {
|
|
857
841
|
/** The worker session identifier that the open reply returned. */
|
|
858
842
|
workerSessionId: string;
|
|
859
843
|
/** The child exit code, or null when the child ended with no code. */
|
|
@@ -861,10 +845,10 @@ export interface PluginLoginPtyExitParams {
|
|
|
861
845
|
}
|
|
862
846
|
/**
|
|
863
847
|
* One live login pseudo-terminal session in the worker. The worker opener returns
|
|
864
|
-
* it. The shape matches the sandbox provider
|
|
848
|
+
* it. The shape matches the sandbox provider setup-token pseudo-terminal session,
|
|
865
849
|
* so a provider passes its session with no adapter.
|
|
866
850
|
*/
|
|
867
|
-
export interface
|
|
851
|
+
export interface PluginSetupTokenPtyWorkerSession {
|
|
868
852
|
/** Registers the one output listener. The session streams each raw chunk in order. */
|
|
869
853
|
onData(listener: (chunk: string) => void): void;
|
|
870
854
|
/** Writes raw input bytes to the pseudo-terminal. */
|
|
@@ -879,105 +863,9 @@ export interface PluginLoginPtyWorkerSession {
|
|
|
879
863
|
close(): Promise<void>;
|
|
880
864
|
}
|
|
881
865
|
/** The worker→host notification method for one pseudo-terminal output chunk. */
|
|
882
|
-
export declare const
|
|
866
|
+
export declare const SETUP_TOKEN_PTY_OUTPUT_NOTIFICATION = "setupTokenPty.output";
|
|
883
867
|
/** The worker→host notification method for one pseudo-terminal exit. */
|
|
884
|
-
export declare const
|
|
885
|
-
/** The open request for one persistent duplex channel. The worker registers the channel by `hostRouteId`. */
|
|
886
|
-
export interface PluginDuplexChannelOpenParams {
|
|
887
|
-
/** The host-owned opaque route identifier. The worker registers the channel by it. */
|
|
888
|
-
hostRouteId: string;
|
|
889
|
-
/** The environment driver key, for the worker sandbox scope. */
|
|
890
|
-
driverKey: string;
|
|
891
|
-
/** The company that owns the channel. */
|
|
892
|
-
companyId: string;
|
|
893
|
-
/** The environment the channel runs in. */
|
|
894
|
-
environmentId: string;
|
|
895
|
-
/** The provider lease the sandbox is cached under. The worker resolves the sandbox by it. */
|
|
896
|
-
providerLeaseId: string;
|
|
897
|
-
/**
|
|
898
|
-
* The command argument vector the worker runs on the channel. Element 0 is the
|
|
899
|
-
* program and the rest are its arguments. The worker quotes each element for the
|
|
900
|
-
* shell, so a shell metacharacter in an element cannot inject a shell command.
|
|
901
|
-
*/
|
|
902
|
-
command: readonly string[];
|
|
903
|
-
}
|
|
904
|
-
/** The open reply. It echoes the host route identifier and returns the worker session identifier. */
|
|
905
|
-
export interface PluginDuplexChannelOpenResult {
|
|
906
|
-
/** The host route identifier the open request carried. The worker echoes it, so the host binds the exact pair. */
|
|
907
|
-
hostRouteId: string;
|
|
908
|
-
/** The worker session identifier. It binds the data and the exit notification only. */
|
|
909
|
-
workerSessionId: string;
|
|
910
|
-
}
|
|
911
|
-
/** The write request. It carries the exact route pair and the raw input bytes. */
|
|
912
|
-
export interface PluginDuplexChannelWriteParams {
|
|
913
|
-
/** The host route identifier the open request carried. The worker acts only on the exact live pair. */
|
|
914
|
-
hostRouteId: string;
|
|
915
|
-
/** The worker session identifier that the open reply returned. */
|
|
916
|
-
workerSessionId: string;
|
|
917
|
-
/** The raw input bytes to write to the channel. */
|
|
918
|
-
data: string;
|
|
919
|
-
}
|
|
920
|
-
/** The stop request. It carries the exact route pair. */
|
|
921
|
-
export interface PluginDuplexChannelStopParams {
|
|
922
|
-
/** The host route identifier the open request carried. The worker acts only on the exact live pair. */
|
|
923
|
-
hostRouteId: string;
|
|
924
|
-
/** The worker session identifier that the open reply returned. */
|
|
925
|
-
workerSessionId: string;
|
|
926
|
-
}
|
|
927
|
-
/** The close request. The host route identifier is the authoritative key. */
|
|
928
|
-
export interface PluginDuplexChannelCloseParams {
|
|
929
|
-
/**
|
|
930
|
-
* The host-owned opaque route identifier. This is the authoritative close key,
|
|
931
|
-
* so the host closes the channel even when no worker session identifier arrived
|
|
932
|
-
* after a lost open reply.
|
|
933
|
-
*/
|
|
934
|
-
hostRouteId: string;
|
|
935
|
-
/**
|
|
936
|
-
* A non-authoritative worker session identifier. The worker never keys the
|
|
937
|
-
* close on it. The field is optional, so a close with only the host route
|
|
938
|
-
* identifier is a valid request for this lifecycle.
|
|
939
|
-
*/
|
|
940
|
-
workerSessionId?: string;
|
|
941
|
-
}
|
|
942
|
-
/** The close reply. It acknowledges the close and echoes the route identifiers. */
|
|
943
|
-
export interface PluginDuplexChannelCloseResult {
|
|
944
|
-
/** The close acknowledgement. It carries the same host route identifier the close sent. */
|
|
945
|
-
hostRouteId: string;
|
|
946
|
-
/**
|
|
947
|
-
* The bound worker session identifier. The worker echoes it on a bound close,
|
|
948
|
-
* so the host verifies the exact pair. It is absent on a pre-bind route-only
|
|
949
|
-
* close, where no session bound yet.
|
|
950
|
-
*/
|
|
951
|
-
workerSessionId?: string;
|
|
952
|
-
}
|
|
953
|
-
/** The worker→host duplex channel data notification parameters. */
|
|
954
|
-
export interface PluginDuplexChannelDataParams {
|
|
955
|
-
/** The host route identifier the open request carried. The worker echoes it, so the host routes the exact pair. */
|
|
956
|
-
hostRouteId: string;
|
|
957
|
-
/** The worker session identifier that the open reply returned. */
|
|
958
|
-
workerSessionId: string;
|
|
959
|
-
/** The raw channel output bytes. */
|
|
960
|
-
chunk: string;
|
|
961
|
-
}
|
|
962
|
-
/** The worker→host duplex channel exit notification parameters. */
|
|
963
|
-
export interface PluginDuplexChannelExitParams {
|
|
964
|
-
/** The host route identifier the open request carried. The worker echoes it, so the host routes the exact pair. */
|
|
965
|
-
hostRouteId: string;
|
|
966
|
-
/** The worker session identifier that the open reply returned. */
|
|
967
|
-
workerSessionId: string;
|
|
968
|
-
/** The child exit code, or null when the child ended with no code. */
|
|
969
|
-
exitCode: number | null;
|
|
970
|
-
/**
|
|
971
|
-
* True when the provider transport closed with no exit data, so the exit is a
|
|
972
|
-
* reason-less transport close, not a process exit. Absent or false marks a real
|
|
973
|
-
* process exit. The host maps a transport close to a distinct loss reason.
|
|
974
|
-
*/
|
|
975
|
-
transportClosed?: boolean;
|
|
976
|
-
}
|
|
977
|
-
/** The worker→host notification method for one duplex channel data chunk. */
|
|
978
|
-
export declare const DUPLEX_CHANNEL_DATA_NOTIFICATION = "duplexChannel.data";
|
|
979
|
-
/** The worker→host notification method for one duplex channel exit. */
|
|
980
|
-
export declare const DUPLEX_CHANNEL_EXIT_NOTIFICATION = "duplexChannel.exit";
|
|
868
|
+
export declare const SETUP_TOKEN_PTY_EXIT_NOTIFICATION = "setupTokenPty.exit";
|
|
981
869
|
/**
|
|
982
870
|
* Map of host→worker RPC method names to their `[params, result]` types.
|
|
983
871
|
*
|
|
@@ -1083,32 +971,18 @@ export interface HostToWorkerMethods {
|
|
|
1083
971
|
result: PluginEnvironmentDeleteTemplateResult
|
|
1084
972
|
];
|
|
1085
973
|
/** Open one live login pseudo-terminal keyed by a host-owned route identifier. */
|
|
1086
|
-
|
|
1087
|
-
params:
|
|
1088
|
-
result:
|
|
974
|
+
setupTokenPtyOpen: [
|
|
975
|
+
params: PluginSetupTokenPtyOpenParams,
|
|
976
|
+
result: PluginSetupTokenPtyOpenResult
|
|
1089
977
|
];
|
|
1090
978
|
/** Write delayed input to a live login pseudo-terminal, keyed by the worker session identifier. */
|
|
1091
|
-
|
|
979
|
+
setupTokenPtyInput: [params: PluginSetupTokenPtyInputParams, result: void];
|
|
1092
980
|
/** Stop a live login pseudo-terminal child, keyed by the worker session identifier. */
|
|
1093
|
-
|
|
981
|
+
setupTokenPtyStop: [params: PluginSetupTokenPtyStopParams, result: void];
|
|
1094
982
|
/** Close a live login pseudo-terminal by the host route identifier and return a bound acknowledgement. */
|
|
1095
|
-
|
|
1096
|
-
params:
|
|
1097
|
-
result:
|
|
1098
|
-
];
|
|
1099
|
-
/** Open one persistent duplex channel keyed by a host-owned route identifier. */
|
|
1100
|
-
duplexChannelOpen: [
|
|
1101
|
-
params: PluginDuplexChannelOpenParams,
|
|
1102
|
-
result: PluginDuplexChannelOpenResult
|
|
1103
|
-
];
|
|
1104
|
-
/** Write raw input to a persistent duplex channel, keyed by the worker session identifier. */
|
|
1105
|
-
duplexChannelWrite: [params: PluginDuplexChannelWriteParams, result: void];
|
|
1106
|
-
/** Stop a persistent duplex channel child, keyed by the worker session identifier. */
|
|
1107
|
-
duplexChannelStop: [params: PluginDuplexChannelStopParams, result: void];
|
|
1108
|
-
/** Close a persistent duplex channel by the host route identifier and return a bound acknowledgement. */
|
|
1109
|
-
duplexChannelClose: [
|
|
1110
|
-
params: PluginDuplexChannelCloseParams,
|
|
1111
|
-
result: PluginDuplexChannelCloseResult
|
|
983
|
+
setupTokenPtyClose: [
|
|
984
|
+
params: PluginSetupTokenPtyCloseParams,
|
|
985
|
+
result: PluginSetupTokenPtyCloseResult
|
|
1112
986
|
];
|
|
1113
987
|
}
|
|
1114
988
|
/** Union of all host→worker method names. */
|