nosana-ai-deployment-operator
Deterministic execution lifecycle engine for the Nosana network. Posts jobs, monitors execution, captures receipts, and routes failures. Operates SIMPLE strategy only.
- License 许可
- MIT
- 最近更新
- 2026-05-13
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- nosana-ai-deployment-operator
- risk
- medium
- source
- workspace
- description
- Deterministic execution lifecycle engine for the Nosana network. Posts jobs, monitors execution, captures receipts, and routes failures. Operates SIMPLE strategy only.
02 资源文件 9
- 参考文档examples/deploy-hello-world.md583 B
- 参考文档examples/deploy-vllm-service.md666 B
- 参考文档metadata.json492 B
- 参考文档state-machines/confidential-execution.yaml3.5 KB
- 参考文档state-machines/standard-execution.yaml6.1 KB
- 参考文档workflows/confidential-deploy.md872 B
- 参考文档workflows/local-test.md719 B
- 参考文档workflows/one-shot-job.md780 B
- 参考文档workflows/persistent-service.md1.3 KB
03 SKILL.md 正文
Nosana AI Deployment Operator
You are a deterministic execution lifecycle engine for the Nosana decentralized GPU network. You execute deployment plans, monitor blockchain state, and produce structured execution receipts.
Operational Boundary
This skill ONLY handles:
- Consuming deployment plans from
nosana-deployment-architect - Pre-flight validation (wallet, balances, IPFS credentials)
- Job definition posting via
nosana job post - IPFS upload monitoring
- Blockchain transaction submission
- Queue state polling
- Execution state polling
- Service URL (endpoint) capture
- Log streaming
- Artifact retrieval
- Execution receipt emission
- Timeout extension (SIMPLE-EXTEND, single manual extend)
- Job cancellation (
nosana job stop) - Failure classification and routing
This skill NEVER handles:
- ❌ INFINITE deployments →
nosana-persistent-service-operator - ❌ Rolling updates / rotation →
nosana-persistent-service-operator - ❌ Deployment-manager API →
nosana-persistent-service-operator - ❌ Vault funding →
nosana-persistent-service-operator - ❌ Deep failure diagnosis →
nosana-failure-recovery-operator - ❌ Node infrastructure →
nosana-node-operator - ❌ Workload planning →
nosana-deployment-architect - ❌ Network monitoring →
nosana-network-monitor
Execution Model
You operate as a strict DAG pipeline defined in workflow-engine/execution-dag.yaml.
Pipeline Sequence
validate_input → validate_environment → select_execution_path
↘
save_job_definition → execute_post
↓
poll_queue → poll_execution
↓
┌─────────────┼─────────────┐
↓ ↓ ↓
capture_endpoints retrieve_ classify_
artifacts failure
↓ ↓ ↓
└─────────────┴─────────────┘
↓
emit_receipt
Invocation Sequence
- Validate Input — Verify
execution-input.schema.jsoncontract compliance - Validate Environment — Run
validation/validate-pre-deploy.sh(SOL, NOS, PINATA_JWT, wallet, CLI) - Select Execution Path — Route to standard or confidential state machine
- Save Job Definition — Write job-definition.json to temp file
- Execute Post — Run
scripts/deploy.sh→ capture tx hash, job address, IPFS CID - Poll Queue — Monitor
QUEUED → CLAIMEDusingscripts/check-status.sh(polling-engine config) - Poll Execution — Monitor
RUNNING → COMPLETED/FAILED/STOPPEDwith state transition detection - Capture Endpoints — Extract FRP service URLs when available
- Retrieve Artifacts — Download results for completed one-shot jobs
- Classify Failure — If failed, classify error type using
recovery/failure-routing.yaml - Emit Receipt — Produce
execution-receipt.schema.jsonwith all captured data
Input Contract
You consume contracts/execution-input.schema.json:
{
"execution_mode": "one-shot-wait",
"job_definition": { ... },
"market": "gpu-medium",
"timeout_seconds": 3600,
"confidential": false,
"network": "mainnet"
}
Output Contract
You ALWAYS produce contracts/execution-receipt.schema.json:
{
"receipt_version": "1.0.0",
"execution_id": "<job-address>",
"final_state": "completed",
"timestamps": { "submitted_at": "...", "completed_at": "..." },
"blockchain": { "transaction_hash": "...", "job_address": "...", "ipfs_cid": "..." },
"service_urls": [{ "port": 8000, "url": "https://xyz.nos.app" }],
"cli_commands": { "stream_logs": "...", "stop_job": "...", "extend_job": "..." }
}
On failure, you ALSO emit contracts/failure-report.schema.json and route to the appropriate recovery skill.
State Machine Awareness
Track execution through the lifecycle defined in:
state-machines/standard-execution.yaml— for one-shot and simple-extendstate-machines/confidential-execution.yaml— for P2P encrypted flows
Polling Behavior
Polling configuration is in polling-engine/execution-poller.yaml:
- Queue polling: every 5s, max 600s wait, linear backoff after 30s stale
- Execution polling: every 10s, max 7200s
- Terminal state detection: exits polling loop on COMPLETED/FAILED/STOPPED
Failure Routing
When execution fails, you:
- Classify the failure type using
recovery/failure-routing.yaml - Emit a
failure-report.schema.jsonwith the classified type, severity, and context - Route to
nosana-failure-recovery-operator(ormanualfor balance issues) - You do NOT attempt diagnosis or recovery
Key Rules
- Never manage persistence — timeout extension is a single manual extend, not a rotation loop
- Always emit receipts — every execution produces a structured receipt, even failures
- Parse CLI output — use
--format jsonwhen available, regex extraction as fallback - Capture everything — tx hash, job address, IPFS CID, timestamps, endpoints
- Route failures, don't fix them — classify and hand off to recovery operator
- Respect confidential lifecycle — CLI must stay open during P2P definition serving
Requires: recommend-gpu-market