smart_ide/docs/repo/service-claw-harness.md
Nicolas Cantu 3b3e1e67de docs: align regex-search with Cursor article; claw upstream submodule; SSO data ownership
- Add services/claw-harness-api/upstream → chinanpc/claude-code-rust (shallow)
- Document claw submodule and MIT Rust harness in service-claw-harness + feature doc
- agent-regex-search: map design principles to rg implementation vs indexed search
- SSO gateway: no user/project account storage; product DBs own identity context
2026-04-03 22:54:07 +02:00

41 lines
1.9 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.

# claw-harness-api (`services/claw-harness-api/`)
Notes dintégration et **proxy HTTP mince** pour un harnais **claw** (agent terminal, binaire `claw`).
## Amont Rust (sous-module optionnel)
Un clone **shallow** du dépôt **[chinanpc/claude-code-rust](https://github.com/chinanpc/claude-code-rust)** est disponible sous **`services/claw-harness-api/upstream`** (sous-module Git, licence **MIT** selon le dépôt amont). Après `git clone` du monorepo : `git submodule update --init services/claw-harness-api/upstream`. Builder et lancer le binaire selon le `README` amont (workspace Rust, `cargo build --release`, etc.).
## Autres références claw (hors sous-module)
- [gitlawb — claw-code](https://gitlawb.com/node/repos/z6Mks1jg/claw-code)
- [instructkr/claw-code](https://github.com/instructkr/claw-code) (accès réseau selon visibilité du dépôt)
Le proxy **`proxy/`** du monorepo nembarque pas le runtime : il attend une URL **`CLAW_UPSTREAM_URL`** vers un serveur HTTP claw déjà démarré.
## Politique : pas dAnthropic dans les gabarits
**`providers.example.yaml`** : Ollama et placeholders OpenAI-compatibles / Gemini ; **Anthropic `enabled: false`**. Lapplication opérationnelle (pare-feu, absence de clé) reste de votre ressort.
## Proxy (`proxy/`)
| Variable | Obligatoire | Description |
|----------|-------------|-------------|
| `CLAW_PROXY_TOKEN` | oui | Bearer côté client du proxy. |
| `CLAW_PROXY_HOST` | non | Défaut `127.0.0.1` |
| `CLAW_PROXY_PORT` | non | Défaut `37142` |
| `CLAW_UPSTREAM_URL` | oui | URL du serveur HTTP claw |
```bash
cd services/claw-harness-api/proxy
npm install
npm run build
export CLAW_PROXY_TOKEN='…'
export CLAW_UPSTREAM_URL='http://127.0.0.1:37143'
npm start
```
## Spécification smart_ide
[API/claw-harness-proxy.md](../API/claw-harness-proxy.md), [features/claw-harness-api.md](../features/claw-harness-api.md).