合并 master 并保留外部生成 worker 模式

合入 master 的拼消消、微信能力、OpenSSL 3.2 和 SpacetimeDB 2.4.1 更新
保留外部内容生成 queue/inline、worker lease 与动态扩缩容口径
补齐拼图后台图片生成队列轮询和运行态返回恢复
同步容器、生产运维和 Hermes 共享记忆中的 worker 文档
This commit is contained in:
2026-06-09 16:55:32 +08:00
497 changed files with 66318 additions and 13329 deletions

View File

@@ -612,6 +612,16 @@ pub async fn execute_puzzle_agent_action(
let (operation_type, phase_label, phase_detail, session) = match action.as_str() {
"compile_puzzle_draft" => {
let ai_redraw = payload.ai_redraw.unwrap_or(true);
let puzzle_draft_generation_points_cost = if ai_redraw {
crate::creation_entry_config::resolve_creation_entry_mud_point_cost(
state.root_state(),
"puzzle",
PUZZLE_IMAGE_GENERATION_POINTS_COST,
)
.await
} else {
0
};
let reference_image_sources = collect_puzzle_reference_image_sources(
payload.reference_image_src.as_deref(),
payload.reference_image_srcs.as_slice(),
@@ -643,6 +653,7 @@ pub async fn execute_puzzle_agent_action(
owner_user_id: owner_user_id.clone(),
billing_asset_id: billing_asset_id.clone(),
ai_redraw,
billing_points_cost: puzzle_draft_generation_points_cost,
prompt_text: prompt_text.map(ToOwned::to_owned),
reference_image_src: primary_reference_image_src.map(ToOwned::to_owned),
image_model: payload.image_model.clone(),
@@ -735,6 +746,7 @@ pub async fn execute_puzzle_agent_action(
.spacetime_client()
.get_puzzle_agent_session(compile_session_id.clone(), owner_user_id.clone())
.await
.map(mark_puzzle_initial_generation_started_snapshot)
.map_err(|error| {
puzzle_error_response(
&request_context,
@@ -1296,7 +1308,6 @@ pub async fn execute_puzzle_agent_action(
};
let session = session?;
Ok(json_success_body(
Some(&request_context),
PuzzleAgentActionResponse {