- 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>
- tsconfig: erasableSyntaxOnly + verbatimModuleSyntax; parameter properties
rewritten (BugsinkError, GiteaError, GiteaClient, OAuthError, TelegramError,
TelegramApi, MockGitea)
- bin wrappers (peppa, peppa-mcp, peppa-hook, peppa-bot, testkit mocks,
peppa-dev): `node --import scripts/lib/require-node.mjs` (clear error on
Node < 26, PEPPA_NODE overrides the binary); package scripts and tests on
`node` / `node --test`; tsx removed
- install-launchd.sh pins PEPPA_NODE (checked absolute path) in the plists
- fix a race the faster hooks exposed: the prompt hook answered every pending
question, including a PM question raised after Peppa itself pasted text
into the terminal; sendToSession now logs `input_sent` and the hook only
answers questions older than that input
- change pep-36-lightweight-stack: stage 1 done, hook start numbers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
- 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>
- users.telegram_* replace the single global binding; one-time /start code
per user (web Settings → Telegram, or peppa telegram pair <login>);
a chat belongs to one user
- agent questions go to the project's owner and members who paired; an
answer (button or reply) is accepted only from someone with access to
the project; messages are closed for every recipient; /status is scoped
- CLI: telegram pair|status|unpair <login>, user ensure mock-<name>;
dev stand pairs its test PM per user
- tests: several-users journey (bob without access, then as a member);
70 e2e total, green
- BREAKING: the old global binding is removed; users pair again in Settings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- platform.allowed_logins (default asel, 7601978, dana): allowlisted logins,
project invitees and members, and local CLI accounts may log in
- enforced in the Gitea OAuth callback, on every web request (removal takes
effect at once) and on every remote MCP request (401)
- CLI: peppa platform allowlist | allow <login> | deny <login>
- tests: one per spec scenario (69 e2e total, green)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
- project_members / project_invites; owner adds people by Gitea login,
invitations are applied at first login; members get the owner's access
except member management; a member can leave
- access everywhere via projectForUser / userProjectIds (owner or member):
web inbox, sessions, project pages, MCP
- shareProject / unshareProject: login checked in Gitea, repo collaborator
(write) added by the owner's client or peppa-bot; missing admin rights
don't block membership (repoAccess flag)
- web: Members block on the project page, 'shared' badge; MCP:
list_members, add_member, remove_member; Help updated
- tests: 5 sharing journeys on mock-gitea (64 e2e total, green); test DB
now also clears users and OAuth clients between files
- OpenSpec: pep-12 archived (project-sharing, web-auth)
Co-Authored-By: Claude <noreply@anthropic.com>
- MCP: create_goal, update_goal (title, description, open/done/archived),
create_project (same provisioning as the web, as the user), update_task
goal_id (move between goals / detach); server instructions explain the
project → goals → tasks → board model and good habits
- web: /help — concepts, connecting ChatGPT/Codex/other MCP clients,
scenarios with example phrases, tool reference; links in menu/settings
- PEPPA_TEMPLATE_URL override for provisioning (tests)
- 3 new tests (59 e2e total, green); prod tools/list and /help verified
- OpenSpec: pep-14 archived (remote-mcp, web-workspace)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Settings → Claude: Peppa runs 'claude setup-token' in tmux, shows the
claude.com sign-in link, the user pastes the code into the form; the
1-year token is stored encrypted on the user (users.claude_token_enc)
- Claude sessions of the owner's projects get CLAUDE_CODE_OAUTH_TOKEN;
projects without an owner token keep using the machine login
- disconnect / reconnect; setup times out after 10 min and its tmux
session (and scrollback with the token) is killed right after saving
- mock-claude setup-token; 2 new tests (56 e2e total, green)
- verified on prod: the button yields the real claude.com authorize URL
- OpenSpec: pep-13 archived into spec agent-credentials
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
- bot: own Bot API client, long polling with persisted offset, updates
claimed before acting (no replay after restart), outbox with retries
(429 retry_after, 5xx), /start pairing code (hashed, single use, 10 min),
only the paired chat/user is served
- PM questions rendered per kind: approve button / reply to reject,
option buttons, allow/always/deny, alerts with continue or resume/stop;
messages are closed with who answered what, incl. terminal answers
- stopping/resuming a session expires its open questions
- CLI: peppa telegram pair|status|unpair; launchd agent for the bot
- testkit: mock-telegram + 11 bot journeys (32 e2e tests, all green)
- fix: keep the tmux server alive when empty (exit-empty off) — a new
session could die with a server shutting down after the last kill
- fix: test env must load before runner modules (no leaks to real tmux)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>