@maka/maka-cli 5.66.0 → 5.67.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/bundle/typescript/package.json +1 -1
- package/bundle/typescript/src/commands/game/_index.d.ts +1 -0
- package/bundle/typescript/src/commands/game/_index.js +1 -0
- package/bundle/typescript/src/commands/game/_index.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/backlog.d.ts +103 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/backlog.js +423 -25
- package/bundle/typescript/src/commands/game/sideQuest/commands/backlog.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.d.ts +15 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js +61 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/bluff.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/review.d.ts +39 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/review.js +48 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/review.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/engine-version.d.ts +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/engine-version.js +15 -1
- package/bundle/typescript/src/commands/game/sideQuest/engine-version.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/repro-scene.d.ts +87 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/repro-scene.js +320 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/repro-scene.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +32 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js +8 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +48 -0
- package/bundle/typescript/src/commands/game/sideQuest/game.js +91 -7
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/headless-harness.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/headless-harness.js +23 -0
- package/bundle/typescript/src/commands/game/sideQuest/headless-harness.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +26 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +55 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/types/repro.d.ts +106 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/repro.js +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/repro.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/device-seed.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.d.ts +9 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog-dump.d.ts +17 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog-dump.js +250 -36
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog-dump.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog-review.d.ts +30 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog-review.js +58 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog-review.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog-vocab.d.ts +85 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog-vocab.js +100 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog-vocab.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog.d.ts +45 -3
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog.js +45 -3
- package/bundle/typescript/src/commands/game/sideQuest/utilities/backlog.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/commit-ref.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/commit-ref.js +22 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/commit-ref.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/handoff.d.ts +42 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/handoff.js +57 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/handoff.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/repro-launch.d.ts +68 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/repro-launch.js +147 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/repro-launch.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js +39 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest-backlog.sub.cmd.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest-backlog.sub.cmd.js +46 -0
- package/bundle/typescript/src/commands/game/sideQuest-backlog.sub.cmd.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.d.ts +3 -1
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +269 -42
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
- package/bundle/typescript/src/tools/log/log.class.d.ts +17 -0
- package/bundle/typescript/src/tools/log/log.class.js +30 -1
- package/bundle/typescript/src/tools/log/log.class.js.map +1 -1
- package/package.json +1 -1
|
@@ -32,6 +32,7 @@ import { BacklogCommand } from './commands/backlog.js';
|
|
|
32
32
|
// help index offers, never what the verb accepts (item D).
|
|
33
33
|
import { isPlaytester, probePlaytesterStanding } from './utilities/playtester.js';
|
|
34
34
|
import { RolesCommand } from './commands/roles.js';
|
|
35
|
+
import { ReviewCommand } from './commands/review.js';
|
|
35
36
|
import { SinCommand } from './commands/sin.js';
|
|
36
37
|
import { GoCommand } from './commands/go.js';
|
|
37
38
|
import { UseCommand } from './commands/use.js';
|
|
@@ -186,6 +187,9 @@ export default class Game {
|
|
|
186
187
|
// social layer stays dark (presence, cloud mirror, street, drafts).
|
|
187
188
|
_owner;
|
|
188
189
|
_anonymous = false;
|
|
190
|
+
_bench = false;
|
|
191
|
+
_reproItemId;
|
|
192
|
+
_closing = false;
|
|
189
193
|
_logFilePath = '';
|
|
190
194
|
_tier = 1;
|
|
191
195
|
/**
|
|
@@ -254,6 +258,66 @@ export default class Game {
|
|
|
254
258
|
get isAnonymous() {
|
|
255
259
|
return this._anonymous;
|
|
256
260
|
}
|
|
261
|
+
/**
|
|
262
|
+
* A REPRO BENCH: a scratch session stood up to reproduce one backlog
|
|
263
|
+
* item. Not a life -- no save, no street presence, no shared table.
|
|
264
|
+
*
|
|
265
|
+
* SEPARATE FROM `isAnonymous`, and the separation is the point. The
|
|
266
|
+
* bench first reused the anonymous flag, since both want the street
|
|
267
|
+
* left alone -- and that quietly took the BACKLOG with it, because
|
|
268
|
+
* anonymity is a promise about a RUNNER ("nothing about them leaves
|
|
269
|
+
* this machine") and the backlog is one of the things it forbids. So
|
|
270
|
+
* a play-tester standing in the bench built for their own report was
|
|
271
|
+
* refused when they tried to answer it, which is the one thing the
|
|
272
|
+
* bench exists for.
|
|
273
|
+
*
|
|
274
|
+
* Two different concerns wearing one flag: "this character is
|
|
275
|
+
* private" and "this session is scratch". A bench is not private --
|
|
276
|
+
* it is the opposite, a place to file and confirm from.
|
|
277
|
+
*/
|
|
278
|
+
get isBench() {
|
|
279
|
+
return this._bench;
|
|
280
|
+
}
|
|
281
|
+
/** The backlog item this bench was stood up for, if any.
|
|
282
|
+
*
|
|
283
|
+
* The review commands read it so an answer needs no index. Player
|
|
284
|
+
* ruling 2026-08-28: "I shouldn't have to pick from the list of
|
|
285
|
+
* review items -- I AM reviewing an item." Making someone name which
|
|
286
|
+
* report they mean, while they are standing in the scene built for
|
|
287
|
+
* that report, is asking a question the session already answered. */
|
|
288
|
+
get reproItemId() {
|
|
289
|
+
return this._reproItemId;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* CLOSE THE SESSION SHORTLY, leaving the last message on screen.
|
|
293
|
+
*
|
|
294
|
+
* For a bench that has just been answered (player request 2026-08-28:
|
|
295
|
+
* "after accepting or rejecting, give a 3s timeout and then close the
|
|
296
|
+
* session"). The pause is the point -- exiting the instant the post
|
|
297
|
+
* lands would wipe the confirmation before it could be read, and the
|
|
298
|
+
* confirmation is the only proof the answer went anywhere.
|
|
299
|
+
*
|
|
300
|
+
* Exits code 0, which is the same door `quit` goes through: the save
|
|
301
|
+
* seal in ui.ts fires (a no-op for a bench, which has no save path)
|
|
302
|
+
* and the launcher parent, which is the terminal's guaranteed
|
|
303
|
+
* janitor, restores the terminal exactly as it would after any other
|
|
304
|
+
* exit. No second teardown path.
|
|
305
|
+
*
|
|
306
|
+
* Idempotent: the first request wins, so answering twice in three
|
|
307
|
+
* seconds cannot stack timers.
|
|
308
|
+
*/
|
|
309
|
+
closeAfter(ms, reason) {
|
|
310
|
+
if (this._closing)
|
|
311
|
+
return;
|
|
312
|
+
this._closing = true;
|
|
313
|
+
const timer = setTimeout(() => {
|
|
314
|
+
Logger.getInstance().write(`<<<<<<<<--------- Closing session: ${reason}`);
|
|
315
|
+
process.exit(0);
|
|
316
|
+
}, ms);
|
|
317
|
+
// Never hold the process open on its own account -- if everything
|
|
318
|
+
// else has finished, going now is right.
|
|
319
|
+
timer.unref?.();
|
|
320
|
+
}
|
|
257
321
|
get sessionDir() {
|
|
258
322
|
return this._logFilePath ? dirname(this._logFilePath) : undefined;
|
|
259
323
|
}
|
|
@@ -452,13 +516,13 @@ export default class Game {
|
|
|
452
516
|
* push one right now and say so.
|
|
453
517
|
*/
|
|
454
518
|
async pushPresenceNow() {
|
|
455
|
-
if (this._anonymous)
|
|
519
|
+
if (this._anonymous || this._bench)
|
|
456
520
|
return 'offline';
|
|
457
521
|
return heartbeatPresenceNow(this.presencePayload());
|
|
458
522
|
}
|
|
459
523
|
startPresenceHeartbeat() {
|
|
460
|
-
if (this._anonymous)
|
|
461
|
-
return; // account-less: never on the street
|
|
524
|
+
if (this._anonymous || this._bench)
|
|
525
|
+
return; // account-less, or a bench: never on the street
|
|
462
526
|
if (this._presenceTimer)
|
|
463
527
|
return;
|
|
464
528
|
this.beatPresence();
|
|
@@ -1512,8 +1576,8 @@ export default class Game {
|
|
|
1512
1576
|
/** The transport, hooks-first, CLI default second; undefined =
|
|
1513
1577
|
* offline/logged out/classic mode (callers degrade quietly). */
|
|
1514
1578
|
async streetTransport() {
|
|
1515
|
-
if (this._anonymous)
|
|
1516
|
-
return undefined; // account-less: no street
|
|
1579
|
+
if (this._anonymous || this._bench)
|
|
1580
|
+
return undefined; // account-less, or a bench: no street
|
|
1517
1581
|
if (this.listStreetPlayers && this.sendPage) {
|
|
1518
1582
|
return { list: this.listStreetPlayers, send: this.sendPage };
|
|
1519
1583
|
}
|
|
@@ -1805,6 +1869,8 @@ ${client.name} won't be remembering anything. Dead Johnsons pay nothing -- and t
|
|
|
1805
1869
|
CommandFactory.registerCommand('note', NoteCommand);
|
|
1806
1870
|
CommandFactory.registerCommand('backlog', BacklogCommand);
|
|
1807
1871
|
CommandFactory.registerCommand('roles', RolesCommand);
|
|
1872
|
+
// The short form of "backlog review" -- see commands/review.ts.
|
|
1873
|
+
CommandFactory.registerCommand('review', ReviewCommand);
|
|
1808
1874
|
CommandFactory.registerCommand('sin', SinCommand);
|
|
1809
1875
|
CommandFactory.registerCommand('sins', SinCommand);
|
|
1810
1876
|
CommandFactory.registerCommand('papers', SinCommand);
|
|
@@ -2078,6 +2144,8 @@ ${client.name} won't be remembering anything. Dead Johnsons pay nothing -- and t
|
|
|
2078
2144
|
this._saveFilePath = options.saveFilePath;
|
|
2079
2145
|
this._owner = options.owner;
|
|
2080
2146
|
this._anonymous = options.anonymousRunner === true;
|
|
2147
|
+
this._bench = options.reproBench === true;
|
|
2148
|
+
this._reproItemId = options.reproItemId;
|
|
2081
2149
|
// Ask the server, once, whether this account is a play-tester, so
|
|
2082
2150
|
// the help index can stop advertising a backlog that will only 403
|
|
2083
2151
|
// (item D). Fire-and-forget on purpose: it never blocks the boot,
|
|
@@ -2130,7 +2198,23 @@ ${client.name} won't be remembering anything. Dead Johnsons pay nothing -- and t
|
|
|
2130
2198
|
// spawned in a phantom hideout and read it as a kick back to the
|
|
2131
2199
|
// hub). The room object still exists for any code that touches
|
|
2132
2200
|
// _homeRoom; it's just not in the scene.
|
|
2133
|
-
|
|
2201
|
+
// A BENCH GETS NO HIDEOUT EITHER, for the same reason a shared run
|
|
2202
|
+
// does not: nobody lives here. It is two rooms and a door.
|
|
2203
|
+
//
|
|
2204
|
+
// FOUND FROM A LIVE SESSION LOG (2026-08-28). The bench promises
|
|
2205
|
+
// "you start standing at the barrier", and it did not: the hideout
|
|
2206
|
+
// was added and the player was moved INTO it, so the first thing a
|
|
2207
|
+
// reviewer had to do was "go up" out of a home the bench had built
|
|
2208
|
+
// them. They reported the steps as wrong; the steps were right and
|
|
2209
|
+
// the scene had grown a room.
|
|
2210
|
+
//
|
|
2211
|
+
// WORTH RECORDING WHY THE DRY RUN MISSED IT. The headless harness
|
|
2212
|
+
// boots with sharedRun: true, so it took the branch that skips all
|
|
2213
|
+
// of this -- the replay I had been calling proof of the bench was
|
|
2214
|
+
// quietly proving a DIFFERENT scene from the one a player gets.
|
|
2215
|
+
// Adding reproBench here is what makes the two agree, which is the
|
|
2216
|
+
// property the dry run was supposed to have all along.
|
|
2217
|
+
if (!options.sharedRun && !options.reproBench) {
|
|
2134
2218
|
this.scene.addRoom(this._homeRoom);
|
|
2135
2219
|
this.connectHomeRoom(this.player.currentLocation);
|
|
2136
2220
|
// Every session starts AT HOME -- the hideout, one door from the
|
|
@@ -2796,7 +2880,7 @@ ${client.name} won't be remembering anything. Dead Johnsons pay nothing -- and t
|
|
|
2796
2880
|
// offer flow (his call, accept/decline, the taxi) works unchanged.
|
|
2797
2881
|
// Offline owners fall back to the Phase B ghost riders below.
|
|
2798
2882
|
let sharedDeclineNote = '';
|
|
2799
|
-
if (this.hasHub && !this._anonymous) {
|
|
2883
|
+
if (this.hasHub && !this._anonymous && !this._bench) {
|
|
2800
2884
|
const srMod = await import('./utilities/shared-run.js').catch(() => undefined);
|
|
2801
2885
|
const preferred = this.preferredDraftSessionID;
|
|
2802
2886
|
this.preferredDraftSessionID = undefined;
|