Johan LEROY
7f42743fce
feat: cookie Secure conditionnel + sous-commande d'installation de service
...
CI / Build & test (Node 24) (push) Has been cancelled
CI / Pack & boot smoke (Node 22) (push) Has been cancelled
CI / Build & test (Node 22) (push) Has been cancelled
Cookie: routes/auth.ts pose `secure` sur le cookie de session quand la requête
arrive en HTTPS (x-forwarded-proto), sans trustProxy — durcit le cookie derrière
Tailscale Serve sans casser le localhost http.
Install: nouveau cli/install.ts + routeur de sous-commandes dans index.ts
(install/uninstall/status/serve). Service utilisateur systemd (Linux) ou launchd
(macOS), bootstrap du token, --dry-run/--no-enable. Rétrocompat stricte du daemon
par défaut (runDaemon extrait).
Tests: app.e2e (cookie Secure local vs HTTPS) + cli-install (fonctions pures).
203/203 verts, acceptation P1/P4 vertes.
Docs: README.md + README.fr.md (installeur multi-OS, distinction utiliser/cloner,
modèle de sécurité durci).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-17 16:17:08 +02:00
Johan LEROY
c177eeea07
P2: découverte & reprise des sessions Claude
...
Arboretum découvre désormais toutes les sessions Claude de la machine
(scan ~/.claude/projects + registre ~/.claude/sessions), distingue
vivantes/mortes par pid+procStart, et permet de reprendre une morte
(--resume dans son cwd d'origine) ou forker une vivante sans la corrompre.
- shared: SessionSummary enrichi (source, claudeSessionId, pid, resumable,
attachable, registryStatus) — additif, PROTOCOL_VERSION inchangé ;
types REST resume/fork.
- db: migration id:2 (claude_session_id, resumed_from).
- core: jsonl-discovery (parseur tolérant, scan asynchrone non bloquant),
session-registry (vivacité pid+procStart), discovery-service (cache +
refresh périodique + diff/broadcast), pty-manager (resume/fork + capture
du claudeSessionId via le registre).
- routes: /sessions/:id/resume (garde-fou 409 anti-corruption sur session
vivante) et /fork ; GET fusionné managées + découvertes ; relais WS.
- web: badges managed/discovered + busy/idle/waiting, actions conditionnelles
(Open/Observe/Kill vs Fork/View vs Resume/Fork), vue read-only des sessions
externes, i18n EN/FR.
- tests: jsonl-discovery, session-registry, discovery-service + resume/fork
(130 verts) ; acceptation E2E acceptance-p2.mjs (sans quota) ALL GREEN.
Conforme aux verdicts S1 (resume dans cwd d'origine, vivacité pid+procStart)
et S4 (munge cwd, parseur tête+queue, priorité de titre).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com >
2026-06-12 18:20:21 +02:00
Johan LEROY
f6f73329b9
P1 spine: monorepo, shared WS protocol, server daemon
...
- npm workspaces (shared / server / web), TS strict, project refs
- @arboretum/shared: multiplexed WS protocol (JSON control + binary
output frames: 1B type + u32le channel), flow-control constants
(ACK 256K, HIGH 384K, LOW 128K, lagging 2M), REST types
- git-arboretum server: Fastify 5 + node:sqlite (single native dep:
node-pty prebuilt), token auth (sha256 at rest, HMAC cookie, global
login rate limit + backoff), strict Origin check on /api and /ws,
PtyManager (2MiB ring with monotonic offset, resync replay = reset +
256KiB tail, pause/resume only when ALL interactive clients exceed
HIGH, observers never throttle, lagging clients resync), WS gateway
(attach/stdin/resize/ack, heartbeat 30s), SIGTERM→SIGKILL 5s grace
- CLI: arboretum [--port 7317] [--bind 127.0.0.1] — non-loopback bind
requires an explicit safety flag
- Smoke-tested: login/401/403-origin/spawn bash/kill/grace-SIGKILL all
green
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-06-11 22:04:09 +02:00