docs(AGENTS): update __LOCAL_LLMs references — extracted to learning_ai_local_llms repo
This commit is contained in:
parent
70fdc6b279
commit
e3f638d609
22
AGENTS.md
22
AGENTS.md
@ -137,7 +137,6 @@ learning_ai_common_plat/
|
|||||||
- Services use self-contained Zod config schemas in `src/lib/config.ts` (avoids zod version mismatch with shared packages)
|
- Services use self-contained Zod config schemas in `src/lib/config.ts` (avoids zod version mismatch with shared packages)
|
||||||
- Services re-export from `@bytelyst/*` in their `src/lib/` files (`errors.ts`, `cosmos.ts`, `product-config.ts`)
|
- Services re-export from `@bytelyst/*` in their `src/lib/` files (`errors.ts`, `cosmos.ts`, `product-config.ts`)
|
||||||
- For LLM routing, prefer `@bytelyst/llm-router` as the source of truth; do not introduce parallel routing logic unless explicitly required
|
- For LLM routing, prefer `@bytelyst/llm-router` as the source of truth; do not introduce parallel routing logic unless explicitly required
|
||||||
- `__LOCAL_LLMs/dashboard` uses server-side routing in `src/app/api/ollama/chat/route.ts`; preserve that pattern and keep the UI as a thin client
|
|
||||||
- Commit messages: `type(scope): description` — types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
|
- Commit messages: `type(scope): description` — types: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`
|
||||||
|
|
||||||
### MUST NOT do
|
### MUST NOT do
|
||||||
@ -269,7 +268,6 @@ See full audit: [`docs/design-system/DESIGN_SYSTEM_AUDIT_2026-03-03.md`](docs/de
|
|||||||
| **Extraction Python** | `services/extraction-service/` | `python/src/` — LangExtract sidecar (FastAPI :4006), extractor, task registry, language detection |
|
| **Extraction Python** | `services/extraction-service/` | `python/src/` — LangExtract sidecar (FastAPI :4006), extractor, task registry, language detection |
|
||||||
| **Extraction package** | `packages/extraction/` | `src/index.ts` — `createExtractionClient()`, shared types for consumers |
|
| **Extraction package** | `packages/extraction/` | `src/index.ts` — `createExtractionClient()`, shared types for consumers |
|
||||||
| **Monitoring** | `services/monitoring/` | `health-check.ts`, `loki/`, `grafana/` |
|
| **Monitoring** | `services/monitoring/` | `health-check.ts`, `loki/`, `grafana/` |
|
||||||
| **Local LLM dashboard** | `__LOCAL_LLMs/dashboard/` | `src/app/api/ollama/chat/route.ts` — shared router + Ollama bridge, `src/app/lib/llm-router.ts` — built package re-export |
|
|
||||||
|
|
||||||
### Dashboard Consumers (via `file:` refs)
|
### Dashboard Consumers (via `file:` refs)
|
||||||
|
|
||||||
@ -283,16 +281,10 @@ The following dashboards consume `@bytelyst/*` packages:
|
|||||||
|
|
||||||
**Prerequisite:** Run `pnpm build` in this repo before running `npm install` in any dashboard.
|
**Prerequisite:** Run `pnpm build` in this repo before running `npm install` in any dashboard.
|
||||||
|
|
||||||
### Local Mission Control Dashboard
|
### Local Mission Control Dashboard (Extracted)
|
||||||
|
|
||||||
`__LOCAL_LLMs/dashboard/` is a standalone Next.js app for local Ollama usage. It is not part of the pnpm workspace, but it consumes `@bytelyst/llm-router`.
|
The local LLM dashboard has been extracted to its own repo: `../learning_ai_local_llms/dashboard/`.
|
||||||
|
It consumes `@bytelyst/llm-router` from the Gitea npm registry.
|
||||||
- Build source of truth: `packages/llm-router/`
|
|
||||||
- Dashboard bridge: `__LOCAL_LLMs/dashboard/src/app/lib/llm-router.ts`
|
|
||||||
- Chat routing path: `__LOCAL_LLMs/dashboard/src/app/api/ollama/chat/route.ts`
|
|
||||||
- The dashboard must consume the built package output from `packages/llm-router/dist/`
|
|
||||||
- `__LOCAL_LLMs/dashboard/package.json` runs `predev` and `prebuild` hooks to build `@bytelyst/llm-router` automatically
|
|
||||||
- Auto model selection should happen on the server route, not in the React client
|
|
||||||
|
|
||||||
## 6. How to Run Things
|
## 6. How to Run Things
|
||||||
|
|
||||||
@ -324,9 +316,8 @@ pnpm --filter @bytelyst/llm-router test
|
|||||||
# ── Generate design tokens ─────────────────────────
|
# ── Generate design tokens ─────────────────────────
|
||||||
pnpm --filter @bytelyst/design-tokens generate
|
pnpm --filter @bytelyst/design-tokens generate
|
||||||
|
|
||||||
# ── Local LLM dashboard ────────────────────────────
|
# ── Local LLM dashboard (extracted to ../learning_ai_local_llms/) ──
|
||||||
cd __LOCAL_LLMs/dashboard && npm run dev # predev builds @bytelyst/llm-router first
|
# cd ../learning_ai_local_llms/dashboard && npm install && npm run dev
|
||||||
cd __LOCAL_LLMs/dashboard && npm run build # prebuild builds @bytelyst/llm-router first
|
|
||||||
|
|
||||||
# ── Docker Compose (all services + monitoring) ─────
|
# ── Docker Compose (all services + monitoring) ─────
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
@ -579,9 +570,8 @@ Each product backend uses `@bytelyst/*` packages via `file:` refs and follows th
|
|||||||
3. **Don't use `dependencies` for heavy libs in packages** — use `peerDependencies` so consumers control the version.
|
3. **Don't use `dependencies` for heavy libs in packages** — use `peerDependencies` so consumers control the version.
|
||||||
4. **Don't mix up package scopes** — libraries are `@bytelyst/*`, services are `@lysnrai/*`.
|
4. **Don't mix up package scopes** — libraries are `@bytelyst/*`, services are `@lysnrai/*`.
|
||||||
5. **Don't run `npm` commands** — this is a pnpm workspace. Always use `pnpm`.
|
5. **Don't run `npm` commands** — this is a pnpm workspace. Always use `pnpm`.
|
||||||
Exception: `__LOCAL_LLMs/dashboard/` is intentionally npm-managed and may use `npm run dev/build/start`.
|
|
||||||
6. **Don't modify generated files directly** — edit `bytelyst.tokens.json` and re-run the generator.
|
6. **Don't modify generated files directly** — edit `bytelyst.tokens.json` and re-run the generator.
|
||||||
7. **Build packages before testing services or non-workspace dashboards** — service tests and `__LOCAL_LLMs/dashboard` may import from `@bytelyst/*` `dist/`. Run `pnpm build` first if you get import errors.
|
7. **Build packages before testing services** — service tests may import from `@bytelyst/*` `dist/`. Run `pnpm build` first if you get import errors.
|
||||||
8. **Don't duplicate LLM routing logic** — update `@bytelyst/llm-router` first, then have consumers call it.
|
8. **Don't duplicate LLM routing logic** — update `@bytelyst/llm-router` first, then have consumers call it.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user