@bolloon/bolloon-agent 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/bin/bolloon-cli.cjs +15 -4
  2. package/bin/ipfs +0 -0
  3. package/dist/agents/parse-tool-call.js +304 -0
  4. package/dist/agents/pi-sdk.js +201 -291
  5. package/dist/agents/react-loop.js +120 -0
  6. package/dist/agents/session-store.js +157 -0
  7. package/dist/agents/tool-registry.js +136 -0
  8. package/dist/agents/workflow-pivot-loop.js +40 -0
  9. package/dist/bollharness/src/index.js +5 -0
  10. package/dist/bollharness/src/scripts/checks/check_adr_plan_numbering.js +6 -0
  11. package/dist/bollharness/src/scripts/checks/check_api_types.js +45 -0
  12. package/dist/bollharness/src/scripts/checks/check_artifact_link.js +146 -0
  13. package/dist/bollharness/src/scripts/checks/check_bridge_deps.js +6 -0
  14. package/dist/bollharness/src/scripts/checks/check_bugfix_binding.js +6 -0
  15. package/dist/bollharness/src/scripts/checks/check_bugfix_binding_ci.js +6 -0
  16. package/dist/bollharness/src/scripts/checks/check_doc_file_references.js +6 -0
  17. package/dist/bollharness/src/scripts/checks/check_doc_freshness.js +135 -0
  18. package/dist/bollharness/src/scripts/checks/check_doc_links.js +31 -0
  19. package/dist/bollharness/src/scripts/checks/check_file_existence_claims.js +6 -0
  20. package/dist/bollharness/src/scripts/checks/check_fragment_integrity.js +34 -0
  21. package/dist/bollharness/src/scripts/checks/check_hook_installed.js +63 -0
  22. package/dist/bollharness/src/scripts/checks/check_issue_closure.js +41 -0
  23. package/dist/bollharness/src/scripts/checks/check_mcp_parity.js +6 -0
  24. package/dist/bollharness/src/scripts/checks/check_security.js +48 -0
  25. package/dist/bollharness/src/scripts/checks/check_skill_parity.js +6 -0
  26. package/dist/bollharness/src/scripts/checks/check_versions.js +6 -0
  27. package/dist/bollharness/src/scripts/checks/finding.js +13 -0
  28. package/dist/bollharness/src/scripts/checks/next_decision_number.js +20 -0
  29. package/dist/bollharness/src/scripts/checks/regenerate_magic_docs.js +6 -0
  30. package/dist/bollharness/src/scripts/ci/detect_rebaseline_triggers.js +8 -0
  31. package/dist/bollharness/src/scripts/ci/scan_subprocess_cfg.js +8 -0
  32. package/dist/bollharness/src/scripts/ci/scan_verify_artifacts.js +8 -0
  33. package/dist/bollharness/src/scripts/ci/scan_yaml_schema.js +8 -0
  34. package/dist/bollharness/src/scripts/context_router.js +67 -0
  35. package/dist/bollharness/src/scripts/deploy-guard.js +157 -0
  36. package/dist/bollharness/src/scripts/guard-feedback.js +192 -0
  37. package/dist/bollharness/src/scripts/guard_router.js +158 -0
  38. package/dist/bollharness/src/scripts/hooks/_hook_output.js +6 -0
  39. package/dist/bollharness/src/scripts/hooks/auto-python3.js +6 -0
  40. package/dist/bollharness/src/scripts/hooks/deploy-progress-on-session-end.js +6 -0
  41. package/dist/bollharness/src/scripts/hooks/failure-analyzer.js +6 -0
  42. package/dist/bollharness/src/scripts/hooks/gate-judgment-inject.js +92 -0
  43. package/dist/bollharness/src/scripts/hooks/gate-transition-judgment.js +63 -0
  44. package/dist/bollharness/src/scripts/hooks/inbox-ack.js +6 -0
  45. package/dist/bollharness/src/scripts/hooks/inbox-inject-on-start.js +6 -0
  46. package/dist/bollharness/src/scripts/hooks/inbox-validate.js +6 -0
  47. package/dist/bollharness/src/scripts/hooks/inbox-write-ledger.js +6 -0
  48. package/dist/bollharness/src/scripts/hooks/initializer-agent.js +6 -0
  49. package/dist/bollharness/src/scripts/hooks/loop-detection.js +73 -0
  50. package/dist/bollharness/src/scripts/hooks/owner-guard.js +6 -0
  51. package/dist/bollharness/src/scripts/hooks/precompact.js +6 -0
  52. package/dist/bollharness/src/scripts/hooks/review-agent-gatekeeper.js +6 -0
  53. package/dist/bollharness/src/scripts/hooks/risk-tracker.js +108 -0
  54. package/dist/bollharness/src/scripts/hooks/sanitize-on-read.js +6 -0
  55. package/dist/bollharness/src/scripts/hooks/session-reflection.js +7 -0
  56. package/dist/bollharness/src/scripts/hooks/session-start-magic-docs.js +7 -0
  57. package/dist/bollharness/src/scripts/hooks/session-start-reset-risk.js +7 -0
  58. package/dist/bollharness/src/scripts/hooks/session-start-toolkit-reminder.js +7 -0
  59. package/dist/bollharness/src/scripts/hooks/stop-evaluator.js +157 -0
  60. package/dist/bollharness/src/scripts/hooks/tool-call-counter.js +6 -0
  61. package/dist/bollharness/src/scripts/hooks/trace-analyzer.js +10 -0
  62. package/dist/bollharness/src/scripts/install/install-trust-token.js +7 -0
  63. package/dist/bollharness/src/scripts/install/multi_project_registry.js +9 -0
  64. package/dist/bollharness/src/scripts/install/phase2_auto.js +21 -0
  65. package/dist/bollharness/src/scripts/install/pre_commit_installer.js +6 -0
  66. package/dist/bollharness/src/scripts/install/tier_selector.js +7 -0
  67. package/dist/bollharness/src/scripts/install/transcript_miner.js +7 -0
  68. package/dist/bollharness/src/scripts/lib/claim_patterns.js +10 -0
  69. package/dist/bollharness/src/scripts/lib/sanitize_patterns.js +12 -0
  70. package/dist/bollharness/src/scripts/sanitize.js +6 -0
  71. package/dist/constraint-runtime/src/tools/PolymarketSDK/cancelOrder.js +6 -0
  72. package/dist/constraint-runtime/src/tools/PolymarketSDK/createOrder.js +6 -0
  73. package/dist/constraint-runtime/src/tools/PolymarketSDK/getMarket.js +5 -0
  74. package/dist/constraint-runtime/src/tools/PolymarketSDK/getOrders.js +6 -0
  75. package/dist/constraint-runtime/src/tools/PolymarketSDK/listMarkets.js +4 -0
  76. package/dist/constraint-runtime/src/tools/SafeSDK/deploySafe.js +6 -0
  77. package/dist/constraint-runtime/src/tools/WalletTools/autoPay.js +29 -0
  78. package/dist/constraint-runtime/src/tools/WalletTools/createWallet.js +10 -0
  79. package/dist/constraint-runtime/src/tools/WalletTools/getBalance.js +13 -0
  80. package/dist/constraint-runtime/src/tools/WalletTools/importWallet.js +22 -0
  81. package/dist/constraint-runtime/src/tools/WalletTools/sendTransaction.js +25 -0
  82. package/dist/constraint-runtime/src/tools/WalletTools/signMessage.js +10 -0
  83. package/dist/constraint-runtime/src/tools/WalletTools/transferToken.js +25 -0
  84. package/dist/electron/config.js.map +1 -0
  85. package/dist/electron/dialogs.js.map +1 -0
  86. package/dist/electron/first-run.js.map +1 -0
  87. package/dist/electron/ipc.js.map +1 -0
  88. package/dist/electron/logger.js.map +1 -0
  89. package/dist/electron/main.js.map +1 -0
  90. package/dist/electron/menu.js.map +1 -0
  91. package/dist/electron/paths.js.map +1 -0
  92. package/dist/electron/server.js.map +1 -0
  93. package/dist/electron/tray.js.map +1 -0
  94. package/dist/electron/window.js.map +1 -0
  95. package/dist/electron-preload.js +29 -0
  96. package/dist/electron-preload.js.map +1 -0
  97. package/dist/electron.js +5 -0
  98. package/dist/electron.js.map +1 -0
  99. package/dist/llm/config-store.js +24 -8
  100. package/dist/llm/pi-ai.js +33 -19
  101. package/dist/web/server.js +16 -1
  102. package/dist/workflows/collaboration.js +374 -0
  103. package/dist/workflows/index.js +54 -0
  104. package/package.json +12 -3
  105. package/CLAUDE.md +0 -3
  106. package/build/icon.icns +0 -0
  107. package/build/icon.ico +0 -0
  108. package/build/icon.png +0 -0
  109. package/build/tray.png +0 -0
  110. package/build/trayTemplate.png +0 -0
  111. package/ios/App/App/AppDelegate.swift +0 -49
  112. package/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
  113. package/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -14
  114. package/ios/App/App/Assets.xcassets/Contents.json +0 -6
  115. package/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +0 -23
  116. package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
  117. package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
  118. package/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
  119. package/ios/App/App/Base.lproj/LaunchScreen.storyboard +0 -32
  120. package/ios/App/App/Base.lproj/Main.storyboard +0 -19
  121. package/ios/App/App/Info.plist +0 -88
  122. package/ios/App/App.xcodeproj/project.pbxproj +0 -376
  123. package/ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  124. package/ios/App/CapApp-SPM/Package.swift +0 -25
  125. package/ios/App/CapApp-SPM/README.md +0 -5
  126. package/ios/App/CapApp-SPM/Sources/CapApp-SPM/CapApp-SPM.swift +0 -1
  127. package/ios/debug.xcconfig +0 -1
  128. package/scripts/auto-evolve-oneshot.sh +0 -155
  129. package/scripts/auto-evolve-snapshot.sh +0 -136
  130. package/scripts/build-app-bundle.cjs +0 -170
  131. package/scripts/build-cli.js +0 -216
  132. package/scripts/detect-schema-changes.sh +0 -48
  133. package/scripts/lefthook-helper.sh +0 -69
  134. package/scripts/postinstall.js +0 -153
@@ -1,88 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>CAPACITOR_DEBUG</key>
6
- <string>$(CAPACITOR_DEBUG)</string>
7
- <key>CFBundleDevelopmentRegion</key>
8
- <string>en</string>
9
- <key>CFBundleDisplayName</key>
10
- <string>Bolloon Agent</string>
11
- <key>CFBundleExecutable</key>
12
- <string>$(EXECUTABLE_NAME)</string>
13
- <key>CFBundleIdentifier</key>
14
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
15
- <key>CFBundleInfoDictionaryVersion</key>
16
- <string>6.0</string>
17
- <key>CFBundleName</key>
18
- <string>$(PRODUCT_NAME)</string>
19
- <key>CFBundlePackageType</key>
20
- <string>APPL</string>
21
- <key>CFBundleShortVersionString</key>
22
- <string>$(MARKETING_VERSION)</string>
23
- <key>CFBundleVersion</key>
24
- <string>$(CURRENT_PROJECT_VERSION)</string>
25
- <key>LSRequiresIPhoneOS</key>
26
- <true/>
27
- <key>UILaunchStoryboardName</key>
28
- <string>LaunchScreen</string>
29
- <key>UIMainStoryboardFile</key>
30
- <string>Main</string>
31
- <key>UIRequiredDeviceCapabilities</key>
32
- <array>
33
- <string>armv7</string>
34
- </array>
35
- <key>UISupportedInterfaceOrientations</key>
36
- <array>
37
- <string>UIInterfaceOrientationPortrait</string>
38
- <string>UIInterfaceOrientationLandscapeLeft</string>
39
- <string>UIInterfaceOrientationLandscapeRight</string>
40
- </array>
41
- <key>UISupportedInterfaceOrientations~ipad</key>
42
- <array>
43
- <string>UIInterfaceOrientationPortrait</string>
44
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
45
- <string>UIInterfaceOrientationLandscapeLeft</string>
46
- <string>UIInterfaceOrientationLandscapeRight</string>
47
- </array>
48
- <key>UIViewControllerBasedStatusBarAppearance</key>
49
- <true/>
50
- <key>NSAppTransportSecurity</key>
51
- <dict>
52
- <key>NSAllowsLocalNetworking</key>
53
- <true/>
54
- <key>NSAllowsArbitraryLoadsInWebContent</key>
55
- <true/>
56
- <key>NSExceptionDomains</key>
57
- <dict>
58
- <key>localhost</key>
59
- <dict>
60
- <key>NSExceptionAllowsInsecureHTTPLoads</key>
61
- <true/>
62
- <key>NSIncludesSubdomains</key>
63
- <true/>
64
- </dict>
65
- </dict>
66
- </dict>
67
- <key>UIBackgroundModes</key>
68
- <array>
69
- <string>audio</string>
70
- <string>fetch</string>
71
- <string>processing</string>
72
- </array>
73
- <key>NSCameraUsageDescription</key>
74
- <string>Bolloon Agent 需要使用相机拍照上传到频道 (可选, 仅在你主动拍照时触发).</string>
75
- <key>NSPhotoLibraryUsageDescription</key>
76
- <string>Bolloon Agent 需要访问相册选择图片上传 (可选).</string>
77
- <key>NSMicrophoneUsageDescription</key>
78
- <string>Bolloon Agent 需要使用麦克风录音 (可选, 仅在你主动录制语音消息时触发).</string>
79
- <key>NSDocumentsFolderUsageDescription</key>
80
- <string>Bolloon Agent 需要保存文档到本地 (用户配置的数据目录).</string>
81
- <key>NSLocalNetworkUsageDescription</key>
82
- <string>Bolloon Agent 通过本地网络与同网段的其他 Bolloon Agent 通信 (P2P 节点发现).</string>
83
- <key>NSBonjourServices</key>
84
- <array>
85
- <string>_bolloon._tcp</string>
86
- </array>
87
- </dict>
88
- </plist>
@@ -1,376 +0,0 @@
1
- // !$*UTF8*$!
2
- {
3
- archiveVersion = 1;
4
- classes = {
5
- };
6
- objectVersion = 60;
7
- objects = {
8
-
9
- /* Begin PBXBuildFile section */
10
- 2FAD9763203C412B000D30F8 /* config.xml in Resources */ = {isa = PBXBuildFile; fileRef = 2FAD9762203C412B000D30F8 /* config.xml */; };
11
- 4D22ABE92AF431CB00220026 /* CapApp-SPM in Frameworks */ = {isa = PBXBuildFile; productRef = 4D22ABE82AF431CB00220026 /* CapApp-SPM */; };
12
- 50379B232058CBB4000EE86E /* capacitor.config.json in Resources */ = {isa = PBXBuildFile; fileRef = 50379B222058CBB4000EE86E /* capacitor.config.json */; };
13
- 504EC3081FED79650016851F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 504EC3071FED79650016851F /* AppDelegate.swift */; };
14
- 504EC30D1FED79650016851F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30B1FED79650016851F /* Main.storyboard */; };
15
- 504EC30F1FED79650016851F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 504EC30E1FED79650016851F /* Assets.xcassets */; };
16
- 504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 504EC3101FED79650016851F /* LaunchScreen.storyboard */; };
17
- 50B271D11FEDC1A000F3C39B /* public in Resources */ = {isa = PBXBuildFile; fileRef = 50B271D01FEDC1A000F3C39B /* public */; };
18
- /* End PBXBuildFile section */
19
-
20
- /* Begin PBXFileReference section */
21
- 2FAD9762203C412B000D30F8 /* config.xml */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = config.xml; sourceTree = "<group>"; };
22
- 50379B222058CBB4000EE86E /* capacitor.config.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = capacitor.config.json; sourceTree = "<group>"; };
23
- 504EC3041FED79650016851F /* App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = App.app; sourceTree = BUILT_PRODUCTS_DIR; };
24
- 504EC3071FED79650016851F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
25
- 504EC30C1FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
26
- 504EC30E1FED79650016851F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
27
- 504EC3111FED79650016851F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
28
- 504EC3131FED79650016851F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
29
- 50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; };
30
- 958DCC722DB07C7200EA8C5F /* debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = debug.xcconfig; path = ../debug.xcconfig; sourceTree = SOURCE_ROOT; };
31
- /* End PBXFileReference section */
32
-
33
- /* Begin PBXFrameworksBuildPhase section */
34
- 504EC3011FED79650016851F /* Frameworks */ = {
35
- isa = PBXFrameworksBuildPhase;
36
- buildActionMask = 2147483647;
37
- files = (
38
- 4D22ABE92AF431CB00220026 /* CapApp-SPM in Frameworks */,
39
- );
40
- runOnlyForDeploymentPostprocessing = 0;
41
- };
42
- /* End PBXFrameworksBuildPhase section */
43
-
44
- /* Begin PBXGroup section */
45
- 504EC2FB1FED79650016851F = {
46
- isa = PBXGroup;
47
- children = (
48
- 958DCC722DB07C7200EA8C5F /* debug.xcconfig */,
49
- 504EC3061FED79650016851F /* App */,
50
- 504EC3051FED79650016851F /* Products */,
51
- );
52
- sourceTree = "<group>";
53
- };
54
- 504EC3051FED79650016851F /* Products */ = {
55
- isa = PBXGroup;
56
- children = (
57
- 504EC3041FED79650016851F /* App.app */,
58
- );
59
- name = Products;
60
- sourceTree = "<group>";
61
- };
62
- 504EC3061FED79650016851F /* App */ = {
63
- isa = PBXGroup;
64
- children = (
65
- 50379B222058CBB4000EE86E /* capacitor.config.json */,
66
- 504EC3071FED79650016851F /* AppDelegate.swift */,
67
- 504EC30B1FED79650016851F /* Main.storyboard */,
68
- 504EC30E1FED79650016851F /* Assets.xcassets */,
69
- 504EC3101FED79650016851F /* LaunchScreen.storyboard */,
70
- 504EC3131FED79650016851F /* Info.plist */,
71
- 2FAD9762203C412B000D30F8 /* config.xml */,
72
- 50B271D01FEDC1A000F3C39B /* public */,
73
- );
74
- path = App;
75
- sourceTree = "<group>";
76
- };
77
- /* End PBXGroup section */
78
-
79
- /* Begin PBXNativeTarget section */
80
- 504EC3031FED79650016851F /* App */ = {
81
- isa = PBXNativeTarget;
82
- buildConfigurationList = 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */;
83
- buildPhases = (
84
- 504EC3001FED79650016851F /* Sources */,
85
- 504EC3011FED79650016851F /* Frameworks */,
86
- 504EC3021FED79650016851F /* Resources */,
87
- );
88
- buildRules = (
89
- );
90
- dependencies = (
91
- );
92
- name = App;
93
- packageProductDependencies = (
94
- 4D22ABE82AF431CB00220026 /* CapApp-SPM */,
95
- );
96
- productName = App;
97
- productReference = 504EC3041FED79650016851F /* App.app */;
98
- productType = "com.apple.product-type.application";
99
- };
100
- /* End PBXNativeTarget section */
101
-
102
- /* Begin PBXProject section */
103
- 504EC2FC1FED79650016851F /* Project object */ = {
104
- isa = PBXProject;
105
- attributes = {
106
- LastSwiftUpdateCheck = 0920;
107
- LastUpgradeCheck = 0920;
108
- TargetAttributes = {
109
- 504EC3031FED79650016851F = {
110
- CreatedOnToolsVersion = 9.2;
111
- LastSwiftMigration = 1100;
112
- ProvisioningStyle = Automatic;
113
- };
114
- };
115
- };
116
- buildConfigurationList = 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */;
117
- compatibilityVersion = "Xcode 8.0";
118
- developmentRegion = en;
119
- hasScannedForEncodings = 0;
120
- knownRegions = (
121
- en,
122
- Base,
123
- );
124
- mainGroup = 504EC2FB1FED79650016851F;
125
- packageReferences = (
126
- D4C12C0A2AAA248700AAC8A2 /* XCLocalSwiftPackageReference "CapApp-SPM" */,
127
- );
128
- productRefGroup = 504EC3051FED79650016851F /* Products */;
129
- projectDirPath = "";
130
- projectRoot = "";
131
- targets = (
132
- 504EC3031FED79650016851F /* App */,
133
- );
134
- };
135
- /* End PBXProject section */
136
-
137
- /* Begin PBXResourcesBuildPhase section */
138
- 504EC3021FED79650016851F /* Resources */ = {
139
- isa = PBXResourcesBuildPhase;
140
- buildActionMask = 2147483647;
141
- files = (
142
- 504EC3121FED79650016851F /* LaunchScreen.storyboard in Resources */,
143
- 50B271D11FEDC1A000F3C39B /* public in Resources */,
144
- 504EC30F1FED79650016851F /* Assets.xcassets in Resources */,
145
- 50379B232058CBB4000EE86E /* capacitor.config.json in Resources */,
146
- 504EC30D1FED79650016851F /* Main.storyboard in Resources */,
147
- 2FAD9763203C412B000D30F8 /* config.xml in Resources */,
148
- );
149
- runOnlyForDeploymentPostprocessing = 0;
150
- };
151
- /* End PBXResourcesBuildPhase section */
152
-
153
- /* Begin PBXSourcesBuildPhase section */
154
- 504EC3001FED79650016851F /* Sources */ = {
155
- isa = PBXSourcesBuildPhase;
156
- buildActionMask = 2147483647;
157
- files = (
158
- 504EC3081FED79650016851F /* AppDelegate.swift in Sources */,
159
- );
160
- runOnlyForDeploymentPostprocessing = 0;
161
- };
162
- /* End PBXSourcesBuildPhase section */
163
-
164
- /* Begin PBXVariantGroup section */
165
- 504EC30B1FED79650016851F /* Main.storyboard */ = {
166
- isa = PBXVariantGroup;
167
- children = (
168
- 504EC30C1FED79650016851F /* Base */,
169
- );
170
- name = Main.storyboard;
171
- sourceTree = "<group>";
172
- };
173
- 504EC3101FED79650016851F /* LaunchScreen.storyboard */ = {
174
- isa = PBXVariantGroup;
175
- children = (
176
- 504EC3111FED79650016851F /* Base */,
177
- );
178
- name = LaunchScreen.storyboard;
179
- sourceTree = "<group>";
180
- };
181
- /* End PBXVariantGroup section */
182
-
183
- /* Begin XCBuildConfiguration section */
184
- 504EC3141FED79650016851F /* Debug */ = {
185
- isa = XCBuildConfiguration;
186
- baseConfigurationReference = 958DCC722DB07C7200EA8C5F /* debug.xcconfig */;
187
- buildSettings = {
188
- ALWAYS_SEARCH_USER_PATHS = NO;
189
- CLANG_ANALYZER_NONNULL = YES;
190
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
191
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
192
- CLANG_CXX_LIBRARY = "libc++";
193
- CLANG_ENABLE_MODULES = YES;
194
- CLANG_ENABLE_OBJC_ARC = YES;
195
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
196
- CLANG_WARN_BOOL_CONVERSION = YES;
197
- CLANG_WARN_COMMA = YES;
198
- CLANG_WARN_CONSTANT_CONVERSION = YES;
199
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
200
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
201
- CLANG_WARN_EMPTY_BODY = YES;
202
- CLANG_WARN_ENUM_CONVERSION = YES;
203
- CLANG_WARN_INFINITE_RECURSION = YES;
204
- CLANG_WARN_INT_CONVERSION = YES;
205
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
206
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
207
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
208
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
209
- CLANG_WARN_STRICT_PROTOTYPES = YES;
210
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
211
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
212
- CLANG_WARN_UNREACHABLE_CODE = YES;
213
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
214
- CODE_SIGN_IDENTITY = "iPhone Developer";
215
- COPY_PHASE_STRIP = NO;
216
- DEBUG_INFORMATION_FORMAT = dwarf;
217
- ENABLE_STRICT_OBJC_MSGSEND = YES;
218
- ENABLE_TESTABILITY = YES;
219
- GCC_C_LANGUAGE_STANDARD = gnu11;
220
- GCC_DYNAMIC_NO_PIC = NO;
221
- GCC_NO_COMMON_BLOCKS = YES;
222
- GCC_OPTIMIZATION_LEVEL = 0;
223
- GCC_PREPROCESSOR_DEFINITIONS = (
224
- "DEBUG=1",
225
- "$(inherited)",
226
- );
227
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
228
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
229
- GCC_WARN_UNDECLARED_SELECTOR = YES;
230
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
231
- GCC_WARN_UNUSED_FUNCTION = YES;
232
- GCC_WARN_UNUSED_VARIABLE = YES;
233
- IPHONEOS_DEPLOYMENT_TARGET = 15.0;
234
- MTL_ENABLE_DEBUG_INFO = YES;
235
- ONLY_ACTIVE_ARCH = YES;
236
- SDKROOT = iphoneos;
237
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
238
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
239
- };
240
- name = Debug;
241
- };
242
- 504EC3151FED79650016851F /* Release */ = {
243
- isa = XCBuildConfiguration;
244
- buildSettings = {
245
- ALWAYS_SEARCH_USER_PATHS = NO;
246
- CLANG_ANALYZER_NONNULL = YES;
247
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
248
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
249
- CLANG_CXX_LIBRARY = "libc++";
250
- CLANG_ENABLE_MODULES = YES;
251
- CLANG_ENABLE_OBJC_ARC = YES;
252
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
253
- CLANG_WARN_BOOL_CONVERSION = YES;
254
- CLANG_WARN_COMMA = YES;
255
- CLANG_WARN_CONSTANT_CONVERSION = YES;
256
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
257
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
258
- CLANG_WARN_EMPTY_BODY = YES;
259
- CLANG_WARN_ENUM_CONVERSION = YES;
260
- CLANG_WARN_INFINITE_RECURSION = YES;
261
- CLANG_WARN_INT_CONVERSION = YES;
262
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
263
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
264
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
265
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
266
- CLANG_WARN_STRICT_PROTOTYPES = YES;
267
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
268
- CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
269
- CLANG_WARN_UNREACHABLE_CODE = YES;
270
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
271
- CODE_SIGN_IDENTITY = "iPhone Developer";
272
- COPY_PHASE_STRIP = NO;
273
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
274
- ENABLE_NS_ASSERTIONS = NO;
275
- ENABLE_STRICT_OBJC_MSGSEND = YES;
276
- GCC_C_LANGUAGE_STANDARD = gnu11;
277
- GCC_NO_COMMON_BLOCKS = YES;
278
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
279
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
280
- GCC_WARN_UNDECLARED_SELECTOR = YES;
281
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
282
- GCC_WARN_UNUSED_FUNCTION = YES;
283
- GCC_WARN_UNUSED_VARIABLE = YES;
284
- IPHONEOS_DEPLOYMENT_TARGET = 15.0;
285
- MTL_ENABLE_DEBUG_INFO = NO;
286
- SDKROOT = iphoneos;
287
- SWIFT_COMPILATION_MODE = wholemodule;
288
- SWIFT_OPTIMIZATION_LEVEL = "-O";
289
- VALIDATE_PRODUCT = YES;
290
- };
291
- name = Release;
292
- };
293
- 504EC3171FED79650016851F /* Debug */ = {
294
- isa = XCBuildConfiguration;
295
- baseConfigurationReference = 958DCC722DB07C7200EA8C5F /* debug.xcconfig */;
296
- buildSettings = {
297
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
298
- CODE_SIGN_STYLE = Automatic;
299
- CURRENT_PROJECT_VERSION = 1;
300
- INFOPLIST_FILE = App/Info.plist;
301
- IPHONEOS_DEPLOYMENT_TARGET = 15.0;
302
- LD_RUNPATH_SEARCH_PATHS = (
303
- "$(inherited)",
304
- "@executable_path/Frameworks",
305
- );
306
- MARKETING_VERSION = 1.0;
307
- OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
308
- PRODUCT_BUNDLE_IDENTIFIER = com.bolloon.agent;
309
- PRODUCT_NAME = "$(TARGET_NAME)";
310
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
311
- SWIFT_VERSION = 5.0;
312
- TARGETED_DEVICE_FAMILY = "1,2";
313
- };
314
- name = Debug;
315
- };
316
- 504EC3181FED79650016851F /* Release */ = {
317
- isa = XCBuildConfiguration;
318
- buildSettings = {
319
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
320
- CODE_SIGN_STYLE = Automatic;
321
- CURRENT_PROJECT_VERSION = 1;
322
- INFOPLIST_FILE = App/Info.plist;
323
- IPHONEOS_DEPLOYMENT_TARGET = 15.0;
324
- LD_RUNPATH_SEARCH_PATHS = (
325
- "$(inherited)",
326
- "@executable_path/Frameworks",
327
- );
328
- MARKETING_VERSION = 1.0;
329
- PRODUCT_BUNDLE_IDENTIFIER = com.bolloon.agent;
330
- PRODUCT_NAME = "$(TARGET_NAME)";
331
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
332
- SWIFT_VERSION = 5.0;
333
- TARGETED_DEVICE_FAMILY = "1,2";
334
- };
335
- name = Release;
336
- };
337
- /* End XCBuildConfiguration section */
338
-
339
- /* Begin XCConfigurationList section */
340
- 504EC2FF1FED79650016851F /* Build configuration list for PBXProject "App" */ = {
341
- isa = XCConfigurationList;
342
- buildConfigurations = (
343
- 504EC3141FED79650016851F /* Debug */,
344
- 504EC3151FED79650016851F /* Release */,
345
- );
346
- defaultConfigurationIsVisible = 0;
347
- defaultConfigurationName = Release;
348
- };
349
- 504EC3161FED79650016851F /* Build configuration list for PBXNativeTarget "App" */ = {
350
- isa = XCConfigurationList;
351
- buildConfigurations = (
352
- 504EC3171FED79650016851F /* Debug */,
353
- 504EC3181FED79650016851F /* Release */,
354
- );
355
- defaultConfigurationIsVisible = 0;
356
- defaultConfigurationName = Release;
357
- };
358
- /* End XCConfigurationList section */
359
-
360
- /* Begin XCLocalSwiftPackageReference section */
361
- D4C12C0A2AAA248700AAC8A2 /* XCLocalSwiftPackageReference "CapApp-SPM" */ = {
362
- isa = XCLocalSwiftPackageReference;
363
- relativePath = "CapApp-SPM";
364
- };
365
- /* End XCLocalSwiftPackageReference section */
366
-
367
- /* Begin XCSwiftPackageProductDependency section */
368
- 4D22ABE82AF431CB00220026 /* CapApp-SPM */ = {
369
- isa = XCSwiftPackageProductDependency;
370
- package = D4C12C0A2AAA248700AAC8A2 /* XCLocalSwiftPackageReference "CapApp-SPM" */;
371
- productName = "CapApp-SPM";
372
- };
373
- /* End XCSwiftPackageProductDependency section */
374
- };
375
- rootObject = 504EC2FC1FED79650016851F /* Project object */;
376
- }
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>IDEDidComputeMac32BitWarning</key>
6
- <true/>
7
- </dict>
8
- </plist>
@@ -1,25 +0,0 @@
1
- // swift-tools-version: 5.9
2
- import PackageDescription
3
-
4
- // DO NOT MODIFY THIS FILE - managed by Capacitor CLI commands
5
- let package = Package(
6
- name: "CapApp-SPM",
7
- platforms: [.iOS(.v15)],
8
- products: [
9
- .library(
10
- name: "CapApp-SPM",
11
- targets: ["CapApp-SPM"])
12
- ],
13
- dependencies: [
14
- .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", exact: "8.4.1")
15
- ],
16
- targets: [
17
- .target(
18
- name: "CapApp-SPM",
19
- dependencies: [
20
- .product(name: "Capacitor", package: "capacitor-swift-pm"),
21
- .product(name: "Cordova", package: "capacitor-swift-pm")
22
- ]
23
- )
24
- ]
25
- )
@@ -1,5 +0,0 @@
1
- # CapApp-SPM
2
-
3
- This package is used to host SPM dependencies for your Capacitor project
4
-
5
- Do not modify the contents of it or there may be unintended consequences.
@@ -1 +0,0 @@
1
- public let isCapacitorApp = true
@@ -1 +0,0 @@
1
- CAPACITOR_DEBUG = true
@@ -1,155 +0,0 @@
1
- #!/bin/bash
2
- # auto-evolve-oneshot.sh — 阶段 D 单次修复 (shell 版)
3
- #
4
- # 流程 (全本地, 用 MINIMAX_API_KEY 调 LLM):
5
- # 1. 跑 vitest, 抓 fail
6
- # 2. 让 LLM 修
7
- # 3. 解析 LLM 输出的 diff, 写到 staging
8
- # 4. 跑 reviewer (护栏 4)
9
- # 5. PASS → git apply + commit (护栏 1 拦)
10
-
11
- set -uo pipefail # 不加 -e: vitest 失败要继续
12
-
13
- REPO="$(cd "$(dirname "$0")/.." && pwd)"
14
- cd "$REPO"
15
-
16
- echo "[oneshot] REPO=$REPO"
17
-
18
- # 1. 跑 vitest
19
- npx vitest run --reporter=json --no-color 2>/dev/null > /tmp/vt-out.json
20
- TOTAL_FAIL=$(python3 -c "
21
- import json
22
- d = json.load(open('/tmp/vt-out.json'))
23
- print(sum(1 for f in d.get('testResults',[]) for a in f.get('assertionResults',[]) if a.get('status')=='failed'))
24
- ")
25
- echo "[oneshot] vitest failed=$TOTAL_FAIL"
26
-
27
- if [ "$TOTAL_FAIL" = "0" ]; then
28
- echo "[oneshot] ✅ 全部通过, 不需要修"
29
- exit 0
30
- fi
31
-
32
- # 2. 抽 fail 信息
33
- FAIL_SUMMARY=$(python3 -c "
34
- import json
35
- d = json.load(open('/tmp/vt-out.json'))
36
- for f in d.get('testResults', []):
37
- for a in f.get('assertionResults', []):
38
- if a.get('status') == 'failed':
39
- print('FILE:', f.get('name'))
40
- print('TEST:', a.get('fullName') or a.get('title'))
41
- print('ERROR:')
42
- for m in a.get('failureMessages', [])[:2]:
43
- print(m[:600])
44
- print('---')
45
- " | head -60)
46
- echo "[oneshot] 2. 调 LLM 修..."
47
-
48
- # 3. 用 LLM 生成修复
49
- # prompt: 要 LLM 输出 ```diff ... ``` 块
50
- # 3. 写 prompt 到文件 (避免 shell 反引号冲突)
51
- PROMPT_FILE="/tmp/oneshot-prompt.txt"
52
- cat > "$PROMPT_FILE" <<PROMPT_EOF
53
- 你是一个谨慎的代码修复助手. 你的工作是修复失败的测试.
54
-
55
- 约束: 改动最小, 不改测试, 不引入 any/unknown/@ts-ignore.
56
-
57
- 输出格式: 严格只输出一个 \`\`\`diff ... \`\`\` 块, 第一个字符 \`\`\`diff, 最后一个字符 \`\`\`. 中间是 unified diff (--- a/path +++ b/path 风格). 不要在 diff 块外输出任何文字.
58
-
59
- FAIL 信息:
60
- $(cat /tmp/vt-out.json | python3 -c "
61
- import json
62
- d = json.load(open('/tmp/vt-out.json'))
63
- for f in d.get('testResults', []):
64
- for a in f.get('assertionResults', []):
65
- if a.get('status') == 'failed':
66
- print('FILE:', f.get('name'))
67
- print('TEST:', a.get('fullName') or a.get('title'))
68
- print('ERROR:')
69
- for m in a.get('failureMessages', [])[:2]:
70
- print(m[:600])
71
- print('---')
72
- " | head -60)
73
-
74
- 请**只**输出 diff 块:
75
- PROMPT_EOF
76
-
77
- LLM_OUTPUT=$(npx tsx -r dotenv/config -e "
78
- import { initMinimax } from './src/llm/pi-ai.js';
79
- import * as fs from 'fs';
80
- const prompt = fs.readFileSync('$PROMPT_FILE', 'utf-8');
81
- const client = initMinimax();
82
- const text = await client.generateText({ messages: [{ role: 'user', content: prompt }], maxTokens: 4096, temperature: 0.2 });
83
- process.stdout.write(text || '');
84
- " 2>/tmp/llm-err.log)
85
-
86
- if [ -z "$LLM_OUTPUT" ]; then
87
- echo "[oneshot] ❌ LLM 没返回"
88
- exit 2
89
- fi
90
-
91
- # 4. 解析 diff
92
- DIFF=$(echo "$LLM_OUTPUT" | python3 -c "
93
- import sys, re
94
- text = sys.stdin.read()
95
- m = re.search(r'\`\`\`diff\s*([\s\S]*?)\`\`\`', text)
96
- if m:
97
- diff = m.group(1).strip()
98
- if not diff.endswith('\n'):
99
- diff += '\n'
100
- print(diff)
101
- else:
102
- sys.exit(1)
103
- " 2>/dev/null) || {
104
- echo "[oneshot] ❌ LLM 输出没 diff 块"
105
- echo "--- LLM 原始输出 (前 800) ---"
106
- echo "$LLM_OUTPUT" | head -c 800
107
- echo ""
108
- exit 3
109
- }
110
-
111
- echo "[oneshot] 拿到 diff: $(echo "$DIFF" | wc -l) lines"
112
-
113
- # 5. 写 staging
114
- ID="oneshot-$(date +%s)"
115
- mkdir -p "staging/auto-evolve/$ID"
116
- echo "$DIFF" > "staging/auto-evolve/$ID/$ID.patch"
117
- echo "$ID" > "staging/auto-evolve/$ID/.patch-id"
118
- echo "[oneshot] patch 写到 staging/auto-evolve/$ID/"
119
-
120
- # 6. 跑 reviewer
121
- echo "[oneshot] 3. 跑 reviewer..."
122
- npx tsx -r dotenv/config scripts/diff-reviewer.ts "$ID" > /tmp/reviewer.log 2>&1 || true
123
- VERDICT=$(python3 -c "
124
- import json
125
- try:
126
- print(json.load(open('staging/auto-evolve/$ID/.review-verdict')).get('verdict','UNKNOWN'))
127
- except:
128
- print('UNKNOWN')
129
- ")
130
- echo "[oneshot] reviewer verdict: $VERDICT"
131
-
132
- # 7. apply + commit
133
- if [ "$VERDICT" = "PASS" ]; then
134
- echo "[oneshot] 4. apply + commit"
135
- if git apply --recount --whitespace=fix "staging/auto-evolve/$ID/$ID.patch" 2>/tmp/apply.err; then
136
- git add -A
137
- git commit -m "auto-evolve: $ID (LLM 修复)"
138
- echo "[oneshot] ✅ 提交成功"
139
- # 验证
140
- npx vitest run --reporter=json --no-color 2>/dev/null > /tmp/vt-after.json
141
- AFTER_FAIL=$(python3 -c "
142
- import json
143
- print(sum(1 for f in json.load(open('/tmp/vt-after.json')).get('testResults',[]) for a in f.get('assertionResults',[]) if a.get('status')=='failed'))
144
- ")
145
- echo "[oneshot] 修复后 fail: $AFTER_FAIL (之前 $TOTAL_FAIL)"
146
- else
147
- echo "[oneshot] ❌ git apply 失败:"
148
- cat /tmp/apply.err
149
- exit 4
150
- fi
151
- else
152
- echo "[oneshot] ❌ reviewer verdict=$VERDICT, 不 apply"
153
- cat /tmp/reviewer.log | head -10
154
- exit 5
155
- fi