fix creation agent session sync and publish gate alignment
This commit is contained in:
@@ -1545,7 +1545,10 @@ fn build_compiled_profile_payload_json(
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(scene_chapters) = draft.get("sceneChapters") {
|
||||
if let Some(scene_chapters) = draft
|
||||
.get("sceneChapterBlueprints")
|
||||
.or_else(|| draft.get("sceneChapters"))
|
||||
{
|
||||
payload.insert("sceneChapterBlueprints".to_string(), scene_chapters.clone());
|
||||
}
|
||||
|
||||
|
||||
@@ -2124,14 +2124,35 @@ fn summarize_publish_gate_from_json(
|
||||
}
|
||||
|
||||
if let Some(profile) = draft_profile {
|
||||
if read_optional_text_field(profile, &["worldHook"]).is_none() {
|
||||
if read_optional_text_field(
|
||||
profile,
|
||||
&[
|
||||
"worldHook",
|
||||
"creatorIntent.worldHook",
|
||||
"anchorContent.worldPromise.hook",
|
||||
"settingText",
|
||||
],
|
||||
)
|
||||
.is_none()
|
||||
{
|
||||
blockers.push(CustomWorldPublishBlockerSnapshot {
|
||||
blocker_id: "publish_missing_world_hook".to_string(),
|
||||
code: "publish_missing_world_hook".to_string(),
|
||||
message: "当前世界缺少 world hook,发布前需要先补齐世界一句话钩子。".to_string(),
|
||||
});
|
||||
}
|
||||
if read_optional_text_field(profile, &["playerPremise"]).is_none() {
|
||||
if read_optional_text_field(
|
||||
profile,
|
||||
&[
|
||||
"playerPremise",
|
||||
"creatorIntent.playerPremise",
|
||||
"anchorContent.playerEntryPoint.openingIdentity",
|
||||
"anchorContent.playerEntryPoint.openingProblem",
|
||||
"anchorContent.playerEntryPoint.entryMotivation",
|
||||
],
|
||||
)
|
||||
.is_none()
|
||||
{
|
||||
blockers.push(CustomWorldPublishBlockerSnapshot {
|
||||
blocker_id: "publish_missing_player_premise".to_string(),
|
||||
code: "publish_missing_player_premise".to_string(),
|
||||
@@ -2145,12 +2166,22 @@ fn summarize_publish_gate_from_json(
|
||||
message: "当前世界缺少核心冲突,发布前需要先补齐核心冲突。".to_string(),
|
||||
});
|
||||
}
|
||||
if profile
|
||||
let has_main_chapter = profile
|
||||
.get("chapters")
|
||||
.and_then(JsonValue::as_array)
|
||||
.map(|value| value.is_empty())
|
||||
.unwrap_or(true)
|
||||
{
|
||||
.map(|value| !value.is_empty())
|
||||
.unwrap_or(false)
|
||||
|| profile
|
||||
.get("sceneChapterBlueprints")
|
||||
.and_then(JsonValue::as_array)
|
||||
.map(|value| !value.is_empty())
|
||||
.unwrap_or(false)
|
||||
|| profile
|
||||
.get("sceneChapters")
|
||||
.and_then(JsonValue::as_array)
|
||||
.map(|value| !value.is_empty())
|
||||
.unwrap_or(false);
|
||||
if !has_main_chapter {
|
||||
blockers.push(CustomWorldPublishBlockerSnapshot {
|
||||
blocker_id: "publish_missing_main_chapter".to_string(),
|
||||
code: "publish_missing_main_chapter".to_string(),
|
||||
@@ -2158,7 +2189,8 @@ fn summarize_publish_gate_from_json(
|
||||
});
|
||||
}
|
||||
let has_scene_act = profile
|
||||
.get("sceneChapters")
|
||||
.get("sceneChapterBlueprints")
|
||||
.or_else(|| profile.get("sceneChapters"))
|
||||
.and_then(JsonValue::as_array)
|
||||
.map(|chapters| {
|
||||
chapters.iter().any(|chapter| {
|
||||
@@ -3031,6 +3063,9 @@ fn ensure_minimal_draft_profile(
|
||||
.entry("sceneChapters".to_string())
|
||||
.or_insert_with(|| JsonValue::Array(Vec::new()));
|
||||
profile
|
||||
.entry("sceneChapterBlueprints".to_string())
|
||||
.or_insert_with(|| JsonValue::Array(Vec::new()));
|
||||
profile
|
||||
}
|
||||
|
||||
fn build_minimal_draft_profile_from_seed(seed_text: &str) -> JsonMap<String, JsonValue> {
|
||||
|
||||
Reference in New Issue
Block a user