fix: 部署对齐——包名/URL前缀/模型格式/补json-build.sh,目标机json2ddl实测通过

This commit is contained in:
pipeline-agent 2026-08-29 23:07:31 +08:00
parent 6788d64204
commit 63fcac49ae
13 changed files with 17 additions and 22 deletions

View File

@ -3,7 +3,7 @@ requires = ["setuptools>=45", "wheel"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[project] [project]
name = "runtime" name = "scense_runtime"
version = "1.0.0" version = "1.0.0"
description = "元景 W-10 运行时执行引擎(前端 JS 引擎 + 可选服务端辅助)" description = "元景 W-10 运行时执行引擎(前端 JS 引擎 + 可选服务端辅助)"
requires-python = ">=3.8" requires-python = ">=3.8"
@ -11,4 +11,4 @@ dependencies = ["sqlor", "bricks_for_python"]
[tool.setuptools.packages.find] [tool.setuptools.packages.find]
where = ["."] where = ["."]
include = ["runtime*"] include = ["scense_runtime*"]

View File

@ -14,7 +14,7 @@ from .runtime_service import (
) )
async def load_runtime(env): def load_runtime(env):
"""挂载 runtime 模块到 ServerEnv(宿主应用 app/scense.py 在 init() 中调用)。 """挂载 runtime 模块到 ServerEnv(宿主应用 app/scense.py 在 init() 中调用)。
参数 env: ahserver.ServerEnv 单例。 参数 env: ahserver.ServerEnv 单例。

View File

@ -3,7 +3,7 @@
"""runtime 模块 RBAC 路径注册脚本(scripts/load_path.py)。 """runtime 模块 RBAC 路径注册脚本(scripts/load_path.py)。
模块目录结构硬性要求(review-develop 第一章):每个业务模块必须携带本脚本。 模块目录结构硬性要求(review-develop 第一章):每个业务模块必须携带本脚本。
本脚本将 /runtime/play.html、/runtime/api/*.dspy、index.ui 等全部新路径注册到 本脚本将 /scense_runtime/play.html、/scense_runtime/api/*.dspy、index.ui 等全部新路径注册到
宿主 RBAC(角色分层:any=静态资源免登录;logined=登录即可), 宿主 RBAC(角色分层:any=静态资源免登录;logined=登录即可),
并同步提示写入中央 load_path.py(双入口,防 per-module 脚本静默失败)。 并同步提示写入中央 load_path.py(双入口,防 per-module 脚本静默失败)。
@ -13,23 +13,23 @@ import os
import subprocess import subprocess
import sys import sys
MOD = 'runtime' MOD = 'scense_runtime'
# ---- 角色分层路径清单(新增页面/API 必须同步维护此处) ---- # ---- 角色分层路径清单(新增页面/API 必须同步维护此处) ----
# any:免登录静态资源(JS/CSS;页面内由 ahserver 自动服务) # any:免登录静态资源(JS/CSS;页面内由 ahserver 自动服务)
PATHS_ANY = [ PATHS_ANY = [
'/runtime/runtime.js', '/scense_runtime/runtime.js',
] ]
# logined:登录即可访问的页面与 API # logined:登录即可访问的页面与 API
PATHS_LOGINED = [ PATHS_LOGINED = [
'/runtime', '/scense_runtime',
'/runtime/index.ui', '/scense_runtime/index.ui',
'/runtime/play.html', '/scense_runtime/play.html',
'/runtime/api/load_world.dspy', '/scense_runtime/api/load_world.dspy',
'/runtime/api/runtime_status.dspy', '/scense_runtime/api/runtime_status.dspy',
'/runtime/api/runtime_event.dspy', '/scense_runtime/api/runtime_event.dspy',
'/runtime/api/runtime_control.dspy', '/scense_runtime/api/runtime_control.dspy',
] ]
CENTRAL_HINT = ( CENTRAL_HINT = (

View File

@ -46,7 +46,7 @@
"actiontype": "urlwidget", "actiontype": "urlwidget",
"target": "app.runtime_content", "target": "app.runtime_content",
"options": { "options": {
"url": "{{entire_url('/runtime/play.html')}}" "url": "{{entire_url('/scense_runtime/play.html')}}"
}, },
"mode": "replace" "mode": "replace"
} }
@ -85,7 +85,7 @@
"actiontype": "urlwidget", "actiontype": "urlwidget",
"target": "app.runtime_content", "target": "app.runtime_content",
"options": { "options": {
"url": "{{entire_url('/runtime/api/runtime_status.dspy?runtime_id=local')}}" "url": "{{entire_url('/scense_runtime/api/runtime_status.dspy?runtime_id=local')}}"
}, },
"mode": "replace" "mode": "replace"
} }

View File

@ -153,7 +153,7 @@
// 控件 // 控件
btnStart.onclick = function () { btnStart.onclick = function () {
// 尝试服务端辅助初始化;失败自动降级独立模式(W-10i) // 尝试服务端辅助初始化;失败自动降级独立模式(W-10i)
fetch('/runtime/api/load_world.dspy?world_id=w10_demo', { method: 'GET' }) fetch('/scense_runtime/api/load_world.dspy?world_id=w10_demo', { method: 'GET' })
.then(function (r) { return r.json(); }) .then(function (r) { return r.json(); })
.then(function (data) { .then(function (data) {
rt.initWorld(data); rt.initWorld(data);

View File

@ -17,7 +17,7 @@
* *
* 用法: * 用法:
* var rt = new RuntimeEngine({ worldId: 'w1', canvas: canvasEl }); * var rt = new RuntimeEngine({ worldId: 'w1', canvas: canvasEl });
* rt.initWorld(serverData); // serverData 可来自 /runtime/api/load_world.dspy * rt.initWorld(serverData); // serverData 可来自 /scense_runtime/api/load_world.dspy
* rt.start(); * rt.start();
* rt.on('log', function(m){ ... }); // UI 订阅日志 * rt.on('log', function(m){ ... }); // UI 订阅日志
*/ */

View File

@ -1 +0,0 @@
调用 load_runtime_world 组装运行时数据

View File

@ -1 +0,0 @@
调用 runtime_status 健康检查

View File

@ -1 +0,0 @@
见交付正文 engine.js(RuntimeEngine/EntityRuntime 完整实现,9 能力)

View File

@ -1 +0,0 @@
模块入口页(Iframe 集成 play.html)

View File

@ -1 +0,0 @@
沙盒页:画布渲染实体树 + 控制面板(初始化/加载/开始/暂停/恢复/停止)+ 事件日志 + 错误日志 + 统计,点击实体派发 click 事件