- PEP-30: .peppa/memory.md in the project repo (core/memory.ts), agent MCP get_memory/remember (dedupe, 12k size limit, replace to compact), runner appends memory + last finished stories to the launch rules, RULES.md rule, memory on the project «Спеки» tab. - PEP-41: agent settings platform → project → story (provider, model, effort, escalation model after N failures, fallback provider); Claude --effort / Codex model_reasoning_effort; sticky escalation relaunches a live runner on the stronger model (sendWithEscalation from CI feedback and the reviewer); fallback provider when the main one has no working subscription; web panels, MCP PM `agent`, CLI `peppa project agent`. - PEP-31: first-run checklist on the home page (core/onboarding.ts), hide button, «Агенты не запустятся» warning on the project page when its pool has no working subscription. No migrations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
2.2 KiB
TypeScript
34 lines
2.2 KiB
TypeScript
import { listUserProjects, onboardingChecklist } from "@peppa/core";
|
||
import { OnboardingChecklist } from "@/components/Onboarding";
|
||
import { LiveRefresh } from "@/components/LiveRefresh";
|
||
import { ActivityAside } from "@/components/ActivityAside";
|
||
import { ProjectList, QuestionCard, SessionCard } from "@/components/cards";
|
||
import { Empty, Flash, MoreLink, PageHeader, Section } from "@/components/common";
|
||
import { Workspace } from "@/components/Workspace";
|
||
import { requireUser } from "@/lib/auth";
|
||
import { db } from "@/lib/db";
|
||
import { activeSessions, inbox } from "@/lib/queries";
|
||
|
||
export default async function Home({ searchParams }: { searchParams: Promise<{ error?: string }> }) {
|
||
const user = await requireUser();
|
||
const { error } = await searchParams;
|
||
const [items, sessions, projects, onboarding] = await Promise.all([inbox(user.id), activeSessions(user.id), listUserProjects(db, user.id), onboardingChecklist(db, user)]);
|
||
return (
|
||
<Workspace aside={<ActivityAside questions={false} />}>
|
||
<LiveRefresh scope="home" />
|
||
<Flash error={error} />
|
||
<PageHeader title="Главная">{items.length ? "Агенты ждут твоего решения — ответь здесь, в Telegram или через MCP." : "Всё идёт само: агентам от тебя ничего не нужно."}</PageHeader>
|
||
{onboarding.visible && <OnboardingChecklist data={onboarding} />}
|
||
<Section title="Вопросы агентов" count={items.length}>
|
||
{items.length === 0 ? <Empty>Агентам от тебя ничего не нужно.</Empty> : items.map((q) => <QuestionCard key={q.id} q={q} taskKey={q.taskKey} taskStatus={q.taskStatus} back="/" />)}
|
||
</Section>
|
||
<Section title="Активные раннеры" actions={<MoreLink href="/runners">все раннеры</MoreLink>}>
|
||
{sessions.length === 0 ? <Empty>Сейчас ничего не запущено.</Empty> : sessions.map((s) => <SessionCard key={s.id} s={s} back="/" showTitle />)}
|
||
</Section>
|
||
<Section title="Мои проекты" actions={<MoreLink href="/projects">все проекты</MoreLink>}>
|
||
<ProjectList projects={projects} userId={user.id} />
|
||
</Section>
|
||
</Workspace>
|
||
);
|
||
}
|