-
Notifications
You must be signed in to change notification settings - Fork 0
Code Structure
/
├── README.md
├── .env.example # CI only: GH_TOKEN, code-signing
├── .github/workflows/ # build.yml, release.yml
├── scripts/setup.sh, dev.sh
├── app/ # ★ desktop product
├── web/ # marketing + downloads
├── firebase/ # rules, indexes, hosting sign-in
├── auth-backend/ # retired NestJS (reference)
├── docs/
│ ├── releases/ # tag notes (e.g. v0.4.0.md)
│ └── superpowers/ # specs + implementation plans
├── AnyLM_Skill_Building_Guide.pdf
└── AnyLM_Tool_Building_Guide.pdf
PDF guides are useful but slightly stale (they still mention NestJS/
auth-backendand older tool lists). Prefer this wiki + current TypeScript sources.
app/
├── main.ts # Bootstrap: userData pin, deps, proxy, registerIpc, window
├── preload.ts # Sole bridge → window.api
├── package.json # electron-builder, scripts, version
├── .env.example → .env # Public bake-in config
├── bunfig.toml # test preload: electron-mock
├── test/electron-mock.ts
├── scripts/
│ ├── build-env.js # .env → env.generated.ts (+ secret guard)
│ ├── env-schema.js # Allowlist / denylist
│ ├── copy-assets.js
│ ├── fetch-chroma.js
│ └── before-pack / fix-electron-bundle …
├── vendor/chroma # Bundled Chroma binary (extraResources)
└── src/
├── types/
│ ├── api.d.ts # AnyLmApi IPC contract
│ ├── domain.d.ts # Projects, tools, skills, settings, …
│ └── dom.d.ts
├── main/
│ ├── ipc.ts # All handlers + chat orchestration (~core)
│ ├── auth.ts, token-store.ts, identity*.ts, oauth/
│ ├── api/ # In-process governance REST
│ ├── data/ # Firestore REST client
│ ├── ollama.ts, ollama-setup/, model-catalog.ts
│ ├── store.ts, chats.ts, settings.ts, workspace.ts
│ ├── rag.ts, context.ts, chroma*.ts, vectorstore.ts, memory.ts, embed.ts
│ ├── graph/ # Entity/relation extract + store
│ ├── tools/ # registry, exec, fs-tools, web-search
│ ├── skills/ # builtins, registry, exec
│ ├── agents/ # plan, classify, orchestrate, workers, load
│ ├── documents/, artifacts.ts, project-files.ts, project-coding/
│ ├── proxy/ # OpenAI-compatible server
│ ├── load-guard/, governance.ts, policy-engine.ts
│ ├── updater/, scheduler.ts, startup-deps.ts
│ └── …
└── renderer/
├── index.html, styles.css, assets/
└── js/
├── app.ts # Bootstrap / wiring
├── auth.ts, chat.ts, projects.ts, state.ts, views.ts, dom.ts
├── tools-view.ts, skills-view.ts, settings*
├── setup-wizard.ts
├── rail/, sidebar/, updates/
└── …
| Config | Emits | Module |
|---|---|---|
tsconfig.main.json |
dist/main.js, dist/preload.js, dist/src/main/**
|
CommonJS |
tsconfig.renderer.json |
dist/renderer/js/** (+ copied HTML/CSS) |
ESM |
Shared types are ambient .d.ts under src/types/ so neither config crosses rootDir.
firebase/
├── firestore.rules # ★ authorization — read before changing api/
├── firestore.indexes.json
├── hosting/public/ # Google/GitHub sign-in page
├── .firebaserc.example
└── README.md
Next.js site: glass landing, feature catalog, /download and /releases fed by GitHub API (web/lib/github.ts).
Retired NestJS + Prisma service. Useful for understanding original REST shapes and connector OAuth, but not started or shipped. Live connectors live under app/src/main/api/connectors.ts (+ related modules).
| Concern | Start here |
|---|---|
| New IPC method |
api.d.ts → preload.ts → ipc.ts → renderer caller |
| Builtin tool |
tools/registry.ts + tools/exec.ts
|
| Builtin skill |
skills/builtins.ts + optionally connectors |
| Chat system prompt |
ipc.ts + context.ts + memory.ts + skills registry |
| Org/policy/usage |
api/index.ts + sibling modules + firestore.rules
|
| Settings default |
settings.ts + domain.d.ts + settings UI |
| First-run Ollama |
ollama-setup/, startup-deps.ts, setup-wizard.ts
|
| Packaging |
app/package.json build key + .github/workflows
|
docs/superpowers/specs/ and plans/ hold feature designs (multi-agent, load protection, project-first coding, web research, UI passes, etc.). Use them when implementing or reviewing related work — they are not always fully synced with HEAD.
| Page | Description |
|---|---|
| Home | Overview and navigation |
| Getting-Started | Local setup |
| Architecture | System design |
| Code-Structure | Directory map |
| Features | Feature inventory |
| Contributing | PR workflow |
| How-to-Change | Common change recipes |
| Gotchas | Footguns |
| Chat-Pipeline | Turn lifecycle |
| IPC-Contract | window.api |
| Auth-and-Firebase | Identity + rules |
| RAG-and-Knowledge | Vectors + graph |
| Agents | Multi-agent |
| Proxy-and-Governance | :3227 + policies |
| Configuration | Env + settings |
| Testing | bun test |
| Build-and-Release | Packaging |
| Skills | Build skills |
| Tools | Build tools |
| MCP-and-Extensions | MCP status + options |