* feat(finlab): console Claude Code finance in-cluster + toolkit d'analyse Intègre finlab (ex-projet Projets/Finance) au lab comme une console Claude Code web spécialisée finance — l'esprit OpenAlice, mais c'est le vrai Claude Code sur l'abonnement (login persisté, pas d'API facturée), agentique, avec la boîte à outils finlab (Yahoo Finance) branchée en MCP. - tools/finlab/ : source finlab rapatriée + Dockerfile (Python 3.12 + Node + claude-code + ttyd) + persona workspace/CLAUDE.md + branchement MCP + entrypoint (seed du workspace no-clobber sur le PVC) - .github/workflows/build-finlab.yml : build GHCR funk-finlab + bump manifest (main) - k8s/apps/finlab/ : Deployment/Service/PVC/IngressRoute (finance.lab.local) + Middleware basicAuth (shell web protégé) ; PVC = HOME (login) + workspace - k8s/apps-of-apps/apps/finlab.yaml : Application ArgoCD - .mcp.json (racine) : outils finlab dans les sessions Claude Code du lab - admin/ia/finlab.md + READMEs + CLAUDE.md : doc + enregistrement Analyse/aide à la décision uniquement — aucun ordre réel (paper trading Alpaca fictif seul exécutable). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * fix(finlab): ttyd absent des dépôts bookworm → binaire statique GitHub Le build amont échouait (`E: Package 'ttyd' has no installation candidate`) : ttyd n'est pas packagé dans Debian bookworm. On récupère le binaire statique (musl, pin TTYD_VERSION=1.7.7) depuis les releases GitHub. Build complet validé en local (podman) : ttyd 1.7.7, claude-code 2.1.195, import finlab + seed OK. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 KiB
FinLab — console Claude Code finance (in-cluster)
Une vraie session Claude Code (sur l'abonnement d'Alkatrazz, login persisté) servie
dans un terminal web (ttyd), spécialisée analyse de marché via la persona CLAUDE.md et
la boîte à outils finlab (Yahoo Finance, exposée en MCP). Esprit OpenAlice, mais c'est
Claude Code + le toolkit maison — aucune facturation API, aucun broker, analyse seule.
⚠️ La console expose un shell web → protégée par basicAuth Traefik. Analyse et aide à la décision uniquement : aucun ordre réel (seul le paper trading Alpaca fictif existe).
Image
Pas d'image publique : la CI (.github/workflows/build-finlab.yml) build depuis
tools/finlab/ (notre code) → ghcr.io/alkatrazz24/funk-finlab, tag sha-<court>, bump du
manifest sur main.
Architecture du déploiement
| Composant | Détail |
|---|---|
| Deployment | 1 réplica, Recreate (volume RWO), PodSecurity restricted (uid 1000, fsGroup 1000) |
PVC finlab-data |
5Gi NFS → /home/finlab : ~/.claude (login abonnement) + workspace (code finlab seedé, portfolio.yaml/watchlists.yaml/alerts.yaml éditables, .cache) |
Service finlab |
web:7681 (ttyd) |
Middleware finlab-auth |
basicAuth Traefik (secret finlab-auth, htpasswd) |
| IngressRoute | finance.lab.local → 7681 (via finlab-auth) |
Le workspace est seedé depuis l'image au 1er boot (cp -rn, no-clobber) puis vit sur le
PVC : tes edits (portefeuille, etc.) et ton login persistent ; une nouvelle image n'apporte que
les fichiers manquants.
Pré-requis manuels (une fois)
1. Secret de pull GHCR (si absent du ns ai)
kubectl -n ai create secret docker-registry ghcr-pull \
--docker-server=ghcr.io \
--docker-username=Alkatrazz24 \
--docker-password=<GHCR_PAT_read_packages>
2. Secret basicAuth de la console (finlab-auth)
# htpasswd (paquet apache2-utils). Remplace <user>/<pass>.
htpasswd -nbB <user> '<pass>' > /tmp/finlab.htpasswd
kubectl -n ai create secret generic finlab-auth \
--from-file=users=/tmp/finlab.htpasswd
rm -f /tmp/finlab.htpasswd
3. Premier boot — login Claude Code (abonnement)
- Ouvrir http://finance.lab.local (basicAuth → identifiants de l'étape 2).
- Dans le terminal, lancer
claude, puis/login→ suivre l'OAuth (ouvrir l'URL sur ta machine, autoriser, coller le code). Persisté dans~/.claudesur le PVC. - À l'invite, FinLab a déjà sa persona (
CLAUDE.md) et les outils finlab (MCPfinlab, auto-activé). Essaie : « résume mon portefeuille », « plan de trade pour Micron ».
Le workspace
/home/finlab/workspacecontientportfolio.yamletc. — éditables directement (par toi ou par Claude à ta demande). Pour une vue rapide hors console :kubectl -n ai exec deploy/finlab -- python -m finlab.cli digest.
Accès depuis le terminal (sans navigateur)
kubectl -n ai exec -it deploy/finlab -- bash -lc 'cd "$WORKSPACE" && claude'