From 9824ce4c181466845e2881d0e2d161653dbf2ccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=81=D0=B5=D0=BB=D1=8C?= Date: Thu, 12 Nov 2026 19:18:35 +0500 Subject: [PATCH] Add Peppa MCP server, core domain package and peppa CLI - @peppa/core: projects, goals, tasks (atomic per-project numbering), PM questions, progress events, pg NOTIFY on peppa_events - @peppa/mcp (peppa-mcp): get_task, list_tasks, list_goals, create_task, update_task, request_approval, ask_pm, report_progress - @peppa/cli (peppa): project/goal/task/q commands - questions/events now link to project and task; session is optional - scripts/install-bins.sh; bootstrap-project.sh registers the project Co-Authored-By: Claude Opus 5.5 --- CLAUDE.md | 7 +- packages/cli/bin/peppa | 4 + packages/cli/package.json | 13 + packages/cli/src/index.ts | 159 ++++ packages/cli/tsconfig.json | 1 + packages/core/package.json | 13 + packages/core/src/errors.ts | 4 + packages/core/src/index.ts | 5 + packages/core/src/notify.ts | 15 + packages/core/src/project-file.ts | 15 + packages/core/src/projects.ts | 60 ++ packages/core/src/tasks.ts | 186 ++++ packages/core/tsconfig.json | 1 + ...bolt_ross.sql => 0000_safe_shiver_man.sql} | 16 +- .../db/migrations/meta/0000_snapshot.json | 86 +- packages/db/migrations/meta/_journal.json | 4 +- packages/db/src/schema.ts | 17 +- packages/mcp/bin/peppa-mcp | 5 + packages/mcp/package.json | 9 +- packages/mcp/scripts/smoke.ts | 22 + packages/mcp/src/format.ts | 39 + packages/mcp/src/index.ts | 159 +++- pnpm-lock.yaml | 797 ++++++++++++++++++ scripts/bootstrap-project.sh | 1 + scripts/install-bins.sh | 10 + 25 files changed, 1629 insertions(+), 19 deletions(-) create mode 100755 packages/cli/bin/peppa create mode 100644 packages/cli/package.json create mode 100644 packages/cli/src/index.ts create mode 100644 packages/cli/tsconfig.json create mode 100644 packages/core/package.json create mode 100644 packages/core/src/errors.ts create mode 100644 packages/core/src/index.ts create mode 100644 packages/core/src/notify.ts create mode 100644 packages/core/src/project-file.ts create mode 100644 packages/core/src/projects.ts create mode 100644 packages/core/src/tasks.ts create mode 100644 packages/core/tsconfig.json rename packages/db/migrations/{0000_tired_thunderbolt_ross.sql => 0000_safe_shiver_man.sql} (80%) create mode 100755 packages/mcp/bin/peppa-mcp create mode 100644 packages/mcp/scripts/smoke.ts create mode 100644 packages/mcp/src/format.ts create mode 100755 scripts/install-bins.sh diff --git a/CLAUDE.md b/CLAUDE.md index ced97998..3b9836e8 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -8,14 +8,17 @@ - `apps/bot` — Telegram-бот (grammY) - `packages/db` — Drizzle-схема и клиент (Postgres на 127.0.0.1:5433) - `packages/shared` — env, ключи задач (`PEP-42`) -- `packages/mcp` — MCP-сервер `peppa` для сессий в проектах +- `packages/core` — доменная логика (проекты, цели, задачи, вопросы PM, pg NOTIFY `peppa_events`); всё ходит через неё +- `packages/mcp` — MCP-сервер `peppa` (бинарь `peppa-mcp`) для сессий в проектах; проект берётся из `.peppa/project.json` в cwd +- `packages/cli` — CLI `peppa` (project/goal/task/q), пока нет веба - `packages/runner` — запуск claude в tmux, `peppa-hook`, вачдог - `template/` — содержимое репо `peppa/template` (AGENTS.md и т.д.), копируется в каждый проект -- `scripts/` — push-template.sh, bootstrap-project.sh +- `scripts/` — push-template.sh, bootstrap-project.sh, install-bins.sh (симлинки `packages/*/bin/*` в ~/.local/bin) ## Команды - `pnpm db:up` / `pnpm db:generate` / `pnpm db:migrate` - `pnpm typecheck` +- `tsx packages/mcp/scripts/smoke.ts ` — смоук MCP-сервера - `pnpm dev:web` TypeScript запускается через tsx / Next без сборки; импорты внутри пакетов — с расширением `.ts`. diff --git a/packages/cli/bin/peppa b/packages/cli/bin/peppa new file mode 100755 index 00000000..85f47033 --- /dev/null +++ b/packages/cli/bin/peppa @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +PEPPA_ROOT="$(cd "$(dirname "$(readlink -f "$0")")/../../.." && pwd)" +[ -f "$PEPPA_ROOT/.env" ] && set -a && . "$PEPPA_ROOT/.env" && set +a +exec "$PEPPA_ROOT/node_modules/.bin/tsx" "$PEPPA_ROOT/packages/cli/src/index.ts" "$@" diff --git a/packages/cli/package.json b/packages/cli/package.json new file mode 100644 index 00000000..9bf9c7d9 --- /dev/null +++ b/packages/cli/package.json @@ -0,0 +1,13 @@ +{ + "name": "@peppa/cli", + "version": "0.0.0", + "private": true, + "type": "module", + "bin": { "peppa": "./bin/peppa" }, + "scripts": { "start": "tsx src/index.ts", "typecheck": "tsc -p ." }, + "dependencies": { + "@peppa/core": "workspace:*", + "@peppa/db": "workspace:*", + "@peppa/shared": "workspace:*" + } +} diff --git a/packages/cli/src/index.ts b/packages/cli/src/index.ts new file mode 100644 index 00000000..f1d33a01 --- /dev/null +++ b/packages/cli/src/index.ts @@ -0,0 +1,159 @@ +// `peppa` CLI: manage projects, goals, tasks and PM questions until the web UI exists. +import { parseArgs } from "node:util"; +import { resolve } from "node:path"; +import { + answerQuestion, + createGoal, + createProject, + createTask, + findProjectFile, + getProject, + getTaskDetails, + listGoals, + listProjects, + listTasks, + pendingQuestions, + PeppaError, + resolveTask, + TASK_STATUSES, + updateTask, + type TaskStatus, +} from "@peppa/core"; +import { createDb } from "@peppa/db"; +import { loadEnv } from "@peppa/shared"; + +const USAGE = `peppa — Peppa software factory CLI + + peppa project add [--owner peppa] [--repo ] [--path ] + peppa project list + peppa goal add [KEY] [-d <description>] + peppa goal list [KEY] + peppa task add [KEY] <title> [-g <goal-id>] [-d <description>] + peppa task list [KEY] [-s <status>] + peppa task show <PEP-42|42> + peppa task set <PEP-42|42> -s <status> + peppa q list [KEY] + peppa q answer <id> <answer> + +KEY defaults to the project of the current directory (.peppa/project.json). +Statuses: ${TASK_STATUSES.join(", ")}`; + +const { values: opts, positionals } = parseArgs({ + allowPositionals: true, + options: { + owner: { type: "string", default: "peppa" }, + repo: { type: "string" }, + path: { type: "string" }, + description: { type: "string", short: "d" }, + goal: { type: "string", short: "g" }, + status: { type: "string", short: "s" }, + help: { type: "boolean", short: "h" }, + }, +}); + +const env = loadEnv(); +const db = createDb(env.DATABASE_URL); +const here = findProjectFile(process.cwd())?.data.key; +const [group, cmd, ...args] = positionals; + +/** Optional leading project KEY: used when there are more args than required. */ +function withKey(rest: string[], required: number): [string, string[]] { + if (rest.length > required) return [rest[0]!, rest.slice(1)]; + if (!here) throw new PeppaError("No project KEY given and no .peppa/project.json here"); + return [here, rest]; +} + +function status(s: string | undefined): TaskStatus | undefined { + if (s === undefined) return undefined; + if (!(TASK_STATUSES as readonly string[]).includes(s)) throw new PeppaError(`Unknown status "${s}"`); + return s as TaskStatus; +} + +async function main(): Promise<void> { + switch (`${group ?? ""} ${cmd ?? ""}`.trim()) { + case "project add": { + const [slug, key, name] = args; + if (!slug || !key || !name) throw new PeppaError("usage: peppa project add <slug> <KEY> <name>"); + const p = await createProject(db, { + slug, + key, + name, + giteaOwner: opts.owner!, + giteaRepo: opts.repo, + workspacePath: resolve(opts.path ?? `${env.PEPPA_WORKSPACES}/${slug}`), + }); + console.log(`Project ${p.key} (${p.slug}) → ${p.workspacePath}`); + break; + } + case "project list": + for (const p of await listProjects(db)) console.log(`${p.key.padEnd(8)} ${p.slug.padEnd(20)} ${p.name} ${p.workspacePath}`); + break; + case "goal add": { + const [key, [title]] = withKey(args, 1); + if (!title) throw new PeppaError("usage: peppa goal add [KEY] <title>"); + const g = await createGoal(db, (await getProject(db, key)).id, title, opts.description); + console.log(`Goal #${g.id}: ${g.title}`); + break; + } + case "goal list": { + const [key] = withKey(args, 0); + for (const g of await listGoals(db, (await getProject(db, key)).id)) console.log(`#${g.id} ${g.title}`); + break; + } + case "task add": { + const [key, [title]] = withKey(args, 1); + if (!title) throw new PeppaError("usage: peppa task add [KEY] <title>"); + const p = await getProject(db, key); + const ref = await createTask(db, { + projectId: p.id, + goalId: opts.goal ? Number(opts.goal) : undefined, + title, + description: opts.description, + }); + console.log(`${ref.key}: ${title}`); + break; + } + case "task list": { + const projectId = args[0] ?? here ? (await getProject(db, (args[0] ?? here)!)).id : undefined; + const s = status(opts.status); + for (const t of await listTasks(db, { projectId, statuses: s ? [s] : undefined })) { + console.log(`${t.key.padEnd(10)} ${t.status.padEnd(18)} ${t.title}`); + } + break; + } + case "task show": { + const ref = await resolveTask(db, args[0] ?? "", here); + const d = await getTaskDetails(db, ref); + console.log(JSON.stringify({ key: d.key, ...d.task, goal: d.goal, questions: d.questions }, null, 2)); + break; + } + case "task set": { + const ref = await resolveTask(db, args[0] ?? "", here); + const t = await updateTask(db, ref, { status: status(opts.status) }); + console.log(`${ref.key} → ${t.status}`); + break; + } + case "q list": { + const projectId = args[0] ?? here ? (await getProject(db, (args[0] ?? here)!)).id : undefined; + for (const q of await pendingQuestions(db, projectId)) console.log(`#${q.id} [${q.kind}] task=${q.taskId ?? "-"} ${q.text}`); + break; + } + case "q answer": { + const [id, ...answer] = args; + const q = await answerQuestion(db, Number(id), answer.join(" "), "terminal"); + console.log(`Answered #${q.id}`); + break; + } + default: + console.log(USAGE); + } +} + +try { + if (opts.help) console.log(USAGE); + else await main(); + process.exit(0); +} catch (e) { + console.error(e instanceof PeppaError ? `peppa: ${e.message}` : e); + process.exit(1); +} diff --git a/packages/cli/tsconfig.json b/packages/cli/tsconfig.json new file mode 100644 index 00000000..3bda5f3c --- /dev/null +++ b/packages/cli/tsconfig.json @@ -0,0 +1 @@ +{ "extends": "../../tsconfig.base.json", "compilerOptions": { "allowImportingTsExtensions": true }, "include": ["src"] } diff --git a/packages/core/package.json b/packages/core/package.json new file mode 100644 index 00000000..e0b9f573 --- /dev/null +++ b/packages/core/package.json @@ -0,0 +1,13 @@ +{ + "name": "@peppa/core", + "version": "0.0.0", + "private": true, + "type": "module", + "exports": { ".": "./src/index.ts" }, + "scripts": { "typecheck": "tsc -p ." }, + "dependencies": { + "@peppa/db": "workspace:*", + "@peppa/shared": "workspace:*", + "drizzle-orm": "0.45.4" + } +} diff --git a/packages/core/src/errors.ts b/packages/core/src/errors.ts new file mode 100644 index 00000000..81b7c6c6 --- /dev/null +++ b/packages/core/src/errors.ts @@ -0,0 +1,4 @@ +/** Errors whose message is safe and useful to show to an agent or the PM as-is. */ +export class PeppaError extends Error { + override name = "PeppaError"; +} diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts new file mode 100644 index 00000000..73afc6d0 --- /dev/null +++ b/packages/core/src/index.ts @@ -0,0 +1,5 @@ +export * from "./errors.ts"; +export * from "./notify.ts"; +export * from "./project-file.ts"; +export * from "./projects.ts"; +export * from "./tasks.ts"; diff --git a/packages/core/src/notify.ts b/packages/core/src/notify.ts new file mode 100644 index 00000000..3d412ddd --- /dev/null +++ b/packages/core/src/notify.ts @@ -0,0 +1,15 @@ +import type { Db } from "@peppa/db"; +import { sql } from "drizzle-orm"; + +export const EVENTS_CHANNEL = "peppa_events"; + +export type PeppaNotification = + | { type: "question"; questionId: number } + | { type: "question_answered"; questionId: number } + | { type: "task_updated"; taskId: number } + | { type: "progress"; eventId: number }; + +/** Broadcasts via Postgres NOTIFY; the bot and web listen on EVENTS_CHANNEL. */ +export async function notify(db: Db, n: PeppaNotification): Promise<void> { + await db.execute(sql`select pg_notify(${EVENTS_CHANNEL}, ${JSON.stringify(n)})`); +} diff --git a/packages/core/src/project-file.ts b/packages/core/src/project-file.ts new file mode 100644 index 00000000..8cd619b1 --- /dev/null +++ b/packages/core/src/project-file.ts @@ -0,0 +1,15 @@ +import { existsSync, readFileSync } from "node:fs"; +import { dirname, join } from "node:path"; +import type { PeppaProjectFile } from "@peppa/shared"; + +/** Walks up from `dir` looking for `.peppa/project.json`. */ +export function findProjectFile(dir: string): { path: string; data: PeppaProjectFile } | null { + let cur = dir; + for (;;) { + const path = join(cur, ".peppa", "project.json"); + if (existsSync(path)) return { path, data: JSON.parse(readFileSync(path, "utf8")) as PeppaProjectFile }; + const parent = dirname(cur); + if (parent === cur) return null; + cur = parent; + } +} diff --git a/packages/core/src/projects.ts b/packages/core/src/projects.ts new file mode 100644 index 00000000..20a62e67 --- /dev/null +++ b/packages/core/src/projects.ts @@ -0,0 +1,60 @@ +import { goals, projects, type Db } from "@peppa/db"; +import { and, asc, eq, or } from "drizzle-orm"; +import { PeppaError } from "./errors.ts"; + +export type Project = typeof projects.$inferSelect; +export type Goal = typeof goals.$inferSelect; + +export interface NewProject { + slug: string; + key: string; + name: string; + description?: string; + giteaOwner: string; + giteaRepo?: string; + workspacePath: string; +} + +export async function createProject(db: Db, p: NewProject): Promise<Project> { + const key = p.key.toUpperCase(); + if (!/^[A-Z][A-Z0-9]{1,9}$/.test(key)) throw new PeppaError(`Invalid project key "${p.key}": 2–10 chars, A–Z/0–9, starts with a letter`); + if (!/^[a-z0-9][a-z0-9-]*$/.test(p.slug)) throw new PeppaError(`Invalid slug "${p.slug}": lowercase letters, digits, dashes`); + const [row] = await db + .insert(projects) + .values({ ...p, key, giteaRepo: p.giteaRepo ?? p.slug }) + .returning(); + return row!; +} + +export async function listProjects(db: Db): Promise<Project[]> { + return db.select().from(projects).orderBy(asc(projects.key)); +} + +/** Finds a project by task key prefix ("PEP") or slug ("peppa"). */ +export async function getProject(db: Db, keyOrSlug: string): Promise<Project> { + const [row] = await db + .select() + .from(projects) + .where(or(eq(projects.key, keyOrSlug.toUpperCase()), eq(projects.slug, keyOrSlug.toLowerCase()))); + if (!row) throw new PeppaError(`Project "${keyOrSlug}" not found`); + return row; +} + +export async function createGoal(db: Db, projectId: number, title: string, description?: string): Promise<Goal> { + const [row] = await db.insert(goals).values({ projectId, title, description }).returning(); + return row!; +} + +export async function listGoals(db: Db, projectId: number, includeClosed = false): Promise<Goal[]> { + return db + .select() + .from(goals) + .where(includeClosed ? eq(goals.projectId, projectId) : and(eq(goals.projectId, projectId), eq(goals.status, "open"))) + .orderBy(asc(goals.id)); +} + +export async function getGoal(db: Db, projectId: number, goalId: number): Promise<Goal> { + const [row] = await db.select().from(goals).where(and(eq(goals.id, goalId), eq(goals.projectId, projectId))); + if (!row) throw new PeppaError(`Goal #${goalId} not found in this project`); + return row; +} diff --git a/packages/core/src/tasks.ts b/packages/core/src/tasks.ts new file mode 100644 index 00000000..5f6807ba --- /dev/null +++ b/packages/core/src/tasks.ts @@ -0,0 +1,186 @@ +import { events, goals, projects, questions, taskStatus, tasks, type Db } from "@peppa/db"; +import { formatTaskKey, parseTaskKey } from "@peppa/shared"; +import { and, asc, desc, eq, inArray, isNull, sql } from "drizzle-orm"; +import { PeppaError } from "./errors.ts"; +import { notify } from "./notify.ts"; +import { getGoal, getProject, type Goal, type Project } from "./projects.ts"; + +export type Task = typeof tasks.$inferSelect; +export type TaskStatus = (typeof taskStatus.enumValues)[number]; +export type Question = typeof questions.$inferSelect; +export type QuestionKind = Question["kind"]; +export const TASK_STATUSES = taskStatus.enumValues; + +export interface TaskRef { + project: Project; + task: Task; + key: string; +} + +/** Resolves "PEP-42" / "42" (with a default project key) to the task row. */ +export async function resolveTask(db: Db, input: string, defaultProjectKey?: string): Promise<TaskRef> { + const parsed = parseTaskKey(input, defaultProjectKey); + if (!parsed) { + throw new PeppaError( + defaultProjectKey + ? `Can't parse task "${input}": expected ${defaultProjectKey}-42 or 42` + : `Can't parse task "${input}": expected KEY-42 (no default project here — is .peppa/project.json present?)`, + ); + } + const project = await getProject(db, parsed.projectKey); + const [task] = await db + .select() + .from(tasks) + .where(and(eq(tasks.projectId, project.id), eq(tasks.number, parsed.number))); + if (!task) throw new PeppaError(`Task ${formatTaskKey(project.key, parsed.number)} not found`); + return { project, task, key: formatTaskKey(project.key, task.number) }; +} + +export interface NewTask { + projectId: number; + goalId?: number; + title: string; + description?: string; +} + +export async function createTask(db: Db, t: NewTask): Promise<TaskRef> { + return db.transaction(async (tx) => { + // Hand out the per-project number atomically. + const [project] = await tx + .update(projects) + .set({ nextTaskNumber: sql`${projects.nextTaskNumber} + 1` }) + .where(eq(projects.id, t.projectId)) + .returning(); + if (!project) throw new PeppaError(`Project #${t.projectId} not found`); + if (t.goalId != null) await getGoal(tx as unknown as Db, t.projectId, t.goalId); + const [task] = await tx + .insert(tasks) + .values({ ...t, number: project.nextTaskNumber - 1 }) + .returning(); + return { project, task: task!, key: formatTaskKey(project.key, task!.number) }; + }); +} + +export interface TaskFilter { + projectId?: number; + goalId?: number; + statuses?: TaskStatus[]; +} + +export async function listTasks(db: Db, f: TaskFilter = {}): Promise<Array<Task & { key: string }>> { + const where = []; + if (f.projectId != null) where.push(eq(tasks.projectId, f.projectId)); + if (f.goalId != null) where.push(eq(tasks.goalId, f.goalId)); + if (f.statuses?.length) where.push(inArray(tasks.status, f.statuses)); + const rows = await db + .select({ task: tasks, projectKey: projects.key }) + .from(tasks) + .innerJoin(projects, eq(tasks.projectId, projects.id)) + .where(and(...where)) + .orderBy(asc(projects.key), asc(tasks.number)); + return rows.map((r) => ({ ...r.task, key: formatTaskKey(r.projectKey, r.task.number) })); +} + +export interface TaskPatch { + status?: TaskStatus; + title?: string; + description?: string; + goalId?: number | null; + openspecChange?: string | null; + prUrl?: string | null; +} + +export async function updateTask(db: Db, ref: TaskRef, patch: TaskPatch, sessionId?: number): Promise<Task> { + if (patch.goalId != null) await getGoal(db, ref.project.id, patch.goalId); + const [task] = await db.update(tasks).set(patch).where(eq(tasks.id, ref.task.id)).returning(); + const changed = Object.fromEntries( + Object.entries(patch).filter(([k, v]) => v !== undefined && ref.task[k as keyof Task] !== v), + ); + if (Object.keys(changed).length) { + await db.insert(events).values({ + projectId: ref.project.id, + taskId: ref.task.id, + sessionId, + type: "task_updated", + payload: { from: pick(ref.task, Object.keys(changed)), to: changed }, + }); + await notify(db, { type: "task_updated", taskId: ref.task.id }); + } + return task!; +} + +export interface TaskDetails { + key: string; + task: Task; + project: Project; + goal: Goal | null; + questions: Question[]; + recentEvents: Array<typeof events.$inferSelect>; +} + +export async function getTaskDetails(db: Db, ref: TaskRef): Promise<TaskDetails> { + const [goal] = ref.task.goalId ? await db.select().from(goals).where(eq(goals.id, ref.task.goalId)) : []; + const qs = await db.select().from(questions).where(eq(questions.taskId, ref.task.id)).orderBy(asc(questions.id)); + const evs = await db + .select() + .from(events) + .where(eq(events.taskId, ref.task.id)) + .orderBy(desc(events.id)) + .limit(20); + return { key: ref.key, task: ref.task, project: ref.project, goal: goal ?? null, questions: qs, recentEvents: evs.reverse() }; +} + +export interface NewQuestion { + kind: QuestionKind; + text: string; + options?: string[]; + sessionId?: number; +} + +/** Records a question for the PM and broadcasts it (the bot forwards it to Telegram). */ +export async function askPm(db: Db, ref: TaskRef, q: NewQuestion): Promise<Question> { + const [row] = await db + .insert(questions) + .values({ projectId: ref.project.id, taskId: ref.task.id, ...q }) + .returning(); + if (q.kind === "approval") await updateTask(db, ref, { status: "awaiting_approval" }, q.sessionId); + await notify(db, { type: "question", questionId: row!.id }); + return row!; +} + +export async function pendingQuestions(db: Db, projectId?: number): Promise<Question[]> { + return db + .select() + .from(questions) + .where(and(isNull(questions.answeredAt), projectId != null ? eq(questions.projectId, projectId) : undefined)) + .orderBy(asc(questions.id)); +} + +export async function answerQuestion( + db: Db, + questionId: number, + answer: string, + via: NonNullable<Question["answeredVia"]>, +): Promise<Question> { + const [row] = await db + .update(questions) + .set({ answer, answeredVia: via, answeredAt: new Date() }) + .where(and(eq(questions.id, questionId), isNull(questions.answeredAt))) + .returning(); + if (!row) throw new PeppaError(`Question #${questionId} not found or already answered`); + await notify(db, { type: "question_answered", questionId }); + return row; +} + +export async function reportProgress(db: Db, ref: TaskRef, text: string, sessionId?: number) { + const [row] = await db + .insert(events) + .values({ projectId: ref.project.id, taskId: ref.task.id, sessionId, type: "progress", payload: { text } }) + .returning(); + await notify(db, { type: "progress", eventId: row!.id }); + return row!; +} + +function pick<T extends object>(o: T, keys: string[]): Record<string, unknown> { + return Object.fromEntries(keys.map((k) => [k, o[k as keyof T]])); +} diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json new file mode 100644 index 00000000..3bda5f3c --- /dev/null +++ b/packages/core/tsconfig.json @@ -0,0 +1 @@ +{ "extends": "../../tsconfig.base.json", "compilerOptions": { "allowImportingTsExtensions": true }, "include": ["src"] } diff --git a/packages/db/migrations/0000_tired_thunderbolt_ross.sql b/packages/db/migrations/0000_safe_shiver_man.sql similarity index 80% rename from packages/db/migrations/0000_tired_thunderbolt_ross.sql rename to packages/db/migrations/0000_safe_shiver_man.sql index e496c8fe..5618345f 100644 --- a/packages/db/migrations/0000_tired_thunderbolt_ross.sql +++ b/packages/db/migrations/0000_safe_shiver_man.sql @@ -3,7 +3,9 @@ CREATE TYPE "public"."session_status" AS ENUM('starting', 'running', 'waiting_in CREATE TYPE "public"."task_status" AS ENUM('backlog', 'proposing', 'awaiting_approval', 'in_progress', 'review', 'done', 'blocked');--> statement-breakpoint CREATE TABLE "events" ( "id" serial PRIMARY KEY NOT NULL, - "session_id" integer NOT NULL, + "project_id" integer NOT NULL, + "task_id" integer, + "session_id" integer, "type" text NOT NULL, "payload" jsonb, "created_at" timestamp with time zone DEFAULT now() NOT NULL @@ -38,7 +40,9 @@ CREATE TABLE "projects" ( --> statement-breakpoint CREATE TABLE "questions" ( "id" serial PRIMARY KEY NOT NULL, - "session_id" integer NOT NULL, + "project_id" integer NOT NULL, + "task_id" integer, + "session_id" integer, "kind" text NOT NULL, "text" text NOT NULL, "options" jsonb, @@ -76,9 +80,13 @@ CREATE TABLE "tasks" ( "updated_at" timestamp with time zone DEFAULT now() NOT NULL ); --> statement-breakpoint -ALTER TABLE "events" ADD CONSTRAINT "events_session_id_sessions_id_fk" FOREIGN KEY ("session_id") REFERENCES "public"."sessions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "events" ADD CONSTRAINT "events_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "events" ADD CONSTRAINT "events_task_id_tasks_id_fk" FOREIGN KEY ("task_id") REFERENCES "public"."tasks"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "events" ADD CONSTRAINT "events_session_id_sessions_id_fk" FOREIGN KEY ("session_id") REFERENCES "public"."sessions"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint ALTER TABLE "goals" ADD CONSTRAINT "goals_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "questions" ADD CONSTRAINT "questions_session_id_sessions_id_fk" FOREIGN KEY ("session_id") REFERENCES "public"."sessions"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "questions" ADD CONSTRAINT "questions_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "questions" ADD CONSTRAINT "questions_task_id_tasks_id_fk" FOREIGN KEY ("task_id") REFERENCES "public"."tasks"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "questions" ADD CONSTRAINT "questions_session_id_sessions_id_fk" FOREIGN KEY ("session_id") REFERENCES "public"."sessions"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint ALTER TABLE "sessions" ADD CONSTRAINT "sessions_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint ALTER TABLE "sessions" ADD CONSTRAINT "sessions_task_id_tasks_id_fk" FOREIGN KEY ("task_id") REFERENCES "public"."tasks"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint ALTER TABLE "tasks" ADD CONSTRAINT "tasks_project_id_projects_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."projects"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint diff --git a/packages/db/migrations/meta/0000_snapshot.json b/packages/db/migrations/meta/0000_snapshot.json index 18f176bf..a2548dc1 100644 --- a/packages/db/migrations/meta/0000_snapshot.json +++ b/packages/db/migrations/meta/0000_snapshot.json @@ -1,5 +1,5 @@ { - "id": "62a2731d-7246-4e13-8646-f978422b8513", + "id": "2281ab22-b150-4664-9ffc-a0bb54103d9c", "prevId": "00000000-0000-0000-0000-000000000000", "version": "7", "dialect": "postgresql", @@ -14,11 +14,23 @@ "primaryKey": true, "notNull": true }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "task_id": { + "name": "task_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, "session_id": { "name": "session_id", "type": "integer", "primaryKey": false, - "notNull": true + "notNull": false }, "type": { "name": "type", @@ -42,6 +54,32 @@ }, "indexes": {}, "foreignKeys": { + "events_project_id_projects_id_fk": { + "name": "events_project_id_projects_id_fk", + "tableFrom": "events", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "events_task_id_tasks_id_fk": { + "name": "events_task_id_tasks_id_fk", + "tableFrom": "events", + "tableTo": "tasks", + "columnsFrom": [ + "task_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, "events_session_id_sessions_id_fk": { "name": "events_session_id_sessions_id_fk", "tableFrom": "events", @@ -52,7 +90,7 @@ "columnsTo": [ "id" ], - "onDelete": "cascade", + "onDelete": "set null", "onUpdate": "no action" } }, @@ -249,11 +287,23 @@ "primaryKey": true, "notNull": true }, + "project_id": { + "name": "project_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "task_id": { + "name": "task_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, "session_id": { "name": "session_id", "type": "integer", "primaryKey": false, - "notNull": true + "notNull": false }, "kind": { "name": "kind", @@ -307,6 +357,32 @@ }, "indexes": {}, "foreignKeys": { + "questions_project_id_projects_id_fk": { + "name": "questions_project_id_projects_id_fk", + "tableFrom": "questions", + "tableTo": "projects", + "columnsFrom": [ + "project_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "questions_task_id_tasks_id_fk": { + "name": "questions_task_id_tasks_id_fk", + "tableFrom": "questions", + "tableTo": "tasks", + "columnsFrom": [ + "task_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, "questions_session_id_sessions_id_fk": { "name": "questions_session_id_sessions_id_fk", "tableFrom": "questions", @@ -317,7 +393,7 @@ "columnsTo": [ "id" ], - "onDelete": "cascade", + "onDelete": "set null", "onUpdate": "no action" } }, diff --git a/packages/db/migrations/meta/_journal.json b/packages/db/migrations/meta/_journal.json index f7315774..444b4b76 100644 --- a/packages/db/migrations/meta/_journal.json +++ b/packages/db/migrations/meta/_journal.json @@ -5,8 +5,8 @@ { "idx": 0, "version": "7", - "when": 1794492771395, - "tag": "0000_tired_thunderbolt_ross", + "when": 1794492884912, + "tag": "0000_safe_shiver_man", "breakpoints": true } ] diff --git a/packages/db/src/schema.ts b/packages/db/src/schema.ts index a52e606e..a932781e 100644 --- a/packages/db/src/schema.ts +++ b/packages/db/src/schema.ts @@ -90,7 +90,10 @@ export const sessions = pgTable("sessions", { /** Questions routed to the PM (Telegram / web) and their answers. */ export const questions = pgTable("questions", { id: serial("id").primaryKey(), - sessionId: integer("session_id").notNull().references(() => sessions.id, { onDelete: "cascade" }), + projectId: integer("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }), + taskId: integer("task_id").references(() => tasks.id, { onDelete: "cascade" }), + // Null when asked from a session Peppa did not start (manual `claude`). + sessionId: integer("session_id").references(() => sessions.id, { onDelete: "set null" }), kind: text("kind", { enum: ["question", "permission", "approval", "attention"] }).notNull(), text: text("text").notNull(), options: jsonb("options").$type<string[]>(), @@ -101,10 +104,12 @@ export const questions = pgTable("questions", { answeredAt: timestamp("answered_at", { withTimezone: true }), }); -/** Raw hook / watchdog event log per session. */ +/** Event log: hook / watchdog events, progress reports, status changes. */ export const events = pgTable("events", { id: serial("id").primaryKey(), - sessionId: integer("session_id").notNull().references(() => sessions.id, { onDelete: "cascade" }), + projectId: integer("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }), + taskId: integer("task_id").references(() => tasks.id, { onDelete: "cascade" }), + sessionId: integer("session_id").references(() => sessions.id, { onDelete: "set null" }), type: text("type").notNull(), payload: jsonb("payload"), createdAt: createdAt(), @@ -123,6 +128,8 @@ export const tasksRelations = relations(tasks, ({ one, many }) => ({ project: one(projects, { fields: [tasks.projectId], references: [projects.id] }), goal: one(goals, { fields: [tasks.goalId], references: [goals.id] }), sessions: many(sessions), + questions: many(questions), + events: many(events), })); export const sessionsRelations = relations(sessions, ({ one, many }) => ({ project: one(projects, { fields: [sessions.projectId], references: [projects.id] }), @@ -131,8 +138,12 @@ export const sessionsRelations = relations(sessions, ({ one, many }) => ({ events: many(events), })); export const questionsRelations = relations(questions, ({ one }) => ({ + project: one(projects, { fields: [questions.projectId], references: [projects.id] }), + task: one(tasks, { fields: [questions.taskId], references: [tasks.id] }), session: one(sessions, { fields: [questions.sessionId], references: [sessions.id] }), })); export const eventsRelations = relations(events, ({ one }) => ({ + project: one(projects, { fields: [events.projectId], references: [projects.id] }), + task: one(tasks, { fields: [events.taskId], references: [tasks.id] }), session: one(sessions, { fields: [events.sessionId], references: [sessions.id] }), })); diff --git a/packages/mcp/bin/peppa-mcp b/packages/mcp/bin/peppa-mcp new file mode 100755 index 00000000..ad75e165 --- /dev/null +++ b/packages/mcp/bin/peppa-mcp @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +# Launches the Peppa MCP server; keeps the caller's cwd so .peppa/project.json resolves. +PEPPA_ROOT="$(cd "$(dirname "$(readlink -f "$0")")/../../.." && pwd)" +[ -f "$PEPPA_ROOT/.env" ] && set -a && . "$PEPPA_ROOT/.env" && set +a +exec "$PEPPA_ROOT/node_modules/.bin/tsx" "$PEPPA_ROOT/packages/mcp/src/index.ts" "$@" diff --git a/packages/mcp/package.json b/packages/mcp/package.json index ba0b80a2..8ca924af 100644 --- a/packages/mcp/package.json +++ b/packages/mcp/package.json @@ -3,6 +3,13 @@ "version": "0.0.0", "private": true, "type": "module", + "bin": { "peppa-mcp": "./bin/peppa-mcp" }, "scripts": { "start": "tsx src/index.ts", "typecheck": "tsc -p ." }, - "dependencies": { "@peppa/db": "workspace:*", "@peppa/shared": "workspace:*" } + "dependencies": { + "@modelcontextprotocol/sdk": "1.32.2", + "@peppa/core": "workspace:*", + "@peppa/db": "workspace:*", + "@peppa/shared": "workspace:*", + "zod": "4.6.7" + } } diff --git a/packages/mcp/scripts/smoke.ts b/packages/mcp/scripts/smoke.ts new file mode 100644 index 00000000..7d8b5e2a --- /dev/null +++ b/packages/mcp/scripts/smoke.ts @@ -0,0 +1,22 @@ +// Smoke test: spawns peppa-mcp in the given project dir and calls a few tools. +// Usage: tsx packages/mcp/scripts/smoke.ts <project-dir> <task> +import { Client } from "@modelcontextprotocol/sdk/client/index.js"; +import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js"; +import { fileURLToPath } from "node:url"; + +const [dir = process.cwd(), task = "1"] = process.argv.slice(2); +const bin = fileURLToPath(new URL("../bin/peppa-mcp", import.meta.url)); +const client = new Client({ name: "peppa-smoke", version: "0" }); +await client.connect(new StdioClientTransport({ command: bin, cwd: dir, env: process.env as Record<string, string> })); + +const { tools } = await client.listTools(); +console.log("tools:", tools.map((t) => t.name).join(", ")); +for (const [name, args] of [ + ["list_goals", {}], + ["list_tasks", {}], + ["get_task", { task }], +] as const) { + const r = await client.callTool({ name, arguments: args }); + console.log(`\n── ${name}${r.isError ? " (error)" : ""}\n${(r.content as Array<{ text: string }>)[0]!.text}`); +} +await client.close(); diff --git a/packages/mcp/src/format.ts b/packages/mcp/src/format.ts new file mode 100644 index 00000000..e4415987 --- /dev/null +++ b/packages/mcp/src/format.ts @@ -0,0 +1,39 @@ +import type { TaskDetails, TaskStatus } from "@peppa/core"; + +const NEXT_STEP: Record<TaskStatus, string> = { + backlog: "Начни с Proposal: создай OpenSpec change (workflow openspec-propose), затем update_task(status: proposing, openspec_change).", + proposing: "Change начат: допиши недостающие артефакты, `openspec validate`, затем request_approval и закончи ход.", + awaiting_approval: "Ждём решения PM по proposal. Ничего не реализуй — покажи резюме и закончи ход.", + in_progress: "Одобрено. Apply: продолжай с первого невыполненного пункта tasks.md (workflow openspec-apply-change), report_progress по ходу.", + review: "PR открыт. Проверь замечания в PR и доделай их.", + done: "Задача завершена — ничего делать не нужно.", + blocked: "Задача заблокирована — выясни причину в вопросах ниже или спроси PM через ask_pm.", +}; + +export function formatTask(d: TaskDetails): string { + const { task, goal } = d; + const lines = [ + `# ${d.key}: ${task.title}`, + "", + `- Проект: ${d.project.name} (${d.project.key})`, + `- Статус: **${task.status}**`, + `- Цель: ${goal ? `#${goal.id} ${goal.title}` : "—"}`, + `- OpenSpec change: ${task.openspecChange ? `\`openspec/changes/${task.openspecChange}/\`` : "ещё нет"}`, + ]; + if (task.prUrl) lines.push(`- PR: ${task.prUrl}`); + lines.push("", "## Описание", "", task.description?.trim() || "_нет описания_"); + if (goal?.description) lines.push("", `## Цель #${goal.id}: ${goal.title}`, "", goal.description.trim()); + if (d.questions.length) { + lines.push("", "## Вопросы к PM"); + for (const q of d.questions) { + lines.push("", `- [${q.kind} #${q.id}] ${q.text}`, q.answer ? ` - Ответ (${q.answeredVia}): ${q.answer}` : " - _ожидает ответа_"); + } + } + const progress = d.recentEvents.filter((e) => e.type === "progress"); + if (progress.length) { + lines.push("", "## Последний прогресс"); + for (const e of progress.slice(-5)) lines.push(`- ${e.createdAt.toISOString().slice(0, 16)} ${(e.payload as { text: string }).text}`); + } + lines.push("", "## Следующий шаг", "", NEXT_STEP[task.status]); + return lines.join("\n"); +} diff --git a/packages/mcp/src/index.ts b/packages/mcp/src/index.ts index 336565ab..0e994500 100644 --- a/packages/mcp/src/index.ts +++ b/packages/mcp/src/index.ts @@ -1,2 +1,157 @@ -// Peppa MCP server (stage 2): get_task, create_task, update_task_status, ask_pm, report_progress. -console.log("@peppa/mcp: not implemented yet"); +// Peppa MCP server: gives Claude sessions inside a project access to its goals, tasks +// and the PM. Runs over stdio; the project defaults to the repo's .peppa/project.json. +import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; +import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; +import { + askPm, + createTask, + findProjectFile, + getProject, + getTaskDetails, + listGoals, + listTasks, + PeppaError, + reportProgress, + resolveTask, + TASK_STATUSES, + updateTask, +} from "@peppa/core"; +import { createDb } from "@peppa/db"; +import { z } from "zod"; +import { formatTask } from "./format.ts"; + +const db = createDb(); +const projectFile = findProjectFile(process.env.PEPPA_PROJECT_DIR ?? process.cwd()); +const defaultKey = projectFile?.data.key; +// Set by the runner for sessions it starts; absent for a manual `claude`. +const sessionId = process.env.PEPPA_SESSION_ID ? Number(process.env.PEPPA_SESSION_ID) : undefined; + +const server = new McpServer({ name: "peppa", version: "0.1.0" }); + +type Result = { content: Array<{ type: "text"; text: string }>; isError?: boolean }; + +function tool<S extends z.ZodRawShape>( + name: string, + description: string, + inputSchema: S, + run: (args: z.infer<z.ZodObject<S>>) => Promise<string>, +) { + server.registerTool(name, { description, inputSchema }, (async (args: z.infer<z.ZodObject<S>>): Promise<Result> => { + try { + return { content: [{ type: "text", text: await run(args) }] }; + } catch (e) { + const msg = e instanceof PeppaError ? e.message : `Internal error: ${(e as Error).message}`; + return { content: [{ type: "text", text: msg }], isError: true }; + } + }) as never); +} + +const taskArg = z + .string() + .describe(`Task key like ${defaultKey ?? "PEP"}-42, or just the number for the current project`); +const projectArg = z + .string() + .optional() + .describe(`Project key or slug; defaults to the current repo's project${defaultKey ? ` (${defaultKey})` : ""}`); + +async function projectOrDefault(p?: string) { + const k = p ?? defaultKey; + if (!k) throw new PeppaError("No project given and no .peppa/project.json found in this repo"); + return getProject(db, k); +} + +tool("get_task", "Get a Peppa task: description, goal, status, OpenSpec change, PM Q&A and the next step to take. Call this first when the user names a task number.", { task: taskArg }, async ({ task }) => + formatTask(await getTaskDetails(db, await resolveTask(db, task, defaultKey))), +); + +tool( + "list_tasks", + "List tasks in a project, optionally filtered by status or goal.", + { project: projectArg, status: z.enum(TASK_STATUSES).optional(), goal_id: z.number().int().optional() }, + async ({ project, status, goal_id }) => { + const p = await projectOrDefault(project); + const rows = await listTasks(db, { projectId: p.id, goalId: goal_id, statuses: status ? [status] : undefined }); + if (!rows.length) return "No tasks."; + return rows.map((t) => `- ${t.key} [${t.status}]${t.goalId ? ` (goal #${t.goalId})` : ""} ${t.title}`).join("\n"); + }, +); + +tool("list_goals", "List the open top-level goals of a project.", { project: projectArg }, async ({ project }) => { + const p = await projectOrDefault(project); + const rows = await listGoals(db, p.id); + if (!rows.length) return "No open goals."; + return rows.map((g) => `- #${g.id} ${g.title}${g.description ? ` — ${g.description.split("\n")[0]}` : ""}`).join("\n"); +}); + +tool( + "create_task", + "Create a new task (e.g. follow-up work discovered outside the current change's scope). Link it to a goal when possible.", + { + title: z.string().min(3), + description: z.string().optional(), + goal_id: z.number().int().optional(), + project: projectArg, + }, + async ({ title, description, goal_id, project }) => { + const p = await projectOrDefault(project); + const ref = await createTask(db, { projectId: p.id, goalId: goal_id, title, description }); + return `Created ${ref.key}: ${title}`; + }, +); + +tool( + "update_task", + "Update a task's status, OpenSpec change name, PR URL, title or description.", + { + task: taskArg, + status: z.enum(TASK_STATUSES).optional(), + openspec_change: z.string().optional().describe("Change id under openspec/changes/, e.g. pep-42-add-auth"), + pr_url: z.string().url().optional(), + title: z.string().optional(), + description: z.string().optional(), + }, + async ({ task, status, openspec_change, pr_url, title, description }) => { + const ref = await resolveTask(db, task, defaultKey); + const t = await updateTask(db, ref, { status, openspecChange: openspec_change, prUrl: pr_url, title, description }, sessionId); + return `${ref.key} updated: status=${t.status}${t.openspecChange ? `, change=${t.openspecChange}` : ""}${t.prUrl ? `, pr=${t.prUrl}` : ""}`; + }, +); + +tool( + "request_approval", + "Ask the PM to approve the OpenSpec proposal for a task. Sets status to awaiting_approval and notifies the PM (Telegram). End your turn afterwards — the decision arrives as the next user message.", + { task: taskArg, summary: z.string().min(10).describe("What, why, risks, open questions — readable on a phone") }, + async ({ task, summary }) => { + const ref = await resolveTask(db, task, defaultKey); + const q = await askPm(db, ref, { kind: "approval", text: summary, sessionId }); + return `Approval requested (#${q.id}); ${ref.key} is awaiting_approval. End your turn now and wait for the PM's reply.`; + }, +); + +tool( + "ask_pm", + "Ask the PM a question (delivered to Telegram). Use for decisions that change scope, behavior, data or need access/secrets. End your turn afterwards — the answer arrives as the next user message.", + { + task: taskArg, + question: z.string().min(5).describe("One question, 1–2 sentences of context"), + options: z.array(z.string()).max(6).optional().describe("Suggested answers, shown as buttons"), + }, + async ({ task, question, options }) => { + const ref = await resolveTask(db, task, defaultKey); + const q = await askPm(db, ref, { kind: "question", text: question, options, sessionId }); + return `Question #${q.id} sent to the PM. End your turn now and wait for the answer.`; + }, +); + +tool( + "report_progress", + "Log a short progress note on a task (visible to the PM in the web UI / Telegram digest).", + { task: taskArg, text: z.string().min(3) }, + async ({ task, text }) => { + const ref = await resolveTask(db, task, defaultKey); + await reportProgress(db, ref, text, sessionId); + return `Progress noted on ${ref.key}.`; + }, +); + +await server.connect(new StdioServerTransport()); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e27eef76..a74ff34c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -210,6 +210,30 @@ importers: specifier: 19.3.0 version: 19.3.0(@types/react@19.3.0) + packages/cli: + dependencies: + '@peppa/core': + specifier: workspace:* + version: link:../core + '@peppa/db': + specifier: workspace:* + version: link:../db + '@peppa/shared': + specifier: workspace:* + version: link:../shared + + packages/core: + dependencies: + '@peppa/db': + specifier: workspace:* + version: link:../db + '@peppa/shared': + specifier: workspace:* + version: link:../shared + drizzle-orm: + specifier: 0.45.4 + version: 0.45.4(postgres@4.1.1) + packages/db: dependencies: '@peppa/shared': @@ -228,12 +252,21 @@ importers: packages/mcp: dependencies: + '@modelcontextprotocol/sdk': + specifier: 1.32.2 + version: 1.32.2(zod@4.6.7) + '@peppa/core': + specifier: workspace:* + version: link:../core '@peppa/db': specifier: workspace:* version: link:../db '@peppa/shared': specifier: workspace:* version: link:../shared + zod: + specifier: 4.6.7 + version: 4.6.7 packages/runner: dependencies: @@ -710,6 +743,12 @@ packages: cpu: [x64] os: [win32] + '@hono/node-server@2.1.7': + resolution: {integrity: sha512-Wr0E6S+v2Bw9FkpGNP5BQ5QbJvclUa06UVehd65WFZe6XeJwbrKQQ5wPDevc0IC+QyzbO7v3Llh5uo45IZcSnA==} + engines: {node: '>=20'} + peerDependencies: + hono: ^4 || ^5.0.0-0 + '@img/colour@1.1.0': resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==} engines: {node: '>=18'} @@ -872,6 +911,16 @@ packages: cpu: [x64] os: [win32] + '@modelcontextprotocol/sdk@1.32.2': + resolution: {integrity: sha512-SWsVtH/0vULSQStoZ6xxH2K09Li8fXYTMC64ZeogCdpZ3XSi1eCPOByV1OpuJxuI3OcmHhosDWYyii07tpPsLw==} + engines: {node: '>=18'} + peerDependencies: + '@cfworker/json-schema': ^4.1.1 + zod: ^3.25 || ^4.0 + peerDependenciesMeta: + '@cfworker/json-schema': + optional: true + '@next/env@16.4.6': resolution: {integrity: sha512-SunBjJ6t+oBtecS3dTjdVuMhUogP5wD/vrGL5EVuQYM1iS4O5ilL51HkiJ3sPjMzRHiCChvr4dbaSJbR7F3lxA==} @@ -941,23 +990,95 @@ packages: '@types/react@19.3.0': resolution: {integrity: sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==} + accepts@2.0.0: + resolution: {integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==} + engines: {node: '>= 0.6'} + + ajv-formats@3.0.1: + resolution: {integrity: sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==} + peerDependencies: + ajv: ^8.0.0 + peerDependenciesMeta: + ajv: + optional: true + + ajv@8.20.0: + resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + baseline-browser-mapping@2.11.35: resolution: {integrity: sha512-GNk8KX52CHqeNKGk8+7tZnQab/2k1t/BgrUHPKNdijzpEhF1saPQZHVKb6m5loSAxB39gyrTYw34Qf9CQ3u1qQ==} engines: {node: '>=6.0.0'} hasBin: true + body-parser@2.4.0: + resolution: {integrity: sha512-Ifk1KcLrxaGt1occQagQNFNNOqRt1LFuehEnHHzB8Z6cRgIxRU1TBaiIsUiCdA+gy5PL7Y1IX31DNKkRmxtXjQ==} + engines: {node: '>=18'} + buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + bytes@3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + + call-bound@1.0.4: + resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} + engines: {node: '>= 0.4'} + caniuse-lite@1.0.30001826: resolution: {integrity: sha512-wTB+9tIbLro/BCXwLuNV1meHE4L9dS6dArMDwgYfNBPMYScqClHyGunhkCSDtHhe/69Xl0sHlKgBVZ+fNsYtWA==} client-only@0.0.1: resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} + content-disposition@2.0.1: + resolution: {integrity: sha512-e+H0ZXHSWYrENhQzw1LPuP4oF5MzVKmDU6d3hxlvaPEYLLg62MxtQNPRx4SYSuYJSBUgnQIG4HIN2tEtNv7Dog==} + engines: {node: '>=18'} + + content-type@1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + + content-type@2.1.0: + resolution: {integrity: sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==} + engines: {node: '>=18'} + + cookie-signature@1.2.2: + resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} + engines: {node: '>=6.6.0'} + + cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} + engines: {node: '>= 0.6'} + + cors@2.8.6: + resolution: {integrity: sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==} + engines: {node: '>= 0.10'} + + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + + depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + detect-libc@2.1.2: resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} engines: {node: '>=8'} @@ -1061,6 +1182,29 @@ packages: sqlite3: optional: true + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + + ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + + encodeurl@2.0.1: + resolution: {integrity: sha512-Ev/hIyePLZtpL98x562lvPtenrUfGr0lfaf44HFZ+hDEwso7ccV9QAZrEVLg0hxNAzygaAFxy2dYaAKKM0G06A==} + engines: {node: '>= 0.8'} + + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-object-atoms@1.1.2: + resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} + engines: {node: '>= 0.4'} + esbuild@0.18.20: resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} engines: {node: '>=12'} @@ -1076,19 +1220,150 @@ packages: engines: {node: '>=18'} hasBin: true + escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + + etag@1.8.1: + resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} + engines: {node: '>= 0.6'} + + eventsource-parser@3.1.1: + resolution: {integrity: sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ==} + engines: {node: '>=18.0.0'} + + eventsource@3.0.7: + resolution: {integrity: sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==} + engines: {node: '>=18.0.0'} + + express-rate-limit@8.7.4: + resolution: {integrity: sha512-LKBXzX700wz3zAGNNmVnjRI5mEbYkLv7UbMI4+9Xa+JPcg2UZh6AgY/2CZh9RrJjFM5ttC/N1lD+KzyFoZITCw==} + engines: {node: '>= 16'} + peerDependencies: + express: '>= 4.11' + + express@5.3.0: + resolution: {integrity: sha512-qCqy1xSoaugxOD4IVHb1ZWdkvCF2W3aE2okKouWj8VwJ+ztskSiXoBnCSJqfKT+cVPJhuJqe9YLbY425+Zh00g==} + engines: {node: '>= 18'} + + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-uri@3.1.9: + resolution: {integrity: sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==} + + finalhandler@2.1.1: + resolution: {integrity: sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==} + engines: {node: '>= 18.0.0'} + + forwarded@0.2.0: + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} + + fresh@2.0.0: + resolution: {integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==} + engines: {node: '>= 0.8'} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + get-tsconfig@4.14.3: resolution: {integrity: sha512-++QEw4DIY7WGoukz+/+A/8dGYPT9l9yIadnmSgZ8Rjr3YVSVDipQSO9CdnJo9ePqFqUUqh+wk9uIaoiAwsiPkA==} + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + + hasown@2.0.4: + resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} + engines: {node: '>= 0.4'} + + hono@4.13.18: + resolution: {integrity: sha512-H9q/E1XizaWstJxUW881dmLxEj+t/TrGGnyxINkm4+sK0qUwsMtFdo2BWI9Vs3cIS19MU6b6iCijoUoEf4f3DA==} + engines: {node: '>=16.9.0'} + + http-errors@2.0.1: + resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} + engines: {node: '>= 0.8'} + + iconv-lite@0.7.3: + resolution: {integrity: sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==} + engines: {node: '>=0.10.0'} + + inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + ip-address@10.7.6: + resolution: {integrity: sha512-00LYkM6byILa9eQIx6qoaXCM40xTLd56AZ4vyaPW3YTyb49VZYPo5xsiAq4tuQ54GH4R7gVdYScJ1B7B77PuTg==} + engines: {node: '>= 12'} + + ipaddr.js@1.9.1: + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} + + is-promise@4.0.0: + resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jose@6.2.17: + resolution: {integrity: sha512-wOuK9V1yujQFH5S0ZWmLcDZN7+IKh9bUCC2ZPCf2HDlol3WWHy+PPyNjEI75FXRLMp3vDKQcupP59xhVU95hcg==} + + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + + json-schema-typed@8.0.2: + resolution: {integrity: sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==} + + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + + media-typer@1.1.1: + resolution: {integrity: sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ==} + engines: {node: '>= 0.8'} + + merge-descriptors@2.0.0: + resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} + engines: {node: '>=18'} + + mime-db@1.54.0: + resolution: {integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==} + engines: {node: '>= 0.6'} + + mime-types@3.0.2: + resolution: {integrity: sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==} + engines: {node: '>=18'} + + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + nanoid@3.3.20: resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + negotiator@1.1.0: + resolution: {integrity: sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==} + engines: {node: '>=18'} + next@16.4.6: resolution: {integrity: sha512-QZJiYhaZLJMo2KpkQGQIwvmd79WVsAWeYIU554a8d7zArS3si/IRy3lBNV/rtYhE70oLwdLYhPAXLPx8HwcwtA==} engines: {node: '>=20.9.0'} @@ -1110,9 +1385,39 @@ packages: sass: optional: true + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + object-inspect@1.13.4: + resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} + engines: {node: '>= 0.4'} + + on-finished@2.4.2: + resolution: {integrity: sha512-ATWUv387i+nLD49EiDoOft5scf32Vsdz3ktrQJG9bi7jRFmaXTssvyvj1EmeKVVgvesbqUtvQQvaS2TpTukAZQ==} + engines: {node: '>= 0.8'} + + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + + parseurl@1.3.3: + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-to-regexp@8.4.2: + resolution: {integrity: sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + pkce-challenge@5.0.1: + resolution: {integrity: sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==} + engines: {node: '>=16.20.0'} + postcss@8.5.23: resolution: {integrity: sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg==} engines: {node: ^10 || ^12 || >=14} @@ -1121,6 +1426,22 @@ packages: resolution: {integrity: sha512-1kJDojqNZC+iTHHXh6eif0J98LUtyLAePe/qkW1GK35eh2JixlsAiIKq3FGI+xqI+SUGTNodzf7TScVeIIyUug==} engines: {node: '>=18'} + proxy-addr@2.0.8: + resolution: {integrity: sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==} + engines: {node: '>= 0.10'} + + qs@6.17.1: + resolution: {integrity: sha512-jd3COkaKVgGUW+ZHyEHCG9bH7RoaaiWuMgzsIBjUMVjLAaWGWpoUAVwljVvBHxRu/2qEHnadLGZrkutYUBPQJA==} + engines: {node: '>=0.6'} + + range-parser@1.3.0: + resolution: {integrity: sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw==} + engines: {node: '>= 0.6'} + + raw-body@3.0.2: + resolution: {integrity: sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==} + engines: {node: '>= 0.10'} + react-dom@19.3.1: resolution: {integrity: sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ==} peerDependencies: @@ -1130,9 +1451,20 @@ packages: resolution: {integrity: sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==} engines: {node: '>=0.10.0'} + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + resolve-pkg-maps@1.0.0: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + router@2.2.0: + resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==} + engines: {node: '>= 18'} + + safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + scheduler@0.28.0: resolution: {integrity: sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==} @@ -1141,6 +1473,17 @@ packages: engines: {node: '>=10'} hasBin: true + send@1.2.1: + resolution: {integrity: sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==} + engines: {node: '>= 18'} + + serve-static@2.2.1: + resolution: {integrity: sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==} + engines: {node: '>= 18'} + + setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + sharp@0.35.5: resolution: {integrity: sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g==} engines: {node: '>=20.9.0'} @@ -1150,6 +1493,30 @@ packages: '@types/node': optional: true + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + + side-channel-list@1.0.1: + resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} + engines: {node: '>= 0.4'} + + side-channel-map@1.0.1: + resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} + engines: {node: '>= 0.4'} + + side-channel-weakmap@1.0.2: + resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} + engines: {node: '>= 0.4'} + + side-channel@1.1.1: + resolution: {integrity: sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==} + engines: {node: '>= 0.4'} + source-map-js@1.2.2: resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} engines: {node: '>=0.10.0'} @@ -1161,6 +1528,10 @@ packages: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} + statuses@2.0.2: + resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} + engines: {node: '>= 0.8'} + styled-jsx@5.1.6: resolution: {integrity: sha512-qSVyDTeMotdvQYoHWLNGwRFJHC+i+ZvdBRYosOFgC+Wg1vx4frN2/RG/NA7SYqqvKNLf39P2LSRA2pu6n0XYZA==} engines: {node: '>= 12.0.0'} @@ -1174,6 +1545,10 @@ packages: babel-plugin-macros: optional: true + toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + tslib@2.9.1: resolution: {integrity: sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==} @@ -1182,6 +1557,10 @@ packages: engines: {node: '>=18.0.0'} hasBin: true + type-is@2.1.0: + resolution: {integrity: sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==} + engines: {node: '>= 18'} + typescript@6.0.3: resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} engines: {node: '>=14.17'} @@ -1190,6 +1569,27 @@ packages: undici-types@8.9.0: resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==} + unpipe@1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + + vary@1.1.2: + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} + + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + + zod-to-json-schema@3.25.2: + resolution: {integrity: sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==} + peerDependencies: + zod: ^3.25.28 || ^4 + zod@4.6.7: resolution: {integrity: sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==} @@ -1434,6 +1834,10 @@ snapshots: '@esbuild/win32-x64@0.28.2': optional: true + '@hono/node-server@2.1.7(hono@4.13.18)': + dependencies: + hono: 4.13.18 + '@img/colour@1.1.0': optional: true @@ -1541,6 +1945,28 @@ snapshots: '@img/sharp-win32-x64@0.35.5': optional: true + '@modelcontextprotocol/sdk@1.32.2(zod@4.6.7)': + dependencies: + '@hono/node-server': 2.1.7(hono@4.13.18) + ajv: 8.20.0 + ajv-formats: 3.0.1 + content-type: 1.0.5 + cors: 2.8.6 + cross-spawn: 7.0.6 + eventsource: 3.0.7 + eventsource-parser: 3.1.1 + express: 5.3.0 + express-rate-limit: 8.7.4(express@5.3.0) + hono: 4.13.18 + jose: 6.2.17 + json-schema-typed: 8.0.2 + pkce-challenge: 5.0.1 + raw-body: 3.0.2 + zod: 4.6.7 + zod-to-json-schema: 3.25.2(zod@4.6.7) + transitivePeerDependencies: + - supports-color + '@next/env@16.4.6': {} '@next/swc-darwin-arm64@16.4.6': @@ -1583,16 +2009,85 @@ snapshots: dependencies: csstype: 3.2.3 + accepts@2.0.0: + dependencies: + mime-types: 3.0.2 + negotiator: 1.1.0 + + ajv-formats@3.0.1: + dependencies: + ajv: 8.20.0 + + ajv@8.20.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.9 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + baseline-browser-mapping@2.11.35: {} + body-parser@2.4.0: + dependencies: + bytes: 3.1.2 + content-type: 2.1.0 + debug: 4.4.3 + http-errors: 2.0.1 + iconv-lite: 0.7.3 + on-finished: 2.4.2 + qs: 6.17.1 + raw-body: 3.0.2 + type-is: 2.1.0 + transitivePeerDependencies: + - supports-color + buffer-from@1.1.2: {} + bytes@3.1.2: {} + + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + caniuse-lite@1.0.30001826: {} client-only@0.0.1: {} + content-disposition@2.0.1: {} + + content-type@1.0.5: {} + + content-type@2.1.0: {} + + cookie-signature@1.2.2: {} + + cookie@0.7.2: {} + + cors@2.8.6: + dependencies: + object-assign: 4.1.1 + vary: 1.1.2 + + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + csstype@3.2.3: {} + debug@4.4.3: + dependencies: + ms: 2.1.3 + + depd@2.0.0: {} + detect-libc@2.1.2: optional: true @@ -1607,6 +2102,24 @@ snapshots: optionalDependencies: postgres: 4.1.1 + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + + ee-first@1.1.1: {} + + encodeurl@2.0.1: {} + + es-define-property@1.0.1: {} + + es-errors@1.3.0: {} + + es-object-atoms@1.1.2: + dependencies: + es-errors: 1.3.0 + esbuild@0.18.20: optionalDependencies: '@esbuild/android-arm': 0.18.20 @@ -1690,15 +2203,161 @@ snapshots: '@esbuild/win32-ia32': 0.28.2 '@esbuild/win32-x64': 0.28.2 + escape-html@1.0.3: {} + + etag@1.8.1: {} + + eventsource-parser@3.1.1: {} + + eventsource@3.0.7: + dependencies: + eventsource-parser: 3.1.1 + + express-rate-limit@8.7.4(express@5.3.0): + dependencies: + debug: 4.4.3 + express: 5.3.0 + ip-address: 10.7.6 + transitivePeerDependencies: + - supports-color + + express@5.3.0: + dependencies: + accepts: 2.0.0 + body-parser: 2.4.0 + content-disposition: 2.0.1 + content-type: 2.1.0 + cookie: 0.7.2 + cookie-signature: 1.2.2 + debug: 4.4.3 + depd: 2.0.0 + encodeurl: 2.0.1 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 2.1.1 + fresh: 2.0.0 + http-errors: 2.0.1 + merge-descriptors: 2.0.0 + mime-types: 3.0.2 + on-finished: 2.4.2 + once: 1.4.0 + parseurl: 1.3.3 + proxy-addr: 2.0.8 + qs: 6.17.1 + range-parser: 1.3.0 + router: 2.2.0 + send: 1.2.1 + serve-static: 2.2.1 + statuses: 2.0.2 + type-is: 2.1.0 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + + fast-deep-equal@3.1.3: {} + + fast-uri@3.1.9: {} + + finalhandler@2.1.1: + dependencies: + debug: 4.4.3 + encodeurl: 2.0.1 + escape-html: 1.0.3 + on-finished: 2.4.2 + parseurl: 1.3.3 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + + forwarded@0.2.0: {} + + fresh@2.0.0: {} + fsevents@2.3.3: optional: true + function-bind@1.1.2: {} + + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.2 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.4 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.2 + get-tsconfig@4.14.3: dependencies: resolve-pkg-maps: 1.0.0 + gopd@1.2.0: {} + + has-symbols@1.1.0: {} + + hasown@2.0.4: + dependencies: + function-bind: 1.1.2 + + hono@4.13.18: {} + + http-errors@2.0.1: + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.2 + toidentifier: 1.0.1 + + iconv-lite@0.7.3: + dependencies: + safer-buffer: 2.1.2 + + inherits@2.0.4: {} + + ip-address@10.7.6: {} + + ipaddr.js@1.9.1: {} + + is-promise@4.0.0: {} + + isexe@2.0.0: {} + + jose@6.2.17: {} + + json-schema-traverse@1.0.0: {} + + json-schema-typed@8.0.2: {} + + math-intrinsics@1.1.0: {} + + media-typer@1.1.1: {} + + merge-descriptors@2.0.0: {} + + mime-db@1.54.0: {} + + mime-types@3.0.2: + dependencies: + mime-db: 1.54.0 + + ms@2.1.3: {} + nanoid@3.3.20: {} + negotiator@1.1.0: + dependencies: + content-type: 2.1.0 + next@16.4.6(@types/node@26.6.6)(react-dom@19.3.1(react@19.3.1))(react@19.3.1): dependencies: '@next/env': 16.4.6 @@ -1724,8 +2383,28 @@ snapshots: - '@types/node' - babel-plugin-macros + object-assign@4.1.1: {} + + object-inspect@1.13.4: {} + + on-finished@2.4.2: + dependencies: + ee-first: 1.1.1 + + once@1.4.0: + dependencies: + wrappy: 1.0.2 + + parseurl@1.3.3: {} + + path-key@3.1.1: {} + + path-to-regexp@8.4.2: {} + picocolors@1.1.1: {} + pkce-challenge@5.0.1: {} + postcss@8.5.23: dependencies: nanoid: 3.3.20 @@ -1734,6 +2413,25 @@ snapshots: postgres@4.1.1: {} + proxy-addr@2.0.8: + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + + qs@6.17.1: + dependencies: + es-define-property: 1.0.1 + side-channel: 1.1.1 + + range-parser@1.3.0: {} + + raw-body@3.0.2: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.1 + iconv-lite: 0.7.3 + unpipe: 1.0.0 + react-dom@19.3.1(react@19.3.1): dependencies: react: 19.3.1 @@ -1741,13 +2439,54 @@ snapshots: react@19.3.1: {} + require-from-string@2.0.2: {} + resolve-pkg-maps@1.0.0: {} + router@2.2.0: + dependencies: + debug: 4.4.3 + depd: 2.0.0 + is-promise: 4.0.0 + parseurl: 1.3.3 + path-to-regexp: 8.4.2 + transitivePeerDependencies: + - supports-color + + safer-buffer@2.1.2: {} + scheduler@0.28.0: {} semver@7.8.6: optional: true + send@1.2.1: + dependencies: + debug: 4.4.3 + encodeurl: 2.0.1 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 2.0.0 + http-errors: 2.0.1 + mime-types: 3.0.2 + ms: 2.1.3 + on-finished: 2.4.2 + range-parser: 1.3.0 + statuses: 2.0.2 + transitivePeerDependencies: + - supports-color + + serve-static@2.2.1: + dependencies: + encodeurl: 2.0.1 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 1.2.1 + transitivePeerDependencies: + - supports-color + + setprototypeof@1.2.0: {} + sharp@0.35.5(@types/node@26.6.6): dependencies: '@img/colour': 1.1.0 @@ -1782,6 +2521,40 @@ snapshots: '@types/node': 26.6.6 optional: true + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + + side-channel-list@1.0.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 + + side-channel@1.1.1: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.1 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + source-map-js@1.2.2: {} source-map-support@0.5.21: @@ -1791,11 +2564,15 @@ snapshots: source-map@0.6.1: {} + statuses@2.0.2: {} + styled-jsx@5.1.6(react@19.3.1): dependencies: client-only: 0.0.1 react: 19.3.1 + toidentifier@1.0.1: {} + tslib@2.9.1: {} tsx@4.23.15: @@ -1804,8 +2581,28 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + type-is@2.1.0: + dependencies: + content-type: 2.1.0 + media-typer: 1.1.1 + mime-types: 3.0.2 + typescript@6.0.3: {} undici-types@8.9.0: {} + unpipe@1.0.0: {} + + vary@1.1.2: {} + + which@2.0.2: + dependencies: + isexe: 2.0.0 + + wrappy@1.0.2: {} + + zod-to-json-schema@3.25.2(zod@4.6.7): + dependencies: + zod: 4.6.7 + zod@4.6.7: {} diff --git a/scripts/bootstrap-project.sh b/scripts/bootstrap-project.sh index db474f89..c3807cae 100755 --- a/scripts/bootstrap-project.sh +++ b/scripts/bootstrap-project.sh @@ -35,4 +35,5 @@ git -c user.name="Peppa" -c user.email="peppa@localhost" commit -qm "Bootstrap $ git remote add origin "$REMOTE" git push -q -u origin main git remote set-url origin "$GITEA_URL/$OWNER/$SLUG.git" +"$ROOT/packages/cli/bin/peppa" project add "$SLUG" "$KEY" "$NAME" --owner "$OWNER" --path "$DEST" echo "ready: $DEST ($GITEA_URL/$OWNER/$SLUG)" diff --git a/scripts/install-bins.sh b/scripts/install-bins.sh new file mode 100755 index 00000000..df71ea0d --- /dev/null +++ b/scripts/install-bins.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# Symlinks Peppa's CLIs (peppa, peppa-mcp, later peppa-hook) into ~/.local/bin. +set -euo pipefail +ROOT="$(cd "$(dirname "$0")/.." && pwd)" +BIN="${PEPPA_BIN_DIR:-$HOME/.local/bin}" +mkdir -p "$BIN" +for f in "$ROOT"/packages/*/bin/*; do + ln -sf "$f" "$BIN/$(basename "$f")" + echo "linked $BIN/$(basename "$f")" +done