@dxos/plugin-chess 0.8.1-staging.391c573 → 0.8.1-staging.5be625a

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 (51) hide show
  1. package/dist/lib/browser/{artifact-definition-B4K4M4EX.mjs → artifact-definition-EXLPEMID.mjs} +20 -24
  2. package/dist/lib/browser/artifact-definition-EXLPEMID.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-NNA3W3LX.mjs → chunk-4NJ4PMPW.mjs} +1 -1
  4. package/dist/lib/browser/{chunk-NNA3W3LX.mjs.map → chunk-4NJ4PMPW.mjs.map} +2 -2
  5. package/dist/lib/browser/index.mjs +6 -13
  6. package/dist/lib/browser/index.mjs.map +3 -3
  7. package/dist/lib/browser/{intent-resolver-KBIH2KYC.mjs → intent-resolver-JVLCHAJD.mjs} +2 -2
  8. package/dist/lib/browser/meta.json +1 -1
  9. package/dist/lib/browser/{react-surface-2PI2KNSU.mjs → react-surface-5WUSMUJH.mjs} +2 -2
  10. package/dist/lib/browser/types/index.mjs +1 -1
  11. package/dist/lib/node/{artifact-definition-DHM4H4VO.cjs → artifact-definition-SHL3QR2G.cjs} +32 -36
  12. package/dist/lib/node/artifact-definition-SHL3QR2G.cjs.map +7 -0
  13. package/dist/lib/node/{chunk-VXYRI6VA.cjs → chunk-PQ64RGCS.cjs} +4 -4
  14. package/dist/lib/node/{chunk-VXYRI6VA.cjs.map → chunk-PQ64RGCS.cjs.map} +2 -2
  15. package/dist/lib/node/index.cjs +20 -27
  16. package/dist/lib/node/index.cjs.map +3 -3
  17. package/dist/lib/node/{intent-resolver-TZFKPQOV.cjs → intent-resolver-IJXRCQA5.cjs} +7 -7
  18. package/dist/lib/node/meta.json +1 -1
  19. package/dist/lib/node/{react-surface-OHQIPHSN.cjs → react-surface-K5COTH4C.cjs} +8 -8
  20. package/dist/lib/node/types/index.cjs +5 -5
  21. package/dist/lib/node/types/index.cjs.map +1 -1
  22. package/dist/lib/node-esm/{artifact-definition-KOK5BODD.mjs → artifact-definition-QBHEHIFM.mjs} +20 -24
  23. package/dist/lib/node-esm/artifact-definition-QBHEHIFM.mjs.map +7 -0
  24. package/dist/lib/node-esm/{chunk-IP66EHSW.mjs → chunk-GLBZ7ZZD.mjs} +1 -1
  25. package/dist/lib/node-esm/{chunk-IP66EHSW.mjs.map → chunk-GLBZ7ZZD.mjs.map} +2 -2
  26. package/dist/lib/node-esm/index.mjs +6 -13
  27. package/dist/lib/node-esm/index.mjs.map +3 -3
  28. package/dist/lib/node-esm/{intent-resolver-WBUS64KC.mjs → intent-resolver-AWNZCS56.mjs} +2 -2
  29. package/dist/lib/node-esm/meta.json +1 -1
  30. package/dist/lib/node-esm/{react-surface-XX4VFNRS.mjs → react-surface-HTIQ7S3G.mjs} +2 -2
  31. package/dist/lib/node-esm/types/index.mjs +1 -1
  32. package/dist/types/src/ChessPlugin.d.ts.map +1 -1
  33. package/dist/types/src/capabilities/artifact-definition.d.ts.map +1 -1
  34. package/dist/types/src/meta.d.ts +2 -8
  35. package/dist/types/src/meta.d.ts.map +1 -1
  36. package/dist/types/src/translations.d.ts +2 -6
  37. package/dist/types/src/translations.d.ts.map +1 -1
  38. package/package.json +20 -20
  39. package/src/ChessPlugin.tsx +1 -2
  40. package/src/capabilities/artifact-definition.ts +8 -15
  41. package/src/meta.ts +2 -2
  42. package/src/translations.ts +1 -2
  43. package/dist/lib/browser/artifact-definition-B4K4M4EX.mjs.map +0 -7
  44. package/dist/lib/node/artifact-definition-DHM4H4VO.cjs.map +0 -7
  45. package/dist/lib/node-esm/artifact-definition-KOK5BODD.mjs.map +0 -7
  46. /package/dist/lib/browser/{intent-resolver-KBIH2KYC.mjs.map → intent-resolver-JVLCHAJD.mjs.map} +0 -0
  47. /package/dist/lib/browser/{react-surface-2PI2KNSU.mjs.map → react-surface-5WUSMUJH.mjs.map} +0 -0
  48. /package/dist/lib/node/{intent-resolver-TZFKPQOV.cjs.map → intent-resolver-IJXRCQA5.cjs.map} +0 -0
  49. /package/dist/lib/node/{react-surface-OHQIPHSN.cjs.map → react-surface-K5COTH4C.cjs.map} +0 -0
  50. /package/dist/lib/node-esm/{intent-resolver-WBUS64KC.mjs.map → intent-resolver-AWNZCS56.mjs.map} +0 -0
  51. /package/dist/lib/node-esm/{react-surface-XX4VFNRS.mjs.map → react-surface-HTIQ7S3G.mjs.map} +0 -0
@@ -2,23 +2,19 @@ import {
2
2
  ChessAction,
3
3
  ChessType,
4
4
  meta
5
- } from "./chunk-NNA3W3LX.mjs";
5
+ } from "./chunk-4NJ4PMPW.mjs";
6
6
 
7
7
  // packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts
8
8
  import { Chess } from "chess.js";
9
9
  import { pipe } from "effect";
10
10
  import { Capabilities, chain, contributes, createIntent } from "@dxos/app-framework";
11
- import { defineArtifact, defineTool, ToolResult } from "@dxos/artifact";
11
+ import { ArtifactId, defineArtifact, defineTool, ToolResult } from "@dxos/artifact";
12
12
  import { createArtifactElement } from "@dxos/assistant";
13
13
  import { isInstanceOf, S } from "@dxos/echo-schema";
14
14
  import { invariant } from "@dxos/invariant";
15
15
  import { SpaceAction } from "@dxos/plugin-space/types";
16
- import { Filter, parseId } from "@dxos/react-client/echo";
16
+ import { Filter } from "@dxos/react-client/echo";
17
17
  var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts";
18
- var ArtifacftId = class extends S.String.annotations({
19
- description: "ID of the artifact in <spaceid>:<artifactid> format"
20
- }) {
21
- };
22
18
  var artifact_definition_default = () => {
23
19
  const definition = defineArtifact({
24
20
  id: meta.id,
@@ -42,7 +38,7 @@ var artifact_definition_default = () => {
42
38
  execute: async ({ fen }, { extensions }) => {
43
39
  invariant(extensions?.space, "No space", {
44
40
  F: __dxlog_file,
45
- L: 51,
41
+ L: 46,
46
42
  S: void 0,
47
43
  A: [
48
44
  "extensions?.space",
@@ -51,7 +47,7 @@ var artifact_definition_default = () => {
51
47
  });
52
48
  invariant(extensions?.dispatch, "No intent dispatcher", {
53
49
  F: __dxlog_file,
54
- L: 52,
50
+ L: 47,
55
51
  S: void 0,
56
52
  A: [
57
53
  "extensions?.dispatch",
@@ -78,7 +74,7 @@ var artifact_definition_default = () => {
78
74
  execute: async (_, { extensions }) => {
79
75
  invariant(extensions?.space, "No space", {
80
76
  F: __dxlog_file,
81
- L: 71,
77
+ L: 66,
82
78
  S: void 0,
83
79
  A: [
84
80
  "extensions?.space",
@@ -88,7 +84,7 @@ var artifact_definition_default = () => {
88
84
  const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();
89
85
  invariant(games.length > 0, "No chess games found", {
90
86
  F: __dxlog_file,
91
- L: 73,
87
+ L: 68,
92
88
  S: void 0,
93
89
  A: [
94
90
  "games.length > 0",
@@ -103,24 +99,24 @@ var artifact_definition_default = () => {
103
99
  description: "Get the current state of the chess game.",
104
100
  caption: "Inspecting game...",
105
101
  schema: S.Struct({
106
- id: ArtifacftId
102
+ id: ArtifactId
107
103
  }),
108
104
  execute: async ({ id }, { extensions }) => {
109
105
  invariant(extensions?.space, "No space", {
110
106
  F: __dxlog_file,
111
- L: 83,
107
+ L: 78,
112
108
  S: void 0,
113
109
  A: [
114
110
  "extensions?.space",
115
111
  "'No space'"
116
112
  ]
117
113
  });
118
- const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();
119
- const { objectId } = parseId(id);
120
- const game = games.find((game2) => game2.id === objectId);
114
+ const game = await extensions.space.db.query({
115
+ id: ArtifactId.toDXN(id).toString()
116
+ }).first();
121
117
  invariant(isInstanceOf(ChessType, game), void 0, {
122
118
  F: __dxlog_file,
123
- L: 87,
119
+ L: 80,
124
120
  S: void 0,
125
121
  A: [
126
122
  "isInstanceOf(ChessType, game)",
@@ -135,7 +131,7 @@ var artifact_definition_default = () => {
135
131
  description: "Make a move in the chess game.",
136
132
  caption: "Making chess move...",
137
133
  schema: S.Struct({
138
- id: ArtifacftId,
134
+ id: ArtifactId,
139
135
  move: S.String.annotations({
140
136
  description: "The move to make in the chess game.",
141
137
  examples: [
@@ -147,19 +143,19 @@ var artifact_definition_default = () => {
147
143
  execute: async ({ id, move }, { extensions }) => {
148
144
  invariant(extensions?.space, "No space", {
149
145
  F: __dxlog_file,
150
- L: 103,
146
+ L: 97,
151
147
  S: void 0,
152
148
  A: [
153
149
  "extensions?.space",
154
150
  "'No space'"
155
151
  ]
156
152
  });
157
- const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();
158
- const { objectId } = parseId(id);
159
- const game = games.find((game2) => game2.id === objectId);
153
+ const game = await extensions.space.db.query({
154
+ id: ArtifactId.toDXN(id).toString()
155
+ }).first();
160
156
  invariant(isInstanceOf(ChessType, game), void 0, {
161
157
  F: __dxlog_file,
162
- L: 107,
158
+ L: 99,
163
159
  S: void 0,
164
160
  A: [
165
161
  "isInstanceOf(ChessType, game)",
@@ -184,4 +180,4 @@ var artifact_definition_default = () => {
184
180
  export {
185
181
  artifact_definition_default as default
186
182
  };
187
- //# sourceMappingURL=artifact-definition-B4K4M4EX.mjs.map
183
+ //# sourceMappingURL=artifact-definition-EXLPEMID.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/artifact-definition.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Chess } from 'chess.js';\nimport { pipe } from 'effect';\n\nimport { Capabilities, chain, contributes, createIntent, type PromiseIntentDispatcher } from '@dxos/app-framework';\nimport { ArtifactId, defineArtifact, defineTool, ToolResult } from '@dxos/artifact';\nimport { createArtifactElement } from '@dxos/assistant';\nimport { isInstanceOf, S } from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport { SpaceAction } from '@dxos/plugin-space/types';\nimport { Filter, type Space } from '@dxos/react-client/echo';\n\nimport { meta } from '../meta';\nimport { ChessAction, ChessType } from '../types';\n\n// TODO(burdon): Factor out.\ndeclare global {\n interface ToolContextExtensions {\n space?: Space;\n dispatch?: PromiseIntentDispatcher;\n }\n}\n\nexport default () => {\n const definition = defineArtifact({\n id: meta.id,\n name: meta.name,\n description: 'Provides a simple chess engine.',\n instructions: `\n - 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.\n - Always inspect the chess game at the start of every prompt realting to a chess game, as it might have changed since the interaction.\n `,\n schema: ChessType,\n tools: [\n defineTool(meta.id, {\n name: 'create',\n description: 'Create a new chess game. Returns the artifact definition for the game.',\n caption: 'Creating chess game...',\n schema: S.Struct({\n fen: S.String.annotations({ description: 'The state of the chess game in the FEN format.' }),\n }),\n execute: async ({ fen }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n invariant(extensions?.dispatch, 'No intent dispatcher');\n const intent = pipe(\n createIntent(ChessAction.Create, { fen }),\n chain(SpaceAction.AddObject, { target: extensions.space }),\n );\n const { data, error } = await extensions.dispatch(intent);\n if (!data || error) {\n return ToolResult.Error(error?.message ?? 'Failed to create chess game');\n }\n\n return ToolResult.Success(createArtifactElement(data.id));\n },\n }),\n defineTool(meta.id, {\n name: 'list',\n description: 'Query all active chess games.',\n caption: 'Getting games...',\n schema: S.Struct({}),\n execute: async (_, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const { objects: games } = await extensions.space.db.query(Filter.schema(ChessType)).run();\n invariant(games.length > 0, 'No chess games found');\n return ToolResult.Success(games);\n },\n }),\n defineTool(meta.id, {\n name: 'inspect',\n description: 'Get the current state of the chess game.',\n caption: 'Inspecting game...',\n schema: S.Struct({ id: ArtifactId }),\n execute: async ({ id }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const game = await extensions.space.db.query({ id: ArtifactId.toDXN(id).toString() }).first();\n invariant(isInstanceOf(ChessType, game));\n\n return ToolResult.Success(game.fen);\n },\n }),\n defineTool(meta.id, {\n name: 'move',\n description: 'Make a move in the chess game.',\n caption: 'Making chess move...',\n schema: S.Struct({\n id: ArtifactId,\n move: S.String.annotations({\n description: 'The move to make in the chess game.',\n examples: ['e4', 'Bf3'],\n }),\n }),\n execute: async ({ id, move }, { extensions }) => {\n invariant(extensions?.space, 'No space');\n const game = await extensions.space.db.query({ id: ArtifactId.toDXN(id).toString() }).first();\n invariant(isInstanceOf(ChessType, game));\n\n const board = new Chess(game.fen);\n try {\n board.move(move);\n } catch (error: any) {\n return ToolResult.Error(error.message);\n }\n game.pgn = board.pgn();\n game.fen = board.fen();\n return ToolResult.Success(game.fen);\n },\n }),\n ],\n });\n\n return contributes(Capabilities.ArtifactDefinition, definition);\n};\n"],
5
+ "mappings": ";;;;;;;AAIA,SAASA,aAAa;AACtB,SAASC,YAAY;AAErB,SAASC,cAAcC,OAAOC,aAAaC,oBAAkD;AAC7F,SAASC,YAAYC,gBAAgBC,YAAYC,kBAAkB;AACnE,SAASC,6BAA6B;AACtC,SAASC,cAAcC,SAAS;AAChC,SAASC,iBAAiB;AAC1B,SAASC,mBAAmB;AAC5B,SAASC,cAA0B;;AAanC,IAAA,8BAAe,MAAA;AACb,QAAMC,aAAaC,eAAe;IAChCC,IAAIC,KAAKD;IACTE,MAAMD,KAAKC;IACXC,aAAa;IACbC,cAAc;;;;IAIdC,QAAQC;IACRC,OAAO;MACLC,WAAWP,KAAKD,IAAI;QAClBE,MAAM;QACNC,aAAa;QACbM,SAAS;QACTJ,QAAQK,EAAEC,OAAO;UACfC,KAAKF,EAAEG,OAAOC,YAAY;YAAEX,aAAa;UAAiD,CAAA;QAC5F,CAAA;QACAY,SAAS,OAAO,EAAEH,IAAG,GAAI,EAAEI,WAAU,MAAE;AACrCC,oBAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7BD,oBAAUD,YAAYG,UAAU,wBAAA;;;;;;;;;AAChC,gBAAMC,SAASC,KACbC,aAAaC,YAAYC,QAAQ;YAAEZ;UAAI,CAAA,GACvCa,MAAMC,YAAYC,WAAW;YAAEC,QAAQZ,WAAWE;UAAM,CAAA,CAAA;AAE1D,gBAAM,EAAEW,MAAMC,MAAK,IAAK,MAAMd,WAAWG,SAASC,MAAAA;AAClD,cAAI,CAACS,QAAQC,OAAO;AAClB,mBAAOC,WAAWC,MAAMF,OAAOG,WAAW,6BAAA;UAC5C;AAEA,iBAAOF,WAAWG,QAAQC,sBAAsBN,KAAK7B,EAAE,CAAA;QACzD;MACF,CAAA;MACAQ,WAAWP,KAAKD,IAAI;QAClBE,MAAM;QACNC,aAAa;QACbM,SAAS;QACTJ,QAAQK,EAAEC,OAAO,CAAC,CAAA;QAClBI,SAAS,OAAOqB,GAAG,EAAEpB,WAAU,MAAE;AAC/BC,oBAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7B,gBAAM,EAAEmB,SAASC,MAAK,IAAK,MAAMtB,WAAWE,MAAMqB,GAAGC,MAAMC,OAAOpC,OAAOC,SAAAA,CAAAA,EAAYoC,IAAG;AACxFzB,oBAAUqB,MAAMK,SAAS,GAAG,wBAAA;;;;;;;;;AAC5B,iBAAOZ,WAAWG,QAAQI,KAAAA;QAC5B;MACF,CAAA;MACA9B,WAAWP,KAAKD,IAAI;QAClBE,MAAM;QACNC,aAAa;QACbM,SAAS;QACTJ,QAAQK,EAAEC,OAAO;UAAEX,IAAI4C;QAAW,CAAA;QAClC7B,SAAS,OAAO,EAAEf,GAAE,GAAI,EAAEgB,WAAU,MAAE;AACpCC,oBAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7B,gBAAM2B,OAAO,MAAM7B,WAAWE,MAAMqB,GAAGC,MAAM;YAAExC,IAAI4C,WAAWE,MAAM9C,EAAAA,EAAI+C,SAAQ;UAAG,CAAA,EAAGC,MAAK;AAC3F/B,oBAAUgC,aAAa3C,WAAWuC,IAAAA,GAAAA,QAAAA;;;;;;;;;AAElC,iBAAOd,WAAWG,QAAQW,KAAKjC,GAAG;QACpC;MACF,CAAA;MACAJ,WAAWP,KAAKD,IAAI;QAClBE,MAAM;QACNC,aAAa;QACbM,SAAS;QACTJ,QAAQK,EAAEC,OAAO;UACfX,IAAI4C;UACJM,MAAMxC,EAAEG,OAAOC,YAAY;YACzBX,aAAa;YACbgD,UAAU;cAAC;cAAM;;UACnB,CAAA;QACF,CAAA;QACApC,SAAS,OAAO,EAAEf,IAAIkD,KAAI,GAAI,EAAElC,WAAU,MAAE;AAC1CC,oBAAUD,YAAYE,OAAO,YAAA;;;;;;;;;AAC7B,gBAAM2B,OAAO,MAAM7B,WAAWE,MAAMqB,GAAGC,MAAM;YAAExC,IAAI4C,WAAWE,MAAM9C,EAAAA,EAAI+C,SAAQ;UAAG,CAAA,EAAGC,MAAK;AAC3F/B,oBAAUgC,aAAa3C,WAAWuC,IAAAA,GAAAA,QAAAA;;;;;;;;;AAElC,gBAAMO,QAAQ,IAAIC,MAAMR,KAAKjC,GAAG;AAChC,cAAI;AACFwC,kBAAMF,KAAKA,IAAAA;UACb,SAASpB,OAAY;AACnB,mBAAOC,WAAWC,MAAMF,MAAMG,OAAO;UACvC;AACAY,eAAKS,MAAMF,MAAME,IAAG;AACpBT,eAAKjC,MAAMwC,MAAMxC,IAAG;AACpB,iBAAOmB,WAAWG,QAAQW,KAAKjC,GAAG;QACpC;MACF,CAAA;;EAEJ,CAAA;AAEA,SAAO2C,YAAYC,aAAaC,oBAAoB3D,UAAAA;AACtD;",
6
+ "names": ["Chess", "pipe", "Capabilities", "chain", "contributes", "createIntent", "ArtifactId", "defineArtifact", "defineTool", "ToolResult", "createArtifactElement", "isInstanceOf", "S", "invariant", "SpaceAction", "Filter", "definition", "defineArtifact", "id", "meta", "name", "description", "instructions", "schema", "ChessType", "tools", "defineTool", "caption", "S", "Struct", "fen", "String", "annotations", "execute", "extensions", "invariant", "space", "dispatch", "intent", "pipe", "createIntent", "ChessAction", "Create", "chain", "SpaceAction", "AddObject", "target", "data", "error", "ToolResult", "Error", "message", "Success", "createArtifactElement", "_", "objects", "games", "db", "query", "Filter", "run", "length", "ArtifactId", "game", "toDXN", "toString", "first", "isInstanceOf", "move", "examples", "board", "Chess", "pgn", "contributes", "Capabilities", "ArtifactDefinition"]
7
+ }
@@ -66,4 +66,4 @@ export {
66
66
  ChessAction,
67
67
  isObject
68
68
  };
69
- //# sourceMappingURL=chunk-NNA3W3LX.mjs.map
69
+ //# sourceMappingURL=chunk-4NJ4PMPW.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/types/schema.ts", "../../../src/types/types.ts", "../../../src/meta.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { S, TypedObject } from '@dxos/echo-schema';\n\nexport const MoveSchema = S.mutable(\n S.partial(\n S.Struct({\n source: S.String,\n target: S.String,\n piece: S.String,\n }),\n ),\n);\n\nexport class ChessType extends TypedObject({ typename: 'dxos.org/type/Chess', version: '0.1.0' })(\n {\n name: S.optional(S.String),\n playerWhite: S.String,\n playerBlack: S.String,\n moves: S.mutable(S.Array(S.String)),\n // TODO(wittjosiah): Remove. Redundant with moves.\n pgn: S.String,\n fen: S.String,\n },\n { partial: true },\n) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { isInstanceOf, S } from '@dxos/echo-schema';\nimport { isReactiveObject } from '@dxos/live-object';\n\nimport { ChessType } from './schema';\nimport { CHESS_PLUGIN } from '../meta';\n\nexport namespace ChessAction {\n const CHESS_ACTION = `${CHESS_PLUGIN}/action`;\n\n export class Create extends S.TaggedClass<Create>()(`${CHESS_ACTION}/create`, {\n input: S.Struct({\n name: S.optional(S.String),\n fen: S.optional(S.String),\n }),\n output: S.Struct({\n object: ChessType,\n }),\n }) {}\n}\n\nexport const isObject = (object: unknown): object is typeof ChessType => {\n return isReactiveObject(object) && isInstanceOf(ChessType, object);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const CHESS_PLUGIN = 'dxos.org/plugin/chess';\n\nexport const meta = {\n id: CHESS_PLUGIN,\n name: 'Chess',\n description:\n 'Chess is a simple plugin which allows you to render an interactive chessboard inside of a plank. This chessboard can be used for collaborative chess games, or for practice experiments with the LLM. ',\n icon: 'ph--shield-chevron--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-chess',\n screenshots: ['https://dxos.network/plugin-details-chess-dark.png'],\n} satisfies PluginMeta;\n"],
5
- "mappings": ";AAIA,SAASA,GAAGC,mBAAmB;AAExB,IAAMC,aAAaC,EAAEC,QAC1BD,EAAEE,QACAF,EAAEG,OAAO;EACPC,QAAQJ,EAAEK;EACVC,QAAQN,EAAEK;EACVE,OAAOP,EAAEK;AACX,CAAA,CAAA,CAAA;AAIG,IAAMG,YAAN,cAAwBC,YAAY;EAAEC,UAAU;EAAuBC,SAAS;AAAQ,CAAA,EAC7F;EACEC,MAAMZ,EAAEa,SAASb,EAAEK,MAAM;EACzBS,aAAad,EAAEK;EACfU,aAAaf,EAAEK;EACfW,OAAOhB,EAAEC,QAAQD,EAAEiB,MAAMjB,EAAEK,MAAM,CAAA;;EAEjCa,KAAKlB,EAAEK;EACPc,KAAKnB,EAAEK;AACT,GACA;EAAEH,SAAS;AAAK,CAAA,EAAA;AACf;;;ACvBH,SAASkB,cAAcC,KAAAA,UAAS;AAChC,SAASC,wBAAwB;;;ACC1B,IAAMC,eAAe;AAErB,IAAMC,OAAO;EAClBC,IAAIF;EACJG,MAAM;EACNC,aACE;EACFC,MAAM;EACNC,QAAQ;EACRC,aAAa;IAAC;;AAChB;;;;UDNiBC,cAAAA;AACf,QAAMC,eAAe,GAAGC,YAAAA;EAEjB,MAAMC,eAAeC,GAAEC,YAAW,EAAW,GAAGJ,YAAAA,WAAuB;IAC5EK,OAAOF,GAAEG,OAAO;MACdC,MAAMJ,GAAEK,SAASL,GAAEM,MAAM;MACzBC,KAAKP,GAAEK,SAASL,GAAEM,MAAM;IAC1B,CAAA;IACAE,QAAQR,GAAEG,OAAO;MACfM,QAAQC;IACV,CAAA;EACF,CAAA,EAAA;EAAI;eARSX,SAAAA;AASf,GAZiBH,gBAAAA,cAAAA,CAAAA,EAAAA;AAcV,IAAMe,WAAW,CAACF,WAAAA;AACvB,SAAOG,iBAAiBH,MAAAA,KAAWI,aAAaH,WAAWD,MAAAA;AAC7D;",
4
+ "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { S, TypedObject } from '@dxos/echo-schema';\n\nexport const MoveSchema = S.mutable(\n S.partial(\n S.Struct({\n source: S.String,\n target: S.String,\n piece: S.String,\n }),\n ),\n);\n\nexport class ChessType extends TypedObject({ typename: 'dxos.org/type/Chess', version: '0.1.0' })(\n {\n name: S.optional(S.String),\n playerWhite: S.String,\n playerBlack: S.String,\n moves: S.mutable(S.Array(S.String)),\n // TODO(wittjosiah): Remove. Redundant with moves.\n pgn: S.String,\n fen: S.String,\n },\n { partial: true },\n) {}\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { isInstanceOf, S } from '@dxos/echo-schema';\nimport { isReactiveObject } from '@dxos/live-object';\n\nimport { ChessType } from './schema';\nimport { CHESS_PLUGIN } from '../meta';\n\nexport namespace ChessAction {\n const CHESS_ACTION = `${CHESS_PLUGIN}/action`;\n\n export class Create extends S.TaggedClass<Create>()(`${CHESS_ACTION}/create`, {\n input: S.Struct({\n name: S.optional(S.String),\n fen: S.optional(S.String),\n }),\n output: S.Struct({\n object: ChessType,\n }),\n }) {}\n}\n\nexport const isObject = (object: unknown): object is typeof ChessType => {\n return isReactiveObject(object) && isInstanceOf(ChessType, object);\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const CHESS_PLUGIN = 'dxos.org/plugin/chess';\n\nexport const meta: PluginMeta = {\n id: CHESS_PLUGIN,\n name: 'Chess',\n description:\n 'Chess is a simple plugin which allows you to render an interactive chessboard inside of a plank. This chessboard can be used for collaborative chess games, or for practice experiments with the LLM. ',\n icon: 'ph--shield-chevron--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-chess',\n screenshots: ['https://dxos.network/plugin-details-chess-dark.png'],\n};\n"],
5
+ "mappings": ";AAIA,SAASA,GAAGC,mBAAmB;AAExB,IAAMC,aAAaC,EAAEC,QAC1BD,EAAEE,QACAF,EAAEG,OAAO;EACPC,QAAQJ,EAAEK;EACVC,QAAQN,EAAEK;EACVE,OAAOP,EAAEK;AACX,CAAA,CAAA,CAAA;AAIG,IAAMG,YAAN,cAAwBC,YAAY;EAAEC,UAAU;EAAuBC,SAAS;AAAQ,CAAA,EAC7F;EACEC,MAAMZ,EAAEa,SAASb,EAAEK,MAAM;EACzBS,aAAad,EAAEK;EACfU,aAAaf,EAAEK;EACfW,OAAOhB,EAAEC,QAAQD,EAAEiB,MAAMjB,EAAEK,MAAM,CAAA;;EAEjCa,KAAKlB,EAAEK;EACPc,KAAKnB,EAAEK;AACT,GACA;EAAEH,SAAS;AAAK,CAAA,EAAA;AACf;;;ACvBH,SAASkB,cAAcC,KAAAA,UAAS;AAChC,SAASC,wBAAwB;;;ACC1B,IAAMC,eAAe;AAErB,IAAMC,OAAmB;EAC9BC,IAAIF;EACJG,MAAM;EACNC,aACE;EACFC,MAAM;EACNC,QAAQ;EACRC,aAAa;IAAC;;AAChB;;;;UDNiBC,cAAAA;AACf,QAAMC,eAAe,GAAGC,YAAAA;EAEjB,MAAMC,eAAeC,GAAEC,YAAW,EAAW,GAAGJ,YAAAA,WAAuB;IAC5EK,OAAOF,GAAEG,OAAO;MACdC,MAAMJ,GAAEK,SAASL,GAAEM,MAAM;MACzBC,KAAKP,GAAEK,SAASL,GAAEM,MAAM;IAC1B,CAAA;IACAE,QAAQR,GAAEG,OAAO;MACfM,QAAQC;IACV,CAAA;EACF,CAAA,EAAA;EAAI;eARSX,SAAAA;AASf,GAZiBH,gBAAAA,cAAAA,CAAAA,EAAAA;AAcV,IAAMe,WAAW,CAACF,WAAAA;AACvB,SAAOG,iBAAiBH,MAAAA,KAAWI,aAAaH,WAAWD,MAAAA;AAC7D;",
6
6
  "names": ["S", "TypedObject", "MoveSchema", "S", "mutable", "partial", "Struct", "source", "String", "target", "piece", "ChessType", "TypedObject", "typename", "version", "name", "optional", "playerWhite", "playerBlack", "moves", "Array", "pgn", "fen", "isInstanceOf", "S", "isReactiveObject", "CHESS_PLUGIN", "meta", "id", "name", "description", "icon", "source", "screenshots", "ChessAction", "CHESS_ACTION", "CHESS_PLUGIN", "Create", "S", "TaggedClass", "input", "Struct", "name", "optional", "String", "fen", "output", "object", "ChessType", "isObject", "isReactiveObject", "isInstanceOf"]
7
7
  }
@@ -6,16 +6,16 @@ import {
6
6
  ChessAction,
7
7
  ChessType,
8
8
  meta
9
- } from "./chunk-NNA3W3LX.mjs";
9
+ } from "./chunk-4NJ4PMPW.mjs";
10
10
  import {
11
11
  ChessComponent
12
12
  } from "./chunk-VRWXC5L2.mjs";
13
13
 
14
14
  // packages/plugins/plugin-chess/src/capabilities/index.ts
15
15
  import { lazy } from "@dxos/app-framework";
16
- var ArtifactDefinition = lazy(() => import("./artifact-definition-B4K4M4EX.mjs"));
17
- var IntentResolver = lazy(() => import("./intent-resolver-KBIH2KYC.mjs"));
18
- var ReactSurface = lazy(() => import("./react-surface-2PI2KNSU.mjs"));
16
+ var ArtifactDefinition = lazy(() => import("./artifact-definition-EXLPEMID.mjs"));
17
+ var IntentResolver = lazy(() => import("./intent-resolver-JVLCHAJD.mjs"));
18
+ var ReactSurface = lazy(() => import("./react-surface-5WUSMUJH.mjs"));
19
19
 
20
20
  // packages/plugins/plugin-chess/src/ChessPlugin.tsx
21
21
  import { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from "@dxos/app-framework";
@@ -28,12 +28,11 @@ var translations_default = [
28
28
  {
29
29
  "en-US": {
30
30
  [ChessType.typename]: {
31
- "typename label": "Game"
31
+ "typename label": "Game",
32
+ "object name placeholder": "New game"
32
33
  },
33
34
  [CHESS_PLUGIN]: {
34
35
  "plugin name": "Chess",
35
- "game title placeholder": "New game",
36
- "create game label": "Create game",
37
36
  "delete game label": "Delete"
38
37
  }
39
38
  }
@@ -53,12 +52,6 @@ var ChessPlugin = () => definePlugin(meta, [
53
52
  activate: () => contributes(Capabilities.Metadata, {
54
53
  id: ChessType.typename,
55
54
  metadata: {
56
- placeholder: [
57
- "game title placeholder",
58
- {
59
- ns: CHESS_PLUGIN
60
- }
61
- ],
62
55
  icon: "ph--shield-chevron--regular"
63
56
  }
64
57
  })
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/capabilities/index.ts", "../../../src/ChessPlugin.tsx", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const ArtifactDefinition = lazy(() => import('./artifact-definition'));\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { ClientEvents } from '@dxos/plugin-client';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { defineObjectForm } from '@dxos/plugin-space/types';\n\nimport { ArtifactDefinition, IntentResolver, ReactSurface } from './capabilities';\nimport { CHESS_PLUGIN, meta } from './meta';\nimport translations from './translations';\nimport { ChessAction, ChessType } from './types';\n\nexport const ChessPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: ChessType.typename,\n metadata: {\n placeholder: ['game title placeholder', { ns: CHESS_PLUGIN }],\n icon: 'ph--shield-chevron--regular',\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/object-form`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () =>\n contributes(\n SpaceCapabilities.ObjectForm,\n defineObjectForm({\n objectSchema: ChessType,\n getIntent: () => createIntent(ChessAction.Create),\n }),\n ),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: IntentResolver,\n }),\n defineModule({\n id: `${meta.id}/module/artifact-definition`,\n activatesOn: Events.SetupArtifactDefinition,\n activate: ArtifactDefinition,\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CHESS_PLUGIN } from './meta';\nimport { ChessType } from './types';\n\nexport default [\n {\n 'en-US': {\n [ChessType.typename]: {\n 'typename label': 'Game',\n },\n [CHESS_PLUGIN]: {\n 'plugin name': 'Chess',\n 'game title placeholder': 'New game',\n 'create game label': 'Create game',\n 'delete game label': 'Delete',\n },\n },\n },\n];\n"],
5
- "mappings": ";;;;;;;;;;;;;;AAIA,SAASA,YAAY;AAEd,IAAMC,qBAAqBC,KAAK,MAAM,OAAO,oCAAA,CAAA;AAC7C,IAAMC,iBAAiBD,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAME,eAAeF,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACJ9C,SAASG,cAAcC,aAAaC,cAAcC,cAAcC,cAAcC,cAAc;AAC5F,SAASC,oBAAoB;AAC7B,SAASC,yBAAyB;AAClC,SAASC,wBAAwB;;;ACAjC,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,UAAUC,QAAQ,GAAG;QACpB,kBAAkB;MACpB;MACA,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,0BAA0B;QAC1B,qBAAqB;QACrB,qBAAqB;MACvB;IACF;EACF;;;;ADNK,IAAMC,cAAc,MACzBC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MACRC,YAAYC,aAAaI,UAAU;MACjCV,IAAIW,UAAUC;MACdC,UAAU;QACRC,aAAa;UAAC;UAA0B;YAAEC,IAAIC;UAAa;;QAC3DC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACAlB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaiB,aAAaC;IAC1Bf,UAAU,MACRC,YACEe,kBAAkBC,YAClBC,iBAAiB;MACfC,cAAcZ;MACda,WAAW,MAAMC,aAAaC,YAAYC,MAAM;IAClD,CAAA,CAAA;EAEN,CAAA;EACA5B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO0B;IACpBxB,UAAUyB;EACZ,CAAA;EACA9B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO4B;IACpB1B,UAAU2B;EACZ,CAAA;EACAhC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO8B;IACpB5B,UAAU6B;EACZ,CAAA;CACD;",
6
- "names": ["lazy", "ArtifactDefinition", "lazy", "IntentResolver", "ReactSurface", "Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "ClientEvents", "SpaceCapabilities", "defineObjectForm", "ChessType", "typename", "CHESS_PLUGIN", "ChessPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "ChessType", "typename", "metadata", "placeholder", "ns", "CHESS_PLUGIN", "icon", "ClientEvents", "SetupSchema", "SpaceCapabilities", "ObjectForm", "defineObjectForm", "objectSchema", "getIntent", "createIntent", "ChessAction", "Create", "SetupReactSurface", "ReactSurface", "SetupIntentResolver", "IntentResolver", "SetupArtifactDefinition", "ArtifactDefinition"]
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const ArtifactDefinition = lazy(() => import('./artifact-definition'));\nexport const IntentResolver = lazy(() => import('./intent-resolver'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, defineModule, definePlugin, Events } from '@dxos/app-framework';\nimport { ClientEvents } from '@dxos/plugin-client';\nimport { SpaceCapabilities } from '@dxos/plugin-space';\nimport { defineObjectForm } from '@dxos/plugin-space/types';\n\nimport { ArtifactDefinition, IntentResolver, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport translations from './translations';\nimport { ChessAction, ChessType } from './types';\n\nexport const ChessPlugin = () =>\n definePlugin(meta, [\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/metadata`,\n activatesOn: Events.SetupMetadata,\n activate: () =>\n contributes(Capabilities.Metadata, {\n id: ChessType.typename,\n metadata: {\n icon: 'ph--shield-chevron--regular',\n },\n }),\n }),\n defineModule({\n id: `${meta.id}/module/object-form`,\n activatesOn: ClientEvents.SetupSchema,\n activate: () =>\n contributes(\n SpaceCapabilities.ObjectForm,\n defineObjectForm({\n objectSchema: ChessType,\n getIntent: () => createIntent(ChessAction.Create),\n }),\n ),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: IntentResolver,\n }),\n defineModule({\n id: `${meta.id}/module/artifact-definition`,\n activatesOn: Events.SetupArtifactDefinition,\n activate: ArtifactDefinition,\n }),\n ]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { CHESS_PLUGIN } from './meta';\nimport { ChessType } from './types';\n\nexport default [\n {\n 'en-US': {\n [ChessType.typename]: {\n 'typename label': 'Game',\n 'object name placeholder': 'New game',\n },\n [CHESS_PLUGIN]: {\n 'plugin name': 'Chess',\n 'delete game label': 'Delete',\n },\n },\n },\n];\n"],
5
+ "mappings": ";;;;;;;;;;;;;;AAIA,SAASA,YAAY;AAEd,IAAMC,qBAAqBC,KAAK,MAAM,OAAO,oCAAA,CAAA;AAC7C,IAAMC,iBAAiBD,KAAK,MAAM,OAAO,gCAAA,CAAA;AACzC,IAAME,eAAeF,KAAK,MAAM,OAAO,8BAAA,CAAA;;;ACJ9C,SAASG,cAAcC,aAAaC,cAAcC,cAAcC,cAAcC,cAAc;AAC5F,SAASC,oBAAoB;AAC7B,SAASC,yBAAyB;AAClC,SAASC,wBAAwB;;;ACAjC,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,UAAUC,QAAQ,GAAG;QACpB,kBAAkB;QAClB,2BAA2B;MAC7B;MACA,CAACC,YAAAA,GAAe;QACd,eAAe;QACf,qBAAqB;MACvB;IACF;EACF;;;;ADLK,IAAMC,cAAc,MACzBC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMC,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAT,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOO;IACpBL,UAAU,MACRC,YAAYC,aAAaI,UAAU;MACjCV,IAAIW,UAAUC;MACdC,UAAU;QACRC,MAAM;MACR;IACF,CAAA;EACJ,CAAA;EACAf,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAac,aAAaC;IAC1BZ,UAAU,MACRC,YACEY,kBAAkBC,YAClBC,iBAAiB;MACfC,cAAcT;MACdU,WAAW,MAAMC,aAAaC,YAAYC,MAAM;IAClD,CAAA,CAAA;EAEN,CAAA;EACAzB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOuB;IACpBrB,UAAUsB;EACZ,CAAA;EACA3B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOyB;IACpBvB,UAAUwB;EACZ,CAAA;EACA7B,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAO2B;IACpBzB,UAAU0B;EACZ,CAAA;CACD;",
6
+ "names": ["lazy", "ArtifactDefinition", "lazy", "IntentResolver", "ReactSurface", "Capabilities", "contributes", "createIntent", "defineModule", "definePlugin", "Events", "ClientEvents", "SpaceCapabilities", "defineObjectForm", "ChessType", "typename", "CHESS_PLUGIN", "ChessPlugin", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "SetupTranslations", "activate", "contributes", "Capabilities", "Translations", "translations", "SetupMetadata", "Metadata", "ChessType", "typename", "metadata", "icon", "ClientEvents", "SetupSchema", "SpaceCapabilities", "ObjectForm", "defineObjectForm", "objectSchema", "getIntent", "createIntent", "ChessAction", "Create", "SetupReactSurface", "ReactSurface", "SetupIntentResolver", "IntentResolver", "SetupArtifactDefinition", "ArtifactDefinition"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ChessAction,
3
3
  ChessType
4
- } from "./chunk-NNA3W3LX.mjs";
4
+ } from "./chunk-4NJ4PMPW.mjs";
5
5
 
6
6
  // packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts
7
7
  import { Chess } from "chess.js";
@@ -25,4 +25,4 @@ var intent_resolver_default = () => contributes(Capabilities.IntentResolver, cre
25
25
  export {
26
26
  intent_resolver_default as default
27
27
  };
28
- //# sourceMappingURL=intent-resolver-KBIH2KYC.mjs.map
28
+ //# sourceMappingURL=intent-resolver-JVLCHAJD.mjs.map
@@ -1 +1 @@
1
- {"inputs":{"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2089,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2700,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":3051,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-chess/src/types/index.ts":{"bytes":586,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytes":19661,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytes":2748,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytes":4522,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytes":8761,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":3335,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx","kind":"import-statement","original":"./PlayerSelector"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":908,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","kind":"dynamic-import","original":"./ChessContainer"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytes":3926,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"../components/ChessComponent"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytes":1365,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","kind":"dynamic-import","original":"./artifact-definition"},{"path":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-chess/src/translations.ts":{"bytes":1825,"imports":[{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytes":7895,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/index.ts":{"bytes":790,"imports":[{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5064},"packages/plugins/plugin-chess/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-B4K4M4EX.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-KBIH2KYC.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/react-surface-2PI2KNSU.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["ArtifactDefinition","CHESS_PLUGIN","ChessComponent","ChessContainer","ChessPlugin","IntentResolver","ReactSurface","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":273},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1623},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":325}},"bytes":2825},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs","kind":"import-statement"}],"exports":["ChessAction","ChessType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":194},"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-B4K4M4EX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":8641},"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-B4K4M4EX.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytesInOutput":6093}},"bytes":6353},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-KBIH2KYC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1374},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-KBIH2KYC.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytesInOutput":511}},"bytes":751},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-XERPODLK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6188},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-XERPODLK.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":811},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2299}},"bytes":3472},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-2PI2KNSU.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1850},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-2PI2KNSU.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytesInOutput":745}},"bytes":1107},"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":402},"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-XERPODLK.mjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":235},"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3767},"packages/plugins/plugin-chess/dist/lib/browser/chunk-NNA3W3LX.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["CHESS_PLUGIN","ChessAction","ChessType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":501},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":613},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":513}},"bytes":1966},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2436},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs":{"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"exports":["ChessComponent"],"inputs":{"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytesInOutput":990}},"bytes":1131}}}
1
+ {"inputs":{"packages/plugins/plugin-chess/src/meta.ts":{"bytes":2077,"imports":[],"format":"esm"},"packages/plugins/plugin-chess/src/types/schema.ts":{"bytes":2700,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/types/types.ts":{"bytes":3051,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-chess/src/types/index.ts":{"bytes":586,"imports":[{"path":"packages/plugins/plugin-chess/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/plugins/plugin-chess/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytes":18444,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytes":2748,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytes":4522,"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytes":8761,"imports":[{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytes":3335,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx","kind":"import-statement","original":"./PlayerSelector"}],"format":"esm"},"packages/plugins/plugin-chess/src/components/index.ts":{"bytes":908,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"./ChessComponent"},{"path":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","kind":"dynamic-import","original":"./ChessContainer"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytes":3926,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-chess/src/components/ChessComponent.tsx","kind":"import-statement","original":"../components/ChessComponent"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytes":1365,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","kind":"dynamic-import","original":"./artifact-definition"},{"path":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","kind":"dynamic-import","original":"./intent-resolver"},{"path":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"}],"format":"esm"},"packages/plugins/plugin-chess/src/translations.ts":{"bytes":1694,"imports":[{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytes":7388,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-chess/src/types/index.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-chess/src/index.ts":{"bytes":790,"imports":[{"path":"packages/plugins/plugin-chess/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-chess/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-chess/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-chess/src/ChessPlugin.tsx","kind":"import-statement","original":"./ChessPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-chess/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4837},"packages/plugins/plugin-chess/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-4NJ4PMPW.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-EXLPEMID.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-JVLCHAJD.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/react-surface-5WUSMUJH.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/plugin-client","kind":"import-statement","external":true},{"path":"@dxos/plugin-space","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true}],"exports":["ArtifactDefinition","CHESS_PLUGIN","ChessComponent","ChessContainer","ChessPlugin","IntentResolver","ReactSurface","meta"],"entryPoint":"packages/plugins/plugin-chess/src/index.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/index.ts":{"bytesInOutput":273},"packages/plugins/plugin-chess/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/ChessPlugin.tsx":{"bytesInOutput":1500},"packages/plugins/plugin-chess/src/translations.ts":{"bytesInOutput":282}},"bytes":2659},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-chess/dist/lib/browser/types/index.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-4NJ4PMPW.mjs","kind":"import-statement"}],"exports":["ChessAction","ChessType","MoveSchema","isObject"],"entryPoint":"packages/plugins/plugin-chess/src/types/index.ts","inputs":{},"bytes":194},"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-EXLPEMID.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7977},"packages/plugins/plugin-chess/dist/lib/browser/artifact-definition-EXLPEMID.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-4NJ4PMPW.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"effect","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/artifact","kind":"import-statement","external":true},{"path":"@dxos/assistant","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/plugin-space/types","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts":{"bytesInOutput":5784}},"bytes":6044},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-JVLCHAJD.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1374},"packages/plugins/plugin-chess/dist/lib/browser/intent-resolver-JVLCHAJD.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-4NJ4PMPW.mjs","kind":"import-statement"},{"path":"chess.js","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts","inputs":{"packages/plugins/plugin-chess/src/capabilities/intent-resolver.ts":{"bytesInOutput":511}},"bytes":751},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-XERPODLK.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6188},"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-XERPODLK.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-stack","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/display-name","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/components/ChessContainer.tsx","inputs":{"packages/plugins/plugin-chess/src/components/ChessContainer.tsx":{"bytesInOutput":811},"packages/plugins/plugin-chess/src/components/PlayerSelector.tsx":{"bytesInOutput":2299}},"bytes":3472},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-5WUSMUJH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1850},"packages/plugins/plugin-chess/dist/lib/browser/react-surface-5WUSMUJH.mjs":{"imports":[{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-4NJ4PMPW.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-chess/src/capabilities/react-surface.tsx":{"bytesInOutput":745}},"bytes":1107},"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":402},"packages/plugins/plugin-chess/dist/lib/browser/chunk-R26FYVUS.mjs":{"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-chess/dist/lib/browser/ChessContainer-XERPODLK.mjs","kind":"dynamic-import"}],"exports":["ChessContainer"],"inputs":{"packages/plugins/plugin-chess/src/components/index.ts":{"bytesInOutput":104}},"bytes":235},"packages/plugins/plugin-chess/dist/lib/browser/chunk-4NJ4PMPW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3759},"packages/plugins/plugin-chess/dist/lib/browser/chunk-4NJ4PMPW.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true}],"exports":["CHESS_PLUGIN","ChessAction","ChessType","MoveSchema","isObject","meta"],"inputs":{"packages/plugins/plugin-chess/src/types/schema.ts":{"bytesInOutput":501},"packages/plugins/plugin-chess/src/types/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-chess/src/types/types.ts":{"bytesInOutput":613},"packages/plugins/plugin-chess/src/meta.ts":{"bytesInOutput":513}},"bytes":1966},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":2436},"packages/plugins/plugin-chess/dist/lib/browser/chunk-VRWXC5L2.mjs":{"imports":[{"path":"chess.js","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-client/echo","kind":"import-statement","external":true},{"path":"@dxos/react-ui-gameboard","kind":"import-statement","external":true}],"exports":["ChessComponent"],"inputs":{"packages/plugins/plugin-chess/src/components/ChessComponent.tsx":{"bytesInOutput":990}},"bytes":1131}}}
@@ -5,7 +5,7 @@ import {
5
5
  CHESS_PLUGIN,
6
6
  ChessType,
7
7
  isObject
8
- } from "./chunk-NNA3W3LX.mjs";
8
+ } from "./chunk-4NJ4PMPW.mjs";
9
9
  import {
10
10
  ChessComponent
11
11
  } from "./chunk-VRWXC5L2.mjs";
@@ -39,4 +39,4 @@ var react_surface_default = () => contributes(Capabilities.ReactSurface, [
39
39
  export {
40
40
  react_surface_default as default
41
41
  };
42
- //# sourceMappingURL=react-surface-2PI2KNSU.mjs.map
42
+ //# sourceMappingURL=react-surface-5WUSMUJH.mjs.map
@@ -3,7 +3,7 @@ import {
3
3
  ChessType,
4
4
  MoveSchema,
5
5
  isObject
6
- } from "../chunk-NNA3W3LX.mjs";
6
+ } from "../chunk-4NJ4PMPW.mjs";
7
7
  export {
8
8
  ChessAction,
9
9
  ChessType,
@@ -16,12 +16,12 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var artifact_definition_DHM4H4VO_exports = {};
20
- __export(artifact_definition_DHM4H4VO_exports, {
19
+ var artifact_definition_SHL3QR2G_exports = {};
20
+ __export(artifact_definition_SHL3QR2G_exports, {
21
21
  default: () => artifact_definition_default
22
22
  });
23
- module.exports = __toCommonJS(artifact_definition_DHM4H4VO_exports);
24
- var import_chunk_VXYRI6VA = require("./chunk-VXYRI6VA.cjs");
23
+ module.exports = __toCommonJS(artifact_definition_SHL3QR2G_exports);
24
+ var import_chunk_PQ64RGCS = require("./chunk-PQ64RGCS.cjs");
25
25
  var import_chess = require("chess.js");
26
26
  var import_effect = require("effect");
27
27
  var import_app_framework = require("@dxos/app-framework");
@@ -32,22 +32,18 @@ var import_invariant = require("@dxos/invariant");
32
32
  var import_types = require("@dxos/plugin-space/types");
33
33
  var import_echo = require("@dxos/react-client/echo");
34
34
  var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-chess/src/capabilities/artifact-definition.ts";
35
- var ArtifacftId = class extends import_echo_schema.S.String.annotations({
36
- description: "ID of the artifact in <spaceid>:<artifactid> format"
37
- }) {
38
- };
39
35
  var artifact_definition_default = () => {
40
36
  const definition = (0, import_artifact.defineArtifact)({
41
- id: import_chunk_VXYRI6VA.meta.id,
42
- name: import_chunk_VXYRI6VA.meta.name,
37
+ id: import_chunk_PQ64RGCS.meta.id,
38
+ name: import_chunk_PQ64RGCS.meta.name,
43
39
  description: "Provides a simple chess engine.",
44
40
  instructions: `
45
41
  - 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.
46
42
  - Always inspect the chess game at the start of every prompt realting to a chess game, as it might have changed since the interaction.
47
43
  `,
48
- schema: import_chunk_VXYRI6VA.ChessType,
44
+ schema: import_chunk_PQ64RGCS.ChessType,
49
45
  tools: [
50
- (0, import_artifact.defineTool)(import_chunk_VXYRI6VA.meta.id, {
46
+ (0, import_artifact.defineTool)(import_chunk_PQ64RGCS.meta.id, {
51
47
  name: "create",
52
48
  description: "Create a new chess game. Returns the artifact definition for the game.",
53
49
  caption: "Creating chess game...",
@@ -59,7 +55,7 @@ var artifact_definition_default = () => {
59
55
  execute: async ({ fen }, { extensions }) => {
60
56
  (0, import_invariant.invariant)(extensions?.space, "No space", {
61
57
  F: __dxlog_file,
62
- L: 51,
58
+ L: 46,
63
59
  S: void 0,
64
60
  A: [
65
61
  "extensions?.space",
@@ -68,14 +64,14 @@ var artifact_definition_default = () => {
68
64
  });
69
65
  (0, import_invariant.invariant)(extensions?.dispatch, "No intent dispatcher", {
70
66
  F: __dxlog_file,
71
- L: 52,
67
+ L: 47,
72
68
  S: void 0,
73
69
  A: [
74
70
  "extensions?.dispatch",
75
71
  "'No intent dispatcher'"
76
72
  ]
77
73
  });
78
- const intent = (0, import_effect.pipe)((0, import_app_framework.createIntent)(import_chunk_VXYRI6VA.ChessAction.Create, {
74
+ const intent = (0, import_effect.pipe)((0, import_app_framework.createIntent)(import_chunk_PQ64RGCS.ChessAction.Create, {
79
75
  fen
80
76
  }), (0, import_app_framework.chain)(import_types.SpaceAction.AddObject, {
81
77
  target: extensions.space
@@ -87,7 +83,7 @@ var artifact_definition_default = () => {
87
83
  return import_artifact.ToolResult.Success((0, import_assistant.createArtifactElement)(data.id));
88
84
  }
89
85
  }),
90
- (0, import_artifact.defineTool)(import_chunk_VXYRI6VA.meta.id, {
86
+ (0, import_artifact.defineTool)(import_chunk_PQ64RGCS.meta.id, {
91
87
  name: "list",
92
88
  description: "Query all active chess games.",
93
89
  caption: "Getting games...",
@@ -95,17 +91,17 @@ var artifact_definition_default = () => {
95
91
  execute: async (_, { extensions }) => {
96
92
  (0, import_invariant.invariant)(extensions?.space, "No space", {
97
93
  F: __dxlog_file,
98
- L: 71,
94
+ L: 66,
99
95
  S: void 0,
100
96
  A: [
101
97
  "extensions?.space",
102
98
  "'No space'"
103
99
  ]
104
100
  });
105
- const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_VXYRI6VA.ChessType)).run();
101
+ const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_PQ64RGCS.ChessType)).run();
106
102
  (0, import_invariant.invariant)(games.length > 0, "No chess games found", {
107
103
  F: __dxlog_file,
108
- L: 73,
104
+ L: 68,
109
105
  S: void 0,
110
106
  A: [
111
107
  "games.length > 0",
@@ -115,29 +111,29 @@ var artifact_definition_default = () => {
115
111
  return import_artifact.ToolResult.Success(games);
116
112
  }
117
113
  }),
118
- (0, import_artifact.defineTool)(import_chunk_VXYRI6VA.meta.id, {
114
+ (0, import_artifact.defineTool)(import_chunk_PQ64RGCS.meta.id, {
119
115
  name: "inspect",
120
116
  description: "Get the current state of the chess game.",
121
117
  caption: "Inspecting game...",
122
118
  schema: import_echo_schema.S.Struct({
123
- id: ArtifacftId
119
+ id: import_artifact.ArtifactId
124
120
  }),
125
121
  execute: async ({ id }, { extensions }) => {
126
122
  (0, import_invariant.invariant)(extensions?.space, "No space", {
127
123
  F: __dxlog_file,
128
- L: 83,
124
+ L: 78,
129
125
  S: void 0,
130
126
  A: [
131
127
  "extensions?.space",
132
128
  "'No space'"
133
129
  ]
134
130
  });
135
- const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_VXYRI6VA.ChessType)).run();
136
- const { objectId } = (0, import_echo.parseId)(id);
137
- const game = games.find((game2) => game2.id === objectId);
138
- (0, import_invariant.invariant)((0, import_echo_schema.isInstanceOf)(import_chunk_VXYRI6VA.ChessType, game), void 0, {
131
+ const game = await extensions.space.db.query({
132
+ id: import_artifact.ArtifactId.toDXN(id).toString()
133
+ }).first();
134
+ (0, import_invariant.invariant)((0, import_echo_schema.isInstanceOf)(import_chunk_PQ64RGCS.ChessType, game), void 0, {
139
135
  F: __dxlog_file,
140
- L: 87,
136
+ L: 80,
141
137
  S: void 0,
142
138
  A: [
143
139
  "isInstanceOf(ChessType, game)",
@@ -147,12 +143,12 @@ var artifact_definition_default = () => {
147
143
  return import_artifact.ToolResult.Success(game.fen);
148
144
  }
149
145
  }),
150
- (0, import_artifact.defineTool)(import_chunk_VXYRI6VA.meta.id, {
146
+ (0, import_artifact.defineTool)(import_chunk_PQ64RGCS.meta.id, {
151
147
  name: "move",
152
148
  description: "Make a move in the chess game.",
153
149
  caption: "Making chess move...",
154
150
  schema: import_echo_schema.S.Struct({
155
- id: ArtifacftId,
151
+ id: import_artifact.ArtifactId,
156
152
  move: import_echo_schema.S.String.annotations({
157
153
  description: "The move to make in the chess game.",
158
154
  examples: [
@@ -164,19 +160,19 @@ var artifact_definition_default = () => {
164
160
  execute: async ({ id, move }, { extensions }) => {
165
161
  (0, import_invariant.invariant)(extensions?.space, "No space", {
166
162
  F: __dxlog_file,
167
- L: 103,
163
+ L: 97,
168
164
  S: void 0,
169
165
  A: [
170
166
  "extensions?.space",
171
167
  "'No space'"
172
168
  ]
173
169
  });
174
- const { objects: games } = await extensions.space.db.query(import_echo.Filter.schema(import_chunk_VXYRI6VA.ChessType)).run();
175
- const { objectId } = (0, import_echo.parseId)(id);
176
- const game = games.find((game2) => game2.id === objectId);
177
- (0, import_invariant.invariant)((0, import_echo_schema.isInstanceOf)(import_chunk_VXYRI6VA.ChessType, game), void 0, {
170
+ const game = await extensions.space.db.query({
171
+ id: import_artifact.ArtifactId.toDXN(id).toString()
172
+ }).first();
173
+ (0, import_invariant.invariant)((0, import_echo_schema.isInstanceOf)(import_chunk_PQ64RGCS.ChessType, game), void 0, {
178
174
  F: __dxlog_file,
179
- L: 107,
175
+ L: 99,
180
176
  S: void 0,
181
177
  A: [
182
178
  "isInstanceOf(ChessType, game)",
@@ -198,4 +194,4 @@ var artifact_definition_default = () => {
198
194
  });
199
195
  return (0, import_app_framework.contributes)(import_app_framework.Capabilities.ArtifactDefinition, definition);
200
196
  };
201
- //# sourceMappingURL=artifact-definition-DHM4H4VO.cjs.map
197
+ //# sourceMappingURL=artifact-definition-SHL3QR2G.cjs.map