Files
claudemesh/packages/api/package.json
Alejandro Gutiérrez b60daff886
Some checks failed
CI / Lint (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
CI / Docker build (linux/amd64) (push) Has been cancelled
feat(web): topic chat UI over /api/v1/* (v0.2.0)
New dashboard route at /dashboard/meshes/[id]/topics/[name] gives signed-in
users a thin chat client over the v0.2.0 REST surface. The mesh detail page
now lists topics with one-click links into the chat. Backend layout:

- packages/api/src/modules/mesh/api-key-auth.ts — exports
  createDashboardApiKey() that mints a 24h read+send key scoped to a single
  topic for the caller's member id. The page server component calls this on
  every render and embeds the secret in the props of the client component;
  the secret never touches sessionStorage so a tab close = key effectively
  abandoned (the row remains until expiresAt).
- apps/web/.../topics/[name]/page.tsx — server component, NextAuth gate,
  resolves the user's meshMember.id, mints the key, renders the shell.
- apps/web/src/modules/mesh/topic-chat-panel.tsx — client component, polls
  GET /v1/topics/:name/messages every 5s, sends via POST /v1/messages.
  Encoding wraps base64(plaintext) into the ciphertext field — matches the
  current broker contract until per-topic HKDF lands in v0.3.0.

The mesh detail page gains a Topics section with empty-state copy that
points users at the CLI verb (claudemesh topic create) for now; topic
creation from the web UI is a follow-up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 16:19:38 +01:00

51 lines
1.5 KiB
JSON

{
"name": "@turbostarter/api",
"version": "0.1.0",
"private": true,
"type": "module",
"exports": {
".": "./src/index.ts",
"./env": "./src/env.ts",
"./utils": "./src/utils/index.ts",
"./schema": "./src/schema/index.ts",
"./modules/mesh/api-key-auth": "./src/modules/mesh/api-key-auth.ts"
},
"scripts": {
"clean": "git clean -xdf .cache .turbo dist node_modules",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"test": "vitest run",
"typecheck": "tsc --noEmit"
},
"prettier": "@turbostarter/prettier-config",
"dependencies": {
"@ai-sdk/openai": "2.0.68",
"@anthropic-ai/sdk": "0.71.2",
"@hono/zod-validator": "0.7.4",
"@turbostarter/auth": "workspace:*",
"@turbostarter/billing": "workspace:*",
"@turbostarter/db": "workspace:*",
"@turbostarter/email": "workspace:*",
"@turbostarter/i18n": "workspace:*",
"@turbostarter/monitoring-web": "workspace:*",
"@turbostarter/shared": "workspace:*",
"@turbostarter/storage": "workspace:*",
"ai": "catalog:",
"envin": "catalog:",
"hono": "4.10.4",
"libsodium-wrappers": "0.7.15",
"zod": "catalog:"
},
"devDependencies": {
"@turbostarter/eslint-config": "workspace:*",
"@turbostarter/prettier-config": "workspace:*",
"@turbostarter/tsconfig": "workspace:*",
"@turbostarter/vitest-config": "workspace:*",
"@types/libsodium-wrappers": "0.7.14",
"eslint": "catalog:",
"prettier": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
}
}