合并 master 并保留外部生成 worker 模式
合入 master 的生产健康巡检、JumpHop 和 SpacetimeDB 更新 保留外部生成 worker、队列/内联模式与 lease guard 口径 合并 Server-Provision 工具复用、health patrol 和外部生成 worker systemd 配置 补齐 SpacetimeDB 生成绑定并通过本地检查
This commit is contained in:
@@ -8,9 +8,9 @@ pub use shared_contracts::jump_hop::{
|
||||
JumpHopRestartRunRequest, JumpHopRunResponse, JumpHopRunStatus,
|
||||
JumpHopRuntimeRunSnapshotResponse, JumpHopScoring, JumpHopSessionResponse,
|
||||
JumpHopSessionSnapshotResponse, JumpHopStartRunRequest, JumpHopStylePreset, JumpHopTileAsset,
|
||||
JumpHopTileType, JumpHopWorkDetailResponse, JumpHopWorkMutationResponse,
|
||||
JumpHopWorkProfileResponse, JumpHopWorkSummaryResponse, JumpHopWorksResponse,
|
||||
JumpHopWorkspaceCreateRequest,
|
||||
JumpHopTileFaceAsset, JumpHopTileFaceAssets, JumpHopTileFaceKey, JumpHopTileType,
|
||||
JumpHopWorkDetailResponse, JumpHopWorkMutationResponse, JumpHopWorkProfileResponse,
|
||||
JumpHopWorkSummaryResponse, JumpHopWorksResponse, JumpHopWorkspaceCreateRequest,
|
||||
};
|
||||
|
||||
pub(crate) fn map_jump_hop_agent_session_procedure_result(
|
||||
@@ -267,6 +267,33 @@ fn map_tile_asset(snapshot: JumpHopTileAssetSnapshot) -> JumpHopTileAsset {
|
||||
visual_height: snapshot.visual_height,
|
||||
top_surface_radius: snapshot.top_surface_radius,
|
||||
landing_radius: snapshot.landing_radius,
|
||||
face_assets: snapshot.face_assets.map(map_tile_face_assets),
|
||||
}
|
||||
}
|
||||
|
||||
fn map_tile_face_assets(snapshot: JumpHopTileFaceAssetsSnapshot) -> JumpHopTileFaceAssets {
|
||||
JumpHopTileFaceAssets {
|
||||
top: map_tile_face_asset(snapshot.top),
|
||||
front: map_tile_face_asset(snapshot.front),
|
||||
right: map_tile_face_asset(snapshot.right),
|
||||
back: map_tile_face_asset(snapshot.back),
|
||||
left: map_tile_face_asset(snapshot.left),
|
||||
bottom: map_tile_face_asset(snapshot.bottom),
|
||||
}
|
||||
}
|
||||
|
||||
fn map_tile_face_asset(snapshot: JumpHopTileFaceAssetSnapshot) -> JumpHopTileFaceAsset {
|
||||
JumpHopTileFaceAsset {
|
||||
face: parse_tile_face_key(&snapshot.face),
|
||||
asset_id: snapshot.asset_id,
|
||||
image_src: snapshot.image_src,
|
||||
image_object_key: snapshot.image_object_key,
|
||||
asset_object_id: snapshot.asset_object_id,
|
||||
generation_provider: snapshot.generation_provider,
|
||||
prompt: snapshot.prompt,
|
||||
width: snapshot.width,
|
||||
height: snapshot.height,
|
||||
source_atlas_cell: snapshot.source_atlas_cell,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -405,6 +432,17 @@ fn parse_tile_type(value: &str) -> JumpHopTileType {
|
||||
}
|
||||
}
|
||||
|
||||
fn parse_tile_face_key(value: &str) -> JumpHopTileFaceKey {
|
||||
match value {
|
||||
"front" => JumpHopTileFaceKey::Front,
|
||||
"right" => JumpHopTileFaceKey::Right,
|
||||
"back" => JumpHopTileFaceKey::Back,
|
||||
"left" => JumpHopTileFaceKey::Left,
|
||||
"bottom" => JumpHopTileFaceKey::Bottom,
|
||||
_ => JumpHopTileFaceKey::Top,
|
||||
}
|
||||
}
|
||||
|
||||
fn parse_domain_tile_type(value: crate::module_bindings::JumpHopTileType) -> JumpHopTileType {
|
||||
match value {
|
||||
crate::module_bindings::JumpHopTileType::Start => JumpHopTileType::Start,
|
||||
|
||||
@@ -30,6 +30,17 @@ impl From<module_runtime::CreationEntryEventBannersAdminUpsertInput>
|
||||
}
|
||||
}
|
||||
|
||||
/// 将业务层公开作品互动配置保存输入转换为 SpacetimeDB 生成绑定类型。
|
||||
impl From<module_runtime::PublicWorkInteractionConfigAdminUpsertInput>
|
||||
for PublicWorkInteractionConfigAdminUpsertInput
|
||||
{
|
||||
fn from(input: module_runtime::PublicWorkInteractionConfigAdminUpsertInput) -> Self {
|
||||
Self {
|
||||
public_work_interactions_json: input.public_work_interactions_json,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<module_runtime::AdminWorkVisibilityListInput> for AdminWorkVisibilityListInput {
|
||||
fn from(input: module_runtime::AdminWorkVisibilityListInput) -> Self {
|
||||
Self {
|
||||
@@ -323,6 +334,7 @@ pub(crate) fn build_creation_entry_config_record_from_rows(
|
||||
})
|
||||
.collect(),
|
||||
updated_at_micros: header.updated_at.to_micros_since_unix_epoch(),
|
||||
public_work_interactions_json: header.public_work_interactions_json,
|
||||
},
|
||||
)
|
||||
}
|
||||
@@ -376,6 +388,7 @@ fn map_creation_entry_config_snapshot(
|
||||
})
|
||||
.collect(),
|
||||
updated_at_micros: snapshot.updated_at_micros,
|
||||
public_work_interactions_json: snapshot.public_work_interactions_json,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,6 +445,7 @@ mod tests {
|
||||
event_starts_at_text: None,
|
||||
event_ends_at_text: None,
|
||||
event_banners_json: None,
|
||||
public_work_interactions_json: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -514,6 +528,7 @@ mod tests {
|
||||
unified_creation_spec_json: None,
|
||||
}],
|
||||
updated_at_micros: 1_000_000,
|
||||
public_work_interactions_json: None,
|
||||
});
|
||||
|
||||
let jump_hop = record
|
||||
|
||||
Reference in New Issue
Block a user