Initial state: - ia_dev was historically referenced as ./ia_dev in docs and integrations, while the vendored module lives under services/ia_dev. - AnythingLLM sync and hook installation had error masking / weak exit signaling. - Proxy layers did not validate proxy path segments, allowing path normalization tricks. Motivation: - Make the IDE-oriented workflow usable (sync -> act -> deploy/preview) with explicit errors. - Reduce security footguns in proxying and script automation. Resolution: - Standardize IA_DEV_ROOT usage and documentation to services/ia_dev. - Add SSH remote data mirroring + optional AnythingLLM ingestion. - Extend AnythingLLM pull sync to support upload-all/prefix and fail on upload errors. - Harden smart-ide-sso-gateway and smart-ide-global-api proxying with safe-path checks and non-leaking error responses. - Improve ia-dev-gateway runner validation and reduce sensitive path leakage. - Add site scaffold tool (Vite/React) with OIDC + chat via sso-gateway -> orchestrator. Root cause: - Historical layout changes (submodule -> vendored tree) and missing central contracts for path resolution. - Missing validation for proxy path traversal patterns. - Overuse of silent fallbacks (|| true, exit 0 on partial failures) in automation scripts. Impacted features: - Project sync: git pull + AnythingLLM sync + remote data mirror ingestion. - Site frontends: SSO gateway proxy and orchestrator intents (rag.query, chat.local). - Agent execution: ia-dev-gateway script runner and SSE output. Code modified: - scripts/remote-data-ssh-sync.sh - scripts/anythingllm-pull-sync/sync.mjs - scripts/install-anythingllm-post-merge-hook.sh - cron/git-pull-project-clones.sh - services/smart-ide-sso-gateway/src/server.ts - services/smart-ide-global-api/src/server.ts - services/smart-ide-orchestrator/src/server.ts - services/ia-dev-gateway/src/server.ts - services/ia_dev/tools/site-generate.sh Documentation modified: - docs/** (architecture, API docs, ia_dev module + integration, scripts) Configurations modified: - config/services.local.env.example - services/*/.env.example Files in deploy modified: - services/ia_dev/deploy/* Files in logs impacted: - logs/ia_dev.log (runtime only) - .logs/* (runtime only) Databases and other sources modified: - None Off-project modifications: - None Files in .smartIde modified: - .smartIde/agents/*.md - services/ia_dev/.smartIde/** Files in .secrets modified: - None New patch version in VERSION: - 0.0.5 CHANGELOG.md updated: - yes
58 lines
5.2 KiB
Markdown
58 lines
5.2 KiB
Markdown
# smart_ide — IDE orienté intention et IA locale
|
||
|
||
Projet d’environnement de développement où l’**inférence** repose sur **Ollama**, la **mémoire documentaire et RAG** sur **AnythingLLM**, la **bureautique métier riche** sur **ONLYOFFICE**, et l’**édition / dépôt de fichiers Office par API** (docx programmatique) via **Local Office** (`services/local-office/`). Les **agents métier** existants (`ia_dev` et sous-agents) restent le noyau opératoire ; l’éditeur et l’orchestrateur les exposent via une **grammaire de commandes** plutôt que via une navigation fichiers classique.
|
||
|
||
**Monorepo unique** : ce dépôt est le **référentiel principal** pour la doc, les **services locaux** (`services/`, dont Local Office), les scripts, les extensions et le **socle applicatif éditeur** (**Lapce** sous `core_ide/`, clone local hors index Git — voir [core-ide.md](../core-ide.md)). L’**hébergement canonique** est la **forge interne** ; les dépôts publics cités en documentation sont des **amonts** ou références, pas des cibles de publication obligatoires pour les livrables 4NK. Détail architectural : [system-architecture.md](../system-architecture.md).
|
||
|
||
## Première cible de déploiement
|
||
|
||
Le **premier déploiement** visé est un **poste Linux client** qui se connecte en **SSH** à un **serveur distant** hébergeant :
|
||
|
||
- le **socle technique IA** (Ollama, AnythingLLM, services associés) ;
|
||
- les **dépôts** (sources, agents, procédures).
|
||
|
||
L’UX (ex. Lapce) et les flux utilisateur peuvent tourner sur le client ; l’exécution lourde, la mémoire projet et Git vivent **sur le serveur**. Détail : [deployment-target.md](../deployment-target.md).
|
||
|
||
## Positionnement
|
||
|
||
- **Pas d’explorer comme surface principale** : la navigation primaire passe par intentions, recherche, contexte, timeline, objets logiques et artefacts ; un accès brut (fichiers / arborescence) reste disponible en **mode expert / secours**, pas comme flux nominal.
|
||
- **Machine de travail orientée opérations** plutôt qu’éditeur de fichiers : l’utilisateur exprime *ce qu’il veut faire*, *sur quel objet logique*, *avec quels droits*, *dans quel contexte projet*, *avec quelle procédure*, *avec quel agent*, *avec quel résultat attendu*.
|
||
- **Socle applicatif éditeur : [Lapce](https://lapce.dev/)** sous **`core_ide/`** — open source, Rust, rendu natif / GPU ; base pour le noyau d’édition + agents. Mise à jour et build : [core-ide.md](../core-ide.md).
|
||
|
||
## AnythingLLM et projets
|
||
|
||
Pour chaque **projet**, un **workspace AnythingLLM** dédié est créé (ou rattaché) : corpus, embeddings et conversations restent **isolés par projet**. Une **moulinette de synchronisation** aligne un sous-ensemble de fichiers du dépôt avec le workspace concerné afin de garder la mémoire RAG alignée avec le code et la doc utiles.
|
||
|
||
Voir [anythingllm-workspaces.md](../anythingllm-workspaces.md) et [script-anythingllm-pull-sync.md](./script-anythingllm-pull-sync.md).
|
||
|
||
## Module `ia_dev`
|
||
|
||
Le répertoire **`services/ia_dev/`** (racine `IA_DEV_ROOT`) contient l’**équipe d’agents**, les scripts `deploy/`, le ticketing Gitea, etc. (référence forge : [**ia_dev**](https://git.4nkweb.com/4nk/ia_dev.git)). Les **`conf.json`** pour ce monorepo sont sous **`projects/<id>/`** (voir [projects-directory.md](./projects-directory.md)). Détail : [ia_dev-module.md](../ia_dev-module.md), [ia-dev-smart-ide-integration.md](./ia-dev-smart-ide-integration.md), [ia-dev-repository-overview.md](./ia-dev-repository-overview.md), [ia_dev-project-smart_ide.md](../ia_dev-project-smart_ide.md).
|
||
|
||
## Documentation centralisée
|
||
|
||
- **Index général** : [docs/README.md](../README.md)
|
||
- **Arborescence dépôt (README migrés)** : [docs/repo/README.md](./README.md)
|
||
|
||
## Table de liens (extraits)
|
||
|
||
| Sujet | Document |
|
||
|-------|----------|
|
||
| Plateforme en ligne | [platform-target.md](../platform-target.md) |
|
||
| Référence HTTP services | [API/README.md](../API/README.md) |
|
||
| Infra SSH / scripts hôte | [infrastructure.md](../infrastructure.md) |
|
||
| Ollama, AnythingLLM, services | [services.md](../services.md) |
|
||
| Périmètres IDE / backends applicatifs | [services-functional-scope.md](../services-functional-scope.md) |
|
||
| UX / intentions | [ux-navigation-model.md](../ux-navigation-model.md) |
|
||
| Écosystème et synchro | [ecosystem-architecture-and-sync.md](../ecosystem-architecture-and-sync.md) |
|
||
| Projets `conf.json` | [projects-directory.md](./projects-directory.md) |
|
||
| Pull Git planifié | [cron-git-pull.md](./cron-git-pull.md) |
|
||
| Timer systemd pull | [systemd-units.md](./systemd-units.md) |
|
||
| LangExtract, claw, regex, Local Office (features) | [features/](../features/) |
|
||
|
||
## Dépôt actuel (outillage)
|
||
|
||
Scripts d’installation et d’exploitation sur Ubuntu : SSH, sudo ciblé, AnythingLLM Docker, Ollama exposé pour Docker, modèle Ollama alias `qwen3-code-webdev`, installer Desktop AnythingLLM. Ces scripts ciblent en priorité l’**hôte serveur** qui porte le socle IA et les repos ; le **client Linux** repose surtout sur SSH et l’IDE. L’IDE complet (Lapce + orchestrateur + gateway) est **cible de conception** ; ce dépôt documente et supporte la **stack sur serveur** (Ollama + AnythingLLM) et l’accès distant.
|
||
|
||
**Auteur :** Équipe 4NK
|