迭代 ONE-OS 多原型:加氢记录/订单同源对账、租赁明细校验与月度损益、车辆与台账增强;新增客户回款与加氢站统计;补齐业务逻辑与对象存储发布规范,同步原型导航。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
王冕
2026-07-16 09:00:13 +08:00
parent aa6b9a7683
commit 47c223a666
130 changed files with 17507 additions and 4461 deletions

View File

@@ -0,0 +1,86 @@
# 对象存储发布 URL 规范(全局)
Make 客户端「发布到对象存储」与脚本/Agent 批量发布**必须使用同一套公网路径**,避免维护两套链接。
配置来源:`.axhub/make/axhub.config.json``cloudPublishing.s3`
---
## 标准 URL 形态
```text
{baseUrl}/{objectPrefix}/index.html
```
| 项 | 默认值 | 示例 |
|---|---|---|
| `baseUrl` | `https://prototype.lnoneos.com` | — |
| 原型页 `objectPrefix` | `{prototype-id}` | `lease-business-detail` |
| 主题页 `objectPrefix` | `themes/{theme-id}` | `themes/claude` |
| 入口文件名 | **固定** `index.html` | 不得改为 `/``.html` 省略或 `index.htm` |
**租赁业务明细(范例)**
```text
https://prototype.lnoneos.com/lease-business-detail/index.html
```
---
## 禁止的改写
| ❌ 禁止 | 说明 |
|--------|------|
| 加 `prototypes/` 前缀 | 不得发布为 `/prototypes/lease-business-detail/index.html` |
| 去掉 `index.html` | 不得改为目录根 `/lease-business-detail/` |
| 改 `baseUrl` 域名 | 以 `axhub.config.json``s3.baseUrl` 为准 |
| 自造路径别名 | 仅 `pathAliases` 中已声明的 id 可例外 |
---
## pathAliases例外
仅在 `axhub.config.json``cloudPublishing.s3.pathAliases` 中显式配置时覆盖默认前缀,例如:
```json
"pathAliases": {
"oneos-prototype-nav": "oneos-prototype-nav"
}
```
新增别名须**同时**更新:
1. `axhub.config.json``pathAliases`
2. `src/prototypes/oneos-prototype-nav/nav-data.ts``CLOUD_PUBLISH_PATH_ALIASES`
3. `prototype-registry.json` 变更说明(如有)
---
## 实现对照
| 场景 | 路径解析 |
|------|----------|
| Make 客户端发布 | `/{prototype-id}/index.html` |
| `scripts/publish-all-to-s3.mjs` | `resolveObjectPrefix()` → 同上 |
| 导航页 `resolvePrototypeHref()` | 云主机上 `/{segment}/index.html` |
| 本地开发 | `/prototypes/{prototype-id}`(仅 dev不是发布 URL |
---
## Agent / AI 发布检查清单
发布或向用户回报链接前:
- [ ] 使用 `axhub.config.json` 中的 `baseUrl`
- [ ] 原型链接以 `/index.html` 结尾
- [ ] 未擅自添加 `prototypes/` 前缀
- [ ] 与 Make 工具弹窗中的 URL 逐字一致
- [ ] 未将 dev 路径(`/prototypes/...`)当作对象存储链接写入 PRD/导航
---
## 关联文件
- `scripts/publish-all-to-s3.mjs``resolveObjectPrefix``resolvePublicUrl`
- `src/prototypes/oneos-prototype-nav/nav-data.ts` — 静态站跳转
- `.cursor/rules/cloud-publish-url.mdc` — Agent 强制规则