smart_ide/docs/API/orchestrator.md
Nicolas Cantu 088eab84b7 Platform docs, services, ia_dev submodule, smart_ide project config
- Add ia_dev submodule (projects/smart_ide on forge 4nk)
- Document APIs, orchestrator, gateway, local-office, rollout
- Add systemd/scripts layout; relocate setup scripts
- Remove obsolete nginx/enso-only docs from this repo scope
2026-04-03 16:07:58 +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`, …) |
| `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/`.