Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
ecd48ef
feat(bridge): scaffold static binpatch hook path alongside the JB bui…
tkgstrator Jun 15, 2026
8e849f4
feat(bridge): phase D — gate binpatch build, hot-fix MSHookFunction o…
tkgstrator Jun 15, 2026
983fcb3
build(make): add `make ipa` end-to-end patched-IPA pipeline target (#3)
tkgstrator Jun 15, 2026
7b4d9c1
chore: update shared submodules
tkgstrator Jun 15, 2026
b1c03d8
refactor: use Common shared headers
tkgstrator Jun 15, 2026
19f8086
fix(binpatch): phase E ABI fix and protocol doc (working baseline)
tkgstrator Jun 15, 2026
c578d08
chore: bump Shared submodule to rewritten master
tkgstrator Jun 15, 2026
28c4857
ci: add commitlint, run integration on develop, fix theos toolchain
tkgstrator Jun 15, 2026
45af7bd
feat: enable jailed build flavor with vendored dobby
tkgstrator Jun 15, 2026
06cb275
ci: bump actions/checkout to v5 and add dependabot
tkgstrator Jun 15, 2026
a4a34ad
chore: sync .gitignore dobby comment with IPA-Patch/KiouEditor
tkgstrator Jun 15, 2026
38527d4
chore: align deployment workflow with integration and add dev hooks
tkgstrator Jun 16, 2026
3ae3927
fix(inject-F): restore cave-bypass entry for binpatch injection
tkgstrator Jun 16, 2026
0f9cf35
refactor: rename public functions to PascalCase and overhaul protocol…
tkgstrator Jun 16, 2026
e2beb06
refactor: rename Kiou-prefixed functions to Keb prefix
tkgstrator Jun 16, 2026
8488537
refactor: change Keb prefix to KEB (ObjC convention)
tkgstrator Jun 16, 2026
cee3172
docs: simplify extended USI protocol design
tkgstrator Jun 16, 2026
65aba53
docs: use PascalCase for meta subcommand names (YaneuraOu convention)
tkgstrator Jun 16, 2026
2b8a41c
feat(csa): Wave 1 — convert lib, USI deprecation, TCP server
tkgstrator Jun 16, 2026
5acf82d
feat(csa): Wave 2 — engine state machine, Game_Summary, resign
tkgstrator Jun 16, 2026
4cd20ce
feat(csa): Wave 3 — tests + docs
tkgstrator Jun 16, 2026
35bf463
fix(csa): auto-START after Game_Summary so KIOU CPU moves are not dro…
tkgstrator Jun 16, 2026
13097b4
fix(csa): read remaining time from GameStateStore +0x80/0x90 +0x20
tkgstrator Jun 17, 2026
eca187c
fix(csa): wall-clock T<n> fallback always available (also on first move)
tkgstrator Jun 17, 2026
dd26acf
feat(csa): auto-renegotiate on TCP reconnect mid-match
tkgstrator Jun 17, 2026
8914f8b
fix(csa): drop piece type from hand delta + promote bit from prev SFEN
tkgstrator Jun 17, 2026
8043380
feat(csa): pre-inject legality validators (drop on occupied, nifu, etc)
tkgstrator Jun 17, 2026
c050e96
fix(csa): promotion legality + prev-SFEN refresh on emit nil
tkgstrator Jun 17, 2026
a063042
feat(csa): #ILLEGAL_MOVE on inject_apply rejection
tkgstrator Jun 17, 2026
99aef8e
fix(csa): hop mid-match auto-renegotiate to the Unity main queue
tkgstrator Jun 17, 2026
63ca7ba
fix(csa): swap validator live-SFEN read to inject_currentSfen (thread…
tkgstrator Jun 17, 2026
2ebd303
fix(csa): run engine-submitted moves on the Unity main queue
tkgstrator Jun 17, 2026
04fb301
debug(csa): log each step of csa_apply_engine_move
tkgstrator Jun 17, 2026
e0a0d9a
fix(inject): avoid deadlock when inject_apply called from main queue
tkgstrator Jun 17, 2026
af37564
feat(validate): add per-piece reachability check to ValidateCsaMove
tkgstrator Jun 17, 2026
c781325
feat(validate): add must-promote check for FU/KY/KE
tkgstrator Jun 17, 2026
bbfe610
fix(validate): seed g_csaPrevSfen from Game_Summary starting position
tkgstrator Jun 17, 2026
0563630
fix(csa): eliminate LOGIN/PLAYING flip-flop race condition
tkgstrator Jun 17, 2026
bdd8326
debug(csa): add caller name to state transition logs
tkgstrator Jun 17, 2026
e58baba
feat(bridge): add KIOU_Sfen extension and use it for board init
tkgstrator Jun 17, 2026
4e7180c
chore: ignore large binary assets (YaneuraOu, nn.bin)
tkgstrator Jun 17, 2026
5e46996
perf: reduce inject animation delay 400ms→150ms, add bridge interval
tkgstrator Jun 17, 2026
857ff05
perf: set INJECT_ANIMATION_DELAY_SEC to 0
tkgstrator Jun 17, 2026
d48134b
fix(csa): derive To_Move from SFEN side-to-move, not hardcoded '+'
tkgstrator Jun 17, 2026
b1bf745
fix(csa): defer Game_Summary on match_start to avoid scene-create wat…
tkgstrator Jun 17, 2026
081bbbe
docs: rewrite README — strip internal sections, align with KiouForge
tkgstrator Jun 17, 2026
36f0d5e
chore: exclude .claude/plans, settings.local.json, scripts, docs/plan…
tkgstrator Jun 17, 2026
8a56058
chore: align Makefile and CI workflows with KiouForge
tkgstrator Jun 17, 2026
6950174
fix(binpatch): wire GameStateStore hooks; drop legacy USI/WS code
tkgstrator Jun 17, 2026
9e09ee8
chore: rename Common submodule to Chinlan, update API calls
tkgstrator Jun 17, 2026
da9c3b9
fix(review): address Copilot review comments
tkgstrator Jun 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .claude/.gitkeep
Empty file.
23 changes: 23 additions & 0 deletions .commitlintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
extends:
- "@commitlint/config-conventional"
rules:
header-max-length:
- 2
- always
- 96
type-enum:
- 2
- always
- - build
- ui
- ci
- docs
- feat
- fix
- perf
- refactor
- revert
- format
- test
- chore
104 changes: 104 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04
ARG _REMOTE_USER_HOME=/home/vscode

# ── Reverse Engineering Tools + Theos 依存パッケージ (apt) ──
RUN \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get update && apt-get install -y --no-install-recommends \
wget \
unzip \
jq \
radare2 \
apktool \
make \
perl \
fakeroot \
zip \
xz-utils \
lzma \
xxd \
binutils \
libtinfo6 \
libxml2 \
libncurses6 \
libz3-dev \
adb \
android-sdk-platform-tools \
# ── agent-iossolve 向け追加ツール ────────────────────────
# libimobiledevice: idevicesyslog で os_log 取得 (rootless iOS には log コマンドが無いため、SSH 経由ではなく USB 経由が現実的)
# class-dump: Ubuntu 24.04 で利用可能 (universe)。recon の主力
# socat / netcat: JB 機との中継、port forward
# file: Mach-O / FAT 判定
libimobiledevice-utils \
libimobiledevice6 \
ideviceinstaller \
libplist-utils \
socat \
netcat-openbsd \
file \
llvm

# ── jadx (GitHub Release) ──
# Android APK → Java 逆コンパイル (プラットフォーム非依存 JAR、JRE は devcontainer feature の Java で提供)
RUN JADX_URL=$(wget -qO- https://api.github.com/repos/skylot/jadx/releases/latest | jq -r '.assets[] | select(.name | test("^jadx-[0-9].*\\.zip$")) | .browser_download_url') && \
wget -q "$JADX_URL" -O /tmp/jadx.zip && \
unzip -q /tmp/jadx.zip -d /opt/jadx && \
ln -s /opt/jadx/bin/jadx /usr/local/bin/jadx && \
ln -s /opt/jadx/bin/jadx-gui /usr/local/bin/jadx-gui && \
rm /tmp/jadx.zip

# ── Ghidra (Headless) ──
# NSA 製リバースエンジニアリングツール。ヘッドレスモードで C++ 擬似コード生成に使用
# 使い方: analyzeHeadless /tmp/project name -import <binary>
RUN GHIDRA_URL=$(wget -qO- https://api.github.com/repos/NationalSecurityAgency/ghidra/releases/latest | jq -r '.assets[] | select(.name | test("PUBLIC.*\\.zip$")) | .browser_download_url') && \
wget -q "$GHIDRA_URL" -O /tmp/ghidra.zip && \
unzip -q /tmp/ghidra.zip -d /opt && \
GHIDRA_DIR=$(find /opt -maxdepth 1 -name 'ghidra_*' -type d) && \
ln -s "$GHIDRA_DIR" /opt/ghidra && \
rm /tmp/ghidra.zip
ENV PATH="/opt/ghidra/support:$PATH"

# ── ipsw ──
# Go 製 Mach-O 解析ツール。iOS バイナリの ObjC/Swift クラスダンプ、シンボル解析に使用
# 使い方: ipsw macho info <binary> --class-dump
RUN IPSW_URL=$(wget -qO- https://api.github.com/repos/blacktop/ipsw/releases/latest | jq -r '.assets[] | select(.name | test("^ipsw_.*linux_arm64\\.tar\\.gz$")) | .browser_download_url') && \
wget -q "$IPSW_URL" -O /tmp/ipsw.tar.gz && \
tar xzf /tmp/ipsw.tar.gz -C /usr/local/bin ipsw && \
rm /tmp/ipsw.tar.gz

# ── yq (mikefarah/yq, Go 製) ──
# YAML 操作。agent-iossolve の hook 仕様 YAML を扱う recon/frida エージェントが使う
RUN ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/') && \
YQ_URL=$(wget -qO- https://api.github.com/repos/mikefarah/yq/releases/latest | jq -r --arg arch "$ARCH" '.assets[] | select(.name == "yq_linux_\($arch)") | .browser_download_url') && \
wget -q "$YQ_URL" -O /usr/local/bin/yq && \
chmod +x /usr/local/bin/yq

# ── Theos 本体 ──
USER vscode
ENV THEOS=/home/vscode/theos
RUN git clone --recursive https://github.com/theos/theos.git ${THEOS}

# ── Toolchain (L1ghtmann, aarch64 対応) ──
RUN ARCH=$(uname -m) && \
curl -fsSL "https://github.com/L1ghtmann/llvm-project/releases/latest/download/iOSToolchain-${ARCH}.tar.xz" \
| tar xJ -C ${THEOS}/toolchain

# ── Swift Toolchain (kabiroberai, iOS クロスコンパイル用) ──
RUN ARCH=$(uname -m) && \
curl -fsSL "https://github.com/kabiroberai/swift-toolchain-linux/releases/download/v2.3.0/swift-5.8-ubuntu22.04-${ARCH}.tar.xz" \
| tar xJ -C ${THEOS}/toolchain

# ── ホスト Swift (SPM ビルド用) ──
USER root
RUN ARCH=$(uname -m) && \
curl -fsSL "https://download.swift.org/swift-5.8.1-release/ubuntu2204-${ARCH}/swift-5.8.1-RELEASE/swift-5.8.1-RELEASE-ubuntu22.04-${ARCH}.tar.gz" \
| tar xz --strip-components=2 -C /usr
USER vscode

# ── iOS SDKs (15.6 + 16.5) ──
RUN curl -fsSL "https://github.com/theos/sdks/archive/master.tar.gz" \
| tar xz -C /tmp && \
mv /tmp/sdks-master/iPhoneOS15.6.sdk ${THEOS}/sdks/ && \
mv /tmp/sdks-master/iPhoneOS16.5.sdk ${THEOS}/sdks/ && \
rm -rf /tmp/sdks-master
15 changes: 15 additions & 0 deletions .devcontainer/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
app:
build:
context: .
dockerfile: Dockerfile
volumes:
- ../:/home/vscode/app:cached
- venv:/home/vscode/app/.venv
network_mode: host
tty: true
stdin_open: true

volumes:
venv:
driver: local
49 changes: 49 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"features": {
"ghcr.io/devcontainers-extra/features/ffmpeg-apt-get:1": {
"version": "1.0.17",
"resolved": "ghcr.io/devcontainers-extra/features/ffmpeg-apt-get@sha256:735491c8e9b2236cae727d6d4904663f6a58eb131d8c4b6b18fd0eea3d8c5b71",
"integrity": "sha256:735491c8e9b2236cae727d6d4904663f6a58eb131d8c4b6b18fd0eea3d8c5b71"
},
"ghcr.io/devcontainers/features/common-utils:2": {
"version": "2.5.7",
"resolved": "ghcr.io/devcontainers/features/common-utils@sha256:dbf431d6b42d55cde50fa1df75c7f7c3999a90cde6d73f7a7071174b3c3d0cc4",
"integrity": "sha256:dbf431d6b42d55cde50fa1df75c7f7c3999a90cde6d73f7a7071174b3c3d0cc4"
},
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "1.1.0",
"resolved": "ghcr.io/devcontainers/features/github-cli@sha256:d22f50b70ed75339b4eed1ba9ecde3a1791f90e88d37936517e3bace0bbad671",
"integrity": "sha256:d22f50b70ed75339b4eed1ba9ecde3a1791f90e88d37936517e3bace0bbad671"
},
"ghcr.io/devcontainers/features/java:1": {
"version": "1.8.0",
"resolved": "ghcr.io/devcontainers/features/java@sha256:9663ce0219ff85786e87901ce5f0a59f488edd5f99b46015192cda48468b233a",
"integrity": "sha256:9663ce0219ff85786e87901ce5f0a59f488edd5f99b46015192cda48468b233a"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "1.7.1",
"resolved": "ghcr.io/devcontainers/features/node@sha256:8c0de46939b61958041700ee89e3493f3b2e4131a06dc46b4d9423427d06e5f6",
"integrity": "sha256:8c0de46939b61958041700ee89e3493f3b2e4131a06dc46b4d9423427d06e5f6"
},
"ghcr.io/devcontainers/features/python:1": {
"version": "1.8.0",
"resolved": "ghcr.io/devcontainers/features/python@sha256:fbcad6955caeecc5ad3f7886baf652e25cba5225a6c4c2287c536de2e5607511",
"integrity": "sha256:fbcad6955caeecc5ad3f7886baf652e25cba5225a6c4c2287c536de2e5607511"
},
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {
"version": "1.0.0",
"resolved": "ghcr.io/jsburckhardt/devcontainer-features/uv@sha256:542a0bc2203205b3c696de650ba862f280b20af3543493cc232edd9ac35791f7",
"integrity": "sha256:542a0bc2203205b3c696de650ba862f280b20af3543493cc232edd9ac35791f7"
},
"ghcr.io/shyim/devcontainers-features/bun:0": {
"version": "0.0.1",
"resolved": "ghcr.io/shyim/devcontainers-features/bun@sha256:689eae681aa08981175829a59953ba67a7d311f6a05c15d1bbbcb2da2839827e",
"integrity": "sha256:689eae681aa08981175829a59953ba67a7d311f6a05c15d1bbbcb2da2839827e"
},
"ghcr.io/stu-bell/devcontainer-features/claude-code:0": {
"version": "0.1.0",
"resolved": "ghcr.io/stu-bell/devcontainer-features/claude-code@sha256:f87b4da3f8648db9111cb25c6bd3817d096018d81f3fb596340f7ffdba14409a",
"integrity": "sha256:f87b4da3f8648db9111cb25c6bd3817d096018d81f3fb596340f7ffdba14409a"
}
}
}
74 changes: 74 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"name": "Kiou Engine Bridge",
"dockerComposeFile": [
"compose.yaml"
],
"service": "app",
"workspaceFolder": "/home/vscode/app",
"shutdownAction": "stopCompose",
"remoteUser": "vscode",
"remoteEnv": {
"WAKATIME_API_KEY": "${localEnv:WAKATIME_API_KEY}",
"GH_TOKEN": "${localEnv:GH_TOKEN}",
"UV_LINK_MODE": "copy",
"ANTHROPIC_BASE_URL": "${localEnv:ANTHROPIC_BASE_URL}",
"ANTHROPIC_AUTH_TOKEN": "${localEnv:ANTHROPIC_AUTH_TOKEN}"
},
"containerEnv": {
"CLAUDE_CONFIG_DIR": "/home/vscode/.claude"
},
"mounts": [
"source=${env:HOME}/.aws,target=/home/vscode/.aws,type=bind,consistency=cached,readonly",
"source=${env:HOME}/.claude,target=/home/vscode/.claude,type=bind,consistency=cached",
"source=${env:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached,readonly",
"source=${env:HOME}/.config/gh,target=/home/vscode/.config/gh,type=bind,consistency=cached",
"source=${env:HOME}/.codex,target=/home/vscode/.codex,type=bind,consistency=cached",
"source=${env:HOME}/.gnupg,target=/home/vscode/.gnupg-host,type=bind,consistency=cached,readonly"
],
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"configureZshAsDefaultShell": true
},
"ghcr.io/devcontainers/features/python:1": {
"version": "3.12"
},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {},
"ghcr.io/stu-bell/devcontainer-features/claude-code:0": {},
"ghcr.io/devcontainers/features/node:1": {
"version": "25.9.0"
},
"ghcr.io/devcontainers-extra/features/ffmpeg-apt-get:1": {},
"ghcr.io/shyim/devcontainers-features/bun:0": {},
"ghcr.io/devcontainers/features/java:1": {
"version": "21",
"installMaven": false,
"installGradle": false
}
},
"otherPortsAttributes": {
"onAutoForward": "ignore"
},
"postAttachCommand": "/bin/sh .devcontainer/postAttachCommand.sh",
"postCreateCommand": "/bin/sh .devcontainer/postCreateCommand.sh",
"customizations": {
"vscode": {
"extensions": [
"Anthropic.claude-code",
"EditorConfig.EditorConfig",
"PKief.material-icon-theme",
"antfu.file-nesting",
"bierner.markdown-preview-github-styles",
"charliermarsh.ruff",
"jebbs.markdown-extended",
"ms-python.black-formatter",
"ms-python.python",
"pHofer94.vscode-taskviewexplorer",
"redhat.vscode-yaml",
"swiftlang.swift-vscode",
"tamasfe.even-better-toml"
],
"settings": {}
}
}
}
9 changes: 9 additions & 0 deletions .devcontainer/postAttachCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

git config --global --unset commit.template
git config --global --add safe.directory /home/vscode/app
git config --global fetch.prune true
git config --global --add --bool push.autoSetupRemote true
git config --global commit.gpgSign false
git config --global user.signingkey $(gpg --list-secret-keys --with-colons | grep -B 3 "uid.*$(git config user.name)" | cut -d: -f5 | sed ':a;N;$!ba;s/\n//g')
git branch --merged|egrep -v '\*|develop|main|master'|xargs git branch -d
4 changes: 4 additions & 0 deletions .devcontainer/postCreateCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

sudo chown -R "$(whoami)":"$(whoami)" /home/"$(whoami)"/app/.venv
uv sync
50 changes: 50 additions & 0 deletions .devcontainer/theos/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
FROM mcr.microsoft.com/devcontainers/base:ubuntu-24.04

# ── Theos + Swift 依存パッケージ ──
RUN \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
--mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get update && apt-get install -y --no-install-recommends \
make \
perl \
fakeroot \
zip \
unzip \
xz-utils \
lzma \
libtinfo6 \
libxml2 \
libncurses6 \
libz3-dev

# ── Theos 本体 ──
USER vscode
ENV THEOS=/home/vscode/theos
RUN git clone --recursive https://github.com/theos/theos.git ${THEOS}

# ── Toolchain (L1ghtmann, aarch64 対応) ──
RUN ARCH=$(uname -m) && \
curl -fsSL "https://github.com/L1ghtmann/llvm-project/releases/latest/download/iOSToolchain-${ARCH}.tar.xz" \
| tar xJ -C ${THEOS}/toolchain

# ── Swift Toolchain (kabiroberai, iOS クロスコンパイル用) ──
RUN ARCH=$(uname -m) && \
curl -fsSL "https://github.com/kabiroberai/swift-toolchain-linux/releases/download/v2.3.0/swift-5.8-ubuntu22.04-${ARCH}.tar.xz" \
| tar xJ -C ${THEOS}/toolchain

# ── ホスト Swift (SPM ビルド用) ──
USER root
RUN ARCH=$(uname -m) && \
curl -fsSL "https://download.swift.org/swift-5.8.1-release/ubuntu2204-${ARCH}/swift-5.8.1-RELEASE/swift-5.8.1-RELEASE-ubuntu22.04-${ARCH}.tar.gz" \
| tar xz --strip-components=2 -C /usr
USER vscode

# ── iOS SDKs (15.6 + 16.5) ──
RUN curl -fsSL "https://github.com/theos/sdks/archive/master.tar.gz" \
| tar xz -C /tmp && \
mv /tmp/sdks-master/iPhoneOS15.6.sdk ${THEOS}/sdks/ && \
mv /tmp/sdks-master/iPhoneOS16.5.sdk ${THEOS}/sdks/ && \
rm -rf /tmp/sdks-master

# ── ビルド用作業ディレクトリ ──
WORKDIR /home/vscode/app
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
* text=auto eol=lf

# Binary assets — never normalize.
*.webp binary
*.png binary
*.jpg binary
*.a binary
*.dylib binary
*.deb binary
31 changes: 31 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Dependabot keeps the GitHub Actions `uses:` references and our git
# submodules up-to-date. Two ecosystems (github-actions, gitsubmodule)
# each run weekly, so the cap is one PR per ecosystem per week —
# action bumps are grouped into a single PR.
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
groups:
actions:
patterns:
- "*"
commit-message:
prefix: ci
include: scope
labels:
- dependencies
- github-actions

- package-ecosystem: gitsubmodule
directory: "/"
schedule:
interval: weekly
commit-message:
prefix: chore
include: scope
labels:
- dependencies
- submodules
Loading
Loading