Sync OneOS workspace with new prototypes, annotations, and Gitea remote fix.

Add vehicle-h2-fee-ledger, customer-management, lease and self-operated ledgers, annotation sources, agent skills, and vite annotation runtime support. Update vehicle management, contract templates, and lease contract flows.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
王冕
2026-06-30 15:27:23 +08:00
parent 00ca1846af
commit af29b26fe8
309 changed files with 73875 additions and 3838 deletions

View File

@@ -9,7 +9,7 @@ Axhub 画布节点本质上是标准 Excalidraw 元素Axhub 扩展信息存
| `customData.title` | 面向用户的节点标题 |
| `customData.previewUrl` | 预览模式中渲染的 URL |
| `customData.openUrl` | 节点操作中打开的 URL |
| `customData.previewKind` | 渲染类型,例如 `web``doc``image``none``ai-image-generator``prototype-generator` |
| `customData.previewKind` | 渲染类型,例如 `web``doc``image``none` |
| `customData.resourceType` | 资源类型:`prototype``doc``theme` |
| `customData.resourceId` | 项目 metadata 中的资源 id 或名称 |
| `customData.embedViewMode` | `link` 表示紧凑链接卡片,`preview` 表示渲染嵌入预览 |
@@ -44,19 +44,10 @@ Axhub 画布节点本质上是标准 Excalidraw 元素Axhub 扩展信息存
}
```
由 AI 原型生成能力产出的原型节点还可能包含:
```json
{
"generatedBy": "axhub-prototype-generator",
"sourceTaskId": "<task-id>",
"prompt": "<prompt>"
}
```
### 文档节点
通过 `customData.type: "axhub-doc"``customData.resourceType: "doc"` 识别。
当画布任务需要生成文档、说明、PRD、清单、列表、报告或其他文本内容时优先把正文写成 `src/resources/` 下的 Markdown再用文档节点引用该资源画布只放摘要或入口。
常见字段:
@@ -82,65 +73,31 @@ Axhub 画布节点本质上是标准 Excalidraw 元素Axhub 扩展信息存
主题节点与原型/文档节点使用相同的 `embeddable` 结构,`resourceType``theme``previewKind` 通常为 `web``none`
## AI 生成节点
## Drawio 节点
AI 生成节点是图片元素。占位图或生成图片数据保存在 `files[fileId]`
Drawio 节点是图片元素。`files[fileId].dataURL` 保存带 Drawio XML 的 SVG 预览,`customData.type` 固定为 `axhub-drawio`
### AI 图片生成节点
只有用户明确要求 Draw.io、`.drawio`、diagrams.net、可编辑 Draw.io 资产,或 `canvas-workspace` 已选择 Drawio 节点时,才在当前原型的 `canvas.excalidraw` 中创建或更新这种节点。
识别 Drawio 节点以 `customData.type: "axhub-drawio"` 为准;`previewKind` 只是预览展示元信息。
```json
{
"type": "image",
"fileId": "axhub-ai-image-placeholder-v2",
"fileId": "drawio-file-<id>",
"customData": {
"type": "axhub-ai-image-generator",
"title": "AI 生成图片",
"previewKind": "ai-image-generator"
"type": "axhub-drawio",
"title": "Drawio 图表",
"previewKind": "drawio"
}
}
```
### AI 图片结果节点
创建或更新 Drawio 节点时:
```json
{
"type": "image",
"fileId": "<image-id>",
"customData": {
"type": "axhub-ai-image",
"generatedBy": "axhub-ai-image",
"sourceTaskId": "<task-id>",
"prompt": "<prompt>",
"previewKind": "image"
}
}
```
多张生成图片可能共享同一个 `groupIds` 值。
### AI 原型生成节点
```json
{
"type": "image",
"fileId": "axhub-prototype-generator-placeholder-v1",
"customData": {
"type": "axhub-prototype-generator",
"title": "AI 生成原型",
"previewKind": "prototype-generator"
}
}
```
生成完成后,占位节点会被替换为原型嵌入节点,并带有 `generatedBy: "axhub-prototype-generator"`
AI 生成原型替换节点的推荐尺寸:
- 不要把网页内部布局做小;页面代码仍按正常浏览器视口设计。
- `previewUrl``openUrl``link` 使用客户端原型运行时地址,例如 `/prototypes/<prototypeId>` 或带 hash/page 的同源 runtime URL不要使用 Make 管理端首页 deep link例如 `/?p=...``/?resourceType=prototype...`
- 为了避免画布被完整桌面尺寸占满,推荐生成节点可视尺寸为 `720 x 450`
- 同时设置 `customData.embedSizePreset: "desktop"``customData.embedContentScale: 0.5``customData.storedPreviewSize: { "width": 720, "height": 450 }`。这样画布显示为 720x450iframe 与截图按 1440x900 视口渲染。
- 新生成的 prototype embeddable 可设置 `customData.captureScreenshotOnMount: true`,让宿主首次渲染后自动捕获预览截图。截图成功后宿主会清除此字段并写入 `screenshotUrl`,不要手写 `screenshotUrl`
- 推荐持久化资源文件后缀为 `.drawio.svg`,例如 `src/prototypes/<prototype-name>/canvas-assets/diagrams/<diagram-id>.drawio.svg`
- `files[fileId].dataURL` 应是 `data:image/svg+xml;base64,...`
- SVG 根节点应使用 `data-drawio="<base64-encoded mxfile>"` 保存 Drawio XML便于后续在 diagrams.net 编辑器里继续编辑。
- 如果只是初始化一个空 Drawio 节点,可以使用默认空图 XML如果已经确定使用 Draw.io 承载流程图或关系图,应把图结构写入 Drawio XML而不是只写普通 Excalidraw 文本框。
## 图片文件