@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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { getBlockByName } from '../../data/blocks.js';
|
|
2
|
+
import { normalizeStates } from '../block-states.js';
|
|
3
|
+
export function toSerialized(placed) {
|
|
4
|
+
const states = normalizeStates(placed.states);
|
|
5
|
+
if (Object.keys(states).length === 0) {
|
|
6
|
+
return {
|
|
7
|
+
x: placed.x,
|
|
8
|
+
y: placed.y,
|
|
9
|
+
z: placed.z,
|
|
10
|
+
block: placed.block.key
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
x: placed.x,
|
|
15
|
+
y: placed.y,
|
|
16
|
+
z: placed.z,
|
|
17
|
+
block: placed.block.key,
|
|
18
|
+
states
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function readStates(value) {
|
|
22
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
const states = {};
|
|
26
|
+
for (const [key, propertyValue] of Object.entries(value)) {
|
|
27
|
+
if (typeof propertyValue === 'string' && propertyValue.length > 0) {
|
|
28
|
+
states[key] = propertyValue;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return normalizeStates(states);
|
|
32
|
+
}
|
|
33
|
+
export function fromSerialized(entry) {
|
|
34
|
+
if (typeof entry !== 'object' || entry === null || Array.isArray(entry)) {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
const record = entry;
|
|
38
|
+
const { x, y, z, block } = record;
|
|
39
|
+
if (typeof x !== 'number' ||
|
|
40
|
+
typeof y !== 'number' ||
|
|
41
|
+
typeof z !== 'number' ||
|
|
42
|
+
!Number.isInteger(x) ||
|
|
43
|
+
!Number.isInteger(y) ||
|
|
44
|
+
!Number.isInteger(z) ||
|
|
45
|
+
typeof block !== 'string') {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const resolved = getBlockByName(block.toLowerCase());
|
|
49
|
+
if (!resolved) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
return { x, y, z, block: resolved, states: readStates(record.states) };
|
|
53
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DIMENSIONS } from '../config/dimensions.js';
|
|
2
|
+
import { toErrorMessage } from '../utils/error-message.js';
|
|
3
|
+
import { SimulatedDimension } from './simulated-dimension.js';
|
|
4
|
+
export class World {
|
|
5
|
+
dimensions;
|
|
6
|
+
constructor(dimensions) {
|
|
7
|
+
this.dimensions = dimensions;
|
|
8
|
+
}
|
|
9
|
+
static async load(store, writeDelayMs = 25) {
|
|
10
|
+
const entries = await Promise.all(DIMENSIONS.map(async (dimension) => {
|
|
11
|
+
const simulated = new SimulatedDimension(dimension, store, writeDelayMs);
|
|
12
|
+
try {
|
|
13
|
+
await simulated.load();
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
throw new Error(`Failed to load the ${dimension.displayName} world: ${toErrorMessage(error)}`, { cause: error });
|
|
17
|
+
}
|
|
18
|
+
return [dimension.type, simulated];
|
|
19
|
+
}));
|
|
20
|
+
return new World(new Map(entries));
|
|
21
|
+
}
|
|
22
|
+
static listDimensions() {
|
|
23
|
+
return DIMENSIONS;
|
|
24
|
+
}
|
|
25
|
+
getDimension(type) {
|
|
26
|
+
const dimension = this.dimensions.get(type);
|
|
27
|
+
if (!dimension) {
|
|
28
|
+
throw new Error(`Unknown dimension "${type}". Use "overworld", "the_nether" or "the_end".`);
|
|
29
|
+
}
|
|
30
|
+
return dimension;
|
|
31
|
+
}
|
|
32
|
+
async flush() {
|
|
33
|
+
const results = await Promise.allSettled([...this.dimensions.values()].map(dimension => dimension.flush()));
|
|
34
|
+
const failures = results.filter((result) => result.status === 'rejected');
|
|
35
|
+
if (failures.length > 0) {
|
|
36
|
+
throw new Error(failures.map(failure => toErrorMessage(failure.reason)).join('; '));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
package/lib/app/server.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
+
import type { World } from '../world/world.js';
|
|
3
|
+
export declare function createServer(world: World): McpServer;
|
|
4
|
+
//# sourceMappingURL=server.d.ts.map
|
package/lib/app/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/app/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAMzD,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/app/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAMzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,CAKpD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { IDimension } from '../interfaces/dimension.interface.js';
|
|
2
|
-
export declare const DIMENSIONS: readonly IDimension[];
|
|
3
|
-
//# sourceMappingURL=dimensions.d.ts.map
|
|
1
|
+
import type { IDimension } from '../interfaces/dimension.interface.js';
|
|
2
|
+
export declare const DIMENSIONS: readonly IDimension[];
|
|
3
|
+
//# sourceMappingURL=dimensions.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { EIconTheme } from '../enums/icon-theme.enum.js';
|
|
2
|
-
export declare const SERVER_INFO: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=server-info.d.ts.map
|
|
1
|
+
import { EIconTheme } from '../enums/icon-theme.enum.js';
|
|
2
|
+
export declare const SERVER_INFO: {
|
|
3
|
+
name: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
version: string;
|
|
7
|
+
websiteUrl: string;
|
|
8
|
+
icons: {
|
|
9
|
+
src: string;
|
|
10
|
+
mimeType: string;
|
|
11
|
+
sizes: string[];
|
|
12
|
+
theme: EIconTheme;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=server-info.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type EWorldStorageKind = 'file' | 'memory';
|
|
2
|
+
export interface IWorldStorageConfig {
|
|
3
|
+
readonly kind: EWorldStorageKind;
|
|
4
|
+
readonly directory: string;
|
|
5
|
+
readonly writeDelayMs: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const WORLD_STORAGE: IWorldStorageConfig;
|
|
8
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/config/storage.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAElD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAeD,eAAO,MAAM,aAAa,EAAE,mBAI3B,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export declare const WORLD_LIMITS: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export declare const WORLD_LIMITS: {
|
|
2
|
+
readonly minHorizontal: -30000000;
|
|
3
|
+
readonly maxHorizontal: 30000000;
|
|
4
|
+
readonly minVertical: -64;
|
|
5
|
+
readonly maxVertical: 320;
|
|
6
|
+
readonly maxModifiedBlocks: 250000;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=world-limits.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"world-limits.d.ts","sourceRoot":"","sources":["../../src/config/world-limits.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"world-limits.d.ts","sourceRoot":"","sources":["../../src/config/world-limits.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;CAOf,CAAC"}
|
package/lib/data/blocks.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IBlock } from '../interfaces/block.interface.js';
|
|
2
|
-
export declare const MINECRAFT_BLOCKS: readonly IBlock[];
|
|
3
|
-
export declare const MINECRAFT_BLOCK_COUNT: number;
|
|
4
|
-
export declare function getBlockByName(name: string): IBlock | undefined;
|
|
5
|
-
//# sourceMappingURL=blocks.d.ts.map
|
|
1
|
+
import type { IBlock } from '../interfaces/block.interface.js';
|
|
2
|
+
export declare const MINECRAFT_BLOCKS: readonly IBlock[];
|
|
3
|
+
export declare const MINECRAFT_BLOCK_COUNT: number;
|
|
4
|
+
export declare function getBlockByName(name: string): IBlock | undefined;
|
|
5
|
+
//# sourceMappingURL=blocks.d.ts.map
|
package/lib/data/items.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IItem } from '../interfaces/item.interface.js';
|
|
2
|
-
export declare const MINECRAFT_ITEMS: readonly IItem[];
|
|
3
|
-
export declare const MINECRAFT_ITEM_COUNT: number;
|
|
4
|
-
export declare function getItemByName(name: string): IItem | undefined;
|
|
5
|
-
//# sourceMappingURL=items.d.ts.map
|
|
1
|
+
import type { IItem } from '../interfaces/item.interface.js';
|
|
2
|
+
export declare const MINECRAFT_ITEMS: readonly IItem[];
|
|
3
|
+
export declare const MINECRAFT_ITEM_COUNT: number;
|
|
4
|
+
export declare function getItemByName(name: string): IItem | undefined;
|
|
5
|
+
//# sourceMappingURL=items.d.ts.map
|
package/lib/data/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const MINECRAFT_DATA_VERSION =
|
|
2
|
-
//# sourceMappingURL=version.d.ts.map
|
|
1
|
+
export declare const MINECRAFT_DATA_VERSION = "26.1";
|
|
2
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare enum EBoundingBox {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
//# sourceMappingURL=bounding-box.enum.d.ts.map
|
|
1
|
+
export declare enum EBoundingBox {
|
|
2
|
+
Empty = "empty",
|
|
3
|
+
Block = "block"
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=bounding-box.enum.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare enum EDimensionType {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=dimension-type.enum.d.ts.map
|
|
1
|
+
export declare enum EDimensionType {
|
|
2
|
+
Overworld = "overworld",
|
|
3
|
+
TheNether = "the_nether",
|
|
4
|
+
TheEnd = "the_end"
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=dimension-type.enum.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare enum EIconTheme {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
//# sourceMappingURL=icon-theme.enum.d.ts.map
|
|
1
|
+
export declare enum EIconTheme {
|
|
2
|
+
Light = "light",
|
|
3
|
+
Dark = "dark"
|
|
4
|
+
}
|
|
5
|
+
//# sourceMappingURL=icon-theme.enum.d.ts.map
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
export {};
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export {};
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"block-states.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/block-states.interface.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { EBoundingBox } from '../enums/bounding-box.enum.js';
|
|
2
|
-
import type { IDataEntry } from './data-entry.interface.js';
|
|
3
|
-
export interface IBlock extends IDataEntry {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=block.interface.d.ts.map
|
|
1
|
+
import { EBoundingBox } from '../enums/bounding-box.enum.js';
|
|
2
|
+
import type { IDataEntry } from './data-entry.interface.js';
|
|
3
|
+
export interface IBlock extends IDataEntry {
|
|
4
|
+
readonly hardness: number;
|
|
5
|
+
readonly resistance: number;
|
|
6
|
+
readonly stackSize: number;
|
|
7
|
+
readonly diggable: boolean;
|
|
8
|
+
readonly material: string;
|
|
9
|
+
readonly transparent: boolean;
|
|
10
|
+
readonly emitLight: number;
|
|
11
|
+
readonly filterLight: number;
|
|
12
|
+
readonly boundingBox: EBoundingBox;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=block.interface.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface IDataEntry {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=data-entry.interface.d.ts.map
|
|
1
|
+
export interface IDataEntry {
|
|
2
|
+
readonly id: number;
|
|
3
|
+
readonly key: string;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly displayName: string;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=data-entry.interface.d.ts.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { EDimensionType } from '../enums/dimension-type.enum.js';
|
|
2
|
-
export interface IDimension {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=dimension.interface.d.ts.map
|
|
1
|
+
import { EDimensionType } from '../enums/dimension-type.enum.js';
|
|
2
|
+
export interface IDimension {
|
|
3
|
+
readonly key: string;
|
|
4
|
+
readonly type: EDimensionType;
|
|
5
|
+
readonly displayName: string;
|
|
6
|
+
readonly minY: number;
|
|
7
|
+
readonly maxY: number;
|
|
8
|
+
readonly hasSkylight: boolean;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=dimension.interface.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { IDataEntry } from './data-entry.interface.js';
|
|
2
|
-
export interface IItem extends IDataEntry {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
//# sourceMappingURL=item.interface.d.ts.map
|
|
1
|
+
import type { IDataEntry } from './data-entry.interface.js';
|
|
2
|
+
export interface IItem extends IDataEntry {
|
|
3
|
+
readonly stackSize: number;
|
|
4
|
+
readonly maxDurability?: number;
|
|
5
|
+
readonly enchantCategories?: readonly string[];
|
|
6
|
+
readonly repairWith?: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=item.interface.d.ts.map
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import type { BlockStates } from './block-states.interface.js';
|
|
2
|
+
import type { IBlock } from './block.interface.js';
|
|
3
|
+
export interface IPlacedBlock {
|
|
4
|
+
readonly x: number;
|
|
5
|
+
readonly y: number;
|
|
6
|
+
readonly z: number;
|
|
7
|
+
readonly block: IBlock;
|
|
8
|
+
readonly states: BlockStates;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=placed-block.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placed-block.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/placed-block.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,MAAM,WAAW,YAAY;IAC3B,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;
|
|
1
|
+
{"version":3,"file":"placed-block.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/placed-block.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAEnD,MAAM,WAAW,YAAY;IAC3B,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,EAAE,WAAW,CAAC;CAC9B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { EDimensionType } from '../enums/dimension-type.enum.js';
|
|
2
|
+
import type { IPlacedBlock } from './placed-block.interface.js';
|
|
3
|
+
export interface IWorldStore {
|
|
4
|
+
load(type: EDimensionType): Promise<readonly IPlacedBlock[]>;
|
|
5
|
+
save(type: EDimensionType, blocks: readonly IPlacedBlock[]): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=world-store.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"world-store.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/world-store.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,YAAY,EAAE,CAAC,CAAC;IAC7D,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5E"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
-
export declare function registerBlockResources(server: McpServer): void;
|
|
3
|
-
//# sourceMappingURL=block-resources.d.ts.map
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
+
export declare function registerBlockResources(server: McpServer): void;
|
|
3
|
+
//# sourceMappingURL=block-resources.d.ts.map
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
-
import type { IDataEntry } from '../interfaces/data-entry.interface.js';
|
|
3
|
-
export declare function registerDataIndexResource<T extends IDataEntry>(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
pathPrefix: string;
|
|
17
|
-
category: string;
|
|
18
|
-
entries: readonly T[];
|
|
19
|
-
}
|
|
20
|
-
): void;
|
|
21
|
-
//# sourceMappingURL=data-resources.d.ts.map
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
+
import type { IDataEntry } from '../interfaces/data-entry.interface.js';
|
|
3
|
+
export declare function registerDataIndexResource<T extends IDataEntry>(server: McpServer, config: {
|
|
4
|
+
name: string;
|
|
5
|
+
uri: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
entries: readonly T[];
|
|
9
|
+
}): void;
|
|
10
|
+
export declare function registerDataEntryResources<T extends IDataEntry>(server: McpServer, config: {
|
|
11
|
+
pathPrefix: string;
|
|
12
|
+
category: string;
|
|
13
|
+
entries: readonly T[];
|
|
14
|
+
}): void;
|
|
15
|
+
//# sourceMappingURL=data-resources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-resources.d.ts","sourceRoot":"","sources":["../../src/resources/data-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"data-resources.d.ts","sourceRoot":"","sources":["../../src/resources/data-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAI9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAYxE,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,UAAU,EAC5D,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE;IACN,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC;CACvB,GACA,IAAI,CA6BN;AAED,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,UAAU,EAC7D,MAAM,EAAE,SAAS,EACjB,MAAM,EAAE;IACN,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC;CACvB,GACA,IAAI,CAwBN"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
+
import { World } from '../world/world.js';
|
|
3
|
+
export declare function registerDimensionIndexResource(server: McpServer, world: World): void;
|
|
4
|
+
export declare function registerDimensionResources(server: McpServer, world: World): void;
|
|
5
|
+
//# sourceMappingURL=dimension-resources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dimension-resources.d.ts","sourceRoot":"","sources":["../../src/resources/dimension-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"dimension-resources.d.ts","sourceRoot":"","sources":["../../src/resources/dimension-resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAM9D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AA2B1C,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,KAAK,GACX,IAAI,CA+BN;AAED,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,KAAK,GACX,IAAI,CA2BN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-content.d.ts","sourceRoot":"","sources":["../../src/resources/error-content.ts"],"names":[],"mappings":"AAOA,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,OAAO,GACb;IAAE,QAAQ,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAUtE"}
|
package/lib/resources/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
+
import type { World } from '../world/world.js';
|
|
3
|
+
export declare function registerResources(server: McpServer, world: World): void;
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAS9D,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAS9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/C,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAKvE"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
-
export declare function registerItemResources(server: McpServer): void;
|
|
3
|
-
//# sourceMappingURL=item-resources.d.ts.map
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
+
export declare function registerItemResources(server: McpServer): void;
|
|
3
|
+
//# sourceMappingURL=item-resources.d.ts.map
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import * as z from 'zod/v4';
|
|
2
|
-
import type { IBlock } from '../interfaces/block.interface.js';
|
|
3
|
-
export declare const blockInfoSchema: z.ZodObject<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export type BlockInfo = z.infer<typeof blockInfoSchema>;
|
|
19
|
-
export declare function toBlockInfo(block: IBlock): BlockInfo;
|
|
20
|
-
//# sourceMappingURL=block-schema.d.ts.map
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import type { IBlock } from '../interfaces/block.interface.js';
|
|
3
|
+
export declare const blockInfoSchema: z.ZodObject<{
|
|
4
|
+
key: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
displayName: z.ZodString;
|
|
7
|
+
hardness: z.ZodNumber;
|
|
8
|
+
resistance: z.ZodNumber;
|
|
9
|
+
diggable: z.ZodBoolean;
|
|
10
|
+
transparent: z.ZodBoolean;
|
|
11
|
+
emitLight: z.ZodNumber;
|
|
12
|
+
filterLight: z.ZodNumber;
|
|
13
|
+
boundingBox: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type BlockInfo = z.infer<typeof blockInfoSchema>;
|
|
16
|
+
export declare function toBlockInfo(block: IBlock): BlockInfo;
|
|
17
|
+
//# sourceMappingURL=block-schema.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as z from 'zod/v4';
|
|
2
|
-
export declare const horizontalCoordinate: z.ZodNumber;
|
|
3
|
-
export declare const verticalCoordinate: z.ZodNumber;
|
|
4
|
-
//# sourceMappingURL=coordinate-schema.d.ts.map
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export declare const horizontalCoordinate: z.ZodNumber;
|
|
3
|
+
export declare const verticalCoordinate: z.ZodNumber;
|
|
4
|
+
//# sourceMappingURL=coordinate-schema.d.ts.map
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import * as z from 'zod/v4';
|
|
2
|
-
import { EDimensionType } from '../enums/dimension-type.enum.js';
|
|
3
|
-
export declare const dimensionSchema: z.ZodDefault<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const dimensionTypeSchema: z.ZodEnum<typeof EDimensionType>;
|
|
7
|
-
//# sourceMappingURL=dimension-schema.d.ts.map
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { EDimensionType } from '../enums/dimension-type.enum.js';
|
|
3
|
+
export declare const dimensionSchema: z.ZodDefault<z.ZodEnum<typeof EDimensionType>>;
|
|
4
|
+
export declare const dimensionTypeSchema: z.ZodEnum<typeof EDimensionType>;
|
|
5
|
+
//# sourceMappingURL=dimension-schema.d.ts.map
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import * as z from 'zod/v4';
|
|
2
|
-
import type { IItem } from '../interfaces/item.interface.js';
|
|
3
|
-
export declare const itemInfoSchema: z.ZodObject<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export type ItemInfo = z.infer<typeof itemInfoSchema>;
|
|
16
|
-
export declare function toItemInfo(item: IItem): ItemInfo;
|
|
17
|
-
//# sourceMappingURL=item-schema.d.ts.map
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import type { IItem } from '../interfaces/item.interface.js';
|
|
3
|
+
export declare const itemInfoSchema: z.ZodObject<{
|
|
4
|
+
key: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
displayName: z.ZodString;
|
|
7
|
+
stackSize: z.ZodNumber;
|
|
8
|
+
maxDurability: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
enchantCategories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
|
+
repairWith: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export type ItemInfo = z.infer<typeof itemInfoSchema>;
|
|
13
|
+
export declare function toItemInfo(item: IItem): ItemInfo;
|
|
14
|
+
//# sourceMappingURL=item-schema.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
+
import type { World } from '../world/world.js';
|
|
3
|
+
export declare function registerBlockTools(server: McpServer, world: World): void;
|
|
4
|
+
//# sourceMappingURL=block-tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-tools.d.ts","sourceRoot":"","sources":["../../src/tools/block-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"block-tools.d.ts","sourceRoot":"","sources":["../../src/tools/block-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAgB9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAe/C,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAuKxE"}
|
package/lib/tools/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
+
import type { World } from '../world/world.js';
|
|
3
|
+
export declare function registerTools(server: McpServer, world: World): void;
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|