@lzimul/minecraft-mcp 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +119 -30
- package/build/app/server.js +3 -3
- package/build/config/server-info.js +1 -1
- package/build/config/storage.js +15 -0
- package/build/config/world-limits.js +2 -1
- package/build/index.js +44 -1
- package/build/interfaces/block-states.interface.js +1 -0
- package/build/interfaces/block.interface.js +1 -1
- package/build/interfaces/dimension.interface.js +1 -1
- package/build/interfaces/world-store.interface.js +1 -0
- package/build/resources/data-resources.js +25 -10
- package/build/resources/dimension-resources.js +44 -28
- package/build/resources/error-content.js +12 -0
- package/build/resources/index.js +3 -3
- package/build/tools/block-tools.js +89 -52
- package/build/tools/index.js +2 -2
- package/build/tools/item-tools.js +24 -17
- package/build/utils/error-message.js +25 -0
- package/build/world/block-spec.js +74 -0
- package/build/world/block-states.js +43 -0
- package/build/world/simulated-dimension.js +97 -4
- package/build/world/stores/file-world-store.js +103 -0
- package/build/world/stores/index.js +9 -0
- package/build/world/stores/memory-world-store.js +14 -0
- package/build/world/stores/serialized-block.js +53 -0
- package/build/world/world.js +39 -0
- package/lib/app/server.d.ts +4 -3
- package/lib/app/server.d.ts.map +1 -1
- package/lib/config/dimensions.d.ts +3 -3
- package/lib/config/server-info.d.ts +15 -15
- package/lib/config/storage.d.ts +8 -0
- package/lib/config/storage.d.ts.map +1 -0
- package/lib/config/world-limits.d.ts +8 -7
- package/lib/config/world-limits.d.ts.map +1 -1
- package/lib/data/blocks.d.ts +5 -5
- package/lib/data/items.d.ts +5 -5
- package/lib/data/version.d.ts +2 -2
- package/lib/enums/bounding-box.enum.d.ts +5 -5
- package/lib/enums/dimension-type.enum.d.ts +6 -6
- package/lib/enums/icon-theme.enum.d.ts +5 -5
- package/lib/index.d.ts +3 -3
- package/lib/interfaces/block-states.interface.d.ts +2 -0
- package/lib/interfaces/block-states.interface.d.ts.map +1 -0
- package/lib/interfaces/block.interface.d.ts +14 -14
- package/lib/interfaces/data-entry.interface.d.ts +7 -7
- package/lib/interfaces/dimension.interface.d.ts +10 -10
- package/lib/interfaces/item.interface.d.ts +8 -8
- package/lib/interfaces/placed-block.interface.d.ts +10 -8
- package/lib/interfaces/placed-block.interface.d.ts.map +1 -1
- package/lib/interfaces/world-store.interface.d.ts +7 -0
- package/lib/interfaces/world-store.interface.d.ts.map +1 -0
- package/lib/resources/block-resources.d.ts +3 -3
- package/lib/resources/data-resources.d.ts +15 -21
- package/lib/resources/data-resources.d.ts.map +1 -1
- package/lib/resources/dimension-resources.d.ts +5 -4
- package/lib/resources/dimension-resources.d.ts.map +1 -1
- package/lib/resources/error-content.d.ts +8 -0
- package/lib/resources/error-content.d.ts.map +1 -0
- package/lib/resources/index.d.ts +4 -3
- package/lib/resources/index.d.ts.map +1 -1
- package/lib/resources/item-resources.d.ts +3 -3
- package/lib/schemas/block-schema.d.ts +17 -20
- package/lib/schemas/coordinate-schema.d.ts +4 -4
- package/lib/schemas/dimension-schema.d.ts +5 -7
- package/lib/schemas/item-schema.d.ts +14 -17
- package/lib/tools/block-tools.d.ts +4 -3
- package/lib/tools/block-tools.d.ts.map +1 -1
- package/lib/tools/index.d.ts +4 -3
- package/lib/tools/index.d.ts.map +1 -1
- package/lib/tools/item-tools.d.ts +3 -3
- package/lib/tools/item-tools.d.ts.map +1 -1
- package/lib/tools/result.d.ts +14 -18
- package/lib/utils/error-message.d.ts +2 -0
- package/lib/utils/error-message.d.ts.map +1 -0
- package/lib/world/block-spec.d.ts +12 -0
- package/lib/world/block-spec.d.ts.map +1 -0
- package/lib/world/block-states.d.ts +8 -0
- package/lib/world/block-states.d.ts.map +1 -0
- package/lib/world/simulated-dimension.d.ts +27 -14
- package/lib/world/simulated-dimension.d.ts.map +1 -1
- package/lib/world/stores/file-world-store.d.ts +14 -0
- package/lib/world/stores/file-world-store.d.ts.map +1 -0
- package/lib/world/stores/index.d.ts +3 -0
- package/lib/world/stores/index.d.ts.map +1 -0
- package/lib/world/stores/memory-world-store.d.ts +9 -0
- package/lib/world/stores/memory-world-store.d.ts.map +1 -0
- package/lib/world/stores/serialized-block.d.ts +12 -0
- package/lib/world/stores/serialized-block.d.ts.map +1 -0
- package/lib/world/world.d.ts +13 -0
- package/lib/world/world.d.ts.map +1 -0
- package/package.json +7 -3
- package/build/world/world-state.js +0 -16
- package/lib/world/world-state.d.ts +0 -6
- package/lib/world/world-state.d.ts.map +0 -1
package/lib/tools/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAK9D,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAK9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAGnE"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
-
export declare function registerItemTools(server: McpServer): void;
|
|
3
|
-
//# sourceMappingURL=item-tools.d.ts.map
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
+
export declare function registerItemTools(server: McpServer): void;
|
|
3
|
+
//# sourceMappingURL=item-tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"item-tools.d.ts","sourceRoot":"","sources":["../../src/tools/item-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"item-tools.d.ts","sourceRoot":"","sources":["../../src/tools/item-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAQ9D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAoDzD"}
|
package/lib/tools/result.d.ts
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
export declare function toolText(text: string): {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
];
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=result.d.ts.map
|
|
1
|
+
export declare function toolText(text: string): {
|
|
2
|
+
content: [{
|
|
3
|
+
type: 'text';
|
|
4
|
+
text: string;
|
|
5
|
+
}];
|
|
6
|
+
};
|
|
7
|
+
export declare function toolError(message: string): {
|
|
8
|
+
isError: true;
|
|
9
|
+
content: [{
|
|
10
|
+
type: 'text';
|
|
11
|
+
text: string;
|
|
12
|
+
}];
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=result.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-message.d.ts","sourceRoot":"","sources":["../../src/utils/error-message.ts"],"names":[],"mappings":"AAMA,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CA0BrD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IBlock } from '../interfaces/block.interface.js';
|
|
2
|
+
import type { BlockStates } from '../interfaces/block-states.interface.js';
|
|
3
|
+
export type BlockSpecResult = {
|
|
4
|
+
readonly ok: true;
|
|
5
|
+
readonly block: IBlock;
|
|
6
|
+
readonly states: BlockStates;
|
|
7
|
+
} | {
|
|
8
|
+
readonly ok: false;
|
|
9
|
+
readonly error: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function parseBlockSpec(input: string): BlockSpecResult;
|
|
12
|
+
//# sourceMappingURL=block-spec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-spec.d.ts","sourceRoot":"","sources":["../../src/world/block-spec.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAE3E,MAAM,MAAM,eAAe,GACvB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;CAAE,GAC3E;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAUnD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CAwE7D"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BlockStates } from '../interfaces/block-states.interface.js';
|
|
2
|
+
export declare const EMPTY_BLOCK_STATES: BlockStates;
|
|
3
|
+
export declare function isSafeStateName(name: string): boolean;
|
|
4
|
+
export declare function isSafeStateValue(value: string): boolean;
|
|
5
|
+
export declare function normalizeStates(states: BlockStates | null | undefined): BlockStates;
|
|
6
|
+
export declare function sameStates(a: BlockStates, b: BlockStates): boolean;
|
|
7
|
+
export declare function formatStates(states: BlockStates): string;
|
|
8
|
+
//# sourceMappingURL=block-states.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-states.d.ts","sourceRoot":"","sources":["../../src/world/block-states.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAE3E,eAAO,MAAM,kBAAkB,EAAE,WAA+B,CAAC;AAajE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQrD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAOvD;AAGD,wBAAgB,eAAe,CAC7B,MAAM,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GACrC,WAAW,CAgBb;AAED,wBAAgB,UAAU,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAMlE;AAGD,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAMxD"}
|
|
@@ -1,14 +1,27 @@
|
|
|
1
|
-
import type { IBlock } from '../interfaces/block.interface.js';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
import type { IBlock } from '../interfaces/block.interface.js';
|
|
2
|
+
import type { BlockStates } from '../interfaces/block-states.interface.js';
|
|
3
|
+
import type { IDimension } from '../interfaces/dimension.interface.js';
|
|
4
|
+
import type { IPlacedBlock } from '../interfaces/placed-block.interface.js';
|
|
5
|
+
import type { IWorldStore } from '../interfaces/world-store.interface.js';
|
|
6
|
+
export declare class SimulatedDimension {
|
|
7
|
+
readonly info: IDimension;
|
|
8
|
+
private readonly blocks;
|
|
9
|
+
private readonly store;
|
|
10
|
+
private readonly writeDelayMs;
|
|
11
|
+
private timer;
|
|
12
|
+
private queue;
|
|
13
|
+
private savePromise;
|
|
14
|
+
private dirty;
|
|
15
|
+
constructor(info: IDimension, store: IWorldStore, writeDelayMs?: number);
|
|
16
|
+
get modifiedBlockCount(): number;
|
|
17
|
+
get placedBlocks(): readonly IPlacedBlock[];
|
|
18
|
+
load(): Promise<void>;
|
|
19
|
+
contains(x: number, y: number, z: number): boolean;
|
|
20
|
+
canSetBlock(x: number, y: number, z: number): boolean;
|
|
21
|
+
getBlock(x: number, y: number, z: number): IBlock;
|
|
22
|
+
getStates(x: number, y: number, z: number): BlockStates;
|
|
23
|
+
setBlock(x: number, y: number, z: number, block: IBlock, states?: BlockStates): IBlock;
|
|
24
|
+
flush(): Promise<void>;
|
|
25
|
+
private scheduleFlush;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=simulated-dimension.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simulated-dimension.d.ts","sourceRoot":"","sources":["../../src/world/simulated-dimension.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"simulated-dimension.d.ts","sourceRoot":"","sources":["../../src/world/simulated-dimension.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAQ1E,qBAAa,kBAAkB;IAC7B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAE1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmC;IAC1D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAc;IACpC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,KAAK,CAA8C;IAC3D,OAAO,CAAC,KAAK,CAAoC;IACjD,OAAO,CAAC,WAAW,CAA8B;IACjD,OAAO,CAAC,KAAK,CAAS;gBAEV,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,SAAK;IAMnE,IAAI,kBAAkB,IAAI,MAAM,CAE/B;IAED,IAAI,YAAY,IAAI,SAAS,YAAY,EAAE,CAE1C;IAGK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAsB3B,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO;IAYlD,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO;IAOrD,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;IAIjD,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,WAAW;IAMvD,QAAQ,CACN,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,WAAgC,GACvC,MAAM;IA4CH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAiC5B,OAAO,CAAC,aAAa;CAatB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { EDimensionType } from '../../enums/dimension-type.enum.js';
|
|
2
|
+
import type { IPlacedBlock } from '../../interfaces/placed-block.interface.js';
|
|
3
|
+
import type { IWorldStore } from '../../interfaces/world-store.interface.js';
|
|
4
|
+
export declare class FileWorldStore implements IWorldStore {
|
|
5
|
+
private readonly directory;
|
|
6
|
+
private directoryReady;
|
|
7
|
+
constructor(directory: string);
|
|
8
|
+
private ensureDirectory;
|
|
9
|
+
private fileFor;
|
|
10
|
+
load(type: EDimensionType): Promise<readonly IPlacedBlock[]>;
|
|
11
|
+
save(type: EDimensionType, blocks: readonly IPlacedBlock[]): Promise<void>;
|
|
12
|
+
private quarantine;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=file-world-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-world-store.d.ts","sourceRoot":"","sources":["../../../src/world/stores/file-world-store.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAmB7E,qBAAa,cAAe,YAAW,WAAW;IAChD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,cAAc,CAAS;gBAEnB,SAAS,EAAE,MAAM;YAIf,eAAe;IAO7B,OAAO,CAAC,OAAO;IAIT,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;IAuD5D,IAAI,CACR,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,OAAO,CAAC,IAAI,CAAC;YAsCF,UAAU;CAWzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/world/stores/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAE7E,wBAAgB,gBAAgB,IAAI,WAAW,CAK9C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { EDimensionType } from '../../enums/dimension-type.enum.js';
|
|
2
|
+
import type { IPlacedBlock } from '../../interfaces/placed-block.interface.js';
|
|
3
|
+
import type { IWorldStore } from '../../interfaces/world-store.interface.js';
|
|
4
|
+
export declare class MemoryWorldStore implements IWorldStore {
|
|
5
|
+
private readonly worlds;
|
|
6
|
+
load(type: EDimensionType): Promise<readonly IPlacedBlock[]>;
|
|
7
|
+
save(type: EDimensionType, blocks: readonly IPlacedBlock[]): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=memory-world-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-world-store.d.ts","sourceRoot":"","sources":["../../../src/world/stores/memory-world-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAM7E,qBAAa,gBAAiB,YAAW,WAAW;IAClD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsD;IAEvE,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC;IAK5D,IAAI,CACR,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,OAAO,CAAC,IAAI,CAAC;CAQjB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IPlacedBlock } from '../../interfaces/placed-block.interface.js';
|
|
2
|
+
import type { BlockStates } from '../../interfaces/block-states.interface.js';
|
|
3
|
+
export interface ISerializedBlock {
|
|
4
|
+
readonly x: number;
|
|
5
|
+
readonly y: number;
|
|
6
|
+
readonly z: number;
|
|
7
|
+
readonly block: string;
|
|
8
|
+
readonly states?: BlockStates;
|
|
9
|
+
}
|
|
10
|
+
export declare function toSerialized(placed: IPlacedBlock): ISerializedBlock;
|
|
11
|
+
export declare function fromSerialized(entry: unknown): IPlacedBlock | null;
|
|
12
|
+
//# sourceMappingURL=serialized-block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serialized-block.d.ts","sourceRoot":"","sources":["../../../src/world/stores/serialized-block.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAG9E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,gBAAgB,CAiBnE;AAkBD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,GAAG,IAAI,CAyBlE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SimulatedDimension } from './simulated-dimension.js';
|
|
2
|
+
import type { EDimensionType } from '../enums/dimension-type.enum.js';
|
|
3
|
+
import type { IDimension } from '../interfaces/dimension.interface.js';
|
|
4
|
+
import type { IWorldStore } from '../interfaces/world-store.interface.js';
|
|
5
|
+
export declare class World {
|
|
6
|
+
private readonly dimensions;
|
|
7
|
+
private constructor();
|
|
8
|
+
static load(store: IWorldStore, writeDelayMs?: number): Promise<World>;
|
|
9
|
+
static listDimensions(): readonly IDimension[];
|
|
10
|
+
getDimension(type: EDimensionType): SimulatedDimension;
|
|
11
|
+
flush(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=world.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"world.d.ts","sourceRoot":"","sources":["../../src/world/world.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAS1E,qBAAa,KAAK;IAChB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkD;IAE7E,OAAO;WAMM,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,YAAY,SAAK,GAAG,OAAO,CAAC,KAAK,CAAC;IAsBxE,MAAM,CAAC,cAAc,IAAI,SAAS,UAAU,EAAE;IAI9C,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,kBAAkB;IAUhD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAc7B"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lzimul/minecraft-mcp",
|
|
3
3
|
"description": "Minecraft Model Context Protocol (MCP) Server",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "lZiMUl",
|
|
7
7
|
"email": "lZiMUl@lzimul.com",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
"dev": "npm run build && npm run start",
|
|
44
44
|
"generate-data": "node ./scripts/generate-data.mjs",
|
|
45
45
|
"clean": "node ./scripts/clean.mjs",
|
|
46
|
-
"test": "node ./scripts/smoke-test.mjs"
|
|
46
|
+
"test": "node ./scripts/smoke-test.mjs && node ./scripts/persistence-test.mjs && node ./scripts/error-test.mjs && node ./scripts/stress-test.mjs",
|
|
47
|
+
"test:stress": "node ./scripts/stress-test.mjs"
|
|
47
48
|
},
|
|
48
49
|
"files": [
|
|
49
50
|
"./build/",
|
|
@@ -60,7 +61,10 @@
|
|
|
60
61
|
"minecraft-mcp"
|
|
61
62
|
],
|
|
62
63
|
"engines": {
|
|
63
|
-
"node": ">=
|
|
64
|
+
"node": ">=22"
|
|
65
|
+
},
|
|
66
|
+
"overrides": {
|
|
67
|
+
"katex": "^0.19.1"
|
|
64
68
|
},
|
|
65
69
|
"dependencies": {
|
|
66
70
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { DIMENSIONS } from '../config/dimensions.js';
|
|
2
|
-
import { SimulatedDimension } from './simulated-dimension.js';
|
|
3
|
-
const dimensions = new Map(DIMENSIONS.map(dimension => [
|
|
4
|
-
dimension.type,
|
|
5
|
-
new SimulatedDimension(dimension)
|
|
6
|
-
]));
|
|
7
|
-
export function getDimension(type) {
|
|
8
|
-
const dimension = dimensions.get(type);
|
|
9
|
-
if (!dimension) {
|
|
10
|
-
throw new Error(`Unknown dimension: ${type}`);
|
|
11
|
-
}
|
|
12
|
-
return dimension;
|
|
13
|
-
}
|
|
14
|
-
export function listDimensions() {
|
|
15
|
-
return DIMENSIONS;
|
|
16
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { EDimensionType } from '../enums/dimension-type.enum.js';
|
|
2
|
-
import type { IDimension } from '../interfaces/dimension.interface.js';
|
|
3
|
-
import { SimulatedDimension } from './simulated-dimension.js';
|
|
4
|
-
export declare function getDimension(type: EDimensionType): SimulatedDimension;
|
|
5
|
-
export declare function listDimensions(): readonly IDimension[];
|
|
6
|
-
//# sourceMappingURL=world-state.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"world-state.d.ts","sourceRoot":"","sources":["../../src/world/world-state.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAS9D,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,kBAAkB,CAMrE;AAED,wBAAgB,cAAc,IAAI,SAAS,UAAU,EAAE,CAEtD"}
|