@myvillage/cli 1.88.1 → 1.88.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myvillage/cli",
3
- "version": "1.88.1",
3
+ "version": "1.88.2",
4
4
  "description": "MyVillageOS CLI for community developers",
5
5
  "type": "module",
6
6
  "bin": {
@@ -171,9 +171,12 @@ async function resolveMachineIdentity(opts) {
171
171
  }
172
172
 
173
173
  if (saved?.machineKey) {
174
- // Re-register with the stored credential so name/metadata/version refresh.
175
- const { machineId } = await register(makeClient(saved.machineKey, null), opts);
176
- persistRunnerState({ ...saved, machineId, name: opts.name || saved.name, registeredAt: new Date().toISOString() });
174
+ // Re-register with the stored credential so metadata/version refresh. Keep
175
+ // the name this machine already goes by unless a new one was asked for —
176
+ // restarting the runner must not rename the machine out from under the user.
177
+ const name = opts.name || saved.name || os.hostname();
178
+ const { machineId } = await register(makeClient(saved.machineKey, null), { ...opts, name });
179
+ persistRunnerState({ ...saved, machineId, name, registeredAt: new Date().toISOString() });
177
180
  return { machineId, machineKey: saved.machineKey };
178
181
  }
179
182