@gripforgeai/mcp 0.1.17 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/architecture-tools.js +10 -0
- package/dist/game-import-extract.js +6 -2
- package/dist/server.js +7 -5
- package/package.json +1 -1
|
@@ -5,6 +5,15 @@ export const ARCHITECTURE_TOOL_NAMES = ['gripforge_architecture_schema', 'gripfo
|
|
|
5
5
|
export function registerArchitectureTools(register, options, schema = z) {
|
|
6
6
|
const identifier = schema.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,159}$/);
|
|
7
7
|
const ref = schema.object({ assetId: identifier, revisionId: identifier, fileRole: identifier.optional() }).strict();
|
|
8
|
+
const point = schema.tuple([schema.number().min(-150).max(150), schema.number().min(-150).max(150), schema.number().min(-150).max(150)]);
|
|
9
|
+
const finishMaterial = { id: schema.string().regex(/^[a-zA-Z0-9_-]{1,48}$/), color: schema.string().regex(/^#[0-9a-f]{6}$/i), roughness: schema.number().min(.05).max(1).optional(), metalness: schema.number().min(0).max(1).optional() };
|
|
10
|
+
const finish = schema.object({ version: schema.literal(1),
|
|
11
|
+
remove: schema.array(schema.object({ center: point, size: schema.tuple([schema.number().min(.001).max(100), schema.number().min(.001).max(100), schema.number().min(.001).max(100)]), rotation: schema.tuple([schema.number().min(-Math.PI * 2).max(Math.PI * 2), schema.number().min(-Math.PI * 2).max(Math.PI * 2), schema.number().min(-Math.PI * 2).max(Math.PI * 2)]).optional() }).strict()).max(64),
|
|
12
|
+
parts: schema.array(schema.discriminatedUnion('kind', [
|
|
13
|
+
schema.object({ kind: schema.literal('shutter'), ...finishMaterial, origin: point, yaw: schema.number().min(-Math.PI * 2).max(Math.PI * 2).optional(), width: schema.number().min(.2).max(15), height: schema.number().min(.1).max(12), slatHeight: schema.number().min(.035).max(.3).optional() }).strict(),
|
|
14
|
+
schema.object({ kind: schema.literal('railing'), ...finishMaterial, points: schema.array(point).min(2).max(16), height: schema.number().min(.1).max(12), postSpacing: schema.number().min(.2).max(3).optional(), barSpacing: schema.number().min(.05).max(.5).optional(), postRadius: schema.number().min(.015).max(.1).optional(), barRadius: schema.number().min(.006).max(.05).optional(), railRadius: schema.number().min(.01).max(.08).optional() }).strict(),
|
|
15
|
+
])).min(1).max(32),
|
|
16
|
+
}).strict().describe('Free deterministic repair of an owned source + delivery. All coordinates are Y-up metres AFTER the returned importTransform. Explicit oriented removal boxes (rotation XYZ radians), regular shutters (+Z outward, yaw radians) and railing paths (feet, vertical posts, supports slopes). Measure and review regions first. Applied AFTER each LOD simplification to keep thin parts straight. Textures outside cuts stay byte-identical; removed surfaces are not capped. Triangle targets remain soft. No AI auto-segmentation or collision repair.');
|
|
8
17
|
const building = schema.object({
|
|
9
18
|
id: schema.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9_-]{0,47}$/).optional(),
|
|
10
19
|
name: schema.string().min(1).max(100).optional(), prompt: schema.string().min(3).max(300),
|
|
@@ -22,6 +31,7 @@ export function registerArchitectureTools(register, options, schema = z) {
|
|
|
22
31
|
meshQuality: schema.object({ geometry: schema.enum(['standard', '2k', '4k']).optional(), texture: schema.enum(['2k', '4k', '8k']).optional() }).strict().optional().describe('Meshy 7.1 quality. Defaults standard geometry and 2K PBR. Multi-image supports standard/2k geometry only. Texture resolution is preserved during optimization. Read the updated quote.'),
|
|
23
32
|
delivery: schema.object({ lods: schema.array(schema.object({ triangles: schema.number().int().min(1000).max(200000), textureSize: schema.union([schema.literal(1024), schema.literal(2048), schema.literal(4096), schema.literal(8192)]), maxError: schema.number().min(0).max(.02).optional(), lockBorder: schema.boolean().optional() }).strict()).min(1).max(3) }).strict().optional().describe('Preserve an immutable full-detail source without provider remeshing, then prepare 1–3 independent LOD GLBs. Highest detail first, decreasing triangles and texture sizes. Default maxError=.001, lockBorder=true prioritizes detail and may exceed targets. For distant levels, explicitly allow e.g. maxError=.005/.01 and lockBorder=false after review. Shared metric fit and preserved PBR. No normal rebake, runtime LOD switching or inferred collision. Also works with source at no provider cost.'),
|
|
24
33
|
source: ref.optional().describe('Reuse an owned static GLB revision instead of paying for this building. The source is never modified.'),
|
|
34
|
+
finish: finish.optional(),
|
|
25
35
|
}).strict();
|
|
26
36
|
const material = schema.record(schema.string(), schema.unknown()).describe('SceneMaterialOverride: color, roughness, metalness, map/normalMap/roughnessMap/metalnessMap as owned immutable SceneAssetRef, repeat:[u,v]. Validated by the shared Scene Engine.');
|
|
27
37
|
const district = schema.object({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { execFile } from 'node:child_process';
|
|
2
2
|
import { promisify } from 'node:util';
|
|
3
|
-
import { mkdir, readdir, realpath } from 'node:fs/promises';
|
|
4
|
-
import {
|
|
3
|
+
import { mkdir, readdir, realpath, writeFile } from 'node:fs/promises';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { GameImportAgent, confinedFile, saveImportJob, jobDirectory } from './game-import-agent.js';
|
|
5
6
|
const exec = promisify(execFile);
|
|
6
7
|
/** Explicit adapters; never execute a binary discovered inside the source game. */
|
|
7
8
|
export async function extractGame(job) {
|
|
@@ -10,6 +11,9 @@ export async function extractGame(job) {
|
|
|
10
11
|
throw Error('Extraction plan and authorized rights basis required');
|
|
11
12
|
if (job.report.engine.name !== 'unity')
|
|
12
13
|
throw Error('This adapter only handles Unity. Use the existing Unreal source-project exporter for Unreal.');
|
|
14
|
+
// Preserve the original discovery graph before an extractor replaces the active inventory.
|
|
15
|
+
await writeFile(join(jobDirectory(job.id), 'source-report.json'), JSON.stringify(job.report, null, 2), { flag: 'wx', mode: 0o600 }).catch(error => { if (error.code !== 'EEXIST')
|
|
16
|
+
throw error; });
|
|
13
17
|
await mkdir(e.output, { recursive: true, mode: 0o700 });
|
|
14
18
|
const agent = new GameImportAgent(job);
|
|
15
19
|
await agent.checkpoint();
|
package/dist/server.js
CHANGED
|
@@ -2206,17 +2206,19 @@ server.tool('gripforge_font', 'Google-font CSS + exact HUD copy (DMC: Cinzel D
|
|
|
2206
2206
|
return err(String(data.error ?? res.status));
|
|
2207
2207
|
return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
|
|
2208
2208
|
});
|
|
2209
|
-
server.tool('gripforge_loading_page', 'Loading overlay for Three/Godot/Unity/Unreal. Title is text. Overlay 0 credits. Pass character_id to generate a 16:9 cinematic still of that Library character (1 credit, no letters in the image).', {
|
|
2210
|
-
|
|
2209
|
+
server.tool('gripforge_loading_page', 'Loading overlay for Three/Godot/Unity/Unreal. project_id uses persistent quoted generation: action quote → accept → get → apply, with creation_id and quote_token. Title is text. Overlay 0 credits. Pass character_id to generate a 16:9 cinematic still of that Library character (1 credit, no letters in the image).', {
|
|
2210
|
+
project_id: z.string().optional(), action: z.enum(['quote', 'accept', 'get', 'apply']).optional(), creation_id: z.string().optional(), quote_token: z.string().optional(),
|
|
2211
|
+
prompt: z.string().min(2).max(2000).describe('e.g. devil may cry like'),
|
|
2211
2212
|
character_id: z.string().optional().describe('lib_… character/enemy/bind — generate background still'),
|
|
2212
|
-
}, async (
|
|
2213
|
+
}, async (args) => {
|
|
2214
|
+
const { prompt, character_id } = args;
|
|
2213
2215
|
if (!API_KEY)
|
|
2214
2216
|
return err('GRIPFORGE_API_KEY missing.');
|
|
2215
|
-
if (character_id) {
|
|
2217
|
+
if (character_id || args.project_id) {
|
|
2216
2218
|
const res = await fetch(`${API_URL}/api/v1/loading-page`, {
|
|
2217
2219
|
method: 'POST',
|
|
2218
2220
|
headers: { ...apiHeaders(), 'content-type': 'application/json' },
|
|
2219
|
-
body: JSON.stringify(
|
|
2221
|
+
body: JSON.stringify(args),
|
|
2220
2222
|
});
|
|
2221
2223
|
const data = await res.json().catch(() => ({}));
|
|
2222
2224
|
if (!res.ok)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gripforgeai/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "The tools your AI needs to make your games. Turn prompts into production-ready game assets \u2014 animated characters with their weapons attached, seamless textures, terrain, VFX, HUDs \u2014 and playable game kits Unity, Godot, Unreal or Three.js can load.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|