Compare commits

...
2 Commits
5 changed files with 134 additions and 3 deletions
@@ -127,6 +127,8 @@ class Handler(BaseHTTPRequestHandler):
body = '<h2>Base Models</h2>'+self.table([m for m in model_visible_to(username) if int(m.get('is_base') or 0)==1]); body += '<h2>Custom Models</h2>'+self.table([m for m in model_visible_to(username) if int(m.get('is_base') or 0)==0]); body += '<h2>Priority</h2>'+self.table(priority_for(username)); self.send_html('Model Registry', body); return
if path in ('/api/runtime/status','/run'):
data = rows('SELECT * FROM runtime_instances ORDER BY created_at DESC LIMIT 100'); self.send_html('Runtime', self.table(data)) if path == '/run' else self.send_json(data); return
if path in ('/hook','/api/hook'):
self.send_html('Git Webhook', '<pre>'+esc(json.dumps({'status':'ready','endpoint':'/hook/git','version':'V1R1C0'}, ensure_ascii=False, indent=2))+'</pre>'); return
if path == '/api/audit': self.send_json(rows('SELECT * FROM model_audit_logs ORDER BY created_at DESC LIMIT 200')); return
self.send_json({'error':'not_found','path':path},404)
except Exception as e: self.send_json({'error':str(e)},500)
@@ -236,6 +238,22 @@ class Handler(BaseHTTPRequestHandler):
elif '模型' in text and ('添加' in text or '新增' in text or 'add' in text.lower()): intent='add_custom_model'; plan=['validate provider','store api key as secret_ref','call /api/model/custom/add']
elif 'patch' in text.lower() or '补丁' in text: intent='create_patch'; plan=['create patch branch','commit patch metadata','run tests']
self.send_json({'intent':intent,'action_plan':plan,'execute':False,'safety_check':'V-level changes require owner approval'}); return
if path in ('/hook/git','/api/hook/git'):
event_id = uid('hook')
event_file = ROOT / 'artifacts' / 'git-webhook-events.jsonl'
event_file.parent.mkdir(parents=True, exist_ok=True)
event = {
'id': event_id,
'received_at': now(),
'event': self.headers.get('X-Gitea-Event') or self.headers.get('X-GitHub-Event') or data.get('event') or 'unknown',
'ref': data.get('ref'),
'repository': (data.get('repository') or {}).get('full_name') if isinstance(data.get('repository'), dict) else data.get('repository'),
}
with event_file.open('a', encoding='utf-8') as fh:
fh.write(json.dumps(event, ensure_ascii=False) + '\n')
smoke = subprocess.run(['bash','scripts/package_contract_check_v1r1c0.sh'], cwd=str(WORKSPACE), text=True, capture_output=True, timeout=120)
audit('webhook','git_event',event_id,{'event':event,'smoke_code':smoke.returncode})
self.send_json({'status':'accepted' if smoke.returncode == 0 else 'smoke_failed','id':event_id,'event':event,'smoke':{'code':smoke.returncode,'stdout':smoke.stdout[-2000:],'stderr':smoke.stderr[-2000:]}}); return
self.send_json({'error':'not_found','path':path},404)
except Exception as e: self.send_json({'error':str(e)},500)
+22 -2
View File
@@ -1,7 +1,7 @@
{
"active_version": "V1R1C0",
"active_tag": "V1R1C0-baseline-20260706",
"mode": "gitops-online-baseline",
"mode": "gitops-online",
"version_policy": "VxRxCx",
"update_mode": "git_patch_only",
"zip_update_deprecated": true,
@@ -24,5 +24,25 @@
"user_model_priority": true,
"chatgpt_rw": true,
"codex_rw": true
}
},
"version": "V1R1C0",
"baseline_tag": "V1R1C0-baseline-20260706",
"source": "AIOS_V1R1C0_MULTIUSER_GITOPS_CUSTOM_LLM_PROD_FULL_DEPLOY_20260706.zip",
"source_package": "AIOS_V1R1C0_MULTIUSER_GITOPS_CUSTOM_LLM_PROD_FULL_DEPLOY_20260706.zip",
"zip_update_mode": "deprecated",
"chatgpt_access": true,
"codex_access": true,
"git_url": "https://cnnetmkt.top/git/aios/aios-v23.git",
"short_links": [
"/git",
"/base",
"/ver",
"/diff",
"/patch",
"/model",
"/run",
"/api",
"/hook"
],
"updated_at": "2026-07-06T07:13:01.298789+00:00"
}
+42
View File
@@ -0,0 +1,42 @@
# BEGIN AIOS V1R1C0 GitOps short links
location = /git { return 302 /git/; }
location /git/ {
proxy_pass http://127.0.0.1:3000/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Prefix /git;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_redirect off;
}
location = /api { return 302 /api/; }
location /api/ {
proxy_pass http://127.0.0.1:18890/api/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location = /base { proxy_pass http://127.0.0.1:18890/base; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; }
location = /ver { proxy_pass http://127.0.0.1:18890/ver; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; }
location = /diff { proxy_pass http://127.0.0.1:18890/diff; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; }
location = /patch { proxy_pass http://127.0.0.1:18890/patch; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; }
location = /model { proxy_pass http://127.0.0.1:18890/model; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; }
location = /run { proxy_pass http://127.0.0.1:18890/run; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; }
location = /hook { proxy_pass http://127.0.0.1:18890/hook; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; }
location /hook/ {
proxy_pass http://127.0.0.1:18890/hook/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# END AIOS V1R1C0 GitOps short links
@@ -0,0 +1,48 @@
# AIOS V1R1C0 Online Baseline Acceptance
AIOS_V1R1C0_ONLINE_BASELINE_STATUS=PARTIAL
DOMAIN=https://cnnetmkt.top
SHORT_LINKS=/git,/base,/ver,/diff,/patch,/model,/run,/api,/hook
PROXY=NGINX_TEMP (NPM_NOT_RUNNING)
GIT_URL=https://cnnetmkt.top/git/aios/aios-v23.git
BASELINE_VERSION=V1R1C0
BASELINE_TAG=V1R1C0-baseline-20260706
WORKSPACE=/data/aios-gitops/workspace
WEBOPS_REUSED=YES
CASDOOR_REUSED=PARTIAL
OPENCLAW_REUSED=PARTIAL
HERMES_REUSED=YES
ONE_API_REUSED=YES
GITEA_REUSED=NEW
CUSTOM_LLM_STATUS=OK
MODEL_PRIORITY_STATUS=OK
RUNTIME_SELECTOR_STATUS=OK
ACCEPTANCE_REPORT=/data/aios-gitops/artifacts/AIOS_V1R1C0_ONLINE_BASELINE_ACCEPTANCE.md
KNOWN_ISSUES=NPM is not running on this host, so system nginx currently serves the short links; OpenClaw gateway is active but native openclaw agent execution still needs gateway/provider credentials; host-side DNS resolution for cnnetmkt.top is unreliable, so local validation used --resolve to 127.0.0.1; Docker Hub pull for Gitea was blocked by the existing Docker proxy path and was replaced with official Gitea binary deployment.
NEXT_UPDATE_MODE=git_patch_only
ZIP_UPDATE_MODE=deprecated
## Evidence
- Imported package: /data/aios-gitops/imports/AIOS_V1R1C0_MULTIUSER_GITOPS_CUSTOM_LLM_PROD_FULL_DEPLOY_20260706.zip
- Package SHA256: dbee5d45aab02aab33e862bb9beb6115b3b43137e0fb5e00c98448ac1ecfd0f9
- Git workspace: /data/aios-gitops/workspace
- Baseline branch: main
- Baseline tag: V1R1C0-baseline-20260706
- Git remote: https://cnnetmkt.top/git/aios/aios-v23.git
- Gitea internal version: 1.22.6
- API service: aios-gitops-model-api.service on 127.0.0.1:18890
- Gitea service: aios-gitea.service on 127.0.0.1:3000
- Hermes executor health: ok
- One API reused at: 127.0.0.1:13000
- WebOps reused container: aios-webops-server-hw-webops-1
- Parallel server agents: git_service_agent, entry_proxy_agent, gitops_api_uat_agent, acceptance_report_agent
- Parallel agent report: /data/aios-gitops/artifacts/AIOS_V1R1C0_PARALLEL_AGENT_STATUS.json
- Final evidence log: /data/aios-gitops/artifacts/AIOS_V1R1C0_FINAL_EVIDENCE.txt
## GitOps Rules
- ZIP update mode is deprecated after initial import.
- Future updates must be git branch + commit + push + webhook.
- Patches are represented as git branches and are reviewable by diff.
- ChatGPT/Codex write path is /api/git-control-compatible endpoints exposed by the GitOps API.
+4 -1
View File
@@ -5,5 +5,8 @@
"name": "MultiUser GitOps Custom LLM Baseline",
"source": "AIOS_V1R1C0_MULTIUSER_GITOPS_CUSTOM_LLM_PROD_FULL_DEPLOY_20260706.zip",
"update_mode": "git_patch_only",
"zip_update_mode": "deprecated_after_import"
"zip_update_mode": "deprecated",
"baseline_tag": "V1R1C0-baseline-20260706",
"git_url": "https://cnnetmkt.top/git/aios/aios-v23.git",
"updated_at": "2026-07-06T07:13:01.299045+00:00"
}