tradingcodex 0.1.0__py3-none-any.whl

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 (254) hide show
  1. apps/__init__.py +1 -0
  2. apps/audit/__init__.py +1 -0
  3. apps/audit/admin.py +6 -0
  4. apps/audit/apps.py +8 -0
  5. apps/audit/migrations/0001_initial.py +35 -0
  6. apps/audit/migrations/__init__.py +0 -0
  7. apps/audit/models.py +22 -0
  8. apps/harness/__init__.py +1 -0
  9. apps/harness/admin.py +6 -0
  10. apps/harness/apps.py +8 -0
  11. apps/harness/migrations/0001_initial.py +35 -0
  12. apps/harness/migrations/__init__.py +0 -0
  13. apps/harness/models.py +22 -0
  14. apps/harness/templatetags/__init__.py +1 -0
  15. apps/integrations/__init__.py +1 -0
  16. apps/integrations/admin.py +6 -0
  17. apps/integrations/apps.py +8 -0
  18. apps/integrations/migrations/0001_initial.py +29 -0
  19. apps/integrations/migrations/__init__.py +0 -0
  20. apps/integrations/models.py +16 -0
  21. apps/integrations/services.py +31 -0
  22. apps/mcp/__init__.py +1 -0
  23. apps/mcp/admin.py +20 -0
  24. apps/mcp/apps.py +8 -0
  25. apps/mcp/migrations/0001_initial.py +168 -0
  26. apps/mcp/migrations/__init__.py +0 -0
  27. apps/mcp/models.py +154 -0
  28. apps/mcp/services.py +327 -0
  29. apps/orders/__init__.py +1 -0
  30. apps/orders/admin.py +6 -0
  31. apps/orders/apps.py +8 -0
  32. apps/orders/migrations/0001_initial.py +79 -0
  33. apps/orders/migrations/__init__.py +0 -0
  34. apps/orders/models.py +66 -0
  35. apps/orders/services.py +107 -0
  36. apps/policy/__init__.py +1 -0
  37. apps/policy/admin.py +6 -0
  38. apps/policy/apps.py +8 -0
  39. apps/policy/migrations/0001_initial.py +75 -0
  40. apps/policy/migrations/__init__.py +0 -0
  41. apps/policy/models.py +61 -0
  42. apps/policy/services.py +110 -0
  43. apps/portfolio/__init__.py +1 -0
  44. apps/portfolio/admin.py +6 -0
  45. apps/portfolio/apps.py +8 -0
  46. apps/portfolio/migrations/0001_initial.py +67 -0
  47. apps/portfolio/migrations/__init__.py +0 -0
  48. apps/portfolio/models.py +53 -0
  49. apps/research/__init__.py +1 -0
  50. apps/research/admin.py +1 -0
  51. apps/research/apps.py +8 -0
  52. apps/research/migrations/__init__.py +0 -0
  53. apps/research/models.py +1 -0
  54. apps/workflows/__init__.py +1 -0
  55. apps/workflows/admin.py +6 -0
  56. apps/workflows/apps.py +8 -0
  57. apps/workflows/migrations/0001_initial.py +51 -0
  58. apps/workflows/migrations/__init__.py +0 -0
  59. apps/workflows/models.py +44 -0
  60. tradingcodex-0.1.0.dist-info/METADATA +337 -0
  61. tradingcodex-0.1.0.dist-info/RECORD +254 -0
  62. tradingcodex-0.1.0.dist-info/WHEEL +5 -0
  63. tradingcodex-0.1.0.dist-info/entry_points.txt +2 -0
  64. tradingcodex-0.1.0.dist-info/licenses/LICENSE +202 -0
  65. tradingcodex-0.1.0.dist-info/licenses/NOTICE +24 -0
  66. tradingcodex-0.1.0.dist-info/top_level.txt +4 -0
  67. tradingcodex_cli/__init__.py +1 -0
  68. tradingcodex_cli/__main__.py +124 -0
  69. tradingcodex_cli/commands/__init__.py +2 -0
  70. tradingcodex_cli/commands/bootstrap.py +157 -0
  71. tradingcodex_cli/commands/db.py +36 -0
  72. tradingcodex_cli/commands/doctor.py +230 -0
  73. tradingcodex_cli/commands/mcp.py +186 -0
  74. tradingcodex_cli/commands/orders.py +89 -0
  75. tradingcodex_cli/commands/policy.py +21 -0
  76. tradingcodex_cli/commands/profile.py +110 -0
  77. tradingcodex_cli/commands/research.py +76 -0
  78. tradingcodex_cli/commands/skills.py +93 -0
  79. tradingcodex_cli/commands/strategies.py +67 -0
  80. tradingcodex_cli/commands/subagents.py +106 -0
  81. tradingcodex_cli/commands/utils.py +134 -0
  82. tradingcodex_cli/commands/workspaces.py +53 -0
  83. tradingcodex_cli/generator.py +234 -0
  84. tradingcodex_cli/mcp_stdio.py +26 -0
  85. tradingcodex_cli/service_autostart.py +127 -0
  86. tradingcodex_service/__init__.py +5 -0
  87. tradingcodex_service/admin.py +1 -0
  88. tradingcodex_service/api.py +486 -0
  89. tradingcodex_service/application/__init__.py +2 -0
  90. tradingcodex_service/application/agents.py +1470 -0
  91. tradingcodex_service/application/audit.py +71 -0
  92. tradingcodex_service/application/common.py +88 -0
  93. tradingcodex_service/application/components.py +299 -0
  94. tradingcodex_service/application/harness.py +747 -0
  95. tradingcodex_service/application/markdown_preview.py +179 -0
  96. tradingcodex_service/application/orders.py +404 -0
  97. tradingcodex_service/application/policy.py +150 -0
  98. tradingcodex_service/application/portfolio.py +166 -0
  99. tradingcodex_service/application/research.py +356 -0
  100. tradingcodex_service/application/runtime.py +321 -0
  101. tradingcodex_service/asgi.py +6 -0
  102. tradingcodex_service/mcp_http.py +59 -0
  103. tradingcodex_service/mcp_runtime.py +565 -0
  104. tradingcodex_service/settings.py +91 -0
  105. tradingcodex_service/templates/web/activity.html +24 -0
  106. tradingcodex_service/templates/web/agent_skills.html +111 -0
  107. tradingcodex_service/templates/web/agents.html +121 -0
  108. tradingcodex_service/templates/web/base.html +150 -0
  109. tradingcodex_service/templates/web/dashboard.html +109 -0
  110. tradingcodex_service/templates/web/fragments/role_inspector.html +81 -0
  111. tradingcodex_service/templates/web/fragments/starter_prompt.html +24 -0
  112. tradingcodex_service/templates/web/fragments/topology_canvas.html +85 -0
  113. tradingcodex_service/templates/web/harness.html +87 -0
  114. tradingcodex_service/templates/web/mcp_router.html +250 -0
  115. tradingcodex_service/templates/web/orders.html +68 -0
  116. tradingcodex_service/templates/web/policy.html +81 -0
  117. tradingcodex_service/templates/web/portfolio.html +52 -0
  118. tradingcodex_service/templates/web/research.html +73 -0
  119. tradingcodex_service/templates/web/starter_prompt.html +40 -0
  120. tradingcodex_service/templates/web/strategies.html +74 -0
  121. tradingcodex_service/urls.py +42 -0
  122. tradingcodex_service/version.py +1 -0
  123. tradingcodex_service/web.py +885 -0
  124. tradingcodex_service/wsgi.py +6 -0
  125. workspace_templates/__init__.py +1 -0
  126. workspace_templates/modules/audit/files/.tradingcodex/audit/README.md +5 -0
  127. workspace_templates/modules/audit/files/trading/audit/.gitkeep +1 -0
  128. workspace_templates/modules/audit/module.json +16 -0
  129. workspace_templates/modules/codex-base/files/.codex/config.toml +272 -0
  130. workspace_templates/modules/codex-base/files/.codex/hooks/tradingcodex_hook.py +173 -0
  131. workspace_templates/modules/codex-base/files/.codex/hooks.json +105 -0
  132. workspace_templates/modules/codex-base/files/.codex/prompts/base_instructions/head-manager.md +129 -0
  133. workspace_templates/modules/codex-base/files/.codex/rules/tradingcodex.rules +50 -0
  134. workspace_templates/modules/codex-base/files/.tradingcodex/capabilities.yaml +56 -0
  135. workspace_templates/modules/codex-base/files/.tradingcodex/cli.py +16 -0
  136. workspace_templates/modules/codex-base/files/.tradingcodex/config.yaml +53 -0
  137. workspace_templates/modules/codex-base/files/.tradingcodex/policies/policy-bindings.yaml +16 -0
  138. workspace_templates/modules/codex-base/files/.tradingcodex/policies/principals.yaml +17 -0
  139. workspace_templates/modules/codex-base/files/.tradingcodex/policies/roles.yaml +27 -0
  140. workspace_templates/modules/codex-base/files/AGENTS.md +56 -0
  141. workspace_templates/modules/codex-base/files/pyproject.toml +13 -0
  142. workspace_templates/modules/codex-base/files/tcx +35 -0
  143. workspace_templates/modules/codex-base/module.json +17 -0
  144. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/policies/access-policies.yaml +39 -0
  145. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/policies/restricted-list.yaml +6 -0
  146. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/approval_receipt.schema.json +14 -0
  147. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/audit_event.schema.json +11 -0
  148. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/evidence_pack.schema.json +16 -0
  149. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/execution_result.schema.json +12 -0
  150. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/fundamental_report.schema.json +15 -0
  151. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/news_report.schema.json +15 -0
  152. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/order_intent.schema.json +30 -0
  153. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/portfolio_review.schema.json +15 -0
  154. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/postmortem_report.schema.json +14 -0
  155. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/risk_report.schema.json +15 -0
  156. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/technical_report.schema.json +15 -0
  157. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/thesis.schema.json +15 -0
  158. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/schemas/valuation.schema.json +15 -0
  159. workspace_templates/modules/enforcement-guardrails/files/.tradingcodex/scripts/validate-order-intent.py +15 -0
  160. workspace_templates/modules/enforcement-guardrails/module.json +19 -0
  161. workspace_templates/modules/fixed-subagents/files/.codex/agents/execution-operator.toml +71 -0
  162. workspace_templates/modules/fixed-subagents/files/.codex/agents/fundamental-analyst.toml +62 -0
  163. workspace_templates/modules/fixed-subagents/files/.codex/agents/instrument-analyst.toml +64 -0
  164. workspace_templates/modules/fixed-subagents/files/.codex/agents/macro-analyst.toml +64 -0
  165. workspace_templates/modules/fixed-subagents/files/.codex/agents/news-analyst.toml +63 -0
  166. workspace_templates/modules/fixed-subagents/files/.codex/agents/portfolio-manager.toml +62 -0
  167. workspace_templates/modules/fixed-subagents/files/.codex/agents/risk-manager.toml +65 -0
  168. workspace_templates/modules/fixed-subagents/files/.codex/agents/technical-analyst.toml +63 -0
  169. workspace_templates/modules/fixed-subagents/files/.codex/agents/valuation-analyst.toml +59 -0
  170. workspace_templates/modules/fixed-subagents/files/.tradingcodex/mainagent/head-manager.yaml +66 -0
  171. workspace_templates/modules/fixed-subagents/files/.tradingcodex/mainagent/skill-change-proposals/.gitkeep +1 -0
  172. workspace_templates/modules/fixed-subagents/files/.tradingcodex/mainagent/subagent-registry.yaml +56 -0
  173. workspace_templates/modules/fixed-subagents/module.json +23 -0
  174. workspace_templates/modules/guidance-guardrails/files/.tradingcodex/guidance/guardrails.md +17 -0
  175. workspace_templates/modules/guidance-guardrails/files/.tradingcodex/guidance/task-quality-checklist.md +37 -0
  176. workspace_templates/modules/guidance-guardrails/module.json +18 -0
  177. workspace_templates/modules/information-barriers/files/.tradingcodex/policies/information-barriers.yaml +211 -0
  178. workspace_templates/modules/information-barriers/files/.tradingcodex/secrets.md +9 -0
  179. workspace_templates/modules/information-barriers/files/trading/approvals/.gitkeep +1 -0
  180. workspace_templates/modules/information-barriers/files/trading/market-data/.gitkeep +1 -0
  181. workspace_templates/modules/information-barriers/files/trading/orders/approved/.gitkeep +1 -0
  182. workspace_templates/modules/information-barriers/files/trading/orders/draft/.gitkeep +1 -0
  183. workspace_templates/modules/information-barriers/files/trading/orders/executed/.gitkeep +1 -0
  184. workspace_templates/modules/information-barriers/files/trading/orders/rejected/.gitkeep +1 -0
  185. workspace_templates/modules/information-barriers/files/trading/portfolio/.gitkeep +1 -0
  186. workspace_templates/modules/information-barriers/files/trading/reports/fundamental/.gitkeep +1 -0
  187. workspace_templates/modules/information-barriers/files/trading/reports/instrument/.gitkeep +1 -0
  188. workspace_templates/modules/information-barriers/files/trading/reports/macro/.gitkeep +1 -0
  189. workspace_templates/modules/information-barriers/files/trading/reports/news/.gitkeep +1 -0
  190. workspace_templates/modules/information-barriers/files/trading/reports/policy/.gitkeep +1 -0
  191. workspace_templates/modules/information-barriers/files/trading/reports/portfolio/.gitkeep +1 -0
  192. workspace_templates/modules/information-barriers/files/trading/reports/postmortem/.gitkeep +1 -0
  193. workspace_templates/modules/information-barriers/files/trading/reports/risk/.gitkeep +1 -0
  194. workspace_templates/modules/information-barriers/files/trading/reports/technical/.gitkeep +1 -0
  195. workspace_templates/modules/information-barriers/files/trading/reports/valuation/.gitkeep +1 -0
  196. workspace_templates/modules/information-barriers/files/trading/research/.gitkeep +1 -0
  197. workspace_templates/modules/information-barriers/module.json +19 -0
  198. workspace_templates/modules/paper-trading/files/.tradingcodex/mcp/adapters/paper-trading.py +4 -0
  199. workspace_templates/modules/paper-trading/module.json +16 -0
  200. workspace_templates/modules/postmortem/files/.tradingcodex/workflows/postmortem.yaml +12 -0
  201. workspace_templates/modules/postmortem/module.json +16 -0
  202. workspace_templates/modules/repo-skills/files/.agents/skills/investment-workflow-map/SKILL.md +106 -0
  203. workspace_templates/modules/repo-skills/files/.agents/skills/investment-workflow-map/agents/openai.yaml +6 -0
  204. workspace_templates/modules/repo-skills/files/.agents/skills/manage-optional-skills/SKILL.md +101 -0
  205. workspace_templates/modules/repo-skills/files/.agents/skills/manage-optional-skills/agents/openai.yaml +6 -0
  206. workspace_templates/modules/repo-skills/files/.agents/skills/manage-subagents/SKILL.md +140 -0
  207. workspace_templates/modules/repo-skills/files/.agents/skills/manage-subagents/agents/openai.yaml +6 -0
  208. workspace_templates/modules/repo-skills/files/.agents/skills/orchestrate-workflow/SKILL.md +140 -0
  209. workspace_templates/modules/repo-skills/files/.agents/skills/orchestrate-workflow/agents/openai.yaml +6 -0
  210. workspace_templates/modules/repo-skills/files/.agents/skills/postmortem/SKILL.md +31 -0
  211. workspace_templates/modules/repo-skills/files/.agents/skills/postmortem/agents/openai.yaml +6 -0
  212. workspace_templates/modules/repo-skills/files/.agents/skills/scenario-quality-gates/SKILL.md +138 -0
  213. workspace_templates/modules/repo-skills/files/.agents/skills/scenario-quality-gates/agents/openai.yaml +6 -0
  214. workspace_templates/modules/repo-skills/files/.agents/skills/strategy-creator/SKILL.md +109 -0
  215. workspace_templates/modules/repo-skills/files/.agents/skills/strategy-creator/agents/openai.yaml +6 -0
  216. workspace_templates/modules/repo-skills/files/.agents/skills/synthesize-decision/SKILL.md +54 -0
  217. workspace_templates/modules/repo-skills/files/.agents/skills/synthesize-decision/agents/openai.yaml +6 -0
  218. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/execution-operator/execute-paper-order/SKILL.md +35 -0
  219. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/execution-operator/execute-paper-order/agents/openai.yaml +6 -0
  220. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/fundamental-analyst/fundamental-analysis/SKILL.md +46 -0
  221. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/fundamental-analyst/fundamental-analysis/agents/openai.yaml +6 -0
  222. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/instrument-analyst/instrument-analysis/SKILL.md +40 -0
  223. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/instrument-analyst/instrument-analysis/agents/openai.yaml +6 -0
  224. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/macro-analyst/macro-analysis/SKILL.md +40 -0
  225. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/macro-analyst/macro-analysis/agents/openai.yaml +6 -0
  226. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/news-analyst/news-analysis/SKILL.md +43 -0
  227. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/news-analyst/news-analysis/agents/openai.yaml +6 -0
  228. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/portfolio-manager/create-order-intent/SKILL.md +46 -0
  229. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/portfolio-manager/create-order-intent/agents/openai.yaml +6 -0
  230. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/portfolio-manager/portfolio-review/SKILL.md +44 -0
  231. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/portfolio-manager/portfolio-review/agents/openai.yaml +6 -0
  232. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/risk-manager/approve-order/SKILL.md +38 -0
  233. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/risk-manager/approve-order/agents/openai.yaml +6 -0
  234. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/risk-manager/policy-review/SKILL.md +43 -0
  235. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/risk-manager/policy-review/agents/openai.yaml +6 -0
  236. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/risk-manager/review-risk/SKILL.md +45 -0
  237. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/risk-manager/review-risk/agents/openai.yaml +6 -0
  238. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/shared/collect-evidence/SKILL.md +46 -0
  239. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/shared/collect-evidence/agents/openai.yaml +6 -0
  240. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/shared/external-data-source-gate/SKILL.md +66 -0
  241. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/shared/external-data-source-gate/agents/openai.yaml +6 -0
  242. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/technical-analyst/technical-analysis/SKILL.md +43 -0
  243. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/technical-analyst/technical-analysis/agents/openai.yaml +6 -0
  244. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/valuation-analyst/valuation-review/SKILL.md +47 -0
  245. workspace_templates/modules/repo-skills/files/.tradingcodex/subagents/skills/valuation-analyst/valuation-review/agents/openai.yaml +6 -0
  246. workspace_templates/modules/repo-skills/module.json +37 -0
  247. workspace_templates/modules/stub-execution/files/.tradingcodex/mcp/adapters/stub-execution.py +4 -0
  248. workspace_templates/modules/stub-execution/module.json +15 -0
  249. workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/adapters/live-adapter.contract.md +25 -0
  250. workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/enforcer/README.md +5 -0
  251. workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/gateway/README.md +8 -0
  252. workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/server.py +27 -0
  253. workspace_templates/modules/tradingcodex-mcp/files/.tradingcodex/mcp/smoke-call.py +18 -0
  254. workspace_templates/modules/tradingcodex-mcp/module.json +24 -0
@@ -0,0 +1,73 @@
1
+ {% extends "web/base.html" %}
2
+
3
+ {% block title %}Research Memory | tcx{% endblock %}
4
+ {% block page_label %}Research{% endblock %}
5
+
6
+ {% block content %}
7
+ {% if selected_artifact %}
8
+ <div class="tc-page-toolbar">
9
+ <a class="tc-button" href="/research/">Back to list</a>
10
+ </div>
11
+ {% endif %}
12
+
13
+ {% if selected_artifact %}
14
+ <article class="tc-panel tc-preview-panel">
15
+ <div class="tc-panel-head">
16
+ <div>
17
+ <span class="tc-eyebrow">Markdown preview</span>
18
+ <h2>{{ selected_artifact.title }}</h2>
19
+ </div>
20
+ <span class="tc-chip">v{{ selected_artifact.version }}</span>
21
+ </div>
22
+ <div class="tc-preview-meta">
23
+ <span>{{ selected_artifact.artifact_type }}</span>
24
+ <span>{{ selected_artifact.universe }}</span>
25
+ {% if selected_artifact.role %}<span>{{ selected_artifact.role }}</span>{% endif %}
26
+ {% if selected_artifact.symbol %}<span>{{ selected_artifact.symbol }}</span>{% endif %}
27
+ {% if selected_artifact.source_as_of %}<span>as of {{ selected_artifact.source_as_of }}</span>{% endif %}
28
+ <code>{{ selected_artifact.artifact_id }}</code>
29
+ </div>
30
+ {% if artifact_preview.metadata_items %}
31
+ <div class="tc-frontmatter-card">
32
+ <div class="tc-frontmatter-head">
33
+ <span class="tc-eyebrow">Frontmatter</span>
34
+ </div>
35
+ <dl class="tc-frontmatter-grid">
36
+ {% for item in artifact_preview.metadata_items %}
37
+ <div class="tc-frontmatter-item">
38
+ <dt>{{ item.label }}</dt>
39
+ <dd>{{ item.value }}</dd>
40
+ </div>
41
+ {% endfor %}
42
+ </dl>
43
+ </div>
44
+ {% endif %}
45
+ <div class="tc-markdown-preview">
46
+ {{ artifact_preview.html|safe }}
47
+ </div>
48
+ </article>
49
+ {% else %}
50
+ <article class="tc-panel tc-list-panel">
51
+ <div class="tc-panel-head">
52
+ <div>
53
+ <span class="tc-eyebrow">Artifacts</span>
54
+ <h2>{{ artifacts|length }} records</h2>
55
+ </div>
56
+ </div>
57
+ <div class="tc-artifact-list">
58
+ {% for artifact in artifacts %}
59
+ <a class="tc-artifact-link" href="/research/?artifact={{ artifact.artifact_id|urlencode }}">
60
+ <strong>{{ artifact.title }}</strong>
61
+ <span>{{ artifact.universe }} · {{ artifact.artifact_type }}{% if artifact.symbol %} · {{ artifact.symbol }}{% endif %}</span>
62
+ <small>{{ artifact.readiness_label|default:"unlabeled" }} · v{{ artifact.version }} · {{ artifact.updated_at|date:"Y-m-d H:i" }}</small>
63
+ </a>
64
+ {% empty %}
65
+ <div class="tc-empty-state">
66
+ <strong>No records yet</strong>
67
+ <span>Workspace markdown files under trading/research and trading/reports will appear here.</span>
68
+ </div>
69
+ {% endfor %}
70
+ </div>
71
+ </article>
72
+ {% endif %}
73
+ {% endblock %}
@@ -0,0 +1,40 @@
1
+ {% extends "web/base.html" %}
2
+
3
+ {% block title %}Starter Prompt | tcx{% endblock %}
4
+ {% block page_label %}Starter Prompt{% endblock %}
5
+
6
+ {% block content %}
7
+ <section class="tc-section-grid">
8
+ <article class="tc-panel">
9
+ <div class="tc-panel-head">
10
+ <span class="tc-eyebrow">Request</span>
11
+ <h2>Generate prompt</h2>
12
+ </div>
13
+ <form class="tc-prompt-form"
14
+ hx-get="{% url 'web-starter-prompt-preview' %}"
15
+ hx-target="#starter-prompt-result"
16
+ hx-swap="innerHTML">
17
+ <label for="starter-request">Investment workflow request</label>
18
+ <textarea id="starter-request" name="q" rows="8" placeholder="Example: Review how rates and oil could affect my NVDA position, no order.">{{ query }}</textarea>
19
+ <button class="tc-button tc-button-primary" type="submit">Generate starter prompt</button>
20
+ </form>
21
+ </article>
22
+
23
+ <aside class="tc-panel">
24
+ <div class="tc-panel-head">
25
+ <span class="tc-eyebrow">Boundary</span>
26
+ <h2>Web review only</h2>
27
+ </div>
28
+ <ul class="tc-plain-list">
29
+ <li>No subagent spawn.</li>
30
+ <li>No investment analysis.</li>
31
+ <li>No approvals or executions.</li>
32
+ <li>Orders still cross MCP policy checks.</li>
33
+ </ul>
34
+ </aside>
35
+ </section>
36
+
37
+ <section id="starter-prompt-result" class="tc-panel">
38
+ {% include "web/fragments/starter_prompt.html" %}
39
+ </section>
40
+ {% endblock %}
@@ -0,0 +1,74 @@
1
+ {% extends "web/base.html" %}
2
+
3
+ {% block title %}Strategies | tcx{% endblock %}
4
+ {% block page_label %}Strategies{% endblock %}
5
+
6
+ {% block content %}
7
+ {% if strategy_mode == "detail" %}
8
+ <div class="tc-page-toolbar">
9
+ <a class="tc-button" href="/harness/strategies/">Back to list</a>
10
+ </div>
11
+ {% endif %}
12
+
13
+ {% if strategy_mode == "detail" and selected_strategy %}
14
+ <article class="tc-panel tc-preview-panel">
15
+ <div class="tc-panel-head">
16
+ <div>
17
+ <span class="tc-eyebrow">Markdown preview</span>
18
+ <h2>{{ selected_strategy.heading }}</h2>
19
+ </div>
20
+ </div>
21
+ {% if strategy_preview.metadata_items %}
22
+ <div class="tc-frontmatter-card">
23
+ <div class="tc-frontmatter-head">
24
+ <span class="tc-eyebrow">Frontmatter</span>
25
+ </div>
26
+ <dl class="tc-frontmatter-grid">
27
+ {% for item in strategy_preview.metadata_items %}
28
+ <div class="tc-frontmatter-item">
29
+ <dt>{{ item.label }}</dt>
30
+ <dd>{{ item.value }}</dd>
31
+ </div>
32
+ {% endfor %}
33
+ </dl>
34
+ </div>
35
+ {% endif %}
36
+ <div class="tc-markdown-preview">
37
+ {{ strategy_preview.html|safe }}
38
+ </div>
39
+ </article>
40
+ {% else %}
41
+ <section class="tc-alert">
42
+ To add, delete, or change a strategy, use Codex with <code>$strategy-creator</code>.
43
+ </section>
44
+
45
+ <article class="tc-panel">
46
+ <div class="tc-panel-head">
47
+ <div>
48
+ <span class="tc-eyebrow">Library</span>
49
+ <h2>{{ strategies|length }} strategies</h2>
50
+ </div>
51
+ </div>
52
+ <div class="tc-record-list">
53
+ {% for strategy in strategies %}
54
+ <article class="tc-record-row">
55
+ <a class="tc-record-main" href="/harness/strategies/?name={{ strategy.name|urlencode }}">
56
+ <div class="tc-chip-list">
57
+ <span class="tc-pill tc-pill--{% if strategy.active %}good{% elif strategy.status == 'archived' %}neutral{% else %}warn{% endif %}">{{ strategy.status }}</span>
58
+ </div>
59
+ <strong>{{ strategy.heading }}</strong>
60
+ {% if strategy.description %}
61
+ <small>{{ strategy.description }}</small>
62
+ {% endif %}
63
+ </a>
64
+ </article>
65
+ {% empty %}
66
+ <div class="tc-empty-state">
67
+ <strong>No strategies</strong>
68
+ <span>Use Codex with <code>$strategy-creator</code> to add one.</span>
69
+ </div>
70
+ {% endfor %}
71
+ </div>
72
+ </article>
73
+ {% endif %}
74
+ {% endblock %}
@@ -0,0 +1,42 @@
1
+ from django.contrib import admin
2
+ from django.templatetags.static import static
3
+ from django.urls import path
4
+ from django.views.generic import RedirectView
5
+
6
+ import tradingcodex_service.admin
7
+ from tradingcodex_service.api import api
8
+ from tradingcodex_service.mcp_http import mcp_endpoint
9
+ from tradingcodex_service import web
10
+
11
+ urlpatterns = [
12
+ path("", web.dashboard, name="web-dashboard"),
13
+ path("harness/", web.harness, name="web-harness"),
14
+ path("harness/agents/", web.agents_index, name="web-agents"),
15
+ path("harness/agents/<str:role>/instructions/update/", web.agent_instruction_update, name="web-agent-instruction-update"),
16
+ path("harness/agents/<str:role>/optional-skills/create/", web.optional_skill_create, name="web-optional-skill-create"),
17
+ path("harness/agents/<str:role>/optional-skills/<str:name>/update/", web.optional_skill_update, name="web-optional-skill-update"),
18
+ path("harness/agents/<str:role>/optional-skills/<str:name>/activate/", web.optional_skill_activate, name="web-optional-skill-activate"),
19
+ path("harness/agents/<str:role>/optional-skills/<str:name>/archive/", web.optional_skill_archive, name="web-optional-skill-archive"),
20
+ path("harness/agents/<str:role>/optional-skills/<str:name>/delete/", web.optional_skill_delete, name="web-optional-skill-delete"),
21
+ path("harness/strategies/", web.strategies_index, name="web-strategies"),
22
+ path("harness/roles/<str:role>/", web.role_inspector, name="web-role-inspector"),
23
+ path("workspaces/open/", web.workspace_open, name="web-workspace-open"),
24
+ path("workspaces/browse/", web.workspace_browse, name="web-workspace-browse"),
25
+ path("workspaces/<str:workspace_id>/remove/", web.workspace_remove, name="web-workspace-remove"),
26
+ path("research/", web.research, name="web-research"),
27
+ path("portfolio/", web.portfolio, name="web-portfolio"),
28
+ path("orders/", web.orders, name="web-orders"),
29
+ path("policy/", web.policy, name="web-policy"),
30
+ path("activity/", web.activity, name="web-activity"),
31
+ path("integrations/mcp/", web.mcp_router, name="web-mcp-router"),
32
+ path("integrations/mcp/routers/create/", web.mcp_router_create, name="web-mcp-router-create"),
33
+ path("integrations/mcp/routers/<int:router_id>/import/", web.mcp_router_import, name="web-mcp-router-import"),
34
+ path("integrations/mcp/tools/<int:tool_id>/update/", web.mcp_external_tool_update, name="web-mcp-external-tool-update"),
35
+ path("integrations/mcp/tools/<int:tool_id>/check/", web.mcp_external_tool_check, name="web-mcp-external-tool-check"),
36
+ path("workflow/starter-prompt/", web.starter_prompt, name="web-starter-prompt"),
37
+ path("workflow/starter-prompt/preview/", web.starter_prompt_fragment, name="web-starter-prompt-preview"),
38
+ path("favicon.ico", RedirectView.as_view(url=static("tradingcodex_admin/favicon.svg"), permanent=False)),
39
+ path("admin/", admin.site.urls),
40
+ path("api/", api.urls),
41
+ path("mcp", mcp_endpoint, name="mcp-endpoint"),
42
+ ]
@@ -0,0 +1 @@
1
+ TRADINGCODEX_VERSION = "0.1.0"