Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
06b293c
Merge pull request #5 from pur1fying/feature/service
Kiramei Nov 21, 2025
126bd75
Merge branch 'pur1fying:master' into master
Kiramei Nov 21, 2025
3d2e4e7
Restore: feature/service
Kiramei Nov 21, 2025
888ecb3
Fix: uv does need setuptools to support adb
Kiramei Nov 21, 2025
a5ec905
Merge branch 'pur1fying:master' into master
Kiramei Nov 23, 2025
a6c1425
Update: Check local version every time
Kiramei Nov 24, 2025
eea393a
Merge branch 'master' into fix-rich
Kiramei Dec 3, 2025
72e520a
Merge pull request #7 from pur1fying/fix-rich
Kiramei Dec 3, 2025
8234386
Update requirements for Sub Utils and rich package
Kiramei Dec 3, 2025
51269d6
Fix: Refactor logging to use rich formatting and centralize setup
Kiramei Dec 3, 2025
8019db5
Update utils.py
Kiramei Dec 3, 2025
ad1d81c
Merge branch 'pur1fying:master' into master
Kiramei Dec 11, 2025
66cc91c
Merge branch 'pur1fying:master' into master
Kiramei Dec 13, 2025
fd25214
Feat: Add the frontend part
Kiramei Dec 16, 2025
bcb55b7
Update: Add update-to-latest functionality and refactor update logic
Kiramei Dec 18, 2025
52c65ba
Feat: Docker Support For Service Mode
Kiramei Dec 18, 2025
0e9b10e
Merge pull request #8 from Kiramei/feat/docker-support
Kiramei Dec 18, 2025
bffaa18
Merge branch 'pur1fying:master' into master
Kiramei Dec 18, 2025
0396caf
Refactor: installer logic refactor
Kiramei Dec 18, 2025
127fddf
Merge pull request #9 from Kiramei/feat/docker-support
Kiramei Dec 18, 2025
d6a0e90
Merge branch 'pur1fying:master' into master
Kiramei Dec 18, 2025
e6e29b3
Fix: Add DotPrinter for progress feedback and improve temp dir usage
Kiramei Dec 18, 2025
61c5c1d
Fix: MirrorC param pass error
Kiramei Dec 19, 2025
4c30b25
Update: Optimize Docker Size
Kiramei Dec 19, 2025
cf213fd
Merge branch 'pur1fying:master' into master
Kiramei Dec 30, 2025
a121c5f
Merge branch 'pur1fying:master' into master
Kiramei Jan 9, 2026
942f822
Merge branch 'master' into pr/430
pur1fying Feb 2, 2026
7b89d5f
Merge branch 'pur1fying:master' into master
Kiramei Apr 13, 2026
454d348
Sync: Move reqs to deploy/service
Kiramei Apr 15, 2026
323832d
Pre: Remote control
Kiramei Apr 21, 2026
fc74f04
Dev Feature Remote
Kiramei Apr 22, 2026
0ba1f46
Merge pull request #10 from pur1fying/master
Kiramei Apr 22, 2026
dd37166
Fix: Use ws-scrcpy for remote
Kiramei May 15, 2026
b0048c4
Feat: Support login persistence
Kiramei Jun 6, 2026
56c5ab2
Merge pull request #11 from Kiramei/dev/feature_remote
Kiramei Jun 6, 2026
307c760
Update: Toml Dependency Updated
Kiramei Jun 11, 2026
6d5e42f
Fix: Adb requires pkg_resources-equipped setuptools
Kiramei Jun 11, 2026
84204cd
Fix: Tauri Origin Wrongly Banned
Kiramei Jun 13, 2026
023524b
Merge branch 'pur1fying:master' into master
Kiramei Jun 14, 2026
f71a83c
Refactor: improve service code readability
Kiramei Jun 14, 2026
fc27f6b
Fix: Remove test holder and solve naming bug
Kiramei Jun 15, 2026
05b7359
Update: Support backend self update
Kiramei Jun 15, 2026
1f04311
Fix: Config not compatible
Kiramei Jun 15, 2026
a2189ad
Fix: Forgot to upload setup_schema.py
Kiramei Jun 15, 2026
5ed19b0
Fix: Not running at the checked state
Kiramei Jun 15, 2026
25d3db8
Fix: Extract ocr update process
Kiramei Jun 15, 2026
ba91c3a
Update: Add fork sync action
Kiramei Jun 16, 2026
af68eed
Merge branch 'pur1fying:master' into master
Kiramei Jun 16, 2026
b880100
Fix: Incorrect Workflow Permission
Kiramei Jun 16, 2026
62f0f98
Feat: Add CNB Sync Workflow
Kiramei Jun 17, 2026
8e65d25
Update: Separate Dev and Stable Ver
Kiramei Jun 17, 2026
bebf160
Update: Optimize the Sync flow
Kiramei Jun 17, 2026
f2137af
Fix: CNB-Sync lock within master
Kiramei Jun 17, 2026
03f85bc
Fix: Pass Package Check under Remote Mode
Kiramei Jun 18, 2026
70fe99a
Feat: Add config import export commands
Kiramei Jun 18, 2026
9e215ea
Fix: Config Not Sync to Frontend
Kiramei Jun 18, 2026
6e3f841
Update: Test Source Stream Mode
Kiramei Jun 18, 2026
cc5665d
Fix PR review issues
Kiramei Jun 18, 2026
d6cb0e1
Fix: Unknown Task Displayed on start-tasks
Kiramei Jun 18, 2026
76650f7
Fix: Auth signing key incorrectly generated
Kiramei Jun 18, 2026
c003da7
Fix: Workflow Trigger Pull Error
Kiramei Jun 18, 2026
7cb4f9a
Fix sync PR creation on older gh CLI
Kiramei Jun 18, 2026
dc97a1b
Merge pull request #12 from Kiramei/sync/upstream-master
Kiramei Jun 18, 2026
179ecce
Fix: Unify the timestamp to ms
Kiramei Jun 22, 2026
5a83f88
Update: Support no_update setup option
Kiramei Jun 23, 2026
2d0f95f
Fix: Limit SHA source test timeout
Kiramei Jun 23, 2026
0dc501d
Merge dev/optim SHA source timeout
Kiramei Jun 23, 2026
8cc7e07
Fix: Preserve git_backend setup option
Kiramei Jun 25, 2026
c09627a
Fix: Preserve legacy git_backend setup option
Kiramei Jun 25, 2026
c3127f7
Fix: Prefer legacy git_backend over auto
Kiramei Jun 25, 2026
41ae035
Adapt service backend for Android runtime
Kiramei Jun 28, 2026
4a83617
Adapt Android runtime controls and updates
Kiramei Jun 28, 2026
b4b71a2
Add Android wiki proxy
Kiramei Jun 28, 2026
8424e67
Add Android runtime backend support
Kiramei Jun 28, 2026
eababfa
Use Android OCR shared library runtime
Kiramei Jun 28, 2026
dd23694
Load Android libc++ before OCR library
Kiramei Jun 28, 2026
5fd1832
Use packaged Android libc++ for OCR runtime
Kiramei Jun 28, 2026
f31c79b
Keep Android OCR dependency libraries loaded
Kiramei Jun 28, 2026
d5a4966
Load Android OCR libraries through JVM
Kiramei Jun 28, 2026
ca31517
Use app NativeLoader for Android OCR libraries
Kiramei Jun 28, 2026
c6a6138
Fallback to OCR runtime libc++ on Android
Kiramei Jun 28, 2026
842a68f
Load Android OCR dependencies globally
Kiramei Jun 28, 2026
3c45d2d
Isolate Android OCR libc++ runtime
Kiramei Jun 28, 2026
8c0ded8
Fix Android OCR server start signature
Kiramei Jun 28, 2026
4a20988
Use local uiautomator2 for Android embedded control
Kiramei Jun 28, 2026
8e747cf
Fix Android uiautomator and cafe matching
Kiramei Jun 29, 2026
455caf2
Fix SHA source probing outside git repos
Kiramei Jun 29, 2026
a8ab353
Fix Android OCR prebuild loading
Kiramei Jun 29, 2026
9bd06fe
Fix Android update source probing
Kiramei Jun 29, 2026
41805a4
Improve Android runtime update handling
Kiramei Jun 29, 2026
a157e65
Report Android update download progress
Kiramei Jun 29, 2026
08d22e5
Adjust Android display size during script runs
Kiramei Jun 29, 2026
585549f
Fix: Create service locks lazily
Kiramei Jun 30, 2026
35dafe3
Fix: Speed up Android cafe interactions
Kiramei Jun 30, 2026
a24aedb
Refactor: Inject service runtime behavior inside service
Kiramei Jun 30, 2026
2766c38
Refactor: Isolate service runtime patches
Kiramei Jun 30, 2026
70aba72
Fix: Allow Android start without display resize
Kiramei Jun 30, 2026
4b024ee
Fix: Support service logger injection variants
Kiramei Jun 30, 2026
c4423a5
Fix: Lock Android local control mode
Kiramei Jun 30, 2026
79749c5
Merge pull request #14 from Kiramei/sync/upstream-master
Kiramei Jun 30, 2026
101c60d
Fix: Isolate service runtime injections
Kiramei Jun 30, 2026
bac43d1
Fix: Restore Android display state after tasks
Kiramei Jun 30, 2026
5f54a20
Fix: Restart Android backend after update
Kiramei Jun 30, 2026
2bd364b
Fix: Route Android backend restart through bootstrap
Kiramei Jun 30, 2026
05bf879
Fix: Stabilize Android cafe interaction matching
Kiramei Jun 30, 2026
735dceb
Fix: Attach Android toggle logs to provider
Kiramei Jun 30, 2026
467eccd
Fix: Incorrect behavior for auto merge
Kiramei Jul 1, 2026
43b21fd
Fix: Remove dulwich dependency from git paths
Kiramei Jul 1, 2026
05b9299
Fix: Suppress interactive git credential prompts
Kiramei Jul 1, 2026
4efd358
Fix sync workflow merge fallback
Kiramei Jul 1, 2026
fee3205
Fix: Retry Android local UIAutomator operations
Kiramei Jul 1, 2026
4de6eed
Merge pull request #15 from Kiramei/sync/upstream-master
Kiramei Jul 2, 2026
c6abc92
Fix service sync recovery and diagnostics
Kiramei Jul 12, 2026
5b2d069
Fix: Report abnormal task exits
Kiramei Jul 13, 2026
d183511
Refactor: Decouple service channel handlers
Kiramei Jul 13, 2026
292ac6d
Feat: Add named pipe service transport
Kiramei Jul 13, 2026
b83f914
CI: Test service transports across platforms
Kiramei Jul 13, 2026
eb79f29
Feat: Support Pipe transport on Unix
Kiramei Jul 13, 2026
5f4cba1
Merge pull request #16 from Kiramei/feat/pipe-transport
Kiramei Jul 13, 2026
e735d29
Fix: Prevent scheduler status queue accumulation
Kiramei Jul 14, 2026
9049b8c
Fix: Suppress noisy dependency debug logs
Kiramei Jul 14, 2026
325c7d2
Merge pull request #17 from Kiramei/fix/scheduler-status-accumulation
Kiramei Jul 14, 2026
5534f31
Merge: Integrate pipe transport with master
Kiramei Jul 14, 2026
7452394
Merge pull request #18 from Kiramei/fix/restore-pipe-backend
Kiramei Jul 14, 2026
8c861fc
Chore: Consolidate tests and workflows
Kiramei Jul 14, 2026
794e7a1
Merge pull request #19 from Kiramei/chore/consolidate-tests-and-workf…
Kiramei Jul 14, 2026
bf3522f
Merge pull request #21 from Kiramei/sync/upstream-master
Kiramei Jul 14, 2026
2fee8be
Merge pull request #22 from Kiramei/sync/upstream-master
Kiramei Jul 15, 2026
e33cf48
Merge pull request #23 from Kiramei/sync/upstream-master
Kiramei Jul 15, 2026
55e5c86
Merge pull request #24 from Kiramei/sync/upstream-master
Kiramei Jul 16, 2026
9f0697f
Merge pull request #25 from Kiramei/sync/upstream-master
Kiramei Jul 17, 2026
54cd356
Merge pull request #26 from Kiramei/sync/upstream-master
Kiramei Jul 19, 2026
acf0389
Merge pull request #27 from Kiramei/sync/upstream-master
Kiramei Jul 20, 2026
cc8c778
Merge pull request #28 from Kiramei/sync/upstream-master
Kiramei Jul 20, 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
44 changes: 44 additions & 0 deletions .github/actions/sync-to-cnb/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Sync to CNB
description: Sync the checked out repository to a CNB Git repository.

inputs:
target-url:
description: CNB repository URL to sync to.
required: true
password:
description: Password or token used by git-sync.
required: true
auth-type:
description: Authentication type used by git-sync.
required: false
default: https
username:
description: Username used by git-sync.
required: false
default: cnb
force:
description: Whether git-sync should force push.
required: false
default: "true"

runs:
using: composite
steps:
- name: Sync to CNB Repository
shell: bash
env:
PLUGIN_TARGET_URL: ${{ inputs.target-url }}
PLUGIN_AUTH_TYPE: ${{ inputs.auth-type }}
PLUGIN_USERNAME: ${{ inputs.username }}
PLUGIN_PASSWORD: ${{ inputs.password }}
PLUGIN_FORCE: ${{ inputs.force }}
run: |
docker run --rm \
-v "${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE}" \
-w "${GITHUB_WORKSPACE}" \
-e PLUGIN_TARGET_URL \
-e PLUGIN_AUTH_TYPE \
-e PLUGIN_USERNAME \
-e PLUGIN_PASSWORD \
-e PLUGIN_FORCE \
tencentcom/git-sync
1 change: 1 addition & 0 deletions .github/workflows/android_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:

jobs:
BAAS-Android-apk:
if: github.repository == 'pur1fying/blue_archive_auto_script'
env:
JAVA_HOME: /opt/java/openjdk-17
strategy:
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Code Quality

on:
pull_request:
branches:
- dev/optim
push:
branches:
- dev/optim

permissions:
contents: read

jobs:
service-tests:
name: Service tests (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
cache: pip

- name: Install service test dependencies
run: python -m pip install -e ".[service,test]"

- name: Run service tests
run: python -m pytest tests/service -q
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ permissions:

jobs:
build:
if: github.repository == 'pur1fying/blue_archive_auto_script'
runs-on: ubuntu-latest

steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mirrorchyan_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

jobs:
mirrorchyan:
if: github.repository == 'pur1fying/blue_archive_auto_script'
runs-on: macos-latest
steps:
- name: Cancel run if not owner
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mirrorchyan_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
mirrorchyan:
if: github.repository == 'pur1fying/blue_archive_auto_script'
runs-on: macos-latest
strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mirrorchyan_release_note.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
mirrorchyan:
if: github.repository == 'pur1fying/blue_archive_auto_script'
runs-on: macos-latest

steps:
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/notify-fork-sync.yml

This file was deleted.

194 changes: 194 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
name: Repository Sync

on:
push:
branches:
- master
repository_dispatch:
types:
- upstream-master-push
workflow_dispatch:
inputs:
operation:
description: Synchronization operation to run
required: true
default: all
type: choice
options:
- all
- upstream
- cnb

permissions: {}

jobs:
notify-fork:
name: Notify fork
if: github.event_name == 'push' && github.repository == 'pur1fying/blue_archive_auto_script'
runs-on: ubuntu-latest
steps:
- name: Trigger fork sync PR
env:
GH_TOKEN: ${{ secrets.UPSTREAM_TO_KIRAMEI_DEV_PAT }}
EXPECTED_REPOSITORY: pur1fying/blue_archive_auto_script
FORK_REPO: Kiramei/baas-dev
EVENT_TYPE: upstream-master-push
run: |
set -euo pipefail

if [ "${GITHUB_REPOSITORY}" != "${EXPECTED_REPOSITORY}" ]; then
echo "This workflow is intended to run only in ${EXPECTED_REPOSITORY}."
echo "Current repository: ${GITHUB_REPOSITORY}"
exit 0
fi

gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/${FORK_REPO}/dispatches" \
-f event_type="${EVENT_TYPE}" \
-F client_payload[upstream_sha]="${GITHUB_SHA}" \
-F client_payload[upstream_ref]="${GITHUB_REF_NAME}"

sync-upstream:
name: Sync upstream through PR
if: >-
github.repository == 'Kiramei/baas-dev' &&
(github.event_name == 'repository_dispatch' ||
(github.event_name == 'workflow_dispatch' &&
(inputs.operation == 'all' || inputs.operation == 'upstream')))
permissions:
contents: write
pull-requests: write
concurrency:
group: sync-upstream-master-pr
cancel-in-progress: false
runs-on: ubuntu-latest
steps:
- name: Checkout fork
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: master
persist-credentials: false

- name: Create or update sync PR, then try auto-merge
env:
GH_TOKEN: ${{ secrets.UPSTREAM_TO_KIRAMEI_DEV_PAT || github.token }}
SYNC_TOKEN_KIND: ${{ secrets.UPSTREAM_TO_KIRAMEI_DEV_PAT != '' && 'pat' || 'github_token' }}
EXPECTED_REPOSITORY: Kiramei/baas-dev
UPSTREAM_REPO: pur1fying/blue_archive_auto_script
UPSTREAM_BRANCH: master
BASE_BRANCH: master
SYNC_BRANCH: sync/upstream-master
run: |
set -euo pipefail

if [ "${GITHUB_REPOSITORY}" != "${EXPECTED_REPOSITORY}" ]; then
echo "This workflow is intended to run only in ${EXPECTED_REPOSITORY}."
echo "Current repository: ${GITHUB_REPOSITORY}"
exit 0
fi

git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

git remote add upstream "https://github.com/${UPSTREAM_REPO}.git"
git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git fetch upstream "${UPSTREAM_BRANCH}"
git fetch origin "${BASE_BRANCH}"

if [ "${SYNC_TOKEN_KIND}" != "pat" ] && git diff --name-only "origin/${BASE_BRANCH}" "upstream/${UPSTREAM_BRANCH}" -- .github/workflows | grep -q .; then
echo "::error::Upstream contains workflow file changes, but UPSTREAM_TO_KIRAMEI_DEV_PAT is not configured. Add a PAT with repo and workflow scopes as this repository secret."
exit 1
fi

if git merge-base --is-ancestor "upstream/${UPSTREAM_BRANCH}" "origin/${BASE_BRANCH}"; then
echo "fork ${BASE_BRANCH} already contains upstream/${UPSTREAM_BRANCH}. Nothing to do."
exit 0
fi

git checkout -B "${SYNC_BRANCH}" "upstream/${UPSTREAM_BRANCH}"
git push origin "HEAD:${SYNC_BRANCH}" --force-with-lease

existing_pr_url="$(gh pr list \
--repo "${GITHUB_REPOSITORY}" \
--head "${SYNC_BRANCH}" \
--base "${BASE_BRANCH}" \
--state open \
--json url \
--jq '.[0].url // ""')"

if [ -n "${existing_pr_url}" ]; then
pr_url="${existing_pr_url}"
echo "Existing sync PR updated: ${pr_url}"
else
pr_url="$(gh pr create \
--repo "${GITHUB_REPOSITORY}" \
--base "${BASE_BRANCH}" \
--head "${SYNC_BRANCH}" \
--title "Sync upstream master" \
--body "Automated PR to sync changes from pur1fying/blue_archive_auto_script:master into Kiramei/baas-dev:master.")"
echo "Created sync PR: ${pr_url}"
fi

if gh api "repos/${GITHUB_REPOSITORY}/branches/${BASE_BRANCH}/protection" >/dev/null 2>&1; then
echo "${BASE_BRANCH} has branch protection. Enabling auto-merge..."
set +e
gh pr merge "${pr_url}" \
--repo "${GITHUB_REPOSITORY}" \
--merge \
--auto \
--delete-branch
merge_status=$?
set -e
else
echo "${BASE_BRANCH} has no branch protection. Merging directly..."
set +e
gh pr merge "${pr_url}" \
--repo "${GITHUB_REPOSITORY}" \
--merge \
--delete-branch
merge_status=$?
set -e
fi

if [ "${merge_status}" -eq 0 ]; then
echo "PR auto-merge enabled or merged directly: ${pr_url}"
else
echo "Merge failed. Leaving PR open: ${pr_url}"
gh pr comment "${pr_url}" \
--repo "${GITHUB_REPOSITORY}" \
--body "Merge failed. Please review manually. Possible causes: conflicts, failing required checks, branch protection, or insufficient token permissions." || true
fi

sync-cnb:
name: Sync to CNB
if: >-
(github.event_name == 'push' ||
(github.event_name == 'workflow_dispatch' &&
(inputs.operation == 'all' || inputs.operation == 'cnb'))) &&
(github.repository == 'Kiramei/baas-dev' ||
github.repository == 'pur1fying/blue_archive_auto_script')
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Sync Dev
if: github.repository == 'Kiramei/baas-dev'
uses: ./.github/actions/sync-to-cnb
with:
target-url: https://cnb.cool/kiramei/baas-dev.git
password: ${{ secrets.CNB_SYNC_TOKEN }}

- name: Sync Stable
if: github.repository == 'pur1fying/blue_archive_auto_script'
uses: ./.github/actions/sync-to-cnb
with:
target-url: https://cnb.cool/pur1fying/blue_archive_auto_script.git
password: ${{ secrets.CNB_SYNC_TOKEN }}
7 changes: 4 additions & 3 deletions core/Baas_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ def send(self, msg, task=None):
if msg == "start":
if self.button_signal is not None:
self.button_signal.emit("停止")
self.thread_starter()
return self.thread_starter()
elif msg == "stop":
if self.button_signal is not None:
self.button_signal.emit("启动")
Expand Down Expand Up @@ -479,7 +479,7 @@ def thread_starter(self):
if not self.solve(task):
self.signal_stop()
notify(title='', body='任务已停止')
return
return False
if flg:
currentTaskNextTime = self.next_time

Expand All @@ -502,7 +502,8 @@ def thread_starter(self):
self.handle_then()
except Exception as e:
self.logger.error(traceback.format_exc())
return
return False
return True

def genScheduleLog(self, task):
self.logger.info("Scheduler : {")
Expand Down
Loading