Compare commits

...

26 Commits

Author SHA1 Message Date
k88936 0c4b1c34d9 标注模型下载的重复 task 查询
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Successful in 7m17s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Successful in 7m19s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Successful in 7m31s
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Successful in 7m39s
Project CI / Backend tests (pull_request) Failing after 10s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m3s
Project CI / Repository checks (pull_request) Failing after 10s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m36s
Project CI / Native shell tests (pull_request) Failing after 11m43s
Project CI / AI game creator shell web tests (pull_request) Failing after 10m21s
Project CI / Frontend tests (pull_request) Successful in 12m23s
在 download_model 增加 TODO,说明 SDK 只提供 download_model(&Task) 因而必须再取一次 task

若将来 SDK 支持按 URL 下载,可直接使用 snapshot 中的模型 URL 省掉这次请求
2026-09-19 14:17:31 +08:00
k88936 3c1059aa39 移除 TripoUrl 的 Display 实现
删除 TripoUrl 的 Display,避免 `{}` 这类通用格式化输出带签名的完整 URL

完整 URL 仍可通过 as_str() 显式读取,日志与调试统一走 redacted() 或脱敏后的 Debug

技术方案文档补充该收敛说明
2026-09-19 14:17:00 +08:00
k88936 1392303f1c 请求契约把 model 改为必填字段
三个生成请求的 model 由 Option<Model3dModelVersion> 改为必填 Model3dModelVersion,并同步重新生成 TypeScript 绑定

validate_generation_options 不再重复校验 model 缺失,直接由必填的 model 推导 family

三个 client 的 to_sdk_params 改为直接提交模型版本字符串

冒烟示例与技术方案文档同步为必填写法
2026-09-19 14:16:39 +08:00
k88936 12512f26b2 multiview 输入拒绝未知字段
Model3dMultiviewInputs 增加 deny_unknown_fields,与 Model3dMultiviewToModelRequest 的严格反序列化保持一致

未知视图键(例如拼写错误的 righ)不再被静默丢弃,避免用少于调用方预期的视图提交任务

ts-rs 12 不支持 enum 级该属性,构建时会打印一条可忽略的告警,已在代码注释说明
2026-09-19 14:14:55 +08:00
k88936 800da43a8d 说明生成结果 DTO 的 number 精度边界
为 poll_after_ms、updated_at_micros、size_bytes 补充注释,说明其量级远低于 2^53,按 TS number 导出即可精确表示

重新生成 TypeScript 绑定,把上述说明同步为 JSDoc

技术方案补充同一说明,明确不做 bigint/string 特殊处理
2026-09-19 14:14:14 +08:00
k88936 b703f0c374 同步Tripo集成文档的契约导出与脱敏说明
补充 TripoUrl 脱敏输出与 as_str 读取完整 URL 的说明

补充请求可选字段在 TypeScript 绑定中为 field?: T | null 及 model3d barrel 导出入口

补充 ts-rs 生成后需 prettier 格式化再提交的流程说明
2026-09-19 13:17:58 +08:00
k88936 b87d9358e5 对齐 Api 与 Request 的可重试状态码
TripoError::is_retryable 的 Api 分支补充 408 与 425,与 Request 分支的可重试集合保持一致
2026-09-19 13:15:31 +08:00
k88936 f4996d7ac2 auto_size 仅在显式开启时按模型能力拦截
validate_generation_options 中 auto_size 的 H25 校验由 is_some() 改为 == Some(true)

auto_size: false 不再被当作启用,与 quad、smart_low_poly、generate_parts 的取值语义保持一致
2026-09-19 13:15:00 +08:00
k88936 09ef92420f multiview 复用统一的 task_id 校验
删除 submit_multiview_to_model 中重复的空白判断,改为调用 common::validate_task_id

task_id 非法时的错误字段由 Inputs 改为更精确的 TaskId,与 get_task、download_model 保持一致
2026-09-19 13:14:32 +08:00
k88936 091938ed59 multiview 提交前裁剪 task_id
to_sdk_params 改为提交 task_id.trim(),与 task_id.trim().is_empty() 的校验使用同一份标准化输入

带前后空白的 task_id 不再原样转发给 Provider
2026-09-19 13:13:54 +08:00
k88936 ddb8b9e8ba multiview 空白视图按未提供处理
to_sdk_params 新增 optional_view,将仅含空白的 left、back、right 归一化为未提供

空白视图不再以 Some(FileInput) 形式提交,与提交前“至少两个视图”的校验保持一致
2026-09-19 13:13:35 +08:00
k88936 230e4d49f2 image_to_model 提交前统一使用裁剪后的输入
to_sdk_params 改为传入 request.input.trim(),与提交前的空值校验使用同一份标准化输入

带前后空白的输入不再原样转发给 Provider
2026-09-19 13:12:50 +08:00
k88936 6c209b115a 冒烟示例在任务未完成时跳过下载并继续后续入口
轮询改用 throw_on_failure=false,失败终态交回示例按 status 判定而不是直接返回错误

非 Completed 的任务打印 status 与 failure 后 continue,避免一个入口失败中断其余入口的冒烟
2026-09-19 13:12:23 +08:00
k88936 b631125a16 冒烟示例不再输出完整下载地址
产物行改用 TripoUrl::redacted(),避免把带签名的下载 URL 写入标准输出
2026-09-19 13:07:41 +08:00
k88936 771ff88440 脱敏 TripoUrl 的 Debug 输出
为 TripoUrl 手写 Debug 实现,改用隐藏 query 与 fragment 的脱敏形式

新增 TripoUrl::redacted 提供日志用脱敏 URL,完整 URL 仍由 as_str 显式读取

TripoTaskSnapshot、TripoTaskOutput、TripoDownloadedModel 的调试输出随之不再暴露带签名的下载地址
2026-09-19 13:07:41 +08:00
k88936 950209f038 为 model3d 请求契约的可选字段补充 ts(optional)
为 image_to_model、multiview_to_model、text_to_model 三个请求的可选字段添加 ts(optional = nullable)

multiview 视图分支的 left、back、right 同步标记为可选

重新生成 packages/shared/src/contracts/model3d 下的 TypeScript 绑定,使 TS 侧可按 serde 语义省略字段
2026-09-19 13:07:41 +08:00
k88936 42a5929a73 清理 model3d 请求契约中冗余的 serde(default)
移除 image_to_model、multiview_to_model、text_to_model 三个请求结构体 Option 字段上的 serde(default)

同步移除 multiview 视图分支中三个可选视图的 serde(default)

serde 对 Option 字段本身即按 None 处理缺失字段,生成的 TypeScript 绑定保持不变
2026-09-19 13:07:41 +08:00
k88936 eda9da4d8d 单点维护 model3d 的 ts-rs 导出根目录
在 model3d/mod.rs 新增 model3d_ts_export_dir 宏,集中定义仓库相对导出根路径

common、image_to_model、multiview_to_model、text_to_model 改为调用宏并只声明各自子目录名
2026-09-19 13:07:41 +08:00
k88936 35be25dbd6 补齐 model3d 契约在 packages/shared 的导出入口
新增 packages/shared/src/contracts/model3d/index.ts 聚合 ts-rs 生成的 3D 生成契约类型

contracts/index.ts 增加 export type * from './model3d'

src/index.ts 增加 export type * from './contracts/model3d'
2026-09-19 13:02:01 +08:00
k88936 da9ee65119 记录Tripo真实冒烟结果结构
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Successful in 7m41s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Successful in 7m48s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Successful in 7m50s
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Successful in 8m0s
Project CI / Backend tests (pull_request) Failing after 11s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m17s
Project CI / Repository checks (pull_request) Failing after 10s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m29s
Project CI / Frontend tests (pull_request) Successful in 14m49s
Project CI / AI game creator shell web tests (pull_request) Failing after 18m48s
Project CI / Native shell tests (pull_request) Failing after 27m31s
保留三个生成入口的脱敏真实结果形状与下载产物信息

使用实际可访问的 Rustacean 图片完成 image 与 multiview 示例

同步严格 endpoint 结果契约和真实 Provider 验收文档
2026-09-18 21:42:17 +08:00
k88936 527706b84e 按接口收紧Tripo任务结果类型
为 text、image、multiview 三类生成定义独立必填结果结构

以枚举关联任务类型与具体结果并对缺失字段失败关闭

将通用 URL 类型由 TripoModelUrl 更名为 TripoUrl
2026-09-18 21:37:38 +08:00
k88936 a4beb53dc6 完善Tripo冒烟CLI产物流程
等待三类生成任务完成并打印映射后的输出

完成后下载模型产物到当前目录并输出文件信息

仅在示例内部使用SDK轮询器,不扩展平台公共接口
2026-09-18 18:51:49 +08:00
k88936 25314d9a4a 新增Tripo三类生成冒烟CLI
增加仅通过环境变量配置的 Tripo generation example

顺序提交 text、image、multiview 三类任务并执行单次状态查询

保持无命令行参数且不调用 SDK 轮询接口
2026-09-18 18:42:58 +08:00
k88936 5be4a51ac1 完善Tripo枚举与参数组合校验
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Successful in 7m19s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Successful in 7m22s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Successful in 7m26s
Project CI / Backend tests (pull_request) Failing after 11s
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Successful in 7m38s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 2m1s
Project CI / Repository checks (pull_request) Failing after 15s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m54s
Project CI / Native shell tests (pull_request) Failing after 3m5s
Project CI / AI game creator shell web tests (pull_request) Failing after 2m13s
Project CI / Frontend tests (pull_request) Successful in 5m44s
按提供的 Tripo 文档补齐 compression、texture quality 与 texture version 枚举

移除未在三个生成接口出现的 style 占位字段并同步 Rust/TypeScript contracts

增加模型版本、纹理版本、生成部件、quad、smart-low-poly 与 face limit 的副作用前校验

同步 Provider 技术方案和 ADR
2026-09-18 17:23:55 +08:00
k88936 37b355a814 接入Tripo三类3D生成Provider
加入固定 revision 的 tripo-rust-sdk 与 platform-tripo workspace crate

实现 text-to-model、image-to-model、multiview-to-model 提交、通用任务查询和显式模型下载

抽取通用任务类型、状态映射、输出 URL 校验与 SDK 错误归一,保持 wait_for_task 不对外暴露

同步 Provider 边界文档并暂不接入 api-server
2026-09-18 16:02:13 +08:00
k88936 1c4009ea3b 建立3D生成目录化契约
新增 model3d common、text-to-model、image-to-model、multiview-to-model Rust contracts

通过 ts-rs 按目录生成 TypeScript bindings,移除依赖 barrel 的组织方式

增加 model3d contracts 定向生成脚本
2026-09-18 15:59:19 +08:00
70 changed files with 2373 additions and 33 deletions
+18
View File
@@ -50,6 +50,24 @@ _Avoid_: 为每个玩法单独发明素材流水线、把系列素材建模成
## Language ## Language
### 3D Model Generation
**3D 模型生成操作**:
由文本提示驱动、可异步查询并最终产生模型文件的 provider-neutral 操作;操作状态和产品资源结果分开建模。
_Avoid_: 直接把第三方 provider task 当作产品资源、把模型 URL 当作永久资源地址
**Provider task**:
第三方 3D 生成平台返回的任务引用与任务快照,只存在于 provider adapter 的 Rust 边界内;它不是 Genarrative 的内部操作 ID。
_Avoid_: 把 Tripo task ID 当作稳定产品 operationId、让 SDK 类型穿透 api-server
**临时 provider URL**:
第三方任务完成后返回的短时模型下载地址,必须通过显式下载流程转换为本地或持久化资源,不能直接当作长期资产地址。
_Avoid_: 永久 OSS URL、资源 ID
**模型 artifact**:
由 text-to-model、image-to-model 或 multiview-to-model 任务产生、待应用层登记和持久化的模型文件结果;provider adapter 只提供可下载结果,不负责生成 resourceId 或 assetId。
_Avoid_: 仅 UI 中展示的模型链接、没有来源任务的静态文件
### Puzzle Clear ### Puzzle Clear
**拼消消**: **拼消消**:
+1
View File
@@ -5016,6 +5016,7 @@ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
"sha2", "sha2",
"ts-rs",
] ]
[[package]] [[package]]
+4
View File
@@ -25,6 +25,8 @@
## AI 游戏创作与 Agent Runtime ## AI 游戏创作与 Agent Runtime
- [Tripo 3D 模型 Provider 集成](./technical/【技术方案】Tripo文本到3D模型Provider集成-2026-09-18.md):实现 text-to-model、image-to-model、multiview-to-model 的 Rust provider adapter,暂不接入 api-server。
- [策划 Agent 生产迁移与工作区浏览](./technical/【技术方案】策划Agent生产迁移与工作区浏览-2026-09-10.md):实施中;以自由协作原型为行为基线,复用生产基建,采用阶段审批与用户工作区文件浏览。无旧 V2 会话的策划入口切换到新设计 Agent。 - [策划 Agent 生产迁移与工作区浏览](./technical/【技术方案】策划Agent生产迁移与工作区浏览-2026-09-10.md):实施中;以自由协作原型为行为基线,复用生产基建,采用阶段审批与用户工作区文件浏览。无旧 V2 会话的策划入口切换到新设计 Agent。
- [LLM 累计额度结算](./technical/【技术方案】LLM累计额度结算-2026-09-05.md):Router 累计额度、首次基线与原子钱包结算。 - [LLM 累计额度结算](./technical/【技术方案】LLM累计额度结算-2026-09-05.md):Router 累计额度、首次基线与原子钱包结算。
@@ -74,6 +76,8 @@
## 后端、运维与测试 ## 后端、运维与测试
- [Tripo SDK 隔离与 Provider DTO 边界 ADR](./adr/【ADR】0001-Tripo%20SDK隔离与Provider%20DTO边界-2026-09-18.md):固定 SDK 只存在于 `platform-tripo` 内部,provider task 与产品资源结果分层。
- [BgFilter 受限资源调度方案](./technical/【后端架构】BgFilter受限资源调度方案-2026-07-21.md) - [BgFilter 受限资源调度方案](./technical/【后端架构】BgFilter受限资源调度方案-2026-07-21.md)
- [Issue225 登录成功 AGC 用户归属修复](./technical/【后端架构】Issue225登录成功AGC用户归属修复方案-2026-09-03.md):登录 route tracking 的真实用户归属、`daily_login` 幂等边界和实施验收。 - [Issue225 登录成功 AGC 用户归属修复](./technical/【后端架构】Issue225登录成功AGC用户归属修复方案-2026-09-03.md):登录 route tracking 的真实用户归属、`daily_login` 幂等边界和实施验收。
- [SpacetimeDB 连接池取消安全](./【后端架构】SpacetimeDB连接池租约Drop兜底与取消安全-2026-06-11.md) - [SpacetimeDB 连接池取消安全](./【后端架构】SpacetimeDB连接池租约Drop兜底与取消安全-2026-06-11.md)
@@ -0,0 +1,9 @@
# 【ADR】0001-Tripo SDK隔离与Provider DTO边界-2026-09-18
状态:已接受
`tripo3d-sdk` 只允许出现在 `platform-tripo` 内部。该 crate 以显式必填配置创建可复用 provider client,只公开自己的 text-to-model、image-to-model、multiview-to-model DTO、通用单次 task 查询、显式模型下载和结构化错误;不暴露 SDK 类型、`wait_for_task` 或后台轮询。共享产品契约与 provider task 结果分层,provider adapter 不伪造 `resourceId`/`assetId`shared-contracts 的 Rust 类型始终通过 ts-rs 生成目录化 TypeScript binding。
选择这个边界是为了避免 API 层绑定第三方 SDK 的任务/错误模型,同时让未来的资源持久化、幂等和 provider 替换由应用层负责。请求 enum 以 Tripo API 文档为准;当前 `compress=geometry`、纹理质量 `fast/standard/detailed/extreme` 及纹理版本已经纳入目录化 Rust/TypeScript contracts。文档确认不存在于这三个 endpoint 的 `style` 字段不再保留占位类型,组合约束在 provider 副作用前执行。
完成结果按 endpoint 建模为严格类型:text-to-model 要求模型、渲染图和生成参考图 URLimage-to-model 与 multiview-to-model 要求模型和渲染图 URL;共同 task DTO 只用 enum 标识具体结果,不再提供由 `Vec` 和可选字段组成的宽松通用 output。URL 使用语义中性的 `TripoUrl`,真实响应缺少对应必填字段时以 output schema error 失败关闭。
@@ -0,0 +1,37 @@
# 【技术方案】Tripo文本到3D模型 Provider 集成-2026-09-18
## 目标
本阶段在 `server-rs/crates/platform-tripo` 内接入固定 revision 的 `tripo3d-sdk`,完成 text-to-model、image-to-model 和 multiview-to-model 三个 3D 生成入口的 Rust provider adapter。adapter 提供显式配置、提交、单次通用 task 查询和模型下载能力;共享产品契约继续由 `shared-contracts` 管理,并始终生成目录化 ts-rs TypeScript binding。
代码按 API 目录组织:公共 SDK 配置、client、任务映射、错误、下载类型和 task 生命周期 DTO 位于 `platform-tripo/src/common/`;三个生成 API 各自拥有独立目录和结果类型。Rust 与 TypeScript contracts 按 `common/``text_to_model/``image_to_model/``multiview_to_model/` 分目录生成。
## 非目标
- 不接入 `api-server`、worker、SpacetimeDB、OSS、计费或 UI。
- 不暴露 SDK 的 `wait_for_task`,不在 adapter 内启动后台轮询。
- 不实现后处理、rig、animation、图片生成或其它 SDK endpoint。
## 边界与状态
`platform-tripo` 是唯一接触 `tripo3d-sdk` 的边界。它返回自己的 provider DTO,不让 SDK 类型穿透到未来的 `api-server`。Tripo 的 `success` 映射为 `completed``failed`/`banned` 映射为 `failed``cancelled``expired` 保留为独立终态;未知状态返回结构化错误。
provider task 结果与产品资源结果分离。provider adapter 不生成 `resourceId``assetId`;未来应用层在资源持久化后再构造带资源 ID 的产品 DTO。模型 URL 被视为临时 provider 引用,下载由显式方法完成。`TripoUrl``Debug``redacted()` 只输出 scheme、host 与 path,隐藏可能带签名的 query 与 fragment;完整 URL 仅通过 `as_str()` 显式读取;`TripoUrl` 不实现 `Display`,避免 `{}` 这类通用格式化把带签名的完整地址写进日志,冒烟示例同样只打印脱敏后的地址。
task 尚未完成时 `output` 为空;完成后 `output` 必须是与 task type 一致的 enum variant,不使用把不同 endpoint 字段揉在一起的通用可选字段结构。真实 provider smoke 确认:text-to-model 结果固定包含 `model_url``rendered_image_url``generated_image_url`image-to-model 和 multiview-to-model 结果固定包含 `model_url``rendered_image_url`。这些字段在各自结果 struct 中均为必填 `TripoUrl`;缺失、URL 非法或 task type 不受支持时返回 `TripoError::OutputSchema`
生成结果 DTO 中的 `poll_after_ms``updated_at_micros``size_bytes` 以 TypeScript `number` 导出:毫秒级轮询间隔与几十 MB 的产物字节数远低于 2^53,微秒时间戳在 2^53 内也可精确表示(约到公元 2255 年),因此不做 `bigint`/`string` 特殊处理;若将来出现超过 2^53 的取值再评估。
## 请求与类型
三个生成请求使用官方文档已确认的 enum:模型版本、纹理版本、纹理质量(含 `fast`)、几何质量、纹理对齐、输入方向、导出方向和压缩类型(`geometry`)。文档未将 `style` 列为这三个 endpoint 的请求字段,因此不再保留占位 enum。`model` 在三个请求中都是必填字段(缺失或取值非法时在反序列化阶段即拒绝);除它以外的参数可选,在 Rust 侧为 `Option`TypeScript 绑定对应 `field?: T | null`,调用方既可省略字段也可显式传 `null`。TypeScript 绑定仍按目录生成到 `packages/shared/src/contracts/model3d/`,并由该目录的 `index.ts``packages/shared` 的 barrel 统一再导出;生成命令 `npm run contracts:model3d:generate` 写入的是未格式化的 ts-rs 输出,需再执行 `prettier --write packages/shared/src/contracts/model3d` 后提交。
提交前由 provider 统一执行组合校验:模型版本决定 family;`fast` 必须配 `v3.5-20260815`;几何质量 / 压缩 / 自动尺寸 / P 系列与 H 系列能力按模型版本限制;`quad``generate_parts``smart_low_poly``texture/pbr` 组合按文档的互斥关系拒绝;`face_limit` 按模型、quad 和 smart-low-poly 模式检查范围。SDK 返回的参数错误仍统一归一为 `TripoError`
## 验收
- `platform-tripo` 不公开 re-export SDK 类型或 `wait_for_task`
- 三个 3D 生成入口的 submit、通用 get task、按 endpoint 严格映射的完成结果和显式 download API 可编译。
- provider 错误统一为 adapter 错误类型。
- shared contracts 的 ts-rs binding 无 feature 开关且始终可生成。
- 真实 Provider smoke 已覆盖三个入口;example 保留脱敏后的结果结构和下载产物信息。
+1
View File
@@ -41,6 +41,7 @@
"admin-web:typecheck": "node scripts/admin-web-build.mjs typecheck", "admin-web:typecheck": "node scripts/admin-web-build.mjs typecheck",
"admin-web:preview": "npm --prefix apps/admin-web run preview --", "admin-web:preview": "npm --prefix apps/admin-web run preview --",
"spacetime:generate": "node scripts/generate-spacetime-bindings.mjs", "spacetime:generate": "node scripts/generate-spacetime-bindings.mjs",
"contracts:model3d:generate": "cargo test --locked -p shared-contracts model3d --manifest-path server-rs/Cargo.toml",
"spacetime:external-generation:maintain": "node scripts/spacetime-maintain-external-generation-jobs.mjs", "spacetime:external-generation:maintain": "node scripts/spacetime-maintain-external-generation-jobs.mjs",
"spacetime:editor-image-asset-kind:clean": "node scripts/spacetime-clean-editor-image-asset-kind.mjs", "spacetime:editor-image-asset-kind:clean": "node scripts/spacetime-clean-editor-image-asset-kind.mjs",
"spacetime:editor-canvas-layout:migrate": "node scripts/spacetime-migrate-editor-canvas-layout.mjs", "spacetime:editor-canvas-layout:migrate": "node scripts/spacetime-migrate-editor-canvas-layout.mjs",
+1
View File
@@ -3,3 +3,4 @@ export type * from './editorAudio';
export * from './gameCreationApp'; export * from './gameCreationApp';
export * from './hostBridge'; export * from './hostBridge';
export type * from './hyper3d'; export type * from './hyper3d';
export type * from './model3d';
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type Model3dCompression = 'geometry';
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type Model3dExportOrientation = '+x' | '-x' | '+y' | '-y';
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type Model3dGeometryQuality = 'standard' | 'detailed';
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type Model3dInputOrientation = 'default' | 'align_image';
@@ -0,0 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type Model3dModelVersion =
| 'v3.1-20260211'
| 'v3.0-20250812'
| 'v2.5-20250123'
| 'P1-20260311'
| 'P2-20260801';
@@ -0,0 +1,10 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type Model3dOutputFormat =
| 'glb'
| 'gltf'
| 'fbx'
| 'obj'
| 'stl'
| 'usdz'
| '3mf';
@@ -0,0 +1,9 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type Model3dTaskStatus =
| 'queued'
| 'running'
| 'completed'
| 'failed'
| 'cancelled'
| 'expired';
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type Model3dTextureAlignment = 'original_image' | 'geometry';
@@ -0,0 +1,7 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type Model3dTextureQuality =
| 'fast'
| 'standard'
| 'detailed'
| 'extreme';
@@ -0,0 +1,6 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type Model3dTextureVersion =
| 'v3.5-20260815'
| 'v3.0-20250812'
| 'v2.5-20250123';
@@ -0,0 +1,33 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Model3dCompression } from '../common/Model3dCompression';
import type { Model3dExportOrientation } from '../common/Model3dExportOrientation';
import type { Model3dGeometryQuality } from '../common/Model3dGeometryQuality';
import type { Model3dInputOrientation } from '../common/Model3dInputOrientation';
import type { Model3dModelVersion } from '../common/Model3dModelVersion';
import type { Model3dTextureAlignment } from '../common/Model3dTextureAlignment';
import type { Model3dTextureQuality } from '../common/Model3dTextureQuality';
import type { Model3dTextureVersion } from '../common/Model3dTextureVersion';
export type Model3dImageToModelRequest = {
input: string;
model: Model3dModelVersion;
enableImageAutofix?: boolean | null;
modelSeed?: number | null;
textureSeed?: number | null;
texture?: boolean | null;
pbr?: boolean | null;
textureQuality?: Model3dTextureQuality | null;
textureVersion?: Model3dTextureVersion | null;
delight?: boolean | null;
textureAlignment?: Model3dTextureAlignment | null;
geometryQuality?: Model3dGeometryQuality | null;
faceLimit?: number | null;
autoSize?: boolean | null;
orientation?: Model3dInputOrientation | null;
quad?: boolean | null;
smartLowPoly?: boolean | null;
generateParts?: boolean | null;
compress?: Model3dCompression | null;
exportUv?: boolean | null;
exportOrientation?: Model3dExportOrientation | null;
};
@@ -0,0 +1,18 @@
export type * from './common/Model3dCompression';
export type * from './common/Model3dExportOrientation';
export type * from './common/Model3dGeometryQuality';
export type * from './common/Model3dInputOrientation';
export type * from './common/Model3dModelVersion';
export type * from './common/Model3dOutputFormat';
export type * from './common/Model3dTaskStatus';
export type * from './common/Model3dTextureAlignment';
export type * from './common/Model3dTextureQuality';
export type * from './common/Model3dTextureVersion';
export type * from './image-to-model/Model3dImageToModelRequest';
export type * from './multiview-to-model/Model3dMultiviewInputs';
export type * from './multiview-to-model/Model3dMultiviewToModelRequest';
export type * from './text-to-model/Model3dArtifact';
export type * from './text-to-model/Model3dGenerationJob';
export type * from './text-to-model/Model3dGenerationResult';
export type * from './text-to-model/Model3dGenerationSubmission';
export type * from './text-to-model/Model3dTextToModelRequest';
@@ -0,0 +1,11 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type Model3dMultiviewInputs =
| {
kind: 'views';
front: string;
left?: string | null;
back?: string | null;
right?: string | null;
}
| { kind: 'taskId'; taskId: string };
@@ -0,0 +1,33 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Model3dCompression } from '../common/Model3dCompression';
import type { Model3dExportOrientation } from '../common/Model3dExportOrientation';
import type { Model3dGeometryQuality } from '../common/Model3dGeometryQuality';
import type { Model3dInputOrientation } from '../common/Model3dInputOrientation';
import type { Model3dModelVersion } from '../common/Model3dModelVersion';
import type { Model3dTextureAlignment } from '../common/Model3dTextureAlignment';
import type { Model3dTextureQuality } from '../common/Model3dTextureQuality';
import type { Model3dTextureVersion } from '../common/Model3dTextureVersion';
import type { Model3dMultiviewInputs } from './Model3dMultiviewInputs';
export type Model3dMultiviewToModelRequest = {
inputs: Model3dMultiviewInputs;
model: Model3dModelVersion;
modelSeed?: number | null;
textureSeed?: number | null;
texture?: boolean | null;
pbr?: boolean | null;
textureQuality?: Model3dTextureQuality | null;
textureVersion?: Model3dTextureVersion | null;
delight?: boolean | null;
geometryQuality?: Model3dGeometryQuality | null;
textureAlignment?: Model3dTextureAlignment | null;
faceLimit?: number | null;
autoSize?: boolean | null;
orientation?: Model3dInputOrientation | null;
quad?: boolean | null;
smartLowPoly?: boolean | null;
generateParts?: boolean | null;
compress?: Model3dCompression | null;
exportUv?: boolean | null;
exportOrientation?: Model3dExportOrientation | null;
};
@@ -0,0 +1,14 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Model3dOutputFormat } from '../common/Model3dOutputFormat';
export type Model3dArtifact = {
resourceId: string;
format: Model3dOutputFormat;
contentType: string;
/**
* 产物字节数,当前单模型产物为几十 MB,远低于 2^53,按 TS number 导出。
*/
sizeBytes: number;
sha256: string;
previewResourceId?: string | null;
};
@@ -0,0 +1,16 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Model3dTaskStatus } from '../common/Model3dTaskStatus';
import type { Model3dGenerationResult } from './Model3dGenerationResult';
export type Model3dGenerationJob = {
operationId: string;
status: Model3dTaskStatus;
phase: string;
progress: number;
error?: string | null;
result?: Model3dGenerationResult | null;
/**
* 更新时间(Unix 微秒);2^53 微秒约到公元 2255 年,按 TS number 导出即可精确表示。
*/
updatedAtMicros: number;
};
@@ -0,0 +1,8 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Model3dArtifact } from './Model3dArtifact';
export type Model3dGenerationResult = {
resourceId: string;
assetId: string;
artifacts: Array<Model3dArtifact>;
};
@@ -0,0 +1,12 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { Model3dTaskStatus } from '../common/Model3dTaskStatus';
export type Model3dGenerationSubmission = {
operationId: string;
status: Model3dTaskStatus;
statusUrl: string;
/**
* 轮询间隔(毫秒),量级为分钟级,远低于 2^53,按 TS number 导出。
*/
pollAfterMs: number;
};

Some files were not shown because too many files have changed in this diff Show More