@aspectlylabs/mikka 0.0.12 → 0.0.14

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/cli.js CHANGED
@@ -4299,7 +4299,7 @@ import { join as join3 } from "node:path";
4299
4299
  // package.json
4300
4300
  var package_default = {
4301
4301
  name: "@mikka/daemon",
4302
- version: "0.0.12",
4302
+ version: "0.0.14",
4303
4303
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
4304
4304
  type: "module",
4305
4305
  private: true,
@@ -4358,7 +4358,7 @@ var package_default = {
4358
4358
  engines: {
4359
4359
  node: ">=24"
4360
4360
  },
4361
- gitHead: "ad32b38411b9051a6bad783def08a456f490f30c"
4361
+ gitHead: "50def05730adc376f9b46f1374f2c886d9333dde"
4362
4362
  };
4363
4363
 
4364
4364
  // src/paths.ts
@@ -14992,6 +14992,7 @@ var Daemon = class {
14992
14992
  this.timer.unref();
14993
14993
  }
14994
14994
  async register(credential) {
14995
+ const { workspaceId, deviceId: knownDeviceId } = this.device;
14995
14996
  const { deviceId } = await this.options.link.registerDevice(
14996
14997
  credential,
14997
14998
  {
@@ -15004,10 +15005,11 @@ var Daemon = class {
15004
15005
  deviceType: process.env.MIKKA_DEVICE_TYPE === "server" ? "server" : process.env.MIKKA_DEVICE_TYPE === "laptop" ? "laptop" : await detectDeviceType(),
15005
15006
  harnesses: this.harnesses,
15006
15007
  computerUse: { installed: Boolean(this.localComputerDriver), version: this.localComputerDriver?.version ?? null },
15007
- ...this.device.workspaceId ? { workspaceId: this.device.workspaceId } : {}
15008
+ ...workspaceId ? { workspaceId } : {}
15008
15009
  },
15009
- this.device.deviceId
15010
+ knownDeviceId
15010
15011
  );
15012
+ if (this.device.credential !== credential || this.device.workspaceId !== workspaceId) throw new Error("Device session changed during registration");
15011
15013
  if (deviceId !== this.device.deviceId) {
15012
15014
  this.saveDevice({ deviceId });
15013
15015
  this.log.info({ device_id: deviceId }, "device registered");
@@ -15035,7 +15037,7 @@ var Daemon = class {
15035
15037
  }
15036
15038
  async syncPass() {
15037
15039
  const { link } = this.options;
15038
- const credential = this.device.credential;
15040
+ const { credential, workspaceId } = this.device;
15039
15041
  if (!credential) {
15040
15042
  this.server = "unregistered";
15041
15043
  return;
@@ -15125,6 +15127,7 @@ var Daemon = class {
15125
15127
  await this.pruneWorktrees();
15126
15128
  await this.sweepEmptyRuns();
15127
15129
  } catch (error) {
15130
+ if (this.device.credential !== credential || this.device.workspaceId !== workspaceId) return;
15128
15131
  this.server = "offline";
15129
15132
  if (error instanceof SessionRejectedError) {
15130
15133
  this.rejectDeviceSession(credential);
package/client.js CHANGED
@@ -3633,7 +3633,7 @@ import { join } from "node:path";
3633
3633
  // package.json
3634
3634
  var package_default = {
3635
3635
  name: "@mikka/daemon",
3636
- version: "0.0.12",
3636
+ version: "0.0.14",
3637
3637
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
3638
3638
  type: "module",
3639
3639
  private: true,
@@ -3692,7 +3692,7 @@ var package_default = {
3692
3692
  engines: {
3693
3693
  node: ">=24"
3694
3694
  },
3695
- gitHead: "ad32b38411b9051a6bad783def08a456f490f30c"
3695
+ gitHead: "50def05730adc376f9b46f1374f2c886d9333dde"
3696
3696
  };
3697
3697
 
3698
3698
  // src/paths.ts
package/http-link.js CHANGED
@@ -3934,7 +3934,7 @@ var InvalidIdError = class extends DaemonError {
3934
3934
  // package.json
3935
3935
  var package_default = {
3936
3936
  name: "@mikka/daemon",
3937
- version: "0.0.12",
3937
+ version: "0.0.14",
3938
3938
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
3939
3939
  type: "module",
3940
3940
  private: true,
@@ -3993,7 +3993,7 @@ var package_default = {
3993
3993
  engines: {
3994
3994
  node: ">=24"
3995
3995
  },
3996
- gitHead: "ad32b38411b9051a6bad783def08a456f490f30c"
3996
+ gitHead: "50def05730adc376f9b46f1374f2c886d9333dde"
3997
3997
  };
3998
3998
 
3999
3999
  // src/paths.ts
package/login.js CHANGED
@@ -3640,7 +3640,7 @@ var ServerUnreachableError = class extends DaemonError {
3640
3640
  // package.json
3641
3641
  var package_default = {
3642
3642
  name: "@mikka/daemon",
3643
- version: "0.0.12",
3643
+ version: "0.0.14",
3644
3644
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
3645
3645
  type: "module",
3646
3646
  private: true,
@@ -3699,7 +3699,7 @@ var package_default = {
3699
3699
  engines: {
3700
3700
  node: ">=24"
3701
3701
  },
3702
- gitHead: "ad32b38411b9051a6bad783def08a456f490f30c"
3702
+ gitHead: "50def05730adc376f9b46f1374f2c886d9333dde"
3703
3703
  };
3704
3704
 
3705
3705
  // src/paths.ts
package/main.js CHANGED
@@ -3501,7 +3501,7 @@ import { join as join5 } from "node:path";
3501
3501
  // package.json
3502
3502
  var package_default = {
3503
3503
  name: "@mikka/daemon",
3504
- version: "0.0.12",
3504
+ version: "0.0.14",
3505
3505
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
3506
3506
  type: "module",
3507
3507
  private: true,
@@ -3560,7 +3560,7 @@ var package_default = {
3560
3560
  engines: {
3561
3561
  node: ">=24"
3562
3562
  },
3563
- gitHead: "ad32b38411b9051a6bad783def08a456f490f30c"
3563
+ gitHead: "50def05730adc376f9b46f1374f2c886d9333dde"
3564
3564
  };
3565
3565
 
3566
3566
  // src/paths.ts
@@ -14155,6 +14155,7 @@ var Daemon = class {
14155
14155
  this.timer.unref();
14156
14156
  }
14157
14157
  async register(credential) {
14158
+ const { workspaceId, deviceId: knownDeviceId } = this.device;
14158
14159
  const { deviceId } = await this.options.link.registerDevice(
14159
14160
  credential,
14160
14161
  {
@@ -14167,10 +14168,11 @@ var Daemon = class {
14167
14168
  deviceType: process.env.MIKKA_DEVICE_TYPE === "server" ? "server" : process.env.MIKKA_DEVICE_TYPE === "laptop" ? "laptop" : await detectDeviceType(),
14168
14169
  harnesses: this.harnesses,
14169
14170
  computerUse: { installed: Boolean(this.localComputerDriver), version: this.localComputerDriver?.version ?? null },
14170
- ...this.device.workspaceId ? { workspaceId: this.device.workspaceId } : {}
14171
+ ...workspaceId ? { workspaceId } : {}
14171
14172
  },
14172
- this.device.deviceId
14173
+ knownDeviceId
14173
14174
  );
14175
+ if (this.device.credential !== credential || this.device.workspaceId !== workspaceId) throw new Error("Device session changed during registration");
14174
14176
  if (deviceId !== this.device.deviceId) {
14175
14177
  this.saveDevice({ deviceId });
14176
14178
  this.log.info({ device_id: deviceId }, "device registered");
@@ -14198,7 +14200,7 @@ var Daemon = class {
14198
14200
  }
14199
14201
  async syncPass() {
14200
14202
  const { link } = this.options;
14201
- const credential = this.device.credential;
14203
+ const { credential, workspaceId } = this.device;
14202
14204
  if (!credential) {
14203
14205
  this.server = "unregistered";
14204
14206
  return;
@@ -14288,6 +14290,7 @@ var Daemon = class {
14288
14290
  await this.pruneWorktrees();
14289
14291
  await this.sweepEmptyRuns();
14290
14292
  } catch (error) {
14293
+ if (this.device.credential !== credential || this.device.workspaceId !== workspaceId) return;
14291
14294
  this.server = "offline";
14292
14295
  if (error instanceof SessionRejectedError) {
14293
14296
  this.rejectDeviceSession(credential);
package/mikka.js CHANGED
@@ -4300,7 +4300,7 @@ import { join as join3 } from "node:path";
4300
4300
  // package.json
4301
4301
  var package_default = {
4302
4302
  name: "@mikka/daemon",
4303
- version: "0.0.12",
4303
+ version: "0.0.14",
4304
4304
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
4305
4305
  type: "module",
4306
4306
  private: true,
@@ -4359,7 +4359,7 @@ var package_default = {
4359
4359
  engines: {
4360
4360
  node: ">=24"
4361
4361
  },
4362
- gitHead: "ad32b38411b9051a6bad783def08a456f490f30c"
4362
+ gitHead: "50def05730adc376f9b46f1374f2c886d9333dde"
4363
4363
  };
4364
4364
 
4365
4365
  // src/paths.ts
@@ -14993,6 +14993,7 @@ var Daemon = class {
14993
14993
  this.timer.unref();
14994
14994
  }
14995
14995
  async register(credential) {
14996
+ const { workspaceId, deviceId: knownDeviceId } = this.device;
14996
14997
  const { deviceId } = await this.options.link.registerDevice(
14997
14998
  credential,
14998
14999
  {
@@ -15005,10 +15006,11 @@ var Daemon = class {
15005
15006
  deviceType: process.env.MIKKA_DEVICE_TYPE === "server" ? "server" : process.env.MIKKA_DEVICE_TYPE === "laptop" ? "laptop" : await detectDeviceType(),
15006
15007
  harnesses: this.harnesses,
15007
15008
  computerUse: { installed: Boolean(this.localComputerDriver), version: this.localComputerDriver?.version ?? null },
15008
- ...this.device.workspaceId ? { workspaceId: this.device.workspaceId } : {}
15009
+ ...workspaceId ? { workspaceId } : {}
15009
15010
  },
15010
- this.device.deviceId
15011
+ knownDeviceId
15011
15012
  );
15013
+ if (this.device.credential !== credential || this.device.workspaceId !== workspaceId) throw new Error("Device session changed during registration");
15012
15014
  if (deviceId !== this.device.deviceId) {
15013
15015
  this.saveDevice({ deviceId });
15014
15016
  this.log.info({ device_id: deviceId }, "device registered");
@@ -15036,7 +15038,7 @@ var Daemon = class {
15036
15038
  }
15037
15039
  async syncPass() {
15038
15040
  const { link } = this.options;
15039
- const credential = this.device.credential;
15041
+ const { credential, workspaceId } = this.device;
15040
15042
  if (!credential) {
15041
15043
  this.server = "unregistered";
15042
15044
  return;
@@ -15126,6 +15128,7 @@ var Daemon = class {
15126
15128
  await this.pruneWorktrees();
15127
15129
  await this.sweepEmptyRuns();
15128
15130
  } catch (error) {
15131
+ if (this.device.credential !== credential || this.device.workspaceId !== workspaceId) return;
15129
15132
  this.server = "offline";
15130
15133
  if (error instanceof SessionRejectedError) {
15131
15134
  this.rejectDeviceSession(credential);
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@aspectlylabs/mikka",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "Local Mikka daemon: runs agents through the user's own CLIs",
5
- "gitHead": "ad32b38411b9051a6bad783def08a456f490f30c",
5
+ "gitHead": "50def05730adc376f9b46f1374f2c886d9333dde",
6
6
  "type": "module",
7
7
  "private": false,
8
8
  "license": "AGPL-3.0-only",
package/paths.js CHANGED
@@ -6,7 +6,7 @@ import { join } from "node:path";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@mikka/daemon",
9
- version: "0.0.12",
9
+ version: "0.0.14",
10
10
  description: "Local Mikka daemon: runs agents through the user's own CLIs",
11
11
  type: "module",
12
12
  private: true,
@@ -65,7 +65,7 @@ var package_default = {
65
65
  engines: {
66
66
  node: ">=24"
67
67
  },
68
- gitHead: "ad32b38411b9051a6bad783def08a456f490f30c"
68
+ gitHead: "50def05730adc376f9b46f1374f2c886d9333dde"
69
69
  };
70
70
 
71
71
  // src/paths.ts