@circuitwall/jarela 1.9.1 → 1.9.3

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 (72) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +2 -2
  3. package/.next/standalone/.next/build-manifest.json +2 -2
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/_not-found.html +2 -2
  16. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  17. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  18. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  19. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  20. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  21. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  22. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  23. package/.next/standalone/.next/server/app/page.js +3989 -3805
  24. package/.next/standalone/.next/server/app/page.js.map +1 -1
  25. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  26. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  27. package/.next/standalone/.next/server/app-paths-manifest.json +2 -2
  28. package/.next/standalone/.next/server/chunks/1813.js.map +1 -1
  29. package/.next/standalone/.next/server/chunks/319.js.map +1 -1
  30. package/.next/standalone/.next/server/chunks/4045.js.map +1 -1
  31. package/.next/standalone/.next/server/chunks/4741.js.map +1 -1
  32. package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
  33. package/.next/standalone/.next/server/pages/404.html +2 -2
  34. package/.next/standalone/.next/server/pages/500.html +1 -1
  35. package/.next/standalone/.next/server/proxy.js.map +1 -1
  36. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  37. package/.next/standalone/.next/static/chunks/2747-4a6287cacd57d231.js.map +1 -1
  38. package/.next/standalone/.next/static/chunks/3457-6d51726379cee3b7.js.map +1 -1
  39. package/.next/standalone/.next/static/chunks/{1998-31a617131197a83a.js → 962-fe2372e00f85e23a.js} +111 -2
  40. package/.next/standalone/.next/static/chunks/962-fe2372e00f85e23a.js.map +1 -0
  41. package/.next/standalone/.next/static/chunks/app/layout-84c6f211a7a1ca36.js.map +1 -1
  42. package/.next/standalone/.next/static/chunks/app/{page-cd662565eba5ef59.js → page-c5b9f4407416c3f9.js} +3493 -3390
  43. package/.next/standalone/.next/static/chunks/app/page-c5b9f4407416c3f9.js.map +1 -0
  44. package/.next/standalone/.next/static/chunks/main-3eb94471f04b2368.js.map +1 -1
  45. package/.next/standalone/.next/static/css/b8e04d59a2bfff04.css +5 -0
  46. package/.next/standalone/.next/static/css/b8e04d59a2bfff04.css.map +1 -0
  47. package/.next/standalone/package.json +1 -1
  48. package/CHANGELOG.md +47 -0
  49. package/README.md +6 -6
  50. package/components/agents/agent-editor/VoiceFields.tsx +1 -1
  51. package/components/credentials/AddCredentialDialog.tsx +30 -141
  52. package/components/credentials/CredentialsPanel.tsx +146 -49
  53. package/components/{integrations/IntegrationsPanel.tsx → credentials/IntegrationCard.tsx} +9 -168
  54. package/components/documents/AddSourceForm.tsx +4 -4
  55. package/components/documents/DocumentsPanel.tsx +1 -1
  56. package/components/integrations/NetworkPanel.tsx +104 -0
  57. package/components/layout/AppShell.tsx +6 -0
  58. package/components/layout/MenuPanel.tsx +15 -91
  59. package/components/profile/ProfileEditor.tsx +1 -1
  60. package/components/proposals/ApprovalsBanner.tsx +2 -2
  61. package/components/settings/AppearancePanel.tsx +93 -0
  62. package/components/settings/SettingsPanel.tsx +94 -0
  63. package/contexts/AppContext.tsx +1 -1
  64. package/hooks/useUrlSync.ts +1 -1
  65. package/lib/ui/navigate.ts +1 -1
  66. package/package.json +1 -1
  67. package/.next/standalone/.next/static/chunks/1998-31a617131197a83a.js.map +0 -1
  68. package/.next/standalone/.next/static/chunks/app/page-cd662565eba5ef59.js.map +0 -1
  69. package/.next/standalone/.next/static/css/11aaed27d2989cc1.css +0 -5
  70. package/.next/standalone/.next/static/css/11aaed27d2989cc1.css.map +0 -1
  71. /package/.next/standalone/.next/static/{tTk-KuLcT7O-E0z6PdMmO → EOkgU73YJOpR-vFcKMgL0}/_buildManifest.js +0 -0
  72. /package/.next/standalone/.next/static/{tTk-KuLcT7O-E0z6PdMmO → EOkgU73YJOpR-vFcKMgL0}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"4045.js","mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACCoD;AACI;AAC8B;AACjB;AAC9C;AAEhB,MAAMK,WAAqB;IAChCC,OAAOH,yEAAUA;IACjBI,aAAaH,gFAAiBA;IAC9BI,UAAU;IACVC,OAAO;QACL,oEAAoE;QACpE,oEAAoE;QACpE,kEAAkE;QAClEC,MAAM;YACJ;gBAAEC,KAAK;gBAAgBC,MAAM;YAAgB;YAC7C;gBAAED,K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AAEjF,EAAE,iEAAe;AACjB,uBAAuB;AACvB,qBAAqB,8FAAmB;;AAExC;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;+ECRkC;AAElC;;;;CAIC,GACM,SAASrG;uDACdwC,gDAASA,CAAC;QACR,IAAI,IAA6B,EAAE;QACnC,IAAI,CAAE,oBAAmBqE,SAAQ,GAAI;QAErC,IAAIP,KAAqC,EAAE,EAuB1C;QAED,0DAA0D;QAC1D,MAAMyB,WAAW;YACflB,UAAUG,aAAa,CACpBe,QAAQ,CAAC,UAAU;gBAAEC,OAAO;YAAI,GAChCP,KAAK,CAAC,CAACQ;gBACN,oDAAoD;gBACpDC,QAAQC,IAAI,CAAC,6BAA6BF;YAC5C;QACJ;QACA,IAAI,yBAAyBnE,QAAQ;YAClCA,OACEsE,mBAAmB,CAACL;QACzB,OAAO;YACLM,WAAWN,UAAU;QACvB;IACF,GAAG,EAAE;IACL,OAAO;AACT;;;;;;;;ACxDA,sGAAqI;AACrI;AACA,sGAA4H;AAC5H;AACA,sGAA+H;AAC/H;AACA,sGAAoJ;AACpJ;AACA,sGAA8H;AAC9H;AACA,sGAA6I;AAC7I;AACA,sGAAgI;AAChI;AACA,sGAA8H;;;;;;;;ACd9H,sGAAqI","sources":["webpack://@circuitwall/jarela/_N_E/./components/ui/ServiceWorkerRegistration.tsx/__nextjs-internal-proxy.mjs","webpack://@circuitwall/jarela/_N_E/./contexts/AppContext.tsx/__nextjs-internal-proxy.mjs","webpack://@circuitwall/jarela/_N_E/./contexts/ThemeContext.tsx/__nextjs-internal-proxy.mjs","webpack://@circuitwall/jarela/./app/layout.tsx","webpack://@circuitwall/jarela/./contexts/AppContext.tsx","webpack://@circuitwall/jarela/?5364","webpack://@circuitwall/jarela/./contexts/ThemeContext.tsx","webpack://@circuitwall/jarela/./lib/env/app-config.ts","webpack://@circuitwall/jarela/?e859","webpack://@circuitwall/jarela/?cd2b","webpack://@circuitwall/jarela/?ea39","webpack://@circuitwall/jarela/./app/globals.css","webpack://@circuitwall/jarela/./app/icon.svg","webpack://@circuitwall/jarela/./components/ui/ServiceWorkerRegistration.tsx","webpack://@circuitwall/jarela/?7241","webpack://@circuitwall/jarela/?c6d3"],"sourcesContent":["// This file is generated by the Webpack next-flight-loader.\nimport { registerClientReference } from \"react-server-dom-webpack/server\";\nexport const ServiceWorkerRegistration = registerClientReference(\nfunction() { throw new Error(\"Attempted to call ServiceWorkerRegistration() from the server but ServiceWorkerRegistration is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n\"/home/runner/work/jarela/jarela/components/ui/ServiceWorkerRegistration.tsx\",\n\"ServiceWorkerRegistration\",\n);","// This file is generated by the Webpack next-flight-loader.\nimport { registerClientReference } from \"react-server-dom-webpack/server\";\nexport const AppProvider = registerClientReference(\nfunction() { throw new Error(\"Attempted to call AppProvider() from the server but AppProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n\"/home/runner/work/jarela/jarela/contexts/AppContext.tsx\",\n\"AppProvider\",\n);export const useAppContext = registerClientReference(\nfunction() { throw new Error(\"Attempted to call useAppContext() from the server but useAppContext is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n\"/home/runner/work/jarela/jarela/contexts/AppContext.tsx\",\n\"useAppContext\",\n);","// This file is generated by the Webpack next-flight-loader.\nimport { registerClientReference } from \"react-server-dom-webpack/server\";\nexport const ThemeProvider = registerClientReference(\nfunction() { throw new Error(\"Attempted to call ThemeProvider() from the server but ThemeProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n\"/home/runner/work/jarela/jarela/contexts/ThemeContext.tsx\",\n\"ThemeProvider\",\n);export const useTheme = registerClientReference(\nfunction() { throw new Error(\"Attempted to call useTheme() from the server but useTheme is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n\"/home/runner/work/jarela/jarela/contexts/ThemeContext.tsx\",\n\"useTheme\",\n);","import type { Metadata, Viewport } from \"next\";\nimport { AppProvider } from \"@/contexts/AppContext\";\nimport { ThemeProvider } from \"@/contexts/ThemeContext\";\nimport { ServiceWorkerRegistration } from \"@/components/ui/ServiceWorkerRegistration\";\nimport { getAppName, getAppDescription } from \"@/lib/env/app-config\";\nimport \"./globals.css\";\n\nexport const metadata: Metadata = {\n title: getAppName(),\n description: getAppDescription(),\n manifest: \"/manifest.json\",\n icons: {\n // SVG favicon is theme-aware (prefers-color-scheme inside the SVG),\n // so it flips between navy J (light UI) and sky J (dark UI) without\n // shipping two payloads. PNG/ICO fall through for older browsers.\n icon: [\n { url: \"/favicon.svg\", type: \"image/svg+xml\" },\n { url: \"/favicon.ico\", sizes: \"any\" },\n { url: \"/icon-192.png\", type: \"image/png\", sizes: \"192x192\" },\n { url: \"/icon-512.png\", type: \"image/png\", sizes: \"512x512\" },\n ],\n // iOS reads ONE apple-touch-icon and ignores prefers-color-scheme,\n // so we hand it the dark navy variant (reads on any wallpaper). The\n // light-bg companion is shipped at /apple-touch-icon-light.png for\n // anyone who wants to opt in via a custom <link> tag.\n apple: [{ url: \"/apple-touch-icon.png\", sizes: \"180x180\" }],\n },\n // iOS standalone-mode PWA chrome. Safari ignores the manifest's\n // `theme_color` once the app is installed to the home screen and only\n // honors these Apple-specific tags. `black-translucent` is the only\n // value that produces an arbitrary status-bar color: the bar overlays\n // the page and whatever paints under it (the AppShell top bar, which\n // already pads itself with env(safe-area-inset-top) via --app-safe-top)\n // becomes the visible status-bar background. So the top bar's surface\n // color follows the active light/dark theme automatically.\n appleWebApp: {\n capable: true,\n title: getAppName(),\n statusBarStyle: \"black-translucent\",\n },\n};\n\n// Next 15+ requires themeColor (and color-scheme, viewport, etc.) to live in\n// the viewport export, not metadata. The /_not-found warning came from Next\n// inheriting this same layout — moving it here fixes both routes at once.\n// Match the installed-PWA window chrome (desktop title bar, mobile address\n// bar, splash) to the active surface color. Two entries let the OS pick\n// based on prefers-color-scheme; the runtime ThemeContext / pre-paint\n// script overrides this single <meta name=\"theme-color\"> tag when the\n// user picks an explicit light/dark mode.\nexport const viewport: Viewport = {\n themeColor: [\n { media: \"(prefers-color-scheme: light)\", color: \"#ffffff\" },\n { media: \"(prefers-color-scheme: dark)\", color: \"#09090b\" },\n ],\n width: \"device-width\",\n initialScale: 1,\n maximumScale: 1,\n viewportFit: \"cover\",\n // Chromium-only: shrink the layout viewport when the OS keyboard\n // appears, so `100dvh` automatically sits above the keyboard. Safari\n // doesn't implement this key (it logs a benign console warning, see\n // tests/e2e/smoke.spec.ts allow-list) and instead `dvh` itself already\n // tracks the keyboard on iOS 16.4+ PWA, so no extra JS is needed.\n interactiveWidget: \"resizes-content\",\n};\n\n// Pre-paint script: reads the persisted theme and sets `data-theme` on\n// <html> before the first paint, so light-mode users don't flash dark on\n// every page load. Inlined via dangerouslySetInnerHTML — the canonical\n// App Router pattern. (Earlier attempt routed this through next/script,\n// but under Next 16 + React 19.2 that import resolves to a Promise in\n// some module-resolution paths, tripping \"Element type is invalid\".)\n// Falls back to \"system\", which then defers to prefers-color-scheme.\nconst themeBootstrap = `(() => {\n var LIGHT = \"#ffffff\", DARK = \"#09090b\";\n function resolve(t) {\n if (t === \"light\") return LIGHT;\n if (t === \"dark\") return DARK;\n try {\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? DARK : LIGHT;\n } catch (e) { return DARK; }\n }\n try {\n var t = localStorage.getItem(\"jarela-theme\");\n if (t !== \"light\" && t !== \"dark\" && t !== \"system\") t = \"system\";\n document.documentElement.setAttribute(\"data-theme\", t);\n // Collapse any media-scoped theme-color metas Next emits to a single tag\n // so the PWA window chrome matches the user's explicit choice (not just\n // prefers-color-scheme). ThemeContext keeps this in sync on change.\n var metas = document.querySelectorAll('meta[name=\"theme-color\"]');\n for (var i = 1; i < metas.length; i++) metas[i].parentNode.removeChild(metas[i]);\n var meta = metas[0];\n if (!meta) {\n meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"theme-color\");\n document.head.appendChild(meta);\n }\n meta.removeAttribute(\"media\");\n meta.setAttribute(\"content\", resolve(t));\n } catch (e) {\n document.documentElement.setAttribute(\"data-theme\", \"system\");\n }\n})();`;\n\n// iOS Safari standalone-PWA viewport-height shim. On iPhones in\n// \"Add to Home Screen\" mode iOS reports window.innerHeight (and 100dvh\n// resolves against it) ~safe-area-inset-top pixels SHORTER than the\n// physical screen — about 59px on iPhone, 32px on iPad. That leaves a\n// gap below the app that the UA paints with the color-scheme default\n// (the white strip the user sees above the home-indicator). dvh, vh,\n// position:fixed inset:0, -webkit-fill-available — none of them fill\n// the physical screen in standalone PWA mode.\n//\n// The community-validated fix (boolinator/ios-pwa-bottom-bar-fix.md,\n// stackoverflow.com/q/79902310) is a JS shim: read visualViewport.height,\n// add safe-area-inset-top back when the gap matches the bug signature,\n// and write the corrected pixel value into --actual-vh on <html>.\n// CSS then sizes the doc with var(--actual-vh, 100dvh) so non-iOS\n// browsers keep using the standard primitive.\n//\n// Retries at 50/150/300/500/800/1200ms cover iOS's async safe-area\n// population on launch. visualViewport.resize, orientationchange, and\n// visibilitychange handle keyboard/rotation/app-switch.\nconst iosViewportBootstrap = `(() => {\n try {\n var isPWA = window.matchMedia('(display-mode: standalone)').matches\n || window.matchMedia('(display-mode: fullscreen)').matches\n || window.navigator.standalone === true;\n if (!isPWA) return;\n var last = 0;\n function safeTopPx() {\n var v = getComputedStyle(document.documentElement).getPropertyValue('--app-safe-top') || '';\n var n = parseFloat(v);\n return isNaN(n) ? 0 : n;\n }\n function isEditableFocused() {\n var ae = document.activeElement;\n if (!ae) return false;\n var tag = ae.tagName;\n return tag === 'INPUT' || tag === 'TEXTAREA' || ae.isContentEditable === true;\n }\n function apply() {\n var vv = window.visualViewport;\n var vh = (vv && vv.height) || window.innerHeight;\n // Keyboard-open detection: when iOS shows the on-screen keyboard,\n // visualViewport.height shrinks but window.innerHeight stays put.\n // Pairing that gap with editable-focus makes it model-agnostic -\n // no need to guess a keyboard height per device (SE ~216, 15 Pro\n // Max ~301, iPad floating ~120). 50px just filters URL-bar jitter.\n var keyboardOpen = isEditableFocused() && (window.innerHeight - vh) > 50;\n var isPortrait = window.innerHeight > window.innerWidth;\n // Skip the chin correction while the keyboard is up - otherwise we\n // inflate --actual-vh beyond the visible viewport and the input bar\n // ends up underneath the keyboard.\n if (!keyboardOpen && isPortrait) {\n var screenH = Math.max(window.screen.height, window.screen.width);\n if (screenH - vh > 15) {\n var top = safeTopPx();\n if (top > 0) vh += top;\n }\n }\n document.documentElement.style.setProperty('--actual-vh', vh + 'px');\n if (last > 0 && Math.abs(vh - last) > 30) {\n setTimeout(function () { window.dispatchEvent(new Event('resize')); }, 50);\n }\n last = vh;\n }\n apply();\n [50, 150, 300, 500, 800, 1200].forEach(function (ms) { setTimeout(apply, ms); });\n window.addEventListener('resize', apply);\n window.addEventListener('orientationchange', function () {\n setTimeout(apply, 100); setTimeout(apply, 300);\n });\n if (window.visualViewport) {\n window.visualViewport.addEventListener('resize', apply);\n window.visualViewport.addEventListener('scroll', apply);\n }\n // focusin/focusout can lead visualViewport.resize by ~100ms on\n // older iOS - recompute immediately so we don't render a bad frame.\n document.addEventListener('focusin', apply, true);\n document.addEventListener('focusout', apply, true);\n // iOS still scrolls the layout viewport up when the keyboard opens\n // to keep the focused input visible, even with html/body overflow:hidden.\n // Aggressive scroll-reset on focus events counteracts it (piclaw PWA.md\n // pattern, validated on iOS 26.x). Staggered timers cover the lag\n // between focus and iOS's scroll-into-view.\n function snapScroll() {\n if (window.scrollY !== 0 || window.pageYOffset !== 0) {\n window.scrollTo(0, 0);\n }\n }\n document.addEventListener('focusin', function () {\n snapScroll();\n [16, 50, 100, 200, 400].forEach(function (ms) { setTimeout(snapScroll, ms); });\n }, true);\n document.addEventListener('focusout', function () {\n [16, 50, 100, 200].forEach(function (ms) { setTimeout(snapScroll, ms); });\n }, true);\n if (window.visualViewport) {\n window.visualViewport.addEventListener('scroll', snapScroll);\n }\n window.addEventListener('scroll', snapScroll, { passive: true });\n document.addEventListener('visibilitychange', function () {\n if (!document.hidden) { setTimeout(apply, 50); setTimeout(apply, 200); }\n });\n } catch (e) { /* non-fatal: falls back to 100dvh */ }\n})();`;\n\nexport default function RootLayout({ children }: { children: React.ReactNode }) {\n return (\n <html lang=\"en\" data-theme=\"system\" suppressHydrationWarning>\n <head>\n <script dangerouslySetInnerHTML={{ __html: themeBootstrap }} />\n <script dangerouslySetInnerHTML={{ __html: iosViewportBootstrap }} />\n </head>\n <body>\n <ThemeProvider>\n <AppProvider>{children}</AppProvider>\n </ThemeProvider>\n <ServiceWorkerRegistration />\n </body>\n </html>\n );\n}\n","\"use client\";\nimport { createContext, useContext, useEffect, useReducer, type ReactNode } from \"react\";\n\nexport type ExperienceMode = \"essential\" | \"full\";\n\nconst EXPERIENCE_MODE_KEY = \"jarela.experience.mode\";\n\n// Back-compat: pre-rename builds stored \"normal\" / \"advanced\". Read those\n// values silently so an upgrade does not reset the user's choice.\nfunction parseStoredMode(raw: string | null): ExperienceMode | null {\n if (raw === \"essential\" || raw === \"normal\") return \"essential\";\n if (raw === \"full\" || raw === \"advanced\") return \"full\";\n return null;\n}\n\nexport type Tab = \"chat\" | \"dashboard\" | \"agents\" | \"memory\" | \"documents\" | \"models\" | \"credentials\" | \"mcp\" | \"extensions\" | \"tools\" | \"tasks\" | \"bridges\" | \"profile\" | \"harness\" | \"logs\" | \"env\";\n\ninterface AppState {\n activeThreadId: string | null;\n activeAgentId: string | null;\n activeTab: Tab;\n experienceMode: ExperienceMode;\n // Per-tab sub-selection (a sub-tab key under credentials, an mcp server name, an\n // agent uuid, a profile subsection slug, …). Settings panels read their\n // slot to scroll-to + highlight; the URL mirrors this via `?item=<id>`.\n selectedItem: Partial<Record<Tab, string>>;\n}\n\ntype Action =\n | { type: \"SELECT_THREAD\"; threadId: string; agentId: string }\n | { type: \"NEW_CHAT\" }\n | { type: \"SET_AGENT\"; agentId: string }\n | { type: \"SET_TAB\"; tab: Tab }\n | { type: \"SET_EXPERIENCE_MODE\"; mode: ExperienceMode }\n | { type: \"SET_SELECTION\"; tab: Tab; itemId: string | null };\n\nfunction reducer(state: AppState, action: Action): AppState {\n switch (action.type) {\n case \"SELECT_THREAD\":\n return { ...state, activeThreadId: action.threadId, activeAgentId: action.agentId, activeTab: \"chat\" };\n case \"NEW_CHAT\":\n return { ...state, activeThreadId: null, activeAgentId: null, activeTab: \"chat\" };\n case \"SET_AGENT\":\n return { ...state, activeAgentId: action.agentId };\n case \"SET_TAB\":\n return { ...state, activeTab: action.tab };\n case \"SET_EXPERIENCE_MODE\":\n return { ...state, experienceMode: action.mode };\n case \"SET_SELECTION\": {\n const next = { ...state.selectedItem };\n if (action.itemId == null) delete next[action.tab];\n else next[action.tab] = action.itemId;\n return { ...state, selectedItem: next };\n }\n }\n}\n\nconst AppContext = createContext<{ state: AppState; dispatch: React.Dispatch<Action> } | null>(null);\n\nexport function AppProvider({ children }: { children: ReactNode }) {\n const [state, dispatch] = useReducer(reducer, {\n activeThreadId: null,\n activeAgentId: null,\n activeTab: \"chat\",\n experienceMode: \"essential\",\n selectedItem: {},\n });\n\n useEffect(() => {\n try {\n const stored = parseStoredMode(window.localStorage.getItem(EXPERIENCE_MODE_KEY));\n if (stored) {\n dispatch({ type: \"SET_EXPERIENCE_MODE\", mode: stored });\n }\n } catch {\n // ignore storage failures\n }\n }, []);\n\n useEffect(() => {\n try {\n window.localStorage.setItem(EXPERIENCE_MODE_KEY, state.experienceMode);\n } catch {\n // ignore storage failures\n }\n }, [state.experienceMode]);\n\n return <AppContext.Provider value={{ state, dispatch }}>{children}</AppContext.Provider>;\n}\n\nexport function useAppContext() {\n const ctx = useContext(AppContext);\n if (!ctx) throw new Error(\"useAppContext must be used within AppProvider\");\n return ctx;\n}\n","import(/* webpackMode: \"eager\", webpackExports: [\"ServiceWorkerRegistration\"] */ \"/home/runner/work/jarela/jarela/components/ui/ServiceWorkerRegistration.tsx\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"AppProvider\"] */ \"/home/runner/work/jarela/jarela/contexts/AppContext.tsx\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"ThemeProvider\"] */ \"/home/runner/work/jarela/jarela/contexts/ThemeContext.tsx\");\n","\"use client\";\nimport { createContext, useCallback, useContext, useEffect, useState, type ReactNode } from \"react\";\n\nexport type Theme = \"light\" | \"dark\" | \"system\";\n\nconst STORAGE_KEY = \"jarela-theme\";\n\nfunction isTheme(v: unknown): v is Theme {\n return v === \"light\" || v === \"dark\" || v === \"system\";\n}\n\nfunction readStored(): Theme {\n if (typeof window === \"undefined\") return \"system\";\n try {\n const v = window.localStorage.getItem(STORAGE_KEY);\n return isTheme(v) ? v : \"system\";\n } catch {\n return \"system\";\n }\n}\n\nconst LIGHT_CHROME = \"#ffffff\";\nconst DARK_CHROME = \"#09090b\";\n\nfunction resolveChrome(theme: Theme): string {\n if (theme === \"light\") return LIGHT_CHROME;\n if (theme === \"dark\") return DARK_CHROME;\n if (typeof window === \"undefined\") return DARK_CHROME;\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? DARK_CHROME : LIGHT_CHROME;\n}\n\n// Keep the single <meta name=\"theme-color\"> tag (installed by the pre-paint\n// script in app/layout.tsx) aligned with the active surface so the PWA's\n// desktop title bar and mobile address bar match the theme.\nfunction syncChrome(theme: Theme) {\n if (typeof document === \"undefined\") return;\n const meta = document.querySelector('meta[name=\"theme-color\"]');\n if (meta) meta.setAttribute(\"content\", resolveChrome(theme));\n}\n\nfunction apply(theme: Theme) {\n if (typeof document === \"undefined\") return;\n document.documentElement.setAttribute(\"data-theme\", theme);\n syncChrome(theme);\n}\n\ninterface Ctx {\n theme: Theme;\n setTheme: (t: Theme) => void;\n}\n\nconst ThemeContext = createContext<Ctx | null>(null);\n\nexport function ThemeProvider({ children }: { children: ReactNode }) {\n // Initial state stays \"system\" on the server to match the pre-paint script,\n // which writes data-theme before React hydrates. The effect below syncs the\n // React state to whatever the script (or localStorage) decided.\n const [theme, setThemeState] = useState<Theme>(\"system\");\n\n useEffect(() => {\n const stored = readStored();\n setThemeState(stored);\n // When in \"system\" mode, mirror OS-level changes into the PWA chrome.\n if (typeof window === \"undefined\") return;\n const mq = window.matchMedia(\"(prefers-color-scheme: dark)\");\n const onChange = () => {\n if (readStored() === \"system\") syncChrome(\"system\");\n };\n mq.addEventListener?.(\"change\", onChange);\n return () => mq.removeEventListener?.(\"change\", onChange);\n }, []);\n\n const setTheme = useCallback((t: Theme) => {\n setThemeState(t);\n apply(t);\n try {\n window.localStorage.setItem(STORAGE_KEY, t);\n } catch {\n /* ignore quota / private-mode errors */\n }\n }, []);\n\n return <ThemeContext.Provider value={{ theme, setTheme }}>{children}</ThemeContext.Provider>;\n}\n\nexport function useTheme() {\n const ctx = useContext(ThemeContext);\n if (!ctx) throw new Error(\"useTheme must be used within ThemeProvider\");\n return ctx;\n}\n","// Branding knobs sourced from NEXT_PUBLIC_* env vars so forks can rebrand\n// the app without patching source. NEXT_PUBLIC_* is the right\n// channel here because Next.js inlines these at build time, which lets\n// client components read them directly (no React Context, no server\n// round-trip). Server-only modules read the same keys at runtime.\n//\n// Keep this module client-safe — no Node-only imports, no DB/FS access.\n\nconst DEFAULT_APP_NAME = \"Jarela\";\nconst DEFAULT_APP_DESCRIPTION = \"Jarela — local chat interface for LangGraph agents\";\nconst DEFAULT_ISSUE_URL = \"https://github.com/CircuitWall/jarela/issues/new\";\n\nexport function getAppName(): string {\n return process.env.NEXT_PUBLIC_APP_NAME?.trim() || DEFAULT_APP_NAME;\n}\n\nexport function getAppDescription(): string {\n return process.env.NEXT_PUBLIC_APP_DESCRIPTION?.trim() || DEFAULT_APP_DESCRIPTION;\n}\n\nexport function getAppIssueUrl(): string {\n return process.env.NEXT_PUBLIC_APP_ISSUE_URL?.trim() || DEFAULT_ISSUE_URL;\n}\n","import(/* webpackMode: \"eager\", webpackExports: [\"ServiceWorkerRegistration\"] */ \"/home/runner/work/jarela/jarela/components/ui/ServiceWorkerRegistration.tsx\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"AppProvider\"] */ \"/home/runner/work/jarela/jarela/contexts/AppContext.tsx\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"ThemeProvider\"] */ \"/home/runner/work/jarela/jarela/contexts/ThemeContext.tsx\");\n","import(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/builtin/global-error.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/client-page.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/client-segment.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/layout-router.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/render-from-template-context.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/lib/framework/boundary-components.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/lib/metadata/generate/icon-mark.js\");\n","import(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/builtin/global-error.js\");\n",""," import { fillMetadataSegment } from 'next/dist/lib/metadata/get-metadata-route'\n\n export default async (props) => {\n const imageData = {\"type\":\"image/svg+xml\",\"sizes\":\"any\"}\n const imageUrl = fillMetadataSegment(\".\", await props.params, \"icon.svg\", true)\n\n return [{\n ...imageData,\n url: imageUrl + \"?44694c2d5379230a\",\n }]\n }","\"use client\";\n\nimport { useEffect } from \"react\";\n\n/**\n * Registers the Serwist-generated service worker. Replaces the auto-injected\n * registration script that next-pwa used to emit. Only runs in production\n * (the SW is disabled in dev by withSerwist).\n */\nexport function ServiceWorkerRegistration() {\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n if (!(\"serviceWorker\" in navigator)) return;\n\n if (process.env.NODE_ENV !== \"production\") {\n // Dev mode safety: if a previous production build registered a SW,\n // it can keep serving stale assets even though SW is disabled now.\n // Purge registrations + caches once per tab session.\n const key = \"jarela.dev.sw-cleaned\";\n if (!window.sessionStorage.getItem(key)) {\n navigator.serviceWorker\n .getRegistrations()\n .then((regs) => Promise.all(regs.map((r) => r.unregister())))\n .catch(() => {\n /* ignore */\n });\n if (\"caches\" in window) {\n caches\n .keys()\n .then((names) => Promise.all(names.map((name) => caches.delete(name))))\n .catch(() => {\n /* ignore */\n });\n }\n window.sessionStorage.setItem(key, \"1\");\n }\n return;\n }\n\n // Defer to idle so we don't compete with the first paint.\n const register = () => {\n navigator.serviceWorker\n .register(\"/sw.js\", { scope: \"/\" })\n .catch((err) => {\n // Swallow — SW failures should never break the app.\n console.warn(\"[sw] registration failed:\", err);\n });\n };\n if (\"requestIdleCallback\" in window) {\n (window as Window & { requestIdleCallback: (cb: () => void) => void })\n .requestIdleCallback(register);\n } else {\n setTimeout(register, 1000);\n }\n }, []);\n return null;\n}\n","import(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/builtin/global-error.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/client-page.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/client-segment.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/layout-router.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/render-from-template-context.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/lib/framework/boundary-components.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/lib/metadata/generate/icon-mark.js\");\n","import(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/builtin/global-error.js\");\n"],"names":["AppProvider","ThemeProvider","ServiceWorkerRegistration","getAppName","getAppDescription","metadata","title","description","manifest","icons","icon","url","type","sizes","apple","appleWebApp","capable","statusBarStyle","viewport","themeColor","media","color","width","initialScale","maximumScale","viewportFit","interactiveWidget","themeBootstrap","iosViewportBootstrap","RootLayout","children","html","lang","data-theme","suppressHydrationWarning","head","script","dangerouslySetInnerHTML","__html","body","createContext","useContext","useEffect","useReducer","EXPERIENCE_MODE_KEY","parseStoredMode","raw","reducer","state","action","activeThreadId","threadId","activeAgentId","agentId","activeTab","tab","experienceMode","mode","next","selectedItem","itemId","AppContext","dispatch","stored","window","localStorage","getItem","setItem","Provider","value","useAppContext","ctx","Error","useCallback","useState","STORAGE_KEY","isTheme","v","readStored","LIGHT_CHROME","DARK_CHROME","resolveChrome","theme","matchMedia","matches","syncChrome","document","meta","querySelector","setAttribute","apply","documentElement","ThemeContext","setThemeState","mq","onChange","addEventListener","removeEventListener","setTheme","t","useTheme","DEFAULT_APP_NAME","DEFAULT_APP_DESCRIPTION","DEFAULT_ISSUE_URL","process","env","NEXT_PUBLIC_APP_NAME","trim","NEXT_PUBLIC_APP_DESCRIPTION","getAppIssueUrl","NEXT_PUBLIC_APP_ISSUE_URL","navigator","key","sessionStorage","serviceWorker","getRegistrations","then","regs","Promise","all","map","r","unregister","catch","caches","keys","names","name","delete","register","scope","err","console","warn","requestIdleCallback","setTimeout"],"sourceRoot":"","ignoreList":[0,1,2]}
1
+ {"version":3,"file":"4045.js","mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;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;ACtBA,gGAA+J;AAC/J;AACA,gGAA6H;AAC7H;AACA,gGAAiI;;;;;;;;ACJjI,sGAAqI;AACrI;AACA,sGAA4H;AAC5H;AACA,sGAA+H;AAC/H;AACA,sGAAoJ;AACpJ;AACA,sGAA8H;AAC9H;AACA,sGAA6I;AAC7I;AACA,sGAAgI;AAChI;AACA,gGAA8H;;;;;;;;ACd9H,sGAAqI;;;;;;;;;;;;;;;;;;;;;;AEArI,EAAiF;;AAEjF,EAAE,iEAAe;AACjB,uBAAuB;AACvB,qBAAqB,8FAAmB;;AAExC;AACA;AACA;AACA,KAAK;AACL;;;;;;;;;;;;;+ECRkC;AAElC;;;;CAIC,GACM,SAASrG;uDACdwC,gDAASA,CAAC;QACR,IAAI,IAA6B,EAAE;QACnC,IAAI,CAAE,oBAAmBqE,SAAQ,GAAI;QAErC,IAAIP,KAAqC,EAAE,EAuB1C;QAED,0DAA0D;QAC1D,MAAMyB,WAAW;YACflB,UAAUG,aAAa,CACpBe,QAAQ,CAAC,UAAU;gBAAEC,OAAO;YAAI,GAChCP,KAAK,CAAC,CAACQ;gBACN,oDAAoD;gBACpDC,QAAQC,IAAI,CAAC,6BAA6BF;YAC5C;QACJ;QACA,IAAI,yBAAyBnE,QAAQ;YAClCA,OACEsE,mBAAmB,CAACL;QACzB,OAAO;YACLM,WAAWN,UAAU;QACvB;IACF,GAAG,EAAE;IACL,OAAO;AACT;;;;;;;;ACxDA,sGAAqI;AACrI;AACA,sGAA4H;AAC5H;AACA,sGAA+H;AAC/H;AACA,sGAAoJ;AACpJ;AACA,sGAA8H;AAC9H;AACA,sGAA6I;AAC7I;AACA,sGAAgI;AAChI;AACA,sGAA8H;;;;;;;;ACd9H,sGAAqI","sources":["webpack://@circuitwall/jarela/_N_E/./components/ui/ServiceWorkerRegistration.tsx/__nextjs-internal-proxy.mjs","webpack://@circuitwall/jarela/_N_E/./contexts/AppContext.tsx/__nextjs-internal-proxy.mjs","webpack://@circuitwall/jarela/_N_E/./contexts/ThemeContext.tsx/__nextjs-internal-proxy.mjs","webpack://@circuitwall/jarela/./app/layout.tsx","webpack://@circuitwall/jarela/./contexts/AppContext.tsx","webpack://@circuitwall/jarela/?5364","webpack://@circuitwall/jarela/./contexts/ThemeContext.tsx","webpack://@circuitwall/jarela/./lib/env/app-config.ts","webpack://@circuitwall/jarela/?e859","webpack://@circuitwall/jarela/?cd2b","webpack://@circuitwall/jarela/?ea39","webpack://@circuitwall/jarela/./app/globals.css","webpack://@circuitwall/jarela/./app/icon.svg","webpack://@circuitwall/jarela/./components/ui/ServiceWorkerRegistration.tsx","webpack://@circuitwall/jarela/?7241","webpack://@circuitwall/jarela/?c6d3"],"sourcesContent":["// This file is generated by the Webpack next-flight-loader.\nimport { registerClientReference } from \"react-server-dom-webpack/server\";\nexport const ServiceWorkerRegistration = registerClientReference(\nfunction() { throw new Error(\"Attempted to call ServiceWorkerRegistration() from the server but ServiceWorkerRegistration is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n\"/home/runner/work/jarela/jarela/components/ui/ServiceWorkerRegistration.tsx\",\n\"ServiceWorkerRegistration\",\n);","// This file is generated by the Webpack next-flight-loader.\nimport { registerClientReference } from \"react-server-dom-webpack/server\";\nexport const AppProvider = registerClientReference(\nfunction() { throw new Error(\"Attempted to call AppProvider() from the server but AppProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n\"/home/runner/work/jarela/jarela/contexts/AppContext.tsx\",\n\"AppProvider\",\n);export const useAppContext = registerClientReference(\nfunction() { throw new Error(\"Attempted to call useAppContext() from the server but useAppContext is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n\"/home/runner/work/jarela/jarela/contexts/AppContext.tsx\",\n\"useAppContext\",\n);","// This file is generated by the Webpack next-flight-loader.\nimport { registerClientReference } from \"react-server-dom-webpack/server\";\nexport const ThemeProvider = registerClientReference(\nfunction() { throw new Error(\"Attempted to call ThemeProvider() from the server but ThemeProvider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n\"/home/runner/work/jarela/jarela/contexts/ThemeContext.tsx\",\n\"ThemeProvider\",\n);export const useTheme = registerClientReference(\nfunction() { throw new Error(\"Attempted to call useTheme() from the server but useTheme is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n\"/home/runner/work/jarela/jarela/contexts/ThemeContext.tsx\",\n\"useTheme\",\n);","import type { Metadata, Viewport } from \"next\";\nimport { AppProvider } from \"@/contexts/AppContext\";\nimport { ThemeProvider } from \"@/contexts/ThemeContext\";\nimport { ServiceWorkerRegistration } from \"@/components/ui/ServiceWorkerRegistration\";\nimport { getAppName, getAppDescription } from \"@/lib/env/app-config\";\nimport \"./globals.css\";\n\nexport const metadata: Metadata = {\n title: getAppName(),\n description: getAppDescription(),\n manifest: \"/manifest.json\",\n icons: {\n // SVG favicon is theme-aware (prefers-color-scheme inside the SVG),\n // so it flips between navy J (light UI) and sky J (dark UI) without\n // shipping two payloads. PNG/ICO fall through for older browsers.\n icon: [\n { url: \"/favicon.svg\", type: \"image/svg+xml\" },\n { url: \"/favicon.ico\", sizes: \"any\" },\n { url: \"/icon-192.png\", type: \"image/png\", sizes: \"192x192\" },\n { url: \"/icon-512.png\", type: \"image/png\", sizes: \"512x512\" },\n ],\n // iOS reads ONE apple-touch-icon and ignores prefers-color-scheme,\n // so we hand it the dark navy variant (reads on any wallpaper). The\n // light-bg companion is shipped at /apple-touch-icon-light.png for\n // anyone who wants to opt in via a custom <link> tag.\n apple: [{ url: \"/apple-touch-icon.png\", sizes: \"180x180\" }],\n },\n // iOS standalone-mode PWA chrome. Safari ignores the manifest's\n // `theme_color` once the app is installed to the home screen and only\n // honors these Apple-specific tags. `black-translucent` is the only\n // value that produces an arbitrary status-bar color: the bar overlays\n // the page and whatever paints under it (the AppShell top bar, which\n // already pads itself with env(safe-area-inset-top) via --app-safe-top)\n // becomes the visible status-bar background. So the top bar's surface\n // color follows the active light/dark theme automatically.\n appleWebApp: {\n capable: true,\n title: getAppName(),\n statusBarStyle: \"black-translucent\",\n },\n};\n\n// Next 15+ requires themeColor (and color-scheme, viewport, etc.) to live in\n// the viewport export, not metadata. The /_not-found warning came from Next\n// inheriting this same layout — moving it here fixes both routes at once.\n// Match the installed-PWA window chrome (desktop title bar, mobile address\n// bar, splash) to the active surface color. Two entries let the OS pick\n// based on prefers-color-scheme; the runtime ThemeContext / pre-paint\n// script overrides this single <meta name=\"theme-color\"> tag when the\n// user picks an explicit light/dark mode.\nexport const viewport: Viewport = {\n themeColor: [\n { media: \"(prefers-color-scheme: light)\", color: \"#ffffff\" },\n { media: \"(prefers-color-scheme: dark)\", color: \"#09090b\" },\n ],\n width: \"device-width\",\n initialScale: 1,\n maximumScale: 1,\n viewportFit: \"cover\",\n // Chromium-only: shrink the layout viewport when the OS keyboard\n // appears, so `100dvh` automatically sits above the keyboard. Safari\n // doesn't implement this key (it logs a benign console warning, see\n // tests/e2e/smoke.spec.ts allow-list) and instead `dvh` itself already\n // tracks the keyboard on iOS 16.4+ PWA, so no extra JS is needed.\n interactiveWidget: \"resizes-content\",\n};\n\n// Pre-paint script: reads the persisted theme and sets `data-theme` on\n// <html> before the first paint, so light-mode users don't flash dark on\n// every page load. Inlined via dangerouslySetInnerHTML — the canonical\n// App Router pattern. (Earlier attempt routed this through next/script,\n// but under Next 16 + React 19.2 that import resolves to a Promise in\n// some module-resolution paths, tripping \"Element type is invalid\".)\n// Falls back to \"system\", which then defers to prefers-color-scheme.\nconst themeBootstrap = `(() => {\n var LIGHT = \"#ffffff\", DARK = \"#09090b\";\n function resolve(t) {\n if (t === \"light\") return LIGHT;\n if (t === \"dark\") return DARK;\n try {\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? DARK : LIGHT;\n } catch (e) { return DARK; }\n }\n try {\n var t = localStorage.getItem(\"jarela-theme\");\n if (t !== \"light\" && t !== \"dark\" && t !== \"system\") t = \"system\";\n document.documentElement.setAttribute(\"data-theme\", t);\n // Collapse any media-scoped theme-color metas Next emits to a single tag\n // so the PWA window chrome matches the user's explicit choice (not just\n // prefers-color-scheme). ThemeContext keeps this in sync on change.\n var metas = document.querySelectorAll('meta[name=\"theme-color\"]');\n for (var i = 1; i < metas.length; i++) metas[i].parentNode.removeChild(metas[i]);\n var meta = metas[0];\n if (!meta) {\n meta = document.createElement(\"meta\");\n meta.setAttribute(\"name\", \"theme-color\");\n document.head.appendChild(meta);\n }\n meta.removeAttribute(\"media\");\n meta.setAttribute(\"content\", resolve(t));\n } catch (e) {\n document.documentElement.setAttribute(\"data-theme\", \"system\");\n }\n})();`;\n\n// iOS Safari standalone-PWA viewport-height shim. On iPhones in\n// \"Add to Home Screen\" mode iOS reports window.innerHeight (and 100dvh\n// resolves against it) ~safe-area-inset-top pixels SHORTER than the\n// physical screen — about 59px on iPhone, 32px on iPad. That leaves a\n// gap below the app that the UA paints with the color-scheme default\n// (the white strip the user sees above the home-indicator). dvh, vh,\n// position:fixed inset:0, -webkit-fill-available — none of them fill\n// the physical screen in standalone PWA mode.\n//\n// The community-validated fix (boolinator/ios-pwa-bottom-bar-fix.md,\n// stackoverflow.com/q/79902310) is a JS shim: read visualViewport.height,\n// add safe-area-inset-top back when the gap matches the bug signature,\n// and write the corrected pixel value into --actual-vh on <html>.\n// CSS then sizes the doc with var(--actual-vh, 100dvh) so non-iOS\n// browsers keep using the standard primitive.\n//\n// Retries at 50/150/300/500/800/1200ms cover iOS's async safe-area\n// population on launch. visualViewport.resize, orientationchange, and\n// visibilitychange handle keyboard/rotation/app-switch.\nconst iosViewportBootstrap = `(() => {\n try {\n var isPWA = window.matchMedia('(display-mode: standalone)').matches\n || window.matchMedia('(display-mode: fullscreen)').matches\n || window.navigator.standalone === true;\n if (!isPWA) return;\n var last = 0;\n function safeTopPx() {\n var v = getComputedStyle(document.documentElement).getPropertyValue('--app-safe-top') || '';\n var n = parseFloat(v);\n return isNaN(n) ? 0 : n;\n }\n function isEditableFocused() {\n var ae = document.activeElement;\n if (!ae) return false;\n var tag = ae.tagName;\n return tag === 'INPUT' || tag === 'TEXTAREA' || ae.isContentEditable === true;\n }\n function apply() {\n var vv = window.visualViewport;\n var vh = (vv && vv.height) || window.innerHeight;\n // Keyboard-open detection: when iOS shows the on-screen keyboard,\n // visualViewport.height shrinks but window.innerHeight stays put.\n // Pairing that gap with editable-focus makes it model-agnostic -\n // no need to guess a keyboard height per device (SE ~216, 15 Pro\n // Max ~301, iPad floating ~120). 50px just filters URL-bar jitter.\n var keyboardOpen = isEditableFocused() && (window.innerHeight - vh) > 50;\n var isPortrait = window.innerHeight > window.innerWidth;\n // Skip the chin correction while the keyboard is up - otherwise we\n // inflate --actual-vh beyond the visible viewport and the input bar\n // ends up underneath the keyboard.\n if (!keyboardOpen && isPortrait) {\n var screenH = Math.max(window.screen.height, window.screen.width);\n if (screenH - vh > 15) {\n var top = safeTopPx();\n if (top > 0) vh += top;\n }\n }\n document.documentElement.style.setProperty('--actual-vh', vh + 'px');\n if (last > 0 && Math.abs(vh - last) > 30) {\n setTimeout(function () { window.dispatchEvent(new Event('resize')); }, 50);\n }\n last = vh;\n }\n apply();\n [50, 150, 300, 500, 800, 1200].forEach(function (ms) { setTimeout(apply, ms); });\n window.addEventListener('resize', apply);\n window.addEventListener('orientationchange', function () {\n setTimeout(apply, 100); setTimeout(apply, 300);\n });\n if (window.visualViewport) {\n window.visualViewport.addEventListener('resize', apply);\n window.visualViewport.addEventListener('scroll', apply);\n }\n // focusin/focusout can lead visualViewport.resize by ~100ms on\n // older iOS - recompute immediately so we don't render a bad frame.\n document.addEventListener('focusin', apply, true);\n document.addEventListener('focusout', apply, true);\n // iOS still scrolls the layout viewport up when the keyboard opens\n // to keep the focused input visible, even with html/body overflow:hidden.\n // Aggressive scroll-reset on focus events counteracts it (piclaw PWA.md\n // pattern, validated on iOS 26.x). Staggered timers cover the lag\n // between focus and iOS's scroll-into-view.\n function snapScroll() {\n if (window.scrollY !== 0 || window.pageYOffset !== 0) {\n window.scrollTo(0, 0);\n }\n }\n document.addEventListener('focusin', function () {\n snapScroll();\n [16, 50, 100, 200, 400].forEach(function (ms) { setTimeout(snapScroll, ms); });\n }, true);\n document.addEventListener('focusout', function () {\n [16, 50, 100, 200].forEach(function (ms) { setTimeout(snapScroll, ms); });\n }, true);\n if (window.visualViewport) {\n window.visualViewport.addEventListener('scroll', snapScroll);\n }\n window.addEventListener('scroll', snapScroll, { passive: true });\n document.addEventListener('visibilitychange', function () {\n if (!document.hidden) { setTimeout(apply, 50); setTimeout(apply, 200); }\n });\n } catch (e) { /* non-fatal: falls back to 100dvh */ }\n})();`;\n\nexport default function RootLayout({ children }: { children: React.ReactNode }) {\n return (\n <html lang=\"en\" data-theme=\"system\" suppressHydrationWarning>\n <head>\n <script dangerouslySetInnerHTML={{ __html: themeBootstrap }} />\n <script dangerouslySetInnerHTML={{ __html: iosViewportBootstrap }} />\n </head>\n <body>\n <ThemeProvider>\n <AppProvider>{children}</AppProvider>\n </ThemeProvider>\n <ServiceWorkerRegistration />\n </body>\n </html>\n );\n}\n","\"use client\";\nimport { createContext, useContext, useEffect, useReducer, type ReactNode } from \"react\";\n\nexport type ExperienceMode = \"essential\" | \"full\";\n\nconst EXPERIENCE_MODE_KEY = \"jarela.experience.mode\";\n\n// Back-compat: pre-rename builds stored \"normal\" / \"advanced\". Read those\n// values silently so an upgrade does not reset the user's choice.\nfunction parseStoredMode(raw: string | null): ExperienceMode | null {\n if (raw === \"essential\" || raw === \"normal\") return \"essential\";\n if (raw === \"full\" || raw === \"advanced\") return \"full\";\n return null;\n}\n\nexport type Tab = \"chat\" | \"dashboard\" | \"agents\" | \"memory\" | \"documents\" | \"models\" | \"credentials\" | \"mcp\" | \"extensions\" | \"tools\" | \"tasks\" | \"bridges\" | \"profile\" | \"harness\" | \"logs\" | \"env\" | \"settings\";\n\ninterface AppState {\n activeThreadId: string | null;\n activeAgentId: string | null;\n activeTab: Tab;\n experienceMode: ExperienceMode;\n // Per-tab sub-selection (a sub-tab key under credentials, an mcp server name, an\n // agent uuid, a profile subsection slug, …). Settings panels read their\n // slot to scroll-to + highlight; the URL mirrors this via `?item=<id>`.\n selectedItem: Partial<Record<Tab, string>>;\n}\n\ntype Action =\n | { type: \"SELECT_THREAD\"; threadId: string; agentId: string }\n | { type: \"NEW_CHAT\" }\n | { type: \"SET_AGENT\"; agentId: string }\n | { type: \"SET_TAB\"; tab: Tab }\n | { type: \"SET_EXPERIENCE_MODE\"; mode: ExperienceMode }\n | { type: \"SET_SELECTION\"; tab: Tab; itemId: string | null };\n\nfunction reducer(state: AppState, action: Action): AppState {\n switch (action.type) {\n case \"SELECT_THREAD\":\n return { ...state, activeThreadId: action.threadId, activeAgentId: action.agentId, activeTab: \"chat\" };\n case \"NEW_CHAT\":\n return { ...state, activeThreadId: null, activeAgentId: null, activeTab: \"chat\" };\n case \"SET_AGENT\":\n return { ...state, activeAgentId: action.agentId };\n case \"SET_TAB\":\n return { ...state, activeTab: action.tab };\n case \"SET_EXPERIENCE_MODE\":\n return { ...state, experienceMode: action.mode };\n case \"SET_SELECTION\": {\n const next = { ...state.selectedItem };\n if (action.itemId == null) delete next[action.tab];\n else next[action.tab] = action.itemId;\n return { ...state, selectedItem: next };\n }\n }\n}\n\nconst AppContext = createContext<{ state: AppState; dispatch: React.Dispatch<Action> } | null>(null);\n\nexport function AppProvider({ children }: { children: ReactNode }) {\n const [state, dispatch] = useReducer(reducer, {\n activeThreadId: null,\n activeAgentId: null,\n activeTab: \"chat\",\n experienceMode: \"essential\",\n selectedItem: {},\n });\n\n useEffect(() => {\n try {\n const stored = parseStoredMode(window.localStorage.getItem(EXPERIENCE_MODE_KEY));\n if (stored) {\n dispatch({ type: \"SET_EXPERIENCE_MODE\", mode: stored });\n }\n } catch {\n // ignore storage failures\n }\n }, []);\n\n useEffect(() => {\n try {\n window.localStorage.setItem(EXPERIENCE_MODE_KEY, state.experienceMode);\n } catch {\n // ignore storage failures\n }\n }, [state.experienceMode]);\n\n return <AppContext.Provider value={{ state, dispatch }}>{children}</AppContext.Provider>;\n}\n\nexport function useAppContext() {\n const ctx = useContext(AppContext);\n if (!ctx) throw new Error(\"useAppContext must be used within AppProvider\");\n return ctx;\n}\n","import(/* webpackMode: \"eager\", webpackExports: [\"ServiceWorkerRegistration\"] */ \"/home/runner/work/jarela/jarela/components/ui/ServiceWorkerRegistration.tsx\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"AppProvider\"] */ \"/home/runner/work/jarela/jarela/contexts/AppContext.tsx\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"ThemeProvider\"] */ \"/home/runner/work/jarela/jarela/contexts/ThemeContext.tsx\");\n","\"use client\";\nimport { createContext, useCallback, useContext, useEffect, useState, type ReactNode } from \"react\";\n\nexport type Theme = \"light\" | \"dark\" | \"system\";\n\nconst STORAGE_KEY = \"jarela-theme\";\n\nfunction isTheme(v: unknown): v is Theme {\n return v === \"light\" || v === \"dark\" || v === \"system\";\n}\n\nfunction readStored(): Theme {\n if (typeof window === \"undefined\") return \"system\";\n try {\n const v = window.localStorage.getItem(STORAGE_KEY);\n return isTheme(v) ? v : \"system\";\n } catch {\n return \"system\";\n }\n}\n\nconst LIGHT_CHROME = \"#ffffff\";\nconst DARK_CHROME = \"#09090b\";\n\nfunction resolveChrome(theme: Theme): string {\n if (theme === \"light\") return LIGHT_CHROME;\n if (theme === \"dark\") return DARK_CHROME;\n if (typeof window === \"undefined\") return DARK_CHROME;\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? DARK_CHROME : LIGHT_CHROME;\n}\n\n// Keep the single <meta name=\"theme-color\"> tag (installed by the pre-paint\n// script in app/layout.tsx) aligned with the active surface so the PWA's\n// desktop title bar and mobile address bar match the theme.\nfunction syncChrome(theme: Theme) {\n if (typeof document === \"undefined\") return;\n const meta = document.querySelector('meta[name=\"theme-color\"]');\n if (meta) meta.setAttribute(\"content\", resolveChrome(theme));\n}\n\nfunction apply(theme: Theme) {\n if (typeof document === \"undefined\") return;\n document.documentElement.setAttribute(\"data-theme\", theme);\n syncChrome(theme);\n}\n\ninterface Ctx {\n theme: Theme;\n setTheme: (t: Theme) => void;\n}\n\nconst ThemeContext = createContext<Ctx | null>(null);\n\nexport function ThemeProvider({ children }: { children: ReactNode }) {\n // Initial state stays \"system\" on the server to match the pre-paint script,\n // which writes data-theme before React hydrates. The effect below syncs the\n // React state to whatever the script (or localStorage) decided.\n const [theme, setThemeState] = useState<Theme>(\"system\");\n\n useEffect(() => {\n const stored = readStored();\n setThemeState(stored);\n // When in \"system\" mode, mirror OS-level changes into the PWA chrome.\n if (typeof window === \"undefined\") return;\n const mq = window.matchMedia(\"(prefers-color-scheme: dark)\");\n const onChange = () => {\n if (readStored() === \"system\") syncChrome(\"system\");\n };\n mq.addEventListener?.(\"change\", onChange);\n return () => mq.removeEventListener?.(\"change\", onChange);\n }, []);\n\n const setTheme = useCallback((t: Theme) => {\n setThemeState(t);\n apply(t);\n try {\n window.localStorage.setItem(STORAGE_KEY, t);\n } catch {\n /* ignore quota / private-mode errors */\n }\n }, []);\n\n return <ThemeContext.Provider value={{ theme, setTheme }}>{children}</ThemeContext.Provider>;\n}\n\nexport function useTheme() {\n const ctx = useContext(ThemeContext);\n if (!ctx) throw new Error(\"useTheme must be used within ThemeProvider\");\n return ctx;\n}\n","// Branding knobs sourced from NEXT_PUBLIC_* env vars so forks can rebrand\n// the app without patching source. NEXT_PUBLIC_* is the right\n// channel here because Next.js inlines these at build time, which lets\n// client components read them directly (no React Context, no server\n// round-trip). Server-only modules read the same keys at runtime.\n//\n// Keep this module client-safe — no Node-only imports, no DB/FS access.\n\nconst DEFAULT_APP_NAME = \"Jarela\";\nconst DEFAULT_APP_DESCRIPTION = \"Jarela — local chat interface for LangGraph agents\";\nconst DEFAULT_ISSUE_URL = \"https://github.com/CircuitWall/jarela/issues/new\";\n\nexport function getAppName(): string {\n return process.env.NEXT_PUBLIC_APP_NAME?.trim() || DEFAULT_APP_NAME;\n}\n\nexport function getAppDescription(): string {\n return process.env.NEXT_PUBLIC_APP_DESCRIPTION?.trim() || DEFAULT_APP_DESCRIPTION;\n}\n\nexport function getAppIssueUrl(): string {\n return process.env.NEXT_PUBLIC_APP_ISSUE_URL?.trim() || DEFAULT_ISSUE_URL;\n}\n","import(/* webpackMode: \"eager\", webpackExports: [\"ServiceWorkerRegistration\"] */ \"/home/runner/work/jarela/jarela/components/ui/ServiceWorkerRegistration.tsx\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"AppProvider\"] */ \"/home/runner/work/jarela/jarela/contexts/AppContext.tsx\");\n;\nimport(/* webpackMode: \"eager\", webpackExports: [\"ThemeProvider\"] */ \"/home/runner/work/jarela/jarela/contexts/ThemeContext.tsx\");\n","import(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/builtin/global-error.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/client-page.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/client-segment.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/layout-router.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/render-from-template-context.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/lib/framework/boundary-components.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/lib/metadata/generate/icon-mark.js\");\n","import(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/builtin/global-error.js\");\n",""," import { fillMetadataSegment } from 'next/dist/lib/metadata/get-metadata-route'\n\n export default async (props) => {\n const imageData = {\"type\":\"image/svg+xml\",\"sizes\":\"any\"}\n const imageUrl = fillMetadataSegment(\".\", await props.params, \"icon.svg\", true)\n\n return [{\n ...imageData,\n url: imageUrl + \"?44694c2d5379230a\",\n }]\n }","\"use client\";\n\nimport { useEffect } from \"react\";\n\n/**\n * Registers the Serwist-generated service worker. Replaces the auto-injected\n * registration script that next-pwa used to emit. Only runs in production\n * (the SW is disabled in dev by withSerwist).\n */\nexport function ServiceWorkerRegistration() {\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n if (!(\"serviceWorker\" in navigator)) return;\n\n if (process.env.NODE_ENV !== \"production\") {\n // Dev mode safety: if a previous production build registered a SW,\n // it can keep serving stale assets even though SW is disabled now.\n // Purge registrations + caches once per tab session.\n const key = \"jarela.dev.sw-cleaned\";\n if (!window.sessionStorage.getItem(key)) {\n navigator.serviceWorker\n .getRegistrations()\n .then((regs) => Promise.all(regs.map((r) => r.unregister())))\n .catch(() => {\n /* ignore */\n });\n if (\"caches\" in window) {\n caches\n .keys()\n .then((names) => Promise.all(names.map((name) => caches.delete(name))))\n .catch(() => {\n /* ignore */\n });\n }\n window.sessionStorage.setItem(key, \"1\");\n }\n return;\n }\n\n // Defer to idle so we don't compete with the first paint.\n const register = () => {\n navigator.serviceWorker\n .register(\"/sw.js\", { scope: \"/\" })\n .catch((err) => {\n // Swallow — SW failures should never break the app.\n console.warn(\"[sw] registration failed:\", err);\n });\n };\n if (\"requestIdleCallback\" in window) {\n (window as Window & { requestIdleCallback: (cb: () => void) => void })\n .requestIdleCallback(register);\n } else {\n setTimeout(register, 1000);\n }\n }, []);\n return null;\n}\n","import(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/builtin/global-error.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/client-page.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/client-segment.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/layout-router.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/render-from-template-context.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/lib/framework/boundary-components.js\");\n;\nimport(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/lib/metadata/generate/icon-mark.js\");\n","import(/* webpackMode: \"eager\" */ \"/home/runner/work/jarela/jarela/node_modules/next/dist/client/components/builtin/global-error.js\");\n"],"names":["AppProvider","ThemeProvider","ServiceWorkerRegistration","getAppName","getAppDescription","metadata","title","description","manifest","icons","icon","url","type","sizes","apple","appleWebApp","capable","statusBarStyle","viewport","themeColor","media","color","width","initialScale","maximumScale","viewportFit","interactiveWidget","themeBootstrap","iosViewportBootstrap","RootLayout","children","html","lang","data-theme","suppressHydrationWarning","head","script","dangerouslySetInnerHTML","__html","body","createContext","useContext","useEffect","useReducer","EXPERIENCE_MODE_KEY","parseStoredMode","raw","reducer","state","action","activeThreadId","threadId","activeAgentId","agentId","activeTab","tab","experienceMode","mode","next","selectedItem","itemId","AppContext","dispatch","stored","window","localStorage","getItem","setItem","Provider","value","useAppContext","ctx","Error","useCallback","useState","STORAGE_KEY","isTheme","v","readStored","LIGHT_CHROME","DARK_CHROME","resolveChrome","theme","matchMedia","matches","syncChrome","document","meta","querySelector","setAttribute","apply","documentElement","ThemeContext","setThemeState","mq","onChange","addEventListener","removeEventListener","setTheme","t","useTheme","DEFAULT_APP_NAME","DEFAULT_APP_DESCRIPTION","DEFAULT_ISSUE_URL","process","env","NEXT_PUBLIC_APP_NAME","trim","NEXT_PUBLIC_APP_DESCRIPTION","getAppIssueUrl","NEXT_PUBLIC_APP_ISSUE_URL","navigator","key","sessionStorage","serviceWorker","getRegistrations","then","regs","Promise","all","map","r","unregister","catch","caches","keys","names","name","delete","register","scope","err","console","warn","requestIdleCallback","setTimeout"],"sourceRoot":"","ignoreList":[0,1,2]}