create-windy 0.6.7 → 0.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/README.md +2 -2
  2. package/dist/cli.js +158 -95
  3. package/package.json +1 -1
  4. package/template/.windy-template.json +2 -2
  5. package/template/README.md +4 -2
  6. package/template/apps/agent-server/README.md +4 -4
  7. package/template/apps/server/src/data-access/drizzle-predicate.ts +16 -6
  8. package/template/apps/server/src/runtime-development.ts +1 -0
  9. package/template/apps/web/src/layout/AppSidebar.vue +1 -0
  10. package/template/apps/web/src/pages/ui/UiComponentPage.vue +7 -0
  11. package/template/apps/web/src/pages/ui/UiComponentPage.webtest.ts +94 -0
  12. package/template/apps/web/src/pages/ui/component-catalog.ts +248 -0
  13. package/template/apps/web/src/pages/ui/components/ComponentPreviewCard.vue +50 -0
  14. package/template/apps/web/src/pages/ui/components/DataComponentShowcases.vue +131 -0
  15. package/template/apps/web/src/pages/ui/components/FeedbackComponentShowcases.vue +158 -0
  16. package/template/apps/web/src/pages/ui/components/FoundationComponentShowcases.vue +129 -0
  17. package/template/apps/web/src/pages/ui/components/NavigationComponentShowcases.vue +155 -0
  18. package/template/apps/web/src/pages/ui/components/ProjectComponentShowcases.vue +31 -0
  19. package/template/apps/web/src/pages/ui/components/UiComponentGallery.vue +238 -0
  20. package/template/apps/web/src/router/index.ts +2 -0
  21. package/template/apps/web/src/router/manifest-routes.webtest.ts +1 -0
  22. package/template/apps/web/src/router/platform-admin-route-bindings.ts +3 -1
  23. package/template/docs/architecture/ai-egress.md +1 -1
  24. package/template/docs/architecture/ai-runtime-readiness.md +2 -2
  25. package/template/docs/architecture/ai-runtime.md +15 -15
  26. package/template/docs/architecture/module-secret-resolution.md +4 -4
  27. package/template/docs/architecture/report-staging.md +1 -1
  28. package/template/docs/development/business-web-routes.md +3 -1
  29. package/template/docs/development/custom-login-page.md +3 -3
  30. package/template/docs/development/ui-component-gallery.md +44 -0
  31. package/template/docs/license/license-offline-activation-code.md +2 -2
  32. package/template/docs/operations/incremental-delivery.md +10 -9
  33. package/template/docs/platform/agent-runtime.md +4 -4
  34. package/template/docs/platform/document-ai-runtime.md +3 -3
  35. package/template/docs/platform/speech-ai-runtime.md +1 -1
  36. package/template/docs/platform/vision-ai-runtime.md +1 -1
  37. package/template/docs/product/built-in-roles.md +9 -1
  38. package/template/packages/modules/package.json +1 -1
  39. package/template/packages/modules/src/system-admin-routes.ts +8 -0
  40. package/template/packages/modules/src/system-admin-ui-catalog.ts +1 -1
  41. package/template/packages/modules/src/system-features.ts +5 -0
  42. package/template/packages/modules/src/system-module-catalog.ts +2 -1
  43. package/template/packages/modules/src/system-modules.ts +11 -0
  44. package/template/packages/modules/src/system-permissions.ts +2 -0
  45. package/template/packages/modules/src/system-ui-components.test.ts +36 -0
@@ -1,4 +1,4 @@
1
- # Southwind AI Runtime 架构
1
+ # Windy AI Runtime 架构
2
2
 
3
3
  更新时间:2026-07-31。
4
4
 
@@ -18,7 +18,7 @@ Vision 已提供 `agent.vision` 的多图片受控输入、像素限制、逐次
18
18
 
19
19
  ## 目标
20
20
 
21
- Southwind AI 为生成项目提供可选的 AI Runtime。它统一治理模型 Deployment、业务 Operation、Feature Flag、RBAC Permission、License、Audit、Secret、用量和离线部署,但不自行重做通用 Agent Framework、LLM Router、OCR 引擎或语音模型。
21
+ Windy 为生成项目提供可选的 AI Runtime。它统一治理模型 Deployment、业务 Operation、Feature Flag、RBAC Permission、License、Audit、Secret、用量和离线部署,但不自行重做通用 Agent Framework、LLM Router、OCR 引擎或语音模型。
22
22
 
23
23
  首期目标:
24
24
 
@@ -34,14 +34,14 @@ Southwind AI 为生成项目提供可选的 AI Runtime。它统一治理模型 D
34
34
 
35
35
  ## 核心决策
36
36
 
37
- 1. Agent Runtime 是 Southwind AI 的官方可选底座能力,不是每个业务 Module 自行实现的功能。
37
+ 1. Agent Runtime 是 Windy 的官方可选底座能力,不是每个业务 Module 自行实现的功能。
38
38
  2. Agent Server 独立部署,首期使用 Python ADK;ADK 只属于内部 Implementation。
39
39
  3. 首个文本切片由 Agent Server 内置 OpenAI-compatible Adapter;需要多 Provider
40
40
  路由、fallback 与集中限流时,再引入独立自托管 LiteLLM Proxy。
41
41
  4. OCR 和文档解析由独立 Document AI Server 执行,不放入 Agent Server 或 LiteLLM。
42
42
  5. ASR、TTS 和 AI Dictation 由独立 Speech Server 执行;实时 Agent 会话由 Agent Server 编排。
43
43
  6. 文本 LLM、VLM 和 Agent 输出使用 SSE;实时音频/视频需要双向传输,使用 WebSocket。
44
- 7. Southwind AI Server 是身份、Feature、Permission、License、数据范围、Tool 授权和 Audit 的事实源。
44
+ 7. Windy Server 是身份、Feature、Permission、License、数据范围、Tool 授权和 Audit 的事实源。
45
45
  8. 所有业务文件通过 `ArtifactRef` 传递,不在跨服务 DTO 中携带大型 Base64 文件或本地绝对路径。
46
46
 
47
47
  ## 总体拓扑
@@ -51,7 +51,7 @@ Southwind AI 为生成项目提供可选的 AI Runtime。它统一治理模型 D
51
51
  │
52
52
  │ AgentOperation / DocumentOperation / SpeechOperation
53
53
  ▼
54
- Southwind AI Server
54
+ Windy Server
55
55
  ├── Feature / RBAC / License / Audit / Data Scope
56
56
  ├── AI Deployment Registry
57
57
  ├── Agent Tool Host
@@ -81,7 +81,7 @@ Southwind AI Server
81
81
 
82
82
  ## Module 与部署职责
83
83
 
84
- ### Southwind AI Server
84
+ ### Windy Server
85
85
 
86
86
  拥有:
87
87
 
@@ -109,12 +109,12 @@ Southwind AI Server
109
109
  - ADK Runner、Workflow、Session、Checkpoint、Eval;
110
110
  - Agent、Workflow 和 Prompt Release;
111
111
  - Run 生命周期、取消、恢复和 canonical event;
112
- - ADK Event 到 Southwind AI Event 的转换;
112
+ - ADK Event 到 Windy Event 的转换;
113
113
  - Agent Step、Prompt Version、Tool Call 和模型 attempt 的关联;
114
114
  - 开发环境 ADK Web;
115
115
  - 实时 Agent 会话编排。
116
116
 
117
- Agent Server 不直接访问业务 Repository。模型产生 Tool Call 只表示执行意图;每次真实 Tool 执行都必须回到 Southwind AI Tool Host,重新检查当前 Feature、License、Permission 和数据范围。
117
+ Agent Server 不直接访问业务 Repository。模型产生 Tool Call 只表示执行意图;每次真实 Tool 执行都必须回到 Windy Tool Host,重新检查当前 Feature、License、Permission 和数据范围。
118
118
 
119
119
  ### LiteLLM Proxy
120
120
 
@@ -187,7 +187,7 @@ credential 删除 scope,缺少 credential 时如实保留 Host TTL cleanup pen
187
187
  Document、Speech 与 Embedding Interface 已分别由 `./document`、`./speech`、
188
188
  `./embedding` 子路径交付。
189
189
 
190
- npm Module 数量与部署进程数量是两个不同维度。Southwind Server、Agent Server、
190
+ npm Module 数量与部署进程数量是两个不同维度。Windy Server、Agent Server、
191
191
  Document AI Server 和 Speech Server 仍独立部署:它们具有不同的协议、资源和故障域;
192
192
  业务侧则只学习一个稳定入口。`ai-client` 内部通过 Agent、Document、Speech Adapter
193
193
  隔离远端 Implementation,不能把 ADK、LiteLLM、PaddleOCR 或 Provider SDK 类型暴露给业务。
@@ -379,7 +379,7 @@ Endpoint 配置属于高风险管理动作,必须具备独立 Permission 和
379
379
 
380
380
  SSE 是单向 Server-to-Client 协议。创建、取消、审批、恢复和 Tool continuation 使用独立 HTTP command,不在 SSE 连接中反向发送。
381
381
 
382
- Southwind AI Server 与 Agent Server 之间使用本节定义的 canonical SSE;Agent Server 调用 LiteLLM 的文本 LLM/VLM 时使用 OpenAI-compatible SSE streaming。Provider 专有流协议在 LiteLLM Adapter 内终止,不能越过该 Seam。VLM 的图片或视频作为请求 Artifact 发送,模型的文本与结构化响应仍通过 SSE 返回。
382
+ Windy Server 与 Agent Server 之间使用本节定义的 canonical SSE;Agent Server 调用 LiteLLM 的文本 LLM/VLM 时使用 OpenAI-compatible SSE streaming。Provider 专有流协议在 LiteLLM Adapter 内终止,不能越过该 Seam。VLM 的图片或视频作为请求 Artifact 发送,模型的文本与结构化响应仍通过 SSE 返回。
383
383
 
384
384
  实时语音和视频需要客户端与服务端同时发送媒体帧,因此使用 WebSocket,不属于本节 SSE 约束。
385
385
 
@@ -663,7 +663,7 @@ type DictationEvent =
663
663
  - 级联:ASR → ADK Agent/LLM → TTS;
664
664
  - 原生双向模型:音频/视频 ⇄ Realtime Model。
665
665
 
666
- 客户端先向 Southwind AI Server 创建 Live Session 并通过 Guard,再使用短时、绑定 Session 和 audience 的凭证连接 Agent Server WebSocket。Tool Call 仍回到 Southwind AI Tool Host 二次授权。
666
+ 客户端先向 Windy Server 创建 Live Session 并通过 Guard,再使用短时、绑定 Session 和 audience 的凭证连接 Agent Server WebSocket。Tool Call 仍回到 Windy Tool Host 二次授权。
667
667
 
668
668
  首期不新增独立 Realtime Server。连接规模、电话线路、WebRTC 或媒体转码成为真实需求后,再把媒体数据面拆出。
669
669
 
@@ -703,7 +703,7 @@ published version 不可原地修改。每次 Run 固定:
703
703
 
704
704
  首期优先使用代码或 YAML、Git、Eval 和不可变 Release。只有出现非开发人员在线编辑的真实需求后,再扩展 diff、审批、回滚、fixture、route 对比和发布管理。
705
705
 
706
- 生产 Trace 优先输出到客户本地 OTel Collector 与 Jaeger/Tempo。Southwind AI 控制面提供脱敏 Run 摘要和受权限保护的 Trace 入口,不复制 ADK Web。
706
+ 生产 Trace 优先输出到客户本地 OTel Collector 与 Jaeger/Tempo。Windy 控制面提供脱敏 Run 摘要和受权限保护的 Trace 入口,不复制 ADK Web。
707
707
 
708
708
  生产默认不持久化完整 Prompt、响应、音频、图片或 Tool 参数。明文诊断需要专门 Feature、Permission、加密、脱敏、TTL 和访问审计。
709
709
 
@@ -720,12 +720,12 @@ published version 不可原地修改。每次 Run 固定:
720
720
  | TTS | 输入字符数、输出音频秒数、GPU 时间 |
721
721
  | Live | Session 时长、输入/输出音频秒数、LLM token、Tool 次数 |
722
722
 
723
- 每条事实标记 `provider-reported`、`estimated` 或 `unknown`;缺失不能记为零。成本绑定调用时的价格快照。LiteLLM 保存 Provider/Deployment 原始事实,Agent Server 保存 Run/Step 归属,Document AI 和 Speech Server 保存各自模态事实,Southwind AI 通过共享 invocation ID 汇总展示。
723
+ 每条事实标记 `provider-reported`、`estimated` 或 `unknown`;缺失不能记为零。成本绑定调用时的价格快照。LiteLLM 保存 Provider/Deployment 原始事实,Agent Server 保存 Run/Step 归属,Document AI 和 Speech Server 保存各自模态事实,Windy 通过共享 invocation ID 汇总展示。
724
724
 
725
725
  ## 安全与授权
726
726
 
727
727
  - 浏览器和普通业务前端不能直接使用 LiteLLM master key;
728
- - Southwind AI Server 在发起 Run 前执行 License → Feature → Permission Guard;
728
+ - Windy Server 在发起 Run 前执行 License → Feature → Permission Guard;
729
729
  - Remote Runtime 只接受短时、限 audience、限 Operation、绑定 actor、run 和 expiry 的 Execution Grant;
730
730
  - Grant 不能携带长期有效的 Permission 列表作为授权事实;
731
731
  - Tool 执行、人工批准后的继续和后台重试都重新读取当前授权;
@@ -797,7 +797,7 @@ fail closed。开发 ADK Web 已作为 localhost-only 的受控调试入口交
797
797
  - 文本 LLM、VLM 和 Agent 输出统一通过 canonical SSE;
798
798
  - SSE 断线后使用 cursor 恢复,不重新执行模型调用;
799
799
  - Feature、Permission、License 任一拒绝都会 fail-closed;
800
- - 模型 Tool Call 不能绕过 Southwind AI Tool Host;
800
+ - 模型 Tool Call 不能绕过 Windy Tool Host;
801
801
  - 同一 Run 能关联 Audit、ADK Trace、LiteLLM attempt 和 Usage;
802
802
  - 本地/内网模型可配置协议、主机、端口和 Base Path;
803
803
  - 完全断网环境仍可运行已配置的本地 LLM、OCR 和 Speech Operation;
@@ -221,14 +221,14 @@ Resolver 不会被调用。
221
221
  泄漏,但不能识别回调返回的其它未知凭据,也不能把故意通过网络或其它副作用发送凭据的
222
222
  恶意模块变成安全代码。这些边界必须继续通过代码审查、模块来源治理和网络策略控制。
223
223
 
224
- ## 利剑 SMB / SFTP 接入
224
+ ## SMB / SFTP 业务模块接入示例
225
225
 
226
- 利剑升级到包含该契约的 Windy 版本后,按以下方式接入,不需要修改 Windy 的配置
226
+ 业务项目升级到包含该契约的 Windy 版本后,按以下方式接入,不需要修改 Windy 的配置
227
227
  Registry 或 Agent Tool Runtime:
228
228
 
229
- 1. 在拥有 SMB/SFTP 同步能力的利剑 Module Manifest 分别声明 password/private-key
229
+ 1. 在拥有 SMB/SFTP 同步能力的业务 Module Manifest 分别声明 password/private-key
230
230
  handle、稳定 connection/purpose,以及同基础 Key Feature、Permission 和审计动作;
231
- 2. 在利剑 project-owned `server-composition.ts` 为每个声明添加
231
+ 2. 在项目的 project-owned `server-composition.ts` 为每个声明添加
232
232
  SDK 根导出的 `createModuleSecretBinding()`,生产 Resolver 指向客户批准的 Secret
233
233
  Store;
234
234
  3. Route/Service 在一次连接操作内使用
@@ -148,7 +148,7 @@ Starter 会同时裁剪 helper 源码、编译步骤和依赖。非官方镜像
148
148
  需要自行提供同一 helper;缺失或 RAR5 真实读取失败会返回
149
149
  `REPORT_STAGING_UNSUPPORTED_ARCHIVE`,不会回退旧 `bsdtar -x` 或其他外部命令。
150
150
 
151
- 相较老 DSP/原先 `bsdtar` 直接解压,当前实现保留已由真实 probe 验证的 RAR5 streaming
151
+ 相较旧的外部命令直解压方案,当前实现保留已由真实 probe 验证的 RAR5 streaming
152
152
  reader,但把落盘所有权和逐 write 配额检查收回 Host,并用可严格解析的 framing 取代
153
153
  人类可读 listing。V1 callback 刻意不提供 seek/reopen;需要随机 seek 的 RAR4、ZIP 或
154
154
  其他格式会 fail closed,当前不承诺与通用 `archive_read_open_filenames` 格式等价。
@@ -4,7 +4,8 @@
4
4
 
5
5
  整个 `apps/web/src` 都是 project-owned 应用源码。布局、页面、组件库封装、Router、
6
6
  导航呈现与 Host 实现均可由项目修改、替换或删除;普通 `windy update` 和模块命令不能
7
- 为了接入入口而重写这些文件。
7
+ 为了接入入口而整文件重写这些文件。一次性兼容迁移可以使用版本 recipe 修改已登记的
8
+ 窄锚点,具体例外见[项目 UI 组件展厅](./ui-component-gallery.md)。
8
9
 
9
10
  ## package 默认贡献
10
11
 
@@ -63,6 +64,7 @@ Foundation 访问快照改善导航和直达体验。`admin.visible=false` 只
63
64
  - 客户保留、修改与删除均由项目决定;
64
65
  - 删除以 tombstone 跨版本保留;
65
66
  - 模块 package 更新只改变依赖与自身导出,不改客户 layout、Router 或页面;
67
+ - 已登记版本 recipe 只追加明确的兼容锚点,缺失或不唯一时 fail closed;
66
68
  - Host 不再实现协议时,CLI/构建只诊断并 fail closed,不能覆盖客户实现。
67
69
 
68
70
  未来若提供整套 Admin 预设更新,它必须是独立、显式选择的三方合并能力;当前没有
@@ -30,13 +30,13 @@ export const loginPageComponent = defineLoginPageComponent(PlatformLoginPage);
30
30
  ## 完整业务页面
31
31
 
32
32
  将业务页面放在同一个 project-owned 目录,例如
33
- `apps/web/src/app/auth/SharpSwordLoginPage.vue`,然后只修改 selector:
33
+ `apps/web/src/app/auth/ProjectLoginPage.vue`,然后只修改 selector:
34
34
 
35
35
  ```ts
36
- import SharpSwordLoginPage from "./SharpSwordLoginPage.vue";
36
+ import ProjectLoginPage from "./ProjectLoginPage.vue";
37
37
  import { defineLoginPageComponent } from "@/pages/auth/login-page-extension";
38
38
 
39
- export const loginPageComponent = defineLoginPageComponent(SharpSwordLoginPage);
39
+ export const loginPageComponent = defineLoginPageComponent(ProjectLoginPage);
40
40
  ```
41
41
 
42
42
  业务 SFC 使用 Vue 3 Composition API 和 TypeScript。认证提交必须复用
@@ -0,0 +1,44 @@
1
+ # 项目 UI 组件展厅
2
+
3
+ 更新时间:2026-08-21。
4
+
5
+ ## 能力边界
6
+
7
+ `/ui/component` 展示当前项目在
8
+ `apps/web/src/components/ui/*/index.ts` 中封装的全部组件族。页面不维护第二份目录清单:
9
+ Vite 在构建当前项目时扫描每个 `index.ts`,因此下游新增 `radio-group`、`textarea` 等
10
+ 组件后,会自动出现在“项目扩展”分组并列出真实具名导出。
11
+
12
+ Windy 自带组件提供可操作的主题内示例。项目扩展组件默认只展示发现结果与导出名,因为
13
+ 任意组件所需的 props、slot 和业务上下文无法安全推断;项目可继续在自己的页面中增加
14
+ 针对性预览,组件入口本身仍由项目拥有。
15
+
16
+ 该页面属于 `system` Module,统一使用以下 Manifest 事实:
17
+
18
+ - Feature:`system.ui-components`;
19
+ - Permission:`system.ui-components.read`;
20
+ - Admin Route:`system.ui-components`,路径 `/ui/component`;
21
+ - 菜单入口与直达路由均经过现有 Feature/RBAC Guard。
22
+
23
+ ## 下游升级
24
+
25
+ `create-windy@0.6.9` 的 `starter-0.6.8-to-0.6.9` recipe 会创建新的展厅页面文件,并在
26
+ 下游项目现有 Router 中只追加两处登记内容:
27
+
28
+ 1. `platformAdminPageComponents` 中的懒加载页面 binding;
29
+ 2. `PlatformAdminPageKey` 与 `system.ui-components` Route binding。
30
+
31
+ 这不是对整个 Admin 预设的重新同步。其余 `apps/web/src` 文件仍为 project-owned,
32
+ 客户的 layout、业务 Route、页面和组件不会被模板覆盖。recipe 只接受唯一的稳定锚点;
33
+ 若项目已经完全替换 Host,或锚点缺失/不唯一,dry-run 会报告冲突并在写入前停止。完成
34
+ 升级后建议检查:
35
+
36
+ ```bash
37
+ bun run windy update --dry-run
38
+ bun run windy update
39
+ bun run windy doctor
40
+ bun run --cwd apps/web typecheck
41
+ ```
42
+
43
+ 验收时应确认 `/ui/component` 可访问,并且组件数量与当前项目
44
+ `apps/web/src/components/ui` 下含 `index.ts` 的目录数量一致。
@@ -50,8 +50,8 @@ W1 是同一份 `SignedLicenseV1` 的离线传输编码,用于客户电脑没
50
50
 
51
51
  下表由当前固定 V1 测试向量测得。`完整编码字符`包含 `W1`、段分隔连字符和校验字符;Base32 本身不包含易混的 `I/L/O/U`。V1 现在只携带单一 License 版本标记,不再包含数量可变的能力列表。
52
52
 
53
- | 样本 | canonical JSON 字节 | 段数 | 完整编码字符 |
54
- | ---------------------------- | ------------------: | ---: | -----------: |
53
+ | 样本 | canonical JSON 字节 | 段数 | 完整编码字符 |
54
+ | ------------------------ | ------------------: | ---: | -----------: |
55
55
  | 仓库固定 V1 版本标记向量 | 673 | 20 | 519 |
56
56
 
57
57
  因此 W1 仍然只是无 U 盘、无摄像头时的兜底入口,不能承诺 150~300 字符。仅 64 字节 ED25519 签名转为 Base32 就需要约 103 个数据字符,V1 还签入客户、项目、合同、设备、时间、公钥 ID 和 License 版本等完整展示字段。
@@ -107,11 +107,11 @@ package `bin`,避免 fresh `bun install` 改写受管源码的 POSIX mode。
107
107
 
108
108
  ```bash
109
109
  sudo install -d -m 0755 /opt/windy/runtime /opt/windy/bin
110
- sudo cp -R ./packages/delivery /opt/windy/runtime/delivery-0.6.7.tmp
111
- sudo chmod 0555 /opt/windy/runtime/delivery-0.6.7.tmp/bin/windy-delivery
112
- sudo mv /opt/windy/runtime/delivery-0.6.7.tmp \
113
- /opt/windy/runtime/delivery-0.6.7
114
- sudo ln -s /opt/windy/runtime/delivery-0.6.7/bin/windy-delivery \
110
+ sudo cp -R ./packages/delivery /opt/windy/runtime/delivery-0.6.8.tmp
111
+ sudo chmod 0555 /opt/windy/runtime/delivery-0.6.8.tmp/bin/windy-delivery
112
+ sudo mv /opt/windy/runtime/delivery-0.6.8.tmp \
113
+ /opt/windy/runtime/delivery-0.6.8
114
+ sudo ln -s /opt/windy/runtime/delivery-0.6.8/bin/windy-delivery \
115
115
  /opt/windy/bin/windy-delivery.next
116
116
  sudo mv -Tf /opt/windy/bin/windy-delivery.next \
117
117
  /opt/windy/bin/windy-delivery
@@ -175,10 +175,11 @@ resource fork 或 Finder metadata。路径组件以 `._` 开头时直接拒绝
175
175
 
176
176
  ## 构建与旧项目升级
177
177
 
178
- `create-windy@0.6.7` 候选把 `packages/delivery`、本说明和 `delivery:remote` 脚本加入
179
- 受管 Starter。`0.6.6 -> 0.6.7` 通过连续 recipe 事务升级;现有 project-owned 发布脚本
180
- 不会被覆盖。正式构建先准备一个完整 release 目录,其中 `images.tar` 必须是 OCI image
181
- layout(含 `oci-layout`、`index.json` 和 `blobs/sha256/*`),再运行:
178
+ `packages/delivery`、本说明和 `delivery:remote` 脚本自 `create-windy@0.6.7` 起进入受管
179
+ Starter;当前公开版为 `0.6.8`,最低支持基线 `0.6.6` 可通过连续 recipe 事务升级,现有
180
+ project-owned 发布脚本不会被覆盖。正式构建先准备一个完整 release 目录,其中
181
+ `images.tar` 必须是 OCI image layout(含 `oci-layout`、`index.json` 和
182
+ `blobs/sha256/*`),再运行:
182
183
 
183
184
  ```bash
184
185
  bun run delivery:remote -- pack \
@@ -3,7 +3,7 @@
3
3
  更新时间:2026-07-26。
4
4
 
5
5
  Windy 的 Agent Runtime 是可选平台能力。业务模块声明稳定的 AI Operation 和允许调用的
6
- Tool;Southwind AI Server 负责身份、Feature、Permission、License、Scope、Execution
6
+ Tool;Windy Server 负责身份、Feature、Permission、License、Scope、Execution
7
7
  Grant 与审计;独立 Agent Server 只负责模型循环、canonical event 和受限 Tool Host
8
8
  回调。业务模块不选择 Provider、模型、Endpoint 或凭据。
9
9
 
@@ -94,7 +94,7 @@ host.registerAiOperationHandlers([
94
94
  放进返回值。`prepare` 只负责把已经过宿主 Guard 的类型化输入转成指令和用户消息。
95
95
 
96
96
  Tool handler 仍通过 `registerToolHandlers` 注册。模型提出 Tool Call 后,Agent Server
97
- 携带短时 opaque grant 回调 Southwind AI Server;受限 Tool Host 会验证:
97
+ 携带短时 opaque grant 回调 Windy Server;受限 Tool Host 会验证:
98
98
 
99
99
  1. grant 是否绑定当前 Run、Operation、Actor 且未过期;
100
100
  2. Tool 是否属于 Operation 的 `allowedToolKeys`;
@@ -106,7 +106,7 @@ Tool 请求不能携带权限列表、License、Scope 或“已授权”标志
106
106
 
107
107
  ## 跨进程 Limits 契约
108
108
 
109
- Manifest 的 Operation limits 同时包含输入、执行时间和输出上限。Southwind AI Server
109
+ Manifest 的 Operation limits 同时包含输入、执行时间和输出上限。Windy Server
110
110
  在调用远端 Agent Server 前先执行文本输入与 Artifact 声明的 `maxInputBytes` 校验;
111
111
  跨进程请求逐字段发送 Agent Server 需要再次执行的时长、输入、输出、图片数量与像素
112
112
  上限。禁止通过展开 Manifest 对象透传 limits:TypeScript 的结构类型不会在运行时
@@ -293,7 +293,7 @@ Operation 契约。
293
293
 
294
294
  ## 客户端协议
295
295
 
296
- 浏览器继续使用 `@southwind-ai/ai-client` 访问同源 Southwind AI Server:
296
+ 浏览器继续使用 `@southwind-ai/ai-client` 访问同源 Windy Server:
297
297
 
298
298
  ```text
299
299
  POST /api/agent/runs
@@ -4,7 +4,7 @@
4
4
 
5
5
  Windy 的 Document AI 是可选的独立故障域。业务模块声明稳定的
6
6
  `kind=document` Operation,并先把当前 Actor 有权读取的业务资源换成短时
7
- `ArtifactRef`;Southwind Server 完成 Feature、RBAC、License、数据范围、业务对象绑定
7
+ `ArtifactRef`;Windy Server 完成 Feature、RBAC、License、数据范围、业务对象绑定
8
8
  和审计后,才把任务交给 Document Server。未安装或未配置 Document Server 时,对应
9
9
  Operation 稳定返回 `CAPABILITY_UNAVAILABLE`,普通业务和文本 Agent 仍可启动。
10
10
 
@@ -103,7 +103,7 @@ Repository 证明当前 Actor 可访问真实资源并绑定该文件时才会
103
103
 
104
104
  ## HTTP 与事件协议
105
105
 
106
- 浏览器通过同源 Southwind Server 调用:
106
+ 浏览器通过同源 Windy Server 调用:
107
107
 
108
108
  ```text
109
109
  POST /api/document/runs
@@ -131,7 +131,7 @@ fail closed;Adapter 的单源 multipart 字段为 `file`,多源字段为重
131
131
 
132
132
  ### Output Artifact 握手
133
133
 
134
- Output Sink 启用时,Southwind Host 在调用 Runtime 前冻结:
134
+ Output Sink 启用时,Windy Host 在调用 Runtime 前冻结:
135
135
 
136
136
  - 预分配的 `runId`;
137
137
  - 不含 credential 的 Sink Descriptor,包括 scope、output kind、部署/Release/Offer/
@@ -16,7 +16,7 @@ Agent 启动。
16
16
  Repository 回查 `resourceId`、`fileId` 与当前 Actor 的真实关系。
17
17
  2. 模块路由调用 `context.aiArtifacts.issue(...)` 换取加密、短时、opaque
18
18
  `ArtifactRef`。
19
- 3. `@southwind-ai/ai-client/speech` 只把 Artifact 与领域选项提交到同源 Southwind
19
+ 3. `@southwind-ai/ai-client/speech` 只把 Artifact 与领域选项提交到同源 Windy
20
20
  Server。
21
21
  4. Server 重新检查 Feature、Permission、License、数据范围、能力摘要和 Artifact
22
22
  元数据,并按 Actor + Operation 作用域化幂等键。
@@ -12,7 +12,7 @@ Windy 的首个 Vision 切片在现有 Agent canonical Run 上增加受治理的
12
12
 
13
13
  - 浏览器和业务模块只提交平台签发的 opaque `ArtifactRef`,不能提交 URL、Base64、
14
14
  BlobStore Key、宿主路径、模型名或 Provider Endpoint。
15
- - Southwind Server 在 Feature、Permission、License、数据范围通过后重新打开资源,
15
+ - Windy Server 在 Feature、Permission、License、数据范围通过后重新打开资源,
16
16
  校验 MIME、字节数与 SHA-256,再为 Agent Server 轮换短时引用。
17
17
  - Agent Server 只从固定 `AI_ARTIFACT_URL` 内网入口读取图片,拒绝调用方 URL。
18
18
  - 只接受 JPEG、PNG、WebP;解码后强制检查图片数量、总字节与单图像素。
@@ -21,6 +21,14 @@ Starter 首次安装提供四个稳定角色。角色 ID 和 code 是升级契
21
21
 
22
22
  ## 安全边界
23
23
 
24
- 当前 `dataScope` 和 `departmentIds` 已持久化,但 Repository 查询级的数据范围 Guard 仍是产品缺口。为避免默认角色越权写入,部门负责人基线暂不授予 `system.user.manage` 或 `system.department.manage`。在部门及下级查询约束和越权测试完成前,不应通过 seed 扩大该角色的写权限;管理员仍可按部署需求显式配置自定义角色。
24
+ `dataScope` 和 `departmentIds` 已持久化,用户、示例工单、Agent Tool、导出与受支持的
25
+ 后台路径已经接入 Repository 级查询范围强制。列表、总数、详情、更新和删除把同一 scope
26
+ predicate 下推到查询,缺少 nominal `ScopeContext` 或 ownership 绑定时 fail closed;完整
27
+ 边界见[Repository 级 Data Scope 强制](../architecture/data-scope-query-enforcement.md)。新增
28
+ Repository 或异步资源仍必须显式登记 `dataAccess`,不能因已有基础设施而默认视为已覆盖。
29
+
30
+ 部门负责人基线继续不授予 `system.user.manage` 或 `system.department.manage`。这是最小
31
+ 权限的产品默认值,不是用前端隐藏替代服务端 Guard;管理员可按部署需求显式配置自定义
32
+ 角色,最终仍受 Feature、Permission 和 Repository scope 共同约束。
25
33
 
26
34
  用户敏感字段策略将 `system.user.read`、`system.user.reveal` 和 `system.user.export` 分为三类能力。普通读取只能取得服务端脱敏结果;明文查看与治理导出即使由超级管理员执行,也必须重新授权并写入关键审计。客户端提交的角色 code、权限数组或展示模式不是授权来源。
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@southwind-ai/modules",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "license": "UNLICENSED",
5
5
  "type": "module",
6
6
  "engines": {
@@ -70,6 +70,14 @@ export const systemAdminRoutes: ModuleManifest["adminRoutes"] = [
70
70
  "system.feature.read",
71
71
  "system.feature",
72
72
  ),
73
+ route(
74
+ "system.ui-components",
75
+ "/ui/component",
76
+ "组件总览",
77
+ "sidebar",
78
+ "system.ui-components.read",
79
+ "system.ui-components",
80
+ ),
73
81
  // @windy-module system.notification begin
74
82
  route(
75
83
  "system.notification",
@@ -2,7 +2,7 @@ import type { AdminUiManifest } from "./admin-ui-manifest.js";
2
2
  import { systemAdminRoutes } from "./system-admin-routes.js";
3
3
 
4
4
  const definitions = [
5
- ["system", ["system.feature"]],
5
+ ["system", ["system.feature", "system.ui-components"]],
6
6
  [
7
7
  "system.identity",
8
8
  [
@@ -37,6 +37,11 @@ export const systemFeatures: ModuleManifest["features"] = [
37
37
  "功能开关管理",
38
38
  "查看和恢复平台 Feature 状态的核心控制面能力。",
39
39
  ),
40
+ feature(
41
+ "system.ui-components",
42
+ "UI 组件总览",
43
+ "查看 Windy Web 已封装基础组件的真实主题与交互示例。",
44
+ ),
40
45
  feature(
41
46
  "system.user-directory",
42
47
  "业务用户目录",
@@ -21,12 +21,13 @@ export const systemModuleDefinitions = [
21
21
  version: "0.1.0",
22
22
  label: "系统核心",
23
23
  description: "管理面准入、Feature 治理、数据库基线与审计动作目录。",
24
- resources: ["admin", "runtime", "auth", "feature"],
24
+ resources: ["admin", "runtime", "auth", "feature", "ui-components"],
25
25
  featureKeys: [
26
26
  "system.admin",
27
27
  "system.runtime",
28
28
  "system.auth",
29
29
  "system.feature",
30
+ "system.ui-components",
30
31
  "system.ruoyi-compat",
31
32
  ],
32
33
  },
@@ -169,6 +169,17 @@ export function systemFoundationModule(): ModuleManifest {
169
169
  featureKey: "system.config",
170
170
  },
171
171
  // @windy-module system.configuration end
172
+ {
173
+ key: "system.ui-components",
174
+ title: "组件总览",
175
+ type: "menu",
176
+ order: 70,
177
+ visible: true,
178
+ path: "/ui/component",
179
+ icon: "blocks",
180
+ permissionKey: "system.ui-components.read",
181
+ featureKey: "system.ui-components",
182
+ },
172
183
  ],
173
184
  },
174
185
  {
@@ -11,6 +11,7 @@ const systemResourceLabels = {
11
11
  menu: "菜单管理",
12
12
  dict: "字典管理",
13
13
  feature: "功能开关",
14
+ "ui-components": "UI 组件总览",
14
15
  search: "全局搜索",
15
16
  settings: "全局设置",
16
17
  config: "配置版本",
@@ -96,6 +97,7 @@ export const systemPermissions: ModuleManifest["permissions"] = [
96
97
  permission("dict", "manage"),
97
98
  permission("feature", "read"),
98
99
  permission("feature", "manage"),
100
+ permission("ui-components", "read"),
99
101
  // @windy-module system.search begin
100
102
  permission("search", "read"),
101
103
  permission("search", "manage"),
@@ -0,0 +1,36 @@
1
+ import { describe, expect, test } from "bun:test";
2
+ import { systemFoundationModule } from "./system-modules.js";
3
+
4
+ describe("系统组件展厅能力注册", () => {
5
+ test("以同一能力 Key 注册 Feature、Permission、菜单和路由", () => {
6
+ const manifest = systemFoundationModule();
7
+ const menus = flattenMenus(manifest.menus);
8
+
9
+ expect(manifest.features).toContainEqual(
10
+ expect.objectContaining({ key: "system.ui-components" }),
11
+ );
12
+ expect(manifest.permissions).toContainEqual(
13
+ expect.objectContaining({ key: "system.ui-components.read" }),
14
+ );
15
+ expect(
16
+ menus.find(({ key }) => key === "system.ui-components"),
17
+ ).toMatchObject({
18
+ path: "/ui/component",
19
+ permissionKey: "system.ui-components.read",
20
+ featureKey: "system.ui-components",
21
+ });
22
+ expect(
23
+ manifest.adminRoutes.find(({ key }) => key === "system.ui-components"),
24
+ ).toMatchObject({
25
+ path: "/ui/component",
26
+ permissionKey: "system.ui-components.read",
27
+ featureKey: "system.ui-components",
28
+ });
29
+ });
30
+ });
31
+
32
+ function flattenMenus(
33
+ menus: ReturnType<typeof systemFoundationModule>["menus"],
34
+ ): ReturnType<typeof systemFoundationModule>["menus"] {
35
+ return menus.flatMap((menu) => [menu, ...flattenMenus(menu.children || [])]);
36
+ }