@homie-rocks/studio 0.58.29 → 0.58.30

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/CHANGELOG.md CHANGED
@@ -17,6 +17,21 @@ To bring a studio up to date, tell Claude: "Upgrade my studio to the newest Homi
17
17
  `npx -y @homie-rocks/studio@latest upgrade`, which shows what's new since the version your studio pins (from this
18
18
  file) and what the upgrade would change, and changes nothing until you agree.
19
19
 
20
+ ## [0.58.30] - 2026-10-31
21
+
22
+ **Plugin 0.58.16**
23
+
24
+ Your own AI can now mark a lead or booking done in one call, and your own office controls act when you ask.
25
+
26
+ ### Changed
27
+
28
+ - `app_records` update changes only the fields you pass and keeps the rest, so `{status: "replied"}` is enough.
29
+ The studio owner may leave out `version` to change the record as it is now; anyone else still passes the version
30
+ they read.
31
+ - `studio_office_action` from the studio owner's own tool call acts directly; it no longer returns a browser
32
+ confirmation. Approval is your AI client's, from the tool's standard annotations (it is marked destructive).
33
+ A static office key still only asks.
34
+
20
35
  ## [0.58.29] - 2026-10-30
21
36
 
22
37
  **Plugin 0.58.15**
@@ -5202,6 +5202,48 @@
5202
5202
  }
5203
5203
  }
5204
5204
  }
5205
+ },
5206
+ "0.58.30": {
5207
+ "files": {
5208
+ "CLAUDE.md": "ddf2b2a0376202f6",
5209
+ "README.md": "684b3cca8001673c",
5210
+ "HANDOFF.md": "29337e2ace95b2e7",
5211
+ "games/README.md": "5ad32fe80c61f117",
5212
+ "music/README.md": "a3dc042dadd39df8",
5213
+ "videos/README.md": "16babc3437d5545b",
5214
+ "posts/README.md": "37841aae476bd540",
5215
+ "site/README.md": "1dbdf22c03a1e505",
5216
+ "site/src/worker.mjs": "6cc5c6131eaf6fd0"
5217
+ },
5218
+ "sections": {
5219
+ "AGENTS.md": {
5220
+ "(intro)": "af7f2f732505d379",
5221
+ "## Version-matched authoring guides": "f6261a0e5801b96b",
5222
+ "## Layout": "f3a280b8c96cd068",
5223
+ "## Apps: one screen, roles and parts": "2ecf713305fd26f5",
5224
+ "## Commands (all through the pinned CLI in node_modules)": "661cbdf5d6a9dbae",
5225
+ "## The site": "0cb8dd9a6f8a0096",
5226
+ "## Making games": "644c1e7608bb9740",
5227
+ "## The Game Codex and progress": "0738ef719cef3a4c",
5228
+ "## Art direction and models": "a48fff7bf0a5f2fc",
5229
+ "## Running live games (the back office)": "51ebf2ab756f6e4d",
5230
+ "## Servers and AI seats": "1904f45b599a33e4",
5231
+ "## Selling things (the shop)": "e5bd380cb77f2b11",
5232
+ "## Continuing a build from the Claude app": "0d68081e924ca419",
5233
+ "## Rules": "b2234d80f6cbe71d",
5234
+ "## Telling Homie": "80b46fdd9e578db8",
5235
+ "## Beta": "9d02638207a26e73"
5236
+ }
5237
+ },
5238
+ "named": {
5239
+ "Homie Arcade": {
5240
+ "sections": {
5241
+ "AGENTS.md": {
5242
+ "## Commands (all through the pinned CLI in node_modules)": "0a7b2c36414a29a0"
5243
+ }
5244
+ }
5245
+ }
5246
+ }
5205
5247
  }
5206
5248
  }
5207
5249
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homie-rocks/studio",
3
- "version": "0.58.29",
3
+ "version": "0.58.30",
4
4
  "description": "Open-source tools that let your AI build and run a multiplayer game studio on its own Cloudflare: an MCP server, multiplayer starters, Workers and Durable Objects.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -1,2 +1,2 @@
1
1
  // Generated by lib/build-identity.mjs; identifies the bundled runtime sources.
2
- export const STUDIO_BUILD = Object.freeze({"version":"0.58.29","sha256":"5d8c32ab4c91f64389e286860d365ed9e111bb037d03b772e967620649d82664"});
2
+ export const STUDIO_BUILD = Object.freeze({"version":"0.58.30","sha256":"7d9302cc4e39e658f45b557226b382c2afc4a07ff664eec1fb0745ebcfc97000"});
@@ -55,6 +55,13 @@ export function services(env, cat, origin, caller, namespace, definition = {}) {
55
55
  candidates.sort((a,b)=>Number(b[1].signIn===true)-Number(a[1].signIn===true)||(b[1].can?.length??0)-(a[1].can?.length??0)||a[0].localeCompare(b[0]));
56
56
  role=candidates[0]?.[0];
57
57
  }
58
+ // update is a patch over the record as it is now; the owner may omit version to change the current record.
59
+ if(operation==='update'||(operation==='delete'&&version===undefined)){
60
+ const current=(await records({app,role,collection,id,operation:'read'})).records?.[0];
61
+ if(!current)throw Object.assign(new Error(`No ${collection} record ${id}.`),{name:'StudioOperationError'});
62
+ if(version===undefined){if(!caller.owner)throw Object.assign(new Error('Pass the record version you read.'),{name:'StudioOperationError'});version=current.version}
63
+ if(operation==='update')data={...current.data,...(data??{})};
64
+ }
58
65
  const url = new URL(`/${app}/api/app/records/${collection}${id ? '/'+id : ''}`,origin);if(role)url.searchParams.set('role',role);
59
66
  const method = {read:'GET',create:'POST',update:'PUT',delete:'DELETE'}[operation];if (!method) throw new Error('unsupported operation');
60
67
  const request = withToolIdentity(new Request(url,{method,headers:{origin,'content-type':'application/json'},...(method==='GET'?{}:{body:JSON.stringify({data,version})})}),caller);
@@ -234,7 +241,7 @@ export function builtins(env,cat,origin) {
234
241
  const released=[];for(const h of chosen)released.push(await ctx.bookings.release({id:h.id,token,version:h.version}));
235
242
  return {released};
236
243
  }),
237
- tool('app_records','List, read, create, update or delete app records with the app role and record version.','public',object({app:str,role:str,collection:{type:'string',pattern:'^[a-z][a-z0-9-]{0,39}$'},id:{type:'string',pattern:'^[A-Za-z0-9_-]{1,64}$',description:'1–64 letters, digits, underscore or hyphen'},operation:{enum:['read','create','update','delete']},data:{type:'object',propertyNames:{pattern:'^[a-z][a-z0-9_]*$'},description:'Field names start with a lowercase letter and use lowercase letters, digits and underscore; discover fields with app_schema.'},version:{type:'integer',minimum:1}},['app','collection']), (args,ctx)=>ctx.records(args)),
244
+ tool('app_records','List, read, create, update or delete app records. update changes only the fields you pass (the rest are kept); version is the record version you read, and the studio owner may leave it out to change the current record.','public',object({app:str,role:str,collection:{type:'string',pattern:'^[a-z][a-z0-9-]{0,39}$'},id:{type:'string',pattern:'^[A-Za-z0-9_-]{1,64}$',description:'1–64 letters, digits, underscore or hyphen'},operation:{enum:['read','create','update','delete']},data:{type:'object',propertyNames:{pattern:'^[a-z][a-z0-9_]*$'},description:'Field names start with a lowercase letter and use lowercase letters, digits and underscore; discover fields with app_schema.'},version:{type:'integer',minimum:1}},['app','collection']), (args,ctx)=>ctx.records(args)),
238
245
  ];
239
246
  for(const [name,path,description] of [
240
247
  ['room_announce','announce','Announce to a room.'],['room_kick','kick','Ask the owner to remove a player.'],['room_mute','mute','Ask the owner to mute a player.'],['room_close','close','Ask the owner to close a room.'],['studio_game','game','Ask the owner to change game access or room size.'],['shop_refund','shop/refund','Ask the owner to refund an order.'],
@@ -242,7 +249,7 @@ export function builtins(env,cat,origin) {
242
249
  const reads={rooms:'office',servers:'servers',members:'servers/members',chat:'chat',lounge:'lounge',shop:'shop',orders:'shop/orders.csv',invites:'invites'};
243
250
  tools.push(tool('studio_office_read','Read an office view; use query for its existing filters and pagination.','owner',object({view:{enum:Object.keys(reads)},query:{type:'object',additionalProperties:{type:'string'}}},['view']),({view,query},ctx)=>ctx.office('/_studio/api/'+reads[view],undefined,query)));
244
251
  const actions=['announce','kick','mute','close','game','servers','servers/set','servers/close','servers/member','room-level','agents/brain','chat/rules','chat/remove','chat/report','chat/budget','lounge/rules','lounge/night','lounge/mod','lounge/remove','lounge/hold','shop/release','shop/refund','invites','invites/revoke'];
245
- tools.push(tool('studio_office_action','Use an existing office control. Destructive changes return a browser confirmation for the owner.','owner',object({operation:{enum:actions},action:{type:'object'}},['operation','action']),({operation,action},ctx)=>ctx.office('/_studio/api/'+operation,action)));
252
+ tools.push(tool('studio_office_action','Use an existing office control. Runs at once for the studio owner; destructive (kick, mute, closing a room, narrowing access).','owner',object({operation:{enum:actions},action:{type:'object'}},['operation','action']),({operation,action},ctx)=>ctx.office('/_studio/api/'+operation,action)));
246
253
  for (const op of ['sit','look','act','speak','stand']) tools.push(tool('agent_'+op, 'A marked AI guide: '+op+'. Room policy and declared vocabulary apply.', 'signed-in', object({game:str,role:str,server:str,room:str,goal:str,line:str,args:{type:'object'}},['game']), async (args,ctx)=>(await import('./mcp-room.mjs')).remoteSeat(env,cat,ctx.caller,op,args)));
247
254
  tools.push(...selling.customerTools(env,cat,origin));
248
255
  for(const tool of tools)if(!tool.annotations&&ANNOTATIONS[tool.name])tool.annotations=ANNOTATIONS[tool.name];
package/worker/office.mjs CHANGED
@@ -1312,8 +1312,9 @@ async function api(request, env, url, cat) {
1312
1312
  if (!o) return json({ ok: false, error: 'order', message: 'No such order (homie-studio shop orders lists them).' }, 404);
1313
1313
  Object.assign(action, { item: o.item, amount: Number(o.amount), currency: o.currency });
1314
1314
  }
1315
- // An office key (the owner's AI) only ASKS for what takes something away; the owner confirms with one tap.
1316
- if (who === 'office' && await needsAsk(env, cat, action)) {
1315
+ // A static office key only ASKS for what takes something away; the owner's own MCP tool call acts directly
1316
+ // (approval is the owner's client's, from the tool's standard annotations).
1317
+ if (who === 'office' && !toolIdentity(request)?.owner && await needsAsk(env, cat, action)) {
1317
1318
  if (op === 'kick' || op === 'mute') {
1318
1319
  const found = await nameIn(env, cat, action);
1319
1320
  if (!found) return json({ ok: false, error: 'no-player', message: 'Nobody is in that seat of that room now (studio_office lists who is).' }, 404);
@@ -1,2 +1,2 @@
1
1
  /** The @homie-rocks/studio version this Worker code is (package.json's; a test keeps them equal). Cache-busts /_homie/site.js. */
2
- export const STUDIO_VERSION_TAG = '0.58.29';
2
+ export const STUDIO_VERSION_TAG = '0.58.30';