Commit Graph

35 Commits

Author SHA1 Message Date
Асель
a1b3760afd PEP-72: eGov sign-in on the phone itself through the deep link
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 18:15:34 +05:00
Асель
57d7857d94 PEP-71: login only through eGov, unknown IIN registers an account
Gitea and password login are gone from the web; the first eGov login creates a
Peppa account (login from the certificate name). Projects of self-registered
owners run agents only on a subscription pool, never on the machine login.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 17:57:02 +05:00
Асель
7a4988ec89 PEP-70: pug face back, the terminal prompt glows on the belly
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 16:30:46 +05:00
Асель
06b3501427 PEP-70: clay-style chibi pug with a terminal-screen face
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 16:29:34 +05:00
Асель
5f1b1b4212 PEP-70: pug mascot next to the agents' questions
Cartoon pug (inline SVG) on Home: sleeps when nothing waits, perks up with
a speech bubble and question count when agents ask. Motion only without
prefers-reduced-motion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 16:27:14 +05:00
Асель
ca57f9543b PEP-17/40: agent sandbox per runner (docker + agent relay) and runner hosts over SSH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 07:57:28 +05:00
Асель
53ac7efdcc PEP-30/41/31: project memory, agent model per story with escalation, first-run checklist
- 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>
2026-11-14 07:44:24 +05:00
Асель
9149c75840 PEP-19/54: project secrets for agents, secrets audit and two-key PEPPA_SECRET rotation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 07:19:57 +05:00
Асель
14916079bc PEP-5/43/47/48: usage and limits, story budgets, factory metrics, audit journal
- PEP-5: statusLine hook (cost, context, 5h/7d limit windows), transcript tokens,
  sessions.usage, usage strip over every page, runner usage, bot /status, MCP get_usage
- PEP-43: project/story budgets in settings, watchdog pause (Escape, question to the PM:
  extend x2 / remove limit / stop), start/resume guard, budget on the story card
- PEP-47: project metrics tab (cycle time, first pass, review returns, questions, runner
  hours, PM wait, limits, spend by week/agent/epic), MCP get_metrics
- PEP-48: event authors (actor columns, AsyncLocalStorage context), question_answered,
  /journal for superadmins, project journal tab, authors in the story feed
- Migration 0007_usage_audit; OpenSpec changes archived

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 06:52:13 +05:00
Асель
6b75324971 PEP-10/27/53: runners with a story queue, a git worktree per runner, free runners
- Runner settings with inheritance system → project → story (settings rows):
  mode story (default, one runner per story) / queue, context fresh / continue,
  workspace shared / worktree, maxRunners. No rows = behaviour as before.
- runner_tasks: a runner's story history and queue; sessions.name, sessions.workspace_path
  (migration 0007_runners).
- moveTask → startTaskOnRunner; runnerTick in the watchdog moves free queue runners to
  their next story (fresh: same tmux, new generation without resume; continue: message),
  reassigns queues of dead runners, removes finished runners' worktrees (clean + pushed).
- Free runners («Новый терминал»), rename, «Оформить стори»; the Stop hook doesn't ping
  for free runners or stories that left work.
- Web: «Новый терминал» (runners page, project sessions tab) with voice input,
  project/story runner settings, runner stories in the details panel; CLI peppa runner …
- e2e: packages/testkit/test/runners.test.ts

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 06:38:02 +05:00
Асель
5a8948d01e PEP-52: command palette ⌘K, keyboard shortcuts, /help/shortcuts; help for board order, dependencies, planner
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 06:29:00 +05:00
Асель
3b86c00768 PEP-34/42: web — board drag order, collapsed Done, epic progress, archive, dependencies, plan page
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 06:29:00 +05:00
Асель
6ab17456af PEP-44, PEP-46: review preview with screenshots; Gitea issues, PR comments, manual merge
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 06:06:57 +05:00
Асель
4a80d9dc6b PEP-32/33/37: story page tabs, live agent step feed, SSE live updates instead of 5 s polling
- PEP-37: change hub (runner/live.ts) woken by notify() (new 'web' subscriber) and
  PRAGMA data_version; per-scope fingerprints; GET /api/live SSE (no-transform, ping 15 s);
  LiveRefresh replaces AutoRefresh with a connection indicator and polling fallback
- PEP-33: async PostToolUse/PostToolUseFailure hook -> 'step' events (last 200 per
  session), AgentSteps live feed on the story page and runner panel, tasks.md progress
  on board cards and the story header
- PEP-32: story page header + tabs Proposal/Design/Specs/Tasks/Comments/Tests/Merge
  request/Activity, safe Markdown renderer, PM comments visible in get_task, edit
  title/description/epic, accept-and-merge (acceptStory)
- OpenSpec changes archived; specs live-updates, agent-steps, story-page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 05:59:15 +05:00
Асель
c7283063c9 PEP-39: rotate a limited session to a free subscription of the pool at the turn boundary
Limit marks the subscription «лимит до …»; the watchdog relaunches the session on another
usable subscription of the same provider (Claude/OpenCode resume the conversation, Codex
starts afresh), threshold banner switches after the turn, max 3 switches/hour, simple
fairness between projects, subscription_switched events + Telegram message, web shows
subscription and switch history. Migration 0004 (sessions.rotate_reason).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 05:31:22 +05:00
Асель
f284c40933 PEP-23/24/25: project autonomy levels, backlog dispatcher with idle pushes, auto-merge and closing, working copy sync
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 05:20:47 +05:00
Асель
9f9358de2c PEP-29/35/55: web — Settings → Notifications, Web Push in the browser (sw.js, PWA manifest), tab counter and sound; help, AGENTS.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 05:10:20 +05:00
Асель
09d2750d75 PEP-9: live runner terminal in the web — xterm.js over SSE, input via POST
- runner/terminal.ts: TerminalFeed polls the pane (capture-pane -e, one loop per runner
  shared by viewers), sends changed lines, scrolled-off lines and the cursor; terminalInput
  (send-keys -H / paste-buffer -p) with access, liveness, size and rate checks, resets
  auto_nudges, logs terminal_input; terminalSse with 15 s pings for Cloudflare
- web: GET/POST /api/runners/[id]/terminal, RunnerTerminal (xterm.js) in the runner panel
  and on the story page; help
- testkit: terminal.test.ts — real tmux into a headless xterm, history, input, access, limits, SSE
- OpenSpec change archived; new spec runner-terminal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 04:45:32 +05:00
Асель
6116b47403 PEP-67: web — superadmin «Подписки» section, project pool, subscription choice at launch, subscription in Runners; Settings → Claude removed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 03:48:34 +05:00
Асель
358fb5c0e9 PEP-66: «стори» and «эпики» in web, bot, notifications, MCP texts, help; tab tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 03:28:42 +05:00
Асель
328900e254 PEP-66: epics (goals as story labels), tabs Код/Спеки/PR, bug settings in ⋯
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 03:28:34 +05:00
Асель
414e4500e4 PEP-68: local users without Gitea — password login, superadmin management
- users.password_hash/password_set_at/disabled_at (migration 0002_local_users)
- core/local-users.ts: scrypt, passwordLogin with attempt limits, create/reset/disable
- isSuperadmin(db, user) = platform.admins; isUserAllowed honours disabled_at
- web: /auth/password + login form, /users for superadmins, Settings → password
- Gitea login with a local user's login is refused (giteaLoginRefusal)
- local users: projects in peppa-bot namespace, members without Gitea collaboration
- CLI: peppa user add|passwd|disable|enable; tests in testkit

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 03:20:21 +05:00
Асель
ed49767c31 PEP-65: eGov QR login through the KazEDS relay (sign.aitu.uz)
Login page and Settings → eGov: relay session with a server-side challenge/nonce, QR + eGov Mobile
deep link, polling, one-shot completion; IIN from the signer's certificate (own DER reader),
users.egov_iin. The relay is trusted (PM decision): no own XMLDSig check. CLI peppa user egov,
mock-kazeds-relay, tests. Dev mode: /_next/static is no-store (Cloudflare cached stale chunks).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 01:14:10 +05:00
Асель
b517072362 UI: stories only — goals removed from the web (project page, board cards, task page)
Goals stay in the DB and MCP for now (agent context, Bugsink); PEP-66 turns them into epic labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 00:44:55 +05:00
Асель
5df52468c3 UI: project tabs (Доска · Релизы · Баги · Сессии), «+ Стори» dialog, goals into ⋯ settings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 23:21:32 +05:00
Асель
52d861bbc7 UI: board in one row, project panel moved into a ⋯ settings dialog
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 22:52:53 +05:00
Асель
d3a54fc845 PEP-38: runners console — filter counters, search, limit resume time, details panel
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:40:27 +05:00
Асель
c03b679a1d PEP-38: all pages on the console components, globals.css removed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:21:44 +05:00
Асель
28fbde4add PEP-38: console foundation — Tailwind v4, shadcn/ui components, dark theme, three-panel layout
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 16:21:43 +05:00
Асель
498013472f PEP-58: Bugsink — production errors become Peppa incidents and tasks
- infra: Bugsink 2.6.3 in docker (infra/bugsink, scripts/bugsink-up.sh), database
  bugsink in Peppa's Postgres, Traefik route bugsink.telecom.quest
- packages/bugsink: REST API client + custom-webhook payload parsing
- incidents (migration 0011): incident_settings, error_sources, incidents; ingest from
  webhook POST /api/hooks/bugsink/<secret> and a 2-minute poll in the watchdog
- incident policy per project: notify / backlog (default) / start / ask (Telegram
  buttons) / triage (claude -p with the owner's token, falls back to ask)
- daily task cap, environments, ignore pattern; manual "fixed" until PEP-57;
  REGRESSED returns the task to the backlog
- web «Ошибки» section, bot buttons, MCP tools for agents and the PM, help, RULES.md
- testkit: mock-bugsink, mock-triage, incidents.test.ts (one test per scenario,
  plus a live run against the real Bugsink with PEPPA_LIVE_BUGSINK=1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:31:32 +05:00
Асель
c24b9b83be PEP-15: where the project's repo is in Gitea — link, visibility, namespace
- New project form: namespace (personal/org) and visibility (private/public) with hints
- provisionProject creates the repo with the chosen visibility (existing repo keeps its own)
- After creation: notice with "Открыть в Gitea"; project page "Репозиторий" block:
  path, namespace kind, visibility, who can see it (read live from Gitea, cached 60 s)
- Members without repo access are marked; owner can grant access to all members
- MCP create_project takes visibility and returns repo URL + who sees it; list_projects shows URLs
- CLI --public, /help, mock-gitea (visibility, /orgs, collaborators), e2e repo-visibility

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:12:07 +05:00
Асель
412f5f05ce PEP-61: top menu — Home instead of Inbox, Runners and Projects pages
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 14:02:37 +05:00
Асель
ead62e2c5f PEP-59: version and commit in the web footer; plans for PEP-60, PEP-61
- root package.json carries the Peppa version (0.15.0); next.config.ts
  stamps version, short/full commit, commit date and a dirty flag at build
- Footer on every app page and on the login page, commit linked to Gitea
- OpenSpec: pep-59 archived (web-workspace); new planned changes
  pep-60-platform-channel-digest (Telegram channel of the platform,
  releases/restarts/digests, superadmin settings) and pep-61-top-menu
  (Home instead of Inbox, Runners and Projects pages)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 03:24:08 +05:00
Асель
00c8f79a36 PEP-7: autonomous mode — board moves start agents, PM only for stoppers
- web board (Backlog / In progress / Review / Done) with drag-and-drop and
  buttons; moveTask starts an agent on In progress, stops on Backlog/Done
- routine proposals go straight to apply; request_approval/ask_pm only for
  architectural stoppers (RULES.md, MCP hints, template pushed to Gitea)
- Stop hook keeps the agent going (decision: block, max 2 in a row,
  sessions.auto_nudges reset by a human answer) instead of pinging the PM
- review: ready-for-review message with Accept (acceptTask → done, session
  stopped) in Telegram and web; a text reply goes back to the agent
- mock-claude honours Stop-hook block; 6 new e2e tests (48 total, green)
- OpenSpec: pep-7 archived (task-autonomy, web-workspace board)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 21:21:11 +05:00
Асель
2b0f2fd984 PEP-1: web platform with Gitea login, projects, goals, tasks, sessions
- web: Gitea OAuth2 login, signed session cookie, everything behind login;
  inbox with answers, project board (goals → tasks), task page with
  OpenSpec artifacts, questions and session controls; new project form;
  auto-refresh, light/dark, mobile
- users + projects.owner_id; tokens AES-256-GCM encrypted; owner-only access
- provisionProject (runner): new or existing Gitea repo, peppa-bot
  collaborator, template + openspec init, push, rollback; used by web and
  peppa project create (replaces scripts/bootstrap-project.sh)
- peppa web login-link, peppa project owner; Gitea OAuth app script
- bins/template resolved via PEPPA_ROOT (works inside the Next build)
- testkit: mock-gitea + 10 tests (42 e2e total, all green)
- OpenSpec: pep-1-web-platform archived into specs web-auth,
  project-provisioning, web-workspace

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-12 20:55:02 +05:00