Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/pages/docs/dotnet-packages.astro
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
import DocPage from '../../components/DocPage.astro'; import CodeBlock from '../../components/CodeBlock.astro'; import Callout from '../../components/Callout.astro';
---
<DocPage eyebrow="DOCS / .NET PACKAGES" title=".NET packages" lead="Use these packages to launch games and test their UI in C#. Add image comparison, semantic comparison, or replay when you need it." description="Reference for Gua Core, Runtime, Testing, Godot, Unity, Visual, Snapshots, Recording, and their target frameworks." section="docs">
<h2>Install</h2><CodeBlock title="Add only the features you need" lang="powershell" code={`dotnet add package Gua.Core --version 1.1.0\ndotnet add package Gua.Testing --version 1.1.0\n\n# Implement an engine adapter\ndotnet add package Gua.Runtime --version 1.1.0\n\n# Launch an engine process from an external test\ndotnet add package Gua.Testing.Godot --version 1.1.0\ndotnet add package Gua.Testing.Unity --version 1.1.0\n\n# Optional capabilities\ndotnet add package Gua.Testing.Visual --version 1.1.0\ndotnet add package Gua.Testing.Snapshots --version 1.1.0\ndotnet add package Gua.Testing.Recording --version 1.1.0`} /><p>The examples pin 1.1.0. Keep the game integration and all Gua packages in one project on the same version. <code>Visual</code>, <code>Snapshots</code>, and <code>Recording</code> are independent opt-ins.</p>
<h2>Install</h2><CodeBlock title="Add only the features you need" lang="powershell" code={`dotnet add package Gua.Core\ndotnet add package Gua.Testing\n\n# Implement an engine adapter\ndotnet add package Gua.Runtime\n\n# Launch an engine process from an external test\ndotnet add package Gua.Testing.Godot\ndotnet add package Gua.Testing.Unity\n\n# Optional capabilities\ndotnet add package Gua.Testing.Visual\ndotnet add package Gua.Testing.Snapshots\ndotnet add package Gua.Testing.Recording`} /><p>Keep the game integration and all Gua packages in one project on the same version. <code>Visual</code>, <code>Snapshots</code>, and <code>Recording</code> are independent opt-ins.</p>
<h2 id="versions">Check the installed version</h2><p>Without a version argument, the command selects the latest compatible stable version from the configured NuGet feeds when it runs. A concrete version is recorded in <code>.csproj</code>, or <code>Directory.Packages.props</code> with central management. Later builds do not continually update it to the latest release. Commit those files and align the game integration and related Gua packages. For an existing game or CI, specify its actual version with <code>--version</code>. <a href="https://learn.microsoft.com/dotnet/core/tools/dotnet-package-add">Official CLI specification</a></p>
<p>NuGet: <a href="https://www.nuget.org/packages/Gua.Core">Core</a> · <a href="https://www.nuget.org/packages/Gua.Testing">Testing</a> · <a href="https://www.nuget.org/packages/Gua.Testing.Godot">Testing.Godot</a> · <a href="https://www.nuget.org/packages/Gua.Testing.Unity">Testing.Unity</a> · <a href="https://www.nuget.org/packages/Gua.Runtime">Runtime</a> · <a href="https://www.nuget.org/packages/Gua.Testing.Visual">Testing.Visual</a> · <a href="https://www.nuget.org/packages/Gua.Testing.Snapshots">Testing.Snapshots</a> · <a href="https://www.nuget.org/packages/Gua.Testing.Recording">Testing.Recording</a></p>
<h2>Choose a package</h2><div class="table-wrap"><table><thead><tr><th>Goal</th><th>Add</th><th>Use it for</th></tr></thead><tbody>
<tr><td>Write ordinary semantic UI tests</td><td><code>Gua.Testing</code> + engine host</td><td>Visibility, enabled state, text, values, and state transitions after actions.</td></tr>
Expand Down
8 changes: 4 additions & 4 deletions src/pages/docs/github-actions.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import CodeBlock from '../../components/CodeBlock.astro';
import Callout from '../../components/Callout.astro';
---
<DocPage eyebrow="DOCS / CI" title="GitHub Actions" lead="gua-project/gua-tester provides versioned CI workflows for Gua UI tests in Godot 4.7 and Unity 6 projects." description="Godot and Unity inputs, credentials, artifacts, and visual reports provided by Gua Tester Actions." section="docs">
<Callout title="Gua Tester Actions v3.2"><p>Use the <a href="https://github.com/gua-project/gua-tester/releases/tag/v3.2">published v3.2 actions</a>. The action version (<code>@v3.2</code>), Gua version (for example <code>gua-v1.1.0</code>), and Godot/Unity version are independent selections.</p></Callout>
<Callout title="Gua Tester Actions v3.2"><p>Use the <a href="https://github.com/gua-project/gua-tester/releases/tag/v3.2">published v3.2 actions</a>. The action version (<code>@v3.2</code>), Gua version (for example <code>gua-v1.1.1</code>), and Godot/Unity version are independent selections.</p></Callout>

<Callout kind="tip" title="Install game packages in CI"><p>The Godot action downloads <code>gua-godot-addon-*.zip</code> and the Unity workflow downloads <code>com.link1345.gua-*.tgz</code> from the selected Gua release. The examples below pin <code>gua-v1.1.0</code>; use <code>1.1.0</code> NuGet packages in the test project too. See <a href="/godot/ui/">Godot</a> or <a href="/unity/ui/">Unity</a> for game installation. Omitting the tag selects the latest stable release containing the required package. Pin the tag for reproducible CI.</p></Callout>
<Callout kind="tip" title="Install game packages in CI"><p>The Godot action downloads <code>gua-godot-addon-*.zip</code> and the Unity workflow downloads <code>com.link1345.gua-*.tgz</code> from the selected Gua release. The examples below pin <code>gua-v1.1.1</code>; use <code>1.1.1</code> NuGet packages in the test project too. See <a href="/godot/ui/">Godot</a> or <a href="/unity/ui/">Unity</a> for game installation. Omitting the tag selects the latest stable release containing the required package. Pin the tag for reproducible CI.</p></Callout>
<h2>Godot 4.7</h2>
<p>The Godot composite action downloads the official Godot build matching its runner, links the released Gua addon, exports <code>GODOT_EXECUTABLE</code>, prepares project imports, and runs the external <code>Gua.Testing.Godot</code> test project.</p>
<CodeBlock title=".github/workflows/godot.yml" lang="yaml" code={`jobs:
Expand All @@ -20,7 +20,7 @@ import Callout from '../../components/Callout.astro';
test-project: tests/GuaTester.Tests.csproj
godot-version: "4.7"
godot-status: stable
gua-plugin-tag: gua-v1.1.0`} />
gua-plugin-tag: gua-v1.1.1`} />
<div class="grid-2"><div class="mini-card"><strong>test-project (required)</strong><p>The <code>.csproj</code> that references <code>Gua.Testing.Godot</code>.</p></div><div class="mini-card"><strong>project-path</strong><p>Godot project path; default <code>game</code>.</p></div><div class="mini-card"><strong>godot-version / godot-status</strong><p>Default <code>4.7</code> and <code>stable</code>.</p></div><div class="mini-card"><strong>test-logger</strong><p>Default <code>trx;LogFileName=godot.trx</code>.</p></div></div>
<p>The outputs are <code>godot-executable</code> and <code>addon-path</code>. Component actions remain available as <code>gua-project/gua-tester/setup-godot@v3.2</code> and <code>gua-project/gua-tester/link-gua-gdscript-addon@v3.2</code>.</p>

Expand All @@ -37,7 +37,7 @@ import Callout from '../../components/Callout.astro';
artifact-key: game
platform: LinuxX64
unity-version: auto
gua-tag: gua-v1.1.0
gua-tag: gua-v1.1.1
secrets:
UNITY_EMAIL: \${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: \${{ secrets.UNITY_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/gua-runtime.astro
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Callout from '../../components/Callout.astro';
<figure class="doc-figure"><div class="flow"><span>Inspector / MCP / Tests<small>observe and request</small></span><b>↔</b><span>native gua_runtime<small>state, queues, bridge</small></span><b>↔</b><span>Gua.Runtime<small>managed API</small></span><b>↔</b><span>Custom adapter<small>engine translation</small></span><b>↔</b><span>Game UI<small>real widgets</small></span></div><figcaption>Figure 1: Gua.Runtime is the managed boundary between the protocol runtime and engine-specific UI APIs.</figcaption></figure>

<h2>Install and deploy</h2>
<CodeBlock title="Add the 1.1.0 package to an adapter project" lang="powershell" code={`dotnet add package Gua.Runtime --version 1.1.0`} />
<CodeBlock title="Add the package to an adapter project" lang="powershell" code={`dotnet add package Gua.Runtime`} /><p>Align the game integration and related Gua package versions. See <a href="/docs/dotnet-packages/#versions">version management</a> for recording and pinning the result.</p>
<p>The package targets <code>net10.0</code> and <code>netstandard2.1</code>. Use matching native libraries for the target OS/CPU: <code>gua.dll</code>/<code>gua_runtime.dll</code> on Windows, <code>libgua.so</code>/<code>libgua_runtime.so</code> on Linux, or <code>libgua.dylib</code>/<code>libgua_runtime.dylib</code> on macOS. Missing or mismatched libraries produce an explicit load error in the constructor.</p>

<h2>One adapter frame</h2>
Expand Down
9 changes: 5 additions & 4 deletions src/pages/docs/npm-packages.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ import Callout from '../../components/Callout.astro';
<p>parseWorldObjectTree validates the tree; selectorFromArguments builds an “unlocked door” selector. It does not execute a search. Pass the selector to GuaWorldProvider.findWorldObjects to query the host-approved view. World state uses ordinary string/number/boolean/null values, not typed Value JSON.</p>
<Callout title="Position search and physics queries differ"><p>World proximity searches use published coordinates. Physics queries such as raycasts are separate. gua-world-tools also supplies request types for them, but the game performs physics calculations and authorizes access. <a href="/world-object-tree/#physics">Details</a></p></Callout>
<h2>Install and combine</h2>
<p>These examples use the 1.1.0 APIs. Pin the same Gua version as the game integration. Install only the packages your setup needs.</p>
<CodeBlock title="Desktop AI connector (Bun)" lang="powershell" code={'bunx gui-mcp@1.1.0 mcp'} />
<p>For a new setup, these commands request the current npm latest tag. Install only what you need and align the result with the game integration. For an existing game or reproducible MCP setup, use a matching explicit version.</p>
<CodeBlock title="Desktop AI connector (Bun)" lang="powershell" code={'bunx gui-mcp@latest mcp'} />
<p>Start the game’s Gua WebSocket bridge and register this command in the AI client. The default endpoint is ws://127.0.0.1:8765; use GUA_BRIDGE_URL to change it. <a href="/mcp/">Connection steps</a></p>
<CodeBlock title="Browser AI connector" lang="powershell" code={'npm install gua-webmcp@1.1.0'} />
<CodeBlock title="Browser AI connector" lang="powershell" code={'npm install gua-webmcp@latest'} />
<p>gua-webmcp depends on gua-value-tools and gua-world-tools; a normal installation brings them in. Load the exported game first, wait for its port, then register tools. The browser must support the experimental document.modelContext API. <a href="/webmcp/">Registration example</a></p>
<CodeBlock title="Custom data processing" lang="powershell" code={'npm install gua-value-tools@1.1.0 gua-world-tools@1.1.0'} />
<CodeBlock title="Custom data processing" lang="powershell" code={'npm install gua-value-tools@latest gua-world-tools@latest'} />
<p>Both libraries work in browsers. They do not connect to a game or collect a scene automatically; pass data obtained from the game or a connector. gui-mcp bundles the shared libraries, so running it does not require separate installations.</p>
<p><code>npm install</code> records a dependency range in <code>package.json</code> and resolved versions in <code>package-lock.json</code>. Commit both; use <code>npm ci</code> in CI. It does not make a running app continuously update itself. <a href="https://docs.npmjs.com/cli/v11/commands/npm-install/">npm install specification</a></p>
<p>Implementation and published packages: <a href="https://www.npmjs.com/package/gui-mcp">gui-mcp</a> · <a href="https://www.npmjs.com/package/gua-webmcp">gua-webmcp</a> · <a href="https://www.npmjs.com/package/gua-value-tools">gua-value-tools</a> · <a href="https://www.npmjs.com/package/gua-world-tools">gua-world-tools</a>. <a href="https://github.com/gua-project/gua/blob/gua-v1.1.0/packages/world-tools/README.md">World API</a> · <a href="https://github.com/gua-project/gua/blob/gua-v1.1.0/packages/value/README.md">Value API</a></p>
</DocPage>
2 changes: 1 addition & 1 deletion src/pages/docs/runtime-adapters.astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import CodeBlock from '../../components/CodeBlock.astro';
<tr><td><code>Gua.Testing.Snapshots</code></td><td>Semantic UI/World JSON baseline comparison</td><td>Optional external .NET tests</td></tr><tr><td><code>Gua.Testing.Visual</code></td><td>PNG baseline comparison and diff artifacts, shared by Godot and Unity</td><td>Optional external .NET tests</td></tr>
<tr><td><code>Gua.Testing.Recording</code></td><td>Semantic action recording and request-correlated replay, shared by Godot and Unity</td><td>Optional external .NET tests</td></tr>
</tbody></table></div>
<Callout kind="tip" title="Install the Godot add-on"><p>The game needs <code>addons/gua</code> with matching native libraries. See <a href="/godot/ui/">Godot installation</a> for the file source and 1.1.0 setup.</p></Callout>
<Callout kind="tip" title="Install the Godot add-on"><p>The game needs <code>addons/gua</code> with matching native libraries. See <a href="/godot/ui/">Godot installation</a> for the file source and setup.</p></Callout>

<h2>Godot public types</h2>
<div class="table-wrap"><table><thead><tr><th>Type / setting</th><th>Contract</th></tr></thead><tbody>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/value.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Callout from '../../components/Callout.astro';
<CodeBlock title="Compare sets with a different item order" lang="ts" code={"import { parseValue, valuesEqual } from \"gua-value-tools\";\n\nconst actual = parseValue('{\"type\":\"set\",\"elementType\":\"string\",\"value\":[\"key\",\"map\"]}');\nconst expected = parseValue('{\"type\":\"set\",\"elementType\":\"string\",\"value\":[\"map\",\"key\"]}');\nconsole.log(valuesEqual(actual, expected)); // true"} />
<p>The game registers values outside the standard UI as Observe values: additional published observations. gua-value-tools handles received values; it does not register them or connect to the game. <a href="/docs/gua-runtime/#observe">Register observations</a> · <a href="/docs/npm-packages/">Combine npm packages</a></p>
<h2>Install the npm package</h2>
<CodeBlock title="Pin the 1.1.0 package" lang="powershell" code={`npm install gua-value-tools@1.1.0`} />
<CodeBlock title="Install the package" lang="powershell" code={`npm install gua-value-tools@latest`} /><p>This is for a new setup. See <a href="/docs/npm-packages/">npm packages</a> for aligning an existing game and recording a lockfile.</p>
<p><a href="https://www.npmjs.com/package/gua-value-tools">gua-value-tools</a> provides TypeScript types and validation, JSON parsing/serialization, enum catalogs, and semantic equality.</p>
<p>An enum is a value chosen from named alternatives. If a boss phase is First or Second, register those names in an EnumCatalog. Validation rejects unknown members or the wrong type.</p>
<CodeBlock title="Parse, validate, and compare an enum" lang="ts" code={`import { EnumCatalog, parseValue, serializeValue, valuesEqual } from "gua-value-tools";
Expand Down
Loading
Loading