Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
cfe918d
feat(maps): synchronize backend map resources
yltx Aug 13, 2026
7e7453b
feat(map-intel): add validated snapshot synchronizer
yltx Aug 13, 2026
e11ed6d
feat(tools): add OCR log analyzer
yltx Aug 13, 2026
79e263e
feat(fleet): generate native ship type contract
yltx Aug 13, 2026
dd051b9
feat(ship-library): add generated library snapshot
yltx Aug 13, 2026
e084742
feat(plans): migrate bundled plans to managed resources
yltx Aug 13, 2026
221dcd2
refactor(architecture): establish shared contracts and adapters
yltx Aug 13, 2026
2517754
feat(fleet): add fleet draft and matching domain
yltx Aug 13, 2026
1f9a542
feat(plan): load canonical maps and preserve plan YAML
yltx Aug 13, 2026
a8b71a8
refactor(tasks): migrate managed task identities
yltx Aug 13, 2026
b5d6f96
refactor(api): align backend client contracts
yltx Aug 13, 2026
1eb1353
refactor(scheduler): establish logical task scheduling domain
yltx Aug 13, 2026
10a8e51
feat(statistics): add daily sortie statistics
yltx Aug 13, 2026
eaac8eb
refactor(settings): align automation configuration model
yltx Aug 13, 2026
3a17115
refactor(main): establish secure persistence services
yltx Aug 13, 2026
f4f71a8
feat(migration): add retryable user data migration
yltx Aug 13, 2026
d5a14d4
feat(main): add plan repositories and runtime expansion
yltx Aug 13, 2026
5506f71
feat(main): add device and ship library services
yltx Aug 13, 2026
418f113
feat(runtime): validate Python environment and backend lifecycle
yltx Aug 13, 2026
3259c05
feat(updater): add deferred update and shutdown policy
yltx Aug 13, 2026
c0a57c6
feat(ipc): expose typed main process capabilities
yltx Aug 13, 2026
c02d342
refactor(main): compose services IPC and lifecycle
yltx Aug 13, 2026
628b000
feat(renderer): add fleet and plan workflows
yltx Aug 13, 2026
36db186
feat(renderer): add settings task lists and migration flows
yltx Aug 13, 2026
2e11bd3
refactor(renderer): compose navigation main page and lifecycle
yltx Aug 13, 2026
1963073
build(renderer): generate HTML and CSS entrypoints
yltx Aug 13, 2026
6964b83
chore: consolidate project agent and contribution rules
yltx Aug 13, 2026
ef2242e
docs: align architecture and user guides with GUI 2.0
yltx Aug 13, 2026
0a4cc60
test: cover GUI and backend API contracts
yltx Aug 13, 2026
e4b580c
feat(installer): preserve legacy data transactionally
yltx Aug 13, 2026
fc3ca38
release: prepare stable GUI 2.0.0 channel
yltx Aug 13, 2026
2ac2159
test: align upstream contracts with GUI 2.0
yltx Aug 13, 2026
c8508ab
fix(config): preserve empty template selection
yltx Aug 13, 2026
6f839ca
feat(plans): export 1.4.3 downgrade backups
yltx Aug 13, 2026
5fa6cb4
feat(updater): bridge 2.0 alpha users to 2.1 stable
yltx Aug 13, 2026
f7bf2f2
fix(release): separate workflow validation from publishing
yltx Aug 13, 2026
da83593
fix(release): target yltx stable feed
yltx Aug 15, 2026
73d0de8
release: v2.1.0
yltx Aug 15, 2026
f806d1d
fix(release): probe existing releases safely
yltx Aug 15, 2026
8d87cd8
feat(updater): link stable and alpha repositories
ShiinaKuroko Aug 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# GitHub Copilot 项目入口

开始任何仓库任务前,必须完整读取并遵守根目录 `AGENTS.md`。

`AGENTS.md` 是 Agent 统一加载入口;强制规范正文仍以 `docs/engineering-standards.md` 和仓库可执行配置为准。不得只依赖本文件、聊天上下文或规则摘要。
95 changes: 95 additions & 0 deletions .github/workflows/pull-request-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: Pull Request Checks

on:
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: pr-checks-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-and-migrations:
name: Build and migration contracts
runs-on: windows-latest
timeout-minutes: 15

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm

- name: Install dependencies
run: npm ci

- name: Test build gate
run: npm run test:build

- name: Test scheduler domain
run: node scripts/tests/test-scheduler-domain.mjs

- name: Test migration compatibility
run: node scripts/tests/test-migrations.js

backend-fleet-contract:
name: Backend fleet contract
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- name: Checkout GUI
uses: actions/checkout@v4

- name: Checkout AutoWSGR
uses: actions/checkout@v4
with:
repository: ShiinaKuroko/AutoWSGR
ref: ShiinaKuroko
path: AutoWSGR

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Setup uv
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true

- name: Install GUI dependencies
run: npm ci

- name: Install AutoWSGR dependencies
run: uv sync --project AutoWSGR --no-dev

- name: Build GUI
run: npm run build

- name: Test candidate-only GUI services
run: node scripts/tests/test-main-services.js

- name: Check fleet type snapshot
env:
AUTOWSGR_PYTHON: ${{ github.workspace }}/AutoWSGR/.venv/bin/python
run: npm run check:fleet-types

- name: Test GUI to AutoWSGR fleet contract
env:
AUTOWSGR_REPO: ${{ github.workspace }}/AutoWSGR
AUTOWSGR_PYTHON: ${{ github.workspace }}/AutoWSGR/.venv/bin/python
run: node scripts/tests/test-api-contract.js
228 changes: 211 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ on:
- 'v*'
workflow_dispatch:
inputs:
prerelease:
description: '标记为预发布'
required: false
publish:
description: 'Create GitHub Releases after all gates pass'
required: true
type: boolean
default: false

Expand All @@ -32,8 +32,19 @@ jobs:
$pkg = Get-Content package.json | ConvertFrom-Json
$ver = $pkg.version
}
if ($ver -match '^\d+\.\d+\.\d+$') {
$channel = 'latest'
$prerelease = 'false'
} elseif ($ver -match '^\d+\.\d+\.\d+-alpha(?:\.\d+)?$') {
$channel = 'alpha'
$prerelease = 'true'
} else {
throw "发布版本 $ver 必须是 X.Y.Z 或 X.Y.Z-alpha[.N]"
}
echo "VERSION=$ver" >> $env:GITHUB_OUTPUT
echo "Resolved version: $ver"
echo "CHANNEL=$channel" >> $env:GITHUB_OUTPUT
echo "PRERELEASE=$prerelease" >> $env:GITHUB_OUTPUT
echo "Resolved release version: $ver ($channel)"

- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -44,44 +55,227 @@ jobs:
- name: Install dependencies
run: npm ci

- name: Sync package.json version
- name: Verify checked-in release version
shell: pwsh
run: |
$pkg = Get-Content package.json | ConvertFrom-Json
$pkg.version = "${{ steps.version.outputs.VERSION }}"
$pkg | ConvertTo-Json -Depth 10 | Set-Content package.json -Encoding UTF8
$lockVersion = node -p "require('./package-lock.json').version"
if ($LASTEXITCODE -ne 0) {
throw "无法读取 package-lock.json 版本"
}
$lockRootVersion = node -p "require('./package-lock.json').packages[''].version"
if ($LASTEXITCODE -ne 0) {
throw "无法读取 package-lock.json 根包版本"
}
if ($pkg.version -ne "${{ steps.version.outputs.VERSION }}") {
throw "package.json 版本与 tag 不一致"
}
if ($lockVersion -ne $pkg.version -or $lockRootVersion -ne $pkg.version) {
throw "package-lock.json 版本与 package.json 不一致"
}
$expectedChannel = "${{ steps.version.outputs.CHANNEL }}"
if ($expectedChannel -notin @('latest', 'alpha')) {
throw "发布频道无效: $expectedChannel"
}

- name: Build & Package
run: npm run dist
- name: Preflight release destinations
if: github.event_name != 'workflow_dispatch' || inputs.publish
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$version = "${{ steps.version.outputs.VERSION }}"
$releases = gh api `
"repos/${{ github.repository }}/releases?per_page=100" |
ConvertFrom-Json
if ($LASTEXITCODE -ne 0) {
throw "无法读取当前仓库 Release 列表"
}
if ($releases.tag_name -contains "v$version") {
throw "当前仓库已存在 v$version Release"
}

- name: Verify pinned backend channels
id: backend
shell: pwsh
run: |
$manifest = Get-Content build/backend-distribution.json |
ConvertFrom-Json
foreach ($channel in @("stable", "alpha")) {
$distribution = $manifest.$channel
if (
$distribution.id -ne $channel -or
$distribution.repository -notmatch '^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$' -or
$distribution.ref -notmatch '^[A-Za-z0-9._/-]+$' -or
$distribution.commit -notmatch '^[0-9a-f]{40}$'
) {
throw "$channel 后端发行清单无效"
}
echo "Pinned $channel backend: $($distribution.repository)@$($distribution.commit)"
}
echo "repository=$($manifest.stable.repository)" >> $env:GITHUB_OUTPUT
echo "commit=$($manifest.stable.commit)" >> $env:GITHUB_OUTPUT

- name: Checkout pinned AutoWSGR backend
uses: actions/checkout@v4
with:
repository: ${{ steps.backend.outputs.repository }}
ref: ${{ steps.backend.outputs.commit }}
path: AutoWSGR

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Setup uv
uses: astral-sh/setup-uv@v8.1.0
with:
enable-cache: true

- name: Install pinned backend dependencies
shell: pwsh
run: |
uv sync --project AutoWSGR --no-dev
uv pip install `
--python AutoWSGR/.venv/Scripts/python.exe `
"requests>=2.32.5" `
"beautifulsoup4>=4.12.0"

- name: Run stable release gates
shell: pwsh
run: |
Remove-Item Env:ELECTRON_RUN_AS_NODE -ErrorAction SilentlyContinue
node scripts/sync-map-resources.js --backend "${{ github.workspace }}/AutoWSGR" --check
npm run test:build
npm run test:migrations
npm run test:main-services
npm run test:main-ipc
npm run test:scheduler-domain
npm run test:fleet-domain
npm run test:settings
npm run test:python-environment
npm run test:backend-distribution
npm run test:event-resources
npm run test:plan-management-delete
npm run test:daily-sortie-stats
npm run test:ship-library-updater
npm run test:ocr-log-analyzer
npm run test:map-intel
$env:AUTOWSGR_REPO = "${{ github.workspace }}/AutoWSGR"
$env:AUTOWSGR_PYTHON = "${{ github.workspace }}/AutoWSGR/.venv/Scripts/python.exe"
npm run test:api-contract

- name: Build & Package
run: npm run dist

- name: List release artifacts
shell: pwsh
run: Get-ChildItem -Path release -Recurse -File | Select-Object FullName, Length

- name: Create Release
- name: Verify packaged runtime and resources
run: npm run test:release-package
env:
AUTOWSGR_RELEASE_VERSION: ${{ steps.version.outputs.VERSION }}

- name: Verify update channel metadata
shell: pwsh
run: |
$channel = "${{ steps.version.outputs.CHANNEL }}"
$releaseRoot = Join-Path release $channel
$expected = Join-Path $releaseRoot "$channel.yml"
if (-not (Test-Path $expected)) {
throw "缺少 $channel 更新清单: $expected"
}
@('latest', 'alpha', 'beta', 'dev') |
Where-Object { $_ -ne $channel } |
ForEach-Object {
$unexpected = Join-Path $releaseRoot "$_.yml"
if (Test-Path $unexpected) {
throw "发布产物混入其他频道清单: $unexpected"
}
}

- name: Create Alpha Release
if: >-
steps.version.outputs.CHANNEL == 'alpha'
&& (github.event_name != 'workflow_dispatch' || inputs.publish)
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.VERSION }}
name: AutoWSGR-GUI v${{ steps.version.outputs.VERSION }}
prerelease: true
generate_release_notes: true
files: |
release/alpha/AutoWSGR-GUI-Setup-*.exe
release/alpha/*.exe.blockmap
release/alpha/alpha.yml
body: |
## AutoWSGR-GUI v${{ steps.version.outputs.VERSION }}

本版本使用 `alpha` 更新频道。此版本为 Stable 迁移桥,默认继续接收
Alpha,并允许用户切换到 Stable 更新轨道。

首次运行 managed 模式会安装本版本固定的 AutoWSGR 后端,需要联网。
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Stable Release
if: >-
steps.version.outputs.CHANNEL == 'latest'
&& (github.event_name != 'workflow_dispatch' || inputs.publish)
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.VERSION }}
name: AutoWSGR-GUI v${{ steps.version.outputs.VERSION }}
prerelease: ${{ github.event.inputs.prerelease == 'true' }}
prerelease: false
draft: true
generate_release_notes: true
files: |
release/*-Setup-*.exe
release/*.exe.blockmap
release/latest.yml
release/latest/AutoWSGR-GUI-Setup-*.exe
release/latest/*.exe.blockmap
release/latest/latest.yml
body: |
## AutoWSGR-GUI v${{ steps.version.outputs.VERSION }}

### 使用方法
1. 下载 `AutoWSGR-GUI-Setup-*.exe`(安装版)
本版本使用 `latest` 更新频道。Stable 默认不接收 Alpha;设置中开启
“允许测试版更新”后可接收版本号更高的 Alpha。

### 主要变化
- 主导航统一为“作战 / 计划 / 设置”
- 新增可视化舰队规划、出征规划和计划管理
- 系统只读资源与用户配置、计划分离,执行前展开舰队引用
- 完善任务列表、执行队列、迁移、环境管理和更新边界

### 安装与升级
1. 下载 `AutoWSGR-GUI-Setup-*.exe`
2. 软件已内置 Python 3.12,无需单独安装
3. 首次运行时程序会自动安装 Python 依赖(需联网)
4. 已安装用户将自动收到增量更新提示
4. 1.4.x 覆盖升级会先将旧用户数据备份到 `%LOCALAPPDATA%\AutoWSGR-GUI\legacy-upgrade`;确认迁移结果前不要删除该目录
5. 关闭“允许测试版更新”时只接收稳定版;开启后也接收版本号更高的 Alpha

### 自动强化
2.0.0 仅保存自动强化策略,不加入 Scheduler,生产路径为零后端调用,也不会操作舰船。

### 回退
如需回退,请退出 2.0,使用旧安装器重新安装,并从 `legacy-upgrade` 备份恢复旧格式数据;不要让旧版直接写入或覆盖唯一的 2.0 `userData`。

### 系统要求
- Windows 10/11 x64
- 网络连接(首次运行需安装 pip 依赖)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish verified Stable release
if: >-
steps.version.outputs.CHANNEL == 'latest'
&& (github.event_name != 'workflow_dispatch' || inputs.publish)
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$version = "${{ steps.version.outputs.VERSION }}"
gh release edit "v$version" `
--repo "${{ github.repository }}" `
--draft=false `
--latest
Loading
Loading