@dxos/plugin-chess 0.8.4-main.70d3990 → 0.8.4-main.74a063c4e0

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 (223) hide show
  1. package/dist/lib/browser/blueprints/index.mjs +14 -0
  2. package/dist/lib/browser/{chunk-CCF24VRU.mjs → chunk-2TJN26DN.mjs} +18 -34
  3. package/dist/lib/browser/chunk-2TJN26DN.mjs.map +7 -0
  4. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  5. package/dist/lib/browser/chunk-MC7L6JNC.mjs +36 -0
  6. package/dist/lib/browser/chunk-MC7L6JNC.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-SBRUTOHG.mjs +28 -0
  8. package/dist/lib/browser/chunk-SBRUTOHG.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-XAJZK6Z2.mjs +110 -0
  10. package/dist/lib/browser/chunk-XAJZK6Z2.mjs.map +7 -0
  11. package/dist/lib/browser/cli/index.mjs +34 -0
  12. package/dist/lib/browser/cli/index.mjs.map +7 -0
  13. package/dist/lib/browser/create-AJHN4QT4.mjs +24 -0
  14. package/dist/lib/browser/create-AJHN4QT4.mjs.map +7 -0
  15. package/dist/lib/browser/index.mjs +364 -99
  16. package/dist/lib/browser/index.mjs.map +4 -4
  17. package/dist/lib/browser/meta.json +1 -1
  18. package/dist/lib/browser/move-CN7BGBOR.mjs +36 -0
  19. package/dist/lib/browser/move-CN7BGBOR.mjs.map +7 -0
  20. package/dist/lib/browser/operations/index.mjs +19 -0
  21. package/dist/lib/browser/operations/index.mjs.map +7 -0
  22. package/dist/lib/browser/play-YRKSZF5U.mjs +45 -0
  23. package/dist/lib/browser/play-YRKSZF5U.mjs.map +7 -0
  24. package/dist/lib/browser/print-EW7LPW4D.mjs +30 -0
  25. package/dist/lib/browser/print-EW7LPW4D.mjs.map +7 -0
  26. package/dist/lib/browser/types/index.mjs +3 -5
  27. package/dist/lib/node-esm/blueprints/index.mjs +15 -0
  28. package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
  29. package/dist/lib/node-esm/chunk-4HZWCKMR.mjs +38 -0
  30. package/dist/lib/node-esm/chunk-4HZWCKMR.mjs.map +7 -0
  31. package/dist/lib/node-esm/chunk-7W2LXAM5.mjs +29 -0
  32. package/dist/lib/node-esm/chunk-7W2LXAM5.mjs.map +7 -0
  33. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
  34. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
  35. package/dist/lib/node-esm/chunk-NYU5JVXP.mjs +111 -0
  36. package/dist/lib/node-esm/chunk-NYU5JVXP.mjs.map +7 -0
  37. package/dist/lib/node-esm/{chunk-QKXLEJNZ.mjs → chunk-OIRJVY2R.mjs} +18 -34
  38. package/dist/lib/node-esm/chunk-OIRJVY2R.mjs.map +7 -0
  39. package/dist/lib/node-esm/cli/index.mjs +35 -0
  40. package/dist/lib/node-esm/cli/index.mjs.map +7 -0
  41. package/dist/lib/node-esm/create-QSETDT4N.mjs +25 -0
  42. package/dist/lib/node-esm/create-QSETDT4N.mjs.map +7 -0
  43. package/dist/lib/node-esm/index.mjs +364 -99
  44. package/dist/lib/node-esm/index.mjs.map +4 -4
  45. package/dist/lib/node-esm/meta.json +1 -1
  46. package/dist/lib/node-esm/move-OTEYBHVI.mjs +37 -0
  47. package/dist/lib/node-esm/move-OTEYBHVI.mjs.map +7 -0
  48. package/dist/lib/node-esm/operations/index.mjs +20 -0
  49. package/dist/lib/node-esm/operations/index.mjs.map +7 -0
  50. package/dist/lib/node-esm/play-ZLDAXADK.mjs +46 -0
  51. package/dist/lib/node-esm/play-ZLDAXADK.mjs.map +7 -0
  52. package/dist/lib/node-esm/print-UJHXAXMS.mjs +31 -0
  53. package/dist/lib/node-esm/print-UJHXAXMS.mjs.map +7 -0
  54. package/dist/lib/node-esm/types/index.mjs +3 -5
  55. package/dist/types/src/ChessPlugin.d.ts +2 -1
  56. package/dist/types/src/ChessPlugin.d.ts.map +1 -1
  57. package/dist/types/src/blueprints/chess-blueprint.d.ts +4 -0
  58. package/dist/types/src/blueprints/chess-blueprint.d.ts.map +1 -0
  59. package/dist/types/src/blueprints/index.d.ts +3 -0
  60. package/dist/types/src/blueprints/index.d.ts.map +1 -0
  61. package/dist/types/src/capabilities/artifact-definition.d.ts +3 -2
  62. package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -1
  63. package/dist/types/src/capabilities/blueprint-definition.d.ts +5 -5
  64. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
  65. package/dist/types/src/capabilities/index.d.ts +5 -4
  66. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  67. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  68. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  69. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  70. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  71. package/dist/types/src/cli/index.d.ts +2 -0
  72. package/dist/types/src/cli/index.d.ts.map +1 -0
  73. package/dist/types/src/cli/plugin.d.ts +3 -0
  74. package/dist/types/src/cli/plugin.d.ts.map +1 -0
  75. package/dist/types/src/components/{Chessboard.d.ts → Chessboard/Chessboard.d.ts} +4 -8
  76. package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +1 -0
  77. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +48 -0
  78. package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +1 -0
  79. package/dist/types/src/components/{Info.d.ts → Chessboard/Info.d.ts} +1 -1
  80. package/dist/types/src/components/Chessboard/Info.d.ts.map +1 -0
  81. package/dist/types/src/components/Chessboard/index.d.ts +2 -0
  82. package/dist/types/src/components/Chessboard/index.d.ts.map +1 -0
  83. package/dist/types/src/components/Chessboard/types.d.ts +8 -0
  84. package/dist/types/src/components/Chessboard/types.d.ts.map +1 -0
  85. package/dist/types/src/components/index.d.ts +0 -1
  86. package/dist/types/src/components/index.d.ts.map +1 -1
  87. package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts +6 -0
  88. package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts.map +1 -0
  89. package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts +47 -0
  90. package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts.map +1 -0
  91. package/dist/types/src/containers/ChessArticle/index.d.ts +2 -0
  92. package/dist/types/src/containers/ChessArticle/index.d.ts.map +1 -0
  93. package/dist/types/src/containers/ChessCard/ChessCard.d.ts +6 -0
  94. package/dist/types/src/containers/ChessCard/ChessCard.d.ts.map +1 -0
  95. package/dist/types/src/{components/Card.stories.d.ts → containers/ChessCard/ChessCard.stories.d.ts} +2 -9
  96. package/dist/types/src/containers/ChessCard/ChessCard.stories.d.ts.map +1 -0
  97. package/dist/types/src/containers/ChessCard/index.d.ts +2 -0
  98. package/dist/types/src/containers/ChessCard/index.d.ts.map +1 -0
  99. package/dist/types/src/containers/index.d.ts +4 -0
  100. package/dist/types/src/containers/index.d.ts.map +1 -0
  101. package/dist/types/src/index.d.ts +2 -3
  102. package/dist/types/src/index.d.ts.map +1 -1
  103. package/dist/types/src/meta.d.ts +2 -2
  104. package/dist/types/src/meta.d.ts.map +1 -1
  105. package/dist/types/src/operations/create.d.ts +5 -0
  106. package/dist/types/src/operations/create.d.ts.map +1 -0
  107. package/dist/types/src/operations/definitions.d.ts +51 -0
  108. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  109. package/dist/types/src/operations/index.d.ts +4 -0
  110. package/dist/types/src/operations/index.d.ts.map +1 -0
  111. package/dist/types/src/operations/move.d.ts +5 -0
  112. package/dist/types/src/operations/move.d.ts.map +1 -0
  113. package/dist/types/src/operations/play.d.ts +5 -0
  114. package/dist/types/src/operations/play.d.ts.map +1 -0
  115. package/dist/types/src/operations/print.d.ts +5 -0
  116. package/dist/types/src/operations/print.d.ts.map +1 -0
  117. package/dist/types/src/translations.d.ts +21 -20
  118. package/dist/types/src/translations.d.ts.map +1 -1
  119. package/dist/types/src/types/Chess.d.ts +17 -17
  120. package/dist/types/src/types/Chess.d.ts.map +1 -1
  121. package/dist/types/src/types/index.d.ts +0 -1
  122. package/dist/types/src/types/index.d.ts.map +1 -1
  123. package/dist/types/tsconfig.tsbuildinfo +1 -1
  124. package/package.json +74 -43
  125. package/src/ChessPlugin.tsx +41 -47
  126. package/src/blueprints/chess-blueprint.ts +35 -0
  127. package/src/blueprints/index.ts +6 -0
  128. package/src/capabilities/artifact-definition.ts +98 -92
  129. package/src/capabilities/blueprint-definition.ts +9 -28
  130. package/src/capabilities/index.ts +8 -6
  131. package/src/capabilities/operation-handler.ts +14 -0
  132. package/src/capabilities/react-surface.tsx +27 -15
  133. package/src/cli/index.ts +5 -0
  134. package/src/cli/plugin.ts +37 -0
  135. package/src/components/Chessboard/Chessboard.stories.tsx +94 -0
  136. package/src/components/{Chessboard.tsx → Chessboard/Chessboard.tsx} +32 -29
  137. package/src/components/{Info.tsx → Chessboard/Info.tsx} +41 -24
  138. package/src/components/Chessboard/index.ts +5 -0
  139. package/src/components/Chessboard/types.ts +18 -0
  140. package/src/components/index.ts +1 -5
  141. package/src/containers/ChessArticle/ChessArticle.stories.tsx +53 -0
  142. package/src/containers/ChessArticle/ChessArticle.tsx +73 -0
  143. package/src/containers/ChessArticle/index.ts +5 -0
  144. package/src/containers/ChessCard/ChessCard.stories.tsx +42 -0
  145. package/src/containers/ChessCard/ChessCard.tsx +22 -0
  146. package/src/containers/ChessCard/index.ts +5 -0
  147. package/src/containers/index.ts +8 -0
  148. package/src/index.ts +2 -3
  149. package/src/meta.ts +3 -3
  150. package/src/operations/create.ts +21 -0
  151. package/src/operations/definitions.ts +109 -0
  152. package/src/operations/index.ts +16 -0
  153. package/src/operations/move.ts +36 -0
  154. package/src/operations/play.ts +45 -0
  155. package/src/operations/print.ts +28 -0
  156. package/src/translations.ts +21 -20
  157. package/src/types/Chess.ts +11 -7
  158. package/src/types/index.ts +0 -1
  159. package/dist/lib/browser/ChessboardContainer-5YXEM4VR.mjs +0 -96
  160. package/dist/lib/browser/ChessboardContainer-5YXEM4VR.mjs.map +0 -7
  161. package/dist/lib/browser/blueprint-definition-Y5Y4YGNL.mjs +0 -11
  162. package/dist/lib/browser/chunk-3LPE2B5J.mjs +0 -169
  163. package/dist/lib/browser/chunk-3LPE2B5J.mjs.map +0 -7
  164. package/dist/lib/browser/chunk-5DOZV3PW.mjs +0 -294
  165. package/dist/lib/browser/chunk-5DOZV3PW.mjs.map +0 -7
  166. package/dist/lib/browser/chunk-CCF24VRU.mjs.map +0 -7
  167. package/dist/lib/browser/chunk-DUO4WTAM.mjs +0 -28
  168. package/dist/lib/browser/chunk-DUO4WTAM.mjs.map +0 -7
  169. package/dist/lib/browser/chunk-Q5TZCIH7.mjs +0 -8
  170. package/dist/lib/browser/chunk-Q5TZCIH7.mjs.map +0 -7
  171. package/dist/lib/browser/intent-resolver-KPGHK5JU.mjs +0 -25
  172. package/dist/lib/browser/intent-resolver-KPGHK5JU.mjs.map +0 -7
  173. package/dist/lib/browser/react-surface-3YST34QI.mjs +0 -38
  174. package/dist/lib/browser/react-surface-3YST34QI.mjs.map +0 -7
  175. package/dist/lib/node-esm/ChessboardContainer-7OQ6TOKB.mjs +0 -97
  176. package/dist/lib/node-esm/ChessboardContainer-7OQ6TOKB.mjs.map +0 -7
  177. package/dist/lib/node-esm/blueprint-definition-GR6OLMB6.mjs +0 -12
  178. package/dist/lib/node-esm/chunk-F3HFLDV5.mjs +0 -170
  179. package/dist/lib/node-esm/chunk-F3HFLDV5.mjs.map +0 -7
  180. package/dist/lib/node-esm/chunk-F4C2HVZL.mjs +0 -295
  181. package/dist/lib/node-esm/chunk-F4C2HVZL.mjs.map +0 -7
  182. package/dist/lib/node-esm/chunk-KNOOJFIR.mjs +0 -29
  183. package/dist/lib/node-esm/chunk-KNOOJFIR.mjs.map +0 -7
  184. package/dist/lib/node-esm/chunk-QKXLEJNZ.mjs.map +0 -7
  185. package/dist/lib/node-esm/chunk-VVXTAVIS.mjs +0 -10
  186. package/dist/lib/node-esm/chunk-VVXTAVIS.mjs.map +0 -7
  187. package/dist/lib/node-esm/intent-resolver-ZAELGF7I.mjs +0 -26
  188. package/dist/lib/node-esm/intent-resolver-ZAELGF7I.mjs.map +0 -7
  189. package/dist/lib/node-esm/react-surface-KV2KBSIU.mjs +0 -39
  190. package/dist/lib/node-esm/react-surface-KV2KBSIU.mjs.map +0 -7
  191. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  192. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  193. package/dist/types/src/components/Card.stories.d.ts.map +0 -1
  194. package/dist/types/src/components/Chessboard.d.ts.map +0 -1
  195. package/dist/types/src/components/Chessboard.stories.d.ts +0 -46
  196. package/dist/types/src/components/Chessboard.stories.d.ts.map +0 -1
  197. package/dist/types/src/components/ChessboardArticle.d.ts +0 -7
  198. package/dist/types/src/components/ChessboardArticle.d.ts.map +0 -1
  199. package/dist/types/src/components/ChessboardContainer.d.ts +0 -9
  200. package/dist/types/src/components/ChessboardContainer.d.ts.map +0 -1
  201. package/dist/types/src/components/Info.d.ts.map +0 -1
  202. package/dist/types/src/functions/create.d.ts +0 -14
  203. package/dist/types/src/functions/create.d.ts.map +0 -1
  204. package/dist/types/src/functions/index.d.ts +0 -4
  205. package/dist/types/src/functions/index.d.ts.map +0 -1
  206. package/dist/types/src/functions/move.d.ts +0 -8
  207. package/dist/types/src/functions/move.d.ts.map +0 -1
  208. package/dist/types/src/functions/play.d.ts +0 -9
  209. package/dist/types/src/functions/play.d.ts.map +0 -1
  210. package/dist/types/src/types/ChessAction.d.ts +0 -24
  211. package/dist/types/src/types/ChessAction.d.ts.map +0 -1
  212. package/src/capabilities/intent-resolver.ts +0 -22
  213. package/src/components/Card.stories.tsx +0 -66
  214. package/src/components/Chessboard.stories.tsx +0 -49
  215. package/src/components/ChessboardArticle.tsx +0 -68
  216. package/src/components/ChessboardContainer.tsx +0 -44
  217. package/src/functions/create.ts +0 -32
  218. package/src/functions/index.ts +0 -7
  219. package/src/functions/move.ts +0 -45
  220. package/src/functions/play.ts +0 -55
  221. package/src/types/ChessAction.ts +0 -19
  222. /package/dist/lib/browser/{blueprint-definition-Y5Y4YGNL.mjs.map → blueprints/index.mjs.map} +0 -0
  223. /package/dist/lib/{node-esm/blueprint-definition-GR6OLMB6.mjs.map → browser/chunk-J5LGTIGS.mjs.map} +0 -0
package/package.json CHANGED
@@ -1,13 +1,26 @@
1
1
  {
2
2
  "name": "@dxos/plugin-chess",
3
- "version": "0.8.4-main.70d3990",
3
+ "version": "0.8.4-main.74a063c4e0",
4
4
  "description": "Chess for new plugin",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/dxos/dxos"
10
+ },
7
11
  "license": "MIT",
8
12
  "author": "DXOS.org",
9
13
  "sideEffects": true,
10
14
  "type": "module",
15
+ "imports": {
16
+ "#blueprints": "./src/blueprints/index.ts",
17
+ "#capabilities": "./src/capabilities/index.ts",
18
+ "#components": "./src/components/index.ts",
19
+ "#containers": "./src/containers/index.ts",
20
+ "#meta": "./src/meta.ts",
21
+ "#operations": "./src/operations/index.ts",
22
+ "#types": "./src/types/index.ts"
23
+ },
11
24
  "exports": {
12
25
  ".": {
13
26
  "source": "./src/index.ts",
@@ -15,17 +28,29 @@
15
28
  "browser": "./dist/lib/browser/index.mjs",
16
29
  "node": "./dist/lib/node-esm/index.mjs"
17
30
  },
31
+ "./blueprints": {
32
+ "source": "./src/blueprints/index.ts",
33
+ "types": "./dist/types/src/blueprints/index.d.ts",
34
+ "browser": "./dist/lib/browser/blueprints/index.mjs",
35
+ "node": "./dist/lib/node-esm/blueprints/index.mjs"
36
+ },
37
+ "./cli": {
38
+ "source": "./src/cli/index.ts",
39
+ "types": "./dist/types/src/cli/index.d.ts",
40
+ "browser": "./dist/lib/browser/cli/index.mjs",
41
+ "node": "./dist/lib/node-esm/cli/index.mjs"
42
+ },
43
+ "./operations": {
44
+ "source": "./src/operations/index.ts",
45
+ "types": "./dist/types/src/operations/index.d.ts",
46
+ "browser": "./dist/lib/browser/operations/index.mjs",
47
+ "node": "./dist/lib/node-esm/operations/index.mjs"
48
+ },
18
49
  "./types": {
19
50
  "source": "./src/types/index.ts",
20
51
  "types": "./dist/types/src/types/index.d.ts",
21
52
  "browser": "./dist/lib/browser/types/index.mjs",
22
53
  "node": "./dist/lib/node-esm/types/index.mjs"
23
- },
24
- "./functions": {
25
- "source": "./src/functions/index.ts",
26
- "types": "./dist/types/src/functions/index.d.ts",
27
- "browser": "./dist/lib/browser/functions/index.mjs",
28
- "node": "./dist/lib/node-esm/functions/index.mjs"
29
54
  }
30
55
  },
31
56
  "types": "dist/types/src/index.d.ts",
@@ -41,47 +66,53 @@
41
66
  "src"
42
67
  ],
43
68
  "dependencies": {
44
- "@preact-signals/safe-react": "^0.9.0",
45
- "@preact/signals-core": "^1.12.1",
69
+ "@automerge/automerge": "3.2.3",
70
+ "@effect-atom/atom-react": "^0.5.0",
46
71
  "chess.js": "^1.0.0",
47
- "effect": "3.18.3",
48
- "@dxos/app-framework": "0.8.4-main.70d3990",
49
- "@dxos/ai": "0.8.4-main.70d3990",
50
- "@dxos/assistant": "0.8.4-main.70d3990",
51
- "@dxos/async": "0.8.4-main.70d3990",
52
- "@dxos/blueprints": "0.8.4-main.70d3990",
53
- "@dxos/display-name": "0.8.4-main.70d3990",
54
- "@dxos/echo": "0.8.4-main.70d3990",
55
- "@dxos/invariant": "0.8.4-main.70d3990",
56
- "@dxos/live-object": "0.8.4-main.70d3990",
57
- "@dxos/log": "0.8.4-main.70d3990",
58
- "@dxos/plugin-client": "0.8.4-main.70d3990",
59
- "@dxos/plugin-graph": "0.8.4-main.70d3990",
60
- "@dxos/plugin-space": "0.8.4-main.70d3990",
61
- "@dxos/react-client": "0.8.4-main.70d3990",
62
- "@dxos/react-ui-gameboard": "0.8.4-main.70d3990",
63
- "@dxos/react-ui-sfx": "0.8.4-main.70d3990",
64
- "@dxos/react-ui-stack": "0.8.4-main.70d3990",
65
- "@dxos/schema": "0.8.4-main.70d3990",
66
- "@dxos/util": "0.8.4-main.70d3990",
67
- "@dxos/functions": "0.8.4-main.70d3990"
72
+ "effect": "3.20.0",
73
+ "@dxos/ai": "0.8.4-main.74a063c4e0",
74
+ "@dxos/assistant": "0.8.4-main.74a063c4e0",
75
+ "@dxos/app-toolkit": "0.8.4-main.74a063c4e0",
76
+ "@dxos/async": "0.8.4-main.74a063c4e0",
77
+ "@dxos/blueprints": "0.8.4-main.74a063c4e0",
78
+ "@dxos/display-name": "0.8.4-main.74a063c4e0",
79
+ "@dxos/echo": "0.8.4-main.74a063c4e0",
80
+ "@dxos/echo-db": "0.8.4-main.74a063c4e0",
81
+ "@dxos/functions": "0.8.4-main.74a063c4e0",
82
+ "@dxos/echo-react": "0.8.4-main.74a063c4e0",
83
+ "@dxos/invariant": "0.8.4-main.74a063c4e0",
84
+ "@dxos/log": "0.8.4-main.74a063c4e0",
85
+ "@dxos/plugin-client": "0.8.4-main.74a063c4e0",
86
+ "@dxos/plugin-graph": "0.8.4-main.74a063c4e0",
87
+ "@dxos/plugin-markdown": "0.8.4-main.74a063c4e0",
88
+ "@dxos/plugin-space": "0.8.4-main.74a063c4e0",
89
+ "@dxos/react-ui-gameboard": "0.8.4-main.74a063c4e0",
90
+ "@dxos/operation": "0.8.4-main.74a063c4e0",
91
+ "@dxos/app-framework": "0.8.4-main.74a063c4e0",
92
+ "@dxos/react-client": "0.8.4-main.74a063c4e0",
93
+ "@dxos/react-ui-sfx": "0.8.4-main.74a063c4e0",
94
+ "@dxos/react-ui-mosaic": "0.8.4-main.74a063c4e0",
95
+ "@dxos/react-ui-stack": "0.8.4-main.74a063c4e0",
96
+ "@dxos/schema": "0.8.4-main.74a063c4e0",
97
+ "@dxos/types": "0.8.4-main.74a063c4e0",
98
+ "@dxos/util": "0.8.4-main.74a063c4e0"
68
99
  },
69
100
  "devDependencies": {
70
- "@types/react": "~19.2.2",
71
- "@types/react-dom": "~19.2.2",
72
- "react": "~19.2.0",
73
- "react-dom": "~19.2.0",
74
- "vite": "7.1.9",
75
- "@dxos/plugin-theme": "0.8.4-main.70d3990",
76
- "@dxos/react-ui-theme": "0.8.4-main.70d3990",
77
- "@dxos/storybook-utils": "0.8.4-main.70d3990",
78
- "@dxos/react-ui": "0.8.4-main.70d3990"
101
+ "@types/react": "~19.2.7",
102
+ "@types/react-dom": "~19.2.3",
103
+ "react": "~19.2.3",
104
+ "react-dom": "~19.2.3",
105
+ "vite": "^7.1.11",
106
+ "@dxos/storybook-utils": "0.8.4-main.74a063c4e0",
107
+ "@dxos/plugin-theme": "0.8.4-main.74a063c4e0",
108
+ "@dxos/react-ui": "0.8.4-main.74a063c4e0",
109
+ "@dxos/ui-theme": "0.8.4-main.74a063c4e0"
79
110
  },
80
111
  "peerDependencies": {
81
- "react": "^19.0.0",
82
- "react-dom": "^19.0.0",
83
- "@dxos/react-ui": "0.8.4-main.70d3990",
84
- "@dxos/react-ui-theme": "0.8.4-main.70d3990"
112
+ "react": "~19.2.3",
113
+ "react-dom": "~19.2.3",
114
+ "@dxos/react-ui": "0.8.4-main.74a063c4e0",
115
+ "@dxos/ui-theme": "0.8.4-main.74a063c4e0"
85
116
  },
86
117
  "publishConfig": {
87
118
  "access": "public"
@@ -2,54 +2,48 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, Events, contributes, createIntent, defineModule, definePlugin } from '@dxos/app-framework';
6
- import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
7
- import { type CreateObjectIntent } from '@dxos/plugin-space/types';
5
+ import * as Effect from 'effect/Effect';
6
+ import * as Option from 'effect/Option';
7
+
8
+ import { Plugin } from '@dxos/app-framework';
9
+ import { AppPlugin } from '@dxos/app-toolkit';
10
+ import { Annotation } from '@dxos/echo';
11
+ import { Operation } from '@dxos/operation';
12
+ import { SpaceOperation } from '@dxos/plugin-space/operations';
13
+ import { type CreateObject } from '@dxos/plugin-space/types';
14
+
15
+ import { ChessBlueprint } from '#blueprints';
16
+ import { BlueprintDefinition, OperationHandler, ReactSurface } from '#capabilities';
17
+ import { meta } from '#meta';
18
+ import { Chess } from '#types';
8
19
 
9
- import { BlueprintDefinition, CHESS_BLUEPRINT_KEY, IntentResolver, ReactSurface } from './capabilities';
10
- import { meta } from './meta';
11
20
  import { translations } from './translations';
12
- import { Chess, ChessAction } from './types';
13
21
 
14
- export const ChessPlugin = definePlugin(meta, () => [
15
- defineModule({
16
- id: `${meta.id}/module/translations`,
17
- activatesOn: Events.SetupTranslations,
18
- activate: () => contributes(Capabilities.Translations, translations),
19
- }),
20
- defineModule({
21
- id: `${meta.id}/module/metadata`,
22
- activatesOn: Events.SetupMetadata,
23
- activate: () =>
24
- contributes(Capabilities.Metadata, {
25
- id: Chess.Game.typename,
26
- metadata: {
27
- icon: 'ph--shield-chevron--regular',
28
- iconHue: 'amber',
29
- blueprints: [CHESS_BLUEPRINT_KEY],
30
- createObjectIntent: (() => createIntent(ChessAction.Create)) satisfies CreateObjectIntent,
31
- addToCollectionOnCreate: true,
32
- },
33
- }),
34
- }),
35
- defineModule({
36
- id: `${meta.id}/module/schema`,
37
- activatesOn: ClientEvents.SetupSchema,
38
- activate: () => contributes(ClientCapabilities.Schema, [Chess.Game]),
39
- }),
40
- defineModule({
41
- id: `${meta.id}/module/react-surface`,
42
- activatesOn: Events.SetupReactSurface,
43
- activate: ReactSurface,
44
- }),
45
- defineModule({
46
- id: `${meta.id}/module/intent-resolver`,
47
- activatesOn: Events.SetupIntentResolver,
48
- activate: IntentResolver,
49
- }),
50
- defineModule({
51
- id: `${meta.id}/module/blueprint`,
52
- activatesOn: Events.SetupArtifactDefinition,
53
- activate: BlueprintDefinition,
22
+ export const ChessPlugin = Plugin.define(meta).pipe(
23
+ AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
24
+ AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
25
+ AppPlugin.addMetadataModule({
26
+ metadata: {
27
+ id: Chess.Game.typename,
28
+ metadata: {
29
+ icon: Annotation.IconAnnotation.get(Chess.Game).pipe(Option.getOrThrow).icon,
30
+ iconHue: Annotation.IconAnnotation.get(Chess.Game).pipe(Option.getOrThrow).hue ?? 'white',
31
+ blueprints: [ChessBlueprint.key],
32
+ createObject: ((props, options) =>
33
+ Effect.gen(function* () {
34
+ const object = Chess.make(props);
35
+ return yield* Operation.invoke(SpaceOperation.AddObject, {
36
+ object,
37
+ target: options.target,
38
+ hidden: true,
39
+ targetNodeId: options.targetNodeId,
40
+ });
41
+ })) satisfies CreateObject,
42
+ },
43
+ },
54
44
  }),
55
- ]);
45
+ AppPlugin.addSchemaModule({ schema: [Chess.Game] }),
46
+ AppPlugin.addSurfaceModule({ activate: ReactSurface }),
47
+ AppPlugin.addTranslationsModule({ translations }),
48
+ Plugin.make,
49
+ );
@@ -0,0 +1,35 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type AppCapabilities } from '@dxos/app-toolkit';
6
+ import { Blueprint, Template } from '@dxos/blueprints';
7
+ import { trim } from '@dxos/util';
8
+
9
+ import { Create, Move, Play, Print } from '#operations';
10
+
11
+ const BLUEPRINT_KEY = 'org.dxos.blueprint.chess';
12
+
13
+ const operations = [Create, Move, Play, Print];
14
+
15
+ const make = () =>
16
+ Blueprint.make({
17
+ key: BLUEPRINT_KEY,
18
+ name: 'Chess',
19
+ tools: Blueprint.toolDefinitions({ operations }),
20
+ instructions: Template.make({
21
+ source: trim`
22
+ You are an expert chess player.
23
+ To analyze a game you can access the "pgn" property by loading the context object that represents the current game.
24
+ You could suggest a good next move or offer to play a move.
25
+ Don't actually make a move unless you are asked to.
26
+ `,
27
+ }),
28
+ });
29
+
30
+ const blueprint: AppCapabilities.BlueprintDefinition = {
31
+ key: BLUEPRINT_KEY,
32
+ make,
33
+ };
34
+
35
+ export default blueprint;
@@ -0,0 +1,6 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ export { default as ChessBlueprint } from './chess-blueprint';
6
+ export * as ChessFunctions from '../operations';
@@ -6,21 +6,21 @@
6
6
  // @ts-nocheck
7
7
 
8
8
  import { Chess as ChessJS } from 'chess.js';
9
- import * as Function from 'effect/Function';
9
+ import * as Effect from 'effect/Effect';
10
10
  import * as Schema from 'effect/Schema';
11
11
 
12
12
  import { ToolResult, createTool } from '@dxos/ai';
13
- import { Capabilities, type PromiseIntentDispatcher, chain, contributes, createIntent } from '@dxos/app-framework';
13
+ import { Capabilities, Capability, type PromiseIntentDispatcher } from '@dxos/app-framework';
14
14
  import { ArtifactId, VersionPin, createArtifactElement } from '@dxos/assistant';
15
15
  import { defineArtifact } from '@dxos/blueprints';
16
16
  import { Obj } from '@dxos/echo';
17
17
  import { invariant } from '@dxos/invariant';
18
- import { SpaceAction } from '@dxos/plugin-space/types';
18
+ import { SpaceOperation } from '@dxos/plugin-space/operations';
19
19
  import { Filter, type Space } from '@dxos/react-client/echo';
20
20
  import { trim } from '@dxos/util';
21
21
 
22
- import { meta } from '../meta';
23
- import { Chess, ChessAction } from '../types';
22
+ import { meta } from '#meta';
23
+ import { Chess } from '#types';
24
24
 
25
25
  // TODO(burdon): Factor out.
26
26
  declare global {
@@ -30,100 +30,106 @@ declare global {
30
30
  }
31
31
  }
32
32
 
33
- export default () => {
34
- const definition = defineArtifact({
35
- id: `artifact:${meta.id}`,
36
- name: meta.name,
37
- description: 'Provides a simple chess engine.',
38
- instructions: trim`
33
+ export default Capability.makeModule(() =>
34
+ Effect.sync(() => {
35
+ const definition = defineArtifact({
36
+ id: `artifact:${meta.id}`,
37
+ name: meta.name,
38
+ description: 'Provides a simple chess engine.',
39
+ instructions: trim`
39
40
  - If the user's message relates to a chess game, you must return the chess game inside the artifact tag as a valid FEN string with no additional text.
40
41
  - Always inspect the chess game at the start of every prompt realting to a chess game, as it might have changed since the interaction.
41
42
  `,
42
- schema: Chess.Game,
43
- tools: [
44
- createTool(meta.id, {
45
- name: 'create',
46
- description: 'Create a new chess game. Returns the artifact definition for the game.',
47
- caption: 'Creating chess game...',
48
- schema: Schema.Struct({
49
- pgn: Schema.String.annotations({ description: 'The state of the chess game in the PGN format.' }),
50
- }),
51
- execute: async ({ pgn }, { extensions }) => {
52
- invariant(extensions?.space, 'No space');
53
- invariant(extensions?.dispatch, 'No intent dispatcher');
54
- const intent = Function.pipe(
55
- createIntent(ChessAction.Create, { pgn }),
56
- chain(SpaceAction.AddObject, { target: extensions.space }),
57
- );
58
- const { data, error } = await extensions.dispatch(intent);
59
- if (!data || error) {
60
- return ToolResult.Error(error?.message ?? 'Failed to create chess game');
61
- }
43
+ schema: Chess.Game,
44
+ tools: [
45
+ createTool(meta.id, {
46
+ name: 'create',
47
+ description: 'Create a new chess game. Returns the artifact definition for the game.',
48
+ caption: 'Creating chess game...',
49
+ schema: Schema.Struct({
50
+ pgn: Schema.String.annotations({ description: 'The state of the chess game in the PGN format.' }),
51
+ }),
52
+ execute: async ({ pgn }, { extensions }) => {
53
+ invariant(extensions?.space, 'No space');
54
+ invariant(extensions?.invoke, 'No operation invoker');
62
55
 
63
- return ToolResult.Success(createArtifactElement(data.id), [
64
- VersionPin.createBlock(VersionPin.fromObject(data.object)),
65
- ]);
66
- },
67
- }),
68
- createTool(meta.id, {
69
- name: 'list',
70
- description: 'Query all active chess games.',
71
- caption: 'Getting games...',
72
- schema: Schema.Struct({}),
73
- execute: async (_, { extensions }) => {
74
- invariant(extensions?.space, 'No space');
75
- const { objects: games } = await extensions.space.db.query(Filter.type(Chess.Game)).run();
76
- invariant(games.length > 0, 'No chess games found');
56
+ const game = Chess.make({ pgn });
77
57
 
78
- return ToolResult.Success(games);
79
- },
80
- }),
81
- createTool(meta.id, {
82
- name: 'inspect',
83
- description: 'Get the current state of the chess game.',
84
- caption: 'Inspecting game...',
85
- schema: Schema.Struct({ id: ArtifactId }),
86
- execute: async ({ id }, { extensions }) => {
87
- invariant(extensions?.space, 'No space');
88
- const game = await extensions.space.db
89
- .query(Filter.ids(ArtifactId.toDXN(id, extensions.space.id).toString()))
90
- .first();
91
- invariant(Obj.instanceOf(Chess.Game, game));
58
+ const { data, error } = await extensions.invoke(SpaceOperation.AddObject, {
59
+ target: extensions.space,
60
+ object: game,
61
+ });
62
+ if (error) {
63
+ return ToolResult.Error(error?.message ?? 'Failed to add chess game to space');
64
+ }
92
65
 
93
- return ToolResult.Success(game.pgn);
94
- },
95
- }),
96
- createTool(meta.id, {
97
- name: 'move',
98
- description: 'Make a move in the chess game.',
99
- caption: 'Making chess move...',
100
- schema: Schema.Struct({
101
- id: ArtifactId,
102
- move: Schema.String.annotations({
103
- description: 'The move to make in the chess game.',
104
- examples: ['e4', 'Bf3'],
105
- }),
66
+ return ToolResult.Success(createArtifactElement(game.id), [
67
+ VersionPin.createBlock(VersionPin.fromObject(game)),
68
+ ]);
69
+ },
106
70
  }),
107
- execute: async ({ id, move }, { extensions }) => {
108
- invariant(extensions?.space, 'No space');
109
- const game = await extensions.space.db
110
- .query(Filter.ids(ArtifactId.toDXN(id, extensions.space.id).toString()))
111
- .first();
112
- invariant(Obj.instanceOf(Chess.Game, game));
71
+ createTool(meta.id, {
72
+ name: 'list',
73
+ description: 'Query all active chess games.',
74
+ caption: 'Getting games...',
75
+ schema: Schema.Struct({}),
76
+ execute: async (_, { extensions }) => {
77
+ invariant(extensions?.space, 'No space');
78
+ const { objects: games } = await extensions.space.db.query(Filter.type(Chess.Game)).run();
79
+ invariant(games.length > 0, 'No chess games found');
113
80
 
114
- const chess = new ChessJS(game.pgn);
115
- try {
116
- chess.move(move);
117
- } catch (error: any) {
118
- return ToolResult.Error(error.message);
119
- }
81
+ return ToolResult.Success(games);
82
+ },
83
+ }),
84
+ createTool(meta.id, {
85
+ name: 'inspect',
86
+ description: 'Get the current state of the chess game.',
87
+ caption: 'Inspecting game...',
88
+ schema: Schema.Struct({ id: ArtifactId }),
89
+ execute: async ({ id }, { extensions }) => {
90
+ invariant(extensions?.space, 'No space');
91
+ const game = await extensions.space.db
92
+ .query(Filter.id(ArtifactId.toDXN(id, extensions.space.id).toString()))
93
+ .first();
94
+ invariant(Obj.instanceOf(Chess.Game, game));
120
95
 
121
- game.pgn = chess.pgn();
122
- return ToolResult.Success(game.pgn);
123
- },
124
- }),
125
- ],
126
- });
96
+ return ToolResult.Success(game.pgn);
97
+ },
98
+ }),
99
+ createTool(meta.id, {
100
+ name: 'move',
101
+ description: 'Make a move in the chess game.',
102
+ caption: 'Making chess move...',
103
+ schema: Schema.Struct({
104
+ id: ArtifactId,
105
+ move: Schema.String.annotations({
106
+ description: 'The move to make in the chess game.',
107
+ examples: ['e4', 'Bf3'],
108
+ }),
109
+ }),
110
+ execute: async ({ id, move }, { extensions }) => {
111
+ invariant(extensions?.space, 'No space');
112
+ const game = await extensions.space.db
113
+ .query(Filter.id(ArtifactId.toDXN(id, extensions.space.id).toString()))
114
+ .first();
115
+ invariant(Obj.instanceOf(Chess.Game, game));
116
+
117
+ const chess = new ChessJS(game.pgn);
118
+ try {
119
+ chess.move(move);
120
+ } catch (error: any) {
121
+ return ToolResult.Error(error.message);
122
+ }
123
+
124
+ Obj.change(game, (obj) => {
125
+ obj.pgn = chess.pgn();
126
+ });
127
+ return ToolResult.Success(game.pgn);
128
+ },
129
+ }),
130
+ ],
131
+ });
127
132
 
128
- return contributes(Capabilities.ArtifactDefinition, definition);
129
- };
133
+ return Capability.contributes(Capabilities.ArtifactDefinition, definition);
134
+ }),
135
+ );
@@ -2,35 +2,16 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, contributes } from '@dxos/app-framework';
6
- import { Blueprint, Template } from '@dxos/blueprints';
7
- import { type FunctionDefinition } from '@dxos/functions';
8
- import { trim } from '@dxos/util';
5
+ import * as Effect from 'effect/Effect';
9
6
 
10
- import { create, move, play } from '../functions';
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { AppCapabilities } from '@dxos/app-toolkit';
11
9
 
12
- const functions: FunctionDefinition[] = [create, move, play];
10
+ import { ChessBlueprint } from '#blueprints';
13
11
 
14
- export const CHESS_BLUEPRINT_KEY = 'dxos.org/blueprint/chess';
12
+ const blueprintDefinition = Capability.makeModule<
13
+ [],
14
+ Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]
15
+ >(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, ChessBlueprint)]));
15
16
 
16
- export default () => {
17
- return [
18
- contributes(Capabilities.Functions, functions),
19
- contributes(
20
- Capabilities.BlueprintDefinition,
21
- Blueprint.make({
22
- key: CHESS_BLUEPRINT_KEY,
23
- name: 'Chess',
24
- tools: Blueprint.toolDefinitions({ functions }),
25
- instructions: Template.make({
26
- source: trim`
27
- You are an expert chess player.
28
- To analyze a game you can access the "pgn" property by loading the context object that represents the current game.
29
- You could suggest a good next move or offer to play a move.
30
- Don't actually make a move unless you are asked to.
31
- `,
32
- }),
33
- }),
34
- ),
35
- ];
36
- };
17
+ export default blueprintDefinition;
@@ -2,10 +2,12 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from '@dxos/app-framework';
5
+ import { Capability } from '@dxos/app-framework';
6
+ import { OperationHandlerSet } from '@dxos/operation';
6
7
 
7
- export const BlueprintDefinition = lazy(() => import('./blueprint-definition'));
8
- export const IntentResolver = lazy(() => import('./intent-resolver'));
9
- export const ReactSurface = lazy(() => import('./react-surface'));
10
-
11
- export * from './blueprint-definition';
8
+ export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
9
+ export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
10
+ 'OperationHandler',
11
+ () => import('./operation-handler'),
12
+ );
13
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
@@ -0,0 +1,14 @@
1
+ // Copyright 2025 DXOS.org
2
+
3
+ import * as Effect from 'effect/Effect';
4
+
5
+ import { Capabilities, Capability } from '@dxos/app-framework';
6
+ import type { OperationHandlerSet } from '@dxos/operation';
7
+
8
+ import { ChessHandlers } from '#operations';
9
+
10
+ export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
11
+ Effect.fnUntraced(function* () {
12
+ return Capability.contributes(Capabilities.OperationHandler, ChessHandlers);
13
+ }),
14
+ );
@@ -2,22 +2,34 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import * as Effect from 'effect/Effect';
5
6
  import React from 'react';
6
7
 
7
- import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
8
- import { Obj } from '@dxos/echo';
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { Surface } from '@dxos/app-framework/ui';
10
+ import { AppSurface } from '@dxos/app-toolkit/ui';
9
11
 
10
- import { ChessboardContainer } from '../components';
11
- import { meta } from '../meta';
12
- import { Chess } from '../types';
12
+ import { ChessArticle, ChessCard } from '#containers';
13
+ import { Chess } from '#types';
13
14
 
14
- export default () =>
15
- contributes(Capabilities.ReactSurface, [
16
- createSurface({
17
- id: meta.id,
18
- role: ['article', 'section', 'card--intrinsic', 'card--extrinsic', 'card--popover', 'card--transclusion'],
19
- // TODO(burdon): Could this be standardized so that we don't require a subject property.
20
- filter: (data): data is { subject: Chess.Game } => Obj.instanceOf(Chess.Game, data.subject),
21
- component: ({ data, role }) => <ChessboardContainer game={data.subject} role={role} />,
22
- }),
23
- ]);
15
+ export default Capability.makeModule(() =>
16
+ Effect.succeed(
17
+ Capability.contributes(Capabilities.ReactSurface, [
18
+ Surface.create({
19
+ id: 'game',
20
+ // TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
21
+ role: ['article', 'section'],
22
+ filter: AppSurface.objectArticle(Chess.Game),
23
+ component: ({ data, role }) => (
24
+ <ChessArticle role={role} subject={data.subject} attendableId={data.attendableId} />
25
+ ),
26
+ }),
27
+ Surface.create({
28
+ id: 'game-card',
29
+ role: ['card--content'],
30
+ filter: AppSurface.objectCard(Chess.Game),
31
+ component: ({ data, role }) => <ChessCard role={role} subject={data.subject} />,
32
+ }),
33
+ ]),
34
+ ),
35
+ );