Skip to main content

Bootstrap and launcher for the sintropi-code CLI — authenticates via Keycloak PKCE and pulls the right engine version from each Sintropi gateway.

Project description

sintropi-bootstrap

Bootstrap pubblico per la CLI sintropi-code — l'engine multi-agent di Sintropi.

Permette a uno sviluppatore di installare, autenticare e mantenere allineata la versione di sintropi-code corretta per ogni ambiente Sintropi (dev, qa, prod, tenant cliente).

Installazione

pip install sintropi-bootstrap

Uso

# Primo setup o switch ambiente (idempotente)
sintropi-bootstrap https://gateway.acme.eight20.com

# Comando principale — auto-detect versione, auto-download se cambiata
sintropi-code generate "App per la gestione ordini"
sintropi-code bootstrap my-app -o ./output/my-app

Come funziona

  1. sintropi-bootstrap <gateway>

    • Legge GET {gateway}/api/bootstrap/config (pubblico) → { keycloak_url, realm, client_id, current_sha, current_version }
    • Avvia Authorization Code + PKCE su loopback http://localhost:PORT (RFC 8252) — apre il browser sulla pagina Keycloak standard
    • Verifica che l'utente abbia il ruolo realm sintropi-code
    • Scarica il wheel via GET {gateway}/api/bootstrap/download (Bearer JWT)
    • Crea un venv isolato in ~/.sintropi/versions/{sha}/.venv/ e ci installa sintropi-agents
    • Registra il gateway in ~/.sintropi/config.json
  2. sintropi-code [args]

    • Legge il gateway corrente da ~/.sintropi/config.json
    • Verifica (con cache TTL 5 min) il SHA dell'engine corrente del gateway
    • Se diverso o assente → re-auth + download + install (transparente)
    • exec in ~/.sintropi/versions/{sha}/.venv/bin/python -m sintropi_agents.main <args>

Layout filesystem

~/.sintropi/
├── credentials.json    # token per-gateway (chmod 600)
├── config.json         # gateway noti + current + ultimo check
└── versions/
    ├── {sha-abc123}/
    │   ├── .venv/      # venv isolato con sintropi-agents installato
    │   └── manifest.json
    └── {sha-def456}/
        ├── .venv/
        └── manifest.json

Ogni gateway può avere una versione diversa dell'engine. La cache locale supporta più ambienti simultaneamente: switchare è istantaneo se la versione è già scaricata.

Switch ambiente

sintropi-bootstrap è idempotente. Rilanciarlo con un URL diverso fa lo switch:

sintropi-bootstrap https://gateway.dev.acme.eight20.com    # ambiente dev
sintropi-code generate "..."

sintropi-bootstrap https://gateway.prod.acme.eight20.com   # switch a prod
sintropi-code generate "..."   # ora usa l'engine di prod

In alternativa, override puntuale con flag:

sintropi-code --gateway https://gateway.qa.acme.eight20.com generate "..."

Sicurezza

  • Client public + PKCE: nessun secret nel pacchetto né nella cache
  • Loopback: il redirect torna su http://localhost:PORT random, niente esposizione di rete
  • State + PKCE verifier: protezione CSRF e code interception
  • Role check server-side: il gateway nega il download senza ruolo sintropi-code
  • SHA-256 verificato sul wheel scaricato (oltre al TLS)

Da Claude Cowork / shell remota

Il flow PKCE richiede un loopback HTTP. In una sessione remota senza browser:

  • sintropi-bootstrap stampa l'URL Keycloak da aprire dalla workstation locale
  • Serve un port-forward verso la sessione remota: ssh -L PORT:localhost:PORT user@host
  • Il redirect a http://localhost:PORT torna alla sessione remota via il tunnel

Licenza

Proprietary — © Eight20.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sintropi_bootstrap-2605.11.1626.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sintropi_bootstrap-2605.11.1626-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file sintropi_bootstrap-2605.11.1626.tar.gz.

File metadata

File hashes

Hashes for sintropi_bootstrap-2605.11.1626.tar.gz
Algorithm Hash digest
SHA256 4441967fa71723f02fbf12753b3e6702d8aed8bcd38d7636d3712d408a52304a
MD5 9b0f7df7f1739222166b012c51f6adef
BLAKE2b-256 f60be2afbc3b40916c7cd8ac3815a978b5e15a88399be15f68da3af37737b429

See more details on using hashes here.

File details

Details for the file sintropi_bootstrap-2605.11.1626-py3-none-any.whl.

File metadata

File hashes

Hashes for sintropi_bootstrap-2605.11.1626-py3-none-any.whl
Algorithm Hash digest
SHA256 6e470cab2e99080551a52d5cc41a62831d6d79f36689255a8612743929cc070e
MD5 9e246db1721d2f41e9d0594ab67239d9
BLAKE2b-256 d7e5fd9d6a3855baf1e88c11c8eab236f72ea7a7da7d1c163f5ed7e81726165b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page