Compare commits

..
Author SHA1 Message Date
admin 116d8681e2 Hide date for current province intelligence 2026-07-11 21:32:08 -07:00
478 changed files with 13587 additions and 21318 deletions
+1 -1
View File
@@ -1 +1 @@
9.2.0
9.1.1
+2 -2
View File
@@ -79,7 +79,7 @@ jobs:
rm -f .git/hooks/post-checkout .git/hooks/post-merge .git/hooks/pre-push
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@v6
env:
GIT_CONFIG_GLOBAL: ${{ runner.temp }}/gitconfig-no-lfs
GIT_CONFIG_NOSYSTEM: "1"
@@ -182,7 +182,7 @@ jobs:
FASTMAIL_FROM_NAME: ${{ secrets.FASTMAIL_FROM_NAME }}
steps:
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
persist-credentials: false
@@ -51,7 +51,7 @@ jobs:
brew install git-lfs
git-lfs version
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
persist-credentials: false
lfs: false
@@ -94,7 +94,7 @@ jobs:
brew install git-lfs
git-lfs version
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
persist-credentials: false
lfs: false
@@ -109,7 +109,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
persist-credentials: false
lfs: false
+3 -3
View File
@@ -74,14 +74,14 @@ jobs:
brew install git-lfs
git-lfs version
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
persist-credentials: false
lfs: false
- name: Check BUILD.bazel dependencies
run: ./scripts/check_build_deps.sh --strict
- name: Set up Node.js
uses: actions/setup-node@v7
uses: actions/setup-node@v6
with:
node-version: 'lts/*'
- name: Check JavaScript syntax
@@ -116,7 +116,7 @@ jobs:
brew install git-lfs
git-lfs version
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
persist-credentials: false
lfs: false
+1 -1
View File
@@ -31,7 +31,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
persist-credentials: false
+2 -2
View File
@@ -116,7 +116,7 @@ jobs:
- name: Checkout repository
if: steps.check-latest.outputs.skip != 'true'
uses: actions/checkout@v7
uses: actions/checkout@v6
env:
GIT_LFS_SKIP_SMUDGE: 1
with:
@@ -325,7 +325,7 @@ jobs:
git-lfs --version
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@v6
env:
GIT_LFS_SKIP_SMUDGE: 1
with:
+1 -1
View File
@@ -56,7 +56,7 @@ jobs:
rm -f .git/hooks/post-checkout .git/hooks/post-merge .git/hooks/pre-push
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@v6
env:
GIT_CONFIG_GLOBAL: ${{ runner.temp }}/gitconfig-no-lfs
GIT_CONFIG_NOSYSTEM: "1"
+1 -1
View File
@@ -44,7 +44,7 @@ jobs:
brew install git-lfs
git-lfs version
- uses: actions/checkout@v7
- uses: actions/checkout@v6
with:
persist-credentials: false
lfs: false
+2 -8
View File
@@ -138,7 +138,7 @@ jobs:
fi
git-lfs --version
- uses: actions/checkout@v7
- uses: actions/checkout@v6
env:
GIT_LFS_SKIP_SMUDGE: 1
with:
@@ -160,12 +160,6 @@ jobs:
- name: Ensure Unity version installed
run: ./ci/github_actions/ensure_unity_installed.sh ios
- name: Ensure Bazel installed
uses: ./.github/actions/setup-bazel
- name: Sync Bazel Xcode config
run: ./scripts/sync_bazel_xcode.sh
- name: Build iOS Unity Project
id: build
run: |
@@ -235,7 +229,7 @@ jobs:
fi
git-lfs --version
- uses: actions/checkout@v7
- uses: actions/checkout@v6
env:
GIT_LFS_SKIP_SMUDGE: 1
with:
+2 -2
View File
@@ -113,7 +113,7 @@ jobs:
fi
git-lfs --version
- uses: actions/checkout@v7
- uses: actions/checkout@v6
env:
GIT_LFS_SKIP_SMUDGE: 1
with:
@@ -287,7 +287,7 @@ jobs:
fi
git-lfs --version
- uses: actions/checkout@v7
- uses: actions/checkout@v6
env:
GIT_LFS_SKIP_SMUDGE: 1
with:
@@ -4,20 +4,17 @@ on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
paths:
- '.bazelversion'
- 'MODULE.bazel'
- 'MODULE.bazel.lock'
- 'maven_install.json'
- 'renovate.json'
- 'ci/github_actions/ensure_bazel_installed.sh'
- 'ci/github_actions/update_llvm_distributions.py'
- '.github/actions/setup-bazel/**'
- '.github/workflows/renovate_dependency_artifacts.yml'
pull_request_target:
types: [opened, reopened, synchronize, ready_for_review]
paths:
- '.bazelversion'
- 'MODULE.bazel'
- 'MODULE.bazel.lock'
- 'maven_install.json'
@@ -25,7 +22,6 @@ on:
- 'go.sum'
- 'renovate.json'
- 'ci/github_actions/ensure_bazel_installed.sh'
- 'ci/github_actions/update_llvm_distributions.py'
- '.github/actions/setup-bazel/**'
- '.github/workflows/renovate_dependency_artifacts.yml'
@@ -62,13 +58,11 @@ jobs:
const changed = files.map((file) => file.filename);
const bazelPatterns = [
/^\.bazelversion$/,
/^MODULE\.bazel$/,
/^MODULE\.bazel\.lock$/,
/^maven_install\.json$/,
/^renovate\.json$/,
/^ci\/github_actions\/ensure_bazel_installed\.sh$/,
/^ci\/github_actions\/update_llvm_distributions\.py$/,
/^\.github\/actions\/setup-bazel\//,
/^\.github\/workflows\/renovate_dependency_artifacts\.yml$/,
];
@@ -93,7 +87,7 @@ jobs:
include.push({
artifact: 'bazel',
name: 'Bazel lockfiles',
changed_files: 'MODULE.bazel MODULE.bazel.lock maven_install.json',
changed_files: 'MODULE.bazel.lock maven_install.json',
commit_message: 'Update generated dependency lockfiles',
});
}
@@ -117,18 +111,13 @@ jobs:
steps:
- name: Checkout PR
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
lfs: false
- name: Ensure Bazel installed
uses: ./.github/actions/setup-bazel
- name: Refresh LLVM distribution metadata
env:
GITHUB_TOKEN: ${{ github.token }}
run: python3 ci/github_actions/update_llvm_distributions.py
- name: Update Maven lockfile
env:
REPIN: "1"
@@ -139,16 +128,15 @@ jobs:
- name: Verify generated lockfiles are current
run: |
if git diff --quiet -- MODULE.bazel MODULE.bazel.lock maven_install.json; then
if git diff --quiet -- MODULE.bazel.lock maven_install.json; then
echo "Generated dependency lockfiles are current"
exit 0
fi
echo "Generated dependency lockfiles are stale. Run the lockfile update commands and commit the result:"
echo " python3 ci/github_actions/update_llvm_distributions.py"
echo " REPIN=1 bazel run @maven//:pin"
echo " bazel build --nobuild //src/main/scala/net/eagle0/eagle:eagle_server //src/main/cpp/net/eagle0/shardok:shardok-server"
git diff -- MODULE.bazel MODULE.bazel.lock maven_install.json
git diff -- MODULE.bazel.lock maven_install.json
exit 1
update-artifacts:
@@ -185,19 +173,13 @@ jobs:
git-lfs version
- name: Checkout Renovate branch
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.RENOVATE_LOCKFILE_TOKEN || github.token }}
lfs: false
- name: Refresh LLVM distribution metadata
if: matrix.artifact == 'bazel'
env:
GITHUB_TOKEN: ${{ github.token }}
run: python3 ci/github_actions/update_llvm_distributions.py
- name: Ensure Bazel installed
if: matrix.artifact == 'bazel'
uses: ./.github/actions/setup-bazel
+1 -1
View File
@@ -143,7 +143,7 @@ jobs:
brew install git-lfs
git-lfs version
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
persist-credentials: false
lfs: false
+1 -1
View File
@@ -57,7 +57,7 @@ jobs:
rm -f .git/hooks/post-checkout .git/hooks/post-merge .git/hooks/pre-push
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@v6
env:
GIT_CONFIG_GLOBAL: ${{ runner.temp }}/gitconfig-no-lfs
GIT_CONFIG_NOSYSTEM: "1"
+1 -1
View File
@@ -72,7 +72,7 @@ jobs:
brew install git-lfs
git-lfs version
- name: Checkout repository
uses: actions/checkout@v7
uses: actions/checkout@v6
with:
persist-credentials: false
lfs: false
+1 -1
View File
@@ -47,7 +47,7 @@ jobs:
fi
rm -f .git/hooks/post-checkout .git/hooks/post-merge .git/hooks/pre-push
- uses: actions/checkout@v7
- uses: actions/checkout@v6
env:
GIT_CONFIG_GLOBAL: ${{ runner.temp }}/gitconfig-no-lfs
GIT_CONFIG_NOSYSTEM: "1"
+2 -8
View File
@@ -14,7 +14,6 @@ on:
- "scripts/build_protos.sh"
- "scripts/build_plugins.sh"
- "scripts/build_windows_plugin.sh"
- "scripts/sync_bazel_xcode.sh"
- "ci/github_actions/build_unity.sh"
- "ci/github_actions/test_unity_editmode.sh"
- "ci/github_actions/ensure_bazel_installed.sh"
@@ -40,7 +39,6 @@ on:
- "scripts/build_protos.sh"
- "scripts/build_plugins.sh"
- "scripts/build_windows_plugin.sh"
- "scripts/sync_bazel_xcode.sh"
- "ci/github_actions/build_unity.sh"
- "ci/github_actions/test_unity_editmode.sh"
- "ci/github_actions/ensure_bazel_installed.sh"
@@ -96,7 +94,7 @@ jobs:
fi
git-lfs --version
- uses: actions/checkout@v7
- uses: actions/checkout@v6
env:
GIT_LFS_SKIP_SMUDGE: 1
with:
@@ -158,8 +156,6 @@ jobs:
dotnet-version: '8.0.x'
- name: Ensure Bazel installed
uses: ./.github/actions/setup-bazel
- name: Sync Bazel Xcode configuration
run: ./scripts/sync_bazel_xcode.sh
- name: Run Unity EditMode tests
run: ./ci/github_actions/test_unity_editmode.sh
@@ -213,7 +209,7 @@ jobs:
fi
git-lfs --version
- uses: actions/checkout@v7
- uses: actions/checkout@v6
env:
GIT_LFS_SKIP_SMUDGE: 1
with:
@@ -275,8 +271,6 @@ jobs:
dotnet-version: '8.0.x'
- name: Ensure Bazel installed
uses: ./.github/actions/setup-bazel
- name: Sync Bazel Xcode configuration
run: ./scripts/sync_bazel_xcode.sh
- name: Detect Addressables changes
id: addressables
+19 -21
View File
@@ -22,10 +22,10 @@ bazel_dep(name = "aspect_rules_esbuild", version = "0.26.0")
bazel_dep(name = "aspect_rules_js", version = "3.2.2")
bazel_dep(name = "bazel_jar_jar", version = "0.1.15", repo_name = "bazel_jar_jar")
bazel_dep(name = "platforms", version = "1.1.0")
bazel_dep(name = "rules_dotnet", version = "0.22.1")
bazel_dep(name = "rules_dotnet", version = "0.21.5")
bazel_dep(name = "rules_foreign_cc", version = "0.15.1")
bazel_dep(name = "rules_android", version = "0.7.3")
bazel_dep(name = "rules_nodejs", version = "6.7.5")
bazel_dep(name = "rules_nodejs", version = "6.7.4")
bazel_dep(name = "rules_pkg", version = "1.2.0")
bazel_dep(name = "rules_shell", version = "0.8.0")
@@ -74,12 +74,12 @@ bazel_dep(name = "toolchains_llvm", version = "1.8.0")
llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm")
LLVM_VERSION = "22.1.8"
LLVM_VERSION = "22.1.7"
LLVM_DISTRIBUTIONS = {
"LLVM-22.1.8-Linux-ARM64.tar.xz": "805efad2bb91cb4967fa569e0881d10c0f69c04461cf671cccbae19f547acc34",
"LLVM-22.1.8-Linux-X64.tar.xz": "df0e1ecf16caf3489a272a5eea4eec9b0d82878f6477fa309504f918a0006384",
"LLVM-22.1.8-macOS-ARM64.tar.xz": "f260f4f7c0d430828a81ae8a3826a1d63fc0963ec2459489308cc23b1f7eab4f",
"LLVM-22.1.7-Linux-ARM64.tar.xz": "118ca2d3ad9da34367e05735317854e7977db45dc4c02a32af58da64c23b8789",
"LLVM-22.1.7-Linux-X64.tar.xz": "edb0522b41e261819c06ea437d249f9b8acfa413d3805bc9920eec6fb76ff830",
"LLVM-22.1.7-macOS-ARM64.tar.xz": "4177245188b0a30a6539c96b361dea56f253485756bfd8927a6a59e7301e7806",
}
# Native toolchain (macOS -> macOS, Linux -> Linux)
@@ -169,7 +169,7 @@ use_repo(
# Language Support - Rust
#
bazel_dep(name = "rules_rust", version = "0.71.3")
bazel_dep(name = "rules_rust", version = "0.70.0")
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(edition = "2021")
@@ -177,7 +177,7 @@ use_repo(rust, "rust_toolchains")
register_toolchains("@rust_toolchains//:all")
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")
crate = use_extension("@rules_rust//crate_universe:extension.bzl", "crate")
crate.from_cargo(
name = "map_generator_crates",
cargo_lockfile = "//src/main/rust/net/eagle0/eagle/map_generator:Cargo.lock",
@@ -189,7 +189,7 @@ use_repo(crate, "map_generator_crates")
# Platform Support - Apple/iOS
#
bazel_dep(name = "apple_support", version = "2.7.0", repo_name = "build_bazel_apple_support")
bazel_dep(name = "apple_support", version = "2.6.1", repo_name = "build_bazel_apple_support")
bazel_dep(name = "rules_apple", version = "4.5.3", repo_name = "build_bazel_rules_apple")
multiple_version_override(
@@ -214,8 +214,6 @@ use_repo(apple_cc_configure, "local_config_apple_cc", "local_config_apple_cc_too
bazel_dep(name = "protobuf", version = "35.1", repo_name = "com_google_protobuf")
single_version_override(
module_name = "protobuf",
patch_strip = 1,
patches = ["//third_party/protobuf/patches:rust_crates_dev_dependency.patch"],
version = "35.1",
)
@@ -236,8 +234,8 @@ use_repo(
)
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "rules_cc", version = "0.2.22")
bazel_dep(name = "grpc", version = "1.82.0")
bazel_dep(name = "rules_cc", version = "0.2.19")
bazel_dep(name = "grpc", version = "1.81.1")
# gRPC 1.81.1's generated upb module map trips Clang's layering check in the
# Linux ARM64 cross-toolchain even though the normal Bazel deps are present.
@@ -247,7 +245,7 @@ single_version_override(
patches = ["//third_party/grpc/patches:disable_xds_client_layering_check.patch"],
)
bazel_dep(name = "grpc-java", version = "1.82.0")
bazel_dep(name = "grpc-java", version = "1.78.0.bcr.1")
bazel_dep(name = "rules_proto_grpc_csharp", version = "5.8.0")
bazel_dep(name = "flatbuffers", version = "25.12.19")
@@ -272,7 +270,7 @@ oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
# curl -s -H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.oci.image.index.v1+json,application/vnd.docker.distribution.manifest.list.v2+json" "https://registry-1.docker.io/v2/library/eclipse-temurin/manifests/25-jre" | python3 -c "import json,sys; m=json.load(sys.stdin); [print(p['digest']) for p in m.get('manifests',[]) if p['platform']['architecture']=='amd64']"
oci.pull(
name = "eclipse_temurin_25_jre",
digest = "sha256:a0053c48b1a74412b14a111d6fd547799f8a6a5c77e2318f698b996ec899b0ce",
digest = "sha256:0beb258e10ad28d2bae0f74349a170bdfa67da0ef87c028cbf3d95c3e1170120",
image = "docker.io/library/eclipse-temurin",
platforms = ["linux/amd64"],
tag = "26-jre",
@@ -281,7 +279,7 @@ oci.pull(
# Base image for JFR sidecar (Java 25 JDK - includes jcmd for JFR dumps)
oci.pull(
name = "eclipse_temurin_25_jdk",
digest = "sha256:8e0469892385b62feab689f211fde7eeeb6537418c8fbe613147427b53870ec3",
digest = "sha256:41c3a5b8a607d226c73e81538cd94d0e66f746f41f057561447eb47b40a91a65",
image = "docker.io/library/eclipse-temurin",
platforms = ["linux/amd64"],
tag = "26-jdk",
@@ -336,7 +334,7 @@ maven.install(
"com.thesamet.scalapb:scalapb-runtime_3:%s" % SCALAPB_VERSION,
"com.thesamet.scalapb:scalapb-runtime-grpc_3:%s" % SCALAPB_VERSION,
"com.thesamet.scalapb:compilerplugin_3:%s" % SCALAPB_VERSION,
"com.thesamet.scalapb:protoc-bridge_3:0.9.10",
"com.thesamet.scalapb:protoc-bridge_3:0.9.9",
# JSON
"org.json4s:json4s-ast_3:4.1.0-M8",
@@ -347,7 +345,7 @@ maven.install(
"org.scalamock:scalamock_3:7.5.5",
# Developer tools
"org.scalameta:scalafmt-cli_2.13:3.11.3",
"org.scalameta:scalafmt-cli_2.13:3.11.1",
# AWS SDK
"software.amazon.awssdk:s3-transfer-manager:%s" % AWS_SDK_VERSION,
@@ -378,14 +376,14 @@ maven.install(
"com.nimbusds:nimbus-jose-jwt:10.9.1",
# Error tracking
"io.sentry:sentry:8.48.0",
"io.sentry:sentry:8.43.2",
# SQLite for client text storage
"org.xerial:sqlite-jdbc:3.53.2.0",
# Postgres for production history benchmarking and migration work
"com.zaxxer:HikariCP:7.1.0",
"org.postgresql:postgresql:42.7.13",
"com.zaxxer:HikariCP:6.3.3",
"org.postgresql:postgresql:42.7.11",
],
duplicate_version_warning = "error",
fail_if_repin_required = True,
+2097 -49
View File
File diff suppressed because one or more lines are too long
-39
View File
@@ -46,45 +46,6 @@ fi
SCHEME="Unity-iPhone"
echo "Using scheme: $SCHEME"
# Xcode can be upgraded on a self-hosted runner before its matching iOS platform
# component is installed. In that state, xcrun may exist but the generic iOS
# destination is ineligible, and archive fails with exit code 70. Probe the exact
# destination used below and repair the Xcode installation before starting the
# expensive archive.
if ! xcodebuild \
-project "$XCODEPROJ" \
-scheme "$SCHEME" \
-showBuildSettings \
-destination "generic/platform=iOS" >/dev/null; then
echo "The generic iOS destination is unavailable; installing Xcode's iOS platform..."
if ! xcodebuild -checkFirstLaunchStatus; then
echo "Completing pending Xcode first-launch setup..."
xcodebuild -runFirstLaunch
fi
xcodebuild -downloadPlatform iOS
fi
echo "Installed Xcode SDKs:"
xcodebuild -showsdks
IOS_SDK_PATH=$(xcrun --sdk iphoneos --show-sdk-path)
if [ ! -d "$IOS_SDK_PATH" ]; then
echo "Error: Xcode reported an invalid iOS SDK path: $IOS_SDK_PATH"
exit 1
fi
echo "Using iOS SDK: $IOS_SDK_PATH"
if ! xcodebuild \
-project "$XCODEPROJ" \
-scheme "$SCHEME" \
-showBuildSettings \
-destination "generic/platform=iOS" >/dev/null; then
echo "Error: The generic iOS destination is still unavailable after platform setup."
xcodebuild -project "$XCODEPROJ" -scheme "$SCHEME" -showdestinations || true
exit 1
fi
# Archive without signing - we'll sign during export
# This avoids issues with provisioning profiles on framework targets
xcodebuild archive \
@@ -1,137 +0,0 @@
#!/usr/bin/env python3
"""Update pinned LLVM release asset names and SHA-256 digests in MODULE.bazel."""
from __future__ import annotations
import argparse
import json
import os
import re
import sys
import urllib.request
from pathlib import Path
from typing import Any
LLVM_VERSION_PATTERN = re.compile(r'^LLVM_VERSION = "(?P<version>\d+\.\d+\.\d+)"$', re.MULTILINE)
LLVM_DISTRIBUTIONS_PATTERN = re.compile(
r"^LLVM_DISTRIBUTIONS = \{\n.*?^\}$",
re.MULTILINE | re.DOTALL,
)
LLVM_DISTRIBUTION_PLATFORMS = (
"Linux-ARM64",
"Linux-X64",
"macOS-ARM64",
)
def fetch_release(version: str, token: str | None) -> dict[str, Any]:
url = f"https://api.github.com/repos/llvm/llvm-project/releases/tags/llvmorg-{version}"
headers = {
"Accept": "application/vnd.github+json",
"User-Agent": "eagle0-llvm-distribution-updater",
"X-GitHub-Api-Version": "2022-11-28",
}
if token:
headers["Authorization"] = f"Bearer {token}"
request = urllib.request.Request(url, headers=headers)
with urllib.request.urlopen(request, timeout=30) as response:
return json.load(response)
def load_release(path: Path) -> dict[str, Any]:
with path.open(encoding="utf-8") as release_file:
return json.load(release_file)
def llvm_distributions(version: str, release: dict[str, Any]) -> dict[str, str]:
expected_tag = f"llvmorg-{version}"
if release.get("tag_name") != expected_tag:
raise ValueError(
f"Expected release tag {expected_tag}, got {release.get('tag_name')!r}"
)
assets = {asset["name"]: asset for asset in release.get("assets", [])}
distributions: dict[str, str] = {}
for platform in LLVM_DISTRIBUTION_PLATFORMS:
name = f"LLVM-{version}-{platform}.tar.xz"
asset = assets.get(name)
if asset is None:
raise ValueError(f"LLVM release {version} is missing required asset {name}")
digest = asset.get("digest")
if not isinstance(digest, str) or not digest.startswith("sha256:"):
raise ValueError(f"LLVM release asset {name} has no SHA-256 digest")
distributions[name] = digest.removeprefix("sha256:")
return distributions
def render_distributions(distributions: dict[str, str]) -> str:
lines = ["LLVM_DISTRIBUTIONS = {"]
lines.extend(f' "{name}": "{digest}",' for name, digest in distributions.items())
lines.append("}")
return "\n".join(lines)
def update_module(module_path: Path, release: dict[str, Any]) -> bool:
original = module_path.read_text(encoding="utf-8")
version_match = LLVM_VERSION_PATTERN.search(original)
if version_match is None:
raise ValueError(f"Could not find LLVM_VERSION in {module_path}")
distributions = llvm_distributions(version_match.group("version"), release)
replacement = render_distributions(distributions)
updated, replacements = LLVM_DISTRIBUTIONS_PATTERN.subn(replacement, original, count=1)
if replacements != 1:
raise ValueError(f"Could not find exactly one LLVM_DISTRIBUTIONS block in {module_path}")
if updated == original:
return False
module_path.write_text(updated, encoding="utf-8")
return True
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser()
parser.add_argument("--module", type=Path, default=Path("MODULE.bazel"))
parser.add_argument(
"--release-json",
type=Path,
help="Read GitHub release JSON from a file instead of the GitHub API",
)
return parser.parse_args()
def main() -> int:
args = parse_args()
module_text = args.module.read_text(encoding="utf-8")
version_match = LLVM_VERSION_PATTERN.search(module_text)
if version_match is None:
print(f"ERROR: Could not find LLVM_VERSION in {args.module}", file=sys.stderr)
return 1
version = version_match.group("version")
try:
release = (
load_release(args.release_json)
if args.release_json
else fetch_release(version, os.environ.get("GITHUB_TOKEN"))
)
changed = update_module(args.module, release)
except (OSError, ValueError) as error:
print(f"ERROR: {error}", file=sys.stderr)
return 1
if changed:
print(f"Updated LLVM {version} distribution metadata in {args.module}")
else:
print(f"LLVM {version} distribution metadata is current")
return 0
if __name__ == "__main__":
raise SystemExit(main())
@@ -1,54 +0,0 @@
#!/usr/bin/env python3
import tempfile
import unittest
from pathlib import Path
import update_llvm_distributions
class UpdateLlvmDistributionsTest(unittest.TestCase):
def release(self, *, missing_digest: bool = False) -> dict:
assets = []
for index, platform in enumerate(
update_llvm_distributions.LLVM_DISTRIBUTION_PLATFORMS, start=1
):
asset = {
"name": f"LLVM-22.1.8-{platform}.tar.xz",
"digest": f"sha256:{index:064x}",
}
assets.append(asset)
if missing_digest:
assets[0]["digest"] = None
return {"tag_name": "llvmorg-22.1.8", "assets": assets}
def test_updates_asset_versions_and_digests(self) -> None:
with tempfile.TemporaryDirectory() as directory:
module = Path(directory) / "MODULE.bazel"
module.write_text(
'LLVM_VERSION = "22.1.8"\n\n'
"LLVM_DISTRIBUTIONS = {\n"
' "LLVM-22.1.7-Linux-ARM64.tar.xz": "old-arm",\n'
' "LLVM-22.1.7-Linux-X64.tar.xz": "old-x64",\n'
' "LLVM-22.1.7-macOS-ARM64.tar.xz": "old-mac",\n'
"}\n",
encoding="utf-8",
)
changed = update_llvm_distributions.update_module(module, self.release())
self.assertTrue(changed)
updated = module.read_text(encoding="utf-8")
self.assertNotIn("22.1.7", updated)
self.assertIn('"LLVM-22.1.8-Linux-ARM64.tar.xz": "' + "1".zfill(64), updated)
self.assertIn('"LLVM-22.1.8-macOS-ARM64.tar.xz": "' + "3".zfill(64), updated)
def test_rejects_asset_without_sha256_digest(self) -> None:
with self.assertRaisesRegex(ValueError, "has no SHA-256 digest"):
update_llvm_distributions.llvm_distributions(
"22.1.8", self.release(missing_digest=True)
)
if __name__ == "__main__":
unittest.main()
+1 -1
View File
@@ -156,7 +156,7 @@ CREATE TABLE action_changed_provinces (
support_delta REAL,
-- round properties
set_has_acted INTEGER, -- 0/1/NULL
set_ruler_is_visiting_town INTEGER,
set_ruler_is_traveling INTEGER,
-- ruling faction changes
clear_ruling_faction_id INTEGER NOT NULL DEFAULT 0,
new_ruling_faction_id INTEGER,
+9 -45
View File
@@ -4,18 +4,20 @@ This guide covers operating the Eagle text client against a running Eagle server
## Authentication And Startup
The text client can request and refresh its own tokens. GitHub is the recommended OAuth provider:
The current bearer-token file is:
```
/private/tmp/eagle0-text-client-token.txt
```
If that file is absent or authentication fails, stop and ask the user for a current bearer token. Do not invent a token or use another user's credentials.
Start the production client with:
```bash
bazel run //src/main/scala/net/eagle0/eagle/text_client:eagle_text_client -- --tls --host prod.eagle0.net --port 443 --oauth
bazel run //src/main/scala/net/eagle0/eagle/text_client:eagle_text_client -- --tls --host prod.eagle0.net --port 443 --bearer-token-file /private/tmp/eagle0-text-client-token.txt
```
On the first run, or when no usable refresh token remains, the client prints a GitHub login URL. Paste that URL to the user and wait for them to authenticate in their browser. The callback returns to a temporary loopback listener in the text client, not to the Unity client. Never open the URL or choose an account on the user's behalf.
The client stores the access and refresh tokens in `~/.eagle0/text-client/` with owner-only permissions and refreshes the access token automatically. For an existing token location, pass both `--bearer-token-file <path>` and `--refresh-token-file <path>`. Use `--oauth-provider <provider>` only if the account uses `google`, `discord`, `apple`, `steam`, or `twitch` instead of the recommended `github` provider.
At the `eagle0>` prompt, use `lobby` to list running games and available new-game leaders. To resume a game, use:
```text
@@ -72,7 +74,7 @@ Only post a selected command that is currently listed as available. A successful
Some actions enter a temporary subcommand state. For example, trading is operated as:
```text
post-json <province-id> VisitTownSelectedCommand {}
post-json <province-id> TravelSelectedCommand {}
post-json <province-id> TradeSelectedCommand {"tradeType":"BUY_FOOD","amount":<amount>}
post-return <province-id>
```
@@ -131,44 +133,6 @@ Shardok update with no available commands clears the previous command list.
Use `shardok-commands-json` or `shardok-units-json` when the concise output omits a needed field.
The initial Eagle state includes the complete strategic province graph. Inspect it with:
```text
eagle-map
eagle-map-json
```
Both forms list every province and all of its neighbors by ID and name. Use the JSON form when exact IDs or
machine-readable relationships are needed; unlike March destinations, this is the complete map graph and is not
filtered by the commands currently available.
During battle setup, `shardok-commands` prints any server-recommended unit placements in order and identifies the
ordinary current command index for the next recommendation:
```text
recommended-starting-positions (ordered):
[0] unit=12 target=(3,4)
[1] unit=15 target=(4,4)
use next: post-shardok <shardok-game-id> 17
```
The list is advice, not an automatic placement batch. Review it against `shardok-map`, choose whether to use the first
recommendation, and submit that one placement with the printed `post-shardok` command. After every placement, wait for
the updated state and run `shardok-commands` again; the legal command indices and remaining recommendations may change.
The client synchronizes Shardok map definitions when it connects. To inspect the
base terrain together with current tile modifiers and occupying units, use:
```text
shardok-map <shardok-game-id>
shardok-map-json <shardok-game-id>
```
The battle ID may be omitted when the client knows about exactly one Shardok
battle. The concise map prints every coordinate's terrain plus fire, castle,
bridge, ice, and snow state. The JSON form includes the complete base map,
dynamic tile modifiers, and current active units.
## Reconnects And Shutdown
The client automatically recreates a failed gRPC stream and re-subscribes to the active game. It retains its in-process `ClientTextStore`, so a reconnect should announce:
-210
View File
@@ -1,210 +0,0 @@
# Tutorial Playthrough Notes
This is a working guide for playing through the Eagle0 tutorial without losing. It is written from live text-client
testing, so treat it as a practical checklist rather than a complete design reference.
## Core Rule
Do not risk Sadar Rakon unless the outcome is overwhelmingly favorable. In tutorial games, Sadar is the human faction
leader; if he is captured, the server treats the human player as defeated and the game ends.
## Strategic Goals
- Survive the opening tutorial battle.
- Rebuild Onmaa enough to stabilize support and loyalty.
- Expand carefully from Onmaa/Nikemi with enough force to avoid leader capture.
- Trigger the major strategic tutorial event where The Eagle appears. In code, this happens when Sadar controls at
least four provinces or Hedrick's faction has no provinces.
## Tactical Safety Rules
- Avoid sending Sadar alone into a tactical battle.
- If a battle turns into a long chase, reassess instead of blindly sweeping the map.
- Prefer preserving Sadar over forcing a marginal province capture.
- When the text client shows no attack command, do not assume the enemy is helpless; they may still be able to win by
holding, hiding, or outlasting the attacker.
## Known Failure
In one previous Kojaria attempt, Sadar attacked with one battalion, chased Hedrick across the map, failed to force a
decisive win, and was captured. The client did not clearly announce game over at the time; the save later showed Kojaria
held by Hedrick and Sadar listed under `captured_heroes`.
## Live Run Log
### Fresh Tutorial Run
- Started: game `-3568010721410464682`.
- Leader: Sadar Rakon.
- Current objective: start the tutorial from the opening battle and record safe choices.
- Opening battle setup:
- Rakon's Loyalists at `(8,10)`.
- Onmaa Defenders at `(7,10)`.
- Hunters of the Steppe at `(8,11)`.
- Rationale: keep the two infantry units together on the west-facing line and keep the longbowmen directly behind
them. Tarn's force begins west/southwest of the defender setup area, and Elena/John arrive later, so the opening
goal is to preserve the core army rather than overextend.
- Opening battle, day 1: no attacks were available. Ended the turn rather than starting fires or moving forward.
- Opening battle, day 2:
- Used Hunters of the Steppe for an archery attack against the visible unit at `(7,9)`.
- Used Rakon's Loyalists for an archery attack against the unit at `(6,10)`.
- Used Onmaa Defenders for melee against the unit at `(6,10)`.
- Avoided the offered duel from Rakon's Loyalists against the unit at `(7,9)`. If that unit is Tarn, the duel risks
Sadar directly before reinforcements have arrived.
- Opening battle, days 3-5:
- On day 3, only Rakon's Loyalists and Hunters of the Steppe had commands. Used both for archery against the unit at
`(6,10)`.
- On days 4 and 5, only Hunters of the Steppe had commands. Used archery against the nearest non-Tarn pressure unit
rather than retreating or entering melee.
- This is a danger signal: if Sadar's unit disappears from the command list this early, the opening formation may have
absorbed too much damage. Keep future attempts more defensive and consider moving Sadar back instead of using every
available attack.
- Elena Fyar arrived on day 6 as actor `7`, confirming the `elena_reinforcement_round_5` tutorial event. She spawned
far southwest of the fight with Holy Wave available. Moved her toward the battle first instead of spending Holy Wave
while isolated; the move consumed her action for the turn.
- John Ranil arrived on day 8 as actor `8`, confirming the `ranil_reinforcement_round_7` tutorial event.
- After John arrived:
- Moved Hunters of the Steppe back to `(10,11)` instead of taking a weak melee attack.
- Moved Elena to `(8,7)` to close with the enemy line.
- Moved John to `(6,4)` to approach from the west.
- Do not expect reinforcements to appear in immediate melee range. They need one or more turns of marching before they
can rescue the original defender units.
- Day 10 Holy Wave timing:
- Moved John adjacent to Elena first.
- Used Elena's Holy Wave only after John was adjacent, so the action could inspire more than Elena herself.
- If Holy Wave is available immediately when Elena appears, do not spend it unless she is already adjacent to a
friendly unit or there is a specific emergency reason.
- Day 11 reinforcement attack:
- Elena got melee commands against `(7,9)` and `(8,10)`. Chose `(8,10)` first because `(7,9)` had repeatedly looked
like the Tarn/front-leader unit.
- Moved John to `(9,9)`, which opened a charge against `(8,10)`.
- Used John's charge and then his follow-up melee against `(8,10)`.
- Practical rule: once Elena and John arrive, pair their attacks on the same non-Tarn unit before taking leader-risky
engagements.
- Probable defeat/reset signal:
- Continued John melee attacks against `(8,10)` through day 14.
- After the day-14 melee, the Shardok stream emitted `shardok-reset` for the same battle id
`ce7be1272b8b4456_1_df540967`.
- The battle token reset to `6` and commands returned to the original opening placement commands, while Eagle status
still reported `BATTLE_IN_PROGRESS`.
- This most likely means the battle was lost, but the text client did not surface the loss explicitly. Treat a reset
after a long battle as a probable defeat signal unless server state proves otherwise.
- For the live run, replay the reset battle with a more conservative setup and keep Sadar out of the first contact
line.
- Replay setup after reset:
- Rakon's Loyalists at `(10,11)`.
- Onmaa Defenders at `(8,10)`.
- Hunters of the Steppe at `(9,11)`.
- Rationale: put Sadar deep, use Onmaa Defenders as the first contact screen, and keep archers close enough to shoot
without becoming the front line.
- Replay tactical adjustment:
- Day 2: enemy units still reached Sadar quickly. Moved Rakon's Loyalists away instead of dueling or meleeing.
- Day 3: moved Sadar again, then moved Hunters of the Steppe out of melee contact.
- Day 4-5: continued withdrawing Sadar north/east and pulled the archer back instead of trading melee.
- Elena arrived with Sadar still alive and mobile. Move Elena east immediately; do not spend Holy Wave while isolated.
- John arrived after Elena. Use Elena for contact, march John east, and let Sadar contribute only with archery while
he remains out of melee.
- Second probable defeat/reset:
- The replay kept Sadar alive through both reinforcements and reached day 20.
- After repeated John melee against the remaining contact at `(6,7)`, Shardok emitted another `shardok-reset` for the
same battle id and returned to the original placement command list.
- This reproduced the reset behavior from the first attempt and likely means the replay was also lost. Stop treating
the current live game as a successful tutorial source until the loss condition is visible in the text client or
confirmed from server state.
- Failed castle-hold variant:
- Onmaa castle tiles are `(6,12)`, `(8,11)`, and `(10,11)`.
- Rakon's Loyalists at `(10,11)`.
- Onmaa Defenders at `(8,11)`.
- Hunters of the Steppe at `(6,12)`.
- Early result: this was much stronger than the previous formations. When no attacks were available, ended turn
instead of moving off castles. When longbow shots were offered, used Hunters of the Steppe from `(6,12)`. When
enemies stepped adjacent, used ordinary castle melee, but continued to avoid duels.
- What failed:
- The battle still reset after day 22, returning the same battle id to token `6`.
- The late phase degraded into too much Holy Wave/Reduce and too little direct pressure. Treat that as the wrong
plan for this tutorial battle.
### Successful Opening Battle
- Won in game `-3568010721410464682`, battle `ce7be1272b8b4456_1_df540967`.
- Winning setup:
- Sadar/Rakon's Loyalists at `(10,11)`.
- Onmaa Defenders at `(8,11)`.
- Hunters of the Steppe at `(6,12)`.
- Main rule: hold the three castle tiles with the starting units until the enemy gives useful attacks. Do not walk the
starting units off the castles just because movement commands are available.
- Early turns:
- End the first defender turn when only movement/fire commands are available.
- Use Hunters of the Steppe for archery whenever possible, usually into the non-Ikhaan targets at `(5,10)`,
`(5,11)`, or `(7,10)`.
- Use ordinary melee from castle tiles when the enemy steps adjacent.
- Sadar may duel non-Ikhaan targets. In the winning run, actor `4` used `CHALLENGE_DUEL` against targetUnit `2`.
- Avoid Sadar's duel against targetUnit `3` at `(9,10)`; that target behaved like Ikhaan Tarn. Ordinary melee into
that adjacent target was still used later, but the duel was skipped every time.
- Reinforcements:
- Elena arrived as actor `7`. March her directly toward the castle line instead of spending Holy Wave while isolated:
`(11,3)`, `(8,5)`, `(8,8)`, then `(8,11)`.
- John arrived as actor `8`. Rush him toward the castles: `(6,4)`, `(10,7)`, then `(8,10)`.
- Once John and Elena reach the line, use their melee attacks immediately. In the winning run both repeatedly attacked
the non-Ikhaan target at `(7,10)`.
- After that target dropped, chase the remaining left-side contact with John and Elena together. John moved to
`(4,11)`, Elena to `(5,10)`, and John finished the battle with melee at `(5,11)`.
- Do not make Holy Wave or Reduce the plan. The successful run won without using Holy Wave or Reduce in the decisive
phase; direct archery, castle melee, and reinforcement melee were enough.
- Post-battle aftermath:
- The battle resolved to Eagle commands and offered three captured heroes: `201`, `202`, and `203`.
- Recruit attempts were refused for all three, then each was imprisoned.
- After the captured-hero prompts cleared, normal strategic commands returned at province `14`, starting with
`ImproveAvailableCommand`.
### Strategic Play After Opening Battle
- Immediate recovery priorities:
- Improve Onmaa's economy and agriculture before starting a war.
- Use Alms sparingly if support is low, but watch food and treasury.
- Train existing heroes/units before marching. The opening win leaves enough time to build before attacking.
- Troop organization notes:
- Onmaa initially exposed only `LightInfantry` and `Longbowmen` as constructible in the command surface.
- An invalid organize attempt tried to top up preexisting heavy units and hit the server error
`HeavyInfantry was not among constructible battalion types Vector(LightInfantry, Longbowmen)`.
- Safe commands in the live run were:
- Top up the existing light infantry battalion.
- Create a new longbow battalion. The text-client payload that worked used numeric enum value `4` for Longbowmen.
- Do not assume existing heavy battalions can be reinforced just because they already exist in the province.
- Marching rule:
- Do not march Sadar in the first expansion army. Leave him in Onmaa and send the non-leader army instead.
- The live run sent Elena, John, Agamemnon, and Old Marek from Onmaa to Nikemi, then on to Kojaria.
- Send supplies forward after the army reaches Nikemi; do not strand the field army without food.
### Failed Hedrick Attack
- Target: Kojaria, held by Hedrick the Hedge-Merchant's faction.
- Army: four non-Sadar heroes, about 1954 troops, including the new untrained longbow battalion.
- Strategic safety result:
- This was better than marching Sadar alone. A reset here did not immediately imply player defeat because Sadar
stayed home.
- It still appears to be a losing tactical plan.
- Tactical setup:
- Placed the army on the west edge and advanced toward Hedrick's single 1000-troop stack.
- A first attempt surrounded Hedrick and used repeated melee. It reset after an infantry melee, likely a loss.
- A second attempt used more spacing:
- Move John/engineer to the firing lane first.
- Use archery whenever it appears.
- Move cavalry into contact only after ranged damage is available.
- Avoid actor 0 infantry melee and avoid making Reduce/Holy Wave the core plan.
- What worked better:
- The stable pattern was archery from actor 0 when available, archery from the new longbows when available, and
cavalry melee from Old Marek.
- Extinguishing fire with the longbows was useful when the enemy lit the cavalry contact square.
- What failed:
- Even with repeated archery and cavalry melee, the battle dragged to day 12 and then reset after another cavalry
melee.
- A single late Reduce did not visibly break the stalemate.
- The new longbow battalion had `0.0` training and `0.0` armament in the stale strategic snapshot, so it may have
contributed much less than its troop count suggested.
- Practical conclusion:
- Do not attack Hedrick immediately after creating a raw longbow battalion.
- Build a stronger army first: train and arm the new longbows, improve the economy/agriculture enough to support
better reinforcements, and consider taking easier provinces or waiting until the army has more developed units.
- If attacking Hedrick, treat his 1000-stack as a boss fight. The current safe-looking four-hero army was not enough
to finish it reliably.
+2 -2
View File
@@ -287,8 +287,8 @@ You play **Sadar Rakon**, formerly Ikhaan Tarn's most trusted lieutenant. Tarn's
| 5 | `tutorial_support_deadline` | December nag if support < 40: have Elena give alms now |
| 6 | `guidance_expand` (script `tutorial_expansion`) | Once support is stable: keep developing, taxes coming in January |
| 7 | `tutorial_taxes_collected` | January: gold/food collected. Now expand — March your warlord + most heroes to a neighbor, leave 12 behind |
| 8 | `tutorial_ready_to_join` | A free hero in `{provinceName}` is ready to recruit → Visit Town + Recruit |
| 9 | `tutorial_in_town` | When you Visit Town: explains Trade / Arm Troops / Divine / Recruit / Manage Prisoners; *Return* ends the turn |
| 8 | `tutorial_ready_to_join` | A free hero in `{provinceName}` is ready to recruit → Travel + Recruit |
| 9 | `tutorial_in_town` | When you Travel: explains Trade / Arm Troops / Divine / Recruit / Manage Prisoners; *Return* ends the turn |
| 10 | `tutorial_faction_appears` | **The twist**: Fracture Covenant lands at Ingia and Soria. *The Eagle* commands them. Tarn may be with them |
| 11 | `tutorial_hero_departed` | First King's hero abandons service — "something deeper is at work" |
| 12 | `tutorial_hero_departed_again` | Second one in a different month — "something is wrong, I can feel it" (foreshadowing) |
+1 -1
View File
@@ -78,7 +78,7 @@ This section lists quests with direct `QuestCommandChooser` handlers in `Fulfill
|-------|---------|-------|
| `GrandArmyQuest` | `GrandArmyQuestCommandChooser` | Uses OrganizeTroops to top off existing battalions and hire Light Infantry. Only executes if resources are sufficient to fully meet the troop target. |
| `BattalionDiversityQuest` | `BattalionDiversityQuestCommandChooser` | Hires one battalion of a missing type to reach 3+ distinct types. Only attempts if the province already has 2+ existing types, has sufficient development (`meetsRequirements`), and gold/food surplus. |
| `UpgradeBattalionQuest` | `UpgradeBattalionQuestCommandChooser` | Walks a priority tree per turn: arm-completes (with optional Visit Town and/or food sale setup) → train-completes → march in a pre-qualified neighbor battalion → organize/top-off of the target type → march in an unqualified neighbor battalion → develop Economy/Agriculture → train progress → develop Infrastructure → arm progress. Only chooses Visit Town when it directly enables an arm-completes finisher. |
| `UpgradeBattalionQuest` | `UpgradeBattalionQuestCommandChooser` | Walks a priority tree per turn: arm-completes (with optional travel and/or food sale setup) → train-completes → march in a pre-qualified neighbor battalion → organize/top-off of the target type → march in an unqualified neighbor battalion → develop Economy/Agriculture → train progress → develop Infrastructure → arm progress. Only toggles Travel when it directly enables an arm-completes finisher. |
### Reconnaissance Quests
@@ -20,7 +20,7 @@ These values do different jobs; they are not interchangeable ratings that simply
- **Training** scales the battalion type's melee and missile damage bonuses. Higher training therefore means more damage per troop. It also affects some command-specific odds, including the chance to stun on a [Charge](/shardok-commands/#charge).
- **Armament** scales the battalion type's resistances and reduces incoming normal damage. Each type and damage category has its own resistance profile, so the same ARM value does not protect every battalion equally. Penetrating damage bypasses this normal armament reduction. If the unit can use [Archery](/shardok-commands/#archery), armament also determines its starting volleys: currently one volley per 10 ARM, rounded down, plus any bonus from its battalion type.
- **Morale** changes the battalion's damage swing. Most units also need at least 10 morale to use normal tactical commands.
- **Hero vigor** is an action constraint and current energy reserve, not battalion armor. It affects maximum AP and command access; at zero vigor, the hero-led unit is captured and removed from active battle. See [Vigor](/heroes/#vigor).
- **Hero vigor** is an action constraint and current energy reserve, not battalion armor. A hero-bearing unit normally needs at least 10 vigor to act, and special effects can spend or reduce it.
- **Troop count** multiplies battalion damage: more surviving troops deliver more total battalion damage. It also determines how many soldiers remain available to absorb casualties.
- **Battalion type** supplies the base damage, training bonus, resistance profile, armament benefit, movement costs, charge multiplier, and special capabilities.
- **Hero stats** contribute separately. Charisma and bravery affect battalion combat swings, while a hero also contributes personal damage and enables stat- or profession-based commands.
@@ -55,15 +55,13 @@ An exceptional formation created through necromantic effects rather than ordinar
## Heroes and units
A Shardok unit normally combines one hero and one battalion. The hero supplies stats, [vigor](/heroes/#vigor), profession commands, personal damage, and special capabilities; the battalion supplies troops, type, training, armament, movement, morale, and its damage profile. The hero's Charisma and Bravery also affect the battalion's combat swing. A profession alone may not be enough: casting requires a casting-capable battalion, and Ranger stealth requires a stealth-capable one.
The two parts remain one tactical unit. If the battalion reaches zero troops, it is destroyed. If the attached hero reaches zero vigor, the hero-led unit is captured and removed from active battle; the surviving battalion does not detach and continue fighting independently.
A Shardok unit normally combines one hero and one battalion. The hero supplies stats, vigor, profession commands, and special capabilities; the battalion supplies troops, type, training, armament, movement, morale, and damage profile. A profession alone may not be enough: casting requires a casting-capable battalion, and Ranger stealth requires a stealth-capable one.
## Creating and changing battalions
[**Organize Troops**](/commands/#organize-troops) creates, resizes, merges, transfers, or dismisses battalions. New troops cost gold and begin without training or armament. Transfers preserve weighted training and armament. Empty battalions are removed.
Use [**Train**](/commands/#train) to improve eligible battalions in the province and [**Arm Troops**](/commands/#arm-troops) while visiting town to buy higher armament. Province economy and agriculture affect which types can be raised; effective infrastructure limits equipment.
Use [**Train**](/commands/#train) to improve eligible battalions in the province and [**Arm Troops**](/commands/#arm-troops) while traveling to buy higher armament. Province economy and agriculture affect which types can be raised; effective infrastructure limits equipment.
## Movement, food, and battle
@@ -72,9 +72,7 @@ Most command phase actions spend the acting province's turn.
<b>Available when:</b> a diplomatic option is valid against another faction and an eligible messenger hero can be sent.
<b>Effect:</b> Send a hero to another faction with a diplomatic proposal. The target faction receives the offer at the end of the current round, after any battles this round have taken place. Truce, invitation, alliance, break-alliance, and ransom options create [incoming diplomacy offers](/factions/#incoming-diplomacy-offers) for the target faction and story-generation requests. Most diplomacy options spend gold and cost the messenger vigor.
For truce, invitation, alliance, and break-alliance missions, the envoy leaves the acting province immediately and is unavailable for the rest of the current round, including its battles. The envoy normally returns during **Diplomacy Resolution** near the end of that same round and can act again next round. If the origin province has been lost, the envoy returns elsewhere in the faction when possible. An imprisoned envoy does not return.
<b>Effect:</b> Send a hero to another faction with a diplomatic proposal. The target faction receives the offer at the end of the current round, after any battles this round have taken place. Truce, invitation, alliance, break-alliance, and ransom options create [incoming diplomacy offers](/factions/#incoming-diplomacy-offers) for the target faction and story-generation requests. Most diplomacy options spend gold, remove the messenger hero from the acting province, and cost the messenger vigor.
<b>Selection:</b> choose the diplomacy option, target faction, and sent hero.
@@ -166,7 +164,7 @@ Look for growth or attack opportunities. The vassal first tries to march into ne
<b>Available when:</b> the acting province has movable heroes, battalions, gold, or food and at least one valid destination.
<b>Effect:</b> Move heroes, battalions, gold, and food from one province to another. March is inter-province movement and always has a destination; [Visit Town](#visit-town) is only a local visit within the current province. The selected units and supplies leave the origin province immediately, each marching hero spends vigor and gains wisdom XP, and the destination receives an [incoming army](/provinces/#incoming-armies) scheduled for the next round.
<b>Effect:</b> Move heroes, battalions, gold, and food from one province to another. The selected units and supplies leave the origin province immediately, each marching hero spends vigor and gains wisdom XP, and the destination receives an [incoming army](/provinces/#incoming-armies) scheduled for the next round.
If the destination is already ruled by your faction when the army arrives, the heroes, battalions, gold, and food enter the province during the next round's Province Move Resolution phase, before riots, vassal commands, and player commands.
@@ -281,23 +279,21 @@ Shipments arrive during the next round's Province Move Resolution phase, before
<b>Selection:</b> choose the acting hero.
### Visit Town
### Travel
<b>Hero requirements:</b> None. The acting province's ruling hero makes the visit.
<b>Hero requirements:</b> None.
<b>Vigor cost:</b> 15.
<b>Available when:</b> the acting province's ruling hero has at least 40 vigor, the hero is not already visiting town, and there is no blizzard.
<b>Available when:</b> the acting province can enter the traveling command state.
<b>Effect:</b> Have the ruling hero leave camp to visit the town inside the acting province. Visit Town does not move any hero, battalion, or supplies to another province, so it has no destination; use [March](#march) for inter-province movement.
<b>Effect:</b> Unlock the traveling commands below. Once you are traveling, you can use as many traveling commands as you want in the same round before using Return to come back to camp.
Visit Town spends the ruling hero's vigor and unlocks whichever town commands below are currently eligible. You can use as many eligible town commands as you want in the same round before using Return to go back to camp. If no town activity currently qualifies, Return may be the only command available.
<b>Selection:</b> no additional choices.
<b>Selection:</b> no additional choices. Visit Town always uses the current province and never asks you to select a destination.
## Traveling Commands
## Town Commands
You must use Visit Town before these local commands appear. The ruling hero remains in the current province; only the available command set changes from camp duties to town activities. While visiting town, you can use as many eligible town commands as you want in one round before using Return to come back to camp.
You must use Travel before these commands appear. Once you are traveling, you can use as many traveling commands as you want in one round before using Return to come back to camp.
### Arm Troops
@@ -305,7 +301,7 @@ You must use Visit Town before these local commands appear. The ruling hero rema
<b>Vigor cost:</b> None.
<b>Available when:</b> the ruling hero is visiting town, the province has gold, and at least one battalion can raise ARM without exceeding effective infrastructure.
<b>Available when:</b> you are traveling, the province has gold, and at least one battalion can raise ARM without exceeding effective infrastructure.
<b>Effect:</b> Spend gold to raise armament on existing battalions. New armament must be higher than the battalion's current armament and cannot exceed the province's effective infrastructure. The province spends gold, the price index may change, and each armed battalion records a backstory event.
@@ -317,7 +313,7 @@ You must use Visit Town before these local commands appear. The ruling hero rema
<b>Vigor cost:</b> None.
<b>Available when:</b> the ruling hero is visiting town and an [unaffiliated hero](/heroes/#unaffiliated-heroes) quest is available in the province.
<b>Available when:</b> you are traveling and an [unaffiliated hero](/heroes/#unaffiliated-heroes) quest is available in the province.
<b>Effect:</b> Decline one of the unaffiliated hero quests available in the acting province.
@@ -331,7 +327,7 @@ You must use Visit Town before these local commands appear. The ruling hero rema
<b>Gold cost:</b> 100 gold per selected hero, multiplied by the province [price index](/provinces/#price-index) and rounded to the nearest whole gold for each hero. The total cost is that per-hero cost multiplied by the number of selected heroes. For example, divining 3 heroes at a 1.25 price index costs 375 gold.
<b>Available when:</b> the ruling hero is visiting town, the province can pay the cost for at least one hero, and there are free heroes who are not yet ready to join your faction but might be won over.
<b>Available when:</b> you are traveling, the province can pay the cost for at least one hero, and there are free heroes who are not yet ready to join your faction but might be won over.
<b>Effect:</b> Spend gold to divine one or more [free heroes](/factions/#free-heroes). For each divined hero, you receive details about what could impress them enough to become recruitable. Fulfill that ask, and the hero can later appear under Recruit Heroes. The province spends gold, and the price index may change.
@@ -343,7 +339,7 @@ You must use Visit Town before these local commands appear. The ruling hero rema
<b>Vigor cost:</b> None.
<b>Available when:</b> the ruling hero is visiting town and the province has prisoner heroes with available management options.
<b>Available when:</b> you are traveling and the province has prisoner heroes with available management options.
<b>Effect:</b> Choose what happens to ordinary prisoners in the province. These are heroes who are already in the prisoner state, not newly captured heroes still waiting for a battle aftermath decision.
@@ -387,23 +383,21 @@ Ordinary prisoners cannot be returned this way. Faction leader prisoners cannot
<b>Vigor cost:</b> None.
<b>Available when:</b> the province is ruled by one of the acting faction's faction leaders, that ruling faction leader is visiting town, and at least one unaffiliated hero in the province currently qualifies to join that faction. The visitor may be any faction leader; it does not have to be the faction head. Vassals cannot use this command.
<b>Available when:</b> you are traveling and unaffiliated heroes in the province are willing to join.
<b>Effect:</b> Recruit available unaffiliated heroes in the acting province. Recruited heroes join the faction at starting loyalty, move from the province's unaffiliated hero list into its ruling faction heroes, and receive a recruitment backstory event.
<b>Selection:</b> choose the heroes to recruit.
See [**What `WOULD_JOIN` Means**](/factions/#what-would_join-means) for the recruitment status, traveler exception, and separate **Please Recruit Me** behavior in vassal-ruled provinces.
### Return
<b>Hero requirements:</b> None.
<b>Vigor cost:</b> None.
<b>Available when:</b> the ruling hero is visiting town.
<b>Available when:</b> you are traveling.
<b>Effect:</b> Return the ruling hero from the current province's town to camp and end that province's turn.
<b>Effect:</b> Return from the traveling command state to the normal strategic flow.
<b>Selection:</b> no additional choices.
@@ -413,7 +407,7 @@ See [**What `WOULD_JOIN` Means**](/factions/#what-would_join-means) for the recr
<b>Vigor cost:</b> None.
<b>Available when:</b> the ruling hero is visiting town and the province has enough gold or food for at least one trade.
<b>Available when:</b> you are traveling and the province has enough gold or food for at least one trade.
<b>Effect:</b> Buy or sell food using the acting province's gold and food stores. Food buy and sell prices are based on the province price index. Buying spends gold and adds food; selling removes food and adds gold. The price index may change after the trade.
@@ -431,7 +425,7 @@ These commands appear only when the game is resolving a special situation, respo
<b>Available when:</b> an attack decision is pending.
<b>Effect:</b> Choose how to respond to a pending attack opportunity or battle decision. The command shows involved armies, acting units, and the available attack decision types. **Advance** commits the army to the attack. **Withdraw** sends it back without fighting. **Demand Tribute** lets you request a specific amount of the province's gold and food, up to the displayed maximum; the demand cannot be zero. The defender later chooses whether to pay the full demand or refuse it. See [Attack and Defense Decisions](/concepts/eagle-to-shardok/#attack-and-defense-decisions) and [Resolving a tribute demand](/concepts/march-timeline/#resolving-a-tribute-demand).
<b>Effect:</b> Choose how to respond to a pending attack opportunity or battle decision. The command shows involved armies, acting units, and the available attack decision types. See [Attack and Defense Decisions](/concepts/eagle-to-shardok/#attack-and-defense-decisions) for how this fits into battle creation.
<b>Selection:</b> choose one available attack decision.
@@ -573,9 +567,7 @@ Gift success is probabilistic. The chance is based on the province leader's Char
<b>Available when:</b> another faction tries to break an alliance.
<b>Effect:</b> Respond to a faction attempting to break an alliance. Accepting the break replaces the alliance with a 12-month truce; it does not make the factions immediately hostile. The truce remains active through its reset month and changes to **Hostile** when a later **New Round** advances the date past that month. For example, a break accepted in January has a January reset date the following year and becomes hostile when February begins.
Imprisoning the envoy ends the alliance without a truce and makes both relationships **Hostile**. See [Diplomacy Outcomes](/factions/#diplomacy-outcomes) for the other imprisonment consequences.
<b>Effect:</b> Respond to a faction attempting to break an alliance.
<b>Selection:</b> choose the originating faction and the resolution.
@@ -623,7 +615,7 @@ Imprisoning the envoy ends the alliance without a truce and makes both relations
<b>Available when:</b> another faction demands tribute.
<b>Effect:</b> Decide whether to pay demanded tribute. The command shows the demanding factions, requested tribute, their rough strength, and the acting province's available food and gold. A demand must be accepted or refused in full; partial payment and counteroffers are not available. Paying requires the province to have the full requested amount, creates a 12-month truce between the factions, and turns back the demanding faction's hostile armies against the payer's provinces. Refusing transfers no resources and returns that faction's army to **Attacking**, after which normal defense selection and battle resolution continue. Neither response changes prestige directly, although a battle caused by refusal can later affect prestige. See [Resolving a tribute demand](/concepts/march-timeline/#resolving-a-tribute-demand).
<b>Effect:</b> Decide whether to pay demanded tribute. The command shows the demanding factions, requested tribute, their rough strength, and the acting province's available food and gold.
<b>Selection:</b> choose the demanding faction and whether tribute is paid.
@@ -106,7 +106,7 @@ Moving armies arrive at their destinations, supplies move, and incoming hostile
### Hero Departures
The game checks affiliated heroes for [low-loyalty departure](/heroes/#loyalty-departure). Any hero with loyalty below 50 may leave at any time, and lower loyalty means a greater risk. A departing hero becomes an unaffiliated traveler in the same province and does not take the province's supplies.
Heroes who are ready to leave unaffiliated states or temporary situations may depart.
### Unaffiliated Hero Actions
@@ -13,7 +13,7 @@ March is a delayed strategic order. Selected heroes, battalions, gold, and food
| Province Move Resolution, round N+1 | Arrival checked | An army already friendly to the destination enters it. A hostile arrival waits outside rather than entering. |
| After Player Commands, round N+1 | Hostile Army Setup | Hostile arrivals become attacking groups, one per faction, preserving their approach direction and carried supplies. |
| Uncontested Conquest | No tactical defense needed | An unruled destination can be claimed without Shardok. Competing groups are compared by size, power, and a deterministic tie-breaker. |
| Attack and Defense Decisions | A ruled province is contested | Attackers decide whether to press the attack or demand tribute; defenders answer tribute demands and may choose an army and fallback destination. Truces can turn armies back. |
| Attack and Defense Decisions | A ruled province is contested | Attackers decide whether to press the attack; defenders may choose an army and fallback destination. Truces can turn armies back. |
| Battle Request and Resolution | Shardok battle | Eagle sends armies, map, limited battle food, and victory conditions to Shardok, then waits for a result. |
| Battle Aftermath | Consequences applied | Eagle resolves ownership, survivors, prisoners, supplies, devastation, prestige, and any allied-claimant decisions. |
@@ -27,16 +27,6 @@ A marching army does not occupy a neutral or enemy province during movement reso
An unruled province may be conquered without a tactical battle. A ruled and defended province can require attack and defense decisions followed by Shardok.
## Resolving a tribute demand
A tribute demand pauses that attacking faction during Defense Decision. The defender resolves each demand by either paying it in full or refusing it; there is no partial-payment or counteroffer option.
If the defender pays, the full requested gold and food are deducted from the province. The two factions enter a 12-month truce, and the demanding faction's hostile armies against any province ruled by the payer turn back. The returning armies arrive at their origin provinces in the next round.
If the defender refuses, no food or gold is transferred and the demanding army returns to **Attacking** status. The province remains in Defense Decision, so an eligible defender can then choose a defending army and fallback destination. Once the remaining attack and defense decisions are resolved, the ordinary battle-request rules apply: opposed armies proceed to battle, while an undefended attack may instead become an uncontested conquest.
Paying or refusing tribute has no direct prestige effect. If refusal leads to battle, the eventual battle result can change prestige normally.
## Food and gold
Carried supplies travel with the army. Moving armies consume their own food while incoming. If food is insufficient, their battalions can suffer starvation losses.
@@ -17,7 +17,7 @@ Movement cost depends on terrain and battalion type. Water, mountains, bridges,
Melee and ranged attacks require valid targets and battlefield geometry. Line of fire can be blocked. Damage and resistance depend on the units, heroes, damage profiles, and terrain involved.
Many major actions require a minimum AP and then consume all remaining AP. The command reference states the exact rule. Unless an entry says otherwise, a morale-using unit needs at least 10 morale, and a unit with a hero needs at least 10 [hero vigor](/heroes/#vigor). Current vigor also contributes to maximum AP. Reaching zero vigor resolves the entire hero-led unit as captured, even if troops remain.
Many major actions require a minimum AP and then consume all remaining AP. The command reference states the exact rule. Unless an entry says otherwise, a morale-using unit needs at least 10 morale, and a unit with a hero needs at least 10 hero vigor.
## Heroes and battalions
@@ -60,22 +60,6 @@ The common states are:
Some free heroes are effectively unavailable until circumstances change. For example, a province without one of your faction leaders cannot recruit from the Free Hero panel, and a hero may refuse forever if they have a permanent reason not to join your faction.
### What `WOULD_JOIN` Means
`WOULD_JOIN` means the hero meets the normal recruitment threshold for the faction that rules their current province. It is faction-specific: another faction may not qualify to recruit the same hero. The calculation uses the ruling faction's prestige, its faction head's charisma, the free hero's power and ambition, the hero's current state, and any personal bias toward or against that faction. A hero who is permanently unwilling to join that faction does not qualify.
The status means **willing, not recruited**. To recruit the hero with [**Recruit Heroes**](/commands/#recruit-heroes):
1. The province must be ruled by one of your faction leaders.
2. That ruling faction leader must personally use [**Visit Town**](/commands/#visit-town).
3. Use **Recruit Heroes** while the leader is visiting town and select the hero.
The faction head does not have to visit personally. Any of your faction leaders can recruit in a province they rule, although the willingness calculation still uses the faction head's charisma.
Vassals may visit town for their own purposes, but they cannot use **Recruit Heroes**, so they do not automatically recruit a hero marked `WOULD_JOIN`. However, an eligible free hero in a vassal-ruled province with enough support to provide taxes may independently ask to join during the **Please Recruit Me** phase. That is a separate faction-level decision: a human player accepts or declines the request rather than the vassal deciding. AI-controlled factions accept such requests automatically.
`WOULD_JOIN` is not the only status that can lead to recruitment. Travelers continue to display `TRAVELER` even when they would accept, because their willingness remains unknown until a faction leader visits town. Once the leader visits, the authoritative **Recruit Heroes** list shows which free heroes that faction can recruit under the current circumstances.
## Relationships
Faction relationships have a visible diplomatic state and an internal trust value.
@@ -98,20 +82,6 @@ Trust is a hidden number used by AI diplomacy. Higher trust makes a faction more
Incoming offers are unresolved diplomatic proposals from other factions. They become [special and conditional commands](/commands/#special-and-conditional-commands) such as resolving truce offers, alliance offers, invitations, ransom offers, or alliance breaks.
## Diplomacy Outcomes
An envoy sent with a truce, invitation, alliance, or break-alliance proposal leaves the acting province during **Player Commands**. The hero is unavailable for the rest of that round, including any battles, and normally returns during **Diplomacy Resolution** after the battles are complete. If the origin province is still controlled, the envoy returns there; otherwise the game tries another faction province and then a moving faction army. If none exists, the envoy becomes an outlaw in the origin province.
Accepting another faction's alliance break replaces the alliance with a truce. Its reset date is 12 months after acceptance. The truce remains in force through that reset month, then becomes **Hostile** when **New Round** advances the date beyond it. Accepting a break therefore provides a protected transition instead of permitting immediate war.
Imprisoning a messenger has concrete consequences:
- The messenger does not return. They leave their original faction and become a prisoner held in the imprisoning faction's senior faction leader province.
- The messenger receives a -100 faction bias toward the imprisoning faction, making later recruitment much harder.
- The messenger's original faction loses 150 trust toward the imprisoning faction.
- Every third-party faction loses 40 trust toward the imprisoning faction.
- The incoming offer is removed. If the message was an alliance break, the alliance ends immediately, both sides become **Hostile**, and no transition truce is created.
## Focus Province
A faction can have a focus province. The focus province helps direct [province orders](/provinces/#province-orders) and AI attention toward a particular province.
@@ -28,37 +28,7 @@ These values help drive hero flavor, AI decisions, and story generation.
## Vigor
Vigor is a hero's current energy reserve. **Constitution is the hero's normal strategic vigor cap**; vigor and Constitution are related, but they are not the same stat.
### Strategic vigor
Many Eagle commands require an acting hero and spend vigor. The command reference lists each cost. A hero with too little vigor is not offered as an actor for that command.
Vigor recovers over time and through deliberate recovery:
- Each new month restores 5 vigor.
- [Rest](/commands/#rest) restores up to 15 vigor to each faction hero in the province.
- [Feast](/commands/#feast) restores up to 10 vigor to each faction hero in the province.
- Recovery cannot raise strategic vigor above Constitution.
Strategic actions that spend vigor also grant Constitution XP. Constitution can rise through normal stat advancement, increasing the hero's future strategic vigor cap.
### Vigor in a Shardok battle
A hero enters battle with the vigor they currently have after strategic costs such as marching. That value becomes the hero's **battle-start vigor** and the recovery ceiling for that battle. A tired hero can therefore enter with a battle recovery ceiling below their Constitution. The ceiling does not fall as the battle proceeds; current vigor falls and rises beneath it.
Tactical vigor affects what a hero-led unit can do:
- Higher current vigor contributes to the unit's maximum Action Points. A normal unit's maximum is 5 plus rounded `vigor / 25` plus rounded `morale / 25`.
- Spending Action Points normally spends 0.5 vigor per AP, and some profession abilities have additional vigor costs.
- Combat damage and battlefield effects can reduce vigor.
- Ending an activation with unused AP, [Rest](/shardok-commands/#stop-or-rest), and effects such as [Holy Wave](/shardok-commands/#holy-wave) can restore vigor, but not above battle-start vigor.
- Below 10 vigor, most ordinary tactical commands are unavailable. A few cleanup or required commands are exceptions.
- At zero vigor, the hero-led unit is resolved as captured. Its surviving battalion does not remain on the map as an independently acting unit.
While the hero remains active, their stats affect the battalion's combat swing, they add personal damage, and their profession can unlock special commands. Low vigor does not directly scale those contributions down point by point; it reduces AP and command access, with the decisive removal occurring at zero.
When a tactical display shows `current / battle start`, the first number is current vigor and the second is the battle-start recovery ceiling—not Constitution. Enemy details may be hidden by battlefield knowledge. An absent or hidden enemy value must not be interpreted as an actual zero.
Vigor is a hero's current energy. Many commands require an acting hero and spend vigor. Resting restores vigor up to the hero's constitution.
## Loyalty
@@ -66,12 +36,6 @@ Loyalty measures a hero's attachment to their faction. Feasts, events, captures,
Loyalty is not faction bias. Loyalty describes an affiliated hero's current attachment; bias helps determine whether an unaffiliated or imprisoned hero will join a particular faction.
### Loyalty Departure
Any hero with low loyalty (below 50) may leave at any time. The game checks for departures automatically during the **Hero Departures** phase of each strategic round, before players and vassals issue commands. Lower loyalty means a greater chance of departure.
When a hero leaves, they stop belonging to the faction and become an unaffiliated traveler in the same province. They do not take gold or food with them. If other faction heroes remain, the province and its supplies remain with the faction. If every affiliated hero leaves, the province becomes unowned and its stored gold and food are lost.
## Professions
Professions give heroes special command access, bonuses, and tactical identity. Some effects are Eagle strategic effects, while others apply only when the hero is attached to a Shardok battle unit.
@@ -15,7 +15,7 @@ Source map for Shardok command requirements/costs:
- Charge: terrain-entry cost from BattalionType::GetCostToEnterTerrain(...); allowsMoveAfterCharge is true for Light Cavalry and Heavy Cavalry in src/main/resources/net/eagle0/shardok/battalionTypes.tsv; stun settings are baseStunChanceOnCharge and trainingDifferenceMultiplierForStunChanceOnCharge in the same file; src/main/cpp/net/eagle0/shardok/library/command_factories/ChargeCommandFactory.cpp.
- Move: per-hex terrain-entry costs, plus extraCostForZocMovement=1; src/main/cpp/net/eagle0/shardok/library/command_factories/MoveCommandFactory.cpp and src/main/cpp/net/eagle0/shardok/library/commands/MoveCommand.cpp.
- Lightning Bolt: lightningActionPointCost=5 and lightningRange=3; src/main/cpp/net/eagle0/shardok/library/command_factories/LightningBoltCommandFactory.cpp and src/main/cpp/net/eagle0/shardok/library/commands/LightningBoltCommand.cpp.
- Meteor: minimumVigorForMeteor=30, meteorStartActionPointCost=5, meteorTargetActionPointCost=0, meteorCancelActionPointCost=0, meteorCastActionPointCost=1, meteorCastVigorCost=20, meteorRange=3, meteorSplashFactor=0.4, and meteorCastWisdomXp=5; src/main/cpp/net/eagle0/shardok/library/command_factories/MeteorStartCommandFactory.cpp, MeteorTargetCommandFactory.cpp, src/main/cpp/net/eagle0/shardok/library/util/MeteorRangeCoords.cpp, src/main/cpp/net/eagle0/shardok/library/commands/MeteorStartCommand.cpp, MeteorTargetCommand.cpp, MeteorCancelCommand.cpp, and src/main/cpp/net/eagle0/shardok/library/actions/MeteorCastAction.cpp.
- Meteor: meteorStartActionPointCost=5, meteorTargetActionPointCost=0, meteorCancelActionPointCost=0, meteorCastActionPointCost=1, meteorCastVigorCost=20, and meteorRange=3; src/main/cpp/net/eagle0/shardok/library/command_factories/MeteorStartCommandFactory.cpp, MeteorTargetCommandFactory.cpp, src/main/cpp/net/eagle0/shardok/library/util/MeteorRangeCoords.cpp, src/main/cpp/net/eagle0/shardok/library/commands/MeteorStartCommand.cpp, MeteorTargetCommand.cpp, MeteorCancelCommand.cpp, and src/main/cpp/net/eagle0/shardok/library/actions/MeteorCastAction.cpp.
- Start Fire: startFireActionPointCost=5; hero start-fire thresholds are Mage or agility >= 70 and wisdom >= 70 in src/main/cpp/net/eagle0/shardok/ai_battle_simulator/AiBattleSimulator.cpp; src/main/cpp/net/eagle0/shardok/library/command_factories/StartFireCommandFactory.cpp and src/main/cpp/net/eagle0/shardok/library/commands/StartFireCommand.cpp.
- Extinguish Fire: extinguishActionPointCost=5; src/main/cpp/net/eagle0/shardok/library/command_factories/ExtinguishFireCommandFactory.cpp and src/main/cpp/net/eagle0/shardok/library/commands/ExtinguishFireCommand.cpp.
- Freeze Water: freezeWaterActionPointCost=5; src/main/cpp/net/eagle0/shardok/library/command_factories/FreezeWaterCommandFactory.cpp.
@@ -23,22 +23,22 @@ Source map for Shardok command requirements/costs:
- Blow Bridge: blowBridgeActionPointCost=5; src/main/cpp/net/eagle0/shardok/library/command_factories/BlowBridgeCommandFactory.cpp.
- Placement: no AP cost in setup commands; src/main/cpp/net/eagle0/shardok/library/actions/PlaceUnitCommand.cpp and PlaceHiddenUnitCommand.cpp.
- Scout: scoutActionPointCost=5 and scoutRange=4; src/main/cpp/net/eagle0/shardok/library/command_factories/ScoutCommandFactory.cpp.
- Raise Dead: raiseDeadActionPointCost=5, raiseDeadRange=2, raiseDeadStartingSize=100, raiseDeadWisdomXp=1, and raiseDeadCharismaXp=2; src/main/cpp/net/eagle0/shardok/library/command_factories/RaiseDeadCommandFactory.cpp and src/main/cpp/net/eagle0/shardok/library/commands/RaiseDeadCommand.cpp.
- Dismiss Unit: dismissBaseOdds=60 and requires remainingActionPoints > 0 in src/main/cpp/net/eagle0/shardok/library/command_factories/ControlCommandFactory.cpp; execution zeroes both units in src/main/cpp/net/eagle0/shardok/library/commands/DismissUnitCommand.cpp.
- Holy Wave: holyWaveActionPointCost=5, holyWaveVigorCost=10, holyWaveInspireBonus=25, maxInspireOverBase=10, holyWaveVigorBuf=5, holyWaveDamagePercentage=0.7, and holyWaveCharismaXp=5; src/main/cpp/net/eagle0/shardok/library/command_factories/HolyWaveCommandFactory.cpp and src/main/cpp/net/eagle0/shardok/library/commands/HolyWaveCommand.cpp.
- Stop and Rest: stop posts no AP cost; actionCostToVigorCost=0.5 and rest zeroes AP in src/main/cpp/net/eagle0/shardok/library/commands/UnitRestCommand.cpp; availability and stop implementation are in ChargeCommandFactory.cpp and UnitStopCommand.cpp.
- Challenge Duel: challengeDuelActionPointCost=5, minimumVigorToAcceptDuel=30, duelDeclinedMoraleAdjustment=-15, duelWonMoraleBoost=15, and duelWinnerCharismaXp=20; src/main/cpp/net/eagle0/shardok/library/command_factories/ChallengeDuelCommandFactory.cpp and src/main/cpp/net/eagle0/shardok/library/commands/challenge_duel_command/ChallengeDuelCommand.cpp.
- Fear: fearActionPointCost=5, fearRange=3, fearDebuf=-25, fearFailedBuf=10, and fearCharismaXp=2; src/main/cpp/net/eagle0/shardok/library/command_factories/FearCommandFactory.cpp and src/main/cpp/net/eagle0/shardok/library/commands/FearCommand.cpp.
- Repair: repairActionPointCost=5 and repairBuf=25; src/main/cpp/net/eagle0/shardok/library/command_factories/RepairCommandFactory.cpp and src/main/cpp/net/eagle0/shardok/library/commands/RepairCommand.cpp.
- Reduce: reduceActionPointCost=5, reduceRange=3, and reduceForestBonus=50; src/main/cpp/net/eagle0/shardok/library/command_factories/ReduceCommandFactory.cpp and src/main/cpp/net/eagle0/shardok/library/commands/ReduceCommand.cpp.
- Raise Dead: raiseDeadActionPointCost=5 and raiseDeadRange=2; src/main/cpp/net/eagle0/shardok/library/command_factories/RaiseDeadCommandFactory.cpp.
- Dismiss Unit: requires remainingActionPoints > 0 in src/main/cpp/net/eagle0/shardok/library/command_factories/ControlCommandFactory.cpp; execution zeroes both units in src/main/cpp/net/eagle0/shardok/library/commands/DismissUnitCommand.cpp.
- Holy Wave: holyWaveActionPointCost=5; src/main/cpp/net/eagle0/shardok/library/command_factories/HolyWaveCommandFactory.cpp.
- Stop and Rest: stop posts no AP cost; rest zeroes AP in src/main/cpp/net/eagle0/shardok/library/commands/UnitRestCommand.cpp; stop implementation in UnitStopCommand.cpp.
- Challenge Duel: challengeDuelActionPointCost=5; src/main/cpp/net/eagle0/shardok/library/command_factories/ChallengeDuelCommandFactory.cpp and src/main/cpp/net/eagle0/shardok/library/commands/challenge_duel_command/ChallengeDuelCommand.cpp.
- Fear: fearActionPointCost=5 and fearRange=3; src/main/cpp/net/eagle0/shardok/library/command_factories/FearCommandFactory.cpp.
- Repair: repairActionPointCost=5; src/main/cpp/net/eagle0/shardok/library/command_factories/RepairCommandFactory.cpp.
- Reduce: reduceActionPointCost=5 and reduceRange=3; src/main/cpp/net/eagle0/shardok/library/command_factories/ReduceCommandFactory.cpp.
- Flee and Retreat: fleeActionPointCost=5 and retreatActionPointCost=5; src/main/cpp/net/eagle0/shardok/library/command_factories/FleeCommandFactory.cpp and RetreatCommandFactory.cpp.
- Control: requires remainingActionPoints > 0 in ControlCommandFactory.cpp; execution zeroes acting unit in src/main/cpp/net/eagle0/shardok/library/commands/ControlCommand.cpp.
- Reinforce: reinforceActionPointCost=5; src/main/cpp/net/eagle0/shardok/library/command_factories/ReinforceCommandFactory.cpp.
- Brave Water: braveWaterActionPointCost=8, braveWaterRangerBonus=20, and braveWaterMaxLoss=0.2; src/main/cpp/net/eagle0/shardok/library/command_factories/BraveWaterCommandFactory.cpp and src/main/cpp/net/eagle0/shardok/library/commands/BraveWaterCommand.cpp.
- Brave Water: braveWaterActionPointCost=8; src/main/cpp/net/eagle0/shardok/library/command_factories/BraveWaterCommandFactory.cpp and src/main/cpp/net/eagle0/shardok/library/commands/BraveWaterCommand.cpp.
- Release Unit: requires remainingActionPoints > 0 in ControlCommandFactory.cpp; execution zeroes both units in src/main/cpp/net/eagle0/shardok/library/commands/ReleaseUnitCommand.cpp.
- End Turn and Setup: no command AP cost; end turn zeroes player unit AP in src/main/cpp/net/eagle0/shardok/library/commands/EndTurnCommand.cpp; setup end in src/main/cpp/net/eagle0/shardok/library/actions/EndPlayerSetupCommand.cpp.
- Hide: hideActionPointCost=5; src/main/cpp/net/eagle0/shardok/library/command_factories/HideCommandFactory.cpp.
- Fortify: fortifyActionPointCost=5 and fortifyDamageTakenMultiplier=0.9; src/main/cpp/net/eagle0/shardok/library/command_factories/FortifyCommandFactory.cpp, src/main/cpp/net/eagle0/shardok/library/commands/FortifyCommand.cpp, and the commands/actions that clear fortified status.
- Fortify: fortifyActionPointCost=5; src/main/cpp/net/eagle0/shardok/library/command_factories/FortifyCommandFactory.cpp.
- Become Outlaw: uses fleeActionPointCost=5 through src/main/cpp/net/eagle0/shardok/library/command_factories/FleeCommandFactory.cpp and src/main/cpp/net/eagle0/shardok/library/commands/BecomeOutlawCommand.cpp.
- Evacuate Prisoners: evacuatePrisonersActionPointCost=5; src/main/cpp/net/eagle0/shardok/library/command_factories/EvacuatePrisonersCommandFactory.cpp.
-->
@@ -127,13 +127,13 @@ The follow-up list is a planning aid, not a complete list of everything the unit
### Meteor
<b>Unit requirements:</b> [Mage](/heroes/#mage) attached to Light Infantry, Light Cavalry, or Longbowmen, with at least 30 vigor. Heavy units and Undead cannot cast.
<b>Unit requirements:</b> [Mage](/heroes/#mage) attached to Light Infantry, Light Cavalry, or Longbowmen, with enough vigor to start the spell. Heavy units and Undead cannot cast.
<b>Action Point cost:</b> start costs 5 AP and consumes all remaining AP; target and cancel cost 0 AP; the automatic cast step is configured as 1 AP but resolves by setting the caster to 0 AP.
<b>Available when:</b> the caster can begin the spell, choose or change a target within 3 hexes, cast the pending meteor, or cancel the pending meteor.
<b>Effect:</b> Begin a delayed meteor spell, then choose a target within 3 hexes on the following round. When the meteor resolves, a unit on the target hex takes a fire attack based on the Mage's Wisdom. Units on the six adjacent hexes take 40% as much. The impact damages castles, bridges, ice, and snow; may start fires on the target and adjacent hexes; and removes fortification from units it hits. Destroying supporting ice or a bridge can also drop a unit into the water. The Mage spends 20 vigor, gains 5 Wisdom XP, and is stunned for 2 rounds after the strike. You can cancel while the meteor is still pending.
<b>Effect:</b> Begin a delayed meteor spell, choose where it will land, then resolve the strike when the cast step becomes available. You can cancel while the meteor is still pending.
<b>Selection:</b> choose the caster, spell target, or cancel option depending on the current meteor step.
@@ -229,21 +229,21 @@ The follow-up list is a planning aid, not a complete list of everything the unit
<b>Available when:</b> there is an empty, undead-traversable target hex within 2 hexes.
<b>Effect:</b> Make the displayed success roll. On success, create a battalion of 100 Undead on the target hex, controlled by the Necromancer. The new battalion starts with 50 morale, 0 training, and 0 armament. On failure, no unit is created. Either result spends the action; the Necromancer gains 1 Wisdom XP and 2 Charisma XP.
<b>Effect:</b> Create or restore undead forces through necromantic action.
<b>Selection:</b> choose the necromancer unit and target.
### Dismiss Unit
<b>Unit requirements:</b> a hero who currently controls a summoned unit, such as Undead raised by a Necromancer.
<b>Unit requirements:</b> a unit that is allowed to be dismissed.
<b>Action Point cost:</b> requires the controlling unit to have more than 0 AP; execution sets both the controlling unit and dismissed unit to 0 AP.
<b>Available when:</b> the controlling hero has more than 0 AP and still has a controlled unit.
<b>Available when:</b> dismissal is valid for the current tactical state.
<b>Effect:</b> Make the displayed success roll, based on the controlling hero's Charisma and Wisdom. Success disbands the controlled unit. Failure still ends the control relationship, but the unit remains on the battlefield uncontrolled and targets its former controller.
<b>Effect:</b> Remove the unit from the tactical battle.
<b>Selection:</b> choose Dismiss Unit on the controlling hero; the controlled unit is the target.
<b>Selection:</b> choose the unit to dismiss.
### Holy Wave
@@ -251,35 +251,33 @@ The follow-up list is a planning aid, not a complete list of everything the unit
<b>Action Point cost:</b> 5 AP; consumes all remaining AP.
<b>Vigor cost:</b> 10 from the Paladin under normal circumstances.
<b>Available when:</b> the paladin has a valid holy-wave action.
<b>Available when:</b> the Paladin unit has enough AP and meets the shared morale and hero-vigor requirements.
<b>Effect:</b> Use a holy-area effect from the capable unit.
<b>Effect:</b> Emit a wave centered on the Paladin. The Paladin and every adjacent non-Undead unit controlled by the same player gain 25 morale, capped at 10 above base morale and at 100 overall; attached heroes regain 5 vigor up to starting vigor; and stun is removed. Every adjacent Undead unit, regardless of allegiance, loses 70% of its troops, becomes visible, and targets the Paladin. The Paladin gains 5 Charisma XP. The effect does not make a success roll.
<b>Selection:</b> choose the Paladin unit. Holy Wave does not require a target.
<b>Selection:</b> choose the paladin unit and command target, if one is required.
### Stop and Rest
<b>Unit requirements:</b> a unit with an available charge.
<b>Unit requirements:</b> a unit that can stop or rest.
<b>Action Point cost:</b> Stop costs 0 AP; Rest consumes all remaining AP.
<b>Available when:</b> Stop is offered outside an enemy zone of control; Rest is offered inside an enemy zone of control.
<b>Available when:</b> the unit can end movement or spend its action resting.
<b>Effect:</b> Stop declines the available charge without spending the unit's remaining AP. Rest declines the charge, ends the activation, and restores an attached hero's vigor by half of the AP given up. For example, resting with 4 AP restores 2 vigor.
<b>Effect:</b> `UNIT_STOP_COMMAND` stops a unit. `UNIT_REST_COMMAND` has a unit spend its action resting instead of acting aggressively.
<b>Selection:</b> choose stop or rest for the acting unit.
### Challenge Duel
<b>Unit requirements:</b> [Champion](/heroes/#champion) challenging an adjacent known enemy unit with an attached hero. A challenge cannot enter a castle.
<b>Unit requirements:</b> [Champion](/heroes/#champion).
<b>Action Point cost:</b> 5 AP; consumes all remaining AP.
<b>Available when:</b> the target hero has at least 30 vigor, or the Champion does not know enough about the target to know otherwise.
<b>Available when:</b> an opposing unit can be challenged.
<b>Effect:</b> The target's chance to accept depends on Bravery and its assessment of the two battalions and heroes. A target that declines normally loses 15 morale; a target known to have less than 30 vigor declines without that penalty. If accepted, the heroes exchange attacks until one falls or 30 exchanges pass. A winner's battalion gains 15 morale and the winning hero gains 20 Charisma XP. Participating heroes can also gain Strength and Agility XP.
<b>Effect:</b> Challenge an opposing unit to a duel. The tactical action emits accepted or declined outcomes directly.
<b>Selection:</b> choose the champion unit and duel target.
@@ -291,7 +289,7 @@ The follow-up list is a planning aid, not a complete list of everything the unit
<b>Available when:</b> a known enemy that uses morale is within 3 hexes.
<b>Effect:</b> Make the displayed success roll. The Necromancer's Charisma and Wisdom improve the chance, while a target hero's Charisma resists it. Success reduces the target battalion's morale by 25 and stuns it for 1 round. Failure instead increases its morale by 10. The Necromancer gains 2 Charisma XP either way.
<b>Effect:</b> Use a fear effect against the target.
<b>Selection:</b> choose the necromancer unit and target.
@@ -301,11 +299,11 @@ The follow-up list is a planning aid, not a complete list of everything the unit
<b>Action Point cost:</b> 5 AP; consumes all remaining AP.
<b>Available when:</b> a damaged friendly or unoccupied bridge or castle is on the Engineer's hex or an adjacent hex. The Engineer cannot repair from water or repair a structure occupied by a known enemy.
<b>Available when:</b> a damaged unit or battlefield object can be repaired.
<b>Effect:</b> Restore 25 integrity to the bridge or castle, up to its maximum of 100. Repair does not restore troops or hero vigor.
<b>Effect:</b> Repair the damaged target.
<b>Selection:</b> choose the Engineer unit and the bridge or castle to repair.
<b>Selection:</b> choose the engineer unit and repair target.
### Reduce
@@ -313,83 +311,71 @@ The follow-up list is a planning aid, not a complete list of everything the unit
<b>Action Point cost:</b> 5 AP; consumes all remaining AP.
<b>Available when:</b> a known enemy unit or a castle with remaining integrity is within 3 hexes and the line is not blocked by mountains. Friendly-occupied hexes and the Engineer's own hex cannot be targeted.
<b>Available when:</b> an enemy or damaged castle is within 3 hexes and the line is not blocked by mountains.
<b>Effect:</b> Bombard the target. The damage roll improves with the Engineer's Agility, Strength, and Wisdom, and gains a bonus when friendly forces have access to a forest. The result reduces castle or bridge integrity on the hex, damages any occupying enemy unit, and removes that unit's fortified status.
<b>Effect:</b> Reduce the target's defensive or structural value.
<b>Selection:</b> choose the engineer unit and target.
### Flee
### Flee and Retreat
<b>Unit requirements:</b> a unit with an attached hero that is allowed to flee.
<b>Unit requirements:</b> a unit that is allowed to leave or withdraw.
<b>Action Point cost:</b> 5 AP; consumes all remaining AP.
<b>Available when:</b> the hero can leave the battle and has enough AP.
<b>Available when:</b> flight or retreat is valid for the current battlefield state.
<b>Effect:</b> Attempt to withdraw from the province entirely. Make the displayed success roll: nearby visible friendly units improve the chance to escape, while nearby visible enemies and impassable terrain reduce it. Units 2 hexes away have half as much effect as adjacent units. VIP heroes escape automatically. On success, the unit leaves both the battle and the province and will escape even if the province is later captured. On failure, the unit is captured during the attempt.
<b>Effect:</b> `FLEE_COMMAND` handles immediate flight from a tactical situation. `RETREAT_COMMAND` handles a more formal withdrawal command.
<b>Selection:</b> choose the fleeing unit.
### Retreat
<b>Unit requirements:</b> a defending unit with an attached hero.
<b>Action Point cost:</b> 5 AP; consumes all remaining AP.
<b>Available when:</b> the defending hero has enough AP. Attackers cannot use Retreat.
<b>Effect:</b> Withdraw the unit from the battle while remaining in the province. Retreat succeeds automatically and does not make the immediate capture roll used by Flee, but the hero will still be captured if their side loses the battle and the province is captured.
<b>Selection:</b> choose the retreating unit.
<b>Selection:</b> choose the fleeing or retreating unit.
### Control
<b>Unit requirements:</b> a hero who already has a controlled summoned unit, such as Undead raised by a Necromancer.
<b>Unit requirements:</b> a unit with access to a control effect.
<b>Action Point cost:</b> requires more than 0 AP; execution sets the acting unit to 0 AP.
<b>Available when:</b> the controlling hero has more than 0 AP and still has a controlled unit.
<b>Available when:</b> a valid target can be controlled.
<b>Effect:</b> Spend the controlling hero's remaining AP to command the linked unit this round. Control does not create a new controlled unit; Raise Dead establishes that relationship.
<b>Effect:</b> Take control of the target when the command is available.
<b>Selection:</b> choose Control on the controlling hero; the linked unit is the target.
<b>Selection:</b> choose the acting unit and control target.
### Reinforce
<b>Unit requirements:</b> an on-map unit with enough AP and a friendly reserve unit available to enter the battle.
<b>Unit requirements:</b> reinforcements available to enter the battle.
<b>Action Point cost:</b> 5 AP; consumes all remaining AP.
<b>Available when:</b> fewer than 10 friendly on-map units have attached heroes, and the reserve unit has an empty, non-burning hex in its designated starting area.
<b>Available when:</b> the battle state allows reinforcement and there is a valid entry option.
<b>Effect:</b> Spend the acting unit's activation and move the selected reserve unit onto the chosen entry hex as a normal active unit.
<b>Effect:</b> Bring reinforcements into the battle.
<b>Selection:</b> choose the reinforcement option and entry placement.
### Brave Water
<b>Unit requirements:</b> a unit with an attached hero whose battalion type permits Brave Water. The hero needs at least 10 vigor. [Ranger](/heroes/#ranger) is not required, but Rangers receive a 20-point odds bonus.
<b>Unit requirements:</b> a unit that can attempt brave-water movement. [Ranger](/heroes/#ranger) is not required, but Rangers get an odds bonus.
<b>Action Point cost:</b> 8 AP; consumes all remaining AP.
<b>Available when:</b> the unit is on land and can reach a believed-empty, traversable land hex across water.
<b>Available when:</b> the unit has a valid water path or water target.
<b>Effect:</b> Make the displayed crossing roll. Agility and Wisdom improve the chance; armament and bad weather reduce it. Success moves the unit across the water, unless a hidden occupant triggers an ambush on arrival. Failure leaves the unit in place. The attempt always stuns the unit for 1 round and can cost up to 20% of its troops, armament, and hero vigor; safer crossings reduce the possible losses.
<b>Effect:</b> Move through water despite the usual danger or restriction.
<b>Selection:</b> choose the unit and water movement target.
### Release Unit
<b>Unit requirements:</b> a hero who currently controls a summoned unit, such as Undead raised by a Necromancer.
<b>Unit requirements:</b> a unit that can release a constrained target.
<b>Action Point cost:</b> requires more than 0 AP; execution sets both the controlling unit and released unit to 0 AP.
<b>Available when:</b> the controlling hero has more than 0 AP and still has a controlled unit.
<b>Available when:</b> a controlled, held, or otherwise constrained unit can be released.
<b>Effect:</b> End the control relationship without a roll. The released unit becomes uncontrolled, targets its former controller, and remains on the battlefield. Both units end their activations.
<b>Effect:</b> Release the constrained unit.
<b>Selection:</b> choose Release Unit on the controlling hero; the controlled unit is the target.
<b>Selection:</b> choose the acting unit and unit to release.
### End Turn and Setup
@@ -421,21 +407,21 @@ The follow-up list is a planning aid, not a complete list of everything the unit
<b>Action Point cost:</b> 5 AP; consumes all remaining AP.
<b>Available when:</b> the Engineer is not already fortified, is standing on fortifiable terrain, and has enough AP.
<b>Available when:</b> the engineer can fortify its current position.
<b>Effect:</b> Mark the unit as fortified, reducing damage taken by 10%. Moving removes fortification; being hit by Reduce or Meteor also removes it, as does taking fire damage at the end of the unit's turn.
<b>Effect:</b> Have the unit fortify its current position.
<b>Selection:</b> choose the engineer unit.
### Become Outlaw
<b>Unit requirements:</b> a unit with an attached hero that is not allowed to flee normally.
<b>Unit requirements:</b> a unit or hero eligible for the outlaw consequence.
<b>Action Point cost:</b> 5 AP through the flee/outlaw action.
<b>Available when:</b> the hero has enough AP, cannot flee, and the battle permits the outlaw outcome.
<b>Available when:</b> the battle result or tactical state allows the outlaw transition.
<b>Effect:</b> Use the same displayed escape roll as Flee. Success removes the unit from battle and records the hero as an outlaw. Failure removes the unit as captured.
<b>Effect:</b> Mark the unit or hero as becoming an outlaw as a battle consequence.
<b>Selection:</b> choose the outlaw command when offered.
@@ -445,8 +431,8 @@ The follow-up list is a planning aid, not a complete list of everything the unit
<b>Action Point cost:</b> 5 AP; consumes all remaining AP.
<b>Available when:</b> at least one hostile hero has already been captured, and the Warden is allowed to flee and has enough AP.
<b>Available when:</b> prisoners can be moved out of danger.
<b>Effect:</b> Remove the Warden's unit from battle as evacuated and secure every captured hostile hero for the Warden's player. The evacuation succeeds automatically.
<b>Effect:</b> Move prisoners out of danger when the battlefield state allows prisoner evacuation.
<b>Selection:</b> choose the warden unit and evacuation command.
+7 -7
View File
@@ -2,18 +2,18 @@ module github.com/nolen777/eagle0
go 1.25.0
toolchain go1.26.5
toolchain go1.26.4
require (
github.com/aws/aws-sdk-go-v2 v1.42.1
github.com/aws/aws-sdk-go-v2/config v1.32.30
github.com/aws/aws-sdk-go-v2/credentials v1.19.29
github.com/aws/aws-sdk-go-v2/service/s3 v1.105.1
github.com/aws/aws-sdk-go-v2 v1.42.0
github.com/aws/aws-sdk-go-v2/config v1.32.25
github.com/aws/aws-sdk-go-v2/credentials v1.19.24
github.com/aws/aws-sdk-go-v2/service/s3 v1.103.3
github.com/golang-jwt/jwt/v5 v5.3.1
github.com/google/uuid v1.6.0
github.com/webview/webview_go v0.0.0-20240831120633-6173450d4dd6
golang.org/x/sys v0.47.0
google.golang.org/grpc v1.82.0
golang.org/x/sys v0.46.0
google.golang.org/grpc v1.81.1
google.golang.org/protobuf v1.36.11
)
-58
View File
@@ -4,54 +4,34 @@ cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdB
cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0 h1:DHa2U07rk8syqvCge0QIGMCE1WxGj9njT44GH7zNJLQ=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.31.0/go.mod h1:P4WPRUkOhJC13W//jWpyfJNDAIpvRbAUIYLX/4jtlE0=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0 h1:rIkQfkCOVKc1OiRCNcSDD8ml5RJlZbH/Xsq7lbpynwc=
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.32.0/go.mod h1:RD2SsorTmYhF6HkTmDw7KmPYQk8OBYwTkuasChwv7R4=
github.com/aws/aws-sdk-go-v2 v1.32.8 h1:cZV+NUS/eGxKXMtmyhtYPJ7Z4YLoI/V8bkTdRZfYhGo=
github.com/aws/aws-sdk-go-v2 v1.32.8/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U=
github.com/aws/aws-sdk-go-v2 v1.42.0 h1:XvXMJTkFQtpBKIWZnmr9ZEOc2InWM2yldjXEJ/bymhA=
github.com/aws/aws-sdk-go-v2 v1.42.0/go.mod h1:27+ACypSLljLAEKsCYOmrjKh83vuTRkuAe9Uv/3A4bg=
github.com/aws/aws-sdk-go-v2 v1.42.1 h1:9eOTgu1z/dVtYpNZ3/8/XbbaX0x/BqE3HUzAzs6K0ek=
github.com/aws/aws-sdk-go-v2 v1.42.1/go.mod h1:5pKeft2eJj+gElQ38Jqg4ibCqh+/AK33/0X3hip7IjM=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7 h1:lL7IfaFzngfx0ZwUGOZdsFFnQ5uLvR0hWqqhyE7Q9M8=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.7/go.mod h1:QraP0UcVlQJsmHfioCrveWOC1nbiWUl3ej08h4mXWoc=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13 h1:p1BBrg/Hhp6uK7zpejeI8QFXHJeC/mynzi04Sl03k9g=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.13/go.mod h1:8cIfkE9MDhkRZGpQ22aV6/lkYeYSozpz16Smrs5x4Ls=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14 h1:3IZY0XAJquT3aHzbkHfPzy4ACPcEjVG0x87KOwtpqGY=
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14/go.mod h1:zwM6veDkhGgQFqkBy+uT28AAYpLu+uFMlPl+rCg/73E=
github.com/aws/aws-sdk-go-v2/config v1.28.10 h1:fKODZHfqQu06pCzR69KJ3GuttraRJkhlC8g80RZ0Dfg=
github.com/aws/aws-sdk-go-v2/config v1.28.10/go.mod h1:PvdxRYZ5Um9QMq9PQ0zHHNdtKK+he2NHtFCUFMXWXeg=
github.com/aws/aws-sdk-go-v2/config v1.32.25 h1:ACCejvStYoilgwrfegSt5ZntCbPrk52qfwyNcnl3omM=
github.com/aws/aws-sdk-go-v2/config v1.32.25/go.mod h1:LJyU8sDRbXUxFn8xMJIGP+v9QYYwveNLI8a/giAOiAs=
github.com/aws/aws-sdk-go-v2/config v1.32.29 h1:BcMHHnpiWKogf+gGfpj3K1w+Sktz29XDo/cPSAPO3FU=
github.com/aws/aws-sdk-go-v2/config v1.32.29/go.mod h1:+Kbhn8Es4kPUph3F/0W7avykytc+Jh2Ld9/msv9ljV4=
github.com/aws/aws-sdk-go-v2/config v1.32.30 h1:XwsEzpTJfQYJbFicz/QMLwAZdyeNVVoOEkbF7R3gPJk=
github.com/aws/aws-sdk-go-v2/config v1.32.30/go.mod h1:Ud32SuMc+/9BGxfpSVld7HrE2o05JwKmXY4M3jOQNZU=
github.com/aws/aws-sdk-go-v2/credentials v1.17.51 h1:F/9Sm6Y6k4LqDesZDPJCLxQGXNNHd/ZtJiWd0lCZKRk=
github.com/aws/aws-sdk-go-v2/credentials v1.17.51/go.mod h1:TKbzCHm43AoPyA+iLGGcruXd4AFhF8tOmLex2R9jWNQ=
github.com/aws/aws-sdk-go-v2/credentials v1.19.24 h1:2hQqYCV9yqyePQ9o6dCrZc/zO8U3TwPr9mIKlZnPu/I=
github.com/aws/aws-sdk-go-v2/credentials v1.19.24/go.mod h1:IDwpACtwqHLISdzfwUUNq4P9DsB/h5BLg4FwJPNfqFY=
github.com/aws/aws-sdk-go-v2/credentials v1.19.28 h1:zTXJSsNcoO91/mTXsZoYf0AK8dvNPiA58/VtyGXR+wM=
github.com/aws/aws-sdk-go-v2/credentials v1.19.28/go.mod h1:Kd9E0JzDBW/q1xbsHFrev/GnbAf5J0Ng8xoyc7HZ91Q=
github.com/aws/aws-sdk-go-v2/credentials v1.19.29 h1:WHZGssHH887cO0ox07SIQZsFx3MKD4ps6w0xUEmnKYQ=
github.com/aws/aws-sdk-go-v2/credentials v1.19.29/go.mod h1:Mhl0xR6zjguiuj00XRx2wMx22sAltk7oya39sT7fdg8=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.23 h1:IBAoD/1d8A8/1aA8g4MBVtTRHhXRiNAgwdbo/xRM2DI=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.23/go.mod h1:vfENuCM7dofkgKpYzuzf1VT1UKkA/YL3qanfBn7HCaA=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29 h1:r6qZHbT+wxgWO/e9vYNUEtg7lv5+UN3pRqKhLXvnArg=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.29/go.mod h1:QRnaRcTVGKPGRy8w78HMQtKUGRYcnMZAANATkeVA6Mo=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.30 h1:/hi1JADLEW9YYryEz1w4GQu0EtP23pP553Cf9KgsDV4=
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.30/go.mod h1:/3AOgy4K17Dm4ucMZVC/MJkzy5kmfKUcINRHZyo0koQ=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.27 h1:jSJjSBzw8VDIbWv+mmvBSP8ezsztMYJGH+eKqi9AmNs=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.27/go.mod h1:/DAhLbFRgwhmvJdOfSm+WwikZrCuUJiA4WgJG0fTNSw=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29 h1:f3vKqSo13fhTYb+JEcXwXefZQE26I1FB5eTSniU67ko=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.29/go.mod h1:MzoLFUArKGpGD+ukmPiTPG1X5x4o6M2kq4v2dr1FiEc=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.30 h1:xM/Is9cKMHa8Jj8zkvWhvrFkZsXJV9E+BB4g0HW0duQ=
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.30/go.mod h1:WueJeNDZvK1fMYEWJIkcivBfEzUkTpBhzlrUKKY8EuA=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.27 h1:l+X4K77Dui85pIj5foXDhPlnqcNRG2QUyvca300lXh8=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.27/go.mod h1:KvZXSFEXm6x84yE8qffKvT3x8J5clWnVFXphpohhzJ8=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29 h1:RdwIf/CuUsvJX3RgJagbOyotl/cxoLY4xviKuE7p2GY=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.29/go.mod h1:71wt8W2EgswdZy9Mf9KNnzxZ3TiZlv4caKghPktDOkA=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.30 h1:jn46zC9LdsVR/ZpMIJqMqb8hHv31BlLx3ulVqNspUOk=
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.30/go.mod h1:1hTMsAgbdS/AtUi4bw8+gUuh1pceo+eXRLfpSuSQj3M=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc=
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.6 h1:qYQ4pzQ2Oz6WpQ8T3HvGHnZydA72MnLuFK9tJwmrbHw=
@@ -60,78 +40,46 @@ github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.27 h1:AmB5QxnD+fBFrg9LcqzkgF/CaYv
github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.27/go.mod h1:Sai7P3xTiyv9ZUYO3IFxMnmiIP759/67iQbU4kdmkyU=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30 h1:VTGy885W5DKBxWRUJbym9hytNaYzsyaPkCHGRRMAOhU=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.30/go.mod h1:AS0HycUvJRFvTt613AYDOgO2jzw+00cVSMny8XB3yMY=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.31 h1:3GUprIsfmGcC5SACIyB0e7E0BM1O1b3Erl5CePYIAeQ=
github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.31/go.mod h1:7PuV1yl5e2xnUbm+RqvVg5i2iBM8EyijZNoI9wsOoOc=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1 h1:iXtILhvDxB6kPvEXgsDhGaZCSC6LQET5ZHSdJozeI0Y=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.1/go.mod h1:9nu0fVANtYiAePIBh2/pFUSwtJ402hLnp854CNoDOeE=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12 h1:ZD2+BSw9vFsNlKYIasSNt3uDbjqqXIBcM13UJv/Lx2k=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.12/go.mod h1:Ms4zlcVBbXbiP7EVLhl+lgjvA/a7YphqQ3Ih3174EmI=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.13 h1:mbRIur/BiHK6SKPjoBIXSE/hJ6g6JGRLuxQy1jGjlN4=
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.13/go.mod h1:ITg9em2KbJx1s0y4aqRX5OYWG6HBZ5TVR//OdpEZ2CQ=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.8 h1:iwYS40JnrBeA9e9aI5S6KKN4EB2zR4iUVYN0nwVivz4=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.4.8/go.mod h1:Fm9Mi+ApqmFiknZtGpohVcBGvpTu542VC4XO9YudRi0=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22 h1:V51LGlOq/1VsDsHUdoklAQi7rMmx4qQubvFYAlP2254=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.22/go.mod h1:4Pzhyz8hJOm2bepgl+NjvRx8vlUFAIIvJnZ/MkcNPpU=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23 h1:9Fjh6fi/U5JEStVZijmaMpUwE/gvBJj7x2B/PjbO9To=
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23/go.mod h1:iMoT2f1tClxrWAAnKCXjZQ6LOmfLrMG14wmnWpM+F14=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.8 h1:cWno7lefSH6Pp+mSznagKCgfDGeZRin66UvYUqAkyeA=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.8/go.mod h1:tPD+VjU3ABTBoEJ3nctu5Nyg4P4yjqSH5bJGGkY4+XE=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29 h1:DRebniUGZ2MqiiIVmQJ04vIXr918hubdHMnarSLEWyU=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.29/go.mod h1:LfRkPCD8YHDM2E5eTkos2UpwYeZnBcVarTa8L59bJHA=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.30 h1:/Z5jmNrKsSD7EmDjzAPsm/3L9IuOkzaynklJZ1qX7S4=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.30/go.mod h1:lEzEZnOosE7zi8Z6royW1cFJTD9fpab4Ul1SBrllewk=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.8 h1:/Mn7gTedG86nbpjT4QEKsN1D/fThiYe1qvq7WsBGNHg=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.8/go.mod h1:Ae3va9LPmvjj231ukHB6UeT8nS7wTPfC3tMZSZMwNYg=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29 h1:hiME6pBzC7OTl9LMtlyTWBuEl1f4QBcUmFDKC7MLXtc=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.29/go.mod h1:G7RP+uhagpKtKhd1BM9N6JQqjCcGEU47K5lBVZQyRQw=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31 h1:uao4A3QZ5UmB326V6KF+qRpv9Tjz7IlnlnTbbANntlU=
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31/go.mod h1:I/1+z0VwL1GhQyLgkoHDlygpUZ+iTAwOQ/NsftiUL2I=
github.com/aws/aws-sdk-go-v2/service/s3 v1.72.2 h1:a7aQ3RW+ug4IbhoQp29NZdc7vqrzKZZfWZSaQAXOZvQ=
github.com/aws/aws-sdk-go-v2/service/s3 v1.72.2/go.mod h1:xMekrnhmJ5aqmyxtmALs7mlvXw5xRh+eYjOjvrIIFJ4=
github.com/aws/aws-sdk-go-v2/service/s3 v1.103.3 h1:JRseEu/vIDMaWis4bSw0QbXL+cvIGc1XnX076H5ZXLE=
github.com/aws/aws-sdk-go-v2/service/s3 v1.103.3/go.mod h1:77ZAgynvx1txMvDG8gGWoWkO1augYDxkp9JElWFgjQU=
github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0 h1:XptwLL+UHXgafYMIHTy59IRovLbhz3znkxY2uS/pbXU=
github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0/go.mod h1:zdmCoFO/dSI7GlrwsPqFJI+WlFnSU4Tc8TJnlXrM1Do=
github.com/aws/aws-sdk-go-v2/service/s3 v1.105.1 h1:LkBKxAOE5WXjlFuFZqPG1rREnl6I6QCMElcXFDEidos=
github.com/aws/aws-sdk-go-v2/service/s3 v1.105.1/go.mod h1:zdmCoFO/dSI7GlrwsPqFJI+WlFnSU4Tc8TJnlXrM1Do=
github.com/aws/aws-sdk-go-v2/service/signin v1.2.0 h1:3nXpRcFwRCW8n7HgO2QGy0Dc20eQNfBuUemGQhpF8m8=
github.com/aws/aws-sdk-go-v2/service/signin v1.2.0/go.mod h1:LxYujSTLPRlp2vTtcUO/+1ilrew8ytt6SvQyOgejzFQ=
github.com/aws/aws-sdk-go-v2/service/signin v1.4.0 h1:sLzmJGCMv+C8KqiJgEqDLB6vxaJGmobRh4rr//ZpA3w=
github.com/aws/aws-sdk-go-v2/service/signin v1.4.0/go.mod h1:mxC0nT/C8wMMS97DemZPzvUZxvIt+2Iq+eS3JdFZGgg=
github.com/aws/aws-sdk-go-v2/service/signin v1.4.1 h1:V7ZZ300WPXGjvkyore5DGe0ljVPOxCXie/thWdtSBXE=
github.com/aws/aws-sdk-go-v2/service/signin v1.4.1/go.mod h1:mxC0nT/C8wMMS97DemZPzvUZxvIt+2Iq+eS3JdFZGgg=
github.com/aws/aws-sdk-go-v2/service/sso v1.24.9 h1:YqtxripbjWb2QLyzRK9pByfEDvgg95gpC2AyDq4hFE8=
github.com/aws/aws-sdk-go-v2/service/sso v1.24.9/go.mod h1:lV8iQpg6OLOfBnqbGMBKYjilBlf633qwHnBEiMSPoHY=
github.com/aws/aws-sdk-go-v2/service/sso v1.31.3 h1:ey1XLTYXb9PcLt4535632o5kCGXNXEhNb620Dqwuylo=
github.com/aws/aws-sdk-go-v2/service/sso v1.31.3/go.mod h1:Lk7PlmoTYryQmyBG0EXqj5BcUbj3whXdU2s3yGI3EAc=
github.com/aws/aws-sdk-go-v2/service/sso v1.32.0 h1:qjMmry/cBDee1E/2gyvel0uRYCi3mwRZ2hf6N+GAodo=
github.com/aws/aws-sdk-go-v2/service/sso v1.32.0/go.mod h1:u8af9Nqkmqnr96f7v9nHqzZT9XBwbXEkTiqT4ROuJSE=
github.com/aws/aws-sdk-go-v2/service/sso v1.32.1 h1:gYFYh4iLLcAOJRLNPY2aD2g9DIhKn4eof8UkIrr1rTk=
github.com/aws/aws-sdk-go-v2/service/sso v1.32.1/go.mod h1:u8af9Nqkmqnr96f7v9nHqzZT9XBwbXEkTiqT4ROuJSE=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.8 h1:6dBT1Lz8fK11m22R+AqfRsFn8320K0T5DTGxxOQBSMw=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.8/go.mod h1:/kiBvRQXBc6xeJTYzhSdGvJ5vm1tjaDEjH+MSeRJnlY=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6 h1:yLr03zQE/5Eu5l3QU0Si+xMbLMbSDF2YXsigqXngs6g=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.36.6/go.mod h1:Q5N6icH+KJZDLh+ESNwzdv6cZ6vLFF/egy3IOxWhmz4=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.37.0 h1:fpOlDPI55HdszaxapEGk6HsGosOUaM2YPWJpjMgp8UI=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.37.0/go.mod h1:DMPWJBjYs6+3+f/qhBFEFPPlQ6NlhWjai3dJNvipJ84=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.37.1 h1:arjT9Cm3/WYbGmD5TUZHk4UQn4Lle1fUNZs5FC6CtF0=
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.37.1/go.mod h1:DMPWJBjYs6+3+f/qhBFEFPPlQ6NlhWjai3dJNvipJ84=
github.com/aws/aws-sdk-go-v2/service/sts v1.33.6 h1:VwhTrsTuVn52an4mXx29PqRzs2Dvu921NpGk7y43tAM=
github.com/aws/aws-sdk-go-v2/service/sts v1.33.6/go.mod h1:+8h7PZb3yY5ftmVLD7ocEoE98hdc8PoKS0H3wfx1dlc=
github.com/aws/aws-sdk-go-v2/service/sts v1.43.3 h1:VrIhKRCSK1umelSgB9RghvA9RTUYeQffyAS5ApXehNI=
github.com/aws/aws-sdk-go-v2/service/sts v1.43.3/go.mod h1:r8wkDOuLaaMFqFiYAb8dGY2A3gJCOujMc6CFOVC4Zhc=
github.com/aws/aws-sdk-go-v2/service/sts v1.44.0 h1:bLZ0PolJ8J+HkJHztcXORUpHXBye2U8298lCEMi6ZCU=
github.com/aws/aws-sdk-go-v2/service/sts v1.44.0/go.mod h1:9gdl4RrflIdpDb2TlXshWgR1F9TeCkvqDx77Vpr4Z/Q=
github.com/aws/aws-sdk-go-v2/service/sts v1.44.1 h1:RvfHDg+xvAeZ+5741vUEjpOVtYSIm93W2zhx10Xtydw=
github.com/aws/aws-sdk-go-v2/service/sts v1.44.1/go.mod h1:9gdl4RrflIdpDb2TlXshWgR1F9TeCkvqDx77Vpr4Z/Q=
github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro=
github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg=
github.com/aws/smithy-go v1.27.1 h1:4T340VFndXtADGF52gYa1POyL7s9E4Z1OeZ1hCscIw8=
github.com/aws/smithy-go v1.27.1/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
github.com/aws/smithy-go v1.27.2 h1:y9NPmSE6am6LjEFPfqHqG/jJk7AauQvhCJONKh7kpzk=
github.com/aws/smithy-go v1.27.2/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
github.com/aws/smithy-go v1.27.3 h1:F3Zb497UhhskkfpJmfkXswyo+t0sh9OTBnIHjogWbVY=
github.com/aws/smithy-go v1.27.3/go.mod h1:YE2RhdIuDbA5E5bTdciG9KrW3+TiEONeUWCqxX9i1Fc=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cncf/xds/go v0.0.0-20260202195803-dba9d589def2 h1:aBangftG7EVZoUb69Os8IaYg++6uMOdKK83QtkkvJik=
@@ -173,8 +121,6 @@ go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ
go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y=
go.opentelemetry.io/contrib/detectors/gcp v1.42.0 h1:kpt2PEJuOuqYkPcktfJqWWDjTEd/FNgrxcniL7kQrXQ=
go.opentelemetry.io/contrib/detectors/gcp v1.42.0/go.mod h1:W9zQ439utxymRrXsUOzZbFX4JhLxXU4+ZnCt8GG7yA8=
go.opentelemetry.io/contrib/detectors/gcp v1.43.0 h1:62yY3dT7/ShwOxzA0RsKRgshBmfElKI4d/Myu2OxDFU=
go.opentelemetry.io/contrib/detectors/gcp v1.43.0/go.mod h1:RyaZMFY7yi1kAs45S6mbFGz8O8rqB0dTY14uzvG4LCs=
go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I=
go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0=
go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM=
@@ -203,8 +149,6 @@ golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw=
golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/term v0.44.0 h1:0rLvDRCtNj0gZkyIXhCyOb2OAzEhLVqc4B+hrsBhrmc=
golang.org/x/term v0.44.0/go.mod h1:7ze4MdzUzLXpSAoFP1H0bOI9aXDqveSvatT5vKcFh2Y=
golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
@@ -230,8 +174,6 @@ google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg=
google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec=
google.golang.org/grpc v1.81.1 h1:VnnIIZ88UzOOKLukQi+ImGz8O1Wdp8nAGGnvOfEIWQQ=
google.golang.org/grpc v1.81.1/go.mod h1:xGH9GfzOyMTGIOXBJmXt+BX/V0kcdQbdcuwQ/zNw42I=
google.golang.org/grpc v1.82.0 h1:vguDnZUPjE26w09A63VoxZPnvPjB5Riyc0mkXPFmAIU=
google.golang.org/grpc v1.82.0/go.mod h1:yzTZ1TB1Z3SG+LIYaI+WiE8D5+PZ3ArnrSp8zF3+/ZA=
google.golang.org/protobuf v1.26.0-rc.1 h1:7QnIQpGRHE5RnLKnESfDoxm2dTapTZua5a0kS0A+VXQ=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU=
+130 -292
View File
@@ -4,9 +4,9 @@
"com.amazonaws:aws-lambda-java-core": -179547809,
"com.amazonaws:aws-lambda-java-events": -1998571449,
"com.google.android:annotations": 1910180409,
"com.google.api.grpc:proto-google-common-protos": 391189699,
"com.google.auth:google-auth-library-credentials": 43407369,
"com.google.auth:google-auth-library-oauth2-http": 1085819179,
"com.google.api.grpc:proto-google-common-protos": -2106826238,
"com.google.auth:google-auth-library-credentials": 1149797254,
"com.google.auth:google-auth-library-oauth2-http": -2102758232,
"com.google.auto.value:auto-value": 1146221104,
"com.google.auto.value:auto-value-annotations": -1101276935,
"com.google.code.findbugs:jsr305": 495355163,
@@ -25,11 +25,11 @@
"com.squareup.okio:okio": 795722926,
"com.thesamet.scalapb:compilerplugin_3": 603908795,
"com.thesamet.scalapb:lenses_3": -1873974815,
"com.thesamet.scalapb:protoc-bridge_3": -1482619205,
"com.thesamet.scalapb:protoc-bridge_3": -1260006911,
"com.thesamet.scalapb:scalapb-json4s_3": -772830803,
"com.thesamet.scalapb:scalapb-runtime-grpc_3": -2026114331,
"com.thesamet.scalapb:scalapb-runtime_3": -1281968352,
"com.zaxxer:HikariCP": 1991920386,
"com.zaxxer:HikariCP": 1858991878,
"io.netty:netty-buffer": 732437843,
"io.netty:netty-codec": -1199307927,
"io.netty:netty-codec-http": -1456497900,
@@ -39,27 +39,26 @@
"io.netty:netty-handler": -1970529483,
"io.netty:netty-handler-proxy": -195328652,
"io.netty:netty-resolver": -548277043,
"io.netty:netty-tcnative-boringssl-static": -754344644,
"io.netty:netty-tcnative-classes": -763641772,
"io.netty:netty-tcnative-boringssl-static": 2033070843,
"io.netty:netty-tcnative-classes": 2023773715,
"io.netty:netty-transport": -1962486730,
"io.netty:netty-transport-native-epoll": 833393060,
"io.netty:netty-transport-native-unix-common": 1230419987,
"io.netty:netty-transport-native-epoll": -1215800119,
"io.netty:netty-transport-native-unix-common": -818773192,
"io.opencensus:opencensus-api": 2042364617,
"io.opencensus:opencensus-contrib-grpc-metrics": 317094357,
"io.perfmark:perfmark-api": 1019157794,
"io.sentry:sentry": -511720268,
"io.sentry:sentry": 563160305,
"javax.xml.bind:jaxb-api": -1735500680,
"junit:junit": -744267592,
"org.checkerframework:checker-qual": -819031361,
"org.codehaus.mojo:animal-sniffer-annotations": 852823480,
"org.codehaus.mojo:animal-sniffer-annotations": -1634689353,
"org.json4s:json4s-ast_3": 687176866,
"org.json4s:json4s-core_3": 977579605,
"org.json4s:json4s-native_3": -123383795,
"org.mockito:mockito-core": -1925148636,
"org.postgresql:postgresql": -1283293677,
"org.postgresql:postgresql": -1963352047,
"org.reactivestreams:reactive-streams": 509083534,
"org.scala-lang:scala3-staging_3": -360398695,
"org.scalameta:scalafmt-cli_2.13": 923201552,
"org.scalameta:scalafmt-cli_2.13": 243143182,
"org.scalamock:scalamock_3": -1047317697,
"org.slf4j:slf4j-api": -2005163028,
"org.slf4j:slf4j-simple": 1999565066,
@@ -86,8 +85,8 @@
"com.google.android:annotations": 769933135,
"com.google.api.grpc:proto-google-common-protos": 1506674904,
"com.google.api:api-common": 1729001290,
"com.google.auth:google-auth-library-credentials": -426926107,
"com.google.auth:google-auth-library-oauth2-http": -307063036,
"com.google.auth:google-auth-library-credentials": 563614471,
"com.google.auth:google-auth-library-oauth2-http": -1252786723,
"com.google.auto.value:auto-value": -1399392164,
"com.google.auto.value:auto-value-annotations": 1092025564,
"com.google.code.findbugs:jsr305": -1038659426,
@@ -96,8 +95,8 @@
"com.google.guava:failureaccess": -56291903,
"com.google.guava:guava": 2119270017,
"com.google.guava:listenablefuture": 1588902908,
"com.google.http-client:google-http-client": -174274814,
"com.google.http-client:google-http-client-gson": 1658743026,
"com.google.http-client:google-http-client": 1756875461,
"com.google.http-client:google-http-client-gson": 1267916085,
"com.google.j2objc:j2objc-annotations": -2074422376,
"com.google.protobuf:protobuf-java": -1065767575,
"com.google.re2j:re2j": -461460138,
@@ -111,15 +110,15 @@
"com.squareup.okhttp:okhttp": -1936180231,
"com.squareup.okio:okio": 1978550531,
"com.squareup.okio:okio-jvm": -1730532943,
"com.thesamet.scalapb:compilerplugin_3": -986481869,
"com.thesamet.scalapb:lenses_3": 1632980089,
"com.thesamet.scalapb:protoc-bridge_3": -1510160103,
"com.thesamet.scalapb:protoc-gen_3": 36781197,
"com.thesamet.scalapb:scalapb-json4s_3": 1449885529,
"com.thesamet.scalapb:scalapb-runtime-grpc_3": 1266714255,
"com.thesamet.scalapb:scalapb-runtime_3": 318411326,
"com.typesafe:config": 1779132647,
"com.zaxxer:HikariCP": 337938184,
"com.thesamet.scalapb:compilerplugin_3": -1073075945,
"com.thesamet.scalapb:lenses_3": 791427023,
"com.thesamet.scalapb:protoc-bridge_3": -1984150046,
"com.thesamet.scalapb:protoc-gen_3": 1860775213,
"com.thesamet.scalapb:scalapb-json4s_3": 1579843487,
"com.thesamet.scalapb:scalapb-runtime-grpc_3": 97373115,
"com.thesamet.scalapb:scalapb-runtime_3": 818778125,
"com.typesafe:config": -1791448454,
"com.zaxxer:HikariCP": -704610647,
"commons-codec:commons-codec": 1377992676,
"commons-io:commons-io": 669567296,
"dev.dirs:directories": 1716880629,
@@ -150,30 +149,28 @@
"io.netty:netty-handler": 1617793819,
"io.netty:netty-handler-proxy": 1503431664,
"io.netty:netty-resolver": -533324791,
"io.netty:netty-tcnative-boringssl-static": 1274713091,
"io.netty:netty-tcnative-boringssl-static:jar:linux-aarch_64": 423479165,
"io.netty:netty-tcnative-boringssl-static:jar:linux-x86_64": 1509601219,
"io.netty:netty-tcnative-boringssl-static:jar:osx-aarch_64": -1452923369,
"io.netty:netty-tcnative-boringssl-static:jar:osx-x86_64": -1682600003,
"io.netty:netty-tcnative-boringssl-static:jar:windows-x86_64": 741676114,
"io.netty:netty-tcnative-classes": -2096215842,
"io.netty:netty-tcnative-boringssl-static": -1922162184,
"io.netty:netty-tcnative-boringssl-static:jar:linux-aarch_64": -310918884,
"io.netty:netty-tcnative-boringssl-static:jar:linux-x86_64": 1582797105,
"io.netty:netty-tcnative-boringssl-static:jar:osx-aarch_64": -1315559501,
"io.netty:netty-tcnative-boringssl-static:jar:osx-x86_64": -95251834,
"io.netty:netty-tcnative-boringssl-static:jar:windows-x86_64": -1202154110,
"io.netty:netty-tcnative-classes": -1020773440,
"io.netty:netty-transport": -1390736500,
"io.netty:netty-transport-classes-epoll": 704589083,
"io.netty:netty-transport-native-epoll:jar:linux-x86_64": -933296886,
"io.netty:netty-transport-native-epoll:jar:linux-x86_64": -2050990961,
"io.netty:netty-transport-native-unix-common": -2090924105,
"io.opencensus:opencensus-api": -1002511030,
"io.opencensus:opencensus-contrib-grpc-metrics": -1797408624,
"io.opencensus:opencensus-contrib-http-util": -541858674,
"io.perfmark:perfmark-api": -752483303,
"io.sentry:sentry": -1910119764,
"io.sentry:sentry": 1564972879,
"javax.activation:javax.activation-api": -217704356,
"javax.annotation:javax.annotation-api": 193132517,
"javax.inject:javax.inject": -1284481446,
"javax.xml.bind:jaxb-api": 1600326587,
"joda-time:joda-time": 230482511,
"junit:junit": 712711302,
"net.bytebuddy:byte-buddy": 105401824,
"net.bytebuddy:byte-buddy-agent": -1761476423,
"net.java.dev.jna:jna": 943627808,
"net.java.dev.jna:jna-platform": 1004830334,
"org.apache.commons:commons-compress": -308222379,
@@ -184,7 +181,7 @@
"org.apache.httpcomponents:httpclient": -504016800,
"org.apache.httpcomponents:httpcore": -353060362,
"org.apache.xbean:xbean-reflect": -1764161877,
"org.checkerframework:checker-qual": 1032417002,
"org.checkerframework:checker-qual": -53559553,
"org.codehaus.mojo:animal-sniffer-annotations": -1570976252,
"org.codehaus.plexus:plexus-archiver": 766678324,
"org.codehaus.plexus:plexus-classworlds": -543968237,
@@ -197,47 +194,45 @@
"org.jetbrains.kotlin:kotlin-stdlib-common": 11605,
"org.jetbrains:annotations": 116138949,
"org.jline:jline:jar:jdk8": -1133032957,
"org.json4s:json4s-ast_3": 218697247,
"org.json4s:json4s-core_3": 888852031,
"org.json4s:json4s-jackson-core_3": -1708586056,
"org.json4s:json4s-native-core_3": -1556364554,
"org.json4s:json4s-native_3": 1810593063,
"org.json4s:json4s-ast_3": 689482233,
"org.json4s:json4s-core_3": 481951064,
"org.json4s:json4s-jackson-core_3": 813804735,
"org.json4s:json4s-native-core_3": -289663551,
"org.json4s:json4s-native_3": -2093359247,
"org.jspecify:jspecify": -1402924792,
"org.mockito:mockito-core": 534163387,
"org.objenesis:objenesis": 684097820,
"org.ow2.asm:asm": 1177470613,
"org.postgresql:postgresql": -1200274402,
"org.postgresql:postgresql": -570711868,
"org.reactivestreams:reactive-streams": -1996658890,
"org.scala-lang.modules:scala-collection-compat_2.13": -2012838353,
"org.scala-lang.modules:scala-collection-compat_3": 2001700859,
"org.scala-lang.modules:scala-collection-compat_3": -915569507,
"org.scala-lang.modules:scala-xml_2.13": -1867291781,
"org.scala-lang:scala-compiler": 993782407,
"org.scala-lang:scala-library": -479379026,
"org.scala-lang:scala-reflect": 2030778053,
"org.scala-lang:scala3-library_3": -1714704820,
"org.scala-lang:scala3-library_3": -340570223,
"org.scala-lang:scala3-staging_3": 1767551804,
"org.scalameta:common2_2.13": 1775009973,
"org.scalameta:common_2.13": -1607493593,
"org.scalameta:io_2.13": 1529358668,
"org.scalameta:common2_2.13": 183869992,
"org.scalameta:common_2.13": 1613859331,
"org.scalameta:io_2.13": 1078868274,
"org.scalameta:mdoc-parser_2.13": 1998129208,
"org.scalameta:metaconfig-core_2.13": 1560822216,
"org.scalameta:metaconfig-pprint_2.13": -13676725,
"org.scalameta:metaconfig-typesafe-config_2.13": 389481839,
"org.scalameta:munit-diff_2.13": 667211464,
"org.scalameta:parsers_2.13": -732548017,
"org.scalameta:scalafmt-cli_2.13": -872730967,
"org.scalameta:scalafmt-config_2.13": -1220516276,
"org.scalameta:scalafmt-core_2.13": -518465330,
"org.scalameta:scalafmt-dynamic-core_2.13": 1088145997,
"org.scalameta:scalafmt-dynamic_2.13": -193332653,
"org.scalameta:scalafmt-interfaces": 2029532209,
"org.scalameta:scalafmt-macros_2.13": 1019057318,
"org.scalameta:scalafmt-sysops_2.13": -919350628,
"org.scalameta:scalameta_2.13": 494629884,
"org.scalameta:metaconfig-typesafe-config_2.13": -1923428474,
"org.scalameta:munit-diff_2.13": 612923316,
"org.scalameta:parsers_2.13": -2012847908,
"org.scalameta:scalafmt-cli_2.13": -788023559,
"org.scalameta:scalafmt-config_2.13": 761717294,
"org.scalameta:scalafmt-core_2.13": 1878102965,
"org.scalameta:scalafmt-dynamic-core_2.13": -1900839476,
"org.scalameta:scalafmt-dynamic_2.13": 860328364,
"org.scalameta:scalafmt-interfaces": 651108583,
"org.scalameta:scalafmt-macros_2.13": -1771055183,
"org.scalameta:scalafmt-sysops_2.13": -1263777532,
"org.scalameta:scalameta_2.13": -428808011,
"org.scalameta:svm-subs": -181782616,
"org.scalameta:trees2_2.13": 1085082114,
"org.scalameta:trees_2.13": -1981634150,
"org.scalamock:scalamock_3": 23905729,
"org.scalameta:trees2_2.13": -1248113756,
"org.scalameta:trees_2.13": -1233441989,
"org.scalamock:scalamock_3": -9538025,
"org.slf4j:slf4j-api": -1249720338,
"org.slf4j:slf4j-simple": -1378006603,
"org.tukaani:xz": -1726944826,
@@ -279,11 +274,12 @@
"software.amazon.eventstream:eventstream": 1951806649
},
"conflict_resolution": {
"com.google.api.grpc:proto-google-common-protos:2.63.1": "com.google.api.grpc:proto-google-common-protos:2.64.1",
"com.google.guava:failureaccess:1.0.1": "com.google.guava:failureaccess:1.0.3",
"com.google.j2objc:j2objc-annotations:2.8": "com.google.j2objc:j2objc-annotations:3.1",
"io.netty:netty-transport-native-unix-common:4.1.133.Final": "io.netty:netty-transport-native-unix-common:4.1.135.Final",
"io.netty:netty-transport-native-unix-common:4.1.127.Final": "io.netty:netty-transport-native-unix-common:4.1.135.Final",
"io.opencensus:opencensus-api:0.31.0": "io.opencensus:opencensus-api:0.31.1",
"org.checkerframework:checker-qual:3.49.5": "org.checkerframework:checker-qual:3.55.1"
"org.codehaus.mojo:animal-sniffer-annotations:1.26": "org.codehaus.mojo:animal-sniffer-annotations:1.27"
},
"artifacts": {
"com.amazonaws:aws-lambda-java-core": {
@@ -360,15 +356,15 @@
},
"com.google.auth:google-auth-library-credentials": {
"shasums": {
"jar": "d29934610c3e9eb6c60e95ad05ca34ce486c3867c2f3689548b4aa2c2dd6ec52"
"jar": "dd7e39b8f5c366b09f8c2d400b7b63c925499df813b0f0d78044abd72098e159"
},
"version": "1.42.1"
"version": "1.40.0"
},
"com.google.auth:google-auth-library-oauth2-http": {
"shasums": {
"jar": "fb54ada3c0223ffb4470fb6d8fbd55f764588dbd244dc7c05caaf4ab62977898"
"jar": "67fe2c9df9780d8725c1dff61d2ffbbcb93fdcf15e91c44a5e610a4a69afd151"
},
"version": "1.42.1"
"version": "1.40.0"
},
"com.google.auto.value:auto-value": {
"shasums": {
@@ -420,15 +416,15 @@
},
"com.google.http-client:google-http-client": {
"shasums": {
"jar": "20aa0948f6ceb5cfa9b2b3adddd9b7e990ab40230e084081642cbb81235d3eef"
"jar": "97a0666340956dbc96893bc8cf843a5b57367543f218feddad3ff433fbfdaa68"
},
"version": "2.1.0"
"version": "2.0.2"
},
"com.google.http-client:google-http-client-gson": {
"shasums": {
"jar": "3cf72c7b88375a34bf721c664f42edc8e096e2370e4126c9b8933c3c92e591f3"
"jar": "37c8fd5c7869bc4abf3b3219c7e79cb566afa745559772e969c21595199600cd"
},
"version": "2.1.0"
"version": "2.0.2"
},
"com.google.j2objc:j2objc-annotations": {
"shasums": {
@@ -522,9 +518,9 @@
},
"com.thesamet.scalapb:protoc-bridge_3": {
"shasums": {
"jar": "019cee53ec9e4eb6be0f8b72be4c9a97b56ddd780da5128a4db97af4af32e186"
"jar": "e7e2f1862f54076b6870bd034a7c16aae7b88cfee3d00b69dbb6b1175108560c"
},
"version": "0.9.10"
"version": "0.9.9"
},
"com.thesamet.scalapb:protoc-gen_3": {
"shasums": {
@@ -552,15 +548,15 @@
},
"com.typesafe:config": {
"shasums": {
"jar": "47d13e3196c84f2a8ccd014ae563738c3da5b7406b38e03505ec0601a2f4fc37"
"jar": "dd6b9fb5da5bc49d31b581703f57050e1e7d403814f62f3832181a7226b36256"
},
"version": "1.4.9"
"version": "1.4.6"
},
"com.zaxxer:HikariCP": {
"shasums": {
"jar": "2be45c641b841e81df87292e181f2c203500c5f0e9a1676f135927387f3cf40b"
"jar": "709f378c05756280939ce50fc1b1f1a53bb8e1899dc1b249f21f12703640b48b"
},
"version": "7.1.0"
"version": "6.3.3"
},
"commons-codec:commons-codec": {
"shasums": {
@@ -744,20 +740,20 @@
},
"io.netty:netty-tcnative-boringssl-static": {
"shasums": {
"jar": "ffb1fd42e5952863159f10a370e8c2dcfa3f40615ec4caefaa9ac8b1b1790233",
"linux-aarch_64": "cba3868793eb7ad32963275f32eb3e8932a3d50192557af8abd2516dab8b8956",
"linux-x86_64": "8e4bf375ae8b82fe657f54d142beb35d115d8294ec5d23a9c09afc8a93dd4928",
"osx-aarch_64": "10c6dd7eee84c099ea9e40ccbd933b501c665738d610627c5390d729fc978a47",
"osx-x86_64": "b5a5048cff2a64641cbbe9fcfffbf032ef506b4d2836c8ba9e689b3c461b24fc",
"windows-x86_64": "dee808e0dd5b4c14b4e8bd8d116dff347163b32574b2fb11a2ade476f7d03628"
"jar": "ec3b14ceff74c5d7e24a378e64074744cc5e7035c49cf6ca0a4e23dff9713d1f",
"linux-aarch_64": "11dfee82cfcb5c4f596271fe1d56a70fe77b4034e54162d0bd211623b540857f",
"linux-x86_64": "39ac6b1eb4ffc18d5fe9412cc6253a8954bafc8e3ca10109bc370490f73a3673",
"osx-aarch_64": "eef3fc7cdc5e2dc8c5cb50bae11443052bf1ee2f6e8b64378565746d1529f05e",
"osx-x86_64": "e3beaa3ebdb136569528c59aa826d771efadc0ac9db484c6c0e457fa5efd0f07",
"windows-x86_64": "5458b4b502763d49cd2e16c434312687178afac9c164cabf75c4a8bcecf7ac50"
},
"version": "2.0.75.Final"
"version": "2.0.74.Final"
},
"io.netty:netty-tcnative-classes": {
"shasums": {
"jar": "2d5a6a8be78bba7782eec385ba178b12f5bfc6837771fd3bb8c1d7cd18b6911c"
"jar": "194874cf723794dd409fd1e728cd91ffbcff0584d73b4d8a1ad0d69d04acf9b3"
},
"version": "2.0.75.Final"
"version": "2.0.74.Final"
},
"io.netty:netty-transport": {
"shasums": {
@@ -773,9 +769,9 @@
},
"io.netty:netty-transport-native-epoll": {
"shasums": {
"linux-x86_64": "fdc76fe46e7218ef54547c1002aff69c4597291cc3ef34322d6f1a2f3090c880"
"linux-x86_64": "3d03f27eea1cd23357a56a96e1eeedfeb3d74fa0ba4d5c36a862bd035056275b"
},
"version": "4.1.133.Final"
"version": "4.1.127.Final"
},
"io.netty:netty-transport-native-unix-common": {
"shasums": {
@@ -809,9 +805,9 @@
},
"io.sentry:sentry": {
"shasums": {
"jar": "a5477fab0018a68c335565c034302b12cff3b0cb56e4a0ffa5f8f47840746d83"
"jar": "8f3d16c54f013694fd987689a2b37fa6ed7767b95de79d1949a0e24a1d62cc1a"
},
"version": "8.48.0"
"version": "8.43.2"
},
"javax.activation:javax.activation-api": {
"shasums": {
@@ -849,18 +845,6 @@
},
"version": "4.13.2"
},
"net.bytebuddy:byte-buddy": {
"shasums": {
"jar": "42ba43dcccd8d9d77bfe8776a83e72b67f1fa52c4038a98629e7d288b648da4e"
},
"version": "1.12.8"
},
"net.bytebuddy:byte-buddy-agent": {
"shasums": {
"jar": "18faf4f33893c3e883a3220adfdab25d6ceff9e46b1ad760a5b6f83df9373307"
},
"version": "1.12.8"
},
"net.java.dev.jna:jna": {
"shasums": {
"jar": "0c8eb7acf67261656d79005191debaba3b6bf5dd60a43735a245429381dbecff"
@@ -923,9 +907,9 @@
},
"org.checkerframework:checker-qual": {
"shasums": {
"jar": "857658c8bdcbff794949a8d9922f88d63ee3751c203c7cd7d21ea97f9e745288"
"jar": "508c83c62c344f6f7ee28f47b88a8797d6116d043bfd1ca0576c828dd1df2880"
},
"version": "3.55.1"
"version": "3.49.5"
},
"org.codehaus.mojo:animal-sniffer-annotations": {
"shasums": {
@@ -1035,18 +1019,6 @@
},
"version": "1.0.0"
},
"org.mockito:mockito-core": {
"shasums": {
"jar": "9a5f59ad06d0bb7d0fd2d4a74eb4d66d561ee0327f0febacb7f9cfb5be4abbfb"
},
"version": "4.4.0"
},
"org.objenesis:objenesis": {
"shasums": {
"jar": "03d960bd5aef03c653eb000413ada15eb77cdd2b8e4448886edf5692805e35f3"
},
"version": "3.2"
},
"org.ow2.asm:asm": {
"shasums": {
"jar": "876eab6a83daecad5ca67eb9fcabb063c97b5aeb8cf1fca7a989ecde17522051"
@@ -1055,9 +1027,9 @@
},
"org.postgresql:postgresql": {
"shasums": {
"jar": "6e0e4cc2d8cae902084f8a2b18728b073a6fd9d1f87c9d8bff8f298c18185b93"
"jar": "1981b31d3993c58702783c1cddf10a34e48c1f413d70ff1cb6def0a143484647"
},
"version": "42.7.13"
"version": "42.7.11"
},
"org.reactivestreams:reactive-streams": {
"shasums": {
@@ -1103,9 +1075,9 @@
},
"org.scala-lang:scala3-library_3": {
"shasums": {
"jar": "2c6eace9158df8ee4485a06128a479d968c1ebfc83ae9b1a394b58429f0d1492"
"jar": "a16e046f4a9df9e0d0e0bc54bf6298c94d7d867457f7b3b68291a88c568b92d0"
},
"version": "3.3.8"
"version": "3.3.7"
},
"org.scala-lang:scala3-staging_3": {
"shasums": {
@@ -1115,21 +1087,21 @@
},
"org.scalameta:common2_2.13": {
"shasums": {
"jar": "dc17dfd2a4923f49c85bd69be85f820ba5d57f50a4425b27a8635b592a0c1471"
"jar": "42a4fae02d82dc7450dddd69ce1d8b8f159119132898af56169f77b8c9a623bd"
},
"version": "4.17.2"
"version": "4.17.0"
},
"org.scalameta:common_2.13": {
"shasums": {
"jar": "70fd266cd4e6ab3909d329ef051264865fbadeeb86b598672a65439e51cdadd6"
"jar": "3b5b1f67809daf6044113737af8aa4cc5c3b36f071950cfcf7d02f4fe6b1d19a"
},
"version": "4.17.2"
"version": "4.17.0"
},
"org.scalameta:io_2.13": {
"shasums": {
"jar": "5e6edc6b5aa96a595382ffb9e4cd55a6cb302064d388db7fa2168334fd1cb90e"
"jar": "d09dac9887efb0aaf7bbcc5b5e20f7e7e4947800592a44359e2f31b2b6c9699d"
},
"version": "4.17.2"
"version": "4.17.0"
},
"org.scalameta:mdoc-parser_2.13": {
"shasums": {
@@ -1157,69 +1129,69 @@
},
"org.scalameta:munit-diff_2.13": {
"shasums": {
"jar": "79d52c3007ae90ee2c6e156e3b2a5c0cfeb5a0dd67e570a36cb9a9e84f6e1521"
"jar": "789f02dfc17e62626560d48522d16bc550990a4d722d27b38d215a39dd8c9a5d"
},
"version": "1.3.4"
"version": "1.3.0"
},
"org.scalameta:parsers_2.13": {
"shasums": {
"jar": "c789f3cb81b93ddc8d46cf8b36dfd40715d52fe3c1ef2cb4f14bd4b1fc8543be"
"jar": "c0669f252bf96db52ac32c92bf54f2853b8f192287a827626c3efe51b20f94b3"
},
"version": "4.17.2"
"version": "4.17.0"
},
"org.scalameta:scalafmt-cli_2.13": {
"shasums": {
"jar": "da5379c790d39a52e4c059eba04fdb0e97402d6eb9b5318b9370c7b2f9c08318"
"jar": "1da5a56393f5fcf01d65c86ca91adc5f8d5448447a75bf9d8b229db5a0a84009"
},
"version": "3.11.3"
"version": "3.11.1"
},
"org.scalameta:scalafmt-config_2.13": {
"shasums": {
"jar": "4cb7fd5ac2768203e5ea09e7670d3a5012f5176a573ccf6a92114fcb79f55ab5"
"jar": "c058aefc9f874c78072fca15a25e72a4d3ab31bc2872266c42cc6e2651f6cbf1"
},
"version": "3.11.3"
"version": "3.11.1"
},
"org.scalameta:scalafmt-core_2.13": {
"shasums": {
"jar": "dd176a03c2716223977e8c0cd29cef4b7b7dc0a4e3102a8a9bc70bae6e917751"
"jar": "f5f0e48927f0d5a32763f6b82a8427b40231db65a908c48b4438b000562c32d2"
},
"version": "3.11.3"
"version": "3.11.1"
},
"org.scalameta:scalafmt-dynamic-core_2.13": {
"shasums": {
"jar": "3c38c49a717f1be67757d1192707ec38442fc84014408010bde746db94bca92a"
"jar": "d4efc029f83f7c3ac6f3374b33636c3d38ef24bbb4d04ba300996d0e63991f2b"
},
"version": "3.11.3"
"version": "3.11.1"
},
"org.scalameta:scalafmt-dynamic_2.13": {
"shasums": {
"jar": "f78b5eb890132266ae0ab0ff05f57caaf07d53d206b6528e9a5a868d14917591"
"jar": "101275030c12c0cc8baa9b6b015b93a4500915990a088d964f41fe482366b890"
},
"version": "3.11.3"
"version": "3.11.1"
},
"org.scalameta:scalafmt-interfaces": {
"shasums": {
"jar": "e217de8cbc3324f5e2dea7015a25c91f1b155f665a2a8c3e9c981a0a0f8735b0"
"jar": "ec8ac6769c5960e8ee04d4fee15a4b82ba6032b3df3f4d725221ef94dd1dad90"
},
"version": "3.11.3"
"version": "3.11.1"
},
"org.scalameta:scalafmt-macros_2.13": {
"shasums": {
"jar": "90f69e31e837e393b252f07504f240c142449876f1444e01c727625f1b63acdd"
"jar": "49a4ab5745cc0b54acdb74b3fd6017451d5699d5d327ca1bea0747bc622edc9f"
},
"version": "3.11.3"
"version": "3.11.1"
},
"org.scalameta:scalafmt-sysops_2.13": {
"shasums": {
"jar": "8bdf5ef43760eaba9e7ef5023db7a9714af2e136899e19cb8cf1ecf0355fef0c"
"jar": "a862c2bd21ba6b83d403a8aca33af541de356f7d39e88c1656bd2cf6a3b28a80"
},
"version": "3.11.3"
"version": "3.11.1"
},
"org.scalameta:scalameta_2.13": {
"shasums": {
"jar": "38123610b842b10010ab3a62cff36f9c1f197a8ace3d84903258580aca4acd55"
"jar": "7606f691512cac7e52e1c28146cc95001212aeb3737b44d5ea6f4ec51b9a454c"
},
"version": "4.17.2"
"version": "4.17.0"
},
"org.scalameta:svm-subs": {
"shasums": {
@@ -1229,15 +1201,15 @@
},
"org.scalameta:trees2_2.13": {
"shasums": {
"jar": "0e75bfede5171c07f8a0d8f0ef581a7af27c9b5f6953182783553aa67fe0fb83"
"jar": "c1ad0ac4c5617ee25ad97b72fb2d03c48d5ee89770e7cc70b0e3e984689296ce"
},
"version": "4.17.2"
"version": "4.17.0"
},
"org.scalameta:trees_2.13": {
"shasums": {
"jar": "638b5500b8815094a25936b57188fc616358add563a9337f525522eac16ddf24"
"jar": "b45d46d995e166889cbda015f541ca79afd94ada860513438e6c0ab5f4f84591"
},
"version": "4.17.2"
"version": "4.17.0"
},
"org.scalamock:scalamock_3": {
"shasums": {
@@ -1878,14 +1850,6 @@
"org.json4s:json4s-native-core_3",
"org.scala-lang:scala3-library_3"
],
"org.mockito:mockito-core": [
"net.bytebuddy:byte-buddy",
"net.bytebuddy:byte-buddy-agent",
"org.objenesis:objenesis"
],
"org.postgresql:postgresql": [
"org.checkerframework:checker-qual"
],
"org.scala-lang.modules:scala-collection-compat_2.13": [
"org.scala-lang:scala-library"
],
@@ -2968,50 +2932,6 @@
"org.junit.runners.parameterized",
"org.junit.validator"
],
"net.bytebuddy:byte-buddy": [
"net.bytebuddy",
"net.bytebuddy.agent.builder",
"net.bytebuddy.asm",
"net.bytebuddy.build",
"net.bytebuddy.description",
"net.bytebuddy.description.annotation",
"net.bytebuddy.description.enumeration",
"net.bytebuddy.description.field",
"net.bytebuddy.description.method",
"net.bytebuddy.description.modifier",
"net.bytebuddy.description.type",
"net.bytebuddy.dynamic",
"net.bytebuddy.dynamic.loading",
"net.bytebuddy.dynamic.scaffold",
"net.bytebuddy.dynamic.scaffold.inline",
"net.bytebuddy.dynamic.scaffold.subclass",
"net.bytebuddy.implementation",
"net.bytebuddy.implementation.attribute",
"net.bytebuddy.implementation.auxiliary",
"net.bytebuddy.implementation.bind",
"net.bytebuddy.implementation.bind.annotation",
"net.bytebuddy.implementation.bytecode",
"net.bytebuddy.implementation.bytecode.assign",
"net.bytebuddy.implementation.bytecode.assign.primitive",
"net.bytebuddy.implementation.bytecode.assign.reference",
"net.bytebuddy.implementation.bytecode.collection",
"net.bytebuddy.implementation.bytecode.constant",
"net.bytebuddy.implementation.bytecode.member",
"net.bytebuddy.jar.asm",
"net.bytebuddy.jar.asm.commons",
"net.bytebuddy.jar.asm.signature",
"net.bytebuddy.matcher",
"net.bytebuddy.pool",
"net.bytebuddy.utility",
"net.bytebuddy.utility.dispatcher",
"net.bytebuddy.utility.nullability",
"net.bytebuddy.utility.privilege",
"net.bytebuddy.utility.visitor"
],
"net.bytebuddy:byte-buddy-agent": [
"net.bytebuddy.agent",
"net.bytebuddy.agent.utility.nullability"
],
"net.java.dev.jna:jna": [
"com.sun.jna",
"com.sun.jna.ptr",
@@ -3465,84 +3385,6 @@
"org.jspecify:jspecify": [
"org.jspecify.annotations"
],
"org.mockito:mockito-core": [
"org.mockito",
"org.mockito.codegen",
"org.mockito.configuration",
"org.mockito.creation.instance",
"org.mockito.exceptions.base",
"org.mockito.exceptions.misusing",
"org.mockito.exceptions.stacktrace",
"org.mockito.exceptions.verification",
"org.mockito.exceptions.verification.junit",
"org.mockito.exceptions.verification.opentest4j",
"org.mockito.hamcrest",
"org.mockito.internal",
"org.mockito.internal.configuration",
"org.mockito.internal.configuration.injection",
"org.mockito.internal.configuration.injection.filter",
"org.mockito.internal.configuration.injection.scanner",
"org.mockito.internal.configuration.plugins",
"org.mockito.internal.creation",
"org.mockito.internal.creation.bytebuddy",
"org.mockito.internal.creation.instance",
"org.mockito.internal.creation.proxy",
"org.mockito.internal.creation.settings",
"org.mockito.internal.creation.util",
"org.mockito.internal.debugging",
"org.mockito.internal.exceptions",
"org.mockito.internal.exceptions.stacktrace",
"org.mockito.internal.exceptions.util",
"org.mockito.internal.framework",
"org.mockito.internal.hamcrest",
"org.mockito.internal.handler",
"org.mockito.internal.invocation",
"org.mockito.internal.invocation.finder",
"org.mockito.internal.invocation.mockref",
"org.mockito.internal.junit",
"org.mockito.internal.listeners",
"org.mockito.internal.matchers",
"org.mockito.internal.matchers.apachecommons",
"org.mockito.internal.matchers.text",
"org.mockito.internal.progress",
"org.mockito.internal.reporting",
"org.mockito.internal.runners",
"org.mockito.internal.runners.util",
"org.mockito.internal.session",
"org.mockito.internal.stubbing",
"org.mockito.internal.stubbing.answers",
"org.mockito.internal.stubbing.defaultanswers",
"org.mockito.internal.util",
"org.mockito.internal.util.collections",
"org.mockito.internal.util.concurrent",
"org.mockito.internal.util.io",
"org.mockito.internal.util.reflection",
"org.mockito.internal.verification",
"org.mockito.internal.verification.api",
"org.mockito.internal.verification.argumentmatching",
"org.mockito.internal.verification.checkers",
"org.mockito.invocation",
"org.mockito.junit",
"org.mockito.listeners",
"org.mockito.mock",
"org.mockito.plugins",
"org.mockito.quality",
"org.mockito.session",
"org.mockito.stubbing",
"org.mockito.verification"
],
"org.objenesis:objenesis": [
"org.objenesis",
"org.objenesis.instantiator",
"org.objenesis.instantiator.android",
"org.objenesis.instantiator.annotations",
"org.objenesis.instantiator.basic",
"org.objenesis.instantiator.gcj",
"org.objenesis.instantiator.perc",
"org.objenesis.instantiator.sun",
"org.objenesis.instantiator.util",
"org.objenesis.strategy"
],
"org.ow2.asm:asm": [
"org.objectweb.asm",
"org.objectweb.asm.signature"
@@ -4332,8 +4174,6 @@
"javax.xml.bind:jaxb-api",
"joda-time:joda-time",
"junit:junit",
"net.bytebuddy:byte-buddy",
"net.bytebuddy:byte-buddy-agent",
"net.java.dev.jna:jna",
"net.java.dev.jna:jna-platform",
"org.apache.commons:commons-compress",
@@ -4363,8 +4203,6 @@
"org.json4s:json4s-native-core_3",
"org.json4s:json4s-native_3",
"org.jspecify:jspecify",
"org.mockito:mockito-core",
"org.objenesis:objenesis",
"org.ow2.asm:asm",
"org.postgresql:postgresql",
"org.reactivestreams:reactive-streams",
+4 -24
View File
@@ -6,9 +6,7 @@
"dependencyDashboard": true,
"enabledManagers": [
"bazel-module",
"bazelisk",
"cargo",
"custom.regex",
"github-actions",
"gomod",
"swift"
@@ -20,9 +18,7 @@
{
"description": "Bazel module artifact updates run in GitHub Actions so hosted Renovate does not need unsafe bazel mod deps execution",
"matchManagers": [
"bazel-module",
"bazelisk",
"custom.regex"
"bazel-module"
],
"skipArtifactsUpdate": true
},
@@ -34,33 +30,17 @@
"skipArtifactsUpdate": true
}
],
"customManagers": [
{
"customType": "regex",
"description": "Update the LLVM and Clang toolchain release",
"managerFilePatterns": [
"/^MODULE\\.bazel$/"
],
"matchStrings": [
"LLVM_VERSION = \"(?<currentValue>\\d+\\.\\d+\\.\\d+)\""
],
"depNameTemplate": "llvm/llvm-project",
"datasourceTemplate": "github-releases",
"extractVersionTemplate": "^llvmorg-(?<version>\\d+\\.\\d+\\.\\d+)$",
"versioningTemplate": "semver"
}
],
"lockFileMaintenance": {
"enabled": true,
"schedule": [
"* * * * 1"
"before 6am on monday"
]
},
"prConcurrentLimit": 3,
"prHourlyLimit": 3,
"prHourlyLimit": 1,
"rebaseWhen": "behind-base-branch",
"schedule": [
"* * * * 1"
"before 6am on monday"
],
"separateMajorMinor": true,
"timezone": "America/Los_Angeles"
+24 -101
View File
@@ -4,118 +4,41 @@
# Reads the active instance from /opt/eagle0/.active-instance (set by deploy-blue-green.sh).
#
# Usage:
# eagle-logs # Show existing logs and keep following
# eagle-logs -n 100 # Show the last 100 lines and keep following
# eagle-logs --no-follow -n 50 # Show the last 50 lines and exit
# eagle-logs # Tail logs (follow mode)
# eagle-logs -n 100 # Show last 100 lines and follow
# eagle-logs --no-follow -n 50 # Show last 50 lines without following
#
# To create an alias, add to ~/.bashrc:
# alias eagle-logs='/opt/eagle0/scripts/eagle-logs.sh'
#
set -uo pipefail
set -euo pipefail
APP_DIR="${APP_DIR:-/opt/eagle0}"
ACTIVE_FILE="${APP_DIR}/.active-instance"
RETRY_INTERVAL_SECONDS="${EAGLE_LOGS_RETRY_INTERVAL_SECONDS:-2}"
trap 'exit 130' INT
trap 'exit 143' TERM
FOLLOW=true
DOCKER_LOG_ARGS=()
for arg in "$@"; do
case "$arg" in
--no-follow)
FOLLOW=false
;;
-f | --follow)
FOLLOW=true
;;
*)
DOCKER_LOG_ARGS+=("$arg")
;;
esac
done
container_is_running() {
[ "$(docker inspect --format='{{.State.Running}}' "$1" 2>/dev/null)" = "true" ]
}
resolve_active_instance() {
local recorded_active=""
if [ -f "$ACTIVE_FILE" ]; then
IFS= read -r recorded_active < "$ACTIVE_FILE" || true
fi
if [ -n "$recorded_active" ] && container_is_running "$recorded_active"; then
printf '%s\n' "$recorded_active"
elif container_is_running eagle-blue; then
printf '%s\n' "eagle-blue"
elif container_is_running eagle-green; then
printf '%s\n' "eagle-green"
# Read active instance from file, with fallback
if [ -f "$ACTIVE_FILE" ]; then
ACTIVE=$(cat "$ACTIVE_FILE")
else
# Fallback: check which container is actually running
if docker inspect --format='{{.State.Running}}' eagle-blue 2>/dev/null | grep -q true; then
ACTIVE="eagle-blue"
elif docker inspect --format='{{.State.Running}}' eagle-green 2>/dev/null | grep -q true; then
ACTIVE="eagle-green"
else
return 1
ACTIVE=""
fi
}
print_disconnect_marker() {
local stopped_instance=${1:-unknown}
printf '\n' >&2
printf '%s\n' '================================================================================' >&2
printf '%s\n' '==================== EAGLE LOG STREAM DISCONNECTED ============================' >&2
printf ' Server unavailable at %s (last instance: %s)\n' "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" "$stopped_instance" >&2
printf '%s\n' ' Waiting for the deployment or server restart; log following will resume.' >&2
printf '%s\n' '================================================================================' >&2
}
print_resume_marker() {
local active_instance=$1
printf '\n' >&2
printf '%s\n' '================================================================================' >&2
printf '%s\n' '======================= EAGLE LOG STREAM RESUMED ==============================' >&2
printf ' Attached to %s at %s\n' "$active_instance" "$(date -u '+%Y-%m-%dT%H:%M:%SZ')" >&2
printf '%s\n' '================================================================================' >&2
}
if [ "$FOLLOW" = false ]; then
if ! ACTIVE=$(resolve_active_instance); then
echo "Error: No active Eagle instance found" >&2
exit 1
fi
exec docker logs "${DOCKER_LOG_ARGS[@]}" "$ACTIVE"
fi
ACTIVE=""
DISCONNECTED=false
RECONNECT_SINCE=""
if [ -z "$ACTIVE" ]; then
echo "Error: No active Eagle instance found" >&2
exit 1
fi
while true; do
if NEXT_ACTIVE=$(resolve_active_instance); then
if [ "$DISCONNECTED" = true ]; then
print_resume_marker "$NEXT_ACTIVE"
fi
ACTIVE="$NEXT_ACTIVE"
DISCONNECTED=false
if [ -n "$RECONNECT_SINCE" ]; then
docker logs --follow "${DOCKER_LOG_ARGS[@]}" --since "$RECONNECT_SINCE" "$ACTIVE" || true
else
docker logs --follow "${DOCKER_LOG_ARGS[@]}" "$ACTIVE" || true
fi
RECONNECT_SINCE=$(date +%s)
fi
if [ "$DISCONNECTED" = false ]; then
print_disconnect_marker "$ACTIVE"
DISCONNECTED=true
fi
sleep "$RETRY_INTERVAL_SECONDS"
done
# Default to follow mode if no args provided
if [ $# -eq 0 ]; then
exec docker logs -f "$ACTIVE"
else
exec docker logs "$@" "$ACTIVE"
fi
-85
View File
@@ -1,85 +0,0 @@
#!/bin/bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TEST_DIR=$(mktemp -d)
trap 'rm -rf "$TEST_DIR"' EXIT
FAKE_BIN="${TEST_DIR}/bin"
APP_DIR="${TEST_DIR}/app"
STATE_FILE="${TEST_DIR}/state"
CALLS_FILE="${TEST_DIR}/calls"
OUTPUT_FILE="${TEST_DIR}/output"
mkdir -p "$FAKE_BIN" "$APP_DIR"
cat > "${FAKE_BIN}/docker" <<'EOF'
#!/bin/bash
set -euo pipefail
case "$1" in
inspect)
container=${@: -1}
state=$(cat "$EAGLE_LOGS_TEST_STATE_FILE")
if { [ "$state" = "blue" ] && [ "$container" = "eagle-blue" ]; } ||
{ [ "$state" = "green" ] && [ "$container" = "eagle-green" ]; }; then
echo true
else
echo false
fi
;;
logs)
container=${@: -1}
printf '%s\n' "$*" >> "$EAGLE_LOGS_TEST_CALLS_FILE"
if [ "$container" = "eagle-blue" ]; then
echo "last blue log"
echo "eagle-green" > "$EAGLE_LOGS_TEST_ACTIVE_FILE"
echo "green" > "$EAGLE_LOGS_TEST_STATE_FILE"
else
echo "first green log"
fi
;;
*)
echo "Unexpected docker command: $*" >&2
exit 1
;;
esac
EOF
chmod +x "${FAKE_BIN}/docker"
export EAGLE_LOGS_TEST_STATE_FILE="$STATE_FILE"
export EAGLE_LOGS_TEST_CALLS_FILE="$CALLS_FILE"
export EAGLE_LOGS_TEST_ACTIVE_FILE="${APP_DIR}/.active-instance"
echo "blue" > "$STATE_FILE"
echo "eagle-blue" > "${APP_DIR}/.active-instance"
PATH="${FAKE_BIN}:$PATH" APP_DIR="$APP_DIR" "${SCRIPT_DIR}/eagle-logs.sh" --no-follow -n 25
grep -q '^logs -n 25 eagle-blue$' "$CALLS_FILE"
: > "$CALLS_FILE"
echo "blue" > "$STATE_FILE"
echo "eagle-blue" > "${APP_DIR}/.active-instance"
PATH="${FAKE_BIN}:$PATH" APP_DIR="$APP_DIR" EAGLE_LOGS_RETRY_INTERVAL_SECONDS=0.01 \
"${SCRIPT_DIR}/eagle-logs.sh" -n 10 > "$OUTPUT_FILE" 2>&1 &
FOLLOW_PID=$!
for _ in $(seq 1 100); do
if grep -q 'first green log' "$OUTPUT_FILE"; then
break
fi
sleep 0.01
done
kill "$FOLLOW_PID" 2>/dev/null || true
wait "$FOLLOW_PID" 2>/dev/null || true
grep -q 'EAGLE LOG STREAM DISCONNECTED' "$OUTPUT_FILE"
grep -q 'EAGLE LOG STREAM RESUMED' "$OUTPUT_FILE"
grep -q 'last blue log' "$OUTPUT_FILE"
grep -q 'first green log' "$OUTPUT_FILE"
grep -q '^logs --follow -n 10 eagle-blue$' "$CALLS_FILE"
grep -Eq '^logs --follow -n 10 --since [0-9]+ eagle-green$' "$CALLS_FILE"
echo "eagle-logs tests passed"
@@ -4,8 +4,6 @@
#include "AIWaterCrossingCalculator.hpp"
#include <algorithm>
#include "AIMinimumDistanceAndTarget.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/fb_helpers/HexMapHelpers.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/map/HexMapHasher.hpp"
@@ -14,27 +12,11 @@
namespace shardok {
namespace {
constexpr int kMaxWaterCrossingDistance = 1000;
constexpr double kCrossingCreatorDistanceMultiplier = 100.0;
auto RecomputeModifierHash(HexMap *hexMap) -> MapId {
hexMap->mutate_modifier_hash(GetModifierHash(hexMap));
return ActionPointDistancesCache::GetMapId(hexMap);
}
auto CanCreateWaterCrossing(
const net::eagle0::shardok::storage::fb::Unit *unit,
const BattalionTypeGetter &battalionTypeGetter) -> bool {
if (!unit->has_attached_hero()) return false;
const auto profession = unit->attached_hero().profession_info().profession();
const auto &battalionType = battalionTypeGetter(unit->battalion().type());
return profession == net::eagle0::shardok::storage::fb::Profession_ENGINEER ||
(profession == net::eagle0::shardok::storage::fb::Profession_MAGE &&
battalionType->allowsCasting);
}
} // namespace
auto UnitIdsRequiringWaterCrossing(
@@ -112,8 +94,14 @@ auto UnitIdsToCreateWaterCrossing(
if (unit->status() != net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT &&
unit->status() != net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT)
continue;
if (!unit->has_attached_hero()) continue;
if (CanCreateWaterCrossing(unit, battalionTypeGetter)) {
const auto profession = unit->attached_hero().profession_info().profession();
const auto &battalionType = battalionTypeGetter(unit->battalion().type());
if (profession == net::eagle0::shardok::storage::fb::Profession_ENGINEER ||
(profession == net::eagle0::shardok::storage::fb::Profession_MAGE &&
battalionType->allowsCasting)) {
unitIds.push_back(unit->unit_id());
}
}
@@ -326,31 +314,6 @@ auto WaterCrossingScore(
const auto mapId = ActionPointDistancesCache::GetMapId(gameState->hex_map());
// Put a big penalty on the distance for every unit that could create a crossing, on a single
// saturating scale: unavailable (fled/captured/destroyed) and unplaced creators sit at the
// maximum, and live distances (including IMPOSSIBLE) are clamped to it. Losing a crossing
// creator therefore never scores better than any placed position.
for (const auto *unit : *gameState->units()) {
if (unit->player_id() != playerId) continue;
if (!CanCreateWaterCrossing(unit, battalionTypeGetter)) continue;
const auto status = unit->status();
const bool available =
status == net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT ||
status == net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT;
int thisDistance = kMaxWaterCrossingDistance;
if (available && unit->location().row() >= 0) {
const auto &battalionType = battalionTypeGetter(unit->battalion().type());
const auto *apd = apdCache->GetRaw(gameState->hex_map(), mapId, battalionType, false);
thisDistance = std::min(
MinimumDistance(apd, unit->location(), startCrossingFrom),
kMaxWaterCrossingDistance);
}
totalScore -= thisDistance * kCrossingCreatorDistanceMultiplier;
}
if (unitIdsCreatingCrossing.empty()) {
for (const UnitId uid : unitIdsRequiringCrossing) {
const Unit *unit = gameState->units()->Get(uid);
@@ -358,15 +321,31 @@ auto WaterCrossingScore(
const Coords location = unit->location();
const auto *apd = apdCache->GetRaw(gameState->hex_map(), mapId, battalionType, false);
const int thisDistance = location.row() < 0
? kMaxWaterCrossingDistance
: MinimumDistance(apd, location, startCrossingFrom);
const int thisDistance =
location.row() < 0 ? 1000 : MinimumDistance(apd, location, startCrossingFrom);
totalScore -= thisDistance;
}
return totalScore;
}
// First put a big penalty on the distance for units that can create a crossing
for (const UnitId uid : unitIdsCreatingCrossing) {
const Unit *unit = gameState->units()->Get(uid);
const auto &battalionType = battalionTypeGetter(unit->battalion().type());
Coords location = unit->location();
int thisDistance;
if (location.row() < 0) thisDistance = 1000;
else {
const auto *apd = apdCache->GetRaw(gameState->hex_map(), mapId, battalionType, false);
thisDistance = MinimumDistance(apd, location, startCrossingFrom);
}
totalScore -= thisDistance * 100.0;
}
// Now a smaller penalty for distance for units that need to cross, except if they block -- then
// a large penalty
for (const UnitId uid : unitIdsRequiringCrossing) {
@@ -379,7 +358,7 @@ auto WaterCrossingScore(
const auto *apd = apdCache->GetRaw(gameState->hex_map(), mapId, battalionType, false);
int thisDistance;
if (location.row() < 0) thisDistance = kMaxWaterCrossingDistance;
if (location.row() < 0) thisDistance = 1000;
else { thisDistance = MinimumDistance(apd, location, startCrossingFrom); }
bool targetBlocks = false;
@@ -4,12 +4,132 @@
#include "AIWaterCrossingCommandChooser.hpp"
#include <algorithm>
#include <ranges>
#include "AIMinimumDistanceAndTarget.hpp"
#include "src/main/cpp/net/eagle0/shardok/ai/AIWaterCrossingCalculator.hpp"
namespace shardok {
using Unit = net::eagle0::shardok::storage::fb::Unit;
constexpr ScoreValue kNoRequiredCrossingScore = std::numeric_limits<ScoreValue>::max();
[[nodiscard]] auto AIWaterCrossingCommandChooser::WaterCrossingScore(
const BattalionTypeGetter &battalionTypeGetter,
const GameStateW &gameState,
const CoordsSet &castleCoords,
const CoordsSet &startCrossingFrom) const -> ScoreValue {
uint32_t castleClaimCount = 0;
for (const auto *unit : *gameState->units()) {
if (unit->player_id() != playerId) continue;
const auto status = unit->status();
if (status != net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT &&
status != net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT)
continue;
if (!unit->has_attached_hero()) continue;
++castleClaimCount;
}
CoordsSet destinations = castleCoords;
if (castleClaimCount < castleCoords.size()) {
destinations = CoordsSet(gameState->hex_map());
for (const auto *enemyUnit : *gameState->units()) {
if (enemyUnit->player_id() == playerId) continue;
const auto status = enemyUnit->status();
if (status != net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT) continue;
AssertValid(enemyUnit->location(), gameState->hex_map());
destinations.Add(enemyUnit->location());
}
}
const auto unitIdsRequiringCrossing = UnitIdsRequiringWaterCrossing(
gameState,
playerId,
castleCoords,
apdCache,
battalionTypeGetter);
if (unitIdsRequiringCrossing.empty()) return kNoRequiredCrossingScore;
const auto unitIdsCreatingCrossing =
UnitIdsToCreateWaterCrossing(gameState, playerId, battalionTypeGetter);
ScoreValue totalScore = 0;
const auto mapId = ActionPointDistancesCache::GetMapId(gameState->hex_map());
if (unitIdsCreatingCrossing.empty()) {
for (const UnitId uid : unitIdsRequiringCrossing) {
const Unit *unit = gameState->units()->Get(uid);
const auto &battalionType = battalionTypeGetter(unit->battalion().type());
const Coords location = unit->location();
const auto *apd = apdCache->GetRaw(gameState->hex_map(), mapId, battalionType, false);
const int thisDistance =
location.row() < 0 ? 1000 : MinimumDistance(apd, location, startCrossingFrom);
totalScore -= thisDistance;
}
return totalScore;
}
// First put a big penalty on the distance for units that can create a crossing
for (const UnitId uid : unitIdsCreatingCrossing) {
const Unit *unit = gameState->units()->Get(uid);
const auto &battalionType = battalionTypeGetter(unit->battalion().type());
Coords location = unit->location();
int thisDistance;
if (location.row() < 0) thisDistance = 1000;
else {
const auto *apd = apdCache->GetRaw(gameState->hex_map(), mapId, battalionType, false);
thisDistance = MinimumDistance(apd, location, startCrossingFrom);
}
totalScore -= thisDistance * 100.0;
}
// Now a smaller penalty for distance for units that need to cross, except if they block -- then
// a large penalty
for (const UnitId uid : unitIdsRequiringCrossing) {
// If this unit ID can also create a crossing, we already handled it
if (std::ranges::contains(unitIdsCreatingCrossing, uid)) continue;
const Unit *unit = gameState->units()->Get(uid);
const auto &battalionType = battalionTypeGetter(unit->battalion().type());
Coords location = unit->location();
const auto *apd = apdCache->GetRaw(gameState->hex_map(), mapId, battalionType, false);
int thisDistance;
if (location.row() < 0) thisDistance = 1000;
else { thisDistance = MinimumDistance(apd, location, startCrossingFrom); }
bool targetBlocks = false;
// If we're not capable of creating a crossing, don't get in the way of somebody that is.
for (const UnitId crossingUid : unitIdsCreatingCrossing) {
const auto *crossingCapableUnit = gameState->units()->Get(crossingUid);
// Don't check for units that aren't yet placed
if (crossingCapableUnit->location().row() < 0) continue;
AssertValid(crossingCapableUnit->location(), gameState->hex_map());
if (thisDistance <
MinimumDistance(apd, crossingCapableUnit->location(), startCrossingFrom)) {
targetBlocks = true;
break;
}
}
if (targetBlocks) continue;
totalScore -= thisDistance;
}
return totalScore;
}
auto AIWaterCrossingCommandChooser::StartCrossingFrom(
const BattalionTypeGetter &battalionTypeGetter,
const GameStateW &gameState,
@@ -18,6 +18,7 @@ namespace shardok {
using GameState = net::eagle0::shardok::storage::fb::GameState;
using Unit = net::eagle0::shardok::storage::fb::Unit;
using ScoreValue = double;
class AIWaterCrossingCommandChooser {
private:
@@ -33,6 +34,12 @@ public:
const BattalionTypeGetter &battalionTypeGetter,
const GameStateW &gameState,
const CoordsSet &castleCoords) const -> CoordsSet;
[[nodiscard]] auto WaterCrossingScore(
const BattalionTypeGetter &battalionTypeGetter,
const GameStateW &gameState,
const CoordsSet &castleCoords,
const CoordsSet &startCrossingFrom) const -> ScoreValue;
};
} // namespace shardok
@@ -404,19 +404,3 @@ cc_library(
"@com_google_protobuf//:protobuf",
],
)
cc_library(
name = "starting_position_recommender",
srcs = ["StartingPositionRecommender.cpp"],
hdrs = ["StartingPositionRecommender.hpp"],
copts = COPTS,
visibility = ["//visibility:public"],
deps = [
":ai_config",
":shardok_ai_client",
"//src/main/cpp/net/eagle0/shardok/library:engine",
"//src/main/cpp/net/eagle0/shardok/library:shardok_c_types",
"//src/main/protobuf/net/eagle0/shardok/api:placement_command_cc_proto",
"//src/main/protobuf/net/eagle0/shardok/common:command_type_cc_proto",
],
)
@@ -137,20 +137,15 @@ void CheckCommand(const CommandSPtr &realCommand, const CommandSPtr &guessedComm
auto ShardokAIClient::StandardChooseCommandIndex(
const GameSettingsSPtr &settings,
const GameStateW &guessedState,
const CommandListSPtr &realAvailableCommands,
const std::optional<std::chrono::milliseconds> timeLimit) const -> CommandChoiceResults {
const CommandListSPtr &realAvailableCommands) const -> CommandChoiceResults {
const auto settingsGetter = settings->GetGetter();
const auto guessedEngine = ShardokEngine(settings, guessedState);
const auto guessedCommands = guessedEngine.GetAvailableCommandsForAIPlayer(playerId);
const auto commandCount = guessedCommands->size();
// Calculate time budget based on game situation using new dynamic per-command settings
auto timeBudget =
const auto timeBudget =
CalculateTimeBudget(playerId, settings, guessedState, commandCount, isAllAiBattle);
if (timeLimit.has_value()) {
timeBudget.remainingBudget = *timeLimit;
timeBudget.minDepthRequired = 1;
}
// Configure MCTS based on proximity to enemy
// When far from enemy: use AVERAGING with maxPlayerFlips=0 (single-player lookahead)
@@ -403,8 +398,7 @@ auto ShardokAIClient::StandardChooseCommandIndex(
auto ShardokAIClient::LateRoundAttackerChooseCommandIndex(
const GameSettingsSPtr &settings,
const GameStateW &guessedState,
const CommandListSPtr &realAvailableCommands,
const std::optional<std::chrono::milliseconds> timeLimit) const -> CommandChoiceResults {
const CommandListSPtr &realAvailableCommands) const -> CommandChoiceResults {
if (const auto dismissCommand = std::ranges::find_if(
*realAvailableCommands,
[](const CommandSPtr &cmd) {
@@ -412,7 +406,7 @@ auto ShardokAIClient::LateRoundAttackerChooseCommandIndex(
net::eagle0::shardok::common::DISMISS_UNIT_COMMAND;
});
dismissCommand == realAvailableCommands->end()) {
return StandardChooseCommandIndex(settings, guessedState, realAvailableCommands, timeLimit);
return StandardChooseCommandIndex(settings, guessedState, realAvailableCommands);
} else {
CommandChoiceResults results{};
results.chosenIndex =
@@ -429,19 +423,14 @@ auto ShardokAIClient::LateRoundAttackerChooseCommandIndex(
auto ShardokAIClient::FinalRoundAttackerChooseCommandIndex(
const GameSettingsSPtr &settings,
const GameStateW &guessedState,
const CommandListSPtr &realAvailableCommands,
const std::optional<std::chrono::milliseconds> timeLimit) const -> CommandChoiceResults {
const CommandListSPtr &realAvailableCommands) const -> CommandChoiceResults {
const auto fleeCommand =
std::ranges::find_if(*realAvailableCommands, [](const CommandSPtr &cmd) {
return cmd->GetCommandType() == net::eagle0::shardok::common::FLEE_COMMAND;
});
if (fleeCommand == realAvailableCommands->end()) {
return LateRoundAttackerChooseCommandIndex(
settings,
guessedState,
realAvailableCommands,
timeLimit);
return LateRoundAttackerChooseCommandIndex(settings, guessedState, realAvailableCommands);
}
// Extract values directly from settings for flee decision evaluation
@@ -471,15 +460,14 @@ auto ShardokAIClient::FinalRoundAttackerChooseCommandIndex(
return results;
} else {
// Fight instead of flee
return StandardChooseCommandIndex(settings, guessedState, realAvailableCommands, timeLimit);
return StandardChooseCommandIndex(settings, guessedState, realAvailableCommands);
}
}
auto ShardokAIClient::ChooseCommandIndex(
const GameSettingsSPtr &settings,
const GameStateView &gsv,
const CommandListSPtr &realAvailableCommands,
const std::optional<std::chrono::milliseconds> timeLimit) const -> CommandChoiceResults {
const CommandListSPtr &realAvailableCommands) const -> CommandChoiceResults {
static std::array<std::atomic<int>, net::eagle0::shardok::common::CommandType_MAX + 1>
typeChosenCount;
static std::atomic<int> totalChoices = 0;
@@ -491,23 +479,13 @@ auto ShardokAIClient::ChooseCommandIndex(
if (const int roundsRemaining = RoundsRemaining(settings, gsv);
!isDefender && roundsRemaining <= 1) {
results = FinalRoundAttackerChooseCommandIndex(
settings,
guessedState,
realAvailableCommands,
timeLimit);
results =
FinalRoundAttackerChooseCommandIndex(settings, guessedState, realAvailableCommands);
} else if (!isDefender && roundsRemaining <= 3) {
results = LateRoundAttackerChooseCommandIndex(
settings,
guessedState,
realAvailableCommands,
timeLimit);
results =
LateRoundAttackerChooseCommandIndex(settings, guessedState, realAvailableCommands);
} else {
results = StandardChooseCommandIndex(
settings,
guessedState,
realAvailableCommands,
timeLimit);
results = StandardChooseCommandIndex(settings, guessedState, realAvailableCommands);
}
const auto chosenType = (*realAvailableCommands)[results.chosenIndex]->GetCommandType();
@@ -548,7 +526,7 @@ auto ShardokAIClient::ChooseCommandIndex(const ShardokEngine &engine) const
const auto &settings = engine.GetGameSettings();
const auto &gsv = engine.GetGameStateView(GetPlayerId());
const auto results = ChooseCommandIndex(settings, gsv, availableCommands, std::nullopt);
const auto results = ChooseCommandIndex(settings, gsv, availableCommands);
apdCache->ConsolidateThreadLocalCache_Racy();
return results;
}
@@ -9,8 +9,6 @@
#ifndef EAGLE0_SHARDOK_AI_SHARDOK_AI_CLIENT_HPP
#define EAGLE0_SHARDOK_AI_SHARDOK_AI_CLIENT_HPP
#include <chrono>
#include <optional>
#include <vector>
#include "src/main/cpp/net/eagle0/common/RandomGenerator.hpp"
@@ -58,18 +56,15 @@ private:
[[nodiscard]] auto StandardChooseCommandIndex(
const GameSettingsSPtr& settings,
const GameStateW& guessedState,
const CommandListSPtr& realAvailableCommands,
std::optional<std::chrono::milliseconds> timeLimit) const -> CommandChoiceResults;
const CommandListSPtr& realAvailableCommands) const -> CommandChoiceResults;
[[nodiscard]] auto LateRoundAttackerChooseCommandIndex(
const GameSettingsSPtr& settings,
const GameStateW& guessedState,
const CommandListSPtr& realAvailableCommands,
std::optional<std::chrono::milliseconds> timeLimit) const -> CommandChoiceResults;
const CommandListSPtr& realAvailableCommands) const -> CommandChoiceResults;
[[nodiscard]] auto FinalRoundAttackerChooseCommandIndex(
const GameSettingsSPtr& settings,
const GameStateW& guessedState,
const CommandListSPtr& realAvailableCommands,
std::optional<std::chrono::milliseconds> timeLimit) const -> CommandChoiceResults;
const CommandListSPtr& realAvailableCommands) const -> CommandChoiceResults;
public:
explicit ShardokAIClient(
@@ -92,8 +87,7 @@ public:
[[nodiscard]] auto ChooseCommandIndex(
const GameSettingsSPtr& settings,
const net::eagle0::shardok::api::GameStateView& gsv,
const CommandListSPtr& realAvailableCommands,
std::optional<std::chrono::milliseconds> timeLimit) const -> CommandChoiceResults;
const CommandListSPtr& realAvailableCommands) const -> CommandChoiceResults;
// MCTS configuration methods (only relevant when using MCTS algorithm)
[[nodiscard]] auto GetMCTSConfig() const -> const mcts::MCTSConfig& { return mctsConfig; }
@@ -1,174 +0,0 @@
//
// Created by Codex on 7/14/26.
//
#include "StartingPositionRecommender.hpp"
#include <algorithm>
#include <array>
#include <optional>
#include <ranges>
#include "AIConfig.hpp"
#include "ShardokAIClient.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/ShardokEngine.hpp"
#include "src/main/protobuf/net/eagle0/shardok/common/command_type.pb.h"
namespace shardok {
using net::eagle0::shardok::api::PlacementCommand;
using net::eagle0::shardok::common::CommandType;
namespace {
struct TutorialPlacement {
UnitId unitId;
int row;
int column;
};
auto RecommendTutorialStartingPositions(const ShardokEngine& engine, const PlayerId playerId)
-> std::optional<std::vector<PlacementCommand>> {
const auto* units = engine.GetCurrentGameState()->units();
const auto isUnplacedPlayerUnit = [playerId](const auto* unit) {
return unit->player_id() == playerId &&
unit->status() == net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT;
};
if (std::ranges::count_if(*units, isUnplacedPlayerUnit) != 3) return std::nullopt;
const auto longbowmen = std::ranges::find_if(*units, [playerId](const auto* unit) {
return unit->player_id() == playerId &&
unit->status() == net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT &&
unit->battalion().type() ==
net::eagle0::shardok::storage::fb::BattalionTypeId_LONGBOWMEN;
});
const auto sadar = std::ranges::find_if(*units, [playerId](const auto* unit) {
return unit->player_id() == playerId &&
unit->status() == net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT &&
unit->attached_hero().profession_info().profession() ==
net::eagle0::shardok::storage::fb::Profession_CHAMPION;
});
const auto marek =
std::ranges::find_if(*units, [playerId, &units, &longbowmen, &sadar](const auto* unit) {
return unit->player_id() == playerId &&
unit->status() ==
net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT &&
(longbowmen == units->end() ||
unit->unit_id() != (*longbowmen)->unit_id()) &&
(sadar == units->end() || unit->unit_id() != (*sadar)->unit_id());
});
if (longbowmen == units->end() || sadar == units->end() || marek == units->end()) {
return std::nullopt;
}
if ((*longbowmen)->unit_id() == (*sadar)->unit_id()) return std::nullopt;
const std::array desiredPlacements{
TutorialPlacement{(*longbowmen)->unit_id(), 6, 12},
TutorialPlacement{(*sadar)->unit_id(), 8, 11},
TutorialPlacement{(*marek)->unit_id(), 10, 11}};
ShardokEngine simulatedEngine(engine, false);
std::vector<PlacementCommand> recommendations;
recommendations.reserve(desiredPlacements.size());
for (const auto& placement : desiredPlacements) {
const auto commands = simulatedEngine.GetAvailableCommandsForAIPlayer(playerId);
const auto command = std::ranges::find_if(*commands, [&placement](const auto& candidate) {
return candidate->GetActorUnitId() == placement.unitId &&
candidate->GetTargetRow() == placement.row &&
candidate->GetTargetColumn() == placement.column &&
(candidate->GetCommandType() ==
net::eagle0::shardok::common::PLACE_UNIT_COMMAND ||
candidate->GetCommandType() ==
net::eagle0::shardok::common::PLACE_HIDDEN_UNIT_COMMAND);
});
if (command == commands->end()) return std::nullopt;
PlacementCommand recommendation;
recommendation.set_unit_id(placement.unitId);
recommendation.set_row(placement.row);
recommendation.set_column(placement.column);
recommendations.push_back(recommendation);
simulatedEngine.PostCommand(playerId, std::distance(commands->begin(), command));
}
return recommendations;
}
} // namespace
auto RecommendStartingPositions(
const ShardokEngine& engine,
const PlayerId playerId,
const std::chrono::milliseconds timePerChoice) -> std::vector<PlacementCommand> {
if (engine.GetGameStatus()->state() !=
net::eagle0::shardok::storage::fb::GameStatus_::State_SET_UP ||
engine.GetCurrentPlayerId() != playerId) {
return {};
}
const auto playerInfos = engine.GetPlayerInfos();
const auto playerInfo = std::ranges::find_if(playerInfos, [playerId](const auto& info) {
return info.player_id() == playerId;
});
if (playerInfo == playerInfos.end()) return {};
if (engine.IsTutorialBattleEnabled() && playerInfo->is_defender()) {
if (const auto tutorialRecommendations =
RecommendTutorialStartingPositions(engine, playerId)) {
return *tutorialRecommendations;
}
}
ShardokEngine simulatedEngine(engine, false);
mcts::MCTSConfig mctsConfig;
mctsConfig.backpropagationPolicy = mcts::MCTSBackpropagationPolicy::MINIMAX;
mctsConfig.maxPlayerFlips = 1;
mctsConfig.maxSimulationFlips = 1;
mctsConfig.simulationPolicy = mcts::MCTSSimulationPolicy::WEIGHTED_HEURISTIC;
ShardokAIClient ai(
playerId,
playerInfo->is_defender(),
false,
simulatedEngine.GetCurrentGameState()->hex_map(),
simulatedEngine.GetGameSettings()->GetGetter(),
AIAlgorithmType::ITERATIVE_DEEPENING,
ScoringCalculatorType::STANDARD,
mctsConfig);
std::vector<PlacementCommand> recommendations;
while (simulatedEngine.GetGameStatus()->state() ==
net::eagle0::shardok::storage::fb::GameStatus_::State_SET_UP &&
simulatedEngine.GetCurrentPlayerId() == playerId) {
const auto commands = simulatedEngine.GetAvailableCommandsForAIPlayer(playerId);
if (commands->empty()) break;
const auto gameStateView = simulatedEngine.GetGameStateView(playerId);
const auto choice = ai.ChooseCommandIndex(
simulatedEngine.GetGameSettings(),
gameStateView,
commands,
timePerChoice);
const auto& command = (*commands)[choice.chosenIndex];
const auto commandType = command->GetCommandType();
if (commandType == net::eagle0::shardok::common::END_PLAYER_SETUP_COMMAND) break;
if (commandType != net::eagle0::shardok::common::PLACE_UNIT_COMMAND &&
commandType != net::eagle0::shardok::common::PLACE_HIDDEN_UNIT_COMMAND) {
break;
}
PlacementCommand recommendation;
recommendation.set_unit_id(command->GetActorUnitId());
recommendation.set_row(command->GetTargetRow());
recommendation.set_column(command->GetTargetColumn());
recommendations.push_back(recommendation);
simulatedEngine.PostCommand(playerId, static_cast<int64_t>(choice.chosenIndex));
}
return recommendations;
}
} // namespace shardok
@@ -1,26 +0,0 @@
//
// Created by Codex on 7/14/26.
//
#ifndef EAGLE0_SHARDOK_AI_STARTING_POSITION_RECOMMENDER_HPP
#define EAGLE0_SHARDOK_AI_STARTING_POSITION_RECOMMENDER_HPP
#include <chrono>
#include <vector>
#include "src/main/cpp/net/eagle0/shardok/library/ShardokCTypes.h"
#include "src/main/protobuf/net/eagle0/shardok/api/placement_command.pb.h"
namespace shardok {
class ShardokEngine;
[[nodiscard]] auto RecommendStartingPositions(
const ShardokEngine& engine,
PlayerId playerId,
std::chrono::milliseconds timePerChoice = std::chrono::milliseconds(500))
-> std::vector<net::eagle0::shardok::api::PlacementCommand>;
} // namespace shardok
#endif // EAGLE0_SHARDOK_AI_STARTING_POSITION_RECOMMENDER_HPP
@@ -15,7 +15,6 @@ cc_library(
":game_update_receiver",
"//src/main/cpp/net/eagle0/common:shardok_latency_trace",
"//src/main/cpp/net/eagle0/shardok/ai:shardok_ai_client",
"//src/main/cpp/net/eagle0/shardok/ai:starting_position_recommender",
"//src/main/cpp/net/eagle0/shardok/library:engine",
"//src/main/cpp/net/eagle0/shardok/library:shardok_c_types",
"//src/main/cpp/net/eagle0/shardok/library:unit_placement_info",
@@ -20,37 +20,10 @@
#include "src/main/cpp/net/eagle0/common/ShardokLatencyTrace.hpp"
#include "src/main/cpp/net/eagle0/shardok/ai/ShardokAIClient.hpp"
#include "src/main/cpp/net/eagle0/shardok/ai/StartingPositionRecommender.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/ShardokEngine.hpp"
#include "src/main/protobuf/net/eagle0/shardok/api/game_state_view.pb.h"
namespace shardok {
auto PlayerBattleProgressFrom(const net::eagle0::shardok::storage::fb::GameState &gameState)
-> std::vector<PlayerBattleProgress> {
std::vector<PlayerBattleProgress> progress;
progress.reserve(gameState.player_infos()->size());
for (const auto *player : *gameState.player_infos()) {
int32_t troopCount = 0;
bool isRetreating = false;
for (const auto *unit : *gameState.units()) {
if (unit->player_id() != player->player_id()) continue;
switch (unit->status()) {
case net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_NEVER_ENTERED_UNIT:
troopCount += unit->battalion().size();
break;
case net::eagle0::shardok::storage::fb::UnitStatus_FLED_UNIT:
isRetreating = true;
break;
default: break;
}
}
progress.push_back(PlayerBattleProgress{player->player_id(), troopCount, isRetreating});
}
return progress;
}
using net::eagle0::common::ScopedShardokLatencyTrace;
using net::eagle0::shardok::common::GameStatus;
@@ -264,7 +237,7 @@ void ShardokGameController::DoAIThread() {
{{"player_id", std::to_string(playerId)},
{"round", std::to_string(gsv.current_round())},
{"available_command_count", std::to_string(availableCommands->size())}});
return aiClient->ChooseCommandIndex(settings, gsv, availableCommands, std::nullopt);
return aiClient->ChooseCommandIndex(settings, gsv, availableCommands);
}();
chosenIndex = results.chosenIndex;
@@ -482,10 +455,6 @@ auto ShardokGameController::GetUpdates(const int64_t startingActionId) -> AllUpd
cachedGameId,
{{"starting_action_id", std::to_string(startingActionId)}});
AllUpdates updates{};
std::unique_ptr<ShardokEngine> recommendationEngine;
std::shared_ptr<AvailableCommands> recommendationCommands;
PlayerId recommendationPlayerId = -1;
std::pair<int64_t, PlayerId> recommendationCacheKey;
incomingRegistrations++;
std::vector<net::eagle0::shardok::storage::ShardokActionWithResultingState> awrs;
@@ -558,15 +527,6 @@ auto ShardokGameController::GetUpdates(const int64_t startingActionId) -> AllUpd
*acs->mutable_preview_command() = {
std::begin(previewCommands),
std::end(previewCommands)};
if (engine->GetGameStatus()->state() ==
net::eagle0::shardok::storage::fb::GameStatus_::State_SET_UP &&
engine->GetCurrentPlayerId() == pi.player_id() && !availableCommands.empty()) {
recommendationEngine = std::make_unique<ShardokEngine>(*engine, false);
recommendationCommands = acs;
recommendationPlayerId = pi.player_id();
recommendationCacheKey = {updates.newUnfilteredCount, recommendationPlayerId};
}
}
updates.filteredResults.emplace_back(fid, actionResultViews, acs);
@@ -614,26 +574,22 @@ auto ShardokGameController::GetUpdates(const int64_t startingActionId) -> AllUpd
// Extract battle progress data from the FlatBuffer game state
const auto *gs = engine->GetCurrentGameState().Get();
updates.currentRound = gs->current_round();
updates.playerBattleProgress = PlayerBattleProgressFrom(*gs);
}
if (recommendationEngine) {
std::scoped_lock<std::mutex> recommendationGuard(recommendationLock);
auto cached = recommendedStartingPositionsCache.find(recommendationCacheKey);
if (cached == recommendedStartingPositionsCache.end()) {
cached = recommendedStartingPositionsCache
.emplace(
recommendationCacheKey,
RecommendStartingPositions(
*recommendationEngine,
recommendationPlayerId))
.first;
updates.playerTroopCounts.reserve(gs->player_infos()->size());
for (const auto *player : *gs->player_infos()) {
int32_t troopCount = 0;
for (const auto *unit : *gs->units()) {
if (unit->player_id() != player->player_id()) continue;
switch (unit->status()) {
case net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_RESERVE_UNIT:
case net::eagle0::shardok::storage::fb::UnitStatus_NEVER_ENTERED_UNIT:
troopCount += unit->battalion().size();
break;
default: break;
}
}
updates.playerTroopCounts.emplace_back(player->player_id(), troopCount);
}
recommendationCommands->mutable_recommended_starting_positions()->Reserve(
cached->second.size());
*recommendationCommands->mutable_recommended_starting_positions() = {
cached->second.begin(),
cached->second.end()};
}
return updates;
@@ -735,7 +691,7 @@ auto ShardokGameController::WaitForUpdatesAndPush(
updates.newUnfilteredCount,
updates.currentGameState,
updates.currentRound,
updates.playerBattleProgress);
updates.playerTroopCounts);
}
// Tutorial battle reset: defender lost, signal reset instead of game over
@@ -13,7 +13,6 @@
#include <condition_variable>
#include <ctime>
#include <functional>
#include <map>
#include <memory>
#include <mutex>
#include <optional>
@@ -28,7 +27,6 @@
#include "src/main/cpp/net/eagle0/shardok/library/UnitPlacementInfo.hpp"
#include "src/main/cpp/net/eagle0/shardok/library/fb_helpers/GameStateHelpers.hpp"
#include "src/main/protobuf/net/eagle0/shardok/api/game_state_view.pb.h"
#include "src/main/protobuf/net/eagle0/shardok/api/placement_command.pb.h"
namespace shardok {
using net::eagle0::shardok::api::ActionResultView;
@@ -59,16 +57,6 @@ struct OnePlayerUpdates {
availableCommands(acs) {}
};
struct PlayerBattleProgress {
int32_t playerId;
int32_t troopCount;
bool isRetreating;
};
[[nodiscard]] auto PlayerBattleProgressFrom(
const net::eagle0::shardok::storage::fb::GameState& gameState)
-> std::vector<PlayerBattleProgress>;
/// Result of WaitForUpdatesAndPush indicating how the wait ended
enum class WaitResult {
GAME_OVER, // Game ended normally
@@ -88,7 +76,7 @@ public:
int32_t newUnfilteredCount,
const byte_vector& currentGameState,
int32_t currentRound,
const std::vector<PlayerBattleProgress>& playerBattleProgress) = 0;
const std::vector<std::pair<int32_t, int32_t>>& playerTroopCounts) = 0;
/// Called when the game ends
virtual void OnGameOver(const GameOverInfo& info) = 0;
@@ -133,10 +121,6 @@ private:
std::vector<std::shared_ptr<ShardokAIClient>> aiClients;
std::thread aiThread;
std::mutex recommendationLock{};
std::map<std::pair<int64_t, PlayerId>, std::vector<net::eagle0::shardok::api::PlacementCommand>>
recommendedStartingPositionsCache;
// Each entry maps an Eagle faction id of a non-participant watcher to the
// Shardok pids of participants whose allies list named this watcher. Used
// when generating per-watcher filtered views in GetUpdates.
@@ -199,7 +183,7 @@ public:
int32_t newUnfilteredCount;
byte_vector currentGameState;
int32_t currentRound = 0;
std::vector<PlayerBattleProgress> playerBattleProgress;
std::vector<std::pair<int32_t, int32_t>> playerTroopCounts; // (playerId, troopCount)
};
auto GetUpdates(int64_t startingActionId) -> AllUpdates;
auto GetCurrentGameStateBytes() -> byte_vector;
@@ -12,7 +12,6 @@
#include <optional>
#include <ranges>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
@@ -567,81 +566,9 @@ void ShardokEngine::PostCommand(
const CommandSPtr command = (*cachedAvailableCommands)[commandIndex];
cachedAvailableCommands = nullptr;
if (MaybeInterceptTutorialEndTurn(command)) { return; }
PostActionUnchecked(command, randomGenerator, roll);
}
auto ShardokEngine::MaybeInterceptTutorialEndTurn(const CommandSPtr &command) -> bool {
using net::eagle0::shardok::common::ActionType;
using net::eagle0::shardok::common::CommandType;
if (command->GetCommandType() != CommandType::END_TURN_COMMAND ||
!tutorialController_.IsEnabled()) {
return false;
}
const auto configuredHeroIds = tutorialController_.EndTurnWarningEagleHeroIds();
if (configuredHeroIds.empty()) { return false; }
std::unordered_set<int32_t> warnedHeroIds;
for (const auto &entry : actionHistory) {
const auto &result = entry.action_result();
if (result.type() != ActionType::TUTORIAL_UNUSED_HERO_WARNING) { continue; }
warnedHeroIds.insert(
result.tutorial_warning_eagle_hero_ids().begin(),
result.tutorial_warning_eagle_hero_ids().end());
}
std::unordered_set<UnitId> actedUnitIds;
for (auto entry = actionHistory.rbegin(); entry != actionHistory.rend(); ++entry) {
const auto &result = entry->action_result();
if (result.type() == ActionType::PLAYER_TURN_START && result.has_next_player() &&
result.next_player().value() == command->GetPlayerId()) {
break;
}
if (result.has_actor()) { actedUnitIds.insert(result.actor().value()); }
}
const auto availableCommands = availableCommandsFactory->GetAvailableCommands(
gameState,
command->GetPlayerId(),
/* includeFollowUps=*/true);
std::unordered_set<UnitId> unitsAbleToAct;
for (const auto &availableCommand : *availableCommands) {
const auto proto = availableCommand->GetCommandProto();
if (proto.has_actor()) { unitsAbleToAct.insert(proto.actor().value()); }
}
const std::unordered_set<int32_t> configuredHeroIdSet(
configuredHeroIds.begin(),
configuredHeroIds.end());
std::vector<int32_t> newlyWarnedHeroIds;
for (const auto *unit : *gameState->units()) {
if (unit->player_id() != command->GetPlayerId() || !unit->has_attached_hero() ||
unit->status() != net::eagle0::shardok::storage::fb::UnitStatus_NORMAL_UNIT ||
actedUnitIds.contains(unit->unit_id()) || !unitsAbleToAct.contains(unit->unit_id())) {
continue;
}
const auto eagleHeroId = unit->attached_hero().eagle_hero_id();
if (configuredHeroIdSet.contains(eagleHeroId) && !warnedHeroIds.contains(eagleHeroId)) {
newlyWarnedHeroIds.push_back(eagleHeroId);
}
}
if (newlyWarnedHeroIds.empty()) { return false; }
ActionResultProto warningResult;
warningResult.set_type(ActionType::TUTORIAL_UNUSED_HERO_WARNING);
warningResult.mutable_player()->set_value(command->GetPlayerId());
warningResult.mutable_tutorial_warning_eagle_hero_ids()->Add(
newlyWarnedHeroIds.begin(),
newlyWarnedHeroIds.end());
ApplyAndAddActionResult(warningResult);
return true;
}
void ShardokEngine::PostActionUnchecked(
const CommandSPtr &command,
const std::shared_ptr<RandomGenerator> &randomGenerator,
@@ -82,8 +82,6 @@ private:
const std::shared_ptr<RandomGenerator> &randomGenerator,
std::optional<int32_t> roll);
[[nodiscard]] auto MaybeInterceptTutorialEndTurn(const CommandSPtr &command) -> bool;
public:
// Constructor using existing game state
ShardokEngine(
@@ -56,11 +56,6 @@ public:
/// Returns true if the controller is enabled for this battle.
[[nodiscard]] auto IsEnabled() const -> bool { return enabled_; }
[[nodiscard]] auto EndTurnWarningEagleHeroIds() const -> std::vector<int32_t> {
return {config_.end_turn_warning_eagle_hero_ids().begin(),
config_.end_turn_warning_eagle_hero_ids().end()};
}
/// Check all events at end of round, return actions for triggered events.
/// Events fire in config order - first triggered event executes, then next.
/// Each event fires at most once.
@@ -131,12 +131,6 @@ auto TargetIsHiddenFromOpponents(const ActionResultType type) -> bool {
resultView.clear_target_unit();
}
if (actorIsSelfOrAlly) {
resultView.mutable_tutorial_warning_eagle_hero_ids()->Add(
result.tutorial_warning_eagle_hero_ids().begin(),
result.tutorial_warning_eagle_hero_ids().end());
}
if (result.has_target_coords() &&
(actorIsSelfOrAlly || !TargetIsHiddenFromOpponents(result.type()))) {
*resultView.mutable_target_coords() = result.target_coords();
@@ -590,10 +590,7 @@ auto GuessedHero(const HeroViewProto &hv) -> net::eagle0::shardok::storage::fb::
hero.mutate_bravery(stats.bravery());
hero.mutate_vigor(stats.vigor());
// The battle-start recovery ceiling is internal state and is not part of HeroView.
// Use the visible current vigor as a conservative ceiling rather than inventing
// recovery capacity that the player cannot observe.
hero.mutate_starting_vigor(stats.vigor());
hero.mutate_starting_vigor(stats.starting_vigor());
hero.mutate_spent_vigor(kGuessedHeroStat);
} else {
// Don't believe it's destroyed
@@ -67,6 +67,8 @@ using net::eagle0::shardok::api::HeroView;
stats->set_vigor(hero.vigor());
if (belongsToAsker) {
stats->set_starting_vigor(hero.vigor());
HeroView::StatXp *statXp = filtered.mutable_stat_xp();
statXp->set_strength_xp(hero.strength_xp());
statXp->set_agility_xp(hero.agility_xp());
@@ -78,4 +80,4 @@ using net::eagle0::shardok::api::HeroView;
return filtered;
}
} // namespace shardok
} // namespace shardok
@@ -420,11 +420,10 @@ void EagleInterfaceImpl::PopulateGameStatusResponse(
string(controller->GetCurrentGameStateBytes());
response->mutable_game_update_response()->set_current_round(results.currentRound);
for (const auto &[playerId, troopCount, isRetreating] : results.playerBattleProgress) {
for (const auto &[playerId, troopCount] : results.playerTroopCounts) {
auto *ptc = response->mutable_game_update_response()->add_player_troop_counts();
ptc->set_player_id(playerId);
ptc->set_troop_count(troopCount);
ptc->set_is_retreating(isRetreating);
}
}
}
@@ -540,7 +539,7 @@ auto EagleInterfaceImpl::SubscribeToGame(
int32_t newUnfilteredCount,
const byte_vector &currentGameState,
int32_t currentRound,
const vector<PlayerBattleProgress> &playerBattleProgress) override {
const vector<std::pair<int32_t, int32_t>> &playerTroopCounts) override {
if (!active_) return;
GameStatusResponse response;
@@ -569,11 +568,10 @@ auto EagleInterfaceImpl::SubscribeToGame(
std::string(currentGameState.begin(), currentGameState.end());
response.mutable_game_update_response()->set_current_round(currentRound);
for (const auto &[playerId, troopCount, isRetreating] : playerBattleProgress) {
for (const auto &[playerId, troopCount] : playerTroopCounts) {
auto *ptc = response.mutable_game_update_response()->add_player_troop_counts();
ptc->set_player_id(playerId);
ptc->set_troop_count(troopCount);
ptc->set_is_retreating(isRetreating);
}
ScopedShardokLatencyTrace trace(
@@ -56,13 +56,9 @@ namespace Auth {
/// Routed to Go auth service.
/// </summary>
/// <param name="provider">OAuth provider (Discord, Google, GitHub, Apple)</param>
/// <param name="pollOnly">Whether the client will poll instead of accepting a deep
/// link</param> <returns>Tuple of (URL to open in browser, state token for
/// polling)</returns>
public async Task<(string authUrl, string state)> GetOAuthUrlAsync(
OAuthProvider provider,
bool pollOnly = false) {
var request = new GetOAuthUrlRequest { Provider = provider, PollOnly = pollOnly };
/// <returns>Tuple of (URL to open in browser, state token for polling)</returns>
public async Task<(string authUrl, string state)> GetOAuthUrlAsync(OAuthProvider provider) {
var request = new GetOAuthUrlRequest { Provider = provider };
var response = await _authServiceClient.GetOAuthUrlAsync(request);
Debug.Log($"[AuthClient] Got OAuth URL for {provider}, state={response.State}");
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using common;
using Grpc.Core;
@@ -27,10 +26,6 @@ namespace Auth {
private string _pendingOAuthState; // Queued if OAuth result arrives before auth
// client ready
private const float TokenRefreshCheckIntervalSeconds = 5 * 60f;
private float _nextTokenRefreshCheckTime;
private readonly SemaphoreSlim _tokenRefreshSemaphore = new(1, 1);
// Events for UI updates
public event Action<UserInfo> OnLoginSuccess;
public event Action<string> OnLoginFailed;
@@ -71,40 +66,6 @@ namespace Auth {
CheckCommandLineForDeepLink();
}
private void Update() {
if (Time.unscaledTime < _nextTokenRefreshCheckTime) return;
_nextTokenRefreshCheckTime = Time.unscaledTime + TokenRefreshCheckIntervalSeconds;
TryProactiveTokenRefresh();
}
private void OnApplicationFocus(bool hasFocus) {
if (hasFocus) { TryProactiveTokenRefresh(); }
}
private void OnApplicationPause(bool pauseStatus) {
if (!pauseStatus) { TryProactiveTokenRefresh(); }
}
private void TryProactiveTokenRefresh() {
if (_authClient == null || !TokenStorage.NeedsRefresh ||
!TokenStorage.HasRefreshToken) {
return;
}
_ = RefreshTokenProactivelyAsync();
}
private async Task RefreshTokenProactivelyAsync() {
try {
await EnsureValidTokenAsync();
} catch (Exception ex) {
// A reconnect will make one final refresh attempt and surface an explicit
// authentication error if the refresh token is no longer usable.
Debug.LogWarning($"[OAuthManager] Proactive token refresh failed: {ex.Message}");
}
}
private void CheckCommandLineForDeepLink() {
var args = System.Environment.GetCommandLineArgs();
// Args[0] is the executable path, check remaining args for eagle0:// URLs
@@ -320,13 +281,8 @@ namespace Auth {
_currentLoginProvider = provider; // Track for later storage
try {
#if UNITY_EDITOR
const bool pollOnly = true;
#else
const bool pollOnly = false;
#endif
// Get OAuth URL and state from server
var (authUrl, state) = await _authClient.GetOAuthUrlAsync(provider, pollOnly);
var (authUrl, state) = await _authClient.GetOAuthUrlAsync(provider);
// Open system browser
Debug.Log($"[OAuthManager] Opening browser for OAuth: {authUrl}");
@@ -454,15 +410,9 @@ namespace Auth {
/// </summary>
public async Task EnsureValidTokenAsync() {
EnsureConfigured();
await _tokenRefreshSemaphore.WaitAsync();
try {
// Re-check after acquiring the semaphore because another caller may have
// completed the refresh while this caller was waiting.
if (TokenStorage.NeedsRefresh && TokenStorage.HasRefreshToken) {
await _authClient.RefreshTokenAsync();
}
} finally { _tokenRefreshSemaphore.Release(); }
if (TokenStorage.NeedsRefresh && TokenStorage.HasRefreshToken) {
await _authClient.RefreshTokenAsync();
}
}
/// <summary>
@@ -8,8 +8,6 @@ namespace Auth {
/// </summary>
[Serializable]
public class StoredAccount {
private const long RefreshEarlySeconds = 30 * 60;
public string Provider; // "discord" or "google"
public string UserId; // OAuth provider user ID
public string DisplayName; // User's display name
@@ -28,7 +26,7 @@ namespace Auth {
public bool NeedsRefresh {
get {
var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
return ExpiresAt > 0 && ExpiresAt - now < RefreshEarlySeconds;
return ExpiresAt > 0 && ExpiresAt - now < 300; // 5 minutes
}
}
}
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using eagle;
using Eagle0.Tutorial;
using Net.Eagle0.Eagle.Api;
using Net.Eagle0.Eagle.Common;
using Net.Eagle0.Eagle.Views;
@@ -37,7 +38,11 @@ public class AvailableGameItem : MonoBehaviour {
}
}
public void JoinClicked() { JoinCallback(gameId, SelectedLeaderTextId); }
public void JoinClicked() {
// Track multiplayer status for tutorial system
TutorialManager.IsMultiplayerGame = maxHumanPlayerCount > 1;
JoinCallback(gameId, SelectedLeaderTextId);
}
public void DropClicked() { DropCallback?.Invoke(gameId); }
@@ -12,6 +12,7 @@ using common;
using common.GUIUtils;
using common.WhatsNew;
using eagle;
using Eagle0.Tutorial;
using Grpc.Core;
using Grpc.Core.Interceptors;
using Net.Eagle0.Eagle.Api;
@@ -143,8 +144,6 @@ public class ConnectionHandler : MonoBehaviour, ILobbySubscriber, IDisposable {
List<GameInfo> fetchedRunningGames;
List<AvailableLeader> fetchedNewGameLeaders;
private Task<EagleGameController> _eagleScenePreloadTask;
private long _acceptedGameId;
private EagleConnection eagleConnection;
private PersistentClientConnection _persistentClientConnection;
private HttpClient _httpClient;
@@ -302,9 +301,10 @@ public class ConnectionHandler : MonoBehaviour, ILobbySubscriber, IDisposable {
// Refresh stored account buttons
RefreshStoredAccountButtons();
// Show a sign-in hint for new users who have no stored accounts.
// Show sign-in tutorial for new users who have no stored accounts
var accounts = OAuthManager.Instance?.GetStoredAccounts();
if (accounts == null || accounts.Count == 0) {
TutorialManager.Instance?.OnGameEvent("auth_panel_shown");
// Show hint for users coming from invitation flow
SetOAuthStatusText(InvitationSignInHint);
// Exit fullscreen so user can see browser with the sign-in link
@@ -854,6 +854,9 @@ public class ConnectionHandler : MonoBehaviour, ILobbySubscriber, IDisposable {
// Clear loading indicator now that lobby is populated
if (lobbyStatusText != null) { lobbyStatusText.text = ""; }
// Trigger lobby tutorial for users who haven't seen it
TutorialManager.Instance?.OnGameEvent("lobby_entered");
});
}
@@ -894,8 +897,7 @@ public class ConnectionHandler : MonoBehaviour, ILobbySubscriber, IDisposable {
_persistentClientConnection = new PersistentClientConnection(
eagleConnection.EagleGrpcClient,
eagleConnection.credentials,
EagleConnection.EagleCancellationToken,
TryRefreshAuthenticationOnMainThreadAsync);
EagleConnection.EagleCancellationToken);
_persistentClientConnection.OnChannelDead = () => {
// Queue to main thread to avoid threading issues
MainQueue.Q.Enqueue(() => {
@@ -916,28 +918,6 @@ public class ConnectionHandler : MonoBehaviour, ILobbySubscriber, IDisposable {
ResourceFetcher.SetUpConnection(_httpClient);
}
private Task<bool> TryRefreshAuthenticationOnMainThreadAsync() {
var completion =
new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
MainQueue.Q.Enqueue(async () => {
try {
if (OAuthManager.Instance == null) {
completion.TrySetResult(false);
return;
}
await OAuthManager.Instance.EnsureValidTokenAsync();
completion.TrySetResult(TokenStorage.HasValidToken);
} catch (Exception ex) {
Debug.LogWarning($"[ConnectionHandler] Session refresh failed: {ex.Message}");
completion.TrySetResult(false);
}
});
return completion.Task;
}
private void _internalCustomBattle() {
// Connection already exists when called from lobby
_persistentClientConnection.SetLobbySubscriber(this);
@@ -1004,6 +984,9 @@ public class ConnectionHandler : MonoBehaviour, ILobbySubscriber, IDisposable {
private void ConfirmDropGame(long gameId) { _ = _internalDropGame(gameId); }
private void CreateGame(string leaderNameTextId, int humanPlayerCount, int totalPlayerCount) {
// Track multiplayer status for tutorial system
TutorialManager.IsMultiplayerGame = humanPlayerCount > 1;
TutorialManager.IsTutorialGame = false;
var game = _internalCreateGame(leaderNameTextId, humanPlayerCount, totalPlayerCount);
}
@@ -1015,6 +998,8 @@ public class ConnectionHandler : MonoBehaviour, ILobbySubscriber, IDisposable {
}
public void CreateTutorialGame(TutorialPhase startPhase) {
TutorialManager.IsMultiplayerGame = false;
TutorialManager.IsTutorialGame = true;
var game = _internalCreateGame(
desiredLeaderTextId: "",
humanPlayerCount: 1,
@@ -1041,20 +1026,11 @@ public class ConnectionHandler : MonoBehaviour, ILobbySubscriber, IDisposable {
switch (response.Result) {
case JoinGameResult.SuccessJoinGameResult: SelectEagleGame(response.GameId); break;
default:
Debug.LogError($"Game creation failed: {response.Result}");
_ = ResetGameCreation();
break;
default: Debug.LogError($"Game creation failed: {response.Result}"); break;
}
} catch (Exception e) { Console.WriteLine(e.ToString()); }
}
public void HandleCreateGameAcceptedResponse(CreateGameAcceptedResponse response) {
_acceptedGameId = response.GameId;
createGameItem.SetCreating(true);
if (_eagleScenePreloadTask == null) { _eagleScenePreloadTask = PreloadEagleScene(); }
}
public void HandleCustomBattleResponse(CustomBattleResponse response) {
try {
customBattleHandler.HandleCustomBattleResponse(response);
@@ -1188,13 +1164,9 @@ public class ConnectionHandler : MonoBehaviour, ILobbySubscriber, IDisposable {
SetLobbyActive(false);
var selectedPersistentConnection = _persistentClientConnection;
var selectedEnvironmentName = ConnectedEnvironmentName;
var eagleController = _acceptedGameId == gameId && _eagleScenePreloadTask != null
? await _eagleScenePreloadTask
: GameSceneManager.Instance == null
var eagleController = GameSceneManager.Instance == null
? eagleCanvas?.GetComponent<EagleGameController>()
: await GameSceneManager.Instance.TransitionToEagle();
_eagleScenePreloadTask = null;
_acceptedGameId = 0;
if (eagleController == null) {
Debug.LogError(
"Cannot select Eagle game because the Eagle scene did not provide an " +
@@ -1220,31 +1192,6 @@ public class ConnectionHandler : MonoBehaviour, ILobbySubscriber, IDisposable {
selectedPersistentConnection,
selectedEnvironmentName);
ShowEaglePanel(eagleCanvas);
createGameItem.SetCreating(false);
}
}
private async Task<EagleGameController> PreloadEagleScene() {
var eagleController = GameSceneManager.Instance == null
? eagleCanvas?.GetComponent<EagleGameController>()
: await GameSceneManager.Instance.TransitionToEagle();
var loadedCanvas = eagleController?.GetComponent<Canvas>();
if (loadedCanvas != null) { loadedCanvas.gameObject.SetActive(false); }
return eagleController;
}
private async Task ResetGameCreation() {
createGameItem.SetCreating(false);
_acceptedGameId = 0;
var preloadTask = _eagleScenePreloadTask;
_eagleScenePreloadTask = null;
if (preloadTask != null) {
try {
await preloadTask;
} catch (Exception e) { Debug.LogException(e); }
}
if (GameSceneManager.Instance != null) {
await GameSceneManager.Instance.UnloadEagleScene();
}
}
}
@@ -22,8 +22,6 @@ public class CreateGameItem : MonoBehaviour {
private List<AvailableLeader> availableLeaders;
private void Awake() { SetCreating(false); }
public string SelectedLeaderTextId {
get {
if (heroDropdownController.SelectedHeroId == 0) {
@@ -39,11 +37,6 @@ public class CreateGameItem : MonoBehaviour {
CreateCallback(SelectedLeaderTextId, totalHumansDropdown.value + 1, TotalPlayerCount);
}
public void SetCreating(bool creating) {
createButton.interactable = !creating;
buttonText.text = creating ? "CREATING…" : "CREATE";
}
public void SetHumanPlayersDropdown() {
var currentValue = totalHumansDropdown.value;
totalHumansDropdown.ClearOptions();
@@ -56,6 +49,8 @@ public class CreateGameItem : MonoBehaviour {
public void SetCreationOptions(List<AvailableLeader> leaders) {
this.availableLeaders = leaders;
buttonText.text = "CREATE";
List<HeroView> heroOptions =
new List<HeroView> { new() { Id = 0, Profession = Profession.NoProfession } };
for (int i = 0; i < leaders.Count; i++) {
@@ -9,6 +9,8 @@ public class DropGameConfirmationPanel : MonoBehaviour {
private long _pendingGameId;
void Awake() { gameObject.SetActive(false); }
public void Show(long gameId, string message) {
_pendingGameId = gameId;
if (messageText != null) { messageText.text = message; }
@@ -24,11 +24,9 @@ namespace eagle {
public void
Populate(ShardokBattleView battle, IGameModel model, Action<string> goToBattleAction) {
model.Provinces.TryGetValue(battle.DefenderProvince, out var pv);
provinceLabel.text =
RetreatingLabel(AttackerOriginsText(battle, model), battle.AttackerRetreating);
defenderProvinceLabel.text = RetreatingLabel(
pv != null ? pv.Name : $"Province {battle.DefenderProvince}",
battle.DefenderRetreating);
provinceLabel.text = AttackerOriginsText(battle, model);
defenderProvinceLabel.text =
pv != null ? pv.Name : $"Province {battle.DefenderProvince}";
bool isSelf = battle.PlayerInfos.Any(pi => pi.Hostility == Hostility.SelfHostility);
bool isAllied = isSelf ||
@@ -63,8 +61,6 @@ namespace eagle {
thermometer.defenderLabel.text = battle.DefenderTroopCount.Value.ToString();
} else {
thermometer.UpdateBalance(battle.DefenderRatio, defColor, atkColors);
thermometer.attackerLabel.text = "???";
thermometer.defenderLabel.text = "???";
}
actionButton.onClick.RemoveAllListeners();
@@ -138,11 +134,6 @@ namespace eagle {
return $"Province {provinceId}";
}
private static string RetreatingLabel(string label, bool isRetreating) {
if (!isRetreating) return label;
return string.IsNullOrEmpty(label) ? "Retreating" : $"{label} (Retreating)";
}
private void SetFightButtonTutorialRegistration(bool shouldRegister) {
var registry = TutorialManager.Instance?.TargetRegistry;
if (registry == null) return;
@@ -37,7 +37,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 60, y: 35}
m_SizeDelta: {x: 80, y: 48}
m_SizeDelta: {x: 80, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &42355368
MonoBehaviour:
@@ -618,7 +618,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 160, y: 35}
m_SizeDelta: {x: 80, y: 48}
m_SizeDelta: {x: 80, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &710430062
GameObject:
@@ -1618,7 +1618,7 @@ RectTransform:
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -100, y: 35}
m_SizeDelta: {x: 160, y: 48}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1531553116
MonoBehaviour:
@@ -22,6 +22,10 @@ namespace eagle {
private ChronicleEntry CurrentEntry => _entries[_currentIndex];
private void Awake() {
TouchTargetUtils.EnsureMinimumTouchTargets(previousButton, nextButton);
}
public void OnTextUpdate(string text, bool completed) { SetUp(); }
public string TextId() { return _entries.Count > 0 ? CurrentEntry.GeneratedTextId : null; }
@@ -41,7 +41,7 @@ namespace eagle {
}
public static void SaveCompletedText(long gameId, string llmId, string text) {
if (String.IsNullOrEmpty(llmId) || String.IsNullOrEmpty(text)) { return; }
if (String.IsNullOrEmpty(llmId)) { return; }
lock (Lock) {
if (_cacheDirectory == null) {
@@ -97,8 +97,8 @@ namespace eagle {
if (cache?.entries == null) { return; }
foreach (var entry in cache.entries) {
if (!String.IsNullOrEmpty(entry.llmId) && !String.IsNullOrEmpty(entry.text)) {
gameCache.entries[entry.llmId] = entry.text;
if (!String.IsNullOrEmpty(entry.llmId)) {
gameCache.entries[entry.llmId] = entry.text ?? "";
}
}
} catch (Exception e) {
@@ -12,13 +12,10 @@ namespace eagle {
public class TextEntry {
public string Text { get; }
public bool Completed { get; }
public string StreamAttemptId { get; }
public TextEntry(string text, bool completed, string streamAttemptId = "") {
public TextEntry(string text, bool completed) {
Text = text ?? throw new ArgumentNullException(nameof(text));
Completed = completed;
StreamAttemptId =
streamAttemptId ?? throw new ArgumentNullException(nameof(streamAttemptId));
}
}
@@ -63,11 +60,8 @@ namespace eagle {
_pendingUpdates.Clear();
foreach (var (llmId, text) in completedTexts) {
// A completed entry with no content was produced by an invalid empty LLM
// stream. Do not tell the server that this legacy cache entry is complete;
// omitting it lets the repaired server request regenerate and resend it.
if (String.IsNullOrEmpty(llmId) || String.IsNullOrEmpty(text)) { continue; }
_streamingTexts[llmId] = new TextEntry(text, true);
if (String.IsNullOrEmpty(llmId)) { continue; }
_streamingTexts[llmId] = new TextEntry(text ?? "", true);
_pendingUpdates.Add(llmId);
}
}
@@ -77,33 +71,20 @@ namespace eagle {
/// Updates the text dictionary. Thread-safe - can be called from any thread.
/// Listeners are NOT notified here; call ProcessPendingUpdates from main thread.
/// </summary>
public String HandleNewStreamingText(
String llmId,
String newText,
Int32 knownByteCount,
bool completed,
String streamAttemptId = "") {
public String
HandleNewStreamingText(String llmId, String newText, Int32 knownByteCount, bool completed) {
if (llmId == null) { throw new ArgumentNullException(nameof(llmId)); }
if (newText == null) { throw new ArgumentNullException(nameof(newText)); }
if (streamAttemptId == null) {
throw new ArgumentNullException(nameof(streamAttemptId));
}
lock (_lock) {
var currentText = "";
var retainedByteCount = 0;
if (_streamingTexts.TryGetValue(llmId, out var entry)) {
currentText = entry.Text;
if (entry.StreamAttemptId == streamAttemptId) {
retainedByteCount = knownByteCount;
}
}
if (_streamingTexts.TryGetValue(llmId, out var entry)) { currentText = entry.Text; }
var currentTextBytes = Encoding.UTF8.GetBytes(currentText);
var truncatedBytes = currentTextBytes.Take(retainedByteCount).ToArray();
var truncatedBytes = currentTextBytes.Take(knownByteCount).ToArray();
var updatedText = Encoding.UTF8.GetString(truncatedBytes) + newText;
_streamingTexts[llmId] = new TextEntry(updatedText, completed, streamAttemptId);
_streamingTexts[llmId] = new TextEntry(updatedText, completed);
// Mark this text ID as having pending updates
_pendingUpdates.Add(llmId);
@@ -137,8 +137,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 85
m_PreferredHeight: 85
m_FlexibleWidth: -1
@@ -21,6 +21,7 @@ namespace eagle {
for (int i = 0; i < contentsCount; i++) {
int buttonIndex = i;
var newButton = Instantiate(buttonPrefab, buttonsContainer.transform);
TouchTargetUtils.EnsureMinimumTouchTarget(newButton);
newButton.GetComponentInChildren<RawImage>().texture = contents[buttonIndex].image;
newButton.onClick.AddListener(() => gameController.SelectButtonIndex(buttonIndex));
File diff suppressed because it is too large Load Diff
@@ -63,7 +63,7 @@ namespace eagle {
{ AvailableCommand.SealedValueOneofCase.SwearBrotherhoodCommand, "swear-kinship" },
{ AvailableCommand.SealedValueOneofCase.TradeCommand, "trade" },
{ AvailableCommand.SealedValueOneofCase.TrainCommand, "train" },
{ AvailableCommand.SealedValueOneofCase.VisitTownCommand, "visit-town" },
{ AvailableCommand.SealedValueOneofCase.TravelCommand, "travel" },
};
private readonly struct CommandInfo {
@@ -219,10 +219,8 @@ namespace eagle {
"Exchange food and gold using the province's buy and sell prices.") },
{ AvailableCommand.SealedValueOneofCase.TrainCommand,
new CommandInfo("Train", "Have a hero train to improve their abilities.") },
{ AvailableCommand.SealedValueOneofCase.VisitTownCommand,
new CommandInfo(
"Visit Town",
"Have the ruling hero visit the current province's town to unlock local commands.") },
{ AvailableCommand.SealedValueOneofCase.TravelCommand,
new CommandInfo("Travel", "Move a hero between provinces without moving an army.") },
};
public EagleGameController mainController;
@@ -245,8 +243,6 @@ namespace eagle {
public Button commitCommandButton;
public TextMeshProUGUI commitButtonText;
public Button infoButton;
public TextMeshProUGUI underAttackText;
public Transform specializationLayout;
public IGameModel Model { get; set; }
public ErrorHandler errorHandler;
public CommandWarningPanelController commandWarningPanelController;
@@ -372,7 +368,7 @@ namespace eagle {
public void Awake() {
commandSelectors = new List<CommandSelector>();
foreach (Transform child in specializationLayout) {
foreach (Transform child in gameObject.transform) {
var sel = child.gameObject.GetComponent<CommandSelector>();
if (sel != null) { commandSelectors.Add(sel); }
}
@@ -385,6 +381,8 @@ namespace eagle {
public void Start() {
foreach (var kvp in commandSelectors) { kvp.gameObject.SetActive(false); }
TouchTargetUtils.EnsureMinimumTouchTarget(commitCommandButton);
TouchTargetUtils.EnsureMinimumTouchTarget(infoButton);
}
public void Update() {
@@ -2115,10 +2115,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 125
m_PreferredHeight: 48
m_PreferredHeight: 25
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -1161,9 +1161,9 @@ MonoBehaviour:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: 48
m_MinHeight: -1
m_PreferredWidth: 150
m_PreferredHeight: 48
m_PreferredHeight: 32
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -2155,10 +2155,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_MinWidth: -1
m_MinHeight: 44
m_PreferredWidth: 225
m_PreferredHeight: 48
m_PreferredHeight: 44
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -2963,10 +2963,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_MinWidth: -1
m_MinHeight: 44
m_PreferredWidth: 225
m_PreferredHeight: 48
m_PreferredHeight: 44
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -3071,10 +3071,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_MinWidth: -1
m_MinHeight: 44
m_PreferredWidth: 225
m_PreferredHeight: 48
m_PreferredHeight: 44
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -3998,10 +3998,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_MinWidth: -1
m_MinHeight: 44
m_PreferredWidth: 225
m_PreferredHeight: 48
m_PreferredHeight: 44
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -5822,9 +5822,9 @@ MonoBehaviour:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: 48
m_MinHeight: -1
m_PreferredWidth: 150
m_PreferredHeight: 48
m_PreferredHeight: 32
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -555,9 +555,9 @@ MonoBehaviour:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: 48
m_MinHeight: -1
m_PreferredWidth: 150
m_PreferredHeight: 48
m_PreferredHeight: 32
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -2307,9 +2307,9 @@ MonoBehaviour:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: 48
m_MinHeight: -1
m_PreferredWidth: 150
m_PreferredHeight: 48
m_PreferredHeight: 32
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -2576,10 +2576,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_MinWidth: -1
m_MinHeight: 44
m_PreferredWidth: 225
m_PreferredHeight: 48
m_PreferredHeight: 44
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -3345,10 +3345,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_MinWidth: -1
m_MinHeight: 44
m_PreferredWidth: 225
m_PreferredHeight: 48
m_PreferredHeight: 44
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -3917,9 +3917,9 @@ MonoBehaviour:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: 48
m_MinHeight: 44
m_PreferredWidth: 200
m_PreferredHeight: 48
m_PreferredHeight: 44
m_FlexibleWidth: 0
m_FlexibleHeight: 0
m_LayoutPriority: 1
@@ -5707,10 +5707,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 125
m_PreferredHeight: 48
m_PreferredHeight: 25
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -4402,10 +4402,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_MinWidth: -1
m_MinHeight: 44
m_PreferredWidth: 150
m_PreferredHeight: 48
m_PreferredHeight: 44
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -572,7 +572,6 @@ GameObject:
m_Component:
- component: {fileID: 9063570085238334375}
- component: {fileID: 7255705380449941913}
- component: {fileID: 9100000000000000201}
m_Layer: 0
m_Name: Lock
m_TagString: Untagged
@@ -797,7 +796,6 @@ GameObject:
- component: {fileID: 1927873372456662095}
- component: {fileID: 579296918478550819}
- component: {fileID: 4587657740126355967}
- component: {fileID: 9100000000000000202}
m_Layer: 0
m_Name: Devastation Toggle
m_TagString: Untagged
@@ -1202,7 +1200,6 @@ GameObject:
m_Component:
- component: {fileID: 5270310487800380897}
- component: {fileID: 2327285081336772738}
- component: {fileID: 9100000000000000203}
m_Layer: 0
m_Name: Lock
m_TagString: Untagged
@@ -1948,7 +1945,6 @@ GameObject:
- component: {fileID: 3117163427893374906}
- component: {fileID: 4817183911828687387}
- component: {fileID: 4307944766613959021}
- component: {fileID: 9100000000000000204}
m_Layer: 0
m_Name: Economy Toggle
m_TagString: Untagged
@@ -2539,7 +2535,6 @@ GameObject:
- component: {fileID: 4943719427635584319}
- component: {fileID: 1624135427163740082}
- component: {fileID: 3649755510827586979}
- component: {fileID: 9100000000000000205}
m_Layer: 0
m_Name: Agriculture Toggle
m_TagString: Untagged
@@ -2734,7 +2729,6 @@ GameObject:
m_Component:
- component: {fileID: 7980102133610567528}
- component: {fileID: 7826769704341099561}
- component: {fileID: 9100000000000000206}
m_Layer: 0
m_Name: Lock
m_TagString: Untagged
@@ -2895,7 +2889,6 @@ GameObject:
m_Component:
- component: {fileID: 33654934627540799}
- component: {fileID: 4759915228927732221}
- component: {fileID: 9100000000000000207}
m_Layer: 0
m_Name: Lock
m_TagString: Untagged
@@ -4009,7 +4002,6 @@ GameObject:
- component: {fileID: 4103879905621038639}
- component: {fileID: 5294436050907953632}
- component: {fileID: 7680661694278740015}
- component: {fileID: 9100000000000000208}
m_Layer: 0
m_Name: Infrastructure Toggle
m_TagString: Untagged
@@ -4505,163 +4497,3 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: bd19585e1f7d445a3b2c459d2c8535eb, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &9100000000000000201
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1382658920502641030}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &9100000000000000202
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1575326401059928320}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &9100000000000000203
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2449159195461577259}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &9100000000000000204
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3953852845382787669}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &9100000000000000205
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5165403539164238665}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &9100000000000000206
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5492998529588505869}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &9100000000000000207
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5591836015222019972}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
--- !u!114 &9100000000000000208
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7994236895301891522}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_PreferredWidth: -1
m_PreferredHeight: -1
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -407,7 +407,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 338.31927, y: -12.923078}
m_SizeDelta: {x: 96.75219, y: 48}
m_SizeDelta: {x: 96.75219, y: 44}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &7706371227584479729
MonoBehaviour:
@@ -1294,7 +1294,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 59.126343, y: -12.923078}
m_SizeDelta: {x: 118.25268, y: 48}
m_SizeDelta: {x: 118.25268, y: 44}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &3005629370892248399
MonoBehaviour:
@@ -2192,7 +2192,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 204.09793, y: -12.923078}
m_SizeDelta: {x: 131.69049, y: 48}
m_SizeDelta: {x: 131.69049, y: 44}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1248166195846916077
MonoBehaviour:
@@ -3622,7 +3622,7 @@ MonoBehaviour:
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
m_ChildControlWidth: 1
m_ChildControlHeight: 0
m_ChildControlHeight: 1
m_ChildScaleWidth: 0
m_ChildScaleHeight: 0
m_ReverseArrangement: 0
@@ -4258,7 +4258,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 756.95197, y: -12.923078}
m_SizeDelta: {x: 107.50243, y: 48}
m_SizeDelta: {x: 107.50243, y: 44}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &50070872754773658
CanvasRenderer:
@@ -4476,7 +4476,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 465.82172, y: -12.923078}
m_SizeDelta: {x: 118.25268, y: 48}
m_SizeDelta: {x: 118.25268, y: 44}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &6791613139375434283
MonoBehaviour:
@@ -5008,7 +5008,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 604.0744, y: -12.923078}
m_SizeDelta: {x: 118.25268, y: 48}
m_SizeDelta: {x: 118.25268, y: 44}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &159881109546823439
MonoBehaviour:
@@ -1797,9 +1797,9 @@ MonoBehaviour:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 170
m_MinHeight: 48
m_MinHeight: 40
m_PreferredWidth: 170
m_PreferredHeight: 48
m_PreferredHeight: 40
m_FlexibleWidth: 0
m_FlexibleHeight: 0
m_LayoutPriority: 1
@@ -4191,10 +4191,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_PreferredWidth: 48
m_PreferredHeight: 48
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 18
m_PreferredHeight: 18
m_FlexibleWidth: 0
m_FlexibleHeight: 0
m_LayoutPriority: 1
@@ -4560,9 +4560,9 @@ MonoBehaviour:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: 48
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: 48
m_PreferredHeight: 20
m_FlexibleWidth: 1
m_FlexibleHeight: 0
m_LayoutPriority: 1
@@ -7825,8 +7825,8 @@ RectTransform:
m_Children: []
m_Father: {fileID: 906553694472734689}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 0.5, y: 0.5}
@@ -7860,7 +7860,7 @@ MonoBehaviour:
m_Calls: []
m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 0
m_PreserveAspect: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
@@ -8631,9 +8631,9 @@ MonoBehaviour:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 100
m_MinHeight: 48
m_MinHeight: 44
m_PreferredWidth: 200
m_PreferredHeight: 48
m_PreferredHeight: 44
m_FlexibleWidth: 0
m_FlexibleHeight: 0
m_LayoutPriority: 1
@@ -9193,8 +9193,8 @@ RectTransform:
m_Children: []
m_Father: {fileID: 5006087206053140860}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 32, y: 32}
m_Pivot: {x: 0.5, y: 0.5}
@@ -9228,7 +9228,7 @@ MonoBehaviour:
m_Calls: []
m_Sprite: {fileID: 10913, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 0
m_PreserveAspect: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
@@ -9383,10 +9383,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_PreferredWidth: 48
m_PreferredHeight: 48
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 18
m_PreferredHeight: 18
m_FlexibleWidth: 0
m_FlexibleHeight: 0
m_LayoutPriority: 1
@@ -9537,10 +9537,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_PreferredWidth: 48
m_PreferredHeight: 48
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 18
m_PreferredHeight: 18
m_FlexibleWidth: 0
m_FlexibleHeight: 0
m_LayoutPriority: 1
@@ -10282,9 +10282,9 @@ MonoBehaviour:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 100
m_MinHeight: 48
m_MinHeight: 44
m_PreferredWidth: 200
m_PreferredHeight: 48
m_PreferredHeight: 44
m_FlexibleWidth: 0
m_FlexibleHeight: 0
m_LayoutPriority: 1
@@ -10405,9 +10405,9 @@ MonoBehaviour:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: 48
m_MinHeight: -1
m_PreferredWidth: -1
m_PreferredHeight: 48
m_PreferredHeight: 20
m_FlexibleWidth: 1
m_FlexibleHeight: 0
m_LayoutPriority: 1
@@ -10670,10 +10670,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_PreferredWidth: 48
m_PreferredHeight: 48
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 18
m_PreferredHeight: 18
m_FlexibleWidth: 0
m_FlexibleHeight: 0
m_LayoutPriority: 1
@@ -1425,9 +1425,9 @@ MonoBehaviour:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 135
m_MinHeight: 48
m_MinHeight: 44
m_PreferredWidth: 150
m_PreferredHeight: 48
m_PreferredHeight: 44
m_FlexibleWidth: 0
m_FlexibleHeight: 0
m_LayoutPriority: 1
@@ -3986,8 +3986,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_MinWidth: 0
m_MinHeight: -1
m_PreferredWidth: 80
m_PreferredHeight: 48
m_FlexibleWidth: -1
@@ -1102,10 +1102,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_MinWidth: -1
m_MinHeight: 44
m_PreferredWidth: 120
m_PreferredHeight: 48
m_PreferredHeight: 44
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -1120,7 +1120,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 75, y: -15}
m_SizeDelta: {x: 150, y: 48}
m_SizeDelta: {x: 150, y: 44}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7054265081857237224
CanvasRenderer:
@@ -1230,9 +1230,9 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_IgnoreLayout: 0
m_MinWidth: -1
m_MinHeight: 48
m_MinHeight: 44
m_PreferredWidth: 150
m_PreferredHeight: 48
m_PreferredHeight: 44
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -324,7 +324,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 215, y: 24}
m_SizeDelta: {x: 250, y: 48}
m_SizeDelta: {x: 250, y: 44}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1949439835697595086
MonoBehaviour:
@@ -1434,7 +1434,7 @@ RectTransform:
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 194, y: -42}
m_SizeDelta: {x: 160, y: 48}
m_SizeDelta: {x: 160, y: 44}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7346251710853780603
CanvasRenderer:
@@ -13,7 +13,7 @@ GameObject:
- component: {fileID: 6289363470016652304}
- component: {fileID: 1398189250911451454}
m_Layer: 0
m_Name: Visit Town Panel
m_Name: Travel Panel
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -102,7 +102,7 @@ GameObject:
- component: {fileID: 7408366842504297803}
- component: {fileID: 2299640137554880340}
m_Layer: 0
m_Name: Visit Town command description
m_Name: Travel command description
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@@ -3907,10 +3907,10 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.LayoutElement
m_IgnoreLayout: 0
m_MinWidth: 48
m_MinHeight: 48
m_MinWidth: -1
m_MinHeight: -1
m_PreferredWidth: 125
m_PreferredHeight: 48
m_PreferredHeight: 25
m_FlexibleWidth: -1
m_FlexibleHeight: -1
m_LayoutPriority: 1
@@ -93,7 +93,17 @@ namespace eagle {
new AttackDecisionSelectedCommand { Decision = SelectedDecision }
};
private void EnsureTouchTargets() {
TouchTargetUtils.EnsureMinimumTouchTargets(
advanceToggle,
demandTributeToggle,
withdrawToggle,
safePassageToggle);
TouchTargetUtils.EnsureMinimumTouchHeights(goldSlider, foodSlider);
}
protected override void SetUpUI() {
EnsureTouchTargets();
unitsTable.RowCount = AttackDecisionCommand.ActingUnits.Count;
AttackDecisionCommand.ActingUnits.Each((cu, idx) => {
@@ -233,6 +243,7 @@ namespace eagle {
private void ConfigureToggle(Toggle toggle, bool available) {
if (toggle == null) return;
TouchTargetUtils.EnsureMinimumTouchTarget(toggle);
toggle.gameObject.SetActive(true);
toggle.interactable = available;
@@ -100,7 +100,14 @@ namespace eagle {
}
}
private void EnsureTouchTargets() {
TouchTargetUtils.EnsureMinimumTouchTargets(keepProvinceToggle, withdrawToggle);
TouchTargetUtils.EnsureMinimumTouchHeight(destinationDropdown);
TouchTargetUtils.EnsureMinimumTouchHeights(goldSlider, foodSlider);
}
protected override void SetUpUI() {
EnsureTouchTargets();
unitsTable.RowCount = BattleAftermathCommand.SurvivingUnits.Count;
BattleAftermathCommand.SurvivingUnits.Each((cu, idx) => {
CombatUnitRowController row = unitsTable.ComponentAt<CombatUnitRowController>(idx);
@@ -174,6 +181,7 @@ namespace eagle {
private void ConfigureToggle(Toggle toggle, bool available) {
if (toggle == null) return;
TouchTargetUtils.EnsureMinimumTouchTarget(toggle);
toggle.gameObject.SetActive(true);
toggle.interactable = available;
toggle.group = null;
@@ -114,7 +114,5 @@ namespace eagle {
// Note: Command tutorials are now opened explicitly instead of automatic popups.
// See CommandPanelController.ShowCurrentCommandHelp() for the help-panel flow.
}
public void UpdateModel(IGameModel model) { _model = model; }
}
}
@@ -158,15 +158,7 @@ namespace eagle {
var attackingFactionNames = DefendCommand.HostileFactionIds
.Select(factionId => _model.FactionName(factionId))
.ToList();
var originProvinceNames =
_model.Provinces[ActingProvinceId]
.KnownIncomingArmies
.Where(army => DefendCommand.HostileFactionIds.Contains(army.FactionId))
.Select(army => _model.Provinces[army.OriginProvinceId].Name)
.Distinct()
.OrderBy(name => name);
marchText.text = $"Attack from {String.Join(", ", originProvinceNames)} by " +
$"{String.Join(", ", attackingFactionNames)}!";
marchText.text = $"Attack from {String.Join(", ", attackingFactionNames)}!";
commanderCountText.text = $"{DefendCommand.HostileHeroCount}";
troopCountText.text = $"{DefendCommand.HostileTroopCount}";
@@ -135,6 +135,18 @@ namespace eagle {
}
}
private void EnsureTouchTargets() {
TouchTargetUtils.EnsureMinimumTouchTargets(
economyToggle,
agricultureToggle,
infrastructureToggle,
devastationToggle,
economyLockToggle,
agricultureLockToggle,
infrastructureLockToggle,
devastationLockToggle);
}
private void UpdateLockToggleVisibility() {
var selectedType = SelectedType;
var types = new[] {
@@ -181,6 +193,7 @@ namespace eagle {
if (toggle == null) return;
TouchTargetUtils.EnsureMinimumTouchTarget(toggle);
// Always show the toggle, but disable if not available
toggle.gameObject.SetActive(true);
toggle.interactable = available;
@@ -223,6 +236,7 @@ namespace eagle {
}
protected override void SetUpUI() {
EnsureTouchTargets();
var improveCommand = ImproveAvailableCommand;
orderedHeroes = ImproveAvailableCommand.AvailableHeroIds.Select(id => _model.Heroes[id])
@@ -67,6 +67,17 @@ namespace eagle {
_availableCommand.ManagePrisonerCommand;
private ProvinceId ActingProvinceId => ManagePrisonersCommand.ActingProvinceId;
private void EnsureTouchTargets() {
TouchTargetUtils.EnsureMinimumTouchTargets(
ReleaseToggle,
MoveToggle,
ExileToggle,
ExecuteToggle,
ReturnToggle,
NextHeroButton);
TouchTargetUtils.EnsureMinimumTouchHeight(moveToDropdown);
}
public override bool WarnOnCommitButton => false;
public override string CommitWarningText =>
$"This will create a treaty with {_model.FactionName(SelectedHero.FactionId.Value)}";
@@ -127,6 +138,7 @@ namespace eagle {
}
protected override void SetUpUI() {
EnsureTouchTargets();
MoveToggle.onValueChanged.RemoveListener(MoveToggled);
MoveToggle.onValueChanged.AddListener(MoveToggled);
if (_selectedHeroIndex >= ManagePrisonersCommand.Prisoners.Count)
@@ -309,6 +321,7 @@ namespace eagle {
private void ConfigureToggle(Toggle toggle, bool available) {
if (toggle == null) return;
TouchTargetUtils.EnsureMinimumTouchTarget(toggle);
toggle.gameObject.SetActive(true);
toggle.interactable = available;
@@ -29,6 +29,7 @@ namespace eagle {
private string cachedWarningText = "";
private const string NoProvinceSelectedText = "Select...";
private const float NarrowStepInactiveAlpha = 0.55f;
private const float NarrowSliderHandleSize = 32f;
private bool HasNoneOption => toDropdown.options.Last().text == NoProvinceSelectedText;
@@ -297,6 +298,7 @@ namespace eagle {
.Where(batt => availableBattalionIds.Contains(batt.Id))
.ToList();
unitSelector.includeRecommendedConfigButtonInTouchTargets = !UsesNarrowTabs;
unitSelector.SetUpUnits(
_model,
SelectedOneProvinceCommand.AvailableHeroIds.ToList(),
@@ -440,6 +442,10 @@ namespace eagle {
NarrowUnitsTab.SetActive(unitsStep);
UpdateRecommendedButtonState();
if (routeStep) { EnsureNarrowRouteTouchTargets(); }
if (unitsStep) {
unitSelector.EnsureTouchTargets(includeRecommendedConfigButton: false);
}
UpdateNarrowTabVisuals();
}
@@ -450,6 +456,18 @@ namespace eagle {
private GameObject NarrowUnitsTab => selectedUnitsColumn.transform.parent.gameObject;
private void EnsureNarrowRouteTouchTargets() {
TouchTargetUtils.EnsureMinimumTouchHeight(fromDropdown);
TouchTargetUtils.EnsureMinimumTouchHeight(toDropdown);
TouchTargetUtils.EnsureMinimumTouchHeight(goldSlider);
TouchTargetUtils.EnsureMinimumTouchHeight(foodSlider);
KeepSliderHandlesSquare(goldSlider);
KeepSliderHandlesSquare(foodSlider);
foreach (var button in routeAndSuppliesColumn.GetComponentsInChildren<Button>(true)) {
TouchTargetUtils.EnsureMinimumTouchTarget(button);
}
}
private void UpdateNarrowTabVisuals() {
if (!IsNarrowLayout) return;
@@ -478,6 +496,19 @@ namespace eagle {
layoutElement.flexibleWidth = flexibleWidth;
}
private static void KeepSliderHandlesSquare(Slider slider) {
var handle = slider.handleRect;
handle.anchorMin = new Vector2(handle.anchorMin.x, 0.5f);
handle.anchorMax = new Vector2(handle.anchorMax.x, 0.5f);
handle.sizeDelta = new Vector2(NarrowSliderHandleSize, NarrowSliderHandleSize);
}
private void LateUpdate() {
if (_availableCommand == null || !IsNarrowLayout) return;
KeepSliderHandlesSquare(goldSlider);
KeepSliderHandlesSquare(foodSlider);
}
private void ClearWarningTextListener() {
if (warningTextListener != null) {
ClientTextProvider.Provider.RemoveListener(warningTextListener);
@@ -58,6 +58,7 @@ namespace eagle {
}
protected override void SetUpUI() {
TouchTargetUtils.EnsureMinimumTouchTarget(nextHeroButton);
if (_selectedHeroIndex >= HeroCount) { _selectedHeroIndex = 0; }
DisplayHero();
nextHeroButton.gameObject.SetActive(HeroCount > 1);
@@ -54,6 +54,7 @@ namespace eagle {
}
protected override void SetUpUI() {
TouchTargetUtils.EnsureMinimumTouchTargets(payToggle, nextFactionButton);
_demands = new List<TributeAndFaction>(ResolveTributeAvailableCommand.Demands);
_demandIndex = 0;
DisplayDemand();
@@ -64,23 +65,14 @@ namespace eagle {
var demandingFaction = _model.MaybeDestroyedFaction(SelectedDemand.DemandingFactionId);
factionDescription.text =
$"{DisplayNames.ResolvedFactionString(demandingFaction, _model)} demands tribute!";
goldAmountLabel.text = SelectedDemand.TributeDemanded.Gold.ToString();
foodAmountLabel.text = SelectedDemand.TributeDemanded.Food.ToString();
var armiesForFaction =
_model.Provinces[ActingProvinceId]
.KnownIncomingArmies
.Where(ai => ai.FactionId == SelectedDemand.DemandingFactionId)
.ToList();
var originProvinceNames =
armiesForFaction.Select(army => _model.Provinces[army.OriginProvinceId].Name)
.Distinct()
.OrderBy(name => name);
var incomingArmyLabel = armiesForFaction.Count == 1 ? "army" : "armies";
factionDescription.text =
$"{DisplayNames.ResolvedFactionString(demandingFaction, _model)} demands tribute!\n" +
$"Incoming {incomingArmyLabel} from {String.Join(", ", originProvinceNames)}.";
var armiesForFaction = _model.Provinces[ActingProvinceId].KnownIncomingArmies.Where(
ai => ai.FactionId == SelectedDemand.DemandingFactionId);
incomingHeroCount.text = SelectedDemand.HeroCount.ToString();
incomingTroopsCount.text = SelectedDemand.TroopCount.ToString();
@@ -0,0 +1,21 @@
using System;
using Net.Eagle0.Eagle.Api;
namespace eagle {
using ProvinceId = Int32;
public class TravelCommandSelector : CommandSelector {
public override AvailableCommand.SealedValueOneofCase CommandType =>
AvailableCommand.SealedValueOneofCase.TravelCommand;
public override string HeaderString => "Travel";
public override string CommitButtonString => "Commit Travel";
private TravelAvailableCommand TravelAvailableCommand => _availableCommand.TravelCommand;
private ProvinceId ActingProvinceId => TravelAvailableCommand.ActingProvinceId;
protected override void SetUpUI() {}
public override SelectedCommand Command =>
new SelectedCommand { TravelCommand = new TravelSelectedCommand() };
}
}

Some files were not shown because too many files have changed in this diff Show More