@floegence/redevplugin-ui 0.3.1 → 0.4.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.
@@ -1,28 +1,28 @@
1
- export declare const pluginUIProtocolVersion: "plugin-ui-v2";
1
+ export declare const pluginUIProtocolVersion: "plugin-ui-v3";
2
2
  export declare const pluginHostProtocolVersion: "plugin-host-v2";
3
- export declare const bridgeSchemaVersion: "bridge-v2";
3
+ export declare const bridgeSchemaVersion: "bridge-v3";
4
4
  export declare const tokenTicketSchemaVersion: "token-ticket-v2";
5
5
  export declare const redevPluginContractVersions: {
6
- readonly plugin_ui_protocol_version: "plugin-ui-v2";
6
+ readonly plugin_ui_protocol_version: "plugin-ui-v3";
7
7
  readonly plugin_host_protocol_version: "plugin-host-v2";
8
- readonly rust_ipc_version: "rust-ipc-v1";
9
- readonly wasm_abi_version: "redevplugin-wasm-worker-v1";
10
- readonly manifest_schema_version: "manifest-v2";
8
+ readonly rust_ipc_version: "rust-ipc-v2";
9
+ readonly wasm_abi_version: "redevplugin-wasm-worker-v2";
10
+ readonly manifest_schema_version: "manifest-v3";
11
11
  readonly package_signature_schema_version: "package-signature-v1";
12
- readonly release_metadata_schema_version: "release-metadata-v2";
12
+ readonly release_metadata_schema_version: "release-metadata-v3";
13
13
  readonly source_policy_schema_version: "source-policy-v1";
14
14
  readonly source_revocations_schema_version: "source-revocations-v1";
15
15
  readonly token_ticket_schema_version: "token-ticket-v2";
16
- readonly bridge_schema_version: "bridge-v2";
17
- readonly opaque_surface_document_schema_version: "opaque-surface-document-v1";
18
- readonly opaque_surface_transport_schema_version: "opaque-surface-transport-v1";
16
+ readonly bridge_schema_version: "bridge-v3";
17
+ readonly opaque_surface_document_schema_version: "opaque-surface-document-v2";
18
+ readonly opaque_surface_transport_schema_version: "opaque-surface-transport-v2";
19
19
  readonly target_classifier_version: "target-classifier-v1";
20
20
  readonly network_grant_schema_version: "network-grant-v1";
21
- readonly plugin_platform_openapi_version: "plugin-platform-v2";
22
- readonly compatibility_manifest_version: "redevplugin.compatibility.v2";
23
- readonly compatibility_schema_version: "compatibility-manifest-v2";
24
- readonly release_manifest_schema_version: "release-manifest-v2";
25
- readonly worker_invocation_schema_version: "worker-invocation-v1";
21
+ readonly plugin_platform_openapi_version: "plugin-platform-v3";
22
+ readonly compatibility_manifest_version: "redevplugin.compatibility.v3";
23
+ readonly compatibility_schema_version: "compatibility-manifest-v3";
24
+ readonly release_manifest_schema_version: "release-manifest-v3";
25
+ readonly worker_invocation_schema_version: "worker-invocation-v2";
26
26
  readonly host_capability_contract_schema_version: "host-capability-contract-v1";
27
27
  readonly host_capability_pin_schema_version: "host-capability-pin-v1";
28
28
  readonly host_capability_manifest_schema_version: "host-capability-manifest-v1";
@@ -40,14 +40,14 @@ export type ReDevPluginContractArtifact = {
40
40
  };
41
41
  export declare const redevPluginContractArtifacts: readonly [{
42
42
  readonly id: "plugin-platform-openapi";
43
- readonly path: "spec/openapi/plugin-platform-v2.yaml";
44
- readonly version: "plugin-platform-v2";
45
- readonly sha256: "b7922ebd37be680060f067b66a439f3d1f9a7f22d730512763e3f7d347dcaf9a";
43
+ readonly path: "spec/openapi/plugin-platform-v3.yaml";
44
+ readonly version: "plugin-platform-v3";
45
+ readonly sha256: "7a165176a1ac67054458c38b12deecffc8f6b4411e967bf8889bb2f1140c3b11";
46
46
  }, {
47
47
  readonly id: "manifest-schema";
48
- readonly path: "spec/plugin/manifest-v2.schema.json";
49
- readonly version: "manifest-v2";
50
- readonly sha256: "f80279943bde0e304138ee0fdae2e7b9f2b0334412cf159d268cc8badc196759";
48
+ readonly path: "spec/plugin/manifest-v3.schema.json";
49
+ readonly version: "manifest-v3";
50
+ readonly sha256: "b5856b82a64c5654f15460191e74cc6f5c4a17018517ea1750840575f9c29881";
51
51
  }, {
52
52
  readonly id: "package-signature-schema";
53
53
  readonly path: "spec/plugin/package-signature-v1.schema.json";
@@ -55,9 +55,9 @@ export declare const redevPluginContractArtifacts: readonly [{
55
55
  readonly sha256: "13951c0f6831ba28647774368c76a817868aeb7984628e2cf3dc4ad1b54f8284";
56
56
  }, {
57
57
  readonly id: "release-metadata-schema";
58
- readonly path: "spec/plugin/release-metadata-v2.schema.json";
59
- readonly version: "release-metadata-v2";
60
- readonly sha256: "5f24cf61bea352715f24595c385745476e677affdaf8f60fd15e534424df60b6";
58
+ readonly path: "spec/plugin/release-metadata-v3.schema.json";
59
+ readonly version: "release-metadata-v3";
60
+ readonly sha256: "a2fbe87dfcd57e7cb05410e829831a5500a6d127db22f4c28fd6187d56e7f4e7";
61
61
  }, {
62
62
  readonly id: "source-policy-schema";
63
63
  readonly path: "spec/plugin/source-policy-v1.schema.json";
@@ -75,34 +75,34 @@ export declare const redevPluginContractArtifacts: readonly [{
75
75
  readonly sha256: "f0342614f28b81045ac47d76d71753c8ee177f8143c14a711a0b1f5632e7835e";
76
76
  }, {
77
77
  readonly id: "iframe-bridge-schema";
78
- readonly path: "spec/plugin/bridge-v2.schema.json";
79
- readonly version: "bridge-v2";
80
- readonly sha256: "23d968113aaf93dab75df6acd96a350df07c0428fd2a00c66c015a0d875592d1";
78
+ readonly path: "spec/plugin/bridge-v3.schema.json";
79
+ readonly version: "bridge-v3";
80
+ readonly sha256: "95d362d318327d09ecf6689c8fcfa38033dc5b3bf29b5e48da9d7290568e3b22";
81
81
  }, {
82
82
  readonly id: "opaque-surface-document-schema";
83
- readonly path: "spec/plugin/opaque-surface-document-v1.schema.json";
84
- readonly version: "opaque-surface-document-v1";
85
- readonly sha256: "78ca8f1fb161dd5cdd54d192eb3e147d6f0e6a8b9de01652ecd4b255600ea9b7";
83
+ readonly path: "spec/plugin/opaque-surface-document-v2.schema.json";
84
+ readonly version: "opaque-surface-document-v2";
85
+ readonly sha256: "abb0836bfb53089abd6522269265cc9f9e9bbc5b3cfc6d956404f6208b3e7238";
86
86
  }, {
87
87
  readonly id: "opaque-surface-transport-schema";
88
- readonly path: "spec/plugin/opaque-surface-transport-v1.schema.json";
89
- readonly version: "opaque-surface-transport-v1";
90
- readonly sha256: "36cd3378393fc8b59da0e3beb345d56db9a52548604177f0adc36e40d4d2b29b";
88
+ readonly path: "spec/plugin/opaque-surface-transport-v2.schema.json";
89
+ readonly version: "opaque-surface-transport-v2";
90
+ readonly sha256: "7a96b009350b641ac56a1893d0eb74ed34d53bf50ee45df22f526e564a2fe6c9";
91
91
  }, {
92
92
  readonly id: "compatibility-manifest-schema";
93
- readonly path: "spec/plugin/compatibility-manifest-v2.schema.json";
94
- readonly version: "compatibility-manifest-v2";
95
- readonly sha256: "7e0789cc80f4674277c6d12f4e097198543081b198b7a1a94eefb3cd404c6eb0";
93
+ readonly path: "spec/plugin/compatibility-manifest-v3.schema.json";
94
+ readonly version: "compatibility-manifest-v3";
95
+ readonly sha256: "328612332a4226775e09aa19ed7d852ca59adb56467bf8c2a7d4f4bdfbf226d0";
96
96
  }, {
97
97
  readonly id: "release-manifest-schema";
98
- readonly path: "spec/plugin/release-manifest-v2.schema.json";
99
- readonly version: "release-manifest-v2";
100
- readonly sha256: "4406be65353d6d6e059cc0bd279c6ffc53c4250dd5407e7435b30b2fd6a0f582";
98
+ readonly path: "spec/plugin/release-manifest-v3.schema.json";
99
+ readonly version: "release-manifest-v3";
100
+ readonly sha256: "8c3fda908cd71169b2daf7d2a4e0b5b0c26a32e125a567304d872633fc05309b";
101
101
  }, {
102
102
  readonly id: "worker-invocation-schema";
103
- readonly path: "spec/plugin/worker-invocation-v1.schema.json";
104
- readonly version: "worker-invocation-v1";
105
- readonly sha256: "9199dd0731aaf592e34c1574cd81c094412a3e6cd9b633853d3e60e89438bcb5";
103
+ readonly path: "spec/plugin/worker-invocation-v2.schema.json";
104
+ readonly version: "worker-invocation-v2";
105
+ readonly sha256: "9a8843d19db04334525fd308a6b54fe26b12e3b4a0da46b417687e76629bd7d0";
106
106
  }, {
107
107
  readonly id: "host-capability-contract-schema";
108
108
  readonly path: "spec/plugin/host-capability-contract-v1.schema.json";
@@ -137,17 +137,17 @@ export declare const redevPluginContractArtifacts: readonly [{
137
137
  readonly id: "error-codes-schema";
138
138
  readonly path: "spec/plugin/error-codes-v1.schema.json";
139
139
  readonly version: "error-codes-v1";
140
- readonly sha256: "254eb4c6d25bae3976c30fe51bdd49456e906e1a3f3bc76df092afd30bd4c948";
140
+ readonly sha256: "1f59d2d4ddbd972d857f111aec98d31a9cf3d5baf96e57e152d5b68a1feea3d1";
141
141
  }, {
142
142
  readonly id: "rust-ipc-schema";
143
- readonly path: "spec/plugin/ipc-v1.schema.json";
144
- readonly version: "rust-ipc-v1";
145
- readonly sha256: "78f1310a0b48db733301c3f163ada041a3c9daf2d09369860d758296cbe12e39";
143
+ readonly path: "spec/plugin/ipc-v2.schema.json";
144
+ readonly version: "rust-ipc-v2";
145
+ readonly sha256: "8c9dc1fe60da2399647efaad58b871860c278810ba4a6c357d904e2414a29aed";
146
146
  }, {
147
147
  readonly id: "wasm-worker-schema";
148
- readonly path: "spec/plugin/wasm-worker-v1.schema.json";
149
- readonly version: "redevplugin-wasm-worker-v1";
150
- readonly sha256: "ff0a37ea972db7d8be89b529e03d890af00aab3f2d9461c2db3a3d58c664b775";
148
+ readonly path: "spec/plugin/wasm-worker-v2.schema.json";
149
+ readonly version: "redevplugin-wasm-worker-v2";
150
+ readonly sha256: "d2ef05ffed74706cf0683a57665068c5bdf2b191a6c20cb876ec1049798afeaf";
151
151
  }, {
152
152
  readonly id: "network-grant-schema";
153
153
  readonly path: "spec/plugin/network-grant-v1.schema.json";
@@ -162,5 +162,5 @@ export declare const redevPluginContractArtifacts: readonly [{
162
162
  readonly id: "contract-registry";
163
163
  readonly path: "spec/plugin/contract-registry-v1.json";
164
164
  readonly version: "contract-registry-v1";
165
- readonly sha256: "42dd916922a6183b49d4abc765da2e2d086771a6e6ac1828f8e1dbebb262bba0";
165
+ readonly sha256: "ea303e08fb1a218cbf3696cc77c9e4b3cc8df9d0c5d2539e6b769b68884ef2b5";
166
166
  }];
@@ -1,29 +1,29 @@
1
1
  // Code generated by scripts/generate_contract_registry.mjs; DO NOT EDIT.
2
- export const pluginUIProtocolVersion = "plugin-ui-v2";
2
+ export const pluginUIProtocolVersion = "plugin-ui-v3";
3
3
  export const pluginHostProtocolVersion = "plugin-host-v2";
4
- export const bridgeSchemaVersion = "bridge-v2";
4
+ export const bridgeSchemaVersion = "bridge-v3";
5
5
  export const tokenTicketSchemaVersion = "token-ticket-v2";
6
6
  export const redevPluginContractVersions = {
7
- "plugin_ui_protocol_version": "plugin-ui-v2",
7
+ "plugin_ui_protocol_version": "plugin-ui-v3",
8
8
  "plugin_host_protocol_version": "plugin-host-v2",
9
- "rust_ipc_version": "rust-ipc-v1",
10
- "wasm_abi_version": "redevplugin-wasm-worker-v1",
11
- "manifest_schema_version": "manifest-v2",
9
+ "rust_ipc_version": "rust-ipc-v2",
10
+ "wasm_abi_version": "redevplugin-wasm-worker-v2",
11
+ "manifest_schema_version": "manifest-v3",
12
12
  "package_signature_schema_version": "package-signature-v1",
13
- "release_metadata_schema_version": "release-metadata-v2",
13
+ "release_metadata_schema_version": "release-metadata-v3",
14
14
  "source_policy_schema_version": "source-policy-v1",
15
15
  "source_revocations_schema_version": "source-revocations-v1",
16
16
  "token_ticket_schema_version": "token-ticket-v2",
17
- "bridge_schema_version": "bridge-v2",
18
- "opaque_surface_document_schema_version": "opaque-surface-document-v1",
19
- "opaque_surface_transport_schema_version": "opaque-surface-transport-v1",
17
+ "bridge_schema_version": "bridge-v3",
18
+ "opaque_surface_document_schema_version": "opaque-surface-document-v2",
19
+ "opaque_surface_transport_schema_version": "opaque-surface-transport-v2",
20
20
  "target_classifier_version": "target-classifier-v1",
21
21
  "network_grant_schema_version": "network-grant-v1",
22
- "plugin_platform_openapi_version": "plugin-platform-v2",
23
- "compatibility_manifest_version": "redevplugin.compatibility.v2",
24
- "compatibility_schema_version": "compatibility-manifest-v2",
25
- "release_manifest_schema_version": "release-manifest-v2",
26
- "worker_invocation_schema_version": "worker-invocation-v1",
22
+ "plugin_platform_openapi_version": "plugin-platform-v3",
23
+ "compatibility_manifest_version": "redevplugin.compatibility.v3",
24
+ "compatibility_schema_version": "compatibility-manifest-v3",
25
+ "release_manifest_schema_version": "release-manifest-v3",
26
+ "worker_invocation_schema_version": "worker-invocation-v2",
27
27
  "host_capability_contract_schema_version": "host-capability-contract-v1",
28
28
  "host_capability_pin_schema_version": "host-capability-pin-v1",
29
29
  "host_capability_manifest_schema_version": "host-capability-manifest-v1",
@@ -36,15 +36,15 @@ export const redevPluginContractVersions = {
36
36
  export const redevPluginContractArtifacts = [
37
37
  {
38
38
  id: "plugin-platform-openapi",
39
- path: "spec/openapi/plugin-platform-v2.yaml",
40
- version: "plugin-platform-v2",
41
- sha256: "b7922ebd37be680060f067b66a439f3d1f9a7f22d730512763e3f7d347dcaf9a",
39
+ path: "spec/openapi/plugin-platform-v3.yaml",
40
+ version: "plugin-platform-v3",
41
+ sha256: "7a165176a1ac67054458c38b12deecffc8f6b4411e967bf8889bb2f1140c3b11",
42
42
  },
43
43
  {
44
44
  id: "manifest-schema",
45
- path: "spec/plugin/manifest-v2.schema.json",
46
- version: "manifest-v2",
47
- sha256: "f80279943bde0e304138ee0fdae2e7b9f2b0334412cf159d268cc8badc196759",
45
+ path: "spec/plugin/manifest-v3.schema.json",
46
+ version: "manifest-v3",
47
+ sha256: "b5856b82a64c5654f15460191e74cc6f5c4a17018517ea1750840575f9c29881",
48
48
  },
49
49
  {
50
50
  id: "package-signature-schema",
@@ -54,9 +54,9 @@ export const redevPluginContractArtifacts = [
54
54
  },
55
55
  {
56
56
  id: "release-metadata-schema",
57
- path: "spec/plugin/release-metadata-v2.schema.json",
58
- version: "release-metadata-v2",
59
- sha256: "5f24cf61bea352715f24595c385745476e677affdaf8f60fd15e534424df60b6",
57
+ path: "spec/plugin/release-metadata-v3.schema.json",
58
+ version: "release-metadata-v3",
59
+ sha256: "a2fbe87dfcd57e7cb05410e829831a5500a6d127db22f4c28fd6187d56e7f4e7",
60
60
  },
61
61
  {
62
62
  id: "source-policy-schema",
@@ -78,39 +78,39 @@ export const redevPluginContractArtifacts = [
78
78
  },
79
79
  {
80
80
  id: "iframe-bridge-schema",
81
- path: "spec/plugin/bridge-v2.schema.json",
82
- version: "bridge-v2",
83
- sha256: "23d968113aaf93dab75df6acd96a350df07c0428fd2a00c66c015a0d875592d1",
81
+ path: "spec/plugin/bridge-v3.schema.json",
82
+ version: "bridge-v3",
83
+ sha256: "95d362d318327d09ecf6689c8fcfa38033dc5b3bf29b5e48da9d7290568e3b22",
84
84
  },
85
85
  {
86
86
  id: "opaque-surface-document-schema",
87
- path: "spec/plugin/opaque-surface-document-v1.schema.json",
88
- version: "opaque-surface-document-v1",
89
- sha256: "78ca8f1fb161dd5cdd54d192eb3e147d6f0e6a8b9de01652ecd4b255600ea9b7",
87
+ path: "spec/plugin/opaque-surface-document-v2.schema.json",
88
+ version: "opaque-surface-document-v2",
89
+ sha256: "abb0836bfb53089abd6522269265cc9f9e9bbc5b3cfc6d956404f6208b3e7238",
90
90
  },
91
91
  {
92
92
  id: "opaque-surface-transport-schema",
93
- path: "spec/plugin/opaque-surface-transport-v1.schema.json",
94
- version: "opaque-surface-transport-v1",
95
- sha256: "36cd3378393fc8b59da0e3beb345d56db9a52548604177f0adc36e40d4d2b29b",
93
+ path: "spec/plugin/opaque-surface-transport-v2.schema.json",
94
+ version: "opaque-surface-transport-v2",
95
+ sha256: "7a96b009350b641ac56a1893d0eb74ed34d53bf50ee45df22f526e564a2fe6c9",
96
96
  },
97
97
  {
98
98
  id: "compatibility-manifest-schema",
99
- path: "spec/plugin/compatibility-manifest-v2.schema.json",
100
- version: "compatibility-manifest-v2",
101
- sha256: "7e0789cc80f4674277c6d12f4e097198543081b198b7a1a94eefb3cd404c6eb0",
99
+ path: "spec/plugin/compatibility-manifest-v3.schema.json",
100
+ version: "compatibility-manifest-v3",
101
+ sha256: "328612332a4226775e09aa19ed7d852ca59adb56467bf8c2a7d4f4bdfbf226d0",
102
102
  },
103
103
  {
104
104
  id: "release-manifest-schema",
105
- path: "spec/plugin/release-manifest-v2.schema.json",
106
- version: "release-manifest-v2",
107
- sha256: "4406be65353d6d6e059cc0bd279c6ffc53c4250dd5407e7435b30b2fd6a0f582",
105
+ path: "spec/plugin/release-manifest-v3.schema.json",
106
+ version: "release-manifest-v3",
107
+ sha256: "8c3fda908cd71169b2daf7d2a4e0b5b0c26a32e125a567304d872633fc05309b",
108
108
  },
109
109
  {
110
110
  id: "worker-invocation-schema",
111
- path: "spec/plugin/worker-invocation-v1.schema.json",
112
- version: "worker-invocation-v1",
113
- sha256: "9199dd0731aaf592e34c1574cd81c094412a3e6cd9b633853d3e60e89438bcb5",
111
+ path: "spec/plugin/worker-invocation-v2.schema.json",
112
+ version: "worker-invocation-v2",
113
+ sha256: "9a8843d19db04334525fd308a6b54fe26b12e3b4a0da46b417687e76629bd7d0",
114
114
  },
115
115
  {
116
116
  id: "host-capability-contract-schema",
@@ -152,19 +152,19 @@ export const redevPluginContractArtifacts = [
152
152
  id: "error-codes-schema",
153
153
  path: "spec/plugin/error-codes-v1.schema.json",
154
154
  version: "error-codes-v1",
155
- sha256: "254eb4c6d25bae3976c30fe51bdd49456e906e1a3f3bc76df092afd30bd4c948",
155
+ sha256: "1f59d2d4ddbd972d857f111aec98d31a9cf3d5baf96e57e152d5b68a1feea3d1",
156
156
  },
157
157
  {
158
158
  id: "rust-ipc-schema",
159
- path: "spec/plugin/ipc-v1.schema.json",
160
- version: "rust-ipc-v1",
161
- sha256: "78f1310a0b48db733301c3f163ada041a3c9daf2d09369860d758296cbe12e39",
159
+ path: "spec/plugin/ipc-v2.schema.json",
160
+ version: "rust-ipc-v2",
161
+ sha256: "8c9dc1fe60da2399647efaad58b871860c278810ba4a6c357d904e2414a29aed",
162
162
  },
163
163
  {
164
164
  id: "wasm-worker-schema",
165
- path: "spec/plugin/wasm-worker-v1.schema.json",
166
- version: "redevplugin-wasm-worker-v1",
167
- sha256: "ff0a37ea972db7d8be89b529e03d890af00aab3f2d9461c2db3a3d58c664b775",
165
+ path: "spec/plugin/wasm-worker-v2.schema.json",
166
+ version: "redevplugin-wasm-worker-v2",
167
+ sha256: "d2ef05ffed74706cf0683a57665068c5bdf2b191a6c20cb876ec1049798afeaf",
168
168
  },
169
169
  {
170
170
  id: "network-grant-schema",
@@ -182,6 +182,6 @@ export const redevPluginContractArtifacts = [
182
182
  id: "contract-registry",
183
183
  path: "spec/plugin/contract-registry-v1.json",
184
184
  version: "contract-registry-v1",
185
- sha256: "42dd916922a6183b49d4abc765da2e2d086771a6e6ac1828f8e1dbebb262bba0",
185
+ sha256: "ea303e08fb1a218cbf3696cc77c9e4b3cc8df9d0c5d2539e6b769b68884ef2b5",
186
186
  },
187
187
  ];
package/dist/errors.d.ts CHANGED
@@ -1,6 +1,6 @@
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_DISABLED", "PLUGIN_DISABLED_BY_POLICY", "PLUGIN_PERMISSION_DENIED", "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_CANCELLED", "PLUGIN_LEASE_INVALID", "PLUGIN_LEASE_REPLAYED", "PLUGIN_GRANT_INVALID", "PLUGIN_STORAGE_QUOTA_EXCEEDED", "PLUGIN_OPERATION_BLOCKED", "PLUGIN_OPERATION_NOT_FOUND", "PLUGIN_OPERATION_NOT_CANCELABLE", "PLUGIN_NETWORK_TARGET_DENIED", "PLUGIN_NETWORK_RATE_LIMITED", "PLUGIN_RUNTIME_UNAVAILABLE", "PLUGIN_RUNTIME_VERSION_MISMATCH", "PLUGIN_JSON_LIMIT_EXCEEDED", "PLUGIN_CAPABILITY_ERROR", "PLUGIN_CONTRACT_MISMATCH", "PLUGIN_STATE_VERSION_MISMATCH", "PLUGIN_CSRF_REQUIRED", "PLUGIN_RETAINED_DATA_CLEANUP_FAILED", "PLUGIN_RETAINED_DATA_BIND_FAILED"];
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_DISABLED", "PLUGIN_DISABLED_BY_POLICY", "PLUGIN_PERMISSION_DENIED", "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_CANCELLED", "PLUGIN_LEASE_INVALID", "PLUGIN_LEASE_REPLAYED", "PLUGIN_GRANT_INVALID", "PLUGIN_STORAGE_QUOTA_EXCEEDED", "PLUGIN_OPERATION_BLOCKED", "PLUGIN_OPERATION_NOT_FOUND", "PLUGIN_OPERATION_NOT_CANCELABLE", "PLUGIN_NETWORK_TARGET_DENIED", "PLUGIN_NETWORK_RATE_LIMITED", "PLUGIN_RUNTIME_UNAVAILABLE", "PLUGIN_RUNTIME_VERSION_MISMATCH", "PLUGIN_JSON_LIMIT_EXCEEDED", "PLUGIN_CAPABILITY_ERROR", "PLUGIN_CONTRACT_MISMATCH", "PLUGIN_STATE_VERSION_MISMATCH", "PLUGIN_CSRF_REQUIRED", "PLUGIN_RETAINED_DATA_CLEANUP_FAILED", "PLUGIN_RETAINED_DATA_BIND_FAILED", "PLUGIN_CONFIRMATION_REJECTED", "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_DISABLED", "PLUGIN_DISABLED_BY_POLICY", "PLUGIN_PERMISSION_DENIED", "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_CANCELLED", "PLUGIN_LEASE_INVALID", "PLUGIN_LEASE_REPLAYED", "PLUGIN_GRANT_INVALID", "PLUGIN_STORAGE_QUOTA_EXCEEDED", "PLUGIN_OPERATION_BLOCKED", "PLUGIN_OPERATION_NOT_FOUND", "PLUGIN_OPERATION_NOT_CANCELABLE", "PLUGIN_NETWORK_TARGET_DENIED", "PLUGIN_NETWORK_RATE_LIMITED", "PLUGIN_RUNTIME_UNAVAILABLE", "PLUGIN_RUNTIME_VERSION_MISMATCH", "PLUGIN_JSON_LIMIT_EXCEEDED", "PLUGIN_CAPABILITY_ERROR", "PLUGIN_CONTRACT_MISMATCH", "PLUGIN_STATE_VERSION_MISMATCH", "PLUGIN_CSRF_REQUIRED", "PLUGIN_RETAINED_DATA_CLEANUP_FAILED", "PLUGIN_RETAINED_DATA_BIND_FAILED", "PLUGIN_CONFIRMATION_REJECTED", "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_DISABLED", "PLUGIN_DISABLED_BY_POLICY", "PLUGIN_PERMISSION_DENIED", "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_CANCELLED", "PLUGIN_LEASE_INVALID", "PLUGIN_LEASE_REPLAYED", "PLUGIN_GRANT_INVALID", "PLUGIN_STORAGE_QUOTA_EXCEEDED", "PLUGIN_OPERATION_BLOCKED", "PLUGIN_OPERATION_NOT_FOUND", "PLUGIN_OPERATION_NOT_CANCELABLE", "PLUGIN_NETWORK_TARGET_DENIED", "PLUGIN_NETWORK_RATE_LIMITED", "PLUGIN_RUNTIME_UNAVAILABLE", "PLUGIN_RUNTIME_VERSION_MISMATCH", "PLUGIN_JSON_LIMIT_EXCEEDED", "PLUGIN_CAPABILITY_ERROR", "PLUGIN_WORKER_ERROR", "PLUGIN_CONTRACT_MISMATCH", "PLUGIN_STATE_VERSION_MISMATCH", "PLUGIN_CSRF_REQUIRED", "PLUGIN_RETAINED_DATA_CLEANUP_FAILED", "PLUGIN_RETAINED_DATA_BIND_FAILED"];
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_DISABLED", "PLUGIN_DISABLED_BY_POLICY", "PLUGIN_PERMISSION_DENIED", "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_CANCELLED", "PLUGIN_LEASE_INVALID", "PLUGIN_LEASE_REPLAYED", "PLUGIN_GRANT_INVALID", "PLUGIN_STORAGE_QUOTA_EXCEEDED", "PLUGIN_OPERATION_BLOCKED", "PLUGIN_OPERATION_NOT_FOUND", "PLUGIN_OPERATION_NOT_CANCELABLE", "PLUGIN_NETWORK_TARGET_DENIED", "PLUGIN_NETWORK_RATE_LIMITED", "PLUGIN_RUNTIME_UNAVAILABLE", "PLUGIN_RUNTIME_VERSION_MISMATCH", "PLUGIN_JSON_LIMIT_EXCEEDED", "PLUGIN_CAPABILITY_ERROR", "PLUGIN_WORKER_ERROR", "PLUGIN_CONTRACT_MISMATCH", "PLUGIN_STATE_VERSION_MISMATCH", "PLUGIN_CSRF_REQUIRED", "PLUGIN_RETAINED_DATA_CLEANUP_FAILED", "PLUGIN_RETAINED_DATA_BIND_FAILED", "PLUGIN_CONFIRMATION_REJECTED", "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_DISABLED", "PLUGIN_DISABLED_BY_POLICY", "PLUGIN_PERMISSION_DENIED", "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_CANCELLED", "PLUGIN_LEASE_INVALID", "PLUGIN_LEASE_REPLAYED", "PLUGIN_GRANT_INVALID", "PLUGIN_STORAGE_QUOTA_EXCEEDED", "PLUGIN_OPERATION_BLOCKED", "PLUGIN_OPERATION_NOT_FOUND", "PLUGIN_OPERATION_NOT_CANCELABLE", "PLUGIN_NETWORK_TARGET_DENIED", "PLUGIN_NETWORK_RATE_LIMITED", "PLUGIN_RUNTIME_UNAVAILABLE", "PLUGIN_RUNTIME_VERSION_MISMATCH", "PLUGIN_JSON_LIMIT_EXCEEDED", "PLUGIN_CAPABILITY_ERROR", "PLUGIN_WORKER_ERROR", "PLUGIN_CONTRACT_MISMATCH", "PLUGIN_STATE_VERSION_MISMATCH", "PLUGIN_CSRF_REQUIRED", "PLUGIN_RETAINED_DATA_CLEANUP_FAILED", "PLUGIN_RETAINED_DATA_BIND_FAILED", "PLUGIN_CONFIRMATION_REJECTED", "PLUGIN_BRIDGE_TIMEOUT", "PLUGIN_BRIDGE_DISPOSED", "PLUGIN_BRIDGE_HANDSHAKE_FAILED", "PLUGIN_BRIDGE_HANDSHAKE_REQUIRED", "PLUGIN_PLATFORM_REQUEST_FAILED", "PLUGIN_STREAM_FAILED"];
4
4
  export type PluginPlatformErrorCode = typeof pluginPlatformErrorCodes[number];
5
5
  export type PluginBridgeErrorCode = typeof pluginBridgeErrorCodes[number];
6
6
  export type PluginClientErrorCode = typeof pluginClientErrorCodes[number];
package/dist/errors.js CHANGED
@@ -37,6 +37,7 @@ export const pluginPlatformErrorCodes = [
37
37
  "PLUGIN_RUNTIME_VERSION_MISMATCH",
38
38
  "PLUGIN_JSON_LIMIT_EXCEEDED",
39
39
  "PLUGIN_CAPABILITY_ERROR",
40
+ "PLUGIN_WORKER_ERROR",
40
41
  "PLUGIN_CONTRACT_MISMATCH",
41
42
  "PLUGIN_STATE_VERSION_MISMATCH",
42
43
  "PLUGIN_CSRF_REQUIRED",
@@ -1,6 +1,6 @@
1
- export declare const opaqueSurfaceAllowedTags: readonly ["main", "section", "header", "footer", "nav", "aside", "article", "div", "span", "p", "h1", "h2", "h3", "h4", "h5", "h6", "button", "input", "textarea", "select", "option", "label", "fieldset", "legend", "form", "ul", "ol", "li", "dl", "dt", "dd", "table", "thead", "tbody", "tfoot", "tr", "th", "td", "caption", "details", "summary", "pre", "code", "kbd", "samp", "strong", "em", "small", "mark", "time", "progress", "meter", "img", "picture", "source", "audio", "video", "track"];
1
+ export declare const opaqueSurfaceAllowedTags: readonly ["main", "section", "header", "footer", "nav", "aside", "article", "div", "span", "p", "h1", "h2", "h3", "h4", "h5", "h6", "button", "input", "textarea", "select", "option", "label", "fieldset", "legend", "form", "ul", "ol", "li", "dl", "dt", "dd", "table", "thead", "tbody", "tfoot", "tr", "th", "td", "caption", "details", "summary", "pre", "code", "kbd", "samp", "strong", "em", "small", "mark", "time", "progress", "meter", "img", "picture", "source", "audio", "video", "track", "canvas"];
2
2
  export type OpaqueSurfaceAllowedTag = (typeof opaqueSurfaceAllowedTags)[number];
3
- export declare const opaqueSurfaceGlobalAttributes: readonly ["id", "class", "role", "title", "hidden", "tabindex", "lang", "dir", "data-redevplugin-action", "data-redevplugin-asset-binding", "data-redevplugin-asset-attr"];
3
+ export declare const opaqueSurfaceGlobalAttributes: readonly ["id", "class", "role", "title", "hidden", "tabindex", "autofocus", "lang", "dir", "data-redevplugin-action", "data-redevplugin-escape-action", "data-redevplugin-asset-binding", "data-redevplugin-asset-attr"];
4
4
  export declare const opaqueSurfaceTagAttributes: {
5
5
  readonly button: readonly ["type", "name", "value", "disabled", "aria-pressed", "aria-expanded"];
6
6
  readonly input: readonly ["type", "name", "value", "checked", "disabled", "readonly", "required", "placeholder", "min", "max", "step", "autocomplete"];
@@ -19,6 +19,7 @@ export declare const opaqueSurfaceTagAttributes: {
19
19
  readonly source: readonly ["type", "media"];
20
20
  readonly track: readonly ["kind", "srclang", "label", "default"];
21
21
  readonly time: readonly ["datetime"];
22
+ readonly canvas: readonly ["width", "height", "data-redevplugin-canvas"];
22
23
  };
23
24
  export declare const opaqueSurfaceSafeInputTypes: readonly ["text", "search", "number", "checkbox", "radio", "button", "submit", "reset"];
24
25
  export declare const opaqueSurfaceRenderLimits: {
@@ -31,4 +32,13 @@ export declare const opaqueSurfaceRenderLimits: {
31
32
  readonly max_text_length: 65536;
32
33
  readonly max_attribute_value_length: 4096;
33
34
  readonly max_form_fields: 128;
35
+ readonly max_canvas_count: 4;
36
+ readonly max_canvas_dimension: 4096;
37
+ readonly max_canvas_total_pixels: 16777216;
38
+ readonly max_canvas_pointer_events_per_second: 120;
39
+ readonly max_image_count: 32;
40
+ readonly max_image_dimension: 4096;
41
+ readonly max_image_total_pixels: 33554432;
42
+ readonly worker_heartbeat_interval_ms: 10000;
43
+ readonly worker_heartbeat_timeout_ms: 5000;
34
44
  };
@@ -57,7 +57,8 @@ export const opaqueSurfaceAllowedTags = [
57
57
  "source",
58
58
  "audio",
59
59
  "video",
60
- "track"
60
+ "track",
61
+ "canvas"
61
62
  ];
62
63
  export const opaqueSurfaceGlobalAttributes = [
63
64
  "id",
@@ -66,9 +67,11 @@ export const opaqueSurfaceGlobalAttributes = [
66
67
  "title",
67
68
  "hidden",
68
69
  "tabindex",
70
+ "autofocus",
69
71
  "lang",
70
72
  "dir",
71
73
  "data-redevplugin-action",
74
+ "data-redevplugin-escape-action",
72
75
  "data-redevplugin-asset-binding",
73
76
  "data-redevplugin-asset-attr"
74
77
  ];
@@ -182,6 +185,11 @@ export const opaqueSurfaceTagAttributes = {
182
185
  ],
183
186
  "time": [
184
187
  "datetime"
188
+ ],
189
+ "canvas": [
190
+ "width",
191
+ "height",
192
+ "data-redevplugin-canvas"
185
193
  ]
186
194
  };
187
195
  export const opaqueSurfaceSafeInputTypes = [
@@ -203,5 +211,14 @@ export const opaqueSurfaceRenderLimits = {
203
211
  "max_attributes_per_element": 64,
204
212
  "max_text_length": 65536,
205
213
  "max_attribute_value_length": 4096,
206
- "max_form_fields": 128
214
+ "max_form_fields": 128,
215
+ "max_canvas_count": 4,
216
+ "max_canvas_dimension": 4096,
217
+ "max_canvas_total_pixels": 16777216,
218
+ "max_canvas_pointer_events_per_second": 120,
219
+ "max_image_count": 32,
220
+ "max_image_dimension": 4096,
221
+ "max_image_total_pixels": 33554432,
222
+ "worker_heartbeat_interval_ms": 10000,
223
+ "worker_heartbeat_timeout_ms": 5000
207
224
  };
package/dist/plugin.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { PluginBridgeClient } from "./surface.js";
2
2
  export { PluginBridgeError } from "./errors.js";
3
3
  export { callCapabilityOperation, callCapabilityStream, callCapabilitySync, isCapabilityBusinessError, } from "./capability-client.js";
4
- export type { BridgeLifecycleEvent, MessagePortLike, PluginBridgeClientOptions, PluginJSONObject, PluginJSONValue, PluginMethodResult, PluginStreamTerminalStatus, PluginUIActionEvent, PluginUIAttributeValue, PluginUIVNode, } from "./surface.js";
4
+ export type { BridgeLifecycleEvent, MessagePortLike, PluginBridgeClientOptions, PluginCanvasAccessibilityState, PluginCanvasInputEvent, PluginCanvasKeyEvent, PluginCanvasPointerEvent, PluginCanvasResizeEvent, PluginCanvasSurface, PluginJSONObject, PluginJSONValue, PluginMethodResult, PluginStreamTerminalStatus, PluginUIActionEvent, PluginUIAttributeValue, PluginUIVNode, } from "./surface.js";
5
5
  export type { PluginCapabilitySchema, PluginCapabilityStreamEvent, PluginCapabilityStreamReadResult, PluginOperation, PluginStream, } from "./capability-client.js";
package/dist/surface.d.ts CHANGED
@@ -3,7 +3,7 @@ import { pluginUIProtocolVersion } from "./contracts.gen.js";
3
3
  import { type OpaqueSurfaceAllowedTag } from "./opaque-surface-policy.gen.js";
4
4
  import { type FetchLike } from "./http.js";
5
5
  import { type PluginSurfaceScope } from "./surface-scope.js";
6
- export declare const opaqueSurfaceDocumentSchemaVersion: "redevplugin.opaque_surface_document.v1";
6
+ export declare const opaqueSurfaceDocumentSchemaVersion: "redevplugin.opaque_surface_document.v2";
7
7
  export declare const pluginRiskPlanSchemaVersion: "redevplugin.capability.risk_plan.v1";
8
8
  export type PluginJSONValue = null | boolean | number | string | PluginJSONValue[] | PluginJSONObject;
9
9
  export type PluginJSONObject = {
@@ -61,14 +61,62 @@ export type PluginBridgeCancelMessage = {
61
61
  export type PluginBridgeLifecycleMessage = {
62
62
  type: "redevplugin.bridge.lifecycle";
63
63
  event: BridgeLifecycleEvent;
64
+ quiesce_id?: string;
65
+ };
66
+ export type PluginBridgeLifecycleAckMessage = {
67
+ type: "redevplugin.bridge.lifecycle_ack";
68
+ quiesce_id: string;
64
69
  };
65
70
  export type PluginUIActionEvent = {
66
71
  action: string;
67
- event: "click" | "input" | "change" | "submit";
72
+ event: "click" | "input" | "change" | "submit" | "escape";
68
73
  value?: string;
69
74
  checked?: boolean;
70
75
  form_data?: Record<string, string>;
71
76
  };
77
+ export type PluginCanvasSurface = {
78
+ canvas: OffscreenCanvas;
79
+ canvasId: string;
80
+ cssWidth: number;
81
+ cssHeight: number;
82
+ devicePixelRatio: number;
83
+ };
84
+ export type PluginCanvasAccessibilityState = {
85
+ label: string;
86
+ description: string;
87
+ };
88
+ export type PluginCanvasFocusEvent = {
89
+ type: "focus" | "blur";
90
+ };
91
+ export type PluginCanvasResizeEvent = {
92
+ type: "resize";
93
+ cssWidth: number;
94
+ cssHeight: number;
95
+ devicePixelRatio: number;
96
+ };
97
+ export type PluginCanvasKeyEvent = {
98
+ type: "key";
99
+ event: "keydown" | "keyup";
100
+ code: string;
101
+ key: string;
102
+ repeat: boolean;
103
+ altKey: boolean;
104
+ ctrlKey: boolean;
105
+ metaKey: boolean;
106
+ shiftKey: boolean;
107
+ };
108
+ export type PluginCanvasPointerEvent = {
109
+ type: "pointer";
110
+ event: "pointerdown" | "pointermove" | "pointerup" | "pointercancel";
111
+ pointerId: number;
112
+ pointerType: "mouse" | "pen" | "touch" | "unknown";
113
+ buttons: number;
114
+ button: number;
115
+ x: number;
116
+ y: number;
117
+ pressure: number;
118
+ };
119
+ export type PluginCanvasInputEvent = PluginCanvasFocusEvent | PluginCanvasResizeEvent | PluginCanvasKeyEvent | PluginCanvasPointerEvent;
72
120
  export type PluginUIAttributeValue = string | number | boolean;
73
121
  export type PluginUIVNode = string | {
74
122
  type: "element";
@@ -161,7 +209,7 @@ export type MessageEventLike = {
161
209
  ports?: MessagePortLike[];
162
210
  };
163
211
  export type MessagePortLike = {
164
- postMessage(message: unknown): void;
212
+ postMessage(message: unknown, transfer?: readonly unknown[]): void;
165
213
  addEventListener(type: "message", listener: (event: MessageEventLike) => void): void;
166
214
  removeEventListener(type: "message", listener: (event: MessageEventLike) => void): void;
167
215
  start(): void;
@@ -189,8 +237,12 @@ export declare class PluginBridgeClient {
189
237
  readStream(streamHandle: string): Promise<PluginStreamReadResult>;
190
238
  cancelOperation(operationID: string, reason?: string): Promise<void>;
191
239
  render(tree: PluginUIVNode | PluginUIVNode[]): Promise<void>;
240
+ openCanvas(canvasId: string): Promise<PluginCanvasSurface>;
241
+ updateCanvasAccessibility(canvasId: string, state: PluginCanvasAccessibilityState): Promise<void>;
242
+ loadImageAsset(assetId: string): Promise<ImageBitmap>;
192
243
  onAction(action: string, handler: (event: PluginUIActionEvent) => void): () => void;
193
- onLifecycle(handler: (event: BridgeLifecycleEvent) => void): () => void;
244
+ onCanvasInput(canvasId: string, handler: (event: PluginCanvasInputEvent) => void): () => void;
245
+ onLifecycle(handler: (event: BridgeLifecycleEvent) => Promise<void> | void): () => void;
194
246
  dispose(): void;
195
247
  }
196
248
  export declare const defaultPluginSurfaceReloadMax = 2;
@@ -245,6 +297,7 @@ export type OpaqueSurfaceWorker = {
245
297
  };
246
298
  export type OpaqueSurfaceAsset = {
247
299
  binding_id: string;
300
+ logical_ids: string[];
248
301
  path: string;
249
302
  sha256: string;
250
303
  size: number;