Merge remote-tracking branch 'origin/master' into fix/chat-status-lost
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Successful in 7m10s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Successful in 7m21s
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Successful in 7m26s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Successful in 7m41s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 1m59s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m40s
Project CI / Repository checks (pull_request) Successful in 4m58s
Project CI / Native shell tests (pull_request) Successful in 7m41s
Project CI / Backend tests (pull_request) Successful in 9m14s
Project CI / Frontend tests (pull_request) Successful in 7m37s
Project CI / AI game creator shell web tests (pull_request) Successful in 4m43s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Successful in 7m10s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Successful in 7m21s
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Successful in 7m26s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Successful in 7m41s
Project CI / AI game creator shell Rust smoke (pull_request) Successful in 1m59s
Project CI / AI game creator shell Rust crates (pull_request) Successful in 2m40s
Project CI / Repository checks (pull_request) Successful in 4m58s
Project CI / Native shell tests (pull_request) Successful in 7m41s
Project CI / Backend tests (pull_request) Successful in 9m14s
Project CI / Frontend tests (pull_request) Successful in 7m37s
Project CI / AI game creator shell web tests (pull_request) Successful in 4m43s
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"schemaVersion": "agc-skill-pack.v1",
|
||||
"version": "2026-08-26.23",
|
||||
"version": "2026-08-26.24",
|
||||
"skills": [
|
||||
{
|
||||
"name": "agc-game-production-workflow",
|
||||
@@ -63,7 +63,7 @@
|
||||
"agents/openai.yaml",
|
||||
"references/platform-art-contract.md"
|
||||
],
|
||||
"sha256": "c6329c6a3cbd17a237d042349d7fd8adcf240287ef56d23b49329923e976d534"
|
||||
"sha256": "47ac742d9b88e5d6cd9833484ab212152578e58ae27f7add312fd1d78183385c"
|
||||
},
|
||||
{
|
||||
"name": "agc-web-game-development",
|
||||
|
||||
@@ -19,6 +19,12 @@ image, UI design image, or publication material; use `agc_edit_image` for an
|
||||
edit of an existing registered image; use `taonier_prepare_game_art` only for
|
||||
the complete game-art package and its canonical slices.
|
||||
|
||||
With `agc_generate_image`, `kind="character"` and `kind="art-spritesheet"`
|
||||
generate the subject on a solid-colour background and automatically matte it
|
||||
away afterwards, producing transparent-background results; write the prompt
|
||||
for the subject only, never for a scene. `kind="image"` keeps the rendered
|
||||
frame without extra processing.
|
||||
|
||||
When `agc_generate_image` is used with `kind="art-spritesheet"`, `sliceMode` is
|
||||
required and has no default, so decide it explicitly:
|
||||
|
||||
|
||||
@@ -550,6 +550,8 @@ fn extract_mcp_arguments(root: &Path, tool: &str, arguments: &Value) -> Value {
|
||||
"agc_generate_image" => {
|
||||
copy_string(object, "kind", &mut out);
|
||||
copy_string(object, "sliceMode", &mut out);
|
||||
copy_number(object, "sliceCount", &mut out);
|
||||
copy_string(object, "screenColor", &mut out);
|
||||
copy_string(object, "aspectRatio", &mut out);
|
||||
copy_string(object, "imageSize", &mut out);
|
||||
copy_string(object, "assetName", &mut out);
|
||||
@@ -1194,7 +1196,13 @@ mod tests {
|
||||
"item": {
|
||||
"type": "mcpToolCall",
|
||||
"tool": "agc_generate_image",
|
||||
"arguments": { "prompt": prompt, "kind": "icon-spec" }
|
||||
"arguments": {
|
||||
"prompt": prompt,
|
||||
"kind": "art-spritesheet",
|
||||
"sliceMode": "connected-components",
|
||||
"sliceCount": 8,
|
||||
"screenColor": "#CFEFFF"
|
||||
}
|
||||
}
|
||||
}));
|
||||
audit.finish(true);
|
||||
@@ -1205,6 +1213,8 @@ mod tests {
|
||||
let stored = item["arguments"]["prompt"].as_str().expect("prompt");
|
||||
assert_eq!(stored.chars().count(), DIRECT_CODEX_AUDIT_BRIEF_CHARS);
|
||||
assert_eq!(item["arguments"]["promptChars"], json!(5000));
|
||||
assert_eq!(item["arguments"]["sliceCount"], json!(8));
|
||||
assert_eq!(item["arguments"]["screenColor"], json!("#CFEFFF"));
|
||||
assert_eq!(
|
||||
item["arguments"]["promptSha256"],
|
||||
json!(sha256_hex("收".repeat(5000).as_bytes()))
|
||||
|
||||
@@ -3390,6 +3390,7 @@ async fn generate_direct_taonier_art_asset_at(
|
||||
slice_mode: (asset_kind == "art-spritesheet").then(|| "connected-components".to_string()),
|
||||
grid_x: None,
|
||||
grid_y: None,
|
||||
screen_color: None,
|
||||
};
|
||||
let runtime_context =
|
||||
direct_taonier_art_generation_runtime_context(root, output_path, asset_kind)?;
|
||||
|
||||
@@ -2224,12 +2224,48 @@ fn validate_generate_image_slice_declaration(
|
||||
}
|
||||
if slice_mode.is_some() || grid_x.is_some() || grid_y.is_some() || slice_count.is_some() {
|
||||
return Err(format!(
|
||||
"工具参数 sliceMode/gridX/gridY 仅对 kind=art-spritesheet 生效,当前 kind={kind}"
|
||||
"工具参数 sliceMode/gridX/gridY/sliceCount 仅对 kind=art-spritesheet 生效,当前 kind={kind}"
|
||||
));
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// 抠图纯色背景只服务 character 与 art-spritesheet 链路;格式校验收口为
|
||||
/// `auto` 或 `#RRGGBB`(服务端另有支持色板,客户端不复制),`auto`/空串归一为
|
||||
/// None(服务端自动决策),hex 统一大写后透传。其它 kind 携带该字段直接拒绝,
|
||||
/// 避免服务端静默忽略造成“已生效”的误解。
|
||||
fn normalize_generate_image_screen_color(
|
||||
arguments: &Value,
|
||||
kind: &str,
|
||||
) -> Result<Option<String>, String> {
|
||||
let Some(value) = arguments.get("screenColor") else {
|
||||
return Ok(None);
|
||||
};
|
||||
if value.is_null() {
|
||||
return Ok(None);
|
||||
}
|
||||
if !matches!(kind, "character" | "art-spritesheet") {
|
||||
return Err(format!(
|
||||
"工具参数 screenColor 仅对 kind=character 和 kind=art-spritesheet 生效,当前 kind={kind}"
|
||||
));
|
||||
}
|
||||
let raw = value
|
||||
.as_str()
|
||||
.ok_or_else(|| "工具参数 screenColor 必须是 auto 或 #RRGGBB".to_string())?
|
||||
.trim();
|
||||
if raw.is_empty() || raw.eq_ignore_ascii_case("auto") {
|
||||
return Ok(None);
|
||||
}
|
||||
let normalized = raw.to_ascii_uppercase();
|
||||
let valid = normalized.len() == 7
|
||||
&& normalized.starts_with('#')
|
||||
&& normalized[1..].chars().all(|c| c.is_ascii_hexdigit());
|
||||
if !valid {
|
||||
return Err("工具参数 screenColor 必须是 auto 或 #RRGGBB".to_string());
|
||||
}
|
||||
Ok(Some(normalized))
|
||||
}
|
||||
|
||||
async fn bridge_generate_image(state: &DirectToolBridgeState, arguments: &Value) -> Value {
|
||||
let result = async {
|
||||
bridge_reject_unknown_fields(
|
||||
@@ -2244,6 +2280,8 @@ async fn bridge_generate_image(state: &DirectToolBridgeState, arguments: &Value)
|
||||
"sliceMode",
|
||||
"gridX",
|
||||
"gridY",
|
||||
"sliceCount",
|
||||
"screenColor",
|
||||
],
|
||||
)?;
|
||||
enforce_project_permission_policy(&state.root, "canvas.asset_generate")?;
|
||||
@@ -2323,13 +2361,25 @@ async fn bridge_generate_image(state: &DirectToolBridgeState, arguments: &Value)
|
||||
{
|
||||
return Err("工具参数 gridX/gridY 必须在 1 到 32 之间".to_string());
|
||||
}
|
||||
let slice_count = arguments
|
||||
.get("sliceCount")
|
||||
.filter(|value| !value.is_null())
|
||||
.map(|value| {
|
||||
value
|
||||
.as_u64()
|
||||
.filter(|count| (1..=256).contains(count))
|
||||
.map(|count| count as usize)
|
||||
.ok_or_else(|| "工具参数 sliceCount 必须是 1 到 256 的整数".to_string())
|
||||
})
|
||||
.transpose()?;
|
||||
validate_generate_image_slice_declaration(
|
||||
kind.as_str(),
|
||||
slice_mode.as_deref(),
|
||||
grid_x,
|
||||
grid_y,
|
||||
None,
|
||||
slice_count,
|
||||
)?;
|
||||
let screen_color = normalize_generate_image_screen_color(arguments, kind.as_str())?;
|
||||
let options = PlatformArtAssetGenerationOptions {
|
||||
output_path,
|
||||
aspect_ratio,
|
||||
@@ -2337,10 +2387,11 @@ async fn bridge_generate_image(state: &DirectToolBridgeState, arguments: &Value)
|
||||
asset_kind: kind.clone(),
|
||||
asset_label: asset_name.clone(),
|
||||
replace_existing: false,
|
||||
slice_count: None,
|
||||
slice_count,
|
||||
slice_mode,
|
||||
grid_x,
|
||||
grid_y,
|
||||
screen_color,
|
||||
};
|
||||
let _generation_guard = state.image_generation_gate.lock().await;
|
||||
let generated = with_direct_editor_api_credentials(
|
||||
@@ -2864,9 +2915,71 @@ mod tests {
|
||||
wrong_kind.contains("仅对 kind=art-spritesheet 生效"),
|
||||
"{wrong_kind}"
|
||||
);
|
||||
let wrong_kind_count =
|
||||
validate_generate_image_slice_declaration("image", None, None, None, Some(8))
|
||||
.expect_err("sliceCount-only violation must be rejected");
|
||||
assert!(
|
||||
wrong_kind_count.contains("sliceCount"),
|
||||
"sliceCount-only violation must name sliceCount: {wrong_kind_count}"
|
||||
);
|
||||
assert!(validate_generate_image_slice_declaration("image", None, None, None, None).is_ok());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn generate_image_screen_color_is_normalized_and_kind_gated() {
|
||||
// 省略与显式 null 等价,且不触发 kind 门禁。
|
||||
assert_eq!(
|
||||
normalize_generate_image_screen_color(&json!({}), "image").expect("omitted"),
|
||||
None
|
||||
);
|
||||
assert_eq!(
|
||||
normalize_generate_image_screen_color(&json!({"screenColor": null}), "image")
|
||||
.expect("null"),
|
||||
None
|
||||
);
|
||||
// auto 家族归一为 None(服务端自动决策),大小写与空白不敏感。
|
||||
for raw in ["auto", "AUTO", " auto ", ""] {
|
||||
assert_eq!(
|
||||
normalize_generate_image_screen_color(&json!({"screenColor": raw}), "character")
|
||||
.expect("auto variants"),
|
||||
None,
|
||||
"{raw}"
|
||||
);
|
||||
}
|
||||
// hex 统一大写透传;色板白名单由服务端权威校验,客户端只守格式。
|
||||
assert_eq!(
|
||||
normalize_generate_image_screen_color(&json!({"screenColor": "#cfefff"}), "character")
|
||||
.expect("lowercase hex"),
|
||||
Some("#CFEFFF".to_string())
|
||||
);
|
||||
assert_eq!(
|
||||
normalize_generate_image_screen_color(
|
||||
&json!({"screenColor": " #A0BBA0 "}),
|
||||
"art-spritesheet"
|
||||
)
|
||||
.expect("padded hex"),
|
||||
Some("#A0BBA0".to_string())
|
||||
);
|
||||
// 非 auto/非 hex、非字符串一律拒绝。
|
||||
for bad in [json!("green"), json!("#GGGGGG"), json!("#FFF"), json!(12)] {
|
||||
assert!(
|
||||
normalize_generate_image_screen_color(&json!({"screenColor": bad}), "character")
|
||||
.is_err(),
|
||||
"{bad}"
|
||||
);
|
||||
}
|
||||
// 其它 kind 携带该字段直接拒绝,即使取值合法。
|
||||
let gated =
|
||||
normalize_generate_image_screen_color(&json!({"screenColor": "#CFEFFF"}), "image")
|
||||
.expect_err("screenColor must stay scoped to character/art-spritesheet");
|
||||
assert!(gated.contains("kind=character"), "{gated}");
|
||||
assert!(normalize_generate_image_screen_color(
|
||||
&json!({"screenColor": "auto"}),
|
||||
"ui-prototype"
|
||||
)
|
||||
.is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn remove_background_identity_preserves_default_and_distinguishes_options() {
|
||||
let legacy = "asset-1\0透明图";
|
||||
|
||||
@@ -233,7 +233,7 @@ fn direct_tools_mcp_specs_for(controlled_web_search: bool, _cocos_editor_availab
|
||||
}),
|
||||
json!({
|
||||
"name": "agc_generate_image",
|
||||
"description": "按原网站图片画布能力生成一张新图片:普通插画、角色立绘、统一视觉规范图、游戏 UI 设计图或透明游戏素材图集都可使用。仅在用户明确要求生成新图时调用;游戏美术包是另一个专用工具,不是本工具的限制。客户端负责登录态授权、计费、幂等账本、下载校验、manifest/revision 登记和本地预览,不需要用户提供 API Key、Token、URL 或 .env。",
|
||||
"description": "按原网站图片画布能力生成一张新图片:普通插画、角色立绘、统一视觉规范图、游戏 UI 设计图或透明游戏素材图集都可使用。仅在用户明确要求生成新图时调用。",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -247,7 +247,7 @@ fn direct_tools_mcp_specs_for(controlled_web_search: bool, _cocos_editor_availab
|
||||
"type": "string",
|
||||
"enum": PLATFORM_ART_ASSET_GENERATION_KINDS,
|
||||
"default": "image",
|
||||
"description": "image=普通新图,character=角色图,spec/icon-spec=统一视觉规范图(spec 是服务端同义词,客户端统一登记为 icon-spec),ui-prototype=完整 UI 设计图,art-spritesheet=透明游戏素材图集(项目须已有 icon-spec 规范图),publication-material=发布宣传图"
|
||||
"description": "image=普通新图(不做额外处理),character=角色图(纯色底生成后自动抠图,产出透明背景立绘,prompt 只描述角色主体),spec/icon-spec=统一视觉规范图(spec 是服务端同义词,客户端统一登记为 icon-spec),ui-prototype=完整 UI 设计图,art-spritesheet=透明游戏素材图集(纯色底生成后自动抠图并切片,项目须已有 icon-spec 规范图),publication-material=发布宣传图"
|
||||
},
|
||||
"aspectRatio": {
|
||||
"type": "string",
|
||||
@@ -286,6 +286,16 @@ fn direct_tools_mcp_specs_for(controlled_web_search: bool, _cocos_editor_availab
|
||||
"minimum": 1,
|
||||
"maximum": 32,
|
||||
"description": "grid 模式纵向网格数量,只能与 sliceMode=grid 同时提供"
|
||||
},
|
||||
"sliceCount": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 256,
|
||||
"description": "只与 kind=art-spritesheet 且 sliceMode=connected-components 同时提供,用于约束目标素材张数;省略时按图像内容自动识别"
|
||||
},
|
||||
"screenColor": {
|
||||
"type": "string",
|
||||
"description": "抠图纯色背景,仅 kind=character(角色形象)和 kind=art-spritesheet(图标素材)生效,其它 kind 携带会被拒绝。生成时把主体置于该纯色背景上,回图后据此抠除背景。取值只能是 auto 或下列色板 hex 之一,传值只填 hex 本身、不要附带色名:#CFEFFF(浅雾蓝)、#B0C2E0(浅钢蓝)、#FFD6C2(暖浅桃色)、#E6D8FF(淡薰衣草紫)、#F4D8E8(浅粉灰)、#7FB3FF(中度天蓝)、#FFF2A8(浅柠黄)、#CFFFE1(淡薄荷绿)、#D8DEE8(浅中性灰)、#D8D2E8(淡灰紫)、#A8F7F0(高对比浅青)、#A0BBA0(灰竹绿);auto 时由服务端自动选色。手动指定时不能与角色或素材本体的颜色接近"
|
||||
}
|
||||
},
|
||||
"required": ["prompt"],
|
||||
@@ -1131,6 +1141,8 @@ async fn call_agc_generate_image(arguments: &Value) -> Value {
|
||||
"sliceMode",
|
||||
"gridX",
|
||||
"gridY",
|
||||
"sliceCount",
|
||||
"screenColor",
|
||||
],
|
||||
) {
|
||||
return mcp_tool_result(error, Vec::new(), true);
|
||||
@@ -1159,6 +1171,7 @@ async fn call_agc_generate_image(arguments: &Value) -> Value {
|
||||
("assetName", DIRECT_TOOLS_MCP_MAX_RESOURCE_NAME_CHARS),
|
||||
("outputPath", 512),
|
||||
("sliceMode", 32),
|
||||
("screenColor", 16),
|
||||
] {
|
||||
if arguments.get(field).is_some() {
|
||||
if let Err(error) = bounded_tool_string(arguments, field, max_chars) {
|
||||
@@ -2391,11 +2404,35 @@ mod tests {
|
||||
assert_eq!(image_tool["inputSchema"]["required"], json!(["prompt"]));
|
||||
assert!(image_tool["description"]
|
||||
.as_str()
|
||||
.is_some_and(|description| description.contains("不是本工具的限制")));
|
||||
.is_some_and(|description| description.contains("仅在用户明确要求生成新图时调用")));
|
||||
assert!(
|
||||
image_tool["inputSchema"]["properties"]["kind"]["description"]
|
||||
.as_str()
|
||||
.is_some_and(|description| description.contains("自动抠图")
|
||||
&& description.contains("prompt 只描述角色主体")
|
||||
&& description.contains("不做额外处理")),
|
||||
"kind description must carry the auto-matting semantics"
|
||||
);
|
||||
assert_eq!(
|
||||
image_tool["inputSchema"]["properties"]["sliceMode"]["enum"],
|
||||
json!(["connected-components", "grid"])
|
||||
);
|
||||
assert_eq!(
|
||||
image_tool["inputSchema"]["properties"]["sliceCount"]["minimum"],
|
||||
json!(1)
|
||||
);
|
||||
assert_eq!(
|
||||
image_tool["inputSchema"]["properties"]["sliceCount"]["maximum"],
|
||||
json!(256)
|
||||
);
|
||||
assert!(
|
||||
image_tool["inputSchema"]["properties"]["screenColor"]["description"]
|
||||
.as_str()
|
||||
.is_some_and(|description| description.contains("抠图纯色背景")
|
||||
&& description.contains("kind=character")
|
||||
&& description.contains("不要附带色名")),
|
||||
"screenColor description must carry the matting-background semantics"
|
||||
);
|
||||
assert!(
|
||||
image_tool["inputSchema"]["properties"]["sliceMode"]
|
||||
.get("default")
|
||||
|
||||
@@ -420,6 +420,9 @@ pub(crate) struct PlatformArtAssetGenerationOptions {
|
||||
pub(crate) slice_mode: Option<String>,
|
||||
pub(crate) grid_x: Option<u32>,
|
||||
pub(crate) grid_y: Option<u32>,
|
||||
/// 抠图纯色背景(auto/省略已归一为 None;Some 时是规范化后的大写 #RRGGBB)。
|
||||
/// 仅 character 与 art-spritesheet 链路透传给服务端。
|
||||
pub(crate) screen_color: Option<String>,
|
||||
}
|
||||
|
||||
impl Default for PlatformArtAssetGenerationOptions {
|
||||
@@ -435,6 +438,7 @@ impl Default for PlatformArtAssetGenerationOptions {
|
||||
slice_mode: None,
|
||||
grid_x: None,
|
||||
grid_y: None,
|
||||
screen_color: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2205,7 +2209,8 @@ pub(crate) async fn generate_platform_art_asset_with_required_slices_at(
|
||||
/// 动作,必须各自独立成槽,才能在同一项目里同时在途。
|
||||
///
|
||||
/// 升级前遗留账本仍由旧材料函数定位;新请求把显式切分模式纳入身份,避免同一图集
|
||||
/// 请求在网格与连通域之间误复用。`slice_count` 继续保持历史兼容语义,不进身份。
|
||||
/// 请求在网格与连通域之间误复用。`slice_count` 与 `screen_color` 同样改变付费产出,
|
||||
/// 一并进入身份;None 时跳过序列化,未使用这些字段的请求身份与旧版逐字节一致。
|
||||
#[derive(Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
struct StandalonePlatformArtGenerationFingerprintMaterial<'a> {
|
||||
@@ -2220,6 +2225,10 @@ struct StandalonePlatformArtGenerationFingerprintMaterial<'a> {
|
||||
slice_mode: Option<&'a str>,
|
||||
grid_x: Option<u32>,
|
||||
grid_y: Option<u32>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
slice_count: Option<usize>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
screen_color: Option<&'a str>,
|
||||
}
|
||||
|
||||
/// 把输出路径收口成稳定的旧槽材料:空路径与未指定路径都落到 `(automatic-output)`,
|
||||
@@ -2259,6 +2268,8 @@ fn standalone_platform_art_generation_runtime_context(
|
||||
slice_mode: options.slice_mode.as_deref(),
|
||||
grid_x: options.grid_x,
|
||||
grid_y: options.grid_y,
|
||||
slice_count: options.slice_count,
|
||||
screen_color: options.screen_color.as_deref(),
|
||||
})
|
||||
.map_err(|error| format!("序列化 standalone 图片生成动作身份失败:{error}"))?;
|
||||
let action_fingerprint = format!("{:x}", Sha256::digest(&identity_bytes));
|
||||
@@ -2833,7 +2844,7 @@ pub(in crate::agent) async fn request_platform_art_asset_with_runtime_options_at
|
||||
"sliceMode": options.slice_mode,
|
||||
"gridX": options.grid_x,
|
||||
"gridY": options.grid_y,
|
||||
"screenColor": "auto",
|
||||
"screenColor": options.screen_color.as_deref().unwrap_or("auto"),
|
||||
"aspectRatio": options.aspect_ratio,
|
||||
"imageSize": options.image_size,
|
||||
"assetLabel": options.asset_label,
|
||||
@@ -2881,6 +2892,14 @@ pub(in crate::agent) async fn request_platform_art_asset_with_runtime_options_at
|
||||
if options.asset_kind == "image" {
|
||||
object.remove("kind");
|
||||
}
|
||||
if options.asset_kind == "character" {
|
||||
if let Some(screen_color) = options.screen_color.as_deref() {
|
||||
object.insert(
|
||||
"screenColor".to_string(),
|
||||
serde_json::Value::String(screen_color.to_string()),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
request_body
|
||||
} else {
|
||||
@@ -8429,6 +8448,7 @@ mod canvas_generation_tests {
|
||||
slice_mode: None,
|
||||
grid_x: None,
|
||||
grid_y: None,
|
||||
screen_color: None,
|
||||
};
|
||||
let ordinary =
|
||||
standalone_platform_art_generation_runtime_context("完整生成提示词", &options, false)
|
||||
@@ -8495,6 +8515,12 @@ mod canvas_generation_tests {
|
||||
let mut changed = options.clone();
|
||||
changed.replace_existing = false;
|
||||
changed_options.push(changed);
|
||||
let mut changed = options.clone();
|
||||
changed.screen_color = Some("#CFEFFF".to_string());
|
||||
changed_options.push(changed);
|
||||
let mut changed = options.clone();
|
||||
changed.slice_count = Some(8);
|
||||
changed_options.push(changed);
|
||||
for changed in changed_options {
|
||||
let context = standalone_platform_art_generation_runtime_context(
|
||||
"完整生成提示词",
|
||||
@@ -10473,6 +10499,7 @@ mod canvas_generation_tests {
|
||||
slice_mode: None,
|
||||
grid_x: None,
|
||||
grid_y: None,
|
||||
screen_color: None,
|
||||
};
|
||||
let prompt = "生成同一套整包美术";
|
||||
let generation_prompt = build_platform_art_asset_prompt(prompt, &[], &options);
|
||||
@@ -11377,6 +11404,7 @@ mod canvas_generation_tests {
|
||||
slice_mode: None,
|
||||
grid_x: None,
|
||||
grid_y: None,
|
||||
screen_color: None,
|
||||
};
|
||||
let prompt = "保持同一个生成提示词";
|
||||
let generation_prompt = build_platform_art_asset_prompt(prompt, &[], &options);
|
||||
@@ -11841,6 +11869,7 @@ mod canvas_generation_tests {
|
||||
slice_mode: None,
|
||||
grid_x: None,
|
||||
grid_y: None,
|
||||
screen_color: None,
|
||||
};
|
||||
let prompt = "恢复已受理视觉规范图";
|
||||
let generation_prompt = build_platform_art_asset_prompt(prompt, &[], &options);
|
||||
@@ -12450,6 +12479,7 @@ mod canvas_generation_tests {
|
||||
slice_mode: Some("connected-components".to_string()),
|
||||
grid_x: None,
|
||||
grid_y: None,
|
||||
screen_color: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -577,6 +577,7 @@ pub(in crate::agent) async fn observe_agent_runtime_platform_art_asset_generatio
|
||||
slice_mode: (!slice_mode.trim().is_empty()).then_some(slice_mode.clone()),
|
||||
grid_x,
|
||||
grid_y,
|
||||
screen_color: None,
|
||||
};
|
||||
if let Some(pending) = pending_action {
|
||||
match recover_persisted_visual_generation_options(
|
||||
@@ -628,6 +629,7 @@ pub(in crate::agent) async fn observe_agent_runtime_platform_art_asset_generatio
|
||||
.or_else(|| (!slice_mode.trim().is_empty()).then_some(slice_mode)),
|
||||
grid_x,
|
||||
grid_y,
|
||||
screen_color: requested_options.screen_color,
|
||||
}
|
||||
};
|
||||
options.replace_existing = replace_existing;
|
||||
|
||||
@@ -4914,6 +4914,7 @@ pub(crate) fn prepare_local_project_asset_generation(
|
||||
.then(|| "connected-components".to_string()),
|
||||
grid_x: None,
|
||||
grid_y: None,
|
||||
screen_color: None,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1094,6 +1094,7 @@ async fn canonical_art_spec_and_ui_requests_use_the_shared_reference_chain() {
|
||||
slice_mode: None,
|
||||
grid_x: None,
|
||||
grid_y: None,
|
||||
screen_color: None,
|
||||
},
|
||||
)
|
||||
.await;
|
||||
@@ -5574,6 +5575,7 @@ fn ui_prototype_generation_uses_dedicated_prompt_and_art_spec() {
|
||||
slice_mode: None,
|
||||
grid_x: None,
|
||||
grid_y: None,
|
||||
screen_color: None,
|
||||
};
|
||||
let prompt = build_platform_art_asset_prompt(
|
||||
"原创网格贪吃蛇:分数与状态 HUD、四类不同分值食物、开始、方向键/WASD、触控方向键、失败与重开",
|
||||
|
||||
@@ -185,7 +185,7 @@ camelCase JSON。禁止出现附件正文、命令 stdout、patch diff、宿主
|
||||
| `agc_list_project_files` | `path`、`query`(120)、`kind`、`offset`、`limit` | 无 |
|
||||
| `agc_write_file` | `path`、`contentChars`(`content` 的字符数,不是正文) | 不落 `content` |
|
||||
| `taonier_prepare_game_art` | `mode`、`brief`(截断 4000)、`briefChars`、`briefSha256` | **要 brief 原文**(分析定玩法的吸烟枪;上限已是 MCP 合同) |
|
||||
| `agc_generate_image` | `kind`、`aspectRatio`、`imageSize`、`assetName`、`outputPath`、`prompt` 截断 4000、`promptChars`、`promptSha256` | 不落 32k 全文 |
|
||||
| `agc_generate_image` | `kind`、`sliceMode`、`sliceCount`、`screenColor`、`aspectRatio`、`imageSize`、`assetName`、`outputPath`、`prompt` 截断 4000、`promptChars`、`promptSha256` | 不落 32k 全文 |
|
||||
| `agc_edit_image` | `sourceLocalAssetId`、`assetName`、`prompt` 截断 4000、`promptChars`、`promptSha256` | 同上 |
|
||||
| `agc_create_or_derive_resource` | `kind`、`mode`、`sourceLocalAssetId`、`assetName`、`prompt` 截断 4000、`promptChars`、`promptSha256` | MCP 上限已是 4000 |
|
||||
| `agc_list_registered_assets` | `kind`、`assetId`、`includeSequenceFrames`、`offset`、`limit` | 无 |
|
||||
|
||||
Reference in New Issue
Block a user