@maka/maka-cli 5.105.0 → 5.109.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.
Files changed (41) hide show
  1. package/bundle/typescript/package.json +1 -1
  2. package/bundle/typescript/src/command.js +13 -0
  3. package/bundle/typescript/src/command.js.map +1 -1
  4. package/bundle/typescript/src/commands/game/sideQuest/augmentations.d.ts +12 -0
  5. package/bundle/typescript/src/commands/game/sideQuest/augmentations.js +3 -0
  6. package/bundle/typescript/src/commands/game/sideQuest/augmentations.js.map +1 -1
  7. package/bundle/typescript/src/commands/game/sideQuest/commands/call.d.ts +19 -0
  8. package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +71 -0
  9. package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
  10. package/bundle/typescript/src/commands/game/sideQuest/commands/deck.js +4 -0
  11. package/bundle/typescript/src/commands/game/sideQuest/commands/deck.js.map +1 -1
  12. package/bundle/typescript/src/commands/game/sideQuest/commands/download.d.ts +46 -0
  13. package/bundle/typescript/src/commands/game/sideQuest/commands/download.js +128 -0
  14. package/bundle/typescript/src/commands/game/sideQuest/commands/download.js.map +1 -0
  15. package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.d.ts +30 -2
  16. package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js +39 -0
  17. package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js.map +1 -1
  18. package/bundle/typescript/src/commands/game/sideQuest/game.js +3 -1
  19. package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
  20. package/bundle/typescript/src/commands/game/sideQuest/models/device.d.ts +58 -0
  21. package/bundle/typescript/src/commands/game/sideQuest/models/device.js +66 -0
  22. package/bundle/typescript/src/commands/game/sideQuest/models/device.js.map +1 -1
  23. package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +22 -5
  24. package/bundle/typescript/src/commands/game/sideQuest/models/player.js +37 -3
  25. package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
  26. package/bundle/typescript/src/commands/game/sideQuest/utilities/ar.js +20 -0
  27. package/bundle/typescript/src/commands/game/sideQuest/utilities/ar.js.map +1 -1
  28. package/bundle/typescript/src/commands/game/sideQuest/utilities/condition-report.js +23 -1
  29. package/bundle/typescript/src/commands/game/sideQuest/utilities/condition-report.js.map +1 -1
  30. package/bundle/typescript/src/commands/game/sideQuest/utilities/grid-view.js +17 -0
  31. package/bundle/typescript/src/commands/game/sideQuest/utilities/grid-view.js.map +1 -1
  32. package/bundle/typescript/src/commands/registry.js +1 -1
  33. package/bundle/typescript/src/commands/registry.js.map +1 -1
  34. package/bundle/typescript/src/commands/update.js +29 -6
  35. package/bundle/typescript/src/commands/update.js.map +1 -1
  36. package/bundle/typescript/src/tool.d.ts +21 -0
  37. package/bundle/typescript/src/tool.js.map +1 -1
  38. package/bundle/typescript/src/tools/mpi/shared-verb.d.ts +20 -0
  39. package/bundle/typescript/src/tools/mpi/shared-verb.js +36 -0
  40. package/bundle/typescript/src/tools/mpi/shared-verb.js.map +1 -0
  41. package/package.json +1 -1
@@ -0,0 +1,128 @@
1
+ import { Command } from './command.js';
2
+ import { hint } from '../utilities/hints.js';
3
+ import { Category } from '../types/shared/item-enum.js';
4
+ import { fuzzyPickName } from '../utilities/fuzzy-match.js';
5
+ import { fileReach, planeTintItemName } from '../utilities/planes.js';
6
+ /**
7
+ * "download" -- WRITE A FILE OUT OF THE GRID AND ONTO SOMETHING YOU CAN
8
+ * HAND OVER.
9
+ *
10
+ * Two reports, one hole:
11
+ *
12
+ * aNeh5TELvdgeS2vpg (Deditri): "paydata in this run is stuck with the
13
+ * sprite, It won't give it to me and there is not way to get it to
14
+ * Marrow."
15
+ *
16
+ * MxiKYFGeStiyvibJN (Maka): "there needs to be a way to move data from
17
+ * matrix to meatworld in the form of 'download'."
18
+ *
19
+ * THE CONVERSION ALREADY EXISTED AND HAD NO NAME. take.ts has flipped a
20
+ * matrix-plane file to `meat` and re-categorised it as a Datachip for a
21
+ * while now -- "pulled down ... written to a chip". So the mechanic was
22
+ * built; what was missing was a VERB anybody would think to type, and a
23
+ * source other than the floor.
24
+ *
25
+ * THE SPRITE IS THE CASE THAT HAD NO ROUTE AT ALL. `take` reads the
26
+ * ROOM's inventory, and Deditri's chip was in a compiled sprite's hands.
27
+ * `give` was no help from either end: it refuses whenever an actor is off
28
+ * the meat plane, and a sprite is `plane: 'matrix'` by construction, so
29
+ * "order sprite give me the chip" could never work. The only route left
30
+ * was `decompile` -- destroying your own sprite to make it drop the
31
+ * loot -- which is exactly the "hidden, non-obvious solution" the vetting
32
+ * described. It is also a lousy trade the player has no way to know they
33
+ * are making.
34
+ *
35
+ * SO THIS VERB READS BOTH SOURCES: files loose on the grid where you are
36
+ * standing, and files carried by YOUR OWN compiled sprites. Somebody
37
+ * else's sprite is not a shelf you may take from -- that is a hack, and
38
+ * hack.ts owns it.
39
+ *
40
+ * DELIBERATELY NOT A TEST. Pulling a file you already have reach on is
41
+ * not an opposed action in this engine -- `take` does not roll for it
42
+ * either, and getting past whatever GUARDED the file is what the host
43
+ * crack and the mark already charged for. Adding dice here would price
44
+ * the same obstacle twice.
45
+ */
46
+ export class DownloadCommand extends Command {
47
+ static verb = 'download';
48
+ static description = 'Write a file out of the Matrix onto a chip you carry -- "download <file>". Reads data loose on the grid where you stand AND data your own sprites are holding, which is the one place nothing else could reach it. A downloaded file is ordinary meat-world cargo: you can carry it, stash it, or hand it to somebody.';
49
+ async execute(args = []) {
50
+ const actor = this.actor;
51
+ const room = actor.currentLocation;
52
+ // WHAT IS IN REACH, from both sources.
53
+ //
54
+ // The room's own files honour fileReach (utilities/planes.ts) -- a
55
+ // host's contents are inside the host and an offline server wants a
56
+ // body in the room -- because a download that ignored the boundary
57
+ // would be a way to read a sealed host from the street, which is the
58
+ // very thing eJANPpm7qCaCAJBJw was filed about.
59
+ const reach = fileReach(actor, room);
60
+ const loose = reach === 'open'
61
+ ? room.inventory.getAllItems().filter(i => i.plane === 'matrix')
62
+ : [];
63
+ // YOUR sprites, not everyone's. `compiledBy` is not modelled on the
64
+ // shell, so ownership is "it is in YOUR companion list" -- which is
65
+ // the same thing the order/decompile verbs already mean by it.
66
+ const mine = (this.game?.companions ?? []).filter(c => c.kind === 'sprite');
67
+ const carried = [];
68
+ for (const entry of mine) {
69
+ for (const item of entry.npc.inventory.getAllItems()) {
70
+ if (item.plane === 'matrix')
71
+ carried.push({ npc: entry.npc, item });
72
+ }
73
+ }
74
+ if (loose.length === 0 && carried.length === 0) {
75
+ return `Nothing to pull down -- no data on the grid here, and nothing your sprites are carrying.${reach === 'enter' ? hint(` (This room's files live INSIDE its host -- "enter" first.)`) : ''}`;
76
+ }
77
+ // Bare "download" is the LIST. A verb whose whole reason for existing
78
+ // is that nobody could find the file should say what it can see.
79
+ const query = args.join(' ').trim();
80
+ if (query.length === 0) {
81
+ const lines = [`{cyan-fg}Within reach to pull down:{/cyan-fg}`];
82
+ for (const i of loose)
83
+ lines.push(` ${planeTintItemName(i, actor.plane)} -- loose on the grid here`);
84
+ for (const c of carried)
85
+ lines.push(` ${planeTintItemName(c.item, actor.plane)} -- held by ${c.npc.name}`);
86
+ lines.push(hint(`("download <file>" writes it to a chip you carry.)`));
87
+ return lines.join('\n');
88
+ }
89
+ const names = [...loose.map(i => i.name), ...carried.map(c => c.item.name)];
90
+ const picked = fuzzyPickName(query, names);
91
+ if (!picked) {
92
+ return `No file called "${query}" within reach.${hint(` ("download" on its own lists what is.)`)}`;
93
+ }
94
+ const fromSprite = carried.find(c => c.item.name === picked);
95
+ const item = fromSprite ? fromSprite.item : loose.find(i => i.name === picked);
96
+ // THE CONVERSION, identical to take.ts's. Same two fields, because a
97
+ // file that came down by one verb and a file that came down by the
98
+ // other must be the same object afterwards -- a chip you can `give`.
99
+ try {
100
+ actor.addInventory(item);
101
+ }
102
+ catch {
103
+ return `You can't carry any more -- ${item.name} stays where it is.`;
104
+ }
105
+ if (fromSprite) {
106
+ fromSprite.npc.inventory.removeItem(item.name);
107
+ }
108
+ else {
109
+ room.inventory.removeItem(item.name);
110
+ room.plainSightItems.delete(item.name.toLowerCase());
111
+ }
112
+ item.plane = 'meat';
113
+ item.category = Category.Datachip;
114
+ actor.performAction('pulls a file down', `${item.name} writing to a chip`);
115
+ this.logger.write(`${actor.name} downloaded "${item.name}"${fromSprite ? ` from ${fromSprite.npc.name}` : ` from ${room.name}`}.`);
116
+ this.scene.updateStatus();
117
+ return fromSprite
118
+ ? [
119
+ `{cyan-fg}${fromSprite.npc.name} opens its hands and the data pours out of them.{/cyan-fg}`,
120
+ `You pull {bold}{underline}${item.name}{/underline}{/bold} down onto a chip -- meat-world cargo now.${hint(` (You can "give ${item.name}" to somebody standing in front of you.)`)}`,
121
+ ].join('\n')
122
+ : [
123
+ `{cyan-fg}You pull {bold}{underline}${item.name}{/underline}{/bold} down off the grid -- written to a chip.{/cyan-fg}`,
124
+ hint(`(Meat-world cargo now: carry it, stash it, or "give" it to somebody.)`),
125
+ ].join('\n');
126
+ }
127
+ }
128
+ //# sourceMappingURL=download.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"download.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/commands/download.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAY,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAItE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,OAAO,eAAgB,SAAQ,OAAO;IAChC,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC;IACzB,MAAM,CAAC,WAAW,GAAG,wTAAwT,CAAC;IAExV,KAAK,CAAC,O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CAAC,GAAG,CAAC,IAAI,4DAA4D;gBAC3F,6BAA6B,IAAI,CAAC,IAAI,gEAAgE,IAAI,CAAC,mBAAmB,IAAI,CAAC,IAAI,0CAA0C,CAAC,EAAE;aACrL,CAAC,IAAI,CAAC,IAAI,CAAC;YACZ,CAAC,CAAC;gBACA,sCAAsC,IAAI,CAAC,IAAI,uEAAuE;gBACtH,IAAI,CAAC,uEAAuE,CAAC;aAC9E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC"}
@@ -1,6 +1,34 @@
1
- import { Room } from '../models/_index.js';
1
+ import { Room, IRoomConstructorConfig } from '../models/_index.js';
2
2
  import { IRoomSeedJson } from '../types/seed/room-seed.js';
3
+ import type { IRoomGrid } from '../utilities/room-grid.js';
3
4
  export declare class RoomFactory {
4
5
  createRoomFromJson(config: IRoomSeedJson): Promise<Room>;
5
- private convertToRoomConfigFromJson;
6
+ convertToRoomConfigFromJson(roomJson: IRoomSeedJson): IRoomConstructorConfig;
6
7
  }
8
+ /**
9
+ * THE ONE-ASSEMBLER GRID EXPORT (maka-cli.com contract, 2026-09-01).
10
+ *
11
+ * The web sheet renders a room's true geometry from the save's embedded
12
+ * hub seed. Grid synthesis is deterministic (room-grid.ts's contract),
13
+ * but the INPUT ASSEMBLY is not trivially so -- ensureGrid resolves
14
+ * declared exit bindings and kind-matched doorways, and this engine has
15
+ * already paid twice for a second assembler drifting (the direction-
16
+ * blind doorway bug, the centroid hub bug -- both documented in
17
+ * ensureGrid). So the web calls THIS, which builds the room from its
18
+ * seed exactly as the scene factory does -- same whitelist, same
19
+ * declared-binding rule (scene-factory.ts:202) -- and asks the room's
20
+ * OWN ensureGrid. One assembler; a wrapper, not a re-implementation.
21
+ *
22
+ * Exit values are the seed's target-room NAMES (Room.exits accepts
23
+ * strings; ensureGrid only reads the direction keys), so no Door
24
+ * machinery and no neighbor rooms are needed. terrainHints stay
25
+ * whatever the Room ctor derives -- a fresh-from-seed room has no
26
+ * device-opened regions, which matches a fresh boot; a mid-session
27
+ * device unlock changes walkability, not walls/spots/doors, so the
28
+ * rendered geometry stays honest either way.
29
+ *
30
+ * Caller must be inside a session context (Room construction resolves
31
+ * the ambient logger) -- the web's runInSession wrapper, as with the
32
+ * character factory.
33
+ */
34
+ export declare function roomGridFromSeed(seed: IRoomSeedJson): IRoomGrid | undefined;
@@ -5,6 +5,8 @@ export class RoomFactory {
5
5
  const room = new Room(roomConfig);
6
6
  return room;
7
7
  }
8
+ // Public since the roomGridFromSeed export below reuses it -- the same
9
+ // whitelist building the same config, which is the whole point.
8
10
  convertToRoomConfigFromJson(roomJson) {
9
11
  return {
10
12
  name: roomJson.name,
@@ -31,4 +33,41 @@ export class RoomFactory {
31
33
  };
32
34
  }
33
35
  }
36
+ /**
37
+ * THE ONE-ASSEMBLER GRID EXPORT (maka-cli.com contract, 2026-09-01).
38
+ *
39
+ * The web sheet renders a room's true geometry from the save's embedded
40
+ * hub seed. Grid synthesis is deterministic (room-grid.ts's contract),
41
+ * but the INPUT ASSEMBLY is not trivially so -- ensureGrid resolves
42
+ * declared exit bindings and kind-matched doorways, and this engine has
43
+ * already paid twice for a second assembler drifting (the direction-
44
+ * blind doorway bug, the centroid hub bug -- both documented in
45
+ * ensureGrid). So the web calls THIS, which builds the room from its
46
+ * seed exactly as the scene factory does -- same whitelist, same
47
+ * declared-binding rule (scene-factory.ts:202) -- and asks the room's
48
+ * OWN ensureGrid. One assembler; a wrapper, not a re-implementation.
49
+ *
50
+ * Exit values are the seed's target-room NAMES (Room.exits accepts
51
+ * strings; ensureGrid only reads the direction keys), so no Door
52
+ * machinery and no neighbor rooms are needed. terrainHints stay
53
+ * whatever the Room ctor derives -- a fresh-from-seed room has no
54
+ * device-opened regions, which matches a fresh boot; a mid-session
55
+ * device unlock changes walkability, not walls/spots/doors, so the
56
+ * rendered geometry stays honest either way.
57
+ *
58
+ * Caller must be inside a session context (Room construction resolves
59
+ * the ambient logger) -- the web's runInSession wrapper, as with the
60
+ * character factory.
61
+ */
62
+ export function roomGridFromSeed(seed) {
63
+ const room = new Room(new RoomFactory().convertToRoomConfigFromJson(seed));
64
+ for (const exit of seed.exits ?? []) {
65
+ const dir = exit.direction.toLowerCase();
66
+ room.exits.set(dir, exit.targetRoom);
67
+ const atSpot = exit.atSpot;
68
+ if (atSpot)
69
+ room.exitSpots.set(dir, atSpot);
70
+ }
71
+ return room.ensureGrid();
72
+ }
34
73
  //# sourceMappingURL=room-factory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"room-factory.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/factories/room-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAA0B,MAAM,qBAAqB,CAAC;AAGnE,MAAM,OAAO,WAAW;IACtB,KAAK,CAAC,kBAAkB,CAAC,MAAqB;QAC5C,MAAM,UAAU,GAA2B,IAAI,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC;QACpF,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,2BAA2B,CAAC,QAAuB;QACzD,OAAO;YACL,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,IAAI,EAAE,QAAQ,CAAC,IAAI,IAAI,EAAE;YACzB,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,UAAU,EAAE,QAAQ,CAAC,UAAU;YAC/B,gEAAgE;YAChE,+DAA+D;YAC/D,iCAAiC;YACjC,UAAU,EAAE,QAAQ,CAAC,UAAU;YAC/B,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,+DAA+D;YAC/D,6DAA6D;YAC7D,2CAA2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B,MAAM,EAAE,QAAQ,CAAC,MAAM;YACvB,mBAAmB,EAAE,QAAQ,CAAC,mBAAmB;SAClD,CAAC;IACJ,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAmB;IAClD,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,WAAW,EAAE,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3E,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,EAAE,EAAE,CAAC;QACpC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW,EAAe,CAAC;QACtD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QACrC,MAAM,MAAM,GAAI,IAA4B,CAAC,MAAM,CAAC;QACpD,IAAI,MAAM;YAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,IAAI,CAAC,UAAU,EAAE,CAAC;AAC3B,CAAC"}
@@ -30,6 +30,7 @@ import { currentSession } from './utilities/session-context.js';
30
30
  import { PlayersCommand } from './commands/players.js';
31
31
  import { LookCommand } from './commands/look.js';
32
32
  import { TakeCommand } from './commands/take.js';
33
+ import { DownloadCommand } from './commands/download.js';
33
34
  import { LootCommand } from './commands/loot.js';
34
35
  import { NoteCommand } from './commands/note.js';
35
36
  import { BacklogCommand } from './commands/backlog.js';
@@ -2205,6 +2206,7 @@ ${client.name} won't be remembering anything. Dead Johnsons pay nothing -- and t
2205
2206
  CommandFactory.registerCommand('follow', FollowCommand);
2206
2207
  CommandFactory.registerCommand('unfollow', UnfollowCommand);
2207
2208
  CommandFactory.registerCommand('take', TakeCommand);
2209
+ CommandFactory.registerCommand('download', DownloadCommand);
2208
2210
  CommandFactory.registerCommand('loot', LootCommand);
2209
2211
  CommandFactory.registerCommand('note', NoteCommand);
2210
2212
  CommandFactory.registerCommand('backlog', BacklogCommand);
@@ -5409,7 +5411,7 @@ ${client.name} won't be remembering anything. Dead Johnsons pay nothing -- and t
5409
5411
  // players" / "crew street"); the bare verb still answers quietly.
5410
5412
  { title: 'party', entries: [['crew', 'party'], ['hire'], ['dismiss'], ['train'], ['order'], ['lead'], ['command'], ['deploy'], ['recall']] },
5411
5413
  { title: 'magic', entries: [['spells'], ['cast'], ['summon', 'conjure'], ['project', 'astral'], ['return'], ['assense']] },
5412
- { title: 'matrix', entries: [['jack'], ['jackpoint'], ['deck'], ['load'], ['unload'], ['hack'], ['mark'], ['enter'], ['exit-host'], ['tap', 'splice'], ['snoop'], ['overwatch', 'os'], ['pan'], ['ar'], ['aros'], ['silent'], ['reboot'], ['agent'], ['drone'], ['jump', 'rig']] },
5414
+ { title: 'matrix', entries: [['jack'], ['jackpoint'], ['deck'], ['load'], ['unload'], ['hack'], ['mark'], ['download'], ['enter'], ['exit-host'], ['tap', 'splice'], ['snoop'], ['overwatch', 'os'], ['pan'], ['ar'], ['aros'], ['silent'], ['reboot'], ['agent'], ['drone'], ['jump', 'rig']] },
5413
5415
  // The Emerged get their own shelf (player request: "there MUST be
5414
5416
  // resonance" -- matrix is the place, Resonance is the talent).
5415
5417
  // `sustain` shelves here and not under magic: the command is