@camstack/addon-tailscale 1.0.2 → 1.0.4

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.
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  enumerable: true
25
25
  }) : target, mod));
26
26
  //#endregion
27
- const require_dist = require("../dist-ByDiIgMC.js");
27
+ const require_dist = require("../dist-hLRTPO9P.js");
28
28
  let node_child_process = require("node:child_process");
29
29
  let node_util = require("node:util");
30
30
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { i as networkAccessCapability, n as EventCategory, r as meshNetworkCapability, t as BaseAddon } from "../dist-DcSssCOP.mjs";
1
+ import { i as networkAccessCapability, n as EventCategory, r as meshNetworkCapability, t as BaseAddon } from "../dist-O8xvcftz.mjs";
2
2
  import { execFile, spawn } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import * as fs from "node:fs";
@@ -5130,14 +5130,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5130
5130
  EventCategory["DeviceSleeping"] = "device.sleeping";
5131
5131
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5132
5132
  /**
5133
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5134
- * transition (item status change, phase change, completion, cancel).
5135
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5136
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5137
- *
5138
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5133
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5134
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5135
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5136
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5137
+ * in F4 once live bulk progress is re-implemented over the engine events.
5139
5138
  */
5140
5139
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5140
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5141
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5141
5142
  /**
5142
5143
  * A container's child visibility toggled (hidden/shown). Emitted by the
5143
5144
  * `accessories` cap when a child device is hidden or revealed.
@@ -16035,6 +16036,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16035
16036
  kind: "mutation",
16036
16037
  auth: "admin"
16037
16038
  });
16039
+ var jobKindSchema = _enum([
16040
+ "install",
16041
+ "update",
16042
+ "uninstall",
16043
+ "restart"
16044
+ ]);
16045
+ var taskPhaseSchema = _enum([
16046
+ "queued",
16047
+ "fetching",
16048
+ "staged",
16049
+ "validating",
16050
+ "applying",
16051
+ "restarting",
16052
+ "applied",
16053
+ "done",
16054
+ "failed",
16055
+ "skipped"
16056
+ ]);
16057
+ var taskTargetSchema = _enum(["framework", "addon"]);
16058
+ var taskLogEntrySchema = object({
16059
+ tsMs: number(),
16060
+ nodeId: string(),
16061
+ packageName: string(),
16062
+ phase: taskPhaseSchema,
16063
+ message: string()
16064
+ });
16065
+ var lifecycleTaskSchema = object({
16066
+ taskId: string(),
16067
+ nodeId: string(),
16068
+ packageName: string(),
16069
+ fromVersion: string().nullable(),
16070
+ toVersion: string(),
16071
+ target: taskTargetSchema,
16072
+ phase: taskPhaseSchema,
16073
+ stagedPath: string().nullable(),
16074
+ attempts: number(),
16075
+ steps: array(taskLogEntrySchema),
16076
+ error: string().nullable(),
16077
+ startedAtMs: number().nullable(),
16078
+ finishedAtMs: number().nullable()
16079
+ });
16080
+ var lifecycleJobStateSchema = _enum([
16081
+ "running",
16082
+ "completed",
16083
+ "failed",
16084
+ "partially-failed",
16085
+ "cancelled"
16086
+ ]);
16087
+ var lifecycleJobScopeSchema = _enum([
16088
+ "single",
16089
+ "bulk",
16090
+ "cluster"
16091
+ ]);
16092
+ var lifecycleJobSchema = object({
16093
+ jobId: string(),
16094
+ kind: jobKindSchema,
16095
+ createdAtMs: number(),
16096
+ createdBy: string(),
16097
+ scope: lifecycleJobScopeSchema,
16098
+ tasks: array(lifecycleTaskSchema),
16099
+ state: lifecycleJobStateSchema,
16100
+ schemaVersion: literal(1)
16101
+ });
16038
16102
  /**
16039
16103
  * addons — system-scoped singleton capability for addon package
16040
16104
  * management (install, update, configure, restart) and per-addon log
@@ -16217,7 +16281,7 @@ var BulkUpdatePhaseSchema = _enum([
16217
16281
  "restarting",
16218
16282
  "finalizing"
16219
16283
  ]);
16220
- var BulkUpdateStateSchema = object({
16284
+ object({
16221
16285
  id: string(),
16222
16286
  nodeId: string(),
16223
16287
  startedAtMs: number(),
@@ -16320,20 +16384,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16320
16384
  }), UpdateFrameworkPackageResultSchema, {
16321
16385
  kind: "mutation",
16322
16386
  auth: "admin"
16323
- }), method(object({
16324
- nodeId: string(),
16325
- items: array(object({
16326
- name: string(),
16327
- version: string(),
16328
- isSystem: boolean()
16329
- })).readonly()
16330
- }), object({ id: string() }), {
16331
- kind: "mutation",
16332
- auth: "admin"
16333
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16334
- kind: "mutation",
16335
- auth: "admin"
16336
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16387
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16337
16388
  kind: "mutation",
16338
16389
  auth: "admin"
16339
16390
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16355,6 +16406,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16355
16406
  kind: "mutation",
16356
16407
  auth: "admin"
16357
16408
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16409
+ kind: _enum([
16410
+ "install",
16411
+ "update",
16412
+ "uninstall",
16413
+ "restart"
16414
+ ]),
16415
+ targets: array(object({
16416
+ name: string().min(1),
16417
+ version: string().min(1)
16418
+ })).min(1),
16419
+ nodeIds: array(string()).optional()
16420
+ }), object({ jobId: string() }), {
16421
+ kind: "mutation",
16422
+ auth: "admin"
16423
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16424
+ kind: "mutation",
16425
+ auth: "admin"
16426
+ }), method(object({
16358
16427
  addonId: string(),
16359
16428
  level: LogLevelSchema$1.optional()
16360
16429
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16395,7 +16464,7 @@ Object.freeze({
16395
16464
  addonId: null,
16396
16465
  access: "create"
16397
16466
  },
16398
- "addons.cancelBulkUpdate": {
16467
+ "addons.cancelJob": {
16399
16468
  capName: "addons",
16400
16469
  capScope: "system",
16401
16470
  addonId: null,
@@ -16425,7 +16494,7 @@ Object.freeze({
16425
16494
  addonId: null,
16426
16495
  access: "view"
16427
16496
  },
16428
- "addons.getBulkUpdateState": {
16497
+ "addons.getJob": {
16429
16498
  capName: "addons",
16430
16499
  capScope: "system",
16431
16500
  addonId: null,
@@ -16473,19 +16542,19 @@ Object.freeze({
16473
16542
  addonId: null,
16474
16543
  access: "view"
16475
16544
  },
16476
- "addons.listActiveBulkUpdates": {
16545
+ "addons.listCapabilityProviders": {
16477
16546
  capName: "addons",
16478
16547
  capScope: "system",
16479
16548
  addonId: null,
16480
16549
  access: "view"
16481
16550
  },
16482
- "addons.listCapabilityProviders": {
16551
+ "addons.listFrameworkPackages": {
16483
16552
  capName: "addons",
16484
16553
  capScope: "system",
16485
16554
  addonId: null,
16486
16555
  access: "view"
16487
16556
  },
16488
- "addons.listFrameworkPackages": {
16557
+ "addons.listJobs": {
16489
16558
  capName: "addons",
16490
16559
  capScope: "system",
16491
16560
  addonId: null,
@@ -16569,7 +16638,7 @@ Object.freeze({
16569
16638
  addonId: null,
16570
16639
  access: "create"
16571
16640
  },
16572
- "addons.startBulkUpdate": {
16641
+ "addons.startJob": {
16573
16642
  capName: "addons",
16574
16643
  capScope: "system",
16575
16644
  addonId: null,
@@ -20556,5 +20625,31 @@ Object.freeze({
20556
20625
  "network-access": "ingress",
20557
20626
  "smtp-provider": "email"
20558
20627
  });
20628
+ var frameworkSwapPackageSchema = object({
20629
+ name: string(),
20630
+ stagedPath: string(),
20631
+ backupPath: string(),
20632
+ toVersion: string(),
20633
+ fromVersion: string().nullable()
20634
+ });
20635
+ object({
20636
+ jobId: string(),
20637
+ taskId: string(),
20638
+ packages: array(frameworkSwapPackageSchema),
20639
+ requestedAtMs: number(),
20640
+ schemaVersion: literal(1)
20641
+ });
20642
+ object({
20643
+ jobId: string(),
20644
+ taskId: string(),
20645
+ backups: array(object({
20646
+ name: string(),
20647
+ backupPath: string(),
20648
+ livePath: string()
20649
+ })),
20650
+ appliedAtMs: number(),
20651
+ bootAttempts: number(),
20652
+ schemaVersion: literal(1)
20653
+ });
20559
20654
  //#endregion
20560
20655
  export { networkAccessCapability as i, EventCategory as n, meshNetworkCapability as r, BaseAddon as t };
@@ -5130,14 +5130,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
5130
5130
  EventCategory["DeviceSleeping"] = "device.sleeping";
5131
5131
  EventCategory["RetentionCleanup"] = "retention.cleanup";
5132
5132
  /**
5133
- * Progress snapshot emitted by `BulkUpdateCoordinator` on every state
5134
- * transition (item status change, phase change, completion, cancel).
5135
- * Payload is `BulkUpdateState`. Admin UI subscribes via `useLiveEvent`
5136
- * to drive the sticky `BulkUpdateBanner` and per-row `AddonRowBadge`.
5137
- *
5138
- * Spec: docs/superpowers/specs/2026-05-21-addons-bulk-update-progress-design.md
5133
+ * Legacy bulk-update progress snapshot (payload `BulkUpdateState`). No longer
5134
+ * emitted F3 removed the coordinator that produced it; "Update all" now runs
5135
+ * as one lifecycle engine job (`AddonsJobProgress`/`AddonsJobLog`). Retained
5136
+ * (with `BulkUpdateState`) only to avoid regenerating the event maps; removed
5137
+ * in F4 once live bulk progress is re-implemented over the engine events.
5139
5138
  */
5140
5139
  EventCategory["AddonsBulkUpdateProgress"] = "addons.bulk-update-progress";
5140
+ EventCategory["AddonsJobProgress"] = "addons.job-progress";
5141
+ EventCategory["AddonsJobLog"] = "addons.job-log";
5141
5142
  /**
5142
5143
  * A container's child visibility toggled (hidden/shown). Emitted by the
5143
5144
  * `accessories` cap when a child device is hidden or revealed.
@@ -16035,6 +16036,69 @@ method(_void(), array(IntegrationWithStateSchema)), method(object({ id: string()
16035
16036
  kind: "mutation",
16036
16037
  auth: "admin"
16037
16038
  });
16039
+ var jobKindSchema = _enum([
16040
+ "install",
16041
+ "update",
16042
+ "uninstall",
16043
+ "restart"
16044
+ ]);
16045
+ var taskPhaseSchema = _enum([
16046
+ "queued",
16047
+ "fetching",
16048
+ "staged",
16049
+ "validating",
16050
+ "applying",
16051
+ "restarting",
16052
+ "applied",
16053
+ "done",
16054
+ "failed",
16055
+ "skipped"
16056
+ ]);
16057
+ var taskTargetSchema = _enum(["framework", "addon"]);
16058
+ var taskLogEntrySchema = object({
16059
+ tsMs: number(),
16060
+ nodeId: string(),
16061
+ packageName: string(),
16062
+ phase: taskPhaseSchema,
16063
+ message: string()
16064
+ });
16065
+ var lifecycleTaskSchema = object({
16066
+ taskId: string(),
16067
+ nodeId: string(),
16068
+ packageName: string(),
16069
+ fromVersion: string().nullable(),
16070
+ toVersion: string(),
16071
+ target: taskTargetSchema,
16072
+ phase: taskPhaseSchema,
16073
+ stagedPath: string().nullable(),
16074
+ attempts: number(),
16075
+ steps: array(taskLogEntrySchema),
16076
+ error: string().nullable(),
16077
+ startedAtMs: number().nullable(),
16078
+ finishedAtMs: number().nullable()
16079
+ });
16080
+ var lifecycleJobStateSchema = _enum([
16081
+ "running",
16082
+ "completed",
16083
+ "failed",
16084
+ "partially-failed",
16085
+ "cancelled"
16086
+ ]);
16087
+ var lifecycleJobScopeSchema = _enum([
16088
+ "single",
16089
+ "bulk",
16090
+ "cluster"
16091
+ ]);
16092
+ var lifecycleJobSchema = object({
16093
+ jobId: string(),
16094
+ kind: jobKindSchema,
16095
+ createdAtMs: number(),
16096
+ createdBy: string(),
16097
+ scope: lifecycleJobScopeSchema,
16098
+ tasks: array(lifecycleTaskSchema),
16099
+ state: lifecycleJobStateSchema,
16100
+ schemaVersion: literal(1)
16101
+ });
16038
16102
  /**
16039
16103
  * addons — system-scoped singleton capability for addon package
16040
16104
  * management (install, update, configure, restart) and per-addon log
@@ -16217,7 +16281,7 @@ var BulkUpdatePhaseSchema = _enum([
16217
16281
  "restarting",
16218
16282
  "finalizing"
16219
16283
  ]);
16220
- var BulkUpdateStateSchema = object({
16284
+ object({
16221
16285
  id: string(),
16222
16286
  nodeId: string(),
16223
16287
  startedAtMs: number(),
@@ -16320,20 +16384,7 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16320
16384
  }), UpdateFrameworkPackageResultSchema, {
16321
16385
  kind: "mutation",
16322
16386
  auth: "admin"
16323
- }), method(object({
16324
- nodeId: string(),
16325
- items: array(object({
16326
- name: string(),
16327
- version: string(),
16328
- isSystem: boolean()
16329
- })).readonly()
16330
- }), object({ id: string() }), {
16331
- kind: "mutation",
16332
- auth: "admin"
16333
- }), method(object({ id: string() }), BulkUpdateStateSchema.nullable(), { auth: "admin" }), method(object({ id: string() }), object({ cancelled: boolean() }), {
16334
- kind: "mutation",
16335
- auth: "admin"
16336
- }), method(object({ nodeId: string().optional() }), array(BulkUpdateStateSchema).readonly(), { auth: "admin" }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16387
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
16337
16388
  kind: "mutation",
16338
16389
  auth: "admin"
16339
16390
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -16355,6 +16406,24 @@ method(_void(), array(AddonListItemSchema).readonly()), method(object({
16355
16406
  kind: "mutation",
16356
16407
  auth: "admin"
16357
16408
  }), method(CustomActionInputSchema, unknown(), { kind: "mutation" }), method(object({
16409
+ kind: _enum([
16410
+ "install",
16411
+ "update",
16412
+ "uninstall",
16413
+ "restart"
16414
+ ]),
16415
+ targets: array(object({
16416
+ name: string().min(1),
16417
+ version: string().min(1)
16418
+ })).min(1),
16419
+ nodeIds: array(string()).optional()
16420
+ }), object({ jobId: string() }), {
16421
+ kind: "mutation",
16422
+ auth: "admin"
16423
+ }), method(object({ jobId: string() }), lifecycleJobSchema.nullable(), { auth: "admin" }), method(object({ activeOnly: boolean().optional() }), array(lifecycleJobSchema), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
16424
+ kind: "mutation",
16425
+ auth: "admin"
16426
+ }), method(object({
16358
16427
  addonId: string(),
16359
16428
  level: LogLevelSchema$1.optional()
16360
16429
  }), LogStreamEntrySchema, { kind: "subscription" });
@@ -16395,7 +16464,7 @@ Object.freeze({
16395
16464
  addonId: null,
16396
16465
  access: "create"
16397
16466
  },
16398
- "addons.cancelBulkUpdate": {
16467
+ "addons.cancelJob": {
16399
16468
  capName: "addons",
16400
16469
  capScope: "system",
16401
16470
  addonId: null,
@@ -16425,7 +16494,7 @@ Object.freeze({
16425
16494
  addonId: null,
16426
16495
  access: "view"
16427
16496
  },
16428
- "addons.getBulkUpdateState": {
16497
+ "addons.getJob": {
16429
16498
  capName: "addons",
16430
16499
  capScope: "system",
16431
16500
  addonId: null,
@@ -16473,19 +16542,19 @@ Object.freeze({
16473
16542
  addonId: null,
16474
16543
  access: "view"
16475
16544
  },
16476
- "addons.listActiveBulkUpdates": {
16545
+ "addons.listCapabilityProviders": {
16477
16546
  capName: "addons",
16478
16547
  capScope: "system",
16479
16548
  addonId: null,
16480
16549
  access: "view"
16481
16550
  },
16482
- "addons.listCapabilityProviders": {
16551
+ "addons.listFrameworkPackages": {
16483
16552
  capName: "addons",
16484
16553
  capScope: "system",
16485
16554
  addonId: null,
16486
16555
  access: "view"
16487
16556
  },
16488
- "addons.listFrameworkPackages": {
16557
+ "addons.listJobs": {
16489
16558
  capName: "addons",
16490
16559
  capScope: "system",
16491
16560
  addonId: null,
@@ -16569,7 +16638,7 @@ Object.freeze({
16569
16638
  addonId: null,
16570
16639
  access: "create"
16571
16640
  },
16572
- "addons.startBulkUpdate": {
16641
+ "addons.startJob": {
16573
16642
  capName: "addons",
16574
16643
  capScope: "system",
16575
16644
  addonId: null,
@@ -20556,6 +20625,32 @@ Object.freeze({
20556
20625
  "network-access": "ingress",
20557
20626
  "smtp-provider": "email"
20558
20627
  });
20628
+ var frameworkSwapPackageSchema = object({
20629
+ name: string(),
20630
+ stagedPath: string(),
20631
+ backupPath: string(),
20632
+ toVersion: string(),
20633
+ fromVersion: string().nullable()
20634
+ });
20635
+ object({
20636
+ jobId: string(),
20637
+ taskId: string(),
20638
+ packages: array(frameworkSwapPackageSchema),
20639
+ requestedAtMs: number(),
20640
+ schemaVersion: literal(1)
20641
+ });
20642
+ object({
20643
+ jobId: string(),
20644
+ taskId: string(),
20645
+ backups: array(object({
20646
+ name: string(),
20647
+ backupPath: string(),
20648
+ livePath: string()
20649
+ })),
20650
+ appliedAtMs: number(),
20651
+ bootAttempts: number(),
20652
+ schemaVersion: literal(1)
20653
+ });
20559
20654
  //#endregion
20560
20655
  Object.defineProperty(exports, "BaseAddon", {
20561
20656
  enumerable: true,
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-ByDiIgMC.js");
5
+ const require_dist = require("../dist-hLRTPO9P.js");
6
6
  let node_child_process = require("node:child_process");
7
7
  let node_util = require("node:util");
8
8
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { i as networkAccessCapability, n as EventCategory, t as BaseAddon } from "../dist-DcSssCOP.mjs";
1
+ import { i as networkAccessCapability, n as EventCategory, t as BaseAddon } from "../dist-O8xvcftz.mjs";
2
2
  import { execFile } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import { randomUUID } from "node:crypto";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-tailscale",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Tailscale bundle for CamStack — joins the host to a tailnet (client) and exposes the hub via Serve/Funnel (ingress). Multi-entry npm package shipping 2 addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",