@gripforgeai/mcp 0.1.17 → 0.1.18

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.
@@ -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 { GameImportAgent, confinedFile, saveImportJob } from './game-import-agent.js';
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gripforgeai/mcp",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
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",