// Workspace-relative file paths — single source of truth. // // Shared by both the Vue frontend and the Express server. // This file MUST NOT import node:path, node:os, or any Node-only // module so it stays browser-compatible. // // The server's `server/workspace/paths.ts` imports these and // joins them with the workspace root to produce absolute paths. /** Well-known individual files. Values are workspace-relative paths. */ export const WORKSPACE_FILES = { memory: "conversations/memory.md", memoryIndex: "conversations/memory/MEMORY.md", sessionToken: ".session-token", /** Port the parent server bound to. Written at `app.listen` so * out-of-process helpers (currently the LLM wiki-write hook — * #763) can address the server without guessing whether `PORT` * walked forward off a busy default. Mode 0600 to stay private. */ serverPort: ".server-port", wikiIndex: "data/wiki/index.md", wikiLog: "data/wiki/log.md", wikiSchema: "data/wiki/SCHEMA.md", wikiSummary: "data/wiki/summary.md", summariesIndex: "conversations/summaries/_index.md", schedulerItems: "data/scheduler/items.json", schedulerUserTasks: "config/scheduler/tasks.json", schedulerOverrides: "config/scheduler/overrides.json", newsReadState: "config/news-read-state.json", /** Manually-pinned launcher shortcuts (collections / feeds). Workspace * data — tied to specific content slugs — so it lives with the * workspace, not in browser localStorage. Shape: `{ shortcuts: [] }`. */ shortcuts: "config/shortcuts.json", /** Dashboard layout — per-tile view mode + tile order for the grid of * favorite collections on the /dashboard page. Workspace data (tied * to content slugs), so it lives with the workspace, not in browser * localStorage. Shape: `{ tiles: [] }`. */ dashboard: "config/dashboard.json", /** Install ledger for runtime-loaded plugins (#1043 C-2). One row * per installed plugin; the tgz files sit alongside in `plugins/`, * extracted to `plugins/.cache///` on first boot. */ pluginsLedger: "plugins/plugins.json", /** Active notifier entries — JSON file rewritten atomically on * every mutation, loaded fresh on every read. No in-memory cache; * the file is the only source of truth. */ notifierActive: "data/notifier/active.json", /** Terminated notifier entries (cleared / cancelled), newest-first, * FIFO-capped. Source for the bell popup's History section. */ notifierHistory: "data/notifier/history.json", /** Optional user-supplied list of extra collection registries to surface in * the Discover tab alongside the official one. Shape: * `[{ name, indexUrl, rawBaseUrl }]`. Absent file ⇒ only the official * registry is shown. */ collectionsRegistries: "config/collections-registries.json", /** Optional user-supplied CSP extension for sandboxed HTML views (#1989). * Per-directive extra hosts ADDED to the hardcoded base policy so a view * can load e.g. a Google Maps embed. Shape: * `{ "frame-src": ["https://www.google.com"], ... }`. Absent ⇒ base policy * only. Widening CSP is a supply-chain / exfiltration surface — see #1989. */ csp: "config/csp.json", } as const;