@maka/maka-cli 5.8.0 → 5.10.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/sideQuest/archetypes.js +4 -2
- package/bundle/typescript/src/commands/game/sideQuest/archetypes.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js +3 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/advance.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js +14 -6
- package/bundle/typescript/src/commands/game/sideQuest/commands/ask.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js +3 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/assense.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js +24 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/attack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/buy.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js +31 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/bypass-command.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js +16 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/call.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.d.ts +7 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js +86 -15
- package/bundle/typescript/src/commands/game/sideQuest/commands/cast.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/companions.js +5 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/companions.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/contacts.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js +5 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/equip.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/equipment.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js +5 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/give.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.d.ts +5 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js +94 -16
- package/bundle/typescript/src/commands/game/sideQuest/commands/go.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/grapple.d.ts +38 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/grapple.js +178 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/grapple.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/hack.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js +7 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/haggle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/hints.d.ts +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/hints.js +24 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/hints.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/initiate.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/inv.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/inv.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/jump.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/jump.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/lifestyle.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/lifestyle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js +48 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/look.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.js +3 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/map.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/move.d.ts +41 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/move.js +160 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/move.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/order.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/order.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js +5 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/persuade.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/project.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/project.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/quality-trade.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js +8 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/rest.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/say.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js +15 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/search.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sell.js +7 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sell.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/silent.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/silent.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js +3 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/sneak.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js +11 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/solve.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js +24 -13
- package/bundle/typescript/src/commands/game/sideQuest/commands/spells.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/summon.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/summon.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/surrender.js +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/surrender.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js +37 -4
- package/bundle/typescript/src/commands/game/sideQuest/commands/take.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/talk.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/treat.js +5 -0
- package/bundle/typescript/src/commands/game/sideQuest/commands/treat.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js +9 -2
- package/bundle/typescript/src/commands/game/sideQuest/commands/unlock.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/work.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/commands/work.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/item-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js +2 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/puzzle-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js +5 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/room-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.d.ts +11 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-chunks.js +138 -23
- 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 +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/factories/scene-factory.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/game.d.ts +33 -1
- package/bundle/typescript/src/commands/game/sideQuest/game.js +303 -26
- package/bundle/typescript/src/commands/game/sideQuest/game.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/item.d.ts +2 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js +3 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/item.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.d.ts +13 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js +195 -6
- package/bundle/typescript/src/commands/game/sideQuest/models/npc.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/player.d.ts +11 -2
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js +35 -5
- package/bundle/typescript/src/commands/game/sideQuest/models/player.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js +19 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/puzzle.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/room.d.ts +12 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js +51 -4
- package/bundle/typescript/src/commands/game/sideQuest/models/room.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.d.ts +45 -0
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js +197 -4
- package/bundle/typescript/src/commands/game/sideQuest/models/scene.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene1.json +76 -20
- package/bundle/typescript/src/commands/game/sideQuest/scenes/scene2.json +157 -34
- package/bundle/typescript/src/commands/game/sideQuest/types/save-file.d.ts +208 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/save-file.js +14 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/save-file.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/exit-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/item-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/player-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/puzzle-seed.d.ts +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/types/seed/room-seed.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.d.ts +6 -0
- package/bundle/typescript/src/commands/game/sideQuest/ui.js +100 -7
- package/bundle/typescript/src/commands/game/sideQuest/ui.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js +18 -4
- package/bundle/typescript/src/commands/game/sideQuest/utilities/auto-fight.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/cloud-saves.d.ts +50 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/cloud-saves.js +232 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/cloud-saves.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.d.ts +10 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js +17 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/combat-exchange.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/grapple.d.ts +36 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/grapple.js +57 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/grapple.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/hints.d.ts +4 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/hints.js +55 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/hints.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.d.ts +71 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.js +447 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/persistence.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js +8 -7
- package/bundle/typescript/src/commands/game/sideQuest/utilities/planes.js.map +1 -1
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.d.ts +121 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js +315 -0
- package/bundle/typescript/src/commands/game/sideQuest/utilities/spots.js.map +1 -0
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js +174 -18
- package/bundle/typescript/src/commands/game/sideQuest.sub.cmd.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { IItemSeedJson } from './seed/item-seed.js';
|
|
2
|
+
import { ISceneSeedJson } from './seed/scene-seed.js';
|
|
3
|
+
/**
|
|
4
|
+
* The save-file schema (see utilities/persistence.ts for the machinery).
|
|
5
|
+
* PERSISTENCE RULINGS (player decisions, fixed): character + hub world
|
|
6
|
+
* persist; runs are disposable; autosave at safe beats only (homecoming,
|
|
7
|
+
* rest, job-accept, quit); one slot per character name; PERMADEATH --
|
|
8
|
+
* real death burns the save. Saves always write locally and sync to
|
|
9
|
+
* maka-cli.com when logged in (local-first; the cloud is a mirror).
|
|
10
|
+
*
|
|
11
|
+
* Bump SAVE_VERSION on any breaking shape change; readers REFUSE a
|
|
12
|
+
* mismatched version and keep the file (no silent migration, no
|
|
13
|
+
* deletion -- an old save outlives the build that can't read it).
|
|
14
|
+
*/
|
|
15
|
+
export declare const SAVE_VERSION = 1;
|
|
16
|
+
export type SaveReason = 'homecoming' | 'rest' | 'job-accept' | 'quit';
|
|
17
|
+
/**
|
|
18
|
+
* A live Item flattened to seed shape PLUS the runtime the seed can't
|
|
19
|
+
* say -- ammo left in the magazine, a PAN-jammed device, a bricked
|
|
20
|
+
* deck's damage, a shot-up drone frame. `restoreItem` applies these
|
|
21
|
+
* AFTER construction (firearms auto-fill ammo to 10 in the ctor).
|
|
22
|
+
*/
|
|
23
|
+
export interface ISavedItem extends IItemSeedJson {
|
|
24
|
+
ammo?: number;
|
|
25
|
+
jammed?: boolean;
|
|
26
|
+
deckDamage?: number;
|
|
27
|
+
droneDamage?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Equipment layout keyed "group.slot" ("rightHand.weapon") -> the FULL
|
|
31
|
+
* item. Full blobs, not name references: equipping REMOVES an item from
|
|
32
|
+
* inventory (archetypes.ts equipIntoEmptySlots), so a name-ref into the
|
|
33
|
+
* saved inventory would dangle.
|
|
34
|
+
*/
|
|
35
|
+
export type ISavedEquipment = Record<string, ISavedItem | null>;
|
|
36
|
+
export interface ISavedPlayer {
|
|
37
|
+
name: string;
|
|
38
|
+
archetypeName?: string;
|
|
39
|
+
attributes: {
|
|
40
|
+
body: number;
|
|
41
|
+
agility: number;
|
|
42
|
+
reaction: number;
|
|
43
|
+
combatSkill: number;
|
|
44
|
+
magic: number;
|
|
45
|
+
strength: number;
|
|
46
|
+
willpower: number;
|
|
47
|
+
logic: number;
|
|
48
|
+
intuition: number;
|
|
49
|
+
charisma: number;
|
|
50
|
+
edge: number;
|
|
51
|
+
resonance: number;
|
|
52
|
+
adept: boolean;
|
|
53
|
+
};
|
|
54
|
+
/** Talent before essence burn -- the true source; effective magic/
|
|
55
|
+
* resonance recompute from these + the aug replay. */
|
|
56
|
+
baseMagic: number;
|
|
57
|
+
baseResonance: number;
|
|
58
|
+
skills: Record<string, number>;
|
|
59
|
+
karma: number;
|
|
60
|
+
careerKarma: number;
|
|
61
|
+
/** Notoriety is its reasons (dedupe key IS the string) -- replayed
|
|
62
|
+
* through addNotoriety so derived rep recomputes. */
|
|
63
|
+
notorietyReasons: string[];
|
|
64
|
+
/** Written for round-trip verification only; the live value is
|
|
65
|
+
* reconstructed by replaying installAug over `augmentations`. */
|
|
66
|
+
essence: number;
|
|
67
|
+
augmentations: string[];
|
|
68
|
+
qualities: string[];
|
|
69
|
+
metamagics: string[];
|
|
70
|
+
initiationGrade: number;
|
|
71
|
+
edgeRemaining: number;
|
|
72
|
+
haggledThisJob: boolean;
|
|
73
|
+
damageTaken: number;
|
|
74
|
+
stunTaken: number;
|
|
75
|
+
needs: {
|
|
76
|
+
ateThisCycle: boolean;
|
|
77
|
+
sleptThisCycle: boolean;
|
|
78
|
+
hungerStreak: number;
|
|
79
|
+
sleepStreak: number;
|
|
80
|
+
hungerFatigue: number;
|
|
81
|
+
sleepFatigue: number;
|
|
82
|
+
};
|
|
83
|
+
autoStance: 'manual' | 'guarded' | 'aggressive';
|
|
84
|
+
inventory: ISavedItem[];
|
|
85
|
+
equipment: ISavedEquipment;
|
|
86
|
+
}
|
|
87
|
+
/** One hub room's divergence from its seed: inventory is a FULL
|
|
88
|
+
* replacement, the rest is runtime flags the seed can't express. */
|
|
89
|
+
export interface ISavedRoomOverlay {
|
|
90
|
+
name: string;
|
|
91
|
+
inventory: ISavedItem[];
|
|
92
|
+
plainSightItems: string[];
|
|
93
|
+
searchedBy: string[];
|
|
94
|
+
visitedBy: string[];
|
|
95
|
+
hostCracked: boolean;
|
|
96
|
+
doorLocks: {
|
|
97
|
+
direction: string;
|
|
98
|
+
isLocked: boolean;
|
|
99
|
+
}[];
|
|
100
|
+
/** Bank/authority deposits (Room._currencyLedger) -- player's only. */
|
|
101
|
+
currencyLedger: {
|
|
102
|
+
owner: string;
|
|
103
|
+
items: ISavedItem[];
|
|
104
|
+
}[];
|
|
105
|
+
}
|
|
106
|
+
export interface ISavedNpcOverlay {
|
|
107
|
+
name: string;
|
|
108
|
+
room: string;
|
|
109
|
+
atSpot?: string;
|
|
110
|
+
damageTaken: number;
|
|
111
|
+
stunTaken: number;
|
|
112
|
+
surrendered: boolean;
|
|
113
|
+
objective?: string;
|
|
114
|
+
/** AI memory tail -- how a contact remembers you across sessions. */
|
|
115
|
+
history: string[];
|
|
116
|
+
inventory: ISavedItem[];
|
|
117
|
+
equipment: ISavedEquipment;
|
|
118
|
+
}
|
|
119
|
+
export interface ISavedHub {
|
|
120
|
+
rooms: ISavedRoomOverlay[];
|
|
121
|
+
npcs: ISavedNpcOverlay[];
|
|
122
|
+
/** Seed NPCs absent from the live scene (killed) -- removed QUIETLY
|
|
123
|
+
* on load; their dropped gear is already in the room overlays. */
|
|
124
|
+
deadActors: string[];
|
|
125
|
+
puzzles: {
|
|
126
|
+
name: string;
|
|
127
|
+
solved: boolean;
|
|
128
|
+
bypassBurned: boolean;
|
|
129
|
+
}[];
|
|
130
|
+
worldEvents: string[];
|
|
131
|
+
roomOwnership: [string, string][];
|
|
132
|
+
itemOwnership: [string, string][];
|
|
133
|
+
/** The hideout is Game-owned and in no seed -- its whole inventory
|
|
134
|
+
* (the stash) and the player's secure storage ride here. */
|
|
135
|
+
home: {
|
|
136
|
+
inventory: ISavedItem[];
|
|
137
|
+
secureStash: ISavedItem[];
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
export interface ISavedGig {
|
|
141
|
+
from: string;
|
|
142
|
+
to: string;
|
|
143
|
+
itemName: string;
|
|
144
|
+
itemDescription: string;
|
|
145
|
+
pay: number;
|
|
146
|
+
brief: string;
|
|
147
|
+
}
|
|
148
|
+
export interface ISavedGameState {
|
|
149
|
+
lifestyleTier: string;
|
|
150
|
+
rentDebt: number;
|
|
151
|
+
tier: number;
|
|
152
|
+
contacts: [string, {
|
|
153
|
+
connection: number;
|
|
154
|
+
loyalty: number;
|
|
155
|
+
spent: number;
|
|
156
|
+
gigs: number;
|
|
157
|
+
asked: boolean;
|
|
158
|
+
}][];
|
|
159
|
+
fencedCategories: string[];
|
|
160
|
+
/** Rumor pool stays seed-sourced; only the cursor + active persist. */
|
|
161
|
+
rumorIndex: number;
|
|
162
|
+
activeRumor?: string;
|
|
163
|
+
/** The gig pool IS saved -- offerGigFrom splices entries out of it. */
|
|
164
|
+
gigPool: ISavedGig[];
|
|
165
|
+
gigIndex: number;
|
|
166
|
+
gigAvailable?: ISavedGig;
|
|
167
|
+
activeGig?: {
|
|
168
|
+
from: string;
|
|
169
|
+
to: string;
|
|
170
|
+
itemName: string;
|
|
171
|
+
pay: number;
|
|
172
|
+
};
|
|
173
|
+
/** A drafted-but-untaken job survives a quit -- 20-40s of generation
|
|
174
|
+
* (and any haggled payout, which lives in the seed) not re-billed. */
|
|
175
|
+
pendingRun?: {
|
|
176
|
+
seed: ISceneSeedJson;
|
|
177
|
+
tier: number;
|
|
178
|
+
ride?: {
|
|
179
|
+
arrive: string;
|
|
180
|
+
board: string;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
export interface ISaveFileV1 {
|
|
185
|
+
version: typeof SAVE_VERSION;
|
|
186
|
+
savedAt: string;
|
|
187
|
+
reason: SaveReason;
|
|
188
|
+
playerName: string;
|
|
189
|
+
/** Cheap fields for the launcher's Continue menu -- no deep parse. */
|
|
190
|
+
summary: {
|
|
191
|
+
archetypeName?: string;
|
|
192
|
+
karma: number;
|
|
193
|
+
currency: number;
|
|
194
|
+
lifestyleTier: string;
|
|
195
|
+
hubName: string;
|
|
196
|
+
};
|
|
197
|
+
/** The hub seed EMBEDDED: resume never depends on scene2.json (or a
|
|
198
|
+
* generated hub) still existing or matching. */
|
|
199
|
+
hubSeed: ISceneSeedJson;
|
|
200
|
+
player: ISavedPlayer;
|
|
201
|
+
game: ISavedGameState;
|
|
202
|
+
hub: ISavedHub;
|
|
203
|
+
/** Cloud-sync bookkeeping (local-first): the cloud copy's savedAt as
|
|
204
|
+
* of our last successful push/pull -- divergence detection. */
|
|
205
|
+
sync?: {
|
|
206
|
+
lastCloudSavedAt?: string;
|
|
207
|
+
};
|
|
208
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The save-file schema (see utilities/persistence.ts for the machinery).
|
|
3
|
+
* PERSISTENCE RULINGS (player decisions, fixed): character + hub world
|
|
4
|
+
* persist; runs are disposable; autosave at safe beats only (homecoming,
|
|
5
|
+
* rest, job-accept, quit); one slot per character name; PERMADEATH --
|
|
6
|
+
* real death burns the save. Saves always write locally and sync to
|
|
7
|
+
* maka-cli.com when logged in (local-first; the cloud is a mirror).
|
|
8
|
+
*
|
|
9
|
+
* Bump SAVE_VERSION on any breaking shape change; readers REFUSE a
|
|
10
|
+
* mismatched version and keep the file (no silent migration, no
|
|
11
|
+
* deletion -- an old save outlives the build that can't read it).
|
|
12
|
+
*/
|
|
13
|
+
export const SAVE_VERSION = 1;
|
|
14
|
+
//# sourceMappingURL=save-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"save-file.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/types/save-file.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC"}
|
|
@@ -11,6 +11,12 @@ export interface IRoomSeedJson {
|
|
|
11
11
|
hasNode?: boolean;
|
|
12
12
|
nodeAccess?: 'wireless' | 'wired';
|
|
13
13
|
warded?: boolean;
|
|
14
|
+
spots?: {
|
|
15
|
+
name: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
tags?: ('cover-partial' | 'cover-good')[];
|
|
18
|
+
}[];
|
|
19
|
+
size?: 'small' | 'medium' | 'large';
|
|
14
20
|
supportedLifestyles?: {
|
|
15
21
|
residenceTiers?: string[];
|
|
16
22
|
employmentTags?: string[];
|
|
@@ -6,5 +6,11 @@ export interface IMainGameConfig {
|
|
|
6
6
|
generationNotice?: string;
|
|
7
7
|
/** Archetype name picked at launch -- sets the player's attribute sheet. */
|
|
8
8
|
archetype?: string;
|
|
9
|
+
/** Where this character's save slot lives (see utilities/persistence.ts).
|
|
10
|
+
* Unset = a session that never saves (classic scenes). */
|
|
11
|
+
saveFilePath?: string;
|
|
12
|
+
/** True when the launcher picked "Continue as <name>" -- the save at
|
|
13
|
+
* saveFilePath is loaded instead of rolling a fresh archetype. */
|
|
14
|
+
resume?: boolean;
|
|
9
15
|
}
|
|
10
16
|
export declare function main(playerName: string, sceneSeed: ISceneSeedJson, options: IMainGameConfig): Promise<void>;
|
|
@@ -7,10 +7,48 @@ import { getArchetype, outfitArchetype } from './archetypes.js';
|
|
|
7
7
|
import { STANCE_CYCLE } from './models/player.js';
|
|
8
8
|
import { AutoFight } from './utilities/auto-fight.js';
|
|
9
9
|
import { TERMINAL_RESET_SEQUENCE } from './utilities/terminal-reset.js';
|
|
10
|
+
import { readSave } from './utilities/persistence.js';
|
|
11
|
+
import { SAVE_VERSION } from './types/save-file.js';
|
|
12
|
+
// Windows Terminal draws astral-plane emoji (📞 call icon, 📍 HUD pin,
|
|
13
|
+
// 👥 companions, 💀) TWO columns wide, but blessed's 2015-era unicode
|
|
14
|
+
// tables predate emoji being classified wide and count them as ONE. The
|
|
15
|
+
// one-cell drift on every icon row pushed box borders sideways into the
|
|
16
|
+
// next panel and left smartCSR's partial redraws smearing stray orphan
|
|
17
|
+
// characters (two player screenshots; the text-presentation ⚔, one cell
|
|
18
|
+
// on both sides, stayed flush). Teaching charWidth the pictograph blocks
|
|
19
|
+
// fixes the model: strWidth (wrapping) and the cell renderer both route
|
|
20
|
+
// through this same export. BMP dingbats stay untouched -- the terminal
|
|
21
|
+
// really does draw those narrow.
|
|
22
|
+
// TWO patches, and they only work as a pair (blessed's own draw comment:
|
|
23
|
+
// "eat the next character which should be a space due to parseContent's
|
|
24
|
+
// behavior"): charWidth makes wrapping count 2 and the emitter skip the
|
|
25
|
+
// filler cell; chars.all makes parseContent actually INSERT that \x03
|
|
26
|
+
// filler after each pictograph. Either alone leaves rows misaligned or
|
|
27
|
+
// eats a real character.
|
|
28
|
+
{
|
|
29
|
+
const uni = blessed.unicode;
|
|
30
|
+
const origCharWidth = uni.charWidth;
|
|
31
|
+
uni.charWidth = function (text, i) {
|
|
32
|
+
const point = typeof text === 'number' ? text : uni.codePointAt(text, i ?? 0);
|
|
33
|
+
if (point >= 0x1F300 && point <= 0x1FAFF)
|
|
34
|
+
return 2;
|
|
35
|
+
return origCharWidth.call(this, text, i);
|
|
36
|
+
};
|
|
37
|
+
// U+1F300-1FAFF as surrogate pairs. Wrapped in a fresh outer group so
|
|
38
|
+
// parseContent's "$1\x03" replacement still means "the whole match".
|
|
39
|
+
const pictographs = '\\ud83c[\\udf00-\\udfff]|\\ud83d[\\udc00-\\udfff]|\\ud83e[\\udc00-\\udeff]';
|
|
40
|
+
uni.chars.all = new RegExp(`(${uni.chars.all.source}|${pictographs})`, 'g');
|
|
41
|
+
}
|
|
10
42
|
export async function main(playerName, sceneSeed, options) {
|
|
11
43
|
// Create a screen object
|
|
12
44
|
const screen = blessed.screen({
|
|
13
45
|
smartCSR: true,
|
|
46
|
+
// Without this, blessed strips every astral-plane character (all
|
|
47
|
+
// modern emoji -- the 📞 call icon, companion icons) to "?" during
|
|
48
|
+
// content parsing, no matter what the terminal can render. BMP
|
|
49
|
+
// symbols like ⚔ slipped through, which is why a session showed
|
|
50
|
+
// swords but question-mark phones.
|
|
51
|
+
fullUnicode: true,
|
|
14
52
|
title: 'Side Quest Adventure Game',
|
|
15
53
|
});
|
|
16
54
|
// TERMINAL HYGIENE: blessed arms xterm modes (mouse tracking, alt
|
|
@@ -64,12 +102,54 @@ export async function main(playerName, sceneSeed, options) {
|
|
|
64
102
|
// and its requisite gear comes with it -- granted on top of the
|
|
65
103
|
// scene's generic loadout, wearables equipped so a samurai starts
|
|
66
104
|
// with the Predator in hand and a Face wearing the good suit.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
105
|
+
// RESUME (see utilities/persistence.ts): the player is rebuilt from
|
|
106
|
+
// the save's attribute block -- no archetype outfitting (gear,
|
|
107
|
+
// qualities, and augs all come from restorePlayer inside Game.init).
|
|
108
|
+
let player;
|
|
109
|
+
let resumeSave;
|
|
110
|
+
if (options.resume && options.saveFilePath) {
|
|
111
|
+
const read = readSave(options.saveFilePath);
|
|
112
|
+
if (!read.ok) {
|
|
113
|
+
// The file is KEPT -- an old save outlives the build that can't
|
|
114
|
+
// read it. console.error is the convention pre-screen-teardown.
|
|
115
|
+
console.error(read.error === 'version-mismatch'
|
|
116
|
+
? `This save was written by a different version (v${read.version}) -- this build reads v${SAVE_VERSION}. The file was left untouched.`
|
|
117
|
+
: `Could not read the save file (${read.error}). The file was left untouched.`);
|
|
118
|
+
process.exit(1);
|
|
119
|
+
}
|
|
120
|
+
resumeSave = read.save;
|
|
121
|
+
const a = resumeSave.player.attributes;
|
|
122
|
+
player = new Player({
|
|
123
|
+
playerName: resumeSave.playerName,
|
|
124
|
+
startLocation: nexus,
|
|
125
|
+
combat: { ...a, skills: resumeSave.player.skills },
|
|
126
|
+
});
|
|
127
|
+
player.archetypeName = resumeSave.player.archetypeName;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
const archetype = getArchetype(options.archetype);
|
|
131
|
+
player = new Player({ playerName, startLocation: nexus, combat: archetype.combat });
|
|
132
|
+
outfitArchetype(player, archetype);
|
|
133
|
+
}
|
|
70
134
|
// Create the game instance
|
|
71
|
-
const game = await Game.getInstance(player, sceneSeed);
|
|
135
|
+
const game = await Game.getInstance(player, resumeSave?.hubSeed ?? sceneSeed, resumeSave);
|
|
72
136
|
const ready = await game.init(options, screen);
|
|
137
|
+
// The quit seal (player ruling: autosave on quit). A clean exit --
|
|
138
|
+
// the quit verb, double-ESC, the C-c binding below -- all funnel
|
|
139
|
+
// through process.exit(0); this synchronous hook is the ONE place
|
|
140
|
+
// that covers every path. Death exits code 2 (and burned the save
|
|
141
|
+
// in Game.close); crashes exit 1 and deliberately do NOT save
|
|
142
|
+
// half-applied state -- the last safe-beat save stands.
|
|
143
|
+
process.on('exit', (code) => {
|
|
144
|
+
if (code === 0) {
|
|
145
|
+
try {
|
|
146
|
+
game.requestSave('quit');
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
// requestSave logs its own failures; never let the hook throw.
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
});
|
|
73
153
|
// Print welcome message or initial room description
|
|
74
154
|
const notice = options.generationNotice
|
|
75
155
|
? `{yellow-fg}${options.generationNotice}{/yellow-fg}\n\n`
|
|
@@ -135,10 +215,16 @@ export async function main(playerName, sceneSeed, options) {
|
|
|
135
215
|
// asked while it works. Cyan: blessed has no dim tag and gray
|
|
136
216
|
// is banned; cyan is already this game's machine voice.
|
|
137
217
|
// pushLine, not Logger -- the transcript line above already
|
|
138
|
-
// recorded it. "clear" is exempt (echo-then-wipe is noise)
|
|
139
|
-
|
|
218
|
+
// recorded it. "clear" is exempt (echo-then-wipe is noise),
|
|
219
|
+
// and "say" keeps only the blank separator -- your words
|
|
220
|
+
// already land as the yellow speech line, and "> say hoi"
|
|
221
|
+
// above "hoi" read as a stutter (playtest note).
|
|
222
|
+
const echoVerb = input.trim().split(' ')[0]?.toLowerCase();
|
|
223
|
+
if (input.trim().length > 0 && echoVerb !== 'clear') {
|
|
140
224
|
game.logBox.pushLine('');
|
|
141
|
-
|
|
225
|
+
if (echoVerb !== 'say') {
|
|
226
|
+
game.logBox.pushLine(`{cyan-fg}> ${input.trim()}{/cyan-fg}`);
|
|
227
|
+
}
|
|
142
228
|
game.followLog();
|
|
143
229
|
screen.render();
|
|
144
230
|
}
|
|
@@ -159,6 +245,13 @@ export async function main(playerName, sceneSeed, options) {
|
|
|
159
245
|
if (input.split(' ')[0] === 'clear') {
|
|
160
246
|
game.logBox.setContent('');
|
|
161
247
|
game.metaBox.setContent('');
|
|
248
|
+
// Blessed repositions a box's LABEL on 'scroll' events --
|
|
249
|
+
// setContent('') resets the scroll base without firing one,
|
|
250
|
+
// stranding the title mid-box (screenshot bug: "Game Log"
|
|
251
|
+
// sitting at the bottom after "clear"). Scrolling home
|
|
252
|
+
// fires the event and the label snaps back to the border.
|
|
253
|
+
game.logBox.scrollTo(0);
|
|
254
|
+
game.metaBox.scrollTo(0);
|
|
162
255
|
}
|
|
163
256
|
if (response)
|
|
164
257
|
gameLog.transcript(response);
|
|
@@ -1 +1 @@
|
|
|
1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C;AAChE,CAAC"}
|
|
@@ -90,10 +90,24 @@ export class AutoFight {
|
|
|
90
90
|
// onExchangeSettled reschedules us. No waiting here.
|
|
91
91
|
if (player.inExchange || target.inExchange)
|
|
92
92
|
return;
|
|
93
|
-
// Guarded honors a surrender --
|
|
94
|
-
//
|
|
95
|
-
//
|
|
93
|
+
// Guarded honors a surrender -- but doesn't trust it: the final
|
|
94
|
+
// action is a RESTRAIN (player request; SR5e Subduing p.195, the
|
|
95
|
+
// surrendered branch is an automatic no-roll hold). Hands-up
|
|
96
|
+
// prisoners get zip-tied, not taken at their word. One-shot: an
|
|
97
|
+
// already-held target (by anyone) means truly stand down, and off
|
|
98
|
+
// the meat plane there are no hands to hold with.
|
|
96
99
|
if (player.autoStance === 'guarded' && target.surrendered) {
|
|
100
|
+
if (player.plane === 'meat' && target.plane === 'meat'
|
|
101
|
+
&& player.grappling !== target.name && !target.grappledBy) {
|
|
102
|
+
const cmd = `restrain ${target.name}`;
|
|
103
|
+
logger.meta(`⚔ [guarded] ${cmd}`, 'cyan');
|
|
104
|
+
const result = await this.game.handleInput(cmd);
|
|
105
|
+
if (result) {
|
|
106
|
+
logger.log(result);
|
|
107
|
+
}
|
|
108
|
+
this.game.updateStatus();
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
97
111
|
logger.logWithColor(`⚔ ${target.name} has surrendered -- you hold fire. (guarded)`, 'yellow');
|
|
98
112
|
this.game.updateStatus();
|
|
99
113
|
return;
|
|
@@ -143,7 +157,7 @@ export class AutoFight {
|
|
|
143
157
|
static describe(stance) {
|
|
144
158
|
switch (stance) {
|
|
145
159
|
case 'manual': return 'counters when struck (every stance does) -- but pressing the fight is yours to type';
|
|
146
|
-
case 'guarded': return 'presses the fight for you; subdues instead of killing when they are nearly down,
|
|
160
|
+
case 'guarded': return 'presses the fight for you; subdues instead of killing when they are nearly down, and RESTRAINS them when they surrender';
|
|
147
161
|
case 'aggressive': return 'presses the fight to the death; surrender means nothing';
|
|
148
162
|
}
|
|
149
163
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-fight.js","sourceRoot":"","sources":["../../../../../../../src/commands/game/sideQuest/utilities/auto-fight.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,OAAO,SAAS;IAKA;IAJpB,MAAM,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAExB,OAAO,CAAiC;IAEhD,YAAoB,IAAU;QAAV,SAAI,GAAJ,IAAI,CAAM;IAAG,CAAC;IAElC,iFAAiF;IACjF,aAAa;QACX,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3B,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QAC3B,CAAC;IACH,CAAC;IAED;;;OAGG;IACH,iBAAiB,CAAC,UAA4B;QAC5C,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;QAChC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC;YAAE,OAAO;QACzC,IAAI,MAAM,CAAC,UAAU,KAAK,QAAQ;YAAE,OAAO;QAC3C,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM;YAAE,OAAO;QAEpB,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;YAC7B,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;YACzB,KAAK,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACzB,CAAC,EAAE,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAClC,CAAC;IAED;;;;OAIG;IACK,KAAK,CAAC,IAAI,CA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ACvD,gEAAgE;QAChE,mEAAmE;QACnE,4DAA4D;QAC5D,IAAI,MAAM,CAAC,UAAU,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,KAAK,MAAM;YAC1D,MAAM,CAAC,iBAAiB,GAAG,MAAM,CAAC,WAAW,IAAI,CAAC,EAAE,CAAC;YACvD,OAAO,UAAU,MAAM,CAAC,IAAI,EAAE,CAAC;QACjC,CAAC;QACD,sEAAsE;QACtE,mEAAmE;QACnE,oEAAoE;QACpE,kEAAkE;QAClE,gEAAgE;QAChE,kEAAkE;QAClE,MAAM,SAAS,GAAG,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACtD,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,CAAC;QAC9C,IAAI,MAAM,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,EAAE,IAAI,UAAU,GAAG,MAAM,CAAC,gBAAgB,EAAE,CAAC,MAAM,EAAE,CAAC;YACpG,OAAO,iBAAiB,SAAS,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;QACxD,CAAC;QACD,OAAO,UAAU,MAAM,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC;IAED,sDAAsD;IACtD,MAAM,CAAC,QAAQ,CAAC,MAAmB;QACjC,QAAQ,MAAM,EAAE,CAAC;YACf,KAAK,QAAQ,CAAC,CAAC,OAAO,qFAAqF,CAAC;YAC5G,KAAK,SAAS,CAAC,CAAC,OAAO,yHAAyH,CAAC;YACjJ,KAAK,YAAY,CAAC,CAAC,OAAO,yDAAyD,CAAC;QACtF,CAAC;IACH,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { ISaveFileV1 } from '../types/save-file.js';
|
|
2
|
+
export declare function authToken(): string | undefined;
|
|
3
|
+
export type CloudResult = 'ok' | 'unauthorized' | 'offline';
|
|
4
|
+
export interface ICloudSummary {
|
|
5
|
+
slug: string;
|
|
6
|
+
playerName: string;
|
|
7
|
+
summary: ISaveFileV1['summary'];
|
|
8
|
+
savedAt: string;
|
|
9
|
+
version: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Mirrors a freshly-written local save to the cloud. Fire-and-forget
|
|
13
|
+
* from the save beats (`void pushSave(...)`): on success the local file
|
|
14
|
+
* is re-stamped with sync.lastCloudSavedAt so the launcher can tell a
|
|
15
|
+
* clean mirror from a divergence.
|
|
16
|
+
*/
|
|
17
|
+
export declare function pushSave(saveFilePath: string, save: ISaveFileV1): Promise<CloudResult>;
|
|
18
|
+
export declare function fetchSummaries(): Promise<{
|
|
19
|
+
ok: true;
|
|
20
|
+
saves: ICloudSummary[];
|
|
21
|
+
} | {
|
|
22
|
+
ok: false;
|
|
23
|
+
reason: CloudResult;
|
|
24
|
+
}>;
|
|
25
|
+
export declare function fetchSave(slug: string): Promise<ISaveFileV1 | undefined>;
|
|
26
|
+
/** POST-tunneled delete (the HTTPS helper speaks GET/POST only). */
|
|
27
|
+
export declare function deleteCloudSave(slug: string): Promise<CloudResult>;
|
|
28
|
+
/**
|
|
29
|
+
* PERMADEATH's cloud half (Game.close burns the local slot first). The
|
|
30
|
+
* tombstone is written SYNCHRONOUSLY before the async delete attempt --
|
|
31
|
+
* if the process exits (or the net is down) before the delete confirms,
|
|
32
|
+
* the marker survives and the launcher deletes the cloud copy when next
|
|
33
|
+
* reachable, instead of resurrecting the dead from the mirror.
|
|
34
|
+
*/
|
|
35
|
+
export declare function burnCloudSaveFor(saveFilePath: string, playerName: string): void;
|
|
36
|
+
export type ReconcileVerdict = 'in-sync' | 'local-only' | 'cloud-only' | 'push-local' | 'pull-cloud' | 'diverged';
|
|
37
|
+
/**
|
|
38
|
+
* Pure decision (rulings: newest wins, PROMPT on divergence). The
|
|
39
|
+
* divergence detector is sync.lastCloudSavedAt -- the cloud's savedAt as
|
|
40
|
+
* of our last successful mirror: cloud unchanged since then means every
|
|
41
|
+
* cloud byte is ours, so local wins; local at exactly the mirror point
|
|
42
|
+
* means the cloud moved on without us, so cloud wins; both moved means
|
|
43
|
+
* a real fork and a human decides.
|
|
44
|
+
*/
|
|
45
|
+
export declare function reconcile(local: {
|
|
46
|
+
savedAt: string;
|
|
47
|
+
lastCloudSavedAt?: string;
|
|
48
|
+
} | undefined, cloud: {
|
|
49
|
+
savedAt: string;
|
|
50
|
+
} | undefined): ReconcileVerdict;
|