Skip to content

Commit 456ac25

Browse files
author
cw
committed
feat: add AI video generation system with 1080p quality, business scenarios, and CI fixes
AI Video Generation: - 4 cloud providers (Replicate, Runway, Kling, Luma) + local FFmpeg - 6 style presets (cinematic, adPromo, socialMedia, calmAesthetic, epic, mysterious) - 3 business scenarios (Product Promo, Portrait Effects, Story to Video) - Provider-specific prompt adaptation with sentence-boundary truncation - Progress callbacks via WebSocket task_update messages 1080p Quality Improvements: - Resolution: 720p -> 1080p for all aspect ratios (9:16, 1:1, 16:9) - Encoding: CRF 18, preset medium, H.264 High/Level 4.2, faststart - Meets/exceeds TikTok, Instagram, and YouTube quality requirements Bug Fixes: - Fix capability registry remote DNS timeout blocking all domain tasks - Add getLocal() for sync capability lookup without remote fetch - Fix executor-first routing in mobile_task_handler CI/CD Fixes: - Fix wrong directory opencli_mobile -> opencli_app in 3 workflow files - Pin Dart SDK to 3.7.2 in release.yml for dart compile exe support - Fix Flutter version 3.27.5 -> 3.32.2 in publish-mobile.yml - Fix YAML lint errors (line length, document-start markers) - Format 87 Dart files in daemon/ Other: - Strengthen English-only rule in Claude instructions - Add test reports and E2E screenshots for video quality verification
1 parent 0ac3ba8 commit 456ac25

157 files changed

Lines changed: 7538 additions & 1439 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/instructions.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@
55
**All text in this project MUST be in English**, including:
66
- Git commit messages
77
- Code comments
8-
- Documentation files
8+
- Documentation files (docs/, test-results/, etc.)
99
- Variable names and function names
1010
- Error messages and log output
1111
- README and other markdown files
12+
- Test reports and E2E test output
13+
- AI-generated content (reports, summaries, code comments)
14+
- UI strings in the Flutter app and Web UI
15+
16+
**No exceptions.** Even if the user writes in Chinese or another language, all code, documentation, and generated files MUST be written in English.
1217

1318
## Code Style
1419

.github/workflows/android-play-store.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,42 +43,42 @@ jobs:
4343
cache: true
4444

4545
- name: Get dependencies
46-
working-directory: opencli_mobile
46+
working-directory: opencli_app
4747
run: flutter pub get
4848

4949
- name: Run code analysis
50-
working-directory: opencli_mobile
50+
working-directory: opencli_app
5151
run: flutter analyze --no-fatal-infos --no-fatal-warnings
5252

5353
- name: Decode Keystore
5454
env:
5555
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
5656
run: |
57-
echo "$ANDROID_KEYSTORE_BASE64" | base64 --decode > opencli_mobile/android/app/release.keystore
57+
echo "$ANDROID_KEYSTORE_BASE64" | base64 --decode > opencli_app/android/app/release.keystore
5858
5959
- name: Create keystore.properties
6060
env:
6161
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
6262
KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
6363
KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
6464
run: |
65-
cat > opencli_mobile/android/keystore.properties << EOF
65+
cat > opencli_app/android/keystore.properties << EOF
6666
storeFile=app/release.keystore
6767
storePassword=$KEYSTORE_PASSWORD
6868
keyAlias=$KEY_ALIAS
6969
keyPassword=$KEY_PASSWORD
7070
EOF
7171
7272
- name: Build Release AAB
73-
working-directory: opencli_mobile
73+
working-directory: opencli_app
7474
run: |
7575
flutter build appbundle --release
7676
7777
- name: Upload AAB Artifact
7878
uses: actions/upload-artifact@v4
7979
with:
8080
name: android-release-aab
81-
path: opencli_mobile/build/app/outputs/bundle/release/app-release.aab
81+
path: opencli_app/build/app/outputs/bundle/release/app-release.aab
8282
retention-days: 30
8383

8484
- name: Setup Ruby (for Fastlane)
@@ -96,7 +96,7 @@ jobs:
9696
bash scripts/update-mobile-changelogs.sh
9797
9898
- name: Upload Play Store Metadata
99-
working-directory: opencli_mobile/android
99+
working-directory: opencli_app/android
100100
env:
101101
PLAY_STORE_JSON_KEY: ${{ secrets.PLAY_STORE_JSON_KEY }}
102102
run: |
@@ -105,12 +105,12 @@ jobs:
105105
echo "✅ Play Store metadata uploaded!"
106106
107107
- name: Deploy to Google Play
108-
working-directory: opencli_mobile/android
108+
working-directory: opencli_app/android
109109
env:
110110
PLAY_STORE_JSON_KEY: ${{ secrets.PLAY_STORE_JSON_KEY }}
111111
run: |
112112
TRACK="${{ github.event.inputs.track || 'internal' }}"
113-
AAB_PATH="${{ github.workspace }}/opencli_mobile/build/app/outputs/bundle/release/app-release.aab"
113+
AAB_PATH="${{ github.workspace }}/opencli_app/build/app/outputs/bundle/release/app-release.aab"
114114
115115
echo "🚀 Deploying to track: $TRACK"
116116
echo "📦 AAB path: $AAB_PATH"
@@ -137,7 +137,7 @@ jobs:
137137
if: startsWith(github.ref, 'refs/tags/')
138138
uses: softprops/action-gh-release@v1
139139
with:
140-
files: opencli_mobile/build/app/outputs/bundle/release/app-release.aab
140+
files: opencli_app/build/app/outputs/bundle/release/app-release.aab
141141
generate_release_notes: true
142142
env:
143143
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ios-app-store.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ jobs:
3232
cache: true
3333

3434
- name: Get dependencies
35-
working-directory: opencli_mobile
35+
working-directory: opencli_app
3636
run: flutter pub get
3737

3838
- name: Run code analysis
39-
working-directory: opencli_mobile
39+
working-directory: opencli_app
4040
run: flutter analyze --no-fatal-infos --no-fatal-warnings
4141

4242
- name: Setup Xcode
@@ -97,7 +97,7 @@ jobs:
9797
9898
- name: Create ExportOptions.plist
9999
run: |
100-
cat > opencli_mobile/ios/ExportOptions.plist << 'EOF'
100+
cat > opencli_app/ios/ExportOptions.plist << 'EOF'
101101
<?xml version="1.0" encoding="UTF-8"?>
102102
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
103103
<plist version="1.0">
@@ -124,17 +124,17 @@ jobs:
124124
EOF
125125
126126
echo "✅ ExportOptions.plist created"
127-
cat opencli_mobile/ios/ExportOptions.plist
127+
cat opencli_app/ios/ExportOptions.plist
128128
129129
- name: Install CocoaPods dependencies
130-
working-directory: opencli_mobile/ios
130+
working-directory: opencli_app/ios
131131
run: |
132132
echo "📦 Installing CocoaPods dependencies..."
133133
pod install --repo-update
134134
echo "✅ CocoaPods dependencies installed"
135135
136136
- name: Add Xcode Build Script to Fix App.framework
137-
working-directory: opencli_mobile/ios
137+
working-directory: opencli_app/ios
138138
run: |
139139
# Add a build phase script to fix App.framework Info.plist
140140
cat > fix_app_framework.sh << 'EOF'
@@ -153,7 +153,7 @@ jobs:
153153
chmod +x fix_app_framework.sh
154154
155155
- name: Build IPA
156-
working-directory: opencli_mobile
156+
working-directory: opencli_app
157157
env:
158158
IPHONEOS_DEPLOYMENT_TARGET: '13.0'
159159
run: |
@@ -225,15 +225,15 @@ jobs:
225225
uses: actions/upload-artifact@v4
226226
with:
227227
name: ios-release-ipa
228-
path: opencli_mobile/build/ios/ipa/*.ipa
228+
path: opencli_app/build/ios/ipa/*.ipa
229229
retention-days: 30
230230

231231
- name: Upload to App Store Connect
232232
env:
233233
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
234234
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
235235
run: |
236-
IPA_PATH=$(find opencli_mobile/build/ios/ipa -name "*.ipa" | head -n 1)
236+
IPA_PATH=$(find opencli_app/build/ios/ipa -name "*.ipa" | head -n 1)
237237
238238
if [ -z "$IPA_PATH" ]; then
239239
echo "❌ IPA file not found"
@@ -257,7 +257,7 @@ jobs:
257257
bash scripts/update-mobile-changelogs.sh
258258
259259
- name: Upload App Store Metadata and Submit for Review
260-
working-directory: opencli_mobile
260+
working-directory: opencli_app
261261
env:
262262
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
263263
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }}
@@ -303,7 +303,7 @@ jobs:
303303
if: startsWith(github.ref, 'refs/tags/')
304304
uses: softprops/action-gh-release@v1
305305
with:
306-
files: opencli_mobile/build/ios/ipa/*.ipa
306+
files: opencli_app/build/ios/ipa/*.ipa
307307
generate_release_notes: true
308308
env:
309309
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish-mobile.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ jobs:
2626
- name: Setup Flutter
2727
uses: subosito/flutter-action@v2
2828
with:
29-
flutter-version: '3.27.5'
29+
flutter-version: '3.32.2'
3030
channel: 'stable'
3131

3232
- name: Get dependencies
33-
working-directory: opencli_mobile
33+
working-directory: opencli_app
3434
run: flutter pub get
3535

3636
- name: Decode keystore
37-
working-directory: opencli_mobile/android
37+
working-directory: opencli_app/android
3838
run: |
3939
echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 -d > app/release.keystore
4040
4141
- name: Create keystore.properties
42-
working-directory: opencli_mobile/android
42+
working-directory: opencli_app/android
4343
run: |
4444
cat > keystore.properties << EOF
4545
storeFile=app/release.keystore
@@ -49,24 +49,24 @@ jobs:
4949
EOF
5050
5151
- name: Build APK
52-
working-directory: opencli_mobile
52+
working-directory: opencli_app
5353
run: flutter build apk --release
5454

5555
- name: Build App Bundle
56-
working-directory: opencli_mobile
56+
working-directory: opencli_app
5757
run: flutter build appbundle --release
5858

5959
- name: Upload APK artifact
6060
uses: actions/upload-artifact@v4
6161
with:
6262
name: opencli-mobile-android-apk
63-
path: opencli_mobile/build/app/outputs/flutter-apk/app-release.apk
63+
path: opencli_app/build/app/outputs/flutter-apk/app-release.apk
6464

6565
- name: Upload AAB artifact
6666
uses: actions/upload-artifact@v4
6767
with:
6868
name: opencli-mobile-android-aab
69-
path: opencli_mobile/build/app/outputs/bundle/release/app-release.aab
69+
path: opencli_app/build/app/outputs/bundle/release/app-release.aab
7070

7171
build-ios:
7272
name: Build iOS
@@ -78,24 +78,24 @@ jobs:
7878
- name: Setup Flutter
7979
uses: subosito/flutter-action@v2
8080
with:
81-
flutter-version: '3.27.5'
81+
flutter-version: '3.32.2'
8282
channel: 'stable'
8383

8484
- name: Get dependencies
85-
working-directory: opencli_mobile
85+
working-directory: opencli_app
8686
run: flutter pub get
8787

8888
- name: Install CocoaPods
8989
run: |
90-
cd opencli_mobile/ios
90+
cd opencli_app/ios
9191
pod install
9292
9393
- name: Build iOS (no codesign)
94-
working-directory: opencli_mobile
94+
working-directory: opencli_app
9595
run: flutter build ios --release --no-codesign
9696

9797
- name: Create IPA
98-
working-directory: opencli_mobile/ios
98+
working-directory: opencli_app/ios
9999
run: |
100100
mkdir -p Payload
101101
cp -r build/ios/iphoneos/Runner.app Payload/
@@ -105,7 +105,7 @@ jobs:
105105
uses: actions/upload-artifact@v4
106106
with:
107107
name: opencli-mobile-ios-ipa
108-
path: opencli_mobile/ios/opencli-mobile.ipa
108+
path: opencli_app/ios/opencli-mobile.ipa
109109

110110
publish-to-release:
111111
name: Publish to GitHub Release

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828
2929
- name: Setup Dart
3030
uses: dart-lang/setup-dart@v1
31+
with:
32+
sdk: 3.7.2
3133

3234
- name: Sync documentation
3335
run: dart scripts/sync_docs.dart
@@ -144,6 +146,8 @@ jobs:
144146

145147
- name: Setup Dart
146148
uses: dart-lang/setup-dart@v1
149+
with:
150+
sdk: 3.7.2
147151

148152
- name: Install dependencies
149153
working-directory: daemon

config/channels.example.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
# Multi-Channel Configuration
23
# Enable various messaging platforms to control your computer
34

@@ -49,7 +50,8 @@ channels:
4950

5051
# Example usage:
5152
# 1. Create a Telegram bot: https://t.me/BotFather
52-
# 2. Get your bot token and add it to environment: export TELEGRAM_BOT_TOKEN="your-token"
53+
# 2. Get your bot token and add it to environment:
54+
# export TELEGRAM_BOT_TOKEN="your-token"
5355
# 3. Get your user ID from @userinfobot and add it to allowed_users
5456
# 4. Restart OpenCLI daemon
5557
# 5. Send a message to your bot to control your computer!

config/config.example.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
# OpenCLI Configuration Example
23
# Copy this file to ~/.opencli/config.yaml and customize as needed
34

config/personal.default.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
---
12
# OpenCLI Personal Mode - Default Configuration
23
# 此配置自动生成,个人用户无需修改即可使用
3-
# This configuration is auto-generated, personal users can use it without modification
4+
# Auto-generated config, personal users need
5+
# no modification
46

57
# 运行模式
68
mode: personal

daemon/bin/daemon.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ Future<void> main(List<String> arguments) async {
4444

4545
// Keep running
4646
await daemon.wait();
47-
4847
} catch (e, stack) {
4948
TerminalUI.error('Fatal error: $e');
5049
print(TerminalUI.dim(stack.toString()));

daemon/lib/ai/ai_task_orchestrator.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ class AITaskOrchestrator {
6060
workflow.stepResults[step.id] = result.result ?? '';
6161

6262
// Check if we should continue
63-
if (step.condition != null && !_evaluateCondition(step.condition!, results)) {
63+
if (step.condition != null &&
64+
!_evaluateCondition(step.condition!, results)) {
6465
break;
6566
}
6667
}
@@ -89,8 +90,8 @@ class AITaskOrchestrator {
8990
}
9091

9192
/// Execute predefined workflow patterns
92-
Future<WorkflowResult> executePattern(WorkflowPattern pattern,
93-
Map<String, dynamic> inputs) async {
93+
Future<WorkflowResult> executePattern(
94+
WorkflowPattern pattern, Map<String, dynamic> inputs) async {
9495
switch (pattern) {
9596
case WorkflowPattern.codeGeneration:
9697
return _executeCodeGenerationWorkflow(inputs);

0 commit comments

Comments
 (0)