@dxos/plugin-chess 0.8.4-main.f5c0578 → 0.8.4-main.fcc0d83b33
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/lib/browser/blueprints/index.mjs +43 -0
- package/dist/lib/browser/blueprints/index.mjs.map +7 -0
- package/dist/lib/browser/chunk-2DFOUJBD.mjs +28 -0
- package/dist/lib/browser/chunk-2DFOUJBD.mjs.map +7 -0
- package/dist/lib/browser/chunk-IN3LZ2OO.mjs +62 -0
- package/dist/lib/browser/chunk-IN3LZ2OO.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-OBKYFOJA.mjs +110 -0
- package/dist/lib/browser/chunk-OBKYFOJA.mjs.map +7 -0
- package/dist/lib/browser/cli/index.mjs +34 -0
- package/dist/lib/browser/cli/index.mjs.map +7 -0
- package/dist/lib/browser/create-2ME3FNBX.mjs +24 -0
- package/dist/lib/browser/create-2ME3FNBX.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +330 -104
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/move-TTMIPD5J.mjs +36 -0
- package/dist/lib/browser/move-TTMIPD5J.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +19 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/play-GHXPV2T2.mjs +45 -0
- package/dist/lib/browser/play-GHXPV2T2.mjs.map +7 -0
- package/dist/lib/browser/print-RNAGAOM7.mjs +30 -0
- package/dist/lib/browser/print-RNAGAOM7.mjs.map +7 -0
- package/dist/lib/browser/translations.mjs +38 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +3 -5
- package/dist/lib/node-esm/blueprints/index.mjs +44 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-G2EHRXHX.mjs +111 -0
- package/dist/lib/node-esm/chunk-G2EHRXHX.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-OHBKSL2Q.mjs +63 -0
- package/dist/lib/node-esm/chunk-OHBKSL2Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-V4FN2DZR.mjs +29 -0
- package/dist/lib/node-esm/chunk-V4FN2DZR.mjs.map +7 -0
- package/dist/lib/node-esm/cli/index.mjs +35 -0
- package/dist/lib/node-esm/cli/index.mjs.map +7 -0
- package/dist/lib/node-esm/create-CC2P7GPT.mjs +25 -0
- package/dist/lib/node-esm/create-CC2P7GPT.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +330 -104
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/move-CYHXWHHM.mjs +37 -0
- package/dist/lib/node-esm/move-CYHXWHHM.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +20 -0
- package/dist/lib/node-esm/operations/index.mjs.map +7 -0
- package/dist/lib/node-esm/play-KTNK2PBL.mjs +46 -0
- package/dist/lib/node-esm/play-KTNK2PBL.mjs.map +7 -0
- package/dist/lib/node-esm/print-P23VKVNU.mjs +31 -0
- package/dist/lib/node-esm/print-P23VKVNU.mjs.map +7 -0
- package/dist/lib/node-esm/translations.mjs +39 -0
- package/dist/lib/node-esm/translations.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +3 -5
- package/dist/types/src/ChessPlugin.d.ts +2 -1
- package/dist/types/src/ChessPlugin.d.ts.map +1 -1
- package/dist/types/src/ChessPlugin.test.d.ts +2 -0
- package/dist/types/src/ChessPlugin.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/chess-blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/chess-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +3 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/artifact-definition.d.ts +3 -2
- package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +4 -2
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +5 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/cli/index.d.ts +2 -0
- package/dist/types/src/cli/index.d.ts.map +1 -0
- package/dist/types/src/cli/plugin.d.ts +3 -0
- package/dist/types/src/cli/plugin.d.ts.map +1 -0
- package/dist/types/src/components/Chessboard/Chessboard.d.ts +38 -0
- package/dist/types/src/components/Chessboard/Chessboard.d.ts.map +1 -0
- package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts +65 -0
- package/dist/types/src/components/Chessboard/Chessboard.stories.d.ts.map +1 -0
- package/dist/types/src/components/Chessboard/Info.d.ts +20 -0
- package/dist/types/src/components/Chessboard/Info.d.ts.map +1 -0
- package/dist/types/src/components/Chessboard/index.d.ts +2 -0
- package/dist/types/src/components/Chessboard/index.d.ts.map +1 -0
- package/dist/types/src/components/Chessboard/types.d.ts +8 -0
- package/dist/types/src/components/Chessboard/types.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts +6 -0
- package/dist/types/src/containers/ChessArticle/ChessArticle.d.ts.map +1 -0
- package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts +64 -0
- package/dist/types/src/containers/ChessArticle/ChessArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChessArticle/index.d.ts +2 -0
- package/dist/types/src/containers/ChessArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/ChessCard/ChessCard.d.ts +6 -0
- package/dist/types/src/containers/ChessCard/ChessCard.d.ts.map +1 -0
- package/dist/types/src/containers/ChessCard/ChessCard.stories.d.ts +15 -0
- package/dist/types/src/containers/ChessCard/ChessCard.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ChessCard/index.d.ts +2 -0
- package/dist/types/src/containers/ChessCard/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +4 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create.d.ts +5 -0
- package/dist/types/src/operations/create.d.ts.map +1 -0
- package/dist/types/src/operations/definitions.d.ts +51 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/move.d.ts +5 -0
- package/dist/types/src/operations/move.d.ts.map +1 -0
- package/dist/types/src/operations/play.d.ts +5 -0
- package/dist/types/src/operations/play.d.ts.map +1 -0
- package/dist/types/src/operations/print.d.ts +5 -0
- package/dist/types/src/operations/print.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +40 -20
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Chess.d.ts +20 -17
- package/dist/types/src/types/Chess.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +0 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +80 -43
- package/src/ChessPlugin.test.ts +51 -0
- package/src/ChessPlugin.tsx +42 -54
- package/src/blueprints/chess-blueprint.ts +34 -0
- package/src/blueprints/index.ts +6 -0
- package/src/capabilities/artifact-definition.ts +100 -93
- package/src/capabilities/blueprint-definition.ts +10 -27
- package/src/capabilities/index.ts +8 -4
- package/src/capabilities/operation-handler.ts +14 -0
- package/src/capabilities/react-surface.tsx +27 -15
- package/src/cli/index.ts +5 -0
- package/src/cli/plugin.ts +37 -0
- package/src/components/Chessboard/Chessboard.stories.tsx +94 -0
- package/src/components/Chessboard/Chessboard.tsx +180 -0
- package/src/components/Chessboard/Info.tsx +253 -0
- package/src/components/Chessboard/index.ts +5 -0
- package/src/components/Chessboard/types.ts +18 -0
- package/src/components/index.ts +1 -5
- package/src/containers/ChessArticle/ChessArticle.stories.tsx +53 -0
- package/src/containers/ChessArticle/ChessArticle.tsx +73 -0
- package/src/containers/ChessArticle/index.ts +5 -0
- package/src/containers/ChessCard/ChessCard.stories.tsx +42 -0
- package/src/containers/ChessCard/ChessCard.tsx +22 -0
- package/src/containers/ChessCard/index.ts +5 -0
- package/src/containers/index.ts +8 -0
- package/src/index.ts +1 -4
- package/src/meta.ts +6 -6
- package/src/operations/create.ts +21 -0
- package/src/operations/definitions.ts +109 -0
- package/src/operations/index.ts +16 -0
- package/src/operations/move.ts +36 -0
- package/src/operations/play.ts +45 -0
- package/src/operations/print.ts +28 -0
- package/src/translations.ts +21 -17
- package/src/types/Chess.ts +29 -23
- package/src/types/index.ts +0 -1
- package/dist/lib/browser/ChessboardContainer-NNIOQIRP.mjs +0 -90
- package/dist/lib/browser/ChessboardContainer-NNIOQIRP.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-OJQYAZGZ.mjs +0 -38
- package/dist/lib/browser/blueprint-definition-OJQYAZGZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-2W3S5N6C.mjs +0 -257
- package/dist/lib/browser/chunk-2W3S5N6C.mjs.map +0 -7
- package/dist/lib/browser/chunk-EJMPHRSR.mjs +0 -94
- package/dist/lib/browser/chunk-EJMPHRSR.mjs.map +0 -7
- package/dist/lib/browser/chunk-OBJAHY6H.mjs +0 -79
- package/dist/lib/browser/chunk-OBJAHY6H.mjs.map +0 -7
- package/dist/lib/browser/chunk-PE3IWOFR.mjs +0 -28
- package/dist/lib/browser/chunk-PE3IWOFR.mjs.map +0 -7
- package/dist/lib/browser/chunk-PPBBLHAC.mjs +0 -8
- package/dist/lib/browser/chunk-PPBBLHAC.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-JWKKRNGG.mjs +0 -25
- package/dist/lib/browser/intent-resolver-JWKKRNGG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-RIXD6RTS.mjs +0 -38
- package/dist/lib/browser/react-surface-RIXD6RTS.mjs.map +0 -7
- package/dist/lib/node-esm/ChessboardContainer-FCPUV2T2.mjs +0 -91
- package/dist/lib/node-esm/ChessboardContainer-FCPUV2T2.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-F5SGHCDA.mjs +0 -39
- package/dist/lib/node-esm/blueprint-definition-F5SGHCDA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-42EKKMOO.mjs +0 -10
- package/dist/lib/node-esm/chunk-42EKKMOO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5APYXPBX.mjs +0 -95
- package/dist/lib/node-esm/chunk-5APYXPBX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6OWCPDUA.mjs +0 -29
- package/dist/lib/node-esm/chunk-6OWCPDUA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-LCCUF5X5.mjs +0 -80
- package/dist/lib/node-esm/chunk-LCCUF5X5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QAGOXJGH.mjs +0 -258
- package/dist/lib/node-esm/chunk-QAGOXJGH.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-G6XJAW6C.mjs +0 -26
- package/dist/lib/node-esm/intent-resolver-G6XJAW6C.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-GGRDWZJT.mjs +0 -39
- package/dist/lib/node-esm/react-surface-GGRDWZJT.mjs.map +0 -7
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/components/Card.stories.d.ts +0 -49
- package/dist/types/src/components/Card.stories.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard.d.ts +0 -32
- package/dist/types/src/components/Chessboard.d.ts.map +0 -1
- package/dist/types/src/components/Chessboard.stories.d.ts +0 -42
- package/dist/types/src/components/Chessboard.stories.d.ts.map +0 -1
- package/dist/types/src/components/ChessboardArticle.d.ts +0 -6
- package/dist/types/src/components/ChessboardArticle.d.ts.map +0 -1
- package/dist/types/src/components/ChessboardContainer.d.ts +0 -9
- package/dist/types/src/components/ChessboardContainer.d.ts.map +0 -1
- package/dist/types/src/components/ChessboardInfo.d.ts +0 -20
- package/dist/types/src/components/ChessboardInfo.d.ts.map +0 -1
- package/dist/types/src/components/ChessboardPlayers.d.ts +0 -8
- package/dist/types/src/components/ChessboardPlayers.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -3
- package/dist/types/src/functions/index.d.ts.map +0 -1
- package/dist/types/src/functions/move.d.ts +0 -6
- package/dist/types/src/functions/move.d.ts.map +0 -1
- package/dist/types/src/functions/play.d.ts +0 -8
- package/dist/types/src/functions/play.d.ts.map +0 -1
- package/dist/types/src/types/ChessAction.d.ts +0 -23
- package/dist/types/src/types/ChessAction.d.ts.map +0 -1
- package/src/capabilities/intent-resolver.ts +0 -22
- package/src/components/Card.stories.tsx +0 -68
- package/src/components/Chessboard.stories.tsx +0 -50
- package/src/components/Chessboard.tsx +0 -101
- package/src/components/ChessboardArticle.tsx +0 -57
- package/src/components/ChessboardContainer.tsx +0 -44
- package/src/components/ChessboardInfo.tsx +0 -140
- package/src/components/ChessboardPlayers.tsx +0 -97
- package/src/functions/index.ts +0 -6
- package/src/functions/move.ts +0 -43
- package/src/functions/play.ts +0 -45
- package/src/types/ChessAction.ts +0 -19
package/package.json
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-chess",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.fcc0d83b33",
|
|
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
|
+
"#translations": "./src/translations.ts",
|
|
23
|
+
"#types": "./src/types/index.ts"
|
|
24
|
+
},
|
|
11
25
|
"exports": {
|
|
12
26
|
".": {
|
|
13
27
|
"source": "./src/index.ts",
|
|
@@ -15,6 +29,30 @@
|
|
|
15
29
|
"browser": "./dist/lib/browser/index.mjs",
|
|
16
30
|
"node": "./dist/lib/node-esm/index.mjs"
|
|
17
31
|
},
|
|
32
|
+
"./blueprints": {
|
|
33
|
+
"source": "./src/blueprints/index.ts",
|
|
34
|
+
"types": "./dist/types/src/blueprints/index.d.ts",
|
|
35
|
+
"browser": "./dist/lib/browser/blueprints/index.mjs",
|
|
36
|
+
"node": "./dist/lib/node-esm/blueprints/index.mjs"
|
|
37
|
+
},
|
|
38
|
+
"./cli": {
|
|
39
|
+
"source": "./src/cli/index.ts",
|
|
40
|
+
"types": "./dist/types/src/cli/index.d.ts",
|
|
41
|
+
"browser": "./dist/lib/browser/cli/index.mjs",
|
|
42
|
+
"node": "./dist/lib/node-esm/cli/index.mjs"
|
|
43
|
+
},
|
|
44
|
+
"./operations": {
|
|
45
|
+
"source": "./src/operations/index.ts",
|
|
46
|
+
"types": "./dist/types/src/operations/index.d.ts",
|
|
47
|
+
"browser": "./dist/lib/browser/operations/index.mjs",
|
|
48
|
+
"node": "./dist/lib/node-esm/operations/index.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./translations": {
|
|
51
|
+
"source": "./src/translations.ts",
|
|
52
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
53
|
+
"browser": "./dist/lib/browser/translations.mjs",
|
|
54
|
+
"node": "./dist/lib/node-esm/translations.mjs"
|
|
55
|
+
},
|
|
18
56
|
"./types": {
|
|
19
57
|
"source": "./src/types/index.ts",
|
|
20
58
|
"types": "./dist/types/src/types/index.d.ts",
|
|
@@ -23,58 +61,57 @@
|
|
|
23
61
|
}
|
|
24
62
|
},
|
|
25
63
|
"types": "dist/types/src/index.d.ts",
|
|
26
|
-
"typesVersions": {
|
|
27
|
-
"*": {
|
|
28
|
-
"types": [
|
|
29
|
-
"dist/types/src/types/index.d.ts"
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
64
|
"files": [
|
|
34
65
|
"dist",
|
|
35
66
|
"src"
|
|
36
67
|
],
|
|
37
68
|
"dependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
69
|
+
"@automerge/automerge": "3.2.3",
|
|
70
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
40
71
|
"chess.js": "^1.0.0",
|
|
41
|
-
"effect": "3.
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/plugin-
|
|
55
|
-
"@dxos/plugin-
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/react-ui-gameboard": "0.8.4-main.
|
|
59
|
-
"@dxos/react-
|
|
60
|
-
"@dxos/
|
|
72
|
+
"effect": "3.20.0",
|
|
73
|
+
"@dxos/app-framework": "0.8.4-main.fcc0d83b33",
|
|
74
|
+
"@dxos/app-toolkit": "0.8.4-main.fcc0d83b33",
|
|
75
|
+
"@dxos/assistant": "0.8.4-main.fcc0d83b33",
|
|
76
|
+
"@dxos/async": "0.8.4-main.fcc0d83b33",
|
|
77
|
+
"@dxos/compute": "0.8.4-main.fcc0d83b33",
|
|
78
|
+
"@dxos/ai": "0.8.4-main.fcc0d83b33",
|
|
79
|
+
"@dxos/display-name": "0.8.4-main.fcc0d83b33",
|
|
80
|
+
"@dxos/echo": "0.8.4-main.fcc0d83b33",
|
|
81
|
+
"@dxos/echo-react": "0.8.4-main.fcc0d83b33",
|
|
82
|
+
"@dxos/echo-db": "0.8.4-main.fcc0d83b33",
|
|
83
|
+
"@dxos/invariant": "0.8.4-main.fcc0d83b33",
|
|
84
|
+
"@dxos/log": "0.8.4-main.fcc0d83b33",
|
|
85
|
+
"@dxos/plugin-client": "0.8.4-main.fcc0d83b33",
|
|
86
|
+
"@dxos/plugin-graph": "0.8.4-main.fcc0d83b33",
|
|
87
|
+
"@dxos/plugin-markdown": "0.8.4-main.fcc0d83b33",
|
|
88
|
+
"@dxos/react-client": "0.8.4-main.fcc0d83b33",
|
|
89
|
+
"@dxos/react-ui-gameboard": "0.8.4-main.fcc0d83b33",
|
|
90
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.fcc0d83b33",
|
|
91
|
+
"@dxos/plugin-space": "0.8.4-main.fcc0d83b33",
|
|
92
|
+
"@dxos/react-ui-sfx": "0.8.4-main.fcc0d83b33",
|
|
93
|
+
"@dxos/types": "0.8.4-main.fcc0d83b33",
|
|
94
|
+
"@dxos/schema": "0.8.4-main.fcc0d83b33",
|
|
95
|
+
"@dxos/util": "0.8.4-main.fcc0d83b33",
|
|
96
|
+
"@dxos/react-ui-stack": "0.8.4-main.fcc0d83b33"
|
|
61
97
|
},
|
|
62
98
|
"devDependencies": {
|
|
63
|
-
"@types/react": "~
|
|
64
|
-
"@types/react-dom": "~
|
|
65
|
-
"react": "~
|
|
66
|
-
"react-dom": "~
|
|
67
|
-
"vite": "
|
|
68
|
-
"@dxos/plugin-theme": "0.8.4-main.
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/
|
|
71
|
-
"@dxos/
|
|
99
|
+
"@types/react": "~19.2.7",
|
|
100
|
+
"@types/react-dom": "~19.2.3",
|
|
101
|
+
"react": "~19.2.3",
|
|
102
|
+
"react-dom": "~19.2.3",
|
|
103
|
+
"vite": "^8.0.10",
|
|
104
|
+
"@dxos/plugin-theme": "0.8.4-main.fcc0d83b33",
|
|
105
|
+
"@dxos/plugin-testing": "0.8.4-main.fcc0d83b33",
|
|
106
|
+
"@dxos/react-ui": "0.8.4-main.fcc0d83b33",
|
|
107
|
+
"@dxos/storybook-utils": "0.8.4-main.fcc0d83b33",
|
|
108
|
+
"@dxos/ui-theme": "0.8.4-main.fcc0d83b33"
|
|
72
109
|
},
|
|
73
110
|
"peerDependencies": {
|
|
74
|
-
"react": "~
|
|
75
|
-
"react-dom": "~
|
|
76
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
77
|
-
"@dxos/
|
|
111
|
+
"react": "~19.2.3",
|
|
112
|
+
"react-dom": "~19.2.3",
|
|
113
|
+
"@dxos/react-ui": "0.8.4-main.fcc0d83b33",
|
|
114
|
+
"@dxos/ui-theme": "0.8.4-main.fcc0d83b33"
|
|
78
115
|
},
|
|
79
116
|
"publishConfig": {
|
|
80
117
|
"access": "public"
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { ActivationEvents } from '@dxos/app-framework';
|
|
8
|
+
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
9
|
+
// Use the CLI variant — the main ClientPlugin references capabilities that resolve to undefined under Node.
|
|
10
|
+
import { ClientPlugin } from '@dxos/plugin-client/cli';
|
|
11
|
+
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
12
|
+
|
|
13
|
+
import { ChessPlugin } from './ChessPlugin';
|
|
14
|
+
import { meta } from './meta';
|
|
15
|
+
import { Print } from './operations';
|
|
16
|
+
|
|
17
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
18
|
+
|
|
19
|
+
describe('ChessPlugin', () => {
|
|
20
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
21
|
+
await using harness = await createComposerTestApp({
|
|
22
|
+
plugins: [ClientPlugin({}), ChessPlugin()],
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// Modules expected to be active after a normal startup.
|
|
26
|
+
expect(harness.manager.getActive()).toEqual(
|
|
27
|
+
expect.arrayContaining([moduleId('metadata'), moduleId('schema'), moduleId('ReactSurface')]),
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
// SetupArtifactDefinition is fired by AssistantPlugin, which can't be included here due to a workspace cycle.
|
|
31
|
+
await harness.fire(AppActivationEvents.SetupArtifactDefinition);
|
|
32
|
+
expect(harness.manager.getActive()).toContain(moduleId('BlueprintDefinition'));
|
|
33
|
+
|
|
34
|
+
// Operation handlers are not loaded on startup — SetupOperationHandler fires lazily when an operation is invoked.
|
|
35
|
+
await harness.fire(ActivationEvents.SetupOperationHandler);
|
|
36
|
+
expect(harness.manager.getActive()).toContain(moduleId('OperationHandler'));
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test('invokes the Print operation via the invoker capability', async ({ expect }) => {
|
|
40
|
+
await using harness = await createComposerTestApp({ plugins: [ChessPlugin()] });
|
|
41
|
+
const result = await harness.invoke(Print, {});
|
|
42
|
+
// Empty input returns empty ASCII (handler swallows errors for malformed FEN).
|
|
43
|
+
expect(typeof result.ascii).toBe('string');
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test('Print renders a PGN to ASCII board', async ({ expect }) => {
|
|
47
|
+
await using harness = await createComposerTestApp({ plugins: [ChessPlugin()] });
|
|
48
|
+
const { ascii } = await harness.invoke(Print, { pgn: '1. e4 e5' });
|
|
49
|
+
expect(ascii).toContain('a b c d e f g h');
|
|
50
|
+
});
|
|
51
|
+
});
|
package/src/ChessPlugin.tsx
CHANGED
|
@@ -2,59 +2,47 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { SpaceCapabilities } from '@dxos/plugin-space';
|
|
8
|
-
import { defineObjectForm } from '@dxos/plugin-space/types';
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
9
7
|
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
import { Plugin } from '@dxos/app-framework';
|
|
9
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
11
|
+
import { Annotation } from '@dxos/echo';
|
|
12
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
13
|
+
import { type CreateObject } from '@dxos/plugin-space/types';
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}),
|
|
50
|
-
defineModule({
|
|
51
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
52
|
-
activatesOn: Events.SetupIntentResolver,
|
|
53
|
-
activate: IntentResolver,
|
|
54
|
-
}),
|
|
55
|
-
defineModule({
|
|
56
|
-
id: `${meta.id}/module/blueprint`,
|
|
57
|
-
activatesOn: Events.SetupArtifactDefinition,
|
|
58
|
-
activate: BlueprintDefinition,
|
|
59
|
-
}),
|
|
60
|
-
]);
|
|
15
|
+
import { ChessBlueprint } from '#blueprints';
|
|
16
|
+
import { BlueprintDefinition, OperationHandler, ReactSurface } from '#capabilities';
|
|
17
|
+
import { meta } from '#meta';
|
|
18
|
+
import { translations } from '#translations';
|
|
19
|
+
import { Chess } from '#types';
|
|
20
|
+
|
|
21
|
+
export const ChessPlugin = Plugin.define(meta).pipe(
|
|
22
|
+
AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
23
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
24
|
+
AppPlugin.addMetadataModule({
|
|
25
|
+
metadata: {
|
|
26
|
+
id: Chess.Game.typename,
|
|
27
|
+
metadata: {
|
|
28
|
+
icon: Annotation.IconAnnotation.get(Chess.Game).pipe(Option.getOrThrow).icon,
|
|
29
|
+
iconHue: Annotation.IconAnnotation.get(Chess.Game).pipe(Option.getOrThrow).hue ?? 'white',
|
|
30
|
+
blueprints: [ChessBlueprint.key],
|
|
31
|
+
createObject: ((props, options) =>
|
|
32
|
+
Effect.gen(function* () {
|
|
33
|
+
const object = Chess.make(props);
|
|
34
|
+
return yield* Operation.invoke(SpaceOperation.AddObject, {
|
|
35
|
+
object,
|
|
36
|
+
target: options.target,
|
|
37
|
+
hidden: true,
|
|
38
|
+
targetNodeId: options.targetNodeId,
|
|
39
|
+
});
|
|
40
|
+
})) satisfies CreateObject,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
}),
|
|
44
|
+
AppPlugin.addSchemaModule({ schema: [Chess.Game] }),
|
|
45
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
46
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
47
|
+
Plugin.make,
|
|
48
|
+
);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Blueprint, Template } from '@dxos/compute';
|
|
6
|
+
import { trim } from '@dxos/util';
|
|
7
|
+
|
|
8
|
+
import { Create, Move, Play, Print } from '#operations';
|
|
9
|
+
|
|
10
|
+
const BLUEPRINT_KEY = 'org.dxos.blueprint.chess';
|
|
11
|
+
|
|
12
|
+
const operations = [Create, Move, Play, Print];
|
|
13
|
+
|
|
14
|
+
const make = () =>
|
|
15
|
+
Blueprint.make({
|
|
16
|
+
key: BLUEPRINT_KEY,
|
|
17
|
+
name: 'Chess',
|
|
18
|
+
tools: Blueprint.toolDefinitions({ operations }),
|
|
19
|
+
instructions: Template.make({
|
|
20
|
+
source: trim`
|
|
21
|
+
You are an expert chess player.
|
|
22
|
+
To analyze a game you can access the "pgn" property by loading the context object that represents the current game.
|
|
23
|
+
You could suggest a good next move or offer to play a move.
|
|
24
|
+
Don't actually make a move unless you are asked to.
|
|
25
|
+
`,
|
|
26
|
+
}),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const blueprint: Blueprint.Definition = {
|
|
30
|
+
key: BLUEPRINT_KEY,
|
|
31
|
+
make,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default blueprint;
|
|
@@ -6,20 +6,21 @@
|
|
|
6
6
|
// @ts-nocheck
|
|
7
7
|
|
|
8
8
|
import { Chess as ChessJS } from 'chess.js';
|
|
9
|
-
import
|
|
9
|
+
import * as Effect from 'effect/Effect';
|
|
10
|
+
import * as Schema from 'effect/Schema';
|
|
10
11
|
|
|
11
12
|
import { ToolResult, createTool } from '@dxos/ai';
|
|
12
|
-
import { Capabilities, type PromiseIntentDispatcher
|
|
13
|
+
import { Capabilities, Capability, type PromiseIntentDispatcher } from '@dxos/app-framework';
|
|
13
14
|
import { ArtifactId, VersionPin, createArtifactElement } from '@dxos/assistant';
|
|
14
|
-
import { defineArtifact } from '@dxos/
|
|
15
|
+
import { defineArtifact } from '@dxos/compute';
|
|
15
16
|
import { Obj } from '@dxos/echo';
|
|
16
17
|
import { invariant } from '@dxos/invariant';
|
|
17
|
-
import {
|
|
18
|
+
import { SpaceOperation } from '@dxos/plugin-space/operations';
|
|
18
19
|
import { Filter, type Space } from '@dxos/react-client/echo';
|
|
19
20
|
import { trim } from '@dxos/util';
|
|
20
21
|
|
|
21
|
-
import { meta } from '
|
|
22
|
-
import { Chess
|
|
22
|
+
import { meta } from '#meta';
|
|
23
|
+
import { Chess } from '#types';
|
|
23
24
|
|
|
24
25
|
// TODO(burdon): Factor out.
|
|
25
26
|
declare global {
|
|
@@ -29,100 +30,106 @@ declare global {
|
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
|
|
32
|
-
export default () =>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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`
|
|
38
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.
|
|
39
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.
|
|
40
42
|
`,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const intent = pipe(
|
|
54
|
-
createIntent(ChessAction.Create, { pgn }),
|
|
55
|
-
chain(SpaceAction.AddObject, { target: extensions.space }),
|
|
56
|
-
);
|
|
57
|
-
const { data, error } = await extensions.dispatch(intent);
|
|
58
|
-
if (!data || error) {
|
|
59
|
-
return ToolResult.Error(error?.message ?? 'Failed to create chess game');
|
|
60
|
-
}
|
|
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');
|
|
61
55
|
|
|
62
|
-
|
|
63
|
-
VersionPin.createBlock(VersionPin.fromObject(data.object)),
|
|
64
|
-
]);
|
|
65
|
-
},
|
|
66
|
-
}),
|
|
67
|
-
createTool(meta.id, {
|
|
68
|
-
name: 'list',
|
|
69
|
-
description: 'Query all active chess games.',
|
|
70
|
-
caption: 'Getting games...',
|
|
71
|
-
schema: Schema.Struct({}),
|
|
72
|
-
execute: async (_, { extensions }) => {
|
|
73
|
-
invariant(extensions?.space, 'No space');
|
|
74
|
-
const { objects: games } = await extensions.space.db.query(Filter.type(Chess.Game)).run();
|
|
75
|
-
invariant(games.length > 0, 'No chess games found');
|
|
56
|
+
const game = Chess.make({ pgn });
|
|
76
57
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
schema: Schema.Struct({ id: ArtifactId }),
|
|
85
|
-
execute: async ({ id }, { extensions }) => {
|
|
86
|
-
invariant(extensions?.space, 'No space');
|
|
87
|
-
const game = await extensions.space.db
|
|
88
|
-
.query(Filter.ids(ArtifactId.toDXN(id, extensions.space.id).toString()))
|
|
89
|
-
.first();
|
|
90
|
-
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
|
+
}
|
|
91
65
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
name: 'move',
|
|
97
|
-
description: 'Make a move in the chess game.',
|
|
98
|
-
caption: 'Making chess move...',
|
|
99
|
-
schema: Schema.Struct({
|
|
100
|
-
id: ArtifactId,
|
|
101
|
-
move: Schema.String.annotations({
|
|
102
|
-
description: 'The move to make in the chess game.',
|
|
103
|
-
examples: ['e4', 'Bf3'],
|
|
104
|
-
}),
|
|
66
|
+
return ToolResult.Success(createArtifactElement(game.id), [
|
|
67
|
+
VersionPin.createBlock(VersionPin.fromObject(game)),
|
|
68
|
+
]);
|
|
69
|
+
},
|
|
105
70
|
}),
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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');
|
|
112
80
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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));
|
|
119
95
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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.update(game, (game) => {
|
|
125
|
+
game.pgn = chess.pgn();
|
|
126
|
+
});
|
|
127
|
+
return ToolResult.Success(game.pgn);
|
|
128
|
+
},
|
|
129
|
+
}),
|
|
130
|
+
],
|
|
131
|
+
});
|
|
126
132
|
|
|
127
|
-
|
|
128
|
-
}
|
|
133
|
+
return Capability.contributes(Capabilities.ArtifactDefinition, definition);
|
|
134
|
+
}),
|
|
135
|
+
);
|
|
@@ -2,33 +2,16 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import { Capabilities, contributes } from '@dxos/app-framework';
|
|
7
|
-
import { Blueprint, Template } from '@dxos/blueprints';
|
|
8
|
-
import { trim } from '@dxos/util';
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
9
6
|
|
|
10
|
-
import {
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
import { ChessBlueprint } from '#blueprints';
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
name: 'Chess',
|
|
21
|
-
instructions: Template.make({
|
|
22
|
-
source: trim`
|
|
23
|
-
You are an expert chess player.
|
|
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
|
-
To analyze a game you can retrieve the "pgn" property from the context object.
|
|
27
|
-
`,
|
|
28
|
-
}),
|
|
29
|
-
tools: functions.map((tool) => ToolId.make(tool.name)),
|
|
30
|
-
}),
|
|
31
|
-
),
|
|
32
|
-
contributes(Capabilities.Functions, functions),
|
|
33
|
-
];
|
|
34
|
-
};
|
|
12
|
+
const blueprintDefinition = Capability.makeModule<
|
|
13
|
+
[],
|
|
14
|
+
Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]
|
|
15
|
+
>(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, ChessBlueprint)]));
|
|
16
|
+
|
|
17
|
+
export default blueprintDefinition;
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
6
7
|
|
|
7
|
-
export const BlueprintDefinition = lazy(() => import('./blueprint-definition'));
|
|
8
|
-
export const
|
|
9
|
-
|
|
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'));
|