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>
- permission dialog menus vary (3-4 items, "2" may be "switch to auto mode"): the late PM answer
reads the key off the screen (permissionKey); after "No" Claude interrupts the turn without a
Stop hook, so Peppa types PERMISSION_DENIED_NOTE
- statusLine total_*_tokens are the last request, not session totals: tokens only from transcript
- mcp__peppa allowed in run settings (connected repos have no template .claude/settings.json)
- peppa-hook: PEPPA_HOOK_CAPTURE_DIR saves raw payloads; live fixtures in testkit/fixtures/claude-live
- mock-claude follows the live contract (menu, interrupt on No, statusLine, transcript blocks, suggestions)
- peppa-dev: watchdog (runner service) on the stand, mock PEPPA_SECRET without .env
- e2e claude-live.test.ts: fixtures parsing, real peppa-hook on live payloads, terminal fallback keys
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
- 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>
- 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>
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>
- 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>
- 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>
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>
- scripts/peppa-release.sh: ~/peppa/{repo.git,releases/<sha>,current,shared/.env};
install → next build → checked DB backup → migrate → switch current → kickstart →
health (/api/health commit + fresh heartbeats) → rollback; --queue, --check, --no-restart
- runner/platform-release.ts: deployProd for the platform project (PEPPA_PLATFORM_KEY=PEP)
queues a request for launchd quest.telecom.peppa.release; offer after green main
- CLI: peppa db backup [file], peppa release report; backupDb verifies the copy
- install-launchd.sh: wait for unload after bootout (no "Bootstrap failed: 5"),
release agent (QueueDirectories), PEPPA_ROOT in agents
- bin wrappers: logical root so hooks/credential.helper point at ~/peppa/current
- mock-launchctl, mock-pnpm; e2e platform-release.test.ts; OpenSpec pep-18-peppa-prod
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- packages/db: schema on sqlite-core (timestamps as epoch ms → Date, JSON as text,
booleans 0/1), one baseline migration; node:sqlite client under drizzle's
better-sqlite3 session (busy_timeout first, WAL, BEGIN IMMEDIATE, retries on
SQLITE_BUSY, lazy open, async transaction callbacks refused); PEPPA_DB
(default ~/.peppa/peppa.db)
- live updates: notify() pokes the bot over a unix socket; the bot also watches
PRAGMA data_version every second (writes by other processes)
- Postgres specifics ported: createTask transaction is synchronous, no
`for update skip locked`, `count(*)`, json_extract instead of ->>, json_each
instead of @>
- `peppa db migrate` and `peppa db migrate-to-sqlite <file>` (read-only
snapshot of Postgres, FK order from the schema, row count + foreign key
checks, file appears only when they pass); old Postgres schema kept in
packages/cli/legacy-pg-migrations for the migration and its test
- daily VACUUM INTO backup from the watchdog (7 copies, admin alert on failure)
- tests: a temp SQLite file per test file; storage.test.ts (20 processes,
per-project numbering across processes, socket/data_version, migration from
Postgres incl. a dangling foreign key, backups); two test races fixed
- CI: no per-run Postgres database; PEPPA_TEST_PG only for the migration test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>