7 Commits
Author SHA1 Message Date
donnyandClaude Opus 5.5 b6ef8a31bc core: ygol_query_prompt_context names the effect that asks a prompt (TICKET-451, v1.7.0)
field::execute_cost / execute_target / execute_operation push the running
effect (handler, description, stable index, phase 1 / 2 / 3, chain link) on
core.ygol_running at step 0 and pop it when the function finishes; the
innermost entry is the effect that asks. effect::ygol_script_index is stamped
in card::add_effect while the card loads (initial_effect.size()), 0xffff
otherwise. The export writes 22 bytes; a handler the asking player does not
control and that is not face-up answers code 0, index 0xffff, description 0.
Export gates 335 / 856 / 850 -> 336 / 857 / 851.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 16:05:08 -07:00
donnyandClaude Fable 5.1 2344e5dae1 tag partner cards: ygol_query_tag_cards + STOC_TAG_PARTNER_CARDS 0x5F, capability 0x2000, protocol 9 (TICKET-405)
Core: ygol_query_tag_cards(pduel, playerid, out) reads the waiting tag
partner's tag_list_hand / tag_list_extra (bit 31 = face-up, like
MSG_TAG_SWAP) and tag_list_main sorted ascending; returns the byte length,
0 when not a tag duel. Read only.

Server: STOC_TAG_PARTNER_CARDS 0x5F = u8 side + those bytes, no stamp, to
that side's two seats only (never the other team, never an observer):
after start_duel, after every MSG_TAG_SWAP, and in a seated duelist's
field resync. FEATURE_TAG_PARTNER_CARDS 0x2000 advertised by single_duel
and tag_duel; FEATURE_PROTOCOL 8 -> 9. 0x800 / 0x1000 stay reserved for
proposals 44 / 45.

Binding: StocMessage.TagPartnerCards, FeatureFlags.TagPartnerCards, the
TagPartnerCards record + StocCodecs.TagPartnerCards,
EngineApi.ygol_query_tag_cards, Capability.ProtocolVersion 9, tests.

Contract rows, CHANGELOG v1.2.0, the probe's tag partner cards room, the
export gates 334 / 855 / 849 -> 335 / 856 / 850.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-15 23:26:39 -07:00
donnyandClaude Fable 5.1 7ec61d18e6 binding: YGOLegacy.Engine carries the wire protocol; CI builds, tests and ships ygol-engine-binding.zip (TICKET-397)
Release / windows (push) Successful in 33s
Release / android (push) Successful in 41s
Release / linux (push) Successful in 1m8s
Release / release (push) Skipped
Release / attach-windows (push) Skipped
binding/YGOLegacy.Engine (netstandard2.1, LangVersion 9, unsafe, no package, no Unity
reference) holds the Unity repo's Assets/YGOLegacy/Scripts/Protocol/ as
Protocol/{Contracts,Codecs,Framing,Routing}: 12 files copied byte-identical (LF), namespaces
YGOLegacy.Protocol.* unchanged. EngineVersion (default local) is stamped as the informational
version, so the DLL's ProductVersion is the tag it was built for.

binding/YGOLegacy.Engine.Tests (net8.0, NUnit 3.14) holds the six fixtures. 114 tests pass,
the Unity Edit Mode count. Two deviations from "as-is", lead-approved 2026-10-15:
LegacyReaders.cs is a frozen test-only copy of the legacy MDPro3 / YGOSharp readers and enums
the parity tests compare against (they live only in the Unity repo), and FrameCodecTests.cs
line 35 casts (short) instead of (byte): BitConverter.GetBytes((byte)) is ambiguous on
net8.0 (the Half overload), same bytes written.

The windows job builds and tests the binding after the native gates (both with
-p:EngineVersion so the test's project reference does not restamp the DLL as local), checks
the ProductVersion and stages ygol-engine-binding.zip (YGOLegacy.Engine.dll + .pdb) beside
ygol-engine-win64.zip; attach-windows attaches both. engine.json gains "binding": "<version>"
on every platform (windows.ps1 and the Dockerfile's export-gate, the only writers) and the
release job's agreement check includes it. README gains the Binding section and the asset row;
.gitignore ignores binding/**/bin and obj.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
2026-10-15 16:14:17 -07:00
donnyandClaude Fable 5.1 548d5c859e build: Linux x64 and Android arm64 in Docker (TICKET-389)
build/Dockerfile, targets linux and android; build/linux.sh and
build/android.sh run them with docker build -o into out/linux-x64 and
out/android-arm64. The host needs Docker and nothing else.

- Base: Ubuntu 22.04 pinned by digest (glibc 2.35 is the floor of the
  outputs; a bookworm build needed 2.36 and did not start on the Linux
  box; bullseye is end of life and its package pool is gone). premake
  5.0.0-beta8 bootstrapped from its tag, Android NDK r23b pinned by sha1
  (23.1.7779620, the build id of the shipped .so), API level 26.
- Same contract-header check as windows.ps1 before the build, same
  export gate after it: the plain C export count (dynamic, defined, no
  leading underscore) must be exactly Linux 855 / Android 849 and every
  name declared in contract/ocgapi.h must be exported; then engine.json
  with protocol and capabilities read from the server source.
- Linux builds the tree twice: the library (SERVER_PRO3_SUPPORT,
  libygol-engine.so) and the plain server executable (project ygopro
  with zip support and tag surrender confirm, the same rules), renamed
  ygoserver for the server repo's duel-server. Every dependency from the
  vendored sources (BUILD_ALL); libevent configured by its own
  configure. obj/ bin/ build/ wiped before every compile.
- Android: upstream's exec_android_pro3 job, one library; libocgcore.so
  is not built any more. Verified against the shipped
  Assets/Plugins/Android/libygoserver.so: all 5886 dynamic symbols kept,
  7 added (the six ygol_sb_* and ygol_engine_version).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
2026-10-15 10:34:59 -07:00
donnyandClaude Fable 5.1 63bb49c0d9 build: contract/ocgapi.h is checked against its two sources; engine.json is written next to the library
TICKET-388. contract/ocgapi.h is core/ocgapi.h verbatim plus the server's YGOSERVER_API lines in a marked block. windows.ps1 refuses to build when either part differs (tested: a changed server line and a changed core line each fail; the real file passes). After the export gate it writes out/win64/engine.json { version, exports, protocol, capabilities }: protocol from FEATURE_PROTOCOL in gframe/network.h, capabilities as the OR of the FEATURE_* bits on the cap.flags line of single_duel.cpp and tag_duel.cpp (which must agree), each bit resolved from network.h. Nothing typed in. Verified: protocol 8, capabilities 0x7FF (2047), exports 334.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DJUFwdiGCHipsxLkgxssSR
2026-10-14 22:43:58 -07:00
donnyandClaude Fable 5.1 173df5d8e6 server: export ygol_engine_version; the Windows gate is 334
TICKET-388. ygol_engine_version() returns the string the build was given (build/windows.ps1 -Version, env YGOL_ENGINE_VERSION into a define by gframe/premake5.lua), "local" when none; static storage, no allocation. One new export, so the Windows export gate moves 333 -> 334 and the changelog gets its Unreleased row, all in this commit.

Verified: build -Version v0.0.1 prints exports: 334 (expected 334); ctypes call prints v0.0.1.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 22:38:18 -07:00
donnyandClaude Fable 5.1 58d97a36b3 build: windows.ps1 builds ygol-engine.dll with a 333-export gate
premake vs2022 in server/ (SERVER_PRO3_SUPPORT, LOG_IN_CHAT, USE_SIMD=best),
MSBuild on build\YGOPro.sln target ygoserver, Release x64, always from a
wiped obj/bin/build; refuses a repo path with a space (libevent's unquoted
xcopy); copies the result to out/win64/ and FAILS unless dumpbin counts
exactly 333 exports: start_server, stop_server and the core's C API with
ygol_sb_* and ygol_preview_attack. The old ygoserver.dll had 327 because its
own core copy never carried patch 0008; one core means one export list.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-14 21:08:08 -07:00