Move input contracts to model

This commit is contained in:
gamer147
2026-08-03 11:00:36 -04:00
parent 853326dff0
commit 9ec2740e71
6 changed files with 20 additions and 9 deletions

View File

@@ -179,6 +179,8 @@ decoders, host surfaces, renderers, persistence, and tests; consumers do not dep
decoded pixels. decoded pixels.
`engine/Age.Engine/Model/SurfaceContracts.cs` owns neutral surface fill/copy requests and the black-fade direction `engine/Age.Engine/Model/SurfaceContracts.cs` owns neutral surface fill/copy requests and the black-fade direction
shared by VM presentation, graphics hosts, Godot, and tests. shared by VM presentation, graphics hosts, Godot, and tests.
`engine/Age.Engine/Model/InputContracts.cs` owns neutral ADV auto-wait state and fullwidth text-edit request/result
records shared by input hosts, timing policy, VM dispatch, Godot, and tests.
`engine/Age.Engine/Model/GfxState.cs` retains cross-domain retained-graphics coordination. `engine/Age.Engine/Model/GfxState.cs` retains cross-domain retained-graphics coordination.
`engine/Age.Engine/Model/GfxState.Contracts.cs` owns its public render, transition, diagnostic, persistence, `engine/Age.Engine/Model/GfxState.Contracts.cs` owns its public render, transition, diagnostic, persistence,

View File

@@ -804,6 +804,11 @@ do not mix mechanical moves with semantic changes.
remain behaviorally unchanged. Input transport records remain in their prior locations pending a separate remain behaviorally unchanged. Input transport records remain in their prior locations pending a separate
cleanup. Runtime validation remains green. cleanup. Runtime validation remains green.
The ninth bounded contract slice moved the unchanged `FullwidthTextEditRequest`, `FullwidthTextEditResult`, and
`AdvAutoWaitState` declarations from `Hosting` into `Model/InputContracts.cs`. Only the auto-advance timer and
its focused tests required new imports; record shape, editor defaults, wait overloads, and all runtime behavior
remain unchanged. Runtime validation remains green.
4. **Make the build graph express source ownership.** Stop linking production `.cs` files from `godot/` and 4. **Make the build graph express source ownership.** Stop linking production `.cs` files from `godot/` and
`tools/movie-corpus-gate/` into `Age.Engine.Tests`. Extract the platform-neutral frontend/movie/diagnostic `tools/movie-corpus-gate/` into `Age.Engine.Tests`. Extract the platform-neutral frontend/movie/diagnostic
code into a small production project referenced by Godot, tests, and the corpus gate. Retain both existing code into a small production project referenced by Godot, tests, and the corpus gate. Retain both existing
@@ -1165,7 +1170,7 @@ layer's rendering diverges from ADV; save layout.
Continue step 3 of the **codebase consolidation** maintenance slice: clarify runtime contracts without changing Continue step 3 of the **codebase consolidation** maintenance slice: clarify runtime contracts without changing
behavior or the aggregate host accepted by the VM. With diagnostic, lifecycle, audio, and movie contracts behavior or the aggregate host accepted by the VM. With diagnostic, lifecycle, audio, and movie contracts
established beneath `IHost`, shared graphics transport neutral, and graphics/input contracts now separated, move established beneath `IHost`, shared graphics transport neutral, and graphics/input contracts now separated, move
the unchanged `FullwidthTextEditRequest`, `FullwidthTextEditResult`, and `AdvAutoWaitState` declarations from the remaining ADV text/history/layout/presentation members into `IAdvHost` next. Preserve all required/default
`Hosting` to `Model` next. Preserve all consumers before extracting the remaining ADV text/presentation contract. members and existing hosts, leaving `IHost` as the unchanged aggregate runtime entry point.
Concrete playthrough blockers may still preempt this bounded maintenance work; the consolidation effort does Concrete playthrough blockers may still preempt this bounded maintenance work; the consolidation effort does
not replace Phase B gameplay validation or the open cross-platform gates. not replace Phase B gameplay validation or the open cross-platform gates.

View File

@@ -1,4 +1,5 @@
using Age.Engine.Hosting; using Age.Engine.Hosting;
using Age.Engine.Model;
using Xunit; using Xunit;
public class AdvAutoAdvanceTimerTests public class AdvAutoAdvanceTimerTests

View File

@@ -1,3 +1,5 @@
using Age.Engine.Model;
namespace Age.Engine.Hosting; namespace Age.Engine.Hosting;
/// <summary> /// <summary>

View File

@@ -17,16 +17,9 @@ public readonly record struct AdvWaitIndicatorConfig(
} }
} }
public readonly record struct AdvAutoWaitState(
bool Enabled, bool VoicePending, long PostVoiceDelayMs, long UnvoicedDelayMs);
/// <summary>A synchronous AGE-owned diagnostic prompt after native body/context formatting.</summary> /// <summary>A synchronous AGE-owned diagnostic prompt after native body/context formatting.</summary>
public readonly record struct DiagnosticMessage(string Caption, string Text); public readonly record struct DiagnosticMessage(string Caption, string Text);
/// <summary>AGERc command 10's synchronous full-width text edit request and result.</summary>
public readonly record struct FullwidthTextEditRequest(string CurrentText, string InitialText);
public readonly record struct FullwidthTextEditResult(bool Accepted, string Text);
public interface IHost : IDiagnosticHost, ILifecycleHost, IAudioHost, IMovieHost, IGraphicsHost, IInputHost public interface IHost : IDiagnosticHost, ILifecycleHost, IAudioHost, IMovieHost, IGraphicsHost, IInputHost
{ {
void ShowText(int offset, string text); void ShowText(int offset, string text);

View File

@@ -0,0 +1,8 @@
namespace Age.Engine.Model;
public readonly record struct AdvAutoWaitState(
bool Enabled, bool VoicePending, long PostVoiceDelayMs, long UnvoicedDelayMs);
/// <summary>AGERc command 10's synchronous full-width text edit request and result.</summary>
public readonly record struct FullwidthTextEditRequest(string CurrentText, string InitialText);
public readonly record struct FullwidthTextEditResult(bool Accepted, string Text);