chore: drop remaining context module legacy refs

Follow-up sweep after acb737e25 — the context module's UI + Dexie
tables + AI route were already removed, but a handful of registry-style
refs in the monorepo's plumbing still pointed at the dead module:

- packages/shared-utils/src/analytics.ts: drop the `context: createModuleTracker('context')`
  entry from the `track` map and delete the unused `ContextEvents`
  helper (no consumers — every analytics call site that used it lived
  in the deleted module).
- packages/shared-utils/src/analytics.ts (cont.): the deletion above
  removes the only typed reference to track.context, so the property
  cleanly disappears from the inferred type.
- package.json: drop 6 dead npm scripts (`context:dev`, `dev:context:web`,
  `dev:context:app`, `dev:context:full`, `dev:context:local`, `setup:db:context`)
  — all referenced `@context/*` workspace packages that were removed
  with the module. `pnpm context:dev` would silently succeed-with-zero-targets
  before; now it correctly errors as unknown script.
- scripts/generate-env.mjs: drop the two `apps/context/apps/{server,web}/.env`
  generator entries pointing at non-existent app directories.
- scripts/validate-monorepo.mjs: drop `'@context/'` from the internal
  workspace prefix list — fences a class of dependency that no longer
  exists.
- .env.development: fix a stale comment pointing at the renamed
  /api/v1/context/import-url endpoint (now /api/v1/kontext/import-url
  per acb737e25).
- apps/context/: delete the leftover directory (CLAUDE.md describing
  vanished paths + a package.json with a `dev:mobile` script filtering
  the @context/mobile package that was deleted with all per-product
  mobile apps on 2026-04-20).

What remains and is intentional: historical plan docs / devlogs /
audit reports / generated complexity-map.html / Dexie v57 drop
migration / pnpm-lock.yaml (regenerates on next `pnpm install`).
Unrelated `'context'` strings (MemoryCategory enum, Kontext-Agent
template id, encryption-vaults DB column, Astro landing /context
content collection) stay — different concepts that happen to share
the word.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-28 21:44:33 +02:00
parent 1815139dc1
commit 5c8faae4ea
6 changed files with 1 additions and 66 deletions

View file

@ -196,7 +196,7 @@ MANA_AI_DEEP_RESEARCH_ENABLED=false
# mana-crawler — Go service. Default binary port is 3023 (local dev);
# the macmini docker-compose overrides to 3014 internally. Used by the
# Kontext URL import endpoint (POST /api/v1/context/import-url) to
# Kontext URL import endpoint (POST /api/v1/kontext/import-url) to
# fetch and convert web pages to markdown. No public ingress —
# apps/api reaches it via localhost in dev, via mana-crawler:3014
# hostname in the Docker network.

View file

@ -1,24 +0,0 @@
# Context — consolidated into the unified Mana app
This product was migrated into the unified Mana monorepo. The legacy
per-product `apps/context/apps/backend/` (NestJS) and
`apps/context/apps/web/` directories have been removed. Active code now
lives in:
- **Backend compute routes**: [`apps/api/src/modules/context/routes.ts`](../api/src/modules/context/routes.ts) (AI text generation via mana-llm, server-side credit deduction)
- **Frontend module** (local-first): [`apps/mana/apps/web/src/lib/modules/context/`](../mana/apps/web/src/lib/modules/context/)
- **Web route**: [`apps/mana/apps/web/src/routes/(app)/context/`](../mana/apps/web/src/routes/(app)/context/)
- **Mobile app**: [`apps/context/apps/mobile/`](apps/mobile/)
For monorepo-wide patterns (auth, sync, encryption, services), see the
[root `CLAUDE.md`](../../CLAUDE.md) and [`apps/mana/CLAUDE.md`](../mana/CLAUDE.md).
The previous "Context App" guide describing a NestJS backend with its
own spaces/documents/token tables was deleted in the audit cleanup of
2026-04-09 — it had been inaccurate since the consolidation. The
token-economy logic now lives in `mana-credits`. Pre-consolidation
reference is in git history.
> **Note:** The legacy `apps/context/pnpm-lock.yaml` (242 KB, separate
> workspace setup) and the broken `dev:web` / `dev:server` filter scripts
> in `apps/context/package.json` are tracked in audit items #2 and #26.

View file

@ -1,8 +0,0 @@
{
"name": "context",
"version": "0.1.0",
"private": true,
"scripts": {
"dev:mobile": "pnpm --filter @context/mobile dev"
}
}

View file

@ -165,11 +165,6 @@
"dev:figgos:web": "pnpm --filter @figgos/web dev",
"dev:figgos:ios": "pnpm --filter @figgos/mobile ios",
"dev:figgos:android": "pnpm --filter @figgos/mobile android",
"context:dev": "turbo run dev --filter=context...",
"dev:context:web": "pnpm --filter @context/web dev",
"dev:context:app": "concurrently -n api,web -c yellow,cyan \"pnpm dev:api\" \"pnpm dev:context:web\"",
"dev:context:full": "concurrently -n auth,sync,api -c blue,magenta,yellow \"pnpm dev:auth\" \"pnpm dev:sync\" \"pnpm dev:api\"",
"setup:db:context": "./scripts/setup-databases.sh context",
"citycorners:dev": "turbo run dev --filter=citycorners...",
"dev:citycorners:landing": "pnpm --filter @citycorners/landing dev",
"dev:citycorners:web": "pnpm --filter @citycorners/web dev",
@ -253,7 +248,6 @@
"dev:calendar:local": "concurrently -n sync,api -c magenta,yellow \"pnpm dev:sync\" \"pnpm dev:api\"",
"dev:chat:local": "concurrently -n sync,api -c magenta,yellow \"pnpm dev:sync\" \"pnpm dev:api\"",
"dev:contacts:local": "concurrently -n sync,api -c magenta,yellow \"pnpm dev:sync\" \"pnpm dev:api\"",
"dev:context:local": "concurrently -n sync,api -c magenta,yellow \"pnpm dev:sync\" \"pnpm dev:api\"",
"dev:cards:local": "concurrently -n sync,api -c magenta,yellow \"pnpm dev:sync\" \"pnpm dev:api\"",
"dev:music:local": "concurrently -n sync,api -c magenta,yellow \"pnpm dev:sync\" \"pnpm dev:api\"",
"dev:food:local": "concurrently -n sync,api -c magenta,yellow \"pnpm dev:sync\" \"pnpm dev:api\"",

View file

@ -392,32 +392,6 @@ const APP_CONFIGS = [
},
},
// Context Server (Hono/Bun)
{
path: 'apps/context/apps/server/.env',
vars: {
NODE_ENV: () => 'development',
PORT: (env) => env.CONTEXT_BACKEND_PORT || '3020',
DATABASE_URL: (env) => env.CONTEXT_DATABASE_URL,
MANA_AUTH_URL: (env) => env.MANA_AUTH_URL,
DEV_BYPASS_AUTH: () => 'true',
DEV_USER_ID: (env) => env.DEV_USER_ID || '00000000-0000-0000-0000-000000000000',
AZURE_OPENAI_API_KEY: (env) => env.CONTEXT_AZURE_OPENAI_API_KEY || '',
AZURE_OPENAI_ENDPOINT: (env) => env.CONTEXT_AZURE_OPENAI_ENDPOINT || '',
GOOGLE_API_KEY: (env) => env.CONTEXT_GOOGLE_API_KEY || '',
CORS_ORIGINS: (env) => env.CORS_ORIGINS,
},
},
// Context Web (SvelteKit)
{
path: 'apps/context/apps/web/.env',
vars: {
PUBLIC_BACKEND_URL: (env) => `http://localhost:${env.CONTEXT_BACKEND_PORT || '3020'}`,
PUBLIC_MANA_AUTH_URL: (env) => env.MANA_AUTH_URL,
},
},
// Calendar Server (Hono/Bun)
{
path: 'apps/calendar/apps/server/.env',

View file

@ -145,7 +145,6 @@ function checkWorkspaceProtocol(packagePath, packageJson) {
'@mana-games/',
'@figgos/',
'@worldream/',
'@context/',
];
for (const [depName, depVersion] of Object.entries(deps)) {