investorch 0.3.0__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 (161) hide show
  1. investorch-0.3.0/LICENSE +201 -0
  2. investorch-0.3.0/NOTICE +4 -0
  3. investorch-0.3.0/PKG-INFO +196 -0
  4. investorch-0.3.0/README.md +157 -0
  5. investorch-0.3.0/THIRD_PARTY_NOTICES.md +38 -0
  6. investorch-0.3.0/pyproject.toml +117 -0
  7. investorch-0.3.0/pyproject.toml.orig +130 -0
  8. investorch-0.3.0/src/investorch/__init__.py +0 -0
  9. investorch-0.3.0/src/investorch/__main__.py +4 -0
  10. investorch-0.3.0/src/investorch/agents/__init__.py +52 -0
  11. investorch-0.3.0/src/investorch/agents/activity.py +78 -0
  12. investorch-0.3.0/src/investorch/agents/compact.py +252 -0
  13. investorch-0.3.0/src/investorch/agents/context_projection.py +320 -0
  14. investorch-0.3.0/src/investorch/agents/continuation.py +28 -0
  15. investorch-0.3.0/src/investorch/agents/loop.py +671 -0
  16. investorch-0.3.0/src/investorch/agents/main.py +72 -0
  17. investorch-0.3.0/src/investorch/agents/permission.py +98 -0
  18. investorch-0.3.0/src/investorch/agents/prompts.py +182 -0
  19. investorch-0.3.0/src/investorch/agents/review_compact.py +52 -0
  20. investorch-0.3.0/src/investorch/agents/skill_review.py +46 -0
  21. investorch-0.3.0/src/investorch/agents/title.py +86 -0
  22. investorch-0.3.0/src/investorch/agents/usage.py +96 -0
  23. investorch-0.3.0/src/investorch/app.py +206 -0
  24. investorch-0.3.0/src/investorch/application/__init__.py +87 -0
  25. investorch-0.3.0/src/investorch/application/activity.py +151 -0
  26. investorch-0.3.0/src/investorch/application/approval.py +188 -0
  27. investorch-0.3.0/src/investorch/application/host.py +424 -0
  28. investorch-0.3.0/src/investorch/application/interaction.py +105 -0
  29. investorch-0.3.0/src/investorch/application/messaging.py +170 -0
  30. investorch-0.3.0/src/investorch/application/portfolio_context.py +167 -0
  31. investorch-0.3.0/src/investorch/application/portfolio_sessions.py +98 -0
  32. investorch-0.3.0/src/investorch/application/portfolios.py +761 -0
  33. investorch-0.3.0/src/investorch/application/presentation_state.py +112 -0
  34. investorch-0.3.0/src/investorch/application/review_context.py +130 -0
  35. investorch-0.3.0/src/investorch/application/session_models.py +106 -0
  36. investorch-0.3.0/src/investorch/application/session_queries.py +390 -0
  37. investorch-0.3.0/src/investorch/application/sessions.py +432 -0
  38. investorch-0.3.0/src/investorch/application/skill_sessions.py +100 -0
  39. investorch-0.3.0/src/investorch/application/skills.py +256 -0
  40. investorch-0.3.0/src/investorch/application/spawning.py +189 -0
  41. investorch-0.3.0/src/investorch/backtest/__init__.py +4 -0
  42. investorch-0.3.0/src/investorch/backtest/bundle.py +157 -0
  43. investorch-0.3.0/src/investorch/backtest/datasource.py +223 -0
  44. investorch-0.3.0/src/investorch/backtest/errors.py +9 -0
  45. investorch-0.3.0/src/investorch/backtest/execution_log.py +71 -0
  46. investorch-0.3.0/src/investorch/backtest/parameters.py +75 -0
  47. investorch-0.3.0/src/investorch/backtest/rqalpha_mod.py +17 -0
  48. investorch-0.3.0/src/investorch/backtest/runner.py +200 -0
  49. investorch-0.3.0/src/investorch/backup.py +367 -0
  50. investorch-0.3.0/src/investorch/backup_cli.py +46 -0
  51. investorch-0.3.0/src/investorch/cli.py +134 -0
  52. investorch-0.3.0/src/investorch/commands/__init__.py +9 -0
  53. investorch-0.3.0/src/investorch/commands/handlers.py +468 -0
  54. investorch-0.3.0/src/investorch/commands/parser.py +23 -0
  55. investorch-0.3.0/src/investorch/config.py +554 -0
  56. investorch-0.3.0/src/investorch/config_schema.py +479 -0
  57. investorch-0.3.0/src/investorch/context.py +124 -0
  58. investorch-0.3.0/src/investorch/diagnostics.py +339 -0
  59. investorch-0.3.0/src/investorch/filesystem.py +35 -0
  60. investorch-0.3.0/src/investorch/images.py +59 -0
  61. investorch-0.3.0/src/investorch/initializer.py +75 -0
  62. investorch-0.3.0/src/investorch/inputs.py +96 -0
  63. investorch-0.3.0/src/investorch/journal/__init__.py +4 -0
  64. investorch-0.3.0/src/investorch/journal/reader.py +190 -0
  65. investorch-0.3.0/src/investorch/journal/semantics.py +82 -0
  66. investorch-0.3.0/src/investorch/journal/session.py +412 -0
  67. investorch-0.3.0/src/investorch/llm/__init__.py +1 -0
  68. investorch-0.3.0/src/investorch/llm/clients.py +65 -0
  69. investorch-0.3.0/src/investorch/llm/models.py +253 -0
  70. investorch-0.3.0/src/investorch/llm/oauth.py +581 -0
  71. investorch-0.3.0/src/investorch/log.py +54 -0
  72. investorch-0.3.0/src/investorch/mcp.py +354 -0
  73. investorch-0.3.0/src/investorch/mcp_runtime.py +144 -0
  74. investorch-0.3.0/src/investorch/output/__init__.py +25 -0
  75. investorch-0.3.0/src/investorch/output/events.py +44 -0
  76. investorch-0.3.0/src/investorch/output/serialization.py +37 -0
  77. investorch-0.3.0/src/investorch/output/stream.py +267 -0
  78. investorch-0.3.0/src/investorch/portfolio/__init__.py +126 -0
  79. investorch-0.3.0/src/investorch/portfolio/_schema_sql.py +163 -0
  80. investorch-0.3.0/src/investorch/portfolio/domain.py +466 -0
  81. investorch-0.3.0/src/investorch/portfolio/ledger.py +244 -0
  82. investorch-0.3.0/src/investorch/portfolio/migration.py +203 -0
  83. investorch-0.3.0/src/investorch/portfolio/migration_cli.py +30 -0
  84. investorch-0.3.0/src/investorch/portfolio/schema.py +244 -0
  85. investorch-0.3.0/src/investorch/portfolio/serialization.py +237 -0
  86. investorch-0.3.0/src/investorch/portfolio/storage.py +584 -0
  87. investorch-0.3.0/src/investorch/portfolio_presentation.py +150 -0
  88. investorch-0.3.0/src/investorch/presentation.py +244 -0
  89. investorch-0.3.0/src/investorch/resources/MEMORY.md.template +12 -0
  90. investorch-0.3.0/src/investorch/resources/skills/investorch-configuration/SKILL.md +21 -0
  91. investorch-0.3.0/src/investorch/resources/skills/investorch-configuration/references/configuration.md +298 -0
  92. investorch-0.3.0/src/investorch/resources/skills/investorch-configuration/references/examples.md +165 -0
  93. investorch-0.3.0/src/investorch/resources/skills/investorch-portfolio/SKILL.md +34 -0
  94. investorch-0.3.0/src/investorch/resources/skills/investorch-portfolio/references/examples.md +276 -0
  95. investorch-0.3.0/src/investorch/resources/skills/qmt-strategy/SKILL.md +22 -0
  96. investorch-0.3.0/src/investorch/resources/skills/qmt-strategy/references/big-qmt.md +24 -0
  97. investorch-0.3.0/src/investorch/resources/skills/qmt-strategy/references/examples.md +159 -0
  98. investorch-0.3.0/src/investorch/resources/skills/rqalpha-strategy/SKILL.md +26 -0
  99. investorch-0.3.0/src/investorch/resources/skills/rqalpha-strategy/assets/momentum20.py +33 -0
  100. investorch-0.3.0/src/investorch/resources/skills/rqalpha-strategy/assets/momentum60.py +33 -0
  101. investorch-0.3.0/src/investorch/resources/skills/rqalpha-strategy/references/examples.md +203 -0
  102. investorch-0.3.0/src/investorch/resources/skills/rqalpha-strategy/references/runtime.md +289 -0
  103. investorch-0.3.0/src/investorch/resources/skills/skill-creator/SKILL.md +19 -0
  104. investorch-0.3.0/src/investorch/resources/skills/skill-creator/references/examples.md +224 -0
  105. investorch-0.3.0/src/investorch/resources/skills/skill-installer/SKILL.md +18 -0
  106. investorch-0.3.0/src/investorch/resources/skills/skill-installer/references/examples.md +264 -0
  107. investorch-0.3.0/src/investorch/runtime/__init__.py +38 -0
  108. investorch-0.3.0/src/investorch/runtime/control.py +158 -0
  109. investorch-0.3.0/src/investorch/runtime/errors.py +64 -0
  110. investorch-0.3.0/src/investorch/runtime/manager.py +1006 -0
  111. investorch-0.3.0/src/investorch/runtime/models.py +165 -0
  112. investorch-0.3.0/src/investorch/skills/__init__.py +0 -0
  113. investorch-0.3.0/src/investorch/skills/bundled.py +69 -0
  114. investorch-0.3.0/src/investorch/skills/domain.py +32 -0
  115. investorch-0.3.0/src/investorch/skills/registry.py +57 -0
  116. investorch-0.3.0/src/investorch/skills/validation.py +91 -0
  117. investorch-0.3.0/src/investorch/storage/__init__.py +75 -0
  118. investorch-0.3.0/src/investorch/storage/session_fork.py +278 -0
  119. investorch-0.3.0/src/investorch/storage/sessions.py +720 -0
  120. investorch-0.3.0/src/investorch/tools/__init__.py +95 -0
  121. investorch-0.3.0/src/investorch/tools/base.py +991 -0
  122. investorch-0.3.0/src/investorch/tools/config.py +63 -0
  123. investorch-0.3.0/src/investorch/tools/errors.py +68 -0
  124. investorch-0.3.0/src/investorch/tools/mcp.py +121 -0
  125. investorch-0.3.0/src/investorch/tools/messaging.py +72 -0
  126. investorch-0.3.0/src/investorch/tools/portfolio.py +779 -0
  127. investorch-0.3.0/src/investorch/tools/quant.py +312 -0
  128. investorch-0.3.0/src/investorch/tools/sessions.py +85 -0
  129. investorch-0.3.0/src/investorch/tools/skills.py +112 -0
  130. investorch-0.3.0/src/investorch/tools/spawning.py +71 -0
  131. investorch-0.3.0/src/investorch/tools/todo.py +34 -0
  132. investorch-0.3.0/src/investorch/ui/__init__.py +4 -0
  133. investorch-0.3.0/src/investorch/ui/console.py +108 -0
  134. investorch-0.3.0/src/investorch/ui/tui/__init__.py +3 -0
  135. investorch-0.3.0/src/investorch/ui/tui/app.py +1212 -0
  136. investorch-0.3.0/src/investorch/ui/tui/approval.py +135 -0
  137. investorch-0.3.0/src/investorch/ui/tui/clear.py +64 -0
  138. investorch-0.3.0/src/investorch/ui/tui/queue.py +132 -0
  139. investorch-0.3.0/src/investorch/ui/tui/sidebar.py +92 -0
  140. investorch-0.3.0/src/investorch/ui/tui/timeline.py +455 -0
  141. investorch-0.3.0/src/investorch/ui/tui/todo.py +88 -0
  142. investorch-0.3.0/src/investorch/web/__init__.py +3 -0
  143. investorch-0.3.0/src/investorch/web/approvals.py +77 -0
  144. investorch-0.3.0/src/investorch/web/assets.py +45 -0
  145. investorch-0.3.0/src/investorch/web/auth_routes.py +126 -0
  146. investorch-0.3.0/src/investorch/web/auth_server.py +77 -0
  147. investorch-0.3.0/src/investorch/web/config_routes.py +142 -0
  148. investorch-0.3.0/src/investorch/web/connections.py +219 -0
  149. investorch-0.3.0/src/investorch/web/errors.py +181 -0
  150. investorch-0.3.0/src/investorch/web/events.py +118 -0
  151. investorch-0.3.0/src/investorch/web/mcp_routes.py +113 -0
  152. investorch-0.3.0/src/investorch/web/routes.py +718 -0
  153. investorch-0.3.0/src/investorch/web/security.py +53 -0
  154. investorch-0.3.0/src/investorch/web/server.py +191 -0
  155. investorch-0.3.0/src/investorch/web/setup_routes.py +154 -0
  156. investorch-0.3.0/src/investorch/web/skill_routes.py +75 -0
  157. investorch-0.3.0/src/investorch/web/static/THIRD_PARTY_LICENSES.txt +5807 -0
  158. investorch-0.3.0/src/investorch/web/static/assets/index-B_em9yaU.css +2 -0
  159. investorch-0.3.0/src/investorch/web/static/assets/index-DFWMRIVW.js +80 -0
  160. investorch-0.3.0/src/investorch/web/static/index.html +15 -0
  161. investorch-0.3.0/src/investorch/web/system_routes.py +14 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received and subsequently
64
+ incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,4 @@
1
+ InvestOrch Agent
2
+ Copyright 2026 InvestOrch contributors
3
+
4
+ This product includes software developed by InvestOrch contributors.
@@ -0,0 +1,196 @@
1
+ Metadata-Version: 2.4
2
+ Name: investorch
3
+ Version: 0.3.0
4
+ Summary: Local human-in-the-loop investment orchestration agent with Web, TUI, and plain-console clients.
5
+ Keywords: agent,backtesting,human-in-the-loop,investment,local-first
6
+ Author: InvestOrch contributors
7
+ License-Expression: Apache-2.0
8
+ License-File: LICENSE
9
+ License-File: NOTICE
10
+ License-File: THIRD_PARTY_NOTICES.md
11
+ Classifier: Development Status :: 2 - Pre-Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Framework :: FastAPI
14
+ Classifier: Intended Audience :: Financial and Insurance Industry
15
+ Classifier: Operating System :: MacOS
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Topic :: Office/Business :: Financial :: Investment
22
+ Requires-Dist: fastapi>=0.161.1,<0.162
23
+ Requires-Dist: httpx>=0.28.1,<1
24
+ Requires-Dist: openai-agents>=0.24.0,<0.25
25
+ Requires-Dist: pydantic>=2.14.1,<3
26
+ Requires-Dist: pyjwt[crypto]>=2.15.1,<3
27
+ Requires-Dist: pyyaml>=6.0.3,<7
28
+ Requires-Dist: rqalpha==6.4.2
29
+ Requires-Dist: socksio==1.*
30
+ Requires-Dist: textual==8.2.8
31
+ Requires-Dist: tomlkit>=0.15.2,<0.16
32
+ Requires-Dist: uvicorn[standard]>=0.54.0,<0.55
33
+ Requires-Python: >=3.12, <3.15
34
+ Project-URL: Homepage, https://github.com/huangyicong0769/investorch-agent
35
+ Project-URL: Documentation, https://github.com/huangyicong0769/investorch-agent#readme
36
+ Project-URL: Issues, https://github.com/huangyicong0769/investorch-agent/issues
37
+ Project-URL: Repository, https://github.com/huangyicong0769/investorch-agent.git
38
+ Description-Content-Type: text/markdown
39
+
40
+ # InvestOrch Agent
41
+
42
+ [简体中文](README.zh-CN.md)
43
+
44
+ InvestOrch Agent is a local-first, human-in-the-loop investment orchestration agent for an individual investor. Its long-term goal is to support the full path from research, strategy development, and backtesting to portfolio decisions, trading, position monitoring, and review.
45
+
46
+ **0.3.0** adds multi-agent orchestration, reusable model connections and ChatGPT authorization, per-Session model selection, continuous context management, and clearer runtime diagnostics. See [0.3.0 notes](docs/releases/0.3.0.md), [model configuration](docs/Configuration.md) and the [manual upgrade procedure](docs/Upgrade.md).
47
+
48
+ ## What 0.3.0 includes
49
+
50
+ - Web and [Textual](https://github.com/Textualize/textual) TUI clients, plus a diagnostic plain console.
51
+ - Multi-agent task delegation and parallel research, with subagent progress, conversation and results accessible from Web.
52
+ - API-key or ChatGPT model connections, with model and reasoning-effort choices for each conversation.
53
+ - Persistent conversations, archive/restore and history forks, with context compaction for long tasks.
54
+ - Workspace file editing, image conversations, command execution and task planning.
55
+ - [RQAlpha](https://github.com/ricequant/rqalpha) daily stock backtesting. [CNEquity](https://github.com/rootSunc/cnequity) integration is retained; release packages do not install CNEquity.
56
+ - Portfolio records for confirmed trades, cash flows, holdings and cash, with an auditable Ledger.
57
+ - Reusable Skills and external MCP integrations.
58
+ - Model usage, failure diagnostics, local backup and recovery.
59
+
60
+ Broker/account mirroring, a QMT gateway, live trading and a unified investment data layer remain future work. See the [0.3.0 notes](docs/releases/0.3.0.md) and [Product Roadmap](docs/InvestOrch_Agent_Product_Roadmap.md).
61
+
62
+ ## Compatibility
63
+
64
+ The core supports macOS and Linux. Agent shell-command execution supports macOS only. Existing installations should follow [Upgrade](docs/Upgrade.md) before changing versions.
65
+
66
+ Conversations, configuration and generated files are stored locally. Configured model providers and MCP services receive the content needed for their calls. Web listens on loopback only.
67
+
68
+ ## Requirements
69
+
70
+ - Python 3.12–3.14 (`>=3.12,<3.15`)
71
+ - [uv](https://docs.astral.sh/uv/)
72
+ - A Responses-compatible API-key connection, or an eligible ChatGPT account authorizing plan usage
73
+
74
+ The installation commands below select Python 3.12.
75
+
76
+ ## Installation
77
+
78
+ ### PyPI
79
+
80
+ Install InvestOrch Agent as a uv-managed tool:
81
+
82
+ ```bash
83
+ uv tool install --python 3.12 investorch==0.3.0
84
+ investorch web
85
+ ```
86
+
87
+ The installed command is `investorch`. For an existing installation, complete the backup and preflight steps in [Upgrade](docs/Upgrade.md) before replacing it; 0.2.0 model TOML requires manual conversion.
88
+
89
+ ### Source checkout
90
+
91
+ ```bash
92
+ git clone --branch v0.3.0 https://github.com/huangyicong0769/investorch-agent.git
93
+ cd investorch-agent
94
+ uv sync --locked --python 3.12
95
+ ```
96
+
97
+ The examples below use `uv run --locked investorch`. For a tool installation, omit `uv run --locked` and start each command with `investorch`.
98
+
99
+ ### Release wheel
100
+
101
+ Download `investorch-0.3.0-py3-none-any.whl`, `investorch-0.3.0.tar.gz` and `SHA256SUMS` from the [0.3.0 GitHub Release](https://github.com/huangyicong0769/investorch-agent/releases/tag/v0.3.0). Verify the wheel before installing it:
102
+
103
+ ```bash
104
+ # macOS
105
+ grep 'investorch-0.3.0-py3-none-any.whl$' SHA256SUMS | shasum -a 256 -c -
106
+ # Linux
107
+ grep 'investorch-0.3.0-py3-none-any.whl$' SHA256SUMS | sha256sum -c -
108
+
109
+ uv tool install --python 3.12 ./investorch-0.3.0-py3-none-any.whl
110
+ ```
111
+
112
+ A wheel includes the production Web bundle and needs no Node.js runtime. To build a wheel from source, use `uv build --no-sources`; rebuild the Web bundle first when changing frontend code.
113
+
114
+ ## First run
115
+
116
+ Start Web:
117
+
118
+ ```bash
119
+ uv run --locked investorch web
120
+ ```
121
+
122
+ Open <http://127.0.0.1:1334> and complete Setup. Add an API-key connection or choose **Continue with ChatGPT**, then select the initial Agent models. ChatGPT-only setups need no API key. You can test the connection before opening Chats; later changes are available in Settings.
123
+
124
+ After setup, start the TUI or diagnostic plain console:
125
+
126
+ ```bash
127
+ uv run --locked investorch
128
+ uv run --locked investorch --plain
129
+ ```
130
+
131
+ ## Frontend development
132
+
133
+ Use the Node.js version pinned in `frontend/.node-version` for frontend development. Run the Python Web server, then start Vite in another terminal:
134
+
135
+ ```bash
136
+ cd frontend
137
+ npm ci
138
+ npm run dev
139
+ ```
140
+
141
+ Before packaging a frontend change:
142
+
143
+ ```bash
144
+ npm run typecheck
145
+ npm run lint
146
+ npm run build
147
+ ```
148
+
149
+ `npm run build` replaces the committed production bundle in `src/investorch/web/static`. Node.js is not required to run an already built wheel.
150
+
151
+ ## Verification and packaging
152
+
153
+ ```bash
154
+ uv run --locked ruff format --check .
155
+ uv run --locked ruff check .
156
+ uv run --locked pytest
157
+ uv build --no-sources
158
+ ```
159
+
160
+ ## Third-party foundations
161
+
162
+ InvestOrch Agent is built on these projects:
163
+
164
+ - [OpenAI Agents SDK](https://github.com/openai/openai-agents-python) for Agent execution, Tools, sessions, HITL, and MCP integration.
165
+ - [RQAlpha](https://github.com/ricequant/rqalpha) for backtesting.
166
+ - [CNEquity](https://github.com/rootSunc/cnequity) as the optional A-share data backend.
167
+ - [FastAPI](https://github.com/fastapi/fastapi), [React](https://github.com/facebook/react), and [Vite](https://github.com/vitejs/vite) for the Web client.
168
+ - [Textual](https://github.com/Textualize/textual) for the TUI.
169
+ - [uv](https://github.com/astral-sh/uv) for Python environment, lockfile, and package workflows.
170
+
171
+ InvestOrch Agent's own code and documentation are licensed under [Apache-2.0](LICENSE). Third-party components retain their own licenses. In particular, RQAlpha and its RQRisk dependency use project-specific terms for their defined non-commercial and commercial uses; InvestOrch Agent's license does not override those terms. See [Third-party notices](THIRD_PARTY_NOTICES.md) for details and the bundled Web client license inventory.
172
+
173
+ ## Human-AI development collaboration
174
+
175
+ InvestOrch Agent is a human-led personal research project developed with AI assistance. A solo developer has limited time, knowledge, and engineering capacity, so AI helps extend the work that can be done in research, design, implementation, and validation. The owner remains deeply involved in product design, investment-domain modeling, architecture, safety boundaries, and key code.
176
+
177
+ - The owner defines the product direction, makes investment-domain and architecture decisions, writes key code, and performs final review and acceptance.
178
+ - AI assists with codebase investigation, design discussion, implementation, testing, and documentation.
179
+ - Unclear requirements are discussed before implementation, and accepted changes remain subject to human review.
180
+
181
+ ## Documentation
182
+
183
+ - [0.3.0 release notes](docs/releases/0.3.0.md) and [Changelog](CHANGELOG.md).
184
+ - [Maintainer release procedure](docs/Publishing.md): review, GitHub releases and PyPI publishing.
185
+ - [Configuration](docs/Configuration.md), [Upgrade](docs/Upgrade.md) and [Backup and Recovery](docs/Backup_and_Recovery.md).
186
+ - [Architecture](docs/InvestOrch_Agent_Architecture.md): the implemented system and current boundaries.
187
+ - [Runtime / Session Execution Model](docs/Runtime_Session_Execution_Model.md): lifecycle and concurrency rules.
188
+ - [Product Roadmap](docs/InvestOrch_Agent_Product_Roadmap.md): confirmed directions, open decisions, and candidate themes.
189
+
190
+ ## Investment disclaimer
191
+
192
+ InvestOrch Agent is a personal research and software project. It does not provide investment, legal, tax, or accounting advice, and it does not recommend or solicit any security or transaction.
193
+
194
+ Market data, third-party data, model output, calculations, and backtests may be inaccurate, incomplete, delayed, or affected by assumptions and hindsight. Historical and backtested performance does not indicate future results.
195
+
196
+ Independently verify data and outputs before acting. You are responsible for investment decisions, credentials, configuration, regulatory compliance, and any resulting gains or losses. Test with non-production accounts and environments before connecting real capital.
@@ -0,0 +1,157 @@
1
+ # InvestOrch Agent
2
+
3
+ [简体中文](README.zh-CN.md)
4
+
5
+ InvestOrch Agent is a local-first, human-in-the-loop investment orchestration agent for an individual investor. Its long-term goal is to support the full path from research, strategy development, and backtesting to portfolio decisions, trading, position monitoring, and review.
6
+
7
+ **0.3.0** adds multi-agent orchestration, reusable model connections and ChatGPT authorization, per-Session model selection, continuous context management, and clearer runtime diagnostics. See [0.3.0 notes](docs/releases/0.3.0.md), [model configuration](docs/Configuration.md) and the [manual upgrade procedure](docs/Upgrade.md).
8
+
9
+ ## What 0.3.0 includes
10
+
11
+ - Web and [Textual](https://github.com/Textualize/textual) TUI clients, plus a diagnostic plain console.
12
+ - Multi-agent task delegation and parallel research, with subagent progress, conversation and results accessible from Web.
13
+ - API-key or ChatGPT model connections, with model and reasoning-effort choices for each conversation.
14
+ - Persistent conversations, archive/restore and history forks, with context compaction for long tasks.
15
+ - Workspace file editing, image conversations, command execution and task planning.
16
+ - [RQAlpha](https://github.com/ricequant/rqalpha) daily stock backtesting. [CNEquity](https://github.com/rootSunc/cnequity) integration is retained; release packages do not install CNEquity.
17
+ - Portfolio records for confirmed trades, cash flows, holdings and cash, with an auditable Ledger.
18
+ - Reusable Skills and external MCP integrations.
19
+ - Model usage, failure diagnostics, local backup and recovery.
20
+
21
+ Broker/account mirroring, a QMT gateway, live trading and a unified investment data layer remain future work. See the [0.3.0 notes](docs/releases/0.3.0.md) and [Product Roadmap](docs/InvestOrch_Agent_Product_Roadmap.md).
22
+
23
+ ## Compatibility
24
+
25
+ The core supports macOS and Linux. Agent shell-command execution supports macOS only. Existing installations should follow [Upgrade](docs/Upgrade.md) before changing versions.
26
+
27
+ Conversations, configuration and generated files are stored locally. Configured model providers and MCP services receive the content needed for their calls. Web listens on loopback only.
28
+
29
+ ## Requirements
30
+
31
+ - Python 3.12–3.14 (`>=3.12,<3.15`)
32
+ - [uv](https://docs.astral.sh/uv/)
33
+ - A Responses-compatible API-key connection, or an eligible ChatGPT account authorizing plan usage
34
+
35
+ The installation commands below select Python 3.12.
36
+
37
+ ## Installation
38
+
39
+ ### PyPI
40
+
41
+ Install InvestOrch Agent as a uv-managed tool:
42
+
43
+ ```bash
44
+ uv tool install --python 3.12 investorch==0.3.0
45
+ investorch web
46
+ ```
47
+
48
+ The installed command is `investorch`. For an existing installation, complete the backup and preflight steps in [Upgrade](docs/Upgrade.md) before replacing it; 0.2.0 model TOML requires manual conversion.
49
+
50
+ ### Source checkout
51
+
52
+ ```bash
53
+ git clone --branch v0.3.0 https://github.com/huangyicong0769/investorch-agent.git
54
+ cd investorch-agent
55
+ uv sync --locked --python 3.12
56
+ ```
57
+
58
+ The examples below use `uv run --locked investorch`. For a tool installation, omit `uv run --locked` and start each command with `investorch`.
59
+
60
+ ### Release wheel
61
+
62
+ Download `investorch-0.3.0-py3-none-any.whl`, `investorch-0.3.0.tar.gz` and `SHA256SUMS` from the [0.3.0 GitHub Release](https://github.com/huangyicong0769/investorch-agent/releases/tag/v0.3.0). Verify the wheel before installing it:
63
+
64
+ ```bash
65
+ # macOS
66
+ grep 'investorch-0.3.0-py3-none-any.whl$' SHA256SUMS | shasum -a 256 -c -
67
+ # Linux
68
+ grep 'investorch-0.3.0-py3-none-any.whl$' SHA256SUMS | sha256sum -c -
69
+
70
+ uv tool install --python 3.12 ./investorch-0.3.0-py3-none-any.whl
71
+ ```
72
+
73
+ A wheel includes the production Web bundle and needs no Node.js runtime. To build a wheel from source, use `uv build --no-sources`; rebuild the Web bundle first when changing frontend code.
74
+
75
+ ## First run
76
+
77
+ Start Web:
78
+
79
+ ```bash
80
+ uv run --locked investorch web
81
+ ```
82
+
83
+ Open <http://127.0.0.1:1334> and complete Setup. Add an API-key connection or choose **Continue with ChatGPT**, then select the initial Agent models. ChatGPT-only setups need no API key. You can test the connection before opening Chats; later changes are available in Settings.
84
+
85
+ After setup, start the TUI or diagnostic plain console:
86
+
87
+ ```bash
88
+ uv run --locked investorch
89
+ uv run --locked investorch --plain
90
+ ```
91
+
92
+ ## Frontend development
93
+
94
+ Use the Node.js version pinned in `frontend/.node-version` for frontend development. Run the Python Web server, then start Vite in another terminal:
95
+
96
+ ```bash
97
+ cd frontend
98
+ npm ci
99
+ npm run dev
100
+ ```
101
+
102
+ Before packaging a frontend change:
103
+
104
+ ```bash
105
+ npm run typecheck
106
+ npm run lint
107
+ npm run build
108
+ ```
109
+
110
+ `npm run build` replaces the committed production bundle in `src/investorch/web/static`. Node.js is not required to run an already built wheel.
111
+
112
+ ## Verification and packaging
113
+
114
+ ```bash
115
+ uv run --locked ruff format --check .
116
+ uv run --locked ruff check .
117
+ uv run --locked pytest
118
+ uv build --no-sources
119
+ ```
120
+
121
+ ## Third-party foundations
122
+
123
+ InvestOrch Agent is built on these projects:
124
+
125
+ - [OpenAI Agents SDK](https://github.com/openai/openai-agents-python) for Agent execution, Tools, sessions, HITL, and MCP integration.
126
+ - [RQAlpha](https://github.com/ricequant/rqalpha) for backtesting.
127
+ - [CNEquity](https://github.com/rootSunc/cnequity) as the optional A-share data backend.
128
+ - [FastAPI](https://github.com/fastapi/fastapi), [React](https://github.com/facebook/react), and [Vite](https://github.com/vitejs/vite) for the Web client.
129
+ - [Textual](https://github.com/Textualize/textual) for the TUI.
130
+ - [uv](https://github.com/astral-sh/uv) for Python environment, lockfile, and package workflows.
131
+
132
+ InvestOrch Agent's own code and documentation are licensed under [Apache-2.0](LICENSE). Third-party components retain their own licenses. In particular, RQAlpha and its RQRisk dependency use project-specific terms for their defined non-commercial and commercial uses; InvestOrch Agent's license does not override those terms. See [Third-party notices](THIRD_PARTY_NOTICES.md) for details and the bundled Web client license inventory.
133
+
134
+ ## Human-AI development collaboration
135
+
136
+ InvestOrch Agent is a human-led personal research project developed with AI assistance. A solo developer has limited time, knowledge, and engineering capacity, so AI helps extend the work that can be done in research, design, implementation, and validation. The owner remains deeply involved in product design, investment-domain modeling, architecture, safety boundaries, and key code.
137
+
138
+ - The owner defines the product direction, makes investment-domain and architecture decisions, writes key code, and performs final review and acceptance.
139
+ - AI assists with codebase investigation, design discussion, implementation, testing, and documentation.
140
+ - Unclear requirements are discussed before implementation, and accepted changes remain subject to human review.
141
+
142
+ ## Documentation
143
+
144
+ - [0.3.0 release notes](docs/releases/0.3.0.md) and [Changelog](CHANGELOG.md).
145
+ - [Maintainer release procedure](docs/Publishing.md): review, GitHub releases and PyPI publishing.
146
+ - [Configuration](docs/Configuration.md), [Upgrade](docs/Upgrade.md) and [Backup and Recovery](docs/Backup_and_Recovery.md).
147
+ - [Architecture](docs/InvestOrch_Agent_Architecture.md): the implemented system and current boundaries.
148
+ - [Runtime / Session Execution Model](docs/Runtime_Session_Execution_Model.md): lifecycle and concurrency rules.
149
+ - [Product Roadmap](docs/InvestOrch_Agent_Product_Roadmap.md): confirmed directions, open decisions, and candidate themes.
150
+
151
+ ## Investment disclaimer
152
+
153
+ InvestOrch Agent is a personal research and software project. It does not provide investment, legal, tax, or accounting advice, and it does not recommend or solicit any security or transaction.
154
+
155
+ Market data, third-party data, model output, calculations, and backtests may be inaccurate, incomplete, delayed, or affected by assumptions and hindsight. Historical and backtested performance does not indicate future results.
156
+
157
+ Independently verify data and outputs before acting. You are responsible for investment decisions, credentials, configuration, regulatory compliance, and any resulting gains or losses. Test with non-production accounts and environments before connecting real capital.
@@ -0,0 +1,38 @@
1
+ # Third-party notices
2
+
3
+ InvestOrch Agent is licensed under the [Apache License 2.0](LICENSE). That license covers InvestOrch Agent's own code and documentation only. Third-party software, services, market data, and other external content retain their respective terms.
4
+
5
+ ## Python runtime dependencies
6
+
7
+ The Python distribution declares, but does not bundle, its runtime dependencies. Their own distributions carry their complete license texts.
8
+
9
+ | Project | Role | License |
10
+ | --- | --- | --- |
11
+ | [FastAPI](https://github.com/fastapi/fastapi) | Web application framework | MIT |
12
+ | [OpenAI Agents SDK](https://github.com/openai/openai-agents-python) | Agent runtime, Tools, sessions, HITL, and MCP integration | MIT |
13
+ | [RQAlpha](https://github.com/ricequant/rqalpha) | Backtesting engine | Project-specific license described below |
14
+ | [RQRisk](https://github.com/ricequant/rqrisk) | Risk calculations installed through RQAlpha | Project-specific license described below |
15
+ | [socksio](https://github.com/sethmlarson/socksio) | SOCKS protocol support | MIT |
16
+ | [Textual](https://github.com/Textualize/textual) | TUI framework | MIT |
17
+ | [TomlKit](https://github.com/python-poetry/tomlkit) | TOML parsing and editing | MIT |
18
+ | [Uvicorn](https://github.com/Kludex/uvicorn) | ASGI server | BSD-3-Clause |
19
+
20
+ The optional `cnequity` extra installs [CNEquity](https://github.com/rootSunc/cnequity), which is licensed under Apache-2.0.
21
+
22
+ ### RQAlpha and RQRisk restrictions
23
+
24
+ RQAlpha's repository license is not an unmodified Apache-2.0 license. It permits the defined non-commercial uses under Apache-2.0 conditions and requires separate authorization from Ricequant for the commercial uses described in that license. See the complete [RQAlpha license](https://github.com/ricequant/rqalpha/blob/master/LICENSE) before using or distributing an installation that includes RQAlpha.
25
+
26
+ RQRisk is installed as a dependency of RQAlpha. Its distribution includes a separate license with the same non-commercial and commercial-use distinction. See the complete [RQRisk license](https://github.com/ricequant/rqrisk/blob/master/LICENSE.txt).
27
+
28
+ InvestOrch Agent's Apache-2.0 license does not replace, broaden, or override either license.
29
+
30
+ ## Bundled Web client
31
+
32
+ The built Web client contains JavaScript and CSS produced from npm dependencies under permissive licenses including MIT, Apache-2.0, ISC, and 0BSD. The complete package-by-package notices and license texts are distributed with the Web client as `THIRD_PARTY_LICENSES.txt` and are regenerated from `frontend/package-lock.json` and `frontend/licenses/` during each production build.
33
+
34
+ The client also incorporates [shadcn/ui](https://github.com/shadcn-ui/ui) components under the MIT license. Their source attribution and full license are retained in `frontend/licenses/shadcn-ui.txt` and included in the distributed `THIRD_PARTY_LICENSES.txt`.
35
+
36
+ ## External services and data
37
+
38
+ DeepSeek and any other configured model endpoint, MCP server, market-data source, or broker service are external to this repository. Their service terms and data licenses apply independently.