traceforge-toolkit 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.
- traceforge/__init__.py +72 -0
- traceforge/__main__.py +5 -0
- traceforge/_generated.py +254 -0
- traceforge/adapters/__init__.py +12 -0
- traceforge/adapters/base.py +82 -0
- traceforge/adapters/genai_otel.py +164 -0
- traceforge/adapters/mapped_json.py +297 -0
- traceforge/adapters/otel.py +220 -0
- traceforge/boundary/__init__.py +46 -0
- traceforge/boundary/data/boundary-model.joblib +0 -0
- traceforge/boundary/decode.py +87 -0
- traceforge/boundary/features.py +137 -0
- traceforge/boundary/inference.py +267 -0
- traceforge/boundary/inferencer.py +146 -0
- traceforge/classify/__init__.py +95 -0
- traceforge/classify/cmd.py +109 -0
- traceforge/classify/coding.py +213 -0
- traceforge/classify/config.py +554 -0
- traceforge/classify/core.py +266 -0
- traceforge/classify/data/binary_info.yaml +358 -0
- traceforge/classify/data/canonical_tools.yaml +251 -0
- traceforge/classify/data/effect_overrides.yaml +480 -0
- traceforge/classify/data/mcp_profiles.yaml +711 -0
- traceforge/classify/data/recommendation_rules.yaml +111 -0
- traceforge/classify/data/risk.yaml +534 -0
- traceforge/classify/data/shell_defaults.yaml +95 -0
- traceforge/classify/data/shell_rules.yaml +1192 -0
- traceforge/classify/data/tool_classifications.yaml +215 -0
- traceforge/classify/data/verb_inference.yaml +218 -0
- traceforge/classify/mcp.py +181 -0
- traceforge/classify/phases.py +75 -0
- traceforge/classify/powershell.py +93 -0
- traceforge/classify/registry.py +138 -0
- traceforge/classify/risk.py +553 -0
- traceforge/classify/rules.py +215 -0
- traceforge/classify/schema.yaml +282 -0
- traceforge/classify/shell.py +503 -0
- traceforge/classify/tools.py +91 -0
- traceforge/classify/workflow.py +32 -0
- traceforge/cli/__init__.py +42 -0
- traceforge/cli/config_cmd.py +130 -0
- traceforge/cli/detect.py +46 -0
- traceforge/cli/download_cmd.py +74 -0
- traceforge/cli/factory.py +60 -0
- traceforge/cli/gate_cmd.py +30 -0
- traceforge/cli/init_cmd.py +86 -0
- traceforge/cli/replay.py +130 -0
- traceforge/cli/runner.py +181 -0
- traceforge/cli/score.py +217 -0
- traceforge/cli/status.py +65 -0
- traceforge/cli/watch.py +297 -0
- traceforge/config/__init__.py +80 -0
- traceforge/config/defaults.py +149 -0
- traceforge/config/loader.py +239 -0
- traceforge/config/mappings.py +104 -0
- traceforge/config/models.py +579 -0
- traceforge/enricher.py +576 -0
- traceforge/formatting/__init__.py +12 -0
- traceforge/formatting/budget.py +92 -0
- traceforge/formatting/density.py +154 -0
- traceforge/gate/__init__.py +17 -0
- traceforge/gate/client.py +145 -0
- traceforge/gate/external.py +305 -0
- traceforge/gate/registry.py +108 -0
- traceforge/gate/server.py +174 -0
- traceforge/gates/__init__.py +8 -0
- traceforge/gates/pii.py +352 -0
- traceforge/gates/pii_patterns.yaml +228 -0
- traceforge/governance/__init__.py +121 -0
- traceforge/governance/assessor.py +441 -0
- traceforge/governance/budget.py +59 -0
- traceforge/governance/canonical.py +56 -0
- traceforge/governance/codec.py +414 -0
- traceforge/governance/context.py +249 -0
- traceforge/governance/drift.py +196 -0
- traceforge/governance/emitter.py +234 -0
- traceforge/governance/envelope.py +138 -0
- traceforge/governance/ifc.py +364 -0
- traceforge/governance/integrity.py +162 -0
- traceforge/governance/labeler.py +250 -0
- traceforge/governance/mcp_drift.py +328 -0
- traceforge/governance/monitor.py +539 -0
- traceforge/governance/observer.py +276 -0
- traceforge/governance/persistence.py +401 -0
- traceforge/governance/phase1.py +77 -0
- traceforge/governance/pii.py +276 -0
- traceforge/governance/pipeline.py +840 -0
- traceforge/governance/registry.py +110 -0
- traceforge/governance/results.py +183 -0
- traceforge/governance/risk_wrapper.py +113 -0
- traceforge/governance/rules.py +368 -0
- traceforge/governance/scorer.py +262 -0
- traceforge/governance/shield.py +318 -0
- traceforge/governance/state.py +466 -0
- traceforge/governance/types.py +176 -0
- traceforge/mappings/__init__.py +1 -0
- traceforge/mappings/aider.yaml +216 -0
- traceforge/mappings/aider_markdown.yaml +113 -0
- traceforge/mappings/amazonq.yaml +56 -0
- traceforge/mappings/antigravity.yaml +88 -0
- traceforge/mappings/claude.yaml +93 -0
- traceforge/mappings/cline.yaml +286 -0
- traceforge/mappings/codex.yaml +158 -0
- traceforge/mappings/continue_dev.yaml +57 -0
- traceforge/mappings/copilot.yaml +266 -0
- traceforge/mappings/copilot_markdown.yaml +72 -0
- traceforge/mappings/copilot_vscode.yaml +181 -0
- traceforge/mappings/crewai.yaml +592 -0
- traceforge/mappings/goose.yaml +128 -0
- traceforge/mappings/langgraph.yaml +165 -0
- traceforge/mappings/maf.yaml +90 -0
- traceforge/mappings/maf_transcript.yaml +99 -0
- traceforge/mappings/openai_agents.yaml +144 -0
- traceforge/mappings/opencode.yaml +473 -0
- traceforge/mappings/openhands.yaml +320 -0
- traceforge/mappings/pydantic_ai.yaml +183 -0
- traceforge/mappings/smolagents.yaml +89 -0
- traceforge/mappings/sweagent.yaml +82 -0
- traceforge/migrations/__init__.py +1 -0
- traceforge/migrations/env.py +60 -0
- traceforge/migrations/models.py +145 -0
- traceforge/migrations/runner.py +44 -0
- traceforge/migrations/script.py.mako +25 -0
- traceforge/migrations/versions/0001_initial.py +176 -0
- traceforge/migrations/versions/__init__.py +4 -0
- traceforge/models.py +29 -0
- traceforge/parsers/__init__.py +21 -0
- traceforge/parsers/aider.py +416 -0
- traceforge/parsers/base.py +226 -0
- traceforge/parsers/copilot.py +314 -0
- traceforge/phase/__init__.py +50 -0
- traceforge/phase/data/phase-model.joblib +0 -0
- traceforge/phase/data/potion-base-8M/README.md +99 -0
- traceforge/phase/data/potion-base-8M/config.json +13 -0
- traceforge/phase/data/potion-base-8M/model.safetensors +0 -0
- traceforge/phase/data/potion-base-8M/modules.json +14 -0
- traceforge/phase/data/potion-base-8M/tokenizer.json +1 -0
- traceforge/phase/event_rows.py +107 -0
- traceforge/phase/features.py +468 -0
- traceforge/phase/inference.py +279 -0
- traceforge/phase/inferencer.py +171 -0
- traceforge/phase/segmentation.py +258 -0
- traceforge/pipeline.py +891 -0
- traceforge/preprocessors/__init__.py +34 -0
- traceforge/preprocessors/amazonq.py +224 -0
- traceforge/preprocessors/antigravity.py +116 -0
- traceforge/preprocessors/claude.py +95 -0
- traceforge/preprocessors/cline.py +36 -0
- traceforge/preprocessors/codex.py +311 -0
- traceforge/preprocessors/continue_dev.py +119 -0
- traceforge/preprocessors/copilot_vscode.py +171 -0
- traceforge/preprocessors/goose.py +156 -0
- traceforge/preprocessors/maf_transcript.py +84 -0
- traceforge/preprocessors/openai_agents.py +86 -0
- traceforge/preprocessors/opencode.py +85 -0
- traceforge/preprocessors/openhands.py +36 -0
- traceforge/preprocessors/pydantic_ai.py +62 -0
- traceforge/preprocessors/registry.py +24 -0
- traceforge/preprocessors/smolagents.py +90 -0
- traceforge/py.typed +0 -0
- traceforge/sdk/__init__.py +59 -0
- traceforge/sdk/gate_policy.py +63 -0
- traceforge/sdk/gate_types.py +140 -0
- traceforge/sdk/pipeline.py +265 -0
- traceforge/sdk/verdict.py +81 -0
- traceforge/sinks/__init__.py +23 -0
- traceforge/sinks/base.py +95 -0
- traceforge/sinks/callback.py +132 -0
- traceforge/sinks/console.py +112 -0
- traceforge/sinks/factory.py +94 -0
- traceforge/sinks/jsonl.py +125 -0
- traceforge/sinks/otel_exporter.py +212 -0
- traceforge/sinks/parquet.py +260 -0
- traceforge/sinks/s3.py +206 -0
- traceforge/sinks/sqlite_output.py +234 -0
- traceforge/sinks/webhook.py +136 -0
- traceforge/sources/__init__.py +18 -0
- traceforge/sources/auto_detect.py +173 -0
- traceforge/sources/base.py +45 -0
- traceforge/sources/file_poll.py +136 -0
- traceforge/sources/file_watch.py +221 -0
- traceforge/sources/http_poll.py +141 -0
- traceforge/sources/replay.py +63 -0
- traceforge/sources/sqlite.py +187 -0
- traceforge/sources/sse.py +198 -0
- traceforge/telemetry/__init__.py +192 -0
- traceforge/title/__init__.py +23 -0
- traceforge/title/_resolve.py +79 -0
- traceforge/title/context.py +295 -0
- traceforge/title/data/boilerplate_files.json +14 -0
- traceforge/title/heuristics.py +429 -0
- traceforge/title/hygiene.py +90 -0
- traceforge/title/inference.py +314 -0
- traceforge/title/inferencer.py +477 -0
- traceforge/title/naming.py +398 -0
- traceforge/trace.py +291 -0
- traceforge/tracking/__init__.py +30 -0
- traceforge/tracking/models.py +115 -0
- traceforge/tracking/phase_tracker.py +288 -0
- traceforge/types.py +315 -0
- traceforge_toolkit-0.1.0.dist-info/METADATA +188 -0
- traceforge_toolkit-0.1.0.dist-info/RECORD +205 -0
- traceforge_toolkit-0.1.0.dist-info/WHEEL +4 -0
- traceforge_toolkit-0.1.0.dist-info/entry_points.txt +2 -0
- traceforge_toolkit-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# Cline / Roo Code event mapping for MappedJsonAdapter
|
|
2
|
+
# Targets: cline >= 3.88 (VS Code extension globalStorage JSON format)
|
|
3
|
+
# Source: cline/cline apps/vscode/src/shared/ExtensionMessage.ts (commit 9d59de4)
|
|
4
|
+
#
|
|
5
|
+
# IMPORTANT: Real Cline uses a COMPOUND discriminator:
|
|
6
|
+
# - type_field "type" has ONLY two values: "ask" or "say"
|
|
7
|
+
# - The actual sub-type is in the "ask" or "say" field:
|
|
8
|
+
# {type: "say", say: "api_req_started", text: JSON.stringify({tokensIn, tokensOut, cost})}
|
|
9
|
+
# {type: "ask", ask: "tool", text: JSON.stringify({tool, path})}
|
|
10
|
+
#
|
|
11
|
+
# Events like "say.api_req_started" will NEVER fire against raw Cline data
|
|
12
|
+
# because type is always "ask" or "say". They are here for ClinePreProcessor output
|
|
13
|
+
# that flattens: {type: "say", say: "api_req_started"} → {type: "say.api_req_started"}.
|
|
14
|
+
#
|
|
15
|
+
# Real ClineMessage structure:
|
|
16
|
+
# {ts: number, type: "ask"|"say", ask?: ClineAsk, say?: ClineSay, text?: string, ...}
|
|
17
|
+
# API metrics: JSON.parse(text) on say="api_req_started" → {tokensIn, tokensOut, cost, ...}
|
|
18
|
+
# ClineApiReqInfo fields: request, tokensIn, tokensOut, cacheWrites, cacheReads,
|
|
19
|
+
# cost, cancelReason, streamingFailedMessage, retryStatus
|
|
20
|
+
# NOTE: There is NO "model" field in ClineApiReqInfo.
|
|
21
|
+
# Tool info: JSON.parse(text) on say="tool" → {tool, path, content, diff}
|
|
22
|
+
|
|
23
|
+
framework: cline
|
|
24
|
+
framework_version: ">=3.88"
|
|
25
|
+
ingestion_mode: file_watch
|
|
26
|
+
type_field: type
|
|
27
|
+
timestamp_field: ts
|
|
28
|
+
preprocessor: cline
|
|
29
|
+
|
|
30
|
+
motivation:
|
|
31
|
+
sources:
|
|
32
|
+
- events: ["say.text"]
|
|
33
|
+
field: content
|
|
34
|
+
role: intent
|
|
35
|
+
- events: ["say.reasoning"]
|
|
36
|
+
field: content
|
|
37
|
+
role: reasoning
|
|
38
|
+
targets: ["tool.call.completed"]
|
|
39
|
+
|
|
40
|
+
events:
|
|
41
|
+
# ── Say subtypes (preprocessor synthesizes "say.<subtype>") ──
|
|
42
|
+
# Verified against ClineSay type in ExtensionMessage.ts (38 values)
|
|
43
|
+
say.task:
|
|
44
|
+
kind: session.started
|
|
45
|
+
payload:
|
|
46
|
+
content: text
|
|
47
|
+
say.text:
|
|
48
|
+
kind: message.assistant
|
|
49
|
+
payload:
|
|
50
|
+
content: text
|
|
51
|
+
say.tool:
|
|
52
|
+
kind: tool.call.completed
|
|
53
|
+
payload:
|
|
54
|
+
tool_name: parsed.tool
|
|
55
|
+
result: text
|
|
56
|
+
path: parsed.path
|
|
57
|
+
say.api_req_started:
|
|
58
|
+
kind: llm.call.started
|
|
59
|
+
payload:
|
|
60
|
+
input_tokens: parsed.tokensIn
|
|
61
|
+
say.api_req_finished:
|
|
62
|
+
kind: llm.call.completed
|
|
63
|
+
payload:
|
|
64
|
+
input_tokens: parsed.tokensIn
|
|
65
|
+
output_tokens: parsed.tokensOut
|
|
66
|
+
cost_usd: parsed.cost
|
|
67
|
+
cache_read_tokens: parsed.cacheReads
|
|
68
|
+
cache_write_tokens: parsed.cacheWrites
|
|
69
|
+
say.api_req_retried:
|
|
70
|
+
kind: llm.call.retried
|
|
71
|
+
payload:
|
|
72
|
+
content: text
|
|
73
|
+
say.error:
|
|
74
|
+
kind: session.error
|
|
75
|
+
payload:
|
|
76
|
+
message: text
|
|
77
|
+
say.error_retry:
|
|
78
|
+
kind: llm.call.retried
|
|
79
|
+
payload:
|
|
80
|
+
content: text
|
|
81
|
+
say.reasoning:
|
|
82
|
+
kind: reasoning.started
|
|
83
|
+
payload:
|
|
84
|
+
content: text
|
|
85
|
+
say.completion_result:
|
|
86
|
+
kind: session.ended
|
|
87
|
+
payload:
|
|
88
|
+
output: text
|
|
89
|
+
say.user_feedback:
|
|
90
|
+
kind: message.user
|
|
91
|
+
payload:
|
|
92
|
+
content: text
|
|
93
|
+
say.user_feedback_diff:
|
|
94
|
+
kind: message.user
|
|
95
|
+
payload:
|
|
96
|
+
content: text
|
|
97
|
+
say.command:
|
|
98
|
+
kind: command.started
|
|
99
|
+
payload:
|
|
100
|
+
command: text
|
|
101
|
+
say.command_output:
|
|
102
|
+
kind: command.completed
|
|
103
|
+
payload:
|
|
104
|
+
content: text
|
|
105
|
+
say.shell_integration_warning:
|
|
106
|
+
kind: session.warning
|
|
107
|
+
payload:
|
|
108
|
+
message: text
|
|
109
|
+
say.shell_integration_warning_with_suggestion:
|
|
110
|
+
kind: session.warning
|
|
111
|
+
payload:
|
|
112
|
+
message: text
|
|
113
|
+
say.browser_action_launch:
|
|
114
|
+
kind: browser.action
|
|
115
|
+
payload:
|
|
116
|
+
content: text
|
|
117
|
+
say.browser_action:
|
|
118
|
+
kind: browser.action
|
|
119
|
+
payload:
|
|
120
|
+
content: text
|
|
121
|
+
say.browser_action_result:
|
|
122
|
+
kind: browser.result
|
|
123
|
+
payload:
|
|
124
|
+
content: text
|
|
125
|
+
say.mcp_server_request_started:
|
|
126
|
+
kind: mcp.connection.started
|
|
127
|
+
payload:
|
|
128
|
+
content: text
|
|
129
|
+
say.mcp_server_response:
|
|
130
|
+
kind: mcp.tool.completed
|
|
131
|
+
payload:
|
|
132
|
+
content: text
|
|
133
|
+
say.mcp_notification:
|
|
134
|
+
kind: mcp.info
|
|
135
|
+
payload:
|
|
136
|
+
content: text
|
|
137
|
+
say.use_mcp_server:
|
|
138
|
+
kind: mcp.tool.started
|
|
139
|
+
payload:
|
|
140
|
+
content: text
|
|
141
|
+
say.load_mcp_documentation:
|
|
142
|
+
kind: mcp.info
|
|
143
|
+
payload:
|
|
144
|
+
content: text
|
|
145
|
+
say.diff_error:
|
|
146
|
+
kind: session.error
|
|
147
|
+
payload:
|
|
148
|
+
message: text
|
|
149
|
+
say.deleted_api_reqs:
|
|
150
|
+
kind: session.info
|
|
151
|
+
payload:
|
|
152
|
+
content: text
|
|
153
|
+
say.clineignore_error:
|
|
154
|
+
kind: session.error
|
|
155
|
+
payload:
|
|
156
|
+
message: text
|
|
157
|
+
say.command_permission_denied:
|
|
158
|
+
kind: permission.denied
|
|
159
|
+
payload:
|
|
160
|
+
content: text
|
|
161
|
+
say.checkpoint_created:
|
|
162
|
+
kind: checkpoint.created
|
|
163
|
+
payload:
|
|
164
|
+
content: text
|
|
165
|
+
say.generate_explanation:
|
|
166
|
+
kind: reasoning.started
|
|
167
|
+
payload:
|
|
168
|
+
content: text
|
|
169
|
+
say.info:
|
|
170
|
+
kind: session.info
|
|
171
|
+
payload:
|
|
172
|
+
content: text
|
|
173
|
+
say.task_progress:
|
|
174
|
+
kind: session.info
|
|
175
|
+
payload:
|
|
176
|
+
content: text
|
|
177
|
+
say.hook_status:
|
|
178
|
+
kind: command.completed
|
|
179
|
+
payload:
|
|
180
|
+
content: text
|
|
181
|
+
say.hook_output_stream:
|
|
182
|
+
kind: command.completed
|
|
183
|
+
payload:
|
|
184
|
+
content: text
|
|
185
|
+
say.subagent:
|
|
186
|
+
kind: agent.status
|
|
187
|
+
payload:
|
|
188
|
+
content: text
|
|
189
|
+
say.use_subagents:
|
|
190
|
+
kind: agent.spawned
|
|
191
|
+
payload:
|
|
192
|
+
content: text
|
|
193
|
+
say.subagent_usage:
|
|
194
|
+
kind: agent.completed
|
|
195
|
+
payload:
|
|
196
|
+
content: text
|
|
197
|
+
say.conditional_rules_applied:
|
|
198
|
+
kind: session.info
|
|
199
|
+
payload:
|
|
200
|
+
content: text
|
|
201
|
+
|
|
202
|
+
# ── Ask subtypes (preprocessor synthesizes "ask.<subtype>") ──
|
|
203
|
+
# Verified against ClineAsk type in ExtensionMessage.ts (18 values)
|
|
204
|
+
ask.followup:
|
|
205
|
+
kind: input.requested
|
|
206
|
+
payload:
|
|
207
|
+
content: text
|
|
208
|
+
ask.tool:
|
|
209
|
+
kind: permission.requested
|
|
210
|
+
payload:
|
|
211
|
+
tool_name: parsed.tool
|
|
212
|
+
content: text
|
|
213
|
+
ask.command:
|
|
214
|
+
kind: permission.requested
|
|
215
|
+
payload:
|
|
216
|
+
command: text
|
|
217
|
+
ask.command_output:
|
|
218
|
+
kind: permission.requested
|
|
219
|
+
payload:
|
|
220
|
+
content: text
|
|
221
|
+
ask.completion_result:
|
|
222
|
+
kind: input.requested
|
|
223
|
+
payload:
|
|
224
|
+
content: text
|
|
225
|
+
ask.resume_task:
|
|
226
|
+
kind: input.requested
|
|
227
|
+
payload:
|
|
228
|
+
content: text
|
|
229
|
+
ask.resume_completed_task:
|
|
230
|
+
kind: input.requested
|
|
231
|
+
payload:
|
|
232
|
+
content: text
|
|
233
|
+
ask.plan_mode_respond:
|
|
234
|
+
kind: input.requested
|
|
235
|
+
payload:
|
|
236
|
+
content: text
|
|
237
|
+
ask.act_mode_respond:
|
|
238
|
+
kind: input.requested
|
|
239
|
+
payload:
|
|
240
|
+
content: text
|
|
241
|
+
ask.api_req_failed:
|
|
242
|
+
kind: llm.call.failed
|
|
243
|
+
payload:
|
|
244
|
+
content: text
|
|
245
|
+
ask.mistake_limit_reached:
|
|
246
|
+
kind: input.requested
|
|
247
|
+
payload:
|
|
248
|
+
content: text
|
|
249
|
+
ask.browser_action_launch:
|
|
250
|
+
kind: permission.requested
|
|
251
|
+
payload:
|
|
252
|
+
content: text
|
|
253
|
+
ask.use_mcp_server:
|
|
254
|
+
kind: permission.requested
|
|
255
|
+
payload:
|
|
256
|
+
content: text
|
|
257
|
+
ask.new_task:
|
|
258
|
+
kind: input.requested
|
|
259
|
+
payload:
|
|
260
|
+
content: text
|
|
261
|
+
ask.condense:
|
|
262
|
+
kind: input.requested
|
|
263
|
+
payload:
|
|
264
|
+
content: text
|
|
265
|
+
ask.summarize_task:
|
|
266
|
+
kind: input.requested
|
|
267
|
+
payload:
|
|
268
|
+
content: text
|
|
269
|
+
ask.report_bug:
|
|
270
|
+
kind: input.requested
|
|
271
|
+
payload:
|
|
272
|
+
content: text
|
|
273
|
+
ask.use_subagents:
|
|
274
|
+
kind: permission.requested
|
|
275
|
+
payload:
|
|
276
|
+
content: text
|
|
277
|
+
|
|
278
|
+
# ── Fallback for unknown subtypes ──
|
|
279
|
+
say:
|
|
280
|
+
kind: message.assistant
|
|
281
|
+
payload:
|
|
282
|
+
content: text
|
|
283
|
+
ask:
|
|
284
|
+
kind: input.requested
|
|
285
|
+
payload:
|
|
286
|
+
content: text
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Codex CLI — YAML mapping for traceforge
|
|
2
|
+
#
|
|
3
|
+
# OpenAI Codex CLI stores rollout logs in:
|
|
4
|
+
# ~/.codex/sessions/rollout-{timestamp}-{uuid}.jsonl
|
|
5
|
+
#
|
|
6
|
+
# Each line: {"timestamp": "...", "type": "...", "payload": {...}}
|
|
7
|
+
# The "codex" preprocessor flattens the double-type nesting (type + payload.type)
|
|
8
|
+
# into a single "block_type" discriminator.
|
|
9
|
+
#
|
|
10
|
+
# Source: openai/codex (codex-rs/protocol/src/protocol.rs)
|
|
11
|
+
# Schema: RolloutLine → RolloutItem (session_meta | response_item | event_msg)
|
|
12
|
+
# Tool calls arrive via two paths:
|
|
13
|
+
# 1. response_item.function_call → model's request (shell tool)
|
|
14
|
+
# 2. event_msg.mcp_tool_call_begin/end → MCP tool execution lifecycle
|
|
15
|
+
|
|
16
|
+
framework: codex
|
|
17
|
+
framework_version: "1.x"
|
|
18
|
+
ingestion_mode: file_watch
|
|
19
|
+
type_field: block_type
|
|
20
|
+
default_kind: raw
|
|
21
|
+
preprocessor: codex
|
|
22
|
+
|
|
23
|
+
motivation:
|
|
24
|
+
sources:
|
|
25
|
+
- events: ["message.assistant"]
|
|
26
|
+
field: content
|
|
27
|
+
role: intent
|
|
28
|
+
|
|
29
|
+
events:
|
|
30
|
+
# ── Session metadata (first line of every file) ────────────────────────────
|
|
31
|
+
session.meta:
|
|
32
|
+
kind: session.start
|
|
33
|
+
payload:
|
|
34
|
+
session_id: session_id
|
|
35
|
+
model_provider: model_provider
|
|
36
|
+
cwd: cwd
|
|
37
|
+
cli_version: cli_version
|
|
38
|
+
|
|
39
|
+
# ── Shell tool calls (model → built-in shell) ─────────────────────────────
|
|
40
|
+
tool.shell_call:
|
|
41
|
+
kind: tool.call.started
|
|
42
|
+
payload:
|
|
43
|
+
tool_call_id: call_id
|
|
44
|
+
tool_name: tool_name
|
|
45
|
+
arguments: arguments
|
|
46
|
+
|
|
47
|
+
tool.shell_result:
|
|
48
|
+
kind: tool.call.completed
|
|
49
|
+
payload:
|
|
50
|
+
tool_call_id: call_id
|
|
51
|
+
result: output
|
|
52
|
+
|
|
53
|
+
# ── Exec lifecycle (actual execution) ──────────────────────────────────────
|
|
54
|
+
tool.exec_begin:
|
|
55
|
+
kind: tool.exec.started
|
|
56
|
+
payload:
|
|
57
|
+
tool_call_id: call_id
|
|
58
|
+
command: command
|
|
59
|
+
cwd: cwd
|
|
60
|
+
|
|
61
|
+
tool.exec_end:
|
|
62
|
+
kind: tool.exec.completed
|
|
63
|
+
payload:
|
|
64
|
+
tool_call_id: call_id
|
|
65
|
+
command: command
|
|
66
|
+
cwd: cwd
|
|
67
|
+
exit_code: exit_code
|
|
68
|
+
stdout: stdout
|
|
69
|
+
stderr: stderr
|
|
70
|
+
|
|
71
|
+
# ── MCP tool calls ─────────────────────────────────────────────────────────
|
|
72
|
+
tool.mcp_call:
|
|
73
|
+
kind: tool.call.started
|
|
74
|
+
payload:
|
|
75
|
+
tool_call_id: call_id
|
|
76
|
+
tool_name: tool_name
|
|
77
|
+
server: server
|
|
78
|
+
arguments: arguments
|
|
79
|
+
|
|
80
|
+
tool.mcp_result:
|
|
81
|
+
kind: tool.call.completed
|
|
82
|
+
payload:
|
|
83
|
+
tool_call_id: call_id
|
|
84
|
+
tool_name: tool_name
|
|
85
|
+
is_error: is_error
|
|
86
|
+
result: output
|
|
87
|
+
|
|
88
|
+
# ── Custom tool calls ──────────────────────────────────────────────────────
|
|
89
|
+
tool.custom_call:
|
|
90
|
+
kind: tool.call.started
|
|
91
|
+
payload:
|
|
92
|
+
tool_call_id: call_id
|
|
93
|
+
tool_name: tool_name
|
|
94
|
+
arguments: arguments
|
|
95
|
+
|
|
96
|
+
tool.custom_result:
|
|
97
|
+
kind: tool.call.completed
|
|
98
|
+
payload:
|
|
99
|
+
tool_call_id: call_id
|
|
100
|
+
tool_name: tool_name
|
|
101
|
+
result: output
|
|
102
|
+
|
|
103
|
+
# ── Approval requests ──────────────────────────────────────────────────────
|
|
104
|
+
tool.approval_request:
|
|
105
|
+
kind: tool.approval.requested
|
|
106
|
+
payload:
|
|
107
|
+
tool_call_id: call_id
|
|
108
|
+
command: command
|
|
109
|
+
|
|
110
|
+
# ── Messages ───────────────────────────────────────────────────────────────
|
|
111
|
+
message.user:
|
|
112
|
+
kind: message.user
|
|
113
|
+
payload:
|
|
114
|
+
content: content
|
|
115
|
+
|
|
116
|
+
message.assistant:
|
|
117
|
+
kind: message.assistant
|
|
118
|
+
payload:
|
|
119
|
+
content: content
|
|
120
|
+
|
|
121
|
+
# ── Streaming deltas (#41: event_msg passthrough as event.<type>) ──
|
|
122
|
+
event.agent_message_content_delta:
|
|
123
|
+
kind: llm.output.chunk
|
|
124
|
+
payload:
|
|
125
|
+
delta: delta
|
|
126
|
+
event.agent_message_delta:
|
|
127
|
+
kind: llm.output.chunk
|
|
128
|
+
payload:
|
|
129
|
+
delta: delta
|
|
130
|
+
event.exec_command_output_delta:
|
|
131
|
+
kind: tool.output.chunk
|
|
132
|
+
payload:
|
|
133
|
+
call_id: call_id
|
|
134
|
+
chunk: chunk
|
|
135
|
+
event.agent_reasoning_delta:
|
|
136
|
+
kind: llm.reasoning.chunk
|
|
137
|
+
payload:
|
|
138
|
+
delta: delta
|
|
139
|
+
|
|
140
|
+
# ── Item lifecycle v2 (#41: response_item passthrough as response.<type>) ──
|
|
141
|
+
response.item_started:
|
|
142
|
+
kind: session.info
|
|
143
|
+
payload:
|
|
144
|
+
item: item
|
|
145
|
+
response.item_completed:
|
|
146
|
+
kind: session.info
|
|
147
|
+
payload:
|
|
148
|
+
item: item
|
|
149
|
+
|
|
150
|
+
# ── Hooks (#41) ──
|
|
151
|
+
event.hook_started:
|
|
152
|
+
kind: hook.started
|
|
153
|
+
payload:
|
|
154
|
+
hook_name: hook_name
|
|
155
|
+
event.hook_completed:
|
|
156
|
+
kind: hook.completed
|
|
157
|
+
payload:
|
|
158
|
+
hook_name: hook_name
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Continue.dev — YAML mapping for traceforge
|
|
2
|
+
#
|
|
3
|
+
# Continue.dev stores full session conversations in:
|
|
4
|
+
# ~/.continue/sessions/{sessionId}.json
|
|
5
|
+
#
|
|
6
|
+
# The "continue" preprocessor flattens the history array into per-message
|
|
7
|
+
# dicts with a synthesized "block_type" discriminator.
|
|
8
|
+
#
|
|
9
|
+
# Source: continuedev/continue (core/util/history.ts)
|
|
10
|
+
# Verified against: Continue.dev session JSON structure
|
|
11
|
+
|
|
12
|
+
framework: continue
|
|
13
|
+
framework_version: "1.x"
|
|
14
|
+
ingestion_mode: file_watch
|
|
15
|
+
type_field: block_type
|
|
16
|
+
default_kind: raw
|
|
17
|
+
preprocessor: continue
|
|
18
|
+
|
|
19
|
+
motivation:
|
|
20
|
+
sources:
|
|
21
|
+
- events: ["assistant.message"]
|
|
22
|
+
field: content
|
|
23
|
+
role: intent
|
|
24
|
+
|
|
25
|
+
events:
|
|
26
|
+
# ── User messages ─────────────────────────────────────────────────────────
|
|
27
|
+
user.message:
|
|
28
|
+
kind: message.user
|
|
29
|
+
payload:
|
|
30
|
+
content: content
|
|
31
|
+
|
|
32
|
+
# ── Assistant messages ────────────────────────────────────────────────────
|
|
33
|
+
assistant.message:
|
|
34
|
+
kind: message.assistant
|
|
35
|
+
payload:
|
|
36
|
+
content: content
|
|
37
|
+
|
|
38
|
+
# ── Thinking / reasoning ──────────────────────────────────────────────────
|
|
39
|
+
assistant.thinking:
|
|
40
|
+
kind: reasoning.started
|
|
41
|
+
payload:
|
|
42
|
+
content: content
|
|
43
|
+
|
|
44
|
+
# ── Tool calls ────────────────────────────────────────────────────────────
|
|
45
|
+
assistant.tool_use:
|
|
46
|
+
kind: tool.call.started
|
|
47
|
+
payload:
|
|
48
|
+
tool_call_id: tool_call_id
|
|
49
|
+
tool_name: tool_name
|
|
50
|
+
arguments: arguments
|
|
51
|
+
|
|
52
|
+
# ── Tool results ──────────────────────────────────────────────────────────
|
|
53
|
+
tool.result:
|
|
54
|
+
kind: tool.call.completed
|
|
55
|
+
payload:
|
|
56
|
+
tool_call_id: tool_call_id
|
|
57
|
+
result: content
|