ec3a187dd7
Project CI / AI game creator shell Rust crates (push) Successful in 1m11s
Project CI / AI game creator shell Rust smoke (push) Successful in 1m34s
Project CI / Backend tests (push) Successful in 4m46s
Project CI / AI game creator shell Rust lane 2/2 (push) Successful in 8m31s
Project CI / AI game creator shell Rust lane 1/2 (push) Successful in 9m41s
Project CI / Frontend tests (push) Successful in 2m19s
Project CI / Native shell tests (push) Successful in 7m5s
Project CI / AI game creator shell web tests (push) Successful in 1m54s
Project CI / Repository checks (push) Successful in 2m36s
Reviewed-on: https://git.genarrative.world/git/GenarrativeAI/Genarrative/pulls/503 Co-authored-by: Linghong <ink29535@proton.me> Co-committed-by: Linghong <ink29535@proton.me>
142 lines
7.6 KiB
Rust
142 lines
7.6 KiB
Rust
use super::*;
|
|
|
|
mod canvas_generation;
|
|
mod draft_validation;
|
|
mod draft_writer;
|
|
mod external_generation_state;
|
|
mod loop_orchestration;
|
|
mod pass_artifacts;
|
|
mod prompt_context;
|
|
mod role_briefs;
|
|
mod run_lifecycle;
|
|
#[cfg(test)]
|
|
mod tests;
|
|
mod trace;
|
|
|
|
#[cfg(test)]
|
|
pub(crate) use canvas_generation::submit_external_generation_request;
|
|
pub(in crate::agent) use canvas_generation::{
|
|
admit_platform_art_generation_at, commit_prepared_platform_art_asset_at,
|
|
commit_prepared_platform_art_asset_strict_slices_at, generate_admitted_platform_art_asset_at,
|
|
generate_platform_art_asset_with_retained_runtime_options_at,
|
|
generate_platform_art_asset_with_runtime_options_at,
|
|
platform_art_generation_error_result_unknown, recover_persisted_visual_generation_options,
|
|
register_existing_platform_art_slices_at, request_platform_art_asset_with_runtime_options_at,
|
|
restore_platform_art_asset_bytes_at,
|
|
retained_platform_art_generation_runtime_spritesheet_identity_at,
|
|
retained_platform_art_generation_runtime_state_matches_direct_stage_at,
|
|
validate_platform_art_png_bytes_with_limits, AdmittedPlatformArtGeneration,
|
|
};
|
|
pub(crate) use canvas_generation::{
|
|
external_canvas_placeholder, external_editor_json_request, external_editor_response_data,
|
|
external_generation_poll_after_ms, platform_art_generation_error_needs_reconciliation,
|
|
prepare_external_canvas_generation_context, resolve_canvas_resource_download_with_access,
|
|
ExternalCanvasGenerationContext,
|
|
};
|
|
pub(in crate::agent) use draft_validation::validate_closed_game_script_blocks;
|
|
pub(crate) use external_generation_state::{
|
|
classify_platform_art_generation_service_identity,
|
|
platform_art_generation_external_service_fingerprint,
|
|
platform_art_generation_external_service_origin, PlatformArtGenerationServiceIdentityMatch,
|
|
PLATFORM_ART_GENERATION_SERVICE_IDENTITY_SCHEME,
|
|
};
|
|
pub(in crate::agent) use external_generation_state::{
|
|
game_creator_agent_runtime_external_generation_exists,
|
|
platform_art_generation_runtime_context_from_pending,
|
|
platform_art_generation_runtime_recovery_at, remove_platform_art_generation_runtime_state_at,
|
|
PlatformArtGenerationRuntimeContext, PlatformArtGenerationRuntimeRecovery,
|
|
PLATFORM_ART_GENERATION_RUNTIME_SCHEMA_VERSION,
|
|
};
|
|
#[cfg(test)]
|
|
pub(crate) use external_generation_state::{
|
|
platform_art_generation_external_configuration_fingerprint,
|
|
platform_art_generation_legacy_external_configuration_fingerprint,
|
|
setup_platform_art_generation_runtime_accepted_for_recovery_test,
|
|
write_platform_art_generation_runtime_accepted_for_test,
|
|
write_platform_art_generation_runtime_prepared_for_test,
|
|
};
|
|
pub(in crate::agent) use loop_orchestration::build_game_creator_agent_runtime_llm_client;
|
|
pub(in crate::agent) use trace::game_creation_agent_group_id;
|
|
|
|
#[cfg(test)]
|
|
pub(crate) use canvas_generation::request_platform_art_asset_with_options_for_test;
|
|
#[allow(unused_imports)]
|
|
pub(crate) use canvas_generation::{
|
|
build_platform_art_asset_prompt, editor_api_key_is_configured, generate_platform_art_asset_at,
|
|
generate_platform_art_asset_with_options_at, maybe_generate_platform_art_asset_step,
|
|
needs_platform_art_asset_generation, normalize_platform_art_asset_generation_kind,
|
|
normalize_platform_art_reference_asset_ids, normalize_platform_art_target_category,
|
|
platform_art_asset_art_spec, platform_art_asset_output_extension_matches,
|
|
platform_art_runtime_references_match_request_contract, prepare_platform_art_asset_output_path,
|
|
project_canvas_asset_media_types, role_has_canvas_assets, validate_platform_art_icon_prompt,
|
|
PlatformArtAssetGenerationOptions, PLATFORM_ART_ASSET_GENERATION_KINDS,
|
|
};
|
|
#[allow(unused_imports)]
|
|
pub(crate) use draft_validation::{
|
|
contains_any, evaluate_game_draft, extract_json_payload, fnv1a64,
|
|
parse_llm_game_draft_response, render_evaluator_findings, render_planner_spec,
|
|
strip_llm_thinking_blocks, validate_canvas_rendering_html, validate_game_html_smoke,
|
|
validate_llm_agent_handoffs, validate_llm_game_draft, validate_non_placeholder_game_html,
|
|
validate_playable_game_html, validate_safe_game_html_runtime,
|
|
};
|
|
pub(crate) use draft_writer::{ensure_legacy_json_generator_project, write_local_game_draft_at};
|
|
#[allow(unused_imports)]
|
|
pub(crate) use loop_orchestration::{
|
|
emit_agent_progress, game_creator_agent_llm_error_is_mud_points_insufficient,
|
|
game_creator_agent_llm_error_public_summary, game_creator_mud_points_insufficient_message,
|
|
game_creator_runtime_error_is_mud_points_insufficient, request_game_creator_llm_text,
|
|
request_generator_game_draft_with_client, request_planner_spec_with_client,
|
|
run_game_creator_agent_loop_at, AgentProgressEmitter,
|
|
GAME_CREATOR_MUD_POINTS_INSUFFICIENT_ERROR_KIND,
|
|
};
|
|
#[allow(unused_imports)]
|
|
pub(crate) use pass_artifacts::{
|
|
agent_role_memory_relative_path, agent_role_memory_relative_path_for_task,
|
|
append_agent_success_memories, append_group_brief_steps, read_previous_agent_role_brief,
|
|
render_agent_pass_agenda_markdown, render_agent_pass_task_graph_json,
|
|
render_carryover_role_brief, write_agent_group_brief, write_agent_pass_agenda,
|
|
write_agent_pass_artifacts, write_agent_pass_file, write_agent_role_brief,
|
|
};
|
|
#[allow(unused_imports)]
|
|
pub(crate) use prompt_context::{
|
|
append_prompt_context, asset_source_kind_label, game_creator_generator_user_prompt,
|
|
game_creator_planner_system_prompt, game_creator_planner_user_prompt,
|
|
game_creator_system_prompt, read_optional_text, redact_secret_tokens,
|
|
render_local_asset_prompt_context, render_local_conversation_prompt_context,
|
|
render_local_conversation_prompt_context_for_session, sanitize_error_context,
|
|
sanitize_prompt_context, truncate_prompt_context, truncate_prompt_context_preserving_tail,
|
|
};
|
|
#[allow(unused_imports)]
|
|
pub(crate) use role_briefs::{
|
|
append_agent_loop_log, append_agent_loop_memory, append_collaboration_steps,
|
|
game_creator_role_agent_system_prompt, handoff_group_label, handoff_summary_for_group,
|
|
has_game_creator_agent_llm_override, join_or_none, local_role_acceptance_risk,
|
|
local_role_downstream_constraint, render_agent_group_brief_markdown,
|
|
render_agent_group_briefs_context, render_agent_pass_handoff, render_agent_role_brief_context,
|
|
render_local_agent_role_brief, request_agent_group_briefs_with_client,
|
|
request_agent_role_brief_with_config, truncate_inline,
|
|
};
|
|
#[allow(unused_imports)]
|
|
pub(crate) use run_lifecycle::{
|
|
agent_run_control_result_from_trace, collect_agent_run_artifacts, control_agent_run_at,
|
|
count_agent_tool_calls, prune_agent_run_history, read_latest_agent_run_trace,
|
|
resumed_agent_run_prompt, update_agent_run_lifecycle, write_agent_run_trace_payload,
|
|
};
|
|
#[cfg(test)]
|
|
pub(crate) use tests::request_llm_game_draft_with_client;
|
|
#[allow(unused_imports)]
|
|
pub(crate) use trace::{
|
|
agent_run_lifecycle_status, agent_run_stop_reason, agent_trace_step, agent_trace_step_owned,
|
|
append_agent_run_activity, append_agent_run_jsonl, append_agent_run_output,
|
|
append_agent_run_trace_step, append_local_artifact_write_step, append_preview_log,
|
|
append_preview_start_trace_step, append_preview_stop_trace_step,
|
|
append_static_smoke_manual_trace_step, append_static_smoke_step,
|
|
build_agent_run_task_graph_trace, collect_agent_pass_plan_traces,
|
|
game_creation_agent_group_from_id, infer_agent_trace_phase, parse_agent_task_id_list,
|
|
read_agent_agenda_snapshot, ready_task_ids_for_tasks, record_replaced_preview_stop,
|
|
role_brief_completes_task, set_task_status_if_current, should_replace_task_status, status_rank,
|
|
task_has_status, task_status_from_agent_step, with_task_context,
|
|
write_agent_run_context_bundle, write_agent_run_trace, AgentAgendaSnapshot,
|
|
AgentPassTaskGraphSnapshot,
|
|
};
|