@camstack/addon-auth 1.1.2 → 1.1.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.
- package/dist/{dist-JmuFs-U5.mjs → dist-BLBS0d1z.js} +458 -8
- package/dist/{dist-CXCR7sEk.js → dist-JUeAGU3c.mjs} +393 -37
- package/dist/magic-link/auth-magic-link.addon.js +113 -34
- package/dist/magic-link/auth-magic-link.addon.mjs +113 -34
- package/dist/oidc/auth-oidc.addon.js +38 -14
- package/dist/oidc/auth-oidc.addon.mjs +38 -14
- package/dist/webauthn/_stub.js +568 -0
- package/dist/webauthn/_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-Bg_T1-iY.mjs +156 -0
- package/dist/webauthn/_virtual_mf___mfe_internal__addon_auth_webauthn_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-EnxrfqY5.mjs +26 -0
- package/dist/webauthn/_virtual_mf___mfe_internal__addon_auth_webauthn_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CQ-aEQ9b.mjs +26 -0
- package/dist/webauthn/_virtual_mf___mfe_internal__addon_auth_webauthn_widgets__loadShare__react__loadShare__.js-BIIa6vDX.mjs +26 -0
- package/dist/webauthn/_virtual_mf___mfe_internal__addon_auth_webauthn_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-BL2etuqg.mjs +26 -0
- package/dist/webauthn/auth-webauthn.addon.js +141 -5
- package/dist/webauthn/auth-webauthn.addon.mjs +136 -37
- package/dist/webauthn/dist-CYZr2fwk.mjs +2726 -0
- package/dist/webauthn/hostInit-Boe91Eeg.mjs +129 -0
- package/dist/webauthn/remoteEntry.js +134 -0
- package/dist/webauthn/remoteEntry.ssr.js +33 -0
- package/dist/webauthn/virtualExposes-Ckj56FAf.mjs +27 -0
- package/dist/webauthn/virtual_mf-exposes-ssr___mfe_internal__addon_auth_webauthn_widgets__remoteEntry_js-C5AzEzK5.mjs +10 -0
- package/package.json +30 -5
|
@@ -4627,7 +4627,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4627
4627
|
return inst;
|
|
4628
4628
|
}
|
|
4629
4629
|
//#endregion
|
|
4630
|
-
//#region ../types/dist/sleep-
|
|
4630
|
+
//#region ../types/dist/sleep-DJaTV2D7.mjs
|
|
4631
4631
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4632
4632
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4633
4633
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5348,10 +5348,6 @@ function hydrateField(field, values) {
|
|
|
5348
5348
|
};
|
|
5349
5349
|
}
|
|
5350
5350
|
const rawValue = storedValue !== void 0 ? storedValue : defaultValue !== void 0 ? defaultValue : null;
|
|
5351
|
-
if (field.type === "password") return {
|
|
5352
|
-
...field,
|
|
5353
|
-
value: ""
|
|
5354
|
-
};
|
|
5355
5351
|
const value = field.type === "textarea" && field.isJson && rawValue !== null && typeof rawValue === "object" ? JSON.stringify(rawValue, null, 2) : rawValue;
|
|
5356
5352
|
return {
|
|
5357
5353
|
...field,
|
|
@@ -6735,6 +6731,9 @@ function method(input, output, options) {
|
|
|
6735
6731
|
timeoutMs: options?.timeoutMs
|
|
6736
6732
|
};
|
|
6737
6733
|
}
|
|
6734
|
+
var StaticDirOutputSchema$1 = object({ staticDir: string() });
|
|
6735
|
+
var VersionOutputSchema$1 = object({ version: string() });
|
|
6736
|
+
method(_void(), StaticDirOutputSchema$1), method(_void(), VersionOutputSchema$1);
|
|
6738
6737
|
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
6739
6738
|
var VersionOutputSchema = object({ version: string() });
|
|
6740
6739
|
method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
|
|
@@ -7053,6 +7052,123 @@ var ConvertResultSchema = object({
|
|
|
7053
7052
|
})).readonly()
|
|
7054
7053
|
});
|
|
7055
7054
|
/**
|
|
7055
|
+
* Build an `IAddonRouteProvider` from a list of routes. Implements
|
|
7056
|
+
* both the operator-facing `getRoutes` (returning route descriptors
|
|
7057
|
+
* minus the handlers, which can't cross JSON) and the framework-
|
|
7058
|
+
* private `invoke` method that the hub calls when this provider lives
|
|
7059
|
+
* in a forked worker.
|
|
7060
|
+
*
|
|
7061
|
+
* Co-located addons use the returned `getRoutes` directly because
|
|
7062
|
+
* their handlers don't need to cross any wire. The `invoke` method
|
|
7063
|
+
* is present anyway so the bridge code on the hub is uniform — it
|
|
7064
|
+
* doesn't need to switch on "local vs remote provider" at the call
|
|
7065
|
+
* site.
|
|
7066
|
+
*
|
|
7067
|
+
* Example:
|
|
7068
|
+
* const routes: IAddonHttpRoute[] = [
|
|
7069
|
+
* { method: 'GET', path: '/start', access: 'public', handler: this.handleStart },
|
|
7070
|
+
* ]
|
|
7071
|
+
* return [
|
|
7072
|
+
* {
|
|
7073
|
+
* capability: addonRoutesCapability,
|
|
7074
|
+
* provider: buildAddonRouteProvider('auth-oidc', routes),
|
|
7075
|
+
* },
|
|
7076
|
+
* ]
|
|
7077
|
+
*/
|
|
7078
|
+
function buildAddonRouteProvider(id, routes) {
|
|
7079
|
+
return {
|
|
7080
|
+
id,
|
|
7081
|
+
getRoutes: () => routes,
|
|
7082
|
+
invoke: async (input) => {
|
|
7083
|
+
const match = matchRoute(routes, input.method, input.path);
|
|
7084
|
+
if (!match) return {
|
|
7085
|
+
status: 404,
|
|
7086
|
+
headers: {},
|
|
7087
|
+
redirectUrl: null,
|
|
7088
|
+
body: { error: `No route matches ${input.method} ${input.path}` }
|
|
7089
|
+
};
|
|
7090
|
+
const envelope = {
|
|
7091
|
+
status: 200,
|
|
7092
|
+
headers: {},
|
|
7093
|
+
redirectUrl: null
|
|
7094
|
+
};
|
|
7095
|
+
const reply = buildCapturingReply(envelope);
|
|
7096
|
+
const request = {
|
|
7097
|
+
params: {
|
|
7098
|
+
...input.params,
|
|
7099
|
+
...match.params
|
|
7100
|
+
},
|
|
7101
|
+
query: input.query,
|
|
7102
|
+
body: input.body,
|
|
7103
|
+
headers: input.headers,
|
|
7104
|
+
...input.user ? { user: input.user } : {},
|
|
7105
|
+
...input.scopedToken !== void 0 ? { scopedToken: input.scopedToken } : {}
|
|
7106
|
+
};
|
|
7107
|
+
await match.route.handler(request, reply);
|
|
7108
|
+
return envelope;
|
|
7109
|
+
}
|
|
7110
|
+
};
|
|
7111
|
+
}
|
|
7112
|
+
/**
|
|
7113
|
+
* Pattern matcher: same semantics as `AddonRouteRegistry.matchRoute`
|
|
7114
|
+
* but operating on a flat list and bypassing the `/addon/<id>/` prefix
|
|
7115
|
+
* — the bridge sends the post-prefix path directly so we don't need
|
|
7116
|
+
* to round-trip it through normalization.
|
|
7117
|
+
*/
|
|
7118
|
+
function matchRoute(routes, method, path) {
|
|
7119
|
+
const normalizedMethod = method.toUpperCase();
|
|
7120
|
+
for (const route of routes) {
|
|
7121
|
+
if (route.method !== normalizedMethod) continue;
|
|
7122
|
+
const params = matchPath(route.path, path);
|
|
7123
|
+
if (params !== null) return {
|
|
7124
|
+
route,
|
|
7125
|
+
params
|
|
7126
|
+
};
|
|
7127
|
+
}
|
|
7128
|
+
return null;
|
|
7129
|
+
}
|
|
7130
|
+
function matchPath(pattern, p) {
|
|
7131
|
+
const patternParts = pattern.split("/").filter(Boolean);
|
|
7132
|
+
const pathParts = p.split("/").filter(Boolean);
|
|
7133
|
+
if (patternParts.length !== pathParts.length) return null;
|
|
7134
|
+
const params = {};
|
|
7135
|
+
for (let i = 0; i < patternParts.length; i++) {
|
|
7136
|
+
const a = patternParts[i];
|
|
7137
|
+
const b = pathParts[i];
|
|
7138
|
+
if (a.startsWith(":")) params[a.slice(1)] = b;
|
|
7139
|
+
else if (a !== b) return null;
|
|
7140
|
+
}
|
|
7141
|
+
return params;
|
|
7142
|
+
}
|
|
7143
|
+
function buildCapturingReply(envelope) {
|
|
7144
|
+
const wrapper = {
|
|
7145
|
+
status(code) {
|
|
7146
|
+
envelope.status = code;
|
|
7147
|
+
return wrapper;
|
|
7148
|
+
},
|
|
7149
|
+
code(code) {
|
|
7150
|
+
envelope.status = code;
|
|
7151
|
+
return wrapper;
|
|
7152
|
+
},
|
|
7153
|
+
send(data) {
|
|
7154
|
+
envelope.body = data;
|
|
7155
|
+
},
|
|
7156
|
+
redirect(url) {
|
|
7157
|
+
envelope.redirectUrl = url;
|
|
7158
|
+
if (envelope.status === 200) envelope.status = 302;
|
|
7159
|
+
},
|
|
7160
|
+
header(name, value) {
|
|
7161
|
+
envelope.headers[name.toLowerCase()] = value;
|
|
7162
|
+
return wrapper;
|
|
7163
|
+
},
|
|
7164
|
+
type(mime) {
|
|
7165
|
+
envelope.contentType = mime;
|
|
7166
|
+
return wrapper;
|
|
7167
|
+
}
|
|
7168
|
+
};
|
|
7169
|
+
return wrapper;
|
|
7170
|
+
}
|
|
7171
|
+
/**
|
|
7056
7172
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
7057
7173
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
7058
7174
|
* `Weekday` exported from `interfaces/timezones.ts`.
|
|
@@ -12625,6 +12741,17 @@ var WidgetMetadataSchema = object({
|
|
|
12625
12741
|
deviceContext: boolean().default(false),
|
|
12626
12742
|
integrationContext: boolean().default(false)
|
|
12627
12743
|
}),
|
|
12744
|
+
/**
|
|
12745
|
+
* Loadable BEFORE authentication. The normal widget registry listing
|
|
12746
|
+
* (`addon-widgets.listWidgets`) is auth-gated, so a pre-auth surface
|
|
12747
|
+
* (the login page) cannot discover a widget through it. A widget that
|
|
12748
|
+
* declares `preAuth: true` marks itself as safe to mount on a pre-auth
|
|
12749
|
+
* screen — it is surfaced through the PUBLIC `auth.listLoginMethods`
|
|
12750
|
+
* login-method contribution channel (see `login-method.cap.ts`) rather
|
|
12751
|
+
* than the authenticated registry, and its bundle is served by the
|
|
12752
|
+
* public `/api/addon-widgets/:addonId/*` static route. Defaults false.
|
|
12753
|
+
*/
|
|
12754
|
+
preAuth: boolean().optional().default(false),
|
|
12628
12755
|
/** Dashboard placement HINTS (operator can override per instance). */
|
|
12629
12756
|
defaultSize: WidgetSizeEnum.default("md"),
|
|
12630
12757
|
allowedSizes: array(WidgetSizeEnum).readonly().default([
|
|
@@ -12635,7 +12762,13 @@ var WidgetMetadataSchema = object({
|
|
|
12635
12762
|
defaultColumns: number().int().min(1).max(12).default(6),
|
|
12636
12763
|
defaultRows: number().int().min(1).max(12).default(1)
|
|
12637
12764
|
});
|
|
12638
|
-
|
|
12765
|
+
var addonWidgetsSourceCapability = {
|
|
12766
|
+
name: "addon-widgets-source",
|
|
12767
|
+
scope: "system",
|
|
12768
|
+
mode: "collection",
|
|
12769
|
+
internal: true,
|
|
12770
|
+
methods: { listWidgets: method(_void(), array(WidgetMetadataSchema).readonly()) }
|
|
12771
|
+
};
|
|
12639
12772
|
/**
|
|
12640
12773
|
* `addon-widgets` — system-scoped singleton aggregator cap. Public-facing
|
|
12641
12774
|
* surface that admin-ui consumes through `useAddonWidgetsListWidgets()`.
|
|
@@ -12939,6 +13072,74 @@ var authProviderCapability = {
|
|
|
12939
13072
|
mount: { kind: "skip" }
|
|
12940
13073
|
};
|
|
12941
13074
|
/**
|
|
13075
|
+
* `login-method` — collection cap through which auth addons contribute
|
|
13076
|
+
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
13077
|
+
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
13078
|
+
* every auth addon (OIDC, magic-link, WebAuthn/passkey) registers a
|
|
13079
|
+
* `login-method` provider and the PUBLIC `auth.listLoginMethods`
|
|
13080
|
+
* procedure aggregates them for the unauthenticated login page.
|
|
13081
|
+
*
|
|
13082
|
+
* A contribution is a discriminated union on `kind`:
|
|
13083
|
+
*
|
|
13084
|
+
* - `redirect` — a declarative button. The login page renders a generic
|
|
13085
|
+
* button that navigates to `startUrl` (an addon-owned HTTP route).
|
|
13086
|
+
* Covers OIDC (`/addon/auth-oidc/<id>/start`) and magic-link with
|
|
13087
|
+
* ZERO shell-side JS. A future SSO addon plugs in the same way — the
|
|
13088
|
+
* login page needs NO change.
|
|
13089
|
+
*
|
|
13090
|
+
* - `widget` — a Module-Federation widget the login page mounts (via
|
|
13091
|
+
* `loadRemoteBundle`) for an in-page ceremony. Covers the passkey
|
|
13092
|
+
* login ceremony, which must run `@simplewebauthn/browser` INSIDE the
|
|
13093
|
+
* addon bundle. The referenced widget also declares `preAuth: true` in
|
|
13094
|
+
* its `addon-widgets-source` catalog entry. `auth.listLoginMethods`
|
|
13095
|
+
* stamps a public `bundleUrl` from `addonId` + `bundle`.
|
|
13096
|
+
*
|
|
13097
|
+
* Every contribution carries a `stage`:
|
|
13098
|
+
* - `primary` — shown on the first credentials screen (OIDC /
|
|
13099
|
+
* magic-link buttons; a future usernameless passkey).
|
|
13100
|
+
* - `second-factor` — shown AFTER the password leg, gated on the
|
|
13101
|
+
* returned `factors` (passkey-as-2FA today).
|
|
13102
|
+
*
|
|
13103
|
+
* `mount: skip` — the cap is read server-side by the core auth router
|
|
13104
|
+
* (`registry.getCollection('login-method')`), never mounted as its own
|
|
13105
|
+
* tRPC router.
|
|
13106
|
+
*/
|
|
13107
|
+
/** When a login method renders in the two-phase login flow. */
|
|
13108
|
+
var LoginStageEnum = _enum(["primary", "second-factor"]);
|
|
13109
|
+
/** One login-method contribution — redirect button OR pre-auth widget. */
|
|
13110
|
+
var LoginMethodContributionSchema = discriminatedUnion("kind", [object({
|
|
13111
|
+
kind: literal("redirect"),
|
|
13112
|
+
/** Stable id within the login-method set (e.g. `auth-oidc/google`). */
|
|
13113
|
+
id: string(),
|
|
13114
|
+
/** Operator-facing button label. */
|
|
13115
|
+
label: string(),
|
|
13116
|
+
/** lucide-react icon name. */
|
|
13117
|
+
icon: string().optional(),
|
|
13118
|
+
/** Addon-owned HTTP route the button navigates to (GET). */
|
|
13119
|
+
startUrl: string(),
|
|
13120
|
+
stage: LoginStageEnum
|
|
13121
|
+
}), object({
|
|
13122
|
+
kind: literal("widget"),
|
|
13123
|
+
/** Stable id within the login-method set (e.g. `auth-webauthn/passkey-login`). */
|
|
13124
|
+
id: string(),
|
|
13125
|
+
/** Owning addon id — drives the public bundle URL + the MF namespace. */
|
|
13126
|
+
addonId: string(),
|
|
13127
|
+
/** Bundle filename inside the addon's dist dir (`remoteEntry.js`). */
|
|
13128
|
+
bundle: string(),
|
|
13129
|
+
/** MF remote descriptor — `{ remoteName, exposedModule, componentKey }`. */
|
|
13130
|
+
remote: WidgetRemoteSchema,
|
|
13131
|
+
stage: LoginStageEnum
|
|
13132
|
+
})]);
|
|
13133
|
+
var loginMethodCapability = {
|
|
13134
|
+
name: "login-method",
|
|
13135
|
+
scope: "system",
|
|
13136
|
+
mode: "collection",
|
|
13137
|
+
internal: true,
|
|
13138
|
+
methods: { getLoginMethods: method(_void(), array(LoginMethodContributionSchema).readonly()) },
|
|
13139
|
+
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
13140
|
+
mount: { kind: "skip" }
|
|
13141
|
+
};
|
|
13142
|
+
/**
|
|
12942
13143
|
* Orchestrator-side destination metadata. The orchestrator computes
|
|
12943
13144
|
* `id = <addonId>:<subId>` from its provider lookup so consumers
|
|
12944
13145
|
* (admin UI, restore flow) see one canonical key.
|
|
@@ -15640,6 +15841,131 @@ method(object({
|
|
|
15640
15841
|
auth: "admin"
|
|
15641
15842
|
});
|
|
15642
15843
|
/**
|
|
15844
|
+
* server-management — per-NODE singleton capability for a node's ROOT
|
|
15845
|
+
* package lifecycle (runtime-updatable node packages, phase 2: hub + docker
|
|
15846
|
+
* agents).
|
|
15847
|
+
*
|
|
15848
|
+
* Each node's root package (`@camstack/server` on the hub, `@camstack/agent`
|
|
15849
|
+
* on agents) carries the whole software stack in its npm dep tree, so ONE
|
|
15850
|
+
* version describes the node. Updates install into
|
|
15851
|
+
* `<dataDir>/server-root/versions/<v>/` and apply on restart via the baked
|
|
15852
|
+
* starter (probation boot + auto-rollback to N-1).
|
|
15853
|
+
*
|
|
15854
|
+
* Providers:
|
|
15855
|
+
* - HUB: `ServerUpdateService` behind the `server-provided` mount
|
|
15856
|
+
* (`buildServerProviders` in trpc.router.ts) — the default target for
|
|
15857
|
+
* unpinned calls.
|
|
15858
|
+
* - AGENT: `AgentUpdateService` registered by the agent bootstrap under
|
|
15859
|
+
* the synthetic `agent-runtime` addonId and declared in the agent's
|
|
15860
|
+
* `$hub.registerNode` manifest.
|
|
15861
|
+
*
|
|
15862
|
+
* Node routing: singleton caps get the codegen/runtime-builder `nodeId`
|
|
15863
|
+
* injection on every method — `input.nodeId` (or `nodePin(nodeId)` from the
|
|
15864
|
+
* SDK) routes the call to that node's provider via the standard remote
|
|
15865
|
+
* proxy (`createCapabilityProxy` → `$agent-cap-fwd` → the agent's
|
|
15866
|
+
* in-process provider lookup). No `nodeId` → the hub's own provider.
|
|
15867
|
+
*
|
|
15868
|
+
* Spec: docs/superpowers/specs/2026-07-12-runtime-updatable-node-packages-design.md
|
|
15869
|
+
*/
|
|
15870
|
+
/**
|
|
15871
|
+
* Where the running hub's code was loaded from:
|
|
15872
|
+
* - `workspace` — dev checkout (tsx / workspace dist); the starter defers to
|
|
15873
|
+
* plain resolution and runtime updates are refused.
|
|
15874
|
+
* - `baked` — the immutable image seed closure (no data-dir root active).
|
|
15875
|
+
* - `data-root` — the runtime-updatable `<dataDir>/server-root` closure.
|
|
15876
|
+
*/
|
|
15877
|
+
var ServerBootModeSchema = _enum([
|
|
15878
|
+
"workspace",
|
|
15879
|
+
"baked",
|
|
15880
|
+
"data-root"
|
|
15881
|
+
]);
|
|
15882
|
+
/**
|
|
15883
|
+
* Update lifecycle state:
|
|
15884
|
+
* - `idle` / `checking` / `staging` — steady / in-flight registry work.
|
|
15885
|
+
* - `pending-restart` — a version is staged and the node has NOT yet
|
|
15886
|
+
* restarted onto it (still running the OLD version).
|
|
15887
|
+
* - `awaiting-confirmation` — the node HAS restarted onto the staged version
|
|
15888
|
+
* (it is the active probation boot) and is waiting to confirm boot-health.
|
|
15889
|
+
* Apply/rollback are refused in this state and the node must NOT be
|
|
15890
|
+
* manually restarted, or the probation boot auto-rolls-back.
|
|
15891
|
+
*/
|
|
15892
|
+
var ServerUpdateStateSchema = _enum([
|
|
15893
|
+
"idle",
|
|
15894
|
+
"checking",
|
|
15895
|
+
"staging",
|
|
15896
|
+
"pending-restart",
|
|
15897
|
+
"awaiting-confirmation"
|
|
15898
|
+
]);
|
|
15899
|
+
var ServerRollbackInfoSchema = object({
|
|
15900
|
+
/** The version that failed (or was manually rolled back). */
|
|
15901
|
+
fromVersion: string(),
|
|
15902
|
+
/** The version rolled back to; null = the baked seed. */
|
|
15903
|
+
toVersion: string().nullable(),
|
|
15904
|
+
atMs: number(),
|
|
15905
|
+
reason: string()
|
|
15906
|
+
});
|
|
15907
|
+
var ServerPackageStatusSchema = object({
|
|
15908
|
+
/** Root package name (`@camstack/server` on the hub). */
|
|
15909
|
+
packageName: string(),
|
|
15910
|
+
/** Version of the code the running process ACTUALLY loaded. */
|
|
15911
|
+
runningVersion: string().nullable(),
|
|
15912
|
+
/** Node.js runtime version the node's process runs on (`process.versions.node`). */
|
|
15913
|
+
nodeRuntimeVersion: string().nullable(),
|
|
15914
|
+
/** Active data-dir root version; null when booted from seed/workspace. */
|
|
15915
|
+
activeVersion: string().nullable(),
|
|
15916
|
+
/** N-1 version kept for rollback; null when no previous version exists. */
|
|
15917
|
+
previousVersion: string().nullable(),
|
|
15918
|
+
/** Version of the immutable baked seed closure (image fallback). */
|
|
15919
|
+
seedVersion: string().nullable(),
|
|
15920
|
+
/** Latest registry version from the most recent check (null = never checked). */
|
|
15921
|
+
latestVersion: string().nullable(),
|
|
15922
|
+
updateAvailable: boolean(),
|
|
15923
|
+
bootMode: ServerBootModeSchema,
|
|
15924
|
+
updateState: ServerUpdateStateSchema,
|
|
15925
|
+
/** Version staged + awaiting its probation boot, when one is pending. */
|
|
15926
|
+
pendingVersion: string().nullable(),
|
|
15927
|
+
/** Set when the last freshly-activated version failed its boot health-check. */
|
|
15928
|
+
rolledBack: ServerRollbackInfoSchema.nullable(),
|
|
15929
|
+
/**
|
|
15930
|
+
* True when `server-root/state.json` EXISTS but is unreadable/corrupt — the
|
|
15931
|
+
* hub is running from the baked seed (or workspace) while installed data-dir
|
|
15932
|
+
* versions are being IGNORED. Surfaced as a warning in the UI.
|
|
15933
|
+
*/
|
|
15934
|
+
stateFileCorrupt: boolean(),
|
|
15935
|
+
lastCheckedAtMs: number().nullable()
|
|
15936
|
+
});
|
|
15937
|
+
var ServerUpdateCheckResultSchema = object({
|
|
15938
|
+
packageName: string(),
|
|
15939
|
+
runningVersion: string().nullable(),
|
|
15940
|
+
latestVersion: string().nullable(),
|
|
15941
|
+
updateAvailable: boolean(),
|
|
15942
|
+
checkedAtMs: number(),
|
|
15943
|
+
/** Non-null when the registry lookup failed (offline, bad registry, …). */
|
|
15944
|
+
error: string().nullable()
|
|
15945
|
+
});
|
|
15946
|
+
var ServerUpdateActionResultSchema = object({
|
|
15947
|
+
accepted: boolean(),
|
|
15948
|
+
targetVersion: string().nullable(),
|
|
15949
|
+
/** True when a graceful restart was scheduled to apply the change. */
|
|
15950
|
+
restarting: boolean(),
|
|
15951
|
+
message: string()
|
|
15952
|
+
});
|
|
15953
|
+
method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
|
|
15954
|
+
kind: "mutation",
|
|
15955
|
+
auth: "admin"
|
|
15956
|
+
}), method(object({
|
|
15957
|
+
/** Explicit target version; omitted = latest from the registry. */
|
|
15958
|
+
version: string().optional() }), ServerUpdateActionResultSchema, {
|
|
15959
|
+
kind: "mutation",
|
|
15960
|
+
auth: "admin"
|
|
15961
|
+
}), method(_void(), ServerUpdateActionResultSchema, {
|
|
15962
|
+
kind: "mutation",
|
|
15963
|
+
auth: "admin"
|
|
15964
|
+
}), method(_void(), ServerUpdateActionResultSchema, {
|
|
15965
|
+
kind: "mutation",
|
|
15966
|
+
auth: "admin"
|
|
15967
|
+
});
|
|
15968
|
+
/**
|
|
15643
15969
|
* Query filter for settings-store collections.
|
|
15644
15970
|
*/
|
|
15645
15971
|
var QueryFilterSchema = object({
|
|
@@ -17639,6 +17965,16 @@ var TopologyCategorySchema = object({
|
|
|
17639
17965
|
healthy: number(),
|
|
17640
17966
|
addons: array(TopologyCategoryAddonSchema).readonly()
|
|
17641
17967
|
});
|
|
17968
|
+
/**
|
|
17969
|
+
* The node's runtime-updatable ROOT package (`@camstack/server` on the hub,
|
|
17970
|
+
* `@camstack/agent` on agents) as reported by its `registerNode` manifest —
|
|
17971
|
+
* version visibility for the Server management surface. Nullable: offline
|
|
17972
|
+
* rows and pre-phase-2 nodes report none.
|
|
17973
|
+
*/
|
|
17974
|
+
var TopologyRootPackageSchema = object({
|
|
17975
|
+
name: string(),
|
|
17976
|
+
version: string()
|
|
17977
|
+
});
|
|
17642
17978
|
var TopologyNodeSchema = object({
|
|
17643
17979
|
id: string(),
|
|
17644
17980
|
name: string(),
|
|
@@ -17662,7 +17998,8 @@ var TopologyNodeSchema = object({
|
|
|
17662
17998
|
status: string()
|
|
17663
17999
|
})).readonly(),
|
|
17664
18000
|
processes: array(TopologyProcessSchema).readonly(),
|
|
17665
|
-
categories: array(TopologyCategorySchema).readonly()
|
|
18001
|
+
categories: array(TopologyCategorySchema).readonly(),
|
|
18002
|
+
rootPackage: TopologyRootPackageSchema.nullable()
|
|
17666
18003
|
});
|
|
17667
18004
|
var CapUsageEdgeSchema = object({
|
|
17668
18005
|
callerAddonId: string(),
|
|
@@ -20462,6 +20799,12 @@ Object.freeze({
|
|
|
20462
20799
|
addonId: null,
|
|
20463
20800
|
access: "create"
|
|
20464
20801
|
},
|
|
20802
|
+
"loginMethod.getLoginMethods": {
|
|
20803
|
+
capName: "login-method",
|
|
20804
|
+
capScope: "system",
|
|
20805
|
+
addonId: null,
|
|
20806
|
+
access: "view"
|
|
20807
|
+
},
|
|
20465
20808
|
"mediaPlayer.next": {
|
|
20466
20809
|
capName: "media-player",
|
|
20467
20810
|
capScope: "device",
|
|
@@ -21824,6 +22167,36 @@ Object.freeze({
|
|
|
21824
22167
|
addonId: null,
|
|
21825
22168
|
access: "create"
|
|
21826
22169
|
},
|
|
22170
|
+
"serverManagement.applyServerUpdate": {
|
|
22171
|
+
capName: "server-management",
|
|
22172
|
+
capScope: "system",
|
|
22173
|
+
addonId: null,
|
|
22174
|
+
access: "create"
|
|
22175
|
+
},
|
|
22176
|
+
"serverManagement.checkServerUpdate": {
|
|
22177
|
+
capName: "server-management",
|
|
22178
|
+
capScope: "system",
|
|
22179
|
+
addonId: null,
|
|
22180
|
+
access: "create"
|
|
22181
|
+
},
|
|
22182
|
+
"serverManagement.getServerPackageStatus": {
|
|
22183
|
+
capName: "server-management",
|
|
22184
|
+
capScope: "system",
|
|
22185
|
+
addonId: null,
|
|
22186
|
+
access: "view"
|
|
22187
|
+
},
|
|
22188
|
+
"serverManagement.restartServer": {
|
|
22189
|
+
capName: "server-management",
|
|
22190
|
+
capScope: "system",
|
|
22191
|
+
addonId: null,
|
|
22192
|
+
access: "create"
|
|
22193
|
+
},
|
|
22194
|
+
"serverManagement.rollbackServerUpdate": {
|
|
22195
|
+
capName: "server-management",
|
|
22196
|
+
capScope: "system",
|
|
22197
|
+
addonId: null,
|
|
22198
|
+
access: "create"
|
|
22199
|
+
},
|
|
21827
22200
|
"settingsStore.count": {
|
|
21828
22201
|
capName: "settings-store",
|
|
21829
22202
|
capScope: "system",
|
|
@@ -22688,6 +23061,18 @@ Object.freeze({
|
|
|
22688
23061
|
addonId: null,
|
|
22689
23062
|
access: "view"
|
|
22690
23063
|
},
|
|
23064
|
+
"viewerUi.getStaticDir": {
|
|
23065
|
+
capName: "viewer-ui",
|
|
23066
|
+
capScope: "system",
|
|
23067
|
+
addonId: null,
|
|
23068
|
+
access: "view"
|
|
23069
|
+
},
|
|
23070
|
+
"viewerUi.getVersion": {
|
|
23071
|
+
capName: "viewer-ui",
|
|
23072
|
+
capScope: "system",
|
|
23073
|
+
addonId: null,
|
|
23074
|
+
access: "view"
|
|
23075
|
+
},
|
|
22691
23076
|
"waterHeater.setAway": {
|
|
22692
23077
|
capName: "water-heater",
|
|
22693
23078
|
capScope: "device",
|
|
@@ -22856,4 +23241,69 @@ object({
|
|
|
22856
23241
|
schemaVersion: literal(1)
|
|
22857
23242
|
});
|
|
22858
23243
|
//#endregion
|
|
22859
|
-
|
|
23244
|
+
Object.defineProperty(exports, "BaseAddon", {
|
|
23245
|
+
enumerable: true,
|
|
23246
|
+
get: function() {
|
|
23247
|
+
return BaseAddon;
|
|
23248
|
+
}
|
|
23249
|
+
});
|
|
23250
|
+
Object.defineProperty(exports, "addonRoutesCapability", {
|
|
23251
|
+
enumerable: true,
|
|
23252
|
+
get: function() {
|
|
23253
|
+
return addonRoutesCapability;
|
|
23254
|
+
}
|
|
23255
|
+
});
|
|
23256
|
+
Object.defineProperty(exports, "addonWidgetsSourceCapability", {
|
|
23257
|
+
enumerable: true,
|
|
23258
|
+
get: function() {
|
|
23259
|
+
return addonWidgetsSourceCapability;
|
|
23260
|
+
}
|
|
23261
|
+
});
|
|
23262
|
+
Object.defineProperty(exports, "array", {
|
|
23263
|
+
enumerable: true,
|
|
23264
|
+
get: function() {
|
|
23265
|
+
return array;
|
|
23266
|
+
}
|
|
23267
|
+
});
|
|
23268
|
+
Object.defineProperty(exports, "authProviderCapability", {
|
|
23269
|
+
enumerable: true,
|
|
23270
|
+
get: function() {
|
|
23271
|
+
return authProviderCapability;
|
|
23272
|
+
}
|
|
23273
|
+
});
|
|
23274
|
+
Object.defineProperty(exports, "buildAddonRouteProvider", {
|
|
23275
|
+
enumerable: true,
|
|
23276
|
+
get: function() {
|
|
23277
|
+
return buildAddonRouteProvider;
|
|
23278
|
+
}
|
|
23279
|
+
});
|
|
23280
|
+
Object.defineProperty(exports, "errMsg", {
|
|
23281
|
+
enumerable: true,
|
|
23282
|
+
get: function() {
|
|
23283
|
+
return errMsg;
|
|
23284
|
+
}
|
|
23285
|
+
});
|
|
23286
|
+
Object.defineProperty(exports, "loginMethodCapability", {
|
|
23287
|
+
enumerable: true,
|
|
23288
|
+
get: function() {
|
|
23289
|
+
return loginMethodCapability;
|
|
23290
|
+
}
|
|
23291
|
+
});
|
|
23292
|
+
Object.defineProperty(exports, "object", {
|
|
23293
|
+
enumerable: true,
|
|
23294
|
+
get: function() {
|
|
23295
|
+
return object;
|
|
23296
|
+
}
|
|
23297
|
+
});
|
|
23298
|
+
Object.defineProperty(exports, "string", {
|
|
23299
|
+
enumerable: true,
|
|
23300
|
+
get: function() {
|
|
23301
|
+
return string;
|
|
23302
|
+
}
|
|
23303
|
+
});
|
|
23304
|
+
Object.defineProperty(exports, "userPasskeysCapability", {
|
|
23305
|
+
enumerable: true,
|
|
23306
|
+
get: function() {
|
|
23307
|
+
return userPasskeysCapability;
|
|
23308
|
+
}
|
|
23309
|
+
});
|