@camstack/core 0.1.36 → 0.1.37

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/dist/index.mjs CHANGED
@@ -31,7 +31,7 @@ import { promisify } from "node:util";
31
31
  import { errMsg, parseJsonObject } from "@camstack/types";
32
32
  import * as vm from "node:vm";
33
33
  import * as os from "node:os";
34
- //#region ../types/dist/index-YnRVILXN.mjs
34
+ //#region ../types/dist/index-Ce7RZWP4.mjs
35
35
  var MODEL_FORMATS = [
36
36
  "onnx",
37
37
  "coreml",
@@ -2648,10 +2648,30 @@ var LinkStateSchema = z.enum([
2648
2648
  "linked",
2649
2649
  "error"
2650
2650
  ]);
2651
+ var ExportSetupFieldSchema = z.object({
2652
+ label: z.string(),
2653
+ value: z.string(),
2654
+ /** Mask the value by default + render a reveal toggle (client id, secrets). */
2655
+ secret: z.boolean().optional()
2656
+ });
2657
+ var ExportSetupSchema = z.object({
2658
+ /** A string to render as a scannable QR — HAP `X-HM://…` URI, a pairing URL, etc. Omitted when there's nothing to scan. */
2659
+ qr: z.string().optional(),
2660
+ /** Label/value rows shown with a copy button (HAP setup code, OAuth URLs, client id, linked-account count, …). */
2661
+ fields: z.array(ExportSetupFieldSchema).readonly().optional(),
2662
+ /** Free-form operator instructions rendered above the fields. */
2663
+ note: z.string().optional()
2664
+ });
2651
2665
  var DeviceExportStatusSchema = z.object({
2652
2666
  linkState: LinkStateSchema,
2653
2667
  exposedDeviceCount: z.number(),
2654
- error: z.string().optional()
2668
+ error: z.string().optional(),
2669
+ /**
2670
+ * Optional pairing/account info the panel renders in a generic
2671
+ * "Setup" section. Addon-agnostic — the addon id identifies the
2672
+ * export target, never an `ecosystem` key here.
2673
+ */
2674
+ setup: ExportSetupSchema.optional()
2655
2675
  });
2656
2676
  var DeviceKindSchema = z.string();
2657
2677
  var ExposedDeviceSchema = z.object({
@@ -4892,7 +4912,24 @@ var MeshStatusSchema = z.object({
4892
4912
  * doesn't rotate keys for the bound host. Operator-facing surface
4893
4913
  * for "your access expires on …" banners.
4894
4914
  */
4895
- keyExpiry: z.number().nullable()
4915
+ keyExpiry: z.number().nullable(),
4916
+ /**
4917
+ * When the provider runs its OWN mesh daemon (e.g. the Tailscale
4918
+ * client addon in `onboard` mode spawns a private `tailscaled`),
4919
+ * this carries the local control-socket path. Companion addons that
4920
+ * must drive the SAME daemon — chiefly `tailscale-ingress` for
4921
+ * Serve/Funnel — read it to point their CLI at the right socket
4922
+ * instead of the system default. Empty when the provider uses the
4923
+ * host's system daemon (or doesn't have the concept).
4924
+ */
4925
+ daemonSocket: z.string().optional(),
4926
+ /**
4927
+ * Path to the mesh CLI binary the provider downloaded for onboard
4928
+ * mode. Companion addons reuse it so they don't need a system
4929
+ * install when the operator chose a fully self-contained mesh.
4930
+ * Empty in host mode.
4931
+ */
4932
+ daemonCliPath: z.string().optional()
4896
4933
  });
4897
4934
  method(z.void(), MeshStatusSchema), method(z.object({
4898
4935
  /** Provider-specific auth key. For Tailscale this is the
@@ -5574,6 +5611,21 @@ var AddonAutoUpdateSchema = ChannelWithInheritSchema;
5574
5611
  var RestartAddonResultSchema = z.unknown();
5575
5612
  var InstallPackageResultSchema = z.unknown();
5576
5613
  var ReloadPackagesResultSchema = z.unknown();
5614
+ var UpdateFrameworkPackageResultSchema = z.object({
5615
+ packageName: z.string(),
5616
+ fromVersion: z.string(),
5617
+ toVersion: z.string(),
5618
+ /** Ms-epoch the server scheduled its self-restart. */
5619
+ restartingAt: z.number()
5620
+ });
5621
+ var FrameworkPackageStatusSchema = z.object({
5622
+ packageName: z.string(),
5623
+ currentVersion: z.string(),
5624
+ latestVersion: z.string().nullable(),
5625
+ hasUpdate: z.boolean(),
5626
+ /** Optional manifest description for the row tooltip. */
5627
+ description: z.string().optional()
5628
+ });
5577
5629
  var LogStreamEntrySchema = z.object({
5578
5630
  timestamp: z.string(),
5579
5631
  level: z.string(),
@@ -5605,21 +5657,43 @@ method(z.void(), z.array(AddonListItemSchema).readonly()), method(z.object({
5605
5657
  }), method(z.void(), ReloadPackagesResultSchema, {
5606
5658
  kind: "mutation",
5607
5659
  auth: "admin"
5608
- }), method(z.object({ query: z.string().optional() }), z.array(SearchResultSchema)), method(z.void(), z.array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(z.object({
5660
+ }), method(z.object({ query: z.string().optional() }), z.array(SearchResultSchema)), method(z.object({ nodeId: z.string().optional() }), z.array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(z.object({
5609
5661
  name: z.string().min(1),
5610
- version: z.string().optional()
5662
+ version: z.string().optional(),
5663
+ nodeId: z.string().optional()
5611
5664
  }), z.unknown(), {
5612
5665
  kind: "mutation",
5613
5666
  auth: "admin"
5614
5667
  }), method(z.object({ name: z.string().min(1) }), z.object({ rolledBackTo: z.string().nullable() }), {
5615
5668
  kind: "mutation",
5616
5669
  auth: "admin"
5617
- }), method(z.void(), z.unknown(), {
5670
+ }), method(z.object({ nodeId: z.string().optional() }), z.unknown(), {
5618
5671
  kind: "mutation",
5619
5672
  auth: "admin"
5620
5673
  }), method(z.object({ confirm: z.literal(true) }), z.unknown(), {
5621
5674
  kind: "mutation",
5622
5675
  auth: "admin"
5676
+ }), method(z.void(), z.object({
5677
+ kind: z.enum([
5678
+ "framework-update",
5679
+ "manual",
5680
+ "system"
5681
+ ]),
5682
+ packageName: z.string().optional(),
5683
+ fromVersion: z.string().optional(),
5684
+ toVersion: z.string().optional(),
5685
+ requestedBy: z.string().optional(),
5686
+ requestedAt: z.number()
5687
+ }).nullable(), { auth: "admin" }), method(z.void(), z.array(FrameworkPackageStatusSchema).readonly(), { auth: "admin" }), method(z.object({ capName: z.string().min(1) }), z.array(z.object({
5688
+ addonId: z.string(),
5689
+ mode: z.enum(["singleton", "collection"]),
5690
+ isActive: z.boolean()
5691
+ })).readonly()), method(z.object({
5692
+ packageName: z.string().min(1),
5693
+ version: z.string().optional()
5694
+ }), UpdateFrameworkPackageResultSchema, {
5695
+ kind: "mutation",
5696
+ auth: "admin"
5623
5697
  }), method(z.object({ name: z.string() }), z.array(PackageVersionInfoSchema).readonly()), method(z.object({ addonId: z.string() }), RestartAddonResultSchema, {
5624
5698
  kind: "mutation",
5625
5699
  auth: "admin"