@floegence/redevplugin-ui 3.5.0 → 3.7.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.
- package/dist/connections.d.ts +18 -0
- package/dist/connections.js +28 -0
- package/dist/error-codes.gen.d.ts +3 -3
- package/dist/error-codes.gen.js +18 -0
- package/dist/openapi.gen.d.ts +452 -19
- package/dist/platform.d.ts +6 -0
- package/dist/platform.js +18 -0
- package/dist/plugin.d.ts +3 -1
- package/dist/plugin.js +1 -0
- package/dist/surface.d.ts +5 -0
- package/dist/surface.js +170 -0
- package/dist/testing.d.ts +10 -0
- package/package.json +2 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** A connector-scoped base URL for the application's own HTTP client. */
|
|
2
|
+
export interface PluginWebConnection {
|
|
3
|
+
readonly connectorId: string;
|
|
4
|
+
readonly connectionId: string;
|
|
5
|
+
readonly baseURL: string;
|
|
6
|
+
readonly httpMethods: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
export interface PluginConnectionOptions {
|
|
9
|
+
/** Index in the signed fixed destination list; configurable connectors use 0. */
|
|
10
|
+
readonly destinationIndex?: number;
|
|
11
|
+
readonly signal?: AbortSignal;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Discover a connection using the current child-origin session. Use native fetch,
|
|
15
|
+
* Request and Response with baseURL. This helper never replaces window.fetch,
|
|
16
|
+
* grants permission, retries a failed mutation, or exposes host credentials.
|
|
17
|
+
*/
|
|
18
|
+
export declare function openPluginConnection(connectorId: string, options?: PluginConnectionOptions): Promise<PluginWebConnection>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discover a connection using the current child-origin session. Use native fetch,
|
|
3
|
+
* Request and Response with baseURL. This helper never replaces window.fetch,
|
|
4
|
+
* grants permission, retries a failed mutation, or exposes host credentials.
|
|
5
|
+
*/
|
|
6
|
+
export async function openPluginConnection(connectorId, options = {}) {
|
|
7
|
+
if (!/^[a-zA-Z0-9][a-zA-Z0-9_.-]{0,127}$/.test(connectorId))
|
|
8
|
+
throw new TypeError("Invalid connector ID");
|
|
9
|
+
const index = options.destinationIndex ?? 0;
|
|
10
|
+
if (!Number.isSafeInteger(index) || index < 0)
|
|
11
|
+
throw new TypeError("Invalid destination index");
|
|
12
|
+
const endpoint = new URL("/_redevplugin_web/connection", globalThis.location.origin);
|
|
13
|
+
endpoint.searchParams.set("connector_id", connectorId);
|
|
14
|
+
endpoint.searchParams.set("destination_index", String(index));
|
|
15
|
+
const response = await fetch(endpoint, { signal: options.signal, credentials: "same-origin", redirect: "error", cache: "no-store" });
|
|
16
|
+
if (!response.ok)
|
|
17
|
+
throw new Error("Connection unavailable; review its configuration and permissions");
|
|
18
|
+
const value = await response.json();
|
|
19
|
+
if (!value || typeof value !== "object")
|
|
20
|
+
throw new Error("Invalid connection response");
|
|
21
|
+
const item = value;
|
|
22
|
+
if (item.connector_id !== connectorId || typeof item.connection_id !== "string" || !/^(?:fixed-[0-9]+|[a-f0-9]{64})$/.test(item.connection_id) || !Array.isArray(item.http_methods) || item.http_methods.length === 0 || !item.http_methods.every(method => typeof method === "string" && /^(GET|HEAD|OPTIONS|POST|PUT|PATCH|DELETE)$/.test(method)))
|
|
23
|
+
throw new Error("Invalid connection response");
|
|
24
|
+
const expected = "/_redevplugin_web/connections/" + encodeURIComponent(connectorId) + "/" + item.connection_id + "/";
|
|
25
|
+
if (item.base_path !== expected)
|
|
26
|
+
throw new Error("Invalid connection base URL");
|
|
27
|
+
return Object.freeze({ connectorId, connectionId: item.connection_id, baseURL: new URL(expected, endpoint).href, httpMethods: Object.freeze([...item.http_methods]) });
|
|
28
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const pluginPlatformErrorCodes: readonly ["PLUGIN_INVALID_REQUEST", "PLUGIN_MANIFEST_INVALID", "PLUGIN_PACKAGE_INVALID", "PLUGIN_PACKAGE_TOO_LARGE", "PLUGIN_PACKAGE_PATH_FORBIDDEN", "PLUGIN_SIGNATURE_INVALID", "PLUGIN_TRUST_STATE_DENIED", "PLUGIN_TRUST_VERIFICATION_REQUIRED", "PLUGIN_TRUST_VERIFICATION_INVALID", "PLUGIN_RELEASE_REF_VERIFICATION_FAILED", "PLUGIN_RELEASE_REF_POLICY_DENIED", "PLUGIN_RELEASE_NETWORK", "PLUGIN_RELEASE_TIMEOUT", "PLUGIN_RELEASE_ASSET_MISSING", "PLUGIN_RELEASE_ASSET_INTEGRITY", "PLUGIN_INSTALL_INTERRUPTED", "PLUGIN_INSTALL_STATE_CONFLICT", "PLUGIN_RETAINED_DATA_INCOMPATIBLE", "PLUGIN_INTERNAL_FAILURE", "PLUGIN_DISABLED", "PLUGIN_PERMISSION_DENIED", "PLUGIN_ORIGIN_DENIED", "PLUGIN_ACTION_DENIED", "PLUGIN_OWNER_SCOPE_MISMATCH", "PLUGIN_SECRET_SCOPE_MISMATCH", "PLUGIN_STORAGE_SCOPE_MISMATCH", "PLUGIN_ADAPTER_FAILURE", "PLUGIN_SESSION_REVOKED", "PLUGIN_SESSION_TEARDOWN_INCOMPLETE", "PLUGIN_SESSION_FENCE_CAPACITY", "PLUGIN_CONFIRMATION_REQUIRED", "PLUGIN_CONFIRMATION_INVALID", "PLUGIN_TOKEN_EXPIRED", "PLUGIN_TOKEN_REPLAY", "PLUGIN_GATEWAY_TOKEN_INVALID", "PLUGIN_GATEWAY_TOKEN_REPLAYED", "PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH", "PLUGIN_ASSET_TICKET_INVALID", "PLUGIN_ASSET_SESSION_INVALID", "PLUGIN_STREAM_TICKET_INVALID", "PLUGIN_STREAM_DELIVERY_INVALID", "PLUGIN_STREAM_CANCELLED", "PLUGIN_LEASE_INVALID", "PLUGIN_LEASE_REPLAYED", "PLUGIN_GRANT_INVALID", "PLUGIN_STORAGE_QUOTA_EXCEEDED", "PLUGIN_EXECUTION_BLOCKED", "PLUGIN_EXECUTION_NOT_FOUND", "PLUGIN_EXECUTION_NOT_CANCELABLE", "PLUGIN_NETWORK_TARGET_DENIED", "PLUGIN_NETWORK_RATE_LIMITED", "PLUGIN_RUNTIME_UNAVAILABLE", "PLUGIN_RUNTIME_VERSION_MISMATCH", "PLUGIN_RUNTIME_CONTRACT_MISMATCH", "PLUGIN_UI_PROTOCOL_VIOLATION", "PLUGIN_SURFACE_QUIESCE_TIMEOUT", "PLUGIN_JSON_LIMIT_EXCEEDED", "PLUGIN_CAPABILITY_ERROR", "PLUGIN_WORKER_ERROR", "PLUGIN_FILE_OPERATION_FAILED", "PLUGIN_CONTRACT_MISMATCH", "PLUGIN_MANAGEMENT_REVISION_MISMATCH", "PLUGIN_AUTHORIZATION_REVISION_MISMATCH", "PLUGIN_BINDING_REVISION_MISMATCH", "PLUGIN_VALUES_REVISION_MISMATCH", "PLUGIN_CSRF_REQUIRED", "PLUGIN_CSRF_INVALID", "PLUGIN_FEATURE_NOT_CONFIGURED"];
|
|
2
|
-
export declare const pluginBridgeErrorCodes: readonly ["PLUGIN_INVALID_REQUEST", "PLUGIN_MANIFEST_INVALID", "PLUGIN_PACKAGE_INVALID", "PLUGIN_PACKAGE_TOO_LARGE", "PLUGIN_PACKAGE_PATH_FORBIDDEN", "PLUGIN_SIGNATURE_INVALID", "PLUGIN_TRUST_STATE_DENIED", "PLUGIN_TRUST_VERIFICATION_REQUIRED", "PLUGIN_TRUST_VERIFICATION_INVALID", "PLUGIN_RELEASE_REF_VERIFICATION_FAILED", "PLUGIN_RELEASE_REF_POLICY_DENIED", "PLUGIN_RELEASE_NETWORK", "PLUGIN_RELEASE_TIMEOUT", "PLUGIN_RELEASE_ASSET_MISSING", "PLUGIN_RELEASE_ASSET_INTEGRITY", "PLUGIN_INSTALL_INTERRUPTED", "PLUGIN_INSTALL_STATE_CONFLICT", "PLUGIN_RETAINED_DATA_INCOMPATIBLE", "PLUGIN_INTERNAL_FAILURE", "PLUGIN_DISABLED", "PLUGIN_PERMISSION_DENIED", "PLUGIN_ORIGIN_DENIED", "PLUGIN_ACTION_DENIED", "PLUGIN_OWNER_SCOPE_MISMATCH", "PLUGIN_SECRET_SCOPE_MISMATCH", "PLUGIN_STORAGE_SCOPE_MISMATCH", "PLUGIN_ADAPTER_FAILURE", "PLUGIN_SESSION_REVOKED", "PLUGIN_SESSION_TEARDOWN_INCOMPLETE", "PLUGIN_SESSION_FENCE_CAPACITY", "PLUGIN_CONFIRMATION_REQUIRED", "PLUGIN_CONFIRMATION_INVALID", "PLUGIN_TOKEN_EXPIRED", "PLUGIN_TOKEN_REPLAY", "PLUGIN_GATEWAY_TOKEN_INVALID", "PLUGIN_GATEWAY_TOKEN_REPLAYED", "PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH", "PLUGIN_ASSET_TICKET_INVALID", "PLUGIN_ASSET_SESSION_INVALID", "PLUGIN_STREAM_TICKET_INVALID", "PLUGIN_STREAM_DELIVERY_INVALID", "PLUGIN_STREAM_CANCELLED", "PLUGIN_LEASE_INVALID", "PLUGIN_LEASE_REPLAYED", "PLUGIN_GRANT_INVALID", "PLUGIN_STORAGE_QUOTA_EXCEEDED", "PLUGIN_EXECUTION_BLOCKED", "PLUGIN_EXECUTION_NOT_FOUND", "PLUGIN_EXECUTION_NOT_CANCELABLE", "PLUGIN_NETWORK_TARGET_DENIED", "PLUGIN_NETWORK_RATE_LIMITED", "PLUGIN_RUNTIME_UNAVAILABLE", "PLUGIN_RUNTIME_VERSION_MISMATCH", "PLUGIN_RUNTIME_CONTRACT_MISMATCH", "PLUGIN_UI_PROTOCOL_VIOLATION", "PLUGIN_SURFACE_QUIESCE_TIMEOUT", "PLUGIN_JSON_LIMIT_EXCEEDED", "PLUGIN_CAPABILITY_ERROR", "PLUGIN_WORKER_ERROR", "PLUGIN_FILE_OPERATION_FAILED", "PLUGIN_CONTRACT_MISMATCH", "PLUGIN_MANAGEMENT_REVISION_MISMATCH", "PLUGIN_AUTHORIZATION_REVISION_MISMATCH", "PLUGIN_BINDING_REVISION_MISMATCH", "PLUGIN_VALUES_REVISION_MISMATCH", "PLUGIN_CSRF_REQUIRED", "PLUGIN_CSRF_INVALID", "PLUGIN_FEATURE_NOT_CONFIGURED", "PLUGIN_CONFIRMATION_REJECTED", "PLUGIN_BRIDGE_CANCELLED", "PLUGIN_BRIDGE_TIMEOUT", "PLUGIN_BRIDGE_DISPOSED", "PLUGIN_BRIDGE_HANDSHAKE_FAILED", "PLUGIN_BRIDGE_HANDSHAKE_REQUIRED"];
|
|
3
|
-
export declare const pluginClientErrorCodes: readonly ["PLUGIN_INVALID_REQUEST", "PLUGIN_MANIFEST_INVALID", "PLUGIN_PACKAGE_INVALID", "PLUGIN_PACKAGE_TOO_LARGE", "PLUGIN_PACKAGE_PATH_FORBIDDEN", "PLUGIN_SIGNATURE_INVALID", "PLUGIN_TRUST_STATE_DENIED", "PLUGIN_TRUST_VERIFICATION_REQUIRED", "PLUGIN_TRUST_VERIFICATION_INVALID", "PLUGIN_RELEASE_REF_VERIFICATION_FAILED", "PLUGIN_RELEASE_REF_POLICY_DENIED", "PLUGIN_RELEASE_NETWORK", "PLUGIN_RELEASE_TIMEOUT", "PLUGIN_RELEASE_ASSET_MISSING", "PLUGIN_RELEASE_ASSET_INTEGRITY", "PLUGIN_INSTALL_INTERRUPTED", "PLUGIN_INSTALL_STATE_CONFLICT", "PLUGIN_RETAINED_DATA_INCOMPATIBLE", "PLUGIN_INTERNAL_FAILURE", "PLUGIN_DISABLED", "PLUGIN_PERMISSION_DENIED", "PLUGIN_ORIGIN_DENIED", "PLUGIN_ACTION_DENIED", "PLUGIN_OWNER_SCOPE_MISMATCH", "PLUGIN_SECRET_SCOPE_MISMATCH", "PLUGIN_STORAGE_SCOPE_MISMATCH", "PLUGIN_ADAPTER_FAILURE", "PLUGIN_SESSION_REVOKED", "PLUGIN_SESSION_TEARDOWN_INCOMPLETE", "PLUGIN_SESSION_FENCE_CAPACITY", "PLUGIN_CONFIRMATION_REQUIRED", "PLUGIN_CONFIRMATION_INVALID", "PLUGIN_TOKEN_EXPIRED", "PLUGIN_TOKEN_REPLAY", "PLUGIN_GATEWAY_TOKEN_INVALID", "PLUGIN_GATEWAY_TOKEN_REPLAYED", "PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH", "PLUGIN_ASSET_TICKET_INVALID", "PLUGIN_ASSET_SESSION_INVALID", "PLUGIN_STREAM_TICKET_INVALID", "PLUGIN_STREAM_DELIVERY_INVALID", "PLUGIN_STREAM_CANCELLED", "PLUGIN_LEASE_INVALID", "PLUGIN_LEASE_REPLAYED", "PLUGIN_GRANT_INVALID", "PLUGIN_STORAGE_QUOTA_EXCEEDED", "PLUGIN_EXECUTION_BLOCKED", "PLUGIN_EXECUTION_NOT_FOUND", "PLUGIN_EXECUTION_NOT_CANCELABLE", "PLUGIN_NETWORK_TARGET_DENIED", "PLUGIN_NETWORK_RATE_LIMITED", "PLUGIN_RUNTIME_UNAVAILABLE", "PLUGIN_RUNTIME_VERSION_MISMATCH", "PLUGIN_RUNTIME_CONTRACT_MISMATCH", "PLUGIN_UI_PROTOCOL_VIOLATION", "PLUGIN_SURFACE_QUIESCE_TIMEOUT", "PLUGIN_JSON_LIMIT_EXCEEDED", "PLUGIN_CAPABILITY_ERROR", "PLUGIN_WORKER_ERROR", "PLUGIN_FILE_OPERATION_FAILED", "PLUGIN_CONTRACT_MISMATCH", "PLUGIN_MANAGEMENT_REVISION_MISMATCH", "PLUGIN_AUTHORIZATION_REVISION_MISMATCH", "PLUGIN_BINDING_REVISION_MISMATCH", "PLUGIN_VALUES_REVISION_MISMATCH", "PLUGIN_CSRF_REQUIRED", "PLUGIN_CSRF_INVALID", "PLUGIN_FEATURE_NOT_CONFIGURED", "PLUGIN_CONFIRMATION_REJECTED", "PLUGIN_BRIDGE_CANCELLED", "PLUGIN_BRIDGE_TIMEOUT", "PLUGIN_BRIDGE_DISPOSED", "PLUGIN_BRIDGE_HANDSHAKE_FAILED", "PLUGIN_BRIDGE_HANDSHAKE_REQUIRED", "PLUGIN_PLATFORM_REQUEST_FAILED", "PLUGIN_STREAM_FAILED"];
|
|
1
|
+
export declare const pluginPlatformErrorCodes: readonly ["PLUGIN_INVALID_REQUEST", "PLUGIN_MANIFEST_INVALID", "PLUGIN_PACKAGE_INVALID", "PLUGIN_PACKAGE_TOO_LARGE", "PLUGIN_PACKAGE_PATH_FORBIDDEN", "PLUGIN_SIGNATURE_INVALID", "PLUGIN_TRUST_STATE_DENIED", "PLUGIN_TRUST_VERIFICATION_REQUIRED", "PLUGIN_TRUST_VERIFICATION_INVALID", "PLUGIN_RELEASE_REF_VERIFICATION_FAILED", "PLUGIN_RELEASE_REF_POLICY_DENIED", "PLUGIN_RELEASE_NETWORK", "PLUGIN_RELEASE_TIMEOUT", "PLUGIN_RELEASE_ASSET_MISSING", "PLUGIN_RELEASE_ASSET_INTEGRITY", "PLUGIN_INSTALL_INTERRUPTED", "PLUGIN_INSTALL_STATE_CONFLICT", "PLUGIN_RETAINED_DATA_INCOMPATIBLE", "PLUGIN_INTERNAL_FAILURE", "PLUGIN_DISABLED", "PLUGIN_PERMISSION_DENIED", "PLUGIN_ORIGIN_DENIED", "PLUGIN_ACTION_DENIED", "PLUGIN_OWNER_SCOPE_MISMATCH", "PLUGIN_SECRET_SCOPE_MISMATCH", "PLUGIN_STORAGE_SCOPE_MISMATCH", "PLUGIN_ADAPTER_FAILURE", "PLUGIN_SESSION_REVOKED", "PLUGIN_SESSION_TEARDOWN_INCOMPLETE", "PLUGIN_SESSION_FENCE_CAPACITY", "PLUGIN_CONFIRMATION_REQUIRED", "PLUGIN_CONFIRMATION_INVALID", "PLUGIN_TOKEN_EXPIRED", "PLUGIN_TOKEN_REPLAY", "PLUGIN_GATEWAY_TOKEN_INVALID", "PLUGIN_GATEWAY_TOKEN_REPLAYED", "PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH", "PLUGIN_ASSET_TICKET_INVALID", "PLUGIN_ASSET_SESSION_INVALID", "PLUGIN_STREAM_TICKET_INVALID", "PLUGIN_STREAM_DELIVERY_INVALID", "PLUGIN_STREAM_CANCELLED", "PLUGIN_LEASE_INVALID", "PLUGIN_LEASE_REPLAYED", "PLUGIN_GRANT_INVALID", "PLUGIN_STORAGE_QUOTA_EXCEEDED", "PLUGIN_EXECUTION_BLOCKED", "PLUGIN_EXECUTION_NOT_FOUND", "PLUGIN_EXECUTION_NOT_CANCELABLE", "PLUGIN_SURFACE_METHOD_UNAVAILABLE", "PLUGIN_SURFACE_METHOD_CONFLICT", "PLUGIN_SURFACE_METHOD_AMBIGUOUS", "PLUGIN_SURFACE_METHOD_FAILED", "PLUGIN_CONNECTION_UNAVAILABLE", "PLUGIN_CONNECTION_CONFLICT", "PLUGIN_NETWORK_TARGET_DENIED", "PLUGIN_NETWORK_RATE_LIMITED", "PLUGIN_RUNTIME_UNAVAILABLE", "PLUGIN_RUNTIME_VERSION_MISMATCH", "PLUGIN_RUNTIME_CONTRACT_MISMATCH", "PLUGIN_UI_PROTOCOL_VIOLATION", "PLUGIN_SURFACE_QUIESCE_TIMEOUT", "PLUGIN_JSON_LIMIT_EXCEEDED", "PLUGIN_CAPABILITY_ERROR", "PLUGIN_WORKER_ERROR", "PLUGIN_FILE_OPERATION_FAILED", "PLUGIN_CONTRACT_MISMATCH", "PLUGIN_MANAGEMENT_REVISION_MISMATCH", "PLUGIN_AUTHORIZATION_REVISION_MISMATCH", "PLUGIN_BINDING_REVISION_MISMATCH", "PLUGIN_VALUES_REVISION_MISMATCH", "PLUGIN_CSRF_REQUIRED", "PLUGIN_CSRF_INVALID", "PLUGIN_FEATURE_NOT_CONFIGURED"];
|
|
2
|
+
export declare const pluginBridgeErrorCodes: readonly ["PLUGIN_INVALID_REQUEST", "PLUGIN_MANIFEST_INVALID", "PLUGIN_PACKAGE_INVALID", "PLUGIN_PACKAGE_TOO_LARGE", "PLUGIN_PACKAGE_PATH_FORBIDDEN", "PLUGIN_SIGNATURE_INVALID", "PLUGIN_TRUST_STATE_DENIED", "PLUGIN_TRUST_VERIFICATION_REQUIRED", "PLUGIN_TRUST_VERIFICATION_INVALID", "PLUGIN_RELEASE_REF_VERIFICATION_FAILED", "PLUGIN_RELEASE_REF_POLICY_DENIED", "PLUGIN_RELEASE_NETWORK", "PLUGIN_RELEASE_TIMEOUT", "PLUGIN_RELEASE_ASSET_MISSING", "PLUGIN_RELEASE_ASSET_INTEGRITY", "PLUGIN_INSTALL_INTERRUPTED", "PLUGIN_INSTALL_STATE_CONFLICT", "PLUGIN_RETAINED_DATA_INCOMPATIBLE", "PLUGIN_INTERNAL_FAILURE", "PLUGIN_DISABLED", "PLUGIN_PERMISSION_DENIED", "PLUGIN_ORIGIN_DENIED", "PLUGIN_ACTION_DENIED", "PLUGIN_OWNER_SCOPE_MISMATCH", "PLUGIN_SECRET_SCOPE_MISMATCH", "PLUGIN_STORAGE_SCOPE_MISMATCH", "PLUGIN_ADAPTER_FAILURE", "PLUGIN_SESSION_REVOKED", "PLUGIN_SESSION_TEARDOWN_INCOMPLETE", "PLUGIN_SESSION_FENCE_CAPACITY", "PLUGIN_CONFIRMATION_REQUIRED", "PLUGIN_CONFIRMATION_INVALID", "PLUGIN_TOKEN_EXPIRED", "PLUGIN_TOKEN_REPLAY", "PLUGIN_GATEWAY_TOKEN_INVALID", "PLUGIN_GATEWAY_TOKEN_REPLAYED", "PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH", "PLUGIN_ASSET_TICKET_INVALID", "PLUGIN_ASSET_SESSION_INVALID", "PLUGIN_STREAM_TICKET_INVALID", "PLUGIN_STREAM_DELIVERY_INVALID", "PLUGIN_STREAM_CANCELLED", "PLUGIN_LEASE_INVALID", "PLUGIN_LEASE_REPLAYED", "PLUGIN_GRANT_INVALID", "PLUGIN_STORAGE_QUOTA_EXCEEDED", "PLUGIN_EXECUTION_BLOCKED", "PLUGIN_EXECUTION_NOT_FOUND", "PLUGIN_EXECUTION_NOT_CANCELABLE", "PLUGIN_SURFACE_METHOD_UNAVAILABLE", "PLUGIN_SURFACE_METHOD_CONFLICT", "PLUGIN_SURFACE_METHOD_AMBIGUOUS", "PLUGIN_SURFACE_METHOD_FAILED", "PLUGIN_CONNECTION_UNAVAILABLE", "PLUGIN_CONNECTION_CONFLICT", "PLUGIN_NETWORK_TARGET_DENIED", "PLUGIN_NETWORK_RATE_LIMITED", "PLUGIN_RUNTIME_UNAVAILABLE", "PLUGIN_RUNTIME_VERSION_MISMATCH", "PLUGIN_RUNTIME_CONTRACT_MISMATCH", "PLUGIN_UI_PROTOCOL_VIOLATION", "PLUGIN_SURFACE_QUIESCE_TIMEOUT", "PLUGIN_JSON_LIMIT_EXCEEDED", "PLUGIN_CAPABILITY_ERROR", "PLUGIN_WORKER_ERROR", "PLUGIN_FILE_OPERATION_FAILED", "PLUGIN_CONTRACT_MISMATCH", "PLUGIN_MANAGEMENT_REVISION_MISMATCH", "PLUGIN_AUTHORIZATION_REVISION_MISMATCH", "PLUGIN_BINDING_REVISION_MISMATCH", "PLUGIN_VALUES_REVISION_MISMATCH", "PLUGIN_CSRF_REQUIRED", "PLUGIN_CSRF_INVALID", "PLUGIN_FEATURE_NOT_CONFIGURED", "PLUGIN_CONFIRMATION_REJECTED", "PLUGIN_BRIDGE_CANCELLED", "PLUGIN_BRIDGE_TIMEOUT", "PLUGIN_BRIDGE_DISPOSED", "PLUGIN_BRIDGE_HANDSHAKE_FAILED", "PLUGIN_BRIDGE_HANDSHAKE_REQUIRED"];
|
|
3
|
+
export declare const pluginClientErrorCodes: readonly ["PLUGIN_INVALID_REQUEST", "PLUGIN_MANIFEST_INVALID", "PLUGIN_PACKAGE_INVALID", "PLUGIN_PACKAGE_TOO_LARGE", "PLUGIN_PACKAGE_PATH_FORBIDDEN", "PLUGIN_SIGNATURE_INVALID", "PLUGIN_TRUST_STATE_DENIED", "PLUGIN_TRUST_VERIFICATION_REQUIRED", "PLUGIN_TRUST_VERIFICATION_INVALID", "PLUGIN_RELEASE_REF_VERIFICATION_FAILED", "PLUGIN_RELEASE_REF_POLICY_DENIED", "PLUGIN_RELEASE_NETWORK", "PLUGIN_RELEASE_TIMEOUT", "PLUGIN_RELEASE_ASSET_MISSING", "PLUGIN_RELEASE_ASSET_INTEGRITY", "PLUGIN_INSTALL_INTERRUPTED", "PLUGIN_INSTALL_STATE_CONFLICT", "PLUGIN_RETAINED_DATA_INCOMPATIBLE", "PLUGIN_INTERNAL_FAILURE", "PLUGIN_DISABLED", "PLUGIN_PERMISSION_DENIED", "PLUGIN_ORIGIN_DENIED", "PLUGIN_ACTION_DENIED", "PLUGIN_OWNER_SCOPE_MISMATCH", "PLUGIN_SECRET_SCOPE_MISMATCH", "PLUGIN_STORAGE_SCOPE_MISMATCH", "PLUGIN_ADAPTER_FAILURE", "PLUGIN_SESSION_REVOKED", "PLUGIN_SESSION_TEARDOWN_INCOMPLETE", "PLUGIN_SESSION_FENCE_CAPACITY", "PLUGIN_CONFIRMATION_REQUIRED", "PLUGIN_CONFIRMATION_INVALID", "PLUGIN_TOKEN_EXPIRED", "PLUGIN_TOKEN_REPLAY", "PLUGIN_GATEWAY_TOKEN_INVALID", "PLUGIN_GATEWAY_TOKEN_REPLAYED", "PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH", "PLUGIN_ASSET_TICKET_INVALID", "PLUGIN_ASSET_SESSION_INVALID", "PLUGIN_STREAM_TICKET_INVALID", "PLUGIN_STREAM_DELIVERY_INVALID", "PLUGIN_STREAM_CANCELLED", "PLUGIN_LEASE_INVALID", "PLUGIN_LEASE_REPLAYED", "PLUGIN_GRANT_INVALID", "PLUGIN_STORAGE_QUOTA_EXCEEDED", "PLUGIN_EXECUTION_BLOCKED", "PLUGIN_EXECUTION_NOT_FOUND", "PLUGIN_EXECUTION_NOT_CANCELABLE", "PLUGIN_SURFACE_METHOD_UNAVAILABLE", "PLUGIN_SURFACE_METHOD_CONFLICT", "PLUGIN_SURFACE_METHOD_AMBIGUOUS", "PLUGIN_SURFACE_METHOD_FAILED", "PLUGIN_CONNECTION_UNAVAILABLE", "PLUGIN_CONNECTION_CONFLICT", "PLUGIN_NETWORK_TARGET_DENIED", "PLUGIN_NETWORK_RATE_LIMITED", "PLUGIN_RUNTIME_UNAVAILABLE", "PLUGIN_RUNTIME_VERSION_MISMATCH", "PLUGIN_RUNTIME_CONTRACT_MISMATCH", "PLUGIN_UI_PROTOCOL_VIOLATION", "PLUGIN_SURFACE_QUIESCE_TIMEOUT", "PLUGIN_JSON_LIMIT_EXCEEDED", "PLUGIN_CAPABILITY_ERROR", "PLUGIN_WORKER_ERROR", "PLUGIN_FILE_OPERATION_FAILED", "PLUGIN_CONTRACT_MISMATCH", "PLUGIN_MANAGEMENT_REVISION_MISMATCH", "PLUGIN_AUTHORIZATION_REVISION_MISMATCH", "PLUGIN_BINDING_REVISION_MISMATCH", "PLUGIN_VALUES_REVISION_MISMATCH", "PLUGIN_CSRF_REQUIRED", "PLUGIN_CSRF_INVALID", "PLUGIN_FEATURE_NOT_CONFIGURED", "PLUGIN_CONFIRMATION_REJECTED", "PLUGIN_BRIDGE_CANCELLED", "PLUGIN_BRIDGE_TIMEOUT", "PLUGIN_BRIDGE_DISPOSED", "PLUGIN_BRIDGE_HANDSHAKE_FAILED", "PLUGIN_BRIDGE_HANDSHAKE_REQUIRED", "PLUGIN_PLATFORM_REQUEST_FAILED", "PLUGIN_STREAM_FAILED"];
|
|
4
4
|
export declare const runtimeProcessFailureCodes: readonly ["RUNTIME_PROCESS_FAILED", "RUNTIME_PROCESS_EXIT_UNEXPECTED", "RUNTIME_PROCESS_EXIT_UNRECOGNIZED", "RUNTIME_PROCESS_SIGNALLED", "IPC_WRITER_CAPACITY_OVERFLOW", "IPC_WRITER_CAPACITY_LIMIT_EXCEEDED", "IPC_WRITER_START_FAILED", "IPC_WRITER_CLOSED", "IPC_WRITER_BATCH_SIZE_OVERFLOW", "IPC_WRITER_WRITE_FAILED", "IPC_WRITER_FLUSH_FAILED", "IPC_WRITER_PANICKED"];
|
package/dist/error-codes.gen.js
CHANGED
|
@@ -49,6 +49,12 @@ export const pluginPlatformErrorCodes = [
|
|
|
49
49
|
"PLUGIN_EXECUTION_BLOCKED",
|
|
50
50
|
"PLUGIN_EXECUTION_NOT_FOUND",
|
|
51
51
|
"PLUGIN_EXECUTION_NOT_CANCELABLE",
|
|
52
|
+
"PLUGIN_SURFACE_METHOD_UNAVAILABLE",
|
|
53
|
+
"PLUGIN_SURFACE_METHOD_CONFLICT",
|
|
54
|
+
"PLUGIN_SURFACE_METHOD_AMBIGUOUS",
|
|
55
|
+
"PLUGIN_SURFACE_METHOD_FAILED",
|
|
56
|
+
"PLUGIN_CONNECTION_UNAVAILABLE",
|
|
57
|
+
"PLUGIN_CONNECTION_CONFLICT",
|
|
52
58
|
"PLUGIN_NETWORK_TARGET_DENIED",
|
|
53
59
|
"PLUGIN_NETWORK_RATE_LIMITED",
|
|
54
60
|
"PLUGIN_RUNTIME_UNAVAILABLE",
|
|
@@ -119,6 +125,12 @@ export const pluginBridgeErrorCodes = [
|
|
|
119
125
|
"PLUGIN_EXECUTION_BLOCKED",
|
|
120
126
|
"PLUGIN_EXECUTION_NOT_FOUND",
|
|
121
127
|
"PLUGIN_EXECUTION_NOT_CANCELABLE",
|
|
128
|
+
"PLUGIN_SURFACE_METHOD_UNAVAILABLE",
|
|
129
|
+
"PLUGIN_SURFACE_METHOD_CONFLICT",
|
|
130
|
+
"PLUGIN_SURFACE_METHOD_AMBIGUOUS",
|
|
131
|
+
"PLUGIN_SURFACE_METHOD_FAILED",
|
|
132
|
+
"PLUGIN_CONNECTION_UNAVAILABLE",
|
|
133
|
+
"PLUGIN_CONNECTION_CONFLICT",
|
|
122
134
|
"PLUGIN_NETWORK_TARGET_DENIED",
|
|
123
135
|
"PLUGIN_NETWORK_RATE_LIMITED",
|
|
124
136
|
"PLUGIN_RUNTIME_UNAVAILABLE",
|
|
@@ -195,6 +207,12 @@ export const pluginClientErrorCodes = [
|
|
|
195
207
|
"PLUGIN_EXECUTION_BLOCKED",
|
|
196
208
|
"PLUGIN_EXECUTION_NOT_FOUND",
|
|
197
209
|
"PLUGIN_EXECUTION_NOT_CANCELABLE",
|
|
210
|
+
"PLUGIN_SURFACE_METHOD_UNAVAILABLE",
|
|
211
|
+
"PLUGIN_SURFACE_METHOD_CONFLICT",
|
|
212
|
+
"PLUGIN_SURFACE_METHOD_AMBIGUOUS",
|
|
213
|
+
"PLUGIN_SURFACE_METHOD_FAILED",
|
|
214
|
+
"PLUGIN_CONNECTION_UNAVAILABLE",
|
|
215
|
+
"PLUGIN_CONNECTION_CONFLICT",
|
|
198
216
|
"PLUGIN_NETWORK_TARGET_DENIED",
|
|
199
217
|
"PLUGIN_NETWORK_RATE_LIMITED",
|
|
200
218
|
"PLUGIN_RUNTIME_UNAVAILABLE",
|
package/dist/openapi.gen.d.ts
CHANGED
|
@@ -3,6 +3,119 @@
|
|
|
3
3
|
* Do not make direct changes to the file.
|
|
4
4
|
*/
|
|
5
5
|
export interface paths {
|
|
6
|
+
"/_redevplugin/api/plugins/surfaces/methods": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
get?: never;
|
|
14
|
+
put?: never;
|
|
15
|
+
/** @description Parent SDK receiver control. Each claim is delivered at most once; failed transport never retries it. */
|
|
16
|
+
post: operations["surfaceMethods"];
|
|
17
|
+
delete?: never;
|
|
18
|
+
options?: never;
|
|
19
|
+
head?: never;
|
|
20
|
+
patch?: never;
|
|
21
|
+
trace?: never;
|
|
22
|
+
};
|
|
23
|
+
"/_redevplugin/api/plugins/intents/confirmations/prepare": {
|
|
24
|
+
parameters: {
|
|
25
|
+
query?: never;
|
|
26
|
+
header?: never;
|
|
27
|
+
path?: never;
|
|
28
|
+
cookie?: never;
|
|
29
|
+
};
|
|
30
|
+
get?: never;
|
|
31
|
+
put?: never;
|
|
32
|
+
post: operations["preparePluginIntentConfirmation"];
|
|
33
|
+
delete?: never;
|
|
34
|
+
options?: never;
|
|
35
|
+
head?: never;
|
|
36
|
+
patch?: never;
|
|
37
|
+
trace?: never;
|
|
38
|
+
};
|
|
39
|
+
"/_redevplugin/api/plugins/connections/review": {
|
|
40
|
+
parameters: {
|
|
41
|
+
query?: never;
|
|
42
|
+
header?: never;
|
|
43
|
+
path?: never;
|
|
44
|
+
cookie?: never;
|
|
45
|
+
};
|
|
46
|
+
get?: never;
|
|
47
|
+
put?: never;
|
|
48
|
+
post: operations["reviewConnection"];
|
|
49
|
+
delete?: never;
|
|
50
|
+
options?: never;
|
|
51
|
+
head?: never;
|
|
52
|
+
patch?: never;
|
|
53
|
+
trace?: never;
|
|
54
|
+
};
|
|
55
|
+
"/_redevplugin/api/plugins/connections/approve": {
|
|
56
|
+
parameters: {
|
|
57
|
+
query?: never;
|
|
58
|
+
header?: never;
|
|
59
|
+
path?: never;
|
|
60
|
+
cookie?: never;
|
|
61
|
+
};
|
|
62
|
+
get?: never;
|
|
63
|
+
put?: never;
|
|
64
|
+
post: operations["approveConnection"];
|
|
65
|
+
delete?: never;
|
|
66
|
+
options?: never;
|
|
67
|
+
head?: never;
|
|
68
|
+
patch?: never;
|
|
69
|
+
trace?: never;
|
|
70
|
+
};
|
|
71
|
+
"/_redevplugin/api/plugins/connections/cancel": {
|
|
72
|
+
parameters: {
|
|
73
|
+
query?: never;
|
|
74
|
+
header?: never;
|
|
75
|
+
path?: never;
|
|
76
|
+
cookie?: never;
|
|
77
|
+
};
|
|
78
|
+
get?: never;
|
|
79
|
+
put?: never;
|
|
80
|
+
post: operations["cancelConnectionReview"];
|
|
81
|
+
delete?: never;
|
|
82
|
+
options?: never;
|
|
83
|
+
head?: never;
|
|
84
|
+
patch?: never;
|
|
85
|
+
trace?: never;
|
|
86
|
+
};
|
|
87
|
+
"/_redevplugin/api/plugins/connections/query": {
|
|
88
|
+
parameters: {
|
|
89
|
+
query?: never;
|
|
90
|
+
header?: never;
|
|
91
|
+
path?: never;
|
|
92
|
+
cookie?: never;
|
|
93
|
+
};
|
|
94
|
+
get?: never;
|
|
95
|
+
put?: never;
|
|
96
|
+
post: operations["listConnections"];
|
|
97
|
+
delete?: never;
|
|
98
|
+
options?: never;
|
|
99
|
+
head?: never;
|
|
100
|
+
patch?: never;
|
|
101
|
+
trace?: never;
|
|
102
|
+
};
|
|
103
|
+
"/_redevplugin/api/plugins/connections/revoke": {
|
|
104
|
+
parameters: {
|
|
105
|
+
query?: never;
|
|
106
|
+
header?: never;
|
|
107
|
+
path?: never;
|
|
108
|
+
cookie?: never;
|
|
109
|
+
};
|
|
110
|
+
get?: never;
|
|
111
|
+
put?: never;
|
|
112
|
+
post: operations["revokeConnection"];
|
|
113
|
+
delete?: never;
|
|
114
|
+
options?: never;
|
|
115
|
+
head?: never;
|
|
116
|
+
patch?: never;
|
|
117
|
+
trace?: never;
|
|
118
|
+
};
|
|
6
119
|
"/_redevplugin/api/plugins/file-resources/select": {
|
|
7
120
|
parameters: {
|
|
8
121
|
query?: never;
|
|
@@ -968,6 +1081,49 @@ export interface paths {
|
|
|
968
1081
|
export type webhooks = Record<string, never>;
|
|
969
1082
|
export interface components {
|
|
970
1083
|
schemas: {
|
|
1084
|
+
SurfaceMethodsSuccessResponse: {
|
|
1085
|
+
/** @constant */
|
|
1086
|
+
ok: true;
|
|
1087
|
+
data: components["schemas"]["SurfaceMethodsResult"];
|
|
1088
|
+
/** @constant */
|
|
1089
|
+
mutation_outcome: "committed";
|
|
1090
|
+
};
|
|
1091
|
+
ReviewConnectionSuccessResponse: {
|
|
1092
|
+
/** @constant */
|
|
1093
|
+
ok: true;
|
|
1094
|
+
data: components["schemas"]["ConnectionsReviewResult"];
|
|
1095
|
+
};
|
|
1096
|
+
ApproveConnectionSuccessResponse: {
|
|
1097
|
+
/** @constant */
|
|
1098
|
+
ok: true;
|
|
1099
|
+
data: components["schemas"]["ConnectionsConnection"];
|
|
1100
|
+
};
|
|
1101
|
+
CancelConnectionReviewSuccessResponse: {
|
|
1102
|
+
/** @constant */
|
|
1103
|
+
ok: true;
|
|
1104
|
+
data: {
|
|
1105
|
+
/** @constant */
|
|
1106
|
+
canceled: true;
|
|
1107
|
+
};
|
|
1108
|
+
};
|
|
1109
|
+
ListConnectionsSuccessResponse: {
|
|
1110
|
+
/** @constant */
|
|
1111
|
+
ok: true;
|
|
1112
|
+
data: components["schemas"]["ConnectionsConnectionList"];
|
|
1113
|
+
};
|
|
1114
|
+
RevokeConnectionSuccessResponse: {
|
|
1115
|
+
/** @constant */
|
|
1116
|
+
ok: true;
|
|
1117
|
+
data: {
|
|
1118
|
+
/** @constant */
|
|
1119
|
+
revoked: true;
|
|
1120
|
+
};
|
|
1121
|
+
};
|
|
1122
|
+
ConnectionReviewRequest: components["schemas"]["ConnectionsReviewRequest"];
|
|
1123
|
+
ConnectionReviewReference: components["schemas"]["ConnectionsReviewReference"];
|
|
1124
|
+
ConnectionListRequest: components["schemas"]["ConnectionsListRequest"];
|
|
1125
|
+
ConnectionRevokeRequest: components["schemas"]["ConnectionsRevokeRequest"];
|
|
1126
|
+
ConnectionInfo: components["schemas"]["ConnectionsConnection"];
|
|
971
1127
|
SelectFileResourceSuccessResponse: {
|
|
972
1128
|
/** @constant */
|
|
973
1129
|
ok: true;
|
|
@@ -1412,7 +1568,7 @@ export interface components {
|
|
|
1412
1568
|
ErrorCode: components["schemas"]["ErrorCodesPlatformErrorCode"];
|
|
1413
1569
|
PlatformErrorMessage: string;
|
|
1414
1570
|
/** @enum {string} */
|
|
1415
|
-
GenericPlatformErrorCode: "PLUGIN_INVALID_REQUEST" | "PLUGIN_SIGNATURE_INVALID" | "PLUGIN_TRUST_STATE_DENIED" | "PLUGIN_TRUST_VERIFICATION_REQUIRED" | "PLUGIN_TRUST_VERIFICATION_INVALID" | "PLUGIN_RELEASE_REF_VERIFICATION_FAILED" | "PLUGIN_RELEASE_REF_POLICY_DENIED" | "PLUGIN_RELEASE_NETWORK" | "PLUGIN_RELEASE_TIMEOUT" | "PLUGIN_RELEASE_ASSET_MISSING" | "PLUGIN_RELEASE_ASSET_INTEGRITY" | "PLUGIN_INSTALL_INTERRUPTED" | "PLUGIN_INSTALL_STATE_CONFLICT" | "PLUGIN_RETAINED_DATA_INCOMPATIBLE" | "PLUGIN_INTERNAL_FAILURE" | "PLUGIN_DISABLED" | "PLUGIN_PERMISSION_DENIED" | "PLUGIN_ORIGIN_DENIED" | "PLUGIN_ACTION_DENIED" | "PLUGIN_OWNER_SCOPE_MISMATCH" | "PLUGIN_SECRET_SCOPE_MISMATCH" | "PLUGIN_STORAGE_SCOPE_MISMATCH" | "PLUGIN_ADAPTER_FAILURE" | "PLUGIN_SESSION_REVOKED" | "PLUGIN_SESSION_TEARDOWN_INCOMPLETE" | "PLUGIN_SESSION_FENCE_CAPACITY" | "PLUGIN_CONFIRMATION_REQUIRED" | "PLUGIN_CONFIRMATION_INVALID" | "PLUGIN_TOKEN_EXPIRED" | "PLUGIN_TOKEN_REPLAY" | "PLUGIN_GATEWAY_TOKEN_INVALID" | "PLUGIN_GATEWAY_TOKEN_REPLAYED" | "PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH" | "PLUGIN_ASSET_TICKET_INVALID" | "PLUGIN_ASSET_SESSION_INVALID" | "PLUGIN_STREAM_TICKET_INVALID" | "PLUGIN_STREAM_DELIVERY_INVALID" | "PLUGIN_STREAM_CANCELLED" | "PLUGIN_LEASE_INVALID" | "PLUGIN_LEASE_REPLAYED" | "PLUGIN_GRANT_INVALID" | "PLUGIN_STORAGE_QUOTA_EXCEEDED" | "PLUGIN_EXECUTION_BLOCKED" | "PLUGIN_EXECUTION_NOT_FOUND" | "PLUGIN_EXECUTION_NOT_CANCELABLE" | "PLUGIN_NETWORK_TARGET_DENIED" | "PLUGIN_NETWORK_RATE_LIMITED" | "PLUGIN_RUNTIME_UNAVAILABLE" | "PLUGIN_RUNTIME_VERSION_MISMATCH" | "PLUGIN_RUNTIME_CONTRACT_MISMATCH" | "PLUGIN_UI_PROTOCOL_VIOLATION" | "PLUGIN_SURFACE_QUIESCE_TIMEOUT" | "PLUGIN_CONTRACT_MISMATCH" | "PLUGIN_CSRF_REQUIRED" | "PLUGIN_CSRF_INVALID" | "PLUGIN_FEATURE_NOT_CONFIGURED";
|
|
1571
|
+
GenericPlatformErrorCode: "PLUGIN_INVALID_REQUEST" | "PLUGIN_SIGNATURE_INVALID" | "PLUGIN_TRUST_STATE_DENIED" | "PLUGIN_TRUST_VERIFICATION_REQUIRED" | "PLUGIN_TRUST_VERIFICATION_INVALID" | "PLUGIN_RELEASE_REF_VERIFICATION_FAILED" | "PLUGIN_RELEASE_REF_POLICY_DENIED" | "PLUGIN_RELEASE_NETWORK" | "PLUGIN_RELEASE_TIMEOUT" | "PLUGIN_RELEASE_ASSET_MISSING" | "PLUGIN_RELEASE_ASSET_INTEGRITY" | "PLUGIN_INSTALL_INTERRUPTED" | "PLUGIN_INSTALL_STATE_CONFLICT" | "PLUGIN_RETAINED_DATA_INCOMPATIBLE" | "PLUGIN_INTERNAL_FAILURE" | "PLUGIN_DISABLED" | "PLUGIN_PERMISSION_DENIED" | "PLUGIN_ORIGIN_DENIED" | "PLUGIN_ACTION_DENIED" | "PLUGIN_OWNER_SCOPE_MISMATCH" | "PLUGIN_SECRET_SCOPE_MISMATCH" | "PLUGIN_STORAGE_SCOPE_MISMATCH" | "PLUGIN_ADAPTER_FAILURE" | "PLUGIN_SESSION_REVOKED" | "PLUGIN_SESSION_TEARDOWN_INCOMPLETE" | "PLUGIN_SESSION_FENCE_CAPACITY" | "PLUGIN_CONFIRMATION_REQUIRED" | "PLUGIN_CONFIRMATION_INVALID" | "PLUGIN_TOKEN_EXPIRED" | "PLUGIN_TOKEN_REPLAY" | "PLUGIN_GATEWAY_TOKEN_INVALID" | "PLUGIN_GATEWAY_TOKEN_REPLAYED" | "PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH" | "PLUGIN_ASSET_TICKET_INVALID" | "PLUGIN_ASSET_SESSION_INVALID" | "PLUGIN_STREAM_TICKET_INVALID" | "PLUGIN_STREAM_DELIVERY_INVALID" | "PLUGIN_STREAM_CANCELLED" | "PLUGIN_LEASE_INVALID" | "PLUGIN_LEASE_REPLAYED" | "PLUGIN_GRANT_INVALID" | "PLUGIN_STORAGE_QUOTA_EXCEEDED" | "PLUGIN_EXECUTION_BLOCKED" | "PLUGIN_EXECUTION_NOT_FOUND" | "PLUGIN_EXECUTION_NOT_CANCELABLE" | "PLUGIN_SURFACE_METHOD_UNAVAILABLE" | "PLUGIN_SURFACE_METHOD_CONFLICT" | "PLUGIN_SURFACE_METHOD_AMBIGUOUS" | "PLUGIN_SURFACE_METHOD_FAILED" | "PLUGIN_CONNECTION_UNAVAILABLE" | "PLUGIN_CONNECTION_CONFLICT" | "PLUGIN_NETWORK_TARGET_DENIED" | "PLUGIN_NETWORK_RATE_LIMITED" | "PLUGIN_RUNTIME_UNAVAILABLE" | "PLUGIN_RUNTIME_VERSION_MISMATCH" | "PLUGIN_RUNTIME_CONTRACT_MISMATCH" | "PLUGIN_UI_PROTOCOL_VIOLATION" | "PLUGIN_SURFACE_QUIESCE_TIMEOUT" | "PLUGIN_CONTRACT_MISMATCH" | "PLUGIN_CSRF_REQUIRED" | "PLUGIN_CSRF_INVALID" | "PLUGIN_FEATURE_NOT_CONFIGURED";
|
|
1416
1572
|
SurfaceDisposeResult: {
|
|
1417
1573
|
/** @constant */
|
|
1418
1574
|
disposed: true;
|
|
@@ -1458,6 +1614,7 @@ export interface components {
|
|
|
1458
1614
|
cursor: number;
|
|
1459
1615
|
};
|
|
1460
1616
|
PluginIntentRecord: {
|
|
1617
|
+
surface_id?: string;
|
|
1461
1618
|
plugin_id: string;
|
|
1462
1619
|
plugin_instance_id: string;
|
|
1463
1620
|
publisher_id: string;
|
|
@@ -1884,11 +2041,12 @@ export interface components {
|
|
|
1884
2041
|
};
|
|
1885
2042
|
ExternalPackageMethodRouteSummary: {
|
|
1886
2043
|
/** @enum {string} */
|
|
1887
|
-
kind: "capability" | "worker" | "core_action";
|
|
2044
|
+
kind: "capability" | "worker" | "core_action" | "surface";
|
|
1888
2045
|
binding_id?: string;
|
|
1889
2046
|
target_method?: string;
|
|
1890
2047
|
worker_id?: string;
|
|
1891
2048
|
action_id?: string;
|
|
2049
|
+
surface_id?: string;
|
|
1892
2050
|
};
|
|
1893
2051
|
ExternalPackageConfirmationSummary: {
|
|
1894
2052
|
/** @enum {string} */
|
|
@@ -1953,10 +2111,17 @@ export interface components {
|
|
|
1953
2111
|
};
|
|
1954
2112
|
ExternalPackageNetworkMethodAccessSummary: {
|
|
1955
2113
|
method: string;
|
|
1956
|
-
operations: ("http" | "http_stream" | "
|
|
2114
|
+
operations: ("http" | "http_stream" | "websocket" | "tcp" | "udp")[];
|
|
2115
|
+
http_methods: ("GET" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS")[];
|
|
2116
|
+
};
|
|
2117
|
+
ExternalPackageNetworkSurfaceAccessSummary: {
|
|
2118
|
+
surface_id: string;
|
|
2119
|
+
operations: ("http" | "http_stream")[];
|
|
1957
2120
|
http_methods: ("GET" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS")[];
|
|
1958
2121
|
};
|
|
1959
2122
|
ExternalPackageNetworkSummary: {
|
|
2123
|
+
configurable: boolean;
|
|
2124
|
+
surface_access: components["schemas"]["ExternalPackageNetworkSurfaceAccessSummary"][];
|
|
1960
2125
|
connector_id: string;
|
|
1961
2126
|
/** @enum {string} */
|
|
1962
2127
|
transport: "http" | "websocket" | "tcp" | "udp";
|
|
@@ -2459,6 +2624,8 @@ export interface components {
|
|
|
2459
2624
|
expires_at: string;
|
|
2460
2625
|
};
|
|
2461
2626
|
InvokeIntentRequest: {
|
|
2627
|
+
surface_instance_id?: string;
|
|
2628
|
+
confirmation_id?: string;
|
|
2462
2629
|
plugin_instance_id?: string;
|
|
2463
2630
|
intent_id: string;
|
|
2464
2631
|
params?: {
|
|
@@ -2601,6 +2768,101 @@ export interface components {
|
|
|
2601
2768
|
};
|
|
2602
2769
|
remove?: string[];
|
|
2603
2770
|
};
|
|
2771
|
+
/** @description Parent SDK control plane with exact receiver CAS and one-time claiming. Plugin handlers run on the source-bound MessagePort. No Worker or runtime IPC is involved. */
|
|
2772
|
+
SurfaceMethods: unknown;
|
|
2773
|
+
SurfaceMethodsRequest: {
|
|
2774
|
+
plugin_instance_id: string;
|
|
2775
|
+
surface_instance_id: string;
|
|
2776
|
+
bridge_channel_id: string;
|
|
2777
|
+
plugin_gateway_token: string;
|
|
2778
|
+
/** @enum {unknown} */
|
|
2779
|
+
operation: "register" | "configure" | "claim" | "complete" | "close";
|
|
2780
|
+
receiver_id?: string;
|
|
2781
|
+
methods?: string[];
|
|
2782
|
+
invocation_id?: string;
|
|
2783
|
+
active_invocations?: string[];
|
|
2784
|
+
data?: unknown;
|
|
2785
|
+
failed?: boolean;
|
|
2786
|
+
} & (unknown & unknown & unknown & unknown & unknown & unknown & unknown);
|
|
2787
|
+
SurfaceMethodsInvocation: {
|
|
2788
|
+
invocation_id: string;
|
|
2789
|
+
method: string;
|
|
2790
|
+
params: {
|
|
2791
|
+
[key: string]: unknown;
|
|
2792
|
+
};
|
|
2793
|
+
/** Format: date-time */
|
|
2794
|
+
deadline: string;
|
|
2795
|
+
};
|
|
2796
|
+
SurfaceMethodsResult: {
|
|
2797
|
+
receiver_id: string;
|
|
2798
|
+
invocation?: components["schemas"]["SurfaceMethodsInvocation"];
|
|
2799
|
+
cancelled: string[];
|
|
2800
|
+
};
|
|
2801
|
+
Connections: components["schemas"]["ConnectionsReviewRequest"] | components["schemas"]["ConnectionsReviewReference"] | components["schemas"]["ConnectionsListRequest"] | components["schemas"]["ConnectionsRevokeRequest"] | components["schemas"]["ConnectionsReview"] | components["schemas"]["ConnectionsConnection"] | components["schemas"]["ConnectionsWebConnection"] | components["schemas"]["ConnectionsReviewResult"] | components["schemas"]["ConnectionsConnectionList"];
|
|
2802
|
+
ConnectionsReviewRequest: {
|
|
2803
|
+
plugin_instance_id: string;
|
|
2804
|
+
connector_id: string;
|
|
2805
|
+
destination: string;
|
|
2806
|
+
expected_revision: number;
|
|
2807
|
+
http_methods?: ("GET" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | "DELETE")[];
|
|
2808
|
+
secret_ref?: string;
|
|
2809
|
+
private_prefixes?: string[];
|
|
2810
|
+
};
|
|
2811
|
+
ConnectionsReviewReference: {
|
|
2812
|
+
plugin_instance_id: string;
|
|
2813
|
+
review_id: string;
|
|
2814
|
+
};
|
|
2815
|
+
ConnectionsListRequest: {
|
|
2816
|
+
plugin_instance_id: string;
|
|
2817
|
+
};
|
|
2818
|
+
ConnectionsRevokeRequest: {
|
|
2819
|
+
plugin_instance_id: string;
|
|
2820
|
+
connector_id: string;
|
|
2821
|
+
expected_revision: number;
|
|
2822
|
+
};
|
|
2823
|
+
ConnectionsReview: {
|
|
2824
|
+
plugin_instance_id: string;
|
|
2825
|
+
connector_id: string;
|
|
2826
|
+
destination: string;
|
|
2827
|
+
expected_revision: number;
|
|
2828
|
+
http_methods?: ("GET" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | "DELETE")[];
|
|
2829
|
+
secret_ref?: string;
|
|
2830
|
+
private_prefixes?: string[];
|
|
2831
|
+
review_id: string;
|
|
2832
|
+
/** @enum {unknown} */
|
|
2833
|
+
scope: "user" | "environment";
|
|
2834
|
+
/** Format: date-time */
|
|
2835
|
+
review_expires_at: string;
|
|
2836
|
+
/** Format: date-time */
|
|
2837
|
+
expires_at: string;
|
|
2838
|
+
};
|
|
2839
|
+
ConnectionsConnection: {
|
|
2840
|
+
connector_id: string;
|
|
2841
|
+
connection_id?: string;
|
|
2842
|
+
/** @enum {unknown} */
|
|
2843
|
+
scope: "user" | "environment";
|
|
2844
|
+
destination?: string;
|
|
2845
|
+
http_methods?: ("GET" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | "DELETE")[];
|
|
2846
|
+
secret_ref?: string;
|
|
2847
|
+
private_prefixes?: string[];
|
|
2848
|
+
revision: number;
|
|
2849
|
+
/** @enum {unknown} */
|
|
2850
|
+
status: "fixed" | "unconfigured" | "active" | "expired" | "revoked" | "stale";
|
|
2851
|
+
/** Format: date-time */
|
|
2852
|
+
expires_at?: string;
|
|
2853
|
+
};
|
|
2854
|
+
ConnectionsWebConnection: {
|
|
2855
|
+
connector_id: string;
|
|
2856
|
+
connection_id: string;
|
|
2857
|
+
base_path: string;
|
|
2858
|
+
http_methods: ("GET" | "HEAD" | "OPTIONS" | "POST" | "PUT" | "PATCH" | "DELETE")[];
|
|
2859
|
+
};
|
|
2860
|
+
ConnectionsReviewResult: {
|
|
2861
|
+
review: components["schemas"]["ConnectionsReview"];
|
|
2862
|
+
};
|
|
2863
|
+
ConnectionsConnectionList: {
|
|
2864
|
+
connections: components["schemas"]["ConnectionsConnection"][];
|
|
2865
|
+
};
|
|
2604
2866
|
/** @description Host-owned selection, approval, durable authority and bounded surface I/O. Permission declarations are ceilings, never grants. Selected resource watches are unsupported. */
|
|
2605
2867
|
FileResources: components["schemas"]["FileResourcesResource"] | components["schemas"]["FileResourcesReview"] | components["schemas"]["FileResourcesIoRequest"];
|
|
2606
2868
|
FileResourcesResourceId: string;
|
|
@@ -3000,11 +3262,11 @@ export interface components {
|
|
|
3000
3262
|
};
|
|
3001
3263
|
ErrorCodes: Record<string, never>;
|
|
3002
3264
|
/** @enum {string} */
|
|
3003
|
-
ErrorCodesPlatformErrorCode: "PLUGIN_INVALID_REQUEST" | "PLUGIN_MANIFEST_INVALID" | "PLUGIN_PACKAGE_INVALID" | "PLUGIN_PACKAGE_TOO_LARGE" | "PLUGIN_PACKAGE_PATH_FORBIDDEN" | "PLUGIN_SIGNATURE_INVALID" | "PLUGIN_TRUST_STATE_DENIED" | "PLUGIN_TRUST_VERIFICATION_REQUIRED" | "PLUGIN_TRUST_VERIFICATION_INVALID" | "PLUGIN_RELEASE_REF_VERIFICATION_FAILED" | "PLUGIN_RELEASE_REF_POLICY_DENIED" | "PLUGIN_RELEASE_NETWORK" | "PLUGIN_RELEASE_TIMEOUT" | "PLUGIN_RELEASE_ASSET_MISSING" | "PLUGIN_RELEASE_ASSET_INTEGRITY" | "PLUGIN_INSTALL_INTERRUPTED" | "PLUGIN_INSTALL_STATE_CONFLICT" | "PLUGIN_RETAINED_DATA_INCOMPATIBLE" | "PLUGIN_INTERNAL_FAILURE" | "PLUGIN_DISABLED" | "PLUGIN_PERMISSION_DENIED" | "PLUGIN_ORIGIN_DENIED" | "PLUGIN_ACTION_DENIED" | "PLUGIN_OWNER_SCOPE_MISMATCH" | "PLUGIN_SECRET_SCOPE_MISMATCH" | "PLUGIN_STORAGE_SCOPE_MISMATCH" | "PLUGIN_ADAPTER_FAILURE" | "PLUGIN_SESSION_REVOKED" | "PLUGIN_SESSION_TEARDOWN_INCOMPLETE" | "PLUGIN_SESSION_FENCE_CAPACITY" | "PLUGIN_CONFIRMATION_REQUIRED" | "PLUGIN_CONFIRMATION_INVALID" | "PLUGIN_TOKEN_EXPIRED" | "PLUGIN_TOKEN_REPLAY" | "PLUGIN_GATEWAY_TOKEN_INVALID" | "PLUGIN_GATEWAY_TOKEN_REPLAYED" | "PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH" | "PLUGIN_ASSET_TICKET_INVALID" | "PLUGIN_ASSET_SESSION_INVALID" | "PLUGIN_STREAM_TICKET_INVALID" | "PLUGIN_STREAM_DELIVERY_INVALID" | "PLUGIN_STREAM_CANCELLED" | "PLUGIN_LEASE_INVALID" | "PLUGIN_LEASE_REPLAYED" | "PLUGIN_GRANT_INVALID" | "PLUGIN_STORAGE_QUOTA_EXCEEDED" | "PLUGIN_EXECUTION_BLOCKED" | "PLUGIN_EXECUTION_NOT_FOUND" | "PLUGIN_EXECUTION_NOT_CANCELABLE" | "PLUGIN_NETWORK_TARGET_DENIED" | "PLUGIN_NETWORK_RATE_LIMITED" | "PLUGIN_RUNTIME_UNAVAILABLE" | "PLUGIN_RUNTIME_VERSION_MISMATCH" | "PLUGIN_RUNTIME_CONTRACT_MISMATCH" | "PLUGIN_UI_PROTOCOL_VIOLATION" | "PLUGIN_SURFACE_QUIESCE_TIMEOUT" | "PLUGIN_JSON_LIMIT_EXCEEDED" | "PLUGIN_CAPABILITY_ERROR" | "PLUGIN_WORKER_ERROR" | "PLUGIN_FILE_OPERATION_FAILED" | "PLUGIN_CONTRACT_MISMATCH" | "PLUGIN_MANAGEMENT_REVISION_MISMATCH" | "PLUGIN_AUTHORIZATION_REVISION_MISMATCH" | "PLUGIN_BINDING_REVISION_MISMATCH" | "PLUGIN_VALUES_REVISION_MISMATCH" | "PLUGIN_CSRF_REQUIRED" | "PLUGIN_CSRF_INVALID" | "PLUGIN_FEATURE_NOT_CONFIGURED";
|
|
3265
|
+
ErrorCodesPlatformErrorCode: "PLUGIN_INVALID_REQUEST" | "PLUGIN_MANIFEST_INVALID" | "PLUGIN_PACKAGE_INVALID" | "PLUGIN_PACKAGE_TOO_LARGE" | "PLUGIN_PACKAGE_PATH_FORBIDDEN" | "PLUGIN_SIGNATURE_INVALID" | "PLUGIN_TRUST_STATE_DENIED" | "PLUGIN_TRUST_VERIFICATION_REQUIRED" | "PLUGIN_TRUST_VERIFICATION_INVALID" | "PLUGIN_RELEASE_REF_VERIFICATION_FAILED" | "PLUGIN_RELEASE_REF_POLICY_DENIED" | "PLUGIN_RELEASE_NETWORK" | "PLUGIN_RELEASE_TIMEOUT" | "PLUGIN_RELEASE_ASSET_MISSING" | "PLUGIN_RELEASE_ASSET_INTEGRITY" | "PLUGIN_INSTALL_INTERRUPTED" | "PLUGIN_INSTALL_STATE_CONFLICT" | "PLUGIN_RETAINED_DATA_INCOMPATIBLE" | "PLUGIN_INTERNAL_FAILURE" | "PLUGIN_DISABLED" | "PLUGIN_PERMISSION_DENIED" | "PLUGIN_ORIGIN_DENIED" | "PLUGIN_ACTION_DENIED" | "PLUGIN_OWNER_SCOPE_MISMATCH" | "PLUGIN_SECRET_SCOPE_MISMATCH" | "PLUGIN_STORAGE_SCOPE_MISMATCH" | "PLUGIN_ADAPTER_FAILURE" | "PLUGIN_SESSION_REVOKED" | "PLUGIN_SESSION_TEARDOWN_INCOMPLETE" | "PLUGIN_SESSION_FENCE_CAPACITY" | "PLUGIN_CONFIRMATION_REQUIRED" | "PLUGIN_CONFIRMATION_INVALID" | "PLUGIN_TOKEN_EXPIRED" | "PLUGIN_TOKEN_REPLAY" | "PLUGIN_GATEWAY_TOKEN_INVALID" | "PLUGIN_GATEWAY_TOKEN_REPLAYED" | "PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH" | "PLUGIN_ASSET_TICKET_INVALID" | "PLUGIN_ASSET_SESSION_INVALID" | "PLUGIN_STREAM_TICKET_INVALID" | "PLUGIN_STREAM_DELIVERY_INVALID" | "PLUGIN_STREAM_CANCELLED" | "PLUGIN_LEASE_INVALID" | "PLUGIN_LEASE_REPLAYED" | "PLUGIN_GRANT_INVALID" | "PLUGIN_STORAGE_QUOTA_EXCEEDED" | "PLUGIN_EXECUTION_BLOCKED" | "PLUGIN_EXECUTION_NOT_FOUND" | "PLUGIN_EXECUTION_NOT_CANCELABLE" | "PLUGIN_SURFACE_METHOD_UNAVAILABLE" | "PLUGIN_SURFACE_METHOD_CONFLICT" | "PLUGIN_SURFACE_METHOD_AMBIGUOUS" | "PLUGIN_SURFACE_METHOD_FAILED" | "PLUGIN_CONNECTION_UNAVAILABLE" | "PLUGIN_CONNECTION_CONFLICT" | "PLUGIN_NETWORK_TARGET_DENIED" | "PLUGIN_NETWORK_RATE_LIMITED" | "PLUGIN_RUNTIME_UNAVAILABLE" | "PLUGIN_RUNTIME_VERSION_MISMATCH" | "PLUGIN_RUNTIME_CONTRACT_MISMATCH" | "PLUGIN_UI_PROTOCOL_VIOLATION" | "PLUGIN_SURFACE_QUIESCE_TIMEOUT" | "PLUGIN_JSON_LIMIT_EXCEEDED" | "PLUGIN_CAPABILITY_ERROR" | "PLUGIN_WORKER_ERROR" | "PLUGIN_FILE_OPERATION_FAILED" | "PLUGIN_CONTRACT_MISMATCH" | "PLUGIN_MANAGEMENT_REVISION_MISMATCH" | "PLUGIN_AUTHORIZATION_REVISION_MISMATCH" | "PLUGIN_BINDING_REVISION_MISMATCH" | "PLUGIN_VALUES_REVISION_MISMATCH" | "PLUGIN_CSRF_REQUIRED" | "PLUGIN_CSRF_INVALID" | "PLUGIN_FEATURE_NOT_CONFIGURED";
|
|
3004
3266
|
/** @enum {string} */
|
|
3005
|
-
ErrorCodesBridgeErrorCode: "PLUGIN_INVALID_REQUEST" | "PLUGIN_MANIFEST_INVALID" | "PLUGIN_PACKAGE_INVALID" | "PLUGIN_PACKAGE_TOO_LARGE" | "PLUGIN_PACKAGE_PATH_FORBIDDEN" | "PLUGIN_SIGNATURE_INVALID" | "PLUGIN_TRUST_STATE_DENIED" | "PLUGIN_TRUST_VERIFICATION_REQUIRED" | "PLUGIN_TRUST_VERIFICATION_INVALID" | "PLUGIN_RELEASE_REF_VERIFICATION_FAILED" | "PLUGIN_RELEASE_REF_POLICY_DENIED" | "PLUGIN_RELEASE_NETWORK" | "PLUGIN_RELEASE_TIMEOUT" | "PLUGIN_RELEASE_ASSET_MISSING" | "PLUGIN_RELEASE_ASSET_INTEGRITY" | "PLUGIN_INSTALL_INTERRUPTED" | "PLUGIN_INSTALL_STATE_CONFLICT" | "PLUGIN_RETAINED_DATA_INCOMPATIBLE" | "PLUGIN_INTERNAL_FAILURE" | "PLUGIN_DISABLED" | "PLUGIN_PERMISSION_DENIED" | "PLUGIN_ORIGIN_DENIED" | "PLUGIN_ACTION_DENIED" | "PLUGIN_OWNER_SCOPE_MISMATCH" | "PLUGIN_SECRET_SCOPE_MISMATCH" | "PLUGIN_STORAGE_SCOPE_MISMATCH" | "PLUGIN_ADAPTER_FAILURE" | "PLUGIN_SESSION_REVOKED" | "PLUGIN_SESSION_TEARDOWN_INCOMPLETE" | "PLUGIN_SESSION_FENCE_CAPACITY" | "PLUGIN_CONFIRMATION_REQUIRED" | "PLUGIN_CONFIRMATION_INVALID" | "PLUGIN_TOKEN_EXPIRED" | "PLUGIN_TOKEN_REPLAY" | "PLUGIN_GATEWAY_TOKEN_INVALID" | "PLUGIN_GATEWAY_TOKEN_REPLAYED" | "PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH" | "PLUGIN_ASSET_TICKET_INVALID" | "PLUGIN_ASSET_SESSION_INVALID" | "PLUGIN_STREAM_TICKET_INVALID" | "PLUGIN_STREAM_DELIVERY_INVALID" | "PLUGIN_STREAM_CANCELLED" | "PLUGIN_LEASE_INVALID" | "PLUGIN_LEASE_REPLAYED" | "PLUGIN_GRANT_INVALID" | "PLUGIN_STORAGE_QUOTA_EXCEEDED" | "PLUGIN_EXECUTION_BLOCKED" | "PLUGIN_EXECUTION_NOT_FOUND" | "PLUGIN_EXECUTION_NOT_CANCELABLE" | "PLUGIN_NETWORK_TARGET_DENIED" | "PLUGIN_NETWORK_RATE_LIMITED" | "PLUGIN_RUNTIME_UNAVAILABLE" | "PLUGIN_RUNTIME_VERSION_MISMATCH" | "PLUGIN_RUNTIME_CONTRACT_MISMATCH" | "PLUGIN_UI_PROTOCOL_VIOLATION" | "PLUGIN_SURFACE_QUIESCE_TIMEOUT" | "PLUGIN_JSON_LIMIT_EXCEEDED" | "PLUGIN_CAPABILITY_ERROR" | "PLUGIN_WORKER_ERROR" | "PLUGIN_FILE_OPERATION_FAILED" | "PLUGIN_CONTRACT_MISMATCH" | "PLUGIN_MANAGEMENT_REVISION_MISMATCH" | "PLUGIN_AUTHORIZATION_REVISION_MISMATCH" | "PLUGIN_BINDING_REVISION_MISMATCH" | "PLUGIN_VALUES_REVISION_MISMATCH" | "PLUGIN_CSRF_REQUIRED" | "PLUGIN_CSRF_INVALID" | "PLUGIN_FEATURE_NOT_CONFIGURED" | "PLUGIN_CONFIRMATION_REJECTED" | "PLUGIN_BRIDGE_CANCELLED" | "PLUGIN_BRIDGE_TIMEOUT" | "PLUGIN_BRIDGE_DISPOSED" | "PLUGIN_BRIDGE_HANDSHAKE_FAILED" | "PLUGIN_BRIDGE_HANDSHAKE_REQUIRED";
|
|
3267
|
+
ErrorCodesBridgeErrorCode: "PLUGIN_INVALID_REQUEST" | "PLUGIN_MANIFEST_INVALID" | "PLUGIN_PACKAGE_INVALID" | "PLUGIN_PACKAGE_TOO_LARGE" | "PLUGIN_PACKAGE_PATH_FORBIDDEN" | "PLUGIN_SIGNATURE_INVALID" | "PLUGIN_TRUST_STATE_DENIED" | "PLUGIN_TRUST_VERIFICATION_REQUIRED" | "PLUGIN_TRUST_VERIFICATION_INVALID" | "PLUGIN_RELEASE_REF_VERIFICATION_FAILED" | "PLUGIN_RELEASE_REF_POLICY_DENIED" | "PLUGIN_RELEASE_NETWORK" | "PLUGIN_RELEASE_TIMEOUT" | "PLUGIN_RELEASE_ASSET_MISSING" | "PLUGIN_RELEASE_ASSET_INTEGRITY" | "PLUGIN_INSTALL_INTERRUPTED" | "PLUGIN_INSTALL_STATE_CONFLICT" | "PLUGIN_RETAINED_DATA_INCOMPATIBLE" | "PLUGIN_INTERNAL_FAILURE" | "PLUGIN_DISABLED" | "PLUGIN_PERMISSION_DENIED" | "PLUGIN_ORIGIN_DENIED" | "PLUGIN_ACTION_DENIED" | "PLUGIN_OWNER_SCOPE_MISMATCH" | "PLUGIN_SECRET_SCOPE_MISMATCH" | "PLUGIN_STORAGE_SCOPE_MISMATCH" | "PLUGIN_ADAPTER_FAILURE" | "PLUGIN_SESSION_REVOKED" | "PLUGIN_SESSION_TEARDOWN_INCOMPLETE" | "PLUGIN_SESSION_FENCE_CAPACITY" | "PLUGIN_CONFIRMATION_REQUIRED" | "PLUGIN_CONFIRMATION_INVALID" | "PLUGIN_TOKEN_EXPIRED" | "PLUGIN_TOKEN_REPLAY" | "PLUGIN_GATEWAY_TOKEN_INVALID" | "PLUGIN_GATEWAY_TOKEN_REPLAYED" | "PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH" | "PLUGIN_ASSET_TICKET_INVALID" | "PLUGIN_ASSET_SESSION_INVALID" | "PLUGIN_STREAM_TICKET_INVALID" | "PLUGIN_STREAM_DELIVERY_INVALID" | "PLUGIN_STREAM_CANCELLED" | "PLUGIN_LEASE_INVALID" | "PLUGIN_LEASE_REPLAYED" | "PLUGIN_GRANT_INVALID" | "PLUGIN_STORAGE_QUOTA_EXCEEDED" | "PLUGIN_EXECUTION_BLOCKED" | "PLUGIN_EXECUTION_NOT_FOUND" | "PLUGIN_EXECUTION_NOT_CANCELABLE" | "PLUGIN_SURFACE_METHOD_UNAVAILABLE" | "PLUGIN_SURFACE_METHOD_CONFLICT" | "PLUGIN_SURFACE_METHOD_AMBIGUOUS" | "PLUGIN_SURFACE_METHOD_FAILED" | "PLUGIN_CONNECTION_UNAVAILABLE" | "PLUGIN_CONNECTION_CONFLICT" | "PLUGIN_NETWORK_TARGET_DENIED" | "PLUGIN_NETWORK_RATE_LIMITED" | "PLUGIN_RUNTIME_UNAVAILABLE" | "PLUGIN_RUNTIME_VERSION_MISMATCH" | "PLUGIN_RUNTIME_CONTRACT_MISMATCH" | "PLUGIN_UI_PROTOCOL_VIOLATION" | "PLUGIN_SURFACE_QUIESCE_TIMEOUT" | "PLUGIN_JSON_LIMIT_EXCEEDED" | "PLUGIN_CAPABILITY_ERROR" | "PLUGIN_WORKER_ERROR" | "PLUGIN_FILE_OPERATION_FAILED" | "PLUGIN_CONTRACT_MISMATCH" | "PLUGIN_MANAGEMENT_REVISION_MISMATCH" | "PLUGIN_AUTHORIZATION_REVISION_MISMATCH" | "PLUGIN_BINDING_REVISION_MISMATCH" | "PLUGIN_VALUES_REVISION_MISMATCH" | "PLUGIN_CSRF_REQUIRED" | "PLUGIN_CSRF_INVALID" | "PLUGIN_FEATURE_NOT_CONFIGURED" | "PLUGIN_CONFIRMATION_REJECTED" | "PLUGIN_BRIDGE_CANCELLED" | "PLUGIN_BRIDGE_TIMEOUT" | "PLUGIN_BRIDGE_DISPOSED" | "PLUGIN_BRIDGE_HANDSHAKE_FAILED" | "PLUGIN_BRIDGE_HANDSHAKE_REQUIRED";
|
|
3006
3268
|
/** @enum {string} */
|
|
3007
|
-
ErrorCodesTypescriptClientErrorCode: "PLUGIN_INVALID_REQUEST" | "PLUGIN_MANIFEST_INVALID" | "PLUGIN_PACKAGE_INVALID" | "PLUGIN_PACKAGE_TOO_LARGE" | "PLUGIN_PACKAGE_PATH_FORBIDDEN" | "PLUGIN_SIGNATURE_INVALID" | "PLUGIN_TRUST_STATE_DENIED" | "PLUGIN_TRUST_VERIFICATION_REQUIRED" | "PLUGIN_TRUST_VERIFICATION_INVALID" | "PLUGIN_RELEASE_REF_VERIFICATION_FAILED" | "PLUGIN_RELEASE_REF_POLICY_DENIED" | "PLUGIN_RELEASE_NETWORK" | "PLUGIN_RELEASE_TIMEOUT" | "PLUGIN_RELEASE_ASSET_MISSING" | "PLUGIN_RELEASE_ASSET_INTEGRITY" | "PLUGIN_INSTALL_INTERRUPTED" | "PLUGIN_INSTALL_STATE_CONFLICT" | "PLUGIN_RETAINED_DATA_INCOMPATIBLE" | "PLUGIN_INTERNAL_FAILURE" | "PLUGIN_DISABLED" | "PLUGIN_PERMISSION_DENIED" | "PLUGIN_ORIGIN_DENIED" | "PLUGIN_ACTION_DENIED" | "PLUGIN_OWNER_SCOPE_MISMATCH" | "PLUGIN_SECRET_SCOPE_MISMATCH" | "PLUGIN_STORAGE_SCOPE_MISMATCH" | "PLUGIN_ADAPTER_FAILURE" | "PLUGIN_SESSION_REVOKED" | "PLUGIN_SESSION_TEARDOWN_INCOMPLETE" | "PLUGIN_SESSION_FENCE_CAPACITY" | "PLUGIN_CONFIRMATION_REQUIRED" | "PLUGIN_CONFIRMATION_INVALID" | "PLUGIN_TOKEN_EXPIRED" | "PLUGIN_TOKEN_REPLAY" | "PLUGIN_GATEWAY_TOKEN_INVALID" | "PLUGIN_GATEWAY_TOKEN_REPLAYED" | "PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH" | "PLUGIN_ASSET_TICKET_INVALID" | "PLUGIN_ASSET_SESSION_INVALID" | "PLUGIN_STREAM_TICKET_INVALID" | "PLUGIN_STREAM_DELIVERY_INVALID" | "PLUGIN_STREAM_CANCELLED" | "PLUGIN_LEASE_INVALID" | "PLUGIN_LEASE_REPLAYED" | "PLUGIN_GRANT_INVALID" | "PLUGIN_STORAGE_QUOTA_EXCEEDED" | "PLUGIN_EXECUTION_BLOCKED" | "PLUGIN_EXECUTION_NOT_FOUND" | "PLUGIN_EXECUTION_NOT_CANCELABLE" | "PLUGIN_NETWORK_TARGET_DENIED" | "PLUGIN_NETWORK_RATE_LIMITED" | "PLUGIN_RUNTIME_UNAVAILABLE" | "PLUGIN_RUNTIME_VERSION_MISMATCH" | "PLUGIN_RUNTIME_CONTRACT_MISMATCH" | "PLUGIN_UI_PROTOCOL_VIOLATION" | "PLUGIN_SURFACE_QUIESCE_TIMEOUT" | "PLUGIN_JSON_LIMIT_EXCEEDED" | "PLUGIN_CAPABILITY_ERROR" | "PLUGIN_WORKER_ERROR" | "PLUGIN_FILE_OPERATION_FAILED" | "PLUGIN_CONTRACT_MISMATCH" | "PLUGIN_MANAGEMENT_REVISION_MISMATCH" | "PLUGIN_AUTHORIZATION_REVISION_MISMATCH" | "PLUGIN_BINDING_REVISION_MISMATCH" | "PLUGIN_VALUES_REVISION_MISMATCH" | "PLUGIN_CSRF_REQUIRED" | "PLUGIN_CSRF_INVALID" | "PLUGIN_FEATURE_NOT_CONFIGURED" | "PLUGIN_CONFIRMATION_REJECTED" | "PLUGIN_BRIDGE_CANCELLED" | "PLUGIN_BRIDGE_TIMEOUT" | "PLUGIN_BRIDGE_DISPOSED" | "PLUGIN_BRIDGE_HANDSHAKE_FAILED" | "PLUGIN_BRIDGE_HANDSHAKE_REQUIRED" | "PLUGIN_PLATFORM_REQUEST_FAILED" | "PLUGIN_STREAM_FAILED";
|
|
3269
|
+
ErrorCodesTypescriptClientErrorCode: "PLUGIN_INVALID_REQUEST" | "PLUGIN_MANIFEST_INVALID" | "PLUGIN_PACKAGE_INVALID" | "PLUGIN_PACKAGE_TOO_LARGE" | "PLUGIN_PACKAGE_PATH_FORBIDDEN" | "PLUGIN_SIGNATURE_INVALID" | "PLUGIN_TRUST_STATE_DENIED" | "PLUGIN_TRUST_VERIFICATION_REQUIRED" | "PLUGIN_TRUST_VERIFICATION_INVALID" | "PLUGIN_RELEASE_REF_VERIFICATION_FAILED" | "PLUGIN_RELEASE_REF_POLICY_DENIED" | "PLUGIN_RELEASE_NETWORK" | "PLUGIN_RELEASE_TIMEOUT" | "PLUGIN_RELEASE_ASSET_MISSING" | "PLUGIN_RELEASE_ASSET_INTEGRITY" | "PLUGIN_INSTALL_INTERRUPTED" | "PLUGIN_INSTALL_STATE_CONFLICT" | "PLUGIN_RETAINED_DATA_INCOMPATIBLE" | "PLUGIN_INTERNAL_FAILURE" | "PLUGIN_DISABLED" | "PLUGIN_PERMISSION_DENIED" | "PLUGIN_ORIGIN_DENIED" | "PLUGIN_ACTION_DENIED" | "PLUGIN_OWNER_SCOPE_MISMATCH" | "PLUGIN_SECRET_SCOPE_MISMATCH" | "PLUGIN_STORAGE_SCOPE_MISMATCH" | "PLUGIN_ADAPTER_FAILURE" | "PLUGIN_SESSION_REVOKED" | "PLUGIN_SESSION_TEARDOWN_INCOMPLETE" | "PLUGIN_SESSION_FENCE_CAPACITY" | "PLUGIN_CONFIRMATION_REQUIRED" | "PLUGIN_CONFIRMATION_INVALID" | "PLUGIN_TOKEN_EXPIRED" | "PLUGIN_TOKEN_REPLAY" | "PLUGIN_GATEWAY_TOKEN_INVALID" | "PLUGIN_GATEWAY_TOKEN_REPLAYED" | "PLUGIN_GATEWAY_TOKEN_CHANNEL_MISMATCH" | "PLUGIN_ASSET_TICKET_INVALID" | "PLUGIN_ASSET_SESSION_INVALID" | "PLUGIN_STREAM_TICKET_INVALID" | "PLUGIN_STREAM_DELIVERY_INVALID" | "PLUGIN_STREAM_CANCELLED" | "PLUGIN_LEASE_INVALID" | "PLUGIN_LEASE_REPLAYED" | "PLUGIN_GRANT_INVALID" | "PLUGIN_STORAGE_QUOTA_EXCEEDED" | "PLUGIN_EXECUTION_BLOCKED" | "PLUGIN_EXECUTION_NOT_FOUND" | "PLUGIN_EXECUTION_NOT_CANCELABLE" | "PLUGIN_SURFACE_METHOD_UNAVAILABLE" | "PLUGIN_SURFACE_METHOD_CONFLICT" | "PLUGIN_SURFACE_METHOD_AMBIGUOUS" | "PLUGIN_SURFACE_METHOD_FAILED" | "PLUGIN_CONNECTION_UNAVAILABLE" | "PLUGIN_CONNECTION_CONFLICT" | "PLUGIN_NETWORK_TARGET_DENIED" | "PLUGIN_NETWORK_RATE_LIMITED" | "PLUGIN_RUNTIME_UNAVAILABLE" | "PLUGIN_RUNTIME_VERSION_MISMATCH" | "PLUGIN_RUNTIME_CONTRACT_MISMATCH" | "PLUGIN_UI_PROTOCOL_VIOLATION" | "PLUGIN_SURFACE_QUIESCE_TIMEOUT" | "PLUGIN_JSON_LIMIT_EXCEEDED" | "PLUGIN_CAPABILITY_ERROR" | "PLUGIN_WORKER_ERROR" | "PLUGIN_FILE_OPERATION_FAILED" | "PLUGIN_CONTRACT_MISMATCH" | "PLUGIN_MANAGEMENT_REVISION_MISMATCH" | "PLUGIN_AUTHORIZATION_REVISION_MISMATCH" | "PLUGIN_BINDING_REVISION_MISMATCH" | "PLUGIN_VALUES_REVISION_MISMATCH" | "PLUGIN_CSRF_REQUIRED" | "PLUGIN_CSRF_INVALID" | "PLUGIN_FEATURE_NOT_CONFIGURED" | "PLUGIN_CONFIRMATION_REJECTED" | "PLUGIN_BRIDGE_CANCELLED" | "PLUGIN_BRIDGE_TIMEOUT" | "PLUGIN_BRIDGE_DISPOSED" | "PLUGIN_BRIDGE_HANDSHAKE_FAILED" | "PLUGIN_BRIDGE_HANDSHAKE_REQUIRED" | "PLUGIN_PLATFORM_REQUEST_FAILED" | "PLUGIN_STREAM_FAILED";
|
|
3008
3270
|
/** @enum {string} */
|
|
3009
3271
|
ErrorCodesRustIpcErrorCode: "ARTIFACT_HANDLE_FAILED" | "WORKER_INVOCATION_INVALID" | "RUNTIME_CAPABILITY_REVOKED" | "RUNTIME_CONTROL_CHANNEL_STALE" | "RUNTIME_LEASE_INVALID" | "RUNTIME_LEASE_SIGNATURE_INVALID" | "PLUGIN_LEASE_REPLAYED" | "WASM_WORKER_INVALID" | "WASM_WORKER_FAILED" | "RUNTIME_CAPACITY_EXCEEDED" | "RUNTIME_INVOCATION_CANCELED" | "PLUGIN_SESSION_REVOKED" | "SESSION_REVOKE_SEQUENCE_STALE" | "SESSION_REVOKE_DRAIN_TIMEOUT" | "UNSUPPORTED_FRAME";
|
|
3010
3272
|
/** @enum {string} */
|
|
@@ -3137,6 +3399,10 @@ export interface components {
|
|
|
3137
3399
|
web: {
|
|
3138
3400
|
root: string;
|
|
3139
3401
|
spa: boolean;
|
|
3402
|
+
network?: (components["schemas"]["ManifestV9NetworkAccess"] & {
|
|
3403
|
+
/** @constant */
|
|
3404
|
+
transport?: "http";
|
|
3405
|
+
})[];
|
|
3140
3406
|
};
|
|
3141
3407
|
}[];
|
|
3142
3408
|
capability_bindings?: {
|
|
@@ -3156,25 +3422,20 @@ export interface components {
|
|
|
3156
3422
|
store_id: string;
|
|
3157
3423
|
operations: ("read" | "write" | "delete" | "list" | "get" | "put" | "query" | "exec")[];
|
|
3158
3424
|
}[];
|
|
3159
|
-
network?:
|
|
3160
|
-
connector_id: string;
|
|
3161
|
-
/** @enum {unknown} */
|
|
3162
|
-
transport: "http" | "websocket" | "tcp" | "udp";
|
|
3163
|
-
operations: ("http" | "http_stream" | "websocket_round_trip" | "tcp_round_trip" | "udp_round_trip")[];
|
|
3164
|
-
http_methods?: ("GET" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS")[];
|
|
3165
|
-
} & unknown)[];
|
|
3425
|
+
network?: components["schemas"]["ManifestV9NetworkAccess"][];
|
|
3166
3426
|
process?: {
|
|
3167
3427
|
operations: ("start" | "attach" | "status" | "write_stdin" | "close_stdin" | "read_stdout" | "read_stderr" | "wait" | "terminate" | "kill" | "close")[];
|
|
3168
3428
|
}[];
|
|
3169
3429
|
};
|
|
3170
3430
|
route: {
|
|
3171
3431
|
/** @enum {unknown} */
|
|
3172
|
-
kind: "capability" | "worker" | "core_action";
|
|
3432
|
+
kind: "capability" | "worker" | "core_action" | "surface";
|
|
3173
3433
|
binding_id?: string;
|
|
3174
3434
|
target_method?: string;
|
|
3175
3435
|
worker_id?: string;
|
|
3176
3436
|
action_id?: string;
|
|
3177
|
-
|
|
3437
|
+
surface_id?: string;
|
|
3438
|
+
} & (unknown & unknown & unknown & unknown);
|
|
3178
3439
|
confirmation?: {
|
|
3179
3440
|
/** @enum {unknown} */
|
|
3180
3441
|
mode: "none" | "required" | "risk_based";
|
|
@@ -3204,7 +3465,7 @@ export interface components {
|
|
|
3204
3465
|
};
|
|
3205
3466
|
/** @description Explicit Worker permission ceiling. Omitted retains the package ceiling; an empty array grants no resource permissions. Requires authorization.scoped.v1. */
|
|
3206
3467
|
permissions?: ("fs.workspace.read" | "fs.workspace.write" | "fs.home.read" | "fs.home.write" | "fs.environment.read" | "fs.environment.write" | "network.client" | "network.listen" | "process.local" | "fs.selected.read" | "fs.selected.write")[];
|
|
3207
|
-
} & (unknown & unknown & unknown & unknown & unknown))[];
|
|
3468
|
+
} & (unknown & unknown & unknown & unknown & unknown & unknown))[];
|
|
3208
3469
|
workers: {
|
|
3209
3470
|
worker_id: string;
|
|
3210
3471
|
artifact: string;
|
|
@@ -3227,16 +3488,18 @@ export interface components {
|
|
|
3227
3488
|
}[];
|
|
3228
3489
|
};
|
|
3229
3490
|
network_access?: {
|
|
3230
|
-
connectors?: {
|
|
3491
|
+
connectors?: ({
|
|
3231
3492
|
connector_id: string;
|
|
3232
3493
|
/** @enum {unknown} */
|
|
3233
3494
|
transport: "http" | "websocket" | "tcp" | "udp";
|
|
3234
3495
|
/** @enum {unknown} */
|
|
3235
3496
|
scope: "user" | "environment";
|
|
3236
|
-
destinations
|
|
3497
|
+
destinations?: string[];
|
|
3237
3498
|
auth?: Record<string, never>;
|
|
3238
3499
|
tls?: Record<string, never>;
|
|
3239
|
-
|
|
3500
|
+
/** @description The Host must approve an exact user-configured target. Destinations must be empty when true. */
|
|
3501
|
+
configurable?: boolean;
|
|
3502
|
+
} & unknown)[];
|
|
3240
3503
|
};
|
|
3241
3504
|
process?: {
|
|
3242
3505
|
resource_limits?: {
|
|
@@ -3348,6 +3611,13 @@ export interface components {
|
|
|
3348
3611
|
} & (unknown & unknown)) | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown | unknown);
|
|
3349
3612
|
ManifestV9RequiredFeatures: ("io.stream.v1" | "fs.workspace.v1" | "fs.home.v1" | "fs.environment.v1" | "fs.watch.v1" | "net.http.v1" | "net.websocket.v1" | "net.tcp.v1" | "net.udp.v1" | "process.local.v1" | "authorization.scoped.v1" | "background.method.v1" | "fs.selected.v1")[];
|
|
3350
3613
|
ManifestV9OptionalFeatures: string[];
|
|
3614
|
+
ManifestV9NetworkAccess: {
|
|
3615
|
+
connector_id: string;
|
|
3616
|
+
/** @enum {unknown} */
|
|
3617
|
+
transport: "http" | "websocket" | "tcp" | "udp";
|
|
3618
|
+
operations: ("http" | "http_stream" | "websocket" | "tcp" | "udp")[];
|
|
3619
|
+
http_methods?: ("GET" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE" | "OPTIONS")[];
|
|
3620
|
+
} & unknown;
|
|
3351
3621
|
HostCapabilityPinV1: {
|
|
3352
3622
|
publisher_id: components["schemas"]["HostCapabilityPinV1Id"];
|
|
3353
3623
|
contract_id: components["schemas"]["HostCapabilityPinV1Id"];
|
|
@@ -3960,6 +4230,169 @@ export interface components {
|
|
|
3960
4230
|
}
|
|
3961
4231
|
export type $defs = Record<string, never>;
|
|
3962
4232
|
export interface operations {
|
|
4233
|
+
surfaceMethods: {
|
|
4234
|
+
parameters: {
|
|
4235
|
+
query?: never;
|
|
4236
|
+
header?: never;
|
|
4237
|
+
path?: never;
|
|
4238
|
+
cookie?: never;
|
|
4239
|
+
};
|
|
4240
|
+
requestBody: {
|
|
4241
|
+
content: {
|
|
4242
|
+
"application/json": components["schemas"]["SurfaceMethodsRequest"];
|
|
4243
|
+
};
|
|
4244
|
+
};
|
|
4245
|
+
responses: {
|
|
4246
|
+
/** @description Exact receiver result */
|
|
4247
|
+
200: {
|
|
4248
|
+
headers: {
|
|
4249
|
+
[name: string]: unknown;
|
|
4250
|
+
};
|
|
4251
|
+
content: {
|
|
4252
|
+
"application/json": components["schemas"]["SurfaceMethodsSuccessResponse"];
|
|
4253
|
+
};
|
|
4254
|
+
};
|
|
4255
|
+
default: components["responses"]["MutationPlatformErrorResponse"];
|
|
4256
|
+
};
|
|
4257
|
+
};
|
|
4258
|
+
preparePluginIntentConfirmation: {
|
|
4259
|
+
parameters: {
|
|
4260
|
+
query?: never;
|
|
4261
|
+
header?: never;
|
|
4262
|
+
path?: never;
|
|
4263
|
+
cookie?: never;
|
|
4264
|
+
};
|
|
4265
|
+
requestBody: components["requestBodies"]["InvokeIntentRequest"];
|
|
4266
|
+
responses: {
|
|
4267
|
+
200: components["responses"]["PluginMethodConfirmationPreparationResponse"];
|
|
4268
|
+
default: components["responses"]["MutationPlatformErrorResponse"];
|
|
4269
|
+
};
|
|
4270
|
+
};
|
|
4271
|
+
reviewConnection: {
|
|
4272
|
+
parameters: {
|
|
4273
|
+
query?: never;
|
|
4274
|
+
header?: never;
|
|
4275
|
+
path?: never;
|
|
4276
|
+
cookie?: never;
|
|
4277
|
+
};
|
|
4278
|
+
requestBody: {
|
|
4279
|
+
content: {
|
|
4280
|
+
"application/json": components["schemas"]["ConnectionsReviewRequest"];
|
|
4281
|
+
};
|
|
4282
|
+
};
|
|
4283
|
+
responses: {
|
|
4284
|
+
/** @description Controlled connection result */
|
|
4285
|
+
200: {
|
|
4286
|
+
headers: {
|
|
4287
|
+
[name: string]: unknown;
|
|
4288
|
+
};
|
|
4289
|
+
content: {
|
|
4290
|
+
"application/json": components["schemas"]["ReviewConnectionSuccessResponse"];
|
|
4291
|
+
};
|
|
4292
|
+
};
|
|
4293
|
+
default: components["responses"]["MutationPlatformErrorResponse"];
|
|
4294
|
+
};
|
|
4295
|
+
};
|
|
4296
|
+
approveConnection: {
|
|
4297
|
+
parameters: {
|
|
4298
|
+
query?: never;
|
|
4299
|
+
header?: never;
|
|
4300
|
+
path?: never;
|
|
4301
|
+
cookie?: never;
|
|
4302
|
+
};
|
|
4303
|
+
requestBody: {
|
|
4304
|
+
content: {
|
|
4305
|
+
"application/json": components["schemas"]["ConnectionsReviewReference"];
|
|
4306
|
+
};
|
|
4307
|
+
};
|
|
4308
|
+
responses: {
|
|
4309
|
+
/** @description Controlled connection result */
|
|
4310
|
+
200: {
|
|
4311
|
+
headers: {
|
|
4312
|
+
[name: string]: unknown;
|
|
4313
|
+
};
|
|
4314
|
+
content: {
|
|
4315
|
+
"application/json": components["schemas"]["ApproveConnectionSuccessResponse"];
|
|
4316
|
+
};
|
|
4317
|
+
};
|
|
4318
|
+
default: components["responses"]["MutationPlatformErrorResponse"];
|
|
4319
|
+
};
|
|
4320
|
+
};
|
|
4321
|
+
cancelConnectionReview: {
|
|
4322
|
+
parameters: {
|
|
4323
|
+
query?: never;
|
|
4324
|
+
header?: never;
|
|
4325
|
+
path?: never;
|
|
4326
|
+
cookie?: never;
|
|
4327
|
+
};
|
|
4328
|
+
requestBody: {
|
|
4329
|
+
content: {
|
|
4330
|
+
"application/json": components["schemas"]["ConnectionsReviewReference"];
|
|
4331
|
+
};
|
|
4332
|
+
};
|
|
4333
|
+
responses: {
|
|
4334
|
+
/** @description Controlled connection result */
|
|
4335
|
+
200: {
|
|
4336
|
+
headers: {
|
|
4337
|
+
[name: string]: unknown;
|
|
4338
|
+
};
|
|
4339
|
+
content: {
|
|
4340
|
+
"application/json": components["schemas"]["CancelConnectionReviewSuccessResponse"];
|
|
4341
|
+
};
|
|
4342
|
+
};
|
|
4343
|
+
default: components["responses"]["MutationPlatformErrorResponse"];
|
|
4344
|
+
};
|
|
4345
|
+
};
|
|
4346
|
+
listConnections: {
|
|
4347
|
+
parameters: {
|
|
4348
|
+
query?: never;
|
|
4349
|
+
header?: never;
|
|
4350
|
+
path?: never;
|
|
4351
|
+
cookie?: never;
|
|
4352
|
+
};
|
|
4353
|
+
requestBody: {
|
|
4354
|
+
content: {
|
|
4355
|
+
"application/json": components["schemas"]["ConnectionsListRequest"];
|
|
4356
|
+
};
|
|
4357
|
+
};
|
|
4358
|
+
responses: {
|
|
4359
|
+
/** @description Controlled connection result */
|
|
4360
|
+
200: {
|
|
4361
|
+
headers: {
|
|
4362
|
+
[name: string]: unknown;
|
|
4363
|
+
};
|
|
4364
|
+
content: {
|
|
4365
|
+
"application/json": components["schemas"]["ListConnectionsSuccessResponse"];
|
|
4366
|
+
};
|
|
4367
|
+
};
|
|
4368
|
+
default: components["responses"]["PlatformErrorResponse"];
|
|
4369
|
+
};
|
|
4370
|
+
};
|
|
4371
|
+
revokeConnection: {
|
|
4372
|
+
parameters: {
|
|
4373
|
+
query?: never;
|
|
4374
|
+
header?: never;
|
|
4375
|
+
path?: never;
|
|
4376
|
+
cookie?: never;
|
|
4377
|
+
};
|
|
4378
|
+
requestBody: {
|
|
4379
|
+
content: {
|
|
4380
|
+
"application/json": components["schemas"]["ConnectionsRevokeRequest"];
|
|
4381
|
+
};
|
|
4382
|
+
};
|
|
4383
|
+
responses: {
|
|
4384
|
+
/** @description Controlled connection result */
|
|
4385
|
+
200: {
|
|
4386
|
+
headers: {
|
|
4387
|
+
[name: string]: unknown;
|
|
4388
|
+
};
|
|
4389
|
+
content: {
|
|
4390
|
+
"application/json": components["schemas"]["RevokeConnectionSuccessResponse"];
|
|
4391
|
+
};
|
|
4392
|
+
};
|
|
4393
|
+
default: components["responses"]["MutationPlatformErrorResponse"];
|
|
4394
|
+
};
|
|
4395
|
+
};
|
|
3963
4396
|
selectFileResource: {
|
|
3964
4397
|
parameters: {
|
|
3965
4398
|
query?: never;
|
package/dist/platform.d.ts
CHANGED
|
@@ -165,6 +165,7 @@ export declare class PluginPlatformClient {
|
|
|
165
165
|
cancelExecution(executionID: string, reason?: string, options?: PluginRequestOptions): Promise<PluginExecution>;
|
|
166
166
|
listExecutionEvents(executionID: string, request: PluginExecutionEventListOptions, options?: PluginRequestOptions): Promise<PluginExecutionEventList>;
|
|
167
167
|
listIntents(options?: PluginIntentListOptions, requestOptions?: PluginRequestOptions): Promise<PluginIntentList>;
|
|
168
|
+
prepareIntentConfirmation(request: PluginIntentInvokeRequest, options?: PluginRequestOptions): Promise<PlatformSchemas["PluginMethodConfirmationPreparation"]>;
|
|
168
169
|
invokeIntent<T = unknown>(request: PluginIntentInvokeRequest, options?: PluginRequestOptions): Promise<PluginMethodResult<T>>;
|
|
169
170
|
exportData(request: PluginDataExportRequest, options?: PluginRequestOptions): Promise<PluginDataExportResult>;
|
|
170
171
|
deleteDataExport(request: PluginDataExportDeleteRequest, options?: PluginRequestOptions): Promise<PluginDataExportDeleteResult>;
|
|
@@ -172,6 +173,11 @@ export declare class PluginPlatformClient {
|
|
|
172
173
|
listRetainedData(options?: PluginRetainedDataListOptions, requestOptions?: PluginRequestOptions): Promise<PluginRetainedDataList>;
|
|
173
174
|
deleteRetainedData(request: PluginRetainedDataDeleteRequest, options?: PluginRequestOptions): Promise<PluginDataBinding>;
|
|
174
175
|
cleanupExpiredRetainedData(request?: PluginRetainedDataCleanupRequest, options?: PluginRequestOptions): Promise<PluginRetainedDataCleanupResult>;
|
|
176
|
+
reviewConnection(request: PlatformSchemas["ConnectionReviewRequest"], options?: PluginRequestOptions): Promise<PlatformSchemas["ReviewConnectionSuccessResponse"]["data"]>;
|
|
177
|
+
approveConnection(request: PlatformSchemas["ConnectionReviewReference"], options?: PluginRequestOptions): Promise<PlatformSchemas["ApproveConnectionSuccessResponse"]["data"]>;
|
|
178
|
+
cancelConnectionReview(request: PlatformSchemas["ConnectionReviewReference"], options?: PluginRequestOptions): Promise<PlatformSchemas["CancelConnectionReviewSuccessResponse"]["data"]>;
|
|
179
|
+
listConnections(request: PlatformSchemas["ConnectionListRequest"], options?: PluginRequestOptions): Promise<PlatformSchemas["ListConnectionsSuccessResponse"]["data"]>;
|
|
180
|
+
revokeConnection(request: PlatformSchemas["ConnectionRevokeRequest"], options?: PluginRequestOptions): Promise<PlatformSchemas["RevokeConnectionSuccessResponse"]["data"]>;
|
|
175
181
|
selectFileResource(request: PlatformSchemas["FileSelectRequest"], options?: PluginRequestOptions): Promise<PlatformSchemas["SelectFileResourceSuccessResponse"]["data"]>;
|
|
176
182
|
approveFileResource(request: PlatformSchemas["FileReviewRequest"], options?: PluginRequestOptions): Promise<PlatformSchemas["FileResource"]>;
|
|
177
183
|
cancelFileResource(request: PlatformSchemas["FileReviewRequest"], options?: PluginRequestOptions): Promise<{
|
package/dist/platform.js
CHANGED
|
@@ -240,6 +240,9 @@ export class PluginPlatformClient {
|
|
|
240
240
|
listIntents(options = {}, requestOptions = {}) {
|
|
241
241
|
return this.#requestQuery("/_redevplugin/api/plugins/intents/query", options, requestOptions);
|
|
242
242
|
}
|
|
243
|
+
prepareIntentConfirmation(request, options = {}) {
|
|
244
|
+
return this.#requestMutation("POST", "/_redevplugin/api/plugins/intents/confirmations/prepare", request, options);
|
|
245
|
+
}
|
|
243
246
|
invokeIntent(request, options = {}) {
|
|
244
247
|
return this.#requestMutation("POST", "/_redevplugin/api/plugins/intents/invoke", request, options);
|
|
245
248
|
}
|
|
@@ -261,6 +264,21 @@ export class PluginPlatformClient {
|
|
|
261
264
|
cleanupExpiredRetainedData(request = {}, options = {}) {
|
|
262
265
|
return this.#requestMutation("POST", "/_redevplugin/api/plugins/retained-data/cleanup-expired", request, options);
|
|
263
266
|
}
|
|
267
|
+
reviewConnection(request, options = {}) {
|
|
268
|
+
return this.#requestMutation("POST", "/_redevplugin/api/plugins/connections/review", request, options);
|
|
269
|
+
}
|
|
270
|
+
approveConnection(request, options = {}) {
|
|
271
|
+
return this.#requestMutation("POST", "/_redevplugin/api/plugins/connections/approve", request, options);
|
|
272
|
+
}
|
|
273
|
+
cancelConnectionReview(request, options = {}) {
|
|
274
|
+
return this.#requestMutation("POST", "/_redevplugin/api/plugins/connections/cancel", request, options);
|
|
275
|
+
}
|
|
276
|
+
listConnections(request, options = {}) {
|
|
277
|
+
return this.#requestQuery("/_redevplugin/api/plugins/connections/query", request, options);
|
|
278
|
+
}
|
|
279
|
+
revokeConnection(request, options = {}) {
|
|
280
|
+
return this.#requestMutation("POST", "/_redevplugin/api/plugins/connections/revoke", request, options);
|
|
281
|
+
}
|
|
264
282
|
selectFileResource(request, options = {}) {
|
|
265
283
|
return this.#requestMutation("POST", "/_redevplugin/api/plugins/file-resources/select", request, options);
|
|
266
284
|
}
|
package/dist/plugin.d.ts
CHANGED
|
@@ -6,5 +6,7 @@ export { pluginAPIMajor } from "./contracts.gen.js";
|
|
|
6
6
|
export { createPluginProcessClient } from "./process.js";
|
|
7
7
|
export type { PluginProcessExitResult, PluginProcessMethodContracts, PluginProcessReadResult, PluginProcessResourceLimits, PluginProcessStartRequest, PluginProcessStatus, } from "./process.js";
|
|
8
8
|
export { callCapabilityOperation, callCapabilityStream, callCapabilitySync, isCapabilityBusinessError, } from "./capability-client.js";
|
|
9
|
-
export type { BridgeLifecycleEvent, MessagePortLike, PluginBridgeClientOptions, PluginBridgeClock, PluginBridgeRequestOptions, PluginFileExportRequest, PluginJSONObject, PluginJSONValue, PluginMethodResult, PluginExecutionFailureCode, PluginExecutionSnapshot, PluginExecutionProgress, PluginExecutionEvent, PluginExecutionEventList, PluginSurfaceContext, PluginSurfaceFileExportMediaType, } from "./surface.js";
|
|
9
|
+
export type { BridgeLifecycleEvent, MessagePortLike, PluginBridgeClientOptions, PluginBridgeClock, PluginBridgeRequestOptions, PluginMethodHandler, PluginFileExportRequest, PluginJSONObject, PluginJSONValue, PluginMethodResult, PluginExecutionFailureCode, PluginExecutionSnapshot, PluginExecutionProgress, PluginExecutionEvent, PluginExecutionEventList, PluginSurfaceContext, PluginSurfaceFileExportMediaType, } from "./surface.js";
|
|
10
10
|
export type { PluginCapabilitySchema, PluginCapabilityEffect, PluginCapabilityOperationContract, PluginCapabilityStreamContract, PluginCapabilitySyncContract, PluginCapabilityStreamEvent, PluginCapabilityStreamReadResult, PluginExecution, PluginExecutionTerminalStatus, PluginExecutionWaitOptions, PluginStream, } from "./capability-client.js";
|
|
11
|
+
export { openPluginConnection } from "./connections.js";
|
|
12
|
+
export type { PluginWebConnection, PluginConnectionOptions } from "./connections.js";
|
package/dist/plugin.js
CHANGED
|
@@ -4,3 +4,4 @@ export { PluginBridgeError } from "./errors.js";
|
|
|
4
4
|
export { pluginAPIMajor } from "./contracts.gen.js";
|
|
5
5
|
export { createPluginProcessClient } from "./process.js";
|
|
6
6
|
export { callCapabilityOperation, callCapabilityStream, callCapabilitySync, isCapabilityBusinessError, } from "./capability-client.js";
|
|
7
|
+
export { openPluginConnection } from "./connections.js";
|
package/dist/surface.d.ts
CHANGED
|
@@ -238,6 +238,9 @@ export type PluginBridgeClientOptions = {
|
|
|
238
238
|
port?: MessagePortLike;
|
|
239
239
|
surfaceHandle?: string;
|
|
240
240
|
};
|
|
241
|
+
export type PluginMethodHandler = (params: PluginJSONObject, context: Readonly<{
|
|
242
|
+
signal: AbortSignal;
|
|
243
|
+
}>) => unknown | Promise<unknown>;
|
|
241
244
|
export type PluginBridgeRequestOptions = {
|
|
242
245
|
signal?: AbortSignal;
|
|
243
246
|
};
|
|
@@ -249,6 +252,8 @@ export declare class PluginBridgeClient {
|
|
|
249
252
|
constructor(options?: PluginBridgeClientOptions);
|
|
250
253
|
ready(): Promise<void>;
|
|
251
254
|
call<T = unknown>(method: string, params?: PluginJSONObject, options?: PluginBridgeRequestOptions): Promise<T>;
|
|
255
|
+
/** Register a declared application method after the authenticated bridge is ready. */
|
|
256
|
+
registerMethod(name: string, handler: PluginMethodHandler): Promise<() => Promise<void>>;
|
|
252
257
|
executionEvents(executionID: string, afterCursor: number, options?: PluginBridgeRequestOptions): Promise<PluginExecutionEventList>;
|
|
253
258
|
cancelExecution(executionID: string, reason?: string, options?: PluginBridgeRequestOptions): Promise<void>;
|
|
254
259
|
executionSnapshot(executionID: string, options?: PluginBridgeRequestOptions): Promise<PluginExecutionSnapshot>;
|
package/dist/surface.js
CHANGED
|
@@ -33,6 +33,8 @@ export class PluginBridgeClient {
|
|
|
33
33
|
files = new PluginFilesClient((request, options) => this.#fileIO(request, options));
|
|
34
34
|
surfaceHandle;
|
|
35
35
|
timeoutMs;
|
|
36
|
+
#methodHandlers = new Map();
|
|
37
|
+
#methodInvocations = new Map();
|
|
36
38
|
#nextID = 1;
|
|
37
39
|
#clock;
|
|
38
40
|
#port;
|
|
@@ -76,6 +78,61 @@ export class PluginBridgeClient {
|
|
|
76
78
|
const effect = options[pluginBridgeCapabilityEffect];
|
|
77
79
|
return this.#call(method, params, options, effect === undefined || effect !== "read");
|
|
78
80
|
}
|
|
81
|
+
/** Register a declared application method after the authenticated bridge is ready. */
|
|
82
|
+
async registerMethod(name, handler) {
|
|
83
|
+
this.#assertActive();
|
|
84
|
+
if (!validMethod(name) || typeof handler !== "function" || this.#methodHandlers.has(name) || this.#methodHandlers.size >= 128) {
|
|
85
|
+
throw new PluginBridgeError("PLUGIN_INVALID_REQUEST", "Application method registration is invalid or duplicated");
|
|
86
|
+
}
|
|
87
|
+
this.#methodHandlers.set(name, handler);
|
|
88
|
+
try {
|
|
89
|
+
await this.ready();
|
|
90
|
+
await this.#publishMethods();
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
if (this.#methodHandlers.get(name) === handler)
|
|
94
|
+
this.#methodHandlers.delete(name);
|
|
95
|
+
throw error;
|
|
96
|
+
}
|
|
97
|
+
return async () => {
|
|
98
|
+
if (this.#methodHandlers.get(name) !== handler)
|
|
99
|
+
return;
|
|
100
|
+
this.#methodHandlers.delete(name);
|
|
101
|
+
if (this.#lifecycleState === "active")
|
|
102
|
+
await this.#publishMethods();
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
#publishMethods() {
|
|
106
|
+
const id = this.#requestID("rpc");
|
|
107
|
+
return this.#request(id, { type: "redevplugin.bridge.methods", id, methods: Array.from(this.#methodHandlers.keys()).sort() }, { mutation: true });
|
|
108
|
+
}
|
|
109
|
+
async #invokeRegisteredMethod(invocation) {
|
|
110
|
+
if (this.#methodInvocations.has(invocation.invocation_id) || this.#methodInvocations.size >= 32)
|
|
111
|
+
return;
|
|
112
|
+
const handler = this.#methodHandlers.get(invocation.method);
|
|
113
|
+
const controller = new AbortController();
|
|
114
|
+
this.#methodInvocations.set(invocation.invocation_id, controller);
|
|
115
|
+
const timeout = setTimeout(() => controller.abort(), Math.max(0, Math.min(30000, Date.parse(invocation.deadline) - Date.now())));
|
|
116
|
+
try {
|
|
117
|
+
controller.signal.throwIfAborted();
|
|
118
|
+
if (!handler)
|
|
119
|
+
throw new Error("Application method is not registered");
|
|
120
|
+
const value = await handler(normalizePluginJSONObject(invocation.params), Object.freeze({ signal: controller.signal }));
|
|
121
|
+
const data = normalizePluginJSONValue(value === undefined ? null : value);
|
|
122
|
+
if (!messageWithinLimit(data))
|
|
123
|
+
throw new Error("Application result exceeds the message limit");
|
|
124
|
+
if (!controller.signal.aborted && this.#lifecycleState === "active")
|
|
125
|
+
this.#port.postMessage({ type: "redevplugin.bridge.method_result", invocation_id: invocation.invocation_id, data, failed: false });
|
|
126
|
+
}
|
|
127
|
+
catch {
|
|
128
|
+
if (!controller.signal.aborted && this.#lifecycleState === "active")
|
|
129
|
+
this.#port.postMessage({ type: "redevplugin.bridge.method_result", invocation_id: invocation.invocation_id, data: null, failed: true });
|
|
130
|
+
}
|
|
131
|
+
finally {
|
|
132
|
+
clearTimeout(timeout);
|
|
133
|
+
this.#methodInvocations.delete(invocation.invocation_id);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
79
136
|
#fileIO(request, options = {}) {
|
|
80
137
|
this.#assertActive();
|
|
81
138
|
if (!validFileIORequest(request))
|
|
@@ -204,6 +261,10 @@ export class PluginBridgeClient {
|
|
|
204
261
|
if (this.#lifecycleState === "disposed")
|
|
205
262
|
return;
|
|
206
263
|
this.#lifecycleState = "disposed";
|
|
264
|
+
for (const controller of this.#methodInvocations.values())
|
|
265
|
+
controller.abort();
|
|
266
|
+
this.#methodInvocations.clear();
|
|
267
|
+
this.#methodHandlers.clear();
|
|
207
268
|
const disposedError = new PluginBridgeError("PLUGIN_BRIDGE_DISPOSED", "Plugin bridge client is disposed");
|
|
208
269
|
if (!this.#ready)
|
|
209
270
|
this.#rejectReady(disposedError);
|
|
@@ -308,6 +369,14 @@ export class PluginBridgeClient {
|
|
|
308
369
|
const data = event.data;
|
|
309
370
|
if (!messageWithinLimit(data))
|
|
310
371
|
return;
|
|
372
|
+
if (hasExactKeys(data, ["type", "invocation"]) && data.type === "redevplugin.bridge.method_invoke" && isSurfaceMethodDelivery(data.invocation)) {
|
|
373
|
+
void this.#invokeRegisteredMethod(data.invocation);
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
if (hasExactKeys(data, ["type", "invocation_id"]) && data.type === "redevplugin.bridge.method_cancel" && typeof data.invocation_id === "string") {
|
|
377
|
+
this.#methodInvocations.get(data.invocation_id)?.abort();
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
311
380
|
if (isBridgeResponseCandidate(data)) {
|
|
312
381
|
const pending = this.#takePending(data.id);
|
|
313
382
|
if (!pending)
|
|
@@ -569,6 +638,10 @@ class PluginSurfaceHostImplementation {
|
|
|
569
638
|
surfaceInstanceId;
|
|
570
639
|
bootstrap;
|
|
571
640
|
bridgeChannelId;
|
|
641
|
+
#receiverID;
|
|
642
|
+
#receiverController;
|
|
643
|
+
#receiverTransition = Promise.resolve();
|
|
644
|
+
#receiverInvocations = new Set();
|
|
572
645
|
#frameGenerationId;
|
|
573
646
|
get frameGenerationId() { return this.#frameGenerationId; }
|
|
574
647
|
surfaceHandle;
|
|
@@ -780,6 +853,8 @@ class PluginSurfaceHostImplementation {
|
|
|
780
853
|
}, preparation.document.origin, [channel.port2]);
|
|
781
854
|
await signals.portAcknowledged.promise;
|
|
782
855
|
this.#assertActive();
|
|
856
|
+
await this.#receiverTransition;
|
|
857
|
+
this.#assertActive();
|
|
783
858
|
this.#setOpeningStage("authorizing", ["token"]);
|
|
784
859
|
if (this.#leaseRenewalPromise)
|
|
785
860
|
await this.#leaseRenewalPromise;
|
|
@@ -813,6 +888,14 @@ class PluginSurfaceHostImplementation {
|
|
|
813
888
|
return;
|
|
814
889
|
}
|
|
815
890
|
this.#navigationPending = true;
|
|
891
|
+
this.#receiverController?.abort();
|
|
892
|
+
this.#receiverInvocations.clear();
|
|
893
|
+
this.#receiverTransition = this.#receiverTransition.then(async () => {
|
|
894
|
+
if (!this.#receiverID)
|
|
895
|
+
return;
|
|
896
|
+
await this.#receiverRequest("close");
|
|
897
|
+
}).catch(async (error) => { await this.#failSurface(toBridgeError(error, "PLUGIN_SURFACE_METHOD_CONFLICT")); throw error; });
|
|
898
|
+
void this.#receiverTransition.catch(() => undefined);
|
|
816
899
|
clearTimeout(this.#leaseRenewalTimer);
|
|
817
900
|
this.#leaseRenewalTimer = undefined;
|
|
818
901
|
this.#ready = false;
|
|
@@ -983,6 +1066,8 @@ class PluginSurfaceHostImplementation {
|
|
|
983
1066
|
if (this.#disposed)
|
|
984
1067
|
return;
|
|
985
1068
|
this.#disposed = true;
|
|
1069
|
+
this.#receiverController?.abort();
|
|
1070
|
+
this.#receiverInvocations.clear();
|
|
986
1071
|
clearTimeout(this.#navigationTimer);
|
|
987
1072
|
this.#navigationPending = false;
|
|
988
1073
|
this.#unregisterSurfaceScope?.();
|
|
@@ -1076,6 +1161,52 @@ class PluginSurfaceHostImplementation {
|
|
|
1076
1161
|
await this.#failSurface(error);
|
|
1077
1162
|
return;
|
|
1078
1163
|
}
|
|
1164
|
+
if (hasExactKeys(data, ["type", "id", "methods"]) && data.type === "redevplugin.bridge.methods" && validBridgeRequestID(data.id, "rpc") && Array.isArray(data.methods) && data.methods.length <= 128 && data.methods.every(name => typeof name === "string" && validMethod(name))) {
|
|
1165
|
+
const id = data.id;
|
|
1166
|
+
const controller = this.#registerPendingRequest(id);
|
|
1167
|
+
const methods = [...new Set(data.methods)].sort();
|
|
1168
|
+
const generation = this.frameGenerationId;
|
|
1169
|
+
this.#receiverTransition = this.#receiverTransition.then(async () => {
|
|
1170
|
+
if (generation !== this.frameGenerationId || this.#disposed || controller.signal.aborted)
|
|
1171
|
+
return;
|
|
1172
|
+
const registering = !this.#receiverController || this.#receiverController.signal.aborted;
|
|
1173
|
+
const result = await this.#receiverRequest(registering ? "register" : "configure", { methods }, controller.signal);
|
|
1174
|
+
this.#receiverID = result.receiver_id;
|
|
1175
|
+
if (generation !== this.frameGenerationId || this.#disposed)
|
|
1176
|
+
return;
|
|
1177
|
+
this.#postToApplication({ type: "redevplugin.bridge.response", id, ok: true, data: null });
|
|
1178
|
+
if (registering) {
|
|
1179
|
+
const controller = new AbortController();
|
|
1180
|
+
this.#receiverController = controller;
|
|
1181
|
+
void this.#pollMethods(generation, controller).catch(error => {
|
|
1182
|
+
if (!controller.signal.aborted)
|
|
1183
|
+
void this.#failSurface(toBridgeError(error, "PLUGIN_SURFACE_METHOD_CONFLICT"));
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
}).catch(async (error) => { await this.#failSurface(toBridgeError(error, "PLUGIN_SURFACE_METHOD_CONFLICT")); }).finally(() => {
|
|
1187
|
+
if (this.#pendingRequestControllers.get(id) === controller)
|
|
1188
|
+
this.#pendingRequestControllers.delete(id);
|
|
1189
|
+
});
|
|
1190
|
+
return;
|
|
1191
|
+
}
|
|
1192
|
+
if (hasExactKeys(data, ["type", "invocation_id", "data", "failed"]) && data.type === "redevplugin.bridge.method_result" && typeof data.invocation_id === "string" && typeof data.failed === "boolean") {
|
|
1193
|
+
if (!this.#receiverInvocations.delete(data.invocation_id))
|
|
1194
|
+
return;
|
|
1195
|
+
const generation = this.frameGenerationId;
|
|
1196
|
+
try {
|
|
1197
|
+
await this.#receiverRequest("complete", { invocation_id: data.invocation_id, data: data.data, failed: data.failed });
|
|
1198
|
+
}
|
|
1199
|
+
catch (error) {
|
|
1200
|
+
const failure = toBridgeError(error, "PLUGIN_SURFACE_METHOD_CONFLICT");
|
|
1201
|
+
// A canceled invocation may finish before the next cancellation poll.
|
|
1202
|
+
// Its rejected result cannot mutate or replace the live receiver.
|
|
1203
|
+
if (failure.errorCode === "PLUGIN_SURFACE_METHOD_CONFLICT" && failure.mutationOutcome === "not_committed")
|
|
1204
|
+
return;
|
|
1205
|
+
if (generation === this.frameGenerationId && !this.#disposed)
|
|
1206
|
+
await this.#failSurface(failure);
|
|
1207
|
+
}
|
|
1208
|
+
return;
|
|
1209
|
+
}
|
|
1079
1210
|
if (isBridgeCancelMessage(data)) {
|
|
1080
1211
|
this.#pendingRequestControllers.get(data.id)?.abort();
|
|
1081
1212
|
return;
|
|
@@ -1428,6 +1559,39 @@ class PluginSurfaceHostImplementation {
|
|
|
1428
1559
|
revoke_epoch: this.bootstrap.revokeEpoch,
|
|
1429
1560
|
};
|
|
1430
1561
|
}
|
|
1562
|
+
async #receiverRequest(operation, extra = {}, signal) {
|
|
1563
|
+
const result = await this.#postMutationJSON("/_redevplugin/api/plugins/surfaces/methods", () => removeUndefined({
|
|
1564
|
+
plugin_instance_id: this.bootstrap.pluginInstanceId,
|
|
1565
|
+
surface_instance_id: this.surfaceInstanceId,
|
|
1566
|
+
bridge_channel_id: this.bridgeChannelId,
|
|
1567
|
+
plugin_gateway_token: this.#gatewayToken,
|
|
1568
|
+
receiver_id: this.#receiverID,
|
|
1569
|
+
operation, ...extra,
|
|
1570
|
+
}), signal);
|
|
1571
|
+
if (!hasExactKeys(result, result.invocation === undefined ? ["receiver_id", "cancelled"] : ["receiver_id", "cancelled", "invocation"]) || typeof result.receiver_id !== "string" || !result.receiver_id.startsWith("receiver_") || !Array.isArray(result.cancelled) || result.cancelled.length > 32 || !result.cancelled.every(id => typeof id === "string") || (result.invocation !== undefined && !isSurfaceMethodDelivery(result.invocation))) {
|
|
1572
|
+
throw new PluginBridgeError("PLUGIN_CONTRACT_MISMATCH", "Application receiver returned an invalid response");
|
|
1573
|
+
}
|
|
1574
|
+
return result;
|
|
1575
|
+
}
|
|
1576
|
+
async #pollMethods(generation, controller) {
|
|
1577
|
+
while (!controller.signal.aborted && !this.#disposed && generation === this.frameGenerationId) {
|
|
1578
|
+
const result = await this.#receiverRequest("claim", { active_invocations: [...this.#receiverInvocations] }, controller.signal);
|
|
1579
|
+
if (controller.signal.aborted || this.#disposed || generation !== this.frameGenerationId)
|
|
1580
|
+
return;
|
|
1581
|
+
for (const id of result.cancelled) {
|
|
1582
|
+
if (this.#receiverInvocations.delete(id))
|
|
1583
|
+
this.#postToApplication({ type: "redevplugin.bridge.method_cancel", invocation_id: id });
|
|
1584
|
+
}
|
|
1585
|
+
const invocation = result.invocation;
|
|
1586
|
+
if (!invocation)
|
|
1587
|
+
continue;
|
|
1588
|
+
if (this.#receiverInvocations.has(invocation.invocation_id) || this.#receiverInvocations.size >= 32) {
|
|
1589
|
+
throw new PluginBridgeError("PLUGIN_CONTRACT_MISMATCH", "Application invocation is invalid or duplicated");
|
|
1590
|
+
}
|
|
1591
|
+
this.#receiverInvocations.add(invocation.invocation_id);
|
|
1592
|
+
this.#postToApplication({ type: "redevplugin.bridge.method_invoke", invocation });
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1431
1595
|
async #postJSON(path, body, signal) {
|
|
1432
1596
|
return this.#requestJSON(path, body, false, signal);
|
|
1433
1597
|
}
|
|
@@ -2901,3 +3065,9 @@ function toBridgeError(error, defaultCode) {
|
|
|
2901
3065
|
return new PluginBridgeError(defaultCode, error.message);
|
|
2902
3066
|
return new PluginBridgeError(defaultCode, String(error));
|
|
2903
3067
|
}
|
|
3068
|
+
function isSurfaceMethodDelivery(value) {
|
|
3069
|
+
return hasExactKeys(value, ["invocation_id", "method", "params", "deadline"]) &&
|
|
3070
|
+
typeof value.invocation_id === "string" && value.invocation_id.startsWith("invoke_") && value.invocation_id.length <= 128 &&
|
|
3071
|
+
typeof value.method === "string" && validMethod(value.method) && (value.params !== null && typeof value.params === "object" && !Array.isArray(value.params)) &&
|
|
3072
|
+
typeof value.deadline === "string" && Number.isFinite(Date.parse(value.deadline));
|
|
3073
|
+
}
|
package/dist/testing.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ export declare function createPluginTestHarness(options?: PluginTestHarnessOptio
|
|
|
21
21
|
readonly files: import("./files.js").PluginFilesClient;
|
|
22
22
|
readonly surfaceHandle: string;
|
|
23
23
|
readonly timeoutMs: number;
|
|
24
|
+
"__#private@#methodHandlers": Map<string, import("./surface.js").PluginMethodHandler>;
|
|
25
|
+
"__#private@#methodInvocations": Map<string, AbortController>;
|
|
24
26
|
"__#private@#nextID": number;
|
|
25
27
|
"__#private@#clock": PluginBridgeClock;
|
|
26
28
|
"__#private@#port": MessagePortLike;
|
|
@@ -46,6 +48,14 @@ export declare function createPluginTestHarness(options?: PluginTestHarnessOptio
|
|
|
46
48
|
"__#private@#onMessage": (event: MessageEventLike) => void;
|
|
47
49
|
ready(): Promise<void>;
|
|
48
50
|
call<T = unknown>(method: string, params?: PluginJSONObject, options?: import("./surface.js").PluginBridgeRequestOptions): Promise<T>;
|
|
51
|
+
registerMethod(name: string, handler: import("./surface.js").PluginMethodHandler): Promise<() => Promise<void>>;
|
|
52
|
+
"__#private@#publishMethods"(): Promise<void>;
|
|
53
|
+
"__#private@#invokeRegisteredMethod"(invocation: {
|
|
54
|
+
invocation_id: string;
|
|
55
|
+
method: string;
|
|
56
|
+
params: PluginJSONObject;
|
|
57
|
+
deadline: string;
|
|
58
|
+
}): Promise<void>;
|
|
49
59
|
"__#private@#fileIO"(request: import("./files.js").PluginFileIORequest, options?: import("./surface.js").PluginBridgeRequestOptions): Promise<import("./files.js").PluginFileIOResult>;
|
|
50
60
|
"__#private@#call"<T>(method: string, params: PluginJSONObject | undefined, options: import("./surface.js").PluginBridgeRequestOptions, mutation: boolean): Promise<T>;
|
|
51
61
|
executionEvents(executionID: string, afterCursor: number, options?: import("./surface.js").PluginBridgeRequestOptions): Promise<import("./surface.js").PluginExecutionEventList>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floegence/redevplugin-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@floegence/redevplugin-contracts": "3.
|
|
39
|
+
"@floegence/redevplugin-contracts": "3.7.0",
|
|
40
40
|
"@noble/hashes": "2.4.0"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|