@crvouga/mockingbird-service-oauth 1.9.0 → 1.10.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-oauth
2
2
 
3
- ## 1.9.0 (2026-09-30)
3
+ ## 1.10.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.9.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.9.0 (2026-09-29)
4
22
 
5
23
  ### Features
6
24
 
@@ -1447,6 +1447,167 @@ function faultPresetList(value) {
1447
1447
  })
1448
1448
  };
1449
1449
  }
1450
+ function mountSqlExplorer(root, api) {
1451
+ const cell = (value) => {
1452
+ if (value === null || value === void 0)
1453
+ return "";
1454
+ if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
1455
+ return String(value);
1456
+ }
1457
+ return JSON.stringify(value) ?? "";
1458
+ };
1459
+ root.replaceChildren();
1460
+ const layout = document.createElement("div");
1461
+ layout.className = "sql-layout";
1462
+ const tables = document.createElement("div");
1463
+ tables.className = "sql-tables";
1464
+ const stack = document.createElement("div");
1465
+ stack.className = "stack";
1466
+ const banner = document.createElement("p");
1467
+ banner.className = "banner";
1468
+ const grid = document.createElement("div");
1469
+ const input = document.createElement("textarea");
1470
+ input.className = "sql-input";
1471
+ input.spellcheck = false;
1472
+ input.placeholder = "SELECT * FROM ...";
1473
+ const actions = document.createElement("div");
1474
+ actions.className = "row-actions";
1475
+ const run = document.createElement("button");
1476
+ run.type = "button";
1477
+ run.textContent = "Run";
1478
+ actions.append(run);
1479
+ const result = document.createElement("pre");
1480
+ stack.append(banner, grid, input, actions, result);
1481
+ layout.append(tables, stack);
1482
+ root.append(layout);
1483
+ const showError = (error) => {
1484
+ banner.textContent = error instanceof Error ? error.message : String(error);
1485
+ banner.classList.add("show");
1486
+ };
1487
+ const clearError = () => {
1488
+ banner.textContent = "";
1489
+ banner.classList.remove("show");
1490
+ };
1491
+ const renderGrid = (columns, rows) => {
1492
+ grid.replaceChildren();
1493
+ if (columns.length === 0) {
1494
+ const empty = document.createElement("p");
1495
+ empty.className = "empty";
1496
+ empty.textContent = "No rows.";
1497
+ grid.append(empty);
1498
+ return;
1499
+ }
1500
+ const table = document.createElement("table");
1501
+ const head = document.createElement("thead");
1502
+ const headRow = document.createElement("tr");
1503
+ for (const column of columns) {
1504
+ const th = document.createElement("th");
1505
+ th.textContent = column;
1506
+ headRow.append(th);
1507
+ }
1508
+ head.append(headRow);
1509
+ const body = document.createElement("tbody");
1510
+ for (const row of rows) {
1511
+ const tr = document.createElement("tr");
1512
+ for (const column of columns) {
1513
+ const td = document.createElement("td");
1514
+ td.dataset.label = column;
1515
+ td.textContent = cell(row[column]);
1516
+ tr.append(td);
1517
+ }
1518
+ body.append(tr);
1519
+ }
1520
+ table.append(head, body);
1521
+ grid.append(table);
1522
+ };
1523
+ const rowsOf = (value) => {
1524
+ if (!isRecord2(value) || !Array.isArray(value.rows))
1525
+ return [];
1526
+ return value.rows.flatMap((row) => isRecord2(row) ? [row] : []);
1527
+ };
1528
+ const columnsOf = (value, rows) => {
1529
+ if (isRecord2(value) && Array.isArray(value.columns)) {
1530
+ const named = value.columns.flatMap((column) => typeof column === "string" ? [column] : []);
1531
+ if (named.length > 0)
1532
+ return named;
1533
+ }
1534
+ const first = rows[0];
1535
+ return first === void 0 ? [] : Object.keys(first);
1536
+ };
1537
+ let selected = "";
1538
+ const loadPage = async (schema, name) => {
1539
+ selected = `${schema}.${name}`;
1540
+ const page2 = await api.get(`/sql/tables/${encodeURIComponent(schema)}/${encodeURIComponent(name)}?limit=50`);
1541
+ const rows = rowsOf(page2);
1542
+ renderGrid(columnsOf(page2, rows), rows);
1543
+ const total = isRecord2(page2) && typeof page2.total === "number" ? page2.total : rows.length;
1544
+ result.textContent = `${selected} \xB7 ${total} rows`;
1545
+ for (const button of tables.querySelectorAll("button")) {
1546
+ if (!(button instanceof HTMLButtonElement))
1547
+ continue;
1548
+ button.setAttribute("aria-current", button.dataset.schema === schema && button.dataset.table === name ? "true" : "false");
1549
+ }
1550
+ };
1551
+ const loadTables = async () => {
1552
+ const payload = await api.get("/sql/tables");
1553
+ const listed = isRecord2(payload) && Array.isArray(payload.tables) ? payload.tables : [];
1554
+ tables.replaceChildren();
1555
+ if (listed.length === 0) {
1556
+ const empty = document.createElement("p");
1557
+ empty.className = "empty";
1558
+ empty.textContent = "No tables.";
1559
+ tables.append(empty);
1560
+ return;
1561
+ }
1562
+ for (const item of listed) {
1563
+ if (!isRecord2(item) || typeof item.schema !== "string" || typeof item.name !== "string")
1564
+ continue;
1565
+ const button = document.createElement("button");
1566
+ button.type = "button";
1567
+ button.dataset.schema = item.schema;
1568
+ button.dataset.table = item.name;
1569
+ button.textContent = `${item.schema}.${item.name}`;
1570
+ tables.append(button);
1571
+ }
1572
+ };
1573
+ tables.addEventListener("click", (event) => {
1574
+ const target = event.target;
1575
+ if (!(target instanceof Element))
1576
+ return;
1577
+ const button = target.closest("button");
1578
+ if (!(button instanceof HTMLButtonElement))
1579
+ return;
1580
+ const schema = button.dataset.schema;
1581
+ const name = button.dataset.table;
1582
+ if (schema === void 0 || name === void 0)
1583
+ return;
1584
+ clearError();
1585
+ loadPage(schema, name).catch(showError);
1586
+ });
1587
+ run.addEventListener("click", () => {
1588
+ const sql = input.value.trim();
1589
+ if (sql === "") {
1590
+ showError(new Error("Enter a statement"));
1591
+ return;
1592
+ }
1593
+ clearError();
1594
+ api.send("POST", "/sql/query", { sql }).then((payload) => {
1595
+ const rows = rowsOf(payload);
1596
+ renderGrid(columnsOf(payload, rows), rows);
1597
+ const count = isRecord2(payload) && typeof payload.rowCount === "number" ? payload.rowCount : rows.length;
1598
+ const truncated = isRecord2(payload) && payload.truncated === true ? " (truncated)" : "";
1599
+ result.textContent = `${count} rows${truncated}`;
1600
+ }).catch(showError);
1601
+ });
1602
+ const namespace = document.getElementById("namespace");
1603
+ if (namespace) {
1604
+ namespace.addEventListener("change", () => {
1605
+ clearError();
1606
+ loadTables().catch(showError);
1607
+ });
1608
+ }
1609
+ loadTables().catch(showError);
1610
+ }
1450
1611
  function bootAdmin(config) {
1451
1612
  const fieldKinds = ["string", "number", "boolean", "null", "object", "array", "unknown"];
1452
1613
  const sources = ["declared", "inferred", "mixed"];
@@ -1887,6 +2048,50 @@ function bootAdmin(config) {
1887
2048
  if (render)
1888
2049
  await render();
1889
2050
  }
2051
+ const delay = (ms) => new Promise((resolve) => {
2052
+ window.setTimeout(resolve, ms);
2053
+ });
2054
+ const confirmAction = async (button, pending, done, work) => {
2055
+ if (button.dataset.pending === "1")
2056
+ return;
2057
+ const label = button.textContent ?? "";
2058
+ const width = button.offsetWidth;
2059
+ button.dataset.pending = "1";
2060
+ button.classList.add("pressed");
2061
+ button.setAttribute("aria-busy", "true");
2062
+ button.style.minWidth = `${width}px`;
2063
+ button.textContent = pending;
2064
+ try {
2065
+ await work();
2066
+ button.textContent = done;
2067
+ await delay(1e3);
2068
+ } catch (error) {
2069
+ showError(error);
2070
+ } finally {
2071
+ button.textContent = label;
2072
+ button.style.minWidth = "";
2073
+ button.classList.remove("pressed");
2074
+ button.removeAttribute("aria-busy");
2075
+ delete button.dataset.pending;
2076
+ }
2077
+ };
2078
+ document.addEventListener("click", (event) => {
2079
+ const target = event.target;
2080
+ if (!(target instanceof Element))
2081
+ return;
2082
+ const button = target.closest("button");
2083
+ if (!(button instanceof HTMLButtonElement) || button.dataset.pending === "1")
2084
+ return;
2085
+ button.classList.add("pressed");
2086
+ const token = String(Date.now());
2087
+ button.dataset.press = token;
2088
+ window.setTimeout(() => {
2089
+ if (button.dataset.press !== token || button.dataset.pending === "1")
2090
+ return;
2091
+ button.classList.remove("pressed");
2092
+ delete button.dataset.press;
2093
+ }, 450);
2094
+ });
1890
2095
  el("namespace", HTMLSelectElement).addEventListener("change", () => {
1891
2096
  state.namespace = el("namespace", HTMLSelectElement).value;
1892
2097
  refresh().catch(showError);
@@ -1897,7 +2102,7 @@ function bootAdmin(config) {
1897
2102
  refresh().catch(showError);
1898
2103
  });
1899
2104
  el("refresh", HTMLButtonElement).addEventListener("click", () => {
1900
- refresh().catch(showError);
2105
+ confirmAction(el("refresh", HTMLButtonElement), "Refreshing...", "Updated", () => refresh()).catch(showError);
1901
2106
  });
1902
2107
  el("collections", HTMLElement).addEventListener("click", (event) => {
1903
2108
  const target = event.target;
@@ -2020,10 +2225,10 @@ function bootAdmin(config) {
2020
2225
  }).then(() => renderFaults()).catch(showError);
2021
2226
  });
2022
2227
  el("fault-clear", HTMLButtonElement).addEventListener("click", () => {
2023
- api("DELETE", "/faults").then(() => renderFaults()).catch(showError);
2228
+ confirmAction(el("fault-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/faults").then(() => renderFaults())).catch(showError);
2024
2229
  });
2025
2230
  el("journal-clear", HTMLButtonElement).addEventListener("click", () => {
2026
- api("DELETE", "/requests").then(() => renderJournal()).catch(showError);
2231
+ confirmAction(el("journal-clear", HTMLButtonElement), "Clearing...", "Cleared", () => api("DELETE", "/requests").then(() => renderJournal())).catch(showError);
2027
2232
  });
2028
2233
  el("route-list", HTMLElement).addEventListener("click", (event) => {
2029
2234
  const target = event.target;
@@ -2079,6 +2284,22 @@ function bootAdmin(config) {
2079
2284
  panel.script = value.script;
2080
2285
  return panel;
2081
2286
  };
2287
+ const decodeExtension = (value) => {
2288
+ if (!isRecord2(value))
2289
+ return void 0;
2290
+ if (value.kind === "sql") {
2291
+ return {
2292
+ kind: "sql",
2293
+ id: typeof value.id === "string" && value.id !== "" ? value.id : "sql",
2294
+ title: typeof value.title === "string" && value.title !== "" ? value.title : "SQL",
2295
+ description: typeof value.description === "string" ? value.description : "Browse tables and run queries."
2296
+ };
2297
+ }
2298
+ if (value.kind !== "panel")
2299
+ return void 0;
2300
+ const panel = decodePanel(value);
2301
+ return panel === void 0 ? void 0 : { kind: "panel", ...panel };
2302
+ };
2082
2303
  const mountPanels = (panels) => {
2083
2304
  const nav = el("nav", HTMLElement);
2084
2305
  const views = el("views", HTMLElement);
@@ -2132,15 +2353,57 @@ function bootAdmin(config) {
2132
2353
  return decoded === void 0 ? [] : [decoded];
2133
2354
  });
2134
2355
  mountPanels(panels);
2356
+ const extensions = requireList(isRecord2(manifest) ? manifest.extensions : void 0, "Extensions").flatMap((extension) => {
2357
+ const decoded = decodeExtension(extension);
2358
+ return decoded === void 0 ? [] : [decoded];
2359
+ });
2360
+ const extensionPanels = extensions.flatMap((extension) => extension.kind === "panel" ? [extension] : []);
2361
+ mountPanels(extensionPanels);
2362
+ for (const extension of extensions) {
2363
+ if (extension.kind !== "sql")
2364
+ continue;
2365
+ const nav = el("nav", HTMLElement);
2366
+ const views = el("views", HTMLElement);
2367
+ const button = document.createElement("button");
2368
+ button.type = "button";
2369
+ button.dataset.view = extension.id;
2370
+ button.textContent = extension.title;
2371
+ nav.append(button);
2372
+ const section = document.createElement("section");
2373
+ section.className = "view";
2374
+ section.id = `view-${extension.id}`;
2375
+ section.hidden = true;
2376
+ const title = document.createElement("h2");
2377
+ title.textContent = extension.title;
2378
+ const lede = document.createElement("p");
2379
+ lede.className = "lede";
2380
+ lede.textContent = extension.description;
2381
+ const body = document.createElement("div");
2382
+ body.className = "panel-body";
2383
+ section.append(title, lede, body);
2384
+ views.append(section);
2385
+ mountSqlExplorer(body, panelApi);
2386
+ }
2135
2387
  return refresh();
2136
2388
  }).catch(showError);
2137
2389
  }
2138
- var clientPrelude = [isRecord2, mountAdminBrand, startAdminBrand, faultPresetList, bootAdmin].map((fn) => fn.toString()).join("\n");
2390
+ var clientPrelude = [
2391
+ isRecord2,
2392
+ mountAdminBrand,
2393
+ startAdminBrand,
2394
+ faultPresetList,
2395
+ mountSqlExplorer,
2396
+ bootAdmin
2397
+ ].map((fn) => fn.toString()).join("\n");
2139
2398
  var adminClientSource = (config) => {
2140
2399
  const payload = JSON.stringify(config).replace(/</g, "\\u003c");
2400
+ const entry = bootAdmin.name;
2401
+ if (!/^[A-Za-z_$][\w$]*$/.test(entry)) {
2402
+ throw new Error("admin client cannot call its boot function");
2403
+ }
2141
2404
  return `<script>
2142
2405
  ${clientPrelude}
2143
- bootAdmin(${payload});
2406
+ ${entry}(${payload});
2144
2407
  </script>`;
2145
2408
  };
2146
2409
 
@@ -2181,19 +2444,33 @@ var STANDARD_ADMIN_ROUTES = [
2181
2444
  "GET /ui/manifest"
2182
2445
  ];
2183
2446
  var PANEL_ID = /^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$/;
2447
+ var RESERVED_VIEWS = /* @__PURE__ */ new Set(["overview", "state", "clock", "faults", "journal", "routes"]);
2448
+ var checkPanel = (panel, seen, label) => {
2449
+ if (!PANEL_ID.test(panel.id)) {
2450
+ throw new RangeError(`${label} id must match ${PANEL_ID}: ${JSON.stringify(panel.id)}`);
2451
+ }
2452
+ if (RESERVED_VIEWS.has(panel.id)) {
2453
+ throw new RangeError(`${label} id ${panel.id} is reserved by the admin shell`);
2454
+ }
2455
+ if (seen.has(panel.id))
2456
+ throw new RangeError(`duplicate admin view id ${panel.id}`);
2457
+ seen.add(panel.id);
2458
+ if (panel.title.trim() === "")
2459
+ throw new RangeError(`${label} ${panel.id} needs a title`);
2460
+ };
2184
2461
  var assertAdminUi = (ui) => {
2185
- if (!ui?.panels)
2462
+ if (!ui)
2186
2463
  return;
2187
2464
  const seen = /* @__PURE__ */ new Set();
2188
- for (const panel of ui.panels) {
2189
- if (!PANEL_ID.test(panel.id)) {
2190
- throw new RangeError(`admin panel id must match ${PANEL_ID}: ${JSON.stringify(panel.id)}`);
2465
+ for (const panel of ui.panels ?? [])
2466
+ checkPanel(panel, seen, "admin panel");
2467
+ for (const extension of ui.extensions ?? []) {
2468
+ if (extension.kind === "panel") {
2469
+ checkPanel(extension, seen, "admin extension");
2470
+ continue;
2191
2471
  }
2192
- if (seen.has(panel.id))
2193
- throw new RangeError(`duplicate admin panel id ${panel.id}`);
2194
- seen.add(panel.id);
2195
- if (panel.title.trim() === "")
2196
- throw new RangeError(`admin panel ${panel.id} needs a title`);
2472
+ const id = extension.id ?? "sql";
2473
+ checkPanel({ id, title: extension.title ?? "SQL" }, seen, "admin extension");
2197
2474
  }
2198
2475
  };
2199
2476
 
@@ -2354,9 +2631,24 @@ var renderAdminDocument = (service) => {
2354
2631
  .controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
2355
2632
  label.field { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--faint); }
2356
2633
  label.field input, label.field select, .controls input[type="password"] {
2357
- background: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
2358
- padding: 7px 8px; min-height: 36px;
2359
- }
2634
+ background-color: var(--bg-inset); border: 1px solid var(--line); border-radius: 8px;
2635
+ padding: 7px 8px; min-height: 36px; line-height: 1.2;
2636
+ }
2637
+ /* A native menu ignores min-height, so Preset rendered about half as tall as
2638
+ the text fields in the same form. Paint it like those fields. */
2639
+ label.field select {
2640
+ -webkit-appearance: none; appearance: none;
2641
+ padding-right: 28px;
2642
+ 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");
2643
+ background-repeat: no-repeat; background-position: right 10px center; background-size: 12px 12px;
2644
+ }
2645
+ .stack > .field > input,
2646
+ .stack > .field > select,
2647
+ .stack > .field > textarea,
2648
+ dialog .field > input,
2649
+ dialog .field > select,
2650
+ dialog .field > textarea { width: 100%; }
2651
+ .icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger, nav.side button { cursor: pointer; }
2360
2652
  .icon-btn, .btn, .btn-primary, .btn-quiet, .btn-danger {
2361
2653
  border-radius: 9px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line);
2362
2654
  background: var(--bg-elev);
@@ -2364,6 +2656,14 @@ var renderAdminDocument = (service) => {
2364
2656
  .btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
2365
2657
  .btn-quiet { background: transparent; }
2366
2658
  .btn-danger { color: var(--err); }
2659
+ /* Held after mouseup. Clearing an empty journal changes nothing on screen,
2660
+ so the press itself has to stay visible. */
2661
+ .icon-btn:active, .btn:active, .btn-quiet:active, .btn-danger:active, nav.side button:active,
2662
+ .icon-btn.pressed, .btn.pressed, .btn-quiet.pressed, .btn-danger.pressed, nav.side button.pressed {
2663
+ background: var(--bg-inset); border-color: var(--line-strong); color: var(--ink);
2664
+ }
2665
+ .btn-danger:active, .btn-danger.pressed { background: var(--err-soft); color: var(--err); }
2666
+ .btn-primary:active, .btn-primary.pressed { filter: brightness(0.88); color: var(--accent-ink); }
2367
2667
  /* minmax(0, 1fr): a 1fr column will not shrink below its content, so a long
2368
2668
  record or the full nav row would widen the page past the viewport. */
2369
2669
  .layout {
@@ -2404,6 +2704,12 @@ var renderAdminDocument = (service) => {
2404
2704
  border-radius: 999px; padding: 4px 8px;
2405
2705
  }
2406
2706
  .chip i { color: var(--faint); font-style: normal; }
2707
+ .sql-layout {
2708
+ display: grid; grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr); gap: 16px;
2709
+ }
2710
+ .sql-tables { display: flex; flex-direction: column; gap: 4px; max-height: 28rem; overflow: auto; }
2711
+ .sql-tables button { text-align: left; }
2712
+ .sql-input { font-family: var(--mono); min-height: 7rem; width: 100%; }
2407
2713
  table { width: 100%; border-collapse: collapse; font-size: 14px; }
2408
2714
  th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
2409
2715
  th { color: var(--faint); font-weight: 600; font-size: 12px; }
@@ -2452,14 +2758,22 @@ var renderAdminDocument = (service) => {
2452
2758
  input, select, textarea { font-size: 16px; }
2453
2759
  .brand, .vendor, .controls { width: 100%; }
2454
2760
  label.field, label.field select, label.field input { flex: 1; min-width: 0; }
2455
- .layout { grid-template-columns: minmax(0, 1fr); }
2761
+ /* The layout fills the screen. A single-column grid stretches every auto
2762
+ row, so the tab bar grew with the leftover height and the buttons floated
2763
+ in the middle of it. The bar stays one row; the page below takes the rest. */
2764
+ .layout {
2765
+ grid-template-columns: minmax(0, 1fr);
2766
+ grid-template-rows: auto minmax(0, 1fr);
2767
+ align-content: start;
2768
+ }
2456
2769
  nav.side {
2770
+ align-self: start; height: auto;
2457
2771
  flex-direction: row; align-items: center; overflow-x: auto; min-width: 0;
2458
2772
  border-right: 0; border-bottom: 1px solid var(--line);
2459
2773
  padding: 8px;
2460
2774
  }
2461
2775
  nav.side button { white-space: nowrap; flex: none; }
2462
- .split { grid-template-columns: minmax(0, 1fr); }
2776
+ .split, .sql-layout { grid-template-columns: minmax(0, 1fr); }
2463
2777
  main { padding: 14px; }
2464
2778
  table, thead, tbody, tr, th, td { display: block; }
2465
2779
  thead { display: none; }
@@ -2630,6 +2944,24 @@ var json2 = (body) => new Response(JSON.stringify(body), {
2630
2944
  status: 200,
2631
2945
  headers: { "content-type": "application/json; charset=utf-8" }
2632
2946
  });
2947
+ var describeExtension = (extension) => {
2948
+ if (extension.kind === "sql") {
2949
+ return {
2950
+ kind: "sql",
2951
+ id: extension.id ?? "sql",
2952
+ title: extension.title ?? "SQL",
2953
+ ...extension.description !== void 0 ? { description: extension.description } : {}
2954
+ };
2955
+ }
2956
+ return {
2957
+ kind: "panel",
2958
+ id: extension.id,
2959
+ title: extension.title,
2960
+ ...extension.description !== void 0 ? { description: extension.description } : {},
2961
+ html: extension.html,
2962
+ ...extension.script !== void 0 ? { script: extension.script } : {}
2963
+ };
2964
+ };
2633
2965
  var adminUiRoutes = (service, ui) => {
2634
2966
  const shell = () => renderAdminDocument(service);
2635
2967
  const document3 = () => ui?.render ? ui.render({ service, defaultHtml: shell }) : shell();
@@ -2644,7 +2976,8 @@ var adminUiRoutes = (service, ui) => {
2644
2976
  ...panel.description !== void 0 ? { description: panel.description } : {},
2645
2977
  html: panel.html,
2646
2978
  ...panel.script !== void 0 ? { script: panel.script } : {}
2647
- }))
2979
+ })),
2980
+ extensions: (ui?.extensions ?? []).map(describeExtension)
2648
2981
  })
2649
2982
  };
2650
2983
  };
@@ -3551,7 +3884,7 @@ var stateAdminRoutes = (routes) => {
3551
3884
  };
3552
3885
 
3553
3886
  // ../core/dist/version.js
3554
- var PACKAGE_VERSION = true ? "1.9.0" : UNRELEASED_VERSION;
3887
+ var PACKAGE_VERSION = true ? "1.10.0" : UNRELEASED_VERSION;
3555
3888
 
3556
3889
  // ../core/dist/webhooks.js
3557
3890
  var json4 = (status, body) => new Response(JSON.stringify(body), { status, headers: { "content-type": "application/json" } });
@@ -6164,4 +6497,4 @@ export {
6164
6497
  createMultiRuntime,
6165
6498
  OAuthAPI
6166
6499
  };
6167
- //# sourceMappingURL=chunk-Y3AP4ZFX.js.map
6500
+ //# sourceMappingURL=chunk-23KIY5RO.js.map