# API smart-ide-tools-bridge Écoute **`127.0.0.1`** par défaut, port **`37147`** (`TOOLS_BRIDGE_PORT`). Auth : **`Authorization: Bearer `** (obligatoire sauf **`GET /health`**). ## Endpoints | Méthode | Chemin | Rôle | |---------|--------|------| | GET | `/health` | Santé (sans Bearer). | | GET | `/v1/registry` | JSON : URLs des services HTTP du monorepo + métadonnées des outils sous-module (chemins relatifs). | | POST | `/v1/carbonyl/open-plan` | Corps `{"url":"https://…"}` → plan d’exécution terminal (`docker` ou `native`). | | POST | `/v1/pageindex/run` | Corps `{"mode":"pdf"\|"md","inputPath":"/abs/…"}` → sous-processus `run-pageindex.sh` ; réponse inclut `resultPath` si `…/upstream/results/_structure.json` existe. | | POST | `/v1/chandra/ocr` | Corps `{"inputPath":"…","outputPath":"…","method":"hf"\|"vllm"}` (défaut `hf`) → scripts Chandra. | ## Corps JSON (exemples) **Carbonyl** ```json { "url": "https://example.com" } ``` **PageIndex** ```json { "mode": "pdf", "inputPath": "/abs/smart_ide/docs/foo.pdf" } ``` **Chandra** ```json { "inputPath": "/abs/in.pdf", "outputPath": "/abs/out_dir", "method": "hf" } ``` ## Sécurité des chemins `inputPath` / `outputPath` doivent résoudre sous **`SMART_IDE_MONOREPO_ROOT`** ou sous un préfixe listé dans **`TOOLS_ALLOWED_PATH_PREFIXES`** (séparateur virgule). ## Voir aussi - [README.md](../README.md) (table des ports) - [repo/service-smart-ide-tools-bridge.md](../repo/service-smart-ide-tools-bridge.md)