@camstack/addon-pipeline-orchestrator 0.1.12 → 0.1.13

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.
@@ -1,5 +1,5 @@
1
1
  import { i as _e, b as x, A as be, n as ve } from "./__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_trpc_mf_1_client__loadShare__.mjs-D4eEXltm.mjs";
2
- import { a as V, b as Ee } from "./__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-zU1ROtkq.mjs";
2
+ import { a as V, b as Ee } from "./__mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.mjs-B47e6UPj.mjs";
3
3
  class Pe {
4
4
  constructor() {
5
5
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
package/dist/index.js CHANGED
@@ -8593,10 +8593,30 @@ const StatusSchema = object({
8593
8593
  }
8594
8594
  });
8595
8595
  const LinkStateSchema = _enum(["unlinked", "linked", "error"]);
8596
+ const ExportSetupFieldSchema = object({
8597
+ label: string(),
8598
+ value: string(),
8599
+ /** Mask the value by default + render a reveal toggle (client id, secrets). */
8600
+ secret: boolean().optional()
8601
+ });
8602
+ const ExportSetupSchema = object({
8603
+ /** A string to render as a scannable QR — HAP `X-HM://…` URI, a pairing URL, etc. Omitted when there's nothing to scan. */
8604
+ qr: string().optional(),
8605
+ /** Label/value rows shown with a copy button (HAP setup code, OAuth URLs, client id, linked-account count, …). */
8606
+ fields: array(ExportSetupFieldSchema).readonly().optional(),
8607
+ /** Free-form operator instructions rendered above the fields. */
8608
+ note: string().optional()
8609
+ });
8596
8610
  const DeviceExportStatusSchema = object({
8597
8611
  linkState: LinkStateSchema,
8598
8612
  exposedDeviceCount: number(),
8599
- error: string().optional()
8613
+ error: string().optional(),
8614
+ /**
8615
+ * Optional pairing/account info the panel renders in a generic
8616
+ * "Setup" section. Addon-agnostic — the addon id identifies the
8617
+ * export target, never an `ecosystem` key here.
8618
+ */
8619
+ setup: ExportSetupSchema.optional()
8600
8620
  });
8601
8621
  const DeviceKindSchema = string();
8602
8622
  const ExposedDeviceSchema = object({
@@ -12030,7 +12050,25 @@ const MeshStatusSchema = object({
12030
12050
  * doesn't rotate keys for the bound host. Operator-facing surface
12031
12051
  * for "your access expires on …" banners.
12032
12052
  */
12033
- keyExpiry: number().nullable()
12053
+ keyExpiry: number().nullable(),
12054
+ // ── Onboard-daemon handoff (Tailscale, generic slot) ────────────
12055
+ /**
12056
+ * When the provider runs its OWN mesh daemon (e.g. the Tailscale
12057
+ * client addon in `onboard` mode spawns a private `tailscaled`),
12058
+ * this carries the local control-socket path. Companion addons that
12059
+ * must drive the SAME daemon — chiefly `tailscale-ingress` for
12060
+ * Serve/Funnel — read it to point their CLI at the right socket
12061
+ * instead of the system default. Empty when the provider uses the
12062
+ * host's system daemon (or doesn't have the concept).
12063
+ */
12064
+ daemonSocket: string().optional(),
12065
+ /**
12066
+ * Path to the mesh CLI binary the provider downloaded for onboard
12067
+ * mode. Companion addons reuse it so they don't need a system
12068
+ * install when the operator chose a fully self-contained mesh.
12069
+ * Empty in host mode.
12070
+ */
12071
+ daemonCliPath: string().optional()
12034
12072
  });
12035
12073
  ({
12036
12074
  methods: {
@@ -12916,6 +12954,21 @@ const AddonAutoUpdateSchema = ChannelWithInheritSchema;
12916
12954
  const RestartAddonResultSchema = unknown();
12917
12955
  const InstallPackageResultSchema = unknown();
12918
12956
  const ReloadPackagesResultSchema = unknown();
12957
+ const UpdateFrameworkPackageResultSchema = object({
12958
+ packageName: string(),
12959
+ fromVersion: string(),
12960
+ toVersion: string(),
12961
+ /** Ms-epoch the server scheduled its self-restart. */
12962
+ restartingAt: number()
12963
+ });
12964
+ const FrameworkPackageStatusSchema = object({
12965
+ packageName: string(),
12966
+ currentVersion: string(),
12967
+ latestVersion: string().nullable(),
12968
+ hasUpdate: boolean(),
12969
+ /** Optional manifest description for the row tooltip. */
12970
+ description: string().optional()
12971
+ });
12919
12972
  const LogStreamEntrySchema = object({
12920
12973
  timestamp: string(),
12921
12974
  level: string(),
@@ -12975,13 +13028,29 @@ const CustomActionInputSchema = object({
12975
13028
  object({ query: string().optional() }),
12976
13029
  array(SearchResultSchema)
12977
13030
  ),
13031
+ /**
13032
+ * Available package updates for a node. `nodeId` omitted (or
13033
+ * `'hub'`) checks the hub's own installed packages; an agent
13034
+ * `nodeId` checks that agent's installed roster against npm
13035
+ * (the hub does the npm lookups + diff — agents stay npm-free).
13036
+ */
12978
13037
  listUpdates: method(
12979
- _void(),
13038
+ object({ nodeId: string().optional() }),
12980
13039
  array(PackageUpdateSchema).readonly(),
12981
13040
  { auth: "admin" }
12982
13041
  ),
13042
+ /**
13043
+ * Update one package on a node. `nodeId` omitted (or `'hub'`)
13044
+ * installs on the hub via npm; an agent `nodeId` makes the hub
13045
+ * pack the resolved version and push the tarball to that agent
13046
+ * (`$agent.deploy` + `$agent.reload`) — agents need no npm runtime.
13047
+ */
12983
13048
  updatePackage: method(
12984
- object({ name: string().min(1), version: string().optional() }),
13049
+ object({
13050
+ name: string().min(1),
13051
+ version: string().optional(),
13052
+ nodeId: string().optional()
13053
+ }),
12985
13054
  unknown(),
12986
13055
  { kind: "mutation", auth: "admin" }
12987
13056
  ),
@@ -13002,12 +13071,105 @@ const CustomActionInputSchema = object({
13002
13071
  object({ rolledBackTo: string().nullable() }),
13003
13072
  { kind: "mutation", auth: "admin" }
13004
13073
  ),
13005
- forceRefresh: method(_void(), unknown(), { kind: "mutation", auth: "admin" }),
13074
+ /** Re-check updates for a node, bypassing any cache. `nodeId`
13075
+ * omitted (or `'hub'`) refreshes the hub; an agent `nodeId`
13076
+ * re-checks that agent's roster. */
13077
+ forceRefresh: method(
13078
+ object({ nodeId: string().optional() }),
13079
+ unknown(),
13080
+ { kind: "mutation", auth: "admin" }
13081
+ ),
13006
13082
  restartServer: method(
13007
13083
  object({ confirm: literal(true) }),
13008
13084
  unknown(),
13009
13085
  { kind: "mutation", auth: "admin" }
13010
13086
  ),
13087
+ /**
13088
+ * Most-recent restart marker (kind / packageName / from→to versions
13089
+ * / requestedBy / requestedAt). Returns `null` when this process
13090
+ * didn't boot from a tracked restart, or when the
13091
+ * post-boot retention window (5 min) has elapsed.
13092
+ *
13093
+ * Drives the admin-UI reconnect overlay's success toast — the
13094
+ * `system.restart-completed` event itself is fired before the
13095
+ * client has time to re-subscribe, so the client queries this on
13096
+ * first reconnect instead.
13097
+ */
13098
+ getLastRestart: method(
13099
+ _void(),
13100
+ object({
13101
+ kind: _enum(["framework-update", "manual", "system"]),
13102
+ packageName: string().optional(),
13103
+ fromVersion: string().optional(),
13104
+ toVersion: string().optional(),
13105
+ requestedBy: string().optional(),
13106
+ requestedAt: number()
13107
+ }).nullable(),
13108
+ { auth: "admin" }
13109
+ ),
13110
+ /**
13111
+ * Snapshot of the framework packages installed under the hub's
13112
+ * `<appRoot>/node_modules/`. Each row carries the currently
13113
+ * installed version and (best-effort) the latest version
13114
+ * available on npm. Drives the admin-UI "System packages" panel.
13115
+ *
13116
+ * Spec: docs/superpowers/specs/2026-05-14-framework-live-update-design.md
13117
+ */
13118
+ listFrameworkPackages: method(
13119
+ _void(),
13120
+ array(FrameworkPackageStatusSchema).readonly(),
13121
+ { auth: "admin" }
13122
+ ),
13123
+ /**
13124
+ * Cluster-wide capability-provider discovery. Returns the list of
13125
+ * `{ addonId, mode, isActive }` tuples for whatever addon(s)
13126
+ * currently provide the requested capability across the cluster.
13127
+ *
13128
+ * Why this lives on `addons` (and not on a `capabilities` cap of
13129
+ * its own): the hub's main-process `CapabilityRegistry` already
13130
+ * aggregates registrations from every forked group-runner and
13131
+ * remote agent via Moleculer event propagation — there's no
13132
+ * cross-process registry mirror to build, just an introspection
13133
+ * shim.
13134
+ *
13135
+ * Use this from addon code when you need to know whether another
13136
+ * addon has registered a specific cap (e.g. `tailscale-ingress`
13137
+ * checking `tailscale-client` is up before calling `tailscale
13138
+ * serve`). Don't reach for `ctx.capabilities.getCollectionEntries`
13139
+ * — that reads the LOCAL registry of the calling addon's group
13140
+ * runner and never sees providers in other processes. See
13141
+ * `CLAUDE.md` → Critical rules → ctx.api vs ctx.capabilities.
13142
+ */
13143
+ listCapabilityProviders: method(
13144
+ object({ capName: string().min(1) }),
13145
+ array(object({
13146
+ addonId: string(),
13147
+ mode: _enum(["singleton", "collection"]),
13148
+ isActive: boolean()
13149
+ })).readonly()
13150
+ ),
13151
+ /**
13152
+ * Live-update one of the framework packages marked
13153
+ * `camstack.system: true` (`@camstack/types|kernel|core|sdk|ui-library`).
13154
+ * Runs `npm install --prefix <appRoot> <name>@<version> --no-save`,
13155
+ * writes a `.restart-pending` marker, emits `system.restarting`
13156
+ * and schedules a graceful process exit. The supervisor (Docker /
13157
+ * Electron / systemd) brings the hub back up; on first boot after
13158
+ * the restart the marker fires `system.restart-completed`.
13159
+ *
13160
+ * `version` defaults to `'latest'`. The allow-list of valid
13161
+ * `packageName` values is enforced server-side.
13162
+ *
13163
+ * Spec: docs/superpowers/specs/2026-05-14-framework-live-update-design.md
13164
+ */
13165
+ updateFrameworkPackage: method(
13166
+ object({
13167
+ packageName: string().min(1),
13168
+ version: string().optional()
13169
+ }),
13170
+ UpdateFrameworkPackageResultSchema,
13171
+ { kind: "mutation", auth: "admin" }
13172
+ ),
13011
13173
  getVersions: method(
13012
13174
  object({ name: string() }),
13013
13175
  array(PackageVersionInfoSchema).readonly()
@@ -13078,6 +13240,7 @@ var EventCategory = /* @__PURE__ */ ((EventCategory2) => {
13078
13240
  EventCategory2["SystemBoot"] = "system.boot";
13079
13241
  EventCategory2["SystemAddonsReady"] = "system.addons-ready";
13080
13242
  EventCategory2["SystemRestarting"] = "system.restarting";
13243
+ EventCategory2["SystemRestartCompleted"] = "system.restart-completed";
13081
13244
  EventCategory2["SystemReadyState"] = "system.ready-state";
13082
13245
  EventCategory2["AddonStarted"] = "addon.started";
13083
13246
  EventCategory2["AddonStopped"] = "addon.stopped";