trading-r1 0.1.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 (336) hide show
  1. trading_r1-0.1.0/.github/ISSUE_TEMPLATE/bug.yml +25 -0
  2. trading_r1-0.1.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
  3. trading_r1-0.1.0/.github/ISSUE_TEMPLATE/feature.yml +11 -0
  4. trading_r1-0.1.0/.github/workflows/ci.yml +28 -0
  5. trading_r1-0.1.0/.github/workflows/release.yml +31 -0
  6. trading_r1-0.1.0/.gitignore +20 -0
  7. trading_r1-0.1.0/.python-version +1 -0
  8. trading_r1-0.1.0/CHANGELOG.md +15 -0
  9. trading_r1-0.1.0/CONTRIBUTING.md +28 -0
  10. trading_r1-0.1.0/LICENSE +201 -0
  11. trading_r1-0.1.0/MANUAL.md +115 -0
  12. trading_r1-0.1.0/Makefile +26 -0
  13. trading_r1-0.1.0/PKG-INFO +206 -0
  14. trading_r1-0.1.0/README.md +169 -0
  15. trading_r1-0.1.0/assets/Trading-R1-dark.svg +67 -0
  16. trading_r1-0.1.0/assets/Trading-R1.svg +67 -0
  17. trading_r1-0.1.0/assets/taxonomy.svg +247 -0
  18. trading_r1-0.1.0/assets/trading-r1.gif +0 -0
  19. trading_r1-0.1.0/install.sh +33 -0
  20. trading_r1-0.1.0/pyproject.toml +74 -0
  21. trading_r1-0.1.0/trading_r1/__init__.py +8 -0
  22. trading_r1-0.1.0/trading_r1/assembly.py +203 -0
  23. trading_r1-0.1.0/trading_r1/cli/__init__.py +107 -0
  24. trading_r1-0.1.0/trading_r1/cli/backend.py +147 -0
  25. trading_r1-0.1.0/trading_r1/cli/channels.py +212 -0
  26. trading_r1-0.1.0/trading_r1/cli/client.py +69 -0
  27. trading_r1-0.1.0/trading_r1/cli/credentials.py +76 -0
  28. trading_r1-0.1.0/trading_r1/cli/daemon.py +117 -0
  29. trading_r1-0.1.0/trading_r1/cli/export.py +93 -0
  30. trading_r1-0.1.0/trading_r1/cli/jobs.py +155 -0
  31. trading_r1-0.1.0/trading_r1/cli/logging_setup.py +75 -0
  32. trading_r1-0.1.0/trading_r1/cli/sessions.py +54 -0
  33. trading_r1-0.1.0/trading_r1/cli/sync.py +146 -0
  34. trading_r1-0.1.0/trading_r1/cli/terminal.py +225 -0
  35. trading_r1-0.1.0/trading_r1/contract/__init__.py +10 -0
  36. trading_r1-0.1.0/trading_r1/contract/args.py +83 -0
  37. trading_r1-0.1.0/trading_r1/contract/events.py +280 -0
  38. trading_r1-0.1.0/trading_r1/contract/render.py +450 -0
  39. trading_r1-0.1.0/trading_r1/contract/spec.py +234 -0
  40. trading_r1-0.1.0/trading_r1/contract/units.py +79 -0
  41. trading_r1-0.1.0/trading_r1/delivery/__init__.py +18 -0
  42. trading_r1-0.1.0/trading_r1/delivery/base.py +165 -0
  43. trading_r1-0.1.0/trading_r1/delivery/channels.py +48 -0
  44. trading_r1-0.1.0/trading_r1/delivery/config.py +73 -0
  45. trading_r1-0.1.0/trading_r1/delivery/email.py +155 -0
  46. trading_r1-0.1.0/trading_r1/delivery/folder.py +70 -0
  47. trading_r1-0.1.0/trading_r1/delivery/kinds.py +14 -0
  48. trading_r1-0.1.0/trading_r1/delivery/manage.py +109 -0
  49. trading_r1-0.1.0/trading_r1/delivery/message.py +195 -0
  50. trading_r1-0.1.0/trading_r1/delivery/outbox.py +197 -0
  51. trading_r1-0.1.0/trading_r1/delivery/telegram.py +272 -0
  52. trading_r1-0.1.0/trading_r1/delivery/telegram_format.py +179 -0
  53. trading_r1-0.1.0/trading_r1/host/__init__.py +6 -0
  54. trading_r1-0.1.0/trading_r1/host/daemon.py +431 -0
  55. trading_r1-0.1.0/trading_r1/host/instance.py +181 -0
  56. trading_r1-0.1.0/trading_r1/providers/__init__.py +72 -0
  57. trading_r1-0.1.0/trading_r1/providers/adapters/__init__.py +40 -0
  58. trading_r1-0.1.0/trading_r1/providers/adapters/qwen.py +31 -0
  59. trading_r1-0.1.0/trading_r1/providers/adapters/reasoning.py +29 -0
  60. trading_r1-0.1.0/trading_r1/providers/anthropic.py +240 -0
  61. trading_r1-0.1.0/trading_r1/providers/base.py +207 -0
  62. trading_r1-0.1.0/trading_r1/providers/builtins.py +248 -0
  63. trading_r1-0.1.0/trading_r1/providers/chat.py +99 -0
  64. trading_r1-0.1.0/trading_r1/providers/client.py +241 -0
  65. trading_r1-0.1.0/trading_r1/providers/discovery.py +44 -0
  66. trading_r1-0.1.0/trading_r1/providers/gemini.py +233 -0
  67. trading_r1-0.1.0/trading_r1/providers/health.py +127 -0
  68. trading_r1-0.1.0/trading_r1/providers/openai.py +157 -0
  69. trading_r1-0.1.0/trading_r1/providers/profiles.py +322 -0
  70. trading_r1-0.1.0/trading_r1/providers/usage.py +73 -0
  71. trading_r1-0.1.0/trading_r1/report/__init__.py +10 -0
  72. trading_r1-0.1.0/trading_r1/report/common.py +54 -0
  73. trading_r1-0.1.0/trading_r1/report/fonts/OFL.txt +93 -0
  74. trading_r1-0.1.0/trading_r1/report/fonts/OpenSans-Bold.ttf +0 -0
  75. trading_r1-0.1.0/trading_r1/report/fonts/OpenSans-BoldItalic.ttf +0 -0
  76. trading_r1-0.1.0/trading_r1/report/fonts/OpenSans-Italic.ttf +0 -0
  77. trading_r1-0.1.0/trading_r1/report/fonts/OpenSans-Regular.ttf +0 -0
  78. trading_r1-0.1.0/trading_r1/report/html.py +255 -0
  79. trading_r1-0.1.0/trading_r1/report/logo.svg +67 -0
  80. trading_r1-0.1.0/trading_r1/report/pdf.py +468 -0
  81. trading_r1-0.1.0/trading_r1/report/snapshot.py +211 -0
  82. trading_r1-0.1.0/trading_r1/research.py +179 -0
  83. trading_r1-0.1.0/trading_r1/runtime/__init__.py +5 -0
  84. trading_r1-0.1.0/trading_r1/runtime/agent.py +251 -0
  85. trading_r1-0.1.0/trading_r1/runtime/arg_coercion.py +182 -0
  86. trading_r1-0.1.0/trading_r1/runtime/auto_compact.py +63 -0
  87. trading_r1-0.1.0/trading_r1/runtime/capabilities.py +123 -0
  88. trading_r1-0.1.0/trading_r1/runtime/chaining.py +319 -0
  89. trading_r1-0.1.0/trading_r1/runtime/context_budget.py +93 -0
  90. trading_r1-0.1.0/trading_r1/runtime/dispatch.py +376 -0
  91. trading_r1-0.1.0/trading_r1/runtime/elicitation.py +91 -0
  92. trading_r1-0.1.0/trading_r1/runtime/evidence.py +266 -0
  93. trading_r1-0.1.0/trading_r1/runtime/frontmatter.py +78 -0
  94. trading_r1-0.1.0/trading_r1/runtime/loop.py +360 -0
  95. trading_r1-0.1.0/trading_r1/runtime/memory.py +214 -0
  96. trading_r1-0.1.0/trading_r1/runtime/model_call.py +385 -0
  97. trading_r1-0.1.0/trading_r1/runtime/modes.py +85 -0
  98. trading_r1-0.1.0/trading_r1/runtime/prompts.py +397 -0
  99. trading_r1-0.1.0/trading_r1/runtime/recovery.py +127 -0
  100. trading_r1-0.1.0/trading_r1/runtime/retry.py +101 -0
  101. trading_r1-0.1.0/trading_r1/runtime/run_state.py +116 -0
  102. trading_r1-0.1.0/trading_r1/runtime/session/__init__.py +5 -0
  103. trading_r1-0.1.0/trading_r1/runtime/session/index.py +132 -0
  104. trading_r1-0.1.0/trading_r1/runtime/session/recorder.py +367 -0
  105. trading_r1-0.1.0/trading_r1/runtime/session/records.py +395 -0
  106. trading_r1-0.1.0/trading_r1/runtime/session/store.py +513 -0
  107. trading_r1-0.1.0/trading_r1/runtime/skill_registry.py +128 -0
  108. trading_r1-0.1.0/trading_r1/runtime/sources.py +75 -0
  109. trading_r1-0.1.0/trading_r1/runtime/summarize.py +174 -0
  110. trading_r1-0.1.0/trading_r1/runtime/taxonomy.py +127 -0
  111. trading_r1-0.1.0/trading_r1/runtime/tool_events.py +55 -0
  112. trading_r1-0.1.0/trading_r1/runtime/tool_registry.py +95 -0
  113. trading_r1-0.1.0/trading_r1/scheduler/__init__.py +17 -0
  114. trading_r1-0.1.0/trading_r1/scheduler/runner.py +243 -0
  115. trading_r1-0.1.0/trading_r1/scheduler/schedule.py +142 -0
  116. trading_r1-0.1.0/trading_r1/scheduler/store.py +395 -0
  117. trading_r1-0.1.0/trading_r1/service/__init__.py +14 -0
  118. trading_r1-0.1.0/trading_r1/service/app.py +140 -0
  119. trading_r1-0.1.0/trading_r1/service/auth.py +72 -0
  120. trading_r1-0.1.0/trading_r1/service/events.py +28 -0
  121. trading_r1-0.1.0/trading_r1/service/inbound.py +345 -0
  122. trading_r1-0.1.0/trading_r1/service/preferences.py +113 -0
  123. trading_r1-0.1.0/trading_r1/service/routes/__init__.py +4 -0
  124. trading_r1-0.1.0/trading_r1/service/routes/channels.py +250 -0
  125. trading_r1-0.1.0/trading_r1/service/routes/credentials.py +68 -0
  126. trading_r1-0.1.0/trading_r1/service/routes/jobs.py +155 -0
  127. trading_r1-0.1.0/trading_r1/service/routes/models.py +123 -0
  128. trading_r1-0.1.0/trading_r1/service/routes/research.py +265 -0
  129. trading_r1-0.1.0/trading_r1/service/routes/service.py +55 -0
  130. trading_r1-0.1.0/trading_r1/service/routes/sessions.py +140 -0
  131. trading_r1-0.1.0/trading_r1/service/routes/settings.py +83 -0
  132. trading_r1-0.1.0/trading_r1/service/routes/sync.py +170 -0
  133. trading_r1-0.1.0/trading_r1/service/state.py +108 -0
  134. trading_r1-0.1.0/trading_r1/service/syncing.py +249 -0
  135. trading_r1-0.1.0/trading_r1/service/turns.py +75 -0
  136. trading_r1-0.1.0/trading_r1/service/unattended.py +204 -0
  137. trading_r1-0.1.0/trading_r1/skills/attribution-analysis/SKILL.md +53 -0
  138. trading_r1-0.1.0/trading_r1/skills/bond-analysis/SKILL.md +64 -0
  139. trading_r1-0.1.0/trading_r1/skills/consensus-check/SKILL.md +37 -0
  140. trading_r1-0.1.0/trading_r1/skills/credit-analysis/SKILL.md +78 -0
  141. trading_r1-0.1.0/trading_r1/skills/dcf-valuation/SKILL.md +43 -0
  142. trading_r1-0.1.0/trading_r1/skills/earnings-event/SKILL.md +53 -0
  143. trading_r1-0.1.0/trading_r1/skills/earnings-quality/SKILL.md +59 -0
  144. trading_r1-0.1.0/trading_r1/skills/equity-deep-dive/SKILL.md +57 -0
  145. trading_r1-0.1.0/trading_r1/skills/industry-analysis/SKILL.md +60 -0
  146. trading_r1-0.1.0/trading_r1/skills/lbo-model/SKILL.md +54 -0
  147. trading_r1-0.1.0/trading_r1/skills/macro-briefing/SKILL.md +55 -0
  148. trading_r1-0.1.0/trading_r1/skills/options-strategy/SKILL.md +70 -0
  149. trading_r1-0.1.0/trading_r1/skills/portfolio-review/SKILL.md +56 -0
  150. trading_r1-0.1.0/trading_r1/skills/relative-valuation/SKILL.md +58 -0
  151. trading_r1-0.1.0/trading_r1/skills/scenario-analysis/SKILL.md +59 -0
  152. trading_r1-0.1.0/trading_r1/skills/three-statement-model/SKILL.md +52 -0
  153. trading_r1-0.1.0/trading_r1/skills/ticker-snapshot/SKILL.md +28 -0
  154. trading_r1-0.1.0/trading_r1/state/__init__.py +4 -0
  155. trading_r1-0.1.0/trading_r1/state/credentials.py +176 -0
  156. trading_r1-0.1.0/trading_r1/state/fileio.py +85 -0
  157. trading_r1-0.1.0/trading_r1/state/paths.py +39 -0
  158. trading_r1-0.1.0/trading_r1/state/reports_dir.py +80 -0
  159. trading_r1-0.1.0/trading_r1/state/runtime_config.py +311 -0
  160. trading_r1-0.1.0/trading_r1/state/settings.py +92 -0
  161. trading_r1-0.1.0/trading_r1/state/sqlite.py +191 -0
  162. trading_r1-0.1.0/trading_r1/sync/__init__.py +4 -0
  163. trading_r1-0.1.0/trading_r1/sync/client.py +270 -0
  164. trading_r1-0.1.0/trading_r1/sync/engine.py +516 -0
  165. trading_r1-0.1.0/trading_r1/sync/store.py +144 -0
  166. trading_r1-0.1.0/trading_r1/tools/__init__.py +10 -0
  167. trading_r1-0.1.0/trading_r1/tools/compute/__init__.py +40 -0
  168. trading_r1-0.1.0/trading_r1/tools/compute/arithmetic.py +321 -0
  169. trading_r1-0.1.0/trading_r1/tools/compute/cashflows.py +30 -0
  170. trading_r1-0.1.0/trading_r1/tools/compute/derivatives/__init__.py +15 -0
  171. trading_r1-0.1.0/trading_r1/tools/compute/derivatives/binomial.py +207 -0
  172. trading_r1-0.1.0/trading_r1/tools/compute/derivatives/black_scholes.py +220 -0
  173. trading_r1-0.1.0/trading_r1/tools/compute/derivatives/implied_vol.py +140 -0
  174. trading_r1-0.1.0/trading_r1/tools/compute/derivatives/position_greeks.py +134 -0
  175. trading_r1-0.1.0/trading_r1/tools/compute/fixed_income/__init__.py +29 -0
  176. trading_r1-0.1.0/trading_r1/tools/compute/fixed_income/bond.py +184 -0
  177. trading_r1-0.1.0/trading_r1/tools/compute/fixed_income/credit_ratios.py +127 -0
  178. trading_r1-0.1.0/trading_r1/tools/compute/fixed_income/credit_spread.py +100 -0
  179. trading_r1-0.1.0/trading_r1/tools/compute/fixed_income/horizon_return.py +209 -0
  180. trading_r1-0.1.0/trading_r1/tools/compute/fixed_income/yield_curve.py +207 -0
  181. trading_r1-0.1.0/trading_r1/tools/compute/modeling/__init__.py +10 -0
  182. trading_r1-0.1.0/trading_r1/tools/compute/modeling/sensitivity.py +217 -0
  183. trading_r1-0.1.0/trading_r1/tools/compute/modeling/three_statement.py +246 -0
  184. trading_r1-0.1.0/trading_r1/tools/compute/portfolio/__init__.py +29 -0
  185. trading_r1-0.1.0/trading_r1/tools/compute/portfolio/compare.py +116 -0
  186. trading_r1-0.1.0/trading_r1/tools/compute/portfolio/decomposition.py +128 -0
  187. trading_r1-0.1.0/trading_r1/tools/compute/portfolio/moments.py +42 -0
  188. trading_r1-0.1.0/trading_r1/tools/compute/portfolio/optimization.py +226 -0
  189. trading_r1-0.1.0/trading_r1/tools/compute/portfolio/performance.py +219 -0
  190. trading_r1-0.1.0/trading_r1/tools/compute/portfolio/rebalance.py +145 -0
  191. trading_r1-0.1.0/trading_r1/tools/compute/risk/__init__.py +10 -0
  192. trading_r1-0.1.0/trading_r1/tools/compute/risk/beta.py +105 -0
  193. trading_r1-0.1.0/trading_r1/tools/compute/risk/correlation.py +94 -0
  194. trading_r1-0.1.0/trading_r1/tools/compute/risk/drawdown.py +170 -0
  195. trading_r1-0.1.0/trading_r1/tools/compute/risk/stress.py +190 -0
  196. trading_r1-0.1.0/trading_r1/tools/compute/risk/var.py +106 -0
  197. trading_r1-0.1.0/trading_r1/tools/compute/risk/volatility.py +114 -0
  198. trading_r1-0.1.0/trading_r1/tools/compute/series.py +68 -0
  199. trading_r1-0.1.0/trading_r1/tools/compute/statistics/__init__.py +10 -0
  200. trading_r1-0.1.0/trading_r1/tools/compute/statistics/descriptive.py +134 -0
  201. trading_r1-0.1.0/trading_r1/tools/compute/statistics/regression.py +221 -0
  202. trading_r1-0.1.0/trading_r1/tools/compute/technical/__init__.py +10 -0
  203. trading_r1-0.1.0/trading_r1/tools/compute/technical/bollinger.py +124 -0
  204. trading_r1-0.1.0/trading_r1/tools/compute/technical/indicators.py +79 -0
  205. trading_r1-0.1.0/trading_r1/tools/compute/technical/macd.py +122 -0
  206. trading_r1-0.1.0/trading_r1/tools/compute/technical/momentum.py +136 -0
  207. trading_r1-0.1.0/trading_r1/tools/compute/technical/moving_average.py +105 -0
  208. trading_r1-0.1.0/trading_r1/tools/compute/technical/rsi.py +123 -0
  209. trading_r1-0.1.0/trading_r1/tools/compute/valuation/__init__.py +10 -0
  210. trading_r1-0.1.0/trading_r1/tools/compute/valuation/comps.py +144 -0
  211. trading_r1-0.1.0/trading_r1/tools/compute/valuation/dcf.py +183 -0
  212. trading_r1-0.1.0/trading_r1/tools/compute/valuation/dcf_sensitivity.py +177 -0
  213. trading_r1-0.1.0/trading_r1/tools/compute/valuation/lbo.py +195 -0
  214. trading_r1-0.1.0/trading_r1/tools/compute/valuation/wacc.py +141 -0
  215. trading_r1-0.1.0/trading_r1/tools/core/__init__.py +24 -0
  216. trading_r1-0.1.0/trading_r1/tools/core/ask_user.py +106 -0
  217. trading_r1-0.1.0/trading_r1/tools/core/evidence.py +163 -0
  218. trading_r1-0.1.0/trading_r1/tools/core/load_skill.py +96 -0
  219. trading_r1-0.1.0/trading_r1/tools/core/load_tool.py +71 -0
  220. trading_r1-0.1.0/trading_r1/tools/core/memory.py +135 -0
  221. trading_r1-0.1.0/trading_r1/tools/core/plan.py +78 -0
  222. trading_r1-0.1.0/trading_r1/tools/data/__init__.py +9 -0
  223. trading_r1-0.1.0/trading_r1/tools/data/articles.py +217 -0
  224. trading_r1-0.1.0/trading_r1/tools/data/common.py +61 -0
  225. trading_r1-0.1.0/trading_r1/tools/data/equity/__init__.py +45 -0
  226. trading_r1-0.1.0/trading_r1/tools/data/equity/company.py +129 -0
  227. trading_r1-0.1.0/trading_r1/tools/data/equity/comps.py +202 -0
  228. trading_r1-0.1.0/trading_r1/tools/data/equity/corporate_actions.py +164 -0
  229. trading_r1-0.1.0/trading_r1/tools/data/equity/digest.py +177 -0
  230. trading_r1-0.1.0/trading_r1/tools/data/equity/earnings.py +194 -0
  231. trading_r1-0.1.0/trading_r1/tools/data/equity/estimates.py +167 -0
  232. trading_r1-0.1.0/trading_r1/tools/data/equity/filings.py +144 -0
  233. trading_r1-0.1.0/trading_r1/tools/data/equity/fundamentals.py +287 -0
  234. trading_r1-0.1.0/trading_r1/tools/data/equity/ownership.py +437 -0
  235. trading_r1-0.1.0/trading_r1/tools/data/equity/ratios.py +129 -0
  236. trading_r1-0.1.0/trading_r1/tools/data/equity/reference.py +130 -0
  237. trading_r1-0.1.0/trading_r1/tools/data/equity/snapshot.py +84 -0
  238. trading_r1-0.1.0/trading_r1/tools/data/equity/statements.py +672 -0
  239. trading_r1-0.1.0/trading_r1/tools/data/macro/__init__.py +10 -0
  240. trading_r1-0.1.0/trading_r1/tools/data/macro/common.py +111 -0
  241. trading_r1-0.1.0/trading_r1/tools/data/macro/series.py +350 -0
  242. trading_r1-0.1.0/trading_r1/tools/data/macro/snapshot.py +144 -0
  243. trading_r1-0.1.0/trading_r1/tools/data/market/__init__.py +49 -0
  244. trading_r1-0.1.0/trading_r1/tools/data/market/aligned_prices.py +228 -0
  245. trading_r1-0.1.0/trading_r1/tools/data/market/digest.py +147 -0
  246. trading_r1-0.1.0/trading_r1/tools/data/market/movers.py +117 -0
  247. trading_r1-0.1.0/trading_r1/tools/data/market/news.py +121 -0
  248. trading_r1-0.1.0/trading_r1/tools/data/market/positioning.py +189 -0
  249. trading_r1-0.1.0/trading_r1/tools/data/market/prices.py +74 -0
  250. trading_r1-0.1.0/trading_r1/tools/data/market/quotes.py +138 -0
  251. trading_r1-0.1.0/trading_r1/tools/data/market/rates.py +289 -0
  252. trading_r1-0.1.0/trading_r1/tools/data/market/sectors.py +152 -0
  253. trading_r1-0.1.0/trading_r1/tools/data/market/symbol_search.py +125 -0
  254. trading_r1-0.1.0/trading_r1/tools/data/market/volatility.py +108 -0
  255. trading_r1-0.1.0/trading_r1/tools/data/pricing.py +682 -0
  256. trading_r1-0.1.0/trading_r1/tools/data/reuse.py +81 -0
  257. trading_r1-0.1.0/trading_r1/tools/data/symbols.py +166 -0
  258. trading_r1-0.1.0/trading_r1/tools/data/tauric.py +238 -0
  259. trading_r1-0.1.0/trading_r1/tools/web/__init__.py +35 -0
  260. trading_r1-0.1.0/trading_r1/tools/web/cache.py +90 -0
  261. trading_r1-0.1.0/trading_r1/tools/web/citations.py +80 -0
  262. trading_r1-0.1.0/trading_r1/tools/web/references.py +143 -0
  263. trading_r1-0.1.0/trading_r1/tools/web/registry.py +54 -0
  264. trading_r1-0.1.0/trading_r1/tools/web/search.py +174 -0
  265. trading_r1-0.1.0/trading_r1/tools/web/search_engines.py +75 -0
  266. trading_r1-0.1.0/trading_r1/tools/web/visit.py +218 -0
  267. trading_r1-0.1.0/trading_r1/tools/web/visit_fetch.py +192 -0
  268. trading_r1-0.1.0/trading_r1/tools/web/visit_reader.py +89 -0
  269. trading_r1-0.1.0/tui/biome.json +9 -0
  270. trading_r1-0.1.0/tui/bun.lock +246 -0
  271. trading_r1-0.1.0/tui/bunfig.toml +5 -0
  272. trading_r1-0.1.0/tui/package.json +24 -0
  273. trading_r1-0.1.0/tui/src/app.tsx +745 -0
  274. trading_r1-0.1.0/tui/src/components/composer.tsx +54 -0
  275. trading_r1-0.1.0/tui/src/components/footer.tsx +50 -0
  276. trading_r1-0.1.0/tui/src/components/input-header.tsx +33 -0
  277. trading_r1-0.1.0/tui/src/components/logo.tsx +72 -0
  278. trading_r1-0.1.0/tui/src/components/logo.txt +6 -0
  279. trading_r1-0.1.0/tui/src/components/plan-panel.tsx +56 -0
  280. trading_r1-0.1.0/tui/src/components/sources-rail.tsx +150 -0
  281. trading_r1-0.1.0/tui/src/components/spinner.tsx +38 -0
  282. trading_r1-0.1.0/tui/src/components/transcript.tsx +270 -0
  283. trading_r1-0.1.0/tui/src/components/welcome.tsx +44 -0
  284. trading_r1-0.1.0/tui/src/index.tsx +11 -0
  285. trading_r1-0.1.0/tui/src/lib/api.ts +627 -0
  286. trading_r1-0.1.0/tui/src/lib/ask-user.ts +42 -0
  287. trading_r1-0.1.0/tui/src/lib/capabilities.ts +86 -0
  288. trading_r1-0.1.0/tui/src/lib/citations.ts +51 -0
  289. trading_r1-0.1.0/tui/src/lib/commands.ts +135 -0
  290. trading_r1-0.1.0/tui/src/lib/context.ts +42 -0
  291. trading_r1-0.1.0/tui/src/lib/conversation.ts +340 -0
  292. trading_r1-0.1.0/tui/src/lib/event-buffer.ts +57 -0
  293. trading_r1-0.1.0/tui/src/lib/events.gen.ts +169 -0
  294. trading_r1-0.1.0/tui/src/lib/folder-picker.ts +52 -0
  295. trading_r1-0.1.0/tui/src/lib/form.ts +187 -0
  296. trading_r1-0.1.0/tui/src/lib/format.ts +26 -0
  297. trading_r1-0.1.0/tui/src/lib/hints.ts +13 -0
  298. trading_r1-0.1.0/tui/src/lib/input-history.ts +67 -0
  299. trading_r1-0.1.0/tui/src/lib/jobs.ts +150 -0
  300. trading_r1-0.1.0/tui/src/lib/load.ts +25 -0
  301. trading_r1-0.1.0/tui/src/lib/mode.ts +41 -0
  302. trading_r1-0.1.0/tui/src/lib/models.ts +94 -0
  303. trading_r1-0.1.0/tui/src/lib/send.ts +39 -0
  304. trading_r1-0.1.0/tui/src/lib/service.ts +51 -0
  305. trading_r1-0.1.0/tui/src/lib/settings.ts +178 -0
  306. trading_r1-0.1.0/tui/src/lib/sync.ts +71 -0
  307. trading_r1-0.1.0/tui/src/setup/channels.tsx +309 -0
  308. trading_r1-0.1.0/tui/src/setup/flow.tsx +96 -0
  309. trading_r1-0.1.0/tui/src/setup/index.tsx +32 -0
  310. trading_r1-0.1.0/tui/src/setup/jobs.tsx +185 -0
  311. trading_r1-0.1.0/tui/src/setup/keys.tsx +142 -0
  312. trading_r1-0.1.0/tui/src/setup/notes.tsx +69 -0
  313. trading_r1-0.1.0/tui/src/setup/report-export.tsx +70 -0
  314. trading_r1-0.1.0/tui/src/setup/send.tsx +115 -0
  315. trading_r1-0.1.0/tui/src/setup/service.tsx +73 -0
  316. trading_r1-0.1.0/tui/src/setup/sync.tsx +61 -0
  317. trading_r1-0.1.0/tui/src/theme/index.ts +100 -0
  318. trading_r1-0.1.0/tui/src/theme/layout.ts +34 -0
  319. trading_r1-0.1.0/tui/src/theme/markdown_inline.scm +128 -0
  320. trading_r1-0.1.0/tui/src/theme/report-markdown.ts +27 -0
  321. trading_r1-0.1.0/tui/src/ui/capability-browser.tsx +95 -0
  322. trading_r1-0.1.0/tui/src/ui/command-palette.tsx +100 -0
  323. trading_r1-0.1.0/tui/src/ui/dialog-select.tsx +92 -0
  324. trading_r1-0.1.0/tui/src/ui/dialog.tsx +73 -0
  325. trading_r1-0.1.0/tui/src/ui/field.tsx +24 -0
  326. trading_r1-0.1.0/tui/src/ui/form-dialog.tsx +189 -0
  327. trading_r1-0.1.0/tui/src/ui/help-overlay.tsx +56 -0
  328. trading_r1-0.1.0/tui/src/ui/info-dialog.tsx +39 -0
  329. trading_r1-0.1.0/tui/src/ui/list-dialog.tsx +66 -0
  330. trading_r1-0.1.0/tui/src/ui/menu-row.tsx +24 -0
  331. trading_r1-0.1.0/tui/src/ui/modal.tsx +32 -0
  332. trading_r1-0.1.0/tui/src/ui/prompt-dialog.tsx +41 -0
  333. trading_r1-0.1.0/tui/src/ui/questionnaire.tsx +87 -0
  334. trading_r1-0.1.0/tui/src/ui/settings-dialog.tsx +58 -0
  335. trading_r1-0.1.0/tui/tsconfig.json +19 -0
  336. trading_r1-0.1.0/uv.lock +1895 -0
@@ -0,0 +1,25 @@
1
+ name: Bug
2
+ description: Something does not work.
3
+ labels: [bug]
4
+ body:
5
+ - type: input
6
+ id: version
7
+ attributes:
8
+ label: Version
9
+ description: The output of `trading-r1 --version`.
10
+ validations:
11
+ required: true
12
+ - type: input
13
+ id: model
14
+ attributes:
15
+ label: Model
16
+ description: The model in use, and your operating system.
17
+ validations:
18
+ required: true
19
+ - type: textarea
20
+ id: what
21
+ attributes:
22
+ label: What happened
23
+ description: What you did, what you expected and what happened. Remove keys and anything private.
24
+ validations:
25
+ required: true
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Security problem
4
+ url: https://github.com/TauricResearch/Trading-R1/security/advisories/new
5
+ about: Report it privately. Do not open an issue.
6
+ - name: Question
7
+ url: https://discord.com/invite/hk9PGKShPK
8
+ about: Ask on Discord.
@@ -0,0 +1,11 @@
1
+ name: Feature
2
+ description: Something it should do.
3
+ labels: [enhancement]
4
+ body:
5
+ - type: textarea
6
+ id: what
7
+ attributes:
8
+ label: What you want to do
9
+ description: The task, and what gets in the way today.
10
+ validations:
11
+ required: true
@@ -0,0 +1,28 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ tags: ["v*"]
7
+ pull_request:
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ smoke:
12
+ runs-on: ${{ matrix.os }}
13
+ env:
14
+ UV_PYTHON: ${{ matrix.python }}
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ python: ["3.12", "3.14"]
19
+ os: [ubuntu-latest, macos-latest]
20
+ steps:
21
+ - uses: actions/checkout@v7
22
+ - uses: astral-sh/setup-uv@v10.3.3
23
+ - uses: oven-sh/setup-bun@v2
24
+ - run: uv python install ${{ matrix.python }}
25
+ - run: uv sync --locked
26
+ - run: make lint
27
+ - run: make smoke
28
+ - run: uv tool install . && trading-r1 --version
@@ -0,0 +1,31 @@
1
+ name: Release
2
+
3
+ # Publishes to PyPI when a version tag is pushed. Uses PyPI Trusted Publishing: no token is
4
+ # stored; register this repository and workflow as a trusted publisher on PyPI first.
5
+ on:
6
+ push:
7
+ tags: ["v*"]
8
+
9
+ jobs:
10
+ publish:
11
+ runs-on: ubuntu-latest
12
+ environment: pypi
13
+ permissions:
14
+ id-token: write
15
+ contents: read
16
+ steps:
17
+ - uses: actions/checkout@v7
18
+ - uses: astral-sh/setup-uv@v10.3.3
19
+ - run: uv python install 3.12
20
+ - uses: oven-sh/setup-bun@v2
21
+ - run: uv sync --locked
22
+ - run: make smoke
23
+ # PyPI renders the README without the repository around it: point its links at the tag.
24
+ - name: Absolute links for the package page
25
+ run: |
26
+ raw="https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}"
27
+ blob="https://github.com/${{ github.repository }}/blob/${{ github.ref_name }}"
28
+ sed -i -E "s#(src|srcset)=\"assets/#\1=\"${raw}/assets/#g" README.md
29
+ sed -i -E "s#\]\((LICENSE|CONTRIBUTING|CHANGELOG|MANUAL)#](${blob}/\1#g" README.md
30
+ - run: uv build
31
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,20 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .venv/
6
+ .ruff_cache/
7
+ build/
8
+ dist/
9
+
10
+ # Node
11
+ node_modules/
12
+
13
+ # Environment
14
+ .env
15
+ .env.*
16
+
17
+ # Editors and OS
18
+ .idea/
19
+ .vscode/
20
+ .DS_Store
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
3
+ ## [0.1.0] (2026-11-04)
4
+
5
+ First official release of Trading-R1, the terminal for financial research and analysis by
6
+ [Tauric Research](https://tauric.ai/).
7
+
8
+ - Ask a question, and the agent pulls market data, reads the web, runs the numbers and writes a
9
+ cited report.
10
+ - 68 tools and 17 workflow skills: company, market and macro data; valuation, risk, portfolio,
11
+ statistics, fixed income and derivatives.
12
+ - Models: Tauric, OpenAI, Anthropic, Gemini, vLLM and Ollama.
13
+ - Reports as PDF, Markdown or an HTML page, sent to Telegram, email or a folder.
14
+ - Scheduled reports, a background service for Linux and macOS, and Telegram replies.
15
+ - Session sync to your Tauric account, on by default, and `SKILL.md` workflows of your own.
@@ -0,0 +1,28 @@
1
+ # Contributing
2
+
3
+ Issues and pull requests are welcome. Report a security problem
4
+ [privately](https://github.com/TauricResearch/Trading-R1/security/advisories/new), not in an issue.
5
+
6
+ ## Issues
7
+
8
+ Use the issue forms. Give the output of `trading-r1 --version`, the model, what you did, what you
9
+ expected and what happened. Remove keys and anything private first.
10
+
11
+ ## Pull requests
12
+
13
+ - Keep one change to a pull request, and say what it does and why.
14
+ - Open an issue first for a large change or a new dependency.
15
+ - Run `make lint` and `make smoke`. Both must pass.
16
+
17
+ ## Standards
18
+
19
+ - Python 3.12 or later, formatted and linted by `ruff`. TypeScript formatted by Biome.
20
+ - Every source file opens with the copyright and SPDX lines.
21
+ - Layers import downward: `contract`, `state` and `providers`, then `runtime`, then `tools` and
22
+ `service`. `runtime` does not import `tools`.
23
+ - Tools report expected failures with `ToolError` and do not raise anything else. Every price tool
24
+ goes through `tools/data/pricing.py`.
25
+ - Comments say what the code does or a constraint a reader must know, not its history.
26
+ - User-facing text is short and plain. Use no em dash, en dash or middle dot.
27
+ - `tui/src/lib/events.gen.ts` and `assets/taxonomy.svg` are generated. Leave them to a maintainer.
28
+ - Do not commit credentials or machine-specific paths and hosts.
@@ -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 by Licensor and
64
+ subsequently 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,115 @@
1
+ # Trading-R1 manual
2
+
3
+ Each command takes `--help`, which also lists the less common commands and options.
4
+
5
+ ## Commands
6
+
7
+ | Command | Does |
8
+ |---|---|
9
+ | `trading-r1 [QUESTION]` | Open the terminal. `--profile NAME`, `--mode MODE` |
10
+ | `trading-r1 serve` | Run the backend alone, in the foreground |
11
+ | `trading-r1 export ID` | Write a report. `--format pdf\|md\|html`, `-o FILE`, `--send CHANNELS` |
12
+ | `trading-r1 sessions list`, `delete ID` | Your sessions; delete one here and its copy in your account |
13
+ | `trading-r1 channels add KIND`, `list`, `test NAME`, `remove NAME` | Your channels |
14
+ | `trading-r1 jobs add`, `list`, `run ID`, `runs ID`, `remove ID` | Your scheduled reports, and what each run did |
15
+ | `trading-r1 secrets set NAME`, `list`, `delete NAME` | Stored keys, passwords and tokens |
16
+ | `trading-r1 daemon install`, `status`, `logs`, `uninstall` | The background service |
17
+ | `trading-r1 sync status`, `on`, `off`, `pull [ID]` | Session sync; `pull` gets a session back from your account |
18
+
19
+ `sessions`, `jobs` and most of `sync` need a running backend: the terminal's, the service, or
20
+ `trading-r1 serve`.
21
+
22
+ ## Settings
23
+
24
+ Open **Settings** from the palette.
25
+
26
+ | Setting | Does | Default |
27
+ |---|---|---|
28
+ | Verification | Check the report's figures against the records and recompute the worked-out ones. Takes about twice the time and tokens. | off |
29
+ | Source review | Check the report against its sources. Ignored when Verification is on. | off |
30
+ | Default mode | The mode the app opens in. | auto |
31
+ | Auto-compact | Compact the context before it fills the model's window. | on |
32
+ | Show reasoning | The model's thinking in the transcript. | on |
33
+ | Tool details | `brief` shows a tool call's values; `full` shows every argument by name. | brief |
34
+ | Side panel | The plan, data records and sources beside the transcript. | on |
35
+ | Also save as Markdown, HTML page | Files saved beside a report's PDF. | Markdown on, page off |
36
+ | Session sync | Copy your sessions to your Tauric account. | on |
37
+ | Remembered notes… | View or delete what the agent has noted about you. | |
38
+
39
+ ## Reports, channels and jobs
40
+
41
+ `TR1_REPORTS_DIR` changes the reports folder. Reports the PDF font cannot draw, such as Chinese or
42
+ Japanese, become an HTML page.
43
+
44
+ ```bash
45
+ trading-r1 channels add telegram
46
+ trading-r1 channels add email --preset gmail --to me@example.com # asks for the app password
47
+ trading-r1 channels add folder --path briefs
48
+ trading-r1 channels test telegram
49
+ trading-r1 export SESSION_ID --format pdf -o report.pdf # or md, html; --turn N
50
+ trading-r1 export SESSION_ID --send telegram,email
51
+ ```
52
+
53
+ For Gmail, turn on 2-Step Verification and make an app password in your Google account. Other
54
+ providers take `--host`, `--port` and `--username`.
55
+
56
+ ```bash
57
+ trading-r1 jobs add --name "Morning brief" --every weekdays --time 08:00 --tz America/New_York \
58
+ --prompt "What moved my watchlist overnight? NVDA, AAPL, MSFT." --deliver email,telegram
59
+ trading-r1 jobs add --name "Weekly review" --every week --weekday fri --time 17:00 \
60
+ --prompt "Review my portfolio's week." --deliver email
61
+ trading-r1 jobs list
62
+ ```
63
+
64
+ `--cron` takes any five-field expression, and `--at 2027-01-04T08:00:00-05:00` runs once.
65
+ `--profile` and `--mode` pin the model and mode. Jobs run unattended, so they cannot ask you a
66
+ question.
67
+
68
+ ## Session sync
69
+
70
+ Sync is on by default with a Tauric key, whichever model you use: your sessions, with their
71
+ questions, model requests and responses and tool results, are copied to your account at
72
+ `api.tauric.ai`. Turn it off under *Settings > Session sync* or with `trading-r1 sync off`.
73
+
74
+ ## Your data and keys
75
+
76
+ - `trading-r1 secrets set` and the key forms store keys in `~/.trading-r1/credentials.json`, and
77
+ `trading-r1 daemon install` copies them to `~/.trading-r1/daemon.env`. Only you can read these
78
+ files, but your own processes and any backup tool that copies the folder can too.
79
+ - Sessions, notes and settings are plain files under `~/.trading-r1/`.
80
+ - The backend listens on `127.0.0.1` by default, and every route but its liveness check needs a
81
+ bearer token, kept in a file only you can read. Do not expose it to a network you do not trust.
82
+ - The agent can read web pages and call the data API on your behalf, and sends what it reads to
83
+ the model you selected.
84
+ - Reports go to your channels through those services (your mail provider, Telegram). With `reply`
85
+ on, the private chat paired with your Telegram bot can ask the agent questions.
86
+
87
+ ## Configuration
88
+
89
+ Keys are read from the environment, then from `~/.trading-r1/credentials.json`. Settings, channels
90
+ and model profiles are in the same folder (`TR1_HOME` moves it).
91
+
92
+ | Variable | Does |
93
+ |---|---|
94
+ | `TR1_PROFILE` | The model to start on |
95
+ | `TR1_REPORTS_DIR` | The reports folder |
96
+ | `TR1_SKILLS_DIR` | One more folder of skills |
97
+ | `TR1_PORT` | The backend's port |
98
+ | `TR1_VLLM_BASE_URL` | Your vLLM server's address, such as `http://gpu-box:8000/v1` |
99
+ | `TR1_<NAME>_BASE_URL`, `TR1_<NAME>_MODEL`, `TR1_<NAME>_API_KEY` | One model's address, model and key |
100
+
101
+ To add a model, give it a profile in `~/.trading-r1/providers.json`:
102
+
103
+ ```json
104
+ {"profiles": {"my-qwen": {"extends": "vllm", "base_url": "http://gpu-box:9000/v1",
105
+ "reader_profile": "my-qwen"}}}
106
+ ```
107
+
108
+ Profiles with their own address send no key unless they name one (`"api_key_env": "MY_KEY"`). Those
109
+ that extend a hosted profile keep its key, so name the key they should send.
110
+
111
+ ## Adding a skill
112
+
113
+ Skills are `SKILL.md` files that tell the agent how to do a kind of work with its tools. Put one in
114
+ `./skills/my-recipe/SKILL.md` under the folder you start from, or in `TR1_SKILLS_DIR`. Skills with a
115
+ built-in's name replace it.
@@ -0,0 +1,26 @@
1
+ # Trading-R1: development entrypoints. `make help` lists targets.
2
+ .DEFAULT_GOAL := help
3
+ .PHONY: help dev lint smoke
4
+
5
+ help: ## list targets
6
+ @grep -E '^[a-z-]+:.*##' $(MAKEFILE_LIST) | sed 's/:.*##/\t/' | sort
7
+
8
+ dev: ## run the service with auto-reload
9
+ uv run trading-r1 serve --reload
10
+
11
+ lint: ## ruff and Biome
12
+ uv run ruff check .
13
+ uv run ruff format --check .
14
+ cd tui && bunx @biomejs/biome@2.6.4 format .
15
+
16
+ smoke: ## the command runs, the backend answers, the terminal UI typechecks
17
+ uv run trading-r1 --version
18
+ for c in serve export sessions channels jobs secrets daemon sync; do \
19
+ uv run trading-r1 $$c --help > /dev/null || exit 1; done
20
+ home=$$(mktemp -d); port=$$(uv run python -c "import socket; s = socket.socket(); s.bind(('127.0.0.1', 0)); print(s.getsockname()[1])"); \
21
+ TR1_HOME=$$home TR1_PORT=$$port uv run trading-r1 serve & pid=$$!; \
22
+ ok=1; for i in $$(seq 1 30); do \
23
+ kill -0 $$pid 2>/dev/null || break; \
24
+ curl -sf http://127.0.0.1:$$port/livez > /dev/null && { ok=0; break; }; sleep 1; done; \
25
+ kill $$pid 2>/dev/null; wait $$pid 2>/dev/null; exit $$ok
26
+ cd tui && bun install --frozen-lockfile && bunx tsc --noEmit