@circuitwall/jarela 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js +3 -3
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/chats/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js +3 -3
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/lookup/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js +3 -3
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/pair/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js +3 -3
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js +3 -3
- package/.next/standalone/.next/server/app/api/v1/bridges/[id]/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js +218 -7
- package/.next/standalone/.next/server/app/api/v1/builtin-tools/route.js.map +1 -1
- package/.next/standalone/.next/server/app/api/v1/events/route.js +3 -3
- package/.next/standalone/.next/server/app/api/v1/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/extension/agents/route.js.map +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/extension/fill/route.js.map +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/extension/refine/route.js.map +1 -1
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js +8 -1
- package/.next/standalone/.next/server/app/api/v1/extension/turn/route.js.map +1 -1
- package/.next/standalone/.next/server/app/api/v1/extensions/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/extensions/tools/[name]/secrets/route.js +2 -2
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js +37 -3
- package/.next/standalone/.next/server/app/api/v1/page-capture/route.js.map +1 -1
- package/.next/standalone/.next/server/app/api/v1/tools/route.js +2 -2
- package/.next/standalone/.next/server/app/page.js +10 -18
- package/.next/standalone/.next/server/app/page.js.map +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/210.js +1 -1
- package/.next/standalone/.next/server/chunks/239.js +5335 -5230
- package/.next/standalone/.next/server/chunks/239.js.map +1 -1
- package/.next/standalone/.next/server/chunks/{1683.js → 241.js} +210 -36
- package/.next/standalone/.next/server/chunks/241.js.map +1 -0
- package/.next/standalone/.next/server/chunks/{8135.js → 2539.js} +218 -36
- package/.next/standalone/.next/server/chunks/2539.js.map +1 -0
- package/.next/standalone/.next/server/chunks/4631.js +218 -7
- package/.next/standalone/.next/server/chunks/4631.js.map +1 -1
- package/.next/standalone/.next/server/chunks/8866.js +13389 -13073
- package/.next/standalone/.next/server/chunks/8866.js.map +1 -1
- package/.next/standalone/.next/server/chunks/9032.js +1 -1
- package/.next/standalone/.next/server/chunks/9032.js.map +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/app/{page-62e0d5f2404b403b.js → page-74846c864241b96d.js} +11 -19
- package/.next/standalone/.next/static/chunks/app/page-74846c864241b96d.js.map +1 -0
- package/.next/standalone/package.json +2 -1
- package/CHANGELOG.md +98 -0
- package/README.md +51 -26
- package/components/chat/InputBar.tsx +10 -1
- package/components/ui/BootScreen.tsx +0 -10
- package/lib/agents/agent-turn.ts +9 -0
- package/lib/agents/prepare/request.ts +9 -0
- package/lib/agents/run-thread.ts +9 -1
- package/lib/api/extension-turn.ts +7 -0
- package/lib/api/page-capture.test.ts +58 -0
- package/lib/api/page-capture.ts +31 -1
- package/lib/bridges/attachment-store.test.ts +440 -0
- package/lib/bridges/attachment-store.ts +184 -0
- package/lib/bridges/whatsapp.ts +50 -32
- package/lib/tools/async-results-tool.ts +114 -0
- package/lib/tools/async-results.test.ts +481 -0
- package/lib/tools/async-results.ts +165 -0
- package/lib/tools/builtins.ts +1 -0
- package/lib/tools/wallclock.ts +114 -8
- package/package.json +2 -1
- package/.next/standalone/.next/server/chunks/1683.js.map +0 -1
- package/.next/standalone/.next/server/chunks/8135.js.map +0 -1
- package/.next/standalone/.next/static/chunks/app/page-62e0d5f2404b403b.js.map +0 -1
- /package/.next/standalone/.next/static/{2xWP8843jbntFGKLnHK6R → AV5AO0yTRABo-NgwxhDe7}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{2xWP8843jbntFGKLnHK6R → AV5AO0yTRABo-NgwxhDe7}/_ssgManifest.js +0 -0
|
@@ -136,7 +136,7 @@ async function runShutdown() {
|
|
|
136
136
|
}
|
|
137
137
|
// 3. Close bridges (WhatsApp Baileys WS, etc).
|
|
138
138
|
try {
|
|
139
|
-
const { stopAllBridges } = await Promise.all(/* import() */[__webpack_require__.e(1218), __webpack_require__.e(5743), __webpack_require__.e(127), __webpack_require__.e(3169), __webpack_require__.e(423), __webpack_require__.e(8866), __webpack_require__.e(
|
|
139
|
+
const { stopAllBridges } = await Promise.all(/* import() */[__webpack_require__.e(1218), __webpack_require__.e(5743), __webpack_require__.e(127), __webpack_require__.e(3169), __webpack_require__.e(423), __webpack_require__.e(8866), __webpack_require__.e(241)]).then(__webpack_require__.bind(__webpack_require__, 10241));
|
|
140
140
|
await stopAllBridges();
|
|
141
141
|
} catch (err) {
|
|
142
142
|
console.error("[jarela] stopping bridges failed:", err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"9032.js","mappings":";;;;;;;;;;;AAAA,4EAA4E;AAC5E,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AACvE,qEAAqE;AACrE,oEAAoE;AACpE,EAAE;AACF,uEAAuE;AACvE,uDAAuD;AAChD,SAASA,kBAAqBC,GAAW,EAAEC,OAAgB;IAChE,MAAMC,IAAIC;IACV,IAAID,CAAC,CAACF,IAAI,KAAKI,WAAWF,CAAC,CAACF,IAAI,GAAGC;IACnC,OAAOC,C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E3G,UAAU;QACVE,cAAc9E,iBAAiBX,IAAI0F,qBAAqB,EAAElF,2DAAYA,CAACiF,YAAY;QACnFE,UAAUnE,cAAcxB,IAAI4F,gBAAgB,EAAEpF,2DAAYA,CAACmF,QAAQ;QAEnE,YAAY;QACZE,iBAAiBlF,iBAAiBX,IAAI8F,wBAAwB,EAAEtF,2DAAYA,CAACqF,eAAe;QAC5FE,mBAAmBpF,iBAAiBX,IAAIgG,2BAA2B,EAAExF,2DAAYA,CAACuF,iBAAiB;QAEnG,YAAY;QACZE,iBAAiBtF,iBAAiBX,IAAIkG,yBAAyB,EAAE1F,2DAAYA,CAACyF,eAAe;QAC7FE,sBAAsBxF,iBAAiBX,IAAIoG,+BAA+B,EAAE5F,2DAAYA,CAAC2F,oBAAoB;QAE7G,gCAAgC;QAChCE,2BAA2B9E,uBACzBvB,IAAIsG,kCAAkC,EACtC9F,2DAAYA,CAAC6F,yBAAyB;QAExCE,4BAA4B,CAACvG,IAAIwG,mCAAmC,IAAIhG,2DAAYA,CAAC+F,0BAA0B,EAAErG,IAAI;QACrHuG,0BAA0BvF,oBAAoBlB,IAAI0G,kCAAkC,EAAElG,2DAAYA,CAACiG,wBAAwB;QAC3HE,qBAAqBzF,oBAAoBlB,IAAI4G,4BAA4B,EAAEpG,2DAAYA,CAACmG,mBAAmB;QAE3G,eAAe;QACfE,SAAS9G,iEAAUA;QACnB+G,gBAAgB3G,wEAAiBA;QACjC4G,UAAU1G,qEAAcA;IAC1B;IACA,OAAOoB;AACT;AAEA,mHAAmH,GAC5G,SAASuF;IACdvF,SAAS;AACX","sources":["webpack://@circuitwall/jarela/./lib/utils/global-state.ts","webpack://@circuitwall/jarela/./lib/lifecycle/shutdown.ts","webpack://@circuitwall/jarela/./lib/env/app-config.ts","webpack://@circuitwall/jarela/./lib/env/config.ts"],"sourcesContent":["// Pin a piece of state to globalThis so it survives Next.js dev hot-reload.\n//\n// Without this, every code edit re-evaluates the module, replacing the\n// in-memory state with empty containers — but any active closure still\n// references the OLD set, so listeners/timers/maps go silently dead.\n// The globalThis trick is the standard Next pattern for singletons.\n//\n// `key` must be unique across the app (it lives on globalThis); pick a\n// \"__jarela_<name>\" prefix to keep the namespace tidy.\nexport function getOrCreateGlobal<T>(key: string, factory: () => T): T {\n const g = globalThis as unknown as Record<string, unknown>;\n if (g[key] === undefined) g[key] = factory();\n return g[key] as T;\n}\n","// Graceful shutdown coordinator.\n//\n// Registers SIGINT / SIGTERM (and SIGBREAK on Windows) so Ctrl-C in the\n// foreground and `kill`/`systemctl stop`/Task Scheduler \"End task\" all\n// trigger the same drain sequence:\n//\n// 1. abort every in-flight LangGraph run so stream loops bail out\n// 2. stop the scheduler tick so no new firings start\n// 3. close every bridge adapter (WhatsApp WS, future kinds) cleanly\n// 4. wait briefly for the runs to actually finish flushing\n// 5. close the SQLite handle so WAL is checkpointed\n// 6. exit 0\n//\n// A hard timeout aborts the drain if any subsystem hangs — the supervisor\n// (Task Scheduler / systemd / installed-launcher.ps1) will then restart us\n// instead of leaving a zombie holding the port.\n//\n// Wired from `instrumentation.ts` so it runs once per server process at\n// boot. Idempotent: only the first call installs handlers.\n\nimport { getOrCreateGlobal } from \"@/lib/utils/global-state\";\nimport { getConfig } from \"@/lib/env/config\";\n\ninterface ShutdownState {\n registered: boolean;\n shuttingDown: boolean;\n}\nconst state = getOrCreateGlobal<ShutdownState>(\"__jarela_shutdown\", () => ({\n registered: false,\n shuttingDown: false,\n}));\n\n// JARELA_SHUTDOWN_DRAIN_MS / JARELA_SHUTDOWN_SETTLE_MS override these.\n// Captured at handler-install time (boot); these don't hot-reload because\n// the handlers close over the values.\nconst HARD_TIMEOUT_MS = getConfig().shutdownDrainMs;\nconst RUN_DRAIN_MS = getConfig().shutdownSettleMs;\n\nexport function registerShutdownHandlers(): void {\n if (state.registered) return;\n state.registered = true;\n\n const handler = (signal: NodeJS.Signals) => {\n if (state.shuttingDown) {\n // Second signal while already draining: operator is impatient, exit\n // immediately. Mirrors the behaviour every well-behaved daemon has —\n // first Ctrl-C drains, second Ctrl-C kills.\n console.log(`[jarela] received ${signal} during shutdown; forcing exit.`);\n process.exit(130);\n }\n state.shuttingDown = true;\n console.log(`[jarela] ${signal} received, draining…`);\n void runShutdown().catch((err) => {\n console.error(`[jarela] shutdown error:`, err);\n process.exit(1);\n });\n };\n\n // Replace any default handlers Next's standalone server may have\n // installed for these signals. Next's default just calls\n // `server.close(() => process.exit(0))`, which races our drain and can\n // exit the process before bridges/DB have flushed. We take over and\n // exit ourselves once drain completes.\n process.removeAllListeners(\"SIGINT\");\n process.removeAllListeners(\"SIGTERM\");\n process.on(\"SIGINT\", handler);\n process.on(\"SIGTERM\", handler);\n if (process.platform === \"win32\") {\n // Ctrl-Break in a foreground PowerShell session lands as SIGBREAK,\n // not SIGINT. Task Scheduler \"End task\" delivers SIGBREAK as well.\n process.removeAllListeners(\"SIGBREAK\");\n process.on(\"SIGBREAK\", handler);\n }\n}\n\nasync function runShutdown(): Promise<void> {\n // Safety net: if any drain step deadlocks (e.g. a bridge adapter's\n // socket.close() never resolves), force-exit so the supervisor can\n // restart cleanly instead of holding the port forever.\n const forceExit = setTimeout(() => {\n console.warn(`[jarela] drain exceeded ${HARD_TIMEOUT_MS}ms; forcing exit.`);\n process.exit(130);\n }, HARD_TIMEOUT_MS);\n forceExit.unref?.();\n\n // 1. Abort in-flight LLM runs. The route's stream loop watches this\n // AbortController and exits early, emitting a trailing error chunk.\n try {\n const { abortAllRuns } = await import(\"@/lib/agents/run-registry\");\n const n = abortAllRuns(\"server_shutdown\");\n if (n > 0) console.log(`[jarela] aborted ${n} in-flight run(s).`);\n } catch (err) {\n console.error(\"[jarela] aborting runs failed:\", err);\n }\n\n // 2. Stop the scheduler so no firing kicks off mid-drain.\n try {\n const { stopScheduler } = await import(\"@/lib/scheduler\");\n stopScheduler();\n } catch (err) {\n console.error(\"[jarela] stopping scheduler failed:\", err);\n }\n\n // 2b. Drain trigger handlers — closes fs.watch watchers and any other\n // handler that has timers / sockets attached. Independent of the\n // scheduler tick (those are run-loop ownership; this is per-handler\n // ownership of OS resources).\n try {\n const { stopAllTriggerHandlers } = await import(\"@/lib/triggers\");\n await stopAllTriggerHandlers();\n } catch (err) {\n console.error(\"[jarela] stopping trigger handlers failed:\", err);\n }\n\n // 3. Close bridges (WhatsApp Baileys WS, etc).\n try {\n const { stopAllBridges } = await import(\"@/lib/bridges/runtime\");\n await stopAllBridges();\n } catch (err) {\n console.error(\"[jarela] stopping bridges failed:\", err);\n }\n\n // 4. Give aborted runs a beat to actually finish — they were signalled\n // in step 1, but the `finally` blocks need ticks to flush trailing\n // events and persist the partial assistant message.\n try {\n const { waitForRunsToSettle } = await import(\"@/lib/agents/run-registry\");\n const stuck = await waitForRunsToSettle(RUN_DRAIN_MS);\n if (stuck > 0) console.warn(`[jarela] ${stuck} run(s) still active after drain window.`);\n } catch (err) {\n console.error(\"[jarela] waiting for runs failed:\", err);\n }\n\n // 5. Close the DB. WAL is checkpointed so the next boot is fast and we\n // leave no stale -shm/-wal sidecars on disk.\n try {\n const { closeDb } = await import(\"@/lib/db\");\n closeDb();\n } catch (err) {\n console.error(\"[jarela] closing db failed:\", err);\n }\n\n clearTimeout(forceExit);\n console.log(\"[jarela] shutdown complete.\");\n process.exit(0);\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","// Central runtime configuration, resolved from environment variables.\n//\n// All operational knobs (port, host, data dir, timeouts, agent limits) flow\n// through this module so there is exactly one place documenting which env\n// vars Jarela respects and what the defaults are. Code MUST NOT read these\n// `process.env` keys directly — import `config` instead.\n//\n// Resolution order for every entry: explicit JARELA_* var → legacy/standard\n// var (where one exists, e.g. PORT/HOSTNAME for Next.js compatibility) →\n// schema default (lib/env/schema.ts).\n//\n// Values are resolved lazily on first read and cached. Tests + the env-\n// override PATCH endpoint must call `resetConfigCache()` between cases.\n\nimport { getDataDir } from \"@/lib/db/data-dir\";\nimport { getAppName, getAppDescription, getAppIssueUrl } from \"./app-config\";\nimport { ENV_DEFAULTS } from \"./schema\";\nimport { join } from \"node:path\";\nimport { homedir } from \"node:os\";\n\nexport interface JarelaConfig {\n // network\n readonly port: number;\n readonly hostname: string;\n readonly dataDir: string;\n readonly toolsDir: string;\n readonly httpRequestTimeoutMs: number;\n readonly sseConnectTimeoutMs: number;\n readonly healthCheckTimeoutMs: number;\n readonly httpMaxAttempts: number;\n\n // agent\n readonly recursionLimit: number;\n readonly llmStreamMaxMs: number;\n readonly runIdleMs: number;\n readonly runMaxMs: number;\n readonly runRegistryTtlMs: number;\n readonly runBufferSize: number;\n readonly maxStallRetries: number;\n readonly maxTransientRetries: number;\n readonly maxDelegationDepth: number;\n readonly streamParseTripwire: number;\n\n // tools\n readonly voiceTimeoutMs: number;\n readonly imageTimeoutMs: number;\n readonly fetchToolMaxBytes: number;\n readonly mcpRegistryTimeoutMs: number;\n readonly execMaxOutputBytes: number;\n readonly filesMaxReadBytes: number;\n readonly filesMaxWriteBytes: number;\n\n // lifecycle\n readonly updateCheckTimeoutMs: number;\n readonly shutdownDrainMs: number;\n readonly shutdownSettleMs: number;\n readonly disableUpdateCheck: boolean;\n\n // limits\n readonly notificationRingSize: number;\n\n // logging\n readonly logsRingSize: number;\n readonly logLevel: \"debug\" | \"info\" | \"warn\" | \"error\";\n\n // scheduler\n readonly schedulerTickMs: number;\n readonly fastRemoteSweepMs: number;\n\n // documents\n readonly docMaxFileBytes: number;\n readonly docMaxFilesPerSource: number;\n\n // anti-hallucination detector\n readonly hallucinationDetectorMode: \"off\" | \"regex\" | \"model\";\n readonly hallucinationDetectorModel: string;\n readonly citationCheckerTailChars: number;\n readonly citationManifestMax: number;\n\n // app metadata\n readonly appName: string;\n readonly appDescription: string;\n readonly issueUrl: string;\n}\n\nfunction parsePositiveInt(value: string | undefined, fallback: number): number {\n if (!value) return fallback;\n const n = Number(value);\n return Number.isFinite(n) && n > 0 ? Math.floor(n) : fallback;\n}\n\n// Like parsePositiveInt but accepts 0 as a valid value (used to disable\n// deadlines explicitly). Negative / NaN still fall through to the default.\nfunction parseNonNegativeInt(value: string | undefined, fallback: number): number {\n if (value === undefined) return fallback;\n const n = Number(value);\n return Number.isFinite(n) && n >= 0 ? Math.floor(n) : fallback;\n}\n\nfunction parsePort(value: string | undefined, fallback: number): number {\n const n = parsePositiveInt(value, fallback);\n return n >= 1 && n <= 65_535 ? n : fallback;\n}\n\nfunction parseBool(value: string | undefined, fallback: boolean): boolean {\n if (value === undefined) return fallback;\n const v = value.trim().toLowerCase();\n if (v === \"1\" || v === \"true\") return true;\n if (v === \"0\" || v === \"false\") return false;\n return fallback;\n}\n\nfunction parseHallucinationMode(\n value: string | undefined,\n fallback: JarelaConfig[\"hallucinationDetectorMode\"],\n): JarelaConfig[\"hallucinationDetectorMode\"] {\n if (!value) return fallback;\n const v = value.trim().toLowerCase();\n if (v === \"off\" || v === \"regex\" || v === \"model\") return v;\n return fallback;\n}\n\nfunction parseLogLevel(value: string | undefined, fallback: \"debug\" | \"info\" | \"warn\" | \"error\"): JarelaConfig[\"logLevel\"] {\n if (!value) return fallback;\n const v = value.trim().toLowerCase();\n if (v === \"debug\" || v === \"info\" || v === \"warn\" || v === \"error\") return v;\n return fallback;\n}\n\nlet cached: JarelaConfig | null = null;\n\nfunction expandHome(p: string): string {\n return p.startsWith(\"~\") ? p.replace(/^~/, homedir()) : p;\n}\n\nexport function getConfig(): JarelaConfig {\n if (cached) return cached;\n const env = process.env;\n const dataDir = getDataDir();\n cached = {\n // network\n port: parsePort(env.JARELA_PORT ?? env.PORT, ENV_DEFAULTS.port),\n hostname: (env.JARELA_HOSTNAME ?? env.HOSTNAME ?? ENV_DEFAULTS.hostname).trim() || ENV_DEFAULTS.hostname,\n dataDir,\n toolsDir: env.JARELA_TOOLS_DIR ? expandHome(env.JARELA_TOOLS_DIR) : join(dataDir, \"tools\"),\n httpRequestTimeoutMs: parsePositiveInt(env.JARELA_HTTP_REQUEST_TIMEOUT_MS, ENV_DEFAULTS.httpRequestTimeoutMs),\n sseConnectTimeoutMs: parsePositiveInt(env.JARELA_SSE_CONNECT_TIMEOUT_MS, ENV_DEFAULTS.sseConnectTimeoutMs),\n healthCheckTimeoutMs: parsePositiveInt(env.JARELA_HEALTH_CHECK_TIMEOUT_MS, ENV_DEFAULTS.healthCheckTimeoutMs),\n httpMaxAttempts: parsePositiveInt(env.JARELA_HTTP_MAX_ATTEMPTS, ENV_DEFAULTS.httpMaxAttempts),\n\n // agent\n recursionLimit: parsePositiveInt(env.JARELA_RECURSION_LIMIT, ENV_DEFAULTS.recursionLimit),\n llmStreamMaxMs: parseNonNegativeInt(env.JARELA_LLM_STREAM_MAX_MS, ENV_DEFAULTS.llmStreamMaxMs),\n runIdleMs: parsePositiveInt(env.JARELA_RUN_IDLE_MS, ENV_DEFAULTS.runIdleMs),\n runMaxMs: parsePositiveInt(env.JARELA_RUN_MAX_MS, ENV_DEFAULTS.runMaxMs),\n runRegistryTtlMs: parsePositiveInt(env.JARELA_RUN_REGISTRY_TTL_MS, ENV_DEFAULTS.runRegistryTtlMs),\n runBufferSize: parsePositiveInt(env.JARELA_RUN_BUFFER_SIZE, ENV_DEFAULTS.runBufferSize),\n maxStallRetries: parseNonNegativeInt(env.JARELA_MAX_STALL_RETRIES, ENV_DEFAULTS.maxStallRetries),\n maxTransientRetries: parseNonNegativeInt(env.JARELA_MAX_TRANSIENT_RETRIES, ENV_DEFAULTS.maxTransientRetries),\n maxDelegationDepth: parseNonNegativeInt(env.JARELA_MAX_DELEGATION_DEPTH, ENV_DEFAULTS.maxDelegationDepth),\n streamParseTripwire: parsePositiveInt(env.JARELA_STREAM_PARSE_TRIPWIRE, ENV_DEFAULTS.streamParseTripwire),\n\n // tools\n voiceTimeoutMs: parsePositiveInt(env.JARELA_VOICE_TIMEOUT_MS, ENV_DEFAULTS.voiceTimeoutMs),\n imageTimeoutMs: parsePositiveInt(env.JARELA_IMAGE_TIMEOUT_MS, ENV_DEFAULTS.imageTimeoutMs),\n fetchToolMaxBytes: parsePositiveInt(env.JARELA_FETCH_TOOL_MAX_BYTES, ENV_DEFAULTS.fetchToolMaxBytes),\n mcpRegistryTimeoutMs: parsePositiveInt(env.JARELA_MCP_REGISTRY_TIMEOUT_MS, ENV_DEFAULTS.mcpRegistryTimeoutMs),\n execMaxOutputBytes: parsePositiveInt(env.JARELA_EXEC_MAX_OUTPUT_BYTES, ENV_DEFAULTS.execMaxOutputBytes),\n filesMaxReadBytes: parsePositiveInt(env.JARELA_FILES_MAX_READ_BYTES, ENV_DEFAULTS.filesMaxReadBytes),\n filesMaxWriteBytes: parsePositiveInt(env.JARELA_FILES_MAX_WRITE_BYTES, ENV_DEFAULTS.filesMaxWriteBytes),\n\n // lifecycle\n updateCheckTimeoutMs: parsePositiveInt(env.JARELA_UPDATE_CHECK_TIMEOUT_MS, ENV_DEFAULTS.updateCheckTimeoutMs),\n shutdownDrainMs: parsePositiveInt(env.JARELA_SHUTDOWN_DRAIN_MS, ENV_DEFAULTS.shutdownDrainMs),\n shutdownSettleMs: parseNonNegativeInt(env.JARELA_SHUTDOWN_SETTLE_MS, ENV_DEFAULTS.shutdownSettleMs),\n disableUpdateCheck: parseBool(env.JARELA_DISABLE_UPDATE_CHECK, false),\n\n // limits\n notificationRingSize: parsePositiveInt(env.JARELA_NOTIFICATION_RING_SIZE, ENV_DEFAULTS.notificationRingSize),\n\n // logging\n logsRingSize: parsePositiveInt(env.JARELA_LOGS_RING_SIZE, ENV_DEFAULTS.logsRingSize),\n logLevel: parseLogLevel(env.JARELA_LOG_LEVEL, ENV_DEFAULTS.logLevel),\n\n // scheduler\n schedulerTickMs: parsePositiveInt(env.JARELA_SCHEDULER_TICK_MS, ENV_DEFAULTS.schedulerTickMs),\n fastRemoteSweepMs: parsePositiveInt(env.JARELA_FAST_REMOTE_SWEEP_MS, ENV_DEFAULTS.fastRemoteSweepMs),\n\n // documents\n docMaxFileBytes: parsePositiveInt(env.JARELA_DOC_MAX_FILE_BYTES, ENV_DEFAULTS.docMaxFileBytes),\n docMaxFilesPerSource: parsePositiveInt(env.JARELA_DOC_MAX_FILES_PER_SOURCE, ENV_DEFAULTS.docMaxFilesPerSource),\n\n // anti-hallucination classifier\n hallucinationDetectorMode: parseHallucinationMode(\n env.JARELA_HALLUCINATION_DETECTOR_MODE,\n ENV_DEFAULTS.hallucinationDetectorMode,\n ),\n hallucinationDetectorModel: (env.JARELA_HALLUCINATION_DETECTOR_MODEL ?? ENV_DEFAULTS.hallucinationDetectorModel).trim(),\n citationCheckerTailChars: parseNonNegativeInt(env.JARELA_CITATION_CHECKER_TAIL_CHARS, ENV_DEFAULTS.citationCheckerTailChars),\n citationManifestMax: parseNonNegativeInt(env.JARELA_CITATION_MANIFEST_MAX, ENV_DEFAULTS.citationManifestMax),\n\n // app metadata\n appName: getAppName(),\n appDescription: getAppDescription(),\n issueUrl: getAppIssueUrl(),\n };\n return cached;\n}\n\n/** Drop the memoised config so the next read picks up env edits. Used by tests + the env-override PATCH endpoint. */\nexport function resetConfigCache(): void {\n cached = null;\n}\n"],"names":["getOrCreateGlobal","key","factory","g","globalThis","undefined","getConfig","state","registered","shuttingDown","HARD_TIMEOUT_MS","shutdownDrainMs","RUN_DRAIN_MS","shutdownSettleMs","registerShutdownHandlers","handler","signal","console","log","process","exit","runShutdown","catch","err","error","removeAllListeners","on","platform","forceExit","setTimeout","warn","unref","abortAllRuns","n","stopScheduler","stopAllTriggerHandlers","stopAllBridges","waitForRunsToSettle","stuck","closeDb","clearTimeout","DEFAULT_APP_NAME","DEFAULT_APP_DESCRIPTION","DEFAULT_ISSUE_URL","getAppName","env","NEXT_PUBLIC_APP_NAME","trim","getAppDescription","NEXT_PUBLIC_APP_DESCRIPTION","getAppIssueUrl","NEXT_PUBLIC_APP_ISSUE_URL","getDataDir","ENV_DEFAULTS","join","homedir","parsePositiveInt","value","fallback","Number","isFinite","Math","floor","parseNonNegativeInt","parsePort","parseBool","v","toLowerCase","parseHallucinationMode","parseLogLevel","cached","expandHome","p","startsWith","replace","dataDir","port","JARELA_PORT","PORT","hostname","JARELA_HOSTNAME","HOSTNAME","toolsDir","JARELA_TOOLS_DIR","httpRequestTimeoutMs","JARELA_HTTP_REQUEST_TIMEOUT_MS","sseConnectTimeoutMs","JARELA_SSE_CONNECT_TIMEOUT_MS","healthCheckTimeoutMs","JARELA_HEALTH_CHECK_TIMEOUT_MS","httpMaxAttempts","JARELA_HTTP_MAX_ATTEMPTS","recursionLimit","JARELA_RECURSION_LIMIT","llmStreamMaxMs","JARELA_LLM_STREAM_MAX_MS","runIdleMs","JARELA_RUN_IDLE_MS","runMaxMs","JARELA_RUN_MAX_MS","runRegistryTtlMs","JARELA_RUN_REGISTRY_TTL_MS","runBufferSize","JARELA_RUN_BUFFER_SIZE","maxStallRetries","JARELA_MAX_STALL_RETRIES","maxTransientRetries","JARELA_MAX_TRANSIENT_RETRIES","maxDelegationDepth","JARELA_MAX_DELEGATION_DEPTH","streamParseTripwire","JARELA_STREAM_PARSE_TRIPWIRE","voiceTimeoutMs","JARELA_VOICE_TIMEOUT_MS","imageTimeoutMs","JARELA_IMAGE_TIMEOUT_MS","fetchToolMaxBytes","JARELA_FETCH_TOOL_MAX_BYTES","mcpRegistryTimeoutMs","JARELA_MCP_REGISTRY_TIMEOUT_MS","execMaxOutputBytes","JARELA_EXEC_MAX_OUTPUT_BYTES","filesMaxReadBytes","JARELA_FILES_MAX_READ_BYTES","filesMaxWriteBytes","JARELA_FILES_MAX_WRITE_BYTES","updateCheckTimeoutMs","JARELA_UPDATE_CHECK_TIMEOUT_MS","JARELA_SHUTDOWN_DRAIN_MS","JARELA_SHUTDOWN_SETTLE_MS","disableUpdateCheck","JARELA_DISABLE_UPDATE_CHECK","notificationRingSize","JARELA_NOTIFICATION_RING_SIZE","logsRingSize","JARELA_LOGS_RING_SIZE","logLevel","JARELA_LOG_LEVEL","schedulerTickMs","JARELA_SCHEDULER_TICK_MS","fastRemoteSweepMs","JARELA_FAST_REMOTE_SWEEP_MS","docMaxFileBytes","JARELA_DOC_MAX_FILE_BYTES","docMaxFilesPerSource","JARELA_DOC_MAX_FILES_PER_SOURCE","hallucinationDetectorMode","JARELA_HALLUCINATION_DETECTOR_MODE","hallucinationDetectorModel","JARELA_HALLUCINATION_DETECTOR_MODEL","citationCheckerTailChars","JARELA_CITATION_CHECKER_TAIL_CHARS","citationManifestMax","JARELA_CITATION_MANIFEST_MAX","appName","appDescription","issueUrl","resetConfigCache"],"sourceRoot":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"9032.js","mappings":";;;;;;;;;;;AAAA,4EAA4E;AAC5E,EAAE;AACF,uEAAuE;AACvE,uEAAuE;AACvE,qEAAqE;AACrE,oEAAoE;AACpE,EAAE;AACF,uEAAuE;AACvE,uDAAuD;AAChD,SAASA,kBAAqBC,GAAW,EAAEC,OAAgB;IAChE,MAAMC,IAAIC;IACV,IAAID,CAAC,CAACF,IAAI,KAAKI,WAAWF,CAAC,CAACF,IAAI,GAAGC;IACnC,OAAOC,CAAC,CAACF,IAAI;AACf;;;;;;;;;;;;;ACbA,iCAAiC;AACjC,EAAE;AACF,wEAAwE;AACxE,uEAAuE;AACvE,mCAAmC;A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AAI4F,gBAAgB,EAAEpF,2DAAYA,CAACmF,QAAQ;QAEnE,YAAY;QACZE,iBAAiBlF,iBAAiBX,IAAI8F,wBAAwB,EAAEtF,2DAAYA,CAACqF,eAAe;QAC5FE,mBAAmBpF,iBAAiBX,IAAIgG,2BAA2B,EAAExF,2DAAYA,CAACuF,iBAAiB;QAEnG,YAAY;QACZE,iBAAiBtF,iBAAiBX,IAAIkG,yBAAyB,EAAE1F,2DAAYA,CAACyF,eAAe;QAC7FE,sBAAsBxF,iBAAiBX,IAAIoG,+BAA+B,EAAE5F,2DAAYA,CAAC2F,oBAAoB;QAE7G,gCAAgC;QAChCE,2BAA2B9E,uBACzBvB,IAAIsG,kCAAkC,EACtC9F,2DAAYA,CAAC6F,yBAAyB;QAExCE,4BAA4B,CAACvG,IAAIwG,mCAAmC,IAAIhG,2DAAYA,CAAC+F,0BAA0B,EAAErG,IAAI;QACrHuG,0BAA0BvF,oBAAoBlB,IAAI0G,kCAAkC,EAAElG,2DAAYA,CAACiG,wBAAwB;QAC3HE,qBAAqBzF,oBAAoBlB,IAAI4G,4BAA4B,EAAEpG,2DAAYA,CAACmG,mBAAmB;QAE3G,eAAe;QACfE,SAAS9G,iEAAUA;QACnB+G,gBAAgB3G,wEAAiBA;QACjC4G,UAAU1G,qEAAcA;IAC1B;IACA,OAAOoB;AACT;AAEA,mHAAmH,GAC5G,SAASuF;IACdvF,SAAS;AACX","sources":["webpack://@circuitwall/jarela/./lib/utils/global-state.ts","webpack://@circuitwall/jarela/./lib/lifecycle/shutdown.ts","webpack://@circuitwall/jarela/./lib/env/app-config.ts","webpack://@circuitwall/jarela/./lib/env/config.ts"],"sourcesContent":["// Pin a piece of state to globalThis so it survives Next.js dev hot-reload.\n//\n// Without this, every code edit re-evaluates the module, replacing the\n// in-memory state with empty containers — but any active closure still\n// references the OLD set, so listeners/timers/maps go silently dead.\n// The globalThis trick is the standard Next pattern for singletons.\n//\n// `key` must be unique across the app (it lives on globalThis); pick a\n// \"__jarela_<name>\" prefix to keep the namespace tidy.\nexport function getOrCreateGlobal<T>(key: string, factory: () => T): T {\n const g = globalThis as unknown as Record<string, unknown>;\n if (g[key] === undefined) g[key] = factory();\n return g[key] as T;\n}\n","// Graceful shutdown coordinator.\n//\n// Registers SIGINT / SIGTERM (and SIGBREAK on Windows) so Ctrl-C in the\n// foreground and `kill`/`systemctl stop`/Task Scheduler \"End task\" all\n// trigger the same drain sequence:\n//\n// 1. abort every in-flight LangGraph run so stream loops bail out\n// 2. stop the scheduler tick so no new firings start\n// 3. close every bridge adapter (WhatsApp WS, future kinds) cleanly\n// 4. wait briefly for the runs to actually finish flushing\n// 5. close the SQLite handle so WAL is checkpointed\n// 6. exit 0\n//\n// A hard timeout aborts the drain if any subsystem hangs — the supervisor\n// (Task Scheduler / systemd / installed-launcher.ps1) will then restart us\n// instead of leaving a zombie holding the port.\n//\n// Wired from `instrumentation.ts` so it runs once per server process at\n// boot. Idempotent: only the first call installs handlers.\n\nimport { getOrCreateGlobal } from \"@/lib/utils/global-state\";\nimport { getConfig } from \"@/lib/env/config\";\n\ninterface ShutdownState {\n registered: boolean;\n shuttingDown: boolean;\n}\nconst state = getOrCreateGlobal<ShutdownState>(\"__jarela_shutdown\", () => ({\n registered: false,\n shuttingDown: false,\n}));\n\n// JARELA_SHUTDOWN_DRAIN_MS / JARELA_SHUTDOWN_SETTLE_MS override these.\n// Captured at handler-install time (boot); these don't hot-reload because\n// the handlers close over the values.\nconst HARD_TIMEOUT_MS = getConfig().shutdownDrainMs;\nconst RUN_DRAIN_MS = getConfig().shutdownSettleMs;\n\nexport function registerShutdownHandlers(): void {\n if (state.registered) return;\n state.registered = true;\n\n const handler = (signal: NodeJS.Signals) => {\n if (state.shuttingDown) {\n // Second signal while already draining: operator is impatient, exit\n // immediately. Mirrors the behaviour every well-behaved daemon has —\n // first Ctrl-C drains, second Ctrl-C kills.\n console.log(`[jarela] received ${signal} during shutdown; forcing exit.`);\n process.exit(130);\n }\n state.shuttingDown = true;\n console.log(`[jarela] ${signal} received, draining…`);\n void runShutdown().catch((err) => {\n console.error(`[jarela] shutdown error:`, err);\n process.exit(1);\n });\n };\n\n // Replace any default handlers Next's standalone server may have\n // installed for these signals. Next's default just calls\n // `server.close(() => process.exit(0))`, which races our drain and can\n // exit the process before bridges/DB have flushed. We take over and\n // exit ourselves once drain completes.\n process.removeAllListeners(\"SIGINT\");\n process.removeAllListeners(\"SIGTERM\");\n process.on(\"SIGINT\", handler);\n process.on(\"SIGTERM\", handler);\n if (process.platform === \"win32\") {\n // Ctrl-Break in a foreground PowerShell session lands as SIGBREAK,\n // not SIGINT. Task Scheduler \"End task\" delivers SIGBREAK as well.\n process.removeAllListeners(\"SIGBREAK\");\n process.on(\"SIGBREAK\", handler);\n }\n}\n\nasync function runShutdown(): Promise<void> {\n // Safety net: if any drain step deadlocks (e.g. a bridge adapter's\n // socket.close() never resolves), force-exit so the supervisor can\n // restart cleanly instead of holding the port forever.\n const forceExit = setTimeout(() => {\n console.warn(`[jarela] drain exceeded ${HARD_TIMEOUT_MS}ms; forcing exit.`);\n process.exit(130);\n }, HARD_TIMEOUT_MS);\n forceExit.unref?.();\n\n // 1. Abort in-flight LLM runs. The route's stream loop watches this\n // AbortController and exits early, emitting a trailing error chunk.\n try {\n const { abortAllRuns } = await import(\"@/lib/agents/run-registry\");\n const n = abortAllRuns(\"server_shutdown\");\n if (n > 0) console.log(`[jarela] aborted ${n} in-flight run(s).`);\n } catch (err) {\n console.error(\"[jarela] aborting runs failed:\", err);\n }\n\n // 2. Stop the scheduler so no firing kicks off mid-drain.\n try {\n const { stopScheduler } = await import(\"@/lib/scheduler\");\n stopScheduler();\n } catch (err) {\n console.error(\"[jarela] stopping scheduler failed:\", err);\n }\n\n // 2b. Drain trigger handlers — closes fs.watch watchers and any other\n // handler that has timers / sockets attached. Independent of the\n // scheduler tick (those are run-loop ownership; this is per-handler\n // ownership of OS resources).\n try {\n const { stopAllTriggerHandlers } = await import(\"@/lib/triggers\");\n await stopAllTriggerHandlers();\n } catch (err) {\n console.error(\"[jarela] stopping trigger handlers failed:\", err);\n }\n\n // 3. Close bridges (WhatsApp Baileys WS, etc).\n try {\n const { stopAllBridges } = await import(\"@/lib/bridges/runtime\");\n await stopAllBridges();\n } catch (err) {\n console.error(\"[jarela] stopping bridges failed:\", err);\n }\n\n // 4. Give aborted runs a beat to actually finish — they were signalled\n // in step 1, but the `finally` blocks need ticks to flush trailing\n // events and persist the partial assistant message.\n try {\n const { waitForRunsToSettle } = await import(\"@/lib/agents/run-registry\");\n const stuck = await waitForRunsToSettle(RUN_DRAIN_MS);\n if (stuck > 0) console.warn(`[jarela] ${stuck} run(s) still active after drain window.`);\n } catch (err) {\n console.error(\"[jarela] waiting for runs failed:\", err);\n }\n\n // 5. Close the DB. WAL is checkpointed so the next boot is fast and we\n // leave no stale -shm/-wal sidecars on disk.\n try {\n const { closeDb } = await import(\"@/lib/db\");\n closeDb();\n } catch (err) {\n console.error(\"[jarela] closing db failed:\", err);\n }\n\n clearTimeout(forceExit);\n console.log(\"[jarela] shutdown complete.\");\n process.exit(0);\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","// Central runtime configuration, resolved from environment variables.\n//\n// All operational knobs (port, host, data dir, timeouts, agent limits) flow\n// through this module so there is exactly one place documenting which env\n// vars Jarela respects and what the defaults are. Code MUST NOT read these\n// `process.env` keys directly — import `config` instead.\n//\n// Resolution order for every entry: explicit JARELA_* var → legacy/standard\n// var (where one exists, e.g. PORT/HOSTNAME for Next.js compatibility) →\n// schema default (lib/env/schema.ts).\n//\n// Values are resolved lazily on first read and cached. Tests + the env-\n// override PATCH endpoint must call `resetConfigCache()` between cases.\n\nimport { getDataDir } from \"@/lib/db/data-dir\";\nimport { getAppName, getAppDescription, getAppIssueUrl } from \"./app-config\";\nimport { ENV_DEFAULTS } from \"./schema\";\nimport { join } from \"node:path\";\nimport { homedir } from \"node:os\";\n\nexport interface JarelaConfig {\n // network\n readonly port: number;\n readonly hostname: string;\n readonly dataDir: string;\n readonly toolsDir: string;\n readonly httpRequestTimeoutMs: number;\n readonly sseConnectTimeoutMs: number;\n readonly healthCheckTimeoutMs: number;\n readonly httpMaxAttempts: number;\n\n // agent\n readonly recursionLimit: number;\n readonly llmStreamMaxMs: number;\n readonly runIdleMs: number;\n readonly runMaxMs: number;\n readonly runRegistryTtlMs: number;\n readonly runBufferSize: number;\n readonly maxStallRetries: number;\n readonly maxTransientRetries: number;\n readonly maxDelegationDepth: number;\n readonly streamParseTripwire: number;\n\n // tools\n readonly voiceTimeoutMs: number;\n readonly imageTimeoutMs: number;\n readonly fetchToolMaxBytes: number;\n readonly mcpRegistryTimeoutMs: number;\n readonly execMaxOutputBytes: number;\n readonly filesMaxReadBytes: number;\n readonly filesMaxWriteBytes: number;\n\n // lifecycle\n readonly updateCheckTimeoutMs: number;\n readonly shutdownDrainMs: number;\n readonly shutdownSettleMs: number;\n readonly disableUpdateCheck: boolean;\n\n // limits\n readonly notificationRingSize: number;\n\n // logging\n readonly logsRingSize: number;\n readonly logLevel: \"debug\" | \"info\" | \"warn\" | \"error\";\n\n // scheduler\n readonly schedulerTickMs: number;\n readonly fastRemoteSweepMs: number;\n\n // documents\n readonly docMaxFileBytes: number;\n readonly docMaxFilesPerSource: number;\n\n // anti-hallucination detector\n readonly hallucinationDetectorMode: \"off\" | \"regex\" | \"model\";\n readonly hallucinationDetectorModel: string;\n readonly citationCheckerTailChars: number;\n readonly citationManifestMax: number;\n\n // app metadata\n readonly appName: string;\n readonly appDescription: string;\n readonly issueUrl: string;\n}\n\nfunction parsePositiveInt(value: string | undefined, fallback: number): number {\n if (!value) return fallback;\n const n = Number(value);\n return Number.isFinite(n) && n > 0 ? Math.floor(n) : fallback;\n}\n\n// Like parsePositiveInt but accepts 0 as a valid value (used to disable\n// deadlines explicitly). Negative / NaN still fall through to the default.\nfunction parseNonNegativeInt(value: string | undefined, fallback: number): number {\n if (value === undefined) return fallback;\n const n = Number(value);\n return Number.isFinite(n) && n >= 0 ? Math.floor(n) : fallback;\n}\n\nfunction parsePort(value: string | undefined, fallback: number): number {\n const n = parsePositiveInt(value, fallback);\n return n >= 1 && n <= 65_535 ? n : fallback;\n}\n\nfunction parseBool(value: string | undefined, fallback: boolean): boolean {\n if (value === undefined) return fallback;\n const v = value.trim().toLowerCase();\n if (v === \"1\" || v === \"true\") return true;\n if (v === \"0\" || v === \"false\") return false;\n return fallback;\n}\n\nfunction parseHallucinationMode(\n value: string | undefined,\n fallback: JarelaConfig[\"hallucinationDetectorMode\"],\n): JarelaConfig[\"hallucinationDetectorMode\"] {\n if (!value) return fallback;\n const v = value.trim().toLowerCase();\n if (v === \"off\" || v === \"regex\" || v === \"model\") return v;\n return fallback;\n}\n\nfunction parseLogLevel(value: string | undefined, fallback: \"debug\" | \"info\" | \"warn\" | \"error\"): JarelaConfig[\"logLevel\"] {\n if (!value) return fallback;\n const v = value.trim().toLowerCase();\n if (v === \"debug\" || v === \"info\" || v === \"warn\" || v === \"error\") return v;\n return fallback;\n}\n\nlet cached: JarelaConfig | null = null;\n\nfunction expandHome(p: string): string {\n return p.startsWith(\"~\") ? p.replace(/^~/, homedir()) : p;\n}\n\nexport function getConfig(): JarelaConfig {\n if (cached) return cached;\n const env = process.env;\n const dataDir = getDataDir();\n cached = {\n // network\n port: parsePort(env.JARELA_PORT ?? env.PORT, ENV_DEFAULTS.port),\n hostname: (env.JARELA_HOSTNAME ?? env.HOSTNAME ?? ENV_DEFAULTS.hostname).trim() || ENV_DEFAULTS.hostname,\n dataDir,\n toolsDir: env.JARELA_TOOLS_DIR ? expandHome(env.JARELA_TOOLS_DIR) : join(dataDir, \"tools\"),\n httpRequestTimeoutMs: parsePositiveInt(env.JARELA_HTTP_REQUEST_TIMEOUT_MS, ENV_DEFAULTS.httpRequestTimeoutMs),\n sseConnectTimeoutMs: parsePositiveInt(env.JARELA_SSE_CONNECT_TIMEOUT_MS, ENV_DEFAULTS.sseConnectTimeoutMs),\n healthCheckTimeoutMs: parsePositiveInt(env.JARELA_HEALTH_CHECK_TIMEOUT_MS, ENV_DEFAULTS.healthCheckTimeoutMs),\n httpMaxAttempts: parsePositiveInt(env.JARELA_HTTP_MAX_ATTEMPTS, ENV_DEFAULTS.httpMaxAttempts),\n\n // agent\n recursionLimit: parsePositiveInt(env.JARELA_RECURSION_LIMIT, ENV_DEFAULTS.recursionLimit),\n llmStreamMaxMs: parseNonNegativeInt(env.JARELA_LLM_STREAM_MAX_MS, ENV_DEFAULTS.llmStreamMaxMs),\n runIdleMs: parsePositiveInt(env.JARELA_RUN_IDLE_MS, ENV_DEFAULTS.runIdleMs),\n runMaxMs: parsePositiveInt(env.JARELA_RUN_MAX_MS, ENV_DEFAULTS.runMaxMs),\n runRegistryTtlMs: parsePositiveInt(env.JARELA_RUN_REGISTRY_TTL_MS, ENV_DEFAULTS.runRegistryTtlMs),\n runBufferSize: parsePositiveInt(env.JARELA_RUN_BUFFER_SIZE, ENV_DEFAULTS.runBufferSize),\n maxStallRetries: parseNonNegativeInt(env.JARELA_MAX_STALL_RETRIES, ENV_DEFAULTS.maxStallRetries),\n maxTransientRetries: parseNonNegativeInt(env.JARELA_MAX_TRANSIENT_RETRIES, ENV_DEFAULTS.maxTransientRetries),\n maxDelegationDepth: parseNonNegativeInt(env.JARELA_MAX_DELEGATION_DEPTH, ENV_DEFAULTS.maxDelegationDepth),\n streamParseTripwire: parsePositiveInt(env.JARELA_STREAM_PARSE_TRIPWIRE, ENV_DEFAULTS.streamParseTripwire),\n\n // tools\n voiceTimeoutMs: parsePositiveInt(env.JARELA_VOICE_TIMEOUT_MS, ENV_DEFAULTS.voiceTimeoutMs),\n imageTimeoutMs: parsePositiveInt(env.JARELA_IMAGE_TIMEOUT_MS, ENV_DEFAULTS.imageTimeoutMs),\n fetchToolMaxBytes: parsePositiveInt(env.JARELA_FETCH_TOOL_MAX_BYTES, ENV_DEFAULTS.fetchToolMaxBytes),\n mcpRegistryTimeoutMs: parsePositiveInt(env.JARELA_MCP_REGISTRY_TIMEOUT_MS, ENV_DEFAULTS.mcpRegistryTimeoutMs),\n execMaxOutputBytes: parsePositiveInt(env.JARELA_EXEC_MAX_OUTPUT_BYTES, ENV_DEFAULTS.execMaxOutputBytes),\n filesMaxReadBytes: parsePositiveInt(env.JARELA_FILES_MAX_READ_BYTES, ENV_DEFAULTS.filesMaxReadBytes),\n filesMaxWriteBytes: parsePositiveInt(env.JARELA_FILES_MAX_WRITE_BYTES, ENV_DEFAULTS.filesMaxWriteBytes),\n\n // lifecycle\n updateCheckTimeoutMs: parsePositiveInt(env.JARELA_UPDATE_CHECK_TIMEOUT_MS, ENV_DEFAULTS.updateCheckTimeoutMs),\n shutdownDrainMs: parsePositiveInt(env.JARELA_SHUTDOWN_DRAIN_MS, ENV_DEFAULTS.shutdownDrainMs),\n shutdownSettleMs: parseNonNegativeInt(env.JARELA_SHUTDOWN_SETTLE_MS, ENV_DEFAULTS.shutdownSettleMs),\n disableUpdateCheck: parseBool(env.JARELA_DISABLE_UPDATE_CHECK, false),\n\n // limits\n notificationRingSize: parsePositiveInt(env.JARELA_NOTIFICATION_RING_SIZE, ENV_DEFAULTS.notificationRingSize),\n\n // logging\n logsRingSize: parsePositiveInt(env.JARELA_LOGS_RING_SIZE, ENV_DEFAULTS.logsRingSize),\n logLevel: parseLogLevel(env.JARELA_LOG_LEVEL, ENV_DEFAULTS.logLevel),\n\n // scheduler\n schedulerTickMs: parsePositiveInt(env.JARELA_SCHEDULER_TICK_MS, ENV_DEFAULTS.schedulerTickMs),\n fastRemoteSweepMs: parsePositiveInt(env.JARELA_FAST_REMOTE_SWEEP_MS, ENV_DEFAULTS.fastRemoteSweepMs),\n\n // documents\n docMaxFileBytes: parsePositiveInt(env.JARELA_DOC_MAX_FILE_BYTES, ENV_DEFAULTS.docMaxFileBytes),\n docMaxFilesPerSource: parsePositiveInt(env.JARELA_DOC_MAX_FILES_PER_SOURCE, ENV_DEFAULTS.docMaxFilesPerSource),\n\n // anti-hallucination classifier\n hallucinationDetectorMode: parseHallucinationMode(\n env.JARELA_HALLUCINATION_DETECTOR_MODE,\n ENV_DEFAULTS.hallucinationDetectorMode,\n ),\n hallucinationDetectorModel: (env.JARELA_HALLUCINATION_DETECTOR_MODEL ?? ENV_DEFAULTS.hallucinationDetectorModel).trim(),\n citationCheckerTailChars: parseNonNegativeInt(env.JARELA_CITATION_CHECKER_TAIL_CHARS, ENV_DEFAULTS.citationCheckerTailChars),\n citationManifestMax: parseNonNegativeInt(env.JARELA_CITATION_MANIFEST_MAX, ENV_DEFAULTS.citationManifestMax),\n\n // app metadata\n appName: getAppName(),\n appDescription: getAppDescription(),\n issueUrl: getAppIssueUrl(),\n };\n return cached;\n}\n\n/** Drop the memoised config so the next read picks up env edits. Used by tests + the env-override PATCH endpoint. */\nexport function resetConfigCache(): void {\n cached = null;\n}\n"],"names":["getOrCreateGlobal","key","factory","g","globalThis","undefined","getConfig","state","registered","shuttingDown","HARD_TIMEOUT_MS","shutdownDrainMs","RUN_DRAIN_MS","shutdownSettleMs","registerShutdownHandlers","handler","signal","console","log","process","exit","runShutdown","catch","err","error","removeAllListeners","on","platform","forceExit","setTimeout","warn","unref","abortAllRuns","n","stopScheduler","stopAllTriggerHandlers","stopAllBridges","waitForRunsToSettle","stuck","closeDb","clearTimeout","DEFAULT_APP_NAME","DEFAULT_APP_DESCRIPTION","DEFAULT_ISSUE_URL","getAppName","env","NEXT_PUBLIC_APP_NAME","trim","getAppDescription","NEXT_PUBLIC_APP_DESCRIPTION","getAppIssueUrl","NEXT_PUBLIC_APP_ISSUE_URL","getDataDir","ENV_DEFAULTS","join","homedir","parsePositiveInt","value","fallback","Number","isFinite","Math","floor","parseNonNegativeInt","parsePort","parseBool","v","toLowerCase","parseHallucinationMode","parseLogLevel","cached","expandHome","p","startsWith","replace","dataDir","port","JARELA_PORT","PORT","hostname","JARELA_HOSTNAME","HOSTNAME","toolsDir","JARELA_TOOLS_DIR","httpRequestTimeoutMs","JARELA_HTTP_REQUEST_TIMEOUT_MS","sseConnectTimeoutMs","JARELA_SSE_CONNECT_TIMEOUT_MS","healthCheckTimeoutMs","JARELA_HEALTH_CHECK_TIMEOUT_MS","httpMaxAttempts","JARELA_HTTP_MAX_ATTEMPTS","recursionLimit","JARELA_RECURSION_LIMIT","llmStreamMaxMs","JARELA_LLM_STREAM_MAX_MS","runIdleMs","JARELA_RUN_IDLE_MS","runMaxMs","JARELA_RUN_MAX_MS","runRegistryTtlMs","JARELA_RUN_REGISTRY_TTL_MS","runBufferSize","JARELA_RUN_BUFFER_SIZE","maxStallRetries","JARELA_MAX_STALL_RETRIES","maxTransientRetries","JARELA_MAX_TRANSIENT_RETRIES","maxDelegationDepth","JARELA_MAX_DELEGATION_DEPTH","streamParseTripwire","JARELA_STREAM_PARSE_TRIPWIRE","voiceTimeoutMs","JARELA_VOICE_TIMEOUT_MS","imageTimeoutMs","JARELA_IMAGE_TIMEOUT_MS","fetchToolMaxBytes","JARELA_FETCH_TOOL_MAX_BYTES","mcpRegistryTimeoutMs","JARELA_MCP_REGISTRY_TIMEOUT_MS","execMaxOutputBytes","JARELA_EXEC_MAX_OUTPUT_BYTES","filesMaxReadBytes","JARELA_FILES_MAX_READ_BYTES","filesMaxWriteBytes","JARELA_FILES_MAX_WRITE_BYTES","updateCheckTimeoutMs","JARELA_UPDATE_CHECK_TIMEOUT_MS","JARELA_SHUTDOWN_DRAIN_MS","JARELA_SHUTDOWN_SETTLE_MS","disableUpdateCheck","JARELA_DISABLE_UPDATE_CHECK","notificationRingSize","JARELA_NOTIFICATION_RING_SIZE","logsRingSize","JARELA_LOGS_RING_SIZE","logLevel","JARELA_LOG_LEVEL","schedulerTickMs","JARELA_SCHEDULER_TICK_MS","fastRemoteSweepMs","JARELA_FAST_REMOTE_SWEEP_MS","docMaxFileBytes","JARELA_DOC_MAX_FILE_BYTES","docMaxFilesPerSource","JARELA_DOC_MAX_FILES_PER_SOURCE","hallucinationDetectorMode","JARELA_HALLUCINATION_DETECTOR_MODE","hallucinationDetectorModel","JARELA_HALLUCINATION_DETECTOR_MODEL","citationCheckerTailChars","JARELA_CITATION_CHECKER_TAIL_CHARS","citationManifestMax","JARELA_CITATION_MANIFEST_MAX","appName","appDescription","issueUrl","resetConfigCache"],"sourceRoot":"","ignoreList":[]}
|
|
@@ -4,8 +4,8 @@ globalThis.__BUILD_MANIFEST = {
|
|
|
4
4
|
],
|
|
5
5
|
"devFiles": [],
|
|
6
6
|
"lowPriorityFiles": [
|
|
7
|
-
"static/
|
|
8
|
-
"static/
|
|
7
|
+
"static/AV5AO0yTRABo-NgwxhDe7/_buildManifest.js",
|
|
8
|
+
"static/AV5AO0yTRABo-NgwxhDe7/_ssgManifest.js"
|
|
9
9
|
],
|
|
10
10
|
"rootMainFiles": [
|
|
11
11
|
"static/chunks/webpack-ff5627013a5e3842.js",
|
|
@@ -110,4 +110,4 @@
|
|
|
110
110
|
if (!document.hidden) { setTimeout(apply, 50); setTimeout(apply, 200); }
|
|
111
111
|
});
|
|
112
112
|
} catch (e) { /* non-fatal: falls back to 100dvh */ }
|
|
113
|
-
})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-ff5627013a5e3842.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n9:I[7123,[],\"default\",1]\n:HL[\"/_next/static/css/9e7f2876a726408f.css\",\"style\"]\n2:T4b9,(() =\u003e {\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\" \u0026\u0026 t !== \"dark\" \u0026\u0026 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 \u003c 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})();3:Tf06,"])</script><script>self.__next_f.push([1,"(() =\u003e {\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 \u0026\u0026 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() \u0026\u0026 (window.innerHeight - vh) \u003e 50;\n var isPortrait = window.innerHeight \u003e 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 \u0026\u0026 isPortrait) {\n var screenH = Math.max(window.screen.height, window.screen.width);\n if (screenH - vh \u003e 15) {\n var top = safeTopPx();\n if (top \u003e 0) vh += top;\n }\n }\n document.documentElement.style.setProperty('--actual-vh', vh + 'px');\n if (last \u003e 0 \u0026\u0026 Math.abs(vh - last) \u003e 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})();"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/9e7f2876a726408f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"data-theme\":\"system\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"$2\"}}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"$3\"}}]]}],\"$L4\"]}]]}],{\"children\":[\"$L5\",{\"children\":[\"$L6\",{},null,false,null]},null,false,\"$@7\"]},null,false,null],\"$L8\",false]],\"m\":\"$undefined\",\"G\":[\"$9\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"2xWP8843jbntFGKLnHK6R\"}\n"])</script><script>self.__next_f.push([1,"a:I[737,[\"7177\",\"static/chunks/app/layout-84c6f211a7a1ca36.js\"],\"ThemeProvider\"]\nb:I[3639,[\"7177\",\"static/chunks/app/layout-84c6f211a7a1ca36.js\"],\"AppProvider\"]\nc:I[7121,[],\"\"]\nd:I[4581,[],\"\"]\ne:I[722,[\"7177\",\"static/chunks/app/layout-84c6f211a7a1ca36.js\"],\"ServiceWorkerRegistration\"]\nf:I[484,[],\"OutletBoundary\"]\n10:\"$Sreact.suspense\"\n13:I[484,[],\"ViewportBoundary\"]\n15:I[484,[],\"MetadataBoundary\"]\n4:[\"$\",\"body\",null,{\"children\":[[\"$\",\"$La\",null,{\"children\":[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Ld\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}],[\"$\",\"$Le\",null,{}]]}]\n5:[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Ld\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]\n6:[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$10\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@11\"}]}]]}]\n12:[]\n7:\"$W12\"\n8:[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L13\",null,{\"children\":\"$L14\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L15\",null,{\"children\":[\"$\",\"$10\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L16\"}]}]}],null]}]\n"])</script><script>self.__next_f.push([1,"14:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover, interactive-widget=resizes-content\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#ffffff\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"meta\",\"3\",{\"name\":\"theme-color\",\"content\":\"#09090b\",\"media\":\"(prefers-color-scheme: dark)\"}]]\n"])</script><script>self.__next_f.push([1,"17:I[6869,[],\"IconMark\"]\n11:null\n16:[[\"$\",\"title\",\"0\",{\"children\":\"Jarela\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Jarela — local chat interface for LangGraph agents\"}],[\"$\",\"link\",\"2\",{\"rel\":\"manifest\",\"href\":\"/manifest.json\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"meta\",\"3\",{\"name\":\"mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"4\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Jarela\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"6\",{\"rel\":\"icon\",\"href\":\"/favicon.svg\",\"type\":\"image/svg+xml\"}],[\"$\",\"link\",\"7\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"sizes\":\"any\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/icon-192.png\",\"type\":\"image/png\",\"sizes\":\"192x192\"}],[\"$\",\"link\",\"9\",{\"rel\":\"icon\",\"href\":\"/icon-512.png\",\"type\":\"image/png\",\"sizes\":\"512x512\"}],[\"$\",\"link\",\"10\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-touch-icon.png\",\"sizes\":\"180x180\"}],[\"$\",\"$L17\",\"11\",{}]]\n"])</script></body></html>
|
|
113
|
+
})();</script><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-ff5627013a5e3842.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n9:I[7123,[],\"default\",1]\n:HL[\"/_next/static/css/9e7f2876a726408f.css\",\"style\"]\n2:T4b9,(() =\u003e {\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\" \u0026\u0026 t !== \"dark\" \u0026\u0026 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 \u003c 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})();3:Tf06,"])</script><script>self.__next_f.push([1,"(() =\u003e {\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 \u0026\u0026 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() \u0026\u0026 (window.innerHeight - vh) \u003e 50;\n var isPortrait = window.innerHeight \u003e 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 \u0026\u0026 isPortrait) {\n var screenH = Math.max(window.screen.height, window.screen.width);\n if (screenH - vh \u003e 15) {\n var top = safeTopPx();\n if (top \u003e 0) vh += top;\n }\n }\n document.documentElement.style.setProperty('--actual-vh', vh + 'px');\n if (last \u003e 0 \u0026\u0026 Math.abs(vh - last) \u003e 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})();"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/9e7f2876a726408f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"data-theme\":\"system\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"$2\"}}],[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"$3\"}}]]}],\"$L4\"]}]]}],{\"children\":[\"$L5\",{\"children\":[\"$L6\",{},null,false,null]},null,false,\"$@7\"]},null,false,null],\"$L8\",false]],\"m\":\"$undefined\",\"G\":[\"$9\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"AV5AO0yTRABo-NgwxhDe7\"}\n"])</script><script>self.__next_f.push([1,"a:I[737,[\"7177\",\"static/chunks/app/layout-84c6f211a7a1ca36.js\"],\"ThemeProvider\"]\nb:I[3639,[\"7177\",\"static/chunks/app/layout-84c6f211a7a1ca36.js\"],\"AppProvider\"]\nc:I[7121,[],\"\"]\nd:I[4581,[],\"\"]\ne:I[722,[\"7177\",\"static/chunks/app/layout-84c6f211a7a1ca36.js\"],\"ServiceWorkerRegistration\"]\nf:I[484,[],\"OutletBoundary\"]\n10:\"$Sreact.suspense\"\n13:I[484,[],\"ViewportBoundary\"]\n15:I[484,[],\"MetadataBoundary\"]\n4:[\"$\",\"body\",null,{\"children\":[[\"$\",\"$La\",null,{\"children\":[\"$\",\"$Lb\",null,{\"children\":[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Ld\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}],[\"$\",\"$Le\",null,{}]]}]\n5:[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$Lc\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$Ld\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}]\n6:[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$Lf\",null,{\"children\":[\"$\",\"$10\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@11\"}]}]]}]\n12:[]\n7:\"$W12\"\n8:[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L13\",null,{\"children\":\"$L14\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L15\",null,{\"children\":[\"$\",\"$10\",null,{\"name\":\"Next.Metadata\",\"children\":\"$L16\"}]}]}],null]}]\n"])</script><script>self.__next_f.push([1,"14:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, viewport-fit=cover, interactive-widget=resizes-content\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#ffffff\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"meta\",\"3\",{\"name\":\"theme-color\",\"content\":\"#09090b\",\"media\":\"(prefers-color-scheme: dark)\"}]]\n"])</script><script>self.__next_f.push([1,"17:I[6869,[],\"IconMark\"]\n11:null\n16:[[\"$\",\"title\",\"0\",{\"children\":\"Jarela\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Jarela — local chat interface for LangGraph agents\"}],[\"$\",\"link\",\"2\",{\"rel\":\"manifest\",\"href\":\"/manifest.json\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"meta\",\"3\",{\"name\":\"mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"4\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Jarela\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"6\",{\"rel\":\"icon\",\"href\":\"/favicon.svg\",\"type\":\"image/svg+xml\"}],[\"$\",\"link\",\"7\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"sizes\":\"any\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/icon-192.png\",\"type\":\"image/png\",\"sizes\":\"192x192\"}],[\"$\",\"link\",\"9\",{\"rel\":\"icon\",\"href\":\"/icon-512.png\",\"type\":\"image/png\",\"sizes\":\"512x512\"}],[\"$\",\"link\",\"10\",{\"rel\":\"apple-touch-icon\",\"href\":\"/apple-touch-icon.png\",\"sizes\":\"180x180\"}],[\"$\",\"$L17\",\"11\",{}]]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-ff5627013a5e3842.js"/><script src="/_next/static/chunks/4bd1b696-f4afdf0ad1d556a5.js" async=""></script><script src="/_next/static/chunks/3457-6d51726379cee3b7.js" async=""></script><script src="/_next/static/chunks/main-app-3f37bcefd1eaffaf.js" async=""></script><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-ff5627013a5e3842.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[7121,[],\"\"]\n3:I[4581,[],\"\"]\n4:I[484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[484,[],\"ViewportBoundary\"]\na:I[484,[],\"MetadataBoundary\"]\nc:I[7123,[],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"
|
|
1
|
+
<!DOCTYPE html><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-ff5627013a5e3842.js"/><script src="/_next/static/chunks/4bd1b696-f4afdf0ad1d556a5.js" async=""></script><script src="/_next/static/chunks/3457-6d51726379cee3b7.js" async=""></script><script src="/_next/static/chunks/main-app-3f37bcefd1eaffaf.js" async=""></script><title>500: This page couldn’t load</title><style>:root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }</style><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;display:flex;align-items:center;justify-content:center"><div style="margin-top:-32px;max-width:325px;padding:32px 28px;text-align:left"><svg width="32" height="32" viewBox="-0.2 -1.5 32 32" fill="none" style="margin-bottom:24px"><path d="M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z" fill="var(--next-error-title)"></path></svg><h1 style="font-size:24px;font-weight:500;letter-spacing:-0.02em;line-height:32px;margin:0 0 12px 0;color:var(--next-error-title)">This page couldn’t load</h1><p style="font-size:14px;font-weight:400;line-height:21px;margin:0 0 20px 0;color:var(--next-error-message)">A server error occurred. Reload to try again.</p><form style="margin:0"><button type="submit" style="display:inline-flex;align-items:center;justify-content:center;height:32px;padding:0 12px;font-size:14px;font-weight:500;line-height:20px;border-radius:6px;cursor:pointer;color:var(--next-error-btn-text);background:var(--next-error-btn-bg);border:var(--next-error-btn-border)">Reload</button></form></div></div><!--$--><!--/$--><script src="/_next/static/chunks/webpack-ff5627013a5e3842.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[7121,[],\"\"]\n3:I[4581,[],\"\"]\n4:I[484,[],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[484,[],\"ViewportBoundary\"]\na:I[484,[],\"MetadataBoundary\"]\nc:I[7123,[],\"default\",1]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_global-error\",{\"children\":[\"__PAGE__\",{}]}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[[\"$\",\"title\",null,{\"children\":\"500: This page couldn’t load\"}],[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\":root {--next-error-bg: #fff;--next-error-text: #171717;--next-error-title: #171717;--next-error-message: #171717;--next-error-digest: #666666;--next-error-btn-text: #fff;--next-error-btn-bg: #171717;--next-error-btn-border: none;--next-error-btn-secondary-text: #171717;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(0,0,0,0.08);}@media (prefers-color-scheme: dark) {:root {--next-error-bg: #0a0a0a;--next-error-text: #ededed;--next-error-title: #ededed;--next-error-message: #ededed;--next-error-digest: #a0a0a0;--next-error-btn-text: #0a0a0a;--next-error-btn-bg: #ededed;--next-error-btn-border: none;--next-error-btn-secondary-text: #ededed;--next-error-btn-secondary-bg: transparent;--next-error-btn-secondary-border: 1px solid rgba(255,255,255,0.14);}}body { margin: 0; color: var(--next-error-text); background: var(--next-error-bg); }\"}}]]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"marginTop\":\"-32px\",\"maxWidth\":\"325px\",\"padding\":\"32px 28px\",\"textAlign\":\"left\"},\"children\":[[\"$\",\"svg\",null,{\"width\":\"32\",\"height\":\"32\",\"viewBox\":\"-0.2 -1.5 32 32\",\"fill\":\"none\",\"style\":{\"marginBottom\":\"24px\"},\"children\":[\"$\",\"path\",null,{\"d\":\"M16.9328 0C18.0839 0.000116771 19.1334 0.658832 19.634 1.69531L31.4299 26.1309C32.0708 27.4588 31.1036 28.9999 29.6291 29H2.00215C0.527541 29 -0.439628 27.4588 0.201371 26.1309L11.9973 1.69531C12.4979 0.658823 13.5474 7.75066e-05 14.6984 0H16.9328ZM3.59493 26H28.0363L16.9328 3H14.6984L3.59493 26ZM15.8156 19C16.9202 19.0001 17.8156 19.8955 17.8156 21C17.8156 22.1045 16.9202 22.9999 15.8156 23C14.7111 23 13.8156 22.1046 13.8156 21C13.8156 19.8954 14.7111 19 15.8156 19ZM17.3156 16.5H14.3156V8.5H17.3156V16.5Z\",\"fill\":\"var(--next-error-title)\"}]}],[\"$\",\"h1\",null,{\"style\":{\"fontSize\":\"24px\",\"fontWeight\":500,\"letterSpacing\":\"-0.02em\",\"lineHeight\":\"32px\",\"margin\":\"0 0 12px 0\",\"color\":\"var(--next-error-title)\"},\"children\":\"This page couldn’t load\"}],[\"$\",\"p\",null,{\"style\":{\"fontSize\":\"14px\",\"fontWeight\":400,\"lineHeight\":\"21px\",\"margin\":\"0 0 20px 0\",\"color\":\"var(--next-error-message)\"},\"children\":\"A server error occurred. Reload to try again.\"}],[\"$\",\"form\",null,{\"style\":{\"margin\":0},\"children\":[\"$\",\"button\",null,{\"type\":\"submit\",\"style\":{\"display\":\"inline-flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\",\"height\":\"32px\",\"padding\":\"0 12px\",\"fontSize\":\"14px\",\"fontWeight\":500,\"lineHeight\":\"20px\",\"borderRadius\":\"6px\",\"cursor\":\"pointer\",\"color\":\"var(--next-error-btn-text)\",\"background\":\"var(--next-error-btn-bg)\",\"border\":\"var(--next-error-btn-border)\"},\"children\":\"Reload\"}]}]]}]}]}]]}],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,\"$@7\"],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"AV5AO0yTRABo-NgwxhDe7\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\nb:[]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"node":{},"edge":{},"encryptionKey":"
|
|
1
|
+
{"node":{},"edge":{},"encryptionKey":"DcCdXir1Ziv4mjgzgnnsvtduAg1mSEk1icla4tV+qFw="}
|
|
@@ -1819,6 +1819,11 @@ function fileToContentPart(file) {
|
|
|
1819
1819
|
}
|
|
1820
1820
|
});
|
|
1821
1821
|
}
|
|
1822
|
+
function attachmentKey(a, i) {
|
|
1823
|
+
if (a.type === "text") return `text:${i}:${a.text.length}`;
|
|
1824
|
+
const name = a.type === "file" ? a.name : "";
|
|
1825
|
+
return `${a.type}:${a.media_type}:${name}:${a.data.length}:${a.data.slice(0, 16)}`;
|
|
1826
|
+
}
|
|
1822
1827
|
function InputBar({ attachments, onAttachmentsChange, onSubmit, onQueue, onStop, streaming, disabled, placeholder, voiceEnabled, agentId, onVoiceTranscript }) {
|
|
1823
1828
|
// Text state is intentionally LOCAL. Lifting it to ChatView would re-render
|
|
1824
1829
|
// the entire message list (every MessageBubble + ReactMarkdown pass) on
|
|
@@ -2023,7 +2028,10 @@ function InputBar({ attachments, onAttachmentsChange, onSubmit, onQueue, onStop,
|
|
|
2023
2028
|
children: [
|
|
2024
2029
|
attachments.length > 0 && /*#__PURE__*/ (0,jsx_runtime.jsx)("div", {
|
|
2025
2030
|
className: "flex flex-wrap gap-2 mb-2",
|
|
2026
|
-
children: attachments.map((a, i)
|
|
2031
|
+
children: attachments.map((a, i)=>// Content-derived key — using the index reused DOM nodes when
|
|
2032
|
+
// earlier attachments were removed, flashing the wrong preview
|
|
2033
|
+
// (and the wrong filename) into the slot of the survivor.
|
|
2034
|
+
/*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
|
|
2027
2035
|
className: "relative group shrink-0",
|
|
2028
2036
|
children: [
|
|
2029
2037
|
a.type === "image" ? // eslint-disable-next-line @next/next/no-img-element
|
|
@@ -2052,7 +2060,7 @@ function InputBar({ attachments, onAttachmentsChange, onSubmit, onQueue, onStop,
|
|
|
2052
2060
|
})
|
|
2053
2061
|
})
|
|
2054
2062
|
]
|
|
2055
|
-
}, i))
|
|
2063
|
+
}, attachmentKey(a, i)))
|
|
2056
2064
|
}),
|
|
2057
2065
|
/*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
|
|
2058
2066
|
className: "relative flex gap-2 items-end",
|
|
@@ -22943,22 +22951,6 @@ function BootScreen({ agents, agentsLoaded, activeAgentId, onPickAgent, suppress
|
|
|
22943
22951
|
agentsLoaded,
|
|
22944
22952
|
markStep
|
|
22945
22953
|
]);
|
|
22946
|
-
// Returning users with a saved default skip the manual tile-click.
|
|
22947
|
-
(0,react.useEffect)(()=>{
|
|
22948
|
-
if (suppressed) return;
|
|
22949
|
-
if (!agentsLoaded) return;
|
|
22950
|
-
if (activeAgentId || pickedId) return;
|
|
22951
|
-
if (!defaultAgent) return;
|
|
22952
|
-
setPickedId(defaultAgent.id);
|
|
22953
|
-
onPickAgent(defaultAgent.id);
|
|
22954
|
-
}, [
|
|
22955
|
-
suppressed,
|
|
22956
|
-
agentsLoaded,
|
|
22957
|
-
activeAgentId,
|
|
22958
|
-
pickedId,
|
|
22959
|
-
defaultAgent,
|
|
22960
|
-
onPickAgent
|
|
22961
|
-
]);
|
|
22962
22954
|
if (done) return null;
|
|
22963
22955
|
if (suppressed) return null;
|
|
22964
22956
|
const phase = !agentsLoaded ? "loading" : activeAgentId || pickedId ? "opening" : "pick";
|
|
@@ -26233,4 +26225,4 @@ Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_re
|
|
|
26233
26225
|
/******/ _N_E = __webpack_exports__;
|
|
26234
26226
|
/******/ }
|
|
26235
26227
|
]);
|
|
26236
|
-
//# sourceMappingURL=page-
|
|
26228
|
+
//# sourceMappingURL=page-74846c864241b96d.js.map
|