@theprototype/agent 1.59.0 → 1.60.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theprototype/agent",
3
- "version": "1.59.0",
3
+ "version": "1.60.0",
4
4
  "description": "Let an AI agent (Claude Code, Claude Desktop, any MCP host) join a theprototype.app session from its link and build the 3D scene with you.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/catalog.js CHANGED
@@ -70,7 +70,33 @@ export const TOOL_ANNOTATIONS = /** @type {Record<string, {title: string, read?:
70
70
  connect: { title: 'Join a session', destructive: false, openWorld: true },
71
71
  // 86-fix N2: the connector's join — the person confirms in the tab; joining may replace what the tab shows
72
72
  join_session: { title: 'Join a session (asks the person)', destructive: true, openWorld: true },
73
- where_are_users: { title: 'Where the people are', read: true }
73
+ where_are_users: { title: 'Where the people are', read: true },
74
+ // 85-scene (85b)
75
+ create_hud: { title: 'Add a HUD', destructive: false },
76
+ edit_hud: { title: 'Change the HUD', destructive: true },
77
+ list_hud: { title: 'Read the HUD', read: true },
78
+ hud_panel: { title: 'Add a HUD panel', destructive: false },
79
+ set_sky: { title: 'Change the sky and fog', destructive: true },
80
+ set_light: { title: 'Change the scene light', destructive: true },
81
+ get_environment: { title: 'Read the sky and light', read: true },
82
+ place_spawn: { title: 'Set where Play starts', destructive: true },
83
+ set_play_camera: { title: 'Set the play camera and opening view', destructive: true },
84
+ // 85b 85-world
85
+ search_assets: { title: 'Find assets', read: true, openWorld: true },
86
+ place_asset: { title: 'Place an asset', destructive: false, openWorld: true },
87
+ prefab: { title: 'Save or place a prefab', destructive: false },
88
+ create_particles: { title: 'Add particles', destructive: true },
89
+ scatter: { title: 'Scatter over a surface', destructive: true },
90
+ terrain: { title: 'Make or shape terrain', destructive: true },
91
+ water: { title: 'Add or change water', destructive: true },
92
+ place_sound: { title: 'Place a sound', destructive: false, openWorld: true },
93
+ set_music: { title: 'Set the background music', destructive: true, openWorld: true },
94
+ update_mesh: { title: 'Change a mesh made from data', destructive: true },
95
+ // 85b R1-R4
96
+ inspect_runtime: { title: 'See what the game is doing', read: true },
97
+ validate_scene: { title: 'Check the game for problems', read: true },
98
+ logs: { title: 'Read the recent log', read: true },
99
+ playtest: { title: 'Play the game as a test player', destructive: false }
74
100
  });
75
101
 
76
102
  /** a title from a tool name: `create_objects` → `Create objects` @param {string} name */
@@ -123,7 +149,7 @@ export const GUIDANCE = [
123
149
  },
124
150
  { line: 'Call list_scene before editing so you use real uuids; batch many objects into one call.', on: ['list_scene', 'create_objects', 'update_objects'] },
125
151
  {
126
- line: 'For "in front of me", "here" or "this", call where_are_users and build at the spots it gives, facing the person.',
152
+ line: 'For "in front of me", call where_are_users and build at the spots it gives, facing the person (face_user: true). For "here" or "this", build at the person\'s latest ping: at: {ping: "latest"}; ask them to ping (Ctrl+Alt+click, or Ping in the menu) if they have none.',
127
153
  on: ['where_are_users', 'create_objects']
128
154
  },
129
155
  { line: 'For "give me a flashlight" or another prop, make the object, then attach_to_user to the person who asked.', on: ['attach_to_user'] },
@@ -219,9 +245,9 @@ export function buildCatalog(hostTools, opts = {}) {
219
245
  * which carries the fine tool's own schema and description, so nothing about a tool is lost by grouping it.
220
246
  * mcp-shapes: a family may also have a BATCH — `batch: {key, tool}` — called as `{<key>: [...]}` with no action
221
247
  * (create_shape {shapes: [{action, mesh: {...}}, ...]}); the families map carries it as action `<key>`.
222
- * Reserved, not built yet: edit_shape `update` (G6b update_mesh), assets search / place / prefab (85-world, 85b),
223
- * set_look environment / sky / light (85-scene, 85b), create_shape from_image (73's image-to-3D is generate_mesh,
224
- * which the connector leaves out).
248
+ * 85b built edit_shape `update` (G6b update_mesh), assets search / place / prefab and the effects family (85-world),
249
+ * set_look sky / light / environment (environment = the read), hud and game_setup (85-scene). Reserved, not built
250
+ * yet: create_shape from_image (73's image-to-3D is generate_mesh, which the connector leaves out).
225
251
  * @type {Readonly<Record<string, {title: string, summary: string, actions: Record<string, string>, batch?: {key: string, tool: string}}>>}
226
252
  */
227
253
  export const CONNECTOR_FAMILIES = Object.freeze({
@@ -235,13 +261,13 @@ export const CONNECTOR_FAMILIES = Object.freeze({
235
261
  edit_shape: {
236
262
  title: 'Reshape or model objects',
237
263
  summary:
238
- 'Change the shape of objects that exist: params = new size / segments / type in place, mesh = model faces and vertices (extrude, inset, bevel, subdivide, weld, smooth, dissolve, make a face), pivot = the point an object turns about, pivot_group = a group at a joint so several parts swing together.',
239
- actions: { params: 'set_geometry', mesh: 'edit_mesh', pivot: 'set_pivot', pivot_group: 'create_pivot' }
264
+ 'Change the shape of objects that exist: params = new size / segments / type in place, mesh = model faces and vertices (extrude, inset, bevel, subdivide, weld, smooth, dissolve, make a face), update = new vertices / faces for a mesh made from data (replace it, or patch a range), pivot = the point an object turns about, pivot_group = a group at a joint so several parts swing together.',
265
+ actions: { params: 'set_geometry', mesh: 'edit_mesh', update: 'update_mesh', pivot: 'set_pivot', pivot_group: 'create_pivot' }
240
266
  },
241
267
  set_look: {
242
- title: 'Materials, shaders, UVs and post effects',
268
+ title: 'Materials, shaders, sky, light and post effects',
243
269
  summary:
244
- 'How things look: material = colour, roughness, metal, glow, see-through and textures (a library image, a CC0 material by name or an https image); list_materials / get_material read them; shader / edit_shader / assign_shader / shader_nodes = node shaders on objects; post / get_post / post_graph = the scene\'s post effects (bloom, colour grade, vignette; the host is asked first); unwrap / uv = texture mapping and tiling.',
270
+ 'How things look: material = colour, roughness, metal, glow, see-through and textures (a library image, a CC0 material by name or an https image); list_materials / get_material read them; shader / edit_shader / assign_shader / shader_nodes = node shaders on objects; sky = the sky image, background, fog and exposure; light = the sun, ambient and environment lights; environment reads both; post / get_post / post_graph = the scene\'s post effects (bloom, colour grade, vignette); sky, light and post change the whole scene, so the host is asked first; unwrap / uv = texture mapping and tiling.',
245
271
  actions: {
246
272
  material: 'set_material',
247
273
  list_materials: 'list_materials',
@@ -254,13 +280,46 @@ export const CONNECTOR_FAMILIES = Object.freeze({
254
280
  get_post: 'get_post',
255
281
  post_graph: 'create_post_graph',
256
282
  unwrap: 'uv_unwrap',
257
- uv: 'set_uv'
283
+ uv: 'set_uv',
284
+ sky: 'set_sky',
285
+ light: 'set_light',
286
+ environment: 'get_environment'
258
287
  }
259
288
  },
289
+ // 85b R1-R4 (lane 85-runtime): playtest is agent-page only (B4b), so the connector's `run` has no playtest;
290
+ // play / stop stay control_simulation's (K1: start Play only when the person asks)
291
+ run: {
292
+ title: 'See and check what the game does',
293
+ summary:
294
+ "What the game does when it runs: inspect = when each event and action last fired, the game state and variables, errors, and why a node did not fire (pass node or object); validate = what would not work when someone presses Play, each with its fix; logs = the tab's recent errors, warnings and toasts.",
295
+ actions: { inspect: 'inspect_runtime', validate: 'validate_scene', logs: 'logs' }
296
+ },
260
297
  assets: {
261
298
  title: 'Images and assets',
262
- summary: 'The shared library: image = put an image into it (an https URL, base64 data, or a canvas you describe) and get its hash for textures.',
263
- actions: { image: 'add_image' }
299
+ summary:
300
+ 'Assets to build with: search = find models, prefabs, sounds, images, CC0 materials and HDRIs by words (library, packs, Poly Haven); place = put a found model or prefab into the scene; prefab = keep objects as a reusable prefab, or place copies of one; image = put an image into the library (an https URL, base64 data, or a canvas you describe) and get its hash for textures.',
301
+ actions: { search: 'search_assets', place: 'place_asset', prefab: 'prefab', image: 'add_image' }
302
+ },
303
+ // 85b (1.60, the tool budget's effects row)
304
+ effects: {
305
+ title: 'Terrain, scatter, water, particles and sound',
306
+ summary:
307
+ 'The world around the build: terrain = make or shape ground (noise hills, sculpt, paint layers); scatter = many trees, rocks or flowers over a terrain or mesh, with slope / height rules; water = a pool, lake or ocean, or make an object water; particles = fire, smoke, sparkles, fireflies, rain, snow … by preset; sound = a positional sound (looping, or on click / enter); music = the scene\'s background track.',
308
+ actions: { terrain: 'terrain', scatter: 'scatter', water: 'water', particles: 'create_particles', sound: 'place_sound', music: 'set_music' }
309
+ },
310
+ // 85-scene (85b): 85 H1 / H2 + the panel shape 67's scene panels reuse
311
+ hud: {
312
+ title: 'Game HUD',
313
+ summary:
314
+ 'The game\'s 2D screen overlay: create = screens of elements (timer, score text, bars, buttons, images) and their ids; list = what is there and what each element is bound to; update = change, move or remove elements and screens; panel = a backdrop with rows (a menu, a scoreboard). Bind live values with hudtext / hudbar / hudtimer flow nodes whose element is an id.',
315
+ actions: { create: 'create_hud', list: 'list_hud', update: 'edit_hud', panel: 'hud_panel' }
316
+ },
317
+ // 85-scene (85b): 85 H3 + H6; levels / portal / loading / checkpoint join with 91 / 93
318
+ game_setup: {
319
+ title: 'Game setup: spawn and play camera',
320
+ summary:
321
+ 'How the game starts: spawn = where Play starts and which way the player faces; play_camera = first person walking or flying (speed, jump, eye height) and openingView = where the editor camera starts when the scene opens.',
322
+ actions: { spawn: 'place_spawn', play_camera: 'set_play_camera' }
264
323
  }
265
324
  });
266
325
 
package/src/mcpTools.js CHANGED
@@ -150,8 +150,15 @@ export const WHERE_ARE_USERS_TOOL = {
150
150
  description:
151
151
  'Where each person in the session is and which way they look (their desktop camera, or the VR headset): position, facing as a compass yaw ' +
152
152
  'plus forward and right vectors, the floor under them, and ready-made spots 1.5 m and 3 m in front of them at floor level. ' +
153
- 'The entry with "you": true is the person you act as. Use it for "in front of me", "around me", "behind me", "to my left".',
154
- inputSchema: { type: 'object', properties: {} }
153
+ 'The entry with "you": true is the person you act as. Use it for "in front of me", "around me", "behind me", "to my left". ' +
154
+ 'A person can PING a spot (Ctrl+Alt+click, Ping in a menu, the VR stick click): each row carries their latestPing, and pings: true lists the ' +
155
+ 'recent ones (2 minutes). For "put it here", build with create_objects / update_objects at: {ping: "latest"} (align: "surface" for a wall). ' +
156
+ 'Each row also has body (eye, height, shoulder, hip, knee, reach, room — "a table at hip height") and, in VR, hands (left, right, apart — "as wide as my hands"). ' +
157
+ 'Nothing you make may appear inside a person in VR (0.45 m around the head, through the body): that call is refused and says so.',
158
+ inputSchema: {
159
+ type: 'object',
160
+ properties: { pings: { type: 'boolean', description: 'also list the recent pings (85b S2): id, who, how long ago, position, surface normal, the object it is on' } }
161
+ }
155
162
  };
156
163
 
157
164
  /** @returns {any[]} */