feat(ai): crate fractal-ai + AgentDetector (SF-M2-01, ST-M2-01) (#20) #97

Closed
charles wants to merge 5 commits from feat/20-fractal-ai-crate into main
Owner

Résumé

  • Crée la crate fractal-ai dans le workspace (déjà déclarée dans Cargo.toml)
  • AgentDetector : détection d'agents IA via 3 stratégies :
    • Flag m.bot du profil Matrix
    • Patterns regex sur le localpart (ex: *-bot, *-agent, openclaw*)
    • Liste explicite known_agents dans config.toml [ai]
  • AgentType : OpenClaw / Generic / Custom(String)
  • AgentInfo : user_id, agent_type, display_name, capabilities, model
  • Cache DashMap<String, AgentInfo> pour accès concurrent sans lock global
  • DetectorConfig chargeable depuis config.toml [ai]
  • 7 tests unitaires

Closes #20

## Résumé - Crée la crate `fractal-ai` dans le workspace (déjà déclarée dans `Cargo.toml`) - `AgentDetector` : détection d'agents IA via 3 stratégies : - Flag `m.bot` du profil Matrix - Patterns regex sur le localpart (ex: `*-bot`, `*-agent`, `openclaw*`) - Liste explicite `known_agents` dans `config.toml [ai]` - `AgentType` : `OpenClaw` / `Generic` / `Custom(String)` - `AgentInfo` : `user_id`, `agent_type`, `display_name`, `capabilities`, `model` - Cache `DashMap<String, AgentInfo>` pour accès concurrent sans lock global - `DetectorConfig` chargeable depuis `config.toml [ai]` - 7 tests unitaires Closes #20
chore: add dashmap, regex, toml, sha2, futures-util, sqlx workspace deps (#20)
Some checks failed
CI / cargo check (pull_request) Has been cancelled
CI / cargo test (pull_request) Has been cancelled
CI / clippy + rustfmt (pull_request) Has been cancelled
dafd6c91d7
charles closed this pull request 2026-04-06 02:03:13 +00:00
Some checks are pending
CI / cargo check (pull_request) Has been cancelled
CI / cargo test (pull_request) Has been cancelled
CI / clippy + rustfmt (pull_request) Has been cancelled
qa
Required

Pull request closed

Sign in to join this conversation.
No description provided.