@peers-app/peers-ui 0.32.2 → 0.33.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.
Files changed (93) hide show
  1. package/dist/command-palette/command-palette-ui.d.ts +1 -1
  2. package/dist/command-palette/command-palette-ui.js +10 -74
  3. package/dist/command-palette/command-palette.js +4 -4
  4. package/dist/components/markdown-editor/mention-node.js +16 -12
  5. package/dist/components/markdown-editor/mentions-plugin.js +2 -5
  6. package/dist/components/markdown-with-mentions.js +10 -5
  7. package/dist/components/router.d.ts +1 -0
  8. package/dist/components/router.js +2 -41
  9. package/dist/globals.d.ts +2 -6
  10. package/dist/globals.js +0 -35
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.js +3 -1
  13. package/dist/mention-configs.d.ts +1 -5
  14. package/dist/mention-configs.js +4 -54
  15. package/dist/notifications/host-controls.d.ts +31 -0
  16. package/dist/notifications/host-controls.js +9 -0
  17. package/dist/notifications/index.d.ts +4 -0
  18. package/dist/notifications/index.js +20 -0
  19. package/dist/notifications/notification-bell.d.ts +6 -0
  20. package/dist/notifications/notification-bell.js +81 -0
  21. package/dist/notifications/notification-item.d.ts +7 -0
  22. package/dist/notifications/notification-item.js +43 -0
  23. package/dist/notifications/notifications-client.d.ts +47 -0
  24. package/dist/notifications/notifications-client.js +155 -0
  25. package/dist/notifications/notifications-screen.d.ts +2 -0
  26. package/dist/notifications/notifications-screen.js +209 -0
  27. package/dist/notifications/priority-alert.d.ts +5 -0
  28. package/dist/notifications/priority-alert.js +82 -0
  29. package/dist/root-layout/layouts/full-screen-layout.js +2 -1
  30. package/dist/root-layout/root-layout-host.js +2 -0
  31. package/dist/screens/account/account-screen.js +1 -1
  32. package/dist/screens/network-viewer/connection-troubleshooter.js +8 -9
  33. package/dist/screens/packages/package-details.js +1 -1
  34. package/dist/screens/search/global-search.js +2 -4
  35. package/dist/screens/tools/tool-catalog-ipc.d.ts +6 -6
  36. package/dist/screens/tools/tool-catalog-ipc.js +4 -5
  37. package/dist/screens/tools/tool-info.js +2 -2
  38. package/dist/screens/tools/tool-schema.d.ts +1 -1
  39. package/dist/screens/tools/tool-schema.js +2 -2
  40. package/dist/system-apps/index.d.ts +3 -3
  41. package/dist/system-apps/index.js +7 -15
  42. package/dist/system-apps/notifications.app.d.ts +3 -0
  43. package/dist/system-apps/notifications.app.js +9 -0
  44. package/dist/tabs-layout/network-status-indicator.js +2 -1
  45. package/dist/tabs-layout/tabs-state.d.ts +1 -0
  46. package/dist/tabs-layout/tabs-state.js +9 -2
  47. package/dist/utils.d.ts +0 -2
  48. package/dist/utils.js +0 -9
  49. package/package.json +3 -3
  50. package/dist/components/access-level-field.d.ts +0 -10
  51. package/dist/components/access-level-field.js +0 -28
  52. package/dist/components/message-logs/message-logs.d.ts +0 -6
  53. package/dist/components/message-logs/message-logs.js +0 -324
  54. package/dist/components/message-logs/tool-access-approval-card.d.ts +0 -13
  55. package/dist/components/message-logs/tool-access-approval-card.js +0 -82
  56. package/dist/components/messages/avatar.d.ts +0 -9
  57. package/dist/components/messages/avatar.js +0 -101
  58. package/dist/components/messages/channel-message-list.d.ts +0 -13
  59. package/dist/components/messages/channel-message-list.js +0 -158
  60. package/dist/components/messages/channel-view.d.ts +0 -5
  61. package/dist/components/messages/channel-view.js +0 -62
  62. package/dist/components/messages/message-compose.d.ts +0 -11
  63. package/dist/components/messages/message-compose.js +0 -152
  64. package/dist/components/messages/message-display.d.ts +0 -9
  65. package/dist/components/messages/message-display.js +0 -99
  66. package/dist/components/messages/thread-message-list.d.ts +0 -10
  67. package/dist/components/messages/thread-message-list.js +0 -122
  68. package/dist/screens/assistants/assistant-config.d.ts +0 -5
  69. package/dist/screens/assistants/assistant-config.js +0 -56
  70. package/dist/screens/assistants/assistant-details.d.ts +0 -3
  71. package/dist/screens/assistants/assistant-details.js +0 -41
  72. package/dist/screens/assistants/assistant-info.d.ts +0 -11
  73. package/dist/screens/assistants/assistant-info.js +0 -13
  74. package/dist/screens/assistants/assistant-list.d.ts +0 -2
  75. package/dist/screens/assistants/assistant-list.js +0 -80
  76. package/dist/screens/assistants/assistant-tools.d.ts +0 -4
  77. package/dist/screens/assistants/assistant-tools.js +0 -24
  78. package/dist/screens/tools/tool-access-ipc.d.ts +0 -7
  79. package/dist/screens/tools/tool-access-ipc.js +0 -18
  80. package/dist/screens/workflows/workflow-details.d.ts +0 -5
  81. package/dist/screens/workflows/workflow-details.js +0 -57
  82. package/dist/screens/workflows/workflow-info.d.ts +0 -4
  83. package/dist/screens/workflows/workflow-info.js +0 -11
  84. package/dist/screens/workflows/workflow-instructions.d.ts +0 -4
  85. package/dist/screens/workflows/workflow-instructions.js +0 -86
  86. package/dist/screens/workflows/workflow-list.d.ts +0 -1
  87. package/dist/screens/workflows/workflow-list.js +0 -70
  88. package/dist/system-apps/assistants.app.d.ts +0 -2
  89. package/dist/system-apps/assistants.app.js +0 -8
  90. package/dist/system-apps/threads.app.d.ts +0 -2
  91. package/dist/system-apps/threads.app.js +0 -8
  92. package/dist/system-apps/workflows.app.d.ts +0 -2
  93. package/dist/system-apps/workflows.app.js +0 -8
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PriorityAlert = PriorityAlert;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const global_overlays_1 = require("../root-layout/global-overlays");
7
+ const notifications_client_1 = require("./notifications-client");
8
+ /** Seconds between alarm chimes. */
9
+ const CHIME_REPEAT_MS = 4_000;
10
+ /** A falling-then-rising pair, distinct from the Timers chime. */
11
+ const CHIME_NOTES = [880, 659.25, 880];
12
+ function playChime(ctx) {
13
+ CHIME_NOTES.forEach((note, index) => {
14
+ const start = ctx.currentTime + index * 0.18;
15
+ const oscillator = ctx.createOscillator();
16
+ const gain = ctx.createGain();
17
+ oscillator.type = "triangle";
18
+ oscillator.frequency.value = note;
19
+ gain.gain.setValueAtTime(0, start);
20
+ gain.gain.linearRampToValueAtTime(0.35, start + 0.01);
21
+ gain.gain.exponentialRampToValueAtTime(0.0001, start + 0.5);
22
+ oscillator.connect(gain);
23
+ gain.connect(ctx.destination);
24
+ oscillator.start(start);
25
+ oscillator.stop(start + 0.5);
26
+ });
27
+ }
28
+ /**
29
+ * Banner and repeating chime for priority notifications ringing now. Shown above every layout
30
+ * until each one is acknowledged, snoozed, dismissed, or opened.
31
+ */
32
+ function PriorityAlert() {
33
+ const summary = (0, notifications_client_1.useNotificationSummary)();
34
+ const ringingKey = summary.ringing.join(",");
35
+ const [ringing, setRinging] = (0, react_1.useState)([]);
36
+ (0, react_1.useEffect)(() => {
37
+ const ids = ringingKey ? ringingKey.split(",") : [];
38
+ if (!ids.length) {
39
+ setRinging([]);
40
+ return;
41
+ }
42
+ let cancelled = false;
43
+ void (0, notifications_client_1.listNotifications)({ notificationIds: ids, limit: ids.length })
44
+ .then((rows) => {
45
+ if (!cancelled)
46
+ setRinging(rows);
47
+ })
48
+ .catch(() => { });
49
+ return () => {
50
+ cancelled = true;
51
+ };
52
+ }, [ringingKey, summary.revision]);
53
+ (0, react_1.useEffect)(() => {
54
+ if (!ringingKey)
55
+ return;
56
+ const AudioCtx = window.AudioContext ||
57
+ window.webkitAudioContext;
58
+ if (!AudioCtx)
59
+ return;
60
+ const ctx = new AudioCtx();
61
+ const chime = () => {
62
+ if (ctx.state === "running")
63
+ playChime(ctx);
64
+ else if (ctx.state === "suspended")
65
+ void ctx.resume().catch(() => { });
66
+ };
67
+ chime();
68
+ const timer = setInterval(chime, CHIME_REPEAT_MS);
69
+ return () => {
70
+ clearInterval(timer);
71
+ void ctx.close().catch(() => { });
72
+ };
73
+ }, [ringingKey]);
74
+ if (!summary.ringing.length)
75
+ return null;
76
+ // The summary owns the alarm session, even while details are loading or a read fails.
77
+ // Never leave controls aimed at a handled alarm when a different one starts ringing.
78
+ const ids = summary.ringing;
79
+ const first = ringing.find((n) => ids.includes(n.notificationId));
80
+ return ((0, jsx_runtime_1.jsxs)("div", { role: "alertdialog", "aria-live": "assertive", "aria-label": "Priority notification", className: "position-fixed start-50 translate-middle-x bg-danger text-white rounded shadow-lg p-3 d-flex flex-column gap-2", style: { top: "1rem", zIndex: 2000, width: "min(28rem, calc(100vw - 2rem))" }, "data-testid": "priority-alert", children: [(0, jsx_runtime_1.jsxs)("div", { className: "d-flex align-items-start gap-2", children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-alarm-fill fs-4", "aria-hidden": "true" }), (0, jsx_runtime_1.jsxs)("div", { style: { minWidth: 0 }, children: [(0, jsx_runtime_1.jsx)("div", { className: "fw-semibold", children: first?.title ?? "Priority notification" }), first?.body && (0, jsx_runtime_1.jsx)("div", { className: "small", children: first.body }), ids.length > 1 && (0, jsx_runtime_1.jsxs)("div", { className: "small opacity-75", children: ["and ", ids.length - 1, " more"] })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "d-flex flex-wrap gap-2 justify-content-end", children: [first?.link && ((0, jsx_runtime_1.jsx)("button", { type: "button", className: "btn btn-sm btn-light", onClick: () => void (0, notifications_client_1.openNotification)(first), children: "Open" })), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "btn btn-sm btn-outline-light", onClick: () => void (0, notifications_client_1.actOnNotifications)({ action: "snooze", notificationIds: ids, snoozeMinutes: 5 }), children: "Snooze 5 min" }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "btn btn-sm btn-light fw-semibold", onClick: () => void (0, notifications_client_1.actOnNotifications)({ action: "acknowledge", notificationIds: ids }), children: "Acknowledge" })] })] }));
81
+ }
82
+ (0, global_overlays_1.registerGlobalOverlay)("system-notifications-priority", PriorityAlert);
@@ -17,6 +17,7 @@ const command_palette_1 = require("../../command-palette/command-palette");
17
17
  const group_switcher_1 = require("../../components/group-switcher");
18
18
  const globals_1 = require("../../globals");
19
19
  const hooks_1 = require("../../hooks");
20
+ const notification_bell_1 = require("../../notifications/notification-bell");
20
21
  const color_mode_dropdown_1 = require("../../screens/settings/color-mode-dropdown");
21
22
  const tabs_layout_1 = require("../../tabs-layout/tabs-layout");
22
23
  const tabs_state_1 = require("../../tabs-layout/tabs-state");
@@ -38,7 +39,7 @@ function FullScreenLayout() {
38
39
  const isLauncher = activeTab.packageId === "launcher" || activeTab.tabId === "launcher";
39
40
  const isLight = mode === "light";
40
41
  const title = isLauncher ? "Apps" : activeTab.title;
41
- return ((0, jsx_runtime_1.jsxs)("div", { className: "d-flex flex-column", style: { height: "calc(100vh - 25px)", overflow: "hidden" }, children: [(0, jsx_runtime_1.jsxs)("div", { className: `border-bottom peers-tab-strip d-flex align-items-center px-1 ${isLight ? "" : "bg-dark"}`, style: { height: "36px", borderBottomColor: isLight ? "var(--peers-tab-edge)" : "#495057" }, children: [(0, jsx_runtime_1.jsx)(group_switcher_1.GroupSwitcher, { colorMode: mode, isMobile: isMobile }), (0, jsx_runtime_1.jsx)(HeaderButton, { isLight: isLight, active: isLauncher, icon: "bi-grid-3x3-gap", label: "Apps", onClick: () => (0, tabs_state_1.activeTabId)("launcher") }), (0, jsx_runtime_1.jsxs)("div", { className: "d-flex align-items-center flex-grow-1 overflow-hidden px-2", children: [!isLauncher && activeTab.iconClassName && ((0, jsx_runtime_1.jsx)("i", { className: `${activeTab.iconClassName} me-2` })), (0, jsx_runtime_1.jsx)("span", { className: "text-truncate fw-medium", style: { fontSize: "13px" }, children: title })] }), (0, jsx_runtime_1.jsx)(HeaderButton, { isLight: isLight, icon: "bi-search", label: `Search and navigate (${paletteHint})`, onClick: command_palette_1.openCommandPalette, children: (0, jsx_runtime_1.jsx)("span", { className: "d-none d-md-inline ms-1", style: { fontSize: "11px" }, children: paletteHint }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex-grow-1 overflow-hidden", children: (0, jsx_runtime_1.jsx)(tabs_layout_1.TabErrorBoundary, { tabTitle: activeTab.title, tabId: activeTab.tabId, children: (0, jsx_runtime_1.jsx)(tabs_layout_1.TabContent, { tab: activeTab, isMobile: isMobile, isActive: true }) }, activeTab.tabId) })] }));
42
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "d-flex flex-column", style: { height: "calc(100vh - 25px)", overflow: "hidden" }, children: [(0, jsx_runtime_1.jsxs)("div", { className: `border-bottom peers-tab-strip d-flex align-items-center px-1 ${isLight ? "" : "bg-dark"}`, style: { height: "36px", borderBottomColor: isLight ? "var(--peers-tab-edge)" : "#495057" }, children: [(0, jsx_runtime_1.jsx)(group_switcher_1.GroupSwitcher, { colorMode: mode, isMobile: isMobile }), (0, jsx_runtime_1.jsx)(HeaderButton, { isLight: isLight, active: isLauncher, icon: "bi-grid-3x3-gap", label: "Apps", onClick: () => (0, tabs_state_1.activeTabId)("launcher") }), (0, jsx_runtime_1.jsxs)("div", { className: "d-flex align-items-center flex-grow-1 overflow-hidden px-2", children: [!isLauncher && activeTab.iconClassName && ((0, jsx_runtime_1.jsx)("i", { className: `${activeTab.iconClassName} me-2` })), (0, jsx_runtime_1.jsx)("span", { className: "text-truncate fw-medium", style: { fontSize: "13px" }, children: title })] }), (0, jsx_runtime_1.jsx)(notification_bell_1.NotificationBell, { compact: true }), (0, jsx_runtime_1.jsx)(HeaderButton, { isLight: isLight, icon: "bi-search", label: `Search and navigate (${paletteHint})`, onClick: command_palette_1.openCommandPalette, children: (0, jsx_runtime_1.jsx)("span", { className: "d-none d-md-inline ms-1", style: { fontSize: "11px" }, children: paletteHint }) })] }), (0, jsx_runtime_1.jsx)("div", { className: "flex-grow-1 overflow-hidden", children: (0, jsx_runtime_1.jsx)(tabs_layout_1.TabErrorBoundary, { tabTitle: activeTab.title, tabId: activeTab.tabId, children: (0, jsx_runtime_1.jsx)(tabs_layout_1.TabContent, { tab: activeTab, isMobile: isMobile, isActive: true }) }, activeTab.tabId) })] }));
42
43
  }
43
44
  /** A small, transparent header button matching the tabs layout's toolbar styling. */
44
45
  function HeaderButton({ isLight, icon, label, onClick, active, children }) {
@@ -20,6 +20,7 @@ const react_1 = require("react");
20
20
  const command_palette_ui_1 = require("../command-palette/command-palette-ui");
21
21
  const globals_1 = require("../globals");
22
22
  const hooks_1 = require("../hooks");
23
+ const notifications_client_1 = require("../notifications/notifications-client");
23
24
  const identity_ipc_1 = require("../screens/device-pairing/identity-ipc");
24
25
  const identity_routes_1 = require("../screens/identity/identity-routes");
25
26
  const invite_capture_1 = require("../screens/invites/invite-capture");
@@ -95,6 +96,7 @@ function RootLayoutBootstrap(props) {
95
96
  peers_sdk_1.hasShownWelcomeModal.loadingPromise,
96
97
  ]);
97
98
  (0, globals_1.initializeHashNavigation)();
99
+ await (0, notifications_client_1.resumeNotificationNavigation)();
98
100
  if ((0, invite_capture_1.peekPendingInvite)()) {
99
101
  (0, globals_1.mainContentPath)(identity_routes_1.IDENTITY_ACCEPT_PATH);
100
102
  }
@@ -56,7 +56,7 @@ function AccountScreen() {
56
56
  year: "numeric",
57
57
  month: "long",
58
58
  day: "numeric",
59
- })] }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "btn btn-outline-secondary btn-sm", onClick: handleRegister, disabled: isRegistering, children: isRegistering ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "spinner-border spinner-border-sm me-2" }), "Refreshing..."] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-arrow-clockwise me-2" }), "Refresh Token"] })) })] })) : ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("p", { className: "text-muted mb-3", children: "Register your account to enable cloud-powered features like the AI assistant." }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "btn btn-primary", onClick: handleRegister, disabled: isRegistering, children: isRegistering ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "spinner-border spinner-border-sm me-2" }), "Registering..."] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-cloud-upload me-2" }), "Register Account"] })) })] }))] }) })] }));
59
+ })] }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "btn btn-outline-secondary btn-sm", onClick: handleRegister, disabled: isRegistering, children: isRegistering ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "spinner-border spinner-border-sm me-2" }), "Refreshing..."] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-arrow-clockwise me-2" }), "Refresh Token"] })) })] })) : ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("p", { className: "text-muted mb-3", children: "Register your account to use Peers Services, such as delivery to devices that are offline." }), (0, jsx_runtime_1.jsx)("button", { type: "button", className: "btn btn-primary", onClick: handleRegister, disabled: isRegistering, children: isRegistering ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "spinner-border spinner-border-sm me-2" }), "Registering..."] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-cloud-upload me-2" }), "Register Account"] })) })] }))] }) })] }));
60
60
  }
61
61
  const ROTATE_INFO = `### Rotating your signing key
62
62
 
@@ -44,7 +44,7 @@ function getSummary(checks) {
44
44
  skips: checks.filter((c) => c.status === "skip").length,
45
45
  };
46
46
  }
47
- function formatReportForAI(checks) {
47
+ function formatReport(checks) {
48
48
  const lines = ["Connection Troubleshooter Report", "================================"];
49
49
  const groups = groupByLayer(checks);
50
50
  for (const layer of LAYER_ORDER) {
@@ -145,16 +145,15 @@ function ConnectionTroubleshooter({ onBack }) {
145
145
  return next;
146
146
  });
147
147
  };
148
- const handleAskAssistant = () => {
149
- const report = formatReportForAI(checks.filter((c) => c.status !== "running"));
150
- const message = `I ran the Peers connection troubleshooter and got the following results. Please help me understand what's wrong and how to fix it:\n\n${report}`;
148
+ const handleCopyDetails = () => {
149
+ const report = formatReport(checks.filter((c) => c.status !== "running"));
151
150
  navigator.clipboard
152
- .writeText(message)
151
+ .writeText(report)
153
152
  .then(() => {
154
- alert("Diagnostic report copied to clipboard. Paste it into the AI assistant chat.");
153
+ alert("Diagnostic report copied to the clipboard.");
155
154
  })
156
155
  .catch(() => {
157
- alert("Could not copy the diagnostic report. Please open the chat manually and describe the results.");
156
+ alert("Could not copy the diagnostic report.");
158
157
  });
159
158
  };
160
159
  const groups = groupByLayer(checks.filter((c) => !c.id.startsWith("placeholder-")));
@@ -172,7 +171,7 @@ function ConnectionTroubleshooter({ onBack }) {
172
171
  : "pass";
173
172
  return ((0, jsx_runtime_1.jsxs)("div", { className: "container-fluid p-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "d-flex justify-content-between align-items-center mb-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "d-flex align-items-center gap-3", children: [(0, jsx_runtime_1.jsxs)("button", { className: "btn btn-sm btn-outline-secondary", onClick: onBack, children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-arrow-left me-1" }), "Back"] }), (0, jsx_runtime_1.jsxs)("h4", { className: "mb-0", children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-stethoscope me-2 text-primary" }), "Connection Troubleshooter"] })] }), (0, jsx_runtime_1.jsx)("button", { className: "btn btn-sm btn-primary", onClick: runDiagnostics, disabled: running, children: running ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("span", { className: "spinner-border spinner-border-sm me-1", role: "status", "aria-hidden": "true" }), "Running\u2026"] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-arrow-clockwise me-1" }), "Re-run"] })) })] }), running && ((0, jsx_runtime_1.jsxs)("div", { className: "mb-4", children: [(0, jsx_runtime_1.jsxs)("div", { className: "d-flex justify-content-between mb-1", children: [(0, jsx_runtime_1.jsx)("small", { className: "text-muted", children: "Running diagnostics\u2026" }), (0, jsx_runtime_1.jsxs)("small", { className: "text-muted", children: [completedCount, " / ", totalCount] })] }), (0, jsx_runtime_1.jsx)("div", { className: "progress", style: { height: "6px" }, children: (0, jsx_runtime_1.jsx)("div", { className: "progress-bar progress-bar-striped progress-bar-animated", style: { width: `${progressPct}%` } }) })] })), done && checks.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: `alert ${overallStatus === "pass" ? "alert-success" : overallStatus === "warn" ? "alert-warning" : "alert-danger"} d-flex justify-content-between align-items-center mb-4`, children: [(0, jsx_runtime_1.jsxs)("div", { className: "d-flex align-items-center gap-2", children: [overallStatus === "pass" && (0, jsx_runtime_1.jsx)("i", { className: "bi bi-check-circle-fill fs-5" }), overallStatus === "warn" && (0, jsx_runtime_1.jsx)("i", { className: "bi bi-exclamation-triangle-fill fs-5" }), overallStatus === "fail" && (0, jsx_runtime_1.jsx)("i", { className: "bi bi-x-circle-fill fs-5" }), (0, jsx_runtime_1.jsxs)("div", { children: [overallStatus === "pass" && (0, jsx_runtime_1.jsx)("strong", { children: "All checks passed." }), overallStatus === "warn" && ((0, jsx_runtime_1.jsxs)("strong", { children: [summary.warnings, " warning", summary.warnings > 1 ? "s" : "", " found."] })), overallStatus === "fail" && ((0, jsx_runtime_1.jsxs)("strong", { children: [summary.issues, " issue", summary.issues > 1 ? "s" : "", " found", summary.warnings > 0
174
173
  ? `, ${summary.warnings} warning${summary.warnings > 1 ? "s" : ""}`
175
- : "", "."] })), " ", (0, jsx_runtime_1.jsxs)("span", { className: "opacity-75", children: [summary.passes, " passed \u00B7 ", summary.issues, " failed \u00B7 ", summary.warnings, " warnings \u00B7", " ", summary.skips, " skipped"] })] })] }), (0, jsx_runtime_1.jsxs)("button", { className: "btn btn-sm btn-dark d-flex align-items-center gap-1", onClick: handleAskAssistant, children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-chat-dots-fill" }), "Ask AI Assistant"] })] })), running && placeholders.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "card mb-3", children: (0, jsx_runtime_1.jsx)("div", { className: "card-body p-2", children: placeholders.map((p) => ((0, jsx_runtime_1.jsxs)("div", { className: "d-flex align-items-center gap-2 p-2 border-bottom", children: [STATUS_ICON[p.status], (0, jsx_runtime_1.jsx)("span", { className: "text-muted small", children: p.label })] }, p.id))) }) })), LAYER_ORDER.map((layer) => {
174
+ : "", "."] })), " ", (0, jsx_runtime_1.jsxs)("span", { className: "opacity-75", children: [summary.passes, " passed \u00B7 ", summary.issues, " failed \u00B7 ", summary.warnings, " warnings \u00B7", " ", summary.skips, " skipped"] })] })] }), (0, jsx_runtime_1.jsxs)("button", { className: "btn btn-sm btn-dark d-flex align-items-center gap-1", onClick: handleCopyDetails, children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-clipboard" }), "Copy details"] })] })), running && placeholders.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "card mb-3", children: (0, jsx_runtime_1.jsx)("div", { className: "card-body p-2", children: placeholders.map((p) => ((0, jsx_runtime_1.jsxs)("div", { className: "d-flex align-items-center gap-2 p-2 border-bottom", children: [STATUS_ICON[p.status], (0, jsx_runtime_1.jsx)("span", { className: "text-muted small", children: p.label })] }, p.id))) }) })), LAYER_ORDER.map((layer) => {
176
175
  const layerChecks = groups[layer];
177
176
  if (!layerChecks || layerChecks.length === 0)
178
177
  return null;
@@ -186,5 +185,5 @@ function ConnectionTroubleshooter({ onBack }) {
186
185
  ? "skip"
187
186
  : "pass";
188
187
  return ((0, jsx_runtime_1.jsxs)("div", { className: "card mb-3", children: [(0, jsx_runtime_1.jsxs)("div", { className: "card-header d-flex align-items-center justify-content-between py-2", children: [(0, jsx_runtime_1.jsxs)("div", { className: "d-flex align-items-center gap-2", children: [STATUS_ICON[layerStatus], (0, jsx_runtime_1.jsx)("strong", { className: "small", children: layer })] }), (0, jsx_runtime_1.jsx)("span", { className: `badge ${STATUS_BADGE_CLASS[layerStatus]}`, children: layerStatus === "running" ? "running" : layerStatus })] }), (0, jsx_runtime_1.jsx)("div", { className: "list-group list-group-flush", children: layerChecks.map((check) => ((0, jsx_runtime_1.jsxs)("div", { className: "list-group-item p-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: `d-flex align-items-start gap-2 px-3 py-2 ${check.suggestion ? "cursor-pointer" : ""}`, style: { cursor: check.suggestion ? "pointer" : "default" }, onClick: () => check.suggestion && toggleExpand(check.id), role: check.suggestion ? "button" : undefined, children: [(0, jsx_runtime_1.jsx)("div", { className: "pt-1 flex-shrink-0", children: STATUS_ICON[check.status] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-grow-1 min-width-0", children: [(0, jsx_runtime_1.jsxs)("div", { className: "d-flex justify-content-between align-items-start", children: [(0, jsx_runtime_1.jsx)("span", { className: "small fw-medium", children: check.label }), check.suggestion && ((0, jsx_runtime_1.jsx)("i", { className: `bi bi-chevron-${expanded.has(check.id) ? "up" : "down"} text-muted ms-2 flex-shrink-0 small` }))] }), (0, jsx_runtime_1.jsx)("div", { className: "small text-muted mt-1", children: check.detail })] })] }), check.suggestion && expanded.has(check.id) && ((0, jsx_runtime_1.jsx)("div", { className: "px-3 pb-2 pt-0 ms-4", children: (0, jsx_runtime_1.jsxs)("div", { className: "alert alert-info py-2 px-3 mb-0 small d-flex gap-2", children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-lightbulb-fill text-info flex-shrink-0 mt-1" }), (0, jsx_runtime_1.jsx)("span", { children: check.suggestion })] }) }))] }, check.id))) })] }, layer));
189
- }), done && checks.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "text-center py-3", children: [(0, jsx_runtime_1.jsxs)("button", { className: "btn btn-outline-primary", onClick: handleAskAssistant, children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-chat-dots-fill me-2" }), "Ask AI Assistant for Help"] }), (0, jsx_runtime_1.jsx)("p", { className: "text-muted small mt-2 mb-0", children: "Sends the full diagnostic report to the AI assistant for guided troubleshooting." })] }))] }));
188
+ }), done && checks.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "text-center py-3", children: [(0, jsx_runtime_1.jsxs)("button", { className: "btn btn-outline-primary", onClick: handleCopyDetails, children: [(0, jsx_runtime_1.jsx)("i", { className: "bi bi-clipboard me-2" }), "Copy details"] }), (0, jsx_runtime_1.jsx)("p", { className: "text-muted small mt-2 mb-0", children: "Copies the full diagnostic report, to paste wherever you're getting help." })] }))] }));
190
189
  }
@@ -20,7 +20,7 @@ const PackageDetails = (props) => {
20
20
  const pkg = (0, hooks_1.usePromise)(async () => {
21
21
  const pkg = await (0, peers_sdk_1.Packages)().get(props.packageId);
22
22
  if (!pkg) {
23
- throw new Error("Workflow not found");
23
+ throw new Error("Package not found");
24
24
  }
25
25
  (0, tabs_state_1.updateActiveTabTitle)(pkg.name || "Package");
26
26
  return (0, peers_sdk_1.Packages)().initDoc(pkg);
@@ -11,8 +11,6 @@ const routes_loader_1 = require("../../ui-router/routes-loader");
11
11
  const color_mode_dropdown_1 = require("../settings/color-mode-dropdown");
12
12
  const searchConfigs = [
13
13
  { config: mention_configs_1.toolMentionConfig, category: "Tools", navigationPath: "tools" },
14
- { config: mention_configs_1.assistantMentionConfig, category: "Assistants", navigationPath: "assistants" },
15
- { config: mention_configs_1.workflowMentionConfig, category: "Workflows", navigationPath: "workflows" },
16
14
  { config: mention_configs_1.valueTypeMentionConfig, category: "Types", navigationPath: "peer-types" },
17
15
  { config: mention_configs_1.userMentionConfig, category: "People", navigationPath: "identity/people" },
18
16
  ];
@@ -129,7 +127,7 @@ function GlobalSearch() {
129
127
  color: "#6c757d",
130
128
  zIndex: 1,
131
129
  fontSize: "18px",
132
- } }), (0, jsx_runtime_1.jsx)("input", { ref: inputRef, type: "text", className: `form-control form-control-lg ${isDark ? "bg-dark text-light border-secondary" : ""}`, placeholder: "Search across apps, tools, assistants, workflows, and more...", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), style: {
130
+ } }), (0, jsx_runtime_1.jsx)("input", { ref: inputRef, type: "text", className: `form-control form-control-lg ${isDark ? "bg-dark text-light border-secondary" : ""}`, placeholder: "Search across apps, tools, types, and people...", value: searchQuery, onChange: (e) => setSearchQuery(e.target.value), style: {
133
131
  paddingLeft: "50px",
134
132
  fontSize: "18px",
135
133
  borderRadius: "12px",
@@ -177,5 +175,5 @@ function GlobalSearch() {
177
175
  fontSize: "16px",
178
176
  color: isDark ? "#0d6efd" : "#0d6efd",
179
177
  minWidth: "16px",
180
- } }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-grow-1", children: [(0, jsx_runtime_1.jsx)("h6", { className: "card-title mb-1 fw-medium", children: item.name }), (0, jsx_runtime_1.jsx)("small", { className: "text-muted text-uppercase", style: { fontSize: "11px", letterSpacing: "0.5px" }, children: result.category.slice(0, -1) })] }), (0, jsx_runtime_1.jsx)("i", { className: "bi-arrow-right text-muted", style: { fontSize: "12px" } })] }) }) }) }, item.id))) })] }, result.category)))] })) })), !searchQuery && ((0, jsx_runtime_1.jsxs)("div", { className: "text-center py-5", children: [(0, jsx_runtime_1.jsx)("i", { className: "bi-search mb-3 d-block text-muted", style: { fontSize: "64px" } }), (0, jsx_runtime_1.jsx)("h3", { className: "text-muted mb-3", children: "Search across everything" }), (0, jsx_runtime_1.jsx)("p", { className: "text-muted mb-4", style: { maxWidth: "400px", margin: "0 auto" }, children: "Find apps, tools, assistants, workflows, types, and users all in one place." }), (0, jsx_runtime_1.jsx)("div", { className: "d-flex flex-wrap justify-content-center gap-2", children: searchConfigs.map(({ config, category }) => ((0, jsx_runtime_1.jsxs)("span", { className: `badge ${isDark ? "bg-secondary" : "peers-surface text-body"} px-3 py-2 d-flex align-items-center`, style: { fontSize: "12px" }, children: [(0, jsx_runtime_1.jsx)("i", { className: `${config.iconClass} me-2` }), category] }, category))) })] }))] }));
178
+ } }), (0, jsx_runtime_1.jsxs)("div", { className: "flex-grow-1", children: [(0, jsx_runtime_1.jsx)("h6", { className: "card-title mb-1 fw-medium", children: item.name }), (0, jsx_runtime_1.jsx)("small", { className: "text-muted text-uppercase", style: { fontSize: "11px", letterSpacing: "0.5px" }, children: result.category.slice(0, -1) })] }), (0, jsx_runtime_1.jsx)("i", { className: "bi-arrow-right text-muted", style: { fontSize: "12px" } })] }) }) }) }, item.id))) })] }, result.category)))] })) })), !searchQuery && ((0, jsx_runtime_1.jsxs)("div", { className: "text-center py-5", children: [(0, jsx_runtime_1.jsx)("i", { className: "bi-search mb-3 d-block text-muted", style: { fontSize: "64px" } }), (0, jsx_runtime_1.jsx)("h3", { className: "text-muted mb-3", children: "Search across everything" }), (0, jsx_runtime_1.jsx)("p", { className: "text-muted mb-4", style: { maxWidth: "400px", margin: "0 auto" }, children: "Find apps, tools, types, and people all in one place." }), (0, jsx_runtime_1.jsx)("div", { className: "d-flex flex-wrap justify-content-center gap-2", children: searchConfigs.map(({ config, category }) => ((0, jsx_runtime_1.jsxs)("span", { className: `badge ${isDark ? "bg-secondary" : "peers-surface text-body"} px-3 py-2 d-flex align-items-center`, style: { fontSize: "12px" }, children: [(0, jsx_runtime_1.jsx)("i", { className: `${config.iconClass} me-2` }), category] }, category))) })] }))] }));
181
179
  }
@@ -22,13 +22,13 @@ export declare function getToolDetails(toolId: string): Promise<{
22
22
  catalogIdentity?: "deterministic" | "legacy-alias" | undefined;
23
23
  catalogState?: "resolved" | "unresolved" | "quarantined" | undefined;
24
24
  catalogReason?: string | undefined;
25
+ detailedDescription?: string | undefined;
25
26
  configSchema?: {
26
27
  type: import("@peers-app/peers-sdk").IOSchemaType;
27
28
  fields: import("@peers-app/peers-sdk").IField[];
28
29
  } | undefined;
29
- isAssistantRunner?: boolean | undefined;
30
- detailedDescription?: string | undefined;
31
30
  codeRepository?: string | undefined;
31
+ isAssistantRunner?: boolean | undefined;
32
32
  packageId?: string | undefined;
33
33
  authorityPropagation?: "preserve" | "cap" | undefined;
34
34
  accessLevel?: number | undefined;
@@ -36,8 +36,8 @@ export declare function getToolDetails(toolId: string): Promise<{
36
36
  };
37
37
  entry: IToolCatalogEntry | undefined;
38
38
  } | undefined>;
39
- /** Query workflow mention candidates; unavailable browser hosts retain non-quarantined rows. */
40
- export declare function listWorkflowMentionTools(query: string, limit: number): Promise<IToolCatalogEntry[] | {
39
+ /** Query tool mention candidates; unavailable browser hosts retain non-quarantined rows. */
40
+ export declare function listMentionTools(query: string, limit: number): Promise<IToolCatalogEntry[] | {
41
41
  code: string;
42
42
  name: string;
43
43
  usageDescription: string;
@@ -56,13 +56,13 @@ export declare function listWorkflowMentionTools(query: string, limit: number):
56
56
  catalogIdentity?: "deterministic" | "legacy-alias" | undefined;
57
57
  catalogState?: "resolved" | "unresolved" | "quarantined" | undefined;
58
58
  catalogReason?: string | undefined;
59
+ detailedDescription?: string | undefined;
59
60
  configSchema?: {
60
61
  type: import("@peers-app/peers-sdk").IOSchemaType;
61
62
  fields: import("@peers-app/peers-sdk").IField[];
62
63
  } | undefined;
63
- isAssistantRunner?: boolean | undefined;
64
- detailedDescription?: string | undefined;
65
64
  codeRepository?: string | undefined;
65
+ isAssistantRunner?: boolean | undefined;
66
66
  packageId?: string | undefined;
67
67
  authorityPropagation?: "preserve" | "cap" | undefined;
68
68
  accessLevel?: number | undefined;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getToolCatalogConsumer = getToolCatalogConsumer;
4
4
  exports.getToolDetails = getToolDetails;
5
- exports.listWorkflowMentionTools = listWorkflowMentionTools;
5
+ exports.listMentionTools = listMentionTools;
6
6
  const peers_sdk_1 = require("@peers-app/peers-sdk");
7
7
  const consumers = new Map();
8
8
  /** Obtain a catalog consumer for the selected host context; PWA callers can fall back to rows. */
@@ -34,11 +34,10 @@ async function getToolDetails(toolId) {
34
34
  }
35
35
  return { row, entry };
36
36
  }
37
- /** Query workflow mention candidates; unavailable browser hosts retain non-quarantined rows. */
38
- async function listWorkflowMentionTools(query, limit) {
37
+ /** Query tool mention candidates; unavailable browser hosts retain non-quarantined rows. */
38
+ async function listMentionTools(query, limit) {
39
39
  try {
40
- const { tools } = await (await getToolCatalogConsumer()).tools.listTools({ query, limit: 500 });
41
- return tools.filter((entry) => entry.workflowInvocable).slice(0, limit);
40
+ return (await (await getToolCatalogConsumer()).tools.listTools({ query, limit })).tools;
42
41
  }
43
42
  catch {
44
43
  return (await (0, peers_sdk_1.Tools)().list({ name: { $matchWords: query } }, { pageSize: 500 }))
@@ -8,10 +8,10 @@ const markdown_with_mentions_1 = require("../../components/markdown-with-mention
8
8
  const ToolInfo = ({ tool, entry }) => {
9
9
  const target = entry?.target;
10
10
  const level = entry?.access?.accessLevel;
11
- return ((0, jsx_runtime_1.jsxs)("div", { children: [tool.isAssistantRunner && (0, jsx_runtime_1.jsx)("span", { className: "badge bg-secondary", children: "Assistant runner" }), (0, jsx_runtime_1.jsxs)("dl", { children: [(0, jsx_runtime_1.jsx)("dt", { children: "ID" }), (0, jsx_runtime_1.jsx)("dd", { children: tool.toolId }), (0, jsx_runtime_1.jsx)("dt", { children: "Aliases" }), (0, jsx_runtime_1.jsx)("dd", { children: entry?.aliases.join(", ") ?? tool.toolId }), (0, jsx_runtime_1.jsx)("dt", { children: "Contract" }), (0, jsx_runtime_1.jsx)("dd", { children: target
11
+ return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("dl", { children: [(0, jsx_runtime_1.jsx)("dt", { children: "ID" }), (0, jsx_runtime_1.jsx)("dd", { children: tool.toolId }), (0, jsx_runtime_1.jsx)("dt", { children: "Aliases" }), (0, jsx_runtime_1.jsx)("dd", { children: entry?.aliases.join(", ") ?? tool.toolId }), (0, jsx_runtime_1.jsx)("dt", { children: "Contract" }), (0, jsx_runtime_1.jsx)("dd", { children: target
12
12
  ? `${target.contractId}@${target.version}`
13
13
  : tool.contractId
14
14
  ? `${tool.contractId}@${tool.contractVersion}`
15
- : "Unresolved" }), (0, jsx_runtime_1.jsx)("dt", { children: "Member" }), (0, jsx_runtime_1.jsx)("dd", { children: target?.toolName ?? tool.toolName ?? tool.name }), (0, jsx_runtime_1.jsx)("dt", { children: "Provider" }), (0, jsx_runtime_1.jsx)("dd", { children: entry?.provider?.activePackageId ?? "Unavailable" }), (0, jsx_runtime_1.jsx)("dt", { children: "Dispatch" }), (0, jsx_runtime_1.jsxs)("dd", { children: [entry?.availability.dispatch ?? "Host catalog unavailable", entry?.availability.message && `: ${entry.availability.message}`] }), (0, jsx_runtime_1.jsx)("dt", { children: "Live access" }), (0, jsx_runtime_1.jsx)("dd", { children: level === undefined ? "Unavailable" : `${(0, peers_sdk_1.getAccessLevelLabel)(level)} (${level})` }), (0, jsx_runtime_1.jsx)("dt", { children: "Workflow" }), (0, jsx_runtime_1.jsxs)("dd", { children: [entry ? (entry.workflowInvocable ? "Available" : "Excluded or unavailable") : "Unknown", entry?.availability.requiresWorkflowRun && "; workflow run required"] })] }), (0, jsx_runtime_1.jsx)(markdown_with_mentions_1.MarkdownWithMentions, { content: entry?.usageDescription ?? tool.usageDescription }), tool.detailedDescription && (0, jsx_runtime_1.jsx)(markdown_with_mentions_1.MarkdownWithMentions, { content: tool.detailedDescription })] }));
15
+ : "Unresolved" }), (0, jsx_runtime_1.jsx)("dt", { children: "Member" }), (0, jsx_runtime_1.jsx)("dd", { children: target?.toolName ?? tool.toolName ?? tool.name }), (0, jsx_runtime_1.jsx)("dt", { children: "Provider" }), (0, jsx_runtime_1.jsx)("dd", { children: entry?.provider?.activePackageId ?? "Unavailable" }), (0, jsx_runtime_1.jsx)("dt", { children: "Dispatch" }), (0, jsx_runtime_1.jsxs)("dd", { children: [entry?.availability.dispatch ?? "Host catalog unavailable", entry?.availability.message && `: ${entry.availability.message}`] }), (0, jsx_runtime_1.jsx)("dt", { children: "Live access" }), (0, jsx_runtime_1.jsx)("dd", { children: level === undefined ? "Unavailable" : `${(0, peers_sdk_1.getAccessLevelLabel)(level)} (${level})` })] }), (0, jsx_runtime_1.jsx)(markdown_with_mentions_1.MarkdownWithMentions, { content: entry?.usageDescription ?? tool.usageDescription }), tool.detailedDescription && (0, jsx_runtime_1.jsx)(markdown_with_mentions_1.MarkdownWithMentions, { content: tool.detailedDescription })] }));
16
16
  };
17
17
  exports.ToolInfo = ToolInfo;
@@ -1,5 +1,5 @@
1
1
  import type { ITool, IToolCatalogEntry } from "@peers-app/peers-sdk";
2
- /** Read-only contract field tables, plus persisted assistant runner configuration. */
2
+ /** Read-only contract field tables. */
3
3
  export declare const ToolSchema: ({ tool, entry }: {
4
4
  tool: ITool;
5
5
  entry?: IToolCatalogEntry;
@@ -5,6 +5,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  function FieldTable({ label, schema }) {
6
6
  return ((0, jsx_runtime_1.jsxs)("section", { className: "mb-4", children: [(0, jsx_runtime_1.jsx)("h6", { children: label }), !schema?.fields.length ? ((0, jsx_runtime_1.jsx)("p", { children: "No fields" })) : ((0, jsx_runtime_1.jsxs)("table", { className: "table table-sm", children: [(0, jsx_runtime_1.jsx)("thead", { children: (0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { children: "Name" }), (0, jsx_runtime_1.jsx)("th", { children: "Type" }), (0, jsx_runtime_1.jsx)("th", { children: "Required" }), (0, jsx_runtime_1.jsx)("th", { children: "Description" })] }) }), (0, jsx_runtime_1.jsx)("tbody", { children: schema.fields.map((field) => ((0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("td", { children: field.name }), (0, jsx_runtime_1.jsxs)("td", { children: [field.type, field.isArray ? "[]" : ""] }), (0, jsx_runtime_1.jsx)("td", { children: field.optional ? "No" : "Yes" }), (0, jsx_runtime_1.jsx)("td", { children: field.description })] }, field.name))) })] }))] }));
7
7
  }
8
- /** Read-only contract field tables, plus persisted assistant runner configuration. */
9
- const ToolSchema = ({ tool, entry }) => ((0, jsx_runtime_1.jsxs)("div", { children: [tool.isAssistantRunner && (0, jsx_runtime_1.jsx)(FieldTable, { label: "Config Schema", schema: tool.configSchema }), (0, jsx_runtime_1.jsx)(FieldTable, { label: "Input Schema", schema: entry?.inputSchema ?? tool.inputSchema }), (0, jsx_runtime_1.jsx)(FieldTable, { label: "Output Schema", schema: entry?.outputSchema ?? tool.outputSchema })] }));
8
+ /** Read-only contract field tables. */
9
+ const ToolSchema = ({ tool, entry }) => ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(FieldTable, { label: "Input Schema", schema: entry?.inputSchema ?? tool.inputSchema }), (0, jsx_runtime_1.jsx)(FieldTable, { label: "Output Schema", schema: entry?.outputSchema ?? tool.outputSchema })] }));
10
10
  exports.ToolSchema = ToolSchema;
@@ -1,18 +1,18 @@
1
1
  import type { IAppNav } from "@peers-app/peers-sdk";
2
2
  import type { IPackageWithNavs } from "../ui-router/routes-loader";
3
- export { assistantsApp } from "./assistants.app";
4
3
  export { consoleLogsApp } from "./console-logs.app";
5
4
  export { dataExplorerApp } from "./data-explorer.app";
6
5
  export { identityApp } from "./identity.app";
7
6
  export { mobileSettingsApp } from "./mobile-settings.app";
8
7
  export { networkViewerApp } from "./network-viewer.app";
8
+ export { notificationsApp } from "./notifications.app";
9
9
  export { packagesApp } from "./packages.app";
10
10
  export { searchApp } from "./search.app";
11
11
  export { settingsApp } from "./settings.app";
12
- export { threadsApp } from "./threads.app";
13
12
  export { toolsApp } from "./tools.app";
14
13
  export { typesApp } from "./types.app";
15
14
  export { variablesApp } from "./variables.app";
16
- export { workflowsApp } from "./workflows.app";
15
+ /** Every built-in app, in launcher order. Mobile Settings appears only in React Native. */
17
16
  export declare const systemApps: IAppNav[];
17
+ /** Virtual package that holds {@link systemApps}, so tabs and search treat them like packages. */
18
18
  export declare const systemPackage: IPackageWithNavs;
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.systemPackage = exports.systemApps = exports.workflowsApp = exports.variablesApp = exports.typesApp = exports.toolsApp = exports.threadsApp = exports.settingsApp = exports.searchApp = exports.packagesApp = exports.networkViewerApp = exports.mobileSettingsApp = exports.identityApp = exports.dataExplorerApp = exports.consoleLogsApp = exports.assistantsApp = void 0;
4
- var assistants_app_1 = require("./assistants.app");
5
- Object.defineProperty(exports, "assistantsApp", { enumerable: true, get: function () { return assistants_app_1.assistantsApp; } });
3
+ exports.systemPackage = exports.systemApps = exports.variablesApp = exports.typesApp = exports.toolsApp = exports.settingsApp = exports.searchApp = exports.packagesApp = exports.notificationsApp = exports.networkViewerApp = exports.mobileSettingsApp = exports.identityApp = exports.dataExplorerApp = exports.consoleLogsApp = void 0;
6
4
  var console_logs_app_1 = require("./console-logs.app");
7
5
  Object.defineProperty(exports, "consoleLogsApp", { enumerable: true, get: function () { return console_logs_app_1.consoleLogsApp; } });
8
6
  var data_explorer_app_1 = require("./data-explorer.app");
@@ -13,6 +11,8 @@ var mobile_settings_app_1 = require("./mobile-settings.app");
13
11
  Object.defineProperty(exports, "mobileSettingsApp", { enumerable: true, get: function () { return mobile_settings_app_1.mobileSettingsApp; } });
14
12
  var network_viewer_app_1 = require("./network-viewer.app");
15
13
  Object.defineProperty(exports, "networkViewerApp", { enumerable: true, get: function () { return network_viewer_app_1.networkViewerApp; } });
14
+ var notifications_app_1 = require("./notifications.app");
15
+ Object.defineProperty(exports, "notificationsApp", { enumerable: true, get: function () { return notifications_app_1.notificationsApp; } });
16
16
  var packages_app_1 = require("./packages.app");
17
17
  Object.defineProperty(exports, "packagesApp", { enumerable: true, get: function () { return packages_app_1.packagesApp; } });
18
18
  // Import all system apps
@@ -20,40 +20,33 @@ var search_app_1 = require("./search.app");
20
20
  Object.defineProperty(exports, "searchApp", { enumerable: true, get: function () { return search_app_1.searchApp; } });
21
21
  var settings_app_1 = require("./settings.app");
22
22
  Object.defineProperty(exports, "settingsApp", { enumerable: true, get: function () { return settings_app_1.settingsApp; } });
23
- var threads_app_1 = require("./threads.app");
24
- Object.defineProperty(exports, "threadsApp", { enumerable: true, get: function () { return threads_app_1.threadsApp; } });
25
23
  var tools_app_1 = require("./tools.app");
26
24
  Object.defineProperty(exports, "toolsApp", { enumerable: true, get: function () { return tools_app_1.toolsApp; } });
27
25
  var types_app_1 = require("./types.app");
28
26
  Object.defineProperty(exports, "typesApp", { enumerable: true, get: function () { return types_app_1.typesApp; } });
29
27
  var variables_app_1 = require("./variables.app");
30
28
  Object.defineProperty(exports, "variablesApp", { enumerable: true, get: function () { return variables_app_1.variablesApp; } });
31
- var workflows_app_1 = require("./workflows.app");
32
- Object.defineProperty(exports, "workflowsApp", { enumerable: true, get: function () { return workflows_app_1.workflowsApp; } });
33
- const assistants_app_2 = require("./assistants.app");
34
29
  const console_logs_app_2 = require("./console-logs.app");
35
30
  const data_explorer_app_2 = require("./data-explorer.app");
36
31
  const identity_app_2 = require("./identity.app");
37
32
  const mobile_settings_app_2 = require("./mobile-settings.app");
38
33
  const network_viewer_app_2 = require("./network-viewer.app");
34
+ const notifications_app_2 = require("./notifications.app");
39
35
  const packages_app_2 = require("./packages.app");
40
36
  // Import individual apps
41
37
  const search_app_2 = require("./search.app");
42
38
  const settings_app_2 = require("./settings.app");
43
- const threads_app_2 = require("./threads.app");
44
39
  const tools_app_2 = require("./tools.app");
45
40
  const types_app_2 = require("./types.app");
46
41
  const variables_app_2 = require("./variables.app");
47
- const workflows_app_2 = require("./workflows.app");
48
42
  // Helper to check if running in React Native
49
43
  function isReactNative() {
50
44
  return typeof window.__NATIVE_THEME !== "undefined";
51
45
  }
52
- // Collection of all system apps
46
+ /** Every built-in app, in launcher order. Mobile Settings appears only in React Native. */
53
47
  exports.systemApps = [
54
48
  // Core Navigation & Search
55
49
  search_app_2.searchApp,
56
- threads_app_2.threadsApp,
57
50
  // System Tools & Debugging
58
51
  network_viewer_app_2.networkViewerApp,
59
52
  console_logs_app_2.consoleLogsApp,
@@ -62,16 +55,15 @@ exports.systemApps = [
62
55
  types_app_2.typesApp,
63
56
  variables_app_2.variablesApp,
64
57
  tools_app_2.toolsApp,
65
- workflows_app_2.workflowsApp,
66
- assistants_app_2.assistantsApp,
67
58
  packages_app_2.packagesApp,
68
59
  identity_app_2.identityApp,
69
60
  // User & Settings Apps
61
+ notifications_app_2.notificationsApp,
70
62
  settings_app_2.settingsApp,
71
63
  // Mobile Settings (only in React Native)
72
64
  ...(isReactNative() ? [mobile_settings_app_2.mobileSettingsApp] : []),
73
65
  ];
74
- // Virtual system package for tabs integration
66
+ /** Virtual package that holds {@link systemApps}, so tabs and search treat them like packages. */
75
67
  exports.systemPackage = {
76
68
  packageId: "system-apps",
77
69
  name: "System Apps",
@@ -0,0 +1,3 @@
1
+ import type { IAppNav } from "@peers-app/peers-sdk";
2
+ /** The built-in inbox, history, and notification settings app. */
3
+ export declare const notificationsApp: IAppNav;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.notificationsApp = void 0;
4
+ /** The built-in inbox, history, and notification settings app. */
5
+ exports.notificationsApp = {
6
+ name: "Notifications",
7
+ iconClassName: "bi-bell-fill",
8
+ navigationPath: "notifications",
9
+ };
@@ -16,6 +16,7 @@ const react_1 = require("react");
16
16
  const app_update_controls_1 = require("../app-updates/app-update-controls");
17
17
  const app_updates_consumer_1 = require("../app-updates/app-updates-consumer");
18
18
  const use_app_update_status_1 = require("../app-updates/use-app-update-status");
19
+ const notification_bell_1 = require("../notifications/notification-bell");
19
20
  const identity_routes_1 = require("../screens/identity/identity-routes");
20
21
  const network_viewer_ipc_1 = require("../screens/network-viewer/network-viewer-ipc");
21
22
  const network_viewer_section_1 = require("../screens/network-viewer/network-viewer-section");
@@ -395,5 +396,5 @@ function NetworkStatusIndicator({ compact = false }) {
395
396
  }
396
397
  /** Fixed tabs-strip area for built-in shell indicators. */
397
398
  function TabsStripIndicators({ compact = false }) {
398
- return ((0, jsx_runtime_1.jsx)("div", { className: "d-flex align-items-center flex-shrink-0", role: "group", "aria-label": "Application status", children: (0, jsx_runtime_1.jsx)(NetworkStatusIndicator, { compact: compact }) }));
399
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "d-flex align-items-center flex-shrink-0", role: "group", "aria-label": "Application status", children: [(0, jsx_runtime_1.jsx)(notification_bell_1.NotificationBell, { compact: compact }), (0, jsx_runtime_1.jsx)(NetworkStatusIndicator, { compact: compact })] }));
399
400
  }
@@ -64,6 +64,7 @@ export declare const handleMainPathChanged: (_oldPath: string, newPath: string,
64
64
  *
65
65
  * Contacts, Groups, and Devices tabs from before the Identity app become one
66
66
  * Identity tab. The active tab is kept when it is one of those duplicates.
67
+ * Tabs of removed apps are dropped.
67
68
  *
68
69
  * @param tabs - Persisted tabs.
69
70
  * @param activeId - Persisted active tab id.
@@ -150,17 +150,24 @@ const handleMainPathChanged = (_oldPath, newPath, _setNewMainPath) => {
150
150
  navigateTo(newPath);
151
151
  };
152
152
  exports.handleMainPathChanged = handleMainPathChanged;
153
+ /** Routes of the built-in Threads, Assistants, and Workflows apps, which Peers no longer has. */
154
+ const REMOVED_APP_ROUTE = /^(threads|channel|assistants|workflows)(\/|$)/;
155
+ function isRemovedAppRoute(path) {
156
+ return REMOVED_APP_ROUTE.test((0, identity_routes_1.parseRoute)(path).pathname.toLowerCase());
157
+ }
153
158
  /**
154
159
  * Rewrite stored tabs onto canonical routes.
155
160
  *
156
161
  * Contacts, Groups, and Devices tabs from before the Identity app become one
157
162
  * Identity tab. The active tab is kept when it is one of those duplicates.
163
+ * Tabs of removed apps are dropped.
158
164
  *
159
165
  * @param tabs - Persisted tabs.
160
166
  * @param activeId - Persisted active tab id.
161
167
  */
162
168
  function restoreNavigationState(tabs, activeId) {
163
- const migrated = (tabs.length > 0 ? tabs : [exports.launcherApp]).map(migrateStoredTab);
169
+ const kept = tabs.filter((tab) => tab.tabId === "launcher" || !isRemovedAppRoute(tab.path));
170
+ const migrated = (kept.length > 0 ? kept : [exports.launcherApp]).map(migrateStoredTab);
164
171
  const merged = mergeIdentityTabs(migrated, activeId);
165
172
  const activeExists = merged.tabs.some((tab) => tab.tabId === merged.activeId);
166
173
  return {
@@ -355,7 +362,7 @@ function migrateRecentPaths(paths) {
355
362
  const next = [];
356
363
  for (const path of paths) {
357
364
  const migrated = migrateRecentPath(path);
358
- if (!migrated || seen.has(migrated)) {
365
+ if (!migrated || seen.has(migrated) || isRemovedAppRoute(migrated)) {
359
366
  continue;
360
367
  }
361
368
  seen.add(migrated);
package/dist/utils.d.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  /** Plain text content of an HTML string (parsed with `DOMParser`, so browser-only). */
2
2
  export declare function htmlToText(html: string): string;
3
- /** Replaces `<@type:name:id>` / `<$type:name:id>` mentions with the readable name, underscores as spaces. */
4
- export declare function stripMentions(text: string): string;
5
3
  /** Sanitizes HTML with DOMPurify, collapses repeated blank paragraphs, and drops a trailing one. */
6
4
  export declare function trimAndSanitizeHtml(value: string): string;
7
5
  /** The `AsyncFunction` constructor, for compiling async code from a string. */
package/dist/utils.js CHANGED
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AsyncFunction = void 0;
7
7
  exports.htmlToText = htmlToText;
8
- exports.stripMentions = stripMentions;
9
8
  exports.trimAndSanitizeHtml = trimAndSanitizeHtml;
10
9
  exports.jsAsync = jsAsync;
11
10
  const dompurify_1 = __importDefault(require("dompurify"));
@@ -15,14 +14,6 @@ function htmlToText(html) {
15
14
  const doc = new DOMParser().parseFromString(html, "text/html");
16
15
  return doc.body.textContent || "";
17
16
  }
18
- /** Replaces `<@type:name:id>` / `<$type:name:id>` mentions with the readable name, underscores as spaces. */
19
- function stripMentions(text) {
20
- // Replace <type:name:id> with just the readable name part
21
- // Convert underscores to spaces for better readability
22
- return text.replace(/<[@$]([^:]+):([^:]+):([^>]+)>/g, (_match, _type, name, _id) => {
23
- return name.replace(/_/g, " ");
24
- });
25
- }
26
17
  /** Sanitizes HTML with DOMPurify, collapses repeated blank paragraphs, and drops a trailing one. */
27
18
  function trimAndSanitizeHtml(value) {
28
19
  let sanitizedValue = dompurify_1.default.sanitize(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peers-app/peers-ui",
3
- "version": "0.32.2",
3
+ "version": "0.33.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/peers-app/peers-ui.git"
@@ -36,7 +36,7 @@
36
36
  "lint:fix": "biome check --write ."
37
37
  },
38
38
  "peerDependencies": {
39
- "@peers-app/peers-sdk": "^0.32.2",
39
+ "@peers-app/peers-sdk": "^0.33.0",
40
40
  "bootstrap": "^5.3.3",
41
41
  "react": "^18.0.0",
42
42
  "react-dom": "^18.0.0"
@@ -47,7 +47,7 @@
47
47
  "@babel/preset-react": "^7.24.1",
48
48
  "@babel/preset-typescript": "^7.27.1",
49
49
  "@biomejs/biome": "2.3.11",
50
- "@peers-app/peers-sdk": "0.32.2",
50
+ "@peers-app/peers-sdk": "0.33.0",
51
51
  "@testing-library/dom": "^10.4.0",
52
52
  "@testing-library/jest-dom": "^6.6.3",
53
53
  "@testing-library/react": "^16.3.0",
@@ -1,10 +0,0 @@
1
- import { type Observable } from "@peers-app/peers-sdk";
2
- interface AccessLevelFieldProps {
3
- value: number | Observable<number | undefined>;
4
- disabled?: boolean;
5
- }
6
- /**
7
- * Named-preset plus custom 0–100 editor for tool and Assistant access levels.
8
- */
9
- export declare function AccessLevelField(props: AccessLevelFieldProps): import("react/jsx-runtime").JSX.Element;
10
- export {};