@dp-bohrium/widget-sdk 0.5.0 → 0.6.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.
Files changed (167) hide show
  1. package/AGENTS.md +10 -4
  2. package/CHANGELOG.md +18 -1
  3. package/README.md +39 -17
  4. package/assets/licenses/ajv@8.20.0/LICENSE +22 -0
  5. package/assets/licenses/fast-deep-equal@3.1.3/LICENSE +21 -0
  6. package/assets/licenses/fast-uri@3.1.6/LICENSE +30 -0
  7. package/assets/licenses/json-schema-traverse@1.0.0/LICENSE +21 -0
  8. package/assets/licenses/require-from-string@2.0.2/license +21 -0
  9. package/assets/licenses/widget-contracts.LICENSE +21 -0
  10. package/assets/licenses/widget-sdk.LICENSE +21 -0
  11. package/assets/schemas/host-runtime-config.schema.json +305 -0
  12. package/assets/schemas/widget-manifest.schema.json +361 -0
  13. package/assets/schemas/widget-plugin-manifest.schema.json +162 -0
  14. package/assets/schemas/widget-runtime-contracts.schema.json +2870 -0
  15. package/assets/toolchain.json +24 -0
  16. package/conformance/bridge/capability-request.json +23 -0
  17. package/conformance/bridge/files-download-request.json +23 -0
  18. package/conformance/bridge/files-read-versioned-request.json +25 -0
  19. package/conformance/bridge/files-write-request.json +25 -0
  20. package/conformance/bridge/files-write-success.json +25 -0
  21. package/conformance/bridge/network-fetch-denied.json +16 -0
  22. package/conformance/bridge/network-fetch-request.json +19 -0
  23. package/conformance/bridge/network-fetch-success.json +22 -0
  24. package/conformance/bridge/presentation-change-surface-request.json +14 -0
  25. package/conformance/bridge/presentation-close-request.json +14 -0
  26. package/conformance/bridge/presentation-close-success.json +11 -0
  27. package/conformance/bridge/presentation-downgrade-success.json +14 -0
  28. package/conformance/bridge/presentation-focus-backward-request.json +14 -0
  29. package/conformance/bridge/presentation-focus-boundary-success.json +14 -0
  30. package/conformance/bridge/presentation-focus-forward-request.json +14 -0
  31. package/conformance/bridge/presentation-init.json +70 -0
  32. package/conformance/bridge/presentation-policy-denied.json +16 -0
  33. package/conformance/bridge/presentation-present-request.json +14 -0
  34. package/conformance/bridge/presentation-user-denied.json +16 -0
  35. package/conformance/bridge/ready.json +11 -0
  36. package/conformance/bridge/region-acquire-request.json +14 -0
  37. package/conformance/bridge/tasks-list-request.json +17 -0
  38. package/conformance/bridge/tasks-watch-request.json +18 -0
  39. package/conformance/bridge/ui-state-write-request.json +18 -0
  40. package/conformance/bundles/minimal-file-preview/entry.js +1 -0
  41. package/conformance/bundles/minimal-file-preview/manifest.json +12 -0
  42. package/conformance/bundles/minimal-file-preview/samples/file-preview.json +1 -0
  43. package/conformance/bundles/minimal-panel/entry.js +1 -0
  44. package/conformance/bundles/minimal-panel/manifest.json +11 -0
  45. package/conformance/bundles/minimal-panel/samples/panel.json +1 -0
  46. package/conformance/bundles/minimal-tool-result/entry.js +1 -0
  47. package/conformance/bundles/minimal-tool-result/manifest.json +11 -0
  48. package/conformance/bundles/minimal-tool-result/samples/tool-result.json +1 -0
  49. package/conformance/file-grants/write.json +8 -0
  50. package/conformance/file-responses/list.json +1 -0
  51. package/conformance/file-responses/metadata.json +11 -0
  52. package/conformance/file-responses/mutation-conflict.json +6 -0
  53. package/conformance/file-responses/permission-denied.json +6 -0
  54. package/conformance/file-responses/read-revision-only.json +8 -0
  55. package/conformance/file-responses/read-unversioned-range.json +12 -0
  56. package/conformance/file-responses/read-versioned.json +12 -0
  57. package/conformance/file-responses/resource-limit.json +1 -0
  58. package/conformance/file-responses/revision-conflict.json +6 -0
  59. package/conformance/file-responses/text-content.json +7 -0
  60. package/conformance/file-responses/write-outcome-unknown.json +6 -0
  61. package/conformance/file-responses/write-success.json +15 -0
  62. package/conformance/host-runtime-config/invalid-host-service-expiry.json +85 -0
  63. package/conformance/host-runtime-config/invalid-host-service-identity.json +85 -0
  64. package/conformance/host-runtime-config/invalid-host-service-permission.json +85 -0
  65. package/conformance/host-runtime-config/invalid-host-service-status.json +65 -0
  66. package/conformance/host-runtime-config/invalid-missing-manifest-fields.json +55 -0
  67. package/conformance/host-runtime-config/invalid-static-origins.json +60 -0
  68. package/conformance/host-runtime-config/valid-host-service-authorization-required.json +65 -0
  69. package/conformance/host-runtime-config/valid-host-service-authorization.json +85 -0
  70. package/conformance/host-runtime-config/valid-no-requested-permissions.json +52 -0
  71. package/conformance/host-runtime-config/valid.json +85 -0
  72. package/conformance/invalid-bridge-messages/network-fetch-mixed-case-forbidden-header.json +21 -0
  73. package/conformance/invalid-file-grants/extra-file-scope.json +9 -0
  74. package/conformance/invalid-file-grants/missing-write-limits.json +4 -0
  75. package/conformance/invalid-file-requests/arbitrary-path.json +16 -0
  76. package/conformance/invalid-file-requests/missing-expected-revision.json +14 -0
  77. package/conformance/invalid-file-requests/missing-mutation-id.json +14 -0
  78. package/conformance/invalid-file-requests/path-in-reference.json +16 -0
  79. package/conformance/invalid-file-results/read-empty-revision.json +5 -0
  80. package/conformance/invalid-file-results/read-null-revision.json +5 -0
  81. package/conformance/invalid-file-results/write-missing-mutation-id.json +11 -0
  82. package/conformance/invalid-manifests/missing-target.json +11 -0
  83. package/conformance/invalid-manifests/presentation-duplicate-surfaces.json +16 -0
  84. package/conformance/invalid-manifests/presentation-empty-surfaces.json +14 -0
  85. package/conformance/invalid-manifests/presentation-unknown-surface.json +16 -0
  86. package/conformance/invalid-manifests/unknown-field.json +12 -0
  87. package/conformance/invalid-network-requests/mixed-case-forbidden-header.json +11 -0
  88. package/conformance/invalid-presentation-grants/duplicate-surfaces.json +5 -0
  89. package/conformance/invalid-presentation-grants/empty-surfaces.json +5 -0
  90. package/conformance/invalid-presentation-grants/false-confirmation.json +5 -0
  91. package/conformance/invalid-presentation-grants/missing-confirmation.json +4 -0
  92. package/conformance/invalid-presentation-grants/unknown-surface.json +5 -0
  93. package/conformance/invalid-presentation-requests/change-surface-missing-surface.json +4 -0
  94. package/conformance/invalid-presentation-requests/close-with-surface.json +4 -0
  95. package/conformance/invalid-presentation-requests/focus-boundary-missing-direction.json +4 -0
  96. package/conformance/invalid-presentation-requests/focus-boundary-unknown-direction.json +4 -0
  97. package/conformance/invalid-presentation-requests/focus-boundary-with-coordinates.json +9 -0
  98. package/conformance/invalid-presentation-requests/focus-boundary-with-event-provenance.json +8 -0
  99. package/conformance/invalid-presentation-requests/focus-boundary-with-generation.json +8 -0
  100. package/conformance/invalid-presentation-requests/focus-boundary-with-identity.json +12 -0
  101. package/conformance/invalid-presentation-requests/focus-boundary-with-key.json +8 -0
  102. package/conformance/invalid-presentation-requests/focus-boundary-with-modifiers.json +11 -0
  103. package/conformance/invalid-presentation-requests/focus-boundary-with-selector.json +8 -0
  104. package/conformance/invalid-presentation-requests/focus-boundary-with-surface.json +8 -0
  105. package/conformance/invalid-presentation-requests/focus-boundary-with-target.json +8 -0
  106. package/conformance/invalid-presentation-requests/focus-boundary-with-timestamp.json +8 -0
  107. package/conformance/invalid-presentation-requests/focus-boundary-with-z-index.json +8 -0
  108. package/conformance/invalid-presentation-requests/present-missing-surface.json +4 -0
  109. package/conformance/invalid-presentation-requests/unknown-surface.json +4 -0
  110. package/conformance/invalid-presentation-requests/widget-controls-coordinates.json +9 -0
  111. package/conformance/invalid-presentation-requests/widget-controls-geometry.json +8 -0
  112. package/conformance/invalid-presentation-requests/widget-controls-instance-id.json +8 -0
  113. package/conformance/invalid-presentation-requests/widget-controls-principal.json +8 -0
  114. package/conformance/invalid-presentation-requests/widget-controls-run-id.json +4 -0
  115. package/conformance/invalid-presentation-requests/widget-controls-widget-id.json +8 -0
  116. package/conformance/invalid-presentation-requests/widget-controls-widget-version-id.json +8 -0
  117. package/conformance/invalid-presentation-requests/widget-controls-z-index.json +4 -0
  118. package/conformance/invalid-render-inputs/malformed.json +17 -0
  119. package/conformance/manifests/valid-file-preview.json +12 -0
  120. package/conformance/manifests/valid-file-write-preview.json +30 -0
  121. package/conformance/manifests/valid-network.json +15 -0
  122. package/conformance/manifests/valid-panel.json +11 -0
  123. package/conformance/manifests/valid-presentation-panel.json +21 -0
  124. package/conformance/manifests/valid-region-panel.json +18 -0
  125. package/conformance/manifests/valid-tool-result.json +14 -0
  126. package/conformance/render-inputs/compatibility/literature-search-paper-results.json +75 -0
  127. package/conformance/render-inputs/compatibility/scientific-bibliography-bibtex.json +10 -0
  128. package/conformance/render-inputs/compatibility/scientific-dataset-csv.json +10 -0
  129. package/conformance/render-inputs/compatibility/scientific-manuscript-latex.json +10 -0
  130. package/conformance/render-inputs/compatibility/scientific-manuscript-markdown.json +10 -0
  131. package/conformance/render-inputs/compatibility/scientific-molecule-mol.json +10 -0
  132. package/conformance/render-inputs/compatibility/scientific-molecule-mol2.json +10 -0
  133. package/conformance/render-inputs/compatibility/scientific-notebook-ipynb.json +10 -0
  134. package/conformance/render-inputs/compatibility/scientific-paper-pdf.json +10 -0
  135. package/conformance/render-inputs/compatibility/scientific-protein-pdb.json +10 -0
  136. package/conformance/render-inputs/compatibility/scientific-source-python.json +10 -0
  137. package/conformance/render-inputs/compatibility/scientific-structure-cif.json +47 -0
  138. package/conformance/render-inputs/compatibility/scientific-structure-poscar.json +10 -0
  139. package/conformance/render-inputs/compatibility/scientific-structure-stru.json +10 -0
  140. package/conformance/render-inputs/compatibility/scientific-trajectory-xyz.json +10 -0
  141. package/conformance/render-inputs/compatibility/thinking-process-paper-search.json +25 -0
  142. package/conformance/render-inputs/compatibility/thinking-process-scholar-search.json +25 -0
  143. package/conformance/render-inputs/compatibility/thinking-process-web-search.json +25 -0
  144. package/conformance/render-inputs/compatibility/workspace-file-search.json +24 -0
  145. package/conformance/render-inputs/compatibility/workspace-file-tree.json +24 -0
  146. package/conformance/render-inputs/empty.json +10 -0
  147. package/conformance/render-inputs/file-preview.json +10 -0
  148. package/conformance/render-inputs/incremental-update.json +10 -0
  149. package/conformance/render-inputs/large.json +10 -0
  150. package/conformance/render-inputs/malformed.json +1 -0
  151. package/conformance/render-inputs/panel.json +10 -0
  152. package/conformance/render-inputs/partial-state-full-snapshot.json +40 -0
  153. package/conformance/render-inputs/tool-result.json +10 -0
  154. package/conformance/resource-budgets/corpus.json +431 -0
  155. package/dist/cli.mjs +15577 -0
  156. package/dist/contracts.d.ts +2 -0
  157. package/dist/contracts.js +1 -0
  158. package/dist/index.d.ts +1 -1
  159. package/dist/index.js +1 -1
  160. package/dist/runtime/index.js +1 -1
  161. package/dist/{runtime-DVFTv55x.js → runtime-D7KxTtdu.js} +1 -1
  162. package/llms.txt +9 -1
  163. package/package.json +17 -3
  164. package/schemas/host-runtime-config.schema.json +305 -0
  165. package/schemas/widget-manifest.schema.json +361 -0
  166. package/schemas/widget-plugin-manifest.schema.json +162 -0
  167. package/schemas/widget-runtime-contracts.schema.json +2870 -0
@@ -0,0 +1,24 @@
1
+ {
2
+ "formatVersion": 2,
3
+ "packageName": "@dp-bohrium/widget-sdk",
4
+ "cli": "0.6.0",
5
+ "profile": {
6
+ "id": "widget-sdk-0.6.0-contracts-0.6.0",
7
+ "sdk": "0.6.0",
8
+ "contracts": "0.6.0"
9
+ },
10
+ "hostAcceptance": "unknown",
11
+ "documentation": {
12
+ "url": "https://dev.dp.tech/bohrium-widget-sdk/",
13
+ "quickStart": "https://dev.dp.tech/bohrium-widget-sdk/guides/quick-start",
14
+ "cli": "https://dev.dp.tech/bohrium-widget-sdk/guides/cli",
15
+ "llmsFull": "https://dev.dp.tech/bohrium-widget-sdk/llms-full.txt",
16
+ "llms": "https://dev.dp.tech/bohrium-widget-sdk/llms.txt"
17
+ },
18
+ "digests": {
19
+ "compiler": "sha256:d541f305c8cccdfc8e122ab84d57103da68c734325df2ead3729cc3a21b7d222",
20
+ "validators": "sha256:e3e411c6ea3c09f07554222141ccb92124cdf8921ab39dbaeb8f79f4ad8d12aa",
21
+ "schemas": "sha256:2286156c619d6482471966fb97a2a4adbb9c86ef9ec17225eb1b070d8489dd9c",
22
+ "templates": "sha256:34f08fb56072c2722a1e02cee09b3130d075853129c333aa8916e0411cee5618"
23
+ }
24
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "widget-capability-1",
5
+ "sequence": 2,
6
+ "type": "capability-request",
7
+ "payload": {
8
+ "requestId": "capability-1",
9
+ "request": {
10
+ "operation": "files.read",
11
+ "input": {
12
+ "file": {
13
+ "id": "file-001",
14
+ "kind": "file",
15
+ "name": "result.txt"
16
+ },
17
+ "offset": 0,
18
+ "length": 1024,
19
+ "encoding": "utf8"
20
+ }
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "widget-download-request-1",
5
+ "sequence": 4,
6
+ "type": "capability-request",
7
+ "payload": {
8
+ "requestId": "download-request-1",
9
+ "request": {
10
+ "operation": "files.download",
11
+ "input": {
12
+ "file": {
13
+ "id": "file-001",
14
+ "kind": "file",
15
+ "name": "result.csv",
16
+ "extension": "csv",
17
+ "mimeType": "text/csv"
18
+ },
19
+ "suggestedName": "result.csv"
20
+ }
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "files-capability-request-1",
5
+ "sequence": 2,
6
+ "type": "capability-request",
7
+ "payload": {
8
+ "requestId": "read-1",
9
+ "request": {
10
+ "operation": "files.read",
11
+ "input": {
12
+ "file": {
13
+ "id": "file-001",
14
+ "kind": "file",
15
+ "name": "structure.xyz",
16
+ "revision": "rev-1"
17
+ },
18
+ "offset": 0,
19
+ "length": 1024,
20
+ "encoding": "utf8",
21
+ "expectedRevision": "rev-1"
22
+ }
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "files-capability-request-1",
5
+ "sequence": 2,
6
+ "type": "capability-request",
7
+ "payload": {
8
+ "requestId": "write-1",
9
+ "request": {
10
+ "operation": "files.write",
11
+ "input": {
12
+ "file": {
13
+ "id": "file-001",
14
+ "kind": "file",
15
+ "name": "structure.xyz",
16
+ "revision": "rev-1"
17
+ },
18
+ "content": "1\n\nH 0 0 0\n",
19
+ "encoding": "utf8",
20
+ "expectedRevision": "rev-1",
21
+ "mutationId": "save-001"
22
+ }
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "files-capability-result-1",
5
+ "sequence": 2,
6
+ "type": "capability-result",
7
+ "payload": {
8
+ "requestId": "write-1",
9
+ "result": {
10
+ "ok": true,
11
+ "data": {
12
+ "file": {
13
+ "id": "file-001",
14
+ "kind": "file",
15
+ "name": "structure.xyz",
16
+ "revision": "rev-2",
17
+ "size": 11
18
+ },
19
+ "revision": "rev-2",
20
+ "bytesWritten": 11,
21
+ "mutationId": "save-001"
22
+ }
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "host-network-denied-1",
5
+ "sequence": 4,
6
+ "type": "capability-result",
7
+ "payload": {
8
+ "requestId": "network-request-1",
9
+ "result": {
10
+ "ok": false,
11
+ "reason": "network-consent-denied",
12
+ "message": "Network access was not authorized",
13
+ "retryable": false
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "widget-network-request-1",
5
+ "sequence": 3,
6
+ "type": "capability-request",
7
+ "payload": {
8
+ "requestId": "network-request-1",
9
+ "request": {
10
+ "operation": "network.fetch",
11
+ "input": {
12
+ "url": "https://api.example.test/v1/items?query=water",
13
+ "auth": "required",
14
+ "method": "GET",
15
+ "redirect": "follow"
16
+ }
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "host-network-success-1",
5
+ "sequence": 4,
6
+ "type": "capability-result",
7
+ "payload": {
8
+ "requestId": "network-request-1",
9
+ "result": {
10
+ "ok": true,
11
+ "data": {
12
+ "status": 200,
13
+ "statusText": "OK",
14
+ "headers": { "content-type": "application/json" },
15
+ "body": "{\"items\":[]}",
16
+ "bodyEncoding": "utf8",
17
+ "finalUrl": "https://api.example.test/v1/items?query=water",
18
+ "redirected": false
19
+ }
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "widget-presentation-change-1",
5
+ "sequence": 3,
6
+ "type": "capability-request",
7
+ "payload": {
8
+ "requestId": "presentation-change-1",
9
+ "request": {
10
+ "operation": "ui.presentation",
11
+ "input": { "action": "change-surface", "surface": "floating" }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "widget-presentation-close-1",
5
+ "sequence": 4,
6
+ "type": "capability-request",
7
+ "payload": {
8
+ "requestId": "presentation-close-1",
9
+ "request": {
10
+ "operation": "ui.presentation",
11
+ "input": { "action": "close" }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "host-presentation-close-1",
5
+ "sequence": 6,
6
+ "type": "capability-result",
7
+ "payload": {
8
+ "requestId": "presentation-close-1",
9
+ "result": { "ok": true, "data": { "action": "close" } }
10
+ }
11
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "host-presentation-downgrade-1",
5
+ "sequence": 5,
6
+ "type": "capability-result",
7
+ "payload": {
8
+ "requestId": "presentation-present-1",
9
+ "result": {
10
+ "ok": true,
11
+ "data": { "action": "present", "surface": "workspace" }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "widget-presentation-focus-backward-1",
5
+ "sequence": 8,
6
+ "type": "capability-request",
7
+ "payload": {
8
+ "requestId": "presentation-focus-backward-1",
9
+ "request": {
10
+ "operation": "ui.presentation",
11
+ "input": { "action": "focus-boundary", "direction": "backward" }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "host-presentation-focus-boundary-1",
5
+ "sequence": 9,
6
+ "type": "capability-result",
7
+ "payload": {
8
+ "requestId": "presentation-focus-forward-1",
9
+ "result": {
10
+ "ok": true,
11
+ "data": { "action": "focus-boundary", "direction": "forward" }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "widget-presentation-focus-forward-1",
5
+ "sequence": 7,
6
+ "type": "capability-request",
7
+ "payload": {
8
+ "requestId": "presentation-focus-forward-1",
9
+ "request": {
10
+ "operation": "ui.presentation",
11
+ "input": { "action": "focus-boundary", "direction": "forward" }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "host-presentation-init-1",
5
+ "sequence": 1,
6
+ "type": "init",
7
+ "payload": {
8
+ "instanceId": "presentation-instance-1",
9
+ "locale": "en-US",
10
+ "theme": {
11
+ "mode": "light",
12
+ "tokens": {
13
+ "background": "#ffffff",
14
+ "foreground": "#111111",
15
+ "muted": "#eeeeee",
16
+ "mutedForeground": "#666666",
17
+ "border": "#dddddd",
18
+ "primary": "#0066cc",
19
+ "danger": "#cc0000"
20
+ }
21
+ },
22
+ "capabilities": [
23
+ {
24
+ "name": "ui.presentation",
25
+ "surfaces": ["floating", "overlay"],
26
+ "requiresHostConfirmation": true
27
+ }
28
+ ],
29
+ "resourceBudget": {
30
+ "version": 1,
31
+ "bundle": {
32
+ "compressedBytes": 1,
33
+ "expandedBytes": 1,
34
+ "fileCount": 1,
35
+ "singleFileBytes": 1
36
+ },
37
+ "bridge": {
38
+ "messageBytes": 1,
39
+ "messagesPerSecond": 1,
40
+ "pendingRequests": 1
41
+ },
42
+ "files": {
43
+ "readBytesPerRequest": 1,
44
+ "readBytesPerRun": 1,
45
+ "callsPerMinute": 1,
46
+ "listPageSize": 1
47
+ },
48
+ "timeouts": {
49
+ "bundleLoadMs": 1,
50
+ "handshakeMs": 1,
51
+ "firstRenderMs": 1,
52
+ "updateMs": 1,
53
+ "capabilityMs": 1,
54
+ "disposeGraceMs": 1
55
+ },
56
+ "concurrency": {
57
+ "activeIframesPerPage": 1,
58
+ "activeIframesPerRun": 1,
59
+ "hiddenRecycleMs": 1
60
+ },
61
+ "retry": {
62
+ "maxAttempts": 1,
63
+ "initialDelayMs": 1,
64
+ "maxDelayMs": 1,
65
+ "totalMs": 1
66
+ },
67
+ "failure": { "consecutiveFailures": 1, "windowMs": 1 }
68
+ }
69
+ }
70
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "host-presentation-policy-denied-1",
5
+ "sequence": 7,
6
+ "type": "capability-result",
7
+ "payload": {
8
+ "requestId": "presentation-change-1",
9
+ "result": {
10
+ "ok": false,
11
+ "reason": "permission-denied",
12
+ "message": "Host presentation policy denied the requested surface",
13
+ "retryable": false
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "widget-presentation-present-1",
5
+ "sequence": 2,
6
+ "type": "capability-request",
7
+ "payload": {
8
+ "requestId": "presentation-present-1",
9
+ "request": {
10
+ "operation": "ui.presentation",
11
+ "input": { "action": "present", "surface": "overlay" }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "host-presentation-user-denied-1",
5
+ "sequence": 8,
6
+ "type": "capability-result",
7
+ "payload": {
8
+ "requestId": "presentation-present-1",
9
+ "result": {
10
+ "ok": false,
11
+ "reason": "permission-denied",
12
+ "message": "User declined the presentation request",
13
+ "retryable": false
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "widget-ready-1",
5
+ "sequence": 1,
6
+ "type": "ready",
7
+ "payload": {
8
+ "widgetSdkVersion": "0.0.1",
9
+ "hostApiVersion": 1
10
+ }
11
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "widget-region-acquire-1",
5
+ "sequence": 2,
6
+ "type": "capability-request",
7
+ "payload": {
8
+ "requestId": "region-acquire-1",
9
+ "request": {
10
+ "operation": "ui.region",
11
+ "input": { "action": "acquire", "region": "session.rightRail" }
12
+ }
13
+ }
14
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "widget-task-list-request-1",
5
+ "sequence": 5,
6
+ "type": "capability-request",
7
+ "payload": {
8
+ "requestId": "task-list-request-1",
9
+ "request": {
10
+ "operation": "tasks.list",
11
+ "input": {
12
+ "cursor": "page-1",
13
+ "limit": 20
14
+ }
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "widget-task-watch-request-1",
5
+ "sequence": 5,
6
+ "type": "capability-request",
7
+ "payload": {
8
+ "requestId": "task-watch-request-1",
9
+ "request": {
10
+ "operation": "tasks.watch",
11
+ "input": {
12
+ "taskId": "task-001",
13
+ "cursor": "cursor-1",
14
+ "limit": 20
15
+ }
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "protocolVersion": 1,
3
+ "channelId": "0123456789abcdef0123456789abcdef",
4
+ "messageId": "widget-ui-state-write-request-1",
5
+ "sequence": 6,
6
+ "type": "capability-request",
7
+ "payload": {
8
+ "requestId": "ui-state-write-request-1",
9
+ "request": {
10
+ "operation": "ui.state",
11
+ "input": {
12
+ "action": "write",
13
+ "key": "table.columns",
14
+ "value": ["name", "score"]
15
+ }
16
+ }
17
+ }
18
+ }
@@ -0,0 +1 @@
1
+ export const Widget = { render() {} };
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "Minimal Structure Preview",
3
+ "widgetConfig": {
4
+ "schemaVersion": 1,
5
+ "hostApiVersion": 1,
6
+ "widgetSdkVersion": "0.0.1",
7
+ "entry": "entry.js",
8
+ "contribution": { "type": "file-preview", "extensions": ["cif"] },
9
+ "requestedCapabilities": { "files": { "metadata": true, "read": true } },
10
+ "samples": [{ "id": "normal", "title": "Normal", "request": "samples/file-preview.json" }]
11
+ }
12
+ }
@@ -0,0 +1 @@
1
+ {"schemaVersion":1,"requestId":"bundle-file","instanceId":"bundle-file","revision":1,"contribution":"file-preview","state":"complete","content":{"contribution":"file-preview","file":{"id":"file","kind":"file","name":"x.cif","extension":"cif"}},"context":{"locale":"en-US","theme":{"mode":"light","tokens":{"background":"#fff","foreground":"#111","muted":"#eee","mutedForeground":"#666","border":"#ddd","primary":"#06c","danger":"#c00"}},"viewport":{"width":1,"height":1},"capabilities":[],"correlationId":"bundle-file"}}
@@ -0,0 +1 @@
1
+ export const Widget = { render() {} };
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "Minimal Analysis Summary",
3
+ "widgetConfig": {
4
+ "schemaVersion": 1,
5
+ "hostApiVersion": 1,
6
+ "widgetSdkVersion": "0.0.1",
7
+ "entry": "entry.js",
8
+ "contribution": { "type": "panel", "id": "analysis-summary" },
9
+ "samples": [{ "id": "normal", "title": "Normal", "request": "samples/panel.json" }]
10
+ }
11
+ }
@@ -0,0 +1 @@
1
+ {"schemaVersion":1,"requestId":"bundle-panel","instanceId":"bundle-panel","revision":1,"contribution":"panel","state":"complete","content":{"contribution":"panel","id":"analysis-summary","data":{}},"context":{"locale":"en-US","theme":{"mode":"light","tokens":{"background":"#fff","foreground":"#111","muted":"#eee","mutedForeground":"#666","border":"#ddd","primary":"#06c","danger":"#c00"}},"viewport":{"width":1,"height":1},"capabilities":[],"correlationId":"bundle-panel"}}
@@ -0,0 +1 @@
1
+ export const Widget = { render() {} };
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "Minimal Simulation Result",
3
+ "widgetConfig": {
4
+ "schemaVersion": 1,
5
+ "hostApiVersion": 1,
6
+ "widgetSdkVersion": "0.0.1",
7
+ "entry": "entry.js",
8
+ "contribution": { "type": "tool-result", "toolName": "simulation.run" },
9
+ "samples": [{ "id": "normal", "title": "Normal", "request": "samples/tool-result.json" }]
10
+ }
11
+ }
@@ -0,0 +1 @@
1
+ {"schemaVersion":1,"requestId":"bundle-tool","instanceId":"bundle-tool","revision":1,"contribution":"tool-result","state":"complete","content":{"contribution":"tool-result","tool":{"name":"simulation.run","callId":"call","status":"succeeded"},"input":{},"result":{}},"context":{"locale":"en-US","theme":{"mode":"light","tokens":{"background":"#fff","foreground":"#111","muted":"#eee","mutedForeground":"#666","border":"#ddd","primary":"#06c","danger":"#c00"}},"viewport":{"width":1,"height":1},"capabilities":[],"correlationId":"bundle-tool"}}
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "files.write",
3
+ "limits": {
4
+ "bytesPerRequest": 1048576,
5
+ "bytesPerRun": 4194304,
6
+ "callsPerMinute": 30
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ {"ok":true,"data":{"items":[{"id":"file-001","kind":"file","name":"result.txt"}],"nextCursor":null}}
@@ -0,0 +1,11 @@
1
+ {
2
+ "ok": true,
3
+ "data": {
4
+ "id": "file-001",
5
+ "kind": "file",
6
+ "name": "structure.cif",
7
+ "extension": "cif",
8
+ "mimeType": "chemical/x-cif",
9
+ "size": 128
10
+ }
11
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "ok": false,
3
+ "reason": "mutation-conflict",
4
+ "message": "Host could not confirm this file operation",
5
+ "retryable": false
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "ok": false,
3
+ "reason": "permission-denied",
4
+ "message": "Host denied this file operation",
5
+ "retryable": false
6
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "ok": true,
3
+ "data": {
4
+ "content": "simulation complete",
5
+ "encoding": "utf8",
6
+ "revision": "rev-text-1"
7
+ }
8
+ }