Files
runtime/INTEGRATION_COMPLETE.md
zeekay ea80dc3638 feat: Add new Dockerfiles and improve containerization
- 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
2025-08-16 23:03:39 -05:00

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 examples
    • typescript/iam-auth.ts - TypeScript authentication
    • python/iam_auth.py - Python authentication
    • runtime-api-middleware.ts - API middleware
    • README.md - Integration guide
    • dashboard-sso.md - Dashboard SSO setup

Support


The Hanzo Runtime is ready for production! πŸš€