- 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
2.9 KiB
2.9 KiB
Hanzo Runtime Package Publishing Instructions
Overview
All packages have been prepared for publishing with version 0.7.0. Since npm requires OTP authentication, you'll need to publish manually.
NPM Packages (JavaScript/TypeScript)
All packages use the @hanzo scope and require npm authentication with OTP.
1. @hanzo/api-client
cd libs/api-client
npm publish --access public --otp=YOUR_OTP_CODE
2. @hanzo/runner-api-client
cd libs/runner-api-client
npm publish --access public --otp=YOUR_OTP_CODE
3. @hanzo/runtime (Main TypeScript SDK)
cd libs/sdk-typescript
npm publish --access public --otp=YOUR_OTP_CODE
Python Packages (PyPI)
All Python packages require PyPI authentication token (PYPI_TOKEN).
1. hanzo-runtime (Main Python SDK)
cd libs/sdk-python
poetry build
poetry publish --username __token__ --password $PYPI_TOKEN
2. hanzo_runtime_api_client
cd libs/api-client-python
poetry build
poetry publish --username __token__ --password $PYPI_TOKEN
3. hanzo_runtime_api_client_async
cd libs/api-client-python-async
poetry build
poetry publish --username __token__ --password $PYPI_TOKEN
Quick Publish All (with tokens ready)
NPM (requires OTP for each package):
# From project root
export NPM_TOKEN=your_npm_token_here
# Publish each package (you'll be prompted for OTP)
for pkg in api-client runner-api-client sdk-typescript; do
cd libs/$pkg
npm publish --access public
cd ../..
done
Python:
# From project root
export PYPI_TOKEN=your_pypi_token_here
# Build and publish all Python packages
for pkg in sdk-python api-client-python api-client-python-async; do
cd libs/$pkg
poetry build
poetry publish --username __token__ --password $PYPI_TOKEN
cd ../..
done
Post-Publishing Verification
After publishing, verify the packages are available:
NPM:
npm view @hanzo/api-client
npm view @hanzo/runner-api-client
npm view @hanzo/runtime
PyPI:
pip index versions hanzo-runtime
pip index versions hanzo-runtime-api-client
pip index versions hanzo-runtime-api-client-async
Integration
Once published, users can install:
JavaScript/TypeScript:
npm install @hanzo/runtime @hanzo/api-client
# or
yarn add @hanzo/runtime @hanzo/api-client
# or
pnpm add @hanzo/runtime @hanzo/api-client
Python:
pip install hanzo-runtime
# or for API clients specifically:
pip install hanzo-runtime-api-client
pip install hanzo-runtime-api-client-async
Usage Examples
TypeScript:
import { HanzoRuntime } from '@hanzo/runtime';
const client = new HanzoRuntime({ apiKey: 'your-api-key' });
const sandbox = await client.sandbox.getOrCreate('my-sandbox');
Python:
from hanzo_runtime import HanzoRuntime
client = HanzoRuntime(api_key='your-api-key')
sandbox = client.sandbox.get_or_create('my-sandbox')