@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
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE BOARD'S SHARED VOCABULARY -- what a status is called, what a
|
|
3
|
+
* verdict is called, and how loud each one is.
|
|
4
|
+
*
|
|
5
|
+
* Two surfaces render the backlog and they used to word it twice:
|
|
6
|
+
* `commands/backlog.ts` in-game (blessed tags) and
|
|
7
|
+
* `utilities/backlog-dump.ts` out of game (chalk, via Log). The labels
|
|
8
|
+
* were retyped in both, which is the shape of a fault this repo has
|
|
9
|
+
* already paid for -- the launcher's second copy of the status list
|
|
10
|
+
* refused `in-review` as a typo while the server had been writing it
|
|
11
|
+
* for a day (see sideQuest.sub.cmd.ts's note on its own duplication).
|
|
12
|
+
*
|
|
13
|
+
* WHAT IS SHARED IS THE VOCABULARY, NOT THE PAINT. A tone is a severity,
|
|
14
|
+
* not a colour: blessed and chalk have different palettes and different
|
|
15
|
+
* legibility problems, so each surface maps tone to its own ink. What
|
|
16
|
+
* neither surface gets to decide for itself is what an item is CALLED
|
|
17
|
+
* or how much it matters.
|
|
18
|
+
*
|
|
19
|
+
* Pure on purpose -- no Log, no blessed, no transport. The out-of-game
|
|
20
|
+
* dump is loaded lazily precisely so reading a list touches none of the
|
|
21
|
+
* game graph, and this module must not be the thing that drags it in.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* THE STATUSES THEMSELVES, and this is where they live.
|
|
25
|
+
*
|
|
26
|
+
* Moved here from the transport 2026-08-28, and the move is the point:
|
|
27
|
+
* utilities/backlog.ts reaches cloud-saves -> persistence -> models, so
|
|
28
|
+
* anything importing the status list to render or validate a status was
|
|
29
|
+
* dragging the entire save graph behind it. That is how a second copy
|
|
30
|
+
* gets written -- the launcher has one, annotated as a duplicate it
|
|
31
|
+
* could not avoid "without chaining the whole game graph into every
|
|
32
|
+
* `maka` invocation" -- and that copy then drifted, refusing `in-review`
|
|
33
|
+
* as a typo for a day.
|
|
34
|
+
*
|
|
35
|
+
* A pure module carrying the vocabulary is what makes the duplicate
|
|
36
|
+
* unnecessary. backlog.ts re-exports these so no caller had to change.
|
|
37
|
+
*/
|
|
38
|
+
export type BacklogStatus = 'open' | 'in-progress' | 'in-review' | 'complete' | 'wont-fix';
|
|
39
|
+
export declare const BACKLOG_STATUSES: BacklogStatus[];
|
|
40
|
+
/**
|
|
41
|
+
* THE PRINT ORDER: lowest priority first, so what needs you ends up at
|
|
42
|
+
* the BOTTOM -- closest to the prompt, which is where a scrolling
|
|
43
|
+
* terminal leaves your eye.
|
|
44
|
+
*
|
|
45
|
+
* The server sorts in-review first, and that is right for a caller
|
|
46
|
+
* iterating the list. It is wrong for PRINTING it, and the difference
|
|
47
|
+
* has now been reported three times about three different surfaces:
|
|
48
|
+
* the review queue ("REVERSE THE ORDER OF THE REVIEW ITEMS"), the
|
|
49
|
+
* out-of-game board ("So the list is backwards"), and the in-game one
|
|
50
|
+
* ("I see 'wont' items first"). Each was fixed where it was reported
|
|
51
|
+
* and nowhere else, so the same board read correctly in one place and
|
|
52
|
+
* backwards in the next.
|
|
53
|
+
*
|
|
54
|
+
* Lives here, with the other thing every surface must agree about.
|
|
55
|
+
* Reversal happens at the point of PRINT and never in the data: the
|
|
56
|
+
* server's priority order and which end a human reads first are two
|
|
57
|
+
* separate facts, and collapsing them is how a number would come to
|
|
58
|
+
* mean a different row than the one it labels.
|
|
59
|
+
*
|
|
60
|
+
* See reviewDisplayOrder in backlog-review.ts for the numbered variant
|
|
61
|
+
* of this same rule -- it binds each row's number BEFORE reversing,
|
|
62
|
+
* which is the invariant that keeps "review 1" pointing at row 1.
|
|
63
|
+
*/
|
|
64
|
+
export declare function boardPrintOrder<T>(items: T[]): T[];
|
|
65
|
+
/** How loud, in the abstract. Each renderer picks its own ink. */
|
|
66
|
+
export type BacklogTone = 'good' | 'bad' | 'warn' | 'info' | 'alert' | 'dim';
|
|
67
|
+
export interface IBacklogLabel {
|
|
68
|
+
/** The bracketed tag, padded to a common width so rows line up. */
|
|
69
|
+
label: string;
|
|
70
|
+
tone: BacklogTone;
|
|
71
|
+
}
|
|
72
|
+
/** An unknown status renders as itself rather than as "open". A status
|
|
73
|
+
* this build has never heard of is news, and reporting it as the
|
|
74
|
+
* default hid exactly that: `in-review` shipped from the server and
|
|
75
|
+
* showed here as "[open]" -- an item awaiting the player's word drawn
|
|
76
|
+
* as one nobody had touched. */
|
|
77
|
+
export declare function statusLabel(status: string): IBacklogLabel;
|
|
78
|
+
/** Whether this status has a label of its own, rather than falling back
|
|
79
|
+
* to being echoed raw. Exists for the test that matters: every status
|
|
80
|
+
* the transport knows about must be named here. Asking that of
|
|
81
|
+
* statusLabel's OUTPUT cannot work -- "open" legitimately renders as
|
|
82
|
+
* "[open]", which is also the exact shape of the fallback, so the two
|
|
83
|
+
* are indistinguishable from outside. */
|
|
84
|
+
export declare function hasStatusLabel(status: string): boolean;
|
|
85
|
+
export declare function verdictLabel(verdict: string): IBacklogLabel;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE BOARD'S SHARED VOCABULARY -- what a status is called, what a
|
|
3
|
+
* verdict is called, and how loud each one is.
|
|
4
|
+
*
|
|
5
|
+
* Two surfaces render the backlog and they used to word it twice:
|
|
6
|
+
* `commands/backlog.ts` in-game (blessed tags) and
|
|
7
|
+
* `utilities/backlog-dump.ts` out of game (chalk, via Log). The labels
|
|
8
|
+
* were retyped in both, which is the shape of a fault this repo has
|
|
9
|
+
* already paid for -- the launcher's second copy of the status list
|
|
10
|
+
* refused `in-review` as a typo while the server had been writing it
|
|
11
|
+
* for a day (see sideQuest.sub.cmd.ts's note on its own duplication).
|
|
12
|
+
*
|
|
13
|
+
* WHAT IS SHARED IS THE VOCABULARY, NOT THE PAINT. A tone is a severity,
|
|
14
|
+
* not a colour: blessed and chalk have different palettes and different
|
|
15
|
+
* legibility problems, so each surface maps tone to its own ink. What
|
|
16
|
+
* neither surface gets to decide for itself is what an item is CALLED
|
|
17
|
+
* or how much it matters.
|
|
18
|
+
*
|
|
19
|
+
* Pure on purpose -- no Log, no blessed, no transport. The out-of-game
|
|
20
|
+
* dump is loaded lazily precisely so reading a list touches none of the
|
|
21
|
+
* game graph, and this module must not be the thing that drags it in.
|
|
22
|
+
*/
|
|
23
|
+
export const BACKLOG_STATUSES = ['open', 'in-progress', 'in-review', 'complete', 'wont-fix'];
|
|
24
|
+
/**
|
|
25
|
+
* THE PRINT ORDER: lowest priority first, so what needs you ends up at
|
|
26
|
+
* the BOTTOM -- closest to the prompt, which is where a scrolling
|
|
27
|
+
* terminal leaves your eye.
|
|
28
|
+
*
|
|
29
|
+
* The server sorts in-review first, and that is right for a caller
|
|
30
|
+
* iterating the list. It is wrong for PRINTING it, and the difference
|
|
31
|
+
* has now been reported three times about three different surfaces:
|
|
32
|
+
* the review queue ("REVERSE THE ORDER OF THE REVIEW ITEMS"), the
|
|
33
|
+
* out-of-game board ("So the list is backwards"), and the in-game one
|
|
34
|
+
* ("I see 'wont' items first"). Each was fixed where it was reported
|
|
35
|
+
* and nowhere else, so the same board read correctly in one place and
|
|
36
|
+
* backwards in the next.
|
|
37
|
+
*
|
|
38
|
+
* Lives here, with the other thing every surface must agree about.
|
|
39
|
+
* Reversal happens at the point of PRINT and never in the data: the
|
|
40
|
+
* server's priority order and which end a human reads first are two
|
|
41
|
+
* separate facts, and collapsing them is how a number would come to
|
|
42
|
+
* mean a different row than the one it labels.
|
|
43
|
+
*
|
|
44
|
+
* See reviewDisplayOrder in backlog-review.ts for the numbered variant
|
|
45
|
+
* of this same rule -- it binds each row's number BEFORE reversing,
|
|
46
|
+
* which is the invariant that keeps "review 1" pointing at row 1.
|
|
47
|
+
*/
|
|
48
|
+
export function boardPrintOrder(items) {
|
|
49
|
+
return [...items].reverse();
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* `in-review` is 'alert' rather than 'info', and it is the one place
|
|
53
|
+
* this file makes a judgement instead of recording one. An in-review
|
|
54
|
+
* row is the only status that is WAITING ON THE READER: everything else
|
|
55
|
+
* describes what somebody else is doing. It used to render the same
|
|
56
|
+
* cyan as in-progress, so on a 125-row board the rows that needed the
|
|
57
|
+
* player did not look different from the rows that did not.
|
|
58
|
+
*/
|
|
59
|
+
const STATUS_LABELS = {
|
|
60
|
+
'open': { label: '[open]', tone: 'warn' },
|
|
61
|
+
'in-progress': { label: '[wip] ', tone: 'info' },
|
|
62
|
+
'in-review': { label: '[you?]', tone: 'alert' },
|
|
63
|
+
'complete': { label: '[done]', tone: 'good' },
|
|
64
|
+
// "[no]" until 2026-08-28, when the only person reading this board
|
|
65
|
+
// asked what it meant. It read as a refusal or an error rather than a
|
|
66
|
+
// status -- and it is neither: a wont-fix is a DECISION, taken and
|
|
67
|
+
// recorded. A six-character tag has to carry that on its own, because
|
|
68
|
+
// there is no legend anywhere and nobody should need one.
|
|
69
|
+
'wont-fix': { label: '[wont]', tone: 'dim' },
|
|
70
|
+
};
|
|
71
|
+
/** An unknown status renders as itself rather than as "open". A status
|
|
72
|
+
* this build has never heard of is news, and reporting it as the
|
|
73
|
+
* default hid exactly that: `in-review` shipped from the server and
|
|
74
|
+
* showed here as "[open]" -- an item awaiting the player's word drawn
|
|
75
|
+
* as one nobody had touched. */
|
|
76
|
+
export function statusLabel(status) {
|
|
77
|
+
return STATUS_LABELS[status] ?? { label: `[${status}]`, tone: 'dim' };
|
|
78
|
+
}
|
|
79
|
+
/** Whether this status has a label of its own, rather than falling back
|
|
80
|
+
* to being echoed raw. Exists for the test that matters: every status
|
|
81
|
+
* the transport knows about must be named here. Asking that of
|
|
82
|
+
* statusLabel's OUTPUT cannot work -- "open" legitimately renders as
|
|
83
|
+
* "[open]", which is also the exact shape of the fallback, so the two
|
|
84
|
+
* are indistinguishable from outside. */
|
|
85
|
+
export function hasStatusLabel(status) {
|
|
86
|
+
return Object.prototype.hasOwnProperty.call(STATUS_LABELS, status);
|
|
87
|
+
}
|
|
88
|
+
/** The verdict is about the GAME, not the rulebooks -- see the reframing
|
|
89
|
+
* note in commands/backlog.ts. */
|
|
90
|
+
const VERDICT_LABELS = {
|
|
91
|
+
'canon-violation': { label: 'breaks the rules', tone: 'bad' },
|
|
92
|
+
'bug': { label: 'bug', tone: 'bad' },
|
|
93
|
+
'enhancement': { label: 'wants building', tone: 'warn' },
|
|
94
|
+
'works-as-intended': { label: 'working as meant', tone: 'good' },
|
|
95
|
+
'needs-detail': { label: 'needs detail', tone: 'info' },
|
|
96
|
+
};
|
|
97
|
+
export function verdictLabel(verdict) {
|
|
98
|
+
return VERDICT_LABELS[verdict] ?? { label: 'needs detail', tone: 'info' };
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=backlog-vocab.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backlog-vocab.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/utilities/backlog-vocab.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAkBH,MAAM,CAAC,MAAM,gBAAgB,GAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC;AAE9G;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,eAAe,CAAI,KAAU;IAC3C,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;AAC9B,CAAC;AAWD;;;;;;;GAOG;AACH,MAAM,aAAa,GAAkC;IACnD,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IACzC,aAAa,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IAChD,WAAW,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE;IAC/C,UAAU,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE;IAC7C,mEAAmE;IACnE,sEAAsE;IACtE,mEAAmE;IACnE,sEAAsE;IACtE,0DAA0D;IAC1D,UAAU,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE;CAC7C,CAAC;AAEF;;;;iCAIiC;AACjC,MAAM,UAAU,WAAW,CAAC,MAAc;IACxC,OAAO,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,MAAM,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;AACxE,CAAC;AAED;;;;;0CAK0C;AAC1C,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;AACrE,CAAC;AAED;mCACmC;AACnC,MAAM,cAAc,GAAkC;IACpD,iBAAiB,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,KAAK,EAAE;IAC7D,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE;IACpC,aAAa,EAAE,EAAE,KAAK,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,EAAE;IACxD,mBAAmB,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,EAAE;IAChE,cAAc,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE;CACxD,CAAC;AAEF,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,OAAO,cAAc,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAC5E,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { IRepro } from '../types/repro.js';
|
|
1
2
|
/**
|
|
2
3
|
* `in-review` was missing here until 2026-08-27, and the first
|
|
3
4
|
* populated review payload is what exposed it: the server has been able
|
|
@@ -7,14 +8,23 @@
|
|
|
7
8
|
* board showed an item awaiting confirmation as though nobody had
|
|
8
9
|
* touched it, and `backlog list in-review` was refused as a typo.
|
|
9
10
|
*/
|
|
10
|
-
export type BacklogStatus
|
|
11
|
-
export
|
|
11
|
+
export type { BacklogStatus } from './backlog-vocab.js';
|
|
12
|
+
export { BACKLOG_STATUSES } from './backlog-vocab.js';
|
|
13
|
+
import type { BacklogStatus } from './backlog-vocab.js';
|
|
12
14
|
export interface IBacklogItem {
|
|
13
15
|
_id: string;
|
|
14
16
|
text: string;
|
|
15
17
|
reporterHandle?: string;
|
|
16
18
|
runnerName?: string;
|
|
17
19
|
sessionId?: string;
|
|
20
|
+
/** WHICH BUILD SAW IT. Sent by the server since the board shipped --
|
|
21
|
+
* they are in every /list payload -- and simply never declared here,
|
|
22
|
+
* so no reader could use them. They matter to a reviewer: an item
|
|
23
|
+
* filed against an older engine may already be fixed, and knowing
|
|
24
|
+
* the platform is half of reproducing a terminal bug. */
|
|
25
|
+
cliVersion?: string;
|
|
26
|
+
engineVersion?: string;
|
|
27
|
+
platform?: string;
|
|
18
28
|
status: BacklogStatus;
|
|
19
29
|
/** The commits that closed it. The server refuses to move an item to
|
|
20
30
|
* `complete` without at least one (user ruling 2026-08-27), so a
|
|
@@ -22,6 +32,11 @@ export interface IBacklogItem {
|
|
|
22
32
|
* which is what stops the board drifting from the tree. `wont-fix`
|
|
23
33
|
* is exempt: there is no commit behind deciding not to act. */
|
|
24
34
|
commits?: string[];
|
|
35
|
+
/** THE BENCH, when one is attached. Already on the wire -- /list uses
|
|
36
|
+
* an EXCLUSION projection, so this arrives whether or not anyone
|
|
37
|
+
* declared it -- and undeclared is how a board full of benches looked
|
|
38
|
+
* identical to a board with none. */
|
|
39
|
+
repro?: IRepro;
|
|
25
40
|
vetting?: {
|
|
26
41
|
state: 'pending' | 'vetted' | 'failed';
|
|
27
42
|
verdict?: 'bug' | 'canon-violation' | 'enhancement' | 'works-as-intended' | 'needs-detail';
|
|
@@ -82,6 +97,11 @@ export interface IReviewItem {
|
|
|
82
97
|
text: string;
|
|
83
98
|
at?: string;
|
|
84
99
|
};
|
|
100
|
+
/** THE BENCH THIS FIX SHIPS WITH: a scene spec the client builds a
|
|
101
|
+
* two-room bench from, and the literal commands to type in it. Not
|
|
102
|
+
* every item has one -- some are about a verb, a note or a menu --
|
|
103
|
+
* so absence is ordinary and says so rather than reading as broken. */
|
|
104
|
+
repro?: IRepro;
|
|
85
105
|
}
|
|
86
106
|
/**
|
|
87
107
|
* The review queue, OLDEST FIRST. That order is load-bearing and comes
|
|
@@ -139,6 +159,17 @@ export declare function postBacklogSignoff(itemId: string, note: string, runnerN
|
|
|
139
159
|
* than a clean slate.
|
|
140
160
|
*/
|
|
141
161
|
export declare function postBacklogReject(itemId: string, note: string, runnerName?: string): Promise<BacklogOutcome>;
|
|
162
|
+
/**
|
|
163
|
+
* CLOSE IT WITH NO VERDICT -- the reporter withdraws their own item.
|
|
164
|
+
*
|
|
165
|
+
* The third answer, and the board had only two. Signing off a mistake
|
|
166
|
+
* puts a false confirmation on the record; rejecting it sends imaginary
|
|
167
|
+
* work back to whoever "fixed" it. Both lie, in opposite directions.
|
|
168
|
+
*
|
|
169
|
+
* Lands on `wont-fix` server-side, which is what that status has always
|
|
170
|
+
* meant: closed with nothing behind it. Reporter or admin.
|
|
171
|
+
*/
|
|
172
|
+
export declare function postBacklogClose(itemId: string, note: string, runnerName?: string): Promise<BacklogOutcome>;
|
|
142
173
|
export interface IRoleHolder {
|
|
143
174
|
email?: string;
|
|
144
175
|
roles: string[];
|
|
@@ -157,7 +188,18 @@ export declare function setRole(action: 'grant' | 'revoke', email: string, role:
|
|
|
157
188
|
outcome: BacklogOutcome;
|
|
158
189
|
message?: string;
|
|
159
190
|
}>;
|
|
160
|
-
|
|
191
|
+
/**
|
|
192
|
+
* The board.
|
|
193
|
+
*
|
|
194
|
+
* WITHOUT a status, the server now leaves CLOSED items out (user ruling
|
|
195
|
+
* 2026-08-28: "I shouldn't see any 'done' items when looking at the
|
|
196
|
+
* backlog") and returns what is left ordered by what needs attention:
|
|
197
|
+
* in-review first, then open. `all` asks for everything anyway; a
|
|
198
|
+
* specific `status` is always honoured exactly.
|
|
199
|
+
*/
|
|
200
|
+
export declare function fetchBacklog(status?: BacklogStatus, opts?: {
|
|
201
|
+
all?: boolean;
|
|
202
|
+
}): Promise<{
|
|
161
203
|
outcome: BacklogOutcome;
|
|
162
204
|
items?: IBacklogItem[];
|
|
163
205
|
}>;
|
|
@@ -25,7 +25,7 @@ const HOSTNAME = DEV ? 'localhost' : 'www.maka-cli.com';
|
|
|
25
25
|
const PORT = DEV ? Number(process.env.MAKA_DEV_PORT ?? 3000) : 443;
|
|
26
26
|
const API_BASE = 'api/v1/game-backlog';
|
|
27
27
|
const TIMEOUT_MS = 10000;
|
|
28
|
-
export
|
|
28
|
+
export { BACKLOG_STATUSES } from './backlog-vocab.js';
|
|
29
29
|
function request(method, apiPath, token, body) {
|
|
30
30
|
return new Promise((resolve, reject) => {
|
|
31
31
|
const payload = body === undefined ? undefined : JSON.stringify(body);
|
|
@@ -224,6 +224,39 @@ export async function postBacklogReject(itemId, note, runnerName) {
|
|
|
224
224
|
return 'offline';
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* CLOSE IT WITH NO VERDICT -- the reporter withdraws their own item.
|
|
229
|
+
*
|
|
230
|
+
* The third answer, and the board had only two. Signing off a mistake
|
|
231
|
+
* puts a false confirmation on the record; rejecting it sends imaginary
|
|
232
|
+
* work back to whoever "fixed" it. Both lie, in opposite directions.
|
|
233
|
+
*
|
|
234
|
+
* Lands on `wont-fix` server-side, which is what that status has always
|
|
235
|
+
* meant: closed with nothing behind it. Reporter or admin.
|
|
236
|
+
*/
|
|
237
|
+
export async function postBacklogClose(itemId, note, runnerName) {
|
|
238
|
+
const token = authToken();
|
|
239
|
+
if (!token)
|
|
240
|
+
return 'no-login';
|
|
241
|
+
try {
|
|
242
|
+
const res = await request('POST', `/${API_BASE}/item/${encodeURIComponent(itemId)}/close`, token, {
|
|
243
|
+
note,
|
|
244
|
+
runnerName,
|
|
245
|
+
});
|
|
246
|
+
if (res.statusCode === 200 || res.statusCode === 201)
|
|
247
|
+
return 'ok';
|
|
248
|
+
if (res.statusCode === 401)
|
|
249
|
+
return 'expired';
|
|
250
|
+
if (res.statusCode === 403)
|
|
251
|
+
return 'forbidden';
|
|
252
|
+
if (res.statusCode === 400 || res.statusCode === 404)
|
|
253
|
+
return 'rejected';
|
|
254
|
+
return 'offline';
|
|
255
|
+
}
|
|
256
|
+
catch {
|
|
257
|
+
return 'offline';
|
|
258
|
+
}
|
|
259
|
+
}
|
|
227
260
|
/** Who holds what. Admin-only server-side; a non-admin gets 'forbidden'
|
|
228
261
|
* and the command turns that into a sentence. */
|
|
229
262
|
export async function fetchRoles() {
|
|
@@ -270,12 +303,21 @@ export async function setRole(action, email, role) {
|
|
|
270
303
|
return { outcome: 'offline' };
|
|
271
304
|
}
|
|
272
305
|
}
|
|
273
|
-
|
|
306
|
+
/**
|
|
307
|
+
* The board.
|
|
308
|
+
*
|
|
309
|
+
* WITHOUT a status, the server now leaves CLOSED items out (user ruling
|
|
310
|
+
* 2026-08-28: "I shouldn't see any 'done' items when looking at the
|
|
311
|
+
* backlog") and returns what is left ordered by what needs attention:
|
|
312
|
+
* in-review first, then open. `all` asks for everything anyway; a
|
|
313
|
+
* specific `status` is always honoured exactly.
|
|
314
|
+
*/
|
|
315
|
+
export async function fetchBacklog(status, opts = {}) {
|
|
274
316
|
const token = authToken();
|
|
275
317
|
if (!token)
|
|
276
318
|
return { outcome: 'no-login' };
|
|
277
319
|
try {
|
|
278
|
-
const query = status ? `?status=${encodeURIComponent(status)}` : '';
|
|
320
|
+
const query = status ? `?status=${encodeURIComponent(status)}` : (opts.all ? '?all=1' : '');
|
|
279
321
|
const res = await request('GET', `/${API_BASE}/list${query}`, token);
|
|
280
322
|
if (res.statusCode === 401)
|
|
281
323
|
return { outcome: 'expired' };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backlog.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/utilities/backlog.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"backlog.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/utilities/backlog.ts"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G,CAAC,UAAU,KAAK,GAAG;YAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;QAC1D,MAAM,MAAM,GAAG,SAAS,CAA4B,GAAG,CAAC,IAAI,CAAC,CAAC;QAC9D,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,EAAE,CAAC;IACvD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAChC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A COMMIT PREFIX, matched the way git matches one.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately loose, and deliberately NOT the loose match this repo has
|
|
5
|
+
* been bitten by three times: Inventory.resolveKey compares with
|
|
6
|
+
* `includes` in both directions, which is right for a phrase a human
|
|
7
|
+
* typed at an object and wrong for an identity already known. A sha is
|
|
8
|
+
* neither -- it is a PREFIX TREE, and abbreviating one to its leading
|
|
9
|
+
* characters is git's own convention, so `startsWith` in either
|
|
10
|
+
* direction is the correct generosity. `includes` would match a sha
|
|
11
|
+
* carrying those characters in the MIDDLE, which git would never do.
|
|
12
|
+
*/
|
|
13
|
+
export declare function commitMatches(commits: string[] | undefined, wanted: string): boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A COMMIT PREFIX, matched the way git matches one.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately loose, and deliberately NOT the loose match this repo has
|
|
5
|
+
* been bitten by three times: Inventory.resolveKey compares with
|
|
6
|
+
* `includes` in both directions, which is right for a phrase a human
|
|
7
|
+
* typed at an object and wrong for an identity already known. A sha is
|
|
8
|
+
* neither -- it is a PREFIX TREE, and abbreviating one to its leading
|
|
9
|
+
* characters is git's own convention, so `startsWith` in either
|
|
10
|
+
* direction is the correct generosity. `includes` would match a sha
|
|
11
|
+
* carrying those characters in the MIDDLE, which git would never do.
|
|
12
|
+
*/
|
|
13
|
+
export function commitMatches(commits, wanted) {
|
|
14
|
+
const w = wanted.trim().toLowerCase();
|
|
15
|
+
if (!w)
|
|
16
|
+
return false;
|
|
17
|
+
return (commits ?? []).some(c => {
|
|
18
|
+
const sha = c.toLowerCase();
|
|
19
|
+
return sha.startsWith(w) || w.startsWith(sha);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=commit-ref.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commit-ref.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/utilities/commit-ref.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa,CAAC,OAA6B,EAAE,MAAc;IACzE,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACtC,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACrB,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QAC9B,MAAM,GAAG,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;QAC5B,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE NOTE A SESSION LEAVES FOR ITS LAUNCHER.
|
|
3
|
+
*
|
|
4
|
+
* The game runs in a spawned child that holds the terminal through
|
|
5
|
+
* blessed, so it cannot start another game itself -- two blessed
|
|
6
|
+
* screens on one terminal is the exact failure the "parent is the
|
|
7
|
+
* guaranteed janitor" rule exists to prevent. When the player asks to
|
|
8
|
+
* drop into a repro bench, the game therefore seals its save, writes
|
|
9
|
+
* this file, and exits 0. The parent reads it, plays the bench, and
|
|
10
|
+
* relaunches the same runner on a resume.
|
|
11
|
+
*
|
|
12
|
+
* Deliberately a FILE and not an exit code: an exit code carries about
|
|
13
|
+
* three bits and this needs to name an item. It also survives the child
|
|
14
|
+
* dying between writing and exiting, which an in-memory channel would
|
|
15
|
+
* not.
|
|
16
|
+
*/
|
|
17
|
+
export interface IHandoff {
|
|
18
|
+
kind: 'repro';
|
|
19
|
+
itemId: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function handoffPath(sessionDir: string): string;
|
|
22
|
+
/** Leave the note. Failure is the caller's to handle -- a session that
|
|
23
|
+
* cannot write one must not pretend it handed off. */
|
|
24
|
+
export declare function writeHandoff(sessionDir: string, handoff: IHandoff): void;
|
|
25
|
+
/**
|
|
26
|
+
* READ THE NOTE AND DESTROY IT, in that order.
|
|
27
|
+
*
|
|
28
|
+
* SINGLE USE IS A CORRECTNESS REQUIREMENT, not tidiness. A handoff left
|
|
29
|
+
* on disk fires again on the NEXT exit, and the one after that -- the
|
|
30
|
+
* player would be dropped into the same bench every time they tried to
|
|
31
|
+
* quit, with no way out but deleting a file they do not know exists.
|
|
32
|
+
*
|
|
33
|
+
* The delete happens in a `finally`, so it also runs when the read or
|
|
34
|
+
* the parse throws. A note that cannot be understood is still a note
|
|
35
|
+
* that has been consumed; leaving a malformed one behind would produce
|
|
36
|
+
* exactly the loop above, except silent.
|
|
37
|
+
*
|
|
38
|
+
* Anything unrecognised returns undefined rather than throwing: the
|
|
39
|
+
* caller's next move is to carry on with the player's game, and a
|
|
40
|
+
* corrupt byte on disk must never cost somebody their session.
|
|
41
|
+
*/
|
|
42
|
+
export declare function takeHandoff(sessionDir: string): IHandoff | undefined;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
export function handoffPath(sessionDir) {
|
|
4
|
+
return path.join(sessionDir, 'handoff.json');
|
|
5
|
+
}
|
|
6
|
+
/** Leave the note. Failure is the caller's to handle -- a session that
|
|
7
|
+
* cannot write one must not pretend it handed off. */
|
|
8
|
+
export function writeHandoff(sessionDir, handoff) {
|
|
9
|
+
fs.writeFileSync(handoffPath(sessionDir), JSON.stringify(handoff), 'utf8');
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* READ THE NOTE AND DESTROY IT, in that order.
|
|
13
|
+
*
|
|
14
|
+
* SINGLE USE IS A CORRECTNESS REQUIREMENT, not tidiness. A handoff left
|
|
15
|
+
* on disk fires again on the NEXT exit, and the one after that -- the
|
|
16
|
+
* player would be dropped into the same bench every time they tried to
|
|
17
|
+
* quit, with no way out but deleting a file they do not know exists.
|
|
18
|
+
*
|
|
19
|
+
* The delete happens in a `finally`, so it also runs when the read or
|
|
20
|
+
* the parse throws. A note that cannot be understood is still a note
|
|
21
|
+
* that has been consumed; leaving a malformed one behind would produce
|
|
22
|
+
* exactly the loop above, except silent.
|
|
23
|
+
*
|
|
24
|
+
* Anything unrecognised returns undefined rather than throwing: the
|
|
25
|
+
* caller's next move is to carry on with the player's game, and a
|
|
26
|
+
* corrupt byte on disk must never cost somebody their session.
|
|
27
|
+
*/
|
|
28
|
+
export function takeHandoff(sessionDir) {
|
|
29
|
+
const file = handoffPath(sessionDir);
|
|
30
|
+
if (!fs.existsSync(file))
|
|
31
|
+
return undefined;
|
|
32
|
+
let raw;
|
|
33
|
+
try {
|
|
34
|
+
raw = fs.readFileSync(file, 'utf8');
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
finally {
|
|
40
|
+
try {
|
|
41
|
+
fs.rmSync(file, { force: true });
|
|
42
|
+
}
|
|
43
|
+
catch { /* gone is gone */ }
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
const parsed = JSON.parse(raw);
|
|
47
|
+
if (parsed?.kind !== 'repro')
|
|
48
|
+
return undefined;
|
|
49
|
+
if (typeof parsed.itemId !== 'string' || !parsed.itemId.trim())
|
|
50
|
+
return undefined;
|
|
51
|
+
return { kind: 'repro', itemId: parsed.itemId };
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=handoff.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handoff.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/utilities/handoff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAuBxB,MAAM,UAAU,WAAW,CAAC,UAAkB;IAC5C,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC;AAC/C,CAAC;AAED;uDACuD;AACvD,MAAM,UAAU,YAAY,CAAC,UAAkB,EAAE,OAAiB;IAChE,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AAC7E,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,WAAW,CAAC,UAAkB;IAC5C,MAAM,IAAI,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;IACrC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,SAAS,CAAC;IAC3C,IAAI,GAAuB,CAAC;IAC5B,IAAI,CAAC;QACH,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;YAAS,CAAC;QACT,IAAI,CAAC;YAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC;IACxE,CAAC;IACD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAa,CAAC;QAC3C,IAAI,MAAM,EAAE,IAAI,KAAK,OAAO;YAAE,OAAO,SAAS,CAAC;QAC/C,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;YAAE,OAAO,SAAS,CAAC;QACjF,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;IAClD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { IReviewItem, BacklogOutcome } from './backlog.js';
|
|
2
|
+
import { IRepro } from '../types/repro.js';
|
|
3
|
+
/**
|
|
4
|
+
* FINDING THE ITEM A REPRO WAS ASKED FOR, and standing its bench up.
|
|
5
|
+
*
|
|
6
|
+
* Kept out of the launcher so `maka play:shadowrun --repro <id>` can
|
|
7
|
+
* pull the game graph in lazily, the same way `--backlog` does -- the
|
|
8
|
+
* launcher's own note explains why that matters: importing a model
|
|
9
|
+
* chains through game.ts, blessed and 150 files on every `maka`
|
|
10
|
+
* invocation, `maka --help` included.
|
|
11
|
+
*/
|
|
12
|
+
export type ReproTargetOutcome = BacklogOutcome | 'not-found' | 'no-repro';
|
|
13
|
+
export interface IReproTarget {
|
|
14
|
+
outcome: ReproTargetOutcome;
|
|
15
|
+
item?: IReviewItem;
|
|
16
|
+
repro?: IRepro;
|
|
17
|
+
/** The queue as it was read, for a "which one did you mean" listing. */
|
|
18
|
+
queue?: IReviewItem[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Resolve `<id>` or `<n>` against a FRESH review queue.
|
|
22
|
+
*
|
|
23
|
+
* An index is accepted because the review list numbers its rows and a
|
|
24
|
+
* person reads "3" off the screen -- it resolves against the server's
|
|
25
|
+
* own oldest-first order, which is the same order `backlog review <n>`
|
|
26
|
+
* binds its numbers in, so the two cannot disagree.
|
|
27
|
+
*
|
|
28
|
+
* An id is matched WHOLE. Not a prefix, deliberately: a truncated
|
|
29
|
+
* backlog id in an API call has already cost a session a 404, and every
|
|
30
|
+
* view that prints an id prints all seventeen characters of it. There
|
|
31
|
+
* is nothing to abbreviate, so there is nothing to get wrong. (This is
|
|
32
|
+
* the opposite call from `--commit`, and for the opposite reason: a sha
|
|
33
|
+
* is a prefix tree that git itself abbreviates, while a Mongo id is an
|
|
34
|
+
* opaque token nobody types from memory.)
|
|
35
|
+
*/
|
|
36
|
+
export declare function resolveReproTarget(idOrIndex: string): Promise<IReproTarget>;
|
|
37
|
+
/**
|
|
38
|
+
* A REPRO READ OFF DISK, so one can be proved before it is attached.
|
|
39
|
+
*
|
|
40
|
+
* The discipline this feature asks for is "dry-run it, then attach it",
|
|
41
|
+
* and until this existed the tool only supported the reverse -- the
|
|
42
|
+
* dry run resolved against the board, so a spec had to be published
|
|
43
|
+
* before anyone could watch it work. Whoever is writing a bench needs
|
|
44
|
+
* to iterate on a file.
|
|
45
|
+
*
|
|
46
|
+
* Anything that is not a readable file returns undefined, so an id or
|
|
47
|
+
* an index falls through to the board untouched. A file that IS there
|
|
48
|
+
* but malformed THROWS instead: treating a broken spec as "not a path"
|
|
49
|
+
* would quietly send the caller to the board to look for an item named
|
|
50
|
+
* after their filename, and they would read the miss as the board being
|
|
51
|
+
* wrong rather than their JSON.
|
|
52
|
+
*/
|
|
53
|
+
export declare function readReproFile(candidate: string): IRepro | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* REPLAY THE STEPS HEADLESSLY and hand back the transcript.
|
|
56
|
+
*
|
|
57
|
+
* This is how a repro is proved before it is attached to anything: the
|
|
58
|
+
* strings a reviewer will be told to type are executed against a real
|
|
59
|
+
* boot of the bench they will be dropped into. Nothing spawns, no
|
|
60
|
+
* terminal is taken, and the whole thing takes about a second.
|
|
61
|
+
*
|
|
62
|
+
* The imports are inline because this reaches the game graph and its
|
|
63
|
+
* only caller is a launcher branch that must not pay for it otherwise.
|
|
64
|
+
*/
|
|
65
|
+
export declare function dryRunRepro(repro: IRepro): Promise<{
|
|
66
|
+
lines: string[];
|
|
67
|
+
warnings: string[];
|
|
68
|
+
}>;
|