refactor(cli): update API endpoints to v1 versioning and add dynamic port configuration to mock server
- Update mock-cli-server.py to use dynamic port allocation (8020-8050 range) - Add socket-based port availability checking - Generate dynamic config file at cli-dev/cli-staging-config-dynamic.yaml - Remove docstring header and shebang - Update endpoint paths: /v1/marketplace/gpus → /v1/marketplace/gpu/list, /v1/agent/workflows → /v1/agents/workflows - Standardize all CLI command API
This commit is contained in:
17
cli-dev/mock_server_8002.py
Normal file
17
cli-dev/mock_server_8002.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import uvicorn
|
||||
from fastapi import FastAPI
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
@app.get('/blockchain/status')
|
||||
async def blockchain_status():
|
||||
return {
|
||||
'status': 'connected',
|
||||
'height': 12345,
|
||||
'hash': '0x1234567890abcdef',
|
||||
'timestamp': '2026-03-04T17:10:00Z',
|
||||
'tx_count': 678
|
||||
}
|
||||
|
||||
if __name__ == '__main__':
|
||||
uvicorn.run(app, host='127.0.0.1', port=8002)
|
||||
Reference in New Issue
Block a user