| 1 | // Eleven's app knowledge — the exhaustive, MEMBER-FACING reference injected into |
| 2 | // Eleven's system prompt so it can answer questions about how the app works: |
| 3 | // features, UX, the privacy/encryption model, mini-apps, the native apps, and the |
| 4 | // architecture/deployment DESIGN. The project is open source, so Eleven may explain |
| 5 | // how everything works in depth. |
| 6 | // |
| 7 | // OPEN knowledge ONLY. This text is extractable by anyone chatting with Eleven, so |
| 8 | // it deliberately contains NO operational secrets — no server addresses, tokens, |
| 9 | // keys, or instance names. The design is open; the keys are not. Keep it that way. |
| 10 | // |
| 11 | // Ships in the sidecar (like the rest of Eleven's reference), so its knowledge |
| 12 | // improves with every deploy; the runtime marks the system prompt cacheable so this |
| 13 | // large reference is served from cache, not re-billed per message (runtime.mjs). |
| 14 | // The text itself lives in `internal/bot/knowledge.md` — ONE source of truth |
| 15 | // shared with the Go sidecar (which `go:embed`s the same file), so the two |
| 16 | // implementations can never drift. Read it verbatim (it is data, not code). |
| 17 | import { readFileSync } from "node:fs"; |
| 18 | import { fileURLToPath } from "node:url"; |
| 19 | |
| 20 | export const APP_KNOWLEDGE = readFileSync( |
| 21 | fileURLToPath(new URL("../internal/bot/knowledge.md", import.meta.url)), |
| 22 | "utf8", |
| 23 | ).replace(/\n$/, ""); |
| 24 | |