@floegence/redevplugin-ui 0.2.2 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/capability-client.d.ts +40 -0
- package/dist/capability-client.js +501 -0
- package/dist/contracts.gen.d.ts +47 -11
- package/dist/contracts.gen.js +53 -11
- package/dist/errors.d.ts +3 -3
- package/dist/errors.js +1 -0
- package/dist/platform.d.ts +81 -8
- package/dist/plugin.d.ts +4 -1
- package/dist/plugin.js +2 -0
- package/dist/surface.d.ts +15 -3
- package/dist/surface.js +234 -29
- package/package.json +1 -1
package/dist/contracts.gen.js
CHANGED
|
@@ -24,6 +24,12 @@ export const redevPluginContractVersions = {
|
|
|
24
24
|
"compatibility_schema_version": "compatibility-manifest-v2",
|
|
25
25
|
"release_manifest_schema_version": "release-manifest-v2",
|
|
26
26
|
"worker_invocation_schema_version": "worker-invocation-v1",
|
|
27
|
+
"host_capability_contract_schema_version": "host-capability-contract-v1",
|
|
28
|
+
"host_capability_pin_schema_version": "host-capability-pin-v1",
|
|
29
|
+
"host_capability_manifest_schema_version": "host-capability-manifest-v1",
|
|
30
|
+
"host_capability_compatibility_schema_version": "host-capability-compatibility-v1",
|
|
31
|
+
"host_capability_signature_schema_version": "host-capability-signature-v1",
|
|
32
|
+
"host_capability_notices_schema_version": "host-capability-notices-v1",
|
|
27
33
|
"error_codes_schema_version": "error-codes-v1",
|
|
28
34
|
"contract_registry_version": "contract-registry-v1",
|
|
29
35
|
};
|
|
@@ -32,13 +38,13 @@ export const redevPluginContractArtifacts = [
|
|
|
32
38
|
id: "plugin-platform-openapi",
|
|
33
39
|
path: "spec/openapi/plugin-platform-v2.yaml",
|
|
34
40
|
version: "plugin-platform-v2",
|
|
35
|
-
sha256: "
|
|
41
|
+
sha256: "b7922ebd37be680060f067b66a439f3d1f9a7f22d730512763e3f7d347dcaf9a",
|
|
36
42
|
},
|
|
37
43
|
{
|
|
38
44
|
id: "manifest-schema",
|
|
39
45
|
path: "spec/plugin/manifest-v2.schema.json",
|
|
40
46
|
version: "manifest-v2",
|
|
41
|
-
sha256: "
|
|
47
|
+
sha256: "f80279943bde0e304138ee0fdae2e7b9f2b0334412cf159d268cc8badc196759",
|
|
42
48
|
},
|
|
43
49
|
{
|
|
44
50
|
id: "package-signature-schema",
|
|
@@ -50,13 +56,13 @@ export const redevPluginContractArtifacts = [
|
|
|
50
56
|
id: "release-metadata-schema",
|
|
51
57
|
path: "spec/plugin/release-metadata-v2.schema.json",
|
|
52
58
|
version: "release-metadata-v2",
|
|
53
|
-
sha256: "
|
|
59
|
+
sha256: "5f24cf61bea352715f24595c385745476e677affdaf8f60fd15e534424df60b6",
|
|
54
60
|
},
|
|
55
61
|
{
|
|
56
62
|
id: "source-policy-schema",
|
|
57
63
|
path: "spec/plugin/source-policy-v1.schema.json",
|
|
58
64
|
version: "source-policy-v1",
|
|
59
|
-
sha256: "
|
|
65
|
+
sha256: "fb6a9c27e726378a28a9ff48ee47c40ede99fa95a524a308e2c762bebc4b9fe2",
|
|
60
66
|
},
|
|
61
67
|
{
|
|
62
68
|
id: "source-revocations-schema",
|
|
@@ -68,13 +74,13 @@ export const redevPluginContractArtifacts = [
|
|
|
68
74
|
id: "token-ticket-schema",
|
|
69
75
|
path: "spec/plugin/token-ticket-v2.schema.json",
|
|
70
76
|
version: "token-ticket-v2",
|
|
71
|
-
sha256: "
|
|
77
|
+
sha256: "f0342614f28b81045ac47d76d71753c8ee177f8143c14a711a0b1f5632e7835e",
|
|
72
78
|
},
|
|
73
79
|
{
|
|
74
80
|
id: "iframe-bridge-schema",
|
|
75
81
|
path: "spec/plugin/bridge-v2.schema.json",
|
|
76
82
|
version: "bridge-v2",
|
|
77
|
-
sha256: "
|
|
83
|
+
sha256: "23d968113aaf93dab75df6acd96a350df07c0428fd2a00c66c015a0d875592d1",
|
|
78
84
|
},
|
|
79
85
|
{
|
|
80
86
|
id: "opaque-surface-document-schema",
|
|
@@ -92,7 +98,7 @@ export const redevPluginContractArtifacts = [
|
|
|
92
98
|
id: "compatibility-manifest-schema",
|
|
93
99
|
path: "spec/plugin/compatibility-manifest-v2.schema.json",
|
|
94
100
|
version: "compatibility-manifest-v2",
|
|
95
|
-
sha256: "
|
|
101
|
+
sha256: "7e0789cc80f4674277c6d12f4e097198543081b198b7a1a94eefb3cd404c6eb0",
|
|
96
102
|
},
|
|
97
103
|
{
|
|
98
104
|
id: "release-manifest-schema",
|
|
@@ -104,19 +110,55 @@ export const redevPluginContractArtifacts = [
|
|
|
104
110
|
id: "worker-invocation-schema",
|
|
105
111
|
path: "spec/plugin/worker-invocation-v1.schema.json",
|
|
106
112
|
version: "worker-invocation-v1",
|
|
107
|
-
sha256: "
|
|
113
|
+
sha256: "9199dd0731aaf592e34c1574cd81c094412a3e6cd9b633853d3e60e89438bcb5",
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
id: "host-capability-contract-schema",
|
|
117
|
+
path: "spec/plugin/host-capability-contract-v1.schema.json",
|
|
118
|
+
version: "host-capability-contract-v1",
|
|
119
|
+
sha256: "a2318b01211aa6dbd8ca983f7ebca311619527aa4828a0ea0d201ebac7427292",
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: "host-capability-pin-schema",
|
|
123
|
+
path: "spec/plugin/host-capability-pin-v1.schema.json",
|
|
124
|
+
version: "host-capability-pin-v1",
|
|
125
|
+
sha256: "20526a5934f0d85a3db7882492487266f09de5bcd176e2c7936f05d0b7fe0338",
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
id: "host-capability-manifest-schema",
|
|
129
|
+
path: "spec/plugin/host-capability-manifest-v1.schema.json",
|
|
130
|
+
version: "host-capability-manifest-v1",
|
|
131
|
+
sha256: "5f13a8e5f918378b9cba9fdc133a9a75ba3a8311c30cb6a02ca0aba09035110e",
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
id: "host-capability-compatibility-schema",
|
|
135
|
+
path: "spec/plugin/host-capability-compatibility-v1.schema.json",
|
|
136
|
+
version: "host-capability-compatibility-v1",
|
|
137
|
+
sha256: "361ebbf7009aeb66c763ecde46427b17b6cf7d2307c01886c5987a1f4f1762de",
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: "host-capability-signature-schema",
|
|
141
|
+
path: "spec/plugin/host-capability-signature-v1.schema.json",
|
|
142
|
+
version: "host-capability-signature-v1",
|
|
143
|
+
sha256: "88cbc1d63afb7e289ca4f8b7c76f702b8d20156f7722c1b71f3ab9138a240a5e",
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: "host-capability-notices-schema",
|
|
147
|
+
path: "spec/plugin/host-capability-notices-v1.schema.json",
|
|
148
|
+
version: "host-capability-notices-v1",
|
|
149
|
+
sha256: "6affd5d0ae90239f6fd08cbeddae4eef393efa2838c9e4935874ba3dc0e05948",
|
|
108
150
|
},
|
|
109
151
|
{
|
|
110
152
|
id: "error-codes-schema",
|
|
111
153
|
path: "spec/plugin/error-codes-v1.schema.json",
|
|
112
154
|
version: "error-codes-v1",
|
|
113
|
-
sha256: "
|
|
155
|
+
sha256: "254eb4c6d25bae3976c30fe51bdd49456e906e1a3f3bc76df092afd30bd4c948",
|
|
114
156
|
},
|
|
115
157
|
{
|
|
116
158
|
id: "rust-ipc-schema",
|
|
117
159
|
path: "spec/plugin/ipc-v1.schema.json",
|
|
118
160
|
version: "rust-ipc-v1",
|
|
119
|
-
sha256: "
|
|
161
|
+
sha256: "78f1310a0b48db733301c3f163ada041a3c9daf2d09369860d758296cbe12e39",
|
|
120
162
|
},
|
|
121
163
|
{
|
|
122
164
|
id: "wasm-worker-schema",
|
|
@@ -140,6 +182,6 @@ export const redevPluginContractArtifacts = [
|
|
|
140
182
|
id: "contract-registry",
|
|
141
183
|
path: "spec/plugin/contract-registry-v1.json",
|
|
142
184
|
version: "contract-registry-v1",
|
|
143
|
-
sha256: "
|
|
185
|
+
sha256: "42dd916922a6183b49d4abc765da2e2d086771a6e6ac1828f8e1dbebb262bba0",
|
|
144
186
|
},
|
|
145
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_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_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_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_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"];
|
|
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
|
@@ -36,6 +36,7 @@ export const pluginPlatformErrorCodes = [
|
|
|
36
36
|
"PLUGIN_RUNTIME_UNAVAILABLE",
|
|
37
37
|
"PLUGIN_RUNTIME_VERSION_MISMATCH",
|
|
38
38
|
"PLUGIN_JSON_LIMIT_EXCEEDED",
|
|
39
|
+
"PLUGIN_CAPABILITY_ERROR",
|
|
39
40
|
"PLUGIN_CONTRACT_MISMATCH",
|
|
40
41
|
"PLUGIN_STATE_VERSION_MISMATCH",
|
|
41
42
|
"PLUGIN_CSRF_REQUIRED",
|
package/dist/platform.d.ts
CHANGED
|
@@ -34,6 +34,12 @@ export type PluginCompatibilityMatrix = {
|
|
|
34
34
|
compatibility_schema_version: string;
|
|
35
35
|
release_manifest_schema_version: string;
|
|
36
36
|
worker_invocation_schema_version: string;
|
|
37
|
+
host_capability_contract_schema_version: string;
|
|
38
|
+
host_capability_pin_schema_version: string;
|
|
39
|
+
host_capability_manifest_schema_version: string;
|
|
40
|
+
host_capability_compatibility_schema_version: string;
|
|
41
|
+
host_capability_signature_schema_version: string;
|
|
42
|
+
host_capability_notices_schema_version: string;
|
|
37
43
|
error_codes_schema_version: string;
|
|
38
44
|
contract_registry_version: string;
|
|
39
45
|
[key: string]: unknown;
|
|
@@ -243,19 +249,86 @@ export type PluginSettingsSnapshot = {
|
|
|
243
249
|
values: Record<string, unknown>;
|
|
244
250
|
updated_at: string;
|
|
245
251
|
};
|
|
246
|
-
export type
|
|
252
|
+
export type PluginCapabilityContractPin = {
|
|
253
|
+
publisher_id: string;
|
|
254
|
+
contract_id: string;
|
|
255
|
+
contract_version: string;
|
|
256
|
+
artifact_ref: string;
|
|
257
|
+
artifact_sha256: string;
|
|
258
|
+
manifest_ref: string;
|
|
259
|
+
manifest_sha256: string;
|
|
260
|
+
signature_ref: string;
|
|
261
|
+
signature_sha256: string;
|
|
262
|
+
signature_key_id: string;
|
|
263
|
+
signature_policy_epoch: string;
|
|
264
|
+
signature_revocation_epoch: string;
|
|
265
|
+
compatibility_ref: string;
|
|
266
|
+
compatibility_sha256: string;
|
|
267
|
+
generated_client_ref: string;
|
|
268
|
+
generated_client_sha256: string;
|
|
269
|
+
notices_ref: string;
|
|
270
|
+
notices_sha256: string;
|
|
271
|
+
};
|
|
272
|
+
export type PluginExecutionBinding = {
|
|
273
|
+
invocation_id: string;
|
|
274
|
+
audit_correlation_id: string;
|
|
247
275
|
operation_id: string;
|
|
248
|
-
|
|
276
|
+
stream_id?: string;
|
|
277
|
+
publisher_id: string;
|
|
278
|
+
plugin_id: string;
|
|
249
279
|
plugin_instance_id: string;
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
execution: string;
|
|
280
|
+
plugin_version: string;
|
|
281
|
+
active_fingerprint: string;
|
|
253
282
|
surface_instance_id?: string;
|
|
283
|
+
owner_session_hash?: string;
|
|
284
|
+
owner_user_hash?: string;
|
|
254
285
|
session_channel_id_hash?: string;
|
|
255
286
|
bridge_channel_id?: string;
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
287
|
+
capability_id: string;
|
|
288
|
+
capability_version: string;
|
|
289
|
+
binding_id: string;
|
|
290
|
+
contract: PluginCapabilityContractPin;
|
|
291
|
+
method: string;
|
|
292
|
+
target_method: string;
|
|
293
|
+
effect: "read" | "write" | "execute" | "delete" | "admin";
|
|
294
|
+
execution: "operation" | "subscription";
|
|
295
|
+
permissions: {
|
|
296
|
+
required: string[];
|
|
297
|
+
granted: string[];
|
|
298
|
+
};
|
|
299
|
+
confirmation: {
|
|
300
|
+
required: boolean;
|
|
301
|
+
confirmed: boolean;
|
|
302
|
+
confirmation_id?: string;
|
|
303
|
+
request_sha256?: string;
|
|
304
|
+
plan_sha256?: string;
|
|
305
|
+
target_sha256?: string;
|
|
306
|
+
};
|
|
307
|
+
revision: {
|
|
308
|
+
policy_revision: number;
|
|
309
|
+
management_revision: number;
|
|
310
|
+
revoke_epoch: number;
|
|
311
|
+
};
|
|
312
|
+
quota: {
|
|
313
|
+
max_concurrent?: number;
|
|
314
|
+
max_duration_ms?: number;
|
|
315
|
+
max_stream_bytes?: number;
|
|
316
|
+
expires_at?: string;
|
|
317
|
+
};
|
|
318
|
+
target: {
|
|
319
|
+
kind: string;
|
|
320
|
+
fields: Record<string, unknown>;
|
|
321
|
+
};
|
|
322
|
+
target_descriptor_sha256: string;
|
|
323
|
+
stream_event_type_name?: string;
|
|
324
|
+
stream_event_schema_sha256?: string;
|
|
325
|
+
};
|
|
326
|
+
export type PluginOperationRecord = PluginExecutionBinding & {
|
|
327
|
+
status: "running" | "cancel_requested" | "canceled" | "completed" | "failed" | "orphaned_after_disable" | "orphaned_after_uninstall";
|
|
328
|
+
cancelable: boolean;
|
|
329
|
+
cancel_ack_timeout_ms?: number;
|
|
330
|
+
disable_behavior?: "cancel" | "orphan" | "wait";
|
|
331
|
+
uninstall_behavior?: "cancel_then_block_delete" | "force_cleanup_allowed";
|
|
259
332
|
reason?: string;
|
|
260
333
|
created_at: string;
|
|
261
334
|
updated_at: string;
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
export { PluginBridgeClient } from "./surface.js";
|
|
2
|
-
export
|
|
2
|
+
export { PluginBridgeError } from "./errors.js";
|
|
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";
|
|
5
|
+
export type { PluginCapabilitySchema, PluginCapabilityStreamEvent, PluginCapabilityStreamReadResult, PluginOperation, PluginStream, } from "./capability-client.js";
|
package/dist/plugin.js
CHANGED
package/dist/surface.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export type PluginBridgeResponse = {
|
|
|
52
52
|
ok: false;
|
|
53
53
|
error_code: string;
|
|
54
54
|
error: string;
|
|
55
|
+
error_details?: PluginJSONObject;
|
|
55
56
|
};
|
|
56
57
|
export type PluginBridgeCancelMessage = {
|
|
57
58
|
type: "redevplugin.bridge.cancel";
|
|
@@ -76,7 +77,7 @@ export type PluginUIVNode = string | {
|
|
|
76
77
|
children?: PluginUIVNode[];
|
|
77
78
|
};
|
|
78
79
|
export type PluginMethodResult<T = unknown> = {
|
|
79
|
-
data
|
|
80
|
+
data: T;
|
|
80
81
|
operation_id?: string;
|
|
81
82
|
stream_handle?: string;
|
|
82
83
|
confirmation_required?: boolean;
|
|
@@ -90,13 +91,23 @@ export type PluginTrustedMethodResult<T = unknown> = Omit<PluginMethodResult<T>,
|
|
|
90
91
|
stream_expires_at?: string;
|
|
91
92
|
};
|
|
92
93
|
export type PluginStreamEvent = {
|
|
93
|
-
stream_id: string;
|
|
94
94
|
sequence: number;
|
|
95
95
|
kind: string;
|
|
96
96
|
data?: string;
|
|
97
97
|
error?: string;
|
|
98
98
|
at: string;
|
|
99
99
|
};
|
|
100
|
+
export type PluginStreamTerminalStatus = "closed" | "canceled" | "failed" | "orphaned_after_disable" | "orphaned_after_uninstall";
|
|
101
|
+
export type PluginStreamReadResult = {
|
|
102
|
+
events: PluginStreamEvent[];
|
|
103
|
+
done: false;
|
|
104
|
+
retry_after_ms: number;
|
|
105
|
+
} | {
|
|
106
|
+
events: PluginStreamEvent[];
|
|
107
|
+
done: true;
|
|
108
|
+
terminal_status: PluginStreamTerminalStatus;
|
|
109
|
+
retry_after_ms: 0;
|
|
110
|
+
};
|
|
100
111
|
export type PluginRiskSeverity = "info" | "low" | "medium" | "high" | "critical";
|
|
101
112
|
export type PluginRiskEffect = "read" | "write" | "execute" | "delete" | "admin";
|
|
102
113
|
export type PluginRiskFlag = {
|
|
@@ -175,7 +186,8 @@ export declare class PluginBridgeClient {
|
|
|
175
186
|
constructor(options?: PluginBridgeClientOptions);
|
|
176
187
|
ready(): Promise<void>;
|
|
177
188
|
call<T = unknown>(method: string, params?: PluginJSONObject): Promise<T>;
|
|
178
|
-
readStream(streamHandle: string): Promise<
|
|
189
|
+
readStream(streamHandle: string): Promise<PluginStreamReadResult>;
|
|
190
|
+
cancelOperation(operationID: string, reason?: string): Promise<void>;
|
|
179
191
|
render(tree: PluginUIVNode | PluginUIVNode[]): Promise<void>;
|
|
180
192
|
onAction(action: string, handler: (event: PluginUIActionEvent) => void): () => void;
|
|
181
193
|
onLifecycle(handler: (event: BridgeLifecycleEvent) => void): () => void;
|