@camstack/core 0.1.37 → 0.1.39

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.
Files changed (82) hide show
  1. package/dist/auth/auth-manager.d.ts +12 -1
  2. package/dist/auth/auth-manager.d.ts.map +1 -1
  3. package/dist/auth/scope-matcher.d.ts +8 -0
  4. package/dist/auth/scope-matcher.d.ts.map +1 -0
  5. package/dist/auth/totp-manager.d.ts +0 -1
  6. package/dist/auth/totp-manager.d.ts.map +1 -1
  7. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.d.ts +15 -0
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.d.ts.map +1 -1
  9. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +27 -6
  10. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js.map +1 -1
  11. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +27 -6
  12. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs.map +1 -1
  13. package/dist/builtins/device-manager/device-config-contribution.d.ts +33 -0
  14. package/dist/builtins/device-manager/device-config-contribution.d.ts.map +1 -0
  15. package/dist/builtins/device-manager/device-manager.addon.d.ts +52 -17
  16. package/dist/builtins/device-manager/device-manager.addon.d.ts.map +1 -1
  17. package/dist/builtins/device-manager/device-manager.addon.js +285 -161
  18. package/dist/builtins/device-manager/device-manager.addon.js.map +1 -1
  19. package/dist/builtins/device-manager/device-manager.addon.mjs +286 -162
  20. package/dist/builtins/device-manager/device-manager.addon.mjs.map +1 -1
  21. package/dist/builtins/local-auth/auth-schema.d.ts +1 -0
  22. package/dist/builtins/local-auth/auth-schema.d.ts.map +1 -1
  23. package/dist/builtins/local-auth/local-auth.addon.d.ts +1 -0
  24. package/dist/builtins/local-auth/local-auth.addon.d.ts.map +1 -1
  25. package/dist/builtins/local-auth/local-auth.addon.js +354 -3
  26. package/dist/builtins/local-auth/local-auth.addon.js.map +1 -1
  27. package/dist/builtins/local-auth/local-auth.addon.mjs +355 -3
  28. package/dist/builtins/local-auth/local-auth.addon.mjs.map +1 -1
  29. package/dist/builtins/local-auth/oauth-grants.d.ts +46 -0
  30. package/dist/builtins/local-auth/oauth-grants.d.ts.map +1 -0
  31. package/dist/builtins/local-auth/oauth-session-manager.d.ts +51 -0
  32. package/dist/builtins/local-auth/oauth-session-manager.d.ts.map +1 -0
  33. package/dist/builtins/remote-access-orchestrator/enabled-providers-reconcile.d.ts +97 -0
  34. package/dist/builtins/remote-access-orchestrator/enabled-providers-reconcile.d.ts.map +1 -0
  35. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.d.ts +24 -1
  36. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.d.ts.map +1 -1
  37. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +136 -56
  38. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js.map +1 -1
  39. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +137 -57
  40. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs.map +1 -1
  41. package/dist/builtins/snapshot/index.js +1 -3
  42. package/dist/builtins/snapshot/index.js.map +1 -1
  43. package/dist/builtins/snapshot/index.mjs +1 -3
  44. package/dist/builtins/snapshot/index.mjs.map +1 -1
  45. package/dist/builtins/snapshot/snapshot.addon.d.ts.map +1 -1
  46. package/dist/index.d.ts +1 -0
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +428 -234
  49. package/dist/index.js.map +1 -1
  50. package/dist/index.mjs +428 -235
  51. package/dist/index.mjs.map +1 -1
  52. package/package.json +19 -37
  53. package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.d.ts +0 -8
  54. package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.d.ts.map +0 -1
  55. package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.js +0 -75
  56. package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.js.map +0 -1
  57. package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.mjs +0 -69
  58. package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.mjs.map +0 -1
  59. package/dist/builtins/auth-orchestrator/index.d.ts +0 -2
  60. package/dist/builtins/auth-orchestrator/index.d.ts.map +0 -1
  61. package/dist/builtins/auth-orchestrator/index.js +0 -7
  62. package/dist/builtins/auth-orchestrator/index.mjs +0 -2
  63. package/dist/builtins/mesh-orchestrator/index.d.ts +0 -2
  64. package/dist/builtins/mesh-orchestrator/index.d.ts.map +0 -1
  65. package/dist/builtins/mesh-orchestrator/index.js +0 -7
  66. package/dist/builtins/mesh-orchestrator/index.mjs +0 -2
  67. package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.d.ts +0 -9
  68. package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.d.ts.map +0 -1
  69. package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.js +0 -113
  70. package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.js.map +0 -1
  71. package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.mjs +0 -107
  72. package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.mjs.map +0 -1
  73. package/dist/builtins/turn-orchestrator/index.d.ts +0 -2
  74. package/dist/builtins/turn-orchestrator/index.d.ts.map +0 -1
  75. package/dist/builtins/turn-orchestrator/index.js +0 -7
  76. package/dist/builtins/turn-orchestrator/index.mjs +0 -2
  77. package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.d.ts +0 -34
  78. package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.d.ts.map +0 -1
  79. package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.js +0 -126
  80. package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.js.map +0 -1
  81. package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.mjs +0 -120
  82. package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.mjs.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/core",
3
- "version": "0.1.37",
3
+ "version": "0.1.39",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",
@@ -31,6 +31,7 @@
31
31
  "addons": [
32
32
  {
33
33
  "id": "filesystem-storage",
34
+ "category": "system",
34
35
  "name": "Filesystem Storage",
35
36
  "entry": "./dist/builtins/sqlite-storage/filesystem-storage.addon.js",
36
37
  "capabilities": [
@@ -41,6 +42,7 @@
41
42
  },
42
43
  {
43
44
  "id": "sqlite-settings",
45
+ "category": "system",
44
46
  "name": "SQLite Settings",
45
47
  "entry": "./dist/builtins/sqlite-storage/sqlite-settings.addon.js",
46
48
  "capabilities": [
@@ -51,6 +53,7 @@
51
53
  },
52
54
  {
53
55
  "id": "winston-logging",
56
+ "category": "system",
54
57
  "name": "Winston Logging",
55
58
  "entry": "./dist/builtins/winston-logging/index.js",
56
59
  "capabilities": [
@@ -61,6 +64,7 @@
61
64
  },
62
65
  {
63
66
  "id": "console-logging",
67
+ "category": "system",
64
68
  "name": "Console Logging",
65
69
  "entry": "./dist/builtins/console-logging/index.js",
66
70
  "capabilities": [
@@ -71,6 +75,7 @@
71
75
  },
72
76
  {
73
77
  "id": "hub-forwarder",
78
+ "category": "system",
74
79
  "name": "Hub Log Forwarder",
75
80
  "description": "Agent-only log destination — forwards every log entry to the hub via the cluster broker. Never runs on the hub itself (the hub already owns the log-receiver, registering hub-forwarder there would create a write→ingest→write feedback loop).",
76
81
  "entry": "./dist/builtins/hub-forwarder/index.js",
@@ -85,6 +90,7 @@
85
90
  },
86
91
  {
87
92
  "id": "backup-orchestrator",
93
+ "category": "system",
88
94
  "name": "Backup Orchestrator",
89
95
  "description": "System singleton that owns the schedule, builds the archive once, and fans it out to every enabled `backup-destination` provider (local, S3, rsync, …). In-process on hub root — aggregator over a cluster collection, no native deps.",
90
96
  "entry": "./dist/builtins/backup-orchestrator/index.js",
@@ -97,6 +103,7 @@
97
103
  },
98
104
  {
99
105
  "id": "storage-orchestrator",
106
+ "category": "system",
100
107
  "name": "Storage Orchestrator",
101
108
  "description": "Hub-only singleton that owns the consumer-facing `storage` cap. Holds the `locationId → StorageLocation` map, resolves `StorageLocationRef` to concrete locations, and dispatches every call to the matching `storage-provider` collection registrant (`filesystem-storage` today; future SFTP / S3 / WebDAV addons plug in alongside).",
102
109
  "entry": "./dist/builtins/storage-orchestrator/index.js",
@@ -109,6 +116,7 @@
109
116
  },
110
117
  {
111
118
  "id": "metrics-native",
119
+ "category": "system",
112
120
  "name": "Native Metrics",
113
121
  "entry": "./dist/builtins/native-metrics/native-metrics.addon.js",
114
122
  "capabilities": [
@@ -119,6 +127,7 @@
119
127
  },
120
128
  {
121
129
  "id": "snapshot",
130
+ "category": "system",
122
131
  "name": "Snapshot",
123
132
  "entry": "./dist/builtins/snapshot/index.js",
124
133
  "capabilities": [
@@ -129,6 +138,7 @@
129
138
  },
130
139
  {
131
140
  "id": "alert-center",
141
+ "category": "system",
132
142
  "name": "Alert Center",
133
143
  "entry": "./dist/builtins/alerts/index.js",
134
144
  "capabilities": [
@@ -139,6 +149,7 @@
139
149
  },
140
150
  {
141
151
  "id": "system-config",
152
+ "category": "system",
142
153
  "name": "System Config",
143
154
  "description": "Exposes cluster-wide yml-backed configuration sections (server, auth, ffmpeg, logging, recording, retention) via the three-level settings API. Hub-only.",
144
155
  "entry": "./dist/builtins/system-config/index.js",
@@ -146,6 +157,7 @@
146
157
  },
147
158
  {
148
159
  "id": "addon-pages-aggregator",
160
+ "category": "system",
149
161
  "name": "Addon Pages Aggregator",
150
162
  "description": "Hub-only singleton that aggregates `addon-pages-source` (collection) providers and emits the public `addon-pages.listPages` surface with versioned bundleUrls.",
151
163
  "entry": "./dist/builtins/addon-pages-aggregator/index.js",
@@ -158,6 +170,7 @@
158
170
  },
159
171
  {
160
172
  "id": "addon-widgets-aggregator",
173
+ "category": "system",
161
174
  "name": "Addon Widgets Aggregator",
162
175
  "description": "Hub-only singleton that aggregates `addon-widgets-source` (collection) providers and emits the public `addon-widgets.listWidgets` surface with versioned bundleUrls.",
163
176
  "entry": "./dist/builtins/addon-widgets-aggregator/index.js",
@@ -170,6 +183,7 @@
170
183
  },
171
184
  {
172
185
  "id": "device-manager",
186
+ "category": "system",
173
187
  "name": "Device Manager",
174
188
  "description": "Hub-side singleton that unifies device persistence and management. Uses ctx.settings for storage — no direct SQLite access. Replaces device-persistence cap (Phase 2 will delete device-persistence once all consumers are migrated).",
175
189
  "entry": "./dist/builtins/device-manager/index.js",
@@ -185,6 +199,7 @@
185
199
  },
186
200
  {
187
201
  "id": "local-auth",
202
+ "category": "system",
188
203
  "name": "Local Auth",
189
204
  "description": "Built-in local username/password authentication. Implements the auth-provider capability as the default login path. OIDC and other providers can register alongside via the same capability.",
190
205
  "entry": "./dist/builtins/local-auth/index.js",
@@ -200,6 +215,7 @@
200
215
  },
201
216
  {
202
217
  "id": "platform-probe",
218
+ "category": "system",
203
219
  "name": "Platform Probe (Native)",
204
220
  "description": "Probes hardware and inference runtimes on the local node. Registers the `platform-probe` capability consumed by every inference addon on this node.",
205
221
  "entry": "./dist/builtins/platform-probe/index.js",
@@ -215,6 +231,7 @@
215
231
  },
216
232
  {
217
233
  "id": "local-network",
234
+ "category": "system",
218
235
  "name": "Local Network",
219
236
  "description": "Enumerates the hub's network interfaces, classifies them (LAN / Wi-Fi / Docker / VPN / loopback), and ranks connection-endpoints for SDK clients. Hub-only — agents are not directly addressable.",
220
237
  "entry": "./dist/builtins/local-network/index.js",
@@ -225,32 +242,9 @@
225
242
  }
226
243
  ]
227
244
  },
228
- {
229
- "id": "auth-orchestrator",
230
- "name": "Authentication Orchestrator",
231
- "description": "Hub-only singleton facade over the auth-provider collection. Surfaces a unified provider list to the admin UI's Authentication page and the login screen's provider picker.",
232
- "entry": "./dist/builtins/auth-orchestrator/index.js",
233
- "protected": true,
234
- "capabilities": [
235
- {
236
- "name": "authentication"
237
- }
238
- ]
239
- },
240
- {
241
- "id": "mesh-orchestrator",
242
- "name": "Mesh Orchestrator",
243
- "description": "Hub-only singleton facade over the mesh-network collection. Aggregates Tailscale / Headscale / ZeroTier providers for the admin UI's Mesh Networks page.",
244
- "entry": "./dist/builtins/mesh-orchestrator/index.js",
245
- "protected": true,
246
- "capabilities": [
247
- {
248
- "name": "mesh-orchestrator"
249
- }
250
- ]
251
- },
252
245
  {
253
246
  "id": "remote-access-orchestrator",
247
+ "category": "system",
254
248
  "name": "Remote Access Orchestrator",
255
249
  "description": "Hub-only singleton facade over the network-access collection (Cloudflare Tunnel, ngrok, …). Surfaces a unified provider list to the admin UI's Remote Access page.",
256
250
  "entry": "./dist/builtins/remote-access-orchestrator/index.js",
@@ -260,18 +254,6 @@
260
254
  "name": "remote-access"
261
255
  }
262
256
  ]
263
- },
264
- {
265
- "id": "turn-orchestrator",
266
- "name": "TURN Orchestrator",
267
- "description": "Hub-only singleton facade over the turn-provider collection. Aggregates ICE servers from all enabled TURN providers; consumed by the WebRTC layer at session creation.",
268
- "entry": "./dist/builtins/turn-orchestrator/index.js",
269
- "protected": true,
270
- "capabilities": [
271
- {
272
- "name": "turn-orchestrator"
273
- }
274
- ]
275
257
  }
276
258
  ]
277
259
  },
@@ -1,8 +0,0 @@
1
- import { BaseAddon, ProviderRegistration } from '@camstack/types';
2
- export declare class AuthOrchestratorAddon extends BaseAddon<Record<string, never>> {
3
- constructor();
4
- protected onInitialize(): Promise<ProviderRegistration[]>;
5
- private listProviders;
6
- }
7
- export default AuthOrchestratorAddon;
8
- //# sourceMappingURL=auth-orchestrator.addon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-orchestrator.addon.d.ts","sourceRoot":"","sources":["../../../src/builtins/auth-orchestrator/auth-orchestrator.addon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EACL,SAAS,EAIT,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAA;AA4BxB,qBAAa,qBAAsB,SAAQ,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;;cAKzD,YAAY,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;YAgBjD,aAAa;CAoC5B;AAED,eAAe,qBAAqB,CAAA"}
@@ -1,75 +0,0 @@
1
- Object.defineProperties(exports, {
2
- __esModule: { value: true },
3
- [Symbol.toStringTag]: { value: "Module" }
4
- });
5
- require("../../chunk-C13QxCFV.js");
6
- let _camstack_types = require("@camstack/types");
7
- //#region src/builtins/auth-orchestrator/auth-orchestrator.addon.ts
8
- /**
9
- * Authentication orchestrator — singleton facade over the
10
- * `auth-provider` collection. Mirrors the backup-orchestrator pattern:
11
- * UI consumers go through this builtin, which walks the
12
- * `auth-provider` collection registered by `local-auth` and any
13
- * additional `auth-*` addons (OIDC, SAML, LDAP, …) and returns a
14
- * curated view.
15
- *
16
- * The actual login flow still goes through `auth-provider`
17
- * collection methods (validateCredentials / getLoginUrl / …); this
18
- * cap exists so the admin UI's "Authentication" page and the login
19
- * screen's provider picker have ONE place to query instead of
20
- * walking the collection themselves.
21
- */
22
- var AuthOrchestratorAddon = class extends _camstack_types.BaseAddon {
23
- constructor() {
24
- super({});
25
- }
26
- async onInitialize() {
27
- const provider = {
28
- listProviders: async () => this.listProviders(),
29
- setProviderEnabled: async () => {
30
- return { success: true };
31
- }
32
- };
33
- this.ctx.logger.info("Authentication orchestrator initialized");
34
- return [{
35
- capability: _camstack_types.authenticationCapability,
36
- provider
37
- }];
38
- }
39
- async listProviders() {
40
- const entries = this.capabilities?.getCollectionEntries("auth-provider") ?? [];
41
- const out = [];
42
- for (const [addonId, raw] of entries) {
43
- if (raw?.instances && raw.instances.length > 0) {
44
- for (const inst of raw.instances) out.push({
45
- addonId: raw.addonId ?? addonId,
46
- instanceId: inst.instanceId,
47
- displayName: inst.displayName,
48
- ...inst.icon !== void 0 ? { icon: inst.icon } : {},
49
- hasRedirectFlow: inst.hasRedirectFlow,
50
- hasCredentialFlow: inst.hasCredentialFlow,
51
- ...inst.kind !== void 0 ? { kind: inst.kind } : {},
52
- ...inst.status !== void 0 ? { status: inst.status } : {},
53
- enabled: true
54
- });
55
- continue;
56
- }
57
- out.push({
58
- addonId: raw?.addonId ?? addonId,
59
- displayName: raw?.displayName ?? addonId,
60
- ...raw?.icon !== void 0 ? { icon: raw.icon } : {},
61
- hasRedirectFlow: raw?.hasRedirectFlow ?? false,
62
- hasCredentialFlow: raw?.hasCredentialFlow ?? addonId === "local-auth",
63
- ...raw?.kind !== void 0 ? { kind: raw.kind } : {},
64
- ...raw?.status !== void 0 ? { status: raw.status } : {},
65
- enabled: true
66
- });
67
- }
68
- return out;
69
- }
70
- };
71
- //#endregion
72
- exports.AuthOrchestratorAddon = AuthOrchestratorAddon;
73
- exports.default = AuthOrchestratorAddon;
74
-
75
- //# sourceMappingURL=auth-orchestrator.addon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-orchestrator.addon.js","names":[],"sources":["../../../src/builtins/auth-orchestrator/auth-orchestrator.addon.ts"],"sourcesContent":["/**\n * Authentication orchestrator — singleton facade over the\n * `auth-provider` collection. Mirrors the backup-orchestrator pattern:\n * UI consumers go through this builtin, which walks the\n * `auth-provider` collection registered by `local-auth` and any\n * additional `auth-*` addons (OIDC, SAML, LDAP, …) and returns a\n * curated view.\n *\n * The actual login flow still goes through `auth-provider`\n * collection methods (validateCredentials / getLoginUrl / …); this\n * cap exists so the admin UI's \"Authentication\" page and the login\n * screen's provider picker have ONE place to query instead of\n * walking the collection themselves.\n */\nimport {\n BaseAddon,\n authenticationCapability,\n type AuthProviderInfo,\n type IAuthenticationProvider,\n type ProviderRegistration,\n} from '@camstack/types'\n\ninterface AuthProviderRegistrationLike {\n readonly addonId?: string\n readonly displayName?: string\n readonly icon?: string\n readonly hasRedirectFlow?: boolean\n readonly hasCredentialFlow?: boolean\n readonly kind?: string\n readonly status?: string\n /**\n * Multi-instance fan-out. When set, the orchestrator emits ONE\n * AuthProviderInfo per entry instead of a single one for the\n * collection entry. Used by addons that host multiple logical IdPs\n * within a single install (the OIDC addon supports Google +\n * Microsoft + custom from one installation).\n */\n readonly instances?: ReadonlyArray<{\n readonly instanceId: string\n readonly displayName: string\n readonly icon?: string\n readonly hasRedirectFlow: boolean\n readonly hasCredentialFlow: boolean\n readonly kind?: string\n readonly status?: string\n }>\n}\n\nexport class AuthOrchestratorAddon extends BaseAddon<Record<string, never>> {\n constructor() {\n super({})\n }\n\n protected async onInitialize(): Promise<ProviderRegistration[]> {\n const provider: IAuthenticationProvider = {\n listProviders: async () => this.listProviders(),\n setProviderEnabled: async () => {\n // Persistence is per-addon today — operators toggle enabled\n // via the provider addon's own settings panel. The orchestrator\n // exposes the affordance for forward-compat (UI may move the\n // enabled toggle into the Authentication page later) but\n // currently no-ops the persistence side.\n return { success: true as const }\n },\n }\n this.ctx.logger.info('Authentication orchestrator initialized')\n return [{ capability: authenticationCapability, provider }]\n }\n\n private async listProviders(): Promise<readonly AuthProviderInfo[]> {\n const entries = this.capabilities?.getCollectionEntries<AuthProviderRegistrationLike>('auth-provider') ?? []\n const out: AuthProviderInfo[] = []\n for (const [addonId, raw] of entries) {\n // Multi-instance: emit one entry per declared instance, preserving\n // the parent `addonId` so the login URL keeps `/addon/<addonId>/...`\n // while adding the `instanceId` path segment downstream.\n if (raw?.instances && raw.instances.length > 0) {\n for (const inst of raw.instances) {\n out.push({\n addonId: raw.addonId ?? addonId,\n instanceId: inst.instanceId,\n displayName: inst.displayName,\n ...(inst.icon !== undefined ? { icon: inst.icon } : {}),\n hasRedirectFlow: inst.hasRedirectFlow,\n hasCredentialFlow: inst.hasCredentialFlow,\n ...(inst.kind !== undefined ? { kind: inst.kind } : {}),\n ...(inst.status !== undefined ? { status: inst.status } : {}),\n enabled: true,\n })\n }\n continue\n }\n out.push({\n addonId: raw?.addonId ?? addonId,\n displayName: raw?.displayName ?? addonId,\n ...(raw?.icon !== undefined ? { icon: raw.icon } : {}),\n hasRedirectFlow: raw?.hasRedirectFlow ?? false,\n hasCredentialFlow: raw?.hasCredentialFlow ?? (addonId === 'local-auth'),\n ...(raw?.kind !== undefined ? { kind: raw.kind } : {}),\n ...(raw?.status !== undefined ? { status: raw.status } : {}),\n enabled: true,\n })\n }\n return out\n }\n}\n\nexport default AuthOrchestratorAddon\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgDA,IAAa,wBAAb,cAA2C,gBAAA,UAAiC;CAC1E,cAAc;EACZ,MAAM,EAAE,CAAC;;CAGX,MAAgB,eAAgD;EAC9D,MAAM,WAAoC;GACxC,eAAe,YAAY,KAAK,eAAe;GAC/C,oBAAoB,YAAY;IAM9B,OAAO,EAAE,SAAS,MAAe;;GAEpC;EACD,KAAK,IAAI,OAAO,KAAK,0CAA0C;EAC/D,OAAO,CAAC;GAAE,YAAY,gBAAA;GAA0B;GAAU,CAAC;;CAG7D,MAAc,gBAAsD;EAClE,MAAM,UAAU,KAAK,cAAc,qBAAmD,gBAAgB,IAAI,EAAE;EAC5G,MAAM,MAA0B,EAAE;EAClC,KAAK,MAAM,CAAC,SAAS,QAAQ,SAAS;GAIpC,IAAI,KAAK,aAAa,IAAI,UAAU,SAAS,GAAG;IAC9C,KAAK,MAAM,QAAQ,IAAI,WACrB,IAAI,KAAK;KACP,SAAS,IAAI,WAAW;KACxB,YAAY,KAAK;KACjB,aAAa,KAAK;KAClB,GAAI,KAAK,SAAS,KAAA,IAAY,EAAE,MAAM,KAAK,MAAM,GAAG,EAAE;KACtD,iBAAiB,KAAK;KACtB,mBAAmB,KAAK;KACxB,GAAI,KAAK,SAAS,KAAA,IAAY,EAAE,MAAM,KAAK,MAAM,GAAG,EAAE;KACtD,GAAI,KAAK,WAAW,KAAA,IAAY,EAAE,QAAQ,KAAK,QAAQ,GAAG,EAAE;KAC5D,SAAS;KACV,CAAC;IAEJ;;GAEF,IAAI,KAAK;IACP,SAAS,KAAK,WAAW;IACzB,aAAa,KAAK,eAAe;IACjC,GAAI,KAAK,SAAS,KAAA,IAAY,EAAE,MAAM,IAAI,MAAM,GAAG,EAAE;IACrD,iBAAiB,KAAK,mBAAmB;IACzC,mBAAmB,KAAK,qBAAsB,YAAY;IAC1D,GAAI,KAAK,SAAS,KAAA,IAAY,EAAE,MAAM,IAAI,MAAM,GAAG,EAAE;IACrD,GAAI,KAAK,WAAW,KAAA,IAAY,EAAE,QAAQ,IAAI,QAAQ,GAAG,EAAE;IAC3D,SAAS;IACV,CAAC;;EAEJ,OAAO"}
@@ -1,69 +0,0 @@
1
- import { BaseAddon, authenticationCapability } from "@camstack/types";
2
- //#region src/builtins/auth-orchestrator/auth-orchestrator.addon.ts
3
- /**
4
- * Authentication orchestrator — singleton facade over the
5
- * `auth-provider` collection. Mirrors the backup-orchestrator pattern:
6
- * UI consumers go through this builtin, which walks the
7
- * `auth-provider` collection registered by `local-auth` and any
8
- * additional `auth-*` addons (OIDC, SAML, LDAP, …) and returns a
9
- * curated view.
10
- *
11
- * The actual login flow still goes through `auth-provider`
12
- * collection methods (validateCredentials / getLoginUrl / …); this
13
- * cap exists so the admin UI's "Authentication" page and the login
14
- * screen's provider picker have ONE place to query instead of
15
- * walking the collection themselves.
16
- */
17
- var AuthOrchestratorAddon = class extends BaseAddon {
18
- constructor() {
19
- super({});
20
- }
21
- async onInitialize() {
22
- const provider = {
23
- listProviders: async () => this.listProviders(),
24
- setProviderEnabled: async () => {
25
- return { success: true };
26
- }
27
- };
28
- this.ctx.logger.info("Authentication orchestrator initialized");
29
- return [{
30
- capability: authenticationCapability,
31
- provider
32
- }];
33
- }
34
- async listProviders() {
35
- const entries = this.capabilities?.getCollectionEntries("auth-provider") ?? [];
36
- const out = [];
37
- for (const [addonId, raw] of entries) {
38
- if (raw?.instances && raw.instances.length > 0) {
39
- for (const inst of raw.instances) out.push({
40
- addonId: raw.addonId ?? addonId,
41
- instanceId: inst.instanceId,
42
- displayName: inst.displayName,
43
- ...inst.icon !== void 0 ? { icon: inst.icon } : {},
44
- hasRedirectFlow: inst.hasRedirectFlow,
45
- hasCredentialFlow: inst.hasCredentialFlow,
46
- ...inst.kind !== void 0 ? { kind: inst.kind } : {},
47
- ...inst.status !== void 0 ? { status: inst.status } : {},
48
- enabled: true
49
- });
50
- continue;
51
- }
52
- out.push({
53
- addonId: raw?.addonId ?? addonId,
54
- displayName: raw?.displayName ?? addonId,
55
- ...raw?.icon !== void 0 ? { icon: raw.icon } : {},
56
- hasRedirectFlow: raw?.hasRedirectFlow ?? false,
57
- hasCredentialFlow: raw?.hasCredentialFlow ?? addonId === "local-auth",
58
- ...raw?.kind !== void 0 ? { kind: raw.kind } : {},
59
- ...raw?.status !== void 0 ? { status: raw.status } : {},
60
- enabled: true
61
- });
62
- }
63
- return out;
64
- }
65
- };
66
- //#endregion
67
- export { AuthOrchestratorAddon, AuthOrchestratorAddon as default };
68
-
69
- //# sourceMappingURL=auth-orchestrator.addon.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-orchestrator.addon.mjs","names":[],"sources":["../../../src/builtins/auth-orchestrator/auth-orchestrator.addon.ts"],"sourcesContent":["/**\n * Authentication orchestrator — singleton facade over the\n * `auth-provider` collection. Mirrors the backup-orchestrator pattern:\n * UI consumers go through this builtin, which walks the\n * `auth-provider` collection registered by `local-auth` and any\n * additional `auth-*` addons (OIDC, SAML, LDAP, …) and returns a\n * curated view.\n *\n * The actual login flow still goes through `auth-provider`\n * collection methods (validateCredentials / getLoginUrl / …); this\n * cap exists so the admin UI's \"Authentication\" page and the login\n * screen's provider picker have ONE place to query instead of\n * walking the collection themselves.\n */\nimport {\n BaseAddon,\n authenticationCapability,\n type AuthProviderInfo,\n type IAuthenticationProvider,\n type ProviderRegistration,\n} from '@camstack/types'\n\ninterface AuthProviderRegistrationLike {\n readonly addonId?: string\n readonly displayName?: string\n readonly icon?: string\n readonly hasRedirectFlow?: boolean\n readonly hasCredentialFlow?: boolean\n readonly kind?: string\n readonly status?: string\n /**\n * Multi-instance fan-out. When set, the orchestrator emits ONE\n * AuthProviderInfo per entry instead of a single one for the\n * collection entry. Used by addons that host multiple logical IdPs\n * within a single install (the OIDC addon supports Google +\n * Microsoft + custom from one installation).\n */\n readonly instances?: ReadonlyArray<{\n readonly instanceId: string\n readonly displayName: string\n readonly icon?: string\n readonly hasRedirectFlow: boolean\n readonly hasCredentialFlow: boolean\n readonly kind?: string\n readonly status?: string\n }>\n}\n\nexport class AuthOrchestratorAddon extends BaseAddon<Record<string, never>> {\n constructor() {\n super({})\n }\n\n protected async onInitialize(): Promise<ProviderRegistration[]> {\n const provider: IAuthenticationProvider = {\n listProviders: async () => this.listProviders(),\n setProviderEnabled: async () => {\n // Persistence is per-addon today — operators toggle enabled\n // via the provider addon's own settings panel. The orchestrator\n // exposes the affordance for forward-compat (UI may move the\n // enabled toggle into the Authentication page later) but\n // currently no-ops the persistence side.\n return { success: true as const }\n },\n }\n this.ctx.logger.info('Authentication orchestrator initialized')\n return [{ capability: authenticationCapability, provider }]\n }\n\n private async listProviders(): Promise<readonly AuthProviderInfo[]> {\n const entries = this.capabilities?.getCollectionEntries<AuthProviderRegistrationLike>('auth-provider') ?? []\n const out: AuthProviderInfo[] = []\n for (const [addonId, raw] of entries) {\n // Multi-instance: emit one entry per declared instance, preserving\n // the parent `addonId` so the login URL keeps `/addon/<addonId>/...`\n // while adding the `instanceId` path segment downstream.\n if (raw?.instances && raw.instances.length > 0) {\n for (const inst of raw.instances) {\n out.push({\n addonId: raw.addonId ?? addonId,\n instanceId: inst.instanceId,\n displayName: inst.displayName,\n ...(inst.icon !== undefined ? { icon: inst.icon } : {}),\n hasRedirectFlow: inst.hasRedirectFlow,\n hasCredentialFlow: inst.hasCredentialFlow,\n ...(inst.kind !== undefined ? { kind: inst.kind } : {}),\n ...(inst.status !== undefined ? { status: inst.status } : {}),\n enabled: true,\n })\n }\n continue\n }\n out.push({\n addonId: raw?.addonId ?? addonId,\n displayName: raw?.displayName ?? addonId,\n ...(raw?.icon !== undefined ? { icon: raw.icon } : {}),\n hasRedirectFlow: raw?.hasRedirectFlow ?? false,\n hasCredentialFlow: raw?.hasCredentialFlow ?? (addonId === 'local-auth'),\n ...(raw?.kind !== undefined ? { kind: raw.kind } : {}),\n ...(raw?.status !== undefined ? { status: raw.status } : {}),\n enabled: true,\n })\n }\n return out\n }\n}\n\nexport default AuthOrchestratorAddon\n"],"mappings":";;;;;;;;;;;;;;;;AAgDA,IAAa,wBAAb,cAA2C,UAAiC;CAC1E,cAAc;EACZ,MAAM,EAAE,CAAC;;CAGX,MAAgB,eAAgD;EAC9D,MAAM,WAAoC;GACxC,eAAe,YAAY,KAAK,eAAe;GAC/C,oBAAoB,YAAY;IAM9B,OAAO,EAAE,SAAS,MAAe;;GAEpC;EACD,KAAK,IAAI,OAAO,KAAK,0CAA0C;EAC/D,OAAO,CAAC;GAAE,YAAY;GAA0B;GAAU,CAAC;;CAG7D,MAAc,gBAAsD;EAClE,MAAM,UAAU,KAAK,cAAc,qBAAmD,gBAAgB,IAAI,EAAE;EAC5G,MAAM,MAA0B,EAAE;EAClC,KAAK,MAAM,CAAC,SAAS,QAAQ,SAAS;GAIpC,IAAI,KAAK,aAAa,IAAI,UAAU,SAAS,GAAG;IAC9C,KAAK,MAAM,QAAQ,IAAI,WACrB,IAAI,KAAK;KACP,SAAS,IAAI,WAAW;KACxB,YAAY,KAAK;KACjB,aAAa,KAAK;KAClB,GAAI,KAAK,SAAS,KAAA,IAAY,EAAE,MAAM,KAAK,MAAM,GAAG,EAAE;KACtD,iBAAiB,KAAK;KACtB,mBAAmB,KAAK;KACxB,GAAI,KAAK,SAAS,KAAA,IAAY,EAAE,MAAM,KAAK,MAAM,GAAG,EAAE;KACtD,GAAI,KAAK,WAAW,KAAA,IAAY,EAAE,QAAQ,KAAK,QAAQ,GAAG,EAAE;KAC5D,SAAS;KACV,CAAC;IAEJ;;GAEF,IAAI,KAAK;IACP,SAAS,KAAK,WAAW;IACzB,aAAa,KAAK,eAAe;IACjC,GAAI,KAAK,SAAS,KAAA,IAAY,EAAE,MAAM,IAAI,MAAM,GAAG,EAAE;IACrD,iBAAiB,KAAK,mBAAmB;IACzC,mBAAmB,KAAK,qBAAsB,YAAY;IAC1D,GAAI,KAAK,SAAS,KAAA,IAAY,EAAE,MAAM,IAAI,MAAM,GAAG,EAAE;IACrD,GAAI,KAAK,WAAW,KAAA,IAAY,EAAE,QAAQ,IAAI,QAAQ,GAAG,EAAE;IAC3D,SAAS;IACV,CAAC;;EAEJ,OAAO"}
@@ -1,2 +0,0 @@
1
- export { AuthOrchestratorAddon, default } from './auth-orchestrator.addon.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/builtins/auth-orchestrator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA"}
@@ -1,7 +0,0 @@
1
- Object.defineProperties(exports, {
2
- __esModule: { value: true },
3
- [Symbol.toStringTag]: { value: "Module" }
4
- });
5
- const require_builtins_auth_orchestrator_auth_orchestrator_addon = require("./auth-orchestrator.addon.js");
6
- exports.AuthOrchestratorAddon = require_builtins_auth_orchestrator_auth_orchestrator_addon.AuthOrchestratorAddon;
7
- exports.default = require_builtins_auth_orchestrator_auth_orchestrator_addon.AuthOrchestratorAddon;
@@ -1,2 +0,0 @@
1
- import { AuthOrchestratorAddon } from "./auth-orchestrator.addon.mjs";
2
- export { AuthOrchestratorAddon, AuthOrchestratorAddon as default };
@@ -1,2 +0,0 @@
1
- export { MeshOrchestratorAddon, default } from './mesh-orchestrator.addon.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/builtins/mesh-orchestrator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA"}
@@ -1,7 +0,0 @@
1
- Object.defineProperties(exports, {
2
- __esModule: { value: true },
3
- [Symbol.toStringTag]: { value: "Module" }
4
- });
5
- const require_builtins_mesh_orchestrator_mesh_orchestrator_addon = require("./mesh-orchestrator.addon.js");
6
- exports.MeshOrchestratorAddon = require_builtins_mesh_orchestrator_mesh_orchestrator_addon.MeshOrchestratorAddon;
7
- exports.default = require_builtins_mesh_orchestrator_mesh_orchestrator_addon.MeshOrchestratorAddon;
@@ -1,2 +0,0 @@
1
- import { MeshOrchestratorAddon } from "./mesh-orchestrator.addon.mjs";
2
- export { MeshOrchestratorAddon, MeshOrchestratorAddon as default };
@@ -1,9 +0,0 @@
1
- import { BaseAddon, ProviderRegistration } from '@camstack/types';
2
- export declare class MeshOrchestratorAddon extends BaseAddon<Record<string, never>> {
3
- constructor();
4
- protected onInitialize(): Promise<ProviderRegistration[]>;
5
- private resolveImpl;
6
- private listProviders;
7
- }
8
- export default MeshOrchestratorAddon;
9
- //# sourceMappingURL=mesh-orchestrator.addon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mesh-orchestrator.addon.d.ts","sourceRoot":"","sources":["../../../src/builtins/mesh-orchestrator/mesh-orchestrator.addon.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,SAAS,EAKT,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAA;AAqCxB,qBAAa,qBAAsB,SAAQ,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;;cAKzD,YAAY,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAsC/D,OAAO,CAAC,WAAW;YAML,aAAa;CAqD5B;AAED,eAAe,qBAAqB,CAAA"}
@@ -1,113 +0,0 @@
1
- Object.defineProperties(exports, {
2
- __esModule: { value: true },
3
- [Symbol.toStringTag]: { value: "Module" }
4
- });
5
- require("../../chunk-C13QxCFV.js");
6
- let _camstack_types = require("@camstack/types");
7
- //#region src/builtins/mesh-orchestrator/mesh-orchestrator.addon.ts
8
- /**
9
- * Mesh orchestrator — singleton facade over the `mesh-network`
10
- * collection. One row per provider (Tailscale, Headscale, ZeroTier),
11
- * aggregated for the admin UI's Mesh Networks page.
12
- */
13
- var MeshOrchestratorAddon = class extends _camstack_types.BaseAddon {
14
- constructor() {
15
- super({});
16
- }
17
- async onInitialize() {
18
- const provider = {
19
- listProviders: async () => this.listProviders(),
20
- joinProvider: async ({ addonId, authKey, hostname }) => {
21
- const impl = this.resolveImpl(addonId);
22
- if (!impl?.join) throw new Error(`Mesh provider "${addonId}" does not support join`);
23
- return await impl.join({
24
- authKey,
25
- ...hostname ? { hostname } : {}
26
- });
27
- },
28
- leaveProvider: async ({ addonId }) => {
29
- const impl = this.resolveImpl(addonId);
30
- if (impl?.leave) await impl.leave();
31
- return { success: true };
32
- },
33
- startLoginProvider: async ({ addonId, hostname }) => {
34
- const impl = this.resolveImpl(addonId);
35
- if (!impl?.startLogin) throw new Error(`Mesh provider "${addonId}" does not support startLogin`);
36
- return await impl.startLogin(hostname ? { hostname } : {});
37
- },
38
- logoutProvider: async ({ addonId }) => {
39
- const impl = this.resolveImpl(addonId);
40
- if (!impl?.logout) throw new Error(`Mesh provider "${addonId}" does not support logout`);
41
- await impl.logout();
42
- return { loggedOut: true };
43
- },
44
- listProviderPeers: async ({ addonId }) => {
45
- const impl = this.resolveImpl(addonId);
46
- if (!impl?.listPeers) return { peers: [] };
47
- return await impl.listPeers();
48
- }
49
- };
50
- this.ctx.logger.info("Mesh orchestrator initialized");
51
- return [{
52
- capability: _camstack_types.meshOrchestratorCapability,
53
- provider
54
- }];
55
- }
56
- resolveImpl(addonId) {
57
- return (this.capabilities?.getCollectionEntries("mesh-network") ?? []).find(([id]) => id === addonId)?.[1] ?? null;
58
- }
59
- async listProviders() {
60
- const entries = this.capabilities?.getCollectionEntries("mesh-network") ?? [];
61
- const out = [];
62
- for (const [addonId, impl] of entries) {
63
- let joined = false;
64
- let meshIp = "";
65
- let magicDnsHostname = "";
66
- let peerCount = 0;
67
- let endpoints = [];
68
- let error;
69
- let tenantName = "";
70
- let magicDnsSuffix = "";
71
- let userLogin = null;
72
- let controlPlaneUrl = "";
73
- let keyExpiry = null;
74
- if (impl.getStatus) try {
75
- const s = await impl.getStatus();
76
- joined = s.joined;
77
- meshIp = s.meshIp;
78
- magicDnsHostname = s.magicDnsHostname;
79
- peerCount = s.peerCount;
80
- endpoints = s.endpoints;
81
- error = s.error;
82
- tenantName = s.tenantName;
83
- magicDnsSuffix = s.magicDnsSuffix;
84
- userLogin = s.userLogin;
85
- controlPlaneUrl = s.controlPlaneUrl;
86
- keyExpiry = s.keyExpiry;
87
- } catch (err) {
88
- error = err instanceof Error ? err.message : String(err);
89
- }
90
- out.push({
91
- addonId,
92
- displayName: impl.displayName ?? addonId,
93
- joined,
94
- meshIp,
95
- magicDnsHostname,
96
- peerCount,
97
- endpoints,
98
- ...error !== void 0 ? { error } : {},
99
- tenantName,
100
- magicDnsSuffix,
101
- userLogin,
102
- controlPlaneUrl,
103
- keyExpiry
104
- });
105
- }
106
- return out;
107
- }
108
- };
109
- //#endregion
110
- exports.MeshOrchestratorAddon = MeshOrchestratorAddon;
111
- exports.default = MeshOrchestratorAddon;
112
-
113
- //# sourceMappingURL=mesh-orchestrator.addon.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mesh-orchestrator.addon.js","names":[],"sources":["../../../src/builtins/mesh-orchestrator/mesh-orchestrator.addon.ts"],"sourcesContent":["/**\n * Mesh orchestrator — singleton facade over the `mesh-network`\n * collection. One row per provider (Tailscale, Headscale, ZeroTier),\n * aggregated for the admin UI's Mesh Networks page.\n */\nimport {\n BaseAddon,\n meshOrchestratorCapability,\n type IMeshOrchestrator,\n type MeshPeer,\n type MeshProviderInfo,\n type ProviderRegistration,\n} from '@camstack/types'\n\ninterface MeshStatusLike {\n joined: boolean\n meshIp: string\n magicDnsHostname: string\n peerCount: number\n endpoints: readonly {\n id: string\n label: string\n scope: 'mesh' | 'public'\n url: string\n hostname: string\n port: number\n protocol: 'http' | 'https'\n }[]\n error?: string\n tenantName: string\n magicDnsSuffix: string\n userLogin: string | null\n controlPlaneUrl: string\n keyExpiry: number | null\n}\n\ninterface MeshNetworkLike {\n getStatus?: () => Promise<MeshStatusLike>\n join?: (input: { authKey: string; hostname?: string }) => Promise<{ joined: true }>\n startLogin?: (input: { hostname?: string }) => Promise<{ loginUrl: string }>\n leave?: () => Promise<{ left: true }>\n logout?: () => Promise<{ loggedOut: true }>\n listPeers?: () => Promise<{ peers: readonly MeshPeer[] }>\n}\n\ninterface MeshRegistrationMeta {\n readonly displayName?: string\n}\n\nexport class MeshOrchestratorAddon extends BaseAddon<Record<string, never>> {\n constructor() {\n super({})\n }\n\n protected async onInitialize(): Promise<ProviderRegistration[]> {\n const provider: IMeshOrchestrator = {\n listProviders: async () => this.listProviders(),\n joinProvider: async ({ addonId, authKey, hostname }) => {\n const impl = this.resolveImpl(addonId)\n if (!impl?.join) throw new Error(`Mesh provider \"${addonId}\" does not support join`)\n return await impl.join({ authKey, ...(hostname ? { hostname } : {}) })\n },\n leaveProvider: async ({ addonId }) => {\n const impl = this.resolveImpl(addonId)\n if (impl?.leave) await impl.leave()\n return { success: true as const }\n },\n startLoginProvider: async ({ addonId, hostname }) => {\n const impl = this.resolveImpl(addonId)\n if (!impl?.startLogin) {\n throw new Error(`Mesh provider \"${addonId}\" does not support startLogin`)\n }\n return await impl.startLogin(hostname ? { hostname } : {})\n },\n logoutProvider: async ({ addonId }) => {\n const impl = this.resolveImpl(addonId)\n if (!impl?.logout) {\n throw new Error(`Mesh provider \"${addonId}\" does not support logout`)\n }\n await impl.logout()\n return { loggedOut: true as const }\n },\n listProviderPeers: async ({ addonId }) => {\n const impl = this.resolveImpl(addonId)\n if (!impl?.listPeers) return { peers: [] }\n return await impl.listPeers()\n },\n }\n this.ctx.logger.info('Mesh orchestrator initialized')\n return [{ capability: meshOrchestratorCapability, provider }]\n }\n\n private resolveImpl(addonId: string): MeshNetworkLike | null {\n const entries = this.capabilities?.getCollectionEntries<MeshNetworkLike>('mesh-network') ?? []\n const found = entries.find(([id]) => id === addonId)\n return found?.[1] ?? null\n }\n\n private async listProviders(): Promise<readonly MeshProviderInfo[]> {\n const entries = this.capabilities?.getCollectionEntries<MeshNetworkLike & MeshRegistrationMeta>(\n 'mesh-network',\n ) ?? []\n const out: MeshProviderInfo[] = []\n for (const [addonId, impl] of entries) {\n let joined = false\n let meshIp = ''\n let magicDnsHostname = ''\n let peerCount = 0\n let endpoints: MeshProviderInfo['endpoints'] = []\n let error: string | undefined\n let tenantName = ''\n let magicDnsSuffix = ''\n let userLogin: string | null = null\n let controlPlaneUrl = ''\n let keyExpiry: number | null = null\n if (impl.getStatus) {\n try {\n const s = await impl.getStatus()\n joined = s.joined\n meshIp = s.meshIp\n magicDnsHostname = s.magicDnsHostname\n peerCount = s.peerCount\n endpoints = s.endpoints\n error = s.error\n tenantName = s.tenantName\n magicDnsSuffix = s.magicDnsSuffix\n userLogin = s.userLogin\n controlPlaneUrl = s.controlPlaneUrl\n keyExpiry = s.keyExpiry\n } catch (err) {\n error = err instanceof Error ? err.message : String(err)\n }\n }\n out.push({\n addonId,\n displayName: impl.displayName ?? addonId,\n joined,\n meshIp,\n magicDnsHostname,\n peerCount,\n endpoints,\n ...(error !== undefined ? { error } : {}),\n tenantName,\n magicDnsSuffix,\n userLogin,\n controlPlaneUrl,\n keyExpiry,\n })\n }\n return out\n }\n}\n\nexport default MeshOrchestratorAddon\n"],"mappings":";;;;;;;;;;;;AAiDA,IAAa,wBAAb,cAA2C,gBAAA,UAAiC;CAC1E,cAAc;EACZ,MAAM,EAAE,CAAC;;CAGX,MAAgB,eAAgD;EAC9D,MAAM,WAA8B;GAClC,eAAe,YAAY,KAAK,eAAe;GAC/C,cAAc,OAAO,EAAE,SAAS,SAAS,eAAe;IACtD,MAAM,OAAO,KAAK,YAAY,QAAQ;IACtC,IAAI,CAAC,MAAM,MAAM,MAAM,IAAI,MAAM,kBAAkB,QAAQ,yBAAyB;IACpF,OAAO,MAAM,KAAK,KAAK;KAAE;KAAS,GAAI,WAAW,EAAE,UAAU,GAAG,EAAE;KAAG,CAAC;;GAExE,eAAe,OAAO,EAAE,cAAc;IACpC,MAAM,OAAO,KAAK,YAAY,QAAQ;IACtC,IAAI,MAAM,OAAO,MAAM,KAAK,OAAO;IACnC,OAAO,EAAE,SAAS,MAAe;;GAEnC,oBAAoB,OAAO,EAAE,SAAS,eAAe;IACnD,MAAM,OAAO,KAAK,YAAY,QAAQ;IACtC,IAAI,CAAC,MAAM,YACT,MAAM,IAAI,MAAM,kBAAkB,QAAQ,+BAA+B;IAE3E,OAAO,MAAM,KAAK,WAAW,WAAW,EAAE,UAAU,GAAG,EAAE,CAAC;;GAE5D,gBAAgB,OAAO,EAAE,cAAc;IACrC,MAAM,OAAO,KAAK,YAAY,QAAQ;IACtC,IAAI,CAAC,MAAM,QACT,MAAM,IAAI,MAAM,kBAAkB,QAAQ,2BAA2B;IAEvE,MAAM,KAAK,QAAQ;IACnB,OAAO,EAAE,WAAW,MAAe;;GAErC,mBAAmB,OAAO,EAAE,cAAc;IACxC,MAAM,OAAO,KAAK,YAAY,QAAQ;IACtC,IAAI,CAAC,MAAM,WAAW,OAAO,EAAE,OAAO,EAAE,EAAE;IAC1C,OAAO,MAAM,KAAK,WAAW;;GAEhC;EACD,KAAK,IAAI,OAAO,KAAK,gCAAgC;EACrD,OAAO,CAAC;GAAE,YAAY,gBAAA;GAA4B;GAAU,CAAC;;CAG/D,YAAoB,SAAyC;EAG3D,QAFgB,KAAK,cAAc,qBAAsC,eAAe,IAAI,EAAE,EACxE,MAAM,CAAC,QAAQ,OAAO,QACrC,GAAQ,MAAM;;CAGvB,MAAc,gBAAsD;EAClE,MAAM,UAAU,KAAK,cAAc,qBACjC,eACD,IAAI,EAAE;EACP,MAAM,MAA0B,EAAE;EAClC,KAAK,MAAM,CAAC,SAAS,SAAS,SAAS;GACrC,IAAI,SAAS;GACb,IAAI,SAAS;GACb,IAAI,mBAAmB;GACvB,IAAI,YAAY;GAChB,IAAI,YAA2C,EAAE;GACjD,IAAI;GACJ,IAAI,aAAa;GACjB,IAAI,iBAAiB;GACrB,IAAI,YAA2B;GAC/B,IAAI,kBAAkB;GACtB,IAAI,YAA2B;GAC/B,IAAI,KAAK,WACP,IAAI;IACF,MAAM,IAAI,MAAM,KAAK,WAAW;IAChC,SAAS,EAAE;IACX,SAAS,EAAE;IACX,mBAAmB,EAAE;IACrB,YAAY,EAAE;IACd,YAAY,EAAE;IACd,QAAQ,EAAE;IACV,aAAa,EAAE;IACf,iBAAiB,EAAE;IACnB,YAAY,EAAE;IACd,kBAAkB,EAAE;IACpB,YAAY,EAAE;YACP,KAAK;IACZ,QAAQ,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI;;GAG5D,IAAI,KAAK;IACP;IACA,aAAa,KAAK,eAAe;IACjC;IACA;IACA;IACA;IACA;IACA,GAAI,UAAU,KAAA,IAAY,EAAE,OAAO,GAAG,EAAE;IACxC;IACA;IACA;IACA;IACA;IACD,CAAC;;EAEJ,OAAO"}