wq-pilot 0.2.2__tar.gz

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 (104) hide show
  1. wq_pilot-0.2.2/LICENSE +202 -0
  2. wq_pilot-0.2.2/NOTICE.md +9 -0
  3. wq_pilot-0.2.2/PKG-INFO +130 -0
  4. wq_pilot-0.2.2/README.en.md +111 -0
  5. wq_pilot-0.2.2/README.md +111 -0
  6. wq_pilot-0.2.2/pyproject.toml +34 -0
  7. wq_pilot-0.2.2/setup.cfg +4 -0
  8. wq_pilot-0.2.2/src/wq/__init__.py +1 -0
  9. wq_pilot-0.2.2/src/wq/__main__.py +4 -0
  10. wq_pilot-0.2.2/src/wq/account.py +67 -0
  11. wq_pilot-0.2.2/src/wq/adapters/__init__.py +0 -0
  12. wq_pilot-0.2.2/src/wq/adapters/base.py +30 -0
  13. wq_pilot-0.2.2/src/wq/adapters/brain.py +43 -0
  14. wq_pilot-0.2.2/src/wq/adapters/manual.py +43 -0
  15. wq_pilot-0.2.2/src/wq/assets/__init__.py +6 -0
  16. wq_pilot-0.2.2/src/wq/assets/autopilot-policy.example.json +49 -0
  17. wq_pilot-0.2.2/src/wq/assets/config.example.json +122 -0
  18. wq_pilot-0.2.2/src/wq/assets/docker_provider.py +91 -0
  19. wq_pilot-0.2.2/src/wq/assets/profiles.example.json +173 -0
  20. wq_pilot-0.2.2/src/wq/assets/provider_entry.py +23 -0
  21. wq_pilot-0.2.2/src/wq/assets/provider_login.py +30 -0
  22. wq_pilot-0.2.2/src/wq/autopilot.py +936 -0
  23. wq_pilot-0.2.2/src/wq/brain_client.py +175 -0
  24. wq_pilot-0.2.2/src/wq/brain_jobs.py +223 -0
  25. wq_pilot-0.2.2/src/wq/brain_submission.py +295 -0
  26. wq_pilot-0.2.2/src/wq/catalog.py +195 -0
  27. wq_pilot-0.2.2/src/wq/cli.py +884 -0
  28. wq_pilot-0.2.2/src/wq/config.py +186 -0
  29. wq_pilot-0.2.2/src/wq/contracts.py +162 -0
  30. wq_pilot-0.2.2/src/wq/db.py +169 -0
  31. wq_pilot-0.2.2/src/wq/dedup.py +39 -0
  32. wq_pilot-0.2.2/src/wq/desktop.py +222 -0
  33. wq_pilot-0.2.2/src/wq/desktop_control.py +237 -0
  34. wq_pilot-0.2.2/src/wq/errors.py +41 -0
  35. wq_pilot-0.2.2/src/wq/evidence_gate.py +430 -0
  36. wq_pilot-0.2.2/src/wq/exporter.py +59 -0
  37. wq_pilot-0.2.2/src/wq/feedback.py +578 -0
  38. wq_pilot-0.2.2/src/wq/history_research.py +190 -0
  39. wq_pilot-0.2.2/src/wq/i18n.py +83 -0
  40. wq_pilot-0.2.2/src/wq/importer.py +97 -0
  41. wq_pilot-0.2.2/src/wq/onboard.py +250 -0
  42. wq_pilot-0.2.2/src/wq/pnl.py +62 -0
  43. wq_pilot-0.2.2/src/wq/progress.py +40 -0
  44. wq_pilot-0.2.2/src/wq/provider_runtime.py +178 -0
  45. wq_pilot-0.2.2/src/wq/providers.py +202 -0
  46. wq_pilot-0.2.2/src/wq/reconcile.py +85 -0
  47. wq_pilot-0.2.2/src/wq/refinement.py +47 -0
  48. wq_pilot-0.2.2/src/wq/report.py +118 -0
  49. wq_pilot-0.2.2/src/wq/research_dsl.py +161 -0
  50. wq_pilot-0.2.2/src/wq/research_gate.py +55 -0
  51. wq_pilot-0.2.2/src/wq/routing.py +337 -0
  52. wq_pilot-0.2.2/src/wq/runner.py +203 -0
  53. wq_pilot-0.2.2/src/wq/setup_linux.py +73 -0
  54. wq_pilot-0.2.2/src/wq/setup_local.py +86 -0
  55. wq_pilot-0.2.2/src/wq/store.py +421 -0
  56. wq_pilot-0.2.2/src/wq/task_view.py +272 -0
  57. wq_pilot-0.2.2/src/wq/usage.py +181 -0
  58. wq_pilot-0.2.2/src/wq/util.py +86 -0
  59. wq_pilot-0.2.2/src/wq/windows_setup.py +95 -0
  60. wq_pilot-0.2.2/src/wq/workflow.py +199 -0
  61. wq_pilot-0.2.2/src/wq/wrappers/__init__.py +0 -0
  62. wq_pilot-0.2.2/src/wq/wrappers/agent.py +362 -0
  63. wq_pilot-0.2.2/src/wq_pilot.egg-info/PKG-INFO +130 -0
  64. wq_pilot-0.2.2/src/wq_pilot.egg-info/SOURCES.txt +102 -0
  65. wq_pilot-0.2.2/src/wq_pilot.egg-info/dependency_links.txt +1 -0
  66. wq_pilot-0.2.2/src/wq_pilot.egg-info/entry_points.txt +2 -0
  67. wq_pilot-0.2.2/src/wq_pilot.egg-info/top_level.txt +1 -0
  68. wq_pilot-0.2.2/tests/test_agent_wrapper.py +158 -0
  69. wq_pilot-0.2.2/tests/test_alternate_providers.py +73 -0
  70. wq_pilot-0.2.2/tests/test_assets_parity.py +28 -0
  71. wq_pilot-0.2.2/tests/test_automation_dependencies.py +75 -0
  72. wq_pilot-0.2.2/tests/test_autopilot.py +361 -0
  73. wq_pilot-0.2.2/tests/test_autopilot_variants.py +102 -0
  74. wq_pilot-0.2.2/tests/test_borrowing_shadow.py +217 -0
  75. wq_pilot-0.2.2/tests/test_brain_client.py +72 -0
  76. wq_pilot-0.2.2/tests/test_brain_jobs.py +170 -0
  77. wq_pilot-0.2.2/tests/test_brain_submission.py +201 -0
  78. wq_pilot-0.2.2/tests/test_catalog.py +88 -0
  79. wq_pilot-0.2.2/tests/test_cli_common.py +55 -0
  80. wq_pilot-0.2.2/tests/test_contracts.py +74 -0
  81. wq_pilot-0.2.2/tests/test_debug_window.py +328 -0
  82. wq_pilot-0.2.2/tests/test_dedup.py +50 -0
  83. wq_pilot-0.2.2/tests/test_desktop_control.py +138 -0
  84. wq_pilot-0.2.2/tests/test_desktop_data.py +196 -0
  85. wq_pilot-0.2.2/tests/test_evidence_gate.py +35 -0
  86. wq_pilot-0.2.2/tests/test_feedback.py +176 -0
  87. wq_pilot-0.2.2/tests/test_history_research.py +76 -0
  88. wq_pilot-0.2.2/tests/test_import.py +113 -0
  89. wq_pilot-0.2.2/tests/test_linux_deployment.py +79 -0
  90. wq_pilot-0.2.2/tests/test_onboarding.py +111 -0
  91. wq_pilot-0.2.2/tests/test_pnl.py +42 -0
  92. wq_pilot-0.2.2/tests/test_providers_workflow.py +233 -0
  93. wq_pilot-0.2.2/tests/test_recovery_review.py +102 -0
  94. wq_pilot-0.2.2/tests/test_refinement.py +39 -0
  95. wq_pilot-0.2.2/tests/test_research_gate.py +77 -0
  96. wq_pilot-0.2.2/tests/test_review_fixes.py +376 -0
  97. wq_pilot-0.2.2/tests/test_routing.py +178 -0
  98. wq_pilot-0.2.2/tests/test_runner.py +204 -0
  99. wq_pilot-0.2.2/tests/test_setup_local.py +65 -0
  100. wq_pilot-0.2.2/tests/test_task_view.py +64 -0
  101. wq_pilot-0.2.2/tests/test_tasks.py +82 -0
  102. wq_pilot-0.2.2/tests/test_usage.py +107 -0
  103. wq_pilot-0.2.2/tests/test_wide_dsl.py +92 -0
  104. wq_pilot-0.2.2/tests/test_windows_tray.py +148 -0
wq_pilot-0.2.2/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,9 @@
1
+ # 许可与第三方
2
+
3
+ 本项目以 Apache License 2.0 发布(见 LICENSE),Copyright 2026 autowq contributors。公开发布前所有者已确认:重新核查完整 Git 历史、平台条款、研究内容与第三方许可后再公开仓库。
4
+
5
+ 运行时使用 Python 标准库;构建使用 setuptools,CI 使用 GitHub 的 checkout/setup-python Actions。Grok Build、Devin、Cursor、ZCode、Claude Code、Codex 等是外部独立安装的 CLI,仓库不包含其程序、登录凭证或订阅额度,也不转授供应商许可。
6
+
7
+ 此前评估过 wq-alpha-pipeline、wq-alpha-agent 和 alpha-cli;本次没有复制、vendoring 或引入这些仓库的运行时代码。不能因为参考项目标注 MIT 就推断平台数据或账号自动化权利。
8
+
9
+ WorldQuant/BRAIN 商标、平台和数据归其权利人。本项目非官方产品。
@@ -0,0 +1,130 @@
1
+ Metadata-Version: 2.4
2
+ Name: wq-pilot
3
+ Version: 0.2.2
4
+ Summary: Local research orchestration with gated providers and recoverable simulations
5
+ License: Apache-2.0
6
+ Project-URL: Homepage, https://github.com/Octo-o-o-o/autowq
7
+ Project-URL: Repository, https://github.com/Octo-o-o-o/autowq
8
+ Classifier: License :: OSI Approved :: Apache Software License
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Requires-Python: >=3.11
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ License-File: NOTICE.md
18
+ Dynamic: license-file
19
+
20
+ # autowq
21
+
22
+ English | [简体中文](README.md)
23
+
24
+ A local WorldQuant BRAIN research workflow: propose a hypothesis → review through a different provider → bounded simulation → diagnose real results → investigate complementary signals → validate before submission. You control models, budgets, evidence and the queue. A chat session does not need to stay online.
25
+
26
+ **A research tool, not a promise of income.** Passing a screen, an accepted submission, consultant eligibility and actual payment are separate states. Research automation does not automatically authorize submissions.
27
+
28
+ ## Install
29
+
30
+ Requirements: Python 3.11+ and your own CLI subscription accounts or API keys. The core runtime uses the Python standard library only. macOS is supported; Linux and Windows WSL2 use Docker-isolated providers. Native Windows has experimental support for the tray and scheduler control layer (see the Windows note under Option 2).
31
+
32
+ ```sh
33
+ # Option 1: Homebrew (macOS)
34
+ brew tap Octo-o-o-o/autowq && brew install wq-pilot
35
+ brew install --cask Octo-o-o-o/autowq/worldquant # optional menu-bar app
36
+ ```
37
+
38
+ Option 2: macOS menu-bar app. Download `WorldQuant-<version>.dmg` from [Releases](https://github.com/Octo-o-o-o/autowq/releases), drag it into Applications and double-click; the first-launch wizard picks a workspace, prepares the runtime and starts onboarding. If the build is not notarized, install via `brew install --cask` (which removes quarantine) or right-click Open once.
39
+
40
+ Windows (experimental): the tray shares the same control layer and feature set as the macOS menu bar. Download `WorldQuantTray.exe` (single file, engine bundled) from [Releases](https://github.com/Octo-o-o-o/autowq/releases) and run it inside a workspace that has completed `wq onboard`, optionally with `--workspace <dir>`; or from source, `pip install pystray Pillow` then `python scripts/setup_windows.py` to register the Task Scheduler runner and login autostart. Providers are not bundled with the exe — configure profiles.json yourself; the full research stack still recommends Linux / Windows WSL2, see the cross-platform guide.
41
+
42
+ Option 3: source checkout (development):
43
+
44
+ ```sh
45
+ git clone https://github.com/Octo-o-o-o/autowq.git
46
+ cd autowq
47
+ ./wq onboard
48
+ ./wq doctor --fix-private
49
+ ./wq validate result fixtures/synthetic-result-pass.json
50
+ ./wq import-results fixtures/synthetic-result-pass.json
51
+ ./wq tasks
52
+ ```
53
+
54
+ Option 4: pipx (`pipx install wq-pilot`, then `mkdir ~/autowq && cd ~/autowq && wq onboard`). **Not available yet: the PyPI release is not set up (no Trusted Publisher configured).** It will be enabled once publishing works.
55
+
56
+
57
+ The wizard detects host executables and lets you select providers, model IDs, research/review/engineering roles and optional reasoning effort. It generates local configuration and isolated launchers. **It never overwrites an existing deployment, starts paid inference or installs a scheduler.** The default language is Chinese for Chinese locales and English otherwise. Choose another language at the first prompt or pass `--lang zh/en`. The wizard includes vendor CLI and BRAIN login, with the [official registration URL](https://platform.worldquantbrain.com/sign-up). You can skip and resume with `./wq onboard --login-only`. A successful login command does not verify model entitlement.
58
+
59
+ Adapters include Grok Build, Devin, Cursor, ZCode, plus Claude Code, Codex, Gemini CLI, GitHub Copilot CLI, Qwen Code and OpenCode. Standard OpenAI Chat Completions/Responses and Anthropic Messages APIs accept manual Base URL, key references and model IDs. See the **[bilingual provider/workflow guide](docs/providers-workflow.md)** for model discovery, platform support and verification limits. Continuous research still requires distinct review providers.
60
+
61
+ Advanced mode offers versioned JSON, a step-by-step CLI editor and natural-language AI draft editing. Configure role routes, additional prompts, simulation/feedback switches and bounded combinations, then use `workflow validate/diff/apply`. Existing budgets and submission gates stay enforced.
62
+
63
+ ```bash
64
+ ./wq providers list
65
+ ./wq providers models devin
66
+ ./wq workflow init --output config/workflow.draft.json
67
+ ./wq workflow edit config/workflow.draft.json --output config/workflow.edited.json
68
+ ```
69
+
70
+ Follow the **[complete bilingual onboarding checklist](docs/onboarding.md)**: sign in → configure budgets and expiration → verify BRAIN access → verify field evidence → validate one real cycle → install scheduling. Models, API access, automatic research and submissions start disabled. Evidence templates deliberately remain unverified.
71
+
72
+ ## Features
73
+
74
+ - Explicit model and role selection; each task freezes its routing configuration.
75
+ - Real simulation, GET polling and accounting; uncertain POST requests are never blindly repeated.
76
+ - Failure diagnosis, time-segment evidence, daily PnL correlations and bounded combination experiments.
77
+ - Per-candidate submission: research review, fresh platform checks, one POST and verified acceptance.
78
+ - Task progress and token/cost provenance; unknown costs never become zero.
79
+ - Single concurrency, budgets, authorization expiration, rate-limit handling, recovery and deduplication.
80
+ - macOS menu bar / Windows tray (experimental): status, cycle history and submitted Alphas; routing preset, provider and cadence/limit switching; system notifications on accepted submissions or failed tasks.
81
+
82
+ ## Common commands
83
+
84
+ ```sh
85
+ ./wq help
86
+ ./wq help export --lang en
87
+ ./wq --version
88
+ ./wq login # BRAIN login, with registration URL
89
+ ./wq onboard --login-only # Resume account setup
90
+ ./wq export --kind summary --output exports/summary.json
91
+ ./wq export --kind results --format csv --output exports/results.csv
92
+ ./wq brain fields --datasets # read-only data-field catalog snapshot, grouped by dataset
93
+ ./wq policy roles # abstract roles visible to models and preregistered setting variants
94
+ ```
95
+
96
+ Widening the research scope needs no code change: `wq brain field-evidence` snapshots field evidence and `wq policy add-role` registers verified fields as abstract roles; `setting_variants` in the policy runs a few preregistered decay/neutralization variants per cycle with every result recorded. See the operations guide.
97
+
98
+ Exports support summary/tasks/results in JSON or CSV. Results exclude synthetic data by default. Task exports contain only explicitly selected status fields; cookies, passwords, task inputs and evidence paths are excluded. Existing files are never overwritten. Exports contain your local research information and stay local; `exports/` is ignored by Git.
99
+
100
+ ## Inspect and stop
101
+
102
+ ```sh
103
+ ./wq onboard --list # Host CLI detection only; no writes
104
+ ./wq preset show
105
+ ./wq autopilot status
106
+ ./wq autopilot feedback --json
107
+ ./wq tasks
108
+ ./wq autopilot stop # Stop creating new cycles
109
+ ./wq pause --reason "manual pause" # Pause queue and local model calls
110
+ ```
111
+
112
+ Expired logins, identity challenges, UNKNOWN requests and expired authorizations can require human intervention. Sleeping Macs and stopped servers do not run jobs. The project does not provide fully automatic research acceptance, cash trading, contract signing or guaranteed profitability.
113
+
114
+ ## Development and documentation
115
+
116
+ ```sh
117
+ PYTHONPATH=src python3 -m unittest discover -s tests
118
+ ```
119
+
120
+ - [Onboarding and model selection — bilingual](docs/onboarding.md)
121
+ - [Operations, configuration, submissions and recovery — Chinese](docs/operations.md)
122
+ - [Linux / Windows deployment incl. experimental native-Windows tray — Chinese](docs/linux-windows.md)
123
+ - [Architecture and data boundaries — Chinese](docs/architecture.md)
124
+ - [Third-party notices and licensing — Chinese](NOTICE.md)
125
+
126
+ Configuration, cookies, real Alphas, databases, model outputs, logs and personal research stay outside Git. Fixtures are synthetic and do not establish real research performance. A source backup is not a runtime-state backup.
127
+
128
+ This is not an official WorldQuant product. The project is open source under the Apache License 2.0 (see LICENSE and NOTICE.md); the maintainer reviews the full Git history and third-party content before publishing.
129
+
130
+ All-cycle review supports manual and automatic runs: `./wq auto-research report` and `./wq auto-research run`. See [Auto Research](docs/auto-research.md) for cadence and independent review. Accepted fixed guidance enters future prompts without changing budgets or quality gates.
@@ -0,0 +1,111 @@
1
+ # autowq
2
+
3
+ English | [简体中文](README.md)
4
+
5
+ A local WorldQuant BRAIN research workflow: propose a hypothesis → review through a different provider → bounded simulation → diagnose real results → investigate complementary signals → validate before submission. You control models, budgets, evidence and the queue. A chat session does not need to stay online.
6
+
7
+ **A research tool, not a promise of income.** Passing a screen, an accepted submission, consultant eligibility and actual payment are separate states. Research automation does not automatically authorize submissions.
8
+
9
+ ## Install
10
+
11
+ Requirements: Python 3.11+ and your own CLI subscription accounts or API keys. The core runtime uses the Python standard library only. macOS is supported; Linux and Windows WSL2 use Docker-isolated providers. Native Windows has experimental support for the tray and scheduler control layer (see the Windows note under Option 2).
12
+
13
+ ```sh
14
+ # Option 1: Homebrew (macOS)
15
+ brew tap Octo-o-o-o/autowq && brew install wq-pilot
16
+ brew install --cask Octo-o-o-o/autowq/worldquant # optional menu-bar app
17
+ ```
18
+
19
+ Option 2: macOS menu-bar app. Download `WorldQuant-<version>.dmg` from [Releases](https://github.com/Octo-o-o-o/autowq/releases), drag it into Applications and double-click; the first-launch wizard picks a workspace, prepares the runtime and starts onboarding. If the build is not notarized, install via `brew install --cask` (which removes quarantine) or right-click Open once.
20
+
21
+ Windows (experimental): the tray shares the same control layer and feature set as the macOS menu bar. Download `WorldQuantTray.exe` (single file, engine bundled) from [Releases](https://github.com/Octo-o-o-o/autowq/releases) and run it inside a workspace that has completed `wq onboard`, optionally with `--workspace <dir>`; or from source, `pip install pystray Pillow` then `python scripts/setup_windows.py` to register the Task Scheduler runner and login autostart. Providers are not bundled with the exe — configure profiles.json yourself; the full research stack still recommends Linux / Windows WSL2, see the cross-platform guide.
22
+
23
+ Option 3: source checkout (development):
24
+
25
+ ```sh
26
+ git clone https://github.com/Octo-o-o-o/autowq.git
27
+ cd autowq
28
+ ./wq onboard
29
+ ./wq doctor --fix-private
30
+ ./wq validate result fixtures/synthetic-result-pass.json
31
+ ./wq import-results fixtures/synthetic-result-pass.json
32
+ ./wq tasks
33
+ ```
34
+
35
+ Option 4: pipx (`pipx install wq-pilot`, then `mkdir ~/autowq && cd ~/autowq && wq onboard`). **Not available yet: the PyPI release is not set up (no Trusted Publisher configured).** It will be enabled once publishing works.
36
+
37
+
38
+ The wizard detects host executables and lets you select providers, model IDs, research/review/engineering roles and optional reasoning effort. It generates local configuration and isolated launchers. **It never overwrites an existing deployment, starts paid inference or installs a scheduler.** The default language is Chinese for Chinese locales and English otherwise. Choose another language at the first prompt or pass `--lang zh/en`. The wizard includes vendor CLI and BRAIN login, with the [official registration URL](https://platform.worldquantbrain.com/sign-up). You can skip and resume with `./wq onboard --login-only`. A successful login command does not verify model entitlement.
39
+
40
+ Adapters include Grok Build, Devin, Cursor, ZCode, plus Claude Code, Codex, Gemini CLI, GitHub Copilot CLI, Qwen Code and OpenCode. Standard OpenAI Chat Completions/Responses and Anthropic Messages APIs accept manual Base URL, key references and model IDs. See the **[bilingual provider/workflow guide](docs/providers-workflow.md)** for model discovery, platform support and verification limits. Continuous research still requires distinct review providers.
41
+
42
+ Advanced mode offers versioned JSON, a step-by-step CLI editor and natural-language AI draft editing. Configure role routes, additional prompts, simulation/feedback switches and bounded combinations, then use `workflow validate/diff/apply`. Existing budgets and submission gates stay enforced.
43
+
44
+ ```bash
45
+ ./wq providers list
46
+ ./wq providers models devin
47
+ ./wq workflow init --output config/workflow.draft.json
48
+ ./wq workflow edit config/workflow.draft.json --output config/workflow.edited.json
49
+ ```
50
+
51
+ Follow the **[complete bilingual onboarding checklist](docs/onboarding.md)**: sign in → configure budgets and expiration → verify BRAIN access → verify field evidence → validate one real cycle → install scheduling. Models, API access, automatic research and submissions start disabled. Evidence templates deliberately remain unverified.
52
+
53
+ ## Features
54
+
55
+ - Explicit model and role selection; each task freezes its routing configuration.
56
+ - Real simulation, GET polling and accounting; uncertain POST requests are never blindly repeated.
57
+ - Failure diagnosis, time-segment evidence, daily PnL correlations and bounded combination experiments.
58
+ - Per-candidate submission: research review, fresh platform checks, one POST and verified acceptance.
59
+ - Task progress and token/cost provenance; unknown costs never become zero.
60
+ - Single concurrency, budgets, authorization expiration, rate-limit handling, recovery and deduplication.
61
+ - macOS menu bar / Windows tray (experimental): status, cycle history and submitted Alphas; routing preset, provider and cadence/limit switching; system notifications on accepted submissions or failed tasks.
62
+
63
+ ## Common commands
64
+
65
+ ```sh
66
+ ./wq help
67
+ ./wq help export --lang en
68
+ ./wq --version
69
+ ./wq login # BRAIN login, with registration URL
70
+ ./wq onboard --login-only # Resume account setup
71
+ ./wq export --kind summary --output exports/summary.json
72
+ ./wq export --kind results --format csv --output exports/results.csv
73
+ ./wq brain fields --datasets # read-only data-field catalog snapshot, grouped by dataset
74
+ ./wq policy roles # abstract roles visible to models and preregistered setting variants
75
+ ```
76
+
77
+ Widening the research scope needs no code change: `wq brain field-evidence` snapshots field evidence and `wq policy add-role` registers verified fields as abstract roles; `setting_variants` in the policy runs a few preregistered decay/neutralization variants per cycle with every result recorded. See the operations guide.
78
+
79
+ Exports support summary/tasks/results in JSON or CSV. Results exclude synthetic data by default. Task exports contain only explicitly selected status fields; cookies, passwords, task inputs and evidence paths are excluded. Existing files are never overwritten. Exports contain your local research information and stay local; `exports/` is ignored by Git.
80
+
81
+ ## Inspect and stop
82
+
83
+ ```sh
84
+ ./wq onboard --list # Host CLI detection only; no writes
85
+ ./wq preset show
86
+ ./wq autopilot status
87
+ ./wq autopilot feedback --json
88
+ ./wq tasks
89
+ ./wq autopilot stop # Stop creating new cycles
90
+ ./wq pause --reason "manual pause" # Pause queue and local model calls
91
+ ```
92
+
93
+ Expired logins, identity challenges, UNKNOWN requests and expired authorizations can require human intervention. Sleeping Macs and stopped servers do not run jobs. The project does not provide fully automatic research acceptance, cash trading, contract signing or guaranteed profitability.
94
+
95
+ ## Development and documentation
96
+
97
+ ```sh
98
+ PYTHONPATH=src python3 -m unittest discover -s tests
99
+ ```
100
+
101
+ - [Onboarding and model selection — bilingual](docs/onboarding.md)
102
+ - [Operations, configuration, submissions and recovery — Chinese](docs/operations.md)
103
+ - [Linux / Windows deployment incl. experimental native-Windows tray — Chinese](docs/linux-windows.md)
104
+ - [Architecture and data boundaries — Chinese](docs/architecture.md)
105
+ - [Third-party notices and licensing — Chinese](NOTICE.md)
106
+
107
+ Configuration, cookies, real Alphas, databases, model outputs, logs and personal research stay outside Git. Fixtures are synthetic and do not establish real research performance. A source backup is not a runtime-state backup.
108
+
109
+ This is not an official WorldQuant product. The project is open source under the Apache License 2.0 (see LICENSE and NOTICE.md); the maintainer reviews the full Git history and third-party content before publishing.
110
+
111
+ All-cycle review supports manual and automatic runs: `./wq auto-research report` and `./wq auto-research run`. See [Auto Research](docs/auto-research.md) for cadence and independent review. Accepted fixed guidance enters future prompts without changing budgets or quality gates.
@@ -0,0 +1,111 @@
1
+ # autowq
2
+
3
+ [English](README.en.md) | 简体中文
4
+
5
+ 本地运行的 WorldQuant BRAIN 研究工作流:模型提出假设 → 不同渠道审查 → 有限回测 → 真实结果诊断 → 互补信号研究 → 提交前验收。模型、预算、证据和队列由你控制,不依赖聊天窗口持续在线。
6
+
7
+ **研究工具,不是收益承诺。** 平台筛选通过、正式提交接收、顾问资格和实际到账是不同状态。自动研究不自动授予正式提交权限。
8
+
9
+ ## 安装
10
+
11
+ 需要 Python 3.11+,以及你自己的模型 CLI 订阅账号或 API Key。核心运行时只使用 Python 标准库。支持 macOS;Linux/Windows WSL2 使用 Docker 隔离模型进程。原生 Windows 实验性支持托盘与调度控制层(见方式二下方的 Windows 说明)。
12
+
13
+ ```sh
14
+ # 方式一:Homebrew(macOS)
15
+ brew tap Octo-o-o-o/autowq && brew install wq-pilot
16
+ brew install --cask Octo-o-o-o/autowq/worldquant # 可选:菜单栏 App
17
+ ```
18
+
19
+ 方式二:macOS 菜单栏 App。从 [Releases](https://github.com/Octo-o-o-o/autowq/releases) 下载 `WorldQuant-<版本>.dmg`,拖入"应用程序"后双击;首启向导引导选择工作区、准备运行时并调起 onboard,完成后菜单栏常驻。未公证版本可用 `brew install --cask` 安装(自动去除隔离属性),或首次右键打开。
20
+
21
+ Windows(实验性):托盘与 macOS 菜单栏同功能、同控制层。从 [Releases](https://github.com/Octo-o-o-o/autowq/releases) 下载 `WorldQuantTray.exe`(单文件、内置引擎),在已完成 `wq onboard` 的工作区运行,可用 `--workspace <目录>` 指定;或源码方式 `pip install pystray Pillow` 后运行 `python scripts/setup_windows.py` 注册任务计划调度与登录自启。Provider 不随 exe 发布,需自行配置 profiles.json;完整研究栈仍建议 Linux / Windows WSL2,见[跨平台部署](docs/linux-windows.md)。
22
+
23
+ 方式三:源码(开发):
24
+
25
+ ```sh
26
+ git clone https://github.com/Octo-o-o-o/autowq.git
27
+ cd autowq
28
+ ./wq onboard
29
+ ./wq doctor --fix-private
30
+ ./wq validate result fixtures/synthetic-result-pass.json
31
+ ./wq import-results fixtures/synthetic-result-pass.json
32
+ ./wq tasks
33
+ ```
34
+
35
+ 方式四:pipx(`pipx install wq-pilot`,随后 `mkdir ~/autowq && cd ~/autowq && wq onboard`)。**PyPI 发布尚未开通(Trusted Publisher 未配置),此方式暂不可用**;开通后再启用。
36
+
37
+
38
+ 向导检测宿主 CLI,让你选择渠道、模型 ID、研究/审查/工程角色及可选思考强度。它生成本机配置与隔离运行入口,**不覆盖已有部署、不启动付费推理、不安装调度器**。默认语言按环境判断:中文环境用中文,其余用英文;第一步可以切换,也可用 `--lang zh/en` 显式指定。向导包含供应商CLI与BRAIN登录,并提供[官方注册链接](https://platform.worldquantbrain.com/sign-up)。可以跳过登录,随后用 `./wq onboard --login-only` 继续。模型是否能用取决于你自己的账号;登录命令成功不等于验证了模型权限。
39
+
40
+ 支持 Grok Build、Devin、Cursor、ZCode,以及新增 Claude Code、Codex、Gemini CLI、GitHub Copilot CLI、Qwen Code、OpenCode。支持 OpenAI Chat Completions/Responses 和 Anthropic Messages API,可手动配置 Base URL、Key 和模型。不同渠道的模型列举、平台支持与核验范围见 **[Provider与高级流程指南(中英)](docs/providers-workflow.md)**。持续自动研究仍要求不同渠道审查。
41
+
42
+ 高级模式提供规范 JSON、CLI 分步骤编辑和自然语言 AI 编辑草稿;可以调整角色路由、补充 Prompt、模拟/反馈开关和有限组合。统一通过 `workflow validate/diff/apply` 应用,预算和提交质量门槛继续生效。
43
+
44
+ ```bash
45
+ ./wq providers list
46
+ ./wq providers models devin
47
+ ./wq workflow init --output config/workflow.draft.json
48
+ ./wq workflow edit config/workflow.draft.json --output config/workflow.edited.json
49
+ ```
50
+
51
+ 接下来请按 **[完整 onboarding 操作单(中英双语)](docs/onboarding.md)** 完成:本人登录 → 本地预算/期限 → BRAIN 登录与权限 → 字段证据 → 单轮真实核验 → 安装调度。初始模型、API、自动研究和提交全部关闭,数据证据模板故意保持未验证。
52
+
53
+ ## 能做什么
54
+
55
+ - 显式选择本地模型和角色;任务冻结自己的路由快照。
56
+ - 真实模拟、GET 轮询和结果入账;POST 结果未知时停止重发。
57
+ - 失败原因反馈、时间分段资料、日 PnL 相关性与有限组合实验。
58
+ - 逐候选正式提交:研究验收、最新平台检查、单次 POST、真实接收状态核验。
59
+ - 中文任务进度、token 及费用来源;未知费用不记作零。
60
+ - 单并发、预算、授权期限、平台限流、崩溃恢复与去重。
61
+ - macOS 菜单栏 / Windows 托盘(实验性):状态、轮次历史与已提交 Alpha,切换路由预设、渠道与频率上限,提交成功或任务失败时系统通知。
62
+
63
+ ## 常用命令
64
+
65
+ ```sh
66
+ ./wq help
67
+ ./wq help export
68
+ ./wq --version
69
+ ./wq login # BRAIN登录,显示注册链接
70
+ ./wq onboard --login-only # 继续初始化登录
71
+ ./wq export --kind summary --output exports/summary.json
72
+ ./wq export --kind results --format csv --output exports/results.csv
73
+ ./wq brain fields --datasets # 只读字段目录快照,按数据集汇总
74
+ ./wq policy roles # 查看模型可用的抽象角色与预登记变体
75
+ ```
76
+
77
+ 扩展研究范围不需要改代码:`wq brain field-evidence` 生成字段证据,`wq policy add-role` 把已核验字段登记为模型可见的抽象角色;策略里的 `setting_variants` 让每轮同时回测少量预登记的 decay/中性化变体,全部结果入账。见[运行手册](docs/operations.md)。
78
+
79
+ 导出支持summary/tasks/results和JSON/CSV;结果默认排除合成数据,任务导出仅含允许的状态字段。不会导出Cookie、密码、任务输入或证据文件路径,不覆盖同名文件。导出包含你的研究状态/指标,仅保存在本地;`exports/`被Git忽略。
80
+
81
+ ## 查看与停止
82
+
83
+ ```sh
84
+ ./wq onboard --list # 仅检测宿主CLI,不修改配置
85
+ ./wq preset show
86
+ ./wq autopilot status
87
+ ./wq autopilot feedback # 中文诊断;--json供程序读取
88
+ ./wq tasks
89
+ ./wq autopilot stop # 停止补充新轮次
90
+ ./wq pause --reason "manual pause" # 暂停队列及本地模型调用
91
+ ```
92
+
93
+ 模型登录失效、人机校验、UNKNOWN 请求和授权到期可能需要本人处理。Mac 休眠或服务器停机期间不会运行。当前没有全自动研究验收、现金交易、签约或长期盈利保证。
94
+
95
+ ## 开发与文档
96
+
97
+ ```sh
98
+ PYTHONPATH=src python3 -m unittest discover -s tests
99
+ ```
100
+
101
+ - [首次使用与模型选择](docs/onboarding.md)
102
+ - [运行、配置、提交与恢复](docs/operations.md)
103
+ - [Linux / Windows 部署(含实验性原生 Windows 托盘)](docs/linux-windows.md)
104
+ - [架构与数据边界](docs/architecture.md)
105
+ - [第三方与许可](NOTICE.md)
106
+
107
+ 配置、Cookie、真实 Alpha、数据库、模型输出、运行日志和个人研究档案不进入 Git。`fixtures/` 仅含合成数据,不能作为真实研究成绩。源码备份不等于运行状态备份。
108
+
109
+ 本项目非 WorldQuant 官方产品。本项目以 Apache License 2.0 开源(见 LICENSE 与 NOTICE.md);公开发布前需由维护者核查完整 Git 历史与第三方内容。
110
+
111
+ 全历史复盘支持手动与自动触发:`./wq auto-research report`、`./wq auto-research run`;设置周期见[Auto Research说明](docs/auto-research.md)。不同渠道复核后,固定指导语进入后续研究与审查Prompt,预算和质量门槛不变。
@@ -0,0 +1,34 @@
1
+ [project]
2
+ name = "wq-pilot"
3
+ version = "0.2.2"
4
+ description = "Local research orchestration with gated providers and recoverable simulations"
5
+ readme = "README.en.md"
6
+ license = {text = "Apache-2.0"}
7
+ requires-python = ">=3.11"
8
+ dependencies = []
9
+ classifiers = [
10
+ "License :: OSI Approved :: Apache Software License",
11
+ "Programming Language :: Python :: 3.11",
12
+ "Programming Language :: Python :: 3.12",
13
+ "Programming Language :: Python :: 3.13",
14
+ "Operating System :: MacOS",
15
+ "Operating System :: POSIX :: Linux",
16
+ ]
17
+
18
+ [project.urls]
19
+ Homepage = "https://github.com/Octo-o-o-o/autowq"
20
+ Repository = "https://github.com/Octo-o-o-o/autowq"
21
+
22
+ [project.scripts]
23
+ wq = "wq.cli:main"
24
+
25
+ [build-system]
26
+ requires = ["setuptools>=68"]
27
+ build-backend = "setuptools.build_meta"
28
+
29
+ [tool.setuptools]
30
+ package-dir = { "" = "src" }
31
+ packages = ["wq", "wq.adapters", "wq.wrappers", "wq.assets"]
32
+
33
+ [tool.setuptools.package-data]
34
+ "wq.assets" = ["*.json", "*.py"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"
@@ -0,0 +1,4 @@
1
+ from .cli import main
2
+
3
+ if __name__ == "__main__":
4
+ raise SystemExit(main())