@maka/maka-cli 5.76.0 → 5.78.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 (48) hide show
  1. package/bundle/typescript/package.json +1 -1
  2. package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js +8 -1
  3. package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js.map +1 -1
  4. package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +8 -1
  5. package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
  6. package/bundle/typescript/src/commands/game/sideQuest/commands/climb.js +9 -2
  7. package/bundle/typescript/src/commands/game/sideQuest/commands/climb.js.map +1 -1
  8. package/bundle/typescript/src/commands/game/sideQuest/commands/cover.js +14 -2
  9. package/bundle/typescript/src/commands/game/sideQuest/commands/cover.js.map +1 -1
  10. package/bundle/typescript/src/commands/game/sideQuest/commands/move.js +23 -1
  11. package/bundle/typescript/src/commands/game/sideQuest/commands/move.js.map +1 -1
  12. package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +9 -1
  13. package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
  14. package/bundle/typescript/src/commands/game/sideQuest/commands/sustain.js +6 -1
  15. package/bundle/typescript/src/commands/game/sideQuest/commands/sustain.js.map +1 -1
  16. package/bundle/typescript/src/commands/game/sideQuest/commands/time.js +9 -2
  17. package/bundle/typescript/src/commands/game/sideQuest/commands/time.js.map +1 -1
  18. package/bundle/typescript/src/commands/game/sideQuest/engine-version.d.ts +1 -1
  19. package/bundle/typescript/src/commands/game/sideQuest/engine-version.js +11 -1
  20. package/bundle/typescript/src/commands/game/sideQuest/engine-version.js.map +1 -1
  21. package/bundle/typescript/src/commands/game/sideQuest/factories/npc-spread.d.ts +50 -0
  22. package/bundle/typescript/src/commands/game/sideQuest/factories/npc-spread.js +90 -0
  23. package/bundle/typescript/src/commands/game/sideQuest/factories/npc-spread.js.map +1 -0
  24. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +11 -1
  25. package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -1
  26. package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +20 -0
  27. package/bundle/typescript/src/commands/game/sideQuest/game.js +71 -11
  28. package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
  29. package/bundle/typescript/src/commands/game/sideQuest/headless.js +3 -5
  30. package/bundle/typescript/src/commands/game/sideQuest/headless.js.map +1 -1
  31. package/bundle/typescript/src/commands/game/sideQuest/models/device.js +25 -0
  32. package/bundle/typescript/src/commands/game/sideQuest/models/device.js.map +1 -1
  33. package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +18 -7
  34. package/bundle/typescript/src/commands/game/sideQuest/models/room.js +37 -7
  35. package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
  36. package/bundle/typescript/src/commands/game/sideQuest/utilities/ic.d.ts +159 -0
  37. package/bundle/typescript/src/commands/game/sideQuest/utilities/ic.js +404 -0
  38. package/bundle/typescript/src/commands/game/sideQuest/utilities/ic.js.map +1 -0
  39. package/bundle/typescript/src/commands/game/sideQuest/utilities/room-view.d.ts +0 -38
  40. package/bundle/typescript/src/commands/game/sideQuest/utilities/room-view.js +0 -46
  41. package/bundle/typescript/src/commands/game/sideQuest/utilities/room-view.js.map +1 -1
  42. package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.d.ts +12 -0
  43. package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js +14 -0
  44. package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js.map +1 -1
  45. package/bundle/typescript/src/tools/sdk-loader/runtime-fetch.d.ts +24 -2
  46. package/bundle/typescript/src/tools/sdk-loader/runtime-fetch.js +87 -4
  47. package/bundle/typescript/src/tools/sdk-loader/runtime-fetch.js.map +1 -1
  48. package/package.json +1 -1
@@ -15,11 +15,13 @@ import { isFence, LIFESTYLE_TIERS } from './utilities/commerce.js';
15
15
  import { bestFakeSin, wandRead, processArrest } from './utilities/sin.js';
16
16
  import { renderMapViewport, mapCaption } from './utilities/map-view.js';
17
17
  import { tallestRoomRows } from './utilities/room-grid.js';
18
- import { renderRoomLayoutCompact, crewOfTable, roomCaption } from './utilities/room-view.js';
18
+ import { renderRoomLayoutCompact, crewOfTable } from './utilities/room-view.js';
19
19
  import { getPref } from './utilities/prefs.js';
20
20
  import { rollPool, formatRoll } from './utilities/dice.js';
21
21
  import { Direction } from './types/shared/direction-enum.js';
22
22
  import { Logger } from './utilities/logger.js';
23
+ import { runHostTurn } from './utilities/ic.js';
24
+ import { leaveMatrix } from './utilities/planes.js';
23
25
  import { CommandQueue } from './utilities/command-queue.js';
24
26
  import { currentSession } from './utilities/session-context.js';
25
27
  import { PlayersCommand } from './commands/players.js';
@@ -4528,9 +4530,8 @@ ${client.name} won't be remembering anything. Dead Johnsons pay nothing -- and t
4528
4530
  isOtherPlayer: a => this.scene.isHumanControlled(a),
4529
4531
  });
4530
4532
  if (roomLines.length > 0) {
4531
- // roomCaption owns BOTH halves now -- where you stand, and that
4532
- // somebody here has no cell to be drawn in (S6b4TLQWq46RN5kGu).
4533
- roomLines.push(caption(roomCaption(here, this.player), boxWidth));
4533
+ const spot = spotOf(this.player);
4534
+ roomLines.push(caption(spot ? `@ ${spot}` : '(moving through)', boxWidth));
4534
4535
  }
4535
4536
  this.setRoomOverlay(roomLines);
4536
4537
  }
@@ -4682,7 +4683,7 @@ ${client.name} won't be remembering anything. Dead Johnsons pay nothing -- and t
4682
4683
  const command = CommandFactory.createCommand(verb, context);
4683
4684
  if (command) {
4684
4685
  const result = await command.execute(args);
4685
- return out(result);
4686
+ return out(this.withICTurn(actor, result));
4686
4687
  }
4687
4688
  // Typo tolerance: two straight sessions bounced on slips like "searh"
4688
4689
  // and "maop". Reuse the same fuzzy matcher item/NPC names go through
@@ -4709,6 +4710,62 @@ ${client.name} won't be remembering anything. Dead Johnsons pay nothing -- and t
4709
4710
  }
4710
4711
  return out(`I don't understand the command "${verb}".`);
4711
4712
  }
4713
+ /**
4714
+ * THE HOST'S TURN, appended to whatever the player's action returned.
4715
+ *
4716
+ * This is the Combat Turn mapping from the IC design, and it is an
4717
+ * ENGINE MAPPING rather than a rule: canon paces IC in Combat Turns
4718
+ * (one program launched per turn, at the beginning of it) and this
4719
+ * engine has no Matrix initiative structure, so ONE PLAYER ACTION
4720
+ * TAKEN INSIDE AN ALERTED HOST counts as one turn. Not a citation, and
4721
+ * not presented as one.
4722
+ *
4723
+ * It hangs off the single command dispatch rather than off hack.ts on
4724
+ * purpose. Ice hunts you while you do ANYTHING in the host -- looking,
4725
+ * moving, taking -- so hooking only the hacking verb would have made
4726
+ * the host blind to every other action, which is the "fixed one verb,
4727
+ * left its siblings" shape CLAUDE.md warns about.
4728
+ *
4729
+ * utilities/ic.ts decides whether anything happens at all
4730
+ * (hostIsHunting); this only carries the result to the panes.
4731
+ */
4732
+ withICTurn(actor, result) {
4733
+ if (result === null)
4734
+ return null;
4735
+ const room = actor.currentLocation;
4736
+ // Phase 1b widened this gate. It used to ask hostIsHunting, which is
4737
+ // only true AFTER the host had made someone -- so the host could
4738
+ // never notice you in the first place, and measurement said so:
4739
+ // twelve runs, twelve cracked hosts, zero sightings. A host with a
4740
+ // node gets its turn whenever a persona is standing in it, and
4741
+ // ic.ts decides whether that turn is eyes or ice.
4742
+ if (!room || actor.plane !== 'matrix' || !room.hasNode)
4743
+ return result;
4744
+ const turn = runHostTurn(room, actor);
4745
+ if (turn.lines.length === 0 && turn.meta.length === 0)
4746
+ return result;
4747
+ // Dice to the Mechanics pane, and only for a human -- the same gate
4748
+ // every other roll in this engine uses.
4749
+ if (this.scene.isHumanControlled(actor)) {
4750
+ const logger = Logger.getInstance();
4751
+ for (const m of turn.meta)
4752
+ logger.meta(m);
4753
+ }
4754
+ for (const w of turn.world)
4755
+ this.scene.addWorldEvent(w);
4756
+ // A deck bricked by IC owes the same forced dump a convergence does.
4757
+ // ic.ts reports it rather than performing it -- leaveMatrix needs the
4758
+ // Scene and that module deliberately takes none, exactly as hack.ts
4759
+ // splits the convergence hammer from the dump that follows it.
4760
+ if (turn.bricked) {
4761
+ turn.lines.push(...leaveMatrix(this.scene, actor, {
4762
+ forced: true,
4763
+ reason: `The host's ice burns your deck out from under you.`,
4764
+ }));
4765
+ }
4766
+ const body = turn.lines.join('\n');
4767
+ return result.length > 0 ? `${result}\n${body}` : body;
4768
+ }
4712
4769
  /**
4713
4770
  * The help taxonomy: every entry is [primary, ...aliases], grouped the
4714
4771
  * way a player thinks, not the order commands were registered. The
@@ -4719,8 +4776,8 @@ ${client.name} won't be remembering anything. Dead Johnsons pay nothing -- and t
4719
4776
  * future command can't silently fall out of help.
4720
4777
  */
4721
4778
  static HELP_CATEGORIES = [
4722
- { title: 'moving', entries: [['look'], ['go'], ['move', 'walk', 'approach', 'run', 'sprint'], ['climb', 'descend'], ['sit', 'kneel'], ['lie', 'prone'], ['stand'], ['follow', 'unfollow'], ['map', 'exits'], ['search'], ['sneak']] },
4723
- { title: 'gear', entries: [['inv', 'inventory'], ['equipment', 'eq'], ['take'], ['drop'], ['give'], ['store'], ['equip'], ['unequip'], ['brandish', 'draw'], ['holster', 'stow'], ['reload'], ['use'], ['read']] },
4779
+ { title: 'moving', entries: [['look'], ['go'], ['move', 'walk', 'approach', 'run', 'sprint'], ['climb', 'descend', 'mantle', 'scale', 'clamber'], ['sit', 'kneel'], ['lie', 'prone'], ['stand'], ['follow', 'unfollow'], ['map', 'exits'], ['search'], ['sneak']] },
4780
+ { title: 'gear', entries: [['inv', 'inventory'], ['equipment', 'eq'], ['take'], ['loot'], ['drop'], ['give'], ['store'], ['equip'], ['unequip'], ['brandish', 'draw'], ['holster', 'stow'], ['reload'], ['use'], ['read']] },
4724
4781
  { title: 'combat', entries: [['attack', 'kill'], ['subdue'], ['grapple', 'restrain', 'clinch'], ['struggle'], ['release'], ['cover'], ['stance'], ['surrender'], ['edge'], ['rest']] },
4725
4782
  // The party layer: everyone who walks (or flies, or manifests) at
4726
4783
  // your side answers to these.
@@ -4728,15 +4785,18 @@ ${client.name} won't be remembering anything. Dead Johnsons pay nothing -- and t
4728
4785
  // players" / "crew street"); the bare verb still answers quietly.
4729
4786
  { title: 'party', entries: [['crew', 'party'], ['hire'], ['dismiss'], ['train'], ['order'], ['lead'], ['command'], ['deploy'], ['recall']] },
4730
4787
  { title: 'magic', entries: [['spells'], ['cast'], ['summon', 'conjure'], ['project'], ['return'], ['assense']] },
4731
- { title: 'matrix', entries: [['jack'], ['deck'], ['load'], ['unload'], ['hack'], ['mark'], ['snoop'], ['overwatch', 'os'], ['pan'], ['ar'], ['aros'], ['silent'], ['reboot'], ['agent'], ['drone'], ['jump', 'rig']] },
4788
+ { title: 'matrix', entries: [['jack'], ['deck'], ['load'], ['unload'], ['hack'], ['mark'], ['tap', 'splice'], ['snoop'], ['overwatch', 'os'], ['pan'], ['ar'], ['aros'], ['silent'], ['reboot'], ['agent'], ['drone'], ['jump', 'rig']] },
4732
4789
  // The Emerged get their own shelf (player request: "there MUST be
4733
4790
  // resonance" -- matrix is the place, Resonance is the talent).
4734
- { title: 'resonance', entries: [['compile', 'decompile'], ['thread'], ['unravel'], ['register'], ['standby'], ['sprites']] },
4791
+ // `sustain` shelves here and not under magic: the command is
4792
+ // technomancer-gated (a sprite task, SR5 p.256) and refuses anyone
4793
+ // else, so the Emerged shelf is where its audience looks.
4794
+ { title: 'resonance', entries: [['compile', 'decompile'], ['thread'], ['unravel'], ['register'], ['standby'], ['sustain'], ['sprites']] },
4735
4795
  { title: 'social', entries: [['say'], ['emote', 'me'], ['talk-to'], ['call'], ['end-call', 'end', 'hangup'], ['accept'], ['decline', 'deny', 'refuse'], ['haggle', 'negotiate'], ['persuade', 'convince'], ['ask'], ['contacts']] },
4736
4796
  { title: 'street', entries: [['abandon'], ['browse', 'buy'], ['sell'], ['catalog'], ['source', 'procure'], ['work', 'gig'], ['jobs'], ['journal'], ['perform'], ['palm'], ['docwagon'], ['treat'], ['eat'], ['drink'], ['lifestyle'], ['pay']] },
4737
4797
  { title: 'barriers', entries: [['pick'], ['breach'], ['dispel', 'dispell'], ['bluff'], ['unlock'], ['lock']] },
4738
4798
  { title: 'character', entries: [['sheet', 'stats'], ['advance'], ['qualities', 'quality'], ['sin', 'sins', 'papers'], ['initiate', 'submerge'], ['install', 'chrome']] },
4739
- { title: 'session', entries: [['help'], ['hints'], ['time', 'clock'], ['note'], ['backlog'], ['roles'], ['clear'], ['quit', 'exit']] },
4799
+ { title: 'session', entries: [['help'], ['hints'], ['time', 'clock'], ['note'], ['backlog'], ['review'], ['roles'], ['clear'], ['quit', 'exit']] },
4740
4800
  ];
4741
4801
  /** Registered but deliberately UNLISTED: reachable as subcommands or
4742
4802
  * muscle-memory ("players" folded back under crew after playtesting
@@ -4748,7 +4808,7 @@ ${client.name} won't be remembering anything. Dead Johnsons pay nothing -- and t
4748
4808
  * -- the server role-gates both and 403s everyone else. Listed in
4749
4809
  * help ONLY for a confirmed play-tester; see helpCategories. `roles`
4750
4810
  * rides along because it is admin-only, a strictly narrower group. */
4751
- static PLAYTESTER_VERBS = new Set(['backlog', 'roles']);
4811
+ static PLAYTESTER_VERBS = new Set(['backlog', 'review', 'roles']);
4752
4812
  /** Descriptions for the verbs handled inline in handleInput() rather than registered. */
4753
4813
  static BUILTIN_DESCRIPTIONS = {
4754
4814
  help: 'This overview. "help <category>" for one group with full descriptions; "help <command>" for one command.',