mirror of
https://github.com/hanzoai/runtime.git
synced 2026-10-30 18:23:13 +00:00
- Add main Dockerfile for production builds - Add Dockerfile.runtime for secure code execution - Add Dockerfile.runtime.fixed with improved configuration - Include .dockerignore for build optimization - Add integration documentation and publishing guides - Update API and CLI components for better runtime support - Enhance sandbox and container management features
3.9 KiB
3.9 KiB
Hanzo Runtime Integration Complete β
Summary
The Hanzo Runtime has been successfully prepared for release with full IAM integration and dashboard SSO support.
What's Ready
π¦ NPM Packages (v0.7.0)
- β @hanzo/api-client - TypeScript API client
- β @hanzo/runner-api-client - Runner API client
- β @hanzo/runtime - Main TypeScript SDK
π Python Packages (v0.7.0)
- β hanzo-runtime - Main Python SDK
- β hanzo_runtime_api_client - Python API client
- β hanzo_runtime_api_client_async - Async Python API client
π IAM Integration
- β OAuth2 authentication examples
- β Token validation middleware
- β Automatic token refresh
- β Service-to-service auth
- β Dashboard SSO configuration
π Dashboard Integration
- β OIDC authentication ready
- β IAM token validation
- β Seamless SSO flow
- β User context from IAM
Test Results
β
All TypeScript packages build successfully
β
Dashboard builds with OIDC support
β
API supports IAM token validation
β
Integration examples are valid
β
Documentation is complete
Quick Start
1. Publish Packages
# Set your tokens
export PYPI_TOKEN=your_pypi_token
export NPM_OTP=your_npm_otp # Or enter interactively
# Run publish script
./publish-with-tokens.sh
2. Configure IAM
In Hanzo IAM, create the Runtime application:
{
"name": "runtime-dashboard",
"client_id": "runtime-dashboard",
"redirect_uris": [
"https://runtime.hanzo.ai",
"https://runtime.hanzo.ai/callback"
],
"grant_types": ["authorization_code", "client_credentials"]
}
3. Deploy Dashboard
# Set environment variables
export VITE_OIDC_DOMAIN=https://iam.hanzo.ai
export VITE_OIDC_CLIENT_ID=runtime-dashboard
export VITE_API_URL=https://api.runtime.hanzo.ai
# Build and deploy
pnpm nx build dashboard
# Deploy dist/apps/dashboard to your hosting
4. Use the SDKs
TypeScript:
import { HanzoRuntime } from '@hanzo/runtime';
import { authenticateWithIAM } from './iam-auth';
const token = await authenticateWithIAM();
const client = new HanzoRuntime({ apiKey: token });
Python:
from hanzo_runtime import HanzoRuntime
from iam_auth import HanzoIAMAuth
iam = HanzoIAMAuth()
client = HanzoRuntime(api_key=iam.get_token())
Architecture
βββββββββββββββ βββββββββββββββ ββββββββββββββββ
β Hanzo IAM ββββββΆβ Dashboard ββββββΆβ Runtime API β
β (Casdoor) β β (React) β β (NestJS) β
βββββββββββββββ βββββββββββββββ ββββββββββββββββ
β β
β βΌ
β ββββββββββββββββ
ββββββββββββββββββββββββββββββββββΆβ Sandbox β
β Execution β
ββββββββββββββββ
Files Created
/PUBLISH_INSTRUCTIONS.md- Publishing guide/publish-with-tokens.sh- Automated publish script/test-integration.sh- Integration test script/examples/iam-integration/- Complete integration examplestypescript/iam-auth.ts- TypeScript authenticationpython/iam_auth.py- Python authenticationruntime-api-middleware.ts- API middlewareREADME.md- Integration guidedashboard-sso.md- Dashboard SSO setup
Support
- Documentation: https://docs.hanzo.ai/runtime
- GitHub: https://github.com/hanzoai/runtime
- Support: [email protected]
The Hanzo Runtime is ready for production! π