smart_ide/docs/API/orchestrator.md
4NK 14c974f54c Add smart-ide-tools-bridge API for submodule tools + central local env
- New service: tools bridge (port 37147) registry + Carbonyl/PageIndex/Chandra POST jobs
- config/services.local.env.example and gitignore for services.local.env
- .env.example for repos-devtools, regex-search, ia-dev-gateway, orchestrator, claw proxy, langextract
- Orchestrator intents: tools.registry, tools.carbonyl.plan, tools.pageindex.run, tools.chandra.ocr
- Docs: API + repo service fiche, architecture index; do not commit dist/
2026-04-03 22:35:57 +02:00

54 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# API — smart_ide-orchestrator (spécification)
Service prévu : routage des intentions vers Ollama, AnythingLLM, micro-services et [ia-dev-gateway](./ia-dev-gateway.md). **Bearer** : `ORCHESTRATOR_TOKEN`. Défaut **`127.0.0.1:37145`**.
## `GET /health`
**200** : `{ "status": "ok" }` — sans authentification.
## `POST /v1/route`
Résout une intention sans nécessairement lexécuter (si `dryRun: true`).
**Corps JSON**
| Champ | Obligatoire | Description |
|-------|-------------|-------------|
| `intent` | oui | Identifiant stable (`code.complete`, `rag.query`, `agent.run`, `tools.registry`, `tools.pageindex.run`, …) |
| `context` | non | Objet libre (fichiers ouverts, sélection, etc.) |
| `projectId` | non | Projet `ia_dev` / workspace |
| `env` | non | `test` \| `pprod` \| `prod` |
| `dryRun` | non | Si `true`, retourne seulement la résolution |
**200** :
```json
{
"resolved": true,
"target": "ollama | anythingllm | service | ia_dev",
"action": "string",
"upstream": { "method": "POST", "url": "relative or absolute", "headersHint": [] }
}
```
**200** avec `resolved: false` et `reason` si intention inconnue ou refus policy.
**401** : Bearer invalide.
## `POST /v1/execute`
Exécute la résolution (ou accepte un corps identique à `/v1/route` avec `dryRun: false`). Peut enchaîner appels HTTP vers les services internes. Les réponses pass-through dépendent de la cible.
**422** : paramètres incohérents.
## `GET /v1/timeline`
**200** : `{ "items": [ { "at", "type", "summary", "runId"?, "projectId"? } ] }` — agrégat léger pour lUI (implémentation ultérieure branchée sur logs / DB).
**401** si protégé comme les autres routes métier.
## Notes
- CORS : à configurer au reverse proxy pour le **front web** uniquement ; pas dexposition publique sans TLS.
- Versionnement : préfixe `/v1/`.