Store the person uuid the master issues, so renames keep our identity
The welcome now carries a personId; it lands in the instance_id setting and rides on every hello and HTTP report from then on. The master keys the person by that uuid, so changing instance_name moves our history to the new name instead of starting a stranger. Read-only in Settings on purpose — editing it by hand would detach this machine from its person. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
de9cbffd83
commit
a088381749
@@ -106,10 +106,13 @@ export type Command =
|
||||
| { kind: 'report-now' };
|
||||
|
||||
export type MasterMessage =
|
||||
| { type: 'welcome' }
|
||||
/** personId is the person's stable uuid; the instance stores it and
|
||||
* presents it on later hellos, which is what makes a rename follow the
|
||||
* person. */
|
||||
| { type: 'welcome'; personId?: string }
|
||||
| { type: 'command'; id: string; command: Command };
|
||||
|
||||
export type InstanceMessage =
|
||||
| { type: 'hello'; instance: string; capabilities: InstanceCapabilities }
|
||||
| { type: 'hello'; instance: string; id?: string; capabilities: InstanceCapabilities }
|
||||
| { type: 'report'; firms: FirmStats[]; scheduler: SchedulerState; capabilities?: InstanceCapabilities }
|
||||
| { type: 'ack'; id: string; ok: boolean; result?: unknown; error?: string };
|
||||
|
||||
Reference in New Issue
Block a user