@crvouga/mockingbird-service-livekit 1.6.0 → 1.7.0

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/CHANGELOG.md CHANGED
@@ -1,6 +1,24 @@
1
1
  # Changelog — @crvouga/mockingbird-service-livekit
2
2
 
3
- ## 1.6.0 (2026-09-30)
3
+ ## 1.7.0 (2026-10-01)
4
+
5
+ ### Features
6
+
7
+ - record SQL timelines and serve the admin explorer ([8ced17a](https://github.com/crvouga/mockingbird/commit/8ced17ac398e386ef4e9d7e01fc7744c34b95d07))
8
+
9
+ ### Dependencies
10
+
11
+ - `@crvouga/mockingbird-service-sqlite`
12
+
13
+ ## 1.6.1 (2026-09-30)
14
+
15
+ ### Fixes and improvements
16
+
17
+ - keep admin buttons pressed until the action finishes ([0aabfcb](https://github.com/crvouga/mockingbird/commit/0aabfcb5f392aa51e193f9c3f817d5877d92bc6a))
18
+ - size admin select fields like the text inputs beside them ([0fb3ef2](https://github.com/crvouga/mockingbird/commit/0fb3ef2ddbf43376c93a2ae6d87c6c9bf890dafc))
19
+ - keep admin section tabs wired when boot is renamed ([4eda25e](https://github.com/crvouga/mockingbird/commit/4eda25eacd59da048d196f7cc8369d7a02b47bfc))
20
+
21
+ ## 1.6.0 (2026-09-29)
4
22
 
5
23
  ### Features
6
24
 
@@ -1492,6 +1492,167 @@ function faultPresetList(value) {
1492
1492
  })
1493
1493
  };
1494
1494
  }
1495
+ function mountSqlExplorer(root, api) {
1496
+ const cell = (value) => {
1497
+ if (value === null || value === void 0)
1498
+ return "";
1499
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
1500
+ return String(value);
1501
+ }
1502
+ return JSON.stringify(value) ?? "";
1503
+ };
1504
+ root.replaceChildren();
1505
+ const layout = document.createElement("div");
1506
+ layout.className = "sql-layout";
1507
+ const tables = document.createElement("div");
1508
+ tables.className = "sql-tables";
1509
+ const stack = document.createElement("div");
1510
+ stack.className = "stack";
1511
+ const banner = document.createElement("p");
1512
+ banner.className = "banner";
1513
+ const grid = document.createElement("div");
1514
+ const input = document.createElement("textarea");
1515
+ input.className = "sql-input";
1516
+ input.spellcheck = false;
1517
+ input.placeholder = "SELECT * FROM ...";
1518
+ const actions = document.createElement("div");
1519
+ actions.className = "row-actions";
1520
+ const run = document.createElement("button");
1521
+ run.type = "button";
1522
+ run.textContent = "Run";
1523
+ actions.append(run);
1524
+ const result = document.createElement("pre");
1525
+ stack.append(banner, grid, input, actions, result);
1526
+ layout.append(tables, stack);
1527
+ root.append(layout);
1528
+ const showError = (error2) => {
1529
+ banner.textContent = error2 instanceof Error ? error2.message : String(error2);
1530
+ banner.classList.add("show");
1531
+ };
1532
+ const clearError = () => {
1533
+ banner.textContent = "";
1534
+ banner.classList.remove("show");
1535
+ };
1536
+ const renderGrid = (columns, rows) => {
1537
+ grid.replaceChildren();
1538
+ if (columns.length === 0) {
1539
+ const empty = document.createElement("p");
1540
+ empty.className = "empty";
1541
+ empty.textContent = "No rows.";
1542
+ grid.append(empty);
1543
+ return;
1544
+ }
1545
+ const table = document.createElement("table");
1546
+ const head = document.createElement("thead");
1547
+ const headRow = document.createElement("tr");
1548
+ for (const column of columns) {
1549
+ const th = document.createElement("th");
1550
+ th.textContent = column;
1551
+ headRow.append(th);
1552
+ }
1553
+ head.append(headRow);
1554
+ const body = document.createElement("tbody");
1555
+ for (const row of rows) {
1556
+ const tr = document.createElement("tr");
1557
+ for (const column of columns) {
1558
+ const td = document.createElement("td");
1559
+ td.dataset.label = column;
1560
+ td.textContent = cell(row[column]);
1561
+ tr.append(td);
1562
+ }
1563
+ body.append(tr);
1564
+ }
1565
+ table.append(head, body);
1566
+ grid.append(table);
1567
+ };
1568
+ const rowsOf = (value) => {
1569
+ if (!isRecord2(value) || !Array.isArray(value.rows))
1570
+ return [];
1571
+ return value.rows.flatMap((row) => isRecord2(row) ? [row] : []);
1572
+ };
1573
+ const columnsOf = (value, rows) => {
1574
+ if (isRecord2(value) && Array.isArray(value.columns)) {
1575
+ const named = value.columns.flatMap((column) => typeof column === "string" ? [column] : []);
1576
+ if (named.length > 0)
1577
+ return named;
1578
+ }
1579
+ const first = rows[0];
1580
+ return first === void 0 ? [] : Object.keys(first);
1581
+ };
1582
+ let selected = "";
1583
+ const loadPage = async (schema, name) => {
1584
+ selected = `${schema}.${name}`;
1585
+ const page = await api.get(`/sql/tables/${encodeURIComponent(schema)}/${encodeURIComponent(name)}?limit=50`);
1586
+ const rows = rowsOf(page);
1587
+ renderGrid(columnsOf(page, rows), rows);
1588
+ const total = isRecord2(page) && typeof page.total === "number" ? page.total : rows.length;
1589
+ result.textContent = `${selected} \xB7 ${total} rows`;
1590
+ for (const button of tables.querySelectorAll("button")) {
1591
+ if (!(button instanceof HTMLButtonElement))
1592
+ continue;
1593
+ button.setAttribute("aria-current", button.dataset.schema === schema && button.dataset.table === name ? "true" : "false");
1594
+ }
1595
+ };
1596
+ const loadTables = async () => {
1597
+ const payload = await api.get("/sql/tables");
1598
+ const listed = isRecord2(payload) && Array.isArray(payload.tables) ? payload.tables : [];
1599
+ tables.replaceChildren();
1600
+ if (listed.length === 0) {
1601
+ const empty = document.createElement("p");
1602
+ empty.className = "empty";
1603
+ empty.textContent = "No tables.";
1604
+ tables.append(empty);
1605
+ return;
1606
+ }
1607
+ for (const item of listed) {
1608
+ if (!isRecord2(item) || typeof item.schema !== "string" || typeof item.name !== "string")
1609
+ continue;
1610
+ const button = document.createElement("button");
1611
+ button.type = "button";
1612
+ button.dataset.schema = item.schema;
1613
+ button.dataset.table = item.name;
1614
+ button.textContent = `${item.schema}.${item.name}`;
1615
+ tables.append(button);
1616
+ }
1617
+ };
1618
+ tables.addEventListener("click", (event) => {
1619
+ const target = event.target;
1620
+ if (!(target instanceof Element))
1621
+ return;
1622
+ const button = target.closest("button");
1623
+ if (!(button instanceof HTMLButtonElement))
1624
+ return;
1625
+ const schema = button.dataset.schema;
1626
+ const name = button.dataset.table;
1627
+ if (schema === void 0 || name === void 0)
1628
+ return;
1629
+ clearError();
1630
+ loadPage(schema, name).catch(showError);
1631
+ });
1632
+ run.addEventListener("click", () => {
1633
+ const sql = input.value.trim();
1634
+ if (sql === "") {
1635
+ showError(new Error("Enter a statement"));
1636
+ return;
1637
+ }
1638
+ clearError();
1639
+ api.send("POST", "/sql/query", { sql }).then((payload) => {
1640
+ const rows = rowsOf(payload);
1641
+ renderGrid(columnsOf(payload, rows), rows);
1642
+ const count = isRecord2(payload) && typeof payload.rowCount === "number" ? payload.rowCount : rows.length;
1643
+ const truncated = isRecord2(payload) && payload.truncated === true ? " (truncated)" : "";
1644
+ result.textContent = `${count} rows${truncated}`;
1645
+ }).catch(showError);
1646
+ });
1647
+ const namespace = document.getElementById("namespace");
1648
+ if (namespace) {
1649
+ namespace.addEventListener("change", () => {
1650
+ clearError();
1651
+ loadTables().catch(showError);
1652
+ });
1653
+ }
1654
+ loadTables().catch(showError);
1655
+ }
1495
1656
  function bootAdmin(config) {
1496
1657
  const fieldKinds = ["string", "number", "boolean", "null", "object", "array", "unknown"];
1497
1658
  const sources = ["declared", "inferred", "mixed"];
@@ -1932,6 +2093,50 @@ function bootAdmin(config) {
1932
2093
  if (render)
1933
2094
  await render();
1934
2095
  }
2096
+ const delay = (ms) => new Promise((resolve) => {
2097
+ window.setTimeout(resolve, ms);
2098
+ });
2099
+ const confirmAction = async (button, pending, done, work) => {
2100
+ if (button.dataset.pending === "1")
2101
+ return;
2102
+ const label = button.textContent ?? "";
2103
+ const width = button.offsetWidth;
2104
+ button.dataset.pending = "1";
2105
+ button.classList.add("pressed");
2106
+ button.setAttribute("aria-busy", "true");
2107
+ button.style.minWidth = `${width}px`;
2108
+ button.textContent = pending;
2109
+ try {
2110
+ await work();
2111
+ button.textContent = done;
2112
+ await delay(1e3);
2113
+ } catch (error2) {
2114
+ showError(error2);
2115
+ } finally {
2116
+ button.textContent = label;
2117
+ button.style.minWidth = "";
2118
+ button.classList.remove("pressed");
2119
+ button.removeAttribute("aria-busy");
2120
+ delete button.dataset.pending;
2121
+ }
2122
+ };
2123
+ document.addEventListener("click", (event) => {
2124
+ const target = event.target;
2125
+ if (!(target instanceof Element))
2126
+ return;
2127
+ const button = target.closest("button");
2128
+ if (!(button instanceof HTMLButtonElement) || button.dataset.pending === "1")
2129
+ return;
2130
+ button.classList.add("pressed");
2131
+ const token = String(Date.now());
2132
+ button.dataset.press = token;
2133
+ window.setTimeout(() => {
2134
+ if (button.dataset.press !== token || button.dataset.pending === "1")
2135
+ return;
2136
+ button.classList.remove("pressed");
2137
+ delete button.dataset.press;
2138
+ }, 450);
2139
+ });
1935
2140
  el("namespace", HTMLSelectElement).addEventListener("change", () => {
1936
2141
  state.namespace = el("namespace", HTMLSelectElement).value;
1937
2142
  refresh().catch(showError);
@@ -1942,7 +2147,7 @@ function bootAdmin(config) {
1942
2147
  refresh().catch(showError);
1943
2148
  });
1944
2149
  el("refresh", HTMLButtonElement).addEventListener("click", () => {
1945
- refresh().catch(showError);
2150
+ confirmAction(el("refresh", HTMLButtonElement), "Refreshing...", "Updated", () => refresh()).catch(showError);
1946
2151
  });
1947
2152
  el("collections", HTMLElement).addEventListener("click", (event) => {
1948
2153
  const target = event.target;
@@ -2065,10 +2270,10 @@ function bootAdmin(config) {
2065
2270
  }).then(() => renderFaults()).catch(showError);
2066
2271
  });
2067
2272
  el("fault-clear", HTMLButtonElement).addEventListener("click", () => {
2068
- api("DELETE", "/faults").then(() => renderFaults()).catch(showError);
2273
+ confirmAction(el("fault-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/faults").then(() => renderFaults())).catch(showError);
2069
2274
  });
2070
2275
  el("journal-clear", HTMLButtonElement).addEventListener("click", () => {
2071
- api("DELETE", "/requests").then(() => renderJournal()).catch(showError);
2276
+ confirmAction(el("journal-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/requests").then(() => renderJournal())).catch(showError);
2072
2277
  });
2073
2278
  el("route-list", HTMLElement).addEventListener("click", (event) => {
2074
2279
  const target = event.target;
@@ -2124,6 +2329,22 @@ function bootAdmin(config) {
2124
2329
  panel.script = value.script;
2125
2330
  return panel;
2126
2331
  };
2332
+ const decodeExtension = (value) => {
2333
+ if (!isRecord2(value))
2334
+ return void 0;
2335
+ if (value.kind === "sql") {
2336
+ return {
2337
+ kind: "sql",
2338
+ id: typeof value.id === "string" && value.id !== "" ? value.id : "sql",
2339
+ title: typeof value.title === "string" && value.title !== "" ? value.title : "SQL",
2340
+ description: typeof value.description === "string" ? value.description : "Browse tables and run queries."
2341
+ };
2342
+ }
2343
+ if (value.kind !== "panel")
2344
+ return void 0;
2345
+ const panel = decodePanel(value);
2346
+ return panel === void 0 ? void 0 : { kind: "panel", ...panel };
2347
+ };
2127
2348
  const mountPanels = (panels) => {
2128
2349
  const nav = el("nav", HTMLElement);
2129
2350
  const views = el("views", HTMLElement);
@@ -2177,15 +2398,57 @@ function bootAdmin(config) {
2177
2398
  return decoded === void 0 ? [] : [decoded];
2178
2399
  });
2179
2400
  mountPanels(panels);
2401
+ const extensions = requireList(isRecord2(manifest) ? manifest.extensions : void 0, "Extensions").flatMap((extension) => {
2402
+ const decoded = decodeExtension(extension);
2403
+ return decoded === void 0 ? [] : [decoded];
2404
+ });
2405
+ const extensionPanels = extensions.flatMap((extension) => extension.kind === "panel" ? [extension] : []);
2406
+ mountPanels(extensionPanels);
2407
+ for (const extension of extensions) {
2408
+ if (extension.kind !== "sql")
2409
+ continue;
2410
+ const nav = el("nav", HTMLElement);
2411
+ const views = el("views", HTMLElement);
2412
+ const button = document.createElement("button");
2413
+ button.type = "button";
2414
+ button.dataset.view = extension.id;
2415
+ button.textContent = extension.title;
2416
+ nav.append(button);
2417
+ const section = document.createElement("section");
2418
+ section.className = "view";
2419
+ section.id = `view-${extension.id}`;
2420
+ section.hidden = true;
2421
+ const title = document.createElement("h2");
2422
+ title.textContent = extension.title;
2423
+ const lede = document.createElement("p");
2424
+ lede.className = "lede";
2425
+ lede.textContent = extension.description;
2426
+ const body = document.createElement("div");
2427
+ body.className = "panel-body";
2428
+ section.append(title, lede, body);
2429
+ views.append(section);
2430
+ mountSqlExplorer(body, panelApi);
2431
+ }
2180
2432
  return refresh();
2181
2433
  }).catch(showError);
2182
2434
  }
2183
- var clientPrelude = [isRecord2, mountAdminBrand, startAdminBrand, faultPresetList, bootAdmin].map((fn) => fn.toString()).join("\n");
2435
+ var clientPrelude = [
2436
+ isRecord2,
2437
+ mountAdminBrand,
2438
+ startAdminBrand,
2439
+ faultPresetList,
2440
+ mountSqlExplorer,
2441
+ bootAdmin
2442
+ ].map((fn) => fn.toString()).join("\n");
2184
2443
  var adminClientSource = (config) => {
2185
2444
  const payload = JSON.stringify(config).replace(/</g, "\\u003c");
2445
+ const entry = bootAdmin.name;
2446
+ if (!/^[A-Za-z_$][\w$]*$/.test(entry)) {
2447
+ throw new Error("admin client cannot call its boot function");
2448
+ }
2186
2449
  return `<script>
2187
2450
  ${clientPrelude}
2188
- bootAdmin(${payload});
2451
+ ${entry}(${payload});
2189
2452
  </script>`;
2190
2453
  };
2191
2454
 
@@ -2226,19 +2489,33 @@ var STANDARD_ADMIN_ROUTES = [
2226
2489
  "GET /ui/manifest"
2227
2490
  ];
2228
2491
  var PANEL_ID = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/;
2492
+ var RESERVED_VIEWS = /* @__PURE__ */ new Set(["overview", "state", "clock", "faults", "journal", "routes"]);
2493
+ var checkPanel = (panel, seen, label) => {
2494
+ if (!PANEL_ID.test(panel.id)) {
2495
+ throw new RangeError(`${label} id must match ${PANEL_ID}: ${JSON.stringify(panel.id)}`);
2496
+ }
2497
+ if (RESERVED_VIEWS.has(panel.id)) {
2498
+ throw new RangeError(`${label} id ${panel.id} is reserved by the admin shell`);
2499
+ }
2500
+ if (seen.has(panel.id))
2501
+ throw new RangeError(`duplicate admin view id ${panel.id}`);
2502
+ seen.add(panel.id);
2503
+ if (panel.title.trim() === "")
2504
+ throw new RangeError(`${label} ${panel.id} needs a title`);
2505
+ };
2229
2506
  var assertAdminUi = (ui) => {
2230
- if (!ui?.panels)
2507
+ if (!ui)
2231
2508
  return;
2232
2509
  const seen = /* @__PURE__ */ new Set();
2233
- for (const panel of ui.panels) {
2234
- if (!PANEL_ID.test(panel.id)) {
2235
- throw new RangeError(`admin panel id must match ${PANEL_ID}: ${JSON.stringify(panel.id)}`);
2510
+ for (const panel of ui.panels ?? [])
2511
+ checkPanel(panel, seen, "admin panel");
2512
+ for (const extension of ui.extensions ?? []) {
2513
+ if (extension.kind === "panel") {
2514
+ checkPanel(extension, seen, "admin extension");
2515
+ continue;
2236
2516
  }
2237
- if (seen.has(panel.id))
2238
- throw new RangeError(`duplicate admin panel id ${panel.id}`);
2239
- seen.add(panel.id);
2240
- if (panel.title.trim() === "")
2241
- throw new RangeError(`admin panel ${panel.id} needs a title`);
2517
+ const id = extension.id ?? "sql";
2518
+ checkPanel({ id, title: extension.title ?? "SQL" }, seen, "admin extension");
2242
2519
  }
2243
2520
  };
2244
2521
 
@@ -2399,9 +2676,24 @@ var renderAdminDocument = (service) => {
2399
2676
  .controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
2400
2677
  label.field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--faint); }
2401
2678
  label.field input, label.field select, .controls input[type="password"] {
2402
- background: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
2403
- padding: 7px 8px; min-height: 36px;
2404
- }
2679
+ background-color: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
2680
+ padding: 7px 8px; min-height: 36px; line-height: 1.2;
2681
+ }
2682
+ /* A native menu ignores min-height, so Preset rendered about half as tall as
2683
+ the text fields in the same form. Paint it like those fields. */
2684
+ label.field select {
2685
+ -webkit-appearance: none; appearance: none;
2686
+ padding-right: 28px;
2687
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2371717a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
2688
+ background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px;
2689
+ }
2690
+ .stack > .field > input,
2691
+ .stack > .field > select,
2692
+ .stack > .field > textarea,
2693
+ dialog .field > input,
2694
+ dialog .field > select,
2695
+ dialog .field > textarea { width: 100%; }
2696
+ .icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger, nav.side button { cursor: pointer; }
2405
2697
  .icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger {
2406
2698
  border-radius: 9px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line);
2407
2699
  background: var(--bg-elev);
@@ -2409,6 +2701,14 @@ var renderAdminDocument = (service) => {
2409
2701
  .btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
2410
2702
  .btn-quiet { background: transparent; }
2411
2703
  .btn-danger { color: var(--err); }
2704
+ /* Held after mouseup. Clearing an empty journal changes nothing on screen,
2705
+ so the press itself has to stay visible. */
2706
+ .icon-btn:active, .btn:active, .btn-quiet:active, .btn-danger:active, nav.side button:active,
2707
+ .icon-btn.pressed, .btn.pressed, .btn-quiet.pressed, .btn-danger.pressed, nav.side button.pressed {
2708
+ background: var(--bg-inset); border-color: var(--line-strong); color: var(--ink);
2709
+ }
2710
+ .btn-danger:active, .btn-danger.pressed { background: var(--err-soft); color: var(--err); }
2711
+ .btn-primary:active, .btn-primary.pressed { filter: brightness(0.88); color: var(--accent-ink); }
2412
2712
  /* minmax(0, 1fr): a 1fr column will not shrink below its content, so a long
2413
2713
  record or the full nav row would widen the page past the viewport. */
2414
2714
  .layout {
@@ -2449,6 +2749,12 @@ var renderAdminDocument = (service) => {
2449
2749
  border-radius: 999px; padding: 4px 8px;
2450
2750
  }
2451
2751
  .chip i { color: var(--faint); font-style: normal; }
2752
+ .sql-layout {
2753
+ display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); gap: 16px;
2754
+ }
2755
+ .sql-tables { display: flex; flex-direction: column; gap: 4px; max-height: 28rem; overflow: auto; }
2756
+ .sql-tables button { text-align: left; }
2757
+ .sql-input { font-family: var(--mono); min-height: 7rem; width: 100%; }
2452
2758
  table { width: 100%; border-collapse: collapse; font-size: 14px; }
2453
2759
  th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
2454
2760
  th { color: var(--faint); font-weight: 600; font-size: 12px; }
@@ -2497,14 +2803,22 @@ var renderAdminDocument = (service) => {
2497
2803
  input, select, textarea { font-size: 16px; }
2498
2804
  .brand, .vendor, .controls { width: 100%; }
2499
2805
  label.field, label.field select, label.field input { flex: 1; min-width: 0; }
2500
- .layout { grid-template-columns: minmax(0, 1fr); }
2806
+ /* The layout fills the screen. A single-column grid stretches every auto
2807
+ row, so the tab bar grew with the leftover height and the buttons floated
2808
+ in the middle of it. The bar stays one row; the page below takes the rest. */
2809
+ .layout {
2810
+ grid-template-columns: minmax(0, 1fr);
2811
+ grid-template-rows: auto minmax(0, 1fr);
2812
+ align-content: start;
2813
+ }
2501
2814
  nav.side {
2815
+ align-self: start; height: auto;
2502
2816
  flex-direction: row; align-items: center; overflow-x: auto; min-width: 0;
2503
2817
  border-right: 0; border-bottom: 1px solid var(--line);
2504
2818
  padding: 8px;
2505
2819
  }
2506
2820
  nav.side button { white-space: nowrap; flex: none; }
2507
- .split { grid-template-columns: minmax(0, 1fr); }
2821
+ .split, .sql-layout { grid-template-columns: minmax(0, 1fr); }
2508
2822
  main { padding: 14px; }
2509
2823
  table, thead, tbody, tr, th, td { display: block; }
2510
2824
  thead { display: none; }
@@ -2675,6 +2989,24 @@ var json2 = (body) => new Response(JSON.stringify(body), {
2675
2989
  status: 200,
2676
2990
  headers: { "content-type": "application/json; charset=utf-8" }
2677
2991
  });
2992
+ var describeExtension = (extension) => {
2993
+ if (extension.kind === "sql") {
2994
+ return {
2995
+ kind: "sql",
2996
+ id: extension.id ?? "sql",
2997
+ title: extension.title ?? "SQL",
2998
+ ...extension.description !== void 0 ? { description: extension.description } : {}
2999
+ };
3000
+ }
3001
+ return {
3002
+ kind: "panel",
3003
+ id: extension.id,
3004
+ title: extension.title,
3005
+ ...extension.description !== void 0 ? { description: extension.description } : {},
3006
+ html: extension.html,
3007
+ ...extension.script !== void 0 ? { script: extension.script } : {}
3008
+ };
3009
+ };
2678
3010
  var adminUiRoutes = (service, ui) => {
2679
3011
  const shell = () => renderAdminDocument(service);
2680
3012
  const document3 = () => ui?.render ? ui.render({ service, defaultHtml: shell }) : shell();
@@ -2689,7 +3021,8 @@ var adminUiRoutes = (service, ui) => {
2689
3021
  ...panel.description !== void 0 ? { description: panel.description } : {},
2690
3022
  html: panel.html,
2691
3023
  ...panel.script !== void 0 ? { script: panel.script } : {}
2692
- }))
3024
+ })),
3025
+ extensions: (ui?.extensions ?? []).map(describeExtension)
2693
3026
  })
2694
3027
  };
2695
3028
  };
@@ -3596,7 +3929,7 @@ var stateAdminRoutes = (routes) => {
3596
3929
  };
3597
3930
 
3598
3931
  // ../core/dist/version.js
3599
- var PACKAGE_VERSION = true ? "1.6.0" : UNRELEASED_VERSION;
3932
+ var PACKAGE_VERSION = true ? "1.7.0" : UNRELEASED_VERSION;
3600
3933
 
3601
3934
  // ../core/dist/signing.js
3602
3935
  var encoder = new TextEncoder();
@@ -5175,4 +5508,4 @@ export {
5175
5508
  LIVEKIT_NAMESPACE,
5176
5509
  LiveKitAPI
5177
5510
  };
5178
- //# sourceMappingURL=chunk-I2AJCCT7.js.map
5511
+ //# sourceMappingURL=chunk-KUUBFZEF.js.map